]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Adding three new function attributes for static analysis of file descriptors
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
bdc7b765
GA
12022-07-15 Marek Polacek <polacek@redhat.com>
2
3 PR c++/104477
4 * c-common.cc (c_common_reswords): Add
5 __reference_constructs_from_temporary and
6 __reference_converts_from_temporary.
7 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
8 RID_REF_CONVERTS_FROM_TEMPORARY.
9
102022-07-15 Jonathan Wakely <jwakely@redhat.com>
11
12 * c-format.cc (class range_label_for_format_type_mismatch):
13 Adjust to new label_text API.
14
c72d4714
GA
152022-07-11 Lewis Hyatt <lhyatt@gmail.com>
16
17 PR preprocessor/106252
18 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
19 option argument prior to verifying the option was found.
20
6345c414
GA
212022-07-07 David Malcolm <dmalcolm@redhat.com>
22
23 * c-format.cc (range_label_for_format_type_mismatch::get_text):
24 Update for removal of label_text::maybe_free in favor of automatic
25 memory management.
26
4bc92c3b
GA
272022-07-06 Lewis Hyatt <lhyatt@gmail.com>
28
29 PR preprocessor/53920
30 PR c++/53431
31 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
32 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
33 (c_pp_stream_token): Declare.
34 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
35 pragmas to...
36 (should_output_pragmas): ...here. New function.
37 (token_streamer::stream): Support handling early pragmas.
38 (do_line_change): Likewise.
39 (c_pp_stream_token): New function.
40 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
41 (pragma_diagnostic_lex_normal): New function. Moved logic for
42 interpreting GCC diagnostic pragmas here.
43 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
44 directly from libcpp.
45 (handle_pragma_diagnostic): Refactor into helper function...
46 (handle_pragma_diagnostic_impl): ...here. New function.
47 (handle_pragma_diagnostic_early): New function.
48 (handle_pragma_diagnostic_early_pp): New function.
49 (struct pragma_ns_name): Renamed to...
50 (struct pragma_pp_data): ...this. Add new "early_handler" member.
51 (c_register_pragma_1): Support early pragmas in the preprocessor.
52 (c_register_pragma_with_early_handler): New function.
53 (c_register_pragma): Support the new early handlers in struct
54 internal_pragma_handler.
55 (c_register_pragma_with_data): Likewise.
56 (c_register_pragma_with_expansion): Likewise.
57 (c_register_pragma_with_expansion_and_data): Likewise.
58 (c_invoke_early_pragma_handler): New function.
59 (c_pp_invoke_early_pragma_handler): New function.
60 (init_pragma): Add early pragma support for diagnostic pragmas.
61 * c-pragma.h (struct internal_pragma_handler): Add new early handler
62 members.
63 (c_register_pragma_with_early_handler): Declare.
64 (c_invoke_early_pragma_handler): Declare.
65 (c_pp_invoke_early_pragma_handler): Declare.
66
d1f3a3ff
GA
672022-07-05 Marek Polacek <polacek@redhat.com>
68
69 PR c++/105626
70 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
71 u8 strings.
72
ed974488
GA
732022-07-01 Marek Polacek <polacek@redhat.com>
74
75 PR c++/106111
76 * c-common.h (enum rid): Update RID_LAST_CXX20.
77
976196b3
GA
782022-06-30 Jonathan Wakely <jwakely@redhat.com>
79
80 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
81 names.
82
84c2131d
GA
832022-06-24 Jason Merrill <jason@redhat.com>
84
85 PR c++/87729
86 PR c++/20423
87 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
88
4390e7bf
GA
892022-06-18 Jakub Jelinek <jakub@redhat.com>
90
91 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
92 Use flag_sanitize_trap & SANITIZE_??? instead of
93 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
94 and flag_sanitize_trap differs for them, emit __builtin_trap only
95 for the comparison where trap is requested.
96 (ubsan_instrument_vla, ubsan_instrument_return): Use
97 lag_sanitize_trap & SANITIZE_??? instead of
98 flag_sanitize_undefined_trap_on_error.
99
c3642271
GA
1002022-06-13 Jason Merrill <jason@redhat.com>
101
102 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
103
d9176e64
GA
1042022-05-27 Marek Polacek <polacek@redhat.com>
105
106 PR c/90658
107 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
108
1092022-05-27 Jakub Jelinek <jakub@redhat.com>
110
111 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
112
57f2ce6a
GA
1132022-05-20 David Malcolm <dmalcolm@redhat.com>
114
115 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
116 and "override".
117 * c-pretty-print.h: Likewise.
118
1cda629f
GA
1192022-05-18 Marek Polacek <polacek@redhat.com>
120
121 PR c/105131
122 * c.opt (Wenum-int-mismatch): New.
123
1242022-05-18 Marek Polacek <polacek@redhat.com>
125
126 PR c++/105497
127 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
128 enumerator when it was marked with attribute unused.
129
1302022-05-18 Eric Botcazou <ebotcazou@adacore.com>
131
132 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
133 floating-point complex types.
134 <POINTER_TYPE>: Do not use limited_with clause if the designated
135 type is a scalar type.
136
3d9439b1
GA
1372022-05-17 Jakub Jelinek <jakub@redhat.com>
138
139 * c-omp.cc (c_finish_omp_depobj): Handle
140 OMP_CLAUSE_DEPEND_INOUTSET.
141
702bd11f
GA
1422022-05-16 Jason Merrill <jason@redhat.com>
143
144 PR c/105492
145 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
146 here.
147
1482022-05-16 Martin Liska <mliska@suse.cz>
149
150 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
151 (c_common_nodes_and_builtins): Likewise.
152 * c-format.cc (check_tokens): Likewise.
153 (check_plain): Likewise.
154 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
155 (init_pragma): Likewise.
156 * known-headers.cc (get_string_macro_hint): Likewise.
157 (get_stdlib_header_for_name): Likewise.
158 * c-attribs.cc: Likewise.
159
9df4ffe4
GA
1602022-05-13 Richard Biener <rguenther@suse.de>
161
162 * c-omp.cc: Remove gimple-fold.h include.
163
49ace834
GA
1642022-05-12 Jakub Jelinek <jakub@redhat.com>
165
166 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
167 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
168 if null_pointer_node.
169
d0d513b5
GA
1702022-05-11 Martin Liska <mliska@suse.cz>
171
172 PR target/105355
173 * c-opts.cc (c_common_handle_option): Change option name.
174 * c.opt: Remove Joined and use Separate option.
175
bd022ff9
GA
1762022-05-09 Alex Coplan <alex.coplan@arm.com>
177
178 * c-common.h (get_dump_info): Delete.
179 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
180 from the global dump_manager instead of the (now obsolete)
181 get_dump_info.
182 * c-opts.cc (original_dump_file): Delete.
183 (original_dump_flags): Delete.
184 (c_common_parse_file): Switch to using global dump_manager to
185 manage the original dump file; fix leak of dump file.
186 (get_dump_info): Delete.
187
a1947c92
GA
1882022-05-07 Marek Polacek <polacek@redhat.com>
189
190 PR c++/101833
191 PR c++/47634
192 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
193 with FN being either a function declaration or function type. Use
194 maybe_adjust_arg_pos_for_attribute.
195 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
196 check_function_format.
197 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
198 (positional_argument): Adjust.
199 * c-format.cc (get_constant): Rename to ...
200 (validate_constant): ... this. Take EXPR by reference. Return bool
201 instead of tree.
202 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
203 return value of validate_constant.
204 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
205 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
206 (check_function_format): Adjust a parameter name.
207 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
208
3e7db517
GA
2092022-05-04 Marek Polacek <polacek@redhat.com>
210
211 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
212 char to int.
213
95874f95
GA
2142022-04-30 Jason Merrill <jason@redhat.com>
215
216 PR c/100545
217 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
218 and typedef.
219 * c-common.cc (set_underlying_type): Add assert.
220
01ad093b
GA
2212022-04-26 Patrick Palka <ppalka@redhat.com>
222
223 PR c++/105304
224 * c-common.cc (verify_tree) [restart]: Move up to before the
225 NULL test.
226
da066c42
GA
2272022-04-11 Jakub Jelinek <jakub@redhat.com>
228
229 PR c++/105186
230 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
231 and __int%d__ builtin types, initialize corresponding ridpointers
232 entry.
233
150ab50f
GA
2342022-03-30 Marek Polacek <polacek@redhat.com>
235
236 PR c++/101030
237 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
238 conversion_warning when OP1 is null.
239
2402022-03-30 Thomas Schwinge <thomas@codesourcery.com>
241
242 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
243 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
244 option properties.
245
2462022-03-30 Thomas Schwinge <thomas@codesourcery.com>
247
248 * c.opt (Wuse-after-free): Remove.
249
2502022-03-30 Thomas Schwinge <thomas@codesourcery.com>
251
252 * c.opt (Warray-bounds): Remove.
253
d2906412
GA
2542022-03-26 Thomas Schwinge <thomas@codesourcery.com>
255
256 * c.opt: Properly quote comment.
257
31e989a2
GA
2582022-03-25 Eric Botcazou <ebotcazou@adacore.com>
259
260 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
261 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
262 the referenced type instead. Deal with the anonymous original type
263 of a typedef'ed type. In the actual access case, follow the chain
264 of external subtypes.
265 <TYPE_DECL>: Tidy up control flow.
266
d156bb87
GA
2672022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
268
269 * c-ada-spec.cc: Change array length
270
d7f00da1
GA
2712022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
272
273 * c-common.cc (c_family_tests): Call the new tests.
274 * c-common.h (c_diagnostic_tests): Declare.
275 (c_opt_problem_cc_tests): Likewise.
276
2772022-03-19 Jakub Jelinek <jakub@redhat.com>
278
279 PR c++/101515
280 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
281 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
282 be printed.
283
9fc8f278
GA
2842022-03-16 Christophe Lyon <christophe.lyon@arm.com>
285 Roger Sayle <roger@nextmovesoftware.com>
286
287 PR c/98198
288 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
289
2902022-03-16 Patrick Palka <ppalka@redhat.com>
291
292 PR c++/96780
293 * c.opt: Add -ffold-simple-inlines.
294
b9756c08
GA
2952022-03-13 Tobias Burnus <tobias@codesourcery.com>
296
297 * c-target.def (check_string_object_format_arg): Fix description typo.
298
57eeedda
GA
2992022-03-12 Thomas Schwinge <thomas@codesourcery.com>
300
301 PR other/65095
302 * c-common.h (c_omp_map_clause_name): Remove.
303 * c-omp.cc (c_omp_map_clause_name): Remove.
304
8cc4f9cd
GA
3052022-03-09 Jakub Jelinek <jakub@redhat.com>
306
307 PR c/104711
308 * c-opts.cc (c_common_post_options): Don't enable
309 -Wshift-negative-value from -Wextra for C++20 or later.
310 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
311 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
312 instead of TYPE_UNSIGNED.
313
e6533e2e
GA
3142022-03-07 Jakub Jelinek <jakub@redhat.com>
315
316 * c-attribs.cc: Fix up duplicated word issue in a comment.
317
12d4552e
GA
3182022-03-01 Martin Liska <mliska@suse.cz>
319
320 PR ipa/104533
321 * c-attribs.cc (handle_target_clones_attribute): Use
322 get_target_clone_attr_len and report warning soon.
323
0bdb0498
GA
3242022-02-17 Jonathan Wakely <jwakely@redhat.com>
325
326 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
327 (handle_pragma_weak): Likewise.
328 (handle_pragma_scalar_storage_order): Likewise.
329 (handle_pragma_redefine_extname): Likewise.
330 (handle_pragma_visibility): Likewise.
331 (handle_pragma_diagnostic): Likewise.
332 (handle_pragma_target): Likewise.
333 (handle_pragma_optimize): Likewise.
334 (handle_pragma_push_options): Likewise.
335 (handle_pragma_pop_options): Likewise.
336 (handle_pragma_reset_options): Likewise.
337 (handle_pragma_message): Likewise.
338 (handle_pragma_float_const_decimal64): Likewise.
339
cb3afcd2
GA
3402022-02-16 Jakub Jelinek <jakub@redhat.com>
341
342 PR c/104531
343 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
344 build_binary_op with LT_EXPR and only if that doesn't return
345 error_mark_node call build_modify_expr.
346
3472022-02-16 Jakub Jelinek <jakub@redhat.com>
348
349 PR c/104510
350 * c-common.cc (shorten_compare): Convert original arguments to
351 the original *restype_ptr when mixing binary and decimal float.
352
1f8a09d2
GA
3532022-02-14 Richard Biener <rguenther@suse.de>
354
355 PR c/104505
356 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
357 internal function calls.
358
e8d68f0a
GA
3592022-02-11 Richard Biener <rguenther@suse.de>
360
361 * c-attribs.cc (c_common_attribute_table): Add entry for
362 vector_mask.
363 (handle_vector_mask_attribute): New.
364
a645583d
GA
3652022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
366
367 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
368 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
369 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
370
3adf509f
GA
3712022-02-09 Jason Merrill <jason@redhat.com>
372
373 * c-cppbuiltin.cc (c_cpp_builtins): Update values
374 of __cpp_constexpr and __cpp_concepts for C++20.
375
bb99171b
GA
3762022-01-24 Marek Polacek <polacek@redhat.com>
377
378 PR preprocessor/104030
379 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
380
9dd44357
GA
3812022-01-21 Jakub Jelinek <jakub@redhat.com>
382
383 PR c++/104148
384 * c-common.h (check_function_arguments_recurse): Add for_format
385 arg.
386 * c-common.cc (check_function_nonnull): Pass false to
387 check_function_arguments_recurse's last argument.
388 (check_function_arguments_recurse): Add for_format argument,
389 if true, don't stop on warning_suppressed_p.
390 * c-format.cc (check_format_info): Pass true to
391 check_function_arguments_recurse's last argument.
392
fe1ad141
GA
3932022-01-19 David Malcolm <dmalcolm@redhat.com>
394
395 * c-common.cc (c_common_c_tests): Rename to...
396 (c_common_cc_tests): ...this.
397 (c_family_tests): Update calls for .c to .cc renaming.
398 * c-common.h (c_format_c_tests): Rename to...
399 (c_format_cc_tests): ...this.
400 (c_indentation_c_tests): Rename to...
401 (c_indentation_cc_tests): ...this.
402 (c_pretty_print_c_tests): Rename to...
403 (c_pretty_print_cc_tests): ...this.
404 * c-format.cc (c_format_c_tests): Rename to...
405 (c_format_cc_tests): ...this.
406 * c-indentation.cc (c_indentation_c_tests): Rename to...
407 (c_indentation_cc_tests): ...this.
408 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
409 (c_pretty_print_cc_tests): ...this.
410
fc829782
GA
4112022-01-17 Martin Liska <mliska@suse.cz>
412
413 * c-ada-spec.cc: Rename .c names to .cc.
414 * c-ada-spec.h: Likewise.
415 * c-common.cc (c_build_vec_convert): Likewise.
416 (warning_candidate_p): Likewise.
417 * c-common.h (enum rid): Likewise.
418 (build_real_imag_expr): Likewise.
419 (finish_label_address_expr): Likewise.
420 (c_get_substring_location): Likewise.
421 (c_build_bind_expr): Likewise.
422 (conflict_marker_get_final_tok_kind): Likewise.
423 (c_parse_error): Likewise.
424 (check_missing_format_attribute): Likewise.
425 (invalid_array_size_error): Likewise.
426 (warn_for_multistatement_macros): Likewise.
427 (build_attr_access_from_parms): Likewise.
428 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
429 * c-format.cc: Likewise.
430 * c-gimplify.cc (c_gimplify_expr): Likewise.
431 * c-indentation.h: Likewise.
432 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
433 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
434 * c-opts.cc (c_common_post_options): Likewise.
435 (set_std_cxx23): Likewise.
436 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
437 * c-pretty-print.h: Likewise.
438
4392022-01-17 Martin Liska <mliska@suse.cz>
440
441 * c-ada-spec.c: Moved to...
442 * c-ada-spec.cc: ...here.
443 * c-attribs.c: Moved to...
444 * c-attribs.cc: ...here.
445 * c-common.c: Moved to...
446 * c-common.cc: ...here.
447 * c-cppbuiltin.c: Moved to...
448 * c-cppbuiltin.cc: ...here.
449 * c-dump.c: Moved to...
450 * c-dump.cc: ...here.
451 * c-format.c: Moved to...
452 * c-format.cc: ...here.
453 * c-gimplify.c: Moved to...
454 * c-gimplify.cc: ...here.
455 * c-indentation.c: Moved to...
456 * c-indentation.cc: ...here.
457 * c-lex.c: Moved to...
458 * c-lex.cc: ...here.
459 * c-omp.c: Moved to...
460 * c-omp.cc: ...here.
461 * c-opts.c: Moved to...
462 * c-opts.cc: ...here.
463 * c-pch.c: Moved to...
464 * c-pch.cc: ...here.
465 * c-ppoutput.c: Moved to...
466 * c-ppoutput.cc: ...here.
467 * c-pragma.c: Moved to...
468 * c-pragma.cc: ...here.
469 * c-pretty-print.c: Moved to...
470 * c-pretty-print.cc: ...here.
471 * c-semantics.c: Moved to...
472 * c-semantics.cc: ...here.
473 * c-ubsan.c: Moved to...
474 * c-ubsan.cc: ...here.
475 * c-warn.c: Moved to...
476 * c-warn.cc: ...here.
477 * cppspec.c: Moved to...
478 * cppspec.cc: ...here.
479 * stub-objc.c: Moved to...
480 * stub-objc.cc: ...here.
481
9248ee41
GA
4822022-01-15 Martin Sebor <msebor@redhat.com>
483
484 PR c/63272
485 * c.opt (-Wdangling-pointer): New option.
486
4872022-01-15 Martin Sebor <msebor@redhat.com>
488
489 PR tree-optimization/80532
490 * c.opt (-Wuse-after-free): New options.
491
617db51d
GA
4922022-01-14 David Malcolm <dmalcolm@redhat.com>
493
494 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
495 (handle_tainted_args_attribute): New.
496
ad3f0d08
GA
4972022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
498 Jason Merrill <jason@redhat.com>
499
500 PR c++/70417
501 * c.opt: Added -Wmissing-template-keyword.
502
5032022-01-13 Richard Biener <rguenther@suse.de>
504
505 PR c/104002
506 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
507
02a8a01b
GA
5082022-01-12 Martin Liska <mliska@suse.cz>
509
510 PR target/103804
511 * c-attribs.c (handle_optimize_attribute): Do not call
512 cl_optimization_compare if we seen an error.
513
01a254e3
GA
5142022-01-11 Jakub Jelinek <jakub@redhat.com>
515
516 PR c/101537
517 PR c/103881
518 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
519 and BIT_XOR_EXPR.
520
d9450aa0
GA
5212022-01-10 Richard Biener <rguenther@suse.de>
522
523 PR middle-end/101530
524 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
525 in a TARGET_EXPR to force a temporary.
526
11ce8d04
GA
5272022-01-06 Marek Polacek <polacek@redhat.com>
528
529 PR c++/103758
530 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
531 diagnostic messages.
532 (handle_pragma_diagnostic): Likewise.
533
a4ae8c37
GA
5342022-01-03 Marek Polacek <polacek@redhat.com>
535
536 PR c++/103758
537 * c-format.c (check_tokens): Accept "decl-specifier*".
538
5392022-01-03 Jakub Jelinek <jakub@redhat.com>
540
541 PR c++/103600
542 * c-attribs.c (handle_non_overlapping_attribute): New function.
543 (c_common_attribute_table): Add "non overlapping" attribute.
544
84790a9d
GA
5452021-12-30 Jakub Jelinek <jakub@redhat.com>
546
547 PR c++/103012
548 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
549 cpp_define_unused/cpp_undef calls with forced token locations
550 BUILTINS_LOCATION.
551
d1e111da
GA
5522021-12-27 Patrick Palka <ppalka@redhat.com>
553
554 PR c++/103700
555 * c-common.c (pointer_int_sum): When quiet, return
556 error_mark_node for an incomplete pointed-to type and don't
557 call size_in_bytes_loc.
558
2554e2da
GA
5592021-12-17 Jason Merrill <jason@redhat.com>
560
561 PR c++/103681
562 * c-opts.c (c_common_post_options): Update defaults.
563
774269aa
GA
5642021-12-16 Martin Liska <mliska@suse.cz>
565
566 PR target/103709
567 * c-pragma.c (handle_pragma_pop_options): Do not check
568 global options modification when an error is seen in parsing
569 of options (pragmas or attributes).
570
c8dcf64b
GA
5712021-12-12 Jonathan Wakely <jwakely@redhat.com>
572
573 * known-headers.cc: Define INCLUDE_MEMORY instead of
574 INCLUDE_UNIQUE_PTR.
575 * name-hint.h: Likewise.
576 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
577
4b4839e3
GA
5782021-12-09 Jakub Jelinek <jakub@redhat.com>
579
580 PR pch/71934
581 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
582 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
583
03a9bd05
GA
5842021-12-03 Jakub Jelinek <jakub@redhat.com>
585
586 PR pch/71934
587 * c-pch.c (struct c_pch_validity): Remove pch_init member.
588 (pch_init): Don't initialize v.pch_init.
589 (c_common_valid_pch): Don't warn and punt if .text addresses change.
590
40fa651e
GA
5912021-12-01 Jason Merrill <jason@redhat.com>
592
593 PR c++/103310
594 * c.opt: Add -fconstexpr-fp-except.
595
87cd82c8
GA
5962021-11-29 Richard Biener <rguenther@suse.de>
597
598 * c-format.c (check_format_string): Remove spurious
599 gcc_unreachable.
600
6012021-11-29 Richard Biener <rguenther@suse.de>
602
603 * c-opts.c (c_common_post_options): Remove unreachable return.
604 * c-pragma.c (handle_pragma_target): Likewise.
605 (handle_pragma_optimize): Likewise.
606
091ccc06
GA
6072021-11-25 Jakub Jelinek <jakub@redhat.com>
608
609 PR c++/102611
610 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
611 default for C++23 regardless of warn_deprecated.
612 * c-cppbuiltin.c (c_cpp_builtins): Predefine
613 __cpp_multidimensional_subscript=202110L for C++23.
614
e1d43592
GA
6152021-11-23 Martin Sebor <msebor@redhat.com>
616
617 PR middle-end/88232
618 * c.opt: Add -Winfinite-recursion.
619
9c077398
GA
6202021-11-19 Martin Sebor <msebor@redhat.com>
621
622 PR c++/33925
623 PR c/102867
624 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
625 and improve handling tof defined symbols.
626
6272021-11-19 Martin Liska <mliska@suse.cz>
628
629 Revert:
630 2021-11-18 Martin Liska <mliska@suse.cz>
631
632 * c-gimplify.c (genericize_c_loop): Use option directly.
633
483092d3
GA
6342021-11-18 Matthias Kretz <m.kretz@gsi.de>
635
636 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
637 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
638
6392021-11-18 Martin Liska <mliska@suse.cz>
640
641 * c-gimplify.c (genericize_c_loop): Use option directly.
642
280d2838
GA
6432021-11-17 Martin Uecker <uecker@gcc.gnu.org>
644
645 PR c/91038
646 PR c/29970
647 * c-common.c (pointer_int_sum): Make sure pointer expressions
648 are evaluated first when the size expression depends on for
649 variably-modified types.
650
6512021-11-17 Marek Polacek <polacek@redhat.com>
652
653 PR preprocessor/103026
654 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
655
6b1695f4
GA
6562021-11-16 Jason Merrill <jason@redhat.com>
657
658 * c-common.c (release_tree_vector): Only cache vecs smaller than
659 16 elements.
660
e2b57363
GA
6612021-11-15 Jason Merrill <jason@redhat.com>
662
663 * c.opt: Add -fimplicit-constexpr.
664 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
665 * c-opts.c (c_common_post_options): Disable below C++14.
666
6672021-11-15 Jakub Jelinek <jakub@redhat.com>
668
669 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
670 Duplicate to both OMP_TARGET and OMP_TEAMS.
671
8d36a0d2
GA
6722021-11-10 Marek Polacek <polacek@redhat.com>
673
674 PR c++/101940
675 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
676 ignored_attributes.
677
c9b1334e
GA
6782021-11-09 David Malcolm <dmalcolm@redhat.com>
679
680 * c-pragma.c (GCC_BAD_AT): New macro.
681 (GCC_BAD2_AT): New macro.
682 (handle_pragma_pack): Use the location of the pertinent token when
683 issuing diagnostics about invalid constants/actions, and trailing
684 junk.
685 (handle_pragma_target): Likewise for non-string "GCC option".
686 (handle_pragma_message): Likewise for trailing junk.
687
18ae471f
GA
6882021-11-03 Joseph Myers <joseph@codesourcery.com>
689
690 PR c/103031
691 * c-common.c (convert_and_check): Add argument init_const. Call
692 convert_init if init_const.
693 * c-common.h (convert_and_check): Update prototype.
694 (convert_init): New prototype.
695
cf82e8d9
GA
6962021-11-01 David Malcolm <dmalcolm@redhat.com>
697
698 * c-lex.c (c_lex_with_flags): When complaining about non-printable
699 CPP_OTHER tokens, set the "escape on output" flag.
700
04a2cf3f
GA
7012021-10-27 Jakub Jelinek <jakub@redhat.com>
702
703 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
704 POINTER_PLUS_EXPR.
705 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
706 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
707
7082021-10-27 Jakub Jelinek <jakub@redhat.com>
709
710 PR c++/102854
711 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
712 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
713 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
714 conversions temporarily clear the 3rd bit from d->kind while walking
715 subtrees.
716 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
717 if possibly non-rectangular.
718
ae5c5406
GA
7192021-10-21 Jakub Jelinek <jakub@redhat.com>
720
721 PR middle-end/64888
722 * c-omp.c (c_omp_predefined_variable): Return true also for
723 ubsan_create_data created artificial variables.
724
5d5885c9
GA
7252021-10-14 Joseph Myers <joseph@codesourcery.com>
726
727 * c-format.c (printf_length_specs, scanf_length_specs)
728 (print_char_table, scan_char_table): Support DFP formats for C2X.
729 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
730 (T2X_D32, T2X_D64, T2X_D128): New macros.
731
7322021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
733
734 * c-omp.c (c_omp_check_context_selector): Rename to
735 omp_check_context_selector and move to omp-general.c.
736 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
737 move to omp-general.c.
738
52055987
GA
7392021-10-12 Joseph Myers <joseph@codesourcery.com>
740
741 * c-format.c (print_char_table): Add %b and %B formats.
742 (scan_char_table): Add %b format.
743 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
744 (T2X_UPD, T2X_UIM): New macros.
745
7462021-10-12 Jakub Jelinek <jakub@redhat.com>
747
748 * c-omp.c (c_finish_omp_atomic): Use
749 clear_padding_type_may_have_padding_p.
750
ce6eec39
GA
7512021-10-08 Martin Liska <mliska@suse.cz>
752
753 * c-opts.c (c_common_post_options): Use new macro
754 OPTION_SET_P.
755
50e20ee6
GA
7562021-10-07 Martin Liska <mliska@suse.cz>
757
758 * c-common.c (parse_optimize_options): Make
759 save_opt_decoded_options a pointer type.
760
57c7ec62
GA
7612021-10-06 Jakub Jelinek <jakub@redhat.com>
762
763 PR tree-optimization/102571
764 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
765 padding, but the non-padding bits are contiguous set of bytes
766 by adjusting the memcmp call arguments instead of emitting
767 __builtin_clear_padding and then comparing all the type's bytes.
768
7692021-10-06 Jakub Jelinek <jakub@redhat.com>
770
771 PR c++/102612
772 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
773 __cpp_constexpr to 202110L rather than 201907L.
774
da9c5f78
GA
7752021-10-04 Marek Polacek <polacek@redhat.com>
776
777 PR c++/97573
778 * c-common.h (do_warn_array_compare): Declare.
779 * c-warn.c (do_warn_array_compare): New.
780 * c.opt (Warray-compare): New option.
781
e3e07b89
GA
7822021-10-02 Iain Sandoe <iain@sandoe.co.uk>
783
784 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
785 NULL, this is not needed.
786
9d116bcc
GA
7872021-10-01 Martin Sebor <msebor@redhat.com>
788
789 PR c/102103
790 * c-common.c (decl_with_nonnull_addr_p): Handle members.
791 Check and perform warning suppression.
792 (c_common_truthvalue_conversion): Enhance warning suppression.
793
7942021-10-01 Martin Liska <mliska@suse.cz>
795
796 PR target/102552
797 * c-common.c (parse_optimize_options): decoded_options[0] is
798 used for program name, so merged_decoded_options should also
799 respect that.
800
8012021-10-01 Jakub Jelinek <jakub@redhat.com>
802 Richard Biener <rguenther@suse.de>
803
804 PR sanitizer/102515
805 * c-ubsan.c (ubsan_instrument_division): Check the right
806 flag_sanitize_recover bit, depending on which sanitization
807 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
808 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
809 and SANITIZE_DIVIDE is enabled, neither check is known
810 to be false and flag_sanitize_recover bits for those two
811 aren't the same, emit both __ubsan_handle_divrem_overflow
812 and __ubsan_handle_divrem_overflow_abort calls.
813
8142021-10-01 Martin Liska <mliska@suse.cz>
815
816 * c-common.c (parse_optimize_options): Combine optimize
817 options with what was provided on the command line.
818
8192021-10-01 Jakub Jelinek <jakub@redhat.com>
820
821 * c-omp.c (c_omp_split_clauses): Also copy
822 OMP_CLAUSE_ORDER_REPRODUCIBLE.
823
cf966403
GA
8242021-09-27 Martin Liska <mliska@suse.cz>
825
826 * c-opts.c (c_common_init_options_struct): Set also
827 x_flag_default_complex_method.
828
e4777439
GA
8292021-09-22 Jakub Jelinek <jakub@redhat.com>
830
831 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
832
62498024
GA
8332021-09-20 Matthias Kretz <m.kretz@gsi.de>
834
835 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
836 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
837 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
838 __ROUNDING_MATH__ according to the new optimization flags.
839
cf74e7b5
GA
8402021-09-18 Jakub Jelinek <jakub@redhat.com>
841
842 * c-omp.c (c_omp_split_clauses): Split order clause also to
843 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
844
0a4cb439
GA
8452021-09-17 Jakub Jelinek <jakub@redhat.com>
846
847 * c-omp.c (c_finish_omp_atomic): Avoid creating
848 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
849 create_tmp_var and add a zero initializer to TARGET_EXPRs that
850 had NULL initializer. When omitting operands after v = x,
851 use type of v rather than type of x. Fix type of vtmp
852 TARGET_EXPR.
853
07985c47
GA
8542021-09-13 Jason Merrill <jason@redhat.com>
855
856 * c.opt: Add -Winterference-size.
857 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
858 and __GCC_CONSTRUCTIVE_SIZE.
859
a26206ec
GA
8602021-09-10 Jakub Jelinek <jakub@redhat.com>
861
862 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
863 * c-omp.c: Include gimple-fold.h.
864 (c_finish_omp_atomic): Add r and weak arguments. Add support for
865 OpenMP 5.1 atomics.
866
f84e2f0b
GA
8672021-09-09 qing zhao <qing.zhao@oracle.com>
868
869 * c-attribs.c (handle_uninitialized_attribute): New function.
870 (c_common_attribute_table): Add "uninitialized" attribute.
871
b6db7cd4
GA
8722021-09-08 liuhongt <hongtao.liu@intel.com>
873
874 * c-common.c (excess_precision_mode_join): Update below comments.
875 (c_ts18661_flt_eval_method): Set excess_precision_type to
876 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
877 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
878 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
879 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
880
b2748138
GA
8812021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
882
883 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
884
7b739540
GA
8852021-09-03 Eric Botcazou <ebotcazou@adacore.com>
886
887 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
888 and -gnatwu warning for the package specification.
889
e11c6046
GA
8902021-09-01 Iain Sandoe <iain@sandoe.co.uk>
891
892 * c-attribs.c (handle_unavailable_attribute): New.
893
1e2f030b
GA
8942021-08-30 Jason Merrill <jason@redhat.com>
895
896 * c.opt: Add -Wmissing-requires.
897
85d77ac4
GA
8982021-08-25 Lewis Hyatt <lhyatt@gmail.com>
899
900 PR other/93067
901 * c-opts.c (c_common_input_charset_cb): New function.
902 (c_common_post_options): Call new function
903 diagnostic_initialize_input_context().
904
7c9e1645
GA
9052021-08-20 Tobias Burnus <tobias@codesourcery.com>
906
907 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
908 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
909 "di" and "u", respecitively; fill with BADLEN to match
910 size of 'types'.
911 (get_init_dynamic_hwi): Split off from ...
912 (init_dynamic_diag_info): ... here. Call it.
913 (init_dynamic_gfc_info): Call it.
914
9152021-08-20 Jakub Jelinek <jakub@redhat.com>
916
917 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
918 * c-pragma.c (omp_pragmas): Add error directive.
919 * c-omp.c (omp_directives): Uncomment error directive entry.
920
6e529985
GA
9212021-08-18 Jakub Jelinek <jakub@redhat.com>
922
923 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
924 * c-pragma.c (omp_pragmas): Add nothing directive.
925 * c-omp.c (omp_directives): Uncomment nothing directive entry.
926
2d14d64b
GA
9272021-08-17 Jakub Jelinek <jakub@redhat.com>
928
929 PR c++/101539
930 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
931 * c-common.c (c_common_reswords): Add __is_layout_compatible.
932
9332021-08-17 Matt Jacobson <mhjacobson@me.com>
934
935 * c-opts.c (c_common_post_options): Default to
936 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
937
9382021-08-17 Jakub Jelinek <jakub@redhat.com>
939
940 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
941 * c-pragma.c (omp_pragmas): Add scope construct.
942 * c-omp.c (omp_directives): Uncomment scope directive entry.
943
9d1d9fc8
GA
9442021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
945
946 * c-cppbuiltin.c (c_cpp_builtins): Define
947 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
948
72be20e2
GA
9492021-08-12 Jakub Jelinek <jakub@redhat.com>
950
951 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
952 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
953 * c-pragma.c (omp_pragmas_simd): Add masked construct.
954 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
955 enumerator.
956 (c_finish_omp_masked): Declare.
957 * c-omp.c (c_finish_omp_masked): New function.
958 (c_omp_split_clauses): Handle combined masked constructs.
959
4d17ca1b
GA
9602021-07-30 Jakub Jelinek <jakub@redhat.com>
961
962 PR c++/101539
963 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
964 * c-common.c (c_common_reswords): Add
965 __is_pointer_interconvertible_base_of.
966
9672021-07-29 Richard Biener <rguenther@suse.de>
968
969 PR c/101512
970 * c-common.c (c_common_mark_addressable_vec): Look through
971 C_MAYBE_CONST_EXPR even if not at the toplevel.
972
af3f12e6
GA
9732021-07-27 Martin Sebor <msebor@redhat.com>
974
975 PR c/101585
976 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
977
ead235f6
GA
9782021-07-23 Jakub Jelinek <jakub@redhat.com>
979
980 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
981 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
982 and later.
983
9842021-07-23 Jakub Jelinek <jakub@redhat.com>
985
986 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
987 PRAGMA_OMP__LAST_ enumerators.
988
419c6c68
GA
9892021-07-21 Thomas Schwinge <thomas@codesourcery.com>
990 Joseph Myers <joseph@codesourcery.com>
991 Cesar Philippidis <cesar@codesourcery.com>
992
993 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
994
92d45509
GA
9952021-07-20 Martin Sebor <msebor@redhat.com>
996
997 * c-common.c (c_build_shufflevector): Adjust by-value argument to
998 by-const-reference.
999 * c-common.h (c_build_shufflevector): Same.
1000
87277b6a
GA
10012021-07-16 Andrew Pinski <apinski@marvell.com>
1002
1003 PR c/101453
1004 * c-common.c (parse_optimize_options): Use the correct
1005 size for buffer.
1006
d97d71a1
GA
10072021-07-15 Martin Sebor <msebor@redhat.com>
1008
1009 PR c/101289
1010 PR c/97548
1011 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1012
c4fee1c6
GA
10132021-07-14 Jason Merrill <jason@redhat.com>
1014
1015 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1016
6fba0eea
GA
10172021-07-06 Martin Sebor <msebor@redhat.com>
1018
1019 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1020 (gcc_cdiag_char_table): Same.
1021 (gcc_cxxdiag_char_table): Same.
1022
7a60a6e8
GA
10232021-07-02 Jakub Jelinek <jakub@redhat.com>
1024
1025 * c-common.h (enum c_omp_directive_kind): New enum.
1026 (struct c_omp_directive): New type.
1027 (c_omp_categorize_directive): Declare.
1028 * c-omp.c (omp_directives): New variable.
1029 (c_omp_categorize_directive): New function.
1030
bea7c16a
GA
10312021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1032
1033 * c-ada-spec.c (packed_layout): New global variable.
1034 (dump_ada_declaration): Set it upon seeing a packed record type.
1035 Do not put the "aliased" keyword if it is set.
1036 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1037
10382021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1039
1040 * c-ada-spec.c (check_name): Rename into...
1041 (check_type_name_conflict): ...this. Minor tweak.
1042 (dump_ada_function_declaration): Adjust to above renaming.
1043 (dump_ada_array_domains): Fix oversight.
1044 (dump_ada_declaration): Call check_type_name_conflict for variables.
1045
90708f87
GA
10462021-06-25 Martin Sebor <msebor@redhat.com>
1047
1048 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1049 (c_common_truthvalue_conversion): Replace direct uses of
1050 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1051 copy_no_warning.
1052 (check_function_arguments_recurse): Same.
1053 * c-gimplify.c (c_gimplify_expr): Same.
1054 * c-warn.c (overflow_warning): Same.
1055 (warn_logical_operator): Same.
1056 (warn_if_unused_value): Same.
1057 (do_warn_unused_parameter): Same.
1058
9aa8327e
GA
10592021-06-24 Jakub Jelinek <jakub@redhat.com>
1060
1061 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1062 C_ORT_OMP_TARGET.
1063 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1064 combined target constructs also add map (always, tofrom:) clause.
1065
ede6c356
GA
10662021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1067
1068 * c-attribs.c (common_handle_aligned_attribute): Remove short
1069 circuit and dead code.
1070
8dc48181
GA
10712021-06-14 Jonathan Wakely <jwakely@redhat.com>
1072
1073 PR c++/101052
1074 * known-headers.cc (get_stdlib_header_for_name): Add known
1075 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1076 exit, and getenv.
1077
8b8c3912
GA
10782021-06-12 Jason Merrill <jason@redhat.com>
1079
1080 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1081
f16f65f8
GA
10822021-06-11 Jakub Jelinek <jakub@redhat.com>
1083
1084 PR c++/100974
1085 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1086 -std=c++2b for P1938R3 consteval if support.
1087
4f625f47
GA
10882021-06-09 Jason Merrill <jason@redhat.com>
1089
1090 PR c++/100879
1091 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1092 warning.
1093
438aac59
GA
10942021-06-07 Martin Liska <mliska@suse.cz>
1095
1096 * c-target.def: Split long lines and replace them
1097 with '\n\'.
1098
600f90cb
GA
10992021-06-04 Martin Sebor <msebor@redhat.com>
1100
1101 PR c/100783
1102 * c-attribs.c (positional_argument): Bail on erroneous types.
1103
11042021-06-04 Martin Sebor <msebor@redhat.com>
1105
1106 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1107 for element presence.
1108
440c8a0a
GA
11092021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1110
1111 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1112 (dump_ada_decl_name): Likewise.
1113 (dump_anonymous_type_name): Remove parent parameter and adjust.
1114 (dump_sloc): Minor tweak.
1115 (dump_ada_array_type): Remove type parameter and adjust.
1116 (dump_ada_enum_type): Remove parent parameter and adjust.
1117 (dump_ada_node): Adjust calls to above functions.
1118 (dumped_anonymous_types): New global variable.
1119 (dump_nested_types_1): Rename into...
1120 (dump_nested_types): ...this.
1121 (dump_nested_type): Remove parent and dumped_types parameters.
1122 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1123 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1124 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1125
11262021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1127
1128 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1129 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1130
11312021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1132
1133 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1134 (htable_t): New typedef.
1135 (overloaded_names): Use it.
1136 (add_name): New function.
1137 (init_overloaded_names): Use add_name to populate the table and add
1138 special cases for sigaction and stat.
1139 (overloaded_name_p): Rename into...
1140 (overloading_index): ...this. Do not initialize overloaded_names table
1141 here. Return the index or zero.
1142 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1143 but add an overloading suffix instead.
1144 (dump_ada_specs): Initialize overloaded_names tables here.
1145
b75978d1
GA
11462021-06-01 Martin Liska <mliska@suse.cz>
1147
1148 PR other/100759
1149 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1150 to a situation where we are not in processing of an optimize
1151 pragma.
1152 * c-pragma.c (handle_pragma_pop_options): Restore target
1153 options.
1154
ee682192
GA
11552021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1156
1157 PR testsuite/100749
1158 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1159
11602021-05-31 Richard Biener <rguenther@suse.de>
1161
1162 PR c++/88601
1163 * c-common.c: Include tree-vector-builder.h and
1164 vec-perm-indices.h.
1165 (c_common_reswords): Add __builtin_shufflevector.
1166 (c_build_shufflevector): New funtion.
1167 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1168 (c_build_shufflevector): Declare.
1169
48166757
GA
11702021-05-28 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR middle-end/99928
1173 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1174 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1175
11762021-05-28 Tobias Burnus <tobias@codesourcery.com>
1177
1178 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1179
2bc6dace
GA
11802021-05-25 Martin Liska <mliska@suse.cz>
1181
1182 PR tree-optimization/92860
1183 PR target/99592
1184 * c-attribs.c (handle_optimize_attribute): Save target node
1185 before calling parse_optimize_options and save it in case
1186 it changes.
1187 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1188 (handle_pragma_pop_options): Likewise here.
1189
11902021-05-25 Martin Liska <mliska@suse.cz>
1191
1192 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1193
11942021-05-25 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR middle-end/99928
1197 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1198 combined with simd and not with taskloop or for.
1199
2832d51b
GA
12002021-05-21 Jakub Jelinek <jakub@redhat.com>
1201
1202 PR middle-end/99928
1203 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1204 on firstprivate clause copy going to target construct, and for
1205 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1206
ea34e2ed
GA
12072021-05-20 Jonathan Wakely <jwakely@redhat.com>
1208
1209 * c.opt (Wc++11-extensions, Wc++14-extensions)
1210 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1211 options.
1212
12132021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1214
1215 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1216
12172021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1218
1219 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1220 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1221 (pch_init): Renamed member.
1222 (c_common_valid_pch): Adjust access to debug_type_names.
1223
65f32e5d
GA
12242021-05-19 Martin Sebor <msebor@redhat.com>
1225
1226 PR c/100619
1227 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1228 bounds.
1229
a8daf9a1
GA
12302021-05-18 Richard Biener <rguenther@suse.de>
1231
1232 PR c/100547
1233 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1234 Reword existing nunit diagnostic.
1235
a7ffc1ef
GA
12362021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1237
1238 * c-common.c (braced_list_to_string): Return CTOR unchanged
1239 if host and target character sizes don't match.
1240
87a7d10c
GA
12412021-05-14 Martin Liska <mliska@suse.cz>
1242
1243 * c.opt: Add Warning keyword for 2 options.
1244
f9af11c7
GA
12452021-05-13 Martin Liska <mliska@suse.cz>
1246
1247 PR middle-end/100504
1248 * c-attribs.c (handle_target_clones_attribute): Expect a string
1249 argument to target_clone argument.
1250
037e3661
GA
12512021-05-11 Joseph Myers <joseph@codesourcery.com>
1252
1253 * c-lex.c (interpret_float): Handle digit separators for C2X.
1254
aa891c56
GA
12552021-05-10 Martin Liska <mliska@suse.cz>
1256
1257 * c-ada-spec.c (print_destructor): Use startswith
1258 function instead of strncmp.
1259 (dump_ada_declaration): Likewise.
1260 * c-common.c (disable_builtin_function): Likewise.
1261 (def_builtin_1): Likewise.
1262 * c-format.c (check_tokens): Likewise.
1263 (check_plain): Likewise.
1264 (convert_format_name_to_system_name): Likewise.
1265
e4ff4ffb
GA
12662021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1267
1268 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1269 complex divide
1270
c0fa3f2f
GA
12712021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1272 Nathan Sidwell <nathan@codesourcery.com>
1273 Tom de Vries <vries@codesourcery.com>
1274 Julian Brown <julian@codesourcery.com>
1275 Kwok Cheung Yeung <kcy@codesourcery.com>
1276
1277 * c.opt (Wopenacc-parallelism): New.
1278
6e81e015
GA
12792021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1280
1281 * c.opt (fopenacc-kernels=): Remove.
1282
019a9220
GA
12832021-04-08 Jakub Jelinek <jakub@redhat.com>
1284
1285 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1286 occured -> occurred.
1287 (check_alignment_of_packed_member): Fix a comment typo,
1288 memeber -> member.
1289 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1290 and onless -> unless.
1291 (warn_parm_array_mismatch): Fix comment typos, declaratation
1292 -> declaration and woud -> would. Fix up comment indentation.
1293
12942021-04-08 Martin Sebor <msebor@redhat.com>
1295
1296 PR middle-end/99883
1297 * c.opt (Wmismatched-new-delete): Correct spelling.
1298
b1da9916
GA
12992021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1300
1301 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1302 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1303 enumeral types use again the type name for the enumeration constants.
1304 (dump_ada_node): Adjust call to dump_ada_enum_type.
1305 (dump_nested_type): Likewise.
1306
f1607029
GA
13072021-04-01 Jason Merrill <jason@redhat.com>
1308
1309 PR c++/98481
1310 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1311
4493b1c1
GA
13122021-03-25 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR c++/99565
1315 * c-warn.c (do_warn_duplicated_branches): Pass also
1316 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1317
6af7b307
GA
13182021-03-20 Jakub Jelinek <jakub@redhat.com>
1319
1320 PR debug/99230
1321 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1322
ceae9533
GA
13232021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1324
1325 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1326 after entering the separate class package, if any.
1327
67f10d28
GA
13282021-03-04 Richard Biener <rguenther@suse.de>
1329
1330 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1331 Handle ERROR_MARK.
1332
13332021-03-04 Jakub Jelinek <jakub@redhat.com>
1334
1335 PR c/99325
1336 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1337 (token_streamer::stream) Likewise.
1338 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1339 UNKNOWN_LOCATION.
1340
f3641ac7
GA
13412021-03-03 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR c/99324
1344 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1345 instead of mark_addressable. Fix a comment typo -
1346 neutrallly -> neutrally.
1347
2c83c3fb
GA
13482021-02-28 Jakub Jelinek <jakub@redhat.com>
1349
1350 PR c/99304
1351 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1352 message - refernced -> referenced. Remove superfluous space before
1353 closing paren of function calls.
1354
daa68844
GA
13552021-02-25 Nathan Sidwell <nathan@acm.org>
1356
1357 PR c++/99166
1358 * c.opt (-flang-info-module-cmi): Renamed option.
1359
50352c6c
GA
13602021-02-19 Nathan Sidwell <nathan@acm.org>
1361
1362 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1363
bf81237e
GA
13642021-02-18 H.J. Lu <hjl.tools@gmail.com>
1365
1366 PR target/99113
1367 * c-attribs.c (c_common_attribute_table): Add the "retain"
1368 attribute.
1369 (handle_retain_attribute): New function.
1370
0e804ce3
GA
13712021-02-16 Marek Polacek <polacek@redhat.com>
1372
1373 PR c++/99062
1374 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1375 alignment argument is non-negative. Tweak a warning message.
1376
fab095da
GA
13772021-02-12 Martin Sebor <msebor@redhat.com>
1378
1379 PR c/99055
1380 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1381 print_generic_expr_to_str.
1382
4b37c3ea
GA
13832021-02-10 Richard Biener <rguenther@suse.de>
1384
1385 * c-common.c (parse_optimize_options): Free decoded_options.
1386
a19dd5e6
GA
13872021-02-04 emsr <3dw4rd@verizon.net>
1388
1389 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1390
9faaa807
GA
13912021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1392
1393 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1394 * c-lex.c (interpret_integer): Set node type for size literal.
1395
85d04a2e
GA
13962021-01-28 Jakub Jelinek <jakub@redhat.com>
1397
1398 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1399 draft from description.
1400 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1401
e62bb7f0
GA
14022021-01-26 Paul Fee <paul.f.fee@gmail.com>
1403
1404 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1405 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1406 and -std=gnu++2b
1407 * c-opts.c (set_std_cxx23): New.
1408 (c_common_handle_option): Set options when -std=c++23 is enabled.
1409 (c_common_post_options): Adjust comments.
1410 (set_std_cxx20): Likewise.
1411
161e4c08
GA
14122021-01-25 Martin Sebor <msebor@redhat.com>
1413
1414 PR c++/98646
1415 * c-common.c (check_nonnull_arg): Adjust warning text.
1416
4c9bcd5c
GA
14172021-01-17 Martin Sebor <msebor@redhat.com>
1418
1419 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1420 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1421
59cf67d1
GA
14222021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1423
1424 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1425 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1426
2f7f0d32
GA
14272021-01-15 Jakub Jelinek <jakub@redhat.com>
1428
1429 PR tree-optimization/98597
1430 * c-pretty-print.c: Include options.h.
1431 (c_fold_indirect_ref_for_warn): New function.
1432 (print_mem_ref): Use it. If it returns something that has compatible
1433 type and is TBAA compatible with zero offset, print it and return,
1434 otherwise print it using offsetof syntax or array ref syntax. Fix up
1435 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1436 argument has pointer to array type. Print pointers using the standard
1437 formatting.
1438
6851dda2
GA
14392021-01-12 Martin Sebor <msebor@redhat.com>
1440
1441 PR c/98597
1442 PR c/98592
1443 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1444 has pointer type. Remove redundant code. Avoid calling
1445 gimple_canonical_types_compatible_p.
1446
7d187e4f
GA
14472021-01-07 Martin Sebor <msebor@redhat.com>
1448
1449 PR middle-end/98578
1450 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1451 Avoid assuming acces type's size is constant. Correct condition
1452 guarding the printing of a parenthesis.
1453
942ae5be
GA
14542021-01-06 Martin Sebor <msebor@redhat.com>
1455
1456 PR c++/95768
1457 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1458 SSA_NAMEs print VLA names and GIMPLE defining statements.
1459 (print_mem_ref): New function.
1460 (c_pretty_printer::unary_expression): Call it.
1461
14622021-01-06 Richard Biener <rguenther@suse.de>
1463
1464 PR tree-optimization/95582
1465 * c-attribs.c (c_common_attribute_table): Add entry for
1466 signed_bool_precision.
1467 (handle_signed_bool_precision_attribute): New.
1468
8daa719b
GA
14692020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1470
1471 * c.opt: Add -stdlib= option and enumerations for
1472 libstdc++ and libc++.
1473
eefe499f
GA
14742020-12-16 Martin Liska <mliska@suse.cz>
1475
1476 * c.opt: Remove usage of Report.
1477
d52945ce
GA
14782020-12-14 Martin Sebor <msebor@redhat.com>
1479
1480 PR middle-end/98166
1481 PR c++/57111
1482 PR middle-end/98160
1483 * c-attribs.c (maybe_add_noinline): New function.
1484 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1485 Implicitly add attribute noinline to functions not declared inline
1486 and warn on those.
1487
ca2bd949
GA
14882020-12-09 Tobias Burnus <tobias@codesourcery.com>
1489
1490 * c-pragma.c (omp_pragmas): Add 'allocate'.
1491 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1492
f6e8e279
GA
14932020-12-08 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c++/98187
1496 * c-pragma.c (omp_pragmas): Remove "master".
1497 (omp_pragmas_simd): Add "master".
1498
bc8a7013
GA
14992020-12-07 Marek Polacek <polacek@redhat.com>
1500
1501 PR c++/98126
1502 * c-common.c (verify_tree_lim_r): New function.
1503 (verify_sequence_points): Use it. Use nullptr instead of 0.
1504
b8dd0ef7
GA
15052020-12-03 Martin Sebor <msebor@redhat.com>
1506
1507 PR c++/90629
1508 PR middle-end/94527
1509 * c-attribs.c (handle_dealloc_attribute): New function.
1510 (handle_malloc_attribute): Handle argument forms of attribute.
1511 * c.opt (-Wmismatched-dealloc): New option.
1512 (-Wmismatched-new-delete): New option.
1513
15142020-12-03 Jakub Jelinek <jakub@redhat.com>
1515
1516 PR libstdc++/93121
1517 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1518 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1519
e0f5e792
GA
15202020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1521
1522 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1523 {__GNUC_EXECUTION_CHARSET_NAME} and
1524 _WIDE_EXECUTION_CHARSET_NAME} macros.
1525
15262020-12-01 Nathan Sidwell <nathan@acm.org>
1527
1528 * c-common.c (module, import, export): New internal tokens (with
1529 trailing space).
1530 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1531 them.
1532 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1533 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1534
15352020-12-01 Nathan Sidwell <nathan@acm.org>
1536
1537 * c-opts.c (c_common_init_options): Ask for module dependencies.
1538 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1539 * c-pch.c (c_common_valid_pch): ... does not play with C++
1540 modules.
1541 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1542 options.
1543 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1544 (fmodule-only, fmodule-mapper, fmodule-lazy)
1545 (fmodule-version-ignore, Winvalid-imported-macros)
1546 (flang-info-include-translate, flang-info-include-translate-not):
1547 New options
1548
5fbf0ecb
GA
15492020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1550
1551 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1552 (dump_ada_structure): Also deal with convention, unchecked union and
1553 bit-field for nested types. In the latter case, print an Alignment
1554 aspect along with the Pack aspect.
1555
360258da
GA
15562020-11-25 Martin Sebor <msebor@redhat.com>
1557
1558 PR bootstrap/94982
1559 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1560 -Wformat-diag.
1561
1e2c9a27
GA
15622020-11-24 Martin Sebor <msebor@redhat.com>
1563
1564 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1565
8e6198d0
GA
15662020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1567
1568 * c-attribs.c (handle_special_var_sec_attribute): New.
1569 (handle_noinit_attribute): Remove.
1570 (attr_noinit_exclusions): Rename to...
1571 (attr_section_exclusions): ...this, and add "persistent" attribute
1572 exclusion.
1573 (c_common_attribute_table): Add "persistent" attribute.
1574
7a97e2fc
GA
15752020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1576
1577 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1578 Treat opaque types like other types.
1579 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1580 supported types.
1581
82e5048e
GA
15822020-11-20 Martin Sebor <msebor@redhat.com>
1583
1584 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1585 with fewer arguments.
1586
15872020-11-20 Martin Sebor <msebor@redhat.com>
1588
1589 PR middle-end/97879
1590 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1591 Error out on invalid modes.
1592
15932020-11-20 Jakub Jelinek <jakub@redhat.com>
1594
1595 PR libstdc++/88101
1596 * c-common.c (check_builtin_function_arguments): Handle
1597 BUILT_IN_CLEAR_PADDING.
1598
25bb75f8
GA
15992020-11-18 Nathan Sidwell <nathan@acm.org>
1600
1601 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1602
4dabb037
GA
16032020-11-17 Nathan Sidwell <nathan@acm.org>
1604
1605 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1606 after newly-added CTI_MODULE_HWM.
1607
16082020-11-17 Joseph Myers <joseph@codesourcery.com>
1609
1610 * c-cppbuiltin.c (builtin_define_float_constants): Define
1611 "*_IS_IEC_60559__" macros.
1612
16132020-11-17 Nathan Sidwell <nathan@acm.org>
1614
1615 * c-lex.c: #include "langhooks.h".
1616 (cb_undef): Maybe call preprocess_undef lang hook.
1617 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1618 lang hook.
1619 (push_command_line_include): Maybe call preprocess_main_file lang
1620 hook.
1621 (cb_file_change): Likewise.
1622 * c-ppoutput.c: #include "langhooks.h.
1623 (scan_translation_unit): Maybe call preprocess_token lang hook.
1624 (class do_streamer): New, derive from token_streamer.
1625 (directives_only_cb): Data pointer is do_streamer, call
1626 preprocess_token lang hook.
1627 (scan_translation_unit_directives_only): Use do_streamer.
1628 (print_line_1): Move src_line recording to after string output.
1629 (cb_undef): Maybe call preprocess_undef lang hook.
1630
16312020-11-17 Nathan Sidwell <nathan@acm.org>
1632
1633 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1634 code duplicating that functionality.
1635
16362020-11-17 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/90628
1639 * c-common.c (check_builtin_function_arguments)
1640 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1641 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1642 for more builtins and argument positions.
1643
29c5d9ce
GA
16442020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1645
1646 PR objc/97854
1647 * stub-objc.c: Include c-common.h to declare enum rid.
1648
77f67db2
GA
16492020-11-13 Jakub Jelinek <jakub@redhat.com>
1650
1651 PR c++/63287
1652 * c-cppbuiltin.c: Include configargs.h.
1653 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1654 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1655 "single".
1656
16572020-11-13 Gergö Barany <gergo@codesourcery.com>
1658 Thomas Schwinge <thomas@codesourcery.com>
1659
1660 * c.opt (fopenacc-kernels): Add.
1661
16622020-11-13 Jason Merrill <jason@redhat.com>
1663
1664 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1665
16662020-11-13 Piotr H. Dabrowski <phd@phd.re>
1667
1668 PR c++/91318
1669 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1670
16712020-11-13 Martin Liska <mliska@suse.cz>
1672
1673 * c-attribs.c (build_attr_access_from_parms): Format properly.
1674
16752020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1676
1677 PR objc/90707
1678 * c-common.c (c_common_reswords): null_unspecified, nullable,
1679 nonnull, null_resettable: New keywords.
1680 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1681 RID_NONNULL, RID_NULL_RESETTABLE: New.
1682 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1683 ranges accepted for property attributes.
1684 * c-attribs.c (handle_objc_nullability_attribute): New.
1685 * c-objc.h (enum objc_property_attribute_group): Add
1686 OBJC_PROPATTR_GROUP_NULLABLE.
1687 (enum objc_property_attribute_kind):Add
1688 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1689 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1690
16912020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1692
1693 PR objc/77404
1694 * c-attribs.c (handle_objc_root_class_attribute): New
1695 * c-objc.h (objc_start_class_interface): Add a location
1696 value for the position of the class name.
1697 * c.opt: Add Wobjc-root-class.
1698 * stub-objc.c (objc_start_class_interface): Add a location
1699 value for the position of the class name.
1700
a5a11525
GA
17012020-11-12 Joseph Myers <joseph@codesourcery.com>
1702
1703 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1704 Allow scope for C. Handle standard attributes for C. Do not
1705 accept unscoped attributes if std_syntax and not handled as
1706 standard attributes.
1707 * c-common.h (c_common_has_attribute): Update prototype.
1708
17092020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1710
1711 PR pch/86674
1712 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1713 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1714
0f5f9ed5
GA
17152020-11-11 Patrick Palka <ppalka@redhat.com>
1716
1717 PR c++/88115
1718 * c-opts.c (c_common_post_options): Update latest_abi_version.
1719
bb622641
GA
17202020-11-10 Jakub Jelinek <jakub@redhat.com>
1721
1722 PR c/97748
1723 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1724 to false.
1725 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1726 recursively and just return true instead of warning if it is true.
1727 Handle COMPLEX_EXPR.
1728
17292020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1730
1731 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1732 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1733 (c_omp_adjust_map_clauses): New function.
1734
2bee28dd
GA
17352020-11-09 Marek Polacek <polacek@redhat.com>
1736
1737 DR 1914
1738 * c-common.c (attribute_fallthrough_p): Tweak the warning
1739 message.
1740
17412020-11-09 Patrick Palka <ppalka@redhat.com>
1742
1743 * c-pragma.c (handle_pragma_diagnostic): Split the
1744 unknown-option -Wpragmas diagnostic into a warning and a
1745 subsequent note containing a spelling suggestion. Avoid
1746 computing the suggestion if -Wpragmas warnings are being
1747 suppressed.
1748
17492020-11-09 Patrick Palka <ppalka@redhat.com>
1750
1751 PR testsuite/97117
1752 * c-indentation.c (get_visual_column): Remove location_t
1753 parameter. Move the column-tracking diagnostic code from here
1754 to ...
1755 (should_warn_for_misleading_indentation): ... here, before the
1756 early exit for when the loci are not all distinct. Don't pass a
1757 location_t argument to get_visual_column.
1758 (assert_get_visual_column_succeeds): Don't pass a location_t
1759 argument to get_visual_column.
1760 (assert_get_visual_column_fails): Likewise.
1761
fb95de7a
GA
17622020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1763
1764 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1765 of keywords accepted in @property attribute contexts.
1766 * c-objc.h (enum objc_property_attribute_group): Add
1767 OBJC_PROPATTR_GROUP_CLASS.
1768 (enum objc_property_attribute_kind): Add
1769 OBJC_PROPERTY_ATTR_CLASS.
1770
2da7ee05
GA
17712020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1772
1773 * c-common.c (c_common_reswords): Add 'atomic' property
1774 attribute.
1775 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1776 property attributes.
1777
17782020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1779
1780 * c-attribs.c (handle_nsobject_attribute): New.
1781 * c.opt: Add WNSObject-attribute.
1782
44cab2d8
GA
17832020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1784
1785 * c-objc.h (enum objc_property_attribute_group): New
1786 (enum objc_property_attribute_kind): New.
1787 (OBJC_PROPATTR_GROUP_MASK): New.
1788 (struct property_attribute_info): Small class encapsulating
1789 parser output from property attributes.
1790 (objc_prop_attr_kind_for_rid): New
1791 (objc_add_property_declaration): Simplify interface.
1792 * stub-objc.c (enum rid): Dummy type.
1793 (objc_add_property_declaration): Simplify interface.
1794 (objc_prop_attr_kind_for_rid): New.
1795
17962020-11-06 Nathan Sidwell <nathan@acm.org>
1797
1798 * c-ada-spec.c (collect_ada_nodes): Rename
1799 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1800 (collect_ada_node): Likewise.
1801 (dump_forward_type): Likewise.
1802 * c-common.c (set_underlying_type): Rename
1803 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1804 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1805
18062020-11-06 Jakub Jelinek <jakub@redhat.com>
1807
1808 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1809
0cfd9109
GA
18102020-11-05 Marek Polacek <polacek@redhat.com>
1811
1812 PR c++/97675
1813 * c.opt (Wexceptions): New option.
1814
18152020-11-05 Marek Polacek <polacek@redhat.com>
1816
1817 PR c++/25814
1818 * c.opt (Wvexing-parse): New option.
1819
35c125cb
GA
18202020-11-04 Jakub Jelinek <jakub@redhat.com>
1821
1822 PR c++/97670
1823 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1824 underlying decl to clear in the allocate_head bitmap.
1825
18262020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1827
1828 * c-objc.h (objc_non_constant_expr_p): New.
1829 * stub-objc.c (objc_non_constant_expr_p): New.
1830
fd2325ea
GA
18312020-11-03 Nathan Sidwell <nathan@acm.org>
1832
1833 * c.opt (MQ,MT): Reword description to be make-agnostic.
1834
88ce3d5f
GA
18352020-11-02 Nathan Sidwell <nathan@acm.org>
1836
1837 * c-opts.c (c_common_post_options): Move var decl to its
1838 initialization point.
1839
18402020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1841
1842 * c-lex.c (c_lex_with_flags): When combining '@' with a
1843 keyword for Objective-C, combine the location ranges too.
1844
18452020-10-30 Qing Zhao <qing.zhao@oracle.com>
1846 H.J.Lu <hjl.tools@gmail.com>
1847
1848 * c-attribs.c (c_common_attribute_table): Add new attribute
1849 zero_call_used_regs.
1850 (handle_zero_call_used_regs_attribute): New function.
1851
e93aae4a
GA
18522020-10-28 Marek Polacek <polacek@redhat.com>
1853
1854 PR c++/97573
1855 * c-opts.c (c_common_post_options): In C++20, turn on
1856 -Wdeprecated-enum-enum-conversion and
1857 -Wdeprecated-enum-float-conversion.
1858 * c.opt (Wdeprecated-enum-enum-conversion,
1859 Wdeprecated-enum-float-conversion): New options.
1860 (Wenum-conversion): Allow for C++ too.
1861
18622020-10-28 Jakub Jelinek <jakub@redhat.com>
1863
1864 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1865 * c-omp.c: Include bitmap.h.
1866 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1867
f19e7c8d
GA
18682020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1869
1870 * c-common.c (__is_nothrow_assignable): New.
1871 (__is_nothrow_constructible): Likewise.
1872 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1873 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1874
efe71fcc
GA
18752020-10-23 Jan Hubicka <hubicka@ucw.cz>
1876
1877 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1878
18792020-10-23 Marek Polacek <polacek@redhat.com>
1880
1881 PR c++/91741
1882 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1883 (c_common_init_ts): Likewise.
1884 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1885 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1886 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1887 (maybe_warn_sizeof_array_div): New function.
1888 * c.opt (Wsizeof-array-div): New option.
1889
18902020-10-23 Martin Sebor <msebor@redhat.com>
1891
1892 PR c/97463
1893 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1894
56ddd5e2
GA
18952020-10-22 Martin Liska <mliska@suse.cz>
1896
1897 PR c/94722
1898 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1899 (handle_stack_protect_attribute): Add error message for a
1900 no_stack_protector function.
1901
19022020-10-22 Martin Liska <mliska@suse.cz>
1903
1904 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1905
19062020-10-22 Jan Hubicka <hubicka@ucw.cz>
1907
1908 * c-gimplify.c: Include tree-nested.h
1909 (c_genericize): Update for new nested function info.
1910
b2698c21
GA
19112020-10-14 Martin Sebor <msebor@redhat.com>
1912
1913 PR c/97413
1914 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1915 bounds in an extra list.
1916
7e9282ae
GA
19172020-10-05 Richard Biener <rguenther@suse.de>
1918 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR c++/97197
1921 * c-pretty-print.c: Include langhooks.h.
1922 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1923 expression.
1924 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1925 unary_expression.
1926 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1927
660bfe61
GA
19282020-09-30 Martin Sebor <msebor@redhat.com>
1929
1930 PR middle-end/97189
1931 * c-attribs.c (append_access_attr): Use the function declaration
1932 location for a warning about an attribute access argument.
1933
93bca37c
GA
19342020-09-29 Marek Polacek <polacek@redhat.com>
1935
1936 PR c++/94695
1937 * c.opt (Wrange-loop-construct): New option.
1938
82b77dee
GA
19392020-09-23 Martin Sebor <msebor@redhat.com>
1940
1941 PR c/97131
1942 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1943
19442020-09-23 Marek Polacek <polacek@redhat.com>
1945
1946 PR c/97125
1947 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1948 after loops and other structured control constructs have been lowered.
1949
521d2711
GA
19502020-09-22 Jakub Jelinek <jakub@redhat.com>
1951
1952 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1953 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1954
44135373
GA
19552020-09-21 Marek Polacek <polacek@redhat.com>
1956
1957 * c.opt (Wctad-maybe-unsupported): New option.
1958
2fe5b7d1
GA
19592020-09-19 Martin Sebor <msebor@redhat.com>
1960
1961 PR c/50584
1962 * c-common.h (warn_parm_array_mismatch): Declare new function.
1963 (has_attribute): Move declaration of an existing function.
1964 (build_attr_access_from_parms): Declare new function.
1965 * c-warn.c (parm_array_as_string): Define new function.
1966 (plus_one): Define new function.
1967 (warn_parm_ptrarray_mismatch): Define new function.
1968 (warn_parm_array_mismatch): Define new function.
1969 (vla_bound_parm_decl): New function.
1970 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1971 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1972 qualifiers here...
1973 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1974 them in brackets here. Also print [static]. Strip extraneous
1975 expressions from VLA bounds.
1976
19772020-09-19 Martin Sebor <msebor@redhat.com>
1978
1979 PR c/50584
1980 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1981 (handle_argspec_attribute): New function.
1982 (get_argument, get_argument_type): New functions.
1983 (append_access_attrs): Add overload. Handle internal attribute
1984 representation in addition to external.
1985 (handle_access_attribute): Handle internal attribute representation
1986 in addition to external.
1987 (build_attr_access_from_parms): New function.
1988
19892020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1990
1991 * c-gimplify.c (genericize_c_loop): Rewrite to match
1992 c_finish_loop in c-typeck.c.
1993
19942020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1995
1996 * c-common.c (c_block_may_fallthrough): New, split from
1997 cxx_block_may_fallthrough in the cp front end.
1998 (c_common_init_ts): Move handling of loop and switch-related
1999 statements here from the cp front end.
2000 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2001 cp front end.
2002 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2003 * c-common.h (c_block_may_fallthru): Declare.
2004 (bc_state_t): Move here from cp front end.
2005 (save_bc_state, restore_bc_state): Declare.
2006 (c_genericize_control_stmt): Declare.
2007 (WHILE_COND, WHILE_BODY): Likewise.
2008 (DO_COND, DO_BODY): Likewise.
2009 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2010 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2011 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2012 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2013 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2014 * c-dump.c (dump_stmt): Copy from cp front end.
2015 (c_dump_tree): Move code to handle structured loop and switch
2016 tree nodes here from cp front end.
2017 * c-gimplify.c: Adjust includes.
2018 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2019 cp front end.
2020 (save_bc_state, restore_bc_state): New functions using old code
2021 from cp front end.
2022 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2023 (genericize_c_loop): Move from cp front end.
2024 (genericize_for_stmt, genericize_while_stmt): Likewise.
2025 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2026 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2027 (genericize_omp_for_stmt): Likewise.
2028 (c_genericize_control_stmt): New function using code split from
2029 cp front end.
2030 (c_genericize_control_r): New.
2031 (c_genericize): Call walk_tree with c_genericize_control_r.
2032 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2033 structured loop and switch tree nodes here from cp front end.
2034
2aad20c0
GA
20352020-09-17 Patrick Palka <ppalka@redhat.com>
2036
2037 PR c/80076
2038 * c-indentation.c (should_warn_for_misleading_indentation): Move
2039 declarations of local variables closer to their first use.
2040 Handle virtual token locations by resolving them to their
2041 respective macro expansion points. If all three tokens are
2042 produced from the same macro expansion, then instead use their
2043 loci within the macro definition.
2044
ecde1b0a
GA
20452020-09-16 Martin Sebor <msebor@redhat.com>
2046
2047 PR c/78666
2048 PR c/96126
2049 * c-attribs.c (validate_attr_args): New function.
2050 (validate_attr_arg): Same.
2051 (handle_section_attribute): Call it. Introduce a local variable.
2052 (handle_alloc_size_attribute): Same.
2053 (handle_alloc_align_attribute): Same.
2054
50a71cd0
GA
20552020-09-14 Jakub Jelinek <jakub@redhat.com>
2056
2057 * c-attribs.c (handle_optimize_attribute): Adjust
2058 cl_optimization_save, cl_optimization_restore and
2059 build_optimization_node callers.
2060 * c-pragma.c (handle_pragma_optimize): Adjust
2061 build_optimization_node caller.
2062 (handle_pragma_push_options): Adjust
2063 build_optimization_node and build_target_option_node callers.
2064 (handle_pragma_pop_options, handle_pragma_reset_options):
2065 Adjust cl_optimization_restore callers.
2066
8f7ea26a
GA
20672020-08-28 Martin Sebor <msebor@redhat.com>
2068
2069 * c.opt (Wstringop-overread): New option.
2070
a6493809
GA
20712020-08-11 Jakub Jelinek <jakub@redhat.com>
2072
2073 PR c/96545
2074 * c-common.c (get_atomic_generic_size): Require that first argument's
2075 type points to a complete type and use tree_fits_uhwi_p instead of
2076 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2077
48cc2e46
GA
20782020-07-31 Martin Sebor <msebor@redhat.com>
2079
2080 PR c++/96003
2081 * c-common.c (check_function_arguments_recurse): Return early when
2082 no-warning bit is set.
2083
20842020-07-31 Richard Biener <rguenther@suse.de>
2085
2086 PR debug/96383
2087 * c-common.h (c_common_finalize_early_debug): Declare.
2088 * c-common.c: Include debug.h.
2089 (c_common_finalize_early_debug): finalize_early_debug langhook
2090 implementation generating debug for extern declarations.
2091
e71dab87
GA
20922020-07-27 Nathan Sidwell <nathan@acm.org>
2093
2094 * c-common.c (try_to_locate_new_include_insertion_point): Use
2095 strcmp, not pointer equality.
2096
ae2e0bc1
GA
20972020-07-25 Martin Sebor <msebor@redhat.com>
2098
2099 PR c++/96310
2100 * c-common.c (check_nonnull_arg): Print note only when warning was
2101 issued.
2102
3ea9abca
GA
21032020-07-22 Tobias Burnus <tobias@codesourcery.com>
2104
2105 * c-omp.c (c_finish_omp_critical): Check for no name but
2106 nonzero hint provided.
2107
0933f508
GA
21082020-07-20 Jason Merrill <jason@redhat.com>
2109
2110 * c-cppbuiltin.c (c_cpp_builtins): Update
2111 __cpp_nontype_template_args for C++20.
2112
21132020-07-20 Martin Sebor <msebor@redhat.com>
2114
2115 PR c/96249
2116 * c.opt: Remove stray text.
2117
8ca07a30
GA
21182020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2119
2120 PR other/86904
2121 * c-indentation.c (should_warn_for_misleading_indentation): Get
2122 global tabstop from the new source.
2123 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2124 is now a common option.
2125 * c.opt: Likewise.
2126
a82c4c4c 21272020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2128
2129 * c.opt (Wscalar-storage-order): Add explicit variable.
2130
f60ee68d
GA
21312020-07-07 Nathan Sidwell <nathan@acm.org>
2132
2133 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2134 cpp_read_main_file.
2135 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2136 maps. Force token position to line_table's highest line.
2137 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2138 (cb_define): Always increment source line.
2139
4077d74c
GA
21402020-07-06 Martin Sebor <msebor@redhat.com>
2141
2142 PR c++/95984
2143 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2144 to stub lambda objects with null this pointer.
2145 (check_nonnull_arg): Handle C++ nullptr.
2146
b5f24739
GA
21472020-07-02 Jason Merrill <jason@redhat.com>
2148 Jakub Jelinek <jakub@redhat.com>
2149
2150 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2151
46fbb6c6
GA
21522020-06-30 Jakub Jelinek <jakub@redhat.com>
2153
2154 PR c++/95963
2155 * c-common.c (check_function_arguments_recurse): Don't crash on
2156 calls to internal functions.
2157
69273534
GA
21582020-06-28 Martin Sebor <msebor@redhat.com>
2159
2160 PR c++/86568
2161 * c-common.c (struct nonnull_arg_ctx): Add members.
2162 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2163 C++ member functions specially. Consider the this pointer implicitly
2164 nonnull.
2165 (check_nonnull_arg): Use location of argument when available.
2166 (check_function_arguments): Use nonnull_arg_ctx as argument.
2167
9a33c41f
GA
21682020-06-27 Jakub Jelinek <jakub@redhat.com>
2169
2170 PR middle-end/95903
2171 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2172 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2173 smaller precision intop operands separately.
2174
c9c05f73
GA
21752020-06-26 Marek Polacek <polacek@redhat.com>
2176
2177 * c-opts.c (c_common_init_options): Default to gnu++17.
2178
aff95ee7
GA
21792020-06-17 Jonathan Wakely <jwakely@redhat.com>
2180
bd0a89dc 2181 PR c/95378
aff95ee7
GA
2182 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2183 pointer arguments.
2184
56638b9b
GA
21852020-06-16 Jakub Jelinek <jakub@redhat.com>
2186
2187 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2188 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2189 idx members.
2190 (c_omp_is_loop_iterator): New function.
2191 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2192 if outer loop iterator is present. Perform duplicate checking through
2193 hash_set in the function rather than expecting caller to do that.
2194 Pass NULL instead of d->ppset to walk_tree_1.
2195 (c_omp_check_nonrect_loop_iv): New function.
2196 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2197 non-rectangular loop forms, diagnose multiple associated loops with
2198 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2199 (c_omp_check_loop_iv_exprs): Likewise.
2200
ec6ffbb9
GA
22012020-06-10 Martin Liska <mliska@suse.cz>
2202
2203 PR tree-optimization/92860
2204 * c-attribs.c (handle_optimize_attribute):
2205 Save global options and compare it after parsing of function
2206 attribute.
2207 * c-pragma.c (opt_stack::saved_global_options): New field.
2208 (handle_pragma_push_options): Save global_options.
2209 (handle_pragma_pop_options): Compare them after pop.
2210
b952c2cf
GA
22112020-06-09 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR c/95580
2214 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2215 case when MEM_REF's first argument has type pointer to incomplete type.
2216
1a59f3db
GA
22172020-06-05 Jason Merrill <jason@redhat.com>
2218
2219 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2220 operand to POINTER_PLUS_EXPR.
2221
3add3425
GA
22222020-06-04 Martin Sebor <msebor@redhat.com>
2223
2224 PR middle-end/10138
2225 PR middle-end/95136
2226 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2227 (handle_access_attribute): Same.
2228
9a5b7438
GA
22292020-06-03 Mark Wielaard <mark@klomp.org>
2230
2231 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2232 New function.
2233 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2234 New function declaration.
2235
22362020-06-03 Mark Wielaard <mark@klomp.org>
2237
2238 * known-headers.cc (get_string_macro_hint): New function.
2239 (get_stdlib_header_for_name): Use get_string_macro_hint.
2240 (get_c_stdlib_header_for_string_macro_name): New function.
2241 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2242 New function declaration.
2243
22442020-06-03 Tobias Burnus <tobias@codesourcery.com>
2245
2246 * c-common.h (c_omp_predetermined_mapping): Declare.
2247 * c-omp.c (c_omp_predetermined_mapping): New.
2248
af114c38
MW
22492020-05-22 Mark Wielaard <mark@klomp.org>
2250
2251 * known-headers.cc (get_stdlib_header_for_name): Add a new
2252 stdlib_hint array for stdbool and stdint.
2253
45c50b6a
MW
22542020-05-22 Mark Wielaard <mark@klomp.org>
2255
2256 * known-headers.cc (get_stdlib_header_for_name): Return
2257 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2258 flag_isoc99.
2259
c22027a0
NS
22602020-05-20 Nathan Sidwell <nathan@acm.org>
2261
38a4db21
NS
2262 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2263
c22027a0
NS
2264 * c-common.c (try_to_locate_new_include_insertion_point): Use
2265 strcmp to compare filenames.
2266 * c-lex.c (init_c_lex): Move declaration to initialization.
2267 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2268 deferred count loop.
2269
29f0e90d
JM
22702020-05-15 Jason Merrill <jason@redhat.com>
2271
2272 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2273
b04445d4
JM
22742020-05-13 Jason Merrill <jason@redhat.com>
2275
2276 * c.opt (std=c++20): Make c++2a the alias.
2277 (std=gnu++20): Likewise.
2278 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2279 * c-opts.c: Adjust.
2280 * c-cppbuiltin.c: Adjust.
2281 * c-ubsan.c: Adjust.
2282 * c-warn.c: Adjust.
2283
11dd3be5
EB
22842020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2285
2286 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2287
b224c376
NS
22882020-05-08 Nathan Sidwell <nathan@acm.org>
2289
2290 Reimplement directives only processing.
2291 * c-ppoutput.c (token_streamer): Ne.
2292 (directives_only_cb): New. Swallow ...
2293 (print_lines_directives_only): ... this.
2294 (scan_translation_unit_directives_only): Reimplment using the
2295 published interface.
2296
f1d94677
MP
22972020-05-07 Marek Polacek <polacek@redhat.com>
2298
2299 * c-format.c (badwords): Add "nonstatic".
2300
9b95bb52
JJ
2301202-05-07 Jakub Jelinek <jakub@redhat.com>
2302
2303 PR c/94968
2304 * c-common.c (speculation_safe_value_resolve_params): Return false if
2305 error_operand_p (val2).
2306 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2307 Remove extraneous semicolon.
2308
530b4409 23092020-05-06 qing zhao <qing.zhao@oracle.com>
2310
2311 PR c/94230
2312 * c-indentation.c (get_visual_column): Add a hint to use the new
2313 -flarge-source-files option.
2314
b776bdca
SSF
23152020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2316
2317 * c-attribs.c (handle_vector_size_attribute): Add attribute
2318 nonnull for argument args in order to silence warning of
2319 uninitialized variable usage. Since this is local to the
2320 compilation unit and thus cannot be checked at call sides by the
2321 compiler, added an assert statement in order to verify this.
2322
6607bdd9
L
23232020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2324
2325 PR target/93492
2326 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2327 value to USHRT_MAX (65535).
2328
691eeb65
JJ
23292020-04-29 Jakub Jelinek <jakub@redhat.com>
2330
2331 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2332
26d76be7
JJ
23332020-04-27 Jakub Jelinek <jakub@redhat.com>
2334
2335 PR c/94755
2336 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2337 fncode == BUILT_IN_NONE before initialization of first_param.
2338
7291b2ed
MP
23392020-04-23 Marek Polacek <polacek@redhat.com>
2340
2341 PR c++/94733
2342 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2343 TREE_PURPOSE.
2344
58a29af8
PP
23452020-04-14 Patrick Palka <ppalka@redhat.com>
2346
2347 PR c++/85278
2348 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2349 ampersand if it's an rvalue reference type.
2350
09f04139
MS
23512020-04-13 Martin Sebor <msebor@redhat.com>
2352
2353 PR c/92326
2354 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2355 printing array bound for flexible array members.
2356
ee26baf4
IS
23572020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2358
2359 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2360 define, per n4861.
2361
75efe9cb
RB
23622020-04-02 Richard Biener <rguenther@suse.de>
2363
2364 PR c/94392
2365 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2366 for -O2 and C++11 or newer.
2367
75defde9
PP
23682020-03-28 Patrick Palka <ppalka@redhat.com>
2369
2370 * c.opt: Add -fconcepts-diagnostics-depth.
2371
52f24a9e
MS
23722020-03-27 Martin Sebor <msebor@redhat.com>
2373
2374 PR c++/94346
2375 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2376 to decl_attributes. Make handling of different kinds of entities
2377 more robust.
2378
ccacf77b
MS
23792020-03-27 Martin Sebor <msebor@redhat.com>
2380
2381 PR c++/94098
2382 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2383 here.
2384
ca6c7225
JJ
23852020-03-23 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR c++/91993
2388 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2389 result being COMPOUND_EXPRs, skip to ultimate rhs.
2390
1aa22b19
RS
23912020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2392
2393 PR middle-end/94072
2394 * c-common.c (c_common_type_for_mode): Before using a registered
2395 built-in type, check that the vectorness of the type matches
2396 the vectorness of the mode.
2397
700d4cb0
JJ
23982020-03-17 Jakub Jelinek <jakub@redhat.com>
2399
2400 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2401 issue in a diagnostic message.
2402
b408e010
LH
24032020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2404
2405 * c.opt: Avoid redundancy in the help text.
2406
e78e50d5
MP
24072020-03-02 Marek Polacek <polacek@redhat.com>
2408
2409 PR c++/93958 - add missing -std=gnu++20.
2410 * c.opt: Add -std=gnu++20.
2411
649e1741
MS
24122020-03-01 Martin Sebor <msebor@redhat.com>
2413
2414 PR c++/92721
2415 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2416 (handle_access_attribute): Same.
2417
7b60f3ba
JJ
24182020-02-25 Jakub Jelinek <jakub@redhat.com>
2419
2420 PR c/93858
2421 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2422 "did you mean" hint in diagnostics.
2423
fb260504
JM
24242020-02-15 Jason Merrill <jason@redhat.com>
2425
2426 * c.opt: Add -std=c++20.
2427
1d757b09
EB
24282020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2429
2430 * c-ada-spec.c: Include bitmap.h.
2431 (dump_ada_double_name): Rename into...
2432 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2433 (dump_ada_array_type): Adjust to above renaming. Robustify.
2434 (dump_nested_types_1): New function copied from... Add dumped_types
2435 parameter and pass it down to dump_nested_type.
2436 (dump_nested_types): ...this. Remove parent parameter. Just call
2437 dump_nested_types_1 on an automatic bitmap.
2438 (dump_nested_type): Add dumped_types parameter.
2439 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2440 Adjust recursive calls and adjust to above renaming.
2441 (dump_ada_declaration): Adjust call to dump_nested_types.
2442 Tidy up and adjust to above renaming.
2443 (dump_ada_specs): Initialize and release bitmap obstack.
2444
0cc575e4
MS
24452020-02-10 Martin Sebor <msebor@redhat.com>
2446
2447 PR c/93640
2448 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2449
a59aa302
JJ
24502020-02-10 Jakub Jelinek <jakub@redhat.com>
2451
2452 PR other/93641
2453 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2454 Remove useless extra test.
2455
e464fc90
TB
24562020-02-03 Julian Brown <julian@codesourcery.com>
2457 Tobias Burnus <tobias@codesourcery.com>
2458
2459 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2460
e3b6c052
JM
24612020-01-29 Jason Merrill <jason@redhat.com>
2462
2463 PR c++/89357
2464 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2465
6d00f052
JM
24662020-01-23 Jason Merrill <jason@redhat.com>
2467
2468 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2469
8a990ffa
MS
24702020-01-23 Martin Sebor <msebor@redhat.com>
2471
2472 PR c/84919
2473 * c-common.c (check_function_arguments): Avoid overlap checking
2474 of sprintf functions.
2475
55b7df8b
JM
24762020-01-22 Jason Merrill <jason@redhat.com>
2477
2478 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2479 PR c++/40752
2480 * c-warn.c (conversion_warning): Check operands only after checking
2481 the whole expression. Don't check second operand of + for sign.
2482
c77074d0
JM
24832020-01-21 Jason Merrill <jason@redhat.com>
2484 Manuel López-Ibáñez <manu@gcc.gnu.org>
2485
2486 PR c++/40752 - useless -Wconversion with short +=.
2487 * c.opt (-Warith-conversion): New.
2488 * c-warn.c (conversion_warning): Recurse for operands of
2489 operators. Only warn about the whole expression with
2490 -Warith-conversion.
2491
731dbfc3
JM
24922020-01-21 Jason Merrill <jason@redhat.com>
2493
2494 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2495 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2496
ad1a3914
NS
24972020-01-20 Nathan Sidwell <nathan@acm.org>
2498
2499 PR preprocessor/80005
2500 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2501
49789fd0
IS
25022020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2503
2504 * c-common.c (co_await, co_yield, co_return): New.
2505 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2506 RID_CO_RETURN): New enumeration values.
2507 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2508 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2509 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2510 * c.opt (fcoroutines): New command-line switch.
2511
4bc1899b
DM
25122020-01-10 David Malcolm <dmalcolm@redhat.com>
2513
2514 * c-format.c (local_event_ptr_node): New.
2515 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2516 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2517 * c-format.h (T_EVENT_PTR): New define.
2518
f25e33fa
MS
25192020-01-10 Martin Sebor <msebor@redhat.com>
2520
2521 PR c/93132
2522 * c-attribs.c (append_access_attrs): Validate against the translated
2523 access string rather than the human-readable representation.
2524
8d9254fc
JJ
25252020-01-01 Jakub Jelinek <jakub@redhat.com>
2526
2527 Update copyright years.
2528
39292e25
EB
25292019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2530
2531 * c-ada-spec.h (decl_sloc): Delete.
2532 * c-ada-spec.c (decl_sloc): Make static.
2533
519d7496
JB
25342019-12-19 Julian Brown <julian@codesourcery.com>
2535
2536 * c-common.h (c_omp_map_clause_name): Add prototype.
2537 * c-omp.c (c_omp_map_clause_name): New function.
2538 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2539 PRAGMA_OACC_CLAUSE_DETACH.
2540
a6163563
JB
25412019-12-19 Julian Brown <julian@codesourcery.com>
2542 Maciej W. Rozycki <macro@codesourcery.com>
2543 Tobias Burnus <tobias@codesourcery.com>
2544 Thomas Schwinge <thomas@codesourcery.com>
2545
2546 * c-pragma.h (pragma_omp_clause): Add
2547 PRAGMA_OACC_CLAUSE_NO_CREATE.
2548
e8f1ade2
MS
25492019-12-17 Martin Sebor <msebor@redhat.com>
2550
2551 PR c++/61339
2552 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2553
368877a1
DM
25542019-12-11 David Malcolm <dmalcolm@redhat.com>
2555
2556 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2557 implementation.
2558 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2559
d68f5d45
DM
25602019-12-09 David Malcolm <dmalcolm@redhat.com>
2561
2562 * c-format.c (range_label_for_format_type_mismatch::get_text):
2563 Replace label_text ctor called with true with label_text::take.
2564
d3e28653
DM
25652019-12-09 David Malcolm <dmalcolm@redhat.com>
2566
2567 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2568 initial newline from expected outputs.
2569 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2570 call to diagnostic_show_locus.
2571
abd6d8cc
JJ
25722019-12-06 Jakub Jelinek <jakub@redhat.com>
2573
2574 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2575 now.
2576
7906797e
MP
25772019-12-05 Marek Polacek <polacek@redhat.com>
2578 Jakub Jelinek <jakub@redhat.com>
2579
2580 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2581 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2582
5c04da88
MP
25832019-12-05 Marek Polacek <polacek@redhat.com>
2584
2585 PR c++/92271 - make __is_same alias for __is_same_as.
2586 * c-common.c: Add __is_same, an alias for __is_same_as.
2587
43aae289
MP
25882019-12-03 Marek Polacek <polacek@redhat.com>
2589
2590 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2591 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2592 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2593
d7ddfbcb
JH
25942019-11-30 Jan Hubicka <hubicka@ucw.cz>
2595
2596 * c-attribs.c (handle_symver_attribute): New function
2597 (c_common_attributes): Add symver.
2598
65ef05d0
RS
25992019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2600
2601 * c-common.c (pointer_int_sum): Use verify_type_context to check
2602 whether the target allows pointer arithmetic for the types involved.
2603 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2604 to check whether the target allows sizeof and alignof operations
2605 for the types involved.
2606
1a291106
JM
26072019-11-27 Jason Merrill <jason@redhat.com>
2608
2609 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2610
05d6cb1a
JJ
26112019-11-26 Jakub Jelinek <jakub@redhat.com>
2612
2613 PR c++/61414
2614 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2615 ENUMERAL_TYPEs.
2616
5b8d9367
JM
26172019-11-25 Joseph Myers <joseph@codesourcery.com>
2618
2619 PR c/91985
2620 * c-common.c (c_common_type_for_mode): Handle decimal
2621 floating-point types being NULL_TREE.
2622 * c-format.c (get_format_for_type_1): Handle specified types being
2623 NULL_TREE.
2624 * c-lex.c (interpret_float): Give an error for decimal
2625 floating-point constants when decimal floating-point not
2626 supported.
2627
1fbf51cb
JJ
26282019-11-23 Jakub Jelinek <jakub@redhat.com>
2629
2630 PR middle-end/83859
2631 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2632 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2633 group warning with inform together.
2634 (handle_access_attribute): Formatting fix.
2635
761df906
JJ
26362019-11-22 Jakub Jelinek <jakub@redhat.com>
2637
bdaf8be1
JJ
2638 PR c/90677
2639 * c-common.h (identifier_global_tag): Declare.
2640 * c-format.c (get_pointer_to_named_type): Renamed to ...
2641 (get_named_type): ... this. Use identifier_global_tag instead of
2642 identifier_global_value, handle the return value being a TYPE_P.
2643 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2644 to call get_named_type instead. Formatting fixes.
2645
c2ecce6d 2646 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2647 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2648 and __cpp_generic_lambdas for -std=c++2a. Define
2649 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2650 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2651 __cpp_concepts for -std=c++2a.
2652
54aa6b58
MS
26532019-11-22 Martin Sebor <msebor@redhat.com>
2654
2655 PR middle-end/83859
2656 * c-attribs.c (handle_access_attribute): New function.
2657 (c_common_attribute_table): Add new attribute.
2658 (get_argument_type): New function.
2659 (append_access_attrs): New function.
2660 (get_nonnull_operand): Rename...
2661 (get_attribute_operand): ...to this.
2662 * c-common.c (get_nonnull_operand): Rename...
2663 (get_attribute_operand): ...to this.
2664
6c80b1b5
JM
26652019-11-21 Joseph Myers <joseph@codesourcery.com>
2666
2667 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2668 of warning.
2669
192961ff
JM
26702019-11-19 Joseph Myers <joseph@codesourcery.com>
2671
2672 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2673 warning for standard attributes mixed with fallthrough attributes.
2674
f8aea5e3
JM
26752019-11-15 Joseph Myers <joseph@codesourcery.com>
2676
2677 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2678 * c-common.h (handle_fallthrough_attribute): Declare.
2679
2cc94aa8
JM
26802019-11-15 Joseph Myers <joseph@codesourcery.com>
2681
2682 * c-attribs.c (handle_deprecated_attribute): Remove static.
2683 * c-common.h (handle_deprecated_attribute): Declare.
2684
7c5890cc
JM
26852019-11-14 Joseph Myers <joseph@codesourcery.com>
2686
2687 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2688 char for C.
2689
b2417b59
JJ
26902019-11-14 Jakub Jelinek <jakub@redhat.com>
2691
d0ec7c93
JJ
2692 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2693 valid vendors.
2694
b2417b59
JJ
2695 * c-omp.c (c_omp_check_context_selector): Handle name lists
2696 containing string literals. Don't diagnose atomic_default_mem_order
2697 with multiple props.
2698
00be2a5f
JM
26992019-11-13 Joseph Myers <joseph@codesourcery.com>
2700
2701 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2702 NORM_MAX constants. Update call to get_max_float.
2703 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2704 constants.
2705
2dbad62d
EB
27062019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2707
2708 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2709 (dump_forward_type): Do not generate a declaration for function types.
2710 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2711 of the component type if it is declared in another file.
2712
6ed76044
ML
27132019-11-12 Martin Liska <mliska@suse.cz>
2714
2715 * c-opts.c (c_common_post_options):
2716 Use SET_OPTION_IF_UNSET.
2717
62aee289
MR
27182019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2719 Frederik Harwath <frederik@codesourcery.com>
2720
2721 gcc/c-family/
2722 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2723 constant.
2724 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2725
f486280c
RS
27262019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2727
2728 * c-common.h (gnu_vector_type_p): New function.
2729 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2730 vectors to satisfy gnu_vector_type_p.
2731 (c_build_vec_convert): Likewise __builtin_convertvector.
2732 (convert_vector_to_array_for_subscript): Likewise when applying
2733 implicit vector to array conversion.
2734 (scalar_to_vector): Likewise when converting vector-scalar
2735 operations to vector-vector operations.
2736
017c6491
JM
27372019-11-08 Joseph Myers <joseph@codesourcery.com>
2738
2739 * c.opt (Wold-style-definition): Initialize to -1.
2740 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2741 to flag_isoc2x if not set explicitly.
2742
c01bd174
JM
27432019-11-07 Joseph Myers <joseph@codesourcery.com>
2744
2745 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2746
0df65305
JM
27472019-11-05 Jason Merrill <jason@redhat.com>
2748
2749 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2750 -fconcepts.
2751
e0c866dd
KK
27522019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2753
2754 * c-opts.c (c_common_post_options): Update
2755 latest_abi_version.
2756
f968ef9b
JJ
27572019-11-02 Jakub Jelinek <jakub@redhat.com>
2758
d0c464d2
JJ
2759 * c-common.h (c_omp_get_context_selector): Remove.
2760 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2761 and renamed to omp_get_context_selector.
2762
917dd789
JJ
2763 * c-omp.c (c_omp_mark_declare_variant): Use
2764 omp_context_selector_set_compare.
2765
f968ef9b
JJ
2766 PR c++/88335 - Implement P1073R3: Immediate functions
2767 * c-common.h (enum rid): Add RID_CONSTEVAL.
2768 * c-common.c (c_common_reswords): Add consteval.
2769
5f6705b7
JJ
27702019-11-01 Martin Sebor <msebor@redhat.com>
2771
2772 PR middle-end/91679
2773 PR middle-end/91647
2774 PR middle-end/91463
2775 PR middle-end/92312
2776 * c-pretty-print.c (direct_abstract_declarator): Print
2777 bound in zero-length arrays.
2778 * c.opt (-Wzero-length-bounds): New option.
2779
43f1814c
NS
27802019-10-30 Nathan Sidwell <nathan@acm.org>
2781
2782 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2783 macros.
2784
ad1539d5
MS
27852019-10-28 Martin Sebor <msebor@redhat.com>
2786
2787 PR c/66970
2788 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2789 even when only preprocessing.
2790 * c-common.h (names_builtin_p): Declare new function.
2791 * c-lex.c (init_c_lex): Set has_builtin.
2792 (c_common_has_builtin): Define a new function.
2793 * c-ppoutput.c (init_pp_output): Set has_builtin.
2794
135df52c
JJ
27952019-10-24 Jakub Jelinek <jakub@redhat.com>
2796
2797 * c-common.h (c_omp_context_selector_matches): Remove.
2798 * c-omp.c (c_omp_context_selector_matches): Remove.
2799 * c-attribs.c (c_common_attribute_table): Add
2800 "omp declare target {host,nohost,block}" attributes.
2801
8ad0c477
JM
28022019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2803
2804 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2805
56898e43
RS
28062019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2807
2808 * c-common.h (user_facing_original_type_p): Declare.
2809 * c-common.c: Include c-spellcheck.h.
2810 (user_facing_original_type_p): New function.
2811
20de9568
JJ
28122019-10-12 Jakub Jelinek <jakub@redhat.com>
2813
2814 * c-common.h (c_omp_mark_declare_variant,
2815 c_omp_context_selector_matches): Declare.
2816 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2817 and hsa-common.h.
2818 (c_omp_get_context_selector): Support second argument NULL.
2819 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2820 functions.
2821 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2822 attribute, add "omp declare variant base" and
2823 "omp declare variant variant" attributes.
2824
175a85b2
JM
28252019-10-11 Joseph Myers <joseph@codesourcery.com>
2826
2827 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2828 CppReason(CPP_W_C11_C2X_COMPAT).
2829
fe2bc27c
JM
28302019-10-11 Joseph Myers <joseph@codesourcery.com>
2831
2832 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2833 _Decimal64 and _Decimal128.
2834
27dfdc0f
JM
28352019-10-10 Joseph Myers <joseph@codesourcery.com>
2836
2837 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2838 types if DFP not supported.
2839
94e7f906
JJ
28402019-10-10 Jakub Jelinek <jakub@redhat.com>
2841
2842 * c-common.h (c_omp_check_context_selector,
2843 c_omp_get_context_selector): Declare.
2844 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2845 in diagnostic message.
2846 (c_omp_check_context_selector, c_omp_get_context_selector): New
2847 functions.
2848 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2849 attribute.
2850 (handle_omp_declare_variant_attribute): New function.
2851
a7160771
MS
28522019-10-09 Martin Sebor <msebor@redhat.com>
2853
2854 PR tree-optimization/90879
2855 * c.opt (-Wstring-compare): New option.
2856
cb57504a
JM
28572019-10-08 Andrew Sutton <asutton@lock3software.com>
2858 Jason Merrill <jason@redhat.com>
2859
2860 Update the concepts implementation to conform to the C++20
2861 specification, improve compile times, and generally clean up
2862 the implementation.
2863
2864 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2865 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2866 * c.opt: Add -Wconcepts-ts.
2867 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2868 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2869 (set_std_cxx2a): Enable concepts by default.
2870
fbb2a6dc
JM
28712019-10-08 Joseph Myers <joseph@codesourcery.com>
2872
2873 * c-opts.c (c_common_post_options): Set
2874 -fno-fp-int-builtin-inexact for C2X.
2875
8e007055
JJ
28762019-10-05 Jakub Jelinek <jakub@redhat.com>
2877
2878 PR c++/91369 - Implement P0784R7: constexpr new
2879 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2880 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2881
843f104d
JM
28822019-10-04 Joseph Myers <joseph@codesourcery.com>
2883
2884 PR c/82752
2885 * c-format.c (C_STD_VER): Handle C2x.
2886 (C_STD_NAME): Likewise.
2887 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2888 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2889 modifier allowed and 'p' flag.
2890 * c-format.h (enum format_std_version): Add STD_C2X.
2891 (struct format_char_info): Mention 'p' in comment on flags2.
2892
e9c9a142
DM
28932019-10-01 David Malcolm <dmalcolm@redhat.com>
2894
2895 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2896 calling diagnostic_show_locus, rather than destroying it afterwards.
2897
7552c36a
JJ
28982019-10-01 Jakub Jelinek <jakub@redhat.com>
2899
2900 PR c++/91925
2901 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2902 with NULL DECL_FIELD_OFFSET.
2903
8209db25
RS
29042019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2905
2906 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2907 has a type name, use it in preference to the __vector syntax.
2908
9343bf99
RS
29092019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2910
2911 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2912 two spaces between a comma and "...".
2913
59bc434a
JJ
29142019-09-27 Jakub Jelinek <jakub@redhat.com>
2915
2916 PR c++/88203
2917 * c-common.h (c_omp_predefined_variable): Declare.
2918 * c-omp.c (c_omp_predefined_variable): New function.
2919 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2920 for predefined variables.
2921
c6447c20
RS
29222019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2923
2924 * c-common.h (build_function_call_vec): Take the original
2925 function decl as an optional final parameter.
2926 (check_builtin_function_arguments): Take the original function decl.
2927 * c-common.c (check_builtin_function_arguments): Likewise.
2928 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2929 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2930
c4438114
JM
29312019-09-15 Jason Merrill <jason@redhat.com>
2932
2933 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2934 fold_for_warn in "|| mask" warning.
2935
68a57628
ML
29362019-09-10 Martin Liska <mliska@suse.cz>
2937
2938 * c.opt: Use newly added WarnRemoved.
2939
f48ef52e
ML
29402019-09-09 Martin Liska <mliska@suse.cz>
2941
2942 * c.opt: Update comment of removed
2943 options that are preserved only for backward
2944 compatibility.
2945
67f6e649
ML
29462019-09-06 Martin Liska <mliska@suse.cz>
2947
2948 PR c++/91125
2949 * c-common.c: Remove definition of flag_use_repository.
2950 * c-common.h: Likewise.
2951 * c-opts.c (c_common_handle_option):
2952 Do not handle OPT_frepo option.
2953 * c.opt: Mark the option with Deprecated.
2954
db9d2274
MP
29552019-09-04 Marek Polacek <polacek@redhat.com>
2956
2957 * c.opt (fdeduce-init-list): Ignored.
2958
68e2c199
PK
29592019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2960
2961 PR c/78736
2962 * c.opt (Wenum-conversion): New option.
2963
7a4418a5
JL
29642019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2965
2966 * c-attribs.c (handle_section_attribute): Call the
2967 handle_generic_attribute target hook after performing target
2968 independent processing.
2969 (handle_noinit_attribute): Likewise.
2970
5f76ab15
ILT
29712019-09-03 Ian Lance Taylor <iant@golang.org>
2972
2973 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2974 when using -fgo-dump-spec.
2975
ae0d3f6a
ML
29762019-09-02 Martin Liska <mliska@suse.cz>
2977
2978 PR c++/91155
2979 * c-common.c (fname_as_string): Use cxx_printable_name for
2980 __PRETTY_FUNCTION__ same as was used before r265711.
2981
8a902edb
MP
29822019-08-28 Marek Polacek <polacek@redhat.com>
2983
2984 Implement P1152R4: Deprecating some uses of volatile.
2985 PR c++/91361
2986 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2987 default for C++2a, unless -Wno-deprecated.
2988 * c.opt (Wvolatile): New warning.
2989
4742dbe7
MP
29902019-08-28 Marek Polacek <polacek@redhat.com>
2991
2992 PR c++/91360 - Implement C++20 P1143R2: constinit.
2993 * c-common.c (c_common_reswords): Add constinit and __constinit.
2994 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2995 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2996 RID_LAST_CXX20.
2997 (D_CXX20): Define.
2998 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2999 * c-format.c (cxx_keywords): Add "constinit".
3000 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3001
6a074892
JJ
30022019-08-27 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR c++/91415
3005 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3006 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3007 like COMPOUND_EXPR rather than normal expression.
3008
22f8849d
IS
30092019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3010
3011 PR pch/61250
3012 * c-lex.c (c_lex_with_flags): Don't call
3013 c_common_no_more_pch () from here.
3014
df375b03
JJ
30152019-08-23 Jakub Jelinek <jakub@redhat.com>
3016
3017 PR middle-end/91283
3018 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3019 instead of flag_excess_precision_cmdline.
3020 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3021 * c-opts.c (c_common_post_options): Likewise.
3022
14b7950f
MS
30232019-08-22 Martin Sebor <msebor@redhat.com>
3024
3025 PR middle-end/91490
3026 * c-common.c (braced_list_to_string): Add argument and overload.
3027 Handle flexible length arrays and unions.
3028
8bb2ee59
EB
30292019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3030
3031 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3032 function declarations where arguments are missing. Rename variables.
3033
21c1e205
RB
30342019-08-15 Richard Biener <rguenther@suse.de>
3035
3036 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3037 enabled, define __SIZETYPE__.
3038
f0033821
CL
30392019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3040
3041 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3042 exclusion with "section" attribute.
3043 (attr_noinit_exclusions): New table.
3044 (handle_noinit_attribute): New function.
3045
4d732405
RS
30462019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3047
3048 PR middle-end/91421
3049 * c-common.c (resolve_overloaded_builtin): Use
3050 copy_decl_built_in_function.
3051
51ad8481
MS
30522019-08-13 Martin Sebor <msebor@redhat.com>
3053
3054 PR c/80619
3055 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3056 (asm_fprintf_length_spec): Same.
3057 * c-format.h (format_lengths): Add FMT_LEN_w.
3058
77eb117f
JJ
30592019-08-10 Jakub Jelinek <jakub@redhat.com>
3060
3061 * c-pragma.h (enum pragma_omp_clause): Add
3062 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3063
398e3feb
JJ
30642019-08-07 Jakub Jelinek <jakub@redhat.com>
3065
3066 * c-pragma.h (enum pragma_omp_clause): Add
3067 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3068 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3069 enumeration value.
3070
ab574db6
MP
30712019-08-05 Marek Polacek <polacek@redhat.com>
3072
3073 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3074 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3075 default for C++2a, unless -Wno-deprecated.
3076 * c.opt (Wcomma-subscript): New warning.
3077
554a530f
JJ
30782019-07-20 Jakub Jelinek <jakub@redhat.com>
3079
3080 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3081 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3082 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3083 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3084 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3085 constructs with the loop construct.
3086
1a888209
JJ
30872019-07-13 Jakub Jelinek <jakub@redhat.com>
3088
3089 PR c/91149
3090 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3091 OMP_CLAUSE_REDUCTION_TASK handling.
3092
1fdd6f04
JJ
30932019-07-12 Jakub Jelinek <jakub@redhat.com>
3094
3095 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3096 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3097
99b1c316
MS
30982019-07-09 Martin Sebor <msebor@redhat.com>
3099
3100 PR c++/61339
1fdd6f04 3101 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3102 and others to class.
3103 * c-pretty-print.h: Same.
3104
6c1dae73
MS
31052019-07-09 Martin Sebor <msebor@redhat.com>
3106
3107 PR c++/61339
3108 * c-format.c (check_argument_type): Change class-key from class to
3109 struct and vice versa to match convention and avoid -Wclass-is-pod
3110 and -Wstruct-no-pod.
3111 * c-pretty-print.h: Same.
3112
8ba6ea87
ML
31132019-07-03 Martin Liska <mliska@suse.cz>
3114
3115 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3116 dead assignemts.
3117
83eb9522
JJ
31182019-07-03 Jakub Jelinek <jakub@redhat.com>
3119
3120 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3121 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3122 with OMP_PARALLEL.
3123
1c6ffbab
QZ
31242019-07-02 qing zhao <qing.zhao@oracle.com>
3125
3126 PR preprocessor/90581
3127 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3128 * c.opt: Add new option -fmax-include-depth.
3129
7ffc7de5
JM
31302019-06-26 Jason Merrill <jason@redhat.com>
3131
3132 PR c++/55442 - memory-hog with highly recursive constexpr.
3133 * c.opt (fconstexpr-loop-limit): New.
3134
361af3e4
JJ
31352019-06-25 Jakub Jelinek <jakub@redhat.com>
3136
3137 PR sanitizer/90954
3138 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3139 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3140
ab20d992
JJ
31412019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3142
3143 * c-common.c (c_common_nodes_and_builtins): Define
3144 alternate "__intN__" name for "__intN" types.
3145
f4af4019
JH
31462019-06-24 Jan Hubicka <jh@suse.cz>
3147
3148 * c-common.c (braced_lists_to_strings): Check that
3149 type is array or integer prior checking string flag.
3150
da9e9b57
MB
31512019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3152
3153 PR c++/90875 - added -Wswitch-outside-range option
3154 * c.opt (Wswitch-outside-range): Added new option.
3155 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3156
3f3d6a6f
MP
31572019-06-21 Marek Polacek <polacek@redhat.com>
3158
3159 PR c++/90953 - ICE with -Wmissing-format-attribute.
3160 * c-common.c (check_function_arguments_recurse): Use
3161 get_attribute_name.
3162 (check_missing_format_attribute): Likewise.
3163
1bf32c11
MP
31642019-06-19 Marek Polacek <polacek@redhat.com>
3165
3166 PR c++/60364 - noreturn after first decl not diagnosed.
3167 * c-attribs.c (handle_noreturn_attribute): No longer static.
3168 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3169 Declare.
3170 * c-format.c (check_function_format): Use get_attribute_name.
3171
a04c0734
MS
31722019-06-19 Martin Sebor <msebor@redhat.com>
3173
3174 PR translation/90156
3175 * c-format.c (function_format_info::format_type): Adjust type.
3176 (function_format_info::is_raw): New member.
3177 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3178 (decode_format_attr): Adjust call to decode_format_type.
3179 Avoid a redundant call to convert_format_name_to_system_name.
3180 Avoid abbreviating the word "arguments" in a diagnostic.
3181 (format_warning_substr): New function.
3182 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3183 (finish_dollar_format_checking): Same.
3184 (check_format_info): Same.
3185 (struct baltoks_t): New.
3186 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3187 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3188 functions.
3189 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3190 maybe_diag_unbalanced_tokens.
3191 (handle_format_attribute): Spell out the word "arguments" in
3192 a diagnostic.
3193
d3786ebb
MB
31942019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3195
3196 PR c++/90449 - add -Winaccessible-base option.
3197 * c.opt (Winaccessible-base): New option.
3198
bf38f7e9
JJ
31992019-06-10 Jakub Jelinek <jakub@redhat.com>
3200
3201 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3202 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3203 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3204 combined/composite constructs where it is not allowed. Copy over
3205 OMP_CLAUSE_REDUCTION_INSCAN.
3206
0ecf545c
MS
32072019-06-05 Martin Sebor <msebor@redhat.com>
3208
3209 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3210 (handle_alias_ifunc_attribute): Same.
3211 (handle_copy_attribute): Same.
3212 (handle_weakref_attribute): Same.
3213 (handle_nonnull_attribute): Same.
3214 * c-warn.c (warn_for_sign_compare): Same.
3215 (warn_for_restrict): Same.
3216 * c.opt: Same.
3217
36b34127
MS
32182019-06-05 Martin Sebor <msebor@redhat.com>
3219
3220 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3221 * c.opt (-Wformat-diag): Remove a spurious period.
3222
357a352f
JJ
32232019-05-29 Jakub Jelinek <jakub@redhat.com>
3224
3225 PR c/90628
3226 * c-common.c (check_builtin_function_arguments)
3227 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3228 as last argument.
3229
2b8235ea
EB
32302019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3231
3232 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3233
6d86ddc4
ML
32342019-05-22 Martin Liska <mliska@suse.cz>
3235
3236 PR lto/90500
3237 * c-attribs.c (handle_copy_attribute): Do not copy
3238 target_clones attribute.
3239
419ba5b9
EB
32402019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3241
3242 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3243 * c-ada-spec.c (print_assignment_operator): New function.
3244 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3245 assignment operators declared as methods and filter out the others.
3246
e03436e7
TS
32472019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3248
3249 PR c/89433
3250 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3251 "omp declare target".
3252
a9c697b8
MS
32532019-05-16 Martin Sebor <msebor@redhat.com>
3254
ab20d992
JJ
3255 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3256 keywords, operators, and types in diagnostics.
3257 (handle_scalar_storage_order_attribute): Same.
3258 (handle_mode_attribute): Same.
3259 (handle_visibility_attribute): Same.
3260 (handle_assume_aligned_attribute): Same.
3261 (handle_no_split_stack_attribute): Same.
3262 * c-common.c (shorten_compare): Same.
3263 (c_common_truthvalue_conversion): Same.
3264 (cb_get_source_date_epoch): Same.
3265 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3266 in diagnostics.
3267 (interpret_float): Same.
3268 * c-omp.c (c_finish_omp_for): Same.
3269 * c-opts.c (c_common_post_options): Same.
3270 * c-pch.c (c_common_pch_pragma): Same.
3271 * c-pragma.c (pop_alignment): Same.
3272 (handle_pragma_pack): Same.
3273 (apply_pragma_weak): Same.
3274 (handle_pragma_weak): Same.
3275 (handle_pragma_scalar_storage_order): Same.
3276 (handle_pragma_redefine_extname): Same.
3277 (add_to_renaming_pragma_list): Same.
3278 (maybe_apply_renaming_pragma): Same.
3279 (push_visibility): Same.
3280 (handle_pragma_visibility): Same.
3281 (handle_pragma_optimize): Same.
3282 (handle_pragma_message): Same.
3283 * c-warn.c (warn_for_omitted_condop): Same.
3284 (lvalue_error): Same.
a9c697b8 3285
6b943512
RB
32862019-05-15 Richard Biener <rguenther@suse.de>
3287
3288 PR c/90474
3289 * c-common.c (c_common_mark_addressable_vec): Also mark
3290 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3291 c_mark_addressable.
ab20d992 3292
b744fc85
NS
32932019-05-06 Nathan Sidwell <nathan@acm.org>
3294
3295 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3296
598f50d7
NS
32972019-04-30 Nathan Sidwell <nathan@acm.org>
3298
3299 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3300
5bcc5a3b
ML
33012019-04-30 Martin Liska <mliska@suse.cz>
3302
3303 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3304 for unknown options.
3305
e78a87f7
RS
33062019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3307
3308 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3309 the pointer target rather than the pointer itself.
3310
c280b7ee
JJ
33112019-04-19 Jakub Jelinek <jakub@redhat.com>
3312
3313 PR c/89888
3314 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3315 arguments.
3316 (c_do_switch_warnings): Remove outside_range_p argument.
3317 * c-common.c (check_case_bounds): Removed.
3318 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3319 Don't call check_case_bounds. Fold low_value as well as high_value.
3320 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3321 Check for case labels outside of range of original type here and
3322 adjust them.
3323
8e8225e6
JJ
33242019-04-12 Jakub Jelinek <jakub@redhat.com>
3325
63b8a166
JJ
3326 PR translation/90041
3327 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3328 in the Warn diagnostics.
3329
8e8225e6
JJ
3330 PR c/89946
3331 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3332 function comment. Warn if arguments of the attribute are not positive
3333 integer constants.
3334
53a3f614
EB
33352019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3336
3337 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3338 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3339
22be5873
EB
33402019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3341
3342 * c-ada-spec.c (is_float128): New predicate extracted from...
3343 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3344 <REAL_TYPE>: ...here. Call it.
3345
34facf20
DM
33462019-04-05 David Malcolm <dmalcolm@redhat.com>
3347
3348 PR c/89985
3349 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3350 auto_diagnostic_group. Guard inform calls by result of
3351 warning_at call.
3352
05564120
MP
33532019-04-05 Marek Polacek <polacek@redhat.com>
3354
ab20d992 3355 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3356 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3357 of RHS.
3358
7a506c3c
JM
33592019-04-03 Jason Merrill <jason@redhat.com>
3360
3361 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3362 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3363
ddeae8c8
MS
33642019-04-01 Martin Sebor <msebor@redhat.com>
3365
3366 PR c/89685
3367 * c-attribs.c (handle_copy_attribute): Handle references and
3368 non-constant expressions.
3369
a15ffa22
JJ
33702019-03-22 Jakub Jelinek <jakub@redhat.com>
3371
3372 PR c++/87481
3373 * c.opt (-fconstexpr-ops-limit=): New option.
3374
36a3a7a3
JJ
33752019-03-21 Jakub Jelinek <jakub@redhat.com>
3376
3377 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3378 template param.
3379
bec1da64
MS
33802019-03-19 Martin Sebor <msebor@redhat.com>
3381
3382 PR tree-optimization/89688
3383 * c-common.c (braced_list_to_string): Make static.
3384 (braced_lists_to_strings): Define new function.
3385 * c-common.h (braced_list_to_string): Remove.
3386 (braced_lists_to_strings): Declare.
3387
1fe61adf
ML
33882019-03-12 Martin Liska <mliska@suse.cz>
3389
3390 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3391
93964ebd
ML
33922019-03-11 Martin Liska <mliska@suse.cz>
3393
3394 * c-opts.c (c_common_post_options): Wrap apostrophes
3395 in gcc internal format with %'.
3396
a3f9f006
ML
33972019-03-11 Martin Liska <mliska@suse.cz>
3398
3399 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3400 in a string format message and fix GNU coding style.
3401 * c-common.c (vector_types_convertible_p): Likewise.
3402 (c_build_vec_perm_expr): Likewise.
3403 * c-indentation.c (get_visual_column): Likewise.
3404 * c-opts.c (c_common_handle_option): Likewise.
3405 (c_common_post_options): Likewise.
3406 (sanitize_cpp_opts): Likewise.
3407 * c-pch.c (c_common_pch_pragma): Likewise.
3408 * c-pragma.c (handle_pragma_pack): Likewise.
3409
1db01ff9
JJ
34102019-03-08 Jakub Jelinek <jakub@redhat.com>
3411
3412 PR tree-optimization/89550
3413 * c-common.c (c_common_truthvalue_conversion): Only set
3414 TREE_NO_WARNING if warning_at returned true.
3415 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3416
ba790e6f
JJ
34172019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3418 Martin Sebor <msebor@gmail.com>
3419
3420 * c.opt (Wmissing-attributes): Clean up doc string.
3421
7da73ba7
JJ
34222019-02-25 Jakub Jelinek <jakub@redhat.com>
3423
3424 PR c/89495
3425 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3426 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3427 checking.
3428
921bb9d1
RB
34292019-02-22 Richard Biener <rguenther@suse.de>
3430
3431 * c-pch.c (no_checksum): Remove.
3432 (pch_init): Remove assertion that executable_checksum is not
3433 all zero.
3434 (c_common_valid_pch): Likewise.
3435
e2ebb05c
MS
34362019-02-18 Martin Sebor <msebor@redhat.com>
3437
3438 PR middle-end/89294
3439 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3440
3fe53000
DM
34412019-02-16 David Malcolm <dmalcolm@redhat.com>
3442
3443 PR c++/88680
3444 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3445 implementing -Wtype-limits.
3446
28a8cef1
MS
34472019-02-11 Martin Sebor <msebor@redhat.com>
3448
3449 PR c++/87996
3450 * c-common.c (invalid_array_size_error): New function.
3451 (valid_array_size_p): Call it. Handle size as well as type.
3452 * c-common.h (valid_constant_size_p): New function.
3453 (enum cst_size_error): New type.
3454
ec2be203
DM
34552019-01-31 David Malcolm <dmalcolm@redhat.com>
3456
3457 PR c/89122
3458 * known-headers.cc (get_stdlib_header_for_name): Add
3459 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3460
8936f047
JJ
34612019-01-31 Jakub Jelinek <jakub@redhat.com>
3462
3463 PR libstdc++/88170
3464 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3465 a C cast in pp_c_flag_gnu_v3 mode.
3466
6a335b96
JJ
34672019-01-29 Jakub Jelinek <jakub@redhat.com>
3468
3469 PR c/86125
3470 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3471 builtin_structptr_types types even for C.
3472
2a06eba5
BE
34732019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3474
3475 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3476 when rhs is of array type correctly. Fix handling of nested structures.
3477 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3478 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3479 type casts within nested compound expressions.
3480
18a23298
JJ
34812019-01-22 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR middle-end/88968
3484 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3485 variable after using BIT_FIELD_REF.
3486
420183d9
L
34872019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3488
3489 PR c/51628
3490 PR c/88664
3491 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3492 Remove the boolean argument.
3493 * c-warn.c (check_address_of_packed_member): Renamed to ...
3494 (check_address_or_pointer_of_packed_member): This. Also
3495 warn pointer conversion.
3496 (check_and_warn_address_of_packed_member): Renamed to ...
3497 (check_and_warn_address_or_pointer_of_packed_member): This.
3498 Also warn pointer conversion.
3499 (warn_for_address_or_pointer_of_packed_member): Remove the
3500 boolean argument. Don't check pointer conversion here.
3501
99063eee
RS
35022019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3503
3504 PR inline-asm/52813
3505 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3506
a30d0196
JJ
35072019-01-14 Jakub Jelinek <jakub@redhat.com>
3508
3509 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3510 and __cpp_nontype_template_parameter_auto. Add a comment that
3511 __cpp_template_auto is deprecated.
3512
2d91f79d
TH
35132019-01-14 Tom Honermann <tom@honermann.net>
3514
3515 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3516 * c-common.c (c_common_reswords): Add char8_t.
3517 (fix_string_type): Use char8_t for the type of u8 string literals.
3518 (c_common_get_alias_set): char8_t doesn't alias.
3519 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3520 C++.
3521 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3522 (keyword_begins_type_specifier): Add RID_CHAR8.
3523 * c-common.h (rid): Add RID_CHAR8.
3524 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3525 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3526 Define char8_type_node and char8_array_type_node.
3527 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3528 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3529 (c_cpp_builtins): Predefine __cpp_char8_t.
3530 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3531 CPP_UTF8STRING.
3532 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3533 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3534 targeting C++2a.
3535 * c.opt: Add the -fchar8_t command line option.
3536
23db6ced
MS
35372019-01-14 Martin Sebor <msebor@redhat.com>
3538
3539 PR target/88638
3540 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3541 and issue errors if it fails.
3542 * c-common.h (valid_format_string_type_p): Declare.
3543 * c-format.c (valid_stringptr_type_p): Rename...
3544 (valid_format_string_type_p): ...to this and make extern.
3545 (handle_format_arg_attribute): Adjust to new name.
3546 (check_format_string): Same.
3547
234c3818
L
35482019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3549
3550 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3551 Replace "may may" with "may" in warning message.
3552
d8fcab68
JJ
35532019-01-07 Jakub Jelinek <jakub@redhat.com>
3554
3555 PR c++/85052
3556 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3557 (c_build_vec_convert): Declare.
3558 * c-common.c (c_build_vec_convert): New function.
3559
29d24852
MS
35602019-01-04 Martin Sebor <msebor@redhat.com>
3561
3562 PR c/88546
3563 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3564 Handle C++ empty throw specification and C11 _Noreturn.
3565 (has_attribute): Also handle C11 _Noreturn.
3566
9069a4c9
MS
35672019-01-04 Martin Sebor <msebor@redhat.com>
3568
3569 PR c/88363
3570 * c-attribs.c (positional_argument): Also accept enumerated types.
3571
a5544970
JJ
35722019-01-01 Jakub Jelinek <jakub@redhat.com>
3573
3574 Update copyright years.
3575
da77eace
L
35762018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3577
3578 PR c/51628
3579 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3580 * c-warn.c (check_alignment_of_packed_member): New function.
3581 (check_address_of_packed_member): Likewise.
3582 (check_and_warn_address_of_packed_member): Likewise.
3583 (warn_for_address_or_pointer_of_packed_member): Likewise.
3584 * c.opt: Add -Wno-address-of-packed-member.
3585
573767d4
DM
35862018-12-20 David Malcolm <dmalcolm@redhat.com>
3587
3588 PR c++/87504
3589 * c-warn.c (get_outermost_macro_expansion): New function.
3590 (spelled_the_same_p): Use it to unwind the macro expansions, and
3591 compare the outermost macro in each nested expansion, rather than
3592 the innermost.
3593
a14feb3c
DM
35942018-12-19 David Malcolm <dmalcolm@redhat.com>
3595
3596 PR c++/87504
3597 * c-common.h (warn_tautological_cmp): Convert 1st param from
3598 location_t to const op_location_t &.
3599 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3600 when testing for INTEGER_CST.
3601 (warn_tautological_bitwise_comparison): Convert 1st param from
3602 location_t to const op_location_t &; use it to build a
3603 binary_op_rich_location, and use this.
3604 (spelled_the_same_p): New function.
3605 (warn_tautological_cmp): Convert 1st param from location_t to
3606 const op_location_t &. Warn for macro expansions if
3607 spelled_the_same_p. Use binary_op_rich_location.
3608
dfd7fdca
DM
36092018-12-19 David Malcolm <dmalcolm@redhat.com>
3610
3611 PR c++/43064
3612 PR c++/43486
3613 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3614 (verify_tree): Handle location wrappers.
3615 (c_common_truthvalue_conversion): Strip any location wrapper.
3616 Handle CONST_DECL.
3617 (fold_offsetof): Strip any location wrapper.
3618 (complete_array_type): Likewise for initial_value.
3619 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3620 index before checking for INTEGER_CST.
3621 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3622 print parentheses around location wrappers.
3623 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3624 before checking for INTEGER_CST.
3625 (warn_tautological_bitwise_comparison): Call
3626 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3627 before checking for INTEGER_CST.
3628 (readonly_error): Strip any location wrapper.
3629 (warn_array_subscript_with_type_char): Strip location wrappers
3630 before checking for INTEGER_CST. Use the location of the index if
3631 available.
3632
5c8b3702
JM
36332018-12-06 Jason Merrill <jason@redhat.com>
3634
3635 PR c++/88136 - -Wdeprecated-copy false positives
3636 * c.opt (Wdeprecated-copy-dtor): New.
3637 (Wdeprecated-copy): Move to -Wextra.
3638
673670da
MS
36392018-11-29 Martin Sebor <msebor@redhat.com>
3640
3641 PR c/88172
3642 PR testsuite/88208
3643 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3644 alignments to values less than the target requires.
3645 (has_attribute): For attribute aligned consider both the attribute
3646 and the alignment bits.
3647 * c-common.c (c_init_attributes): Optionally issue a warning for
3648 zero alignment.
3649
04864ec8
MS
36502018-11-28 Martin Sebor <msebor@redhat.com>
3651
3652 PR c/88065
3653 PR c/87297
3654 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3655 or destination is an error.
3656
ace83db0
JJ
36572018-11-28 Jakub Jelinek <jakub@redhat.com>
3658
3659 PR c++/88215
3660 * c-ubsan.c: Include langhooks.h.
3661 (ubsan_instrument_division): Change gcc_assert that main variants
3662 of op0 and op1 types are equal to gcc_checking_assert that the
3663 main variants are compatible types.
3664
da193a27
EB
36652018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3666
3667 * c-ada-spec.c: Include stringpool.h.
3668 (has_static_fields): Return false for incomplete types.
3669 (is_tagged_type): Likewise.
3670 (has_nontrivial_methods): Likewise.
3671 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3672 (struct overloaded_name_hash): New structure.
3673 (struct overloaded_name_hasher): Likewise.
3674 (overloaded_names): New global variable.
3675 (init_overloaded_names): New static function.
3676 (overloaded_name_p): New predicate.
3677 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3678 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3679 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3680 Remove always-true condition and dump forward types.
3681 (dump_ada_specs): Delete overloaded_names.
3682
98f08eb8
MS
36832018-11-20 Martin Sebor <msebor@redhat.com>
3684
3685 * c-attribs.c (type_for_vector_size): New function.
3686 (type_valid_for_vector_size): Same.
3687 (handle_vector_size_attribute): Move code to the functions above
3688 and call them.
3689 (validate_attribute, has_attribute): New functions.
3690 * c-common.h (has_attribute): Declare.
3691 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3692 * c-common.c (c_common_resword): Same.
3693
2674fa47
JM
36942018-11-16 Jason Merrill <jason@redhat.com>
3695
3696 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3697 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3698
258b3854
JJ
36992018-11-16 Jakub Jelinek <jakub@redhat.com>
3700
3701 PR middle-end/87854
3702 * c-common.c (fix_string_type): Reject string literals larger than
3703 TYPE_MAX_VALUE (ssizetype) bytes.
3704
1d249509
MS
37052018-11-15 Martin Sebor <msebor@redhat.com>
3706
3707 PR c++/87541
3708 PR c++/87542
3709 * c-attribs.c (positional_argument): New function.
3710 (handle_alloc_size_attribute): Use it and simplify.
3711 (handle_alloc_align_attribute): Same.
3712 (handle_assume_aligned_attribute): Same.
3713 (handle_nonnull_attribute): Same.
3714 * c-common.c (check_function_arguments): Pass fntype to
3715 check_function_format.
3716 * c-common.h (check_function_format): Add an argument.
3717 (PosArgFlags, positional_argument): Declare new type and function.
3718 * c-format.c (decode_format_attr): Add arguments.
3719 (check_format_string, get_constant): Same.
3720 (convert_format_name_to_system_name): Adjust.
3721
478dd60d
DM
37222018-11-15 David Malcolm <dmalcolm@redhat.com>
3723
3724 PR other/19165
3725 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3726
8cca0163
JJ
37272018-11-14 Jakub Jelinek <jakub@redhat.com>
3728
8ee09943
JJ
3729 P1236R1 - Signed integers are two's complement
3730 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3731 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3732 with in-range second operand well defined for -std=c++2a.
3733
8cca0163
JJ
3734 PR other/88007
3735 * c-common.c (parse_optimize_options): Allocate option string from
3736 opts_obstack rather than as GC memory. Move the allocation after
3737 warning for invalid option.
3738
620e594b
DM
37392018-11-13 David Malcolm <dmalcolm@redhat.com>
3740
3741 * c-common.c (c_get_substring_location): Update for renaming of
3742 get_source_location_for_substring to get_location_within_string.
3743 * c-lex.c: Replace "source_location" with "location_t".
3744 * c-opts.c: Likewise.
3745 * c-ppoutput.c: Likewise.
3746
f9731de3
MS
37472018-11-13 Martin Sebor <msebor@redhat.com>
3748
3749 PR middle-end/81824
3750 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3751 (handle_tls_model_attribute): Improve diagnostics.
3752
e4bd6d5e
JM
37532018-11-12 Jason Merrill <jason@redhat.com>
3754
a6bb6b07
JM
3755 * c-cppbuiltin.c (c_cpp_builtins): Define
3756 __cpp_impl_destroying_delete.
3757
e4bd6d5e
JM
3758 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3759 __cpp_conditional_explicit.
3760
79a2c428
MS
37612018-11-09 Martin Sebor <msebor@redhat.com>
3762
3763 PR middle-end/81824
3764 * c-attribs.c (handle_copy_attribute): New function.
3765
4c7bd361
MS
37662018-11-09 Martin Sebor <msebor@redhat.com>
3767
3768 PR c/87795
3769 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3770
28567c40
JJ
37712018-11-08 Jakub Jelinek <jakub@redhat.com>
3772
3773 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3774 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3775 enum omp_memory_order MEMORY_ORDER.
3776 (c_finish_omp_flush): Add MO argument.
3777 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3778 (c_finish_omp_for): Add FINAL_P argument.
3779 * c-omp.c: Include memmodel.h.
3780 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3781 OMP_TASKGROUP_CLAUSES to it.
3782 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3783 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3784 instead of OMP_ATOMIC_SEQ_CST.
3785 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3786 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3787 __atomic_thread_fence call with the given value.
3788 (check_omp_for_incr_expr): Formatting fixes.
3789 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3790 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3791 is not constant expression 1 or -1. Transform NE_EXPR loops
3792 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3793 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3794 loops too.
3795 (c_omp_split_clauses): Add support for combined
3796 #pragma omp parallel master and
3797 #pragma omp {,parallel }master taskloop{, simd} constructs.
3798 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3799 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3800 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3801 (c_omp_predetermined_sharing): Don't return
3802 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3803 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3804 PRAGMA_OMP_REQUIRES.
3805 * c-pragma.h (enum pragma_kind): Likewise.
3806 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3807 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3808
204839e7
DM
38092018-11-08 David Malcolm <dmalcolm@redhat.com>
3810
3811 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3812
d8010ee4
DM
38132018-11-08 David Malcolm <dmalcolm@redhat.com>
3814
3815 * c-format.c (local_cgraph_node_ptr_node): New variable.
3816 (gcc_dump_printf_char_table): Add entry for %C.
3817 (get_pointer_to_named_type): New function, taken from the handling
3818 code for "gimple *" from...
3819 (init_dynamic_diag_info): ...here. Add handling for
3820 "cgraph_node *".
3821 * c-format.h (T_CGRAPH_NODE): New.
3822
4be5c72c
JM
38232018-10-19 Jason Merrill <jason@redhat.com>
3824
3825 * c-cppbuiltin.c (c_cpp_builtins): Add
3826 __cpp_nontype_template_parameter_class.
3827
f3f6029d
NS
38282018-10-31 Nathan Sidwell <nathan@acm.org>
3829
ab5324fb
NS
3830 * c-opts.c (c_finish_options): Force command line macro
3831 location. Refactor to avoid repeating main debug hook.
3832 (push_command_line_include): Clarify comment.
3833
f3f6029d
NS
3834 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3835
91e3ec29
MS
38362018-10-30 Martin Sebor <msebor@redhat.com>
3837
3838 PR middle-end/87041
3839 * c-format.c (check_format_types): Avoid diagnosing null pointer
3840 arguments to printf-family of functions.
3841
b5ff4f5c
MP
38422018-10-30 Marek Polacek <polacek@redhat.com>
3843
3844 Implement P0892R2, explicit(bool).
3845 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3846
7e2de6df
DM
38472018-10-29 David Malcolm <dmalcolm@redhat.com>
3848
3849 * name-hint.h (name_hint::take_deferred): New member function.
3850
b2bf438c
DM
38512018-10-29 David Malcolm <dmalcolm@redhat.com>
3852
3853 PR c++/56856
3854 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3855 argument.
3856 (check_function_restrict): Rename param "argarray" to
3857 "unfolded_argarray", and make a copy named "argarray", calling
3858 fold_for_warn on each argument.
3859 (check_function_arguments): Add note about responsibility for
3860 folding the arguments.
3861
9f936c86
JM
38622018-10-17 Joseph Myers <joseph@codesourcery.com>
3863
3864 * c-common.c (flag_isoc2x): New variable.
3865 * c-common.h (clk_c): Update comment to reference C2X.
3866 (flag_isoc99, flag_isoc11): Update comments to reference future
3867 standard versions in general.
3868 (flag_isoc2x): Declare.
3869 * c-opts.c (set_std_c2x): New function.
3870 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3871 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3872 flag_isoc2x to 0.
3873 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3874
7a8a92c4
JM
38752018-10-17 Joseph Myers <joseph@codesourcery.com>
3876
3877 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3878 (std=iso9899:2018): Document C17 as published in 2018.
3879
4dc003ff
CL
38802018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3881
3882 PR c++/87364
3883 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3884
79371671
WW
38852018-10-11 Will Wray <wjwray@gmail.com>
3886
3887 PR c++/87364
3888 * c-pretty-print.h (pp_c_type_cast): Prototype.
3889 (pp_c_integer_constant): Likewise.
3890 * c-pretty-print.c (pp_c_type_cast): No longer static.
3891 (pp_c_integer_constant): Likewise.
3892 (pp_c_enumeration_constant): Fix loop termination when finding
3893 name of constant. No longer returns a value. Call
3894 pp_c_integer_constant.
3895 (c_pretty_printer::constant): Update for changes to
3896 pp_c_enumeration_constant.
3897
46c62690
JJ
38982018-10-11 Jakub Jelinek <jakub@redhat.com>
3899
3900 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3901 for no_unique_address.
3902
c24300ba
DM
39032018-10-09 David Malcolm <dmalcolm@redhat.com>
3904
3905 * c-common.c (c_option_controlling_cpp_error): Rename to...
3906 (c_option_controlling_cpp_diagnostic): ...this, and convert
3907 "reason" from int to enum.
3908 (c_cpp_error): Rename to...
3909 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3910 * c-common.h (c_cpp_error): Rename to...
3911 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3912 * c-opts.c (c_common_init_options): Update for renaming.
3913
8656dafa
RS
39142018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3915
3916 PR c/87286
3917 * c-common.c (vector_types_compatible_elements_p): Use
3918 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3919
8cff0652
VK
39202018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3921
3922 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3923 to generate constructor destructor priority warning.
3924 * c.opt (-Wprio-ctor-dtor): New option.
3925
bedf03a2
JM
39262018-10-01 Jason Merrill <jason@redhat.com>
3927
3928 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3929
6cc430c1
EB
39302018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3931
3932 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3933 (dump_ada_node): Add const keyword.
3934
87677ac7
ML
39352018-09-25 Martin Liska <mliska@suse.cz>
3936
3937 * c-common.c (c_common_truthvalue_conversion):
3938 Remove Pascal from documentation.
3939
518196cb
EB
39402018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3941
3942 * c-ada-spec.c: Include diagnostic.h.
3943 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3944
a599af84
MP
39452018-09-19 Marek Polacek <polacek@redhat.com>
3946
3947 * c.opt (Wclass-conversion): New.
3948
9c4a4b3c
DM
39492018-09-17 David Malcolm <dmalcolm@redhat.com>
3950
3951 * c-format.c (range_label_for_format_type_mismatch::get_text):
3952 Update for new param.
3953
c896ecfe
DM
39542018-09-17 David Malcolm <dmalcolm@redhat.com>
3955
3956 * c-format.c (format_warning_at_char): Update for introduction of
3957 format_string_diagnostic_t.
3958 (format_type_warning): Likewise.
3959
80c6d1f4
MJ
39602018-09-17 Martin Jambor <mjambor@suse.cz>
3961
3962 PR c/63886
3963 * c.opt (Wabsolute-value): New.
3964
6d900107
BE
39652018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3966
3967 * c-common.c (complete_flexible_array_elts): New helper function.
3968 * c-common.h (complete_flexible_array_elts): Declare.
3969
b5764229
BE
39702018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3971
3972 * c-common.c (braced_list_to_string): Remove eval parameter.
3973 Add some more checks. Always create zero-terminated STRING_CST.
3974 * c-common.h (braced_list_to_string): Adjust prototype.
3975
85204e23
DM
39762018-08-27 David Malcolm <dmalcolm@redhat.com>
3977
3978 PR 87091
3979 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3980 to a tri-state.
3981 (maybe_suggest_missing_token_insertion): Likewise.
3982 (maybe_add_include_fixit): Add param "override_location". If set,
3983 and source-printing is enabled, then override the rich_location's
3984 primary location with that of the insertion point for the fix-it
3985 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3986 * c-common.h (extern void maybe_add_include_fixit): Add bool
3987 param.
3988 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3989 for conversion of show_caret_p to a tri-state.
3990 * c-warn.c (warn_for_restrict): Likewise.
3991 * known-headers.cc
3992 (suggest_missing_header::~suggest_missing_header): Update call to
3993 maybe_add_include_fixit to suggest overriding the location, as it
3994 is for a note.
3995
3d78e008
ML
39962018-08-27 Martin Liska <mliska@suse.cz>
3997
3998 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3999 fndecl_built_in_p and remove check for FUNCTION_DECL if
4000 possible.
3d78e008
ML
4001 (check_builtin_function_arguments): Likewise.
4002 (reject_gcc_builtin): Likewise.
4003 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4004
b5be6d0c
MP
40052018-08-26 Marek Polacek <polacek@redhat.com>
4006
4007 PR c++/87029, Implement -Wredundant-move.
4008 * c.opt (Wredundant-move): New option.
4009
79ca9c35
MP
40102018-08-21 Marek Polacek <polacek@redhat.com>
4011
4012 PR c++/86981, Implement -Wpessimizing-move.
4013 * c.opt (Wpessimizing-move): New option.
4014
097f82ec
DM
40152018-08-20 David Malcolm <dmalcolm@redhat.com>
4016
4017 PR other/84889
4018 * c-attribs.c (common_handle_aligned_attribute): Add
4019 auto_diagnostic_group instance.
4020 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4021 * c-opts.c (c_common_post_options): Likewise.
4022 * c-warn.c (warn_logical_not_parentheses): Likewise.
4023 (warn_duplicated_cond_add_or_warn): Likewise.
4024 (warn_for_multistatement_macros): Likewise.
4025
3fb558b1
NS
40262018-08-20 Nathan Sidwell <nathan@acm.org>
4027
4028 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4029 access.
4030
800c0e98
NS
40312018-08-17 Nathan Sidwell <nathan@acm.org>
4032
4033 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4034 field.
4035 (laxy_hex_fp_value_count): Make unsigned.
4036 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4037 manipulate the macro.
4038 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4039 cpp_define_lazily.
4040
6f795a92
DM
40412018-08-17 David Malcolm <dmalcolm@redhat.com>
4042
4043 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4044 (gcc_dump_printf_length_specs): New.
4045 (gcc_dump_printf_flag_pairs): New.
4046 (gcc_dump_printf_flag_specs): New.
4047 (gcc_dump_printf_char_table): New.
4048 (format_types_orig): Add entry for "gcc_dump_printf".
4049 (init_dynamic_diag_info): Set up length_char_specs and
4050 conversion_specs for gcc_dump_printf_format_type.
4051 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4052
c5d725c0
NS
40532018-08-17 Nathan Sidwell <nathan@acm.org>
4054
10f04917
NS
4055 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4056
c5d725c0
NS
4057 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4058 * c-cppbuiltin.c: Likewise.
4059
c0c12356
ML
40602018-08-17 Martin Liska <mliska@suse.cz>
4061
4062 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4063 Ignore/Deprecated flag. Warning is done automatically for
4064 Deprecated flags.
c0c12356 4065
10fcc142
DM
40662018-08-16 David Malcolm <dmalcolm@redhat.com>
4067
4068 PR c++/70693
4069 * c-common.c (selftest::c_family_tests): Call
4070 selftest::c_indentation_c_tests.
4071 * c-common.h (selftest::c_indentation_c_tests): New decl.
4072 * c-indentation.c: Include "selftest.h".
4073 (next_tab_stop): Add "tab_width" param, rather than accessing
4074 cpp_opts.
4075 (get_visual_column): Likewise. Clarify comment. Bulletproof
4076 against reading past the end of the line.
4077 (get_first_nws_vis_column): Add "tab_width" param.
4078 (detect_intervening_unindent): Likewise.
4079 (should_warn_for_misleading_indentation): Read tab width from
4080 cpp_opts and pass around.
4081 (selftest::test_next_tab_stop): New test.
4082 (selftest::assert_get_visual_column_succeeds): New function.
4083 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4084 (selftest::assert_get_visual_column_fails): New function.
4085 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4086 (selftest::test_get_visual_column): New test.
4087 (selftest::c_indentation_c_tests): New function.
4088
3f6677f4
NS
40892018-08-16 Nathan Sidwell <nathan@acm.org>
4090
4091 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4092 (store_ada_macro): Likewise.
4093 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4094 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4095
96e6ae57
DM
40962018-08-15 David Malcolm <dmalcolm@redhat.com>
4097
4098 * c-format.c: Include "selftest-diagnostic.h" and
4099 "gcc-rich-location.h".
4100 (format_warning_at_char): Pass NULL for new label params of
4101 format_warning_va.
4102 (class indirection_suffix): New class.
4103 (class range_label_for_format_type_mismatch): New class.
4104 (format_type_warning): Move logic for generating "*" suffix to
4105 class indirection_suffix. Create "fmt_label" and "param_label"
4106 to show their types, and pass them to the
4107 format_warning_at_substring calls.
4108 (selftest::test_type_mismatch_range_labels): New test.
4109 (selftest::c_format_c_tests): Call it.
4110
23aa9f7c
MS
41112018-08-13 Martin Sebor <msebor@redhat.com>
4112
4113 PR tree-optimization/71625
4114 * c-common.c (braced_list_to_string): New function.
4115 * c-common.h (braced_list_to_string): Declare it.
4116
f10a9135
NS
41172018-08-08 Nathan Sidwell <nathan@acm.org>
4118
4119 * c-common.c (try_to_locate_new_include_inertion_point): Use
4120 linemap_included_from_linemap.
4121 * c-lex.c (fe_file_change): Use linemap_included_from.
4122 * c-ppoutput.c (pp_file_change): Likewise.
4123
8a45b051
MS
41242018-08-01 Martin Sebor <msebor@redhat.com>
4125
4126 PR tree-optimization/86650
ab20d992 4127 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4128 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4129 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4130 * c-format.h (T89_G): Update to be "gimple *" rather than
4131 "gcall *".
4132 (local_gcall_ptr_node): Rename...
4133 (local_gimple_ptr_node): ...to this.
4134
e540ccc0
DM
41352018-07-31 David Malcolm <dmalcolm@redhat.com>
4136
4137 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4138 table entries for gcc_diag_char_table, and the 'Z' entry from
4139 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4140 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4141 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4142 adding missing "Z" for this table. Remove erroneous "G" and "K"
4143 entries.
4144 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4145 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4146 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4147
425fc685
RE
41482018-07-31 Richard Earnshaw <rearnsha@arm.com>
4149
4150 * c-common.c (speculation_safe_resolve_call): New function.
4151 (speculation_safe_resolve_params): New function.
4152 (speculation_safe_resolve_return): New function.
4153 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4154 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4155 __HAVE_SPECULATION_SAFE_VALUE.
4156
181463c2
DM
41572018-07-20 David Malcolm <dmalcolm@redhat.com>
4158
4159 * c-common.c (c_cpp_error): Remove redundant "line_table"
4160 parameter from call to rich_location::set_range.
4161 (maybe_suggest_missing_token_insertion): Likewise.
4162
0d7f9065
MS
41632018-07-20 Martin Sebor <msebor@redhat.com>
4164
4165 PR middle-end/82063
ab20d992 4166 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4167
00abf86c
MS
41682018-07-20 Martin Sebor <msebor@redhat.com>
4169
4170 PR middle-end/82063
4171 * c-common.h (c_common_handle_option): Change function argument
4172 to HOST_WIDE_INT.
4173 * c-opts.c (c_common_init_options): Same.
4174 (c_common_handle_option): Same. Remove special handling of
4175 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4176 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4177 options to take a HOST_WIDE_INT argument and accept a byte-size
4178 suffix. Initialize.
4179 (-Wvla-larger-than): Same.
4180 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4181 (-Wno-vla-larger-than): Same.
4182
9b452033
JJ
41832018-07-12 Jakub Jelinek <jakub@redhat.com>
4184
4185 * c-attribs.c (c_common_attribute_table): Add
4186 "omp declare target implicit" attribute.
4187
cd0762f3
RB
41882018-07-12 Richard Biener <rguenther@suse.de>
4189
4190 PR c/86453
4191 * c-attribs.c (handle_packed_attribute): Do not build a variant
4192 type with TYPE_PACKED, instead ignore the attribute if we may
4193 not apply to the original type.
4194
0b27c3ed
JJ
41952018-07-10 Jakub Jelinek <jakub@redhat.com>
4196
4197 PR c++/86443
4198 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4199 to contain TREE_LIST for both the original class iterator and the
4200 "last" helper var.
4201
e730a0ef
EB
42022018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4203
4204 * c-ada-spec.c (to_ada_name): Remove index parameter.
4205 (pp_ada_tree_identifier): Likewise.
4206 (dump_ada_macros): Adjust call to to_ada_name.
4207 (struct overloaded_name_hash): Delete.
4208 (struct overloaded_name_hasher): Likewise.
4209 (overloaded_names): Likewise.
4210 (compute_overloading_index): Likewise.
4211 (dump_ada_decl_name): Do not call compute_overloading_index and
4212 adjust calls to pp_ada_tree_identifier.
4213 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4214 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4215 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4216 (dump_ada_enum_type): Remove type and display_convention parameters.
4217 Adjust calls to pp_ada_tree_identifier.
4218 (dump_ada_node): Likewise and for dump_ada_structure.
4219 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4220 and tidy up.
4221 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4222 syntax.
4223 (print_constructor): Adjust call to pp_ada_tree_identifier.
4224 (print_destructor): Likewise.
4225 (dump_ada_declaration): Switch to aspect syntax.
4226 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4227 parameter with nested parameter.
4228 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4229 (dump_ada_specs): Do not delete overloaded_names table.
4230
8de583fc
PB
42312018-07-06 Peter Bergner <bergner@linux.ibm.com>
4232
4233 PR target/86324
e730a0ef 4234 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4235 target hook.
4236
09cff37b
NS
42372018-07-05 Nathan Sidwell <nathan@acm.org>
4238
4239 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4240 NO_IMPLICIT_EXTERN_C.
4241
98086b2b
ML
42422018-06-28 Martin Liska <mliska@suse.cz>
4243
4244 * cppspec.c: Include opt-suggestions.h.
4245
ab20d992
JJ
42462018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4247 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4248 Cesar Philippidis <cesar@codesourcery.com>
4249
4250 * c-pragma.h (enum pragma_omp_clause): Add
4251 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4252 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4253
f41b7612
JJ
42542018-06-20 Jakub Jelinek <jakub@redhat.com>
4255
4256 PR c++/86210
4257 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4258 comment.
4259
4252ccd7
MS
42602018-06-18 Martin Sebor <msebor@redhat.com>
4261
4262 PR middle-end/85602
4263 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4264 nonstring.
4265
e197e64e
KV
42662018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4267
4268 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4269
34a7a230
JM
42702018-06-13 Jason Merrill <jason@redhat.com>
4271
5cef3733
JM
4272 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4273 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4274 handling.
4275
34a7a230
JM
4276 PR c++/86094 - wrong code with defaulted move ctor.
4277 * c-opts.c (c_common_post_options): Bump the current ABI version to
4278 13. Set warn_abi_version and flag_abi_compat_version to the current
4279 version rather than 0. Fix defaulting flag_abi_compat_version from
4280 warn_abi_version.
4281
bb0f14ae
MS
42822018-06-12 Martin Sebor <msebor@redhat.com>
4283
4284 PR c/85931
4285 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4286 sizeof source and destination yields the same value.
4287
3713f2e2
ML
42882018-06-12 Martin Liska <mliska@suse.cz>
4289
4290 * c.opt: Make MPX-related options as Deprecated.
4291
4af78ef8
DM
42922018-06-08 David Malcolm <dmalcolm@redhat.com>
4293
4294 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4295 rather than 0.
4296
31db0fe0
ML
42972018-06-08 Martin Liska <mliska@suse.cz>
4298
4299 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4300 for MPX (macros, related functions, fields in cgraph_node, ...).
4301 (handle_bnd_legacy): Likewise.
4302 (handle_bnd_instrument): Likewise.
4303 * c.opt: Likewise.
4304
fe16acf2
JJ
43052018-06-06 Jakub Jelinek <jakub@redhat.com>
4306
4307 PR c++/86068
4308 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4309 __cpp_transactional_memory to 201500 instead of 210500.
4310
4dbdb49b
JM
43112018-06-06 Jason Merrill <jason@redhat.com>
4312
4313 PR c++/85710 - ICE with -Wmemset-elt-size.
4314 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4315
f8ad043f
JM
43162018-06-01 Jason Merrill <jason@redhat.com>
4317
4318 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4319 201703.
4320
abc24d93
EB
43212018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4322
4323 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4324 declaration for a typedef independently of whether the declaration of
4325 the subtype is generated.
4326
d258f4aa
MS
43272018-05-31 Martin Sebor <msebor@redhat.com>
4328
4329 PR c/82063
4330 * c.opt (-Wno-alloc-size-larger-than): New option.
4331
b67b9225
DP
43322018-04-22 David Pagan <dave.pagan@oracle.com>
4333
4334 PR c/55976
4335 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4336 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4337 differentiate between default (no option), -Wreturn-type, and
4338 -Wno-return-type.
4339
04eb9c55
JM
43402018-05-29 Jason Merrill <jason@redhat.com>
4341
4342 * c.opt (Winit-list-lifetime): New flag.
4343
b0c31bc6
BE
43442018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4345
4346 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4347 splay_tree_delete_pointers.
4348
44284983
JJ
43492018-05-26 Jakub Jelinek <jakub@redhat.com>
4350
4351 PR bootstrap/85921
4352 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4353 noinline variable to workaround broken kernel headers.
4354
b46b715d
JM
43552018-05-18 Jason Merrill <jason@redhat.com>
4356
4357 * c.opt (Wdeprecated-copy): New flag.
4358
40659769
ML
43592018-05-17 Martin Liska <mliska@suse.cz>
4360
4361 * c-warn.c (overflow_warning): Do not use
4362 space in between 'G_' and '('.
4363
403962ea
JM
43642018-05-09 Jason Merrill <jason@redhat.com>
4365
4366 * c-common.c (valid_array_size_p): Add complain parameter.
4367 * c-common.h: ...which defaults to true.
4368
1c9ee609
JJ
43692018-05-11 Jakub Jelinek <jakub@redhat.com>
4370
4371 PR c/85696
4372 * c-omp.c (c_omp_predetermined_sharing): Return
4373 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4374
19916065
ML
43752018-05-11 Martin Liska <mliska@suse.cz>
4376
92a285c1 4377 PR sanitizer/85556
19916065
ML
4378 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4379 TREE_LIST values.
4380
79e7b1fe
JJ
43812018-05-10 Jakub Jelinek <jakub@redhat.com>
4382
4383 PR c++/85662
4384 * c-common.h (fold_offsetof_1): Removed.
4385 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4386 CTX argument defaulted to ERROR_MARK.
4387 * c-common.c (fold_offsetof_1): Renamed to ...
4388 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4389 argument, convert the pointer constant to TYPE and use size_binop
4390 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4391 a pointer type. Adjust recursive calls.
4392
86c12f76
EB
43932018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4394
4395 PR c++/85400
4396 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4397
ee336e84
NS
43982018-05-07 Nathan Sidwell <nathan@acm.org>
4399
4400 * c.opt (ffor-scope): Remove functionality, issue warning.
4401
6c072e21
NS
44022018-05-03 Nathan Sidwell <nathan@acm.org>
4403
4404 * c.opt (ffriend-injection): Remove functionality, issue warning.
4405
2cc7d3a7
DM
44062018-05-01 David Malcolm <dmalcolm@redhat.com>
4407
4408 PR c/84258
4409 * c-format.c (struct format_check_results): Add field
4410 "number_non_char".
4411 (check_format_info): Initialize it, and warn if encountered.
4412 (check_format_arg): Distinguish between wide char and
4413 everything else when detecting arrays of non-char.
4414
7761dfbe
DM
44152018-04-30 David Malcolm <dmalcolm@redhat.com>
4416
4417 * c-format.c (get_corrected_substring): Update for
4418 location_get_source_line returning a char_span. Use a char_span
4419 when handling the prefix of the correction.
4420 * c-indentation.c (get_visual_column): Update for
4421 location_get_source_line returning a char_span.
4422 (get_first_nws_vis_column): Likewise.
4423
62e98ef1
DM
44242018-03-29 David Malcolm <dmalcolm@redhat.com>
4425
4426 PR c++/84269
4427 * known-headers.cc (get_stdlib_header_for_name): Add various names
4428 from <assert.h>, <string.h>, and <memory.h>; add more names from
4429 <stdio.h>.
4430
a7dea617
JJ
44312018-03-27 Jakub Jelinek <jakub@redhat.com>
4432
4433 PR c++/85061
4434 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4435 get_base_address of the second operand is a VAR_P, rather than the
4436 operand itself, and use gcc_checking_assert instead of gcc_assert.
4437
889a3a30
MP
44382018-03-23 Marek Polacek <polacek@redhat.com>
4439
4440 PR c++/85045
4441 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4442 <case RDIV_EXPR>: Tweak condition.
4443
452154b9
EB
44442018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4445
4446 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4447
63ecb626
JJ
44482018-03-16 Jakub Jelinek <jakub@redhat.com>
4449
ce811fc4
JJ
4450 PR c/84909
4451 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4452 diagnostics.
4453
63ecb626
JJ
4454 PR c/84910
4455 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4456 diagnostics.
4457
a1295eec
RB
44582018-03-16 Richard Biener <rguenther@suse.de>
4459
4460 PR c/84873
4461 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4462 unshare the possibly folded expression.
4463
919674fb
RB
44642018-03-15 Richard Biener <rguenther@suse.de>
4465
4466 PR c/84873
4467 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4468
f99309b2
MS
44692018-03-13 Martin Sebor <msebor@redhat.com>
4470
4471 PR tree-optimization/84725
4472 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4473 with all three narrow character types, including their qualified forms.
4474
e9b9fa4c
MS
44752018-03-12 Martin Sebor <msebor@redhat.com>
4476
4477 PR tree-optimization/83456
ab20d992 4478 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4479 Restore checking of bounded built-in functions.
4480 (check_function_arguments): Also return the result
4481 of warn_for_restrict.
ab20d992
JJ
4482 * c-common.c (check_function_restrict): Return bool.
4483 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4484
0805d020
MP
44852018-03-02 Marek Polacek <polacek@redhat.com>
4486
4487 PR c++/84171
4488 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4489 is erroneous.
4490
ed2a2f08
TS
44912018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4492
4493 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4494 function".
4495
90abdde0
MP
44962018-03-01 Marek Polacek <polacek@redhat.com>
4497
4498 PR c++/84639
4499 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4500 alignment in computation.
4501
c6db43fa
EB
45022018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4503
4504 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4505 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4506
9e25c7ed
EB
45072018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4508
4509 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4510 (is_char_array): Take a type instead of a declaration.
4511 (dump_ada_array_type): Likewise.
4512 (is_simple_enum): Minor tweak.
4513 (dump_ada_enum_type): New function extracted from...
4514 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4515 <INTEGER_TYPE>: Remove unreachable code.
4516 <RECORD_TYPE>: Likewise. Minor tweaks.
4517 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4518 <ENUMERAL_TYPE>: New case.
4519 <RECORD_TYPE>: Factor out common code.
4520 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4521 Minor tweaks. Deal with enumeral types.
4522 (dump_ada_structure): Minor tweaks.
4523
09de3550
EB
45242018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4525
4526 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4527 address for incomplete structures.
4528 (dump_forward_type): Do not bail out for incomplete structures.
4529 (dump_ada_declaration): Do not special-case incomplete structures
4530 for subtypes. Dump them as null records for types.
4531
095d8d4b
EB
45322018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4533
4534 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4535 (is_char_array): Fix formatting.
4536 (dump_template_types): Likewise.
4537 (dump_generic_ada_node): Rename into...
4538 (dump_ada_node): ...this.
4539 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4540 incomplete structures and not for empty structures. Do not use it
4541 when forward declarations are needed.
4542 (dump_forward_type): New function.
4543 (dump_nested_types): Remove FORWARD parameter. Do not consider
4544 TREE_VISITED and do not generate a forward declaration. Only dump
4545 original nested types for nested declaration.
4546 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4547 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4548 <RECORD_TYPE>: Do not consider TREE_VISITED.
4549 (dump_ada_declaration): Use booleans and fix formatting throughout.
4550 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4551 Call dump_forward_type instead of dump_nested_types for a typedef.
4552 Remove superfluous check and adjust call to dump_nested_types.
4553 <POINTER_TYPE>: Call dump_forward_type and fall through.
4554 (dump_ada_struct_decl): Rename into...
4555 (dump_ada_structure): ...this. Do not special-case empty structures.
4556
d4cfd486
MS
45572018-02-27 Martin Sebor <msebor@redhat.com>
4558
4559 PR c++/83871
4560 * c.opt (-Wmissing-attributes): New option.
4561
b22dbd03
ML
45622018-02-21 Martin Liska <mliska@suse.cz>
4563
4564 * c.opt (Wcatch-value=): Add IntegerRange.
4565
883dfe2a
JM
45662018-02-15 Jason Merrill <jason@redhat.com>
4567
4568 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4569
0444aa9c
NS
45702018-02-09 Nathan Sidwell <nathan@acm.org>
4571
4572 PR c/84293
4573 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4574 arg.
4575 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4576 arg. Adjust.
4577
cea71f0a
MS
45782018-02-09 Martin Sebor <msebor@redhat.com>
4579
4580 PR lto/84212
4581 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4582 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4583 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4584 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4585 (-Wuninitialized): Same.
4586
8c8b7be5
EB
45872018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4588
4589 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4590 keyword for components.
4591
7c30b12a
PC
45922018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4593
4594 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4595
eece7fe5
JK
45962018-02-02 Julia Koval <julia.koval@intel.com>
4597
4598 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4599
7d07a93a
MP
46002018-01-29 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/83966
4603 * c-format.c (check_function_format): Check current_function_decl.
4604
53723269
JJ
46052018-01-27 Jakub Jelinek <jakub@redhat.com>
4606
4607 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4608 argument.
4609 (LAZY_HEX_FP_VALUES_CNT): Define.
4610 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4611 values rather than just 12.
4612 (builtin_define_with_hex_fp_value): Likewise.
4613
7365279f
BK
46142018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4615
92a285c1
ML
4616 PR other/70268
4617 * c.opt (-fmacro-prefix-map): New option.
4618 * c-opts.c (c_common_handle_option): Handle it.
4619 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4620 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4621
bb9869d5
DM
46222018-01-17 David Malcolm <dmalcolm@redhat.com>
4623
4624 PR c++/83814
4625 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4626
68dc87c3
EB
46272018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4628
4629 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4630 Skip 'f' and 'F' characters if it is true.
4631 (store_ada_macro): Minor tweak.
4632 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4633 <CPP_WSTRING>: Likewise.
4634 <CPP_STRING>: Output '&' in the buffer if not the first string.
4635 <CPP_NUMBER>: Adjust calls to dump_number.
4636
9a004410
DM
46372018-01-10 David Malcolm <dmalcolm@redhat.com>
4638
4639 PR c++/43486
4640 * c-common.c: Include "selftest.h".
4641 (get_atomic_generic_size): Perform the test for integral type
4642 before the range test for any integer constant, fixing indentation
4643 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4644 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4645 (selftest::test_fold_for_warn): New function.
4646 (selftest::c_common_c_tests): New function.
4647 (selftest::c_family_tests): Call it, and
4648 selftest::c_pretty_print_c_tests.
4649 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4650 * c-format.c (check_format_arg): Convert VAR_P check to a
4651 fold_for_warn.
4652 * c-pretty-print.c: Include "selftest.h".
4653 (pp_c_cast_expression): Don't print casts for location wrappers.
4654 (selftest::assert_c_pretty_printer_output): New function.
4655 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4656 (selftest::test_location_wrappers): New function.
4657 (selftest::c_pretty_print_c_tests): New function.
4658 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4659
5c0caeb3
RS
46602018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4661 Alan Hayward <alan.hayward@arm.com>
4662 David Sherwood <david.sherwood@arm.com>
4663
4664 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4665
73a699ae
RS
46662018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4667 Alan Hayward <alan.hayward@arm.com>
4668 David Sherwood <david.sherwood@arm.com>
4669
4670 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4671 as polynomial.
4672
928686b1
RS
46732018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4674 Alan Hayward <alan.hayward@arm.com>
4675 David Sherwood <david.sherwood@arm.com>
4676
4677 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4678 (convert_vector_to_array_for_subscript): Handle polynomial
4679 TYPE_VECTOR_SUBPARTS.
4680 (c_common_type_for_mode): Check valid_vector_subparts_p.
4681 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4682 VECTOR_CST_NELTS.
4683
85ec4feb
JJ
46842018-01-03 Jakub Jelinek <jakub@redhat.com>
4685
4686 Update copyright years.
4687
170a8bd6 46882017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4689 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4690
4691 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4692 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4693
ab20d992 46942017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4695
4696 PR debug/83527
4697 PR debug/83419
4698 * c-semantics.c (only_debug_stmts_after_p): New.
4699 (pop_stmt_list): Clear side effects in debug-only stmt list.
4700 Check for single nondebug stmt followed by debug stmts only.
4701
c12d20d4
AO
47022017-12-21 Alexandre Oliva <aoliva@redhat.com>
4703
4704 PR debug/83419
4705 * c-semantics.c (pop_stmt_list): Propagate side effects from
4706 single nondebug stmt to container list.
4707
01512446
JJ
47082017-12-19 Jakub Jelinek <jakub@redhat.com>
4709
4710 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4711 conditions with typical order conditions.
4712
82cfbd01
MP
47132017-12-18 Marek Polacek <polacek@redhat.com>
4714
4715 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4716 not in effect.
4717
99da11ec
MS
47182017-12-17 Martin Sebor <msebor@redhat.com>
4719
4720 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4721 an error for attribute warn_if_not_aligned.
4722
cc8bea0a
MS
47232017-12-16 Martin Sebor <msebor@redhat.com>
4724
4725 PR tree-optimization/78918
4726 * c-common.c (check_function_restrict): Avoid checking built-ins.
4727 * c.opt (-Wrestrict): Include in -Wall.
4728
4849deb1
JJ
47292017-12-15 Jakub Jelinek <jakub@redhat.com>
4730
4731 * c-attribs.c (c_common_attribute_table,
4732 c_common_format_attribute_table): Swap affects_type_identity
4733 and handler fields, adjust comments.
4734
c65e18d3
BE
47352017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4736
4737 * c.opt (Wcast-function-type): New warning option.
4738 * c-lex.c (get_fileinfo): Avoid warning.
4739 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4740
2004617a
QZ
47412017-12-14 Qing Zhao <qing.zhao@oracle.com>
4742
7365279f 4743 PR middle_end/79538
2004617a
QZ
4744 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4745 Adjust the size of buf1 and buf2, add a new buf to avoid
4746 format-overflow warning.
4747
ab20d992 47482017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4749
4750 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4751 subsequent statement list.
4752
5d9ae53d
MS
47532017-12-07 Martin Sebor <msebor@redhat.com>
4754
4755 PR c/81544
4756 PR c/81566
4757 * c-attribs.c (attr_aligned_exclusions): New array.
4758 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4759 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4760 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4761 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4762 (attr_warn_unused_result_exclusions): Same.
4763 (handle_hot_attribute, handle_cold_attribute): Simplify.
4764 (handle_const_attribute): Warn on function returning void.
4765 (handle_pure_attribute): Same.
4766 (handle_aligned_attribute): Diagnose conflicting attribute
4767 specifications.
4768 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4769
c79144f8
DM
47702017-12-06 David Malcolm <dmalcolm@redhat.com>
4771
4772 PR c/83236
4773 * c-common.c (selftest::c_family_tests): Call
4774 selftest::c_spellcheck_cc_tests.
4775 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4776 * c-spellcheck.cc: Include "selftest.h".
4777 (name_reserved_for_implementation_p): New function.
4778 (should_suggest_as_macro_p): New function.
4779 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4780 should_suggest_as_macro_p and call it.
4781 (selftest::test_name_reserved_for_implementation_p): New function.
4782 (selftest::c_spellcheck_cc_tests): New function.
4783 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4784
613bc14f
DM
47852017-12-06 David Malcolm <dmalcolm@redhat.com>
4786
4787 * c-spellcheck.cc: New file, taken from macro-handling code in
4788 spellcheck-tree.c.
4789 * c-spellcheck.h: New file, taken from macro-handling code in
4790 spellcheck-tree.h.
4791
e76c7157
JJ
47922017-12-01 Jakub Jelinek <jakub@redhat.com>
4793
4794 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4795 attribute.
4796 (handle_simd_attribute): Don't check for "cilk simd function"
4797 attribute. Reindent, formatting changes.
4798
b0da4034
JK
47992017-11-30 Julia Koval <julia.koval@intel.com>
4800
4801 * c-common.h (inv_list): Remove.
4802
058f0b9e
JJ
48032017-11-28 Jakub Jelinek <jakub@redhat.com>
4804
4805 PR sanitizer/81275
4806 * c-common.c (c_switch_covers_all_cases_p_1,
4807 c_switch_covers_all_cases_p): New functions.
4808 * c-common.h (c_switch_covers_all_cases_p): Declare.
4809
5e9d6aa4 48102017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4811 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4812
4813 * array-notation-common.c: Delete.
4814 * c-cilkplus.c: Ditto.
4815 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4816 * c-common.def (ARRAY_NOTATION_REF): Remove.
4817 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4818 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4819 c_validate_cilk_plus_loop, cilkplus_an_parts,
4820 cilk_ignorable_spawn_rhs_op,
4821 cilk_recognize_spawn): Remove.
4822 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4823 * c-omp.c: Remove CILK_SIMD check.
4824 * c-pragma.c: Ditto.
4825 * c-pragma.h: Remove CILK related pragmas.
4826 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4827 ARRAY_NOTATION_REF condition.
4828 (c_pretty_printer::expression): Ditto.
4829 * c.opt (fcilkplus): Remove.
4830 * cilk.c: Delete.
4831
1af4ebf5
MG
48322017-11-21 Marc Glisse <marc.glisse@inria.fr>
4833
4834 * c-pretty-print.c (pp_c_additive_expression,
4835 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4836
d44ed508
JJ
48372017-11-21 Jakub Jelinek <jakub@redhat.com>
4838
7d2f0f9b
JJ
4839 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4840
d44ed508
JJ
4841 PR c++/83059
4842 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4843 instead of tree_to_uhwi, formatting fix.
4844
26edace6
DM
48452017-11-20 David Malcolm <dmalcolm@redhat.com>
4846
4847 PR c/81404
4848 * known-headers.cc: New file, based on material from c/c-decl.c.
4849 (suggest_missing_header): Copied as-is.
4850 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4851 heavily edited to add C++ support. Add some knowledge about
4852 <limits.h>, <stdint.h>, and <wchar.h>.
4853 * known-headers.h: Likewise.
4854
6c7a259b
DM
48552017-11-20 David Malcolm <dmalcolm@redhat.com>
4856
4857 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4858 (lookup_name_fuzzy): Likewise. Convert return type from
4859 const char * to name_hint. Add location_t param.
4860 * name-hint.h: New header.
4861
f9c59f7e
JJ
48622017-11-19 Jakub Jelinek <jakub@redhat.com>
4863
4864 PR c/66618
4865 PR c/69960
4866 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4867
1e39313a
JM
48682017-11-16 Joseph Myers <joseph@codesourcery.com>
4869
4870 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4871 expected publication date of C17.
4872 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4873
3ca0dc60
JM
48742017-11-15 Joseph Myers <joseph@codesourcery.com>
4875
4876 PR c/81156
4877 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4878 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4879
025d57f0
MS
48802017-11-10 Martin Sebor <msebor@redhat.com>
4881
4882 PR c/81117
4883 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4884 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4885 * c.opt (-Wstringop-truncation): New option.
4886
1b6fa695
ML
48872017-11-06 Martin Liska <mliska@suse.cz>
4888
4889 PR middle-end/82404
4890 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4891 FE.
4892 * c.opt: Set default value of warn_return_type.
4893
64a5912c
DM
48942017-10-31 David Malcolm <dmalcolm@redhat.com>
4895
4896 * c-common.c (binary_op_error): Update for renaming of
4897 error_at_rich_loc.
4898 (c_parse_error): Likewise.
4899 * c-warn.c (warn_logical_not_parentheses): Likewise for
4900 renaming of inform_at_rich_loc.
4901 (warn_for_restrict): Likewise for renaming of
4902 warning_at_rich_loc_n.
4903
c76dc9c3
JM
49042017-10-30 Joseph Myers <joseph@codesourcery.com>
4905
4906 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4907 * c-opts.c (set_std_c17): New function.
4908 (c_common_init_options): Use gnu17 as default C version.
4909 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4910
ee5fd23a
MM
49112017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4912
4913 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4914 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4915 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4916 __FP_FAST_FMA<N>X.
4917
d1047465
MP
49182017-10-23 Marek Polacek <polacek@redhat.com>
4919
4920 PR c/82681
4921 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4922
9e878cf1
EB
49232017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4924
4925 * c-common.c (check_builtin_function_arguments): Also check arguments
4926 of __builtin_alloca_with_align_and_max.
4927
89b6abbb
DM
49282017-10-17 David Malcolm <dmalcolm@redhat.com>
4929
4930 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4931 rather than NULL to format_warning_va.
4932 (check_format_types): Likewise when calling format_type_warning.
4933 Remove code to extract source_ranges and source_range * in favor
4934 of just a location_t.
4935 (format_type_warning): Convert source_range * param to a
4936 location_t.
4937
39382c09
JJ
49382017-10-13 Jakub Jelinek <jakub@redhat.com>
4939
4940 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4941 [LR]SHIFT_EXPR.
4942
62e1c678
DM
49432017-10-12 David Malcolm <dmalcolm@redhat.com>
4944
4945 * c-common.c (enum missing_token_insertion_kind): New enum.
4946 (get_missing_token_insertion_kind): New function.
4947 (maybe_suggest_missing_token_insertion): New function.
4948 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4949
b90c9338
NS
49502017-10-11 Nathan Sidwell <nathan@acm.org>
4951
4952 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4953 (c_common_handle_option): Update incpath_kind names.
4954
3a266bcd
ML
49552017-10-11 Martin Liska <mliska@suse.cz>
4956
4957 PR sanitizer/82490
4958 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4959 Wattributes warning.
4960
8e6cdc90
RS
49612017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4962
4963 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4964 operating on trees as wide_ints.
4965 * c-common.c (pointer_int_sum): Likewise.
4966 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4967 * c-warn.c (match_case_to_enum_1): Likewise.
4968 (c_do_switch_warnings): Likewise.
4969 (maybe_warn_shift_overflow): Likewise.
4970
802b38c9
JJ
49712017-10-10 Jakub Jelinek <jakub@redhat.com>
4972
4973 PR c/82437
4974 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4975 instead of wide_int::from.
4976
4e34b338
JJ
49772017-10-06 Jakub Jelinek <jakub@redhat.com>
4978
4979 PR c/82437
4980 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4981 using to_widest use wide_int with the larger of the two precisions.
4982
4bc4b2b4
BE
49832017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4984
4985 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4986 functions.
4987
a1488398
RS
49882017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4989
4990 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4991 when combining the original unconverted comparison operands.
4992
01c9fb68
JJ
49932017-09-29 Jakub Jelinek <jakub@redhat.com>
4994
4995 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4996 attribute.
4997
6e3e8419
EB
49982017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4999
5000 * c-ada-spec.c (to_ada_name): Add index parameter.
5001 (pp_ada_tree_identifier): Likewise.
5002 (dump_ada_macros): Adjust call to to_ada_name.
5003 (struct overloaded_name_hash): New type.
5004 (struct overloaded_name_hasher): Likewise.
5005 (overloaded_names): New hash table.
5006 (compute_overloading_index): New function.
5007 (dump_ada_decl_name): Call it and pass the result to
5008 pp_ada_tree_identifier.
5009 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5010 (dump_ada_function_declaration): Likewise.
5011 (dump_generic_ada_node): Likewise.
5012 (print_constructor): Likewise.
5013 (print_destructor): Likewise.
5014 (dump_ada_specs): Delete overloaded_names table.
5015
79310774
EB
50162017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5017
5018 * c-ada-spec.c (max_ada_macros): Move around.
5019 (store_ada_macro_index): Likewise.
5020 (source_file): Rename into...
5021 (macro_source_file): ...this.
5022 (count_ada_macro): Move around.
5023 (store_ada_macro): Likewise.
5024 (compare_macro): Likewise.
5025 (print_ada_macros): Merge in...
5026 (dump_ada_macros): ...this.
5027 (source_file_base): Rename into...
5028 (current_source_file): ...this.
5029 (print_comment): Move around.
5030 (dump_ada_nodes): Call dump_ada_declaration directly.
5031 (struct with): Change type of limited field to bool.
5032 (append_withs): Change type of limited_access parameter to bool.
5033 (pp_ada_tree_identifie): Likewise.
5034 (dump_ada_decl_nam): Likewise.
5035 (dump_generic_ada_node): Likewise. Do not print the return type.
5036 (to_ada_name): Change type of space_found parameter to bool.
5037 (dump_ada_function_declaration): Return void and change type of
5038 parameters to bool. Also print the return type for a function.
5039 (print_ada_methods): Rename into...
5040 (dump_ada_methods): ...this.
5041 (print_ada_declaration): Rename into ...
5042 (dump_ada_declaration): ...this. Do not print the return type.
5043 (print_ada_struct_decl): Rename into...
5044 (dump_ada_struct_decl): ...this.
5045
7d386d45
JJ
50462017-09-29 Jakub Jelinek <jakub@redhat.com>
5047
5048 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5049 rather than DECL_INITIAL.
5050 (common_handle_aligned_attribute): Likewise.
5051
ab20d992 50522017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5053
5054 * c.opt (gen-decls): Add RejectNegative.
5055
026a79f7
AS
50562017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5057 Jakub Jelinek <jakub@redhat.com>
5058
5059 Add support for -std=c++2a.
5060 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5061 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5062 * c-opts.c (set_std_cxx2a): New.
5063 (c_common_handle_option): Set options when -std=c++2a is enabled.
5064 (c_common_post_options): Adjust comments.
5065 (set_std_cxx14, set_std_cxx17): Likewise.
5066
4a8ca690
EB
50672017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5068
5069 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5070 message for non-uniform endianness and issue a warning in C++.
5071
7b936140
JJ
50722017-09-15 Jakub Jelinek <jakub@redhat.com>
5073
5074 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5075 (Wc++17-compat): Change from undocumented alias to option.
5076 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5077 change C++1z to C++17 in description.
5078 (std=c++1z, std=gnu++1z): Change from option to undocumented
5079 deprecated alias.
5080 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5081 Adjust description.
5082 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5083 * c-opts.c (set_std_cxx1z): Rename to ...
5084 (set_std_cxx17): ... this.
5085 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5086 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5087 caller.
7b936140
JJ
5088 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5089 comments.
5090
12263f13
L
50912017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5092
5093 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5094 function alignment if warn_if_not_aligned_p is true.
5095
6836632e
NS
50962017-09-12 Nathan Sidwell <nathan@acm.org>
5097
5098 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5099 resort_sorted_fields): Move to c/c-decl.c.
5100 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5101 (struct sorted_fields_type): Move to c/c-lang.h.
5102
019bf9ad
JW
51032017-09-09 Jonathan Wakely <jwakely@redhat.com>
5104
5105 PR c++/81852
5106 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5107
bc7fe952
MP
51082017-09-04 Marek Polacek <polacek@redhat.com>
5109
5110 PR c/81783
5111 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5112 (warn_tautological_cmp): Call it.
5113
ab20d992 51142017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5115
5116 * c-opts.c (c_common_finish): Write dependency information even if
5117 there are errors.
5118
d2e05fcb
JJ
51192017-09-01 Jakub Jelinek <jakub@redhat.com>
5120
5121 PR c/81887
5122 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5123 (omp_pragmas_simd): ... here.
5124 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5125 create new clauses list containing just simd clause.
5126
18e2a8b8
RS
51272017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5128 Alan Hayward <alan.hayward@arm.com>
5129 David Sherwood <david.sherwood@arm.com>
5130
5131 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5132 into scalar_mode_supported_p call.
5133 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5134
16d22000
RS
51352017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5136 Alan Hayward <alan.hayward@arm.com>
5137 David Sherwood <david.sherwood@arm.com>
5138
5139 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5140 for the mode iterator.
5141
b397965c
RS
51422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5143 Alan Hayward <alan.hayward@arm.com>
5144 David Sherwood <david.sherwood@arm.com>
5145
5146 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5147 * c-common.c (c_build_vec_perm_expr): Likewise.
5148
357b7604
RS
51492017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5150 Alan Hayward <alan.hayward@arm.com>
5151 David Sherwood <david.sherwood@arm.com>
5152
5153 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5154
e05c94ba
RS
51552017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5156 Alan Hayward <alan.hayward@arm.com>
5157 David Sherwood <david.sherwood@arm.com>
5158
5159 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5160 before calling targetm.addr_space.valid_pointer_mode.
5161
5c20c4af
RS
51622017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5163 Alan Hayward <alan.hayward@arm.com>
5164 David Sherwood <david.sherwood@arm.com>
5165
5166 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5167
c94843d2 51682017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5169 Alan Hayward <alan.hayward@arm.com>
5170 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5171
5172 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5173 iterators.
5174 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5175
4e10a5a7
RS
51762017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5177 Alan Hayward <alan.hayward@arm.com>
5178 David Sherwood <david.sherwood@arm.com>
5179
5180 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5181 case statements.
5182
130fcab0
ML
51832017-08-29 Martin Liska <mliska@suse.cz>
5184
5185 PR other/39851
5186 * c-common.c (parse_optimize_options): Add argument to function
5187 call.
5188 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5189
14e18d71
DM
51902017-08-24 David Malcolm <dmalcolm@redhat.com>
5191
5192 * c-lex.c (interpret_float): Use token location
5193 when building an EXCESS_PRECISION_EXPR.
5194
2f687306
DM
51952017-08-21 David Malcolm <dmalcolm@redhat.com>
5196
5197 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5198 it to check_function_format.
5199 * c-common.h (check_function_arguments): Add vec<location_t> *
5200 param.
5201 (check_function_format): Likewise.
5202 * c-format.c (struct format_check_context): Add field "arglocs".
5203 (check_function_format): Add param "arglocs"; pass it to
5204 check_format_info.
ab20d992 5205 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5206 new field of format_ctx.
5207 (check_format_arg): Pass format_ctx->arglocs to new param of
5208 check_format_info_main.
5209 (class argument_parser): New field "arglocs".
5210 (argument_parser::argument_parser): Add "arglocs_" param and use
5211 it to initialize new field.
5212 (argument_parser::check_argument_type): Pass new arglocs field to
5213 check_format_types.
5214 (check_format_info_main): Add param "arglocs", and use it when
5215 constructing arg_parser.
5216 (check_format_types): Add param "arglocs"; use it if non-NULL when
5217 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5218
00aa1fa2
L
52192017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5220
5221 PR c/53037
5222 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5223 (c_common_attribute_table): Add warn_if_not_aligned.
5224 (handle_aligned_attribute): Renamed to ...
5225 (common_handle_aligned_attribute): Remove argument, name, and add
5226 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5227 (handle_aligned_attribute): New.
5228 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5229
27be025d
MS
52302017-08-14 Martin Sebor <msebor@redhat.com>
5231
5232 PR c/81117
5233 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5234 (handle_nonstring_attribute): New function.
5235
da67acb9
MS
52362017-08-14 Martin Sebor <msebor@redhat.com>
5237
5238 PR c/81117
5239 * c-format.h (T89_G): New macro.
5240 * c-format.c (local_gcall_ptr_node): New variable.
5241 (init_dynamic_diag_info): Initialize it.
5242
a8b522b4
ML
52432017-08-11 Martin Liska <mliska@suse.cz>
5244
5245 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5246 TARGET_SUPPORTS_ALIASES.
5247
32129a17
DM
52482017-08-10 David Malcolm <dmalcolm@redhat.com>
5249
5250 * c-common.c (c_parse_error): Add rich_location * param, using it
5251 rather implicitly using input_location.
5252 * c-common.h (c_parse_error): Add rich_location * param.
5253
30af3a2b
MP
52542017-08-09 Marek Polacek <polacek@redhat.com>
5255
5256 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5257 (c_common_truthvalue_conversion): Likewise.
5258 * c-omp.c (c_finish_omp_atomic): Likewise.
5259 * c-common.h (build_binary_op): Update declaration.
5260
314e6352
ML
52612017-08-08 Martin Liska <mliska@suse.cz>
5262
5263 * c-ada-spec.c: Include header files.
5264 * c-ubsan.c: Likewise.
5265 * c-warn.c: Likewise.
5266
56b5041c
JJ
52672017-08-07 Jakub Jelinek <jakub@redhat.com>
5268
5269 PR c/69389
5270 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5271
db440138
EB
52722017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5273
5274 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5275 (print_ada_methods): Likewise.
5276 (print_ada_declaration): Likewise.
5277
577eec56
ML
52782017-08-07 Martin Liska <mliska@suse.cz>
5279
5280 * array-notation-common.c: Add new includes.
5281 * c-format.c( handle_format_attribute): Canonicalize a format
5282 function name.
5283 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5284 attribute.
5285 * c-pretty-print.c: Add new include.
5286
b854df3c
EB
52872017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5288
5289 * c-ada-spec.c (has_static_fields): Look only into variables.
5290 (print_constructor): Add TYPE parameter and use it for the name.
5291 (print_destructor): Likewise.
5292 (print_ada_declaration): Adjust to new constructor/destructor names.
5293 Adjust calls to print_constructor and print_destructor.
5294 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5295 Look only into variables in the final loop.
5296
9f2cb25e
EB
52972017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5298
5299 * c-ada-spec.c (has_static_fields): Look only into fields.
5300 (dump_generic_ada_node): Small tweak.
5301 (dump_nested_types): Look only into fields.
5302 (print_ada_declaration): Look only into methods. Small tweak.
5303 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5304
f4bcd9eb
EB
53052017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5306
5307 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5308 (dump_ada_function_declaration): Likewise.
5309 (dump_generic_ada_node): Likewise.
5310 (print_ada_declaration): Add support for const-qualified variables.
5311
f34ebeb2
ML
53122017-07-31 Martin Liska <mliska@suse.cz>
5313
5314 PR sanitize/81530
5315 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5316 Guard condition with flag_sanitize_p also with current_function_decl
5317 non-null equality.
5318 (ubsan_maybe_instrument_reference_or_call): Likewise.
5319
218e5d04
UB
53202017-07-30 Uros Bizjak <ubizjak@gmail.com>
5321
5322 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5323
942047f2
EB
53242017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5325
5326 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5327 for enumeral types.
5328 (print_ada_declaration): Add missing guard for record types.
5329
a40ff0ae
JJ
53302017-07-27 Jakub Jelinek <jakub@redhat.com>
5331
5332 PR c/45784
5333 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5334 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5335 new COMPOUND_EXPRs around the rhs of the comparison.
5336
06bd22f6
MP
53372017-07-27 Marek Polacek <polacek@redhat.com>
5338
5339 PR c/81417
5340 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5341 the types.
5342
036ea399
JJ
53432017-07-27 Jakub Jelinek <jakub@redhat.com>
5344
5345 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5346 (handle_noipa_attribute): New function.
5347
417ca011
TD
53482017-07-07 Torsten Duwe <duwe@suse.de>
5349
5350 * c-attribs.c (c_common_attribute_table): Add entry for
5351 "patchable_function_entry".
5352
5aaa8fb4
NS
53532017-07-20 Nathan Sidwell <nathan@acm.org>
5354
5355 Remove TYPE_METHODS.
5356 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5357 dump_ada_template, print_ada_methods,
5358 print_ada_declaration): Member fns are on TYPE_FIELDS.
5359
ff22eb12
NS
53602017-07-18 Nathan Sidwell <nathan@acm.org>
5361
5362 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5363
eea77d1f
DM
53642017-07-14 David Malcolm <dmalcolm@redhat.com>
5365
5366 * c-common.c (try_to_locate_new_include_insertion_point): New
5367 function.
5368 (per_file_includes_t): New typedef.
5369 (added_includes_t): New typedef.
5370 (added_includes): New variable.
5371 (maybe_add_include_fixit): New function.
5372 * c-common.h (maybe_add_include_fixit): New decl.
5373
281ac396
MS
53742017-07-10 Martin Sebor <msebor@redhat.com>
5375
5376 PR other/81345
5377 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5378
b6f43128
DM
53792017-07-06 David Malcolm <dmalcolm@redhat.com>
5380
5381 * c-common.c (selftest::c_family_tests): New.
5382 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5383 (selftest::c_family_tests): New decl.
5384
efbf55b0
MP
53852017-07-04 Marek Polacek <polacek@redhat.com>
5386
5387 PR c/81231
5388 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5389 types.
5390
6c86bd88
MP
53912017-07-04 Marek Polacek <polacek@redhat.com>
5392
5393 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5394
17a7218b
ML
53952017-06-28 Martin Liska <mliska@suse.cz>
5396
5397 PR ipa/81128
5398 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5399 to a function declaration.
5400
63010089
ML
54012017-06-28 Martin Liska <mliska@suse.cz>
5402
5403 PR driver/79659
5404 * c.opt: Add IntegerRange to various options.
5405
3e2becc4
MP
54062017-06-26 Marek Polacek <polacek@redhat.com>
5407
5408 PR c/80116
5409 * c-common.h (warn_for_multistatement_macros): Declare.
5410 * c-warn.c: Include "c-family/c-indentation.h".
5411 (warn_for_multistatement_macros): New function.
5412 * c.opt (Wmultistatement-macros): New option.
5413 * c-indentation.c (guard_tinfo_to_string): No longer static.
5414 Change the parameter type to "enum rid". Handle RID_SWITCH.
5415 * c-indentation.h (guard_tinfo_to_string): Declare.
5416
2db9b7cd
MG
54172017-06-23 Marc Glisse <marc.glisse@inria.fr>
5418
5419 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5420
c3684b7b
MS
54212017-06-15 Martin Sebor <msebor@redhat.com>
5422
5423 PR c++/80560
5424 * c.opt (-Wclass-memaccess): New option.
5425
e72c4afd
BK
54262017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5427
5428 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5429
8a516588
MP
54302017-06-13 Marek Polacek <polacek@redhat.com>
5431
5432 PR objc/80949
5433 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5434 branches is null.
5435
45b2222a
ML
54362017-06-13 Martin Liska <mliska@suse.cz>
5437
5438 PR sanitize/78204
5439 * c-attribs.c (add_no_sanitize_value): New function.
5440 (handle_no_sanitize_attribute): Likewise.
5441 (handle_no_sanitize_address_attribute): Use the function.
5442 (handle_no_sanitize_thread_attribute): New function.
5443 (handle_no_address_safety_analysis_attribute): Use
5444 add_no_sanitize_value.
5445 (handle_no_sanitize_undefined_attribute): Likewise.
5446 * c-common.h: Declare new functions.
5447 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5448 (ubsan_instrument_shift): Likewise.
5449 (ubsan_instrument_bounds): Likewise.
5450 (ubsan_maybe_instrument_array_ref): Likewise.
5451 (ubsan_maybe_instrument_reference_or_call): Likewise.
5452
a01f151f
JM
54532017-06-11 Jason Merrill <jason@redhat.com>
5454
5455 * c-ada-spec.c, c-pragma.c: Use id_equal.
5456
3de4ac6d
MP
54572017-06-04 Marek Polacek <polacek@redhat.com>
5458
5459 PR c/80919
5460 * c-format.c (matching_type_p): Return false if any of the types
5461 requires structural equality.
5462
2474f48f
MS
54632017-06-02 Martin Sebor <msebor@redhat.com>
5464
5465 PR c/80892
5466 * c-warn.c (conversion_warning): Use -Wconversion for integer
5467 conversion and -Wfloat-conversion for floating one.
5468
40ffd95f
BE
54692017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5470
5471 * c.opt (Wsizeof-pointer-div): New warning option.
5472
3fa4634c
VR
54732017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5474
5475 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5476 (Wcatch-value=1): Enable by -Wall.
5477
f012c8ef
DM
54782017-05-30 David Malcolm <dmalcolm@redhat.com>
5479
5480 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5481 format_chars.
5482 * c.opt (fdiagnostics-show-template-tree): New option.
5483 (felide-type): New option.
5484
63dbcd13
VR
54852017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5486
5487 * c.opt (Wcatch-value=): New C++ warning flag.
5488
be136b5c
NS
54892017-05-24 Nathan Sidwell <nathan@acm.org>
5490
5491 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5492 const casts to avoid warning.
5493
3cd211af
MS
54942017-05-24 Martin Sebor <msebor@redhat.com>
5495
5496 PR c/80731
5497 * c-common.h (unsafe_conversion_p): Add a function argument.
5498 * c-common.c (unsafe_conversion_p): Same.
5499 Add type names and values to diagnostics.
5500 (scalar_to_vector): Adjust.
5501 * c-warn.c (constant_expression_error): Add a function argument.
5502 Add type names and values to diagnostics.
5503 (conversion_warning): Add a function argument.
5504 Add type names and values to diagnostics.
5505 (warnings_for_convert_and_check): Same.
5506
1ff7be5a
JM
55072017-05-19 Jason Merrill <jason@redhat.com>
5508
5509 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5510 enumerators.
5511
ff502317
BE
55122017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5513
5514 * c-format.c (locus): Move out of function scope,
5515 add GTY attribute.
5516
2a8a8d7b
NS
55172017-05-19 Nathan Sidwell <nathan@acm.org>
5518
5519 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5520 (c_common_parse_file): Remove class dump handling.
5521 (get_dump_info): Likewise.
5522
39aac208
RB
55232017-05-19 Richard Biener <rguenther@suse.de>
5524
5525 PR c++/80593
5526 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5527 to alias-set zero memory.
5528
6ecd2339
BE
55292017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5530
5531 * c-format.c (local_tree_type_node): Add GTY attribute.
5532
6574d78e
MP
55332017-05-18 Marek Polacek <polacek@redhat.com>
5534
5535 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5536 (c_common_fixed_point_type_for_size): Likewise.
5537 (c_common_type_for_mode): Likewise.
5538 (shorten_compare): Likewise.
5539 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5540 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5541
e3455240
MP
55422017-05-18 Marek Polacek <polacek@redhat.com>
5543
5544 * c-common.c (self_promoting_args_p): Change the return type to bool.
5545 Use false/true instead of 0/1.
5546 * c-common.h (self_promoting_args_p): Update.
5547
3fa8871b
MP
55482017-05-17 Marek Polacek <polacek@redhat.com>
5549
5550 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5551 * c-warn.c: Likewise.
5552
b42cc3ca
VV
55532017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5554
5555 Implement new C++ intrinsics __is_assignable and __is_constructible.
5556 * c-common.c (__is_assignable, __is_constructible): New.
5557 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5558
1a817418
ML
55592017-05-17 Martin Liska <mliska@suse.cz>
5560
5561 * c-common.h: Introduce dump_flags_t type and
5562 use it instead of int type.
5563 * c-gimplify.c (c_genericize): Likewise.
5564 * c-opts.c: Likewise.
5565
b2fa0a8b
MP
55662017-05-17 Marek Polacek <polacek@redhat.com>
5567
5568 * c-common.c (c_save_expr): Remove.
5569 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5570 * c-common.h (c_save_expr): Remove declaration.
5571
31c2d57d
VR
55722017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5573
5574 PR c/35441
5575 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5576 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5577 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5578 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5579 RDIV_EXPR.
5580 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5581
684f84de
MP
55822017-05-09 Marek Polacek <polacek@redhat.com>
5583
5584 PR c/80525
5585 * c-warn.c (unwrap_c_maybe_const): New.
5586 (warn_logical_operator): Call it.
5587
641da50a
NS
55882017-05-09 Nathan Sidwell <nathan@acm.org>
5589
5590 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5591 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5592
631238ac
MS
55932017-05-08 Martin Sebor <msebor@redhat.com>
5594
5595 PR translation/80280
5596 * c-format.h (struct format_flag_spec): Add new member.
5597 (T89_T): New macro.
5598 * c-format.c (local_tree_type_node): New global.
5599 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5600 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5601 (strfmon_flag_specs): Likewise.
5602 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5603 with distinct quoting properties.
5604 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5605 (flag_chars_t::validate): Add argument and handle bad quoting.
5606 (check_format_info_main): Handle quoting problems.
5607 (init_dynamic_diag_info): Simplify.
5608
49f0c04c
JM
56092017-05-08 Jason Merrill <jason@redhat.com>
5610
5611 * c-opts.c (c_common_post_options): Update defaults for
5612 flag_abi_version and flag_abi_compat_version.
5613
56d35585
DM
56142017-05-05 David Malcolm <dmalcolm@redhat.com>
5615
5616 * c-common.c (c_cpp_error): Replace report_diagnostic
5617 with diagnostic_report_diagnostic.
5618
0f2c4a8f
MS
56192017-05-04 Martin Sebor <msebor@redhat.com>
5620
5621 PR translation/80280
5622 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5623 (handle_weakref_attribute): Same.
5624
6fe63fb4
NS
56252017-05-03 Nathan Sidwell <nathan@acm.org>
5626
5627 Canonicalize canonical type hashing
5628 * c-common.c (complete_array_type): Use type_hash_canon.
5629
815d9cc6
XR
56302017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5631
92a285c1 5632 PR c++/80038
815d9cc6
XR
5633 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5634 prototype.
5635 (cilk_install_body_pedigree_operations): Likewise.
5636 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5637 detatched.
5638 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5639 (cilk_install_body_pedigree_operations): Likewise.
5640 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5641 unwrapping.
5642
f8a36447
JJ
56432017-04-27 Jakub Jelinek <jakub@redhat.com>
5644
5645 PR c++/80534
5646 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5647 flag on non-aggregate element types.
5648
7c145456
BE
56492017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5650
5651 * c-common.c (c_type_hasher, type_hash_table): Remove.
5652 (c_common_get_alias_set): Remove unreachable code.
5653 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5654
c3cbcd45
VR
56552017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5656
5657 * c.opt (Wextra-semi): New C++ warning flag.
5658
8a59d466
JJ
56592017-04-20 Jakub Jelinek <jakub@redhat.com>
5660
5661 PR middle-end/80423
5662 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5663
8487c9a5
JJ
56642017-04-18 Jakub Jelinek <jakub@redhat.com>
5665
5666 PR middle-end/79788
5667 PR middle-end/80375
5668 * c-common.c (c_common_type_for_mode): Don't handle
5669 widest_*_literal_type_node here.
5670 c_common_signed_or_unsigned_type): Likewise.
5671 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5672 to *intTI_type_node or *intDI_type_node depending on whether
5673 TImode is supported by the target or not.
5674
3ee0fb02
ML
56752017-04-10 Martin Liska <mliska@suse.cz>
5676
5677 PR sanitizer/80350
5678 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5679 doing an UBSAN check.
5680
5764ee3c
JW
56812017-04-03 Jonathan Wakely <jwakely@redhat.com>
5682
5683 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5684
6f3af356
JJ
56852017-03-31 Jakub Jelinek <jakub@redhat.com>
5686
5687 PR c++/79572
5688 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5689 tree *.
5690 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5691 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5692 REFERENCE_TYPE.
5693
f6a7a9d5
DM
56942017-03-31 David Malcolm <dmalcolm@redhat.com>
5695
5696 PR documentation/78732
5697 * c.opt (Wendif-labels): Fix description to refer to
5698 #else rather than #elif.
5699
af88f557
JJ
57002017-03-31 Jakub Jelinek <jakub@redhat.com>
5701
5702 PR libstdc++/80251
5703 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5704 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5705
a9e4a1a5
JJ
57062017-03-27 Jakub Jelinek <jakub@redhat.com>
5707
5708 PR middle-end/80162
5709 * c-common.c (c_common_mark_addressable_vec): Don't set
5710 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5711
3f01b620
MS
57122017-03-21 Martin Sebor <msebor@redhat.com>
5713
5714 PR c++/79548
5715 * c-common.c (set_underlying_type): Mark type used only when
5716 original del is declared unused.
5717
2f6f187a
DM
57182017-03-10 David Malcolm <dmalcolm@redhat.com>
5719
5720 PR translation/79848
5721 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5722 "%qs".
5723
a02fa805
DM
57242017-03-10 David Malcolm <dmalcolm@redhat.com>
5725
5726 PR c/79921
5727 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5728 from inform's message, so that xgettext can locate it.
5729
822a132c
MP
57302017-03-09 Marek Polacek <polacek@redhat.com>
5731
5732 PR c++/79962
5733 PR c++/79984
5734 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5735 conversion to the attribute list.
5736
bba81f1c
ML
57372017-03-09 Martin Liska <mliska@suse.cz>
5738
5739 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5740
108154ff
JM
57412017-03-03 Jason Merrill <jason@redhat.com>
5742
5743 * c.opt (Wnoexcept-type): New.
5744
eb0e7c34
RB
57452017-03-02 Richard Biener <rguenther@suse.de>
5746
5747 PR c/79756
5748 * c-common.c (c_common_mark_addressable_vec): Look through
5749 C_MAYBE_CONST_EXPR.
5750
9453ba0a
ML
57512017-02-28 Martin Liska <mliska@suse.cz>
5752
5753 * c.opt: Replace space with tabular for options of <number>
5754 type.
5755
6a825afe
ML
57562017-02-28 Martin Liska <mliska@suse.cz>
5757
5758 * c.opt: Fix --help=option -Q for options which are of
5759 an enum type.
5760
4227c9ad
JJ
57612017-02-24 Jakub Jelinek <jakub@redhat.com>
5762
5763 PR c++/79588
5764 * c-common.c (check_function_restrict): New function.
5765 (check_function_arguments): Add FNDECL argument. Call
5766 check_function_restrict if -Wrestrict.
5767 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5768 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5769 * c-common.h (check_function_arguments): Add FNDECL argument.
5770 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5771
59909673
EB
57722017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5773
5774 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5775 treatment of parameters with pointer-to-tagged type and tidy up.
5776 (print_ada_methods): Remove the special treatment of C++ static member
5777 functions.
5778
54dcd526
ML
57792017-02-22 Martin Liska <mliska@suse.cz>
5780
5781 * c.opt: Replace inequality signs with square brackets
5782 for -Wnornalized.
5783
00bc9de3
JJ
57842017-02-21 Jakub Jelinek <jakub@redhat.com>
5785
5786 PR c++/79641
5787 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5788 preserve quals.
5789
97fcf744
JM
57902017-02-17 Joseph Myers <joseph@codesourcery.com>
5791
5792 * c-cppbuiltin.c (builtin_define_float_constants): Define
5793 __DECIMAL_DIG__ to the value for long double.
5794
c7545f1c
MP
57952017-02-15 Marek Polacek <polacek@redhat.com>
5796
5797 PR c/79515
5798 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5799 conversion has occured.
5800
c2e84327
DM
58012017-01-24 David Malcolm <dmalcolm@redhat.com>
5802
5803 * c-common.c (c_common_reswords): Add "__RTL".
5804 * c-common.h (enum rid): Add RID_RTL.
5805
2ebd93e1
MP
58062017-01-20 Marek Polacek <polacek@redhat.com>
5807
5808 PR c/64279
5809 * c-common.h (do_warn_duplicated_branches_r): Declare.
5810 * c-gimplify.c (c_genericize): Walk the function tree calling
5811 do_warn_duplicated_branches_r.
5812 * c-warn.c (expr_from_macro_expansion_r): New.
5813 (do_warn_duplicated_branches): New.
5814 (do_warn_duplicated_branches_r): New.
5815 * c.opt (Wduplicated-branches): New option.
5816
0d80ab91
DM
58172017-01-17 David Malcolm <dmalcolm@redhat.com>
5818
5819 PR c++/71497
5820 * c-indentation.c (warn_for_misleading_indentation): Use the past
5821 subjunctive in the note.
5822
7f991c36
AH
58232017-01-17 Aldy Hernandez <aldyh@redhat.com>
5824
5825 PR c/79116
5826 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5827 start type to integer_type.
5828
1c70261c
JJ
58292017-01-16 Jakub Jelinek <jakub@redhat.com>
5830
5831 PR driver/49726
5832 * c.opt (gen-decls): Add Driver flag.
5833
1ddca3f3
PC
58342017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5835
5836 Revert:
5837 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5838
5839 PR c++/71737
5840 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5841
7d2f3f1d
PC
58422017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5843
5844 PR c++/71737
5845 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5846
bce6f760
MS
58472017-01-12 Martin Sebor <msebor@redhat.com>
5848
5849 (-Wformat-overflow): ...to this.
5850
bf5fbf46
MS
58512017-01-11 Martin Sebor <msebor@redhat.com>
5852
5853 PR c/78768
5854 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5855 Also enable for LTO.
5856
e363df3f
JM
58572017-01-10 Jason Merrill <jason@redhat.com>
5858
5859 Implement P0195R2, C++17 variadic using.
5860 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5861
bd2c6270
JJ
58622017-01-09 Jakub Jelinek <jakub@redhat.com>
5863
5864 PR translation/79019
5865 PR translation/79020
5866 * c.opt (Wnormalized=): Fix typo in description.
5867
efcc8d38
MS
58682017-01-08 Martin Sebor <msebor@redhat.com>
5869
5870 PR middle-end/77708
5871 * c.opt (-Wformat-truncation): New option.
5872
ab20d992 58732017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5874
5875 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5876 value to unsigned short to fit in 4 hex digits without
5877 warnings.
5878
4e89adf9
EB
58792017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5880
5881 * c.opt (fsso-struct): Add 'native' value.
5882
cd445b54
ML
58832017-01-05 Martin Liska <mliska@suse.cz>
5884
5885 PR pch/78970
5886 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5887 header.
5888
a9342885
MP
58892017-01-04 Marek Polacek <polacek@redhat.com>
5890
5891 PR c++/64767
5892 * c.opt (Wpointer-compare): New option.
5893
fc73e60c
JJ
58942017-01-04 Jakub Jelinek <jakub@redhat.com>
5895
5896 PR driver/78957
5897 * c.opt (fsso-struct=): Add RejectNegative.
5898
cbe34bb5
JJ
58992017-01-01 Jakub Jelinek <jakub@redhat.com>
5900
5901 Update copyright years.
5902
d4a6c0ea
ML
59032016-12-29 Martin Liska <mliska@suse.cz>
5904
5905 PR c/78933
5906 * c.opt (strong-eval-order): Add RejectNegative keyword.
5907
67a5ad7c
JM
59082016-12-22 Jason Merrill <jason@redhat.com>
5909
5910 Implement P0522R0, matching of template template arguments.
5911 * c-cppbuiltin.c (c_cpp_builtins): Define
5912 __cpp_template_template_args.
5913
0dba7960
JJ
59142016-12-21 Jakub Jelinek <jakub@redhat.com>
5915
5916 PR bootstrap/78817
5917 * c-common.c (struct nonnull_arg_ctx): New type.
5918 (check_function_nonnull): Return bool instead of void. Use
5919 nonnull_arg_ctx as context rather than just location_t.
5920 (check_nonnull_arg): Adjust for the new context type, set
5921 warned_p to true if a warning has been diagnosed.
5922 (check_function_arguments): Return bool instead of void.
5923 * c-common.h (check_function_arguments): Adjust prototype.
5924
31bfc9b9
JM
59252016-12-21 Jason Merrill <jason@redhat.com>
5926
5927 * c.opt (-fnew-ttp-matching): New flag.
5928 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5929
629b3d75
MJ
59302016-12-14 Martin Jambor <mjambor@suse.cz>
5931
5932 * c-omp.c: Include omp-general.h instead of omp-low.h.
5933 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5934 name.
5935
474da67e
MS
59362016-12-14 Martin Sebor <msebor@redhat.com>
5937
5938 PR c/17308
5939 * c-common.c (check_nonnull_arg): Disable when optimization
5940 is enabled.
5941
fe366b87
MP
59422016-12-12 Marek Polacek <polacek@redhat.com>
5943
5944 PR c++/78647
5945 * c-common.c (attribute_fallthrough_p): Return false for
5946 error_mark_node.
5947
8bd9f164
MS
59482016-12-08 Martin Sebor <msebor@redhat.com>
5949
5950 PR c/78284
5951 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5952
060162e0
MS
59532016-12-08 Martin Sebor <msebor@redhat.com>
5954
5955 PR c/78165
92a285c1
ML
5956 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5957 suffix.
060162e0 5958
ee92e7ba
MS
59592016-12-07 Martin Sebor <msebor@redhat.com>
5960
5961 PR c/53562
5962 PR middle-end/77784
5963 PR middle-end/78149
5964 PR middle-end/78138
5965 * c.opt (-Wstringop-overflow): New option.
5966
84b0769e
MO
59672016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5968
5969 * c-attribs.c (asan odr indicator): New attribute.
5970 (handle_asan_odr_indicator_attribute): New function.
5971
7fa6a965
PK
59722016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5973
5974 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5975 ptrdiff_type_node;
5976
56d8ffc1
JG
59772016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5978
5979 * c-common.c (excess_precision_mode_join): New.
5980 (c_ts18661_flt_eval_method): New.
5981 (c_c11_flt_eval_method): Likewise.
5982 (c_flt_eval_method): Likewise.
5983 * c-common.h (excess_precision_mode_join): New.
5984 (c_flt_eval_method): Likewise.
5985 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5986 (cpp_iec_559_value): Call it.
5987 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5988 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5989 __FLT_EVAL_METHOD_TS_18661_3__.
5990
04f0fcf7
JG
59912016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5992
5993 * c-opts.c (c_common_post_options): Add logic to handle the default
5994 case for -fpermitted-flt-eval-methods.
5995
fb2675cb
PB
59962016-11-23 Paolo Bonzini <bonzini@gnu.org>
5997
5998 * c.opt (Wexpansion-to-defined): New.
5999
ec1c5694
JJ
60002016-11-23 Jakub Jelinek <jakub@redhat.com>
6001
6002 PR target/78451
6003 * c-pragma.c (handle_pragma_target): Don't replace
6004 current_target_pragma, but chainon the new args to the current one.
6005
730c9e75
NS
60062016-11-22 Nathan Sidwell <nathan@acm.org>
6007
6008 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6009 indentation and formatting.
730c9e75 6010
89990732
MS
60112016-11-21 Martin Sebor <msebor@redhat.com>
6012
6013 * c.opt (-fprintf-return-value): Enable by default.
6014
48330c93
BE
60152016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6016
6017 PR c++/71973
6018 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6019 * c-common.c (c_common_nodes_and_builtins): Initialize
6020 const_tm_ptr_type_node.
6021
0d939c95
MP
60222016-11-16 Marek Polacek <polacek@redhat.com>
6023
6024 PR c/78285
6025 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6026
8e745a17
JJ
60272016-11-14 Jakub Jelinek <jakub@redhat.com>
6028
6029 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6030
1ee62b92 60312016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6032 Richard Biener <rguenther@suse.de>
6033
6034 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6035 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6036 * c.opt (fgimple): New option.
1ee62b92 6037
22b15758
UB
60382016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6039
6040 PR c/35503
6041 * c-common.h (warn_for_restrict): Declare.
6042 * c-warn.c: Include gcc-rich-location.h.
6043 (warn_for_restrict): New function.
6044 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6045 (gcc_cdiag_char_table): Likewise.
6046 (gcc_cxxdiag_char_table): Likewise.
6047 * c.opt (Wrestrict): New option.
6048
4be719cd
EB
60492016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6050
6051 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6052 for nested types only if the type is a record or union and dump SLOC.
6053
4a826ca6
JM
60542016-11-09 Jason Merrill <jason@redhat.com>
6055
6056 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6057
2e955d50
JJ
60582016-11-09 Jakub Jelinek <jakub@redhat.com>
6059
6060 * c-ubsan.c (ubsan_instrument_shift): Handle split
6061 -fsanitize=shift-base and -fsanitize=shift-exponent.
6062
51dc6603
JM
60632016-11-07 Jason Merrill <jason@redhat.com>
6064
6065 * c.opt (Wc++1z-compat): New.
6066 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6067
6dc4a604
ML
60682016-11-07 Martin Liska <mliska@suse.cz>
6069
6070 * c-warn.c (warn_for_unused_label): Save all labels used
6071 in goto or in &label.
6072
b302001e
JM
60732016-11-03 Jason Merrill <jason@redhat.com>
6074
6075 * c-cppbuiltin.c (c_cpp_builtins): Correct
6076 __cpp_inheriting_constructors.
6077
31f7f784
JM
60782016-11-01 Jason Merrill <jason@redhat.com>
6079
2bc78e3c
JM
6080 * c-cppbuiltin.c (c_cpp_builtins): Update
6081 __cpp_inheriting_constructors.
6082
31f7f784
JM
6083 * c.opt (-fnew-inheriting-ctors): New.
6084 * c-opts.c: Default to on for ABI 11+.
6085
dcb466ec
JJ
60862016-10-31 Jakub Jelinek <jakub@redhat.com>
6087
6088 PR c++/77948
6089 * c.opt (fext-numeric-literals): Add Var and Init.
6090 * c-opts.c (c_common_handle_option): Don't clear
6091 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6092 (c_common_post_options): Clear it here if not set
6093 explicitly.
6094
52e1b91e
AH
60952016-10-28 Aldy Hernandez <aldyh@redhat.com>
6096
6097 PR debug/77773
6098 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6099 if NULL.
6100
e16f1cc7
JJ
61012016-10-25 Jakub Jelinek <jakub@redhat.com>
6102
6103 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6104 * c-common.c (c_common_reswords): Add __builtin_launder.
6105
f8348061
BE
61062016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6107
6108 * c-common.c (c_common_truthvalue_conversion): Warn for
6109 multiplications in boolean context. Fix the quoting of '<<' and '<'
6110 in the shift warning.
6111
eff89e01
BE
61122016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6113
6114 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6115
24bc7bf4
JM
61162016-10-20 Jason Merrill <jason@redhat.com>
6117
6118 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6119
4c712374
BE
61202016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6121
6122 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6123 integer shift ops in boolean context.
6124
61252016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6126
6127 * c.opt (Walloca): New.
6128 (Walloca-larger-than=): New.
6129 (Wvla-larger-than=): New.
6130
8fa18c06
MP
61312016-10-17 Marek Polacek <polacek@redhat.com>
6132
6133 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6134 Return immediately when finding a match.
6135 (warn_tautological_cmp): Remove a boolean variable that is no longer
6136 needed.
6137
b12b1915
MP
61382016-10-17 Marek Polacek <polacek@redhat.com>
6139
6140 * c-attribs.c: New file.
6141 * c-common.c: Move attributes handling to c-attribs.c.
6142 (get_nonnull_operand): No longer static.
6143 * c-common.h: Move the declarations from c-attribs.c to its own section.
6144
2045acd9
JM
61452016-10-14 Jason Merrill <jason@redhat.com>
6146
6147 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6148 and __cpp_deduction_guides.
6149
14a2c9aa
JM
61502016-10-13 Jason Merrill <jason@redhat.com>
6151
6152 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6153
4d0cdd0c
TP
61542016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6155
6156 * c-cppbuiltin.c: Include memmodel.h.
6157 * c-opts.c: Likewise.
6158 * c-pragma.c: Likewise.
6159 * c-warn.c: Likewise.
6160
70f6d5e1
JJ
61612016-10-12 Jakub Jelinek <jakub@redhat.com>
6162
6163 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6164 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6165 * c-opts.c (sanitize_cpp_opts): Initialize
6166 cpp_opts->cpp_warn_implicit_fallthrough.
6167
78f61294
MP
61682016-10-11 Marek Polacek <polacek@redhat.com>
6169
6170 * c-common.c (warning_candidate_p): Change the return type to bool
6171 and return true/false instead of 1/0.
6172 (vector_mode_valid_p): Likewise.
6173
038b5cc0
MP
61742016-10-11 Marek Polacek <polacek@redhat.com>
6175
6176 * c-common.c (fold_for_warn): No longer static.
6177 (bool_promoted_to_int_p): Likewise.
6178 (c_common_get_narrower): Likewise.
6179 (constant_expression_warning): Move to c-warn.c.
6180 (constant_expression_error): Likewise.
6181 (overflow_warning): Likewise.
6182 (warn_logical_operator): Likewise.
6183 (find_array_ref_with_const_idx_r): Likewise.
6184 (warn_tautological_cmp): Likewise.
6185 (expr_has_boolean_operands_p): Likewise.
6186 (warn_logical_not_parentheses): Likewise.
6187 (warn_if_unused_value): Likewise.
6188 (strict_aliasing_warning): Likewise.
6189 (sizeof_pointer_memaccess_warning): Likewise.
6190 (check_main_parameter_types): Likewise.
6191 (conversion_warning): Likewise.
6192 (warnings_for_convert_and_check): Likewise.
6193 (match_case_to_enum_1): Likewise.
6194 (match_case_to_enum): Likewise.
6195 (c_do_switch_warnings): Likewise.
6196 (warn_for_omitted_condop): Likewise.
6197 (readonly_error): Likewise.
6198 (lvalue_error): Likewise.
6199 (invalid_indirection_error): Likewise.
6200 (warn_array_subscript_with_type_char): Likewise.
6201 (warn_about_parentheses): Likewise.
6202 (warn_for_unused_label): Likewise.
6203 (warn_for_div_by_zero): Likewise.
6204 (warn_for_memset): Likewise.
6205 (warn_for_sign_compare): Likewise.
6206 (do_warn_double_promotion): Likewise.
6207 (do_warn_unused_parameter): Likewise.
6208 (record_locally_defined_typedef): Likewise.
6209 (maybe_record_typedef_use): Likewise.
6210 (maybe_warn_unused_local_typedefs): Likewise.
6211 (maybe_warn_bool_compare): Likewise.
6212 (maybe_warn_shift_overflow): Likewise.
6213 (warn_duplicated_cond_add_or_warn): Likewise.
6214 (diagnose_mismatched_attributes): Likewise.
6215 * c-common.h: Move the declarations from c-warn.c to its own section.
6216 * c-warn.c: New file.
6217
627be19f
JM
62182016-10-08 Jason Merrill <jason@redhat.com>
6219
6220 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6221 into COND_EXPR in C++.
6222
7bad794a
JJ
62232016-10-08 Jakub Jelinek <jakub@redhat.com>
6224
6225 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6226 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6227 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6228
be845b04
JJ
62292016-10-07 Jakub Jelinek <jakub@redhat.com>
6230
6231 Implement LWG2296 helper intrinsic
6232 * c-common.h (enum rid): Add RID_ADDRESSOF.
6233 * c-common.c (c_common_reswords): Add __builtin_addressof.
6234
c09c4992
BE
62352016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6236
6237 PR c++/77700
6238 * c-common.c (c_common_truthvalue_conversion): Warn also for
6239 suspicious enum values in boolean context.
6240
342cfb3e
JJ
62412016-10-06 Jakub Jelinek <jakub@redhat.com>
6242
6243 Implement P0258R2 - helper for C++17
6244 std::has_unique_object_representations trait
6245 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6246 * c-common.c (c_common_reswords): Add
6247 __has_unique_object_representations.
6248
2e69f143
JJ
62492016-10-05 Jakub Jelinek <jakub@redhat.com>
6250
6251 PR sanitizer/66343
6252 * c-ubsan.c (ubsan_instrument_return): Don't call
6253 initialize_sanitizer_builtins here.
6254
700fff34
BE
62552016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6256
6257 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6258 conditional expression in boolean context when only one arm is
6259 non-boolean.
6260
9563bfcd
JJ
62612016-10-05 Jakub Jelinek <jakub@redhat.com>
6262
04a32443
JJ
6263 PR sanitizer/77823
6264 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6265 is not integral.
6266
9563bfcd
JJ
6267 * c-common.c (c_common_reswords): Update comment for C++11.
6268
f1644724
JM
62692016-10-04 Jason Merrill <jason@redhat.com>
6270
6271 * c-common.c (make_tree_vector_from_ctor): New.
6272 * c-common.h: Declare it.
6273
5a79befb
JJ
62742016-10-04 Jakub Jelinek <jakub@redhat.com>
6275
6276 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6277 __LIBGCC_JCR_SECTION_NAME__.
6278
1633d3b9
BE
62792016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6280
6281 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6282 left shift in boolean context.
6283
a2c6e7f2
JJ
62842016-09-29 Jakub Jelinek <jakub@redhat.com>
6285
6286 Implement P0001R1 - C++17 removal of register storage class specifier
6287 * c.opt (Wregister): New warning.
6288 * c-opts.c (c_common_post_options): Enable -Wregister by
6289 default for C++17.
6290
75304c87
JG
62912016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6292
6293 * c-opts.c (c_common_post_options): Remove special case for
6294 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6295 in C++.
6296
bbfac6da
JJ
62972016-09-27 Jakub Jelinek <jakub@redhat.com>
6298
6e39060a
JJ
6299 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6300 -std=c++1z.
6301
bbfac6da
JJ
6302 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6303
e73cf9a2
TP
63042016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6305
6306 * c-common.c: Include memmodel.h.
6307
c6147dc4
MP
63082016-09-26 Marek Polacek <polacek@redhat.com>
6309
6310 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6311
81fea426
MP
63122016-09-26 Marek Polacek <polacek@redhat.com>
6313
6314 PR c/7652
6315 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6316 (handle_fallthrough_attribute): New function.
6317 (attribute_fallthrough_p): New function.
6318 * c-common.h (attribute_fallthrough_p): Declare.
6319
9a2300e9
MP
63202016-09-24 Marek Polacek <polacek@redhat.com>
6321
6322 PR c/77490
6323 * c.opt (Wbool-operation): New.
6324
a09e9e35
BE
63252016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6326
6327 * c-common.c (c_common_truthvalue_conversion): Inhibit
6328 Wint-in-bool-context warning with from_macro_definition_at.
6329 Mention the expression will always evaluate to true.
6330
d43b4ccc
MS
63312016-09-21 Martin Sebor <msebor@redhat.com>
6332
6333 PR bootstrap/77676
6334 * c.opt (fprintf-return-value): Temporarily initialize to zero
6335 to unblock bootstrap failures.
6336
2e1c20b1
JJ
63372016-09-21 Jakub Jelinek <jakub@redhat.com>
6338
6339 PR c++/77651
6340 * c.opt (Waligned-new=): Add RejectNegative.
6341 (faligned-new=): Likewise. Spelling fix - change
6342 aligned_new_threshhold to aligned_new_threshold.
6343 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6344 to aligned_new_threshold.
6345
88d0c3f0
MS
63462016-09-20 Martin Sebor <msebor@redhat.com>
6347
6348 PR middle-end/49905
6349 * c.opt: Add -Wformat-length and -fprintf-return-value.
6350
144a96e4
BE
63512016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6352
6353 PR c++/77434
6354 * c.opt (Wint-in-bool-context): New warning.
6355 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6356 constants in boolean context.
6357
63012d9a
JM
63582016-09-19 Joseph Myers <joseph@codesourcery.com>
6359
6360 * c-common.c (max_align_t_align): Also consider alignment of
6361 float128_type_node.
6362
931388ce
JM
63632016-09-15 Jason Merrill <jason@redhat.com>
6364
6365 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6366 DECL_EXTERNAL.
6367
38711381
JM
63682016-09-14 Jason Merrill <jason@redhat.com>
6369
6370 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6371 limit FIELD_DECL, either.
6372
e51fbec3
MP
63732016-09-14 Marek Polacek <polacek@redhat.com>
6374
6375 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6376 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6377 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6378
254830ba
DM
63792016-09-13 David Malcolm <dmalcolm@redhat.com>
6380
6381 * c-common.c (warn_logical_not_parentheses): Replace
6382 rich_location::add_fixit_insert calls with add_fixit_insert_before
6383 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6384
42763690
JM
63852016-09-13 Jason Merrill <jason@redhat.com>
6386 Tom de Vries <tom@codesourcery.com>
6387
6388 PR c++/77427
6389 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6390
9453eee9
JM
63912016-09-13 Jason Merrill <jason@redhat.com>
6392
6393 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6394 limit types at all.
6395
e96809e3
JM
63962016-09-12 Jason Merrill <jason@redhat.com>
6397
6398 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6399 bit/byte confusion, allow large alignment for types.
6400
54dcdb88
BE
64012016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6402
6403 PR c++/77496
6404 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6405
d1463eb9
DM
64062016-09-12 David Malcolm <dmalcolm@redhat.com>
6407
6408 PR c/72858
6409 * c-format.c (argument_parser::check_argument_type): Add params
6410 "type_start" and "conversion_char". Use the former to generate
6411 offset_to_type_start and pass it and conversion_char to
6412 check_format_types.
6413 (check_format_info_main): Capture the start of the type
6414 information as "type_start", and pass it an format_char
6415 to arg_parser.check_argument_type.
6416 (check_format_types): Provide an example in the leading comment.
6417 Add params "offset_to_type_start" and "conversion_char"; pass
6418 them to format_type_warning calls.
6419 (test_get_modifier_for_format_len): Likewise.
6420 (matching_type_p): New function.
6421 (get_format_for_type): Add param "conversion_char" and move
6422 implementation into...
6423 (get_format_for_type_1): ...new function, called twice.
6424 Use new function matching_type_p rather than checking for
6425 TYPE_CANONICAL equality.
6426 (get_corrected_substring): New function.
6427 (format_type_warning): Provide an example in the leading comment.
6428 Add params "offset_to_type_start" and "conversion_char". Replace
6429 call to get_format_for_type with call to get_corrected_substring
6430 and move rejection of hints for widths/precisions there.
6431 (assert_format_for_type_streq): Add param "conversion_char".
6432 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6433 (test_get_format_for_type_printf): Add conversion chars to the
6434 tests, adding coverage for various combinations of integer
6435 vs double conversions, and for preserving octal and hexadecimal
6436 conversions.
6437 (test_get_format_for_type_scanf): Add conversion chars to the
6438 tests.
6439
5b28efbb
TV
64402016-09-10 Tom de Vries <tom@codesourcery.com>
6441
6442 PR C/71602
6443 * c-common.c (build_va_arg): Handle more strict
6444 targetm.canonical_va_list_type. Replace first argument type error with
6445 assert.
6446
3f0177e7
MS
64472016-09-09 Martin Sebor <msebor@redhat.com>
6448
6449 PR c/77520
6450 PR c/77521
6451 * c-format.c (argument_parser::find_format_char_info): Use %qc
6452 format directive unconditionally.
6453
af63ba4b
JM
64542016-09-09 Jason Merrill <jason@redhat.com>
6455
6456 Implement C++17 new of over-aligned types.
6457 * c.opt: Add -faligned-new and -Waligned-new.
6458 * c-common.c (max_align_t_align): Split out from...
6459 (cxx_fundamental_alignment_p): ...here.
6460 * c-common.h: Declare it.
6461 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6462
c65248cb
JM
64632016-09-09 Joseph Myers <joseph@codesourcery.com>
6464
6465 * c-cppbuiltin.c (builtin_define_type_width): New function.
6466 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6467 macros.
6468
e5106e27
DM
64692016-09-07 David Malcolm <dmalcolm@redhat.com>
6470
6471 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6472 a POINTER_TYPE.
6473 (substring_loc::get_location): Move to substring-locations.c,
6474 keeping implementation as...
6475 (c_get_substring_location): New function, from the above, reworked
6476 to use accessors rather than member lookup.
6477 * c-common.h (class substring_loc): Move to substring-locations.h,
6478 replacing with a forward decl.
6479 (c_get_substring_location): New decl.
6480 * c-format.c: Include "substring-locations.h".
6481 (format_warning_va): Move to substring-locations.c.
6482 (format_warning_at_substring): Likewise.
6483
ab20d992 64842016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6485
6486 PR c/77336
6487 * c-format.c (check_function_format): Avoid issuing warnings for
6488 functions unless they call format functions with non-constant
6489 format strings.
6490
b772a565
RB
64912016-09-06 Richard Biener <rguenther@suse.de>
6492
6493 PR c/77450
6494 * c-common.c (c_common_mark_addressable_vec): Handle
6495 COMPOUND_LITERAL_EXPR.
6496
25ff5dd3
MP
64972016-09-05 Marek Polacek <polacek@redhat.com>
6498
6499 PR c/77423
6500 * c-common.c (bool_promoted_to_int_p): New function.
6501 (expr_has_boolean_operands_p): New function.
6502 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6503 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6504
21234eb5
TV
65052016-09-04 Tom de Vries <tom@codesourcery.com>
6506
6507 revert:
6508 2016-08-29 Tom de Vries <tom@codesourcery.com>
6509
6510 * c-common.c (build_va_arg): Replace first argument type error
6511 with assert.
6512
9dc5773f
JJ
65132016-09-02 Jakub Jelinek <jakub@redhat.com>
6514
6515 PR c/65467
6516 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6517 (c_finish_omp_for): Reject _Atomic qualified iterators.
6518
65192016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6520
6521 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6522 size to guarantee it fits the output of the formatted function
6523 regardless of its arguments.
6524
295844f6
MP
65252016-09-01 Marek Polacek <polacek@redhat.com>
6526
6527 PR c/7652
6528 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6529 FALLTHRU comments.
6530
3d06b6f2
MP
65312016-08-29 Marek Polacek <polacek@redhat.com>
6532
6533 PR c/77292
6534 * c-common.c (warn_logical_not_parentheses): Don't warn for
6535 a comparison or a logical operator.
6536
34cedad5
TV
65372016-08-29 Tom de Vries <tom@codesourcery.com>
6538
6539 * c-common.c (build_va_arg): Fix type comparison assert.
6540
f162d717
TV
65412016-08-29 Tom de Vries <tom@codesourcery.com>
6542
6543 * c-common.c (build_va_arg): Replace first argument type error
6544 with assert.
6545
ba9bbd6f
TV
65462016-08-29 Tom de Vries <tom@codesourcery.com>
6547
6548 PR c/77398
6549 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6550 with error_mark_node as va_list instead of with illegal va_list.
6551
ebef225f
MP
65522016-08-25 Marek Polacek <polacek@redhat.com>
6553 David Malcolm <dmalcolm@redhat.com>
6554
6555 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6556 * c-common.h (warn_logical_not_parentheses): Update declaration.
6557
b00e6e75
MP
65582016-08-22 Marek Polacek <polacek@redhat.com>
6559
6560 PR c++/77321
6561 * c-common.c (warn_for_memset): Check type for null.
6562
6dc198e3
JM
65632016-08-22 Joseph Myers <joseph@codesourcery.com>
6564
14ec014e 6565 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6566 _FloatNx types for suffixes for built-in functions.
6567
c65699ef
JM
65682016-08-19 Joseph Myers <joseph@codesourcery.com>
6569
6570 PR c/32187
6571 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6572 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6573 (RID_FLOAT128X): New enum rid values.
6574 (CASE_RID_FLOATN_NX): New macro.
6575 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6576 keywords.
6577 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6578 corresponding complex types.
6579 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6580 _FloatNx and corresponding complex types.
6581 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6582 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6583 and _FloatNx types for the widest type for determining
6584 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6585 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6586 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6587 and _FloatNx types.
6588 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6589 constants.
6590 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6591 _FloatNx types.
6592
cc015f3a
DM
65932016-08-18 David Malcolm <dmalcolm@redhat.com>
6594
6595 * c-opts.c (c_diagnostic_finalizer): Update for change to
6596 diagnostic_show_locus.
6597
cb18fd07
DM
65982016-08-18 David Malcolm <dmalcolm@redhat.com>
6599
6600 * c-common.c: Include "spellcheck.h".
6601 (cb_get_suggestion): New function.
6602 * c-common.h (cb_get_suggestion): New decl.
6603 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6604 cb_get_suggestion.
6605
a76989dc
MP
66062016-08-18 Marek Polacek <polacek@redhat.com>
6607
6608 PR c/71514
6609 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6610 and pointer-to-VLA.
6611
65e736c0
DM
66122016-08-16 David Malcolm <dmalcolm@redhat.com>
6613
6614 PR c/72857
6615 * c-common.c (substring_loc::get_range): Rename to...
6616 (substring_loc::get_location): ...this, converting param from a
6617 source_range * to a location_t *. Call
6618 get_source_location_for_substring rather than
6619 get_source_range_for_substring, and pass in m_caret_idx.
6620 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6621 (substring_loc::get_range): Replace with...
6622 (substring_loc::get_location): ...this.
6623 (substring_loc::set_caret_index): New method.
6624 (substring_loc): Add field m_caret_idx.
6625 * c-format.c (format_warning_va): Update for above changes.
6626 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6627 clashing with type name.
6628 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6629 (check_argument_type): Likewise.
6630 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6631 Use a copy when emitting warnings, setting the caret index from TYPE.
6632
7e1dde14 66332016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6634 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6635
6636 * c-ada-spec.c (dump_number): New function.
6637 (handle_escape_character): Likewise.
6638 (print_ada_macros): Add handling of constant integers and strings.
6639
191816a3
MP
66402016-08-12 Marek Polacek <polacek@redhat.com>
6641
6642 PR c/7652
6643 * c-common.c (scalar_to_vector): Adjust fall through comment.
6644 * c-opts.c (c_common_handle_option): Likewise.
6645 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6646 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6647 fall through comment.
6648 * cilk.c (extract_free_variables): Add FALLTHRU.
6649
452df4a4
JM
66502016-08-10 Jason Merrill <jason@redhat.com>
6651
6652 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6653
f3365c12
JM
66542016-08-09 Jason Merrill <jason@redhat.com>
6655
6656 * c-common.c (c_common_attribute_table): vector_size affects type
6657 identity.
6658
f0bc3323
MP
66592016-08-09 Marek Polacek <polacek@redhat.com>
6660
6661 PR c/7652
6662 * c-ada-spec.c (dump_generic_ada_node): Add return.
6663
98e5a19a
JM
66642016-08-09 Jason Merrill <jason@redhat.com>
6665
6666 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6667 C++17 constexpr lambdas.
6668
895aa8e1
DM
66692016-08-08 David Malcolm <dmalcolm@redhat.com>
6670
6671 PR c/64955
6672 * c-common.h (selftest::c_format_c_tests): New declaration.
6673 (selftest::run_c_tests): New declaration.
6674 * c-format.c: Include "selftest.h.
6675 (format_warning_va): Add param "corrected_substring" and use
6676 it to add a replacement fix-it hint.
6677 (format_warning_at_substring): Likewise.
6678 (format_warning_at_char): Update for new param of
6679 format_warning_va.
6680 (argument_parser::check_argument_type): Pass "fki" to
6681 check_format_types.
6682 (check_format_types): Add param "fki" and pass it to
6683 format_type_warning.
6684 (deref_n_times): New function.
6685 (get_modifier_for_format_len): New function.
6686 (selftest::test_get_modifier_for_format_len): New function.
6687 (get_format_for_type): New function.
6688 (format_type_warning): Add param "fki" and use it to attempt
6689 to provide hints for argument types when calling
6690 format_warning_at_substring.
6691 (selftest::get_info): New function.
6692 (selftest::assert_format_for_type_streq): New function.
6693 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6694 (selftest::test_get_format_for_type_printf): New function.
6695 (selftest::test_get_format_for_type_scanf): New function.
6696 (selftest::c_format_c_tests): New function.
6697
e52ed3fe
DM
66982016-08-08 David Malcolm <dmalcolm@redhat.com>
6699
6700 PR c/52952
6701 * c-format.c: Include "diagnostic.h".
6702 (location_column_from_byte_offset): Delete.
6703 (location_from_offset): Delete.
6704 (format_warning_va): New function.
6705 (format_warning_at_substring): New function.
6706 (format_warning_at_char): New function.
6707 (check_format_arg): Capture location of format_tree and pass to
6708 check_format_info_main.
6709 (argument_parser): Add fields "start_of_this_format" and
6710 "format_string_cst".
6711 (flag_chars_t::validate): Add param "format_string_cst". Convert
6712 warning_at call using location_from_offset to call to
6713 format_warning_at_char.
6714 (argument_parser::argument_parser): Add param "format_string_cst_"
6715 and use use it to initialize field "format_string_cst".
6716 Initialize new field "start_of_this_format".
6717 (argument_parser::read_format_flags): Convert warning_at call
6718 using location_from_offset to a call to format_warning_at_char.
6719 (argument_parser::read_any_format_left_precision): Likewise.
6720 (argument_parser::read_any_format_precision): Likewise.
6721 (argument_parser::read_any_other_modifier): Likewise.
6722 (argument_parser::find_format_char_info): Likewise, in three places.
6723 (argument_parser::parse_any_scan_set): Likewise, in one place.
6724 (argument_parser::handle_conversions): Likewise, in two places.
6725 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6726 and use it to make a substring_loc. Pass the latter to
6727 check_format_types.
6728 (check_format_info_main): Add params "fmt_param_loc" and
6729 "format_string_cst". Convert warning_at calls using
6730 location_from_offset to calls to format_warning_at_char. Pass the
6731 new params to the arg_parser ctor. Pass "format_string_cst" to
6732 flag_chars.validate. Pass "fmt_param_loc" to
6733 arg_parser.check_argument_type.
6734 (check_format_types): Convert first param from a location_t
6735 to a const substring_loc & and rename to "fmt_loc". Attempt
6736 to extract the range of the relevant parameter and pass it
6737 to format_type_warning.
6738 (format_type_warning): Convert first param from a location_t
6739 to a const substring_loc & and rename to "fmt_loc". Add
6740 params "param_range" and "type". Replace calls to warning_at
6741 with calls to format_warning_at_substring.
6742
1c4d457e
DM
67432016-08-08 David Malcolm <dmalcolm@redhat.com>
6744
6745 * c-format.c (class flag_chars_t): New class.
6746 (struct length_modifier): New struct.
6747 (class argument_parser): New class.
6748 (flag_chars_t::flag_chars_t): New ctor.
6749 (flag_chars_t::has_char_p): New method.
6750 (flag_chars_t::add_char): New method.
6751 (flag_chars_t::validate): New method.
6752 (flag_chars_t::get_alloc_flag): New method.
6753 (flag_chars_t::assignment_suppression_p): New method.
6754 (argument_parser::argument_parser): New ctor.
6755 (argument_parser::read_any_dollar): New method.
6756 (argument_parser::read_format_flags): New method.
6757 (argument_parser::read_any_format_width): New method.
6758 (argument_parser::read_any_format_left_precision): New method.
6759 (argument_parser::read_any_format_precision): New method.
6760 (argument_parser::handle_alloc_chars): New method.
6761 (argument_parser::read_any_length_modifier): New method.
6762 (argument_parser::read_any_other_modifier): New method.
6763 (argument_parser::find_format_char_info): New method.
6764 (argument_parser::validate_flag_pairs): New method.
6765 (argument_parser::give_y2k_warnings): New method.
6766 (argument_parser::parse_any_scan_set): New method.
6767 (argument_parser::handle_conversions): New method.
6768 (argument_parser::check_argument_type): New method.
6769 (check_format_info_main): Introduce classes argument_parser
6770 and flag_chars_t, moving the code within the loop into methods
6771 of these classes. Make various locals "const".
6772
88fa5555
DM
67732016-08-05 David Malcolm <dmalcolm@redhat.com>
6774
6775 * c-common.c: Include "substring-locations.h".
6776 (get_cpp_ttype_from_string_type): New function.
6777 (g_string_concat_db): New global.
6778 (substring_loc::get_range): New method.
6779 * c-common.h (g_string_concat_db): New declaration.
6780 (class substring_loc): New class.
6781 * c-lex.c (lex_string): When concatenating strings, capture the
6782 locations of all tokens using a new obstack, and record the
6783 concatenation locations within g_string_concat_db.
6784 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6785 on the ggc-heap.
6786
78169471
MP
67872016-07-29 Marek Polacek <polacek@redhat.com>
6788
638fc14f
MP
6789 PR c/71926
6790 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6791 parentheses warning.
6792
78169471
MP
6793 PR c/71574
6794 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6795
1225d6b1
ML
67962016-07-28 Martin Liska <mliska@suse.cz>
6797
6798 PR gcov-profile/68025
6799 * c-common.c (handle_no_profile_instrument_function_attribute):
6800
ec1e2a40
BE
68012016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6802
6803 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6804 BITS_PER_UNIT_LOG.
6805
5ec2cd9f
JM
68062016-07-25 Jason Merrill <jason@redhat.com>
6807
6808 PR c++/65970
6809 * c.opt (fconstexpr-loop-limit): New.
6810
9dc5773f 68112016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6812
6813 PR c++/71675
6814 * c-common.c (resolve_overloaded_builtin): Avoid converting
6815 __atomic_compare_exchange_n return type to that of what its
6816 first argument points to.
6817
e3fe09c1
UB
68182016-07-22 Uros Bizjak <ubizjak@gmail.com>
6819
6820 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6821 ~(unsigned HOST_WIDE_INT) 0.
6822
bc91c436
ML
68232016-07-22 Martin Liska <mliska@suse.cz>
6824
6825 PR gcov-profile/69028
6826 PR gcov-profile/62047
6827 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6828 to the current_function_decl.
6829
451dcc66
JM
68302016-07-21 Jason Merrill <jason@redhat.com>
6831
6832 PR c++/65168
6833 * c-common.c (c_common_truthvalue_conversion): Check
6834 c_inhibit_evaluation_warnings for warning about address of
6835 reference.
6836
de6a69ee
DM
68372016-07-20 David Malcolm <dmalcolm@redhat.com>
6838
6839 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6840 const char *.
6841
d022c55a
JM
68422016-07-15 Jason Merrill <jason@redhat.com>
6843
6844 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6845
ddbbcb19
JJ
68462016-07-15 Jakub Jelinek <jakub@redhat.com>
6847
6848 PR c/71858
6849 * c-common.h (enum lookup_name_fuzzy_kind): Add
6850 FUZZY_LOOKUP_FUNCTION_NAME.
6851
d0cf395a
JM
68522016-07-08 Jason Merrill <jason@redhat.com>
6853
6854 P0145: Refining Expression Order for C++.
6855 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6856 * c-opts.c: Adjust.
6857
98d44e93
MT
68582016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6859
6860 PR c++/71214
6861 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6862
f9d8d994
TS
68632016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6864
6865 * c-pragma.h (enum pragma_kind): Rename
6866 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6867 users.
6868
4aa83879
RB
68692016-06-29 Richard Biener <rguenther@suse.de>
6870
6871 PR middle-end/71002
6872 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6873
a25bd9e6
JM
68742016-06-24 Jason Merrill <jason@redhat.com>
6875
6876 P0145R2: Refining Expression Order for C++.
6877 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6878 MODIFY_EXPR.
6879
a86451b9
JJ
68802016-06-24 Jakub Jelinek <jakub@redhat.com>
6881
6882 * c-common.c (check_builtin_function_arguments): Require last
6883 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6884 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6885 if the last argument is pointer to enumerated or boolean type.
6886
1a4f11c8
DM
68872016-06-22 David Malcolm <dmalcolm@redhat.com>
6888
6889 PR c/70339
6890 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6891 (lookup_name_fuzzy): New prototype.
6892
fe55692c
JDA
68932016-06-21 John David Anglin <danglin@gcc.gnu.org>
6894
6895 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6896
4eb24e01
JM
68972016-06-14 Jason Merrill <jason@redhat.com>
6898
6899 P0145R2: Refining Expression Order for C++.
6900 * c.opt (fargs-in-order): New.
6901 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6902
ef7cf206
JJ
69032016-06-13 Jakub Jelinek <jakub@redhat.com>
6904
0dda258b
JJ
6905 PR sanitizer/71498
6906 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6907 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6908
ef7cf206
JJ
6909 PR preprocessor/71183
6910 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6911 to cb_get_source_date_epoch.
6912
50b15873
JJ
69132016-06-10 Jakub Jelinek <jakub@redhat.com>
6914
6915 PR c/68657
6916 * c.opt (Wpsabi): Add Warning flag.
6917
4d926e34
MS
69182016-06-10 Martin Sebor <msebor@redhat.com>
6919
6920 PR c/71392
14ec014e 6921 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6922 the nonnull attribute in type-generic builtins.
6923
e01b4e16
MS
69242016-06-09 Martin Sebor <msebor@redhat.com>
6925
6926 PR c/70883
6927 * c-common.c (builtin_function_validate_nargs): Make text of error
6928 message consistent with others like it.
6929
44a845ca
MS
69302016-06-08 Martin Sebor <msebor@redhat.com>
6931 Jakub Jelinek <jakub@redhat.com>
6932
6933 PR c++/70507
6934 PR c/68120
6935 * c-common.c (check_builtin_function_arguments): Handle
6936 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6937
a80a7051
RB
69382016-06-08 Richard Biener <rguenther@suse.de>
6939
6940 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6941
bfd67b47
RB
69422016-06-07 Richard Biener <rguenther@suse.de>
6943
6944 PR c/61564
6945 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6946 options and warn about others.
6947
15c98b2e
ES
69482016-06-01 Eduard Sanou <dhole@openmailbox.org>
6949
6950 * c-common.c (get_source_date_epoch): Rename to
6951 cb_get_source_date_epoch.
6952 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6953 message when the parsing fails. Use error_at instead of fatal_error.
6954 * c-common.h (get_source_date_epoch): Rename to
6955 cb_get_source_date_epoch.
6956 * c-common.h (cb_get_source_date_epoch): Prototype.
6957 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6958 * c-common.h (c_omp_region_type): Remove trailing comma.
6959 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6960 * c-lex.c (c_lex_with_flags): Remove initialization of
6961 pfile->source_date_epoch.
6962
00631022
JJ
69632016-05-30 Jakub Jelinek <jakub@redhat.com>
6964
6965 PR c++/71349
6966 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6967 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6968 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6969 instead of C_OMP_CLAUSE_SPLIT_FOR.
6970
f17a223d
RB
69712016-05-24 Richard Biener <rguenther@suse.de>
6972
6973 PR middle-end/70434
6974 PR c/69504
6975 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6976 (convert_vector_to_array_for_subscript): ... this.
6977 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6978 VIEW_CONVERT_EXPR to an array type. Rename to ...
6979 (convert_vector_to_array_for_subscript): ... this.
6980
4f2e1536
MP
69812016-05-12 Marek Polacek <polacek@redhat.com>
6982
6983 PR c/70756
6984 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6985 size_in_bytes and pass LOC to it.
6986
d6e83a8d
MM
69872016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6988
6989 PR c/43651
6990 * c.opt (Wduplicate-decl-specifier): New option.
6991
5c3a10fb
MP
69922016-05-11 Marek Polacek <polacek@redhat.com>
6993
6994 PR c++/71024
6995 * c-common.c (diagnose_mismatched_attributes): New function.
6996 * c-common.h (diagnose_mismatched_attributes): Declare.
6997
deef7113
MP
69982016-05-04 Marek Polacek <polacek@redhat.com>
6999
7000 * c.opt (Wdangling-else): New option.
7001
79ce98bc
MP
70022016-05-03 Marek Polacek <polacek@redhat.com>
7003
7004 PR c/70859
7005 * c-common.c (builtin_function_validate_nargs): Add location
7006 parameter. Use it.
7007 (check_builtin_function_arguments): Add location and arguments
7008 parameters. Use them.
7009 * c-common.h (check_builtin_function_arguments): Update declaration.
7010
381cdae4
RB
70112016-05-03 Richard Biener <rguenther@suse.de>
7012
7013 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7014 allow call args to gimplify to SSA names.
7015
1d793c34
MP
70162016-05-03 Marek Polacek <polacek@redhat.com>
7017
7018 * c-common.h (enum c_omp_region_type): Remove stray comma.
7019
77886428
CP
70202016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7021
7022 * c-common.h (enum c_omp_region_type): Define.
7023
697e0b28
RS
70242016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7025
7026 * c-common.c (shorten_compare): Use wi::to_wide.
7027
e7ff0319
CP
70282016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7029
7030 PR middle-end/70626
7031 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7032 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7033 reduction clauses in acc parallel loops.
7034
2fff3db8
MP
70352016-04-29 Marek Polacek <polacek@redhat.com>
7036
7037 PR c/70852
7038 * c-common.c (warn_for_memset): Check domain before accessing it.
7039
509063eb
DV
70402016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7041
7042 PR/69089
7043 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7044 "aligned" attribute.
7045
b632761d
JM
70462016-04-28 Jason Merrill <jason@redhat.com>
7047
7048 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7049
174f6622
ES
70502016-04-28 Eduard Sanou <dhole@openmailbox.org>
7051 Matthias Klose <doko@debian.org>
7052
7053 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7054 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7055 handling.
7056 * c-common.h (get_source_date_epoch): Prototype.
7057 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7058
6bc2bb18
RB
70592015-04-27 Ryan Burn <contact@rnburn.com>
7060
7061 PR c++/69024
7062 PR c++/68997
7063 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7064 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7065 external linkage.
7066 (cilk_detect_and_unwrap): Corresponding changes.
7067 (extract_free_variables): Don't extract free variables from
7068 AGGR_INIT_EXPR slot.
7069 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7070 (cilk_recognize_spawn): Likewise.
7071
c1e1f433
BS
70722016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7073
7074 * c.opt (Wmemset-elt-size): New option.
7075 * c-common.c (warn_for_memset): New function.
7076 * c-common.h (warn_for_memset): Declare.
7077
d067e05f
JM
70782016-04-25 Jason Merrill <jason@redhat.com>
7079
7080 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7081 No longer static.
7082 * c-common.h: Declare it.
7083 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7084
9aa36ae5
JM
70852016-04-22 Jason Merrill <jason@redhat.com>
7086
7087 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7088
477d4906
IV
70892016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7090
7091 PR c++/69363
7092 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7093 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7094
fe37c7af
MM
70952016-04-18 Michael Matz <matz@suse.de>
7096
7097 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7098 and SET_DECL_ALIGN.
7099
23f2660f
EB
71002016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7101
7102 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7103 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7104 to incomplete types.
7105 (dump_nested_type): Remove redundant tests and tidy up.
7106 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7107 a type which is the typedef of an original type.
7108
1e77281b
MP
71092016-04-15 Marek Polacek <polacek@redhat.com>
7110
7111 PR c/70651
7112 * c-common.c (build_va_arg): Change two asserts into errors and return
7113 error_mark_node.
7114
b3a77f21
MP
71152016-04-13 Marek Polacek <polacek@redhat.com>
7116
7117 PR c++/70639
7118 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7119 for switch statements, too.
7120
322b8466
JM
71212016-03-28 Jason Merrill <jason@redhat.com>
7122
7123 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7124
fbdb6baf
MP
71252016-03-23 Marek Polacek <polacek@redhat.com>
7126
7127 PR c++/69884
7128 * c.opt (Wignored-attributes): New option.
7129
5c240f4d
DM
71302016-03-22 David Malcolm <dmalcolm@redhat.com>
7131
7132 PR c/69993
7133 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7134 diagnostic text, reversing the order of the warning and note so
7135 that they appear in source order.
7136
14ba7b28
MP
71372016-03-17 Marek Polacek <polacek@redhat.com>
7138
7139 PR c/69407
7140 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7141 operations.
7142
08a1cadc
JM
71432016-03-14 Jason Merrill <jason@redhat.com>
7144
2aaeea19
JM
7145 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7146
08a1cadc
JM
7147 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7148
c06d25bb
RB
71492016-03-09 Richard Biener <rguenther@suse.de>
7150
7151 PR c/70143
7152 * c-common.c (strict_aliasing_warning): Add back
7153 alias_sets_conflict_p check.
7154
80aac5c8
JM
71552016-03-08 Jason Merrill <jason@redhat.com>
7156
7157 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7158
64b23c13
DM
71592016-03-04 David Malcolm <dmalcolm@redhat.com>
7160
7161 PR c/68187
7162 * c-indentation.c (get_visual_column): Move code to determine next
7163 tab stop to...
7164 (next_tab_stop): ...this new function.
7165 (line_contains_hash_if): Delete function.
7166 (detect_preprocessor_logic): Delete function.
7167 (get_first_nws_vis_column): New function.
7168 (detect_intervening_unindent): New function.
7169 (should_warn_for_misleading_indentation): Replace call to
7170 detect_preprocessor_logic with a call to
7171 detect_intervening_unindent.
7172
729526f5
DM
71732016-03-04 David Malcolm <dmalcolm@redhat.com>
7174
7175 PR c/68187
7176 * c-indentation.c (should_warn_for_misleading_indentation): When
7177 suppressing warnings about cases where the guard and body are on
7178 the same column, only use the first non-whitespace column in place
7179 of the guard token column when dealing with "else" clauses.
7180 When rejecting aligned BODY and NEXT, loosen the requirement
7181 from equality with the first non-whitespace of guard to simply
7182 that they not be indented relative to it.
7183
e9a35493
RB
71842016-03-04 Richard Biener <rguenther@suse.de>
7185
7186 PR c++/70054
7187 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7188 instead of alias_sets_conflict_p.
7189
1be56bc5
MP
71902016-03-01 Marek Polacek <polacek@redhat.com>
7191
7192 PR c++/69795
7193 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7194 any DECL.
7195
35886f0b
MS
71962016-02-22 Martin Sebor <msebor@redhat.com>
7197
7198 PR middle-end/69780
7199 * c-common.c (check_builtin_function_arguments): Validate and
7200 reject invalid arguments to __builtin_alloca_with_align.
7201
4246c8da
MW
72022016-02-20 Mark Wielaard <mjw@redhat.com>
7203
7204 PR c/28901
7205 * c.opt (Wunused-const-variable): Turn into Alias for...
7206 (Wunused-const-variable=): New option.
7207
268be88c
BE
72082016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7209
7210 PR c++/69865
7211 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7212 here...
7213 (c_common_init_options): ...to here.
7214 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7215
871b3f47
JJ
72162016-02-19 Jakub Jelinek <jakub@redhat.com>
7217
7218 PR c++/69826
7219 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7220 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7221 flag_preprocess_only.
7222
bf14eba2
JJ
72232016-02-16 Jakub Jelinek <jakub@redhat.com>
7224
7225 PR c/69835
7226 * c.opt (Wnonnull-compare): Enable for -Wall.
7227
ba6b3795
JJ
72282016-02-15 Jakub Jelinek <jakub@redhat.com>
7229
7230 PR c++/69797
7231 * c-common.c (sync_resolve_size): Diagnose too few arguments
7232 even when params is non-NULL empty vector.
7233
a011cd92
BS
72342016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7235
7236 PR target/60410
7237 * c.opt (fshort-double): Remove.
7238
46cb9332
MS
72392016-02-05 Martin Sebor <msebor@redhat.com>
7240
7241 PR c++/69662
7242 * c.opt (Warning options): Update -Wplacement-new to take
7243 an optional argument.
7244
e1b81f2b
JJ
72452016-02-01 Jakub Jelinek <jakub@redhat.com>
7246
7247 PR preprocessor/69543
7248 PR c/69558
7249 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7250 instead of loc to control_warning_option.
7251
b6adbb9f
NS
72522016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7253
7254 * c.opt (fopenacc-dim=): New option.
7255
5d70666e
RB
72562016-01-27 Ryan Burn <contact@rnburn.com>
7257
7258 PR cilkplus/69267
7259 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7260 gimplify_arg. Removed superfluous post_p argument.
7261 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7262 superfluous post_p argument.
7263 * c-gimplify.c (c_gimplify_expr): Likewise.
7264
01e1dea3
DM
72652016-01-26 David Malcolm <dmalcolm@redhat.com>
7266
7267 PR other/69006
7268 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7269 pp_newline_and_flush with pp_flush.
7270
9f04a53e
MS
72712016-01-20 Martin Sebor <msebor@redhat.com>
7272
7273 PR c/69405
7274 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7275 an incompatible argument when the argument isn't a valid tree node.
7276
7f26f7df
JM
72772016-01-18 Jason Merrill <jason@redhat.com>
7278
7279 PR c++/68767
7280 * c-common.c (check_function_arguments_recurse): Fold the whole
7281 COND_EXPR, not just the condition.
7282
f62bf092
TV
72832016-01-18 Tom de Vries <tom@codesourcery.com>
7284
7285 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7286 classify as loop clause.
7287
e0a575ff
JJ
72882016-01-15 Jakub Jelinek <jakub@redhat.com>
7289
7290 PR bootstrap/68271
7291 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7292 C++ FE no longer has limit on number of pragmas.
7293
72942015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7295
7296 PR c++/69048
7297 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7298 to add missing cleanup point.
b6e3db06 7299
c7df95d8
DM
73002016-01-14 David Malcolm <dmalcolm@redhat.com>
7301
7302 PR c++/68819
7303 * c-indentation.c (get_visual_column): Add location_t param.
7304 Handle the column number being zero by effectively disabling the
7305 warning, with an "inform".
7306 (should_warn_for_misleading_indentation): Add location_t argument
7307 for all uses of get_visual_column.
7308
21efdd80
PP
73092016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7310
7311 PR c++/69029
7312 * c-indentation.c (should_warn_for_misleading_indentation):
7313 Don't warn about do-while statements.
7314
7a127fa7
MS
73152016-01-07 Martin Sebor <msebor@redhat.com>
7316
7317 PR c/68966
7318 * c-common.c (sync_resolve_size): Reject first argument when it's
7319 a pointer to _Bool.
7320
c589e975
DM
73212016-01-05 David Malcolm <dmalcolm@redhat.com>
7322
7323 PR c/69122
7324 * c-indentation.c (get_visual_column): Remove default argument.
7325 (should_warn_for_misleading_indentation): For the multiline case,
7326 update call to get_visual_column for next_stmt_exploc so that it
7327 captures the location of the first non-whitespace character in the
7328 relevant line. Don't issue warnings if there is non-whitespace
7329 before the next statement.
7330
818ab71a
JJ
73312016-01-04 Jakub Jelinek <jakub@redhat.com>
7332
7333 Update copyright years.
7334
745e411d
DM
73352015-12-21 David Malcolm <dmalcolm@redhat.com>
7336
7337 * c-common.c (binary_op_error): Convert first param from
7338 location_t to rich_location * and use it when emitting an error.
7339 * c-common.h (binary_op_error): Convert first param from
7340 location_t to rich_location *.
7341
de67c4c3
DM
73422015-12-16 David Malcolm <dmalcolm@redhat.com>
7343
7344 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7345 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7346
4a38b02b
IV
73472015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7348
7349 * c-common.c (c_common_attribute_table): Handle "omp declare target
7350 link" attribute.
7351
54d62f51
JJ
73522015-12-14 Jakub Jelinek <jakub@redhat.com>
7353
7354 PR c/68833
7355 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7356
8d4227c8
TB
73572014-12-12 Tobias Burnus <burnus@net-b.de>
7358
7359 PR fortran/68815
7360 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7361 specifiers (%d, %i,%u and %c).
7362
f6069ccc
DM
73632015-12-10 David Malcolm <dmalcolm@redhat.com>
7364
7365 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7366
63bbf46d
JJ
73672015-12-08 Jakub Jelinek <jakub@redhat.com>
7368
7369 PR c/48088
7370 PR c/68657
7371 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7372 * c-pragma.c (handle_pragma_diagnostic): Adjust
7373 control_warning_option caller.
7374
f79520bb
DM
73752015-12-07 David Malcolm <dmalcolm@redhat.com>
7376
7377 * c-common.c (c_cpp_error): Update for change to
7378 rich_location::set_range.
7379
b3d5bc62
JJ
73802015-12-04 Paolo Bonzini <bonzini@gnu.org>
7381
7382 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7383 shifting 1 out of the sign bit.
7384
73852015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7386
7387 * c-common.c (c_common_attribute_table[]): Update max arguments
7388 count for "simd" attribute.
7389 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7390
6eb4a537
JJ
73912015-12-03 Jakub Jelinek <jakub@redhat.com>
7392
7393 PR preprocessor/57580
7394 * c-ppoutput.c (print): Change printed field to bool.
7395 Move src_file last for smaller padding.
7396 (init_pp_output): Set print.printed to false instead of 0.
7397 (scan_translation_unit): Fix up formatting. Set print.printed
7398 to true after printing something other than newline.
7399 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7400 (maybe_print_line_1): Set print.printed to false instead of 0.
7401 (print_line_1): Likewise.
7402 (do_line_change): Set print.printed to true instead of 1.
7403 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7404 dump_macro): Set print.printed to false after printing newline.
7405
4250754e
JM
74062015-12-02 Jason Merrill <jason@redhat.com>
7407
f479b43d
JM
7408 * c-common.c (fold_for_warn): New.
7409 (warn_logical_operator, warn_tautological_cmp)
7410 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7411
4250754e
JM
7412 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7413 (c_fully_fold_internal, decl_constant_value_for_optimization):
7414 Move to c/c-fold.c.
7415 * c-common.h: Don't declare decl_constant_value_for_optimization.
7416
e9e32ee6
JM
74172015-12-02 Joseph Myers <joseph@codesourcery.com>
7418
7419 PR c/68162
7420 * c-common.h (c_build_qualified_type): Add extra default
7421 arguments.
7422
37d5ad46
JB
74232015-12-01 Julian Brown <julian@codesourcery.com>
7424 Cesar Philippidis <cesar@codesourcery.com>
7425 James Norris <James_Norris@mentor.com>
7426
7427 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7428 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7429 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7430
f07862c7
EB
74312015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7432
7433 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7434 (decl_sloc_common): Delete and move bulk of processing to...
7435 (decl_sloc): ...here.
7436 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7437 (dump_ada_double_name): Remove S parameter and compute the suffix.
7438 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7439 element type and deal with an anonymous one.
7440 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7441 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7442 and remove reference to QUAL_UNION_TYPE.
7443 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7444 (dump_nested_type): ...here. New function extracted from above.
7445 Generate a full declaration for anonymous element type of arrays.
7446 (print_ada_declaration): Really skip anonymous declarations. Remove
7447 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7448 Clean up processing of declarations of array types and objects.
7449 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7450 Remove obsolete code and tidy up.
7451
75c8aac3
JH
74522015-11-29 Jan Hubicka <hubicka@ucw.cz>
7453
7454 PR c/67581
7455 * c-common.c (handle_transparent_union_attribute): Update
7456 also type variants.
7457
b58d3df2
ML
74582015-11-27 Martin Liska <mliska@suse.cz>
7459
7460 PR c++/68312
7461 * array-notation-common.c (cilkplus_extract_an_triplets):
7462 Release vector of vectors.
7463 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7464
89a01fcf
EB
74652015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7466
7467 PR c++/68527
7468 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7469 (print_ada_struct_decl): Likewise.
7470
cc5c5226
IZ
74712015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7472
7473 PR c++/68001
7474 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7475 * cilk.c (recognize_spawn): Determine location in a more precise
7476 way.
7477
269adb9d
JM
74782015-11-19 Jason Merrill <jason@redhat.com>
7479
7480 * c-common.c (shorten_compare): But look through macros from
7481 system headers.
7482
d0eccfcd
JM
74832015-11-18 Jason Merrill <jason@redhat.com>
7484
7485 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7486 non-constant operand comes from a macro.
7487
3e44547c
JM
74882015-11-17 Jason Merrill <jason@redhat.com>
7489
7490 PR bootstrap/68346
7491 * c-common.c (warn_tautological_cmp): Fold before checking for
7492 constants.
7493
0f62c7a0
MP
74942015-11-16 Marek Polacek <polacek@redhat.com>
7495
7496 PR c++/68362
7497 * c-common.c (check_case_bounds): Fold low and high cases.
7498
a868811e
MP
74992015-11-16 Marek Polacek <polacek@redhat.com>
7500
7501 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7502 * c-common.c (c_common_get_alias_set): Likewise.
7503 (handle_visibility_attribute): Likewise.
7504
fff77217
KY
75052015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7506
7507 * c-common.c (handle_simd_attribute): New.
7508 (struct attribute_spec): Add entry for "simd".
7509 (handle_simd_attribute): New.
7510
269e63b7
KT
75112015-11-13 Kai Tietz <ktietz70@googlemail.com>
7512
7513 * c-lex.c (interpret_float): Use fold_convert.
7514
ebedc9a3
DM
75152015-11-13 David Malcolm <dmalcolm@redhat.com>
7516
7517 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7518 and store it on the result.
7519 * c-opts.c (c_common_init_options): Set
7520 global_dc->colorize_source_p.
7521
6e232ba4
JN
75222015-11-12 James Norris <jnorris@codesourcery.com>
7523 Joseph Myers <joseph@codesourcery.com>
7524
7365279f 7525 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7526 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7527 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7528 PRAGMA_OACC_CLAUSE_LINK.
7529
e78bede6
MP
75302015-11-11 Marek Polacek <polacek@redhat.com>
7531
7532 PR c/68107
7533 PR c++/68266
7534 * c-common.c (valid_array_size_p): New function.
7535 * c-common.h (valid_array_size_p): Declare.
7536
3f8257db 75372015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7538
7539 PR bootstrap/68271
7540 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7541
69f293c9
AM
75422015-11-11 Andrew MacLeod <amacleod@redhat.com>
7543
7544 * array-notation-common.c: Remove unused header files.
7545 * c-ada-spec.c: Likewise.
7546 * c-cilkplus.c: Likewise.
7547 * c-common.c: Likewise.
7548 * c-cppbuiltin.c: Likewise.
7549 * c-dump.c: Likewise.
7550 * c-format.c: Likewise.
7551 * c-gimplify.c: Likewise.
7552 * c-indentation.c: Likewise.
7553 * c-lex.c: Likewise.
7554 * c-omp.c: Likewise.
7555 * c-opts.c: Likewise.
7556 * c-pch.c: Likewise.
7557 * c-ppoutput.c: Likewise.
7558 * c-pragma.c: Likewise.
7559 * c-pretty-print.c: Likewise.
7560 * c-semantics.c: Likewise.
7561 * c-ubsan.c: Likewise.
7562 * cilk.c: Likewise.
7563 * stub-objc.c: Likewise.
7564
3a40d81d
NS
75652015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7566 Cesar Philippidis <cesar@codesourcery.com>
7567 James Norris <jnorris@codesourcery.com>
7568 Julian Brown <julian@codesourcery.com>
7569 Nathan Sidwell <nathan@codesourcery.com>
7570
7571 * c-pragma.c (oacc_pragmas): Add "routine".
7572 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7573
ee45a32d
EB
75742015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7575
7576 * c-common.c (c_common_attributes): Add scalar_storage_order.
7577 (handle_scalar_storage_order_attribute): New function.
7578 * c-pragma.c (global_sso): New variable.
7579 (maybe_apply_pragma_scalar_storage_order): New function.
7580 (handle_pragma_scalar_storage_order): Likewise.
7581 (init_pragma): Register scalar_storage_order.
7582 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7583 * c.opt (Wscalar-storage-order): New warning.
7584 (fsso-struct=): New option.
7585
eb11eb15
MS
75862015-11-08 Martin Sebor <msebor@redhat.com>
7587
7588 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7589
0aad0198
RS
75902015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7591
7592 * c-common.c: Don't undef DEF_BUILTIN.
7593
8a645150
DM
75942015-11-06 David Malcolm <dmalcolm@redhat.com>
7595
7596 * c-common.c (c_cpp_error): Convert parameter from location_t to
7597 rich_location *. Eliminate the "column_override" parameter and
7598 the call to diagnostic_override_column.
7599 Update the "done_lexing" clause to set range 0
7600 on the rich_location, rather than overwriting a location_t.
7601 * c-common.h (c_cpp_error): Convert parameter from location_t to
7602 rich_location *. Eliminate the "column_override" parameter.
7603
7a5e4956
CP
76042015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7605 Thomas Schwinge <thomas@codesourcery.com>
7606 James Norris <jnorris@codesourcery.com>
7607
7608 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7609 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7610 clauses with parallel and kernels and loops.
7611 * c-pragma.h (enum pragma_omp_clause): Add entries for
7612 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7613 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7614 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7615 INDEPENDENT,SEQ}.
7616 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7617
e2f5cc96
MS
76182015-11-05 Martin Sebor <msebor@redhat.com>
7619
7620 PR c++/67942
7621 * c.opt (-Wplacement-new): New option.
7622
e01d41e5
JJ
76232015-11-05 Jakub Jelinek <jakub@redhat.com>
7624
7625 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7626 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7627 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7628 save_expr or create_tmp_var* if TEST is true.
7629 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7630 Don't call add_stmt here.
7631 (struct c_omp_check_loop_iv_data): New type.
7632 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7633 c_omp_check_loop_iv_exprs): New functions.
7634 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7635 distribute.
7636 (c_omp_declare_simd_clauses_to_numbers): Change
7637 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7638 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7639 from numbers to PARM_DECLs.
7640
595278be
MM
76412015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7642
7643 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7644 flag_checking.
7645
3f8257db 76462015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7647
7648 PR c++-common/67882
b3d5bc62
JJ
7649 * c-common.h (fold_offsetof_1): Add argument.
7650 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7651 offsetof expressions that reference elements past the end of
7652 an array.
7653
4bf9e5a8
TS
76542015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7655 Chung-Lin Tang <cltang@codesourcery.com>
7656
7657 * c-pragma.c (oacc_pragmas): Add "atomic".
7658 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7659
3b1661a9
ES
76602015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7661
7662 * c-common.c (handle_target_clones_attribute): New.
7663 (c_common_attribute_table): Add handle_target_clones_attribute.
7664 (handle_always_inline_attribute): Add check on target_clones attribute.
7665 (handle_target_attribute): Ditto.
7666
2adfab87
AM
76672015-10-29 Andrew MacLeod <amacleod@redhat.com>
7668
7669 * array-notation-common.c: Reorder #include's and remove duplicates.
7670 * c-ada-spec.c: Likewise.
7671 * c-cilkplus.c: Likewise.
7672 * c-common.c: Likewise.
7673 * c-cppbuiltin.c: Likewise.
7674 * c-dump.c: Likewise.
7675 * c-format.c: Likewise.
7676 * c-gimplify.c: Likewise.
7677 * c-indentation.c: Likewise.
7678 * c-lex.c: Likewise.
7679 * c-omp.c: Likewise.
7680 * c-opts.c: Likewise.
7681 * c-pch.c: Likewise.
7682 * c-ppoutput.c: Likewise.
7683 * c-pragma.c: Likewise.
7684 * c-pretty-print.c: Likewise.
7685 * c-semantics.c: Likewise.
7686 * c-ubsan.c: Likewise.
7687 * cilk.c: Likewise.
7688 * stub-objc.c: Likewise.
7689
d90ec4f2
JM
76902015-10-28 Jason Merrill <jason@redhat.com>
7691
7692 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7693
88bae6f4
TS
76942015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7695 James Norris <jnorris@codesourcery.com>
7696 Cesar Philippidis <cesar@codesourcery.com>
7697
7698 PR c/64765
7699 PR c/64880
7700 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7701 * c-omp.c (c_oacc_split_loop_clauses): New function.
7702
b1726d6c
MS
77032015-10-21 Martin Sebor <msebor@redhat.com>
7704
7705 PR driver/68043
7706 * c.opt: End each sentence that describes an option with a period.
7707
fa60eeb9
MP
77082015-10-20 Marek Polacek <polacek@redhat.com>
7709
7710 * array-notation-common.c (is_cilkplus_vector_p): Define.
7711 * c-common.h (is_cilkplus_vector_p): Declare.
7712
95979049
MP
77132015-10-20 Marek Polacek <polacek@redhat.com>
7714
7715 * c.opt (std=gnu++11): Do not describe as experimental.
7716 (std=gnu++14): Likewise.
7717
2a9fb712
JM
77182015-10-19 Jason Merrill <jason@redhat.com>
7719
7720 * c-cppbuiltin.c (c_cpp_builtins): Define
7721 __cpp_nontype_template_args.
7722
13b380a3
JM
77232015-10-19 Jason Merrill <jason@redhat.com>
7724
7725 * c-cppbuiltin.c (c_cpp_builtins): Define
7726 __cpp_enumerator_attributes, __cpp_fold_expressions,
7727 __cpp_unicode_characters.
7728
d9a6bd32
JJ
77292015-10-13 Jakub Jelinek <jakub@redhat.com>
7730 Aldy Hernandez <aldyh@redhat.com>
7731
7732 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7733 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7734 (c_define_builtins): Likewise.
7735 * c-common.h (enum c_omp_clause_split): Add
7736 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7737 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7738 (c_finish_omp_for): Add ORIG_DECLV argument.
7739 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7740 201511 instead of 201307.
7741 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7742 OMP_CRITICAL_CLAUSES to it.
7743 (c_finish_omp_ordered): Add CLAUSES argument, set
7744 OMP_ORDERED_CLAUSES to it.
7745 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7746 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7747 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7748 constructs and new OpenMP 4.5 clauses. Clear
7749 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7750 verification code.
7751 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7752 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7753 (enum pragma_omp_clause): Add
7754 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7755 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7756
624d31fe
RS
77572015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7758
7759 * c-lex.c (interpret_float): Use real_equal instead of
7760 REAL_VALUES_EQUAL.
7761
b8fd7909
JM
77622015-10-04 Jason Merrill <jason@redhat.com>
7763
7764 Implement N4514, C++ Extensions for Transactional Memory.
7765 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7766 (c_common_attribute_table): Add transaction_safe_dynamic.
7767 transaction_safe now affects type identity.
7768 (handle_tm_attribute): Handle transaction_safe_dynamic.
7769 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7770 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7771 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7772 (D_TRANSMEM): New.
7773 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7774 * c-pretty-print.c (pp_c_attributes_display): Don't print
7775 transaction_safe in C++.
7776
12651878
MP
77772015-10-02 Marek Polacek <polacek@redhat.com>
7778
7779 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7780
3e3b8d63
MP
77812015-10-02 Marek Polacek <polacek@redhat.com>
7782
7783 PR c/64249
7784 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7785 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7786 * c.opt (Wduplicated-cond): New option.
7787
0d1a8f75
JM
77882015-10-01 Joseph Myers <joseph@codesourcery.com>
7789
7790 * c.opt (std=c11): Do not describe as experimental.
7791 (std=gnu11): Likewise.
7792 (std=iso9899:2011): Likewise.
7793
3e32ee19
NS
77942015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7795
7796 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7797 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7798
974348ee
MP
77992015-09-25 Marek Polacek <polacek@redhat.com>
7800
7801 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7802 (ubsan_instrument_shift): Likewise.
7803
15dbc1a6
MP
78042015-09-25 Marek Polacek <polacek@redhat.com>
7805
7806 PR sanitizer/64906
7807 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7808
6b95d7cc
PP
78092015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7810
7811 * c-indentation.c (should_warn_for_misleading_indentation):
7812 Compare next_stmt_vis_column with guard_line_first_nws instead
7813 of with guard_line_vis_column.
7814
c1822f9c
MLI
78152015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7816
7817 PR c/49654
7818 PR c/49655
7819 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7820 options and options not valid for the current language.
7821
d5398058
PP
78222015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7823
7824 * c-indentation.c (should_warn_for_misleading_indentation):
7825 Float out and consolidate the calls to get_visual_column that
7826 are passed guard_exploc as an argument. Compare
7827 next_stmt_vis_column with guard_line_first_nws instead of with
7828 body_line_first_nws.
7829
6b333269
NS
78302015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7831
7832 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7833 Wnamespaces): New C++ warnings.
7834
a75f1574
JM
78352015-09-22 Jason Merrill <jason@redhat.com>
7836
7837 * c-common.h (abi_compat_version_crosses): New.
7838 (warn_abi_version): Declare.
7839 * c-common.c: Define it.
7840 * c-opts.c (c_common_post_options): Handle it.
7841 flag_abi_compat_version defaults to 8.
7842
bdaaa8b7
VV
78432015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7844
7845 Complete the implementation of N4230, Nested namespace definition.
7846 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7847 __cpp_nested_namespace_definitions.
7848
eaa797e8
MLI
78492015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7850
7851 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7852
c4914de6
MLI
78532015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7854
7855 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7856 when warning.
7857 * c-pragma.h (pragma_lex): Add optional loc argument.
7858
fcb87c50
MM
78592015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7860
7861 * c-format.c (check_format_arg): Adjust to use common block size in all
7862 object pools.
7863
31bdd08a
DM
78642015-09-15 David Malcolm <dmalcolm@redhat.com>
7865
7866 * c-format.c (location_from_offset): Update for change in
7867 signature of location_get_source_line.
7868 * c-indentation.c (get_visual_column): Likewise.
7869 (line_contains_hash_if): Likewise.
7870
aa9f4b4c
MP
78712015-09-14 Marek Polacek <polacek@redhat.com>
7872
7873 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7874 setting various warnings.
7875
aa256c4a
MP
78762015-09-14 Marek Polacek <polacek@redhat.com>
7877
7878 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7879 a negative value.
7880
0f876f22
MW
78812015-09-11 Mark Wielaard <mjw@redhat.com>
7882
7883 PR c/28901
7884 * c.opt (Wunused-variable): Option from common.opt.
7885 (Wunused-const-variable): New option.
7886
273aa49e
PC
78872015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7888
7889 PR c++/53184
7890 * c.opt ([Wsubobject-linkage]): Add.
7891
1807ffc1
MS
78922015-09-03 Martin Sebor <msebor@redhat.com>
7893
7894 PR c/66516
7895 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7896 functions.
7897 * c-common.c (reject_gcc_builtin): Define.
7898
38942840
BI
78992015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7900
7901 PR middle-end/60586
7902 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7903 prototype.
7904 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7905 cilk_gimplify_call_params_in_spawned_fn.
7906 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7907 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7908 unwrapping.
7909
c316b5e4
MP
79102015-08-25 Marek Polacek <polacek@redhat.com>
7911
7912 PR middle-end/67330
7913 * c-common.c (handle_weak_attribute): Don't check whether the
7914 visibility can be changed here.
7915
584a7c46
MLI
79162015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7917
7918 * c-lex.c (c_lex_with_flags): Use explicit locations.
7919
a79683d5
TS
79202015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7921
7922 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7923 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7924
61717a45
FXC
79252015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7926
7927 PR middle-end/36757
7928 * c-common.c (check_builtin_function_arguments): Add check
7929 for BUILT_IN_SIGNBIT argument.
7930
329524f5
PC
79312015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7932
7933 PR c++/67160
7934 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7935 in c++1z mode.
7936
4ee55665
MP
79372015-08-17 Marek Polacek <polacek@redhat.com>
7938
7939 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7940 with whitespaces before qualifier names.
7941
b893e375
MP
79422015-08-12 Marek Polacek <polacek@redhat.com>
7943
7944 PR c++/55095
7945 * c-common.c (maybe_warn_shift_overflow): Properly handle
7946 left-shifting 1 into the sign bit.
7947
c2d89095
MLI
79482015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7949
7950 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7951
971e17ff
AS
79522015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7953 Braden Obrzut <admin@maniacsvault.net>
7954 Jason Merrill <jason@redhat.com>
7955
7956 Add C++ Concepts TS support.
7957 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7958 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7959 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7960 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7961 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7962 * c.opt (fconcepts): New.
7963
b3d5bc62
JJ
79642015-08-02 Martin Sebor <msebor@redhat.com>
7965
7966 * c.opt (-Wframe-address): New warning option.
7967
8ebca419
PP
79682015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7969
7970 * c-indentation.c (should_warn_for_misleading_indentation):
7971 Improve heuristics.
7972
1a1e101f
PP
79732015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7974
7975 * c-indentation.c (get_visual_column): Add parameter first_nws,
7976 use it. Update comment documenting the function.
7977 (is_first_nonwhitespace_on_line): Remove.
7978 (should_warn_for_misleading_indentation): Replace usage of
7979 of is_first_nonwhitespace_on_line with get_visual_column.
7980
992118a1
PP
79812015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7982
7983 * c-indentation.h (struct token_indent_info): Define.
7984 (get_token_indent_info): Define.
7985 (warn_for_misleading_information): Declare.
7986 * c-common.h (warn_for_misleading_information): Remove.
7987 * c-identation.c (warn_for_misleading_indentation):
7988 Change declaration to take three token_indent_infos. Adjust
7989 accordingly.
7990 * c-identation.c (should_warn_for_misleading_indentation):
7991 Likewise. Bail out early if the body is a compound statement.
7992 (guard_tinfo_to_string): Define.
7993
e8fa3817
JM
79942015-07-30 Jason Merrill <jason@redhat.com>
7995
7996 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7997 '*' for reference decay.
7998
173864e8
MP
79992015-07-30 Marek Polacek <polacek@redhat.com>
8000
8001 * c-common.c (warn_tautological_cmp): Bail for float types.
8002
f2afe6dd
MP
80032015-07-27 Marek Polacek <polacek@redhat.com>
8004
8005 PR bootstrap/67030
8006 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8007
05b28fd6
MP
80082015-07-27 Marek Polacek <polacek@redhat.com>
8009
8010 PR c++/66555
8011 PR c/54979
8012 * c-common.c (find_array_ref_with_const_idx_r): New function.
8013 (warn_tautological_cmp): New function.
8014 * c-common.h (warn_tautological_cmp): Declare.
8015 * c.opt (Wtautological-compare): New option.
8016
5a5062b8
MP
80172015-07-23 Marek Polacek <polacek@redhat.com>
8018
8019 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8020 (ubsan_instrument_shift): Likewise.
8021
dc891fe7
MP
80222015-07-23 Marek Polacek <polacek@redhat.com>
8023
8024 PR sanitizer/66908
8025 * c-ubsan.c: Include gimplify.h.
8026 (ubsan_instrument_division): Unshare OP0 and OP1.
8027 (ubsan_instrument_shift): Likewise.
8028
451b5e48
MP
80292015-07-20 Marek Polacek <polacek@redhat.com>
8030 Richard Sandiford <richard.sandiford@arm.com>
8031
8032 PR c++/55095
8033 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8034 Use EXPR_LOC_OR_LOC.
8035 (maybe_warn_shift_overflow): New function.
8036 * c-common.h (maybe_warn_shift_overflow): Declare.
8037 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8038 * c.opt (Wshift-overflow): New option.
8039
fb0b2914
ML
80402015-07-16 Martin Liska <mliska@suse.cz>
8041
8042 * c-format.c (static void check_format_info_main): Use
8043 object_allocator instead of pool_allocator.
8044 (check_format_arg): Likewise.
8045 (check_format_info_main): Likewise.
8046
903f5c23
AM
80472015-07-15 Andrew MacLeod <amacleod@redhat.com>
8048
8049 * c-opts.c: Remove multiline #include comment.
8050
026c3cfd
AH
80512015-07-12 Aldy Hernandez <aldyh@redhat.com>
8052
8053 * c-common.c: Fix double word typos.
8054
bb49ee66
EB
80552015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8056
8057 * c-ada-spec.h (cpp_operation): Revert latest change.
8058 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8059 constructors and destructors.
8060
1916bcb5
AM
80612015-07-09 Andrew MacLeod <amacleod@redhat.com>
8062
8063 * c-common.h: Adjust includes for flags.h changes.
8064 * stub-objc.c: Likewise.
026c3cfd 8065
a9dcd529
EB
80662015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8067
8068 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8069 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8070
b03b462f
JJ
80712015-07-08 Jakub Jelinek <jakub@redhat.com>
8072
8073 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8074 are to be removed, return NULL rather than original clauses list.
8075
c7131fb2
AM
80762015-07-07 Andrew MacLeod <amacleod@redhat.com>
8077
8078 * array-notation-common.c: Adjust includes.
8079 * c-ada-spec.c: Likewise.
8080 * c-cilkplus.c: Likewise.
8081 * c-common.h: Likewise.
8082 * c-cppbuiltin.c: Likewise.
8083 * c-dump.c: Likewise.
8084 * c-format.c: Likewise.
8085 * c-gimplify.c: Likewise.
8086 * c-indentation.c: Likewise.
8087 * c-lex.c: Likewise.
8088 * c-omp.c: Likewise.
8089 * c-opts.c: Likewise.
8090 * c-pch.c: Likewise.
8091 * c-ppoutput.c: Likewise.
8092 * c-pragma.c: Likewise.
8093 * c-pretty-print.c: Likewise.
8094 * c-semantics.c: Likewise.
8095 * c-ubsan.c: Likewise.
8096 * cilk.c: Likewise.
8097 * stub-objc.c: Likewise.
8098
2a7fb83f
EB
80992015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8100
8101 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8102 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8103
a03c9bf1
JM
81042015-07-01 Jason Merrill <jason@redhat.com>
8105
36a85135
JM
8106 * c-common.h (D_CXX11): Rename from D_CXX0X.
8107 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8108 * c-common.c: Adjust.
8109
e7fa68d5
JM
8110 * c-opts.c (c_common_post_options): Default to C++14.
8111
a03c9bf1
JM
8112 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8113
fe95b036
ESR
81142015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8115
8116 Implement N4197 - Adding u8 character literals
b3d5bc62 8117 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8118 CPP_CHAR.
b3d5bc62 8119 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8120 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8121 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8122 and CPP_UTF8CHAR tokens.
8123 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8124
da2e71c9
MLI
81252015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8126
8127 PR fortran/66605
8128 * c-common.c (do_warn_unused_parameter): Move here.
8129 * c-common.h (do_warn_unused_parameter): Declare.
8130
b155cfd9
MP
81312015-06-29 Marek Polacek <polacek@redhat.com>
8132
8133 PR c/66322
8134 * c-common.c (check_case_bounds): Add bool * parameter. Set
8135 OUTSIDE_RANGE_P.
8136 (c_add_case_label): Add bool * parameter. Pass it down to
8137 check_case_bounds.
8138 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8139 warning here.
8140 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8141 declarations.
8142
31521951
MP
81432015-06-27 Marek Polacek <polacek@redhat.com>
8144
8145 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8146 or VECTOR_INTEGER_TYPE_P throughout.
8147 * c-gimplify.c: Likewise.
8148
22d03525
MP
81492015-06-26 Marek Polacek <polacek@redhat.com>
8150
8151 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8152 * c-common.c (c_fully_fold_internal): Likewise.
8153 (c_alignof_expr): Likewise.
8154 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8155 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8156 * cilk.c (create_parm_list): Likewise.
22d03525 8157
af05e6e5
MP
81582015-06-26 Marek Polacek <polacek@redhat.com>
8159
8160 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8161
f0889939
AM
81622015-06-25 Andrew MacLeod <amacleod@redhat.com>
8163
8164 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8165 * c-gimplify.c: Likewise.
8166 * c-pragma.c: Likewise.
8167 * c-ubsan.c: Likewise.
8168 * cilk.c: Likewise.
8169
ca752f39
RS
81702015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8171
8172 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8173 ggc_hasher.
8174
16a16ec7
AM
81752015-06-25 Andrew MacLeod <amacleod@redhat.com>
8176
8177 * cilk.c: Move calls.h after tm.h in the include chain.
8178
0ae9bd27
MP
81792015-06-25 Marek Polacek <polacek@redhat.com>
8180
8181 * array-notation-common.c: Use VAR_P throughout.
8182 * c-ada-spec.c: Likewise.
8183 * c-common.c: Likewise.
8184 * c-format.c: Likewise.
8185 * c-gimplify.c: Likewise.
8186 * c-omp.c: Likewise.
8187 * c-pragma.c: Likewise.
8188 * c-pretty-print.c: Likewise.
8189 * cilk.c: Likewise.
8190
62f9079a
MP
81912015-06-25 Marek Polacek <polacek@redhat.com>
8192
8193 * cilk.c (extract_free_variables): Use is_global_var.
8194
0fa16060
RS
81952015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8196
8197 * c-common.c: Don't include target-def.h.
8198
a68ae2e1
MP
81992015-06-23 Marek Polacek <polacek@redhat.com>
8200
8201 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8202 when comparing INTEGER_CSTs.
8203
c6a2f2d9
PMR
82042015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8205
8206 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8207 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8208 (dump_ada_template): Skip partially specialized types.
8209
6b4db501
MM
82102015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8211
8212 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8213 swapping.
8214
abb226c9
AM
82152015-06-17 Andrew MacLeod <amacleod@redhat.com>
8216
8217 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8218 * c-ada-spec.c: Likewise.
8219 * c-cilkplus.c: Likewise.
8220 * c-common.c: Likewise.
8221 * c-common.h: Likewise.
8222 * c-cppbuiltin.c: Likewise.
8223 * c-dump.c: Likewise.
8224 * c-format.c: Likewise.
8225 * c-gimplify.c: Likewise.
8226 * c-indentation.c: Likewise.
8227 * c-lex.c: Likewise.
8228 * c-omp.c: Likewise.
8229 * c-opts.c: Likewise.
8230 * c-pch.c: Likewise.
8231 * c-ppoutput.c: Likewise.
8232 * c-pragma.c: Likewise.
8233 * c-pretty-print.c: Likewise.
8234 * c-semantics.c: Likewise.
8235 * c-ubsan.c: Likewise.
8236 * cilk.c: Likewise.
8237 * stub-objc.c: Likewise.
8238
076fecad
PP
82392015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8240
8241 PR c++/65168
8242 * c-common.c (c_common_truthvalue_conversion): Warn when
8243 converting an address of a reference to a truth value.
8244
13fdf2e2
AM
82452015-06-08 Andrew MacLeod <amacleod@redhat.com>
8246
8247 * array-notation-common.c : Adjust include files.
8248 * c-ada-spec.c : Likewise.
8249 * c-cilkplus.c : Likewise.
8250 * c-common.c : Likewise.
8251 * c-common.h : Likewise.
8252 * c-cppbuiltin.c : Likewise.
8253 * c-dump.c : Likewise.
8254 * c-format.c : Likewise.
8255 * c-gimplify.c : Likewise.
8256 * c-indentation.c : Likewise.
8257 * c-lex.c : Likewise.
8258 * c-omp.c : Likewise.
8259 * c-opts.c : Likewise.
8260 * c-pch.c : Likewise.
8261 * c-ppoutput.c : Likewise.
8262 * c-pragma.c : Likewise.
8263 * c-pretty-print.c : Likewise.
8264 * c-semantics.c : Likewise.
8265 * c-ubsan.c : Likewise.
8266 * cilk.c : Likewise.
8267 * stub-objc.c : Likewise.
8268
a1661b90
MP
82692015-06-08 Marek Polacek <polacek@redhat.com>
8270
8271 PR c/66415
8272 * c-format.c (location_from_offset): Return LOC if LINE is null.
8273
d7438551
AH
82742015-06-05 Aldy Hernandez <aldyh@redhat.com>
8275
8276 * c-common.h (c_parse_final_cleanups): New prototype.
8277 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8278
b3d5bc62
JJ
82792015-06-04 Sriraman Tallam <tmsriram@google.com>
8280
8281 * c-common.c (noplt): New attribute.
8282 (handle_noplt_attribute): New handler.
8283
ecb9f223
AM
82842015-06-04 Andrew MacLeod <amacleod@redhat.com>
8285
8286 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8287 * c-ada-spec.c: Likewise.
8288 * c-cilkplus.c: Likewise.
8289 * c-common.c: Likewise.
8290 * c-common.h: Likewise.
8291 * c-cppbuiltin.c: Likewise.
8292 * c-dump.c: Likewise.
8293 * c-format.c: Likewise.
8294 * c-gimplify.c: Likewise.
8295 * c-indentation.c: Likewise.
8296 * c-lex.c: Likewise.
8297 * c-omp.c: Likewise.
8298 * c-opts.c: Likewise.
8299 * c-pch.c: Likewise.
8300 * c-ppoutput.c: Likewise.
8301 * c-pragma.c: Likewise.
8302 * c-pretty-print.c: Likewise.
8303 * c-semantics.c: Likewise.
8304 * c-ubsan.c: Likewise.
8305 * cilk.c: Likewise.
8306 * stub-objc.c: Likewise.
8307
6ac48155
DM
83082015-06-02 David Malcolm <dmalcolm@redhat.com>
8309
8310 PR c/66220:
8311 * c-indentation.c (should_warn_for_misleading_indentation): Use
8312 expand_location rather than expand_location_to_spelling_point.
8313 Don't warn if the guarding statement is more indented than the
8314 next/body stmts.
8315
773ce42e
DM
83162015-06-02 David Malcolm <dmalcolm@redhat.com>
8317
8318 * c-indentation.c (warn_for_misleading_indentation): Bail out
8319 immediately if -Wmisleading-indentation isn't enabled.
8320
4fef8379
ML
83212015-06-01 Martin Liska <mliska@suse.cz>
8322
8323 * c-format.c (check_format_arg):Use new type-based pool allocator.
8324 (check_format_info_main) Likewise.
8325
1edfb384
EB
83262015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8327
8328 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8329 (has_nontrivial_methods): Likewise.
8330
9677ef52
MP
83312015-05-25 Marek Polacek <polacek@redhat.com>
8332
8333 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8334
fd5c817a
MP
83352015-05-22 Marek Polacek <polacek@redhat.com>
8336
8337 PR c/47043
8338 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8339
a2f45fe6 83402015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8341
8342 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8343 STACK_GROWS_DOWNWARD.
8344
a2f45fe6 83452015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8346
8347 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8348 STACK_GROWS_DOWNWARD rather than if it is defined.
8349
0fee2ac2 83502015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8351
0fee2ac2
MLI
8352 PR c/52952
8353 * c-format.c (location_column_from_byte_offset): New.
8354 (location_from_offset): New.
8355 (struct format_wanted_type): Add offset_loc field.
8356 (check_format_info): Move handling of location for extra arguments
8357 closer to the point of warning.
8358 (check_format_info_main): Pass the result of location_from_offset
8359 to warning_at.
8360 (format_type_warning): Pass the result of location_from_offset
8361 to warning_at.
8362
cf4ef6f7
MP
83632015-05-20 Marek Polacek <polacek@redhat.com>
8364
8365 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8366
3a65ee74
MP
83672015-05-20 Marek Polacek <polacek@redhat.com>
8368
8369 * c-ada-spec.c (dump_sloc): Use DECL_P.
8370
21b634ae
MP
83712015-05-20 Marek Polacek <polacek@redhat.com>
8372
8373 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8374 * c-common.c: Likewise.
8375
0e50b624
DM
83762015-05-19 David Malcolm <dmalcolm@redhat.com>
8377
8378 * c-common.h (fe_file_change): Strengthen param from
8379 const line_map * to const line_map_ordinary *.
8380 (pp_file_change): Likewise.
8381 * c-lex.c (fe_file_change): Likewise.
8382 (cb_define): Use linemap_check_ordinary when invoking
8383 SOURCE_LINE.
8384 (cb_undef): Likewise.
8385 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8386 invoking cb_file_change.
8387 (c_finish_options): Likewise.
8388 (push_command_line_include): Likewise.
8389 (cb_file_change): Strengthen param "new_map" from
8390 const line_map * to const line_map_ordinary *.
8391 * c-ppoutput.c (cb_define): Likewise for local "map".
8392 (pp_file_change): Likewise for param "map" and local "from".
8393
fab27f52
MM
83942015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8395
8396 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8397
2fe1d762
TV
83982015-05-18 Tom de Vries <tom@codesourcery.com>
8399
8400 * c-common.c (build_va_arg_1): New function.
8401 (build_va_arg): Add address operator to va_list operand if necessary.
8402
7a37fa90
MM
84032015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8404
8405 PR c/48956
8406 * c-common.c (int_safely_convertible_to_real_p): Define.
8407 (unsafe_conversion_p): Check conversions involving complex types.
8408 (conversion_warning): Add new warning message for conversions which
8409 discard imaginary component.
8410 * c-common.h: (enum conversion_safety): Add new enumerator for such
8411 conversions.
8412
3aa3c9fc
MP
84132015-05-14 Marek Polacek <polacek@redhat.com>
8414
8415 PR c/66066
8416 PR c/66127
8417 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8418 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8419 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8420 use it. If FOR_INT_CONST, require that all evaluated operands be
8421 INTEGER_CSTs.
8422
c3388e62
DM
84232015-05-12 David Malcolm <dmalcolm@redhat.com>
8424
8425 * c-common.h (warn_for_misleading_indentation): New prototype.
8426 * c-indentation.c: New file.
8427 * c.opt (Wmisleading-indentation): New option.
8428
c7b38fd5
TV
84292015-05-12 Tom de Vries <tom@codesourcery.com>
8430
8431 PR tree-optimization/66010
8432 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8433
381bf11e
JM
84342015-05-09 Jason Merrill <jason@redhat.com>
8435
edff0c06
JM
8436 * c-opts.c (c_common_post_options): Also clear
8437 cpp_opts->cpp_warn_cxx11_compat.
8438
129211bc
JM
8439 * c-common.h (enum cxx_dialect): Add cxx_unset.
8440 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8441 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8442
381bf11e
JM
8443 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8444 (std=gnu++0x): Mark as Undocumented.
8445 (std=gnu++1y): Add deprecated message.
8446
fe191308
JM
84472015-05-08 Jason Merrill <jason@redhat.com>
8448
765189ff
JM
8449 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8450 * c-opts.c: Adjust.
8451
fe191308
JM
8452 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8453
755e528f
MP
84542015-05-08 Marek Polacek <polacek@redhat.com>
8455
8456 PR c/64918
8457 * c.opt (Woverride-init-side-effects): New option.
8458
0173bd2a
MP
84592015-05-07 Marek Polacek <polacek@redhat.com>
8460
8461 PR c/65179
8462 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8463 negative value.
8464 * c.opt (Wshift-negative-value): New option.
8465 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8466 when -Wextra and C99/C++11 mode.
8467
e0f0d3b9
MP
84682015-05-07 Marek Polacek <polacek@redhat.com>
8469 Martin Uecker <uecker@eecs.berkeley.edu>
8470
8471 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8472 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8473
8243e2a9
JM
84742015-05-05 Jason Merrill <jason@redhat.com>
8475
8476 * c.opt (Wterminate): New.
8477
577cd070
MP
84782015-04-30 Marek Polacek <polacek@redhat.com>
8479
8480 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8481 require that the non-constant be of a boolean type.
8482
0373796b
JT
84832015-04-29 Josh Triplett <josh@joshtriplett.org>
8484
e0f0d3b9
MP
8485 * c-common.c (handle_section_attribute): Refactor to reduce
8486 nesting and distinguish between error cases.
0373796b 8487
716c0ba6
MP
84882015-04-29 Marek Polacek <polacek@redhat.com>
8489
8490 PR c/64610
8491 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8492 with 0/1.
8493
8848828b
JJ
84942015-04-29 Jakub Jelinek <jakub@redhat.com>
8495
8496 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8497 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8498 HOST_BITS_PER_WIDE_INT.
8499
ecd0e562
TV
85002015-04-28 Tom de Vries <tom@codesourcery.com>
8501
8502 PR tree-optimization/65887
8503 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8504
2a877204 85052015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8506 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8507
8508 * c-ada-spec.c (in_function): Delete.
8509 (dump_generic_ada_node): Do not change in_function and remove the
8510 redundant code dealing with it.
8511 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8512 (print_ada_methods): Output the static member functions in a nested
8513 package after the regular methods as well as associated renamings.
8514
4853031e
MP
85152015-04-24 Marek Polacek <polacek@redhat.com>
8516
8517 PR c/65830
8518 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8519 and OPT_Wshift_count_overflow.
8520
8c2b7f79
MP
8521 PR c/63357
8522 * c-common.c (warn_logical_operator): Warn if the operands have the
8523 same expressions.
8524
b8787813
MP
85252015-04-24 Marek Polacek <polacek@redhat.com>
8526
8527 PR c/61534
8528 * c-common.c (warn_logical_operator): Bail if either operand comes
8529 from a macro expansion.
8530
8fba1830
BRF
85312015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8532
8533 PR target/55143
8534 * c-common.c (c_default_pointer_mode): Add definition.
8535 * c-common.h (c_default_pointer_mode): Add declaration.
8536
17958621
JJ
85372015-03-11 Jakub Jelinek <jakub@redhat.com>
8538
8539 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8540 on record_builtin_type argument.
8541
7ccb1a11
JJ
85422015-03-10 Jakub Jelinek <jakub@redhat.com>
8543
8544 PR c/65120
8545 * c-common.c (warn_logical_not_parentheses): Don't warn for
8546 !x == 0 or !x != 0.
8547
04fd785e
MP
85482015-03-07 Marek Polacek <polacek@redhat.com>
8549
8550 PR sanitizer/65280
8551 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8552 before trying to figure out whether we have a flexible array member.
8553
a4e26206 85542015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8555 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8556
8557 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8558
0d2489f4
EB
85592015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8560
8561 PR ada/65319
8562 * c-ada-spec.c (print_destructor): Remove obsolete code.
8563
83ed54d7
EB
85642015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8565
8566 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8567 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8568 DECL_TEMPLATE_RESULT emulations.
8569 (dump_ada_template)): Add guard for TYPE_METHODS.
8570
7631f0e2
MP
85712015-02-27 Marek Polacek <polacek@redhat.com>
8572
8573 PR c/65040
8574 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8575
d1783ae5
KT
85762015-02-27 Kai Tietz <ktietz@redhat.com>
8577
8578 PR c/35330
8579 * c-pragma.c (handle_pragma_weak): Do not try to create
8580 weak/alias of declarations not being function, or variable
8581 declarations.
8582
56a9f6bc
TS
85832015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8584
8585 PR libgomp/64625
8586 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8587 Remove macros.
8588 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8589
3d5cb23d
MP
85902015-02-16 Marek Polacek <polacek@redhat.com>
8591
8592 PR c/65066
8593 * c-format.c (check_format_types): Handle null param.
8594
fa008882
MP
85952015-02-13 Marek Polacek <polacek@redhat.com>
8596
8597 PR c/65040
8598 * c-format.c (check_format_types): Don't warn about different
8599 signedness if the original value is in the range of WANTED_TYPE.
8600
785f21af
JM
86012015-02-12 Jason Merrill <jason@redhat.com>
8602
8603 PR c++/64956
8604 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8605 to the current highest version.
8606 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8607
4886ec8e
JJ
86082015-02-04 Jakub Jelinek <jakub@redhat.com>
8609
8610 PR c/64824
8611 PR c/64868
8612 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8613 instead of RDIV_EXPR. Use build_binary_op instead of
8614 build2_loc.
8615
40fecdd6
JM
86162015-01-30 Joseph Myers <joseph@codesourcery.com>
8617
8618 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8619 to pass input_location as first argument.
8620
a0c88d06
TV
86212015-01-23 Tom de Vries <tom@codesourcery.com>
8622
8623 PR libgomp/64672
8624 * c.opt (fopenacc): Mark as LTO option.
8625
1506ae0e
TV
86262015-01-23 Tom de Vries <tom@codesourcery.com>
8627
8628 PR libgomp/64707
8629 * c.opt (fopenmp): Mark as LTO option.
8630
31be63ab
JJ
86312015-01-21 Jakub Jelinek <jakub@redhat.com>
8632
8633 PR c/63307
b1726d6c 8634 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8635 (compare_decls): Fix up formatting.
8636
86372015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8638
8639 PR c/63307
8640 * cilk.c: Include vec.h.
8641 (struct cilk_decls): New structure.
8642 (wrapper_parm_cb): Split this function to...
8643 (fill_decls_vec): ...this...
8644 (create_parm_list): ...and this.
8645 (compare_decls): New function.
8646 (for_local_cb): Remove.
8647 (wrapper_local_cb): Ditto.
8648 (build_wrapper_type): For now first traverse and fill vector of
8649 declarations then sort it and then deal with sorted vector.
8650 (cilk_outline): Ditto.
8651 (declare_one_free_variable): Ditto.
8652
6875457f
JM
86532015-01-21 Jason Merrill <jason@redhat.com>
8654
8655 PR c++/64629
8656 * c-format.c (check_format_arg): Call decl_constant_value.
8657
185c9e56
ML
86582015-01-19 Martin Liska <mliska@suse.cz>
8659
8660 * c-common.c (handle_noicf_attribute): New function.
8661
41dbbb37
TS
86622015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8663 Bernd Schmidt <bernds@codesourcery.com>
8664 James Norris <jnorris@codesourcery.com>
8665 Cesar Philippidis <cesar@codesourcery.com>
8666 Ilmir Usmanov <i.usmanov@samsung.com>
8667 Jakub Jelinek <jakub@redhat.com>
8668
8669 * c.opt (fopenacc): New option.
8670 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8671 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8672 New macros.
8673 * c-common.h (c_finish_oacc_wait): New prototype.
8674 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8675 (c_finish_oacc_wait): New function.
8676 * c-pragma.c (oacc_pragmas): New variable.
8677 (c_pp_lookup_pragma, init_pragma): Handle it.
8678 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8679 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8680 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8681 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8682 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8683 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8684 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8685 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8686 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8687 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8688 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8689 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8690 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8691 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8692 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8693 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8694 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8695 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8696 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8697 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8698 PRAGMA_OACC_CLAUSE_WORKER.
8699
3f8257db 87002015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8701
8702 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8703 for the new option fstack-protector_explicit.
8704 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8705 (handle_stack_protect_attribute): New function.
8706
3f8257db 87072015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8708
8709 * c.opt: New option -Warray-bounds=.
8710
adfac8df
JJ
87112015-01-09 Michael Collison <michael.collison@linaro.org>
8712
8713 * array-notation-common.c: Include hash-set.h, machmode.h,
8714 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8715 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8716 * c-ada-spec.c: Ditto.
8717 * c-cilkplus.c: Ditto.
8718 * c-common.c: Include input.h due to flattening of tree.h.
8719 Define macro GCC_C_COMMON_C.
8720 * c-common.h: Flatten tree.h header files into c-common.h.
8721 Remove include of tree-core.h.
8722 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8723 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8724 fold-const.h, wide-int.h, and inchash.h due to
8725 flattening of tree.h.
8726 * c-dump.c: Ditto.
8727 * c-format.c: Flatten tree.h header files into c-common.h.
8728 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8729 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8730 fold-const.h, wide-int.h, and inchash.h due to
8731 flattening of tree.h.
8732 * c-dump.c: Include hash-set.h, machmode.h,
8733 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8734 fold-const.h, wide-int.h, and inchash.h due to
8735 flattening of tree.h.
8736 * c-format.c: Include hash-set.h, machmode.h,
8737 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8738 fold-const.h, wide-int.h, inchash.h and real.h due to
8739 flattening of tree.h.
8740 * c-gimplify.c: Include hash-set.h, machmode.h,
8741 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8742 fold-const.h, wide-int.h, and inchash.h due to
8743 flattening of tree.h.
8744 * cilk.c: Ditto.
8745 * c-lex.c: Ditto.
8746 * c-omp.c: Ditto.
8747 * c-opts.c: Ditto.
8748 * c-pch.c: Ditto.
8749 * c-ppoutput.c: Ditto.
8750 * c-pragma.c: Ditto.
8751 * c-pretty-print.c: Ditto.
8752 * c-semantics.c: Ditto.
8753 * c-ubsan.c: Ditto.
8754 * stub-objc.c: Ditto.
8755
f5481fc4
JM
87562015-01-08 Jason Merrill <jason@redhat.com>
8757
8758 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8759 do_ubsan_in_current_function.
8760 (ubsan_maybe_instrument_reference_or_call): Likewise.
8761 * c-ubsan.h: Declare it.
8762
de35aa66
MS
87632015-01-08 Mike Stump <mikestump@comcast.net>
8764
8765 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8766
4a9a42ab
MP
87672015-01-07 Marek Polacek <polacek@redhat.com>
8768
8769 PR c/64440
8770 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8771 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8772
2f42e5de
TS
87732015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8774
8775 PR c++/31397
8776 * c.opt (Wsuggest-override): New option.
8777
5624e564
JJ
87782015-01-05 Jakub Jelinek <jakub@redhat.com>
8779
8780 Update copyright years.
8781
5bd012f8
MP
87822015-01-05 Marek Polacek <polacek@redhat.com>
8783
8784 PR c/64423
8785 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8786 parameter. Use it.
8787 * c-common.h (warn_array_subscript_with_type_char): Update
8788 declaration.
8789
a7fa8d18
ESR
87902014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8791
8792 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8793 Control macro with flag_sized_deallocation.
8794
3f8257db 87952014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8796
8797 * c.opt (Wdiscarded-array-qualifiers): New option.
8798
1f8d3e84
JJ
87992014-12-19 Jakub Jelinek <jakub@redhat.com>
8800
8801 PR preprocessor/63831
8802 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8803 and __has_cpp_attribute here.
8804 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8805 c_common_has_attribute.
8806 * c-common.h (c_common_has_attribute): New prototype.
8807 * c-lex.c (init_c_lex): Set cb->has_attribute to
8808 c_common_has_attribute instead of cb_has_attribute.
8809 (get_token_no_padding): New function.
8810 (cb_has_attribute): Renamed to ...
8811 (c_common_has_attribute): ... this. No longer static. Use
8812 get_token_no_padding, require ()s, don't build TREE_LIST
8813 unnecessarily, fix up formatting, adjust diagnostics, call
8814 init_attributes.
8815
20b06add
JM
88162014-12-15 Jason Merrill <jason@redhat.com>
8817
8818 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8819 (-Wsized-deallocation): New.
8820 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8821 to on in C++14 and up.
8822
94a073b2
JM
88232014-12-11 Jason Merrill <jason@redhat.com>
8824
acaa5911
JM
8825 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8826
94a073b2
JM
8827 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8828 we aren't complaining about VLAs.
8829
7fb66c15
MP
88302014-12-06 Marek Polacek <polacek@redhat.com>
8831
8832 PR tree-optimization/64183
8833 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8834 shift-expression if it is integer_type_node. Use types_compatible_p.
8835
b731b390
JJ
88362014-11-29 Jakub Jelinek <jakub@redhat.com>
8837
8838 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8839 last argument from create_tmp_var_raw and create_tmp_var calls.
8840 * cilk.c (gimplify_cilk_spawn): Likewise.
8841 * c-omp.c (c_finish_omp_atomic): Likewise.
8842
6a4da643
MP
88432014-11-28 Marek Polacek <polacek@redhat.com>
8844
8845 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8846 instead of unsigned_type_node.
8847
541e35a6
MP
88482014-11-28 Marek Polacek <polacek@redhat.com>
8849
8850 PR c/63862
8851 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8852 to op1_utype.
8853 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8854 expression to unsigned_type_node.
8855
dcc97066
MW
88562014-11-20 Mark Wielaard <mjw@redhat.com>
8857
8858 PR debug/38757
8859 * c-opts.c (set_std_c89): Set lang_hooks.name.
8860 (set_std_c99): Likewise.
8861 (set_std_c11): Likewise.
8862 (set_std_cxx98): Likewise.
8863 (set_std_cxx11): Likewise.
8864 (set_std_cxx14): Likewise.
8865 (set_std_cxx1z): Likewise.
8866
aa7da51a
JJ
88672014-11-21 Jakub Jelinek <jakub@redhat.com>
8868
8869 PR target/63764
8870 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8871 return type to bool.
009a3480 8872 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8873 (convert_vector_to_pointer_for_subscript): Change return type to
8874 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8875 and copy it into a TARGET_EXPR and use that instead of *vecp
8876 directly.
8877
538dd0b7
DM
88782014-11-19 David Malcolm <dmalcolm@redhat.com>
8879
8880 Merger of git branch "gimple-classes-v2-option-3".
8881 * ChangeLog.gimple-classes: New.
8882 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8883 from being just a vec<gimple> to a vec<gbind *>.
8884
c39a5e99
JJ
88852014-11-18 Jakub Jelinek <jakub@redhat.com>
8886
8887 PR sanitizer/63813
8888 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8889 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8890 get_pointer_alignment for non-pointers. Use ptype, or if it is
8891 reference type, corresponding pointer type, as type of kind
8892 argument.
8893 (ubsan_maybe_instrument_reference,
8894 ubsan_maybe_instrument_member_call): Adjust callers.
8895
8537a4a9
MP
88962014-11-15 Marek Polacek <polacek@redhat.com>
8897
8898 PR middle-end/63884
8899 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8900 for NULL fndecl.
8901 (extract_array_notation_exprs): Return for NULL node.
8902
2079956a
JM
89032014-11-12 Joseph Myers <joseph@codesourcery.com>
8904
8905 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8906 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8907
1304953e
JJ
89082014-11-12 Jakub Jelinek <jakub@redhat.com>
8909
8910 PR c/59708
8911 * c-common.c (check_builtin_function_arguments): Handle
8912 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8913
e5e44252
AK
89142014-11-10 Andi Kleen <ak@linux.intel.com>
8915
8916 PR c/60804
8917 * c-common.h (check_no_cilk): Declare.
8918 * cilk.c (get_error_location): New function.
8919 (check_no_cilk): Dito.
8920
e64b984d
AK
89212014-11-10 Andi Kleen <ak@linux.intel.com>
8922
8923 * cilk.c (recognize_spawn): Use expression location
8924 for error message.
8925
13c21655
PC
89262014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8927
8928 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8929
42fd12b1
ESR
89302014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8931
8932 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8933 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8934 (__cpp_range_based_for, __cpp_initializer_lists,
8935 __cpp_delegating_constructors, __cpp_nsdmi,
8936 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8937 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8938 __has_cpp_attribute.
8939 * c-lex.c (cb_has_attribute): New callback CPP function;
8940 (init_c_lex): Set has_attribute callback.
8941
6f450181
RB
89422014-11-04 Richard Biener <rguenther@suse.de>
8943
8944 * c-common.c (shorten_compare): Do not shorten mixed
8945 DFP and non-DFP compares.
8946
26f0e1d6
ESR
89472014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8948
8949 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8950 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8951 Commentary and rearrangement of tests.
8952 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8953 Commentary and rearrangement of tests.
ab20d992 8954 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8955 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8956
ef4bddc2
RS
89572014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8958
8959 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8960 enum from machine_mode.
8961
c582198b
AM
89622014-10-28 Andrew MacLeod <amacleod@redhat.com>
8963
adfac8df
JJ
8964 * c-common.c: Adjust include files.
8965 * c-gimplify.c: Ditto.
8966 * cilk.c: Ditto.
8967 * c-pragma.c: Ditto.
8968 * c-ubsan.c: Ditto.
c582198b 8969
60393bbc
AM
89702014-10-27 Andrew MacLeod <amacleod@redhat.com>
8971
8972 * c-gimplify.c: Adjust include files.
8973
d723bb7c
MLI
89742014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8975
8976 PR c++/53061
8977 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8978 c_common_initialize_diagnostics.
8979 * c-common.h: Likewise.
8980
90f3520e
MP
89812014-10-24 Marek Polacek <polacek@redhat.com>
8982
8983 PR c/56980
8984 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8985 print "struct"/"union"/"enum" for typedefed names.
8986
59d7607a
MP
89872014-10-23 Marek Polacek <polacek@redhat.com>
8988
8989 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8990 in unsigned type.
8991
d95a2703
JJ
89922014-10-22 Jakub Jelinek <jakub@redhat.com>
8993 Yury Gribov <y.gribov@samsung.com>
8994
8995 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8996 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8997 instead of flag_sanitize_recover as bool flag.
8998
8e6ef852
KY
89992014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9000
9001 * cilk.c: Revert previous change.
9002
948cf550
IZ
90032014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9004
9005 PR c/63307
9006 * cilk.c: Include vec.h.
9007 (struct cilk_decls): New structure.
9008 (wrapper_parm_cb): Split this function to...
9009 (fill_decls_vec): ...this...
9010 (create_parm_list): ...and this.
9011 (compare_decls): New function.
9012 (for_local_cb): Remove.
9013 (wrapper_local_cb): Ditto.
9014 (build_wrapper_type): For now first traverse and fill vector of
9015 declarations then sort it and then deal with sorted vector.
9016 (cilk_outline): Ditto.
9017 (declare_one_free_variable): Ditto.
9018
92574c7c
MP
90192014-10-17 Marek Polacek <polacek@redhat.com>
9020
9021 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9022 * c.opt (Wimplicit-int): Initialize to -1.
9023
83685514
AM
90242014-10-16 Andrew MacLeod <amacleod@redhat.com>
9025
9026 * c-pragma.c: Adjust include files.
9027 * c-semantics.c: Likewise.
9028
5b8300ea
DD
90292014-10-16 DJ Delorie <dj@redhat.com>
9030
9031 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9032 multiples of bytes.
9033
5f83e90b
JM
90342014-10-14 Jason Merrill <jason@redhat.com>
9035
9036 PR c++/63455
9037 * c-common.h (CPP_PREPARSED_EXPR): New.
9038 (N_CP_TTYPES): Adjust.
9039
d73326ca
MP
90402014-10-15 Marek Polacek <polacek@redhat.com>
9041
9042 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9043
78a7c317
DD
90442014-10-14 DJ Delorie <dj@redhat.com>
9045
9046 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9047 types, not just __int128.
9048 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9049 types, not just __int128.
9050 (cpp_atomic_builtins): Round pointer sizes up.
9051 (type_suffix): Use type precision, not specific types.
9052 * c-common.c (c_common_reswords): Remove __int128 special case.
9053 (c_common_type_for_size): Check for all __intN types, not just
9054 __int128.
9055 (c_common_type_for_mode): Likewise.
9056 (c_common_signed_or_unsigned_type): Likewise.
9057 (c_build_bitfield_integer_type): Likewise.
9058 (c_common_nodes_and_builtins): Likewise.
9059 (keyword_begins_type_specifier): Likewise.
9060 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9061 __intN variants.
9062
2a22f99c
TS
90632014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9064
9065 * c-common.c: Use hash_table instead of hashtab.
9066
2a8ef767
ESR
90672014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9068
adfac8df 9069 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9070 C++11 section.
9071
3c9aabbd
MG
90722014-10-03 Marc Glisse <marc.glisse@inria.fr>
9073
9074 PR c++/54427
9075 PR c++/57198
9076 PR c++/58845
9077 * c-common.c (warn_logical_operator): Punt for vectors.
9078
a15f7cb8
ESR
90792014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9080
9081 Implement SD-6: SG10 Feature Test Recommendations
9082 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9083 macros and the __has_header macro.
9084
8d0cf15e
JM
90852014-09-30 Jason Merrill <jason@redhat.com>
9086
dd5d5481
JM
9087 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9088 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9089 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9090
b752325e
JM
9091 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9092 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9093
8d0cf15e
JM
9094 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9095 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9096
083e891e
MP
90972014-09-24 Marek Polacek <polacek@redhat.com>
9098
9099 PR c/61405
9100 PR c/53874
9101 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9102
7861b648
AK
91032014-09-23 Andi Kleen <ak@linux.intel.com>
9104
9105 * c-common.c (handle_no_reorder_attribute): New function.
9106 (c_common_attribute_table): Add no_reorder attribute.
9107
9a79452d
JM
91082014-09-22 Joseph Myers <joseph@codesourcery.com>
9109
9110 * c-cppbuiltin.c (c_cpp_builtins): Define
9111 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9112 modes.
9113
dd69f047
JM
91142014-09-18 Joseph Myers <joseph@codesourcery.com>
9115
9116 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9117 for supported floating-point modes.
9118
737a4826
MLI
91192014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9120
9121 * c.opt (Wpsabi): Use LangEnabledBy.
9122 * c-opts.c (c_common_handle_option): Do not handle here.
9123
8cc4b7a2
JM
91242014-09-12 Joseph Myers <joseph@codesourcery.com>
9125
9126 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9127 macros for floating-point modes.
9128
179b5a55
MG
91292014-09-11 Marc Glisse <marc.glisse@inria.fr>
9130
9131 PR target/58757
9132 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9133 __*_DENORM_MIN__ without denormals.
9134
570a11fe
JJ
91352014-09-10 Jakub Jelinek <jakub@redhat.com>
9136
9137 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9138 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9139 ubsan_create_data callers.
9140 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9141 index is constant or BIT_AND_EXPR with constant mask and is
9142 small enough for the bound.
9143 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9144 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9145
b559c810
MLI
91462014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9147
9148 * c.opt: Add CppReason to various flags.
9149 (Wdate-time): Re-sort.
9150 * c-common.c: Include c-common.h earlier.
9151 (struct reason_option_codes_t): Delete.
9152 (c_option_controlling_cpp_error): Prefix global type and struct
9153 with cpp_.
9154
1ef33fd4
MLI
91552014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9156
9157 * c.opt (Wnormalized): New.
9158 (Wnormalized=): Use Enum and Reject Negative.
9159 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9160
66bb34c0
JM
91612014-09-08 Joseph Myers <joseph@codesourcery.com>
9162
9163 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9164 digits of floating-point modes if -fbuilding-libgcc.
9165
53d68b9f
JM
91662014-09-05 Joseph Myers <joseph@codesourcery.com>
9167
9168 * c-cppbuiltin.c (c_cpp_builtins): Also define
9169 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9170 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9171 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9172 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9173 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9174 __LIBGCC_STACK_GROWS_DOWNWARD__,
9175 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9176 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9177 __LIBGCC_DWARF_FRAME_REGISTERS__,
9178 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9179 __LIBGCC_STACK_POINTER_REGNUM__ and
9180 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9181 (builtin_define_with_value): Handle backslash-escaping in string
9182 macro values.
9183
f65586dc
RB
91842014-09-05 Richard Biener <rguenther@suse.de>
9185
9186 PR middle-end/63148
9187 * c-format.c (check_format_arg): Properly handle
9188 effectively signed POINTER_PLUS_EXPR offset.
9189
2b71f4a4
MLI
91902014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9191
9192 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9193 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9194 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9195 and Init.
9196 * c-opts.c (c_common_handle_option): Do not handle here.
9197 (sanitize_cpp_opts): Likewise.
9198 * c-common.c (struct reason_option_codes_t): Handle
9199 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9200
d2e4feca
MP
92012014-09-03 Marek Polacek <polacek@redhat.com>
9202
9203 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9204
9a771876
JJ
92052014-09-02 Jakub Jelinek <jakub@redhat.com>
9206 Balaji V. Iyer <balaji.v.iyer@intel.com>
9207 Igor Zamyatin <igor.zamyatin@intel.com>
9208
9209 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9210 * c-common.c (c_common_reswords): Added _Cilk_for.
9211 * c-common.h (enum rid): Added RID_CILK_FOR.
9212 (cilk_for_number_of_iterations): Add declaration.
9213 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9214 CILK_FOR.
9215 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9216 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9217
81b5d104
MLI
92182014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9219
9220 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9221 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9222 Wundef): Use CPP, Var and Init.
9223 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9224
b753b37b
MLI
92252014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9226
9227 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9228 * c-opts.c (c_common_handle_option): Do not handle here.
9229
028aee17
JM
92302014-08-25 Jason Merrill <jason@redhat.com>
9231
9232 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9233 -std=c++14 and -std=gnu++14, rather than the reverse.
9234 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9235 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9236 * c-common.h (cxx_dialect): Remove cxx1y.
9237
e4276ba5
ESR
92382014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9239
9240 * c-common.h (enum cxx_dialect): Add cxx14.
9241 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9242 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9243 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9244
a545cacd
JM
92452014-08-22 Jason Merrill <jason@redhat.com>
9246
9247 * c.opt (std=gnu++17): Fix alias.
9248
59ea0364
MP
92492014-08-22 Marek Polacek <polacek@redhat.com>
9250
9251 PR c++/62199
9252 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9253 check for vector types. Drop LHS argument.
9254 * c-common.h (warn_logical_not_parentheses): Adjust.
9255
596e808c
MLI
92562014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9257
9258 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9259 (Wmultichar): Likewise.
9260 (Wdate-time): Use C-family languages instead of Common. Use CPP
9261 and Var.
9262 * c-opts.c (c_common_handle_option): Do not handle the above
9263 options here.
9264 (sanitize_cpp_opts): Likewise.
9265
18767f65
MLI
92662014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9267
9268 PR fortran/44054
9269 * c-opts.c: Include tree-diagnostics.h.
9270 (c_diagnostic_finalizer): New.
9271 (c_common_initialize_diagnostics): Use it.
9272
b4413594
MLI
92732014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9274
9275 PR preprocessor/51303
9276 * c-common.c (struct reason_option_codes_t option_codes):
9277 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9278
43f9a13c
MLI
92792014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9280
9281 PR c/60975
9282 PR c/53063
9283 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9284 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9285 (c_common_post_options): Call init_global_opts_from_cpp.
9286 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9287
04159acf
MP
92882014-08-19 Marek Polacek <polacek@redhat.com>
9289
9290 PR c++/62153
9291 * c-common.c (maybe_warn_bool_compare): New function.
9292 * c-common.h (maybe_warn_bool_compare): Declare.
9293 * c.opt (Wbool-compare): New option.
9294
35aff4fb
MP
92952014-08-19 Marek Polacek <polacek@redhat.com>
9296
9297 * c.opt (Wc99-c11-compat): New option.
9298
177cce46
MP
92992014-08-19 Marek Polacek <polacek@redhat.com>
9300
9301 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9302 to warn_c90_c99_compat.
9303 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9304 to -1.
9305
6ae9194f
MLI
93062014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9307 Steven Bosscher <steven@gcc.gnu.org>
9308
9309 PR c/52952
9310 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9311 format_check_results.
9312 (check_function_format): Use true and add comment for boolean
9313 argument.
9314 (finish_dollar_format_checking): Use explicit location when warning.
9315 (check_format_info): Likewise.
9316 (check_format_arg): Set extra_arg_loc and format_string_loc.
9317 (check_format_info_main): Use explicit location when warning.
9318 (check_format_types): Pass explicit location.
9319 (format_type_warning): Likewise.
9320
8e54f6d3
MLI
93212014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9322
9323 PR fortran/44054
9324 * c-format.c: Handle Fortran flags.
9325
cd4e76fc
IZ
93262014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9327
9328 PR other/61962
9329 * array-notation-common.c (find_rank): Added handling for other
9330 types of references.
9331
f3bede71
MP
93322014-08-10 Marek Polacek <polacek@redhat.com>
9333
9334 PR c/51849
9335 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9336 * c.opt (Wc90-c99-compat): Add option.
9337
9f25a338
TS
93382014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9339
9340 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9341
62e4eb35
MP
93422014-08-03 Marek Polacek <polacek@redhat.com>
9343
ab20d992 9344 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9345 (c_add_case_label): Pass loc to check_case_value.
9346
b787e7a2
TS
93472014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9348
9349 * cilk.c: Use hash_map instead of pointer_map.
9350
6e2830c3
TS
93512014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9352
9353 * c-gimplify.c: Use hash_set instead of pointer_set.
9354
a7ee52fb
IZ
93552014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9356
9357 PR middle-end/61455
9358 * array-notation-common.c (extract_array_notation_exprs): Handling
9359 of DECL_EXPR added.
9360
944fa280
JJ
93612014-08-01 Jakub Jelinek <jakub@redhat.com>
9362
9363 * c-common.h (min_align_of_type): Removed prototype.
9364 * c-common.c (min_align_of_type): Removed.
9365 * c-ubsan.h (ubsan_maybe_instrument_reference,
9366 ubsan_maybe_instrument_member_call): New prototypes.
9367 * c-ubsan.c: Include stor-layout.h and builtins.h.
9368 (ubsan_maybe_instrument_reference_or_call,
9369 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9370 functions.
9371
b4dfdc11
MG
93722014-07-31 Marc Glisse <marc.glisse@inria.fr>
9373
9374 PR c++/60517
9375 * c.opt (-Wreturn-local-addr): Move to common.opt.
9376
a41844e5
JM
93772014-07-30 Jason Merrill <jason@redhat.com>
9378
9379 PR c++/61659
9380 PR c++/61687
9381 Revert:
9382 * c.opt (-fuse-all-virtuals): New.
9383
976d5a22
TT
93842014-07-30 Tom Tromey <tromey@redhat.com>
9385
9386 PR c/59855
9387 * c.opt (Wdesignated-init): New option.
9388 * c-common.c (c_common_attribute_table): Add "designated_init".
9389 (handle_designated_init): New function.
9390
cdc94aca
MP
93912014-07-24 Marek Polacek <polacek@redhat.com>
9392
9393 PR c/57653
9394 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9395
f41373b6
DS
93962014-07-16 Dodji Seketeli <dodji@redhat.com>
9397
9398 PR preprocessor/60723 - missing system-ness marks for macro tokens
9399 * c-ppoutput.c (struct print::prev_was_system_token): New data
9400 member.
9401 (init_pp_output): Initialize it.
9402 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9403 (do_line_change): Return a flag saying if a line marker was
9404 emitted or not.
9405 (scan_translation_unit): Detect if the system-ness of the token we
9406 are about to emit is different from the one of the previously
9407 emitted token. If so, emit a line marker. Avoid emitting useless
9408 adjacent line markers. Avoid emitting line markers for tokens
9409 originating from the expansion of built-in macros.
9410 (scan_translation_unit_directives_only): Adjust.
9411
4d661eaa
MP
94122014-07-15 Marek Polacek <polacek@redhat.com>
9413
9414 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9415 TYPE_MAX_VALUE is NULL.
9416
b108f48f
JJ
94172014-07-14 Jakub Jelinek <jakub@redhat.com>
9418
9419 PR middle-end/61294
9420 * c.opt (Wmemset-transposed-args): New warning.
9421
c0221884
JM
94222014-07-10 Jason Merrill <jason@redhat.com>
9423
9424 PR c++/61659
9425 PR c++/61687
9426 * c.opt (-fuse-all-virtuals): New.
9427
63dfbb95
RB
94282014-07-09 Richard Biener <rguenther@suse.de>
9429
9430 PR c-family/61741
9431 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9432 using unsigned arithmetic if overflow does not wrap instead of
9433 if overflow is undefined.
9434
773ec47f
MP
94352014-07-06 Marek Polacek <polacek@redhat.com>
9436
9437 PR c/6940
9438 * c.opt (Wsizeof-array-argument): New option.
9439
00a7ba58
JJ
94402014-07-03 Jakub Jelinek <jakub@redhat.com>
9441
b1726d6c 9442 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9443 comments->count <= 1, as comments->entries might be NULL.
9444
52ec0ea3
MP
94452014-07-01 Marek Polacek <polacek@redhat.com>
9446
9447 * c.opt (Wint-conversion): New option.
9448
d5c3d343
MP
94492014-07-01 Marek Polacek <polacek@redhat.com>
9450
9451 PR c/58286
9452 * c.opt (Wincompatible-pointer-types): New option.
9453
6e7ceb17
PC
94542014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9455
9456 PR c++/51400
9457 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9458 Do not discard TYPE_QUALS of type.
9459
da73100b
JM
94602014-06-26 Jason Merrill <jason@redhat.com>
9461
9462 * c-common.h (enum cxx_dialect): Add cxx1z.
9463 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9464 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9465
08eedf75
TJ
94662014-06-26 Teresa Johnson <tejohnson@google.com>
9467
9468 * c-common.h (get_dump_info): Declare.
9469 * c-gimplify.c (c_genericize): Use saved dump files.
9470 * c-opts.c (c_common_parse_file): Begin and end dumps
9471 once around parsing invocation.
9472 (get_dump_info): New function.
9473
7b56b2f8
MP
94742014-06-23 Marek Polacek <polacek@redhat.com>
9475 Andrew MacLeod <amacleod@redhat.com>
9476
9477 PR c/61553
9478 * c-common.c (get_atomic_generic_size): Don't segfault if the
9479 type doesn't have a size.
9480
0e37a2f3
MP
94812014-06-20 Marek Polacek <polacek@redhat.com>
9482
9483 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9484 (ubsan_walk_array_refs_r): New function.
9485 (c_genericize): Instrument array bounds.
9486 * c-ubsan.c: Include "internal-fn.h".
9487 (ubsan_instrument_division): Mark instrumented arrays as having
9488 side effects. Adjust ubsan_type_descriptor call.
9489 (ubsan_instrument_shift): Likewise.
9490 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9491 (ubsan_instrument_bounds): New function.
9492 (ubsan_array_ref_instrumented_p): New function.
9493 (ubsan_maybe_instrument_array_ref): New function.
9494 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9495 (ubsan_array_ref_instrumented_p): Declare.
9496 (ubsan_maybe_instrument_array_ref): Declare.
9497
94982014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9499
9500 PR lto/61123
9501 * c.opt (fshort-enums): Add to LTO.
9502 * c.opt (fshort-wchar): Likewise.
9503
5c3d09f7
MP
95042014-06-16 Marek Polacek <polacek@redhat.com>
9505
9506 PR c/60439
9507 * c.opt (Wswitch-bool): Add Var.
9508
9cf32741
JJ
95092014-06-12 Jakub Jelinek <jakub@redhat.com>
9510
9511 PR middle-end/61486
9512 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9513 #pragma omp target teams or
9514 #pragma omp {,target }teams distribute simd.
9515
62984918
JM
95162014-06-12 Jason Merrill <jason@redhat.com>
9517
9518 * c.opt (Wabi=, fabi-compat-version): New.
9519 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9520 (c_common_post_options): Handle flag_abi_compat_version default.
9521 Disallow -fabi-compat-version=1.
9522 * c-common.h (abi_version_crosses): New.
9523
f961457f
JH
95242014-06-11 Jan Hubicka <hubicka@ucw.cz>
9525
adfac8df 9526 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9527 section names that are no longer trees.
9528
92d28cbb
JJ
95292014-06-10 Jakub Jelinek <jakub@redhat.com>
9530
9531 PR fortran/60928
9532 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9533 (omp_pragmas): ... back here.
9534
742938c9
MP
95352014-06-05 Marek Polacek <polacek@redhat.com>
9536
9537 PR c/49706
9538 * c-common.c (warn_logical_not_parentheses): New function.
9539 * c-common.h (warn_logical_not_parentheses): Declare.
9540 * c.opt (Wlogical-not-parentheses): New option.
9541
9d548dfb
MP
95422014-06-04 Marek Polacek <polacek@redhat.com>
9543
9544 PR c/30020
9545 * c-common.c (check_case_bounds): Add location parameter.
9546 Use it.
9547 (c_add_case_label): Pass loc to check_case_bounds.
9548
fedfecef
MP
95492014-06-03 Marek Polacek <polacek@redhat.com>
9550
9551 PR c/60439
9552 * c.opt (Wswitch-bool): New option.
9553
f6a7cffc
TS
95542014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9555
040d18b6
TS
9556 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9557 Remove prototypes.
9558 (record_types_used_by_current_var_decl): Move prototype to where
9559 it belongs.
9560
f6a7cffc
TS
9561 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9562 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9563 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9564
632f2871
RS
95652014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9566
9567 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9568 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9569 void_zero_node.
9570 * c-pretty-print.c (pp_c_void_constant): New function.
9571 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9572 (c_pretty_printer::expression): Handle VOID_CST.
9573 * cilk.c (extract_free_variables): Likewise.
9574 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9575 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9576
766090c2
TS
95772014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9578
9579 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9580 * c-pragma.c (push_alignment): Adjust.
9581 (handle_pragma_push_options): Likewise.
9582
661a0813
MP
95832014-05-09 Marek Polacek <polacek@redhat.com>
9584
9585 PR c/50459
9586 * c-common.c (check_user_alignment): Return -1 if alignment is error
9587 node.
9588 (handle_aligned_attribute): Don't call default_conversion on
9589 FUNCTION_DECLs.
9590 (handle_vector_size_attribute): Likewise.
9591 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9592 (handle_sentinel_attribute): Call default_conversion and allow even
9593 integral types as an argument.
9594
2793eeab
MP
95952014-05-08 Marek Polacek <polacek@redhat.com>
9596
9597 PR c/61053
9598 * c-common.c (min_align_of_type): New function factored out from...
9599 (c_sizeof_or_alignof_type): ...here.
9600 * c-common.h (min_align_of_type): Declare.
9601
f827930a
MP
96022014-05-08 Marek Polacek <polacek@redhat.com>
9603
9604 PR c/61077
9605 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9606 parameter type of main.
9607
ca49b74e
DD
96082014-05-07 DJ Delorie <dj@redhat.com>
9609
9610 * c-cppbuiltin.c (print_bits_of_hex): New.
9611 (builtin_define_type_minmax): Print values using hex so as not to
9612 require a pre-computed list of string values.
9613
1d60af08
KZ
96142014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9615 Mike Stump <mikestump@comcast.net>
9616 Richard Sandiford <rdsandiford@googlemail.com>
9617
9618 * c-ada-spec.c: Include wide-int.h.
9619 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9620 (dump_generic_ada_node): Use wide-int interfaces.
9621 * c-common.c: Include wide-int-print.h.
9622 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9623 (pointer_int_sum): Use wide-int interfaces.
9624 (c_common_nodes_and_builtins): Use make_int_cst.
9625 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9626 (handle_alloc_size_attribute): Use wide-int interfaces.
9627 (get_nonnull_operand): Likewise.
9628 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9629 * c-lex.c: Include wide-int.h.
9630 (narrowest_unsigned_type): Take a widest_int rather than two
9631 HOST_WIDE_INTs.
9632 (narrowest_signed_type): Likewise.
9633 (interpret_integer): Update accordingly. Use wide-int interfaces.
9634 (lex_charconst): Use wide-int interfaces.
9635 * c-pretty-print.c: Include wide-int.h.
9636 (pp_c_integer_constant): Use wide-int interfaces.
9637 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9638 INT_CST_LT_UNSIGNED.
9639
b15458be
RB
96402014-05-06 Richard Biener <rguenther@suse.de>
9641
9642 * c-opts.c (c_common_post_options): For -freestanding,
9643 -fno-hosted and -fno-builtin disable pattern recognition
9644 if not enabled explicitely.
9645
6577374e
MP
96462014-05-02 Marek Polacek <polacek@redhat.com>
9647
9648 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9649
d00887e8
MP
96502014-05-01 Marek Polacek <polacek@redhat.com>
9651
9652 PR c/43245
9653 * c.opt (Wdiscarded-qualifiers): Add.
9654
f8ed5150
MP
96552014-04-30 Marek Polacek <polacek@redhat.com>
9656
9657 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9658 INT_MIN / -1 sanitization only for integer types.
9659
45484dcf
MP
96602014-04-25 Marek Polacek <polacek@redhat.com>
9661
9662 PR c/18079
9663 * c-common.c (handle_noinline_attribute): Warn if the attribute
9664 conflicts with always_inline attribute.
9665 (handle_always_inline_attribute): Warn if the attribute conflicts
9666 with noinline attribute.
9667
38e514c0
MP
96682014-04-25 Marek Polacek <polacek@redhat.com>
9669
9670 PR c/60156
9671 * c-common.c (check_main_parameter_types): Warn about variadic main.
9672
44875f92
MS
96732014-04-24 Mike Stump <mikestump@comcast.net>
9674
9675 * c.opt (Wshadow-ivar): Default to on.
9676
dcaaa5a0
DP
96772014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9678
9679 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9680
c07d7c02
MP
96812014-04-23 Marek Polacek <polacek@redhat.com>
9682
9683 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9684
1c33c9b7
JJ
96852014-04-22 Jakub Jelinek <jakub@redhat.com>
9686
9687 PR sanitizer/60275
9688 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9689 if flag_sanitize_undefined_trap_on_error.
9690 (ubsan_instrument_division, ubsan_instrument_shift,
9691 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9692 if !flag_sanitize_recover.
9693
793c625f
MG
96942014-04-22 Marc Glisse <marc.glisse@inria.fr>
9695
9696 PR libstdc++/43622
9697 * c-common.c (registered_builtin_types): Make non-static.
9698 * c-common.h (registered_builtin_types): Declare.
9699
b0f1bf36 97002014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9701 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9702
9703 PR c/60819
9704 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9705 apply may-alias the scalar pointer type when applicable.
9706
3b07fa4a
IZ
97072014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9708
9709 PR middle-end/60467
9710 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9711 as possible argument for Cilk_spawn.
9712
cbbd2b1c
TB
97132014-04-11 Tobias Burnus <burnus@net-b.de>
9714
9715 PR c/60194
9716 * c.opt (Wformat-signedness): Add
9717 * c-format.c(check_format_types): Use it.
9718
6415bd5d
JM
97192014-04-11 Jason Merrill <jason@redhat.com>
9720
9721 PR c++/57926
9722 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9723 default_conversion for an array argument.
9724
6525783a
MP
97252014-04-08 Marek Polacek <polacek@redhat.com>
9726
9727 PR sanitizer/60745
9728 * c-ubsan.c: Include asan.h.
9729 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9730
880a467b
NS
97312014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9732
9733 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9734
7b59ff2d
MP
97352014-04-02 Marek Polacek <polacek@redhat.com>
9736
9737 * c-common.h (c_expand_expr): Remove declaration.
9738
8edbfaa6
JJ
97392014-03-28 Jakub Jelinek <jakub@redhat.com>
9740
9741 PR c++/60689
9742 * c-common.c (add_atomic_size_parameter): When creating new
9743 params vector, push the size argument first.
9744
07d72e1d
JJ
97452014-03-26 Jakub Jelinek <jakub@redhat.com>
9746
9747 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9748 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9749 ubsan_create_data callers.
9750
b35e0fa0
JJ
97512014-03-22 Jakub Jelinek <jakub@redhat.com>
9752
9753 PR debug/60603
9754 * c-opts.c (c_finish_options): Restore cb_file_change call to
9755 <built-in>.
9756
39a1ebb3
JJ
97572014-03-13 Jakub Jelinek <jakub@redhat.com>
9758
9759 PR middle-end/36282
9760 * c-pragma.c (apply_pragma_weak): Only look at
9761 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9762 DECL_ASSEMBLER_NAME_SET_P (decl).
9763 (maybe_apply_pending_pragma_weaks): Exit early if
9764 vec_safe_is_empty (pending_weaks) rather than only when
9765 !pending_weaks.
9766 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9767 set assembler name back to NULL afterwards.
9768
a07f6ed2
JM
97692014-03-11 Jason Merrill <jason@redhat.com>
9770
9771 * c.opt: Add -std=gnu++14.
9772
75b107f5
IB
97732014-03-11 Ian Bolton <ian.bolton@arm.com>
9774
9775 * c-opts.c (c_common_post_options): Don't override
9776 -ffp-contract=fast if unsafe-math-optimizations is on.
9777
f42c637e
PM
97782014-03-08 Paulo Matos <paulo@matos-sorge.com>
9779
22b15758 9780 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9781
70e24808
JM
97822014-03-07 Jason Merrill <jason@redhat.com>
9783
9784 * c.opt: Add -std=c++14.
9785
3af9c5e9
MP
97862014-03-06 Marek Polacek <polacek@redhat.com>
9787
9788 PR c/60197
9789 * cilk.c (contains_cilk_spawn_stmt): New function.
9790 (contains_cilk_spawn_stmt_walker): Likewise.
9791 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9792 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9793
b3bdf019
JJ
97942014-03-03 Jakub Jelinek <jakub@redhat.com>
9795
9796 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9797 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9798 even when flag_preprocess_only.
9799
ca7e759d
JM
98002014-02-26 Jason Merrill <jason@redhat.com>
9801
9802 PR c++/59231
9803 PR c++/11586
9804 * c-common.c (shorten_compare): Don't check
9805 c_inhibit_evaluation_warnings.
9806
28e41874
JJ
98072014-02-19 Jakub Jelinek <jakub@redhat.com>
9808
cca615af
JJ
9809 PR c/37743
9810 * c-common.c (c_common_nodes_and_builtins): When initializing
9811 c_uint{16,32,64}_type_node, also set corresponding
9812 uint{16,32,64}_type_node to the same value.
9813
28e41874
JJ
9814 PR c++/60267
9815 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9816 for PRAGMA_IVDEP if flag_preprocess_only.
9817
c2bf53a1
JJ
98182014-02-12 Jakub Jelinek <jakub@redhat.com>
9819
9820 PR c/60101
9821 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9822 if false, add ADD itself, rather than vice versa.
9823 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9824 copy. For SAVE_EXPR, only call merge_tlist once.
9825
8fcbce72
JJ
98262014-02-08 Jakub Jelinek <jakub@redhat.com>
9827
9828 PR middle-end/60092
9829 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9830 and tree_to_uhwi.
9831 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9832 functions.
9833 (c_common_attribute_table): Add alloc_align and assume_aligned
9834 attributes.
9835
0a756a3f
MP
98362014-02-06 Marek Polacek <polacek@redhat.com>
9837
9838 PR c/60087
9839 * c-common.c (warn_for_sign_compare): Call warning_at with location
9840 instead of warning.
9841
7ec4847a
MP
98422014-02-05 Marek Polacek <polacek@redhat.com>
9843
9844 PR c/53123
9845 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9846 statement.
9847
66f20604
MP
98482014-02-04 Marek Polacek <polacek@redhat.com>
9849
9850 PR c/60036
9851 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9852 SAVE_EXPR.
9853
5d77fb19
MG
98542014-02-03 Marc Glisse <marc.glisse@inria.fr>
9855
9856 PR c++/53017
9857 PR c++/59211
9858 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9859 handle_vector_size_attribute, handle_nonnull_attribute): Call
9860 default_conversion on the attribute argument.
9861 (handle_nonnull_attribute): Increment the argument number.
9862
81e5eca8
MP
98632014-01-31 Marek Polacek <polacek@redhat.com>
9864
9865 PR c/59963
9866 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9867 build_function_call_vec.
9868 (resolve_overloaded_builtin): Likewise.
9869 * c-common.h (build_function_call_vec): Adjust declaration.
9870
68fca595
MP
98712014-01-30 Marek Polacek <polacek@redhat.com>
9872
9873 PR c/59940
9874 * c-common.h (unsafe_conversion_p): Adjust declaration.
9875 (warnings_for_convert_and_check): Likewise.
9876 (convert_and_check): Likewise.
9877 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9878 expansion_point_location_if_in_system_header on it.
9879 (warnings_for_convert_and_check): Add location parameter. Call
9880 expansion_point_location_if_in_system_header on it. Use it.
9881 (convert_and_check): Add location parameter. Use it.
9882 (conversion_warning): Likewise.
9883 (c_add_case_label): Adjust convert_and_check calls.
9884 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9885
b72271b9
BI
98862014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9887
9888 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9889 flag_cilkplus.
9890 * c-pragma.c (init_pragma): Likewise.
9891 * c.opt: Likewise.
9892
393e8e8b
MP
98932014-01-23 Marek Polacek <polacek@redhat.com>
9894
9895 PR c/59846
9896 * c-common.c (shorten_compare): Add location_t parameter.
9897 * c-common.h (shorten_binary_op): Adjust declaration.
9898
f04dda30
MP
98992014-01-23 Marek Polacek <polacek@redhat.com>
9900
9901 PR c/58346
9902 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9903 * c-common.h: Declare it.
9904
621955cb
EB
99052014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9906
9907 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9908 * c-ada-spec.c (dump_ads): Likewise.
9909 (cpp_check): Likewise.
9910 (dump_ada_specs): Likewise.
9911
99122014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9913
9914 PR c++/49718
9915 * c-common.c (handle_no_instrument_function_attribute): Allow
9916 no_instrument_function attribute in class member
9917 definition/declaration.
9918
241f845a
JJ
99192014-01-15 Jakub Jelinek <jakub@redhat.com>
9920
9921 PR c/58943
9922 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9923 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9924 being COMPOUND_EXPR.
9925 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9926 operand a SAVE_EXPR and second MODIFY_EXPR.
9927
e83b8e2e
JJ
99282014-01-09 Jakub Jelinek <jakub@redhat.com>
9929
9930 PR target/58115
9931 * c-pch.c (c_common_write_pch): Call
9932 prepare_target_option_nodes_for_pch.
9933
23a5b65a
RS
99342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9935
9936 Update copyright years
9937
f9030485
RS
99382014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9939
9940 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9941 the copyright notice.
9942
f2aa696b
EB
99432013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9944
9945 * c-ada-spec.c (print_constructor): New function.
9946 (print_destructor): Retrieve the origin of the destructor.
9947 (print_ada_declaration): Revamp handling of constructors/destructors.
9948
3f8257db 99492013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9950 Bill Maddox <maddox@google.com>
9951 Jason Merrill <jason@redhat.com>
9952
9953 * c.opt: Add -fdeclone-ctor-dtor.
9954 * c-opts.c (c_common_post_options): Default to on iff -Os.
9955
41958c28
BI
99562013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9957
9958 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9959 attribute.
9960 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9961 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9962 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9963 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9964 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9965 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9966 PRAGMA_CILK_CLAUSE_UNIFORM.
9967
b1726d6c 9968
12893402
BI
99692013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9970
9971 * cilk.c (cilk_outline): Made this function non-static.
9972 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9973 (create_cilk_wrapper): Added a new parameter: a function pointer.
9974 (c_install_body_w_frame_cleanup): Remove
9975 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9976 * c-common.h (cilk_outline): New prototype.
9977 (gimplify_cilk_spawn): Removed two parameters.
9978 (cilk_install_body_with_frame_cleanup): New prototype.
9979 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9980 CILK_SPAWN_STMT case.
9981
085b42ed
BS
99822013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9983
2ce064c3
BS
9984 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9985
085b42ed
BS
9986 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9987 (int_array_type_node): Remove.
9988 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9989
9e36c9ed
MP
99902013-12-05 Marek Polacek <polacek@redhat.com>
9991
9992 PR c/52023
9993 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9994 [ADJUST_FIELD_ALIGN].
9995
296674db
JM
99962013-12-04 Joseph Myers <joseph@codesourcery.com>
9997
9998 PR c/52023
9999 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10000 and check field alignment if set.
10001 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10002 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10003
b1726d6c 100042013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10005 Marek Polacek <polacek@redhat.com>
10006
10007 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10008 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10009
d7947e19
L
100102013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10011
10012 PR c/59309
10013 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10014 arguments.
10015
fad7652e
JJ
100162013-11-29 Jakub Jelinek <jakub@redhat.com>
10017
10018 PR c/59280
10019 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10020 goto invalid. If it is error_mark_node, don't issue further
10021 diagnostics.
10022
8b5e1202
SO
100232013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10024
10025 * c.opt (Wopenmp-simd): New.
10026
0a508bb6
JJ
100272013-11-22 Jakub Jelinek <jakub@redhat.com>
10028
10029 * c-ubsan.h (ubsan_instrument_return): New prototype.
10030 * c-ubsan.c (ubsan_instrument_return): New function.
10031
2fb9a547
AM
100322013-11-22 Andrew MacLeod <amacleod@redhat.com>
10033
10034 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10035 * c-gimplify.c: Likewise.
10036 * cilk.c: Likewise.
2fb9a547 10037
8400e75e
DM
100382013-11-22 David Malcolm <dmalcolm@redhat.com>
10039
10040 * c-common.c (unsafe_conversion_p): Remove use of
10041 EXPR_LOC_OR_HERE macro.
10042 (conversion_warning): Likewise.
10043 (warnings_for_convert_and_check): Likewise.
10044 (warn_for_collisions_1): Likewise.
10045 (shorten_compare): Likewise, and remove use of in_system_header
10046 macro, using the location from the former.
10047 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10048 (cb_def_pragma): Remove use of in_system_header macro.
10049 (lex_string): Likewise.
10050 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10051
eb1ce453
KZ
100522013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10053 Mike Stump <mikestump@comcast.net>
10054 Richard Sandiford <rdsandiford@googlemail.com>
10055
10056 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10057 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10058 tree_fits_shwi_p or tree_fits_uhwi_p.
10059 (dump_generic_ada_node): Likewise.
10060 * c-format.c (check_format_arg): Likewise.
10061 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10062
6b3b8c27
KZ
100632013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10064
10065 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10066
49b0aa18
JC
100672013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10068
10069 PR c/53001
10070 * c-common.c (unsafe_conversion_p): Make this function
10071 return an enumeration with more detail.
10072 (conversion_warning): Use the new return type of
10073 unsafe_conversion_p to separately warn either about conversions
10074 that lower floating point number precision or about the other
10075 kinds of conversions.
10076 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10077 (unsafe_conversion_p): switching return type to
10078 conversion_safety enumeration.
49b0aa18
JC
10079 * c.opt: Adding new warning -Wfloat-conversion and
10080 enabling it with -Wconversion.
10081
b826515a
BS
100822013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10083
8e745a17
JJ
10084 * c-opts.c: Include plugin.h.
10085 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10086
b9a55b13
MP
100872013-11-19 Marek Polacek <polacek@redhat.com>
10088
10089 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10090 call.
10091 (ubsan_instrument_shift): Likewise.
10092 (ubsan_instrument_vla): Likewise.
10093
7d362f6c
RS
100942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10095
10096 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10097 cast to unsigned type.
10098
386b1f1f
RS
100992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10100
10101 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10102 tree_low_cst.
10103 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10104 rather than tree_low_cst.
10105
ae7e9ddd
RS
101062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10107
10108 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10109 tree_to_uhwi throughout.
10110
9439e9a1
RS
101112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10112
10113 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10114 tree_low_cst (..., 0) with tree_to_shwi throughout.
10115
cc269bb6
RS
101162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10117
10118 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10119 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10120
9541ffee
RS
101212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10122
10123 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10124 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10125
c02065fc
AH
101262013-11-15 Aldy Hernandez <aldyh@redhat.com>
10127
10128 * c-cilkplus.c: New file.
10129 * c-common.c (readonly_error): Add location argument.
10130 * c-common.h (readonly_error): Same.
10131 (c_finish_cilk_clauses): Protoize.
10132 (c_check_cilk_loop): Same.
10133 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10134 Do not fail on error_mark_node.
10135 Abstract increment canonicalization to here...
10136 (c_omp_for_incr_canonicalize_ptr): New.
10137 c-pragma.c (init_pragma): Register "simd" pragma.
10138 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10139 (enum pragma_cilk_clause): New.
10140
9cc65f15
RS
101412013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10142
10143 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10144 wchar_type and host_integerp checks.
10145
18f429e2
AM
101462013-11-14 Andrew MacLeod <amacleod@redhat.com>
10147
10148 * c-common.c: Likewise.
10149 * c-gimplify.c: Likewise.
10150 * cilk.c: Likewise.
10151
d8a2d370
DN
101522013-11-14 Diego Novillo <dnovillo@google.com>
10153
10154 * c-common.c: Include fold-const.h.
10155 Include stor-layout.h.
10156 Include calls.h.
10157 Include stringpool.h.
10158 Include attribs.h.
10159 Include varasm.h.
10160 Include trans-mem.h.
10161 * c-cppbuiltin.c: Include stor-layout.h.
10162 Include stringpool.h.
10163 * c-format.c: Include stringpool.h.
10164 * c-lex.c: Include stringpool.h.
10165 Include stor-layout.h.
10166 * c-pragma.c: Include stringpool.h.
10167 Include attribs.h.
10168 Include varasm.h.
10169 Include gcc-symtab.h.
10170 * c-pretty-print.c: Include stor-layout.h.
10171 Include attribs.h.
10172 * cilk.c: Include stringpool.h.
10173 Include calls.h.
10174
38b7bc7f
JM
101752013-11-13 Joseph Myers <joseph@codesourcery.com>
10176
10177 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10178 * c-common.c (c_common_reswords): Add __auto_type.
10179 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10180
45b0be94
AM
101812013-11-12 Andrew MacLeod <amacleod@redhat.com>
10182
18f429e2
AM
10183 * c-common.c: Include gimplify.h.
10184 * c-gimplify.c: Likewise.
10185 * cilk.c: Likewise.
10186 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10187 * c-ubsan.c: Don't include gimple.h.
45b0be94 10188
582d9b50
JM
101892013-11-12 Joseph Myers <joseph@codesourcery.com>
10190
10191 * c-common.c (c_common_reswords): Add _Thread_local.
10192
6b28e197
JM
101932013-11-09 Joseph Myers <joseph@codesourcery.com>
10194
10195 * c-common.c (atomic_size_supported_p): New function.
10196 (resolve_overloaded_atomic_exchange)
10197 (resolve_overloaded_atomic_compare_exchange)
10198 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10199 Use it instead of comparing size with a local list of sizes.
10200
267bac10
JM
102012013-11-07 Andrew MacLeod <amacleod@redhat.com>
10202 Joseph Myers <joseph@codesourcery.com>
10203
10204 * c-common.h (enum rid): Add RID_ATOMIC.
10205 * c-common.c (c_common_reswords): Add _Atomic.
10206 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10207 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10208 * c-format.c (check_format_types): Check for extra _Atomic
10209 qualifiers in format argument.
10210 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10211 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10212
5157b91e
TB
102132013-11-06 Tobias Burnus <burnus@net-b.de>
10214
10215 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10216
6dbe0958
JM
102172013-11-06 Joseph Myers <joseph@codesourcery.com>
10218
10219 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10220 standards modes.
10221 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10222 to mean lack of IEEE 754 support.
10223
e8ff5196
TB
102242013-11-05 Tobias Burnus <burnus@net-b.de>
10225
10226 * c.opt (-Wdate-time): New option
10227 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10228
254a0760
JM
102292013-11-05 Joseph Myers <joseph@codesourcery.com>
10230
10231 * c-cppbuiltin.c (cpp_iec_559_value): Test
10232 flag_excess_precision_cmdline not flag_excess_precision.
10233
6d7f7e0a
TB
102342013-11-05 Tobias Burnus <burnus@net-b.de>
10235
10236 * c.opt (fopenmp-simd): New option.
10237 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10238 (omp_pragmas): ... this new struct.
10239 (c_pp_lookup_pragma): Also walk omp_pragmas.
10240 (init_pragma): Init pragmas for -fopenmp-simd.
10241
55a7f02f
MP
102422013-11-04 Marek Polacek <polacek@redhat.com>
10243
10244 PR c++/58979
10245 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10246
9193fb05
JM
102472013-11-04 Joseph Myers <joseph@codesourcery.com>
10248
10249 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10250 New functions.
10251 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10252
94159ecf
EB
102532013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10254
10255 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10256 (dump_ada_specs): Adjust prototype of second callback.
10257 * c-ada-spec.c (cpp_check): New global variable.
10258 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10259 (print_generic_ada_decl): Likewise.
10260 (has_static_fields): Change return type to bool and add guard.
10261 (has_nontrivial_methods): New predicate.
10262 (is_tagged_type): Change return type to bool.
10263 (separate_class_package): Call has_nontrivial_methods.
10264 (pp_ada_tree_identifier): Minor tweaks.
10265 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10266 (dump_ada_array_domains): Likewise.
10267 (dump_ada_array_type): Likewise.
10268 (dump_template_types): Remove cpp_check parameter and do not pass it to
10269 dump_generic_ada_node.
10270 (dump_ada_template): Likewise.
10271 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10272 recursively.
10273 (print_ada_methods): Change return type to integer. Remove cpp_check
10274 parameter and do not pass it down.
10275 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10276 dump_generic_ada_node.
10277 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10278 accessing methods.
10279 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10280 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10281 value of print_ada_methods.
10282 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10283 Set cpp_check to it before invoking dump_ada_nodes.
10284 (dump_ada_specs): Likewise.
10285
b906f4ca
MP
102862013-11-03 Marek Polacek <polacek@redhat.com>
10287
10288 * c-ubsan.c: Don't include hash-table.h.
10289 (ubsan_instrument_vla): New function.
10290 * c-ubsan.h: Declare it.
10291
5e20cdc9
DM
102922013-10-31 David Malcolm <dmalcolm@redhat.com>
10293
10294 Automated part of renaming of symtab_node_base to symtab_node.
10295
10296 Patch autogenerated by rename_symtab.py from
10297 https://github.com/davidmalcolm/gcc-refactoring-scripts
10298 revision 58bb219cc090b2f4516a9297d868c245495ee622
10299
10300 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10301 symtab_node_base to symtab_node.
10302
7057e645
ESR
103032013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10304
8e745a17 10305 Implement C++14 digit separators.
7057e645
ESR
10306 * c-lex.c (interpret_float): Remove digit separators from scratch string
10307 before building real literal.
10308
193ea7bc
JJ
103092013-10-30 Jakub Jelinek <jakub@redhat.com>
10310
10311 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10312
939b37da
BI
103132013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10314
10315 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10316 fields.
10317 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10318 enabled.
10319 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10320 (insert_cilk_frame): New prototype.
10321 (cilk_init_builtins): Likewise.
10322 (gimplify_cilk_spawn): Likewise.
10323 (c_cilk_install_body_w_frame_cleanup): Likewise.
10324 (cilk_detect_spawn_and_unwrap): Likewise.
10325 (cilk_set_spawn_marker): Likewise.
10326 (build_cilk_sync): Likewise.
10327 (build_cilk_spawn): Likewise.
10328 * cilk.c: New file.
10329
67348ccc
DM
103302013-10-29 David Malcolm <dmalcolm@redhat.com>
10331
10332 Patch autogenerated by refactor_symtab.py from
10333 https://github.com/davidmalcolm/gcc-refactoring-scripts
10334 revision 58bb219cc090b2f4516a9297d868c245495ee622
10335
10336 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10337 to a true class hierarchy.
10338 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10339
d570872d
RS
103402013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10341
10342 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10343
98906124
JL
103442013-10-26 Jeff Law <law@redhat.com>
10345
adfac8df
JJ
10346 * c-common.c (c_define_builtins): Remove mudflap support.
10347 * c.opt: Ignore and warn for mudflap options.
98906124 10348
d73749df 103492013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10350
10351 PR other/33426
10352 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10353 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10354
3f04b1bb
JM
103552013-10-23 Jason Merrill <jason@redhat.com>
10356
10357 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10358
acf0174b
JJ
103592013-10-11 Jakub Jelinek <jakub@redhat.com>
10360
acd15a28
JJ
10361 * c-common.h (omp_clause_mask::operator !=): New method.
10362 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10363 instead of if (mask & something) tests everywhere.
10364
acf0174b
JJ
10365 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10366 201307 instead of 201107.
10367 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10368 (c_common_attribute_table): Add "omp declare target" and
10369 "omp declare simd" attributes.
10370 (handle_omp_declare_target_attribute,
10371 handle_omp_declare_simd_attribute): New functions.
10372 * c-omp.c: Include c-pragma.h.
10373 (c_finish_omp_taskgroup): New function.
10374 (c_finish_omp_atomic): Add swapped argument, if true,
10375 build the operation first with rhs, lhs arguments and use NOP_EXPR
10376 build_modify_expr.
10377 (c_finish_omp_for): Add code argument, pass it down to make_code.
10378 (c_omp_split_clauses): New function.
10379 (c_split_parallel_clauses): Removed.
10380 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10381 c_omp_declare_simd_clauses_to_decls): New functions.
10382 * c-common.h (omp_clause_mask): New type.
10383 (OMP_CLAUSE_MASK_1): Define.
10384 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10385 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10386 omp_clause_mask::operator |, omp_clause_mask::operator &,
10387 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10388 omp_clause_mask::operator ==): New methods.
10389 (enum c_omp_clause_split): New.
10390 (c_finish_omp_taskgroup): New prototype.
10391 (c_finish_omp_atomic): Add swapped argument.
10392 (c_finish_omp_for): Add code argument.
10393 (c_omp_split_clauses): New prototype.
10394 (c_split_parallel_clauses): Removed.
10395 (c_omp_declare_simd_clauses_to_numbers,
10396 c_omp_declare_simd_clauses_to_decls): New prototypes.
10397 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10398 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10399 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10400 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10401 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10402 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10403 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10404 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10405 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10406 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10407 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10408 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10409 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10410 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10411 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10412 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10413 PRAGMA_OMP_CLAUSE_UNIFORM.
10414
826cacfe
MG
104152013-10-09 Marc Glisse <marc.glisse@inria.fr>
10416
10417 PR tree-optimization/20318
10418 * c-common.c (handle_returns_nonnull_attribute): New function.
10419 (c_common_attribute_table): Add returns_nonnull.
10420
2284b034
MG
104212013-10-03 Marc Glisse <marc.glisse@inria.fr>
10422
10423 PR c++/19476
10424 * c.opt (fcheck-new): Move to common.opt.
10425
b56e9788
MP
104262013-09-25 Marek Polacek <polacek@redhat.com>
10427 Jakub Jelinek <jakub@redhat.com>
10428
10429 PR sanitizer/58413
10430 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10431 an expression if we can prove it is correct.
10432 (ubsan_instrument_division): Likewise. Remove unnecessary
10433 check.
10434
ce6923c5
MP
104352013-09-18 Marek Polacek <polacek@redhat.com>
10436
10437 PR sanitizer/58411
10438 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10439 Declare it.
10440 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10441
fb5610fb
IS
104422013-09-14 Iain Sandoe <iain@codesourcery.com>
10443
10444 PR target/48094
10445 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10446 fobjc-gc, freplace-objc-classes): Accept for LTO.
10447
88b0e79e
JC
104482013-09-13 Jacek Caban <jacek@codeweavers.com>
10449
10450 * c-target.def: New hook
10451
c9b0866a
PC
104522013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10453
10454 PR c++/43452
10455 * c.opt (Wdelete-incomplete): Add.
10456
0af94e6f
JR
104572013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10458
10459 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10460 (vector_types_compatible_elements_p): New function.
10461 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10462 declaration.
10463 (vector_types_compatible_elements_p): Declare.
10464
7c26172c
GDR
104652013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10466
10467 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10468 a virtual member function.
10469 (pp_simple_type_specifier): Remove.
10470 (pp_c_type_specifier): Likewise.
10471 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10472 Rename from pp_c_type_specifier. Adjust.
10473 (c_pretty_printer::c_pretty_printer): Do not assign to
10474 simple_type_specifier.
10475
20059c8b
GDR
104762013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10477
10478 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10479 member function.
10480 (c_pretty_printer::storage_class_specifier): Likewise.
10481 (c_pretty_printer::initializer): Likewise.
10482 (pp_declaration): Remove.
10483 (pp_declaration_specifiers): Likewise.
10484 (pp_abstract_declarator): Likewise.
10485 (pp_declarator): Likewise.
10486 (pp_type_id): Likewise.
10487 (pp_statement): Likewise.
10488 (pp_constant): Likewise.
10489 (pp_id_expression): Likewise.
10490 (pp_primary_expression): Likewise.
10491 (pp_unary_expression): Likewise.
10492 (pp_multiplicative_expression): Likewise.
10493 (pp_conditional_expression): Likewise.
10494 (pp_assignment_expression): Likewise.
10495 (pp_expression): Likewise.
10496 (pp_c_type_id): Likewise.
10497 (pp_c_storage_class_specifier): Likewise.
10498 * c-pretty-print.c (pp_c_type_cast): Tidy.
10499 (pp_c_pointer): Likewise.
10500 (pp_c_type_specifier): Likewise.
10501 (pp_c_parameter_type_list): Likewise.
10502 (pp_c_function_definition): Likewise.
10503 (pp_c_init_declarator): Likewise.
10504 (pp_c_initializer_list): Likewise.
10505 (pp_c_constructor_elts): Likewise.
10506 (c_pretty_printer::direct_abstract_declarator): Likewise.
10507 (c_pretty_printer::declaration_specifiers): Likewise.
10508 (c_pretty_printer::primary_expression): Likewise.
10509 (c_pretty_printer::postfix_expression): Likewise.
10510 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10511 (c_pretty_printer::storage_class_specifier): Rename from
10512 pp_c_storage_class_specifier.
10513 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10514 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10515 storage_class_specifier, initializer, offset_list, flags.
10516
de5a5fa1
MP
105172013-08-30 Marek Polacek <polacek@redhat.com>
10518
10519 * c-ubsan.c: New file.
10520 * c-ubsan.h: New file.
10521
8f0e4d72
GDR
105222013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10523
10524 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10525 member function.
10526 (c_pretty_printer::declaration_specifiers): Likewise.
10527 (c_pretty_printer::declarator): Likewise.
10528 (c_pretty_printer::abstract_declarator): Likewise.
10529 (c_pretty_printer::direct_abstract_declarator): Likewise.
10530 (c_pretty_printer::direct_declarator): Likewise.
10531 (c_pretty_printer::function_specifier): Likewise.
10532 (pp_declaration): Adjust.
10533 (pp_declaration_specifiers): Likewise.
10534 (pp_abstract_declarator): Likewise.
10535 (pp_direct_declarator): Likewise.
10536 (pp_function_specifier): Likewise.
10537 (pp_direct_abstract_declarator): Remove as unused.
10538 (pp_c_declaration): Remove.
10539 (pp_c_declaration_specifiers): Likewise.
10540 (pp_c_declarator): Likewise.
10541 (pp_c_direct_declarator): Likewise.
10542 (pp_c_function_specifier): Likewise.
10543 (pp_c_direct_abstract_declarator): Likewise.
10544 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10545 from pp_c_abstract_declarator. Adjust.
ab20d992 10546 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10547 pp_c_direct_abstract_declarator. Adjust.
10548 (c_pretty_printer::function_specifier): Rename from
10549 pp_c_function_specifier. Adjust.
10550 (c_pretty_printer::declaration_specifiers): Rename from
10551 pp_c_declaration_specifiers. Adjust.
10552 (c_pretty_printer::direct_declarator): Rename from
10553 pp_c_direct_declarator. Adjust.
10554 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10555 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10556 (c_pretty_printer::c_pretty_printer): Do not assign to
10557 declaration, declaration_specifiers, declarator,
10558 direct_declarator, direct_abstract_declarator, function_specifier.
10559
00d34d3a
GDR
105602013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10561
10562 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10563 virtual member function.
10564 (c_pretty_printer::multiplicative_expression): Likewise.
10565 (c_pretty_printer::conditional_expression): Likewise.
10566 (c_pretty_printer::assignment_expression): Likewise.
10567 (c_pretty_printer::expression): Likewise.
10568 (pp_unary_expression): Adjust.
10569 (pp_multiplicative_expression): Likewise.
10570 (pp_assignment_expression): Likewise.
10571 (pp_conditional_expression): Likewise.
10572 (pp_expression): Likewise.
10573 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10574 from pp_c_unary_expression. Adjust.
10575 (c_pretty_printer::multiplicative_expression): Rename from
10576 pp_c_multiplicative_expression. Adjust.
10577 (c_pretty_printer::conditional_expression): Rename from
10578 pp_c_conditional_expression. Adjust.
10579 (c_pretty_printer::assignment_expression): Rename from
10580 pp_c_assignment_expression. Adjust.
10581 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10582 (c_pretty_printer::c_pretty_printer): Do not assign to
10583 unary_expression, multiplicative_expression,
10584 conditional_expression, expression.
10585
fb22178f
GDR
105862013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10587
10588 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10589 virtual member function.
10590 (pp_postfix_expression): Adjust.
10591 (pp_c_postfix_expression): Remove.
10592 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10593 from pp_c_postfix_expression. Adjust.
10594 (c_pretty_printer::c_pretty_printer): Do not assign to
10595 postfix_expression.
10596
7ecc2600
GDR
105972013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10598
10599 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10600 virtua member function.
10601 (pp_primary_expression): Adjust.
10602 (pp_c_primary_expression): Remove.
10603 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10604 from pp_c_primary_expression. Adjust.
10605 (pp_c_initializer_list): Use pp_primary_expression.
10606 (c_pretty_printer::c_pretty_printer): Do not assign to
10607 primary_expression.
10608
0691175f
GDR
106092013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10610
10611 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10612 * c-pretty-print.c (M_): Remove.
10613 (c_pretty_printer::translate_string): Define.
10614 (pp_c_type_specifier): Use it.
10615 (pp_c_primary_expression): Likewise.
10616 (pp_c_expression): Likewise.
10617
66dfe4c4
GDR
106182013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10619
10620 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10621 virtual function.
10622 (pp_c_id_expression): Remove.
10623 (pp_id_expression): Adjust.
10624 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10625 pp_c_id_expression. Adjust.
10626 (pp_c_postfix_expression): Use pp_id_expression.
10627 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10628
ca43e9d5
GDR
106292013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10630
10631 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10632 member function.
10633 (pp_constant): Adjust.
10634 (pp_c_constant): Remove.
10635 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10636 pp_c_constant. Adjust.
10637 (pp_c_constant)
10638 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10639 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10640
da6ca2b5
GDR
106412013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10642
10643 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10644 (c_pretty_printer::c_pretty_printer): Declare.
10645 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10646 c_pretty_printer_init. Adjust.
10647 (print_c_tree): Do not call c_pretty_printer_init.
10648 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10649
65a372f4
AC
106502013-08-09 Arnaud Charlet <charlet@adacore.com>
10651
10652 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10653
fd9b0f32
PC
106542013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10655
10656 PR c++/58080
10657 * c-common.c (pointer_int_sum): Add bool parameter.
10658 * c-common.h (pointer_int_sum): Adjust declaration.
10659
e0aec1e9
GDR
106602013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10661
10662 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10663 c_pretty_printer variable.
10664
b066401f
GDR
106652013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10666
10667 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10668 (pp_base): Remove.
10669 (pp_c_base): Likewise. Adjust users.
10670 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10671 (pp_c_whitespace): Do not call pp_base.
10672 (pp_c_left_paren): Likewise.
10673 (pp_c_right_paren): Likewise.
10674 (pp_c_left_brace): Likewise.
10675 (pp_c_right_brace): Likewise.
10676 (pp_c_left_bracket): Likewise.
10677 (pp_c_right_bracket): Likewise.
10678 (pp_c_dot): Likewise.
10679 (pp_c_ampersand): Likewise.
10680 (pp_c_star): Likewise.
10681 (pp_c_arrow): Likewise.
10682 (pp_c_semicolon): Likewise.
10683 (pp_c_complement): Likewise.
10684 (pp_c_exclamation): Likewise.
10685 (pp_c_direct_declarator): Likewise.
10686 (pp_c_ws_string): Likewise.
10687 (pp_c_identifier): Likewise.
10688 (pp_c_statement): Likewise.
10689 (print_c_tree): Likewise.
10690
65e5a578
ESR
106912013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10692
10693 PR c++/58072
10694 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10695 provide useful error strings.
10696
137a1a27
GDR
106972013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10698
10699 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10700 printer functions instead of pp_string or operators and punctuators.
10701 (dump_generic_ada_node): Likewise.
10702 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10703 (pp_c_relational_expression): Likewise.
10704 (pp_c_logical_or_expression): Likewise.
10705
07838b13
GDR
107062013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10707
10708 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10709 functions instead of pp_character.
10710 (pp_ada_tree_identifier): Likewise.
10711 (dump_ada_double_name): Likewise.
10712 (dump_ada_function_declaration): Likewise.
10713 (dump_ada_array_domains): Likewise.
10714 (dump_template_types): Likewise.
10715 (dump_generic_ada_node): Likewise.
10716 (print_ada_declaration): Likewise.
10717 (print_ada_struct_decl): Likewise.
10718 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10719
433cc7b0
TT
107202013-07-23 Tom Tromey <tromey@redhat.com>
10721
10722 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10723 * c-common.c (c_common_reswords): Add _Generic.
10724
688010ba
OB
107252013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10726
10727 * c-common.c: Fix typos.
10728 * c-common.h: Likewise.
10729
2a99e5e6
LL
107302013-07-13 Lubos Lunak <l.lunak@suse.cz>
10731
10732 PR c++/55203
10733 * c-common.c (c_common_attribute_table): Add warn_unused.
10734 (handle_warn_unused_attribute): New.
10735
c26302d5
JJ
107362013-07-10 Jakub Jelinek <jakub@redhat.com>
10737
10738 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10739 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10740
dfeadaa0
PC
107412013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10742
10743 PR c++/57869
10744 * c.opt: Add Wconditionally-supported.
10745
6a2fa4b2
GS
107462013-07-08 Graham Stott <graham.stott@btinternet.com>
10747
adfac8df 10748 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10749 unused variables l_length and l_node.
10750
ecdbd01a 107512013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10752
10753 PR c/57821
10754 * c-common.c (complete_array_type): Delay folding first index
10755 like other indices. When folding, check for index overflow.
10756
bedc293e
MG
107572013-06-27 Marc Glisse <marc.glisse@inria.fr>
10758
10759 PR c++/57509
10760 * c-common.h (c_build_vec_perm_expr): New complain argument.
10761 * c-common.c (c_build_vec_perm_expr): Likewise.
10762 Use save_expr also in C++.
10763
604b2bfc
GDR
107642013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10765
10766 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10767 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10768 * c-opts.c (c_common_post_options): Likewise.
10769
dfeadaa0 107702013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10771
10772 * array-notation-common.c (length_mismatch_in_expr): Changed the
10773 parameter type's from a dynamic array to a vec_tree. Also removed
10774 the size parameters.
10775 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10776 the change above.
10777
2ce86d2e
BI
107782013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10779
10780 * c-common.h (struct cilkplus_an_parts): New structure.
10781 (struct cilkplus_an_loop_parts): Likewise.
10782 (cilkplus_extract_an_triplets): New prototype.
10783 (fix_sec_implicit_args): Likewise.
10784 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10785 (fix_sec_implicit_args): Likewise.
604b2bfc 10786
07a6825b
BI
107872013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10788
10789 * array-notation-common.c (find_inv_trees): Removed an unwanted
10790 typecasting.
10791 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10792 enum rid to enum tree_code.
10793
08346abd
JH
107942013-06-11 Jan Hubicka <jh@suse.cz>
10795
10796 * c-common.c (handle_alias_ifunc_attribute): Do not set
10797 DECL_EXTERNAL for weakref variables.
10798 * c-pragma.c (handle_pragma_weak): Make sure aliases
10799 are not declared as external.
10800
d60f1706
BI
108012013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10802
10803 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10804 function from c/c-array-notation.c.
10805 (is_cilkplus_reduce_builtin): Likewise.
10806 (find_rank): Likewise.
10807 (extract_array_notation_exprs): Likewise.
10808 (replace_array_notations): Likewise.
10809 (find_inv_trees): Likewise.
10810 (replace_inv_trees): Likewise.
10811 (contains_array_notation_expr): Likewise.
10812 (find_correct_array_notation_type): Likewise.
10813 * c-common.h (struct inv_list): Moved this struct from the file
10814 c/c-array-notation.c and added a new field called additional tcodes.
10815 (length_mismatch_in_expr_p): New prototype.
10816 (is_cilkplus_reduce_builtin): Likewise.
10817 (find_rank): Likewise.
10818 (extract_array_notation_exprs): Likewise.
10819 (replace_array_notation): Likewise.
10820 (find_inv_trees): Likewise.
10821 (replace_inv_trees): Likewise.
10822 (find_correct_array_notation_type): Likewise.
dfeadaa0 10823
36536d79
BI
108242013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10825
10826 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10827 function array_notation_init_builtins is called.
10828 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10829 * c-common.def (ARRAY_NOTATION_REF): New tree.
10830 * c-common.h (build_array_notation_expr): New function declaration.
10831 (build_array_notation_ref): Likewise.
10832 (extract_sec_implicit_index_arg): New extern declaration.
10833 (is_sec_implicit_index_fn): Likewise.
10834 (ARRAY_NOTATION_CHECK): New define.
10835 (ARRAY_NOTATION_ARRAY): Likewise.
10836 (ARRAY_NOTATION_START): Likewise.
10837 (ARRAY_NOTATION_LENGTH): Likewise.
10838 (ARRAY_NOTATION_STRIDE): Likewise.
10839 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10840 ARRAY_NOTATION_REF.
10841 (pp_c_expression): Likewise.
10842 * c.opt (flag_enable_cilkplus): New flag.
10843 * array-notation-common.c: New file.
10844
f7716d57
JJ
108452013-05-14 Jakub Jelinek <jakub@redhat.com>
10846
10847 PR c++/57274
10848 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10849
a5e0cd1d
MG
108502013-05-10 Marc Glisse <marc.glisse@inria.fr>
10851
10852 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10853 vectors.
10854
f6bc1c4a
HS
108552013-05-07 Han Shen <shenhan@google.com>
10856
10857 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10858
3f12f6e9
SKS
108592013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10860
10861 * c-common.c (check_user_alignment): Emit error for negative values.
10862
61949153
PC
108632013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10864
10865 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10866
e93e18e9
PC
108672013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10868
10869 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10870 __GXX_EXPERIMENTAL_CXX1Y__.
10871
44d90fe1 108722013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10873 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10874
10875 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10876 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10877 to simply use OPT_Wpointer_arith.
10878 (c_sizeof_or_alignof_type): Likewise.
10879
13f39b2e
PC
108802013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10881
10882 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10883
4b84d650
JJ
108842013-04-12 Jakub Jelinek <jakub@redhat.com>
10885
10886 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10887 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10888 specifiers.
10889
fb037b5d
SB
108902013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10891
10892 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10893
4e856798
PC
108942013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10895
10896 * c-common.c (pointer_int_sum): Remove dead code.
10897
4b1baac8
RS
108982013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10899
10900 PR middle-end/56524
10901 * c-common.c (handle_optimize_attribute): Don't call
10902 save_optabs_if_changed.
10903
0b50e654
JJ
109042013-03-05 Jakub Jelinek <jakub@redhat.com>
10905
10906 PR middle-end/56461
10907 * c-pch.c (pch_init): Free target_validity at the end.
10908
48c41403
JJ
109092013-03-04 Jakub Jelinek <jakub@redhat.com>
10910
10911 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10912
e664c61c
KS
109132013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10914 Jakub Jelinek <jakub@redhat.com>
10915
10916 PR sanitizer/56454
10917 * c-common.c (handle_no_sanitize_address_attribute): New function.
10918 (c_common_attribute_table): Add no_sanitize_address attribute.
10919 (handle_no_address_safety_analysis_attribute): Add
10920 no_sanitize_address attribute, not no_address_safety_analysis
10921 attribute.
10922
a475fd3d 109232013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10924
10925 PR target/52555
10926 * c-common.c (handle_optimize_attribute): Call
10927 save_optabs_if_changed.
10928
f6007d99
JJ
109292013-02-18 Jakub Jelinek <jakub@redhat.com>
10930 Steven Bosscher <steven@gcc.gnu.org>
10931
10932 PR pch/54117
10933 * c-opts.c (c_common_post_options): If debug info is enabled
10934 and non-dwarf*, refuse to load PCH files and when writing PCH
10935 file warn.
10936
cf35e2b1
JJ
109372013-02-05 Jakub Jelinek <jakub@redhat.com>
10938
10939 PR middle-end/56167
10940 * c-common.c (handle_error_attribute): Fix condition.
10941
32887460
JJ
109422013-01-30 Jakub Jelinek <jakub@redhat.com>
10943
10944 PR c++/55742
10945 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10946
5af057d8
JM
109472013-01-18 Jason Merrill <jason@redhat.com>
10948
10949 PR target/54908
10950 * c.opt (-fextern-tls-init): New.
10951 * c-opts.c (c_common_post_options): Handle it.
10952
cc83c823
JJ
109532013-01-09 Jakub Jelinek <jakub@redhat.com>
10954
10955 PR c/48418
10956 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10957 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10958 and is either negative or bigger or equal to type precision
10959 of the first operand.
10960
a859517f
MP
109612012-12-03 Marek Polacek <polacek@redhat.com>
10962
10963 PR c/55570
10964 * c-common.c (check_user_alignment): Swap order of tests,
10965 check TREE_CODE first.
10966
2d7aa578
ESR
109672012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10968
10969 PR c++/52654
10970 * c-common.h (overflow_type): New enum.
10971 (build_userdef_literal): Add overflow_type argument.
10972 (tree_userdef_literal): Add overflow_type.
10973 (USERDEF_LITERAL_OVERFLOW): New access macro.
10974 * c-common.c (build_userdef_literal): Add overflow_type
10975 argument.
10976 * c-lex.c (c_lex_with_flags): Add overflow_type to
10977 build_userdef_literal calls.
10978 (interpret_integer, interpret_float): Add overflow_type argument.
10979
cc3c4f62
RB
109802012-11-28 Richard Biener <rguenther@suse.de>
10981
10982 PR c/35634
10983 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10984 here and use a type with proper overflow behavior for types that would
10985 need to be promoted for the arithmetic.
10986
77bc5132
JJ
109872012-11-23 Jakub Jelinek <jakub@redhat.com>
10988
10989 PR sanitizer/55435
10990 * c-common.c (handle_no_address_safety_analysis_attribute): New
10991 function.
10992 (c_common_attribute_table): Add no_address_safety_analysis.
10993
5dc99c46
SB
109942012-11-16 Simon Baldwin <simonb@google.com>
10995
10996 * c.opt: Add f[no-]canonical-system-headers.
10997 * c-opts.c (c_common_handle_option): Handle
10998 OPT_fcanonical_system_headers.
10999
a4a0016d
ESR
110002012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11001
11002 PR c++/54413
11003 * c-opts.c (c_common_handle_option): Set new flags.
11004 * c.opt: Describe new flags.
11005
7dbb85a7
JM
110062012-11-09 Jason Merrill <jason@redhat.com>
11007
11008 * c.opt (Wabi-tag): New.
11009
ad7bac31
AK
110102012-11-09 Andi Kleen <ak@linux.intel.com>
11011
11012 PR 55139
11013 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11014 MEMMODEL_MASK
ad7bac31 11015
7332899a
MLI
110162012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11017
11018 PR c/53063
11019 * c.opt (Wformat): Make it Alias Wformat=1.
11020 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11021 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11022 LangEnabledBy.
11023 (Wformat=): RejectNegative. Use LangEnabledBy.
11024 (Wnonnull): Use LangEnabledBy.
11025 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11026 * c-format.c (set_Wformat): Delete.
11027 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11028 (maybe_read_dollar_number): Likewise.
11029 (avoid_dollar_number): Likewise.
11030 (finish_dollar_format_checking): Likewise.
11031 (check_format_info): Likewise.
11032 (check_format_info_main): Likewise.
11033 (check_format_types): Likewise.
11034 (format_type_warning): Likewise.
11035 * c-common.c (int): Likewise.
11036 (check_function_sentinel): Likewise.
8e745a17 11037 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11038
34a180a6
MLI
110392012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11040
11041 PR c/53063
11042 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11043 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11044 Use LangEnabledBy.
11045 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11046 common.opt.
11047 (Wvariadic-macros): Init(1).
11048 * c-opts.c (c_common_handle_option): Do not handle them
11049 explicitly.
11050 (c_common_post_options): Likewise.
11051 (sanitize_cpp_opts): warn_unused_macros is now
11052 cpp_warn_unused_macros.
11053 (push_command_line_include): Likewise.
11054 * c-common.c (warn_unknown_pragmas): Do not define.
11055 * c-common.h (warn_unknown_pragmas): Do not declare.
11056
3f46d6a5
MLI
110572012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11058
11059 PR c/51294
11060 * c-common.c (conversion_warning): Handle conditional expressions.
11061
880661a4
JW
110622012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11063
11064 PR c++/54930
11065 * c.opt (Wreturn_local_addr): Define new option.
11066
4514a96b
JM
110672012-10-25 Jason Merrill <jason@redhat.com>
11068
f14edc1a
JM
11069 * c.opt (Wvirtual-move-assign): New.
11070
4514a96b
JM
11071 * c.opt (Winherited-variadic-ctor): New.
11072
93100c6b
MG
110732012-10-25 Marc Glisse <marc.glisse@inria.fr>
11074
11075 PR c++/54427
11076 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11077
1efcb8c6
JM
110782012-10-23 Joseph Myers <joseph@codesourcery.com>
11079
11080 * c-common.h (pch_cpp_save_state): Declare.
11081 * c-target.def (c_preinclude): New hook.
11082 * c-opts.c (done_preinclude): New.
11083 (push_command_line_include): Handle default preincluded header.
11084 (cb_file_change): Call pch_cpp_save_state when calling
11085 push_command_line_include.
11086 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11087 (pch_cpp_save_state): New.
11088 (pch_init): Call pch_cpp_save_state conditionally, instead of
11089 calling cpp_save_state.
11090
4a0ae68e
MLI
110912012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11092
11093 PR c/53063
11094 PR c/40989
11095 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11096 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11097 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11098 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11099 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11100 * c-opts.c (c_common_handle_option): Remove explicit handling from
11101 here.
11102 (c_common_post_options): Likewise.
11103
67e4210b
EB
111042012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11105
11106 * c-ada-spec.c (LOCATION_COL): Delete.
11107 (compare_location): New function.
11108 (compare_node): Use it.
11109 (compare_comment): Likewise.
11110
65d4f2cd
MLI
111112012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11112
11113 PR c/53063
11114 PR c/40989
11115 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11116 * c-opts.c (c_common_handle_option): Do not set them here. Add
11117 comment.
11118 (c_common_post_options): Likewise.
11119
909881cb
EB
111202012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11121
11122 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11123 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11124 Remove POINTER_TYPE handling, add large unsigned handling and use
11125 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11126
3a785c97
JJ
111272012-10-12 Jakub Jelinek <jakub@redhat.com>
11128
11129 PR c/54381
11130 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11131 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11132 locs and array of 3 trees instead of just single loc and single
11133 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11134 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11135 For *cmp* builtins that take two sources strings report warnings
11136 about first and second source, not about destination and source.
11137
5e54f81d
MG
111382012-10-12 Marc Glisse <marc.glisse@inria.fr>
11139
11140 PR c++/53055
11141 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11142
f5b02f1e
EB
111432012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11144
11145 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11146 declaring something coming from another file.
11147
b46dbc6c
AC
111482012-10-10 Arnaud Charlet <charlet@adacore.com>
11149
f5b02f1e 11150 PR ada/54845
b46dbc6c
AC
11151 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11152
5d9de0d0
PC
111532012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11154
11155 PR c++/54194
11156 * c-common.c (warn_about_parentheses): Add location_t parameter;
11157 use EXPR_LOC_OR_LOC.
11158 * c-common.h: Update declaration.
11159
a212e43f
MG
111602012-10-09 Marc Glisse <marc.glisse@inria.fr>
11161
11162 PR c++/54427
11163 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11164 more operations. Make error messages optional.
11165 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11166 (scalar_to_vector): Declare.
11167
b1db7f91
JM
111682012-10-08 Jason Merrill <jason@redhat.com>
11169
11170 * c-common.c (c_common_reswords): Add thread_local.
11171
e28d52cf
DS
111722012-10-08 Dodji Seketeli <dodji@redhat.com>
11173
11174 PR c++/53528 C++11 attribute support
11175 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11176 new functions.
11177 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11178 static function.
11179 (handle_aligned_attribute): In choose strictest alignment
11180 among many. Use new check_cxx_fundamental_alignment_constraints.
11181 (handle_transparent_union_attribute): In c++11 attribute syntax,
11182 don't look through typedefs.
11183
3b78de56
AC
111842012-10-04 Arnaud Charlet <charlet@adacore.com>
11185
11186 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11187 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11188 out of dumpfile.h.
11189
6040bb5f
DC
111902012-09-25 Dehao Chen <dehao@google.com>
11191
11192 PR middle-end/54645
3b78de56 11193 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11194 map when read in the pch.
11195
3f8257db 111962012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11197
11198 * c-ada-spec.c: Style fixes.
11199
3f8257db 112002012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11201
11202 * c.opt (-fada-spec-parent): Define new command line switch.
11203 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11204 is specified, generate binding spec as a child of the specified unit.
11205
0ccb505d
PC
112062012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11207 Manuel López-Ibáñez <manu@gcc.gnu.org>
11208
11209 PR c++/53210
11210 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11211
c583af79
AC
112122012-08-23 Arnaud Charlet <charlet@adacore.com>
11213
11214 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11215 for pointers, and add missing Convention C pragma.
11216 (print_ada_struct_decl): Add missing aliased keyword.
11217 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11218
1a4049e7
JJ
112192012-08-17 Jakub Jelinek <jakub@redhat.com>
11220
11221 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11222 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11223 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11224 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11225 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11226
70b5e7dc
RG
112272012-08-10 Richard Guenther <rguenther@suse.de>
11228
11229 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11230
f8923f7e
SB
112312012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11232
11233 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11234 instead of separate pp_newline and pp_flush.
11235 (print_c_tree): Likewise.
11236
e45abe1f
RH
112372012-07-26 Richard Henderson <rth@redhat.com>
11238
11239 * c-common.c (handle_hot_attribute): Allow labels.
11240 (handle_cold_attribute): Likewise.
11241
332f1d24
JJ
112422012-07-20 Jakub Jelinek <jakub@redhat.com>
11243
11244 PR c++/28656
11245 * c-common.c (check_function_nonnull): Handle multiple nonnull
11246 attributes properly.
11247
7ee2468b
SB
112482012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11249
11250 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11251 * c-ada-spec.c: Likewise.
11252 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11253
ee7b28eb
SB
112542012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11255
11256 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11257 Remove code conditional on it.
11258
6bdf3519
SB
112592012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11260
11261 * c-gimplify.c: Do not include basic-block.h.
11262 * c-common.c: Do not include linfuncs.h.
11263
532aafad
SB
112642012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11265
11266 * c-common.h: Include tree.h.
11267
8d0d1915
JM
112682012-07-02 Jason Merrill <jason@redhat.com>
11269
11270 PR c++/53524
11271 * c-common.c (get_priority): Call default_conversion.
11272
fbc873ad
UB
112732012-07-01 Uros Bizjak <ubizjak@gmail.com>
11274
11275 * c-pch.c (c_common_write_pch): Remove unused variables.
11276
d4a10d0a
SB
112772012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11278
11279 * cppspec.c: Moved from gcc/ to here.
11280
6f3a2e23
KT
112812012-06-27 Kai Tietz <ktietz@redhat.com>
11282
11283 PR preprocessor/37215
11284 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11285
8ca92d04
SB
112862012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11287
11288 * c-common.h (c_common_print_pch_checksum): Remove.
11289 * c-pch.c: Do not include output.h.
11290 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11291 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11292 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11293 (struct c_pch_header): Remove.
11294 (get_ident): Update gpch version.
11295 (pch_init): Do not print executable_checksum to asm_out_file.
11296 Do not fail if there is no asm_out_file to read back from. Set
11297 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11298 (c_common_write_pch): Verify that nothing was written to asm_out_file
11299 since pch_init was called. Do not write a c_pch_header, and do not
11300 copy from asm_out_file to the PCH.
11301 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11302 the content of asm_out_file from the PCH.
11303 (c_common_print_pch_checksum): Remove.
11304 * c-opts.c (c_common_init): Print out executable_checksum directly.
11305
70f42967
SB
113062012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11307
11308 * c-target.def (objc_declare_unresolved_class_reference,
11309 objc_declare_class_definition): Add new hooks.
11310
a8781821
SB
113112012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11312
11313 * c-lex.c: Do not include output.h.
11314 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11315 Remove uses of ASM_OUTPUT_IDENT.
11316
9e1a8dd1
RR
113172012-06-15 Marc Glisse <marc.glisse@inria.fr>
11318
11319 PR c++/51033
11320 * c-common.h (c_build_vec_perm_expr): Move decl here.
11321 * c-common.c (c_build_vec_perm_expr): Move definition
11322 here.
11323
6f07a821
SB
113242012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11325
11326 * c.opt (fconserve-space): Turn into a no-op.
11327
9faeb493 113282012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11329
11330 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11331 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11332 both the start and end of the function.
11333
a4b7d13c
SB
113342012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11335
11336 * c-common.c: Do not include output.h.
11337 * c-pragma.c: Likewise.
11338
c265f413
SA
113392012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11340
11341 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11342 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11343 (lang_decl_name): Handle namespace decls.
11344
be7a421e
SB
113452012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11346
11347 * c-ada-spec.c: Do not include output.h.
11348 * c-semantics.c: Likewise.
11349
65de6659
JM
113502012-05-29 Joseph Myers <joseph@codesourcery.com>
11351
11352 * c-common.c: Fix typo.
11353
ca5f4331
MM
113542012-05-29 Michael Matz <matz@suse.de>
11355
11356 * c-common.h (c_expand_decl): Remove prototype.
11357
4f7f7aca
MLI
113582012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11359
11360 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11361 * c-opts.c (c_common_handle_option): Remove code handling
11362 warn_missing_braces.
11363
4a792f9b
PC
113642012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11365
11366 PR c++/25137
11367 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11368 -Wmissing_braces.
11369
650dc14a
DS
113702012-05-22 Dodji Seketeli <dodji@redhat.com>
11371
11372 PR c++/53322
11373 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11374
9b095bf1
MLI
113752012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11376
11377 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11378 * c-opts.c (c_common_handle_option): Do not handle explicitly
11379 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11380
0b2c4be5
DS
113812012-05-16 Dodji Seketeli <dodji@redhat.com>
11382
11383 PR preprocessor/7263
ab20d992 11384 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11385 to cpp_classify_number. For diagnostics, use the precise location
11386 instead of the global input_location.
11387
a1bde5af
PC
113882012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11389
d02924ef 11390 PR c++/11856
a1bde5af
PC
11391 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11392
d1ede5f4
BS
113932012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11394
a1bde5af 11395 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11396
f2bc201f
MLI
113972012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11398
11399 PR 53063
11400 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11401 Wreorder): Use LangEnabledBy.
11402 * c-opts.c (c_common_handle_option): Do not enable them
11403 explicitly. Call lang-specific generated functions.
11404 (c_common_post_options): Do not set them here.
11405
95744782
MLI
114062012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11407
11408 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11409 Wmissing-field-initializers,Wmissing-parameter-type,
11410 Wold-style-declaration,Woverride-init): Use EnabledBy.
11411 * c-opts.c (c_common_post_options): Do not set here explicitly.
11412
7d5a5747
MLI
114132012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11414
11415 PR 53063
11416 * c-opts.c (c_common_handle_option): Use handle_generated_option
11417 to enable sub-options.
11418
5a3c9cf2
PC
114192012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11420
11421 PR c++/53158
11422 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11423
3ac8781c
RG
114242012-05-10 Richard Guenther <rguenther@suse.de>
11425
11426 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11427 adjust commentary about TYPE_IS_SIZETYPE types.
11428
1e537948
MLI
114292012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11430
11431 PR c++/53261
11432 * c-common.c (warn_logical_operator): Check that argument of
11433 integer_zerop is not NULL.
11434
f2c4a785
MLI
114352012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11436
11437 PR c/43772
11438 * c-common.c (warn_logical_operator): Do not warn if either side
11439 is already true or false.
11440
50f305ca
MLI
114412012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11442
11443 PR c/51712
11444 * c-common.c (expr_original_type): New.
11445 (shorten_compare): Do not warn for enumeration types.
11446
0c3641b0
MLI
114472012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11448
11449 * c.opt (fpermissive): Add Var(flag_permissive).
11450
7edaa4d2
MG
114512012-04-30 Marc Glisse <marc.glisse@inria.fr>
11452
11453 PR c++/51033
11454 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11455 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11456
b9c8da34
DS
114572012-04-30 Dodji Seketeli <dodji@redhat.com>
11458
11459 Add -Wvarargs option
ab20d992 11460 * c.opt (Wvarargs): Define new option.
b9c8da34 11461
e6c69da0
MLI
114622012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11463
11464 * c-common.c (check_function_arguments): Replace
11465 Wmissing-format-attribute with Wsuggest-attribute=format.
11466
90137d8f
MLI
114672012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11468
11469 * c.opt (Wsuggest-attribute=format): New. Alias of
11470 Wmissing-format-attribute.
11471 * c-format.c (decode_format_type): Replace
11472 Wmissing-format-attribute with Wsuggest-attribute=format.
11473 (check_function_format): Likewise.
11474
9faeb493 114752012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11476
11477 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11478 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11479 * c.opt: Add Wliteral-suffix.
11480
c1771a20
MLI
114812012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11482
11483 PR c/44774
11484 * c.opt (Wpedantic): New.
11485 (pedantic): Alias Wpedantic.
11486 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11487 (c_common_post_options): Likewise.
11488 (sanitize_cpp_opts): Likewise.
11489 * c-lex.c (interpret_float): Likewise.
11490 * c-format.c (check_format_types): Likewise.
11491 * c-common.c (pointer_int_sum): Likewise.
11492 (c_sizeof_or_alignof_type): Likewise.
11493 (c_add_case_label): Likewise.
11494 (c_do_switch_warnings): Likewise.
11495 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11496
04b391c1
JM
114972012-04-15 Jason Merrill <jason@redhat.com>
11498
11499 PR c++/52818
11500 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11501 (C_STD_NAME): Distinguish between C++98 and C++11.
11502
ac868f29
EB
115032012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11504
11505 PR target/52624
11506 * c-common.h (uint16_type_node): Rename into...
11507 (c_uint16_type_node): ...this.
11508 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11509 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11510
fd4116f4
MLI
115112012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11512
11513 * c-common.c (warn_if_unused_value): Move definition to here.
11514 * c-common.h (warn_if_unused_value): Move declaration to here.
11515
573ac65e
WB
115162012-03-23 William Bader <williambader@hotmail.com>
11517
11518 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11519
552b8185
JM
115202012-03-20 Jason Merrill <jason@redhat.com>
11521
11522 * c-common.h (enum cxx_dialect): Add cxx1y.
11523 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11524 test.
11525 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11526 * c-opts.c (c_common_post_options): Likewise.
11527 (set_std_cxx1y): New.
11528 (c_common_handle_option): Call it.
11529 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11530
04398fa8
PC
115312012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11532
11533 PR c++/14710
11534 * c.opt ([Wuseless-cast]): Add.
11535
d2a12ae7
RG
115362012-03-16 Richard Guenther <rguenther@suse.de>
11537
11538 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11539
a12bf402
MLI
115402012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11541
11542 PR c++/44783
11543 * c.opt (ftemplate-backtrace-limit) Add.
11544
5c30094f
RO
115452012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11546
11547 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11548 handling.
11549 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11550 (init_pragma): Don't register extern_prefix.
11551
21fa2faf
RG
115522012-03-12 Richard Guenther <rguenther@suse.de>
11553
11554 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11555 (builtin_type_for_size): Likewise.
11556
e3793c6f
JJ
115572012-02-13 Jakub Jelinek <jakub@redhat.com>
11558
11559 PR c++/52215
11560 * c-common.c (sync_resolve_params): Don't decide whether to convert
11561 or not based on TYPE_SIZE comparison, convert whenever arg_type
11562 is unsigned INTEGER_TYPE.
11563
93286335
PC
115642012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11565
11566 PR c/52118
11567 * c.opt ([Wunused-local-typedefs]): Fix description.
11568
7a421706
MS
115692012-01-24 Mike Stump <mikestump@comcast.net>
11570
11571 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11572 exactly.
11573
ba9b1f11
RG
115742012-01-18 Richard Guenther <rguenther@suse.de>
11575
11576 * c-opts.c (c_common_post_options): Reset LTO flags if
11577 we are about to generate a PCH.
11578
465406be
PC
115792012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11580
11581 PR c++/51777
11582 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11583 use pp_unsigned_wide_integer.
11584
aee15221
RG
115852012-01-10 Richard Guenther <rguenther@suse.de>
11586
11587 PR middle-end/51806
11588 * c-opts.c (c_common_handle_option): Move -Werror handling
11589 to language independent code.
11590
5720c0dc
RG
115912012-01-05 Richard Guenther <rguenther@suse.de>
11592
11593 PR middle-end/51764
11594 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11595 from common.opt.
11596
73ac190a
PC
115972011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11598
11599 PR c++/51316
11600 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11601 of array types with an unknown bound.
11602
48b0b196
JM
116032011-12-20 Joseph Myers <joseph@codesourcery.com>
11604
11605 * c-common.c (flag_isoc99): Update comment to refer to C11.
11606 (flag_isoc1x): Change to flag_isoc11.
11607 * c-common.h (flag_isoc99): Update comment to refer to C11.
11608 (flag_isoc1x): Change to flag_isoc11.
11609 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11610 C11.
11611 * c-opts.c (set_std_c1x): Change to set_std_c11.
11612 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11613 Call set_std_c11.
11614 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11615 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11616 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11617 standard.
11618 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11619 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11620 (std=gnu1x): Make alias of std=gnu11.
11621
d58d6eb5
JM
116222011-12-19 Jason Merrill <jason@redhat.com>
11623
11624 PR c++/51228
11625 * c-common.c (handle_transparent_union_attribute): Check the first
11626 field if the type is complete.
11627
b3908fcc
JW
116282011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11629
11630 PR libstdc++/51365
11631 * c-common.c (RID_IS_FINAL): Add.
11632 * c-common.h (RID_IS_FINAL): Add.
11633
fea3ca91
IS
116342011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11635
11636 * c.opt (fgnu-runtime): Provide full description.
11637 (fnext-runtime): Likewise.
11638 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11639
62bad7cd
AM
116402011-11-28 Andrew MacLeod <amacleod@redhat.com>
11641
11642 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11643 predefines in one place. Add LOCK_FREE predefines.
11644 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11645 new func.
11646
c466c4ff
AM
116472011-11-24 Andrew MacLeod <amacleod@redhat.com>
11648
11649 PR c/51256
9faeb493 11650 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11651 conditions
9faeb493
UB
11652 (resolve_overloaded_atomic_exchange,
11653 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11654 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11655 error_mark_node for error conditions.
9faeb493 11656
a5952633
RG
116572011-11-08 Richard Guenther <rguenther@suse.de>
11658
11659 PR middle-end/51010
ab20d992 11660 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11661
0a35513e
AH
116622011-11-07 Richard Henderson <rth@redhat.com>
11663 Aldy Hernandez <aldyh@redhat.com>
11664 Torvald Riegel <triegel@redhat.com>
11665
11666 Merged from transactional-memory.
11667
11668 * c-common.c (handle_tm_wrap_attribute,
11669 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11670 (struct c_common_reswords): Added __transaction* keywords.
11671 (struct c_common_attribute_table): Added transaction* and tm_regparm
11672 attributes.
11673 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11674 masks.
11675 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11676 find_tm_attribute): Declare.
11677
6d87092d
JM
116782011-11-07 Jason Merrill <jason@redhat.com>
11679
11680 PR c++/35688
11681 * c-common.c, c-common.h: Revert yesterday's changes.
11682
8e7860a1
JM
116832011-11-06 Jason Merrill <jason@redhat.com>
11684
11685 PR c++/35688
11686 * c-common.c (decl_has_visibility_attr): Split out from...
11687 (c_determine_visibility): ...here.
11688 * c-common.h: Declare it.
11689
d19fa6b5
JM
116902011-11-06 Joseph Myers <joseph@codesourcery.com>
11691
11692 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11693 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11694 type.
11695 (check_user_alignment): New. Split out of
11696 handle_aligned_attribute. Disallow integer constants with
11697 noninteger types. Conditionally allow zero.
11698 (handle_aligned_attribute): Use check_user_alignment.
11699 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11700
86951993
AM
117012011-11-06 Andrew MacLeod <amacleod@redhat.com>
11702 Richard Henderson <rth@redhat.com>
11703
11704 Merged from cxx-mem-model.
11705
11706 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11707 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11708 parameters that are the same type size.
11709 (get_atomic_generic_size): New. Find size of generic
11710 atomic function parameters and do typechecking.
11711 (add_atomic_size_parameter): New. Insert size into parameter list.
11712 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11713 either __atomic_exchange_n or external library call.
9faeb493 11714 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11715 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11716 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11717 __atomic_load_n or an external library call.
11718 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11719 __atomic_store_n or an external library call.
11720 (resolve_overloaded_builtin): Handle new __atomic builtins.
11721
cf9e9959
EB
117222011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11723
11724 PR c++/50608
11725 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11726 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11727 <INDIRECT_REF>: Return the argument.
11728 <ARRAY_REF>: Remove special code for negative offset.
11729 Call fold_build_pointer_plus instead of size_binop.
11730 (fold_offsetof): Remove STOP_REF argument and adjust.
11731 * c-common.h (fold_offsetof_1): Declare.
11732 (fold_offsetof): Remove STOP_REF argument.
11733
25339f10
JM
117342011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11735
11736 PR c++/50810
11737 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11738 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11739 Wnarrowing for C++0x and C++98.
11740 * c.opt ([Wnarrowing]): Update.
11741
89401152
PC
117422011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11743
11744 PR c++/44277
11745 * c.opt: Add Wzero-as-null-pointer-constant.
11746
97e3ad20
JM
117472011-10-31 Jason Merrill <jason@redhat.com>
11748
15694fdd
JM
11749 * c.opt (-fdeduce-init-list): Off by default.
11750
97e3ad20
JM
11751 PR c++/50920
11752 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11753 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11754 and -Wc++11-compat.
11755 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11756
fb9120e3
RAV
117572011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11758
11759 PR c++/30066
11760 * c.opt (fvisibility-inlines-hidden): Description change.
11761
3ce4f9e4
ESR
117622011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11763
11764 Implement C++11 user-defined literals.
11765 * c-common.c (build_userdef_literal): New.
11766 * c-common.def: New tree code.
11767 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11768 * c-lex.c (interpret_float): Add suffix parm.
11769 (c_lex_with_flags): Build literal tokens.
11770
5f53c243
PC
117712011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11772
11773 PR c++/50841
11774 Revert:
11775 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11776
11777 PR c++/50810
11778 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11779 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11780 Wnarrowing for C++0x and C++98.
11781 * c.opt ([Wnarrowing]): Update.
11782
263734e1
PC
117832011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11784
11785 PR c++/50810
11786 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11787 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11788 Wnarrowing for C++0x and C++98.
11789 * c.opt ([Wnarrowing]): Update.
11790
d2e312d7
PC
117912011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11792
11793 PR c++/45385
11794 * c-common.c (conversion_warning): Remove code looking for
11795 artificial operands.
11796
d17687f6
DS
117972011-10-18 Dodji Seketeli <dodji@redhat.com>
11798
11799 PR bootstrap/50760
11800 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11801 !NO_IMPLICIT_EXTERN_C.
d17687f6 11802
fc8396e9
PC
118032011-10-17 Michael Spertus <mike_spertus@symantec.com>
11804
11805 * c-common.c (c_common_reswords): Add __bases,
11806 __direct_bases.
11807 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11808
118092011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11810
11811 PR c++/50757
11812 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11813
847e697a
TT
118142011-10-15 Tom Tromey <tromey@redhat.com>
11815 Dodji Seketeli <dodji@redhat.com>
11816
11817 * c.opt (fdebug-cpp): New option.
11818 * c-opts.c (c_common_handle_option): Handle the option.
11819 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11820 output stream in parameter. Factorized from ...
11821 (maybe_print_line): ... this. Dump location debug information when
11822 -fdebug-cpp is in effect.
11823 (print_line_1): New static function. Takes an output stream in
11824 parameter. Factorized from ...
11825 (print_line): ... here. Dump location information when -fdebug-cpp
11826 is in effect.
11827 (scan_translation_unit): Dump location information when
11828 -fdebug-cpp is in effect.
11829
92582b75
TT
118302011-10-15 Tom Tromey <tromey@redhat.com>
11831 Dodji Seketeli <dodji@redhat.com>
11832
11833 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11834 without argument.
11835 * c-opts.c (c_common_handle_option)<case
11836 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11837 cases. Handle -ftrack-macro-expansion with and without argument.
11838
46427374
TT
118392011-10-15 Tom Tromey <tromey@redhat.com>
11840 Dodji Seketeli <dodji@redhat.com>
11841
11842 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11843 (print_line, cb_define, do_line_change): Adjust to avoid touching
11844 the internals of struct line_map. Use the public API instead.
11845 * c-pch.c (c_common_read_pch): Likewise.
11846 * c-lex.c (fe_file_change): Likewise.
11847
fc8396e9
PC
118482011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11849
11850 PR c++/17212
11851 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11852
118532011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11854
11855 PR c++/33067
11856 * c-pretty-print.c (pp_c_floating_constant): Output
11857 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11858
e79983f4
MM
118592011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11860
11861 * c-common.c (def_builtin_1): Delete old interface with two
11862 parallel arrays to hold standard builtin declarations, and replace
11863 it with a function based interface that can support creating
11864 builtins on the fly in the future. Change all uses, and poison
11865 the old names. Make sure 0 is not a legitimate builtin index.
11866 * c-omp.c (c_finish_omp_barrier): Ditto.
11867 (c_finish_omp_taskwait): Ditto.
11868 (c_finish_omp_flush): Ditto.
11869
6637388f
TG
118702011-10-11 Tristan Gingold <gingold@adacore.com>
11871
11872 * c.opt: (fallow-parameterless-variadic-functions): New.
11873
3797cb21
DS
118742011-09-08 Dodji Seketeli <dodji@redhat.com>
11875
11876 PR c++/33255 - Support -Wunused-local-typedefs warning
11877 * c-common.h (struct c_language_function::local_typedefs): New
11878 field.
9faeb493
UB
11879 (record_locally_defined_typedef, maybe_record_typedef_use)
11880 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11881 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11882 (maybe_record_typedef_use)
11883 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11884 * c.opt: Declare new -Wunused-local-typedefs flag.
11885
693ddb1b
EB
118862011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11887
11888 PR middle-end/50266
11889 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11890 computations.
11891
830c740f
RG
118922011-09-05 Richard Guenther <rguenther@suse.de>
11893
11894 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11895 of integer_minus_one_node for empty array upper bounds.
11896
892a371f
DS
118972011-08-28 Dodji Seketeli <dodji@redhat.com>
11898
11899 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11900 it's the first time it's being called on this main TU.
11901
0e3fdb48
RB
119022011-08-24 Richard Guenther <rguenther@suse.de>
11903
11904 PR c/49396
11905 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11906
119072011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11908
11909 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11910 defined in cpp_init_builtins and c_cpp_builtins.
11911
d4a83c10
JM
119122011-08-19 Joseph Myers <joseph@codesourcery.com>
11913
11914 * c-common.c (c_common_reswords): Add __builtin_complex.
11915 * c-common.h (RID_BUILTIN_COMPLEX): New.
11916
bbceee64
JM
119172011-08-18 Joseph Myers <joseph@codesourcery.com>
11918
11919 * c-common.c (c_common_reswords): Add _Noreturn.
11920 (keyword_is_function_specifier): Handle RID_NORETURN.
11921 * c-common.h (RID_NORETURN): New.
11922
3f8257db 119232011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11924
11925 * c-common.c (unsafe_conversion_p): New function. Check if it is
11926 unsafe to convert an expression to the type.
11927 (conversion_warning): Adjust, use unsafe_conversion_p.
11928 * c-common.h (unsafe_conversion_p): New function declaration.
11929
20906c66
JJ
119302011-08-02 Jakub Jelinek <jakub@redhat.com>
11931
11932 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11933 (c_finish_omp_taskyield): New prototype.
11934 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11935 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11936 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11937 or RHS1 have side-effects, evaluate those too in the right spot,
11938 if it is a decl and LHS is also a decl, error out if they
11939 aren't the same.
11940 (c_finish_omp_taskyield): New function.
11941 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11942 * c-pragma.c (omp_pragmas): Add taskyield.
11943 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11944 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11945 PRAGMA_OMP_CLAUSE_MERGEABLE.
11946
770e5a2e
DS
119472011-07-25 Dodji Seketeli <dodji@redhat.com>
11948
11949 * c-common.h (set_underlying_type): Remove parm name from
11950 declaration.
11951
1baae426
RG
119522011-07-25 Romain Geissler <romain.geissler@gmail.com>
11953
11954 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11955
fcb21722
JM
119562011-07-22 Jason Merrill <jason@redhat.com>
11957
76f86d00
JM
11958 PR c++/49793
11959 * c.opt (Wnarrowing): New.
11960
3a636414
JM
11961 PR c++/30112
11962 * c-common.h: Declare c_linkage_bindings.
11963 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11964
fcb21722
JM
11965 PR c++/49813
11966 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11967 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11968 as flag_isoc99 for 'restrict'.
11969 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11970
02614448
ILT
119712011-07-21 Ian Lance Taylor <iant@google.com>
11972
11973 PR middle-end/49705
11974 * c-common.c (c_disable_warnings): New static function.
11975 (c_enable_warnings): New static function.
11976 (c_fully_fold_internal): Change local unused_p to bool. Call
11977 c_disable_warnings and c_enable_warnings rather than change
11978 c_inhibit_evaluation_warnings.
11979
34429675
JM
119802011-07-20 Jason Merrill <jason@redhat.com>
11981
11982 PR c++/6709 (DR 743)
11983 PR c++/42603 (DR 950)
11984 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11985 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11986 (CPP_DECLTYPE): New.
11987 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11988
5d49b6a7
RG
119892011-07-19 Richard Guenther <rguenther@suse.de>
11990
11991 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11992 * c-omp.c (c_finish_omp_for): Likewise.
11993
e84a58ff
EB
119942011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11995
11996 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11997 body on the next line.
11998
329af3c7
JM
119992011-07-08 Jason Merrill <jason@redhat.com>
12000
4063e61b
JM
12001 PR c++/45437
12002 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12003
329af3c7
JM
12004 PR c++/49673
12005 * c-common.c (c_apply_type_quals_to_decl): Don't check
12006 TYPE_NEEDS_CONSTRUCTING.
12007
1a072294
RG
120082011-07-06 Richard Guenther <rguenther@suse.de>
12009
12010 * c-common.c (c_common_nodes_and_builtins):
12011 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12012
fce5dddd
RG
120132011-07-05 Richard Guenther <rguenther@suse.de>
12014
12015 * c-common.c (c_common_nodes_and_builtins): Build all common
12016 tree nodes first.
12017
45d439ac
JJ
120182011-06-27 Jakub Jelinek <jakub@redhat.com>
12019
56300785
JJ
12020 * c-common.h (c_tree_chain_next): New static inline function.
12021
45d439ac
JJ
12022 * c-common.c (check_builtin_function_arguments): Handle
12023 BUILT_IN_ASSUME_ALIGNED.
12024
e0a8ecf2
AM
120252011-06-21 Andrew MacLeod <amacleod@redhat.com>
12026
12027 * c-common.c: Add sync_ or SYNC__ to builtin names.
12028 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12029
120302011-06-20 Pierre Vittet <piervit@pvittet.com>
12031
12032 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12033 handler.
12034 (gen_pragma_handler): New union.
12035 (internal_pragma_handler): New type.
12036 (c_register_pragma_with_data)
12037 (c_register_pragma_with_expansion_and_data): New functions.
12038
12039 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12040 (c_register_pragma, c_register_pragma_with_expansion)
12041 (c_invoke_pragma_handler): Changed to work with
12042 internal_pragma_handler.
12043 (c_register_pragma_with_data)
12044 (c_register_pragma_with_expansion_and_data): New functions.
12045
677f3fa8
JM
120462011-06-14 Joseph Myers <joseph@codesourcery.com>
12047
12048 * c-common.c: Include common/common-target.h.
12049 (handle_section_attribute): Use
12050 targetm_common.have_named_sections.
12051 * c-cppbuiltin.c: Include common/common-target.h.
12052 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12053
d7fc8c14
RG
120542011-06-10 Richard Guenther <rguenther@suse.de>
12055
12056 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12057 to print a IDENTIFIER_NODE.
12058
10e48e39
RO
120592011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12060 Joseph Myers <joseph@codesourcery.com>
12061
12062 * c.opt (fbuilding-libgcc): New option.
12063 * c-cppbuiltin.c (c_cpp_builtins): Define
12064 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12065
6976ae51
JM
120662011-06-07 Jason Merrill <jason@redhat.com>
12067
3ff60975
JM
12068 * c-common.c (max_tinst_depth): Lower default to 900.
12069
6976ae51
JM
12070 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12071
009db074
RG
120722011-06-07 Richard Guenther <rguenther@suse.de>
12073
12074 * c-common.c (c_common_nodes_and_builtins): Do not set
12075 size_type_node or call set_sizetype.
12076
b4592b92
DS
120772011-06-07 Dodji Seketeli <dodji@redhat.com>
12078
12079 PR debug/49130
12080 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12081 type when using pointer comparison to compare types.
b4592b92 12082
014ab419
JW
120832011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12084
12085 * c.opt: Add -Wdelete-non-virtual-dtor.
12086 * c-opts.c (c_common_handle_option): Include it in -Wall.
12087
4f60111f
NF
120882011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12089
12090 PR bootstrap/49190
12091
12092 Revert:
12093 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12094
12095 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12096 not tree_common.
12097
4cc4f2f4
JJ
120982011-05-27 Jakub Jelinek <jakub@redhat.com>
12099
12100 PR c++/49165
12101 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12102 C++ don't call c_common_truthvalue_conversion on void type arms.
12103
38e01f9e
NF
121042011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12105
12106 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12107 (stmt_list_stack): Define.
12108 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12109 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12110
92e948a8
NF
121112011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12112
12113 * c-common.c (warning_candidate_p): Check for BLOCKs.
12114
a2fc3e63
NF
121152011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12116
12117 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12118 not tree_common.
12119
0957c029
JJ
121202011-05-25 Jakub Jelinek <jakub@redhat.com>
12121
12122 * c-common.c (def_fn_type): Remove extra va_end.
12123
828fb3ba
JM
121242011-05-23 Jason Merrill <jason@redhat.com>
12125
12126 PR c++/48106
12127 * c-common.c (c_common_get_narrower): New.
12128 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12129
dde05067
NF
121302011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12131
12132 * c-common.h (check_function_arguments): Tweak prototype of
12133 check_function_arguments.
12134 * c-common.c (check_function_arguments): Likewise. Adjust
12135 calls to check_function_nonnull, check_function_format, and
12136 check_function_sentinel.
12137 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12138 separate attributes and typelist arguments. Use
12139 FOREACH_FUNCTION_ARGS to iterate over argument types.
12140
3c0d13bf
PC
121412011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12142
12143 * c-common.c (c_common_reswords): Reorder.
12144 * c-common.h (rid): Likewise.
12145
8242dd04
NF
121462011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12147
12148 * c-common.c (def_fn_type): Don't call build_function_type, call
12149 build_function_type_array or build_varargs_function_type_array
12150 instead.
12151 (c_common_nodes_and_builtins): Likewise.
12152
3d528853
NF
121532011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12154
12155 * c-common.c (c_add_case_label): Omit the loc argument to
12156 build_case_label.
12157 * c-common.h (build_case_label): Remove.
12158 * c-semantics.c (build_case_label): Remove.
12159
a04a722b
JM
121602011-05-05 Joseph Myers <joseph@codesourcery.com>
12161
12162 * c-objc.h (objc_start_method_definition): Update prototype.
12163 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12164
e19a18d4
NF
121652011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12166
12167 * c-common.c (check_main_parameter_types): Reindent. Don't use
12168 TYPE_ARG_TYPES directly.
12169 (handle_nonnull_attribute): Likewise.
12170 (sync_resolve_params): Likewise.
12171 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12172 to check_format_string.
12173 (handle_format_attribute): Likewise.
12174 (check_format_string): Take a function type to examine instead of
12175 a type list. Use a function_arg_iterator to step through argument
12176 types.
12177
c62c040f
RG
121782011-05-04 Richard Guenther <rguenther@suse.de>
12179
12180 * c-common.c (fix_string_type): Use size_int for index type bounds.
12181 (start_fname_decls): Do not pass NULL to build_int_cst.
12182 (c_init_attributes): Likewise.
12183 * c-lex.c (c_lex_with_flags): Likewise.
12184
c12ff9d8
JM
121852011-04-27 Jason Merrill <jason@redhat.com>
12186
12187 * c-common.c (make_tree_vector_from_list): New.
12188 * c-common.h: Declare it.
12189
304dfbe3
RG
121902011-04-26 Richard Guenther <rguenther@suse.de>
12191
12192 PR preprocessor/48248
12193 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12194 for output size with -P.
12195
3c0d13bf
PC
121962011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12197
12198 * c-common.c (struct c_common_resword): Add __underlying_type.
12199 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12200
04695783
JM
122012011-04-20 Jim Meyering <meyering@redhat.com>
12202
12203 * c-format.c (init_dollar_format_checking): Remove useless
12204 if-before-free.
12205
0dc33c3c
NP
122062011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12207
12208 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12209 (objc_detect_field_duplicates): New.
0dc33c3c 12210 * stub-objc.c: Likewise.
3c0d13bf 12211
c59633d9
NP
122122011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12213
12214 * stub-objc.c (objc_declare_protocols): Renamed to
12215 objc_declare_protocol.
12216 * c-objc.h: Likewise.
3c0d13bf 12217
32dabdaf
NP
122182011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12219
12220 * stub-objc.c (objc_declare_class): Updated argument name.
12221
81f653d6
NF
122222011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12223
12224 * c-common.h (c_common_init_ts): Declare.
12225 * c-common.c (c_common_init_ts): Define.
12226
eb345401
NP
122272011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12228
12229 * c-objc.h (objc_build_message_expr): Updated prototype.
12230 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12231
a358e188
MJ
122322011-04-12 Martin Jambor <mjambor@suse.cz>
12233
12234 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12235 of cgraph_node.
12236
e6313a78
RG
122372011-04-11 Richard Guenther <rguenther@suse.de>
12238
12239 * c-common.c (complete_array_type): Build a range type of
12240 proper type.
12241
dcf0c47e
NF
122422011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12243
12244 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12245 (handle_type_generic_attribute): Likewise.
12246
1ee44b26
JM
122472011-04-07 Jason Merrill <jason@redhat.com>
12248
12249 PR c++/48450
12250 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12251 conversion from C++0x scoped enum.
12252
acce4e77
JM
122532011-04-06 Joseph Myers <joseph@codesourcery.com>
12254
12255 * c-target-def.h: New file.
12256 * c-target.def: New file.
12257 * c-target.h: New file.
12258 * c-common.c (targetcm): Don't define here.
12259 * c-common.h (default_handle_c_option): Declare.
12260 * c-format.c: Include c-target.h instead of target.h.
12261 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12262 include tm.h.
12263 (default_handle_c_option): Move from targhooks.c.
12264
e2eefb55
JJ
122652011-03-29 Jakub Jelinek <jakub@redhat.com>
12266
12267 PR preprocessor/48248
12268 * c-ppoutput.c (print): Add src_file field.
12269 (init_pp_output): Initialize it.
12270 (maybe_print_line): Don't optimize by adding up to 8 newlines
12271 if map->to_file and print.src_file are different file.
12272 (print_line): Update print.src_file.
12273
ba78087b
KT
122742011-03-25 Kai Tietz <ktietz@redhat.com>
12275
12276 * c-ada-spec.c (compare_comment): Use filename_cmp
12277 instead of strcmp for filename.
12278
0edf1bb2
JL
122792011-03-25 Jeff Law <law@redhat.com>
12280
adfac8df 12281 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12282
c7dc8804
JM
122832011-03-25 Jason Merrill <jason@redhat.com>
12284
12285 * c.opt: Add -std=c++03.
12286
d1d879b1
EB
122872011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12288
12289 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12290
3f8257db 122912011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12292
12293 PR target/12171
5050afdf
KT
12294 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12295 Display allowed attributes for function pointer types.
12296 (pp_c_attributes_display): New function to display
12297 attributes having affects_type_identity flag set to true.
12298 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12299
62d784f7
KT
12300 * c-common.c (c_common_attribute_table):
12301 Add new element.
12302 (c_common_format_attribute_table): Likewise.
12303
82d37118
JM
123042011-03-18 Jason Merrill <jason@redhat.com>
12305
49a000c3
JM
12306 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12307 * c-common.h: Don't declare it here.
12308 * c-common.c: Or define it here.
12309 * c-opts.c (c_common_handle_option): Or set it here.
12310
82d37118
JM
12311 PR c++/35315
12312 * c-common.c (handle_transparent_union_attribute): Don't
12313 make a duplicate type in C++.
12314
17bc631c
JM
123152011-03-15 Jason Merrill <jason@redhat.com>
12316
12317 * c-common.c (max_constexpr_depth): New.
12318 * c-common.h: Declare it.
12319 * c-opts.c (c_common_handle_option): Set it.
12320 * c.opt (fconstexpr-depth): New option.
12321
1b9b91a6
JM
123222011-03-11 Jason Merrill <jason@redhat.com>
12323
f231b5ff
JM
12324 * c-common.c (attribute_takes_identifier_p): Add missing const.
12325
1b9b91a6
JM
12326 PR c++/46803
12327 * c-common.c (attribute_takes_identifier_p): Assume that an
12328 unknown attribute takes an identifier.
12329
a19e4d44
NF
123302011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12331
12332 PR c/47786
12333 * c-common.c (c_type_hash): Call list_length instead of iterating
12334 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12335
982d62f6
JJ
123362011-02-19 Jakub Jelinek <jakub@redhat.com>
12337
12338 PR c/47809
12339 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12340
0a256240
NP
123412011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12342
12343 * c.opt (fobjc-abi-version=) New.
12344 (fobjc-nilcheck): New.
12345
ba9e6dd5
NF
123462011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12347
12348 PR c++/46890
12349 * c-common.h (keyword_is_decl_specifier): Declare.
12350 * c-common.c (keyword_is_decl_specifier): Define.
12351 (keyword_is_function_specifier): New function.
12352
7273813a
JJ
123532011-01-26 Jakub Jelinek <jakub@redhat.com>
12354
12355 PR c/47473
12356 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12357 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12358 REAL_TYPE.
12359
908ef79b
AC
123602011-01-26 Arnaud Charlet <charlet@adacore.com>
12361
12362 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12363
237e9384
JJ
123642011-01-26 Jakub Jelinek <jakub@redhat.com>
12365
12366 PR pch/47430
12367 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12368 after init_c_lex if pch_file is set.
12369
47ea1edf
DK
123702011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12371
d4dba752 12372 PR c++/43601
47ea1edf
DK
12373 * c.opt (-fkeep-inline-dllexport): New switch.
12374
2aa9c6ae
RG
123752011-01-12 Richard Guenther <rguenther@suse.de>
12376
12377 PR middle-end/32511
12378 * c-common.c (handle_weak_attribute): Warn instead of error
12379 on declaring an inline function weak.
12380
7bd11157
TT
123812011-01-05 Tom Tromey <tromey@redhat.com>
12382
12383 * c-common.h (lvalue_error): Update.
12384 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12385 not error.
12386
0e66e494 123872010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12388
b4f588c4
NP
12389 PR objc/47075
12390 * c-objc.h (objc_finish_message_expr): Added argument to
12391 prototype.
12392
f4da8dce
NF
123932010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12394
12395 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12396 Use prototype_p.
12397
46270f14
NP
123982010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12399
12400 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12401 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12402
4816c593
NF
124032010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12404
12405 * c-common.h (readonly_error): Declare.
12406 * c-common.c (readonly_error): Define.
12407
7a6daeb0
NF
124082010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12409
12410 * c-common.h (invalid_indirection_error): Declare.
12411 * c-common.c (invalid_indirection_error): Define.
12412
892f6119
RG
124132010-12-03 Richard Guenther <rguenther@suse.de>
12414
12415 PR c/46745
12416 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12417 (pp_c_unary_expression): Likewise.
12418 (pp_c_expression): Likewise.
12419
6c39e757
NP
124202010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12421
12422 * c-common.h (objc_finish_function): New.
12423 (objc_non_volatilized_type): Removed.
12424 (objc_type_quals_match): Removed.
12425 * stub-objc.c (objc_finish_function): New.
12426 (objc_non_volatilized_type): Removed.
12427 (objc_type_quals_match): Removed.
9faeb493 12428
7c475d11
JM
124292010-11-30 Joseph Myers <joseph@codesourcery.com>
12430
12431 * c-common.h (parse_optimize_options): Declare.
12432 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12433 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12434
71f3e391
JM
124352010-11-29 Joseph Myers <joseph@codesourcery.com>
12436
12437 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12438 GET_ENVIRONMENT.
12439 * c-pch.c (O_BINARY): Don't define here.
12440 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12441
d5fabb58
JM
124422010-11-25 Joseph Myers <joseph@codesourcery.com>
12443
12444 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12445 targetm.except_unwind_info.
12446
299404a1
JM
124472010-11-23 Joseph Myers <joseph@codesourcery.com>
12448
12449 * c-opts.c (c_common_handle_option): Pass location to
12450 set_struct_debug_option.
12451
c98cd5bf
JM
124522010-11-23 Joseph Myers <joseph@codesourcery.com>
12453
12454 * c-common.c (visibility_options): Move from ../opts.c.
12455 * c-common.h (struct visibility_flags, visibility_options):
12456 Declare here.
12457 * c-opts.c (finish_options): Rename to c_finish_options.
12458 (c_common_init): Update call to finish_options.
12459
a9546771
NP
124602010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12461
12462 PR objc/34033
12463 * c-lex.c (lex_string): Check that each string in an Objective-C
12464 string concat sequence starts with either one or zero '@', and
12465 that there are no spurious '@' signs at the end.
12466
24a57808
JM
124672010-11-20 Joseph Myers <joseph@codesourcery.com>
12468
12469 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12470 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12471 HANDLE_PRAGMA_VISIBILITY.
12472 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12473 HANDLE_PRAGMA_VISIBILITY): Don't define.
12474 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12475
a9aa2c3a
NF
124762010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12477
12478 PR c++/16189
12479 PR c++/36888
12480 PR c++/45331
12481 * c-common.h (keyword_begins_type_specifier): Declare.
12482 (keyword_is_storage_class_specifier): Declare.
12483 (keyword_is_type_qualifier): Declare.
12484 * c-common.c (keyword_begins_type_specifier): New function.
12485 (keyword_is_storage_class_specifier): New function.
12486 (keyword_is_type_qualifier): Declare.
12487
5386338c
JM
124882010-11-19 Joseph Myers <joseph@codesourcery.com>
12489
12490 PR c/46547
12491 * c-common.c (in_late_binary_op): Define.
12492 (c_common_truthvalue_conversion): Check in_late_binary_op before
12493 calling c_save_expr.
12494 * c-common.h (in_late_binary_op): Declare.
12495
69ccdddb
JM
124962010-11-19 Joseph Myers <joseph@codesourcery.com>
12497
12498 * c-opts.c (c_common_handle_option): Update calls to
12499 set_struct_debug_option.
12500
6b192a09
NP
125012010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12502
12503 * c-common.h (objc_declare_protocols): Added additional argument.
12504 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12505
fb52b50a
NF
125062010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12507
12508 PR c/33193
12509 * c-common.h (build_real_imag_expr): Declare.
12510 * c-semantics.c (build_real_imag_expr): Define.
12511
b37421c6
JM
125122010-11-17 Joseph Myers <joseph@codesourcery.com>
12513
12514 * c-opts.c (c_common_parse_file): Take no arguments.
12515 * c-common.h (c_common_parse_file): Update prototype.
12516
07078664
JJ
125172010-11-16 Jakub Jelinek <jakub@redhat.com>
12518
12519 PR c++/46401
12520 * c-common.c (warning_candidate_p): Don't track non-const calls
12521 or STRING_CSTs.
12522
c6a13190
ILT
125232010-11-15 Ian Lance Taylor <iant@google.com>
12524
12525 * c-lex.c (init_c_lex): Set macro debug callbacks if
12526 flag_dump_go_spec is set.
12527
925e8657
NP
125282010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12529
12530 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12531 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12532
bb0a9581
NF
125332010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12534
12535 PR preprocessor/45038
12536 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12537 dialects.
12538
c5fa0890
JM
125392010-11-12 Joseph Myers <joseph@codesourcery.com>
12540
12541 * c-common.h (c_family_lang_mask): Declare.
12542 * c-opts.c (c_family_lang_mask): Make extern.
12543 * c-pragma.c (handle_pragma_diagnostic): Use
12544 control_warning_option.
12545
a4d8c676
JM
125462010-11-12 Joseph Myers <joseph@codesourcery.com>
12547
12548 * c-common.c (parse_optimize_options): Update call to
12549 decode_options.
12550 * c-common.h (c_common_handle_option): Update prototype.
12551 * c-opts.c (c_common_handle_option): Take location_t parameter and
12552 pass it to other functions.
12553
f954bd2c
JM
125542010-11-11 Joseph Myers <joseph@codesourcery.com>
12555
12556 * c-opts.c (warning_as_error_callback): Remove.
12557 (c_common_initialize_diagnostics): Don't call
12558 register_warning_as_error_callback.
12559 (c_common_handle_option): Handle -Werror=normalized= here.
12560
d8a07487
JM
125612010-11-10 Joseph Myers <joseph@codesourcery.com>
12562
12563 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12564 in diagnostic.
12565 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12566 letter.
12567 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12568 Remove trailing '.' from diagnostics.
12569 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12570
d5478783
JM
125712010-11-10 Joseph Myers <joseph@codesourcery.com>
12572
12573 * c-common.c (parse_optimize_options): Pass global_dc to
12574 decode_options.
12575 * c-opts.c (c_common_handle_option): Pass &global_options to
12576 set_Wstrict_aliasing.
12577 * c.opt (v): Don't mark Common or document here.
12578
91ebb981
IS
125792010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12580
12581 PR target/44981
12582 * c-format.c (format_type): New type gcc_objc_string_format_type.
12583 (valid_stringptr_type_p): New.
12584 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12585 (check_format_string): Pass expected type, use
91ebb981
IS
12586 valid_stringptr_type_p (), check that the format string types are
12587 consistent with the format specification.
12588 (decode_format_attr): Warn if NSString is used outside objective-c.
12589 (format_types_orig): Add NSString.
12590 (format_name): New.
12591 (format_flags): New.
12592 (check_format_arg): Handle format strings requiring an external parser.
12593 first_target_format_type: New variable.
12594 (handle_format_attribute): Set up first_target_format_type, pass the
12595 expected format arg string type to check_format_string().
ab20d992 12596 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12597 * stub-objc.c (objc_string_ref_type_p): New.
12598 (objc_check_format_arg): New.
12599
bede2adc
NP
126002010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12601
9faeb493 12602 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12603 * c-common.h (objc_build_class_component_ref): New.
12604 * stub-objc.c (objc_build_class_component_ref): New.
12605
9a179d01
NP
126062010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12607
12608 * c.opt (Wproperty-assign-default): New option.
12609
22d8d616
NP
126102010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12611
12612 Implemented -fobjc-std=objc1 flag.
12613 * c.opt (fobjc-std=objc1): New option.
12614
2debdb4f
NP
126152010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12616
12617 Implemented format and noreturn attributes for Objective-C methods.
12618 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12619 attribute for Objective-C methods.
12620
ec52b111
JM
126212010-10-31 Jason Merrill <jason@redhat.com>
12622
12623 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12624 EXPR_LOC_OR_HERE.
12625
46a88c12
NP
126262010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12627
12628 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12629 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12630 (objc_add_property_declaration): Removed arguments for copies and
12631 ivar.
12632 (objc_build_getter_call): Renamed to
12633 objc_maybe_build_component_ref.
12634 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12635 (objc_is_property_ref): New.
12636 * c-common.c (c_common_reswords): Removed copies and ivar.
12637 * stub-objc.c (objc_add_property_declaration): Removed arguments
12638 for copies and ivar.
12639 (objc_build_getter_call): Renamed to
12640 objc_maybe_build_component_ref.
12641 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12642 (objc_is_property_ref): New.
9faeb493 12643
1e4bf85b
AC
126442010-10-29 Arnaud Charlet <charlet@adacore.com>
12645 Matthew Gingell <gingell@adacore.com>
12646
12647 * c-ada-spec.c (separate_class_package): New function.
12648 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12649 name of their enclosing package.
12650 (print_ada_declaration): Use separate_class_package.
12651
81f0bab2
JM
126522010-10-27 Jason Merrill <jason@redhat.com>
12653
2b08f2c5
JM
12654 * c-common.c (c_common_reswords): Add __is_literal_type.
12655 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12656
81f0bab2
JM
12657 * c-common.c (check_case_value): Remove special C++ code.
12658
200290f2
NP
126592010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12660
12661 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12662 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12663 and RID_LAST_PATTR.
12664 (objc_add_property_declaration): Added additional arguments.
12665 (objc_property_attribute_kind): Removed.
12666 (objc_set_property_attr): Removed.
12667 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12668 copy and nonatomic.
12669 * stub-objc.c (objc_add_property_declaration): Added additional
12670 arguments.
12671 (objc_set_property_attr): Removed.
9faeb493 12672
f614132b
NP
126732010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12674
12675 * c-common.h (objc_add_property_variable): Renamed to
12676 objc_add_property_declaration. Added location argument.
12677 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12678
b8a18805
NP
126792010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12680
12681 * c-common.h (objc_maybe_printable_name): New.
12682 * stub-objc.c (objc_maybe_printable_name): New.
12683
3f8257db
JJ
126842010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12685 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12686
12687 * c-common.h (c_common_mark_addressable_vec): Declare.
12688 * c-common.c (c_common_mark_addressable_vec): New function.
12689
249a82c4
NP
126902010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12691
12692 * c-common.h (objc_set_method_type): Removed.
12693 (objc_add_method_declaration): Added boolean argument.
12694 (objc_start_method_definition): Same change.
12695 (objc_build_method_signature): Same change.
12696 * stub-objc.c (objc_set_method_type): Removed.
12697 (objc_add_method_declaration): Added boolean argument.
12698 (objc_start_method_definition): Same change.
12699 (objc_build_method_signature): Same change.
12700
977e30bc
NP
127012010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12702
12703 * c-common.h (finish_file): Removed.
12704 (objc_write_global_declarations): New.
12705 * c-opts.c (c_common_parse_file): Do not call finish_file.
12706 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12707
da57d1b9
NP
127082010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12709
12710 Implemented parsing @synthesize and @dynamic for
12711 Objective-C/Objective-C++.
12712 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12713 (objc_add_synthesize_declaration): New.
12714 (objc_add_dynamic_declaration): New.
12715 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12716 * stub-objc.c (objc_add_synthesize_declaration): New.
12717 (objc_add_dynamic_declaration): New.
9faeb493 12718
0069111f
MM
127192010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12720
12721 PR target/46041
12722 * c-cppbuiltin.c (mode_has_fma): Move function here from
12723 builtins.c. Don't use the fma optab, instead just use the
12724 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12725 using -save-temps.
12726
e426b47b
NP
127272010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12728
12729 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12730
3f8257db 12731 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12732
9faeb493 12733 Radar 4330422
e426b47b
NP
12734 * c-common.h (objc_non_volatilized_type): New declaration
12735 * stub-objc.c (objc_non_volatilized_type): New stub.
12736
90fbfdc3
NP
127372010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12738
e426b47b 12739 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12740
ab20d992 12741 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12742
9faeb493 12743 Radar 4133425
90fbfdc3 12744 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12745 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12746
c37d8c30
IS
127472010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12748
12749 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12750 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12751 (objc_ivar_visibility_kind): New enum.
12752 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12753 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12754 visibility enum.
12755
1b1562a5
MM
127562010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12757
12758 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12759 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12760 has the appropriate fma builtins.
12761 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12762
668ea4b1
IS
127632010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12764
1b1562a5 12765 merge from FSF apple 'trunk' branch.
3f8257db 12766 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12767
668ea4b1
IS
12768 Radars 4436866, 4505126, 4506903, 4517826
12769 * c-common.c (c_common_resword): Define @property and its attributes.
12770 * c-common.h: Define property attribute enum entries.
12771 (OBJC_IS_PATTR_KEYWORD): New.
12772 (objc_property_attribute_kind): New enum.
12773 Declare objc_set_property_attr (), objc_add_property_variable (),
12774 objc_build_getter_call () and objc_build_setter_call ().
12775 * stub-objc.c (objc_set_property_attr): New stub.
12776 (objc_add_property_variable): Likewise.
12777 (objc_build_getter_call): Likewise.
12778 (objc_build_setter_call) Likewise.
1b1562a5 12779
a1178b30
IS
127802010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12781
1b1562a5 12782 merge from FSF apple 'trunk' branch.
ab20d992 12783 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12784
12785 Radar 3803157 (method attributes)
12786 * c-common.c (handle_deprecated_attribute): Recognize
12787 objc methods as valid declarations.
12788 * c-common.h: Declare objc_method_decl ().
1b1562a5 12789 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12790
a75bfaa6
JM
127912010-10-08 Joseph Myers <joseph@codesourcery.com>
12792
12793 * c-common.c (parse_optimize_options): Call
12794 decode_cmdline_options_to_array_default_mask before
12795 decode_options. Update arguments to decode_options.
12796 * c-common.h (c_common_init_options_struct): Declare.
12797 * c-opts.c (c_common_init_options_struct): New. Split out from
12798 c_common_init_options.
12799
f05b9d93
NP
128002010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12801
12802 Implemented fast enumeration for Objective-C.
12803 * c-common.h (objc_finish_foreach_loop): New.
12804 * stub-objc.c (objc_finish_foreach_loop): New.
12805
1ebe4b4f
JM
128062010-10-05 Joseph Myers <joseph@codesourcery.com>
12807
12808 * c-common.h (struct diagnostic_context): Don't declare here.
12809 (c_common_initialize_diagnostics): Declare using
12810 diagnostic_context typedef.
12811 * c-opts.c (c_common_handle_option): Pass global_dc to
12812 handle_generated_option.
12813
d4d24ba4
JM
128142010-10-04 Joseph Myers <joseph@codesourcery.com>
12815
12816 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12817 handle_generated_option.
12818
478a1c5b
ILT
128192010-10-03 Ian Lance Taylor <iant@google.com>
12820
12821 * c.opt (-fplan9-extensions): New option.
12822
82a1c2fe
FXC
128232010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12824
12825 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12826 Remove.
12827 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12828 of duplicating code.
12829
92902b1b
IS
128302010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12831
12832 * c-common.c: Add two new entries for @optional
12833 and @required keywords.
12834
12835 merge from FSF 'apple/trunk' branch.
3f8257db 12836 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12837
12838 Radar 4386773
12839 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12840 objective-c keywords.
12841 (objc_set_method_opt): New declaration.
12842 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12843
46625112
JM
128442010-09-30 Joseph Myers <joseph@codesourcery.com>
12845
12846 * c-common.c (handle_optimize_attribute): Pass &global_options to
12847 cl_optimization_save and cl_optimization_restore.
12848 * c-opts.c (c_common_handle_option): Pass &global_options to
12849 handle_generated_option.
12850 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12851 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12852 &global_options to cl_optimization_restore.
12853
49b91f05
NP
128542010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12855
12856 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12857 Objective-C/Objective-C++ keywords.
12858
13ed556f 128592010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12860
9faeb493
UB
12861 Merge from 'apple/trunk' branch on FSF servers.
12862
3f8257db 12863 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12864
12865 Radar 4281748
12866 * c-common.h (objc_check_global_decl): New declaration.
12867 * stub-objc.c (objc_check_global_decl): New stub.
12868
f0036cca
JM
128692010-09-29 Joseph Myers <joseph@codesourcery.com>
12870
12871 * c.opt: Don't use VarExists.
12872
e3339d0f
JM
128732010-09-29 Joseph Myers <joseph@codesourcery.com>
12874
12875 * c-common.c (c_cpp_error): Update names of diagnostic_context
12876 members.
12877 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12878 cl_optimization members.
12879 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12880 sanitize_cpp_opts, finish_options): Update names of cpp_options
12881 members.
12882
1973201f
NP
128832010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12884
12885 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12886 (objc_is_reserved_word): Removed.
12887 * c-common.c: Updated comments.
12888 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12889 objc_is_reserved_word.
12890 * stub-objc.c (objc_is_reserved_word): Removed.
12891
f7e71da5
IS
128922010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12893
9faeb493 12894 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12895 include attributes.
12896 (objc_start_method_definition): Likewise.
12897 (objc_build_keyword_decl): Likewise.
12898 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12899 (objc_start_method_definition): Likewise.
12900 (objc_build_keyword_decl): Likewise.
12901
c165dca7
IS
129022010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12903
12904 * c-common.h (objc_start_class_interface): Adjust prototype.
12905 (objc_start_category_interface): Likewise.
12906 (objc_start_protocol): Likewise.
12907 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12908 (objc_start_class_interface): Likewise.
12909 (objc_start_category_interface): Likewise.
12910
7458026b
ILT
129112010-09-27 Ian Lance Taylor <iant@google.com>
12912
12913 * c-common.c (c_common_attribute_table): Add no_split_stack.
12914 (handle_no_split_stack_attribute): New static function.
12915
b581b85b
NP
129162010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12917
9faeb493 12918 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12919
3f8257db 12920 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12921
9faeb493 12922 Radar 4229905
b581b85b
NP
12923 * c-common.h (objc_have_common_type): New declaration.
12924 * stub-objc.c (objc_have_common_type): New stub.
12925
12926 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12927
12928 Radar 4154928
12929 * c-common.h (objc_common_type): New prototype.
9faeb493 12930 * stub-objc.c (objc_common_type): New stub.
b581b85b 12931
46a4da10
JH
129322010-09-24 Jan Hubicka <jh@suse.cz>
12933
12934 * c-common.c (handle_leaf_attribute): New function.
12935 (struct attribute_spec c_common_att): Add leaf.
12936
e200444e
JM
129372010-09-22 Joseph Myers <joseph@codesourcery.com>
12938
12939 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12940 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12941 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12942 -include-barrier, -include-directory, -include-directory=,
12943 -include-directory-after, -include-directory-after=,
12944 -include-prefix, -include-prefix=, -include-with-prefix,
12945 -include-with-prefix=, -include-with-prefix-after,
12946 -include-with-prefix-after=, -include-with-prefix-before,
12947 -include-with-prefix-before=, -no-integrated-cpp,
12948 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12949 -output=, -pedantic, -pedantic-errors, -preprocess,
12950 -print-missing-file-dependencies, -trace-includes, -traditional,
12951 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12952 -user-dependencies, -verbose, -write-dependencies,
12953 -write-user-dependencies, no-integrated-cpp, traditional): New.
12954
29a80ea6
NP
129552010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12956
12957 PR objc/23710
ac1fc2fc
NP
12958 * c-common.h (objc_start_method_definition): Return bool instead
12959 of void.
12960 * stub-objc.c (objc_start_method_definition): Return bool instead
12961 of void.
12962
129632010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12964
12965 PR objc/25965
12966 * c-common.h (objc_get_interface_ivars): New declaration.
12967 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12968
de621752
ILT
129692010-09-15 Ian Lance Taylor <iant@google.com>
12970
12971 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12972 messages. Remove period at end of warning message.
de621752 12973
ba885ec5
NS
129742010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12975
12976 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12977 (handle_alias_attribute): ... here.
12978 (handle_ifunc_attribute): New.
12979
c5ee1358
MM
129802010-09-06 Mark Mitchell <mark@codesourcery.com>
12981
12982 * c-common.h (do_warn_double_promotion): Declare.
12983 * c-common.c (do_warn_double_promotion): Define.
12984
0a0b3574
MM
129852010-09-05 Mark Mitchell <mark@codesourcery.com>
12986
12987 * c.opt (Wdouble-promotion): New.
12988
d1779886
JM
129892010-09-02 Joseph Myers <joseph@codesourcery.com>
12990
12991 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12992 fvtable-thunks, fxref): Mark no longer supported in help text.
12993
2d2bd949
JM
129942010-09-02 Joseph Myers <joseph@codesourcery.com>
12995
12996 * c.opt (Wimport, fall-virtual, falt-external-templates,
12997 fdefault-inline, fenum-int-equiv, fexternal-templates,
12998 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12999 fname-mangling-version-, fnew-abi, fnonnull-objects,
13000 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13001 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13002 applicable.
13003 (fhandle-exceptions): Mark with Alias and Warn.
13004 * c-opts.c (c_common_handle_option): Don't handle options marked
13005 as ignored.
13006
5de8299c
JM
130072010-09-02 Joseph Myers <joseph@codesourcery.com>
13008
13009 * c.opt (Wcomments, Werror-implicit-function-declaration,
13010 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13011 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13012 aliases.
13013 * c-common.c (option_codes): Use OPT_Wcomment instead of
13014 OPT_Wcomments.
13015 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13016 Don't handle options marked as aliases.
13017
0ceb0201
RG
130182010-08-25 Richard Guenther <rguenther@suse.de>
13019
13020 * c-common.c (c_common_get_alias_set): Remove special
13021 handling for pointers.
13022
ac47786e
NF
130232010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13024
13025 * c-common.c: Use FOR_EACH_VEC_ELT.
13026 * c-gimplify.c: Likewise.
13027 * c-pragma.c: Likewise.
13028
c878765b
JM
130292010-08-16 Joseph Myers <joseph@codesourcery.com>
13030
13031 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13032 RejectDriver.
13033 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13034 RejectDriver.
13035 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13036 instead of OPT_MDX and OPT_MMDX.
13037
603349bf
JM
130382010-08-16 Joseph Myers <joseph@codesourcery.com>
13039
13040 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13041
644fa7ac
JM
130422010-08-12 Joseph Myers <joseph@codesourcery.com>
13043
13044 * c.opt (MD, MMD): Change to MDX and MMDX.
13045 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13046
481e1176
JM
130472010-08-11 Joseph Myers <joseph@codesourcery.com>
13048
13049 * c-opts.c (c_common_handle_option): Call handle_generated_option
13050 instead of handle_option.
13051
ac8dc9f7
NF
130522010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13053
13054 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13055 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13056
4f8c876d
NF
130572010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13058
13059 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13060 (pending_redefine_extname): Change type to a VEC.
13061 (add_to_renaming_pragma_list): Update for new type of
13062 pending_redefine_extname.
ac8dc9f7 13063 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13064
3b0c690e
AC
130652010-08-04 Arnaud Charlet <charlet@adacore.com>
13066
13067 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13068 visited.
13069 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13070 decide whether a type has already been declared/seen.
13071 Do not go to the original type.
13072 (dump_nested_types): New parameter forward.
13073 Generate forward declaration if needed and mark type as visited.
13074 (print_ada_declaration): Call dump_nested_types if not already done.
13075 Mark types as visited.
13076
1890bccc
JM
130772010-08-03 Joseph Myers <joseph@codesourcery.com>
13078
13079 * c.opt (-print-pch-checksum): Remove option.
13080 * c-opts.c (c_common_handle_option): Don't handle
13081 OPT_print_pch_checksum.
13082
5f20c657
JM
130832010-07-27 Joseph Myers <joseph@codesourcery.com>
13084
13085 * c-common.h (c_common_handle_option): Update prototype and return
13086 value type.
13087 * c-opts.c (c_common_handle_option): Update prototype and return
13088 value type. Update calls to handle_option and
13089 enable_warning_as_error.
13090
f551f80c
JJ
130912010-07-27 Jakub Jelinek <jakub@redhat.com>
13092
13093 PR c/45079
13094 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13095
61ff2bdc
JM
130962010-07-27 Joseph Myers <joseph@codesourcery.com>
13097
13098 * c-common.h (c_common_missing_argument): Remove.
13099 * c-opts.c (c_common_missing_argument): Remove.
13100 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13101 idirafter, imacros, include, isysroot, isystem, iquote): Add
13102 MissingArgError.
13103 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13104
7a9bf9a4
JM
131052010-07-27 Joseph Myers <joseph@codesourcery.com>
13106
13107 * c-common.h (c_common_option_lang_mask,
13108 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13109 New.
13110 (c_common_init_options): Update prototype.
13111 * c-opts.c (c_common_option_lang_mask): New.
13112 (c_common_initialize_diagnostics): Split out of
13113 c_common_init_options.
13114 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13115 New.
13116 (c_common_init_options): Update prototype. Use decoded options in
13117 search for -lang-asm.
13118
910ad8de
NF
131192010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13120
13121 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13122 * c-format.c: Likewise.
13123
718f9c0f
MLI
131242010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13125
13126 * c-common.h: Include diagnostic-core.h. Error if already
13127 included.
13128 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13129
4d451982
MLI
131302010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13131
adfac8df 13132 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13133 Do not include expr.h
13134 (vector_mode_valid_p): Move here.
13135
119fe915
SB
131362010-06-21 DJ Delorie <dj@redhat.com>
13137
13138 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13139 allow these pragmas anywhere.
13140
131412010-06-14 Jakub Jelinek <jakub@redhat.com>
13142
13143 PR bootstrap/44509
13144 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13145 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13146 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13147 ggc_strdup instead of xstrdup.
13148
131492010-06-10 Jakub Jelinek <jakub@redhat.com>
13150
13151 * c-cppbuiltin.c: Include cpp-id-data.h.
13152 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13153 (lazy_hex_fp_value): New function.
13154 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13155
6662d794
MLI
131562010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13157
13158 * c-gimplify.c: Do not include tree-flow.h
13159
38f8b050
JR
131602010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13161
13162 PR other/44034
13163 * c-common.c: Rename targetm member:
13164 targetm.enum_va_list -> targetm.enum_va_list_p
13165
9589f23e
AS
131662010-06-28 Anatoly Sokolov <aesok@post.ru>
13167
13168 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13169
3b06d379
SB
131702010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13171
13172 * c-cppbuiltin.c: Do not include except.h.
13173
d166d4c3
AK
131742010-06-24 Andi Kleen <ak@linux.intel.com>
13175
9faeb493
UB
13176 * c-common.c (warn_for_omitted_condop): New.
13177 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13178
70cb8be6
JM
131792010-06-21 Joseph Myers <joseph@codesourcery.com>
13180
13181 * c.opt (lang-objc): Remove.
13182 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13183
a4c97feb
JR
131842010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13185
13186 * c-opts.c: Include "tm_p.h".
13187
6e2f1956
JM
131882010-06-20 Joseph Myers <joseph@codesourcery.com>
13189
13190 * c-common.c (parse_optimize_options): Update call to
13191 decode_options.
13192
bc87224e
NF
131932010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13194
13195 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13196 new type of types_used_by_cur_var_decl.
13197
b49cf425
JR
131982010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13199
13200 PR bootstrap/44512
13201 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13202 for C++ standard compliance.
13203
59f9c2ed
JM
132042010-06-16 Jason Merrill <jason@redhat.com>
13205
13206 * c.opt: Add -Wnoexcept.
13207
33766b66
RG
132082010-06-16 Richard Guenther <rguenther@suse.de>
13209
13210 PR c/44555
13211 * c-common.c (c_common_truthvalue_conversion): Remove
13212 premature and wrong optimization concering ADDR_EXPRs.
13213
eff7e30c
AC
132142010-06-15 Arnaud Charlet <charlet@adacore.com>
13215
13216 * c-ada-spec.c (dump_sloc): Remove column info.
13217 (is_simple_enum): New function.
13218 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13219 enum types when relevant.
13220
6312e84d
MLI
132212010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13222
9faeb493 13223 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13224 location.
13225
1cb42611
JM
132262010-06-10 Joseph Myers <joseph@codesourcery.com>
13227
13228 * c-opts.c (c_common_handle_option): Don't handle
13229 OPT_fshow_column.
13230
a9429e29
LB
132312010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13232
13233 * c-pragma.c (push_alignment): Use typed GC allocation.
13234 (handle_pragma_push_options): Likewise.
13235
13236 * c-common.c (parse_optimize_options): Likewise.
13237
13238 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13239 option.
13240
5498f011
JM
132412010-06-07 Joseph Myers <joseph@codesourcery.com>
13242
13243 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13244 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13245 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13246 flag_signed_bitfields, warn_strict_null_sentinel,
13247 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13248 flag_gen_declaration, flag_no_gnu_keywords,
13249 flag_implement_inlines, flag_implicit_templates,
13250 flag_implicit_inline_templates, flag_optional_diags,
13251 flag_elide_constructors, flag_default_inline, flag_rtti,
13252 flag_conserve_space, flag_access_control, flag_check_new,
13253 flag_new_for_scope, flag_weak, flag_working_directory,
13254 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13255 flag_enforce_eh_specs, flag_threadsafe_statics,
13256 flag_pretty_templates): Remove.
13257 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13258 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13259 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13260 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13261 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13262 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13263 flag_no_gnu_keywords, flag_implement_inlines,
13264 flag_implicit_templates, flag_implicit_inline_templates,
13265 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13266 flag_rtti, flag_conserve_space, flag_access_control,
13267 flag_check_new, flag_new_for_scope, flag_weak,
13268 flag_working_directory, flag_use_cxa_atexit,
13269 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13270 flag_threadsafe_statics, flag_pretty_templates,
13271 warn_strict_null_sentinel): Remove.
13272 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13273 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13274 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13275 fimplicit-inline-templates, fimplicit-templates,
13276 flax-vector-conversions, fms-extensions, fnil-receivers,
13277 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13278 frtti, fshort-double, fshort-enums, fshort-wchar,
13279 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13280 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13281 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13282 gen-decls, undef): Use Var.
13283 (fdefault-inline, foptional-diags): Document as doing nothing.
13284 * c-opts.c (c_common_handle_option): Remove cases for options now
13285 using Var. Mark ignored options as such.
13286
39dabefd
SB
132872010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13288
9faeb493 13289 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13290 * c-common.def: Likewise.
13291 * c-common.h: Likewise.
13292 * c-cppbuiltin.c: Likewise.
13293 * c-dump.c: Likewise.
13294 * c-format.c: Likewise.
13295 * c-format.h : Likewise.
13296 * c-gimplify.c: Likewise.
13297 * c-lex.c: Likewise.
13298 * c-omp.c: Likewise.
13299 * c.opt: Likewise.
13300 * c-opts.c: Likewise.
13301 * c-pch.c: Likewise.
13302 * c-ppoutput.c: Likewise.
13303 * c-pragma.c: Likewise.
13304 * c-pragma.h: Likewise.
13305 * c-pretty-print.c: Likewise.
13306 * c-pretty-print.h: Likewise.
13307 * c-semantics.c: Likewise.
13308 * stub-objc.c: Likewise.
13309
13310 * c-common.c: Include gt-c-family-c-common.h.
13311 * c-pragma.c: Include gt-c-family-c-pragma.h.
13312\f
877e3c2a 13313Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13314
13315Copying and distribution of this file, with or without modification,
13316are permitted in any medium without royalty provided the copyright
13317notice and this notice are preserved.