]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
1 2022-05-16 Jason Merrill <jason@redhat.com>
2
3 PR c/105492
4 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
5 here.
6
7 2022-05-16 Martin Liska <mliska@suse.cz>
8
9 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
10 (c_common_nodes_and_builtins): Likewise.
11 * c-format.cc (check_tokens): Likewise.
12 (check_plain): Likewise.
13 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
14 (init_pragma): Likewise.
15 * known-headers.cc (get_string_macro_hint): Likewise.
16 (get_stdlib_header_for_name): Likewise.
17 * c-attribs.cc: Likewise.
18
19 2022-05-13 Richard Biener <rguenther@suse.de>
20
21 * c-omp.cc: Remove gimple-fold.h include.
22
23 2022-05-12 Jakub Jelinek <jakub@redhat.com>
24
25 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
26 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
27 if null_pointer_node.
28
29 2022-05-11 Martin Liska <mliska@suse.cz>
30
31 PR target/105355
32 * c-opts.cc (c_common_handle_option): Change option name.
33 * c.opt: Remove Joined and use Separate option.
34
35 2022-05-09 Alex Coplan <alex.coplan@arm.com>
36
37 * c-common.h (get_dump_info): Delete.
38 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
39 from the global dump_manager instead of the (now obsolete)
40 get_dump_info.
41 * c-opts.cc (original_dump_file): Delete.
42 (original_dump_flags): Delete.
43 (c_common_parse_file): Switch to using global dump_manager to
44 manage the original dump file; fix leak of dump file.
45 (get_dump_info): Delete.
46
47 2022-05-07 Marek Polacek <polacek@redhat.com>
48
49 PR c++/101833
50 PR c++/47634
51 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
52 with FN being either a function declaration or function type. Use
53 maybe_adjust_arg_pos_for_attribute.
54 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
55 check_function_format.
56 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
57 (positional_argument): Adjust.
58 * c-format.cc (get_constant): Rename to ...
59 (validate_constant): ... this. Take EXPR by reference. Return bool
60 instead of tree.
61 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
62 return value of validate_constant.
63 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
64 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
65 (check_function_format): Adjust a parameter name.
66 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
67
68 2022-05-04 Marek Polacek <polacek@redhat.com>
69
70 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
71 char to int.
72
73 2022-04-30 Jason Merrill <jason@redhat.com>
74
75 PR c/100545
76 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
77 and typedef.
78 * c-common.cc (set_underlying_type): Add assert.
79
80 2022-04-26 Patrick Palka <ppalka@redhat.com>
81
82 PR c++/105304
83 * c-common.cc (verify_tree) [restart]: Move up to before the
84 NULL test.
85
86 2022-04-11 Jakub Jelinek <jakub@redhat.com>
87
88 PR c++/105186
89 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
90 and __int%d__ builtin types, initialize corresponding ridpointers
91 entry.
92
93 2022-03-30 Marek Polacek <polacek@redhat.com>
94
95 PR c++/101030
96 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
97 conversion_warning when OP1 is null.
98
99 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
100
101 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
102 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
103 option properties.
104
105 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
106
107 * c.opt (Wuse-after-free): Remove.
108
109 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
110
111 * c.opt (Warray-bounds): Remove.
112
113 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
114
115 * c.opt: Properly quote comment.
116
117 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
118
119 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
120 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
121 the referenced type instead. Deal with the anonymous original type
122 of a typedef'ed type. In the actual access case, follow the chain
123 of external subtypes.
124 <TYPE_DECL>: Tidy up control flow.
125
126 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
127
128 * c-ada-spec.cc: Change array length
129
130 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
131
132 * c-common.cc (c_family_tests): Call the new tests.
133 * c-common.h (c_diagnostic_tests): Declare.
134 (c_opt_problem_cc_tests): Likewise.
135
136 2022-03-19 Jakub Jelinek <jakub@redhat.com>
137
138 PR c++/101515
139 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
140 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
141 be printed.
142
143 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
144 Roger Sayle <roger@nextmovesoftware.com>
145
146 PR c/98198
147 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
148
149 2022-03-16 Patrick Palka <ppalka@redhat.com>
150
151 PR c++/96780
152 * c.opt: Add -ffold-simple-inlines.
153
154 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
155
156 * c-target.def (check_string_object_format_arg): Fix description typo.
157
158 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
159
160 PR other/65095
161 * c-common.h (c_omp_map_clause_name): Remove.
162 * c-omp.cc (c_omp_map_clause_name): Remove.
163
164 2022-03-09 Jakub Jelinek <jakub@redhat.com>
165
166 PR c/104711
167 * c-opts.cc (c_common_post_options): Don't enable
168 -Wshift-negative-value from -Wextra for C++20 or later.
169 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
170 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
171 instead of TYPE_UNSIGNED.
172
173 2022-03-07 Jakub Jelinek <jakub@redhat.com>
174
175 * c-attribs.cc: Fix up duplicated word issue in a comment.
176
177 2022-03-01 Martin Liska <mliska@suse.cz>
178
179 PR ipa/104533
180 * c-attribs.cc (handle_target_clones_attribute): Use
181 get_target_clone_attr_len and report warning soon.
182
183 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
184
185 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
186 (handle_pragma_weak): Likewise.
187 (handle_pragma_scalar_storage_order): Likewise.
188 (handle_pragma_redefine_extname): Likewise.
189 (handle_pragma_visibility): Likewise.
190 (handle_pragma_diagnostic): Likewise.
191 (handle_pragma_target): Likewise.
192 (handle_pragma_optimize): Likewise.
193 (handle_pragma_push_options): Likewise.
194 (handle_pragma_pop_options): Likewise.
195 (handle_pragma_reset_options): Likewise.
196 (handle_pragma_message): Likewise.
197 (handle_pragma_float_const_decimal64): Likewise.
198
199 2022-02-16 Jakub Jelinek <jakub@redhat.com>
200
201 PR c/104531
202 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
203 build_binary_op with LT_EXPR and only if that doesn't return
204 error_mark_node call build_modify_expr.
205
206 2022-02-16 Jakub Jelinek <jakub@redhat.com>
207
208 PR c/104510
209 * c-common.cc (shorten_compare): Convert original arguments to
210 the original *restype_ptr when mixing binary and decimal float.
211
212 2022-02-14 Richard Biener <rguenther@suse.de>
213
214 PR c/104505
215 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
216 internal function calls.
217
218 2022-02-11 Richard Biener <rguenther@suse.de>
219
220 * c-attribs.cc (c_common_attribute_table): Add entry for
221 vector_mask.
222 (handle_vector_mask_attribute): New.
223
224 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
225
226 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
227 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
228 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
229
230 2022-02-09 Jason Merrill <jason@redhat.com>
231
232 * c-cppbuiltin.cc (c_cpp_builtins): Update values
233 of __cpp_constexpr and __cpp_concepts for C++20.
234
235 2022-01-24 Marek Polacek <polacek@redhat.com>
236
237 PR preprocessor/104030
238 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
239
240 2022-01-21 Jakub Jelinek <jakub@redhat.com>
241
242 PR c++/104148
243 * c-common.h (check_function_arguments_recurse): Add for_format
244 arg.
245 * c-common.cc (check_function_nonnull): Pass false to
246 check_function_arguments_recurse's last argument.
247 (check_function_arguments_recurse): Add for_format argument,
248 if true, don't stop on warning_suppressed_p.
249 * c-format.cc (check_format_info): Pass true to
250 check_function_arguments_recurse's last argument.
251
252 2022-01-19 David Malcolm <dmalcolm@redhat.com>
253
254 * c-common.cc (c_common_c_tests): Rename to...
255 (c_common_cc_tests): ...this.
256 (c_family_tests): Update calls for .c to .cc renaming.
257 * c-common.h (c_format_c_tests): Rename to...
258 (c_format_cc_tests): ...this.
259 (c_indentation_c_tests): Rename to...
260 (c_indentation_cc_tests): ...this.
261 (c_pretty_print_c_tests): Rename to...
262 (c_pretty_print_cc_tests): ...this.
263 * c-format.cc (c_format_c_tests): Rename to...
264 (c_format_cc_tests): ...this.
265 * c-indentation.cc (c_indentation_c_tests): Rename to...
266 (c_indentation_cc_tests): ...this.
267 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
268 (c_pretty_print_cc_tests): ...this.
269
270 2022-01-17 Martin Liska <mliska@suse.cz>
271
272 * c-ada-spec.cc: Rename .c names to .cc.
273 * c-ada-spec.h: Likewise.
274 * c-common.cc (c_build_vec_convert): Likewise.
275 (warning_candidate_p): Likewise.
276 * c-common.h (enum rid): Likewise.
277 (build_real_imag_expr): Likewise.
278 (finish_label_address_expr): Likewise.
279 (c_get_substring_location): Likewise.
280 (c_build_bind_expr): Likewise.
281 (conflict_marker_get_final_tok_kind): Likewise.
282 (c_parse_error): Likewise.
283 (check_missing_format_attribute): Likewise.
284 (invalid_array_size_error): Likewise.
285 (warn_for_multistatement_macros): Likewise.
286 (build_attr_access_from_parms): Likewise.
287 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
288 * c-format.cc: Likewise.
289 * c-gimplify.cc (c_gimplify_expr): Likewise.
290 * c-indentation.h: Likewise.
291 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
292 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
293 * c-opts.cc (c_common_post_options): Likewise.
294 (set_std_cxx23): Likewise.
295 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
296 * c-pretty-print.h: Likewise.
297
298 2022-01-17 Martin Liska <mliska@suse.cz>
299
300 * c-ada-spec.c: Moved to...
301 * c-ada-spec.cc: ...here.
302 * c-attribs.c: Moved to...
303 * c-attribs.cc: ...here.
304 * c-common.c: Moved to...
305 * c-common.cc: ...here.
306 * c-cppbuiltin.c: Moved to...
307 * c-cppbuiltin.cc: ...here.
308 * c-dump.c: Moved to...
309 * c-dump.cc: ...here.
310 * c-format.c: Moved to...
311 * c-format.cc: ...here.
312 * c-gimplify.c: Moved to...
313 * c-gimplify.cc: ...here.
314 * c-indentation.c: Moved to...
315 * c-indentation.cc: ...here.
316 * c-lex.c: Moved to...
317 * c-lex.cc: ...here.
318 * c-omp.c: Moved to...
319 * c-omp.cc: ...here.
320 * c-opts.c: Moved to...
321 * c-opts.cc: ...here.
322 * c-pch.c: Moved to...
323 * c-pch.cc: ...here.
324 * c-ppoutput.c: Moved to...
325 * c-ppoutput.cc: ...here.
326 * c-pragma.c: Moved to...
327 * c-pragma.cc: ...here.
328 * c-pretty-print.c: Moved to...
329 * c-pretty-print.cc: ...here.
330 * c-semantics.c: Moved to...
331 * c-semantics.cc: ...here.
332 * c-ubsan.c: Moved to...
333 * c-ubsan.cc: ...here.
334 * c-warn.c: Moved to...
335 * c-warn.cc: ...here.
336 * cppspec.c: Moved to...
337 * cppspec.cc: ...here.
338 * stub-objc.c: Moved to...
339 * stub-objc.cc: ...here.
340
341 2022-01-15 Martin Sebor <msebor@redhat.com>
342
343 PR c/63272
344 * c.opt (-Wdangling-pointer): New option.
345
346 2022-01-15 Martin Sebor <msebor@redhat.com>
347
348 PR tree-optimization/80532
349 * c.opt (-Wuse-after-free): New options.
350
351 2022-01-14 David Malcolm <dmalcolm@redhat.com>
352
353 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
354 (handle_tainted_args_attribute): New.
355
356 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
357 Jason Merrill <jason@redhat.com>
358
359 PR c++/70417
360 * c.opt: Added -Wmissing-template-keyword.
361
362 2022-01-13 Richard Biener <rguenther@suse.de>
363
364 PR c/104002
365 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
366
367 2022-01-12 Martin Liska <mliska@suse.cz>
368
369 PR target/103804
370 * c-attribs.c (handle_optimize_attribute): Do not call
371 cl_optimization_compare if we seen an error.
372
373 2022-01-11 Jakub Jelinek <jakub@redhat.com>
374
375 PR c/101537
376 PR c/103881
377 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
378 and BIT_XOR_EXPR.
379
380 2022-01-10 Richard Biener <rguenther@suse.de>
381
382 PR middle-end/101530
383 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
384 in a TARGET_EXPR to force a temporary.
385
386 2022-01-06 Marek Polacek <polacek@redhat.com>
387
388 PR c++/103758
389 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
390 diagnostic messages.
391 (handle_pragma_diagnostic): Likewise.
392
393 2022-01-03 Marek Polacek <polacek@redhat.com>
394
395 PR c++/103758
396 * c-format.c (check_tokens): Accept "decl-specifier*".
397
398 2022-01-03 Jakub Jelinek <jakub@redhat.com>
399
400 PR c++/103600
401 * c-attribs.c (handle_non_overlapping_attribute): New function.
402 (c_common_attribute_table): Add "non overlapping" attribute.
403
404 2021-12-30 Jakub Jelinek <jakub@redhat.com>
405
406 PR c++/103012
407 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
408 cpp_define_unused/cpp_undef calls with forced token locations
409 BUILTINS_LOCATION.
410
411 2021-12-27 Patrick Palka <ppalka@redhat.com>
412
413 PR c++/103700
414 * c-common.c (pointer_int_sum): When quiet, return
415 error_mark_node for an incomplete pointed-to type and don't
416 call size_in_bytes_loc.
417
418 2021-12-17 Jason Merrill <jason@redhat.com>
419
420 PR c++/103681
421 * c-opts.c (c_common_post_options): Update defaults.
422
423 2021-12-16 Martin Liska <mliska@suse.cz>
424
425 PR target/103709
426 * c-pragma.c (handle_pragma_pop_options): Do not check
427 global options modification when an error is seen in parsing
428 of options (pragmas or attributes).
429
430 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
431
432 * known-headers.cc: Define INCLUDE_MEMORY instead of
433 INCLUDE_UNIQUE_PTR.
434 * name-hint.h: Likewise.
435 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
436
437 2021-12-09 Jakub Jelinek <jakub@redhat.com>
438
439 PR pch/71934
440 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
441 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
442
443 2021-12-03 Jakub Jelinek <jakub@redhat.com>
444
445 PR pch/71934
446 * c-pch.c (struct c_pch_validity): Remove pch_init member.
447 (pch_init): Don't initialize v.pch_init.
448 (c_common_valid_pch): Don't warn and punt if .text addresses change.
449
450 2021-12-01 Jason Merrill <jason@redhat.com>
451
452 PR c++/103310
453 * c.opt: Add -fconstexpr-fp-except.
454
455 2021-11-29 Richard Biener <rguenther@suse.de>
456
457 * c-format.c (check_format_string): Remove spurious
458 gcc_unreachable.
459
460 2021-11-29 Richard Biener <rguenther@suse.de>
461
462 * c-opts.c (c_common_post_options): Remove unreachable return.
463 * c-pragma.c (handle_pragma_target): Likewise.
464 (handle_pragma_optimize): Likewise.
465
466 2021-11-25 Jakub Jelinek <jakub@redhat.com>
467
468 PR c++/102611
469 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
470 default for C++23 regardless of warn_deprecated.
471 * c-cppbuiltin.c (c_cpp_builtins): Predefine
472 __cpp_multidimensional_subscript=202110L for C++23.
473
474 2021-11-23 Martin Sebor <msebor@redhat.com>
475
476 PR middle-end/88232
477 * c.opt: Add -Winfinite-recursion.
478
479 2021-11-19 Martin Sebor <msebor@redhat.com>
480
481 PR c++/33925
482 PR c/102867
483 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
484 and improve handling tof defined symbols.
485
486 2021-11-19 Martin Liska <mliska@suse.cz>
487
488 Revert:
489 2021-11-18 Martin Liska <mliska@suse.cz>
490
491 * c-gimplify.c (genericize_c_loop): Use option directly.
492
493 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
494
495 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
496 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
497
498 2021-11-18 Martin Liska <mliska@suse.cz>
499
500 * c-gimplify.c (genericize_c_loop): Use option directly.
501
502 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
503
504 PR c/91038
505 PR c/29970
506 * c-common.c (pointer_int_sum): Make sure pointer expressions
507 are evaluated first when the size expression depends on for
508 variably-modified types.
509
510 2021-11-17 Marek Polacek <polacek@redhat.com>
511
512 PR preprocessor/103026
513 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
514
515 2021-11-16 Jason Merrill <jason@redhat.com>
516
517 * c-common.c (release_tree_vector): Only cache vecs smaller than
518 16 elements.
519
520 2021-11-15 Jason Merrill <jason@redhat.com>
521
522 * c.opt: Add -fimplicit-constexpr.
523 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
524 * c-opts.c (c_common_post_options): Disable below C++14.
525
526 2021-11-15 Jakub Jelinek <jakub@redhat.com>
527
528 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
529 Duplicate to both OMP_TARGET and OMP_TEAMS.
530
531 2021-11-10 Marek Polacek <polacek@redhat.com>
532
533 PR c++/101940
534 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
535 ignored_attributes.
536
537 2021-11-09 David Malcolm <dmalcolm@redhat.com>
538
539 * c-pragma.c (GCC_BAD_AT): New macro.
540 (GCC_BAD2_AT): New macro.
541 (handle_pragma_pack): Use the location of the pertinent token when
542 issuing diagnostics about invalid constants/actions, and trailing
543 junk.
544 (handle_pragma_target): Likewise for non-string "GCC option".
545 (handle_pragma_message): Likewise for trailing junk.
546
547 2021-11-03 Joseph Myers <joseph@codesourcery.com>
548
549 PR c/103031
550 * c-common.c (convert_and_check): Add argument init_const. Call
551 convert_init if init_const.
552 * c-common.h (convert_and_check): Update prototype.
553 (convert_init): New prototype.
554
555 2021-11-01 David Malcolm <dmalcolm@redhat.com>
556
557 * c-lex.c (c_lex_with_flags): When complaining about non-printable
558 CPP_OTHER tokens, set the "escape on output" flag.
559
560 2021-10-27 Jakub Jelinek <jakub@redhat.com>
561
562 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
563 POINTER_PLUS_EXPR.
564 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
565 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
566
567 2021-10-27 Jakub Jelinek <jakub@redhat.com>
568
569 PR c++/102854
570 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
571 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
572 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
573 conversions temporarily clear the 3rd bit from d->kind while walking
574 subtrees.
575 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
576 if possibly non-rectangular.
577
578 2021-10-21 Jakub Jelinek <jakub@redhat.com>
579
580 PR middle-end/64888
581 * c-omp.c (c_omp_predefined_variable): Return true also for
582 ubsan_create_data created artificial variables.
583
584 2021-10-14 Joseph Myers <joseph@codesourcery.com>
585
586 * c-format.c (printf_length_specs, scanf_length_specs)
587 (print_char_table, scan_char_table): Support DFP formats for C2X.
588 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
589 (T2X_D32, T2X_D64, T2X_D128): New macros.
590
591 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
592
593 * c-omp.c (c_omp_check_context_selector): Rename to
594 omp_check_context_selector and move to omp-general.c.
595 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
596 move to omp-general.c.
597
598 2021-10-12 Joseph Myers <joseph@codesourcery.com>
599
600 * c-format.c (print_char_table): Add %b and %B formats.
601 (scan_char_table): Add %b format.
602 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
603 (T2X_UPD, T2X_UIM): New macros.
604
605 2021-10-12 Jakub Jelinek <jakub@redhat.com>
606
607 * c-omp.c (c_finish_omp_atomic): Use
608 clear_padding_type_may_have_padding_p.
609
610 2021-10-08 Martin Liska <mliska@suse.cz>
611
612 * c-opts.c (c_common_post_options): Use new macro
613 OPTION_SET_P.
614
615 2021-10-07 Martin Liska <mliska@suse.cz>
616
617 * c-common.c (parse_optimize_options): Make
618 save_opt_decoded_options a pointer type.
619
620 2021-10-06 Jakub Jelinek <jakub@redhat.com>
621
622 PR tree-optimization/102571
623 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
624 padding, but the non-padding bits are contiguous set of bytes
625 by adjusting the memcmp call arguments instead of emitting
626 __builtin_clear_padding and then comparing all the type's bytes.
627
628 2021-10-06 Jakub Jelinek <jakub@redhat.com>
629
630 PR c++/102612
631 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
632 __cpp_constexpr to 202110L rather than 201907L.
633
634 2021-10-04 Marek Polacek <polacek@redhat.com>
635
636 PR c++/97573
637 * c-common.h (do_warn_array_compare): Declare.
638 * c-warn.c (do_warn_array_compare): New.
639 * c.opt (Warray-compare): New option.
640
641 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
642
643 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
644 NULL, this is not needed.
645
646 2021-10-01 Martin Sebor <msebor@redhat.com>
647
648 PR c/102103
649 * c-common.c (decl_with_nonnull_addr_p): Handle members.
650 Check and perform warning suppression.
651 (c_common_truthvalue_conversion): Enhance warning suppression.
652
653 2021-10-01 Martin Liska <mliska@suse.cz>
654
655 PR target/102552
656 * c-common.c (parse_optimize_options): decoded_options[0] is
657 used for program name, so merged_decoded_options should also
658 respect that.
659
660 2021-10-01 Jakub Jelinek <jakub@redhat.com>
661 Richard Biener <rguenther@suse.de>
662
663 PR sanitizer/102515
664 * c-ubsan.c (ubsan_instrument_division): Check the right
665 flag_sanitize_recover bit, depending on which sanitization
666 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
667 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
668 and SANITIZE_DIVIDE is enabled, neither check is known
669 to be false and flag_sanitize_recover bits for those two
670 aren't the same, emit both __ubsan_handle_divrem_overflow
671 and __ubsan_handle_divrem_overflow_abort calls.
672
673 2021-10-01 Martin Liska <mliska@suse.cz>
674
675 * c-common.c (parse_optimize_options): Combine optimize
676 options with what was provided on the command line.
677
678 2021-10-01 Jakub Jelinek <jakub@redhat.com>
679
680 * c-omp.c (c_omp_split_clauses): Also copy
681 OMP_CLAUSE_ORDER_REPRODUCIBLE.
682
683 2021-09-27 Martin Liska <mliska@suse.cz>
684
685 * c-opts.c (c_common_init_options_struct): Set also
686 x_flag_default_complex_method.
687
688 2021-09-22 Jakub Jelinek <jakub@redhat.com>
689
690 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
691
692 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
693
694 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
695 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
696 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
697 __ROUNDING_MATH__ according to the new optimization flags.
698
699 2021-09-18 Jakub Jelinek <jakub@redhat.com>
700
701 * c-omp.c (c_omp_split_clauses): Split order clause also to
702 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
703
704 2021-09-17 Jakub Jelinek <jakub@redhat.com>
705
706 * c-omp.c (c_finish_omp_atomic): Avoid creating
707 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
708 create_tmp_var and add a zero initializer to TARGET_EXPRs that
709 had NULL initializer. When omitting operands after v = x,
710 use type of v rather than type of x. Fix type of vtmp
711 TARGET_EXPR.
712
713 2021-09-13 Jason Merrill <jason@redhat.com>
714
715 * c.opt: Add -Winterference-size.
716 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
717 and __GCC_CONSTRUCTIVE_SIZE.
718
719 2021-09-10 Jakub Jelinek <jakub@redhat.com>
720
721 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
722 * c-omp.c: Include gimple-fold.h.
723 (c_finish_omp_atomic): Add r and weak arguments. Add support for
724 OpenMP 5.1 atomics.
725
726 2021-09-09 qing zhao <qing.zhao@oracle.com>
727
728 * c-attribs.c (handle_uninitialized_attribute): New function.
729 (c_common_attribute_table): Add "uninitialized" attribute.
730
731 2021-09-08 liuhongt <hongtao.liu@intel.com>
732
733 * c-common.c (excess_precision_mode_join): Update below comments.
734 (c_ts18661_flt_eval_method): Set excess_precision_type to
735 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
736 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
737 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
738 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
739
740 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
741
742 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
743
744 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
745
746 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
747 and -gnatwu warning for the package specification.
748
749 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
750
751 * c-attribs.c (handle_unavailable_attribute): New.
752
753 2021-08-30 Jason Merrill <jason@redhat.com>
754
755 * c.opt: Add -Wmissing-requires.
756
757 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
758
759 PR other/93067
760 * c-opts.c (c_common_input_charset_cb): New function.
761 (c_common_post_options): Call new function
762 diagnostic_initialize_input_context().
763
764 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
765
766 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
767 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
768 "di" and "u", respecitively; fill with BADLEN to match
769 size of 'types'.
770 (get_init_dynamic_hwi): Split off from ...
771 (init_dynamic_diag_info): ... here. Call it.
772 (init_dynamic_gfc_info): Call it.
773
774 2021-08-20 Jakub Jelinek <jakub@redhat.com>
775
776 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
777 * c-pragma.c (omp_pragmas): Add error directive.
778 * c-omp.c (omp_directives): Uncomment error directive entry.
779
780 2021-08-18 Jakub Jelinek <jakub@redhat.com>
781
782 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
783 * c-pragma.c (omp_pragmas): Add nothing directive.
784 * c-omp.c (omp_directives): Uncomment nothing directive entry.
785
786 2021-08-17 Jakub Jelinek <jakub@redhat.com>
787
788 PR c++/101539
789 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
790 * c-common.c (c_common_reswords): Add __is_layout_compatible.
791
792 2021-08-17 Matt Jacobson <mhjacobson@me.com>
793
794 * c-opts.c (c_common_post_options): Default to
795 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
796
797 2021-08-17 Jakub Jelinek <jakub@redhat.com>
798
799 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
800 * c-pragma.c (omp_pragmas): Add scope construct.
801 * c-omp.c (omp_directives): Uncomment scope directive entry.
802
803 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
804
805 * c-cppbuiltin.c (c_cpp_builtins): Define
806 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
807
808 2021-08-12 Jakub Jelinek <jakub@redhat.com>
809
810 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
811 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
812 * c-pragma.c (omp_pragmas_simd): Add masked construct.
813 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
814 enumerator.
815 (c_finish_omp_masked): Declare.
816 * c-omp.c (c_finish_omp_masked): New function.
817 (c_omp_split_clauses): Handle combined masked constructs.
818
819 2021-07-30 Jakub Jelinek <jakub@redhat.com>
820
821 PR c++/101539
822 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
823 * c-common.c (c_common_reswords): Add
824 __is_pointer_interconvertible_base_of.
825
826 2021-07-29 Richard Biener <rguenther@suse.de>
827
828 PR c/101512
829 * c-common.c (c_common_mark_addressable_vec): Look through
830 C_MAYBE_CONST_EXPR even if not at the toplevel.
831
832 2021-07-27 Martin Sebor <msebor@redhat.com>
833
834 PR c/101585
835 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
836
837 2021-07-23 Jakub Jelinek <jakub@redhat.com>
838
839 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
840 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
841 and later.
842
843 2021-07-23 Jakub Jelinek <jakub@redhat.com>
844
845 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
846 PRAGMA_OMP__LAST_ enumerators.
847
848 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
849 Joseph Myers <joseph@codesourcery.com>
850 Cesar Philippidis <cesar@codesourcery.com>
851
852 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
853
854 2021-07-20 Martin Sebor <msebor@redhat.com>
855
856 * c-common.c (c_build_shufflevector): Adjust by-value argument to
857 by-const-reference.
858 * c-common.h (c_build_shufflevector): Same.
859
860 2021-07-16 Andrew Pinski <apinski@marvell.com>
861
862 PR c/101453
863 * c-common.c (parse_optimize_options): Use the correct
864 size for buffer.
865
866 2021-07-15 Martin Sebor <msebor@redhat.com>
867
868 PR c/101289
869 PR c/97548
870 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
871
872 2021-07-14 Jason Merrill <jason@redhat.com>
873
874 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
875
876 2021-07-06 Martin Sebor <msebor@redhat.com>
877
878 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
879 (gcc_cdiag_char_table): Same.
880 (gcc_cxxdiag_char_table): Same.
881
882 2021-07-02 Jakub Jelinek <jakub@redhat.com>
883
884 * c-common.h (enum c_omp_directive_kind): New enum.
885 (struct c_omp_directive): New type.
886 (c_omp_categorize_directive): Declare.
887 * c-omp.c (omp_directives): New variable.
888 (c_omp_categorize_directive): New function.
889
890 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
891
892 * c-ada-spec.c (packed_layout): New global variable.
893 (dump_ada_declaration): Set it upon seeing a packed record type.
894 Do not put the "aliased" keyword if it is set.
895 (dump_ada_structure): Add Pack aspect if it is set and clear it.
896
897 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
898
899 * c-ada-spec.c (check_name): Rename into...
900 (check_type_name_conflict): ...this. Minor tweak.
901 (dump_ada_function_declaration): Adjust to above renaming.
902 (dump_ada_array_domains): Fix oversight.
903 (dump_ada_declaration): Call check_type_name_conflict for variables.
904
905 2021-06-25 Martin Sebor <msebor@redhat.com>
906
907 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
908 (c_common_truthvalue_conversion): Replace direct uses of
909 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
910 copy_no_warning.
911 (check_function_arguments_recurse): Same.
912 * c-gimplify.c (c_gimplify_expr): Same.
913 * c-warn.c (overflow_warning): Same.
914 (warn_logical_operator): Same.
915 (warn_if_unused_value): Same.
916 (do_warn_unused_parameter): Same.
917
918 2021-06-24 Jakub Jelinek <jakub@redhat.com>
919
920 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
921 C_ORT_OMP_TARGET.
922 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
923 combined target constructs also add map (always, tofrom:) clause.
924
925 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
926
927 * c-attribs.c (common_handle_aligned_attribute): Remove short
928 circuit and dead code.
929
930 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
931
932 PR c++/101052
933 * known-headers.cc (get_stdlib_header_for_name): Add known
934 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
935 exit, and getenv.
936
937 2021-06-12 Jason Merrill <jason@redhat.com>
938
939 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
940
941 2021-06-11 Jakub Jelinek <jakub@redhat.com>
942
943 PR c++/100974
944 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
945 -std=c++2b for P1938R3 consteval if support.
946
947 2021-06-09 Jason Merrill <jason@redhat.com>
948
949 PR c++/100879
950 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
951 warning.
952
953 2021-06-07 Martin Liska <mliska@suse.cz>
954
955 * c-target.def: Split long lines and replace them
956 with '\n\'.
957
958 2021-06-04 Martin Sebor <msebor@redhat.com>
959
960 PR c/100783
961 * c-attribs.c (positional_argument): Bail on erroneous types.
962
963 2021-06-04 Martin Sebor <msebor@redhat.com>
964
965 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
966 for element presence.
967
968 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
969
970 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
971 (dump_ada_decl_name): Likewise.
972 (dump_anonymous_type_name): Remove parent parameter and adjust.
973 (dump_sloc): Minor tweak.
974 (dump_ada_array_type): Remove type parameter and adjust.
975 (dump_ada_enum_type): Remove parent parameter and adjust.
976 (dump_ada_node): Adjust calls to above functions.
977 (dumped_anonymous_types): New global variable.
978 (dump_nested_types_1): Rename into...
979 (dump_nested_types): ...this.
980 (dump_nested_type): Remove parent and dumped_types parameters.
981 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
982 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
983 (dump_ada_specs): Initialize and free dumped_anonymous_types.
984
985 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
986
987 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
988 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
989
990 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
991
992 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
993 (htable_t): New typedef.
994 (overloaded_names): Use it.
995 (add_name): New function.
996 (init_overloaded_names): Use add_name to populate the table and add
997 special cases for sigaction and stat.
998 (overloaded_name_p): Rename into...
999 (overloading_index): ...this. Do not initialize overloaded_names table
1000 here. Return the index or zero.
1001 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1002 but add an overloading suffix instead.
1003 (dump_ada_specs): Initialize overloaded_names tables here.
1004
1005 2021-06-01 Martin Liska <mliska@suse.cz>
1006
1007 PR other/100759
1008 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1009 to a situation where we are not in processing of an optimize
1010 pragma.
1011 * c-pragma.c (handle_pragma_pop_options): Restore target
1012 options.
1013
1014 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1015
1016 PR testsuite/100749
1017 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1018
1019 2021-05-31 Richard Biener <rguenther@suse.de>
1020
1021 PR c++/88601
1022 * c-common.c: Include tree-vector-builder.h and
1023 vec-perm-indices.h.
1024 (c_common_reswords): Add __builtin_shufflevector.
1025 (c_build_shufflevector): New funtion.
1026 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1027 (c_build_shufflevector): Declare.
1028
1029 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1030
1031 PR middle-end/99928
1032 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1033 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1034
1035 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1036
1037 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1038
1039 2021-05-25 Martin Liska <mliska@suse.cz>
1040
1041 PR tree-optimization/92860
1042 PR target/99592
1043 * c-attribs.c (handle_optimize_attribute): Save target node
1044 before calling parse_optimize_options and save it in case
1045 it changes.
1046 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1047 (handle_pragma_pop_options): Likewise here.
1048
1049 2021-05-25 Martin Liska <mliska@suse.cz>
1050
1051 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1052
1053 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1054
1055 PR middle-end/99928
1056 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1057 combined with simd and not with taskloop or for.
1058
1059 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1060
1061 PR middle-end/99928
1062 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1063 on firstprivate clause copy going to target construct, and for
1064 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1065
1066 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1067
1068 * c.opt (Wc++11-extensions, Wc++14-extensions)
1069 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1070 options.
1071
1072 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1073
1074 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1075
1076 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1077
1078 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1079 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1080 (pch_init): Renamed member.
1081 (c_common_valid_pch): Adjust access to debug_type_names.
1082
1083 2021-05-19 Martin Sebor <msebor@redhat.com>
1084
1085 PR c/100619
1086 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1087 bounds.
1088
1089 2021-05-18 Richard Biener <rguenther@suse.de>
1090
1091 PR c/100547
1092 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1093 Reword existing nunit diagnostic.
1094
1095 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1096
1097 * c-common.c (braced_list_to_string): Return CTOR unchanged
1098 if host and target character sizes don't match.
1099
1100 2021-05-14 Martin Liska <mliska@suse.cz>
1101
1102 * c.opt: Add Warning keyword for 2 options.
1103
1104 2021-05-13 Martin Liska <mliska@suse.cz>
1105
1106 PR middle-end/100504
1107 * c-attribs.c (handle_target_clones_attribute): Expect a string
1108 argument to target_clone argument.
1109
1110 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1111
1112 * c-lex.c (interpret_float): Handle digit separators for C2X.
1113
1114 2021-05-10 Martin Liska <mliska@suse.cz>
1115
1116 * c-ada-spec.c (print_destructor): Use startswith
1117 function instead of strncmp.
1118 (dump_ada_declaration): Likewise.
1119 * c-common.c (disable_builtin_function): Likewise.
1120 (def_builtin_1): Likewise.
1121 * c-format.c (check_tokens): Likewise.
1122 (check_plain): Likewise.
1123 (convert_format_name_to_system_name): Likewise.
1124
1125 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1126
1127 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1128 complex divide
1129
1130 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1131 Nathan Sidwell <nathan@codesourcery.com>
1132 Tom de Vries <vries@codesourcery.com>
1133 Julian Brown <julian@codesourcery.com>
1134 Kwok Cheung Yeung <kcy@codesourcery.com>
1135
1136 * c.opt (Wopenacc-parallelism): New.
1137
1138 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1139
1140 * c.opt (fopenacc-kernels=): Remove.
1141
1142 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1143
1144 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1145 occured -> occurred.
1146 (check_alignment_of_packed_member): Fix a comment typo,
1147 memeber -> member.
1148 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1149 and onless -> unless.
1150 (warn_parm_array_mismatch): Fix comment typos, declaratation
1151 -> declaration and woud -> would. Fix up comment indentation.
1152
1153 2021-04-08 Martin Sebor <msebor@redhat.com>
1154
1155 PR middle-end/99883
1156 * c.opt (Wmismatched-new-delete): Correct spelling.
1157
1158 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1159
1160 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1161 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1162 enumeral types use again the type name for the enumeration constants.
1163 (dump_ada_node): Adjust call to dump_ada_enum_type.
1164 (dump_nested_type): Likewise.
1165
1166 2021-04-01 Jason Merrill <jason@redhat.com>
1167
1168 PR c++/98481
1169 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1170
1171 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c++/99565
1174 * c-warn.c (do_warn_duplicated_branches): Pass also
1175 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1176
1177 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1178
1179 PR debug/99230
1180 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1181
1182 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1183
1184 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1185 after entering the separate class package, if any.
1186
1187 2021-03-04 Richard Biener <rguenther@suse.de>
1188
1189 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1190 Handle ERROR_MARK.
1191
1192 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1193
1194 PR c/99325
1195 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1196 (token_streamer::stream) Likewise.
1197 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1198 UNKNOWN_LOCATION.
1199
1200 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1201
1202 PR c/99324
1203 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1204 instead of mark_addressable. Fix a comment typo -
1205 neutrallly -> neutrally.
1206
1207 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1208
1209 PR c/99304
1210 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1211 message - refernced -> referenced. Remove superfluous space before
1212 closing paren of function calls.
1213
1214 2021-02-25 Nathan Sidwell <nathan@acm.org>
1215
1216 PR c++/99166
1217 * c.opt (-flang-info-module-cmi): Renamed option.
1218
1219 2021-02-19 Nathan Sidwell <nathan@acm.org>
1220
1221 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1222
1223 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1224
1225 PR target/99113
1226 * c-attribs.c (c_common_attribute_table): Add the "retain"
1227 attribute.
1228 (handle_retain_attribute): New function.
1229
1230 2021-02-16 Marek Polacek <polacek@redhat.com>
1231
1232 PR c++/99062
1233 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1234 alignment argument is non-negative. Tweak a warning message.
1235
1236 2021-02-12 Martin Sebor <msebor@redhat.com>
1237
1238 PR c/99055
1239 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1240 print_generic_expr_to_str.
1241
1242 2021-02-10 Richard Biener <rguenther@suse.de>
1243
1244 * c-common.c (parse_optimize_options): Free decoded_options.
1245
1246 2021-02-04 emsr <3dw4rd@verizon.net>
1247
1248 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1249
1250 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1251
1252 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1253 * c-lex.c (interpret_integer): Set node type for size literal.
1254
1255 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1256
1257 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1258 draft from description.
1259 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1260
1261 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1262
1263 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1264 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1265 and -std=gnu++2b
1266 * c-opts.c (set_std_cxx23): New.
1267 (c_common_handle_option): Set options when -std=c++23 is enabled.
1268 (c_common_post_options): Adjust comments.
1269 (set_std_cxx20): Likewise.
1270
1271 2021-01-25 Martin Sebor <msebor@redhat.com>
1272
1273 PR c++/98646
1274 * c-common.c (check_nonnull_arg): Adjust warning text.
1275
1276 2021-01-17 Martin Sebor <msebor@redhat.com>
1277
1278 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1279 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1280
1281 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1282
1283 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1284 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1285
1286 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR tree-optimization/98597
1289 * c-pretty-print.c: Include options.h.
1290 (c_fold_indirect_ref_for_warn): New function.
1291 (print_mem_ref): Use it. If it returns something that has compatible
1292 type and is TBAA compatible with zero offset, print it and return,
1293 otherwise print it using offsetof syntax or array ref syntax. Fix up
1294 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1295 argument has pointer to array type. Print pointers using the standard
1296 formatting.
1297
1298 2021-01-12 Martin Sebor <msebor@redhat.com>
1299
1300 PR c/98597
1301 PR c/98592
1302 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1303 has pointer type. Remove redundant code. Avoid calling
1304 gimple_canonical_types_compatible_p.
1305
1306 2021-01-07 Martin Sebor <msebor@redhat.com>
1307
1308 PR middle-end/98578
1309 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1310 Avoid assuming acces type's size is constant. Correct condition
1311 guarding the printing of a parenthesis.
1312
1313 2021-01-06 Martin Sebor <msebor@redhat.com>
1314
1315 PR c++/95768
1316 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1317 SSA_NAMEs print VLA names and GIMPLE defining statements.
1318 (print_mem_ref): New function.
1319 (c_pretty_printer::unary_expression): Call it.
1320
1321 2021-01-06 Richard Biener <rguenther@suse.de>
1322
1323 PR tree-optimization/95582
1324 * c-attribs.c (c_common_attribute_table): Add entry for
1325 signed_bool_precision.
1326 (handle_signed_bool_precision_attribute): New.
1327
1328 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1329
1330 * c.opt: Add -stdlib= option and enumerations for
1331 libstdc++ and libc++.
1332
1333 2020-12-16 Martin Liska <mliska@suse.cz>
1334
1335 * c.opt: Remove usage of Report.
1336
1337 2020-12-14 Martin Sebor <msebor@redhat.com>
1338
1339 PR middle-end/98166
1340 PR c++/57111
1341 PR middle-end/98160
1342 * c-attribs.c (maybe_add_noinline): New function.
1343 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1344 Implicitly add attribute noinline to functions not declared inline
1345 and warn on those.
1346
1347 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1348
1349 * c-pragma.c (omp_pragmas): Add 'allocate'.
1350 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1351
1352 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1353
1354 PR c++/98187
1355 * c-pragma.c (omp_pragmas): Remove "master".
1356 (omp_pragmas_simd): Add "master".
1357
1358 2020-12-07 Marek Polacek <polacek@redhat.com>
1359
1360 PR c++/98126
1361 * c-common.c (verify_tree_lim_r): New function.
1362 (verify_sequence_points): Use it. Use nullptr instead of 0.
1363
1364 2020-12-03 Martin Sebor <msebor@redhat.com>
1365
1366 PR c++/90629
1367 PR middle-end/94527
1368 * c-attribs.c (handle_dealloc_attribute): New function.
1369 (handle_malloc_attribute): Handle argument forms of attribute.
1370 * c.opt (-Wmismatched-dealloc): New option.
1371 (-Wmismatched-new-delete): New option.
1372
1373 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1374
1375 PR libstdc++/93121
1376 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1377 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1378
1379 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1380
1381 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1382 {__GNUC_EXECUTION_CHARSET_NAME} and
1383 _WIDE_EXECUTION_CHARSET_NAME} macros.
1384
1385 2020-12-01 Nathan Sidwell <nathan@acm.org>
1386
1387 * c-common.c (module, import, export): New internal tokens (with
1388 trailing space).
1389 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1390 them.
1391 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1392 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1393
1394 2020-12-01 Nathan Sidwell <nathan@acm.org>
1395
1396 * c-opts.c (c_common_init_options): Ask for module dependencies.
1397 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1398 * c-pch.c (c_common_valid_pch): ... does not play with C++
1399 modules.
1400 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1401 options.
1402 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1403 (fmodule-only, fmodule-mapper, fmodule-lazy)
1404 (fmodule-version-ignore, Winvalid-imported-macros)
1405 (flang-info-include-translate, flang-info-include-translate-not):
1406 New options
1407
1408 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1409
1410 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1411 (dump_ada_structure): Also deal with convention, unchecked union and
1412 bit-field for nested types. In the latter case, print an Alignment
1413 aspect along with the Pack aspect.
1414
1415 2020-11-25 Martin Sebor <msebor@redhat.com>
1416
1417 PR bootstrap/94982
1418 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1419 -Wformat-diag.
1420
1421 2020-11-24 Martin Sebor <msebor@redhat.com>
1422
1423 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1424
1425 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1426
1427 * c-attribs.c (handle_special_var_sec_attribute): New.
1428 (handle_noinit_attribute): Remove.
1429 (attr_noinit_exclusions): Rename to...
1430 (attr_section_exclusions): ...this, and add "persistent" attribute
1431 exclusion.
1432 (c_common_attribute_table): Add "persistent" attribute.
1433
1434 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1435
1436 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1437 Treat opaque types like other types.
1438 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1439 supported types.
1440
1441 2020-11-20 Martin Sebor <msebor@redhat.com>
1442
1443 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1444 with fewer arguments.
1445
1446 2020-11-20 Martin Sebor <msebor@redhat.com>
1447
1448 PR middle-end/97879
1449 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1450 Error out on invalid modes.
1451
1452 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1453
1454 PR libstdc++/88101
1455 * c-common.c (check_builtin_function_arguments): Handle
1456 BUILT_IN_CLEAR_PADDING.
1457
1458 2020-11-18 Nathan Sidwell <nathan@acm.org>
1459
1460 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1461
1462 2020-11-17 Nathan Sidwell <nathan@acm.org>
1463
1464 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1465 after newly-added CTI_MODULE_HWM.
1466
1467 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1468
1469 * c-cppbuiltin.c (builtin_define_float_constants): Define
1470 "*_IS_IEC_60559__" macros.
1471
1472 2020-11-17 Nathan Sidwell <nathan@acm.org>
1473
1474 * c-lex.c: #include "langhooks.h".
1475 (cb_undef): Maybe call preprocess_undef lang hook.
1476 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1477 lang hook.
1478 (push_command_line_include): Maybe call preprocess_main_file lang
1479 hook.
1480 (cb_file_change): Likewise.
1481 * c-ppoutput.c: #include "langhooks.h.
1482 (scan_translation_unit): Maybe call preprocess_token lang hook.
1483 (class do_streamer): New, derive from token_streamer.
1484 (directives_only_cb): Data pointer is do_streamer, call
1485 preprocess_token lang hook.
1486 (scan_translation_unit_directives_only): Use do_streamer.
1487 (print_line_1): Move src_line recording to after string output.
1488 (cb_undef): Maybe call preprocess_undef lang hook.
1489
1490 2020-11-17 Nathan Sidwell <nathan@acm.org>
1491
1492 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1493 code duplicating that functionality.
1494
1495 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1496
1497 PR c/90628
1498 * c-common.c (check_builtin_function_arguments)
1499 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1500 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1501 for more builtins and argument positions.
1502
1503 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1504
1505 PR objc/97854
1506 * stub-objc.c: Include c-common.h to declare enum rid.
1507
1508 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1509
1510 PR c++/63287
1511 * c-cppbuiltin.c: Include configargs.h.
1512 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1513 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1514 "single".
1515
1516 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1517 Thomas Schwinge <thomas@codesourcery.com>
1518
1519 * c.opt (fopenacc-kernels): Add.
1520
1521 2020-11-13 Jason Merrill <jason@redhat.com>
1522
1523 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1524
1525 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1526
1527 PR c++/91318
1528 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1529
1530 2020-11-13 Martin Liska <mliska@suse.cz>
1531
1532 * c-attribs.c (build_attr_access_from_parms): Format properly.
1533
1534 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1535
1536 PR objc/90707
1537 * c-common.c (c_common_reswords): null_unspecified, nullable,
1538 nonnull, null_resettable: New keywords.
1539 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1540 RID_NONNULL, RID_NULL_RESETTABLE: New.
1541 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1542 ranges accepted for property attributes.
1543 * c-attribs.c (handle_objc_nullability_attribute): New.
1544 * c-objc.h (enum objc_property_attribute_group): Add
1545 OBJC_PROPATTR_GROUP_NULLABLE.
1546 (enum objc_property_attribute_kind):Add
1547 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1548 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1549
1550 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1551
1552 PR objc/77404
1553 * c-attribs.c (handle_objc_root_class_attribute): New
1554 * c-objc.h (objc_start_class_interface): Add a location
1555 value for the position of the class name.
1556 * c.opt: Add Wobjc-root-class.
1557 * stub-objc.c (objc_start_class_interface): Add a location
1558 value for the position of the class name.
1559
1560 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1561
1562 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1563 Allow scope for C. Handle standard attributes for C. Do not
1564 accept unscoped attributes if std_syntax and not handled as
1565 standard attributes.
1566 * c-common.h (c_common_has_attribute): Update prototype.
1567
1568 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1569
1570 PR pch/86674
1571 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1572 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1573
1574 2020-11-11 Patrick Palka <ppalka@redhat.com>
1575
1576 PR c++/88115
1577 * c-opts.c (c_common_post_options): Update latest_abi_version.
1578
1579 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1580
1581 PR c/97748
1582 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1583 to false.
1584 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1585 recursively and just return true instead of warning if it is true.
1586 Handle COMPLEX_EXPR.
1587
1588 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1589
1590 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1591 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1592 (c_omp_adjust_map_clauses): New function.
1593
1594 2020-11-09 Marek Polacek <polacek@redhat.com>
1595
1596 DR 1914
1597 * c-common.c (attribute_fallthrough_p): Tweak the warning
1598 message.
1599
1600 2020-11-09 Patrick Palka <ppalka@redhat.com>
1601
1602 * c-pragma.c (handle_pragma_diagnostic): Split the
1603 unknown-option -Wpragmas diagnostic into a warning and a
1604 subsequent note containing a spelling suggestion. Avoid
1605 computing the suggestion if -Wpragmas warnings are being
1606 suppressed.
1607
1608 2020-11-09 Patrick Palka <ppalka@redhat.com>
1609
1610 PR testsuite/97117
1611 * c-indentation.c (get_visual_column): Remove location_t
1612 parameter. Move the column-tracking diagnostic code from here
1613 to ...
1614 (should_warn_for_misleading_indentation): ... here, before the
1615 early exit for when the loci are not all distinct. Don't pass a
1616 location_t argument to get_visual_column.
1617 (assert_get_visual_column_succeeds): Don't pass a location_t
1618 argument to get_visual_column.
1619 (assert_get_visual_column_fails): Likewise.
1620
1621 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1622
1623 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1624 of keywords accepted in @property attribute contexts.
1625 * c-objc.h (enum objc_property_attribute_group): Add
1626 OBJC_PROPATTR_GROUP_CLASS.
1627 (enum objc_property_attribute_kind): Add
1628 OBJC_PROPERTY_ATTR_CLASS.
1629
1630 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1631
1632 * c-common.c (c_common_reswords): Add 'atomic' property
1633 attribute.
1634 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1635 property attributes.
1636
1637 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1638
1639 * c-attribs.c (handle_nsobject_attribute): New.
1640 * c.opt: Add WNSObject-attribute.
1641
1642 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1643
1644 * c-objc.h (enum objc_property_attribute_group): New
1645 (enum objc_property_attribute_kind): New.
1646 (OBJC_PROPATTR_GROUP_MASK): New.
1647 (struct property_attribute_info): Small class encapsulating
1648 parser output from property attributes.
1649 (objc_prop_attr_kind_for_rid): New
1650 (objc_add_property_declaration): Simplify interface.
1651 * stub-objc.c (enum rid): Dummy type.
1652 (objc_add_property_declaration): Simplify interface.
1653 (objc_prop_attr_kind_for_rid): New.
1654
1655 2020-11-06 Nathan Sidwell <nathan@acm.org>
1656
1657 * c-ada-spec.c (collect_ada_nodes): Rename
1658 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1659 (collect_ada_node): Likewise.
1660 (dump_forward_type): Likewise.
1661 * c-common.c (set_underlying_type): Rename
1662 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1663 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1664
1665 2020-11-06 Jakub Jelinek <jakub@redhat.com>
1666
1667 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1668
1669 2020-11-05 Marek Polacek <polacek@redhat.com>
1670
1671 PR c++/97675
1672 * c.opt (Wexceptions): New option.
1673
1674 2020-11-05 Marek Polacek <polacek@redhat.com>
1675
1676 PR c++/25814
1677 * c.opt (Wvexing-parse): New option.
1678
1679 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1680
1681 PR c++/97670
1682 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1683 underlying decl to clear in the allocate_head bitmap.
1684
1685 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1686
1687 * c-objc.h (objc_non_constant_expr_p): New.
1688 * stub-objc.c (objc_non_constant_expr_p): New.
1689
1690 2020-11-03 Nathan Sidwell <nathan@acm.org>
1691
1692 * c.opt (MQ,MT): Reword description to be make-agnostic.
1693
1694 2020-11-02 Nathan Sidwell <nathan@acm.org>
1695
1696 * c-opts.c (c_common_post_options): Move var decl to its
1697 initialization point.
1698
1699 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1700
1701 * c-lex.c (c_lex_with_flags): When combining '@' with a
1702 keyword for Objective-C, combine the location ranges too.
1703
1704 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
1705 H.J.Lu <hjl.tools@gmail.com>
1706
1707 * c-attribs.c (c_common_attribute_table): Add new attribute
1708 zero_call_used_regs.
1709 (handle_zero_call_used_regs_attribute): New function.
1710
1711 2020-10-28 Marek Polacek <polacek@redhat.com>
1712
1713 PR c++/97573
1714 * c-opts.c (c_common_post_options): In C++20, turn on
1715 -Wdeprecated-enum-enum-conversion and
1716 -Wdeprecated-enum-float-conversion.
1717 * c.opt (Wdeprecated-enum-enum-conversion,
1718 Wdeprecated-enum-float-conversion): New options.
1719 (Wenum-conversion): Allow for C++ too.
1720
1721 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1722
1723 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1724 * c-omp.c: Include bitmap.h.
1725 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1726
1727 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1728
1729 * c-common.c (__is_nothrow_assignable): New.
1730 (__is_nothrow_constructible): Likewise.
1731 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1732 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1733
1734 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
1735
1736 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1737
1738 2020-10-23 Marek Polacek <polacek@redhat.com>
1739
1740 PR c++/91741
1741 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1742 (c_common_init_ts): Likewise.
1743 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1744 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1745 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1746 (maybe_warn_sizeof_array_div): New function.
1747 * c.opt (Wsizeof-array-div): New option.
1748
1749 2020-10-23 Martin Sebor <msebor@redhat.com>
1750
1751 PR c/97463
1752 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1753
1754 2020-10-22 Martin Liska <mliska@suse.cz>
1755
1756 PR c/94722
1757 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1758 (handle_stack_protect_attribute): Add error message for a
1759 no_stack_protector function.
1760
1761 2020-10-22 Martin Liska <mliska@suse.cz>
1762
1763 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1764
1765 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
1766
1767 * c-gimplify.c: Include tree-nested.h
1768 (c_genericize): Update for new nested function info.
1769
1770 2020-10-14 Martin Sebor <msebor@redhat.com>
1771
1772 PR c/97413
1773 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1774 bounds in an extra list.
1775
1776 2020-10-05 Richard Biener <rguenther@suse.de>
1777 Jakub Jelinek <jakub@redhat.com>
1778
1779 PR c++/97197
1780 * c-pretty-print.c: Include langhooks.h.
1781 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1782 expression.
1783 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1784 unary_expression.
1785 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1786
1787 2020-09-30 Martin Sebor <msebor@redhat.com>
1788
1789 PR middle-end/97189
1790 * c-attribs.c (append_access_attr): Use the function declaration
1791 location for a warning about an attribute access argument.
1792
1793 2020-09-29 Marek Polacek <polacek@redhat.com>
1794
1795 PR c++/94695
1796 * c.opt (Wrange-loop-construct): New option.
1797
1798 2020-09-23 Martin Sebor <msebor@redhat.com>
1799
1800 PR c/97131
1801 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1802
1803 2020-09-23 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/97125
1806 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1807 after loops and other structured control constructs have been lowered.
1808
1809 2020-09-22 Jakub Jelinek <jakub@redhat.com>
1810
1811 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1812 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1813
1814 2020-09-21 Marek Polacek <polacek@redhat.com>
1815
1816 * c.opt (Wctad-maybe-unsupported): New option.
1817
1818 2020-09-19 Martin Sebor <msebor@redhat.com>
1819
1820 PR c/50584
1821 * c-common.h (warn_parm_array_mismatch): Declare new function.
1822 (has_attribute): Move declaration of an existing function.
1823 (build_attr_access_from_parms): Declare new function.
1824 * c-warn.c (parm_array_as_string): Define new function.
1825 (plus_one): Define new function.
1826 (warn_parm_ptrarray_mismatch): Define new function.
1827 (warn_parm_array_mismatch): Define new function.
1828 (vla_bound_parm_decl): New function.
1829 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1830 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1831 qualifiers here...
1832 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1833 them in brackets here. Also print [static]. Strip extraneous
1834 expressions from VLA bounds.
1835
1836 2020-09-19 Martin Sebor <msebor@redhat.com>
1837
1838 PR c/50584
1839 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1840 (handle_argspec_attribute): New function.
1841 (get_argument, get_argument_type): New functions.
1842 (append_access_attrs): Add overload. Handle internal attribute
1843 representation in addition to external.
1844 (handle_access_attribute): Handle internal attribute representation
1845 in addition to external.
1846 (build_attr_access_from_parms): New function.
1847
1848 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1849
1850 * c-gimplify.c (genericize_c_loop): Rewrite to match
1851 c_finish_loop in c-typeck.c.
1852
1853 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1854
1855 * c-common.c (c_block_may_fallthrough): New, split from
1856 cxx_block_may_fallthrough in the cp front end.
1857 (c_common_init_ts): Move handling of loop and switch-related
1858 statements here from the cp front end.
1859 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1860 cp front end.
1861 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1862 * c-common.h (c_block_may_fallthru): Declare.
1863 (bc_state_t): Move here from cp front end.
1864 (save_bc_state, restore_bc_state): Declare.
1865 (c_genericize_control_stmt): Declare.
1866 (WHILE_COND, WHILE_BODY): Likewise.
1867 (DO_COND, DO_BODY): Likewise.
1868 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1869 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1870 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1871 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1872 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1873 * c-dump.c (dump_stmt): Copy from cp front end.
1874 (c_dump_tree): Move code to handle structured loop and switch
1875 tree nodes here from cp front end.
1876 * c-gimplify.c: Adjust includes.
1877 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1878 cp front end.
1879 (save_bc_state, restore_bc_state): New functions using old code
1880 from cp front end.
1881 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1882 (genericize_c_loop): Move from cp front end.
1883 (genericize_for_stmt, genericize_while_stmt): Likewise.
1884 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1885 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1886 (genericize_omp_for_stmt): Likewise.
1887 (c_genericize_control_stmt): New function using code split from
1888 cp front end.
1889 (c_genericize_control_r): New.
1890 (c_genericize): Call walk_tree with c_genericize_control_r.
1891 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1892 structured loop and switch tree nodes here from cp front end.
1893
1894 2020-09-17 Patrick Palka <ppalka@redhat.com>
1895
1896 PR c/80076
1897 * c-indentation.c (should_warn_for_misleading_indentation): Move
1898 declarations of local variables closer to their first use.
1899 Handle virtual token locations by resolving them to their
1900 respective macro expansion points. If all three tokens are
1901 produced from the same macro expansion, then instead use their
1902 loci within the macro definition.
1903
1904 2020-09-16 Martin Sebor <msebor@redhat.com>
1905
1906 PR c/78666
1907 PR c/96126
1908 * c-attribs.c (validate_attr_args): New function.
1909 (validate_attr_arg): Same.
1910 (handle_section_attribute): Call it. Introduce a local variable.
1911 (handle_alloc_size_attribute): Same.
1912 (handle_alloc_align_attribute): Same.
1913
1914 2020-09-14 Jakub Jelinek <jakub@redhat.com>
1915
1916 * c-attribs.c (handle_optimize_attribute): Adjust
1917 cl_optimization_save, cl_optimization_restore and
1918 build_optimization_node callers.
1919 * c-pragma.c (handle_pragma_optimize): Adjust
1920 build_optimization_node caller.
1921 (handle_pragma_push_options): Adjust
1922 build_optimization_node and build_target_option_node callers.
1923 (handle_pragma_pop_options, handle_pragma_reset_options):
1924 Adjust cl_optimization_restore callers.
1925
1926 2020-08-28 Martin Sebor <msebor@redhat.com>
1927
1928 * c.opt (Wstringop-overread): New option.
1929
1930 2020-08-11 Jakub Jelinek <jakub@redhat.com>
1931
1932 PR c/96545
1933 * c-common.c (get_atomic_generic_size): Require that first argument's
1934 type points to a complete type and use tree_fits_uhwi_p instead of
1935 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1936
1937 2020-07-31 Martin Sebor <msebor@redhat.com>
1938
1939 PR c++/96003
1940 * c-common.c (check_function_arguments_recurse): Return early when
1941 no-warning bit is set.
1942
1943 2020-07-31 Richard Biener <rguenther@suse.de>
1944
1945 PR debug/96383
1946 * c-common.h (c_common_finalize_early_debug): Declare.
1947 * c-common.c: Include debug.h.
1948 (c_common_finalize_early_debug): finalize_early_debug langhook
1949 implementation generating debug for extern declarations.
1950
1951 2020-07-27 Nathan Sidwell <nathan@acm.org>
1952
1953 * c-common.c (try_to_locate_new_include_insertion_point): Use
1954 strcmp, not pointer equality.
1955
1956 2020-07-25 Martin Sebor <msebor@redhat.com>
1957
1958 PR c++/96310
1959 * c-common.c (check_nonnull_arg): Print note only when warning was
1960 issued.
1961
1962 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1963
1964 * c-omp.c (c_finish_omp_critical): Check for no name but
1965 nonzero hint provided.
1966
1967 2020-07-20 Jason Merrill <jason@redhat.com>
1968
1969 * c-cppbuiltin.c (c_cpp_builtins): Update
1970 __cpp_nontype_template_args for C++20.
1971
1972 2020-07-20 Martin Sebor <msebor@redhat.com>
1973
1974 PR c/96249
1975 * c.opt: Remove stray text.
1976
1977 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1978
1979 PR other/86904
1980 * c-indentation.c (should_warn_for_misleading_indentation): Get
1981 global tabstop from the new source.
1982 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1983 is now a common option.
1984 * c.opt: Likewise.
1985
1986 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1987
1988 * c.opt (Wscalar-storage-order): Add explicit variable.
1989
1990 2020-07-07 Nathan Sidwell <nathan@acm.org>
1991
1992 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1993 cpp_read_main_file.
1994 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1995 maps. Force token position to line_table's highest line.
1996 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1997 (cb_define): Always increment source line.
1998
1999 2020-07-06 Martin Sebor <msebor@redhat.com>
2000
2001 PR c++/95984
2002 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2003 to stub lambda objects with null this pointer.
2004 (check_nonnull_arg): Handle C++ nullptr.
2005
2006 2020-07-02 Jason Merrill <jason@redhat.com>
2007 Jakub Jelinek <jakub@redhat.com>
2008
2009 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2010
2011 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2012
2013 PR c++/95963
2014 * c-common.c (check_function_arguments_recurse): Don't crash on
2015 calls to internal functions.
2016
2017 2020-06-28 Martin Sebor <msebor@redhat.com>
2018
2019 PR c++/86568
2020 * c-common.c (struct nonnull_arg_ctx): Add members.
2021 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2022 C++ member functions specially. Consider the this pointer implicitly
2023 nonnull.
2024 (check_nonnull_arg): Use location of argument when available.
2025 (check_function_arguments): Use nonnull_arg_ctx as argument.
2026
2027 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2028
2029 PR middle-end/95903
2030 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2031 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2032 smaller precision intop operands separately.
2033
2034 2020-06-26 Marek Polacek <polacek@redhat.com>
2035
2036 * c-opts.c (c_common_init_options): Default to gnu++17.
2037
2038 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2039
2040 PR c/95378
2041 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2042 pointer arguments.
2043
2044 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2045
2046 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2047 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2048 idx members.
2049 (c_omp_is_loop_iterator): New function.
2050 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2051 if outer loop iterator is present. Perform duplicate checking through
2052 hash_set in the function rather than expecting caller to do that.
2053 Pass NULL instead of d->ppset to walk_tree_1.
2054 (c_omp_check_nonrect_loop_iv): New function.
2055 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2056 non-rectangular loop forms, diagnose multiple associated loops with
2057 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2058 (c_omp_check_loop_iv_exprs): Likewise.
2059
2060 2020-06-10 Martin Liska <mliska@suse.cz>
2061
2062 PR tree-optimization/92860
2063 * c-attribs.c (handle_optimize_attribute):
2064 Save global options and compare it after parsing of function
2065 attribute.
2066 * c-pragma.c (opt_stack::saved_global_options): New field.
2067 (handle_pragma_push_options): Save global_options.
2068 (handle_pragma_pop_options): Compare them after pop.
2069
2070 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c/95580
2073 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2074 case when MEM_REF's first argument has type pointer to incomplete type.
2075
2076 2020-06-05 Jason Merrill <jason@redhat.com>
2077
2078 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2079 operand to POINTER_PLUS_EXPR.
2080
2081 2020-06-04 Martin Sebor <msebor@redhat.com>
2082
2083 PR middle-end/10138
2084 PR middle-end/95136
2085 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2086 (handle_access_attribute): Same.
2087
2088 2020-06-03 Mark Wielaard <mark@klomp.org>
2089
2090 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2091 New function.
2092 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2093 New function declaration.
2094
2095 2020-06-03 Mark Wielaard <mark@klomp.org>
2096
2097 * known-headers.cc (get_string_macro_hint): New function.
2098 (get_stdlib_header_for_name): Use get_string_macro_hint.
2099 (get_c_stdlib_header_for_string_macro_name): New function.
2100 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2101 New function declaration.
2102
2103 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2104
2105 * c-common.h (c_omp_predetermined_mapping): Declare.
2106 * c-omp.c (c_omp_predetermined_mapping): New.
2107
2108 2020-05-22 Mark Wielaard <mark@klomp.org>
2109
2110 * known-headers.cc (get_stdlib_header_for_name): Add a new
2111 stdlib_hint array for stdbool and stdint.
2112
2113 2020-05-22 Mark Wielaard <mark@klomp.org>
2114
2115 * known-headers.cc (get_stdlib_header_for_name): Return
2116 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2117 flag_isoc99.
2118
2119 2020-05-20 Nathan Sidwell <nathan@acm.org>
2120
2121 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2122
2123 * c-common.c (try_to_locate_new_include_insertion_point): Use
2124 strcmp to compare filenames.
2125 * c-lex.c (init_c_lex): Move declaration to initialization.
2126 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2127 deferred count loop.
2128
2129 2020-05-15 Jason Merrill <jason@redhat.com>
2130
2131 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2132
2133 2020-05-13 Jason Merrill <jason@redhat.com>
2134
2135 * c.opt (std=c++20): Make c++2a the alias.
2136 (std=gnu++20): Likewise.
2137 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2138 * c-opts.c: Adjust.
2139 * c-cppbuiltin.c: Adjust.
2140 * c-ubsan.c: Adjust.
2141 * c-warn.c: Adjust.
2142
2143 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2144
2145 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2146
2147 2020-05-08 Nathan Sidwell <nathan@acm.org>
2148
2149 Reimplement directives only processing.
2150 * c-ppoutput.c (token_streamer): Ne.
2151 (directives_only_cb): New. Swallow ...
2152 (print_lines_directives_only): ... this.
2153 (scan_translation_unit_directives_only): Reimplment using the
2154 published interface.
2155
2156 2020-05-07 Marek Polacek <polacek@redhat.com>
2157
2158 * c-format.c (badwords): Add "nonstatic".
2159
2160 202-05-07 Jakub Jelinek <jakub@redhat.com>
2161
2162 PR c/94968
2163 * c-common.c (speculation_safe_value_resolve_params): Return false if
2164 error_operand_p (val2).
2165 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2166 Remove extraneous semicolon.
2167
2168 2020-05-06 qing zhao <qing.zhao@oracle.com>
2169
2170 PR c/94230
2171 * c-indentation.c (get_visual_column): Add a hint to use the new
2172 -flarge-source-files option.
2173
2174 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2175
2176 * c-attribs.c (handle_vector_size_attribute): Add attribute
2177 nonnull for argument args in order to silence warning of
2178 uninitialized variable usage. Since this is local to the
2179 compilation unit and thus cannot be checked at call sides by the
2180 compiler, added an assert statement in order to verify this.
2181
2182 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2183
2184 PR target/93492
2185 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2186 value to USHRT_MAX (65535).
2187
2188 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2189
2190 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2191
2192 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2193
2194 PR c/94755
2195 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2196 fncode == BUILT_IN_NONE before initialization of first_param.
2197
2198 2020-04-23 Marek Polacek <polacek@redhat.com>
2199
2200 PR c++/94733
2201 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2202 TREE_PURPOSE.
2203
2204 2020-04-14 Patrick Palka <ppalka@redhat.com>
2205
2206 PR c++/85278
2207 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2208 ampersand if it's an rvalue reference type.
2209
2210 2020-04-13 Martin Sebor <msebor@redhat.com>
2211
2212 PR c/92326
2213 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2214 printing array bound for flexible array members.
2215
2216 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2217
2218 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2219 define, per n4861.
2220
2221 2020-04-02 Richard Biener <rguenther@suse.de>
2222
2223 PR c/94392
2224 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2225 for -O2 and C++11 or newer.
2226
2227 2020-03-28 Patrick Palka <ppalka@redhat.com>
2228
2229 * c.opt: Add -fconcepts-diagnostics-depth.
2230
2231 2020-03-27 Martin Sebor <msebor@redhat.com>
2232
2233 PR c++/94346
2234 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2235 to decl_attributes. Make handling of different kinds of entities
2236 more robust.
2237
2238 2020-03-27 Martin Sebor <msebor@redhat.com>
2239
2240 PR c++/94098
2241 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2242 here.
2243
2244 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2245
2246 PR c++/91993
2247 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2248 result being COMPOUND_EXPRs, skip to ultimate rhs.
2249
2250 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2251
2252 PR middle-end/94072
2253 * c-common.c (c_common_type_for_mode): Before using a registered
2254 built-in type, check that the vectorness of the type matches
2255 the vectorness of the mode.
2256
2257 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2258
2259 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2260 issue in a diagnostic message.
2261
2262 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2263
2264 * c.opt: Avoid redundancy in the help text.
2265
2266 2020-03-02 Marek Polacek <polacek@redhat.com>
2267
2268 PR c++/93958 - add missing -std=gnu++20.
2269 * c.opt: Add -std=gnu++20.
2270
2271 2020-03-01 Martin Sebor <msebor@redhat.com>
2272
2273 PR c++/92721
2274 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2275 (handle_access_attribute): Same.
2276
2277 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2278
2279 PR c/93858
2280 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2281 "did you mean" hint in diagnostics.
2282
2283 2020-02-15 Jason Merrill <jason@redhat.com>
2284
2285 * c.opt: Add -std=c++20.
2286
2287 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2288
2289 * c-ada-spec.c: Include bitmap.h.
2290 (dump_ada_double_name): Rename into...
2291 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2292 (dump_ada_array_type): Adjust to above renaming. Robustify.
2293 (dump_nested_types_1): New function copied from... Add dumped_types
2294 parameter and pass it down to dump_nested_type.
2295 (dump_nested_types): ...this. Remove parent parameter. Just call
2296 dump_nested_types_1 on an automatic bitmap.
2297 (dump_nested_type): Add dumped_types parameter.
2298 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2299 Adjust recursive calls and adjust to above renaming.
2300 (dump_ada_declaration): Adjust call to dump_nested_types.
2301 Tidy up and adjust to above renaming.
2302 (dump_ada_specs): Initialize and release bitmap obstack.
2303
2304 2020-02-10 Martin Sebor <msebor@redhat.com>
2305
2306 PR c/93640
2307 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2308
2309 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR other/93641
2312 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2313 Remove useless extra test.
2314
2315 2020-02-03 Julian Brown <julian@codesourcery.com>
2316 Tobias Burnus <tobias@codesourcery.com>
2317
2318 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2319
2320 2020-01-29 Jason Merrill <jason@redhat.com>
2321
2322 PR c++/89357
2323 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2324
2325 2020-01-23 Jason Merrill <jason@redhat.com>
2326
2327 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2328
2329 2020-01-23 Martin Sebor <msebor@redhat.com>
2330
2331 PR c/84919
2332 * c-common.c (check_function_arguments): Avoid overlap checking
2333 of sprintf functions.
2334
2335 2020-01-22 Jason Merrill <jason@redhat.com>
2336
2337 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2338 PR c++/40752
2339 * c-warn.c (conversion_warning): Check operands only after checking
2340 the whole expression. Don't check second operand of + for sign.
2341
2342 2020-01-21 Jason Merrill <jason@redhat.com>
2343 Manuel López-Ibáñez <manu@gcc.gnu.org>
2344
2345 PR c++/40752 - useless -Wconversion with short +=.
2346 * c.opt (-Warith-conversion): New.
2347 * c-warn.c (conversion_warning): Recurse for operands of
2348 operators. Only warn about the whole expression with
2349 -Warith-conversion.
2350
2351 2020-01-21 Jason Merrill <jason@redhat.com>
2352
2353 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2354 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2355
2356 2020-01-20 Nathan Sidwell <nathan@acm.org>
2357
2358 PR preprocessor/80005
2359 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2360
2361 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2362
2363 * c-common.c (co_await, co_yield, co_return): New.
2364 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2365 RID_CO_RETURN): New enumeration values.
2366 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2367 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2368 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2369 * c.opt (fcoroutines): New command-line switch.
2370
2371 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2372
2373 * c-format.c (local_event_ptr_node): New.
2374 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2375 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2376 * c-format.h (T_EVENT_PTR): New define.
2377
2378 2020-01-10 Martin Sebor <msebor@redhat.com>
2379
2380 PR c/93132
2381 * c-attribs.c (append_access_attrs): Validate against the translated
2382 access string rather than the human-readable representation.
2383
2384 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2385
2386 Update copyright years.
2387
2388 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2389
2390 * c-ada-spec.h (decl_sloc): Delete.
2391 * c-ada-spec.c (decl_sloc): Make static.
2392
2393 2019-12-19 Julian Brown <julian@codesourcery.com>
2394
2395 * c-common.h (c_omp_map_clause_name): Add prototype.
2396 * c-omp.c (c_omp_map_clause_name): New function.
2397 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2398 PRAGMA_OACC_CLAUSE_DETACH.
2399
2400 2019-12-19 Julian Brown <julian@codesourcery.com>
2401 Maciej W. Rozycki <macro@codesourcery.com>
2402 Tobias Burnus <tobias@codesourcery.com>
2403 Thomas Schwinge <thomas@codesourcery.com>
2404
2405 * c-pragma.h (pragma_omp_clause): Add
2406 PRAGMA_OACC_CLAUSE_NO_CREATE.
2407
2408 2019-12-17 Martin Sebor <msebor@redhat.com>
2409
2410 PR c++/61339
2411 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2412
2413 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2414
2415 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2416 implementation.
2417 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2418
2419 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2420
2421 * c-format.c (range_label_for_format_type_mismatch::get_text):
2422 Replace label_text ctor called with true with label_text::take.
2423
2424 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2425
2426 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2427 initial newline from expected outputs.
2428 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2429 call to diagnostic_show_locus.
2430
2431 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2432
2433 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2434 now.
2435
2436 2019-12-05 Marek Polacek <polacek@redhat.com>
2437 Jakub Jelinek <jakub@redhat.com>
2438
2439 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2440 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2441
2442 2019-12-05 Marek Polacek <polacek@redhat.com>
2443
2444 PR c++/92271 - make __is_same alias for __is_same_as.
2445 * c-common.c: Add __is_same, an alias for __is_same_as.
2446
2447 2019-12-03 Marek Polacek <polacek@redhat.com>
2448
2449 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2450 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2451 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2452
2453 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2454
2455 * c-attribs.c (handle_symver_attribute): New function
2456 (c_common_attributes): Add symver.
2457
2458 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2459
2460 * c-common.c (pointer_int_sum): Use verify_type_context to check
2461 whether the target allows pointer arithmetic for the types involved.
2462 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2463 to check whether the target allows sizeof and alignof operations
2464 for the types involved.
2465
2466 2019-11-27 Jason Merrill <jason@redhat.com>
2467
2468 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2469
2470 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2471
2472 PR c++/61414
2473 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2474 ENUMERAL_TYPEs.
2475
2476 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2477
2478 PR c/91985
2479 * c-common.c (c_common_type_for_mode): Handle decimal
2480 floating-point types being NULL_TREE.
2481 * c-format.c (get_format_for_type_1): Handle specified types being
2482 NULL_TREE.
2483 * c-lex.c (interpret_float): Give an error for decimal
2484 floating-point constants when decimal floating-point not
2485 supported.
2486
2487 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2488
2489 PR middle-end/83859
2490 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2491 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2492 group warning with inform together.
2493 (handle_access_attribute): Formatting fix.
2494
2495 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2496
2497 PR c/90677
2498 * c-common.h (identifier_global_tag): Declare.
2499 * c-format.c (get_pointer_to_named_type): Renamed to ...
2500 (get_named_type): ... this. Use identifier_global_tag instead of
2501 identifier_global_value, handle the return value being a TYPE_P.
2502 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2503 to call get_named_type instead. Formatting fixes.
2504
2505 Implement P1902R1, Missing feature-test macros 2017-2019.
2506 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2507 and __cpp_generic_lambdas for -std=c++2a. Define
2508 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2509 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2510 __cpp_concepts for -std=c++2a.
2511
2512 2019-11-22 Martin Sebor <msebor@redhat.com>
2513
2514 PR middle-end/83859
2515 * c-attribs.c (handle_access_attribute): New function.
2516 (c_common_attribute_table): Add new attribute.
2517 (get_argument_type): New function.
2518 (append_access_attrs): New function.
2519 (get_nonnull_operand): Rename...
2520 (get_attribute_operand): ...to this.
2521 * c-common.c (get_nonnull_operand): Rename...
2522 (get_attribute_operand): ...to this.
2523
2524 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2525
2526 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2527 of warning.
2528
2529 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2530
2531 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2532 warning for standard attributes mixed with fallthrough attributes.
2533
2534 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2535
2536 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2537 * c-common.h (handle_fallthrough_attribute): Declare.
2538
2539 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2540
2541 * c-attribs.c (handle_deprecated_attribute): Remove static.
2542 * c-common.h (handle_deprecated_attribute): Declare.
2543
2544 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2545
2546 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2547 char for C.
2548
2549 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2550
2551 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2552 valid vendors.
2553
2554 * c-omp.c (c_omp_check_context_selector): Handle name lists
2555 containing string literals. Don't diagnose atomic_default_mem_order
2556 with multiple props.
2557
2558 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2559
2560 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2561 NORM_MAX constants. Update call to get_max_float.
2562 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2563 constants.
2564
2565 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2566
2567 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2568 (dump_forward_type): Do not generate a declaration for function types.
2569 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2570 of the component type if it is declared in another file.
2571
2572 2019-11-12 Martin Liska <mliska@suse.cz>
2573
2574 * c-opts.c (c_common_post_options):
2575 Use SET_OPTION_IF_UNSET.
2576
2577 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2578 Frederik Harwath <frederik@codesourcery.com>
2579
2580 gcc/c-family/
2581 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2582 constant.
2583 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2584
2585 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2586
2587 * c-common.h (gnu_vector_type_p): New function.
2588 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2589 vectors to satisfy gnu_vector_type_p.
2590 (c_build_vec_convert): Likewise __builtin_convertvector.
2591 (convert_vector_to_array_for_subscript): Likewise when applying
2592 implicit vector to array conversion.
2593 (scalar_to_vector): Likewise when converting vector-scalar
2594 operations to vector-vector operations.
2595
2596 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2597
2598 * c.opt (Wold-style-definition): Initialize to -1.
2599 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2600 to flag_isoc2x if not set explicitly.
2601
2602 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2603
2604 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2605
2606 2019-11-05 Jason Merrill <jason@redhat.com>
2607
2608 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2609 -fconcepts.
2610
2611 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2612
2613 * c-opts.c (c_common_post_options): Update
2614 latest_abi_version.
2615
2616 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2617
2618 * c-common.h (c_omp_get_context_selector): Remove.
2619 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2620 and renamed to omp_get_context_selector.
2621
2622 * c-omp.c (c_omp_mark_declare_variant): Use
2623 omp_context_selector_set_compare.
2624
2625 PR c++/88335 - Implement P1073R3: Immediate functions
2626 * c-common.h (enum rid): Add RID_CONSTEVAL.
2627 * c-common.c (c_common_reswords): Add consteval.
2628
2629 2019-11-01 Martin Sebor <msebor@redhat.com>
2630
2631 PR middle-end/91679
2632 PR middle-end/91647
2633 PR middle-end/91463
2634 PR middle-end/92312
2635 * c-pretty-print.c (direct_abstract_declarator): Print
2636 bound in zero-length arrays.
2637 * c.opt (-Wzero-length-bounds): New option.
2638
2639 2019-10-30 Nathan Sidwell <nathan@acm.org>
2640
2641 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2642 macros.
2643
2644 2019-10-28 Martin Sebor <msebor@redhat.com>
2645
2646 PR c/66970
2647 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2648 even when only preprocessing.
2649 * c-common.h (names_builtin_p): Declare new function.
2650 * c-lex.c (init_c_lex): Set has_builtin.
2651 (c_common_has_builtin): Define a new function.
2652 * c-ppoutput.c (init_pp_output): Set has_builtin.
2653
2654 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2655
2656 * c-common.h (c_omp_context_selector_matches): Remove.
2657 * c-omp.c (c_omp_context_selector_matches): Remove.
2658 * c-attribs.c (c_common_attribute_table): Add
2659 "omp declare target {host,nohost,block}" attributes.
2660
2661 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2662
2663 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2664
2665 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2666
2667 * c-common.h (user_facing_original_type_p): Declare.
2668 * c-common.c: Include c-spellcheck.h.
2669 (user_facing_original_type_p): New function.
2670
2671 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2672
2673 * c-common.h (c_omp_mark_declare_variant,
2674 c_omp_context_selector_matches): Declare.
2675 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2676 and hsa-common.h.
2677 (c_omp_get_context_selector): Support second argument NULL.
2678 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2679 functions.
2680 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2681 attribute, add "omp declare variant base" and
2682 "omp declare variant variant" attributes.
2683
2684 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2685
2686 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2687 CppReason(CPP_W_C11_C2X_COMPAT).
2688
2689 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2690
2691 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2692 _Decimal64 and _Decimal128.
2693
2694 2019-10-10 Joseph Myers <joseph@codesourcery.com>
2695
2696 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2697 types if DFP not supported.
2698
2699 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2700
2701 * c-common.h (c_omp_check_context_selector,
2702 c_omp_get_context_selector): Declare.
2703 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2704 in diagnostic message.
2705 (c_omp_check_context_selector, c_omp_get_context_selector): New
2706 functions.
2707 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2708 attribute.
2709 (handle_omp_declare_variant_attribute): New function.
2710
2711 2019-10-09 Martin Sebor <msebor@redhat.com>
2712
2713 PR tree-optimization/90879
2714 * c.opt (-Wstring-compare): New option.
2715
2716 2019-10-08 Andrew Sutton <asutton@lock3software.com>
2717 Jason Merrill <jason@redhat.com>
2718
2719 Update the concepts implementation to conform to the C++20
2720 specification, improve compile times, and generally clean up
2721 the implementation.
2722
2723 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2724 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2725 * c.opt: Add -Wconcepts-ts.
2726 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2727 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2728 (set_std_cxx2a): Enable concepts by default.
2729
2730 2019-10-08 Joseph Myers <joseph@codesourcery.com>
2731
2732 * c-opts.c (c_common_post_options): Set
2733 -fno-fp-int-builtin-inexact for C2X.
2734
2735 2019-10-05 Jakub Jelinek <jakub@redhat.com>
2736
2737 PR c++/91369 - Implement P0784R7: constexpr new
2738 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2739 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2740
2741 2019-10-04 Joseph Myers <joseph@codesourcery.com>
2742
2743 PR c/82752
2744 * c-format.c (C_STD_VER): Handle C2x.
2745 (C_STD_NAME): Likewise.
2746 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2747 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2748 modifier allowed and 'p' flag.
2749 * c-format.h (enum format_std_version): Add STD_C2X.
2750 (struct format_char_info): Mention 'p' in comment on flags2.
2751
2752 2019-10-01 David Malcolm <dmalcolm@redhat.com>
2753
2754 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2755 calling diagnostic_show_locus, rather than destroying it afterwards.
2756
2757 2019-10-01 Jakub Jelinek <jakub@redhat.com>
2758
2759 PR c++/91925
2760 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2761 with NULL DECL_FIELD_OFFSET.
2762
2763 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2764
2765 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2766 has a type name, use it in preference to the __vector syntax.
2767
2768 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2769
2770 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2771 two spaces between a comma and "...".
2772
2773 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2774
2775 PR c++/88203
2776 * c-common.h (c_omp_predefined_variable): Declare.
2777 * c-omp.c (c_omp_predefined_variable): New function.
2778 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2779 for predefined variables.
2780
2781 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2782
2783 * c-common.h (build_function_call_vec): Take the original
2784 function decl as an optional final parameter.
2785 (check_builtin_function_arguments): Take the original function decl.
2786 * c-common.c (check_builtin_function_arguments): Likewise.
2787 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2788 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2789
2790 2019-09-15 Jason Merrill <jason@redhat.com>
2791
2792 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2793 fold_for_warn in "|| mask" warning.
2794
2795 2019-09-10 Martin Liska <mliska@suse.cz>
2796
2797 * c.opt: Use newly added WarnRemoved.
2798
2799 2019-09-09 Martin Liska <mliska@suse.cz>
2800
2801 * c.opt: Update comment of removed
2802 options that are preserved only for backward
2803 compatibility.
2804
2805 2019-09-06 Martin Liska <mliska@suse.cz>
2806
2807 PR c++/91125
2808 * c-common.c: Remove definition of flag_use_repository.
2809 * c-common.h: Likewise.
2810 * c-opts.c (c_common_handle_option):
2811 Do not handle OPT_frepo option.
2812 * c.opt: Mark the option with Deprecated.
2813
2814 2019-09-04 Marek Polacek <polacek@redhat.com>
2815
2816 * c.opt (fdeduce-init-list): Ignored.
2817
2818 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2819
2820 PR c/78736
2821 * c.opt (Wenum-conversion): New option.
2822
2823 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2824
2825 * c-attribs.c (handle_section_attribute): Call the
2826 handle_generic_attribute target hook after performing target
2827 independent processing.
2828 (handle_noinit_attribute): Likewise.
2829
2830 2019-09-03 Ian Lance Taylor <iant@golang.org>
2831
2832 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2833 when using -fgo-dump-spec.
2834
2835 2019-09-02 Martin Liska <mliska@suse.cz>
2836
2837 PR c++/91155
2838 * c-common.c (fname_as_string): Use cxx_printable_name for
2839 __PRETTY_FUNCTION__ same as was used before r265711.
2840
2841 2019-08-28 Marek Polacek <polacek@redhat.com>
2842
2843 Implement P1152R4: Deprecating some uses of volatile.
2844 PR c++/91361
2845 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2846 default for C++2a, unless -Wno-deprecated.
2847 * c.opt (Wvolatile): New warning.
2848
2849 2019-08-28 Marek Polacek <polacek@redhat.com>
2850
2851 PR c++/91360 - Implement C++20 P1143R2: constinit.
2852 * c-common.c (c_common_reswords): Add constinit and __constinit.
2853 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2854 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2855 RID_LAST_CXX20.
2856 (D_CXX20): Define.
2857 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2858 * c-format.c (cxx_keywords): Add "constinit".
2859 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2860
2861 2019-08-27 Jakub Jelinek <jakub@redhat.com>
2862
2863 PR c++/91415
2864 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2865 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2866 like COMPOUND_EXPR rather than normal expression.
2867
2868 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2869
2870 PR pch/61250
2871 * c-lex.c (c_lex_with_flags): Don't call
2872 c_common_no_more_pch () from here.
2873
2874 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2875
2876 PR middle-end/91283
2877 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2878 instead of flag_excess_precision_cmdline.
2879 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2880 * c-opts.c (c_common_post_options): Likewise.
2881
2882 2019-08-22 Martin Sebor <msebor@redhat.com>
2883
2884 PR middle-end/91490
2885 * c-common.c (braced_list_to_string): Add argument and overload.
2886 Handle flexible length arrays and unions.
2887
2888 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2889
2890 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2891 function declarations where arguments are missing. Rename variables.
2892
2893 2019-08-15 Richard Biener <rguenther@suse.de>
2894
2895 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2896 enabled, define __SIZETYPE__.
2897
2898 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2899
2900 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2901 exclusion with "section" attribute.
2902 (attr_noinit_exclusions): New table.
2903 (handle_noinit_attribute): New function.
2904
2905 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2906
2907 PR middle-end/91421
2908 * c-common.c (resolve_overloaded_builtin): Use
2909 copy_decl_built_in_function.
2910
2911 2019-08-13 Martin Sebor <msebor@redhat.com>
2912
2913 PR c/80619
2914 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2915 (asm_fprintf_length_spec): Same.
2916 * c-format.h (format_lengths): Add FMT_LEN_w.
2917
2918 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2919
2920 * c-pragma.h (enum pragma_omp_clause): Add
2921 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2922
2923 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2924
2925 * c-pragma.h (enum pragma_omp_clause): Add
2926 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2927 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2928 enumeration value.
2929
2930 2019-08-05 Marek Polacek <polacek@redhat.com>
2931
2932 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2933 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2934 default for C++2a, unless -Wno-deprecated.
2935 * c.opt (Wcomma-subscript): New warning.
2936
2937 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2938
2939 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2940 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2941 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2942 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2943 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2944 constructs with the loop construct.
2945
2946 2019-07-13 Jakub Jelinek <jakub@redhat.com>
2947
2948 PR c/91149
2949 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2950 OMP_CLAUSE_REDUCTION_TASK handling.
2951
2952 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2953
2954 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2955 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2956
2957 2019-07-09 Martin Sebor <msebor@redhat.com>
2958
2959 PR c++/61339
2960 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2961 and others to class.
2962 * c-pretty-print.h: Same.
2963
2964 2019-07-09 Martin Sebor <msebor@redhat.com>
2965
2966 PR c++/61339
2967 * c-format.c (check_argument_type): Change class-key from class to
2968 struct and vice versa to match convention and avoid -Wclass-is-pod
2969 and -Wstruct-no-pod.
2970 * c-pretty-print.h: Same.
2971
2972 2019-07-03 Martin Liska <mliska@suse.cz>
2973
2974 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2975 dead assignemts.
2976
2977 2019-07-03 Jakub Jelinek <jakub@redhat.com>
2978
2979 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2980 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2981 with OMP_PARALLEL.
2982
2983 2019-07-02 qing zhao <qing.zhao@oracle.com>
2984
2985 PR preprocessor/90581
2986 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2987 * c.opt: Add new option -fmax-include-depth.
2988
2989 2019-06-26 Jason Merrill <jason@redhat.com>
2990
2991 PR c++/55442 - memory-hog with highly recursive constexpr.
2992 * c.opt (fconstexpr-loop-limit): New.
2993
2994 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2995
2996 PR sanitizer/90954
2997 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2998 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2999
3000 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3001
3002 * c-common.c (c_common_nodes_and_builtins): Define
3003 alternate "__intN__" name for "__intN" types.
3004
3005 2019-06-24 Jan Hubicka <jh@suse.cz>
3006
3007 * c-common.c (braced_lists_to_strings): Check that
3008 type is array or integer prior checking string flag.
3009
3010 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3011
3012 PR c++/90875 - added -Wswitch-outside-range option
3013 * c.opt (Wswitch-outside-range): Added new option.
3014 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3015
3016 2019-06-21 Marek Polacek <polacek@redhat.com>
3017
3018 PR c++/90953 - ICE with -Wmissing-format-attribute.
3019 * c-common.c (check_function_arguments_recurse): Use
3020 get_attribute_name.
3021 (check_missing_format_attribute): Likewise.
3022
3023 2019-06-19 Marek Polacek <polacek@redhat.com>
3024
3025 PR c++/60364 - noreturn after first decl not diagnosed.
3026 * c-attribs.c (handle_noreturn_attribute): No longer static.
3027 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3028 Declare.
3029 * c-format.c (check_function_format): Use get_attribute_name.
3030
3031 2019-06-19 Martin Sebor <msebor@redhat.com>
3032
3033 PR translation/90156
3034 * c-format.c (function_format_info::format_type): Adjust type.
3035 (function_format_info::is_raw): New member.
3036 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3037 (decode_format_attr): Adjust call to decode_format_type.
3038 Avoid a redundant call to convert_format_name_to_system_name.
3039 Avoid abbreviating the word "arguments" in a diagnostic.
3040 (format_warning_substr): New function.
3041 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3042 (finish_dollar_format_checking): Same.
3043 (check_format_info): Same.
3044 (struct baltoks_t): New.
3045 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3046 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3047 functions.
3048 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3049 maybe_diag_unbalanced_tokens.
3050 (handle_format_attribute): Spell out the word "arguments" in
3051 a diagnostic.
3052
3053 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3054
3055 PR c++/90449 - add -Winaccessible-base option.
3056 * c.opt (Winaccessible-base): New option.
3057
3058 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3059
3060 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3061 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3062 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3063 combined/composite constructs where it is not allowed. Copy over
3064 OMP_CLAUSE_REDUCTION_INSCAN.
3065
3066 2019-06-05 Martin Sebor <msebor@redhat.com>
3067
3068 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3069 (handle_alias_ifunc_attribute): Same.
3070 (handle_copy_attribute): Same.
3071 (handle_weakref_attribute): Same.
3072 (handle_nonnull_attribute): Same.
3073 * c-warn.c (warn_for_sign_compare): Same.
3074 (warn_for_restrict): Same.
3075 * c.opt: Same.
3076
3077 2019-06-05 Martin Sebor <msebor@redhat.com>
3078
3079 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3080 * c.opt (-Wformat-diag): Remove a spurious period.
3081
3082 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3083
3084 PR c/90628
3085 * c-common.c (check_builtin_function_arguments)
3086 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3087 as last argument.
3088
3089 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3090
3091 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3092
3093 2019-05-22 Martin Liska <mliska@suse.cz>
3094
3095 PR lto/90500
3096 * c-attribs.c (handle_copy_attribute): Do not copy
3097 target_clones attribute.
3098
3099 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3100
3101 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3102 * c-ada-spec.c (print_assignment_operator): New function.
3103 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3104 assignment operators declared as methods and filter out the others.
3105
3106 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3107
3108 PR c/89433
3109 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3110 "omp declare target".
3111
3112 2019-05-16 Martin Sebor <msebor@redhat.com>
3113
3114 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3115 keywords, operators, and types in diagnostics.
3116 (handle_scalar_storage_order_attribute): Same.
3117 (handle_mode_attribute): Same.
3118 (handle_visibility_attribute): Same.
3119 (handle_assume_aligned_attribute): Same.
3120 (handle_no_split_stack_attribute): Same.
3121 * c-common.c (shorten_compare): Same.
3122 (c_common_truthvalue_conversion): Same.
3123 (cb_get_source_date_epoch): Same.
3124 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3125 in diagnostics.
3126 (interpret_float): Same.
3127 * c-omp.c (c_finish_omp_for): Same.
3128 * c-opts.c (c_common_post_options): Same.
3129 * c-pch.c (c_common_pch_pragma): Same.
3130 * c-pragma.c (pop_alignment): Same.
3131 (handle_pragma_pack): Same.
3132 (apply_pragma_weak): Same.
3133 (handle_pragma_weak): Same.
3134 (handle_pragma_scalar_storage_order): Same.
3135 (handle_pragma_redefine_extname): Same.
3136 (add_to_renaming_pragma_list): Same.
3137 (maybe_apply_renaming_pragma): Same.
3138 (push_visibility): Same.
3139 (handle_pragma_visibility): Same.
3140 (handle_pragma_optimize): Same.
3141 (handle_pragma_message): Same.
3142 * c-warn.c (warn_for_omitted_condop): Same.
3143 (lvalue_error): Same.
3144
3145 2019-05-15 Richard Biener <rguenther@suse.de>
3146
3147 PR c/90474
3148 * c-common.c (c_common_mark_addressable_vec): Also mark
3149 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3150 c_mark_addressable.
3151
3152 2019-05-06 Nathan Sidwell <nathan@acm.org>
3153
3154 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3155
3156 2019-04-30 Nathan Sidwell <nathan@acm.org>
3157
3158 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3159
3160 2019-04-30 Martin Liska <mliska@suse.cz>
3161
3162 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3163 for unknown options.
3164
3165 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3166
3167 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3168 the pointer target rather than the pointer itself.
3169
3170 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3171
3172 PR c/89888
3173 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3174 arguments.
3175 (c_do_switch_warnings): Remove outside_range_p argument.
3176 * c-common.c (check_case_bounds): Removed.
3177 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3178 Don't call check_case_bounds. Fold low_value as well as high_value.
3179 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3180 Check for case labels outside of range of original type here and
3181 adjust them.
3182
3183 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3184
3185 PR translation/90041
3186 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3187 in the Warn diagnostics.
3188
3189 PR c/89946
3190 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3191 function comment. Warn if arguments of the attribute are not positive
3192 integer constants.
3193
3194 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3195
3196 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3197 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3198
3199 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3200
3201 * c-ada-spec.c (is_float128): New predicate extracted from...
3202 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3203 <REAL_TYPE>: ...here. Call it.
3204
3205 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3206
3207 PR c/89985
3208 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3209 auto_diagnostic_group. Guard inform calls by result of
3210 warning_at call.
3211
3212 2019-04-05 Marek Polacek <polacek@redhat.com>
3213
3214 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3215 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3216 of RHS.
3217
3218 2019-04-03 Jason Merrill <jason@redhat.com>
3219
3220 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3221 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3222
3223 2019-04-01 Martin Sebor <msebor@redhat.com>
3224
3225 PR c/89685
3226 * c-attribs.c (handle_copy_attribute): Handle references and
3227 non-constant expressions.
3228
3229 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3230
3231 PR c++/87481
3232 * c.opt (-fconstexpr-ops-limit=): New option.
3233
3234 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3235
3236 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3237 template param.
3238
3239 2019-03-19 Martin Sebor <msebor@redhat.com>
3240
3241 PR tree-optimization/89688
3242 * c-common.c (braced_list_to_string): Make static.
3243 (braced_lists_to_strings): Define new function.
3244 * c-common.h (braced_list_to_string): Remove.
3245 (braced_lists_to_strings): Declare.
3246
3247 2019-03-12 Martin Liska <mliska@suse.cz>
3248
3249 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3250
3251 2019-03-11 Martin Liska <mliska@suse.cz>
3252
3253 * c-opts.c (c_common_post_options): Wrap apostrophes
3254 in gcc internal format with %'.
3255
3256 2019-03-11 Martin Liska <mliska@suse.cz>
3257
3258 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3259 in a string format message and fix GNU coding style.
3260 * c-common.c (vector_types_convertible_p): Likewise.
3261 (c_build_vec_perm_expr): Likewise.
3262 * c-indentation.c (get_visual_column): Likewise.
3263 * c-opts.c (c_common_handle_option): Likewise.
3264 (c_common_post_options): Likewise.
3265 (sanitize_cpp_opts): Likewise.
3266 * c-pch.c (c_common_pch_pragma): Likewise.
3267 * c-pragma.c (handle_pragma_pack): Likewise.
3268
3269 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3270
3271 PR tree-optimization/89550
3272 * c-common.c (c_common_truthvalue_conversion): Only set
3273 TREE_NO_WARNING if warning_at returned true.
3274 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3275
3276 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3277 Martin Sebor <msebor@gmail.com>
3278
3279 * c.opt (Wmissing-attributes): Clean up doc string.
3280
3281 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3282
3283 PR c/89495
3284 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3285 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3286 checking.
3287
3288 2019-02-22 Richard Biener <rguenther@suse.de>
3289
3290 * c-pch.c (no_checksum): Remove.
3291 (pch_init): Remove assertion that executable_checksum is not
3292 all zero.
3293 (c_common_valid_pch): Likewise.
3294
3295 2019-02-18 Martin Sebor <msebor@redhat.com>
3296
3297 PR middle-end/89294
3298 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3299
3300 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3301
3302 PR c++/88680
3303 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3304 implementing -Wtype-limits.
3305
3306 2019-02-11 Martin Sebor <msebor@redhat.com>
3307
3308 PR c++/87996
3309 * c-common.c (invalid_array_size_error): New function.
3310 (valid_array_size_p): Call it. Handle size as well as type.
3311 * c-common.h (valid_constant_size_p): New function.
3312 (enum cst_size_error): New type.
3313
3314 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3315
3316 PR c/89122
3317 * known-headers.cc (get_stdlib_header_for_name): Add
3318 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3319
3320 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3321
3322 PR libstdc++/88170
3323 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3324 a C cast in pp_c_flag_gnu_v3 mode.
3325
3326 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3327
3328 PR c/86125
3329 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3330 builtin_structptr_types types even for C.
3331
3332 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3333
3334 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3335 when rhs is of array type correctly. Fix handling of nested structures.
3336 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3337 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3338 type casts within nested compound expressions.
3339
3340 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3341
3342 PR middle-end/88968
3343 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3344 variable after using BIT_FIELD_REF.
3345
3346 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3347
3348 PR c/51628
3349 PR c/88664
3350 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3351 Remove the boolean argument.
3352 * c-warn.c (check_address_of_packed_member): Renamed to ...
3353 (check_address_or_pointer_of_packed_member): This. Also
3354 warn pointer conversion.
3355 (check_and_warn_address_of_packed_member): Renamed to ...
3356 (check_and_warn_address_or_pointer_of_packed_member): This.
3357 Also warn pointer conversion.
3358 (warn_for_address_or_pointer_of_packed_member): Remove the
3359 boolean argument. Don't check pointer conversion here.
3360
3361 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3362
3363 PR inline-asm/52813
3364 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3365
3366 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3367
3368 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3369 and __cpp_nontype_template_parameter_auto. Add a comment that
3370 __cpp_template_auto is deprecated.
3371
3372 2019-01-14 Tom Honermann <tom@honermann.net>
3373
3374 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3375 * c-common.c (c_common_reswords): Add char8_t.
3376 (fix_string_type): Use char8_t for the type of u8 string literals.
3377 (c_common_get_alias_set): char8_t doesn't alias.
3378 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3379 C++.
3380 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3381 (keyword_begins_type_specifier): Add RID_CHAR8.
3382 * c-common.h (rid): Add RID_CHAR8.
3383 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3384 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3385 Define char8_type_node and char8_array_type_node.
3386 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3387 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3388 (c_cpp_builtins): Predefine __cpp_char8_t.
3389 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3390 CPP_UTF8STRING.
3391 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3392 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3393 targeting C++2a.
3394 * c.opt: Add the -fchar8_t command line option.
3395
3396 2019-01-14 Martin Sebor <msebor@redhat.com>
3397
3398 PR target/88638
3399 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3400 and issue errors if it fails.
3401 * c-common.h (valid_format_string_type_p): Declare.
3402 * c-format.c (valid_stringptr_type_p): Rename...
3403 (valid_format_string_type_p): ...to this and make extern.
3404 (handle_format_arg_attribute): Adjust to new name.
3405 (check_format_string): Same.
3406
3407 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3408
3409 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3410 Replace "may may" with "may" in warning message.
3411
3412 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3413
3414 PR c++/85052
3415 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3416 (c_build_vec_convert): Declare.
3417 * c-common.c (c_build_vec_convert): New function.
3418
3419 2019-01-04 Martin Sebor <msebor@redhat.com>
3420
3421 PR c/88546
3422 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3423 Handle C++ empty throw specification and C11 _Noreturn.
3424 (has_attribute): Also handle C11 _Noreturn.
3425
3426 2019-01-04 Martin Sebor <msebor@redhat.com>
3427
3428 PR c/88363
3429 * c-attribs.c (positional_argument): Also accept enumerated types.
3430
3431 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3432
3433 Update copyright years.
3434
3435 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3436
3437 PR c/51628
3438 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3439 * c-warn.c (check_alignment_of_packed_member): New function.
3440 (check_address_of_packed_member): Likewise.
3441 (check_and_warn_address_of_packed_member): Likewise.
3442 (warn_for_address_or_pointer_of_packed_member): Likewise.
3443 * c.opt: Add -Wno-address-of-packed-member.
3444
3445 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3446
3447 PR c++/87504
3448 * c-warn.c (get_outermost_macro_expansion): New function.
3449 (spelled_the_same_p): Use it to unwind the macro expansions, and
3450 compare the outermost macro in each nested expansion, rather than
3451 the innermost.
3452
3453 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3454
3455 PR c++/87504
3456 * c-common.h (warn_tautological_cmp): Convert 1st param from
3457 location_t to const op_location_t &.
3458 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3459 when testing for INTEGER_CST.
3460 (warn_tautological_bitwise_comparison): Convert 1st param from
3461 location_t to const op_location_t &; use it to build a
3462 binary_op_rich_location, and use this.
3463 (spelled_the_same_p): New function.
3464 (warn_tautological_cmp): Convert 1st param from location_t to
3465 const op_location_t &. Warn for macro expansions if
3466 spelled_the_same_p. Use binary_op_rich_location.
3467
3468 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3469
3470 PR c++/43064
3471 PR c++/43486
3472 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3473 (verify_tree): Handle location wrappers.
3474 (c_common_truthvalue_conversion): Strip any location wrapper.
3475 Handle CONST_DECL.
3476 (fold_offsetof): Strip any location wrapper.
3477 (complete_array_type): Likewise for initial_value.
3478 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3479 index before checking for INTEGER_CST.
3480 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3481 print parentheses around location wrappers.
3482 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3483 before checking for INTEGER_CST.
3484 (warn_tautological_bitwise_comparison): Call
3485 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3486 before checking for INTEGER_CST.
3487 (readonly_error): Strip any location wrapper.
3488 (warn_array_subscript_with_type_char): Strip location wrappers
3489 before checking for INTEGER_CST. Use the location of the index if
3490 available.
3491
3492 2018-12-06 Jason Merrill <jason@redhat.com>
3493
3494 PR c++/88136 - -Wdeprecated-copy false positives
3495 * c.opt (Wdeprecated-copy-dtor): New.
3496 (Wdeprecated-copy): Move to -Wextra.
3497
3498 2018-11-29 Martin Sebor <msebor@redhat.com>
3499
3500 PR c/88172
3501 PR testsuite/88208
3502 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3503 alignments to values less than the target requires.
3504 (has_attribute): For attribute aligned consider both the attribute
3505 and the alignment bits.
3506 * c-common.c (c_init_attributes): Optionally issue a warning for
3507 zero alignment.
3508
3509 2018-11-28 Martin Sebor <msebor@redhat.com>
3510
3511 PR c/88065
3512 PR c/87297
3513 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3514 or destination is an error.
3515
3516 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3517
3518 PR c++/88215
3519 * c-ubsan.c: Include langhooks.h.
3520 (ubsan_instrument_division): Change gcc_assert that main variants
3521 of op0 and op1 types are equal to gcc_checking_assert that the
3522 main variants are compatible types.
3523
3524 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3525
3526 * c-ada-spec.c: Include stringpool.h.
3527 (has_static_fields): Return false for incomplete types.
3528 (is_tagged_type): Likewise.
3529 (has_nontrivial_methods): Likewise.
3530 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3531 (struct overloaded_name_hash): New structure.
3532 (struct overloaded_name_hasher): Likewise.
3533 (overloaded_names): New global variable.
3534 (init_overloaded_names): New static function.
3535 (overloaded_name_p): New predicate.
3536 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3537 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3538 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3539 Remove always-true condition and dump forward types.
3540 (dump_ada_specs): Delete overloaded_names.
3541
3542 2018-11-20 Martin Sebor <msebor@redhat.com>
3543
3544 * c-attribs.c (type_for_vector_size): New function.
3545 (type_valid_for_vector_size): Same.
3546 (handle_vector_size_attribute): Move code to the functions above
3547 and call them.
3548 (validate_attribute, has_attribute): New functions.
3549 * c-common.h (has_attribute): Declare.
3550 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3551 * c-common.c (c_common_resword): Same.
3552
3553 2018-11-16 Jason Merrill <jason@redhat.com>
3554
3555 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3556 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3557
3558 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3559
3560 PR middle-end/87854
3561 * c-common.c (fix_string_type): Reject string literals larger than
3562 TYPE_MAX_VALUE (ssizetype) bytes.
3563
3564 2018-11-15 Martin Sebor <msebor@redhat.com>
3565
3566 PR c++/87541
3567 PR c++/87542
3568 * c-attribs.c (positional_argument): New function.
3569 (handle_alloc_size_attribute): Use it and simplify.
3570 (handle_alloc_align_attribute): Same.
3571 (handle_assume_aligned_attribute): Same.
3572 (handle_nonnull_attribute): Same.
3573 * c-common.c (check_function_arguments): Pass fntype to
3574 check_function_format.
3575 * c-common.h (check_function_format): Add an argument.
3576 (PosArgFlags, positional_argument): Declare new type and function.
3577 * c-format.c (decode_format_attr): Add arguments.
3578 (check_format_string, get_constant): Same.
3579 (convert_format_name_to_system_name): Adjust.
3580
3581 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3582
3583 PR other/19165
3584 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3585
3586 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3587
3588 P1236R1 - Signed integers are two's complement
3589 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3590 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3591 with in-range second operand well defined for -std=c++2a.
3592
3593 PR other/88007
3594 * c-common.c (parse_optimize_options): Allocate option string from
3595 opts_obstack rather than as GC memory. Move the allocation after
3596 warning for invalid option.
3597
3598 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3599
3600 * c-common.c (c_get_substring_location): Update for renaming of
3601 get_source_location_for_substring to get_location_within_string.
3602 * c-lex.c: Replace "source_location" with "location_t".
3603 * c-opts.c: Likewise.
3604 * c-ppoutput.c: Likewise.
3605
3606 2018-11-13 Martin Sebor <msebor@redhat.com>
3607
3608 PR middle-end/81824
3609 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3610 (handle_tls_model_attribute): Improve diagnostics.
3611
3612 2018-11-12 Jason Merrill <jason@redhat.com>
3613
3614 * c-cppbuiltin.c (c_cpp_builtins): Define
3615 __cpp_impl_destroying_delete.
3616
3617 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3618 __cpp_conditional_explicit.
3619
3620 2018-11-09 Martin Sebor <msebor@redhat.com>
3621
3622 PR middle-end/81824
3623 * c-attribs.c (handle_copy_attribute): New function.
3624
3625 2018-11-09 Martin Sebor <msebor@redhat.com>
3626
3627 PR c/87795
3628 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3629
3630 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3631
3632 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3633 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3634 enum omp_memory_order MEMORY_ORDER.
3635 (c_finish_omp_flush): Add MO argument.
3636 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3637 (c_finish_omp_for): Add FINAL_P argument.
3638 * c-omp.c: Include memmodel.h.
3639 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3640 OMP_TASKGROUP_CLAUSES to it.
3641 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3642 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3643 instead of OMP_ATOMIC_SEQ_CST.
3644 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3645 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3646 __atomic_thread_fence call with the given value.
3647 (check_omp_for_incr_expr): Formatting fixes.
3648 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3649 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3650 is not constant expression 1 or -1. Transform NE_EXPR loops
3651 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3652 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3653 loops too.
3654 (c_omp_split_clauses): Add support for combined
3655 #pragma omp parallel master and
3656 #pragma omp {,parallel }master taskloop{, simd} constructs.
3657 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3658 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3659 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3660 (c_omp_predetermined_sharing): Don't return
3661 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3662 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3663 PRAGMA_OMP_REQUIRES.
3664 * c-pragma.h (enum pragma_kind): Likewise.
3665 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3666 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3667
3668 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3669
3670 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3671
3672 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3673
3674 * c-format.c (local_cgraph_node_ptr_node): New variable.
3675 (gcc_dump_printf_char_table): Add entry for %C.
3676 (get_pointer_to_named_type): New function, taken from the handling
3677 code for "gimple *" from...
3678 (init_dynamic_diag_info): ...here. Add handling for
3679 "cgraph_node *".
3680 * c-format.h (T_CGRAPH_NODE): New.
3681
3682 2018-10-19 Jason Merrill <jason@redhat.com>
3683
3684 * c-cppbuiltin.c (c_cpp_builtins): Add
3685 __cpp_nontype_template_parameter_class.
3686
3687 2018-10-31 Nathan Sidwell <nathan@acm.org>
3688
3689 * c-opts.c (c_finish_options): Force command line macro
3690 location. Refactor to avoid repeating main debug hook.
3691 (push_command_line_include): Clarify comment.
3692
3693 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3694
3695 2018-10-30 Martin Sebor <msebor@redhat.com>
3696
3697 PR middle-end/87041
3698 * c-format.c (check_format_types): Avoid diagnosing null pointer
3699 arguments to printf-family of functions.
3700
3701 2018-10-30 Marek Polacek <polacek@redhat.com>
3702
3703 Implement P0892R2, explicit(bool).
3704 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3705
3706 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3707
3708 * name-hint.h (name_hint::take_deferred): New member function.
3709
3710 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3711
3712 PR c++/56856
3713 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3714 argument.
3715 (check_function_restrict): Rename param "argarray" to
3716 "unfolded_argarray", and make a copy named "argarray", calling
3717 fold_for_warn on each argument.
3718 (check_function_arguments): Add note about responsibility for
3719 folding the arguments.
3720
3721 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3722
3723 * c-common.c (flag_isoc2x): New variable.
3724 * c-common.h (clk_c): Update comment to reference C2X.
3725 (flag_isoc99, flag_isoc11): Update comments to reference future
3726 standard versions in general.
3727 (flag_isoc2x): Declare.
3728 * c-opts.c (set_std_c2x): New function.
3729 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3730 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3731 flag_isoc2x to 0.
3732 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3733
3734 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3735
3736 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3737 (std=iso9899:2018): Document C17 as published in 2018.
3738
3739 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3740
3741 PR c++/87364
3742 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3743
3744 2018-10-11 Will Wray <wjwray@gmail.com>
3745
3746 PR c++/87364
3747 * c-pretty-print.h (pp_c_type_cast): Prototype.
3748 (pp_c_integer_constant): Likewise.
3749 * c-pretty-print.c (pp_c_type_cast): No longer static.
3750 (pp_c_integer_constant): Likewise.
3751 (pp_c_enumeration_constant): Fix loop termination when finding
3752 name of constant. No longer returns a value. Call
3753 pp_c_integer_constant.
3754 (c_pretty_printer::constant): Update for changes to
3755 pp_c_enumeration_constant.
3756
3757 2018-10-11 Jakub Jelinek <jakub@redhat.com>
3758
3759 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3760 for no_unique_address.
3761
3762 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3763
3764 * c-common.c (c_option_controlling_cpp_error): Rename to...
3765 (c_option_controlling_cpp_diagnostic): ...this, and convert
3766 "reason" from int to enum.
3767 (c_cpp_error): Rename to...
3768 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3769 * c-common.h (c_cpp_error): Rename to...
3770 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3771 * c-opts.c (c_common_init_options): Update for renaming.
3772
3773 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3774
3775 PR c/87286
3776 * c-common.c (vector_types_compatible_elements_p): Use
3777 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3778
3779 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3780
3781 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3782 to generate constructor destructor priority warning.
3783 * c.opt (-Wprio-ctor-dtor): New option.
3784
3785 2018-10-01 Jason Merrill <jason@redhat.com>
3786
3787 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3788
3789 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3790
3791 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3792 (dump_ada_node): Add const keyword.
3793
3794 2018-09-25 Martin Liska <mliska@suse.cz>
3795
3796 * c-common.c (c_common_truthvalue_conversion):
3797 Remove Pascal from documentation.
3798
3799 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3800
3801 * c-ada-spec.c: Include diagnostic.h.
3802 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3803
3804 2018-09-19 Marek Polacek <polacek@redhat.com>
3805
3806 * c.opt (Wclass-conversion): New.
3807
3808 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3809
3810 * c-format.c (range_label_for_format_type_mismatch::get_text):
3811 Update for new param.
3812
3813 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3814
3815 * c-format.c (format_warning_at_char): Update for introduction of
3816 format_string_diagnostic_t.
3817 (format_type_warning): Likewise.
3818
3819 2018-09-17 Martin Jambor <mjambor@suse.cz>
3820
3821 PR c/63886
3822 * c.opt (Wabsolute-value): New.
3823
3824 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3825
3826 * c-common.c (complete_flexible_array_elts): New helper function.
3827 * c-common.h (complete_flexible_array_elts): Declare.
3828
3829 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3830
3831 * c-common.c (braced_list_to_string): Remove eval parameter.
3832 Add some more checks. Always create zero-terminated STRING_CST.
3833 * c-common.h (braced_list_to_string): Adjust prototype.
3834
3835 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3836
3837 PR 87091
3838 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3839 to a tri-state.
3840 (maybe_suggest_missing_token_insertion): Likewise.
3841 (maybe_add_include_fixit): Add param "override_location". If set,
3842 and source-printing is enabled, then override the rich_location's
3843 primary location with that of the insertion point for the fix-it
3844 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3845 * c-common.h (extern void maybe_add_include_fixit): Add bool
3846 param.
3847 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3848 for conversion of show_caret_p to a tri-state.
3849 * c-warn.c (warn_for_restrict): Likewise.
3850 * known-headers.cc
3851 (suggest_missing_header::~suggest_missing_header): Update call to
3852 maybe_add_include_fixit to suggest overriding the location, as it
3853 is for a note.
3854
3855 2018-08-27 Martin Liska <mliska@suse.cz>
3856
3857 * c-common.c (check_function_restrict): Use new function
3858 fndecl_built_in_p and remove check for FUNCTION_DECL if
3859 possible.
3860 (check_builtin_function_arguments): Likewise.
3861 (reject_gcc_builtin): Likewise.
3862 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3863
3864 2018-08-26 Marek Polacek <polacek@redhat.com>
3865
3866 PR c++/87029, Implement -Wredundant-move.
3867 * c.opt (Wredundant-move): New option.
3868
3869 2018-08-21 Marek Polacek <polacek@redhat.com>
3870
3871 PR c++/86981, Implement -Wpessimizing-move.
3872 * c.opt (Wpessimizing-move): New option.
3873
3874 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3875
3876 PR other/84889
3877 * c-attribs.c (common_handle_aligned_attribute): Add
3878 auto_diagnostic_group instance.
3879 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3880 * c-opts.c (c_common_post_options): Likewise.
3881 * c-warn.c (warn_logical_not_parentheses): Likewise.
3882 (warn_duplicated_cond_add_or_warn): Likewise.
3883 (warn_for_multistatement_macros): Likewise.
3884
3885 2018-08-20 Nathan Sidwell <nathan@acm.org>
3886
3887 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3888 access.
3889
3890 2018-08-17 Nathan Sidwell <nathan@acm.org>
3891
3892 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3893 field.
3894 (laxy_hex_fp_value_count): Make unsigned.
3895 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3896 manipulate the macro.
3897 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3898 cpp_define_lazily.
3899
3900 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3901
3902 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3903 (gcc_dump_printf_length_specs): New.
3904 (gcc_dump_printf_flag_pairs): New.
3905 (gcc_dump_printf_flag_specs): New.
3906 (gcc_dump_printf_char_table): New.
3907 (format_types_orig): Add entry for "gcc_dump_printf".
3908 (init_dynamic_diag_info): Set up length_char_specs and
3909 conversion_specs for gcc_dump_printf_format_type.
3910 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3911
3912 2018-08-17 Nathan Sidwell <nathan@acm.org>
3913
3914 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3915
3916 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3917 * c-cppbuiltin.c: Likewise.
3918
3919 2018-08-17 Martin Liska <mliska@suse.cz>
3920
3921 * c.opt: Remove Warn, Init and Report for options with
3922 Ignore/Deprecated flag. Warning is done automatically for
3923 Deprecated flags.
3924
3925 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3926
3927 PR c++/70693
3928 * c-common.c (selftest::c_family_tests): Call
3929 selftest::c_indentation_c_tests.
3930 * c-common.h (selftest::c_indentation_c_tests): New decl.
3931 * c-indentation.c: Include "selftest.h".
3932 (next_tab_stop): Add "tab_width" param, rather than accessing
3933 cpp_opts.
3934 (get_visual_column): Likewise. Clarify comment. Bulletproof
3935 against reading past the end of the line.
3936 (get_first_nws_vis_column): Add "tab_width" param.
3937 (detect_intervening_unindent): Likewise.
3938 (should_warn_for_misleading_indentation): Read tab width from
3939 cpp_opts and pass around.
3940 (selftest::test_next_tab_stop): New test.
3941 (selftest::assert_get_visual_column_succeeds): New function.
3942 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3943 (selftest::assert_get_visual_column_fails): New function.
3944 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3945 (selftest::test_get_visual_column): New test.
3946 (selftest::c_indentation_c_tests): New function.
3947
3948 2018-08-16 Nathan Sidwell <nathan@acm.org>
3949
3950 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3951 (store_ada_macro): Likewise.
3952 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3953 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3954
3955 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3956
3957 * c-format.c: Include "selftest-diagnostic.h" and
3958 "gcc-rich-location.h".
3959 (format_warning_at_char): Pass NULL for new label params of
3960 format_warning_va.
3961 (class indirection_suffix): New class.
3962 (class range_label_for_format_type_mismatch): New class.
3963 (format_type_warning): Move logic for generating "*" suffix to
3964 class indirection_suffix. Create "fmt_label" and "param_label"
3965 to show their types, and pass them to the
3966 format_warning_at_substring calls.
3967 (selftest::test_type_mismatch_range_labels): New test.
3968 (selftest::c_format_c_tests): Call it.
3969
3970 2018-08-13 Martin Sebor <msebor@redhat.com>
3971
3972 PR tree-optimization/71625
3973 * c-common.c (braced_list_to_string): New function.
3974 * c-common.h (braced_list_to_string): Declare it.
3975
3976 2018-08-08 Nathan Sidwell <nathan@acm.org>
3977
3978 * c-common.c (try_to_locate_new_include_inertion_point): Use
3979 linemap_included_from_linemap.
3980 * c-lex.c (fe_file_change): Use linemap_included_from.
3981 * c-ppoutput.c (pp_file_change): Likewise.
3982
3983 2018-08-01 Martin Sebor <msebor@redhat.com>
3984
3985 PR tree-optimization/86650
3986 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3987 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3988 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3989 * c-format.h (T89_G): Update to be "gimple *" rather than
3990 "gcall *".
3991 (local_gcall_ptr_node): Rename...
3992 (local_gimple_ptr_node): ...to this.
3993
3994 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3995
3996 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3997 table entries for gcc_diag_char_table, and the 'Z' entry from
3998 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3999 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4000 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4001 adding missing "Z" for this table. Remove erroneous "G" and "K"
4002 entries.
4003 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4004 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4005 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4006
4007 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4008
4009 * c-common.c (speculation_safe_resolve_call): New function.
4010 (speculation_safe_resolve_params): New function.
4011 (speculation_safe_resolve_return): New function.
4012 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4013 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4014 __HAVE_SPECULATION_SAFE_VALUE.
4015
4016 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4017
4018 * c-common.c (c_cpp_error): Remove redundant "line_table"
4019 parameter from call to rich_location::set_range.
4020 (maybe_suggest_missing_token_insertion): Likewise.
4021
4022 2018-07-20 Martin Sebor <msebor@redhat.com>
4023
4024 PR middle-end/82063
4025 * c.opt (-Warray-bounds): Remove redundant -Wall.
4026
4027 2018-07-20 Martin Sebor <msebor@redhat.com>
4028
4029 PR middle-end/82063
4030 * c-common.h (c_common_handle_option): Change function argument
4031 to HOST_WIDE_INT.
4032 * c-opts.c (c_common_init_options): Same.
4033 (c_common_handle_option): Same. Remove special handling of
4034 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4035 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4036 options to take a HOST_WIDE_INT argument and accept a byte-size
4037 suffix. Initialize.
4038 (-Wvla-larger-than): Same.
4039 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4040 (-Wno-vla-larger-than): Same.
4041
4042 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4043
4044 * c-attribs.c (c_common_attribute_table): Add
4045 "omp declare target implicit" attribute.
4046
4047 2018-07-12 Richard Biener <rguenther@suse.de>
4048
4049 PR c/86453
4050 * c-attribs.c (handle_packed_attribute): Do not build a variant
4051 type with TYPE_PACKED, instead ignore the attribute if we may
4052 not apply to the original type.
4053
4054 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4055
4056 PR c++/86443
4057 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4058 to contain TREE_LIST for both the original class iterator and the
4059 "last" helper var.
4060
4061 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4062
4063 * c-ada-spec.c (to_ada_name): Remove index parameter.
4064 (pp_ada_tree_identifier): Likewise.
4065 (dump_ada_macros): Adjust call to to_ada_name.
4066 (struct overloaded_name_hash): Delete.
4067 (struct overloaded_name_hasher): Likewise.
4068 (overloaded_names): Likewise.
4069 (compute_overloading_index): Likewise.
4070 (dump_ada_decl_name): Do not call compute_overloading_index and
4071 adjust calls to pp_ada_tree_identifier.
4072 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4073 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4074 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4075 (dump_ada_enum_type): Remove type and display_convention parameters.
4076 Adjust calls to pp_ada_tree_identifier.
4077 (dump_ada_node): Likewise and for dump_ada_structure.
4078 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4079 and tidy up.
4080 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4081 syntax.
4082 (print_constructor): Adjust call to pp_ada_tree_identifier.
4083 (print_destructor): Likewise.
4084 (dump_ada_declaration): Switch to aspect syntax.
4085 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4086 parameter with nested parameter.
4087 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4088 (dump_ada_specs): Do not delete overloaded_names table.
4089
4090 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4091
4092 PR target/86324
4093 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4094 target hook.
4095
4096 2018-07-05 Nathan Sidwell <nathan@acm.org>
4097
4098 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4099 NO_IMPLICIT_EXTERN_C.
4100
4101 2018-06-28 Martin Liska <mliska@suse.cz>
4102
4103 * cppspec.c: Include opt-suggestions.h.
4104
4105 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4106 Thomas Schwinge <thomas@codesourcery.com>
4107 Cesar Philippidis <cesar@codesourcery.com>
4108
4109 * c-pragma.h (enum pragma_omp_clause): Add
4110 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4111 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4112
4113 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4114
4115 PR c++/86210
4116 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4117 comment.
4118
4119 2018-06-18 Martin Sebor <msebor@redhat.com>
4120
4121 PR middle-end/85602
4122 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4123 nonstring.
4124
4125 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4126
4127 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4128
4129 2018-06-13 Jason Merrill <jason@redhat.com>
4130
4131 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4132 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4133 handling.
4134
4135 PR c++/86094 - wrong code with defaulted move ctor.
4136 * c-opts.c (c_common_post_options): Bump the current ABI version to
4137 13. Set warn_abi_version and flag_abi_compat_version to the current
4138 version rather than 0. Fix defaulting flag_abi_compat_version from
4139 warn_abi_version.
4140
4141 2018-06-12 Martin Sebor <msebor@redhat.com>
4142
4143 PR c/85931
4144 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4145 sizeof source and destination yields the same value.
4146
4147 2018-06-12 Martin Liska <mliska@suse.cz>
4148
4149 * c.opt: Make MPX-related options as Deprecated.
4150
4151 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4152
4153 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4154 rather than 0.
4155
4156 2018-06-08 Martin Liska <mliska@suse.cz>
4157
4158 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4159 for MPX (macros, related functions, fields in cgraph_node, ...).
4160 (handle_bnd_legacy): Likewise.
4161 (handle_bnd_instrument): Likewise.
4162 * c.opt: Likewise.
4163
4164 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4165
4166 PR c++/86068
4167 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4168 __cpp_transactional_memory to 201500 instead of 210500.
4169
4170 2018-06-06 Jason Merrill <jason@redhat.com>
4171
4172 PR c++/85710 - ICE with -Wmemset-elt-size.
4173 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4174
4175 2018-06-01 Jason Merrill <jason@redhat.com>
4176
4177 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4178 201703.
4179
4180 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4181
4182 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4183 declaration for a typedef independently of whether the declaration of
4184 the subtype is generated.
4185
4186 2018-05-31 Martin Sebor <msebor@redhat.com>
4187
4188 PR c/82063
4189 * c.opt (-Wno-alloc-size-larger-than): New option.
4190
4191 2018-04-22 David Pagan <dave.pagan@oracle.com>
4192
4193 PR c/55976
4194 * c-opts.c (c_common_post_options): Set default for warn_return_type
4195 for C++/C++ with ObjC extensions only. For C, makes it possible to
4196 differentiate between default (no option), -Wreturn-type, and
4197 -Wno-return-type.
4198
4199 2018-05-29 Jason Merrill <jason@redhat.com>
4200
4201 * c.opt (Winit-list-lifetime): New flag.
4202
4203 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4204
4205 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4206 splay_tree_delete_pointers.
4207
4208 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4209
4210 PR bootstrap/85921
4211 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4212 noinline variable to workaround broken kernel headers.
4213
4214 2018-05-18 Jason Merrill <jason@redhat.com>
4215
4216 * c.opt (Wdeprecated-copy): New flag.
4217
4218 2018-05-17 Martin Liska <mliska@suse.cz>
4219
4220 * c-warn.c (overflow_warning): Do not use
4221 space in between 'G_' and '('.
4222
4223 2018-05-09 Jason Merrill <jason@redhat.com>
4224
4225 * c-common.c (valid_array_size_p): Add complain parameter.
4226 * c-common.h: ...which defaults to true.
4227
4228 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4229
4230 PR c/85696
4231 * c-omp.c (c_omp_predetermined_sharing): Return
4232 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4233
4234 2018-05-11 Martin Liska <mliska@suse.cz>
4235
4236 PR sanitizer/85556
4237 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4238 TREE_LIST values.
4239
4240 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4241
4242 PR c++/85662
4243 * c-common.h (fold_offsetof_1): Removed.
4244 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4245 CTX argument defaulted to ERROR_MARK.
4246 * c-common.c (fold_offsetof_1): Renamed to ...
4247 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4248 argument, convert the pointer constant to TYPE and use size_binop
4249 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4250 a pointer type. Adjust recursive calls.
4251
4252 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4253
4254 PR c++/85400
4255 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4256
4257 2018-05-07 Nathan Sidwell <nathan@acm.org>
4258
4259 * c.opt (ffor-scope): Remove functionality, issue warning.
4260
4261 2018-05-03 Nathan Sidwell <nathan@acm.org>
4262
4263 * c.opt (ffriend-injection): Remove functionality, issue warning.
4264
4265 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4266
4267 PR c/84258
4268 * c-format.c (struct format_check_results): Add field
4269 "number_non_char".
4270 (check_format_info): Initialize it, and warn if encountered.
4271 (check_format_arg): Distinguish between wide char and
4272 everything else when detecting arrays of non-char.
4273
4274 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4275
4276 * c-format.c (get_corrected_substring): Update for
4277 location_get_source_line returning a char_span. Use a char_span
4278 when handling the prefix of the correction.
4279 * c-indentation.c (get_visual_column): Update for
4280 location_get_source_line returning a char_span.
4281 (get_first_nws_vis_column): Likewise.
4282
4283 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4284
4285 PR c++/84269
4286 * known-headers.cc (get_stdlib_header_for_name): Add various names
4287 from <assert.h>, <string.h>, and <memory.h>; add more names from
4288 <stdio.h>.
4289
4290 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4291
4292 PR c++/85061
4293 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4294 get_base_address of the second operand is a VAR_P, rather than the
4295 operand itself, and use gcc_checking_assert instead of gcc_assert.
4296
4297 2018-03-23 Marek Polacek <polacek@redhat.com>
4298
4299 PR c++/85045
4300 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4301 <case RDIV_EXPR>: Tweak condition.
4302
4303 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4304
4305 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4306
4307 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4308
4309 PR c/84909
4310 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4311 diagnostics.
4312
4313 PR c/84910
4314 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4315 diagnostics.
4316
4317 2018-03-16 Richard Biener <rguenther@suse.de>
4318
4319 PR c/84873
4320 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4321 unshare the possibly folded expression.
4322
4323 2018-03-15 Richard Biener <rguenther@suse.de>
4324
4325 PR c/84873
4326 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4327
4328 2018-03-13 Martin Sebor <msebor@redhat.com>
4329
4330 PR tree-optimization/84725
4331 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4332 with all three narrow character types, including their qualified forms.
4333
4334 2018-03-12 Martin Sebor <msebor@redhat.com>
4335
4336 PR tree-optimization/83456
4337 * c-common.c (check_function_restrict): Return bool.
4338 Restore checking of bounded built-in functions.
4339 (check_function_arguments): Also return the result
4340 of warn_for_restrict.
4341 * c-common.c (check_function_restrict): Return bool.
4342 * c-warn.c (warn_for_restrict): Return bool.
4343
4344 2018-03-02 Marek Polacek <polacek@redhat.com>
4345
4346 PR c++/84171
4347 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4348 is erroneous.
4349
4350 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4351
4352 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4353 function".
4354
4355 2018-03-01 Marek Polacek <polacek@redhat.com>
4356
4357 PR c++/84639
4358 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4359 alignment in computation.
4360
4361 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4362
4363 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4364 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4365
4366 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4367
4368 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4369 (is_char_array): Take a type instead of a declaration.
4370 (dump_ada_array_type): Likewise.
4371 (is_simple_enum): Minor tweak.
4372 (dump_ada_enum_type): New function extracted from...
4373 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4374 <INTEGER_TYPE>: Remove unreachable code.
4375 <RECORD_TYPE>: Likewise. Minor tweaks.
4376 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4377 <ENUMERAL_TYPE>: New case.
4378 <RECORD_TYPE>: Factor out common code.
4379 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4380 Minor tweaks. Deal with enumeral types.
4381 (dump_ada_structure): Minor tweaks.
4382
4383 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4384
4385 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4386 address for incomplete structures.
4387 (dump_forward_type): Do not bail out for incomplete structures.
4388 (dump_ada_declaration): Do not special-case incomplete structures
4389 for subtypes. Dump them as null records for types.
4390
4391 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4392
4393 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4394 (is_char_array): Fix formatting.
4395 (dump_template_types): Likewise.
4396 (dump_generic_ada_node): Rename into...
4397 (dump_ada_node): ...this.
4398 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4399 incomplete structures and not for empty structures. Do not use it
4400 when forward declarations are needed.
4401 (dump_forward_type): New function.
4402 (dump_nested_types): Remove FORWARD parameter. Do not consider
4403 TREE_VISITED and do not generate a forward declaration. Only dump
4404 original nested types for nested declaration.
4405 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4406 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4407 <RECORD_TYPE>: Do not consider TREE_VISITED.
4408 (dump_ada_declaration): Use booleans and fix formatting throughout.
4409 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4410 Call dump_forward_type instead of dump_nested_types for a typedef.
4411 Remove superfluous check and adjust call to dump_nested_types.
4412 <POINTER_TYPE>: Call dump_forward_type and fall through.
4413 (dump_ada_struct_decl): Rename into...
4414 (dump_ada_structure): ...this. Do not special-case empty structures.
4415
4416 2018-02-27 Martin Sebor <msebor@redhat.com>
4417
4418 PR c++/83871
4419 * c.opt (-Wmissing-attributes): New option.
4420
4421 2018-02-21 Martin Liska <mliska@suse.cz>
4422
4423 * c.opt (Wcatch-value=): Add IntegerRange.
4424
4425 2018-02-15 Jason Merrill <jason@redhat.com>
4426
4427 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4428
4429 2018-02-09 Nathan Sidwell <nathan@acm.org>
4430
4431 PR c/84293
4432 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4433 arg.
4434 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4435 arg. Adjust.
4436
4437 2018-02-09 Martin Sebor <msebor@redhat.com>
4438
4439 PR lto/84212
4440 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4441 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4442 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4443 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4444 (-Wuninitialized): Same.
4445
4446 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4447
4448 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4449 keyword for components.
4450
4451 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4452
4453 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4454
4455 2018-02-02 Julia Koval <julia.koval@intel.com>
4456
4457 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4458
4459 2018-01-29 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/83966
4462 * c-format.c (check_function_format): Check current_function_decl.
4463
4464 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4465
4466 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4467 argument.
4468 (LAZY_HEX_FP_VALUES_CNT): Define.
4469 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4470 values rather than just 12.
4471 (builtin_define_with_hex_fp_value): Likewise.
4472
4473 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4474
4475 PR other/70268
4476 * c.opt (-fmacro-prefix-map): New option.
4477 * c-opts.c (c_common_handle_option): Handle it.
4478 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4479 * c-ppoutput.c (init_pp_output): Likewise.
4480
4481 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4482
4483 PR c++/83814
4484 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4485
4486 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4487
4488 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4489 Skip 'f' and 'F' characters if it is true.
4490 (store_ada_macro): Minor tweak.
4491 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4492 <CPP_WSTRING>: Likewise.
4493 <CPP_STRING>: Output '&' in the buffer if not the first string.
4494 <CPP_NUMBER>: Adjust calls to dump_number.
4495
4496 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4497
4498 PR c++/43486
4499 * c-common.c: Include "selftest.h".
4500 (get_atomic_generic_size): Perform the test for integral type
4501 before the range test for any integer constant, fixing indentation
4502 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4503 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4504 (selftest::test_fold_for_warn): New function.
4505 (selftest::c_common_c_tests): New function.
4506 (selftest::c_family_tests): Call it, and
4507 selftest::c_pretty_print_c_tests.
4508 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4509 * c-format.c (check_format_arg): Convert VAR_P check to a
4510 fold_for_warn.
4511 * c-pretty-print.c: Include "selftest.h".
4512 (pp_c_cast_expression): Don't print casts for location wrappers.
4513 (selftest::assert_c_pretty_printer_output): New function.
4514 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4515 (selftest::test_location_wrappers): New function.
4516 (selftest::c_pretty_print_c_tests): New function.
4517 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4518
4519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4520 Alan Hayward <alan.hayward@arm.com>
4521 David Sherwood <david.sherwood@arm.com>
4522
4523 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4524
4525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4526 Alan Hayward <alan.hayward@arm.com>
4527 David Sherwood <david.sherwood@arm.com>
4528
4529 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4530 as polynomial.
4531
4532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4533 Alan Hayward <alan.hayward@arm.com>
4534 David Sherwood <david.sherwood@arm.com>
4535
4536 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4537 (convert_vector_to_array_for_subscript): Handle polynomial
4538 TYPE_VECTOR_SUBPARTS.
4539 (c_common_type_for_mode): Check valid_vector_subparts_p.
4540 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4541 VECTOR_CST_NELTS.
4542
4543 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4544
4545 Update copyright years.
4546
4547 2017-12-22 Mike Stump <mikestump@comcast.net>
4548 Eric Botcazou <ebotcazou@adacore.com>
4549
4550 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4551 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4552
4553 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4554
4555 PR debug/83527
4556 PR debug/83419
4557 * c-semantics.c (only_debug_stmts_after_p): New.
4558 (pop_stmt_list): Clear side effects in debug-only stmt list.
4559 Check for single nondebug stmt followed by debug stmts only.
4560
4561 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4562
4563 PR debug/83419
4564 * c-semantics.c (pop_stmt_list): Propagate side effects from
4565 single nondebug stmt to container list.
4566
4567 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4568
4569 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4570 conditions with typical order conditions.
4571
4572 2017-12-18 Marek Polacek <polacek@redhat.com>
4573
4574 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4575 not in effect.
4576
4577 2017-12-17 Martin Sebor <msebor@redhat.com>
4578
4579 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4580 an error for attribute warn_if_not_aligned.
4581
4582 2017-12-16 Martin Sebor <msebor@redhat.com>
4583
4584 PR tree-optimization/78918
4585 * c-common.c (check_function_restrict): Avoid checking built-ins.
4586 * c.opt (-Wrestrict): Include in -Wall.
4587
4588 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4589
4590 * c-attribs.c (c_common_attribute_table,
4591 c_common_format_attribute_table): Swap affects_type_identity
4592 and handler fields, adjust comments.
4593
4594 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4595
4596 * c.opt (Wcast-function-type): New warning option.
4597 * c-lex.c (get_fileinfo): Avoid warning.
4598 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4599
4600 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4601
4602 PR middle_end/79538
4603 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4604 Adjust the size of buf1 and buf2, add a new buf to avoid
4605 format-overflow warning.
4606
4607 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4608
4609 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4610 subsequent statement list.
4611
4612 2017-12-07 Martin Sebor <msebor@redhat.com>
4613
4614 PR c/81544
4615 PR c/81566
4616 * c-attribs.c (attr_aligned_exclusions): New array.
4617 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4618 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4619 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4620 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4621 (attr_warn_unused_result_exclusions): Same.
4622 (handle_hot_attribute, handle_cold_attribute): Simplify.
4623 (handle_const_attribute): Warn on function returning void.
4624 (handle_pure_attribute): Same.
4625 (handle_aligned_attribute): Diagnose conflicting attribute
4626 specifications.
4627 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4628
4629 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4630
4631 PR c/83236
4632 * c-common.c (selftest::c_family_tests): Call
4633 selftest::c_spellcheck_cc_tests.
4634 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4635 * c-spellcheck.cc: Include "selftest.h".
4636 (name_reserved_for_implementation_p): New function.
4637 (should_suggest_as_macro_p): New function.
4638 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4639 should_suggest_as_macro_p and call it.
4640 (selftest::test_name_reserved_for_implementation_p): New function.
4641 (selftest::c_spellcheck_cc_tests): New function.
4642 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4643
4644 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4645
4646 * c-spellcheck.cc: New file, taken from macro-handling code in
4647 spellcheck-tree.c.
4648 * c-spellcheck.h: New file, taken from macro-handling code in
4649 spellcheck-tree.h.
4650
4651 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4652
4653 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4654 attribute.
4655 (handle_simd_attribute): Don't check for "cilk simd function"
4656 attribute. Reindent, formatting changes.
4657
4658 2017-11-30 Julia Koval <julia.koval@intel.com>
4659
4660 * c-common.h (inv_list): Remove.
4661
4662 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4663
4664 PR sanitizer/81275
4665 * c-common.c (c_switch_covers_all_cases_p_1,
4666 c_switch_covers_all_cases_p): New functions.
4667 * c-common.h (c_switch_covers_all_cases_p): Declare.
4668
4669 2017-11-28 Julia Koval <julia.koval@intel.com>
4670 Sebastian Peryt <sebastian.peryt@intel.com>
4671
4672 * array-notation-common.c: Delete.
4673 * c-cilkplus.c: Ditto.
4674 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4675 * c-common.def (ARRAY_NOTATION_REF): Remove.
4676 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4677 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4678 c_validate_cilk_plus_loop, cilkplus_an_parts,
4679 cilk_ignorable_spawn_rhs_op,
4680 cilk_recognize_spawn): Remove.
4681 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4682 * c-omp.c: Remove CILK_SIMD check.
4683 * c-pragma.c: Ditto.
4684 * c-pragma.h: Remove CILK related pragmas.
4685 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4686 ARRAY_NOTATION_REF condition.
4687 (c_pretty_printer::expression): Ditto.
4688 * c.opt (fcilkplus): Remove.
4689 * cilk.c: Delete.
4690
4691 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4692
4693 * c-pretty-print.c (pp_c_additive_expression,
4694 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4695
4696 2017-11-21 Jakub Jelinek <jakub@redhat.com>
4697
4698 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4699
4700 PR c++/83059
4701 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4702 instead of tree_to_uhwi, formatting fix.
4703
4704 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4705
4706 PR c/81404
4707 * known-headers.cc: New file, based on material from c/c-decl.c.
4708 (suggest_missing_header): Copied as-is.
4709 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4710 heavily edited to add C++ support. Add some knowledge about
4711 <limits.h>, <stdint.h>, and <wchar.h>.
4712 * known-headers.h: Likewise.
4713
4714 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4715
4716 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4717 (lookup_name_fuzzy): Likewise. Convert return type from
4718 const char * to name_hint. Add location_t param.
4719 * name-hint.h: New header.
4720
4721 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4722
4723 PR c/66618
4724 PR c/69960
4725 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4726
4727 2017-11-16 Joseph Myers <joseph@codesourcery.com>
4728
4729 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4730 expected publication date of C17.
4731 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4732
4733 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4734
4735 PR c/81156
4736 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4737 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4738
4739 2017-11-10 Martin Sebor <msebor@redhat.com>
4740
4741 PR c/81117
4742 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4743 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4744 * c.opt (-Wstringop-truncation): New option.
4745
4746 2017-11-06 Martin Liska <mliska@suse.cz>
4747
4748 PR middle-end/82404
4749 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4750 FE.
4751 * c.opt: Set default value of warn_return_type.
4752
4753 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4754
4755 * c-common.c (binary_op_error): Update for renaming of
4756 error_at_rich_loc.
4757 (c_parse_error): Likewise.
4758 * c-warn.c (warn_logical_not_parentheses): Likewise for
4759 renaming of inform_at_rich_loc.
4760 (warn_for_restrict): Likewise for renaming of
4761 warning_at_rich_loc_n.
4762
4763 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4764
4765 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4766 * c-opts.c (set_std_c17): New function.
4767 (c_common_init_options): Use gnu17 as default C version.
4768 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4769
4770 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4771
4772 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4773 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4774 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4775 __FP_FAST_FMA<N>X.
4776
4777 2017-10-23 Marek Polacek <polacek@redhat.com>
4778
4779 PR c/82681
4780 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4781
4782 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4783
4784 * c-common.c (check_builtin_function_arguments): Also check arguments
4785 of __builtin_alloca_with_align_and_max.
4786
4787 2017-10-17 David Malcolm <dmalcolm@redhat.com>
4788
4789 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4790 rather than NULL to format_warning_va.
4791 (check_format_types): Likewise when calling format_type_warning.
4792 Remove code to extract source_ranges and source_range * in favor
4793 of just a location_t.
4794 (format_type_warning): Convert source_range * param to a
4795 location_t.
4796
4797 2017-10-13 Jakub Jelinek <jakub@redhat.com>
4798
4799 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4800 [LR]SHIFT_EXPR.
4801
4802 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4803
4804 * c-common.c (enum missing_token_insertion_kind): New enum.
4805 (get_missing_token_insertion_kind): New function.
4806 (maybe_suggest_missing_token_insertion): New function.
4807 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4808
4809 2017-10-11 Nathan Sidwell <nathan@acm.org>
4810
4811 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4812 (c_common_handle_option): Update incpath_kind names.
4813
4814 2017-10-11 Martin Liska <mliska@suse.cz>
4815
4816 PR sanitizer/82490
4817 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4818 Wattributes warning.
4819
4820 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4821
4822 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4823 operating on trees as wide_ints.
4824 * c-common.c (pointer_int_sum): Likewise.
4825 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4826 * c-warn.c (match_case_to_enum_1): Likewise.
4827 (c_do_switch_warnings): Likewise.
4828 (maybe_warn_shift_overflow): Likewise.
4829
4830 2017-10-10 Jakub Jelinek <jakub@redhat.com>
4831
4832 PR c/82437
4833 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4834 instead of wide_int::from.
4835
4836 2017-10-06 Jakub Jelinek <jakub@redhat.com>
4837
4838 PR c/82437
4839 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4840 using to_widest use wide_int with the larger of the two precisions.
4841
4842 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4843
4844 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4845 functions.
4846
4847 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4848
4849 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4850 when combining the original unconverted comparison operands.
4851
4852 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4853
4854 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4855 attribute.
4856
4857 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4858
4859 * c-ada-spec.c (to_ada_name): Add index parameter.
4860 (pp_ada_tree_identifier): Likewise.
4861 (dump_ada_macros): Adjust call to to_ada_name.
4862 (struct overloaded_name_hash): New type.
4863 (struct overloaded_name_hasher): Likewise.
4864 (overloaded_names): New hash table.
4865 (compute_overloading_index): New function.
4866 (dump_ada_decl_name): Call it and pass the result to
4867 pp_ada_tree_identifier.
4868 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4869 (dump_ada_function_declaration): Likewise.
4870 (dump_generic_ada_node): Likewise.
4871 (print_constructor): Likewise.
4872 (print_destructor): Likewise.
4873 (dump_ada_specs): Delete overloaded_names table.
4874
4875 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4876
4877 * c-ada-spec.c (max_ada_macros): Move around.
4878 (store_ada_macro_index): Likewise.
4879 (source_file): Rename into...
4880 (macro_source_file): ...this.
4881 (count_ada_macro): Move around.
4882 (store_ada_macro): Likewise.
4883 (compare_macro): Likewise.
4884 (print_ada_macros): Merge in...
4885 (dump_ada_macros): ...this.
4886 (source_file_base): Rename into...
4887 (current_source_file): ...this.
4888 (print_comment): Move around.
4889 (dump_ada_nodes): Call dump_ada_declaration directly.
4890 (struct with): Change type of limited field to bool.
4891 (append_withs): Change type of limited_access parameter to bool.
4892 (pp_ada_tree_identifie): Likewise.
4893 (dump_ada_decl_nam): Likewise.
4894 (dump_generic_ada_node): Likewise. Do not print the return type.
4895 (to_ada_name): Change type of space_found parameter to bool.
4896 (dump_ada_function_declaration): Return void and change type of
4897 parameters to bool. Also print the return type for a function.
4898 (print_ada_methods): Rename into...
4899 (dump_ada_methods): ...this.
4900 (print_ada_declaration): Rename into ...
4901 (dump_ada_declaration): ...this. Do not print the return type.
4902 (print_ada_struct_decl): Rename into...
4903 (dump_ada_struct_decl): ...this.
4904
4905 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4906
4907 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4908 rather than DECL_INITIAL.
4909 (common_handle_aligned_attribute): Likewise.
4910
4911 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
4912
4913 * c.opt (gen-decls): Add RejectNegative.
4914
4915 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4916 Jakub Jelinek <jakub@redhat.com>
4917
4918 Add support for -std=c++2a.
4919 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4920 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4921 * c-opts.c (set_std_cxx2a): New.
4922 (c_common_handle_option): Set options when -std=c++2a is enabled.
4923 (c_common_post_options): Adjust comments.
4924 (set_std_cxx14, set_std_cxx17): Likewise.
4925
4926 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4927
4928 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4929 message for non-uniform endianness and issue a warning in C++.
4930
4931 2017-09-15 Jakub Jelinek <jakub@redhat.com>
4932
4933 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4934 (Wc++17-compat): Change from undocumented alias to option.
4935 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4936 change C++1z to C++17 in description.
4937 (std=c++1z, std=gnu++1z): Change from option to undocumented
4938 deprecated alias.
4939 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4940 Adjust description.
4941 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4942 * c-opts.c (set_std_cxx1z): Rename to ...
4943 (set_std_cxx17): ... this.
4944 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4945 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
4946 caller.
4947 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4948 comments.
4949
4950 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4951
4952 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4953 function alignment if warn_if_not_aligned_p is true.
4954
4955 2017-09-12 Nathan Sidwell <nathan@acm.org>
4956
4957 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4958 resort_sorted_fields): Move to c/c-decl.c.
4959 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4960 (struct sorted_fields_type): Move to c/c-lang.h.
4961
4962 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
4963
4964 PR c++/81852
4965 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4966
4967 2017-09-04 Marek Polacek <polacek@redhat.com>
4968
4969 PR c/81783
4970 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4971 (warn_tautological_cmp): Call it.
4972
4973 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
4974
4975 * c-opts.c (c_common_finish): Write dependency information even if
4976 there are errors.
4977
4978 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4979
4980 PR c/81887
4981 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4982 (omp_pragmas_simd): ... here.
4983 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4984 create new clauses list containing just simd clause.
4985
4986 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4987 Alan Hayward <alan.hayward@arm.com>
4988 David Sherwood <david.sherwood@arm.com>
4989
4990 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4991 into scalar_mode_supported_p call.
4992 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4993
4994 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4995 Alan Hayward <alan.hayward@arm.com>
4996 David Sherwood <david.sherwood@arm.com>
4997
4998 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4999 for the mode iterator.
5000
5001 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5002 Alan Hayward <alan.hayward@arm.com>
5003 David Sherwood <david.sherwood@arm.com>
5004
5005 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5006 * c-common.c (c_build_vec_perm_expr): Likewise.
5007
5008 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5009 Alan Hayward <alan.hayward@arm.com>
5010 David Sherwood <david.sherwood@arm.com>
5011
5012 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5013
5014 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5015 Alan Hayward <alan.hayward@arm.com>
5016 David Sherwood <david.sherwood@arm.com>
5017
5018 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5019 before calling targetm.addr_space.valid_pointer_mode.
5020
5021 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5022 Alan Hayward <alan.hayward@arm.com>
5023 David Sherwood <david.sherwood@arm.com>
5024
5025 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5026
5027 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5028 Alan Hayward <alan.hayward@arm.com>
5029 David Sherwood <david.sherwood@arm.com>
5030
5031 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5032 iterators.
5033 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5034
5035 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5036 Alan Hayward <alan.hayward@arm.com>
5037 David Sherwood <david.sherwood@arm.com>
5038
5039 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5040 case statements.
5041
5042 2017-08-29 Martin Liska <mliska@suse.cz>
5043
5044 PR other/39851
5045 * c-common.c (parse_optimize_options): Add argument to function
5046 call.
5047 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5048
5049 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5050
5051 * c-lex.c (interpret_float): Use token location
5052 when building an EXCESS_PRECISION_EXPR.
5053
5054 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5055
5056 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5057 it to check_function_format.
5058 * c-common.h (check_function_arguments): Add vec<location_t> *
5059 param.
5060 (check_function_format): Likewise.
5061 * c-format.c (struct format_check_context): Add field "arglocs".
5062 (check_function_format): Add param "arglocs"; pass it to
5063 check_format_info.
5064 (check_format_info): Add param "arglocs"; use it to initialize
5065 new field of format_ctx.
5066 (check_format_arg): Pass format_ctx->arglocs to new param of
5067 check_format_info_main.
5068 (class argument_parser): New field "arglocs".
5069 (argument_parser::argument_parser): Add "arglocs_" param and use
5070 it to initialize new field.
5071 (argument_parser::check_argument_type): Pass new arglocs field to
5072 check_format_types.
5073 (check_format_info_main): Add param "arglocs", and use it when
5074 constructing arg_parser.
5075 (check_format_types): Add param "arglocs"; use it if non-NULL when
5076 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5077
5078 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5079
5080 PR c/53037
5081 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5082 (c_common_attribute_table): Add warn_if_not_aligned.
5083 (handle_aligned_attribute): Renamed to ...
5084 (common_handle_aligned_attribute): Remove argument, name, and add
5085 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5086 (handle_aligned_attribute): New.
5087 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5088
5089 2017-08-14 Martin Sebor <msebor@redhat.com>
5090
5091 PR c/81117
5092 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5093 (handle_nonstring_attribute): New function.
5094
5095 2017-08-14 Martin Sebor <msebor@redhat.com>
5096
5097 PR c/81117
5098 * c-format.h (T89_G): New macro.
5099 * c-format.c (local_gcall_ptr_node): New variable.
5100 (init_dynamic_diag_info): Initialize it.
5101
5102 2017-08-11 Martin Liska <mliska@suse.cz>
5103
5104 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5105 TARGET_SUPPORTS_ALIASES.
5106
5107 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5108
5109 * c-common.c (c_parse_error): Add rich_location * param, using it
5110 rather implicitly using input_location.
5111 * c-common.h (c_parse_error): Add rich_location * param.
5112
5113 2017-08-09 Marek Polacek <polacek@redhat.com>
5114
5115 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5116 (c_common_truthvalue_conversion): Likewise.
5117 * c-omp.c (c_finish_omp_atomic): Likewise.
5118 * c-common.h (build_binary_op): Update declaration.
5119
5120 2017-08-08 Martin Liska <mliska@suse.cz>
5121
5122 * c-ada-spec.c: Include header files.
5123 * c-ubsan.c: Likewise.
5124 * c-warn.c: Likewise.
5125
5126 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5127
5128 PR c/69389
5129 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5130
5131 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5132
5133 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5134 (print_ada_methods): Likewise.
5135 (print_ada_declaration): Likewise.
5136
5137 2017-08-07 Martin Liska <mliska@suse.cz>
5138
5139 * array-notation-common.c: Add new includes.
5140 * c-format.c( handle_format_attribute): Canonicalize a format
5141 function name.
5142 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5143 attribute.
5144 * c-pretty-print.c: Add new include.
5145
5146 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5147
5148 * c-ada-spec.c (has_static_fields): Look only into variables.
5149 (print_constructor): Add TYPE parameter and use it for the name.
5150 (print_destructor): Likewise.
5151 (print_ada_declaration): Adjust to new constructor/destructor names.
5152 Adjust calls to print_constructor and print_destructor.
5153 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5154 Look only into variables in the final loop.
5155
5156 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5157
5158 * c-ada-spec.c (has_static_fields): Look only into fields.
5159 (dump_generic_ada_node): Small tweak.
5160 (dump_nested_types): Look only into fields.
5161 (print_ada_declaration): Look only into methods. Small tweak.
5162 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5163
5164 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5165
5166 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5167 (dump_ada_function_declaration): Likewise.
5168 (dump_generic_ada_node): Likewise.
5169 (print_ada_declaration): Add support for const-qualified variables.
5170
5171 2017-07-31 Martin Liska <mliska@suse.cz>
5172
5173 PR sanitize/81530
5174 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5175 Guard condition with flag_sanitize_p also with current_function_decl
5176 non-null equality.
5177 (ubsan_maybe_instrument_reference_or_call): Likewise.
5178
5179 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5180
5181 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5182
5183 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5184
5185 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5186 for enumeral types.
5187 (print_ada_declaration): Add missing guard for record types.
5188
5189 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5190
5191 PR c/45784
5192 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5193 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5194 new COMPOUND_EXPRs around the rhs of the comparison.
5195
5196 2017-07-27 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/81417
5199 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5200 the types.
5201
5202 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5203
5204 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5205 (handle_noipa_attribute): New function.
5206
5207 2017-07-07 Torsten Duwe <duwe@suse.de>
5208
5209 * c-attribs.c (c_common_attribute_table): Add entry for
5210 "patchable_function_entry".
5211
5212 2017-07-20 Nathan Sidwell <nathan@acm.org>
5213
5214 Remove TYPE_METHODS.
5215 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5216 dump_ada_template, print_ada_methods,
5217 print_ada_declaration): Member fns are on TYPE_FIELDS.
5218
5219 2017-07-18 Nathan Sidwell <nathan@acm.org>
5220
5221 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5222
5223 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5224
5225 * c-common.c (try_to_locate_new_include_insertion_point): New
5226 function.
5227 (per_file_includes_t): New typedef.
5228 (added_includes_t): New typedef.
5229 (added_includes): New variable.
5230 (maybe_add_include_fixit): New function.
5231 * c-common.h (maybe_add_include_fixit): New decl.
5232
5233 2017-07-10 Martin Sebor <msebor@redhat.com>
5234
5235 PR other/81345
5236 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5237
5238 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5239
5240 * c-common.c (selftest::c_family_tests): New.
5241 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5242 (selftest::c_family_tests): New decl.
5243
5244 2017-07-04 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/81231
5247 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5248 types.
5249
5250 2017-07-04 Marek Polacek <polacek@redhat.com>
5251
5252 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5253
5254 2017-06-28 Martin Liska <mliska@suse.cz>
5255
5256 PR ipa/81128
5257 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5258 to a function declaration.
5259
5260 2017-06-28 Martin Liska <mliska@suse.cz>
5261
5262 PR driver/79659
5263 * c.opt: Add IntegerRange to various options.
5264
5265 2017-06-26 Marek Polacek <polacek@redhat.com>
5266
5267 PR c/80116
5268 * c-common.h (warn_for_multistatement_macros): Declare.
5269 * c-warn.c: Include "c-family/c-indentation.h".
5270 (warn_for_multistatement_macros): New function.
5271 * c.opt (Wmultistatement-macros): New option.
5272 * c-indentation.c (guard_tinfo_to_string): No longer static.
5273 Change the parameter type to "enum rid". Handle RID_SWITCH.
5274 * c-indentation.h (guard_tinfo_to_string): Declare.
5275
5276 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5277
5278 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5279
5280 2017-06-15 Martin Sebor <msebor@redhat.com>
5281
5282 PR c++/80560
5283 * c.opt (-Wclass-memaccess): New option.
5284
5285 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5286
5287 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5288
5289 2017-06-13 Marek Polacek <polacek@redhat.com>
5290
5291 PR objc/80949
5292 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5293 branches is null.
5294
5295 2017-06-13 Martin Liska <mliska@suse.cz>
5296
5297 PR sanitize/78204
5298 * c-attribs.c (add_no_sanitize_value): New function.
5299 (handle_no_sanitize_attribute): Likewise.
5300 (handle_no_sanitize_address_attribute): Use the function.
5301 (handle_no_sanitize_thread_attribute): New function.
5302 (handle_no_address_safety_analysis_attribute): Use
5303 add_no_sanitize_value.
5304 (handle_no_sanitize_undefined_attribute): Likewise.
5305 * c-common.h: Declare new functions.
5306 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5307 (ubsan_instrument_shift): Likewise.
5308 (ubsan_instrument_bounds): Likewise.
5309 (ubsan_maybe_instrument_array_ref): Likewise.
5310 (ubsan_maybe_instrument_reference_or_call): Likewise.
5311
5312 2017-06-11 Jason Merrill <jason@redhat.com>
5313
5314 * c-ada-spec.c, c-pragma.c: Use id_equal.
5315
5316 2017-06-04 Marek Polacek <polacek@redhat.com>
5317
5318 PR c/80919
5319 * c-format.c (matching_type_p): Return false if any of the types
5320 requires structural equality.
5321
5322 2017-06-02 Martin Sebor <msebor@redhat.com>
5323
5324 PR c/80892
5325 * c-warn.c (conversion_warning): Use -Wconversion for integer
5326 conversion and -Wfloat-conversion for floating one.
5327
5328 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5329
5330 * c.opt (Wsizeof-pointer-div): New warning option.
5331
5332 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5333
5334 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5335 (Wcatch-value=1): Enable by -Wall.
5336
5337 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5338
5339 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5340 format_chars.
5341 * c.opt (fdiagnostics-show-template-tree): New option.
5342 (felide-type): New option.
5343
5344 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5345
5346 * c.opt (Wcatch-value=): New C++ warning flag.
5347
5348 2017-05-24 Nathan Sidwell <nathan@acm.org>
5349
5350 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5351 const casts to avoid warning.
5352
5353 2017-05-24 Martin Sebor <msebor@redhat.com>
5354
5355 PR c/80731
5356 * c-common.h (unsafe_conversion_p): Add a function argument.
5357 * c-common.c (unsafe_conversion_p): Same.
5358 Add type names and values to diagnostics.
5359 (scalar_to_vector): Adjust.
5360 * c-warn.c (constant_expression_error): Add a function argument.
5361 Add type names and values to diagnostics.
5362 (conversion_warning): Add a function argument.
5363 Add type names and values to diagnostics.
5364 (warnings_for_convert_and_check): Same.
5365
5366 2017-05-19 Jason Merrill <jason@redhat.com>
5367
5368 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5369 enumerators.
5370
5371 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5372
5373 * c-format.c (locus): Move out of function scope,
5374 add GTY attribute.
5375
5376 2017-05-19 Nathan Sidwell <nathan@acm.org>
5377
5378 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5379 (c_common_parse_file): Remove class dump handling.
5380 (get_dump_info): Likewise.
5381
5382 2017-05-19 Richard Biener <rguenther@suse.de>
5383
5384 PR c++/80593
5385 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5386 to alias-set zero memory.
5387
5388 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5389
5390 * c-format.c (local_tree_type_node): Add GTY attribute.
5391
5392 2017-05-18 Marek Polacek <polacek@redhat.com>
5393
5394 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5395 (c_common_fixed_point_type_for_size): Likewise.
5396 (c_common_type_for_mode): Likewise.
5397 (shorten_compare): Likewise.
5398 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5399 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5400
5401 2017-05-18 Marek Polacek <polacek@redhat.com>
5402
5403 * c-common.c (self_promoting_args_p): Change the return type to bool.
5404 Use false/true instead of 0/1.
5405 * c-common.h (self_promoting_args_p): Update.
5406
5407 2017-05-17 Marek Polacek <polacek@redhat.com>
5408
5409 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5410 * c-warn.c: Likewise.
5411
5412 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5413
5414 Implement new C++ intrinsics __is_assignable and __is_constructible.
5415 * c-common.c (__is_assignable, __is_constructible): New.
5416 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5417
5418 2017-05-17 Martin Liska <mliska@suse.cz>
5419
5420 * c-common.h: Introduce dump_flags_t type and
5421 use it instead of int type.
5422 * c-gimplify.c (c_genericize): Likewise.
5423 * c-opts.c: Likewise.
5424
5425 2017-05-17 Marek Polacek <polacek@redhat.com>
5426
5427 * c-common.c (c_save_expr): Remove.
5428 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5429 * c-common.h (c_save_expr): Remove declaration.
5430
5431 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5432
5433 PR c/35441
5434 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5435 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5436 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5437 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5438 RDIV_EXPR.
5439 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5440
5441 2017-05-09 Marek Polacek <polacek@redhat.com>
5442
5443 PR c/80525
5444 * c-warn.c (unwrap_c_maybe_const): New.
5445 (warn_logical_operator): Call it.
5446
5447 2017-05-09 Nathan Sidwell <nathan@acm.org>
5448
5449 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5450 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5451
5452 2017-05-08 Martin Sebor <msebor@redhat.com>
5453
5454 PR translation/80280
5455 * c-format.h (struct format_flag_spec): Add new member.
5456 (T89_T): New macro.
5457 * c-format.c (local_tree_type_node): New global.
5458 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5459 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5460 (strfmon_flag_specs): Likewise.
5461 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5462 with distinct quoting properties.
5463 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5464 (flag_chars_t::validate): Add argument and handle bad quoting.
5465 (check_format_info_main): Handle quoting problems.
5466 (init_dynamic_diag_info): Simplify.
5467
5468 2017-05-08 Jason Merrill <jason@redhat.com>
5469
5470 * c-opts.c (c_common_post_options): Update defaults for
5471 flag_abi_version and flag_abi_compat_version.
5472
5473 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5474
5475 * c-common.c (c_cpp_error): Replace report_diagnostic
5476 with diagnostic_report_diagnostic.
5477
5478 2017-05-04 Martin Sebor <msebor@redhat.com>
5479
5480 PR translation/80280
5481 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5482 (handle_weakref_attribute): Same.
5483
5484 2017-05-03 Nathan Sidwell <nathan@acm.org>
5485
5486 Canonicalize canonical type hashing
5487 * c-common.c (complete_array_type): Use type_hash_canon.
5488
5489 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5490
5491 PR c++/80038
5492 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5493 prototype.
5494 (cilk_install_body_pedigree_operations): Likewise.
5495 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5496 detatched.
5497 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5498 (cilk_install_body_pedigree_operations): Likewise.
5499 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5500 unwrapping.
5501
5502 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5503
5504 PR c++/80534
5505 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5506 flag on non-aggregate element types.
5507
5508 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5509
5510 * c-common.c (c_type_hasher, type_hash_table): Remove.
5511 (c_common_get_alias_set): Remove unreachable code.
5512 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5513
5514 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5515
5516 * c.opt (Wextra-semi): New C++ warning flag.
5517
5518 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5519
5520 PR middle-end/80423
5521 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5522
5523 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5524
5525 PR middle-end/79788
5526 PR middle-end/80375
5527 * c-common.c (c_common_type_for_mode): Don't handle
5528 widest_*_literal_type_node here.
5529 c_common_signed_or_unsigned_type): Likewise.
5530 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5531 to *intTI_type_node or *intDI_type_node depending on whether
5532 TImode is supported by the target or not.
5533
5534 2017-04-10 Martin Liska <mliska@suse.cz>
5535
5536 PR sanitizer/80350
5537 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5538 doing an UBSAN check.
5539
5540 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5541
5542 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5543
5544 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5545
5546 PR c++/79572
5547 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5548 tree *.
5549 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5550 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5551 REFERENCE_TYPE.
5552
5553 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5554
5555 PR documentation/78732
5556 * c.opt (Wendif-labels): Fix description to refer to
5557 #else rather than #elif.
5558
5559 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5560
5561 PR libstdc++/80251
5562 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5563 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5564
5565 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5566
5567 PR middle-end/80162
5568 * c-common.c (c_common_mark_addressable_vec): Don't set
5569 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5570
5571 2017-03-21 Martin Sebor <msebor@redhat.com>
5572
5573 PR c++/79548
5574 * c-common.c (set_underlying_type): Mark type used only when
5575 original del is declared unused.
5576
5577 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5578
5579 PR translation/79848
5580 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5581 "%qs".
5582
5583 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5584
5585 PR c/79921
5586 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5587 from inform's message, so that xgettext can locate it.
5588
5589 2017-03-09 Marek Polacek <polacek@redhat.com>
5590
5591 PR c++/79962
5592 PR c++/79984
5593 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5594 conversion to the attribute list.
5595
5596 2017-03-09 Martin Liska <mliska@suse.cz>
5597
5598 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5599
5600 2017-03-03 Jason Merrill <jason@redhat.com>
5601
5602 * c.opt (Wnoexcept-type): New.
5603
5604 2017-03-02 Richard Biener <rguenther@suse.de>
5605
5606 PR c/79756
5607 * c-common.c (c_common_mark_addressable_vec): Look through
5608 C_MAYBE_CONST_EXPR.
5609
5610 2017-02-28 Martin Liska <mliska@suse.cz>
5611
5612 * c.opt: Replace space with tabular for options of <number>
5613 type.
5614
5615 2017-02-28 Martin Liska <mliska@suse.cz>
5616
5617 * c.opt: Fix --help=option -Q for options which are of
5618 an enum type.
5619
5620 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5621
5622 PR c++/79588
5623 * c-common.c (check_function_restrict): New function.
5624 (check_function_arguments): Add FNDECL argument. Call
5625 check_function_restrict if -Wrestrict.
5626 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5627 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5628 * c-common.h (check_function_arguments): Add FNDECL argument.
5629 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5630
5631 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5632
5633 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5634 treatment of parameters with pointer-to-tagged type and tidy up.
5635 (print_ada_methods): Remove the special treatment of C++ static member
5636 functions.
5637
5638 2017-02-22 Martin Liska <mliska@suse.cz>
5639
5640 * c.opt: Replace inequality signs with square brackets
5641 for -Wnornalized.
5642
5643 2017-02-21 Jakub Jelinek <jakub@redhat.com>
5644
5645 PR c++/79641
5646 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5647 preserve quals.
5648
5649 2017-02-17 Joseph Myers <joseph@codesourcery.com>
5650
5651 * c-cppbuiltin.c (builtin_define_float_constants): Define
5652 __DECIMAL_DIG__ to the value for long double.
5653
5654 2017-02-15 Marek Polacek <polacek@redhat.com>
5655
5656 PR c/79515
5657 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5658 conversion has occured.
5659
5660 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5661
5662 * c-common.c (c_common_reswords): Add "__RTL".
5663 * c-common.h (enum rid): Add RID_RTL.
5664
5665 2017-01-20 Marek Polacek <polacek@redhat.com>
5666
5667 PR c/64279
5668 * c-common.h (do_warn_duplicated_branches_r): Declare.
5669 * c-gimplify.c (c_genericize): Walk the function tree calling
5670 do_warn_duplicated_branches_r.
5671 * c-warn.c (expr_from_macro_expansion_r): New.
5672 (do_warn_duplicated_branches): New.
5673 (do_warn_duplicated_branches_r): New.
5674 * c.opt (Wduplicated-branches): New option.
5675
5676 2017-01-17 David Malcolm <dmalcolm@redhat.com>
5677
5678 PR c++/71497
5679 * c-indentation.c (warn_for_misleading_indentation): Use the past
5680 subjunctive in the note.
5681
5682 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
5683
5684 PR c/79116
5685 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5686 start type to integer_type.
5687
5688 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5689
5690 PR driver/49726
5691 * c.opt (gen-decls): Add Driver flag.
5692
5693 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5694
5695 Revert:
5696 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5697
5698 PR c++/71737
5699 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5700
5701 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5702
5703 PR c++/71737
5704 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5705
5706 2017-01-12 Martin Sebor <msebor@redhat.com>
5707
5708 (-Wformat-overflow): ...to this.
5709
5710 2017-01-11 Martin Sebor <msebor@redhat.com>
5711
5712 PR c/78768
5713 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5714 Also enable for LTO.
5715
5716 2017-01-10 Jason Merrill <jason@redhat.com>
5717
5718 Implement P0195R2, C++17 variadic using.
5719 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5720
5721 2017-01-09 Jakub Jelinek <jakub@redhat.com>
5722
5723 PR translation/79019
5724 PR translation/79020
5725 * c.opt (Wnormalized=): Fix typo in description.
5726
5727 2017-01-08 Martin Sebor <msebor@redhat.com>
5728
5729 PR middle-end/77708
5730 * c.opt (-Wformat-truncation): New option.
5731
5732 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
5733
5734 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5735 value to unsigned short to fit in 4 hex digits without
5736 warnings.
5737
5738 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5739
5740 * c.opt (fsso-struct): Add 'native' value.
5741
5742 2017-01-05 Martin Liska <mliska@suse.cz>
5743
5744 PR pch/78970
5745 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5746 header.
5747
5748 2017-01-04 Marek Polacek <polacek@redhat.com>
5749
5750 PR c++/64767
5751 * c.opt (Wpointer-compare): New option.
5752
5753 2017-01-04 Jakub Jelinek <jakub@redhat.com>
5754
5755 PR driver/78957
5756 * c.opt (fsso-struct=): Add RejectNegative.
5757
5758 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5759
5760 Update copyright years.
5761
5762 2016-12-29 Martin Liska <mliska@suse.cz>
5763
5764 PR c/78933
5765 * c.opt (strong-eval-order): Add RejectNegative keyword.
5766
5767 2016-12-22 Jason Merrill <jason@redhat.com>
5768
5769 Implement P0522R0, matching of template template arguments.
5770 * c-cppbuiltin.c (c_cpp_builtins): Define
5771 __cpp_template_template_args.
5772
5773 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5774
5775 PR bootstrap/78817
5776 * c-common.c (struct nonnull_arg_ctx): New type.
5777 (check_function_nonnull): Return bool instead of void. Use
5778 nonnull_arg_ctx as context rather than just location_t.
5779 (check_nonnull_arg): Adjust for the new context type, set
5780 warned_p to true if a warning has been diagnosed.
5781 (check_function_arguments): Return bool instead of void.
5782 * c-common.h (check_function_arguments): Adjust prototype.
5783
5784 2016-12-21 Jason Merrill <jason@redhat.com>
5785
5786 * c.opt (-fnew-ttp-matching): New flag.
5787 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5788
5789 2016-12-14 Martin Jambor <mjambor@suse.cz>
5790
5791 * c-omp.c: Include omp-general.h instead of omp-low.h.
5792 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5793 name.
5794
5795 2016-12-14 Martin Sebor <msebor@redhat.com>
5796
5797 PR c/17308
5798 * c-common.c (check_nonnull_arg): Disable when optimization
5799 is enabled.
5800
5801 2016-12-12 Marek Polacek <polacek@redhat.com>
5802
5803 PR c++/78647
5804 * c-common.c (attribute_fallthrough_p): Return false for
5805 error_mark_node.
5806
5807 2016-12-08 Martin Sebor <msebor@redhat.com>
5808
5809 PR c/78284
5810 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5811
5812 2016-12-08 Martin Sebor <msebor@redhat.com>
5813
5814 PR c/78165
5815 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5816 suffix.
5817
5818 2016-12-07 Martin Sebor <msebor@redhat.com>
5819
5820 PR c/53562
5821 PR middle-end/77784
5822 PR middle-end/78149
5823 PR middle-end/78138
5824 * c.opt (-Wstringop-overflow): New option.
5825
5826 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5827
5828 * c-attribs.c (asan odr indicator): New attribute.
5829 (handle_asan_odr_indicator_attribute): New function.
5830
5831 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5832
5833 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5834 ptrdiff_type_node;
5835
5836 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5837
5838 * c-common.c (excess_precision_mode_join): New.
5839 (c_ts18661_flt_eval_method): New.
5840 (c_c11_flt_eval_method): Likewise.
5841 (c_flt_eval_method): Likewise.
5842 * c-common.h (excess_precision_mode_join): New.
5843 (c_flt_eval_method): Likewise.
5844 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5845 (cpp_iec_559_value): Call it.
5846 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5847 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5848 __FLT_EVAL_METHOD_TS_18661_3__.
5849
5850 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5851
5852 * c-opts.c (c_common_post_options): Add logic to handle the default
5853 case for -fpermitted-flt-eval-methods.
5854
5855 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
5856
5857 * c.opt (Wexpansion-to-defined): New.
5858
5859 2016-11-23 Jakub Jelinek <jakub@redhat.com>
5860
5861 PR target/78451
5862 * c-pragma.c (handle_pragma_target): Don't replace
5863 current_target_pragma, but chainon the new args to the current one.
5864
5865 2016-11-22 Nathan Sidwell <nathan@acm.org>
5866
5867 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5868 indentation and formatting.
5869
5870 2016-11-21 Martin Sebor <msebor@redhat.com>
5871
5872 * c.opt (-fprintf-return-value): Enable by default.
5873
5874 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5875
5876 PR c++/71973
5877 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5878 * c-common.c (c_common_nodes_and_builtins): Initialize
5879 const_tm_ptr_type_node.
5880
5881 2016-11-16 Marek Polacek <polacek@redhat.com>
5882
5883 PR c/78285
5884 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5885
5886 2016-11-14 Jakub Jelinek <jakub@redhat.com>
5887
5888 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5889
5890 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5891 Richard Biener <rguenther@suse.de>
5892
5893 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5894 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5895 * c.opt (fgimple): New option.
5896
5897 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5898
5899 PR c/35503
5900 * c-common.h (warn_for_restrict): Declare.
5901 * c-warn.c: Include gcc-rich-location.h.
5902 (warn_for_restrict): New function.
5903 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5904 (gcc_cdiag_char_table): Likewise.
5905 (gcc_cxxdiag_char_table): Likewise.
5906 * c.opt (Wrestrict): New option.
5907
5908 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5909
5910 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5911 for nested types only if the type is a record or union and dump SLOC.
5912
5913 2016-11-09 Jason Merrill <jason@redhat.com>
5914
5915 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5916
5917 2016-11-09 Jakub Jelinek <jakub@redhat.com>
5918
5919 * c-ubsan.c (ubsan_instrument_shift): Handle split
5920 -fsanitize=shift-base and -fsanitize=shift-exponent.
5921
5922 2016-11-07 Jason Merrill <jason@redhat.com>
5923
5924 * c.opt (Wc++1z-compat): New.
5925 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5926
5927 2016-11-07 Martin Liska <mliska@suse.cz>
5928
5929 * c-warn.c (warn_for_unused_label): Save all labels used
5930 in goto or in &label.
5931
5932 2016-11-03 Jason Merrill <jason@redhat.com>
5933
5934 * c-cppbuiltin.c (c_cpp_builtins): Correct
5935 __cpp_inheriting_constructors.
5936
5937 2016-11-01 Jason Merrill <jason@redhat.com>
5938
5939 * c-cppbuiltin.c (c_cpp_builtins): Update
5940 __cpp_inheriting_constructors.
5941
5942 * c.opt (-fnew-inheriting-ctors): New.
5943 * c-opts.c: Default to on for ABI 11+.
5944
5945 2016-10-31 Jakub Jelinek <jakub@redhat.com>
5946
5947 PR c++/77948
5948 * c.opt (fext-numeric-literals): Add Var and Init.
5949 * c-opts.c (c_common_handle_option): Don't clear
5950 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5951 (c_common_post_options): Clear it here if not set
5952 explicitly.
5953
5954 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
5955
5956 PR debug/77773
5957 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5958 if NULL.
5959
5960 2016-10-25 Jakub Jelinek <jakub@redhat.com>
5961
5962 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5963 * c-common.c (c_common_reswords): Add __builtin_launder.
5964
5965 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5966
5967 * c-common.c (c_common_truthvalue_conversion): Warn for
5968 multiplications in boolean context. Fix the quoting of '<<' and '<'
5969 in the shift warning.
5970
5971 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5972
5973 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5974
5975 2016-10-20 Jason Merrill <jason@redhat.com>
5976
5977 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5978
5979 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5980
5981 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5982 integer shift ops in boolean context.
5983
5984 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
5985
5986 * c.opt (Walloca): New.
5987 (Walloca-larger-than=): New.
5988 (Wvla-larger-than=): New.
5989
5990 2016-10-17 Marek Polacek <polacek@redhat.com>
5991
5992 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5993 Return immediately when finding a match.
5994 (warn_tautological_cmp): Remove a boolean variable that is no longer
5995 needed.
5996
5997 2016-10-17 Marek Polacek <polacek@redhat.com>
5998
5999 * c-attribs.c: New file.
6000 * c-common.c: Move attributes handling to c-attribs.c.
6001 (get_nonnull_operand): No longer static.
6002 * c-common.h: Move the declarations from c-attribs.c to its own section.
6003
6004 2016-10-14 Jason Merrill <jason@redhat.com>
6005
6006 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6007 and __cpp_deduction_guides.
6008
6009 2016-10-13 Jason Merrill <jason@redhat.com>
6010
6011 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6012
6013 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6014
6015 * c-cppbuiltin.c: Include memmodel.h.
6016 * c-opts.c: Likewise.
6017 * c-pragma.c: Likewise.
6018 * c-warn.c: Likewise.
6019
6020 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6021
6022 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6023 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6024 * c-opts.c (sanitize_cpp_opts): Initialize
6025 cpp_opts->cpp_warn_implicit_fallthrough.
6026
6027 2016-10-11 Marek Polacek <polacek@redhat.com>
6028
6029 * c-common.c (warning_candidate_p): Change the return type to bool
6030 and return true/false instead of 1/0.
6031 (vector_mode_valid_p): Likewise.
6032
6033 2016-10-11 Marek Polacek <polacek@redhat.com>
6034
6035 * c-common.c (fold_for_warn): No longer static.
6036 (bool_promoted_to_int_p): Likewise.
6037 (c_common_get_narrower): Likewise.
6038 (constant_expression_warning): Move to c-warn.c.
6039 (constant_expression_error): Likewise.
6040 (overflow_warning): Likewise.
6041 (warn_logical_operator): Likewise.
6042 (find_array_ref_with_const_idx_r): Likewise.
6043 (warn_tautological_cmp): Likewise.
6044 (expr_has_boolean_operands_p): Likewise.
6045 (warn_logical_not_parentheses): Likewise.
6046 (warn_if_unused_value): Likewise.
6047 (strict_aliasing_warning): Likewise.
6048 (sizeof_pointer_memaccess_warning): Likewise.
6049 (check_main_parameter_types): Likewise.
6050 (conversion_warning): Likewise.
6051 (warnings_for_convert_and_check): Likewise.
6052 (match_case_to_enum_1): Likewise.
6053 (match_case_to_enum): Likewise.
6054 (c_do_switch_warnings): Likewise.
6055 (warn_for_omitted_condop): Likewise.
6056 (readonly_error): Likewise.
6057 (lvalue_error): Likewise.
6058 (invalid_indirection_error): Likewise.
6059 (warn_array_subscript_with_type_char): Likewise.
6060 (warn_about_parentheses): Likewise.
6061 (warn_for_unused_label): Likewise.
6062 (warn_for_div_by_zero): Likewise.
6063 (warn_for_memset): Likewise.
6064 (warn_for_sign_compare): Likewise.
6065 (do_warn_double_promotion): Likewise.
6066 (do_warn_unused_parameter): Likewise.
6067 (record_locally_defined_typedef): Likewise.
6068 (maybe_record_typedef_use): Likewise.
6069 (maybe_warn_unused_local_typedefs): Likewise.
6070 (maybe_warn_bool_compare): Likewise.
6071 (maybe_warn_shift_overflow): Likewise.
6072 (warn_duplicated_cond_add_or_warn): Likewise.
6073 (diagnose_mismatched_attributes): Likewise.
6074 * c-common.h: Move the declarations from c-warn.c to its own section.
6075 * c-warn.c: New file.
6076
6077 2016-10-08 Jason Merrill <jason@redhat.com>
6078
6079 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6080 into COND_EXPR in C++.
6081
6082 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6083
6084 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6085 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6086 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6087
6088 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6089
6090 Implement LWG2296 helper intrinsic
6091 * c-common.h (enum rid): Add RID_ADDRESSOF.
6092 * c-common.c (c_common_reswords): Add __builtin_addressof.
6093
6094 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6095
6096 PR c++/77700
6097 * c-common.c (c_common_truthvalue_conversion): Warn also for
6098 suspicious enum values in boolean context.
6099
6100 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6101
6102 Implement P0258R2 - helper for C++17
6103 std::has_unique_object_representations trait
6104 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6105 * c-common.c (c_common_reswords): Add
6106 __has_unique_object_representations.
6107
6108 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6109
6110 PR sanitizer/66343
6111 * c-ubsan.c (ubsan_instrument_return): Don't call
6112 initialize_sanitizer_builtins here.
6113
6114 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6115
6116 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6117 conditional expression in boolean context when only one arm is
6118 non-boolean.
6119
6120 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6121
6122 PR sanitizer/77823
6123 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6124 is not integral.
6125
6126 * c-common.c (c_common_reswords): Update comment for C++11.
6127
6128 2016-10-04 Jason Merrill <jason@redhat.com>
6129
6130 * c-common.c (make_tree_vector_from_ctor): New.
6131 * c-common.h: Declare it.
6132
6133 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6134
6135 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6136 __LIBGCC_JCR_SECTION_NAME__.
6137
6138 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6139
6140 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6141 left shift in boolean context.
6142
6143 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6144
6145 Implement P0001R1 - C++17 removal of register storage class specifier
6146 * c.opt (Wregister): New warning.
6147 * c-opts.c (c_common_post_options): Enable -Wregister by
6148 default for C++17.
6149
6150 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6151
6152 * c-opts.c (c_common_post_options): Remove special case for
6153 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6154 in C++.
6155
6156 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6157
6158 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6159 -std=c++1z.
6160
6161 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6162
6163 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6164
6165 * c-common.c: Include memmodel.h.
6166
6167 2016-09-26 Marek Polacek <polacek@redhat.com>
6168
6169 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6170
6171 2016-09-26 Marek Polacek <polacek@redhat.com>
6172
6173 PR c/7652
6174 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6175 (handle_fallthrough_attribute): New function.
6176 (attribute_fallthrough_p): New function.
6177 * c-common.h (attribute_fallthrough_p): Declare.
6178
6179 2016-09-24 Marek Polacek <polacek@redhat.com>
6180
6181 PR c/77490
6182 * c.opt (Wbool-operation): New.
6183
6184 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6185
6186 * c-common.c (c_common_truthvalue_conversion): Inhibit
6187 Wint-in-bool-context warning with from_macro_definition_at.
6188 Mention the expression will always evaluate to true.
6189
6190 2016-09-21 Martin Sebor <msebor@redhat.com>
6191
6192 PR bootstrap/77676
6193 * c.opt (fprintf-return-value): Temporarily initialize to zero
6194 to unblock bootstrap failures.
6195
6196 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6197
6198 PR c++/77651
6199 * c.opt (Waligned-new=): Add RejectNegative.
6200 (faligned-new=): Likewise. Spelling fix - change
6201 aligned_new_threshhold to aligned_new_threshold.
6202 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6203 to aligned_new_threshold.
6204
6205 2016-09-20 Martin Sebor <msebor@redhat.com>
6206
6207 PR middle-end/49905
6208 * c.opt: Add -Wformat-length and -fprintf-return-value.
6209
6210 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6211
6212 PR c++/77434
6213 * c.opt (Wint-in-bool-context): New warning.
6214 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6215 constants in boolean context.
6216
6217 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6218
6219 * c-common.c (max_align_t_align): Also consider alignment of
6220 float128_type_node.
6221
6222 2016-09-15 Jason Merrill <jason@redhat.com>
6223
6224 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6225 DECL_EXTERNAL.
6226
6227 2016-09-14 Jason Merrill <jason@redhat.com>
6228
6229 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6230 limit FIELD_DECL, either.
6231
6232 2016-09-14 Marek Polacek <polacek@redhat.com>
6233
6234 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6235 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6236 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6237
6238 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6239
6240 * c-common.c (warn_logical_not_parentheses): Replace
6241 rich_location::add_fixit_insert calls with add_fixit_insert_before
6242 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6243
6244 2016-09-13 Jason Merrill <jason@redhat.com>
6245 Tom de Vries <tom@codesourcery.com>
6246
6247 PR c++/77427
6248 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6249
6250 2016-09-13 Jason Merrill <jason@redhat.com>
6251
6252 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6253 limit types at all.
6254
6255 2016-09-12 Jason Merrill <jason@redhat.com>
6256
6257 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6258 bit/byte confusion, allow large alignment for types.
6259
6260 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6261
6262 PR c++/77496
6263 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6264
6265 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6266
6267 PR c/72858
6268 * c-format.c (argument_parser::check_argument_type): Add params
6269 "type_start" and "conversion_char". Use the former to generate
6270 offset_to_type_start and pass it and conversion_char to
6271 check_format_types.
6272 (check_format_info_main): Capture the start of the type
6273 information as "type_start", and pass it an format_char
6274 to arg_parser.check_argument_type.
6275 (check_format_types): Provide an example in the leading comment.
6276 Add params "offset_to_type_start" and "conversion_char"; pass
6277 them to format_type_warning calls.
6278 (test_get_modifier_for_format_len): Likewise.
6279 (matching_type_p): New function.
6280 (get_format_for_type): Add param "conversion_char" and move
6281 implementation into...
6282 (get_format_for_type_1): ...new function, called twice.
6283 Use new function matching_type_p rather than checking for
6284 TYPE_CANONICAL equality.
6285 (get_corrected_substring): New function.
6286 (format_type_warning): Provide an example in the leading comment.
6287 Add params "offset_to_type_start" and "conversion_char". Replace
6288 call to get_format_for_type with call to get_corrected_substring
6289 and move rejection of hints for widths/precisions there.
6290 (assert_format_for_type_streq): Add param "conversion_char".
6291 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6292 (test_get_format_for_type_printf): Add conversion chars to the
6293 tests, adding coverage for various combinations of integer
6294 vs double conversions, and for preserving octal and hexadecimal
6295 conversions.
6296 (test_get_format_for_type_scanf): Add conversion chars to the
6297 tests.
6298
6299 2016-09-10 Tom de Vries <tom@codesourcery.com>
6300
6301 PR C/71602
6302 * c-common.c (build_va_arg): Handle more strict
6303 targetm.canonical_va_list_type. Replace first argument type error with
6304 assert.
6305
6306 2016-09-09 Martin Sebor <msebor@redhat.com>
6307
6308 PR c/77520
6309 PR c/77521
6310 * c-format.c (argument_parser::find_format_char_info): Use %qc
6311 format directive unconditionally.
6312
6313 2016-09-09 Jason Merrill <jason@redhat.com>
6314
6315 Implement C++17 new of over-aligned types.
6316 * c.opt: Add -faligned-new and -Waligned-new.
6317 * c-common.c (max_align_t_align): Split out from...
6318 (cxx_fundamental_alignment_p): ...here.
6319 * c-common.h: Declare it.
6320 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6321
6322 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6323
6324 * c-cppbuiltin.c (builtin_define_type_width): New function.
6325 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6326 macros.
6327
6328 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6329
6330 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6331 a POINTER_TYPE.
6332 (substring_loc::get_location): Move to substring-locations.c,
6333 keeping implementation as...
6334 (c_get_substring_location): New function, from the above, reworked
6335 to use accessors rather than member lookup.
6336 * c-common.h (class substring_loc): Move to substring-locations.h,
6337 replacing with a forward decl.
6338 (c_get_substring_location): New decl.
6339 * c-format.c: Include "substring-locations.h".
6340 (format_warning_va): Move to substring-locations.c.
6341 (format_warning_at_substring): Likewise.
6342
6343 2016-09-06 Martin Sebor <msebor@redhat.com>
6344
6345 PR c/77336
6346 * c-format.c (check_function_format): Avoid issuing warnings for
6347 functions unless they call format functions with non-constant
6348 format strings.
6349
6350 2016-09-06 Richard Biener <rguenther@suse.de>
6351
6352 PR c/77450
6353 * c-common.c (c_common_mark_addressable_vec): Handle
6354 COMPOUND_LITERAL_EXPR.
6355
6356 2016-09-05 Marek Polacek <polacek@redhat.com>
6357
6358 PR c/77423
6359 * c-common.c (bool_promoted_to_int_p): New function.
6360 (expr_has_boolean_operands_p): New function.
6361 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6362 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6363
6364 2016-09-04 Tom de Vries <tom@codesourcery.com>
6365
6366 revert:
6367 2016-08-29 Tom de Vries <tom@codesourcery.com>
6368
6369 * c-common.c (build_va_arg): Replace first argument type error
6370 with assert.
6371
6372 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6373
6374 PR c/65467
6375 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6376 (c_finish_omp_for): Reject _Atomic qualified iterators.
6377
6378 2016-09-01 Martin Sebor <msebor@redhat.com>
6379
6380 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6381 size to guarantee it fits the output of the formatted function
6382 regardless of its arguments.
6383
6384 2016-09-01 Marek Polacek <polacek@redhat.com>
6385
6386 PR c/7652
6387 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6388 FALLTHRU comments.
6389
6390 2016-08-29 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/77292
6393 * c-common.c (warn_logical_not_parentheses): Don't warn for
6394 a comparison or a logical operator.
6395
6396 2016-08-29 Tom de Vries <tom@codesourcery.com>
6397
6398 * c-common.c (build_va_arg): Fix type comparison assert.
6399
6400 2016-08-29 Tom de Vries <tom@codesourcery.com>
6401
6402 * c-common.c (build_va_arg): Replace first argument type error
6403 with assert.
6404
6405 2016-08-29 Tom de Vries <tom@codesourcery.com>
6406
6407 PR c/77398
6408 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6409 with error_mark_node as va_list instead of with illegal va_list.
6410
6411 2016-08-25 Marek Polacek <polacek@redhat.com>
6412 David Malcolm <dmalcolm@redhat.com>
6413
6414 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6415 * c-common.h (warn_logical_not_parentheses): Update declaration.
6416
6417 2016-08-22 Marek Polacek <polacek@redhat.com>
6418
6419 PR c++/77321
6420 * c-common.c (warn_for_memset): Check type for null.
6421
6422 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6423
6424 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6425 _FloatNx types for suffixes for built-in functions.
6426
6427 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6428
6429 PR c/32187
6430 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6431 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6432 (RID_FLOAT128X): New enum rid values.
6433 (CASE_RID_FLOATN_NX): New macro.
6434 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6435 keywords.
6436 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6437 corresponding complex types.
6438 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6439 _FloatNx and corresponding complex types.
6440 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6441 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6442 and _FloatNx types for the widest type for determining
6443 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6444 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6445 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6446 and _FloatNx types.
6447 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6448 constants.
6449 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6450 _FloatNx types.
6451
6452 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6453
6454 * c-opts.c (c_diagnostic_finalizer): Update for change to
6455 diagnostic_show_locus.
6456
6457 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6458
6459 * c-common.c: Include "spellcheck.h".
6460 (cb_get_suggestion): New function.
6461 * c-common.h (cb_get_suggestion): New decl.
6462 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6463 cb_get_suggestion.
6464
6465 2016-08-18 Marek Polacek <polacek@redhat.com>
6466
6467 PR c/71514
6468 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6469 and pointer-to-VLA.
6470
6471 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6472
6473 PR c/72857
6474 * c-common.c (substring_loc::get_range): Rename to...
6475 (substring_loc::get_location): ...this, converting param from a
6476 source_range * to a location_t *. Call
6477 get_source_location_for_substring rather than
6478 get_source_range_for_substring, and pass in m_caret_idx.
6479 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6480 (substring_loc::get_range): Replace with...
6481 (substring_loc::get_location): ...this.
6482 (substring_loc::set_caret_index): New method.
6483 (substring_loc): Add field m_caret_idx.
6484 * c-format.c (format_warning_va): Update for above changes.
6485 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6486 clashing with type name.
6487 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6488 (check_argument_type): Likewise.
6489 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6490 Use a copy when emitting warnings, setting the caret index from TYPE.
6491
6492 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6493 Arnaud Charlet <charlet@adacore.com>
6494
6495 * c-ada-spec.c (dump_number): New function.
6496 (handle_escape_character): Likewise.
6497 (print_ada_macros): Add handling of constant integers and strings.
6498
6499 2016-08-12 Marek Polacek <polacek@redhat.com>
6500
6501 PR c/7652
6502 * c-common.c (scalar_to_vector): Adjust fall through comment.
6503 * c-opts.c (c_common_handle_option): Likewise.
6504 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6505 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6506 fall through comment.
6507 * cilk.c (extract_free_variables): Add FALLTHRU.
6508
6509 2016-08-10 Jason Merrill <jason@redhat.com>
6510
6511 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6512
6513 2016-08-09 Jason Merrill <jason@redhat.com>
6514
6515 * c-common.c (c_common_attribute_table): vector_size affects type
6516 identity.
6517
6518 2016-08-09 Marek Polacek <polacek@redhat.com>
6519
6520 PR c/7652
6521 * c-ada-spec.c (dump_generic_ada_node): Add return.
6522
6523 2016-08-09 Jason Merrill <jason@redhat.com>
6524
6525 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6526 C++17 constexpr lambdas.
6527
6528 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6529
6530 PR c/64955
6531 * c-common.h (selftest::c_format_c_tests): New declaration.
6532 (selftest::run_c_tests): New declaration.
6533 * c-format.c: Include "selftest.h.
6534 (format_warning_va): Add param "corrected_substring" and use
6535 it to add a replacement fix-it hint.
6536 (format_warning_at_substring): Likewise.
6537 (format_warning_at_char): Update for new param of
6538 format_warning_va.
6539 (argument_parser::check_argument_type): Pass "fki" to
6540 check_format_types.
6541 (check_format_types): Add param "fki" and pass it to
6542 format_type_warning.
6543 (deref_n_times): New function.
6544 (get_modifier_for_format_len): New function.
6545 (selftest::test_get_modifier_for_format_len): New function.
6546 (get_format_for_type): New function.
6547 (format_type_warning): Add param "fki" and use it to attempt
6548 to provide hints for argument types when calling
6549 format_warning_at_substring.
6550 (selftest::get_info): New function.
6551 (selftest::assert_format_for_type_streq): New function.
6552 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6553 (selftest::test_get_format_for_type_printf): New function.
6554 (selftest::test_get_format_for_type_scanf): New function.
6555 (selftest::c_format_c_tests): New function.
6556
6557 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6558
6559 PR c/52952
6560 * c-format.c: Include "diagnostic.h".
6561 (location_column_from_byte_offset): Delete.
6562 (location_from_offset): Delete.
6563 (format_warning_va): New function.
6564 (format_warning_at_substring): New function.
6565 (format_warning_at_char): New function.
6566 (check_format_arg): Capture location of format_tree and pass to
6567 check_format_info_main.
6568 (argument_parser): Add fields "start_of_this_format" and
6569 "format_string_cst".
6570 (flag_chars_t::validate): Add param "format_string_cst". Convert
6571 warning_at call using location_from_offset to call to
6572 format_warning_at_char.
6573 (argument_parser::argument_parser): Add param "format_string_cst_"
6574 and use use it to initialize field "format_string_cst".
6575 Initialize new field "start_of_this_format".
6576 (argument_parser::read_format_flags): Convert warning_at call
6577 using location_from_offset to a call to format_warning_at_char.
6578 (argument_parser::read_any_format_left_precision): Likewise.
6579 (argument_parser::read_any_format_precision): Likewise.
6580 (argument_parser::read_any_other_modifier): Likewise.
6581 (argument_parser::find_format_char_info): Likewise, in three places.
6582 (argument_parser::parse_any_scan_set): Likewise, in one place.
6583 (argument_parser::handle_conversions): Likewise, in two places.
6584 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6585 and use it to make a substring_loc. Pass the latter to
6586 check_format_types.
6587 (check_format_info_main): Add params "fmt_param_loc" and
6588 "format_string_cst". Convert warning_at calls using
6589 location_from_offset to calls to format_warning_at_char. Pass the
6590 new params to the arg_parser ctor. Pass "format_string_cst" to
6591 flag_chars.validate. Pass "fmt_param_loc" to
6592 arg_parser.check_argument_type.
6593 (check_format_types): Convert first param from a location_t
6594 to a const substring_loc & and rename to "fmt_loc". Attempt
6595 to extract the range of the relevant parameter and pass it
6596 to format_type_warning.
6597 (format_type_warning): Convert first param from a location_t
6598 to a const substring_loc & and rename to "fmt_loc". Add
6599 params "param_range" and "type". Replace calls to warning_at
6600 with calls to format_warning_at_substring.
6601
6602 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6603
6604 * c-format.c (class flag_chars_t): New class.
6605 (struct length_modifier): New struct.
6606 (class argument_parser): New class.
6607 (flag_chars_t::flag_chars_t): New ctor.
6608 (flag_chars_t::has_char_p): New method.
6609 (flag_chars_t::add_char): New method.
6610 (flag_chars_t::validate): New method.
6611 (flag_chars_t::get_alloc_flag): New method.
6612 (flag_chars_t::assignment_suppression_p): New method.
6613 (argument_parser::argument_parser): New ctor.
6614 (argument_parser::read_any_dollar): New method.
6615 (argument_parser::read_format_flags): New method.
6616 (argument_parser::read_any_format_width): New method.
6617 (argument_parser::read_any_format_left_precision): New method.
6618 (argument_parser::read_any_format_precision): New method.
6619 (argument_parser::handle_alloc_chars): New method.
6620 (argument_parser::read_any_length_modifier): New method.
6621 (argument_parser::read_any_other_modifier): New method.
6622 (argument_parser::find_format_char_info): New method.
6623 (argument_parser::validate_flag_pairs): New method.
6624 (argument_parser::give_y2k_warnings): New method.
6625 (argument_parser::parse_any_scan_set): New method.
6626 (argument_parser::handle_conversions): New method.
6627 (argument_parser::check_argument_type): New method.
6628 (check_format_info_main): Introduce classes argument_parser
6629 and flag_chars_t, moving the code within the loop into methods
6630 of these classes. Make various locals "const".
6631
6632 2016-08-05 David Malcolm <dmalcolm@redhat.com>
6633
6634 * c-common.c: Include "substring-locations.h".
6635 (get_cpp_ttype_from_string_type): New function.
6636 (g_string_concat_db): New global.
6637 (substring_loc::get_range): New method.
6638 * c-common.h (g_string_concat_db): New declaration.
6639 (class substring_loc): New class.
6640 * c-lex.c (lex_string): When concatenating strings, capture the
6641 locations of all tokens using a new obstack, and record the
6642 concatenation locations within g_string_concat_db.
6643 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6644 on the ggc-heap.
6645
6646 2016-07-29 Marek Polacek <polacek@redhat.com>
6647
6648 PR c/71926
6649 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6650 parentheses warning.
6651
6652 PR c/71574
6653 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6654
6655 2016-07-28 Martin Liska <mliska@suse.cz>
6656
6657 PR gcov-profile/68025
6658 * c-common.c (handle_no_profile_instrument_function_attribute):
6659
6660 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6661
6662 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6663 BITS_PER_UNIT_LOG.
6664
6665 2016-07-25 Jason Merrill <jason@redhat.com>
6666
6667 PR c++/65970
6668 * c.opt (fconstexpr-loop-limit): New.
6669
6670 2016-07-22 Martin Sebor <msebor@redhat.com>
6671
6672 PR c++/71675
6673 * c-common.c (resolve_overloaded_builtin): Avoid converting
6674 __atomic_compare_exchange_n return type to that of what its
6675 first argument points to.
6676
6677 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6678
6679 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6680 ~(unsigned HOST_WIDE_INT) 0.
6681
6682 2016-07-22 Martin Liska <mliska@suse.cz>
6683
6684 PR gcov-profile/69028
6685 PR gcov-profile/62047
6686 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6687 to the current_function_decl.
6688
6689 2016-07-21 Jason Merrill <jason@redhat.com>
6690
6691 PR c++/65168
6692 * c-common.c (c_common_truthvalue_conversion): Check
6693 c_inhibit_evaluation_warnings for warning about address of
6694 reference.
6695
6696 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6697
6698 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6699 const char *.
6700
6701 2016-07-15 Jason Merrill <jason@redhat.com>
6702
6703 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6704
6705 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6706
6707 PR c/71858
6708 * c-common.h (enum lookup_name_fuzzy_kind): Add
6709 FUZZY_LOOKUP_FUNCTION_NAME.
6710
6711 2016-07-08 Jason Merrill <jason@redhat.com>
6712
6713 P0145: Refining Expression Order for C++.
6714 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6715 * c-opts.c: Adjust.
6716
6717 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6718
6719 PR c++/71214
6720 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6721
6722 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6723
6724 * c-pragma.h (enum pragma_kind): Rename
6725 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6726 users.
6727
6728 2016-06-29 Richard Biener <rguenther@suse.de>
6729
6730 PR middle-end/71002
6731 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6732
6733 2016-06-24 Jason Merrill <jason@redhat.com>
6734
6735 P0145R2: Refining Expression Order for C++.
6736 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6737 MODIFY_EXPR.
6738
6739 2016-06-24 Jakub Jelinek <jakub@redhat.com>
6740
6741 * c-common.c (check_builtin_function_arguments): Require last
6742 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6743 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6744 if the last argument is pointer to enumerated or boolean type.
6745
6746 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6747
6748 PR c/70339
6749 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6750 (lookup_name_fuzzy): New prototype.
6751
6752 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
6753
6754 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6755
6756 2016-06-14 Jason Merrill <jason@redhat.com>
6757
6758 P0145R2: Refining Expression Order for C++.
6759 * c.opt (fargs-in-order): New.
6760 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6761
6762 2016-06-13 Jakub Jelinek <jakub@redhat.com>
6763
6764 PR sanitizer/71498
6765 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6766 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6767
6768 PR preprocessor/71183
6769 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6770 to cb_get_source_date_epoch.
6771
6772 2016-06-10 Jakub Jelinek <jakub@redhat.com>
6773
6774 PR c/68657
6775 * c.opt (Wpsabi): Add Warning flag.
6776
6777 2016-06-10 Martin Sebor <msebor@redhat.com>
6778
6779 PR c/71392
6780 * c-common.c (handle_nonnull_attribute): Accept
6781 the nonnull attribute in type-generic builtins.
6782
6783 2016-06-09 Martin Sebor <msebor@redhat.com>
6784
6785 PR c/70883
6786 * c-common.c (builtin_function_validate_nargs): Make text of error
6787 message consistent with others like it.
6788
6789 2016-06-08 Martin Sebor <msebor@redhat.com>
6790 Jakub Jelinek <jakub@redhat.com>
6791
6792 PR c++/70507
6793 PR c/68120
6794 * c-common.c (check_builtin_function_arguments): Handle
6795 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6796
6797 2016-06-08 Richard Biener <rguenther@suse.de>
6798
6799 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6800
6801 2016-06-07 Richard Biener <rguenther@suse.de>
6802
6803 PR c/61564
6804 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6805 options and warn about others.
6806
6807 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
6808
6809 * c-common.c (get_source_date_epoch): Rename to
6810 cb_get_source_date_epoch.
6811 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6812 message when the parsing fails. Use error_at instead of fatal_error.
6813 * c-common.h (get_source_date_epoch): Rename to
6814 cb_get_source_date_epoch.
6815 * c-common.h (cb_get_source_date_epoch): Prototype.
6816 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6817 * c-common.h (c_omp_region_type): Remove trailing comma.
6818 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6819 * c-lex.c (c_lex_with_flags): Remove initialization of
6820 pfile->source_date_epoch.
6821
6822 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6823
6824 PR c++/71349
6825 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6826 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6827 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6828 instead of C_OMP_CLAUSE_SPLIT_FOR.
6829
6830 2016-05-24 Richard Biener <rguenther@suse.de>
6831
6832 PR middle-end/70434
6833 PR c/69504
6834 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6835 (convert_vector_to_array_for_subscript): ... this.
6836 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6837 VIEW_CONVERT_EXPR to an array type. Rename to ...
6838 (convert_vector_to_array_for_subscript): ... this.
6839
6840 2016-05-12 Marek Polacek <polacek@redhat.com>
6841
6842 PR c/70756
6843 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6844 size_in_bytes and pass LOC to it.
6845
6846 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6847
6848 PR c/43651
6849 * c.opt (Wduplicate-decl-specifier): New option.
6850
6851 2016-05-11 Marek Polacek <polacek@redhat.com>
6852
6853 PR c++/71024
6854 * c-common.c (diagnose_mismatched_attributes): New function.
6855 * c-common.h (diagnose_mismatched_attributes): Declare.
6856
6857 2016-05-04 Marek Polacek <polacek@redhat.com>
6858
6859 * c.opt (Wdangling-else): New option.
6860
6861 2016-05-03 Marek Polacek <polacek@redhat.com>
6862
6863 PR c/70859
6864 * c-common.c (builtin_function_validate_nargs): Add location
6865 parameter. Use it.
6866 (check_builtin_function_arguments): Add location and arguments
6867 parameters. Use them.
6868 * c-common.h (check_builtin_function_arguments): Update declaration.
6869
6870 2016-05-03 Richard Biener <rguenther@suse.de>
6871
6872 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6873 allow call args to gimplify to SSA names.
6874
6875 2016-05-03 Marek Polacek <polacek@redhat.com>
6876
6877 * c-common.h (enum c_omp_region_type): Remove stray comma.
6878
6879 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6880
6881 * c-common.h (enum c_omp_region_type): Define.
6882
6883 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6884
6885 * c-common.c (shorten_compare): Use wi::to_wide.
6886
6887 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6888
6889 PR middle-end/70626
6890 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6891 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6892 reduction clauses in acc parallel loops.
6893
6894 2016-04-29 Marek Polacek <polacek@redhat.com>
6895
6896 PR c/70852
6897 * c-common.c (warn_for_memset): Check domain before accessing it.
6898
6899 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6900
6901 PR/69089
6902 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6903 "aligned" attribute.
6904
6905 2016-04-28 Jason Merrill <jason@redhat.com>
6906
6907 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6908
6909 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
6910 Matthias Klose <doko@debian.org>
6911
6912 * c-common.c (get_source_date_epoch): New function, gets the environment
6913 variable SOURCE_DATE_EPOCH and parses it as long long with error
6914 handling.
6915 * c-common.h (get_source_date_epoch): Prototype.
6916 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6917
6918 2015-04-27 Ryan Burn <contact@rnburn.com>
6919
6920 PR c++/69024
6921 PR c++/68997
6922 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6923 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6924 external linkage.
6925 (cilk_detect_and_unwrap): Corresponding changes.
6926 (extract_free_variables): Don't extract free variables from
6927 AGGR_INIT_EXPR slot.
6928 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6929 (cilk_recognize_spawn): Likewise.
6930
6931 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6932
6933 * c.opt (Wmemset-elt-size): New option.
6934 * c-common.c (warn_for_memset): New function.
6935 * c-common.h (warn_for_memset): Declare.
6936
6937 2016-04-25 Jason Merrill <jason@redhat.com>
6938
6939 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6940 No longer static.
6941 * c-common.h: Declare it.
6942 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6943
6944 2016-04-22 Jason Merrill <jason@redhat.com>
6945
6946 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6947
6948 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6949
6950 PR c++/69363
6951 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6952 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6953
6954 2016-04-18 Michael Matz <matz@suse.de>
6955
6956 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6957 and SET_DECL_ALIGN.
6958
6959 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6960
6961 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6962 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6963 to incomplete types.
6964 (dump_nested_type): Remove redundant tests and tidy up.
6965 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6966 a type which is the typedef of an original type.
6967
6968 2016-04-15 Marek Polacek <polacek@redhat.com>
6969
6970 PR c/70651
6971 * c-common.c (build_va_arg): Change two asserts into errors and return
6972 error_mark_node.
6973
6974 2016-04-13 Marek Polacek <polacek@redhat.com>
6975
6976 PR c++/70639
6977 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6978 for switch statements, too.
6979
6980 2016-03-28 Jason Merrill <jason@redhat.com>
6981
6982 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6983
6984 2016-03-23 Marek Polacek <polacek@redhat.com>
6985
6986 PR c++/69884
6987 * c.opt (Wignored-attributes): New option.
6988
6989 2016-03-22 David Malcolm <dmalcolm@redhat.com>
6990
6991 PR c/69993
6992 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6993 diagnostic text, reversing the order of the warning and note so
6994 that they appear in source order.
6995
6996 2016-03-17 Marek Polacek <polacek@redhat.com>
6997
6998 PR c/69407
6999 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7000 operations.
7001
7002 2016-03-14 Jason Merrill <jason@redhat.com>
7003
7004 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7005
7006 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7007
7008 2016-03-09 Richard Biener <rguenther@suse.de>
7009
7010 PR c/70143
7011 * c-common.c (strict_aliasing_warning): Add back
7012 alias_sets_conflict_p check.
7013
7014 2016-03-08 Jason Merrill <jason@redhat.com>
7015
7016 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7017
7018 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7019
7020 PR c/68187
7021 * c-indentation.c (get_visual_column): Move code to determine next
7022 tab stop to...
7023 (next_tab_stop): ...this new function.
7024 (line_contains_hash_if): Delete function.
7025 (detect_preprocessor_logic): Delete function.
7026 (get_first_nws_vis_column): New function.
7027 (detect_intervening_unindent): New function.
7028 (should_warn_for_misleading_indentation): Replace call to
7029 detect_preprocessor_logic with a call to
7030 detect_intervening_unindent.
7031
7032 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7033
7034 PR c/68187
7035 * c-indentation.c (should_warn_for_misleading_indentation): When
7036 suppressing warnings about cases where the guard and body are on
7037 the same column, only use the first non-whitespace column in place
7038 of the guard token column when dealing with "else" clauses.
7039 When rejecting aligned BODY and NEXT, loosen the requirement
7040 from equality with the first non-whitespace of guard to simply
7041 that they not be indented relative to it.
7042
7043 2016-03-04 Richard Biener <rguenther@suse.de>
7044
7045 PR c++/70054
7046 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7047 instead of alias_sets_conflict_p.
7048
7049 2016-03-01 Marek Polacek <polacek@redhat.com>
7050
7051 PR c++/69795
7052 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7053 any DECL.
7054
7055 2016-02-22 Martin Sebor <msebor@redhat.com>
7056
7057 PR middle-end/69780
7058 * c-common.c (check_builtin_function_arguments): Validate and
7059 reject invalid arguments to __builtin_alloca_with_align.
7060
7061 2016-02-20 Mark Wielaard <mjw@redhat.com>
7062
7063 PR c/28901
7064 * c.opt (Wunused-const-variable): Turn into Alias for...
7065 (Wunused-const-variable=): New option.
7066
7067 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7068
7069 PR c++/69865
7070 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7071 here...
7072 (c_common_init_options): ...to here.
7073 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7074
7075 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7076
7077 PR c++/69826
7078 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7079 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7080 flag_preprocess_only.
7081
7082 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7083
7084 PR c/69835
7085 * c.opt (Wnonnull-compare): Enable for -Wall.
7086
7087 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7088
7089 PR c++/69797
7090 * c-common.c (sync_resolve_size): Diagnose too few arguments
7091 even when params is non-NULL empty vector.
7092
7093 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7094
7095 PR target/60410
7096 * c.opt (fshort-double): Remove.
7097
7098 2016-02-05 Martin Sebor <msebor@redhat.com>
7099
7100 PR c++/69662
7101 * c.opt (Warning options): Update -Wplacement-new to take
7102 an optional argument.
7103
7104 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7105
7106 PR preprocessor/69543
7107 PR c/69558
7108 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7109 instead of loc to control_warning_option.
7110
7111 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7112
7113 * c.opt (fopenacc-dim=): New option.
7114
7115 2016-01-27 Ryan Burn <contact@rnburn.com>
7116
7117 PR cilkplus/69267
7118 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7119 gimplify_arg. Removed superfluous post_p argument.
7120 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7121 superfluous post_p argument.
7122 * c-gimplify.c (c_gimplify_expr): Likewise.
7123
7124 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7125
7126 PR other/69006
7127 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7128 pp_newline_and_flush with pp_flush.
7129
7130 2016-01-20 Martin Sebor <msebor@redhat.com>
7131
7132 PR c/69405
7133 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7134 an incompatible argument when the argument isn't a valid tree node.
7135
7136 2016-01-18 Jason Merrill <jason@redhat.com>
7137
7138 PR c++/68767
7139 * c-common.c (check_function_arguments_recurse): Fold the whole
7140 COND_EXPR, not just the condition.
7141
7142 2016-01-18 Tom de Vries <tom@codesourcery.com>
7143
7144 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7145 classify as loop clause.
7146
7147 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7148
7149 PR bootstrap/68271
7150 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7151 C++ FE no longer has limit on number of pragmas.
7152
7153 2015-01-14 Ryan Burn <contact@rnburn.com>
7154
7155 PR c++/69048
7156 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7157 to add missing cleanup point.
7158
7159 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7160
7161 PR c++/68819
7162 * c-indentation.c (get_visual_column): Add location_t param.
7163 Handle the column number being zero by effectively disabling the
7164 warning, with an "inform".
7165 (should_warn_for_misleading_indentation): Add location_t argument
7166 for all uses of get_visual_column.
7167
7168 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7169
7170 PR c++/69029
7171 * c-indentation.c (should_warn_for_misleading_indentation):
7172 Don't warn about do-while statements.
7173
7174 2016-01-07 Martin Sebor <msebor@redhat.com>
7175
7176 PR c/68966
7177 * c-common.c (sync_resolve_size): Reject first argument when it's
7178 a pointer to _Bool.
7179
7180 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7181
7182 PR c/69122
7183 * c-indentation.c (get_visual_column): Remove default argument.
7184 (should_warn_for_misleading_indentation): For the multiline case,
7185 update call to get_visual_column for next_stmt_exploc so that it
7186 captures the location of the first non-whitespace character in the
7187 relevant line. Don't issue warnings if there is non-whitespace
7188 before the next statement.
7189
7190 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7191
7192 Update copyright years.
7193
7194 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7195
7196 * c-common.c (binary_op_error): Convert first param from
7197 location_t to rich_location * and use it when emitting an error.
7198 * c-common.h (binary_op_error): Convert first param from
7199 location_t to rich_location *.
7200
7201 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7202
7203 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7204 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7205
7206 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7207
7208 * c-common.c (c_common_attribute_table): Handle "omp declare target
7209 link" attribute.
7210
7211 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7212
7213 PR c/68833
7214 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7215
7216 2014-12-12 Tobias Burnus <burnus@net-b.de>
7217
7218 PR fortran/68815
7219 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7220 specifiers (%d, %i,%u and %c).
7221
7222 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7223
7224 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7225
7226 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7227
7228 PR c/48088
7229 PR c/68657
7230 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7231 * c-pragma.c (handle_pragma_diagnostic): Adjust
7232 control_warning_option caller.
7233
7234 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7235
7236 * c-common.c (c_cpp_error): Update for change to
7237 rich_location::set_range.
7238
7239 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7240
7241 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7242 shifting 1 out of the sign bit.
7243
7244 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7245
7246 * c-common.c (c_common_attribute_table[]): Update max arguments
7247 count for "simd" attribute.
7248 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7249
7250 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7251
7252 PR preprocessor/57580
7253 * c-ppoutput.c (print): Change printed field to bool.
7254 Move src_file last for smaller padding.
7255 (init_pp_output): Set print.printed to false instead of 0.
7256 (scan_translation_unit): Fix up formatting. Set print.printed
7257 to true after printing something other than newline.
7258 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7259 (maybe_print_line_1): Set print.printed to false instead of 0.
7260 (print_line_1): Likewise.
7261 (do_line_change): Set print.printed to true instead of 1.
7262 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7263 dump_macro): Set print.printed to false after printing newline.
7264
7265 2015-12-02 Jason Merrill <jason@redhat.com>
7266
7267 * c-common.c (fold_for_warn): New.
7268 (warn_logical_operator, warn_tautological_cmp)
7269 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7270
7271 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7272 (c_fully_fold_internal, decl_constant_value_for_optimization):
7273 Move to c/c-fold.c.
7274 * c-common.h: Don't declare decl_constant_value_for_optimization.
7275
7276 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7277
7278 PR c/68162
7279 * c-common.h (c_build_qualified_type): Add extra default
7280 arguments.
7281
7282 2015-12-01 Julian Brown <julian@codesourcery.com>
7283 Cesar Philippidis <cesar@codesourcery.com>
7284 James Norris <James_Norris@mentor.com>
7285
7286 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7287 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7288 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7289
7290 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7291
7292 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7293 (decl_sloc_common): Delete and move bulk of processing to...
7294 (decl_sloc): ...here.
7295 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7296 (dump_ada_double_name): Remove S parameter and compute the suffix.
7297 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7298 element type and deal with an anonymous one.
7299 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7300 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7301 and remove reference to QUAL_UNION_TYPE.
7302 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7303 (dump_nested_type): ...here. New function extracted from above.
7304 Generate a full declaration for anonymous element type of arrays.
7305 (print_ada_declaration): Really skip anonymous declarations. Remove
7306 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7307 Clean up processing of declarations of array types and objects.
7308 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7309 Remove obsolete code and tidy up.
7310
7311 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7312
7313 PR c/67581
7314 * c-common.c (handle_transparent_union_attribute): Update
7315 also type variants.
7316
7317 2015-11-27 Martin Liska <mliska@suse.cz>
7318
7319 PR c++/68312
7320 * array-notation-common.c (cilkplus_extract_an_triplets):
7321 Release vector of vectors.
7322 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7323
7324 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7325
7326 PR c++/68527
7327 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7328 (print_ada_struct_decl): Likewise.
7329
7330 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7331
7332 PR c++/68001
7333 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7334 * cilk.c (recognize_spawn): Determine location in a more precise
7335 way.
7336
7337 2015-11-19 Jason Merrill <jason@redhat.com>
7338
7339 * c-common.c (shorten_compare): But look through macros from
7340 system headers.
7341
7342 2015-11-18 Jason Merrill <jason@redhat.com>
7343
7344 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7345 non-constant operand comes from a macro.
7346
7347 2015-11-17 Jason Merrill <jason@redhat.com>
7348
7349 PR bootstrap/68346
7350 * c-common.c (warn_tautological_cmp): Fold before checking for
7351 constants.
7352
7353 2015-11-16 Marek Polacek <polacek@redhat.com>
7354
7355 PR c++/68362
7356 * c-common.c (check_case_bounds): Fold low and high cases.
7357
7358 2015-11-16 Marek Polacek <polacek@redhat.com>
7359
7360 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7361 * c-common.c (c_common_get_alias_set): Likewise.
7362 (handle_visibility_attribute): Likewise.
7363
7364 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7365
7366 * c-common.c (handle_simd_attribute): New.
7367 (struct attribute_spec): Add entry for "simd".
7368 (handle_simd_attribute): New.
7369
7370 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7371
7372 * c-lex.c (interpret_float): Use fold_convert.
7373
7374 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7375
7376 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7377 and store it on the result.
7378 * c-opts.c (c_common_init_options): Set
7379 global_dc->colorize_source_p.
7380
7381 2015-11-12 James Norris <jnorris@codesourcery.com>
7382 Joseph Myers <joseph@codesourcery.com>
7383
7384 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7385 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7386 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7387 PRAGMA_OACC_CLAUSE_LINK.
7388
7389 2015-11-11 Marek Polacek <polacek@redhat.com>
7390
7391 PR c/68107
7392 PR c++/68266
7393 * c-common.c (valid_array_size_p): New function.
7394 * c-common.h (valid_array_size_p): Declare.
7395
7396 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7397
7398 PR bootstrap/68271
7399 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7400
7401 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7402
7403 * array-notation-common.c: Remove unused header files.
7404 * c-ada-spec.c: Likewise.
7405 * c-cilkplus.c: Likewise.
7406 * c-common.c: Likewise.
7407 * c-cppbuiltin.c: Likewise.
7408 * c-dump.c: Likewise.
7409 * c-format.c: Likewise.
7410 * c-gimplify.c: Likewise.
7411 * c-indentation.c: Likewise.
7412 * c-lex.c: Likewise.
7413 * c-omp.c: Likewise.
7414 * c-opts.c: Likewise.
7415 * c-pch.c: Likewise.
7416 * c-ppoutput.c: Likewise.
7417 * c-pragma.c: Likewise.
7418 * c-pretty-print.c: Likewise.
7419 * c-semantics.c: Likewise.
7420 * c-ubsan.c: Likewise.
7421 * cilk.c: Likewise.
7422 * stub-objc.c: Likewise.
7423
7424 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7425 Cesar Philippidis <cesar@codesourcery.com>
7426 James Norris <jnorris@codesourcery.com>
7427 Julian Brown <julian@codesourcery.com>
7428 Nathan Sidwell <nathan@codesourcery.com>
7429
7430 * c-pragma.c (oacc_pragmas): Add "routine".
7431 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7432
7433 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7434
7435 * c-common.c (c_common_attributes): Add scalar_storage_order.
7436 (handle_scalar_storage_order_attribute): New function.
7437 * c-pragma.c (global_sso): New variable.
7438 (maybe_apply_pragma_scalar_storage_order): New function.
7439 (handle_pragma_scalar_storage_order): Likewise.
7440 (init_pragma): Register scalar_storage_order.
7441 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7442 * c.opt (Wscalar-storage-order): New warning.
7443 (fsso-struct=): New option.
7444
7445 2015-11-08 Martin Sebor <msebor@redhat.com>
7446
7447 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7448
7449 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7450
7451 * c-common.c: Don't undef DEF_BUILTIN.
7452
7453 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7454
7455 * c-common.c (c_cpp_error): Convert parameter from location_t to
7456 rich_location *. Eliminate the "column_override" parameter and
7457 the call to diagnostic_override_column.
7458 Update the "done_lexing" clause to set range 0
7459 on the rich_location, rather than overwriting a location_t.
7460 * c-common.h (c_cpp_error): Convert parameter from location_t to
7461 rich_location *. Eliminate the "column_override" parameter.
7462
7463 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7464 Thomas Schwinge <thomas@codesourcery.com>
7465 James Norris <jnorris@codesourcery.com>
7466
7467 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7468 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7469 clauses with parallel and kernels and loops.
7470 * c-pragma.h (enum pragma_omp_clause): Add entries for
7471 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7472 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7473 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7474 INDEPENDENT,SEQ}.
7475 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7476
7477 2015-11-05 Martin Sebor <msebor@redhat.com>
7478
7479 PR c++/67942
7480 * c.opt (-Wplacement-new): New option.
7481
7482 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7483
7484 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7485 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7486 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7487 save_expr or create_tmp_var* if TEST is true.
7488 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7489 Don't call add_stmt here.
7490 (struct c_omp_check_loop_iv_data): New type.
7491 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7492 c_omp_check_loop_iv_exprs): New functions.
7493 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7494 distribute.
7495 (c_omp_declare_simd_clauses_to_numbers): Change
7496 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7497 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7498 from numbers to PARM_DECLs.
7499
7500 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7501
7502 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7503 flag_checking.
7504
7505 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7506
7507 PR c++-common/67882
7508 * c-common.h (fold_offsetof_1): Add argument.
7509 * c-common.c (fold_offsetof_1): Diagnose more invalid
7510 offsetof expressions that reference elements past the end of
7511 an array.
7512
7513 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7514 Chung-Lin Tang <cltang@codesourcery.com>
7515
7516 * c-pragma.c (oacc_pragmas): Add "atomic".
7517 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7518
7519 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7520
7521 * c-common.c (handle_target_clones_attribute): New.
7522 (c_common_attribute_table): Add handle_target_clones_attribute.
7523 (handle_always_inline_attribute): Add check on target_clones attribute.
7524 (handle_target_attribute): Ditto.
7525
7526 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7527
7528 * array-notation-common.c: Reorder #include's and remove duplicates.
7529 * c-ada-spec.c: Likewise.
7530 * c-cilkplus.c: Likewise.
7531 * c-common.c: Likewise.
7532 * c-cppbuiltin.c: Likewise.
7533 * c-dump.c: Likewise.
7534 * c-format.c: Likewise.
7535 * c-gimplify.c: Likewise.
7536 * c-indentation.c: Likewise.
7537 * c-lex.c: Likewise.
7538 * c-omp.c: Likewise.
7539 * c-opts.c: Likewise.
7540 * c-pch.c: Likewise.
7541 * c-ppoutput.c: Likewise.
7542 * c-pragma.c: Likewise.
7543 * c-pretty-print.c: Likewise.
7544 * c-semantics.c: Likewise.
7545 * c-ubsan.c: Likewise.
7546 * cilk.c: Likewise.
7547 * stub-objc.c: Likewise.
7548
7549 2015-10-28 Jason Merrill <jason@redhat.com>
7550
7551 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7552
7553 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7554 James Norris <jnorris@codesourcery.com>
7555 Cesar Philippidis <cesar@codesourcery.com>
7556
7557 PR c/64765
7558 PR c/64880
7559 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7560 * c-omp.c (c_oacc_split_loop_clauses): New function.
7561
7562 2015-10-21 Martin Sebor <msebor@redhat.com>
7563
7564 PR driver/68043
7565 * c.opt: End each sentence that describes an option with a period.
7566
7567 2015-10-20 Marek Polacek <polacek@redhat.com>
7568
7569 * array-notation-common.c (is_cilkplus_vector_p): Define.
7570 * c-common.h (is_cilkplus_vector_p): Declare.
7571
7572 2015-10-20 Marek Polacek <polacek@redhat.com>
7573
7574 * c.opt (std=gnu++11): Do not describe as experimental.
7575 (std=gnu++14): Likewise.
7576
7577 2015-10-19 Jason Merrill <jason@redhat.com>
7578
7579 * c-cppbuiltin.c (c_cpp_builtins): Define
7580 __cpp_nontype_template_args.
7581
7582 2015-10-19 Jason Merrill <jason@redhat.com>
7583
7584 * c-cppbuiltin.c (c_cpp_builtins): Define
7585 __cpp_enumerator_attributes, __cpp_fold_expressions,
7586 __cpp_unicode_characters.
7587
7588 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7589 Aldy Hernandez <aldyh@redhat.com>
7590
7591 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7592 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7593 (c_define_builtins): Likewise.
7594 * c-common.h (enum c_omp_clause_split): Add
7595 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7596 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7597 (c_finish_omp_for): Add ORIG_DECLV argument.
7598 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7599 201511 instead of 201307.
7600 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7601 OMP_CRITICAL_CLAUSES to it.
7602 (c_finish_omp_ordered): Add CLAUSES argument, set
7603 OMP_ORDERED_CLAUSES to it.
7604 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7605 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7606 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7607 constructs and new OpenMP 4.5 clauses. Clear
7608 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7609 verification code.
7610 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7611 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7612 (enum pragma_omp_clause): Add
7613 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7614 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7615
7616 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7617
7618 * c-lex.c (interpret_float): Use real_equal instead of
7619 REAL_VALUES_EQUAL.
7620
7621 2015-10-04 Jason Merrill <jason@redhat.com>
7622
7623 Implement N4514, C++ Extensions for Transactional Memory.
7624 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7625 (c_common_attribute_table): Add transaction_safe_dynamic.
7626 transaction_safe now affects type identity.
7627 (handle_tm_attribute): Handle transaction_safe_dynamic.
7628 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7629 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7630 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7631 (D_TRANSMEM): New.
7632 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7633 * c-pretty-print.c (pp_c_attributes_display): Don't print
7634 transaction_safe in C++.
7635
7636 2015-10-02 Marek Polacek <polacek@redhat.com>
7637
7638 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7639
7640 2015-10-02 Marek Polacek <polacek@redhat.com>
7641
7642 PR c/64249
7643 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7644 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7645 * c.opt (Wduplicated-cond): New option.
7646
7647 2015-10-01 Joseph Myers <joseph@codesourcery.com>
7648
7649 * c.opt (std=c11): Do not describe as experimental.
7650 (std=gnu11): Likewise.
7651 (std=iso9899:2011): Likewise.
7652
7653 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7654
7655 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7656 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7657
7658 2015-09-25 Marek Polacek <polacek@redhat.com>
7659
7660 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7661 (ubsan_instrument_shift): Likewise.
7662
7663 2015-09-25 Marek Polacek <polacek@redhat.com>
7664
7665 PR sanitizer/64906
7666 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7667
7668 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7669
7670 * c-indentation.c (should_warn_for_misleading_indentation):
7671 Compare next_stmt_vis_column with guard_line_first_nws instead
7672 of with guard_line_vis_column.
7673
7674 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7675
7676 PR c/49654
7677 PR c/49655
7678 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7679 options and options not valid for the current language.
7680
7681 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7682
7683 * c-indentation.c (should_warn_for_misleading_indentation):
7684 Float out and consolidate the calls to get_visual_column that
7685 are passed guard_exploc as an argument. Compare
7686 next_stmt_vis_column with guard_line_first_nws instead of with
7687 body_line_first_nws.
7688
7689 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7690
7691 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7692 Wnamespaces): New C++ warnings.
7693
7694 2015-09-22 Jason Merrill <jason@redhat.com>
7695
7696 * c-common.h (abi_compat_version_crosses): New.
7697 (warn_abi_version): Declare.
7698 * c-common.c: Define it.
7699 * c-opts.c (c_common_post_options): Handle it.
7700 flag_abi_compat_version defaults to 8.
7701
7702 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7703
7704 Complete the implementation of N4230, Nested namespace definition.
7705 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7706 __cpp_nested_namespace_definitions.
7707
7708 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7709
7710 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7711
7712 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7713
7714 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7715 when warning.
7716 * c-pragma.h (pragma_lex): Add optional loc argument.
7717
7718 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7719
7720 * c-format.c (check_format_arg): Adjust to use common block size in all
7721 object pools.
7722
7723 2015-09-15 David Malcolm <dmalcolm@redhat.com>
7724
7725 * c-format.c (location_from_offset): Update for change in
7726 signature of location_get_source_line.
7727 * c-indentation.c (get_visual_column): Likewise.
7728 (line_contains_hash_if): Likewise.
7729
7730 2015-09-14 Marek Polacek <polacek@redhat.com>
7731
7732 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7733 setting various warnings.
7734
7735 2015-09-14 Marek Polacek <polacek@redhat.com>
7736
7737 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7738 a negative value.
7739
7740 2015-09-11 Mark Wielaard <mjw@redhat.com>
7741
7742 PR c/28901
7743 * c.opt (Wunused-variable): Option from common.opt.
7744 (Wunused-const-variable): New option.
7745
7746 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7747
7748 PR c++/53184
7749 * c.opt ([Wsubobject-linkage]): Add.
7750
7751 2015-09-03 Martin Sebor <msebor@redhat.com>
7752
7753 PR c/66516
7754 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7755 functions.
7756 * c-common.c (reject_gcc_builtin): Define.
7757
7758 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7759
7760 PR middle-end/60586
7761 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7762 prototype.
7763 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7764 cilk_gimplify_call_params_in_spawned_fn.
7765 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7766 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7767 unwrapping.
7768
7769 2015-08-25 Marek Polacek <polacek@redhat.com>
7770
7771 PR middle-end/67330
7772 * c-common.c (handle_weak_attribute): Don't check whether the
7773 visibility can be changed here.
7774
7775 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7776
7777 * c-lex.c (c_lex_with_flags): Use explicit locations.
7778
7779 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7780
7781 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7782 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7783
7784 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7785
7786 PR middle-end/36757
7787 * c-common.c (check_builtin_function_arguments): Add check
7788 for BUILT_IN_SIGNBIT argument.
7789
7790 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7791
7792 PR c++/67160
7793 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7794 in c++1z mode.
7795
7796 2015-08-17 Marek Polacek <polacek@redhat.com>
7797
7798 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7799 with whitespaces before qualifier names.
7800
7801 2015-08-12 Marek Polacek <polacek@redhat.com>
7802
7803 PR c++/55095
7804 * c-common.c (maybe_warn_shift_overflow): Properly handle
7805 left-shifting 1 into the sign bit.
7806
7807 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7808
7809 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7810
7811 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7812 Braden Obrzut <admin@maniacsvault.net>
7813 Jason Merrill <jason@redhat.com>
7814
7815 Add C++ Concepts TS support.
7816 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7817 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7818 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7819 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7820 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7821 * c.opt (fconcepts): New.
7822
7823 2015-08-02 Martin Sebor <msebor@redhat.com>
7824
7825 * c.opt (-Wframe-address): New warning option.
7826
7827 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7828
7829 * c-indentation.c (should_warn_for_misleading_indentation):
7830 Improve heuristics.
7831
7832 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7833
7834 * c-indentation.c (get_visual_column): Add parameter first_nws,
7835 use it. Update comment documenting the function.
7836 (is_first_nonwhitespace_on_line): Remove.
7837 (should_warn_for_misleading_indentation): Replace usage of
7838 of is_first_nonwhitespace_on_line with get_visual_column.
7839
7840 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7841
7842 * c-indentation.h (struct token_indent_info): Define.
7843 (get_token_indent_info): Define.
7844 (warn_for_misleading_information): Declare.
7845 * c-common.h (warn_for_misleading_information): Remove.
7846 * c-identation.c (warn_for_misleading_indentation):
7847 Change declaration to take three token_indent_infos. Adjust
7848 accordingly.
7849 * c-identation.c (should_warn_for_misleading_indentation):
7850 Likewise. Bail out early if the body is a compound statement.
7851 (guard_tinfo_to_string): Define.
7852
7853 2015-07-30 Jason Merrill <jason@redhat.com>
7854
7855 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7856 '*' for reference decay.
7857
7858 2015-07-30 Marek Polacek <polacek@redhat.com>
7859
7860 * c-common.c (warn_tautological_cmp): Bail for float types.
7861
7862 2015-07-27 Marek Polacek <polacek@redhat.com>
7863
7864 PR bootstrap/67030
7865 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7866
7867 2015-07-27 Marek Polacek <polacek@redhat.com>
7868
7869 PR c++/66555
7870 PR c/54979
7871 * c-common.c (find_array_ref_with_const_idx_r): New function.
7872 (warn_tautological_cmp): New function.
7873 * c-common.h (warn_tautological_cmp): Declare.
7874 * c.opt (Wtautological-compare): New option.
7875
7876 2015-07-23 Marek Polacek <polacek@redhat.com>
7877
7878 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7879 (ubsan_instrument_shift): Likewise.
7880
7881 2015-07-23 Marek Polacek <polacek@redhat.com>
7882
7883 PR sanitizer/66908
7884 * c-ubsan.c: Include gimplify.h.
7885 (ubsan_instrument_division): Unshare OP0 and OP1.
7886 (ubsan_instrument_shift): Likewise.
7887
7888 2015-07-20 Marek Polacek <polacek@redhat.com>
7889 Richard Sandiford <richard.sandiford@arm.com>
7890
7891 PR c++/55095
7892 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7893 Use EXPR_LOC_OR_LOC.
7894 (maybe_warn_shift_overflow): New function.
7895 * c-common.h (maybe_warn_shift_overflow): Declare.
7896 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7897 * c.opt (Wshift-overflow): New option.
7898
7899 2015-07-16 Martin Liska <mliska@suse.cz>
7900
7901 * c-format.c (static void check_format_info_main): Use
7902 object_allocator instead of pool_allocator.
7903 (check_format_arg): Likewise.
7904 (check_format_info_main): Likewise.
7905
7906 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
7907
7908 * c-opts.c: Remove multiline #include comment.
7909
7910 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
7911
7912 * c-common.c: Fix double word typos.
7913
7914 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7915
7916 * c-ada-spec.h (cpp_operation): Revert latest change.
7917 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7918 constructors and destructors.
7919
7920 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7921
7922 * c-common.h: Adjust includes for flags.h changes.
7923 * stub-objc.c: Likewise.
7924
7925 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7926
7927 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7928 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7929
7930 2015-07-08 Jakub Jelinek <jakub@redhat.com>
7931
7932 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7933 are to be removed, return NULL rather than original clauses list.
7934
7935 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7936
7937 * array-notation-common.c: Adjust includes.
7938 * c-ada-spec.c: Likewise.
7939 * c-cilkplus.c: Likewise.
7940 * c-common.h: Likewise.
7941 * c-cppbuiltin.c: Likewise.
7942 * c-dump.c: Likewise.
7943 * c-format.c: Likewise.
7944 * c-gimplify.c: Likewise.
7945 * c-indentation.c: Likewise.
7946 * c-lex.c: Likewise.
7947 * c-omp.c: Likewise.
7948 * c-opts.c: Likewise.
7949 * c-pch.c: Likewise.
7950 * c-ppoutput.c: Likewise.
7951 * c-pragma.c: Likewise.
7952 * c-pretty-print.c: Likewise.
7953 * c-semantics.c: Likewise.
7954 * c-ubsan.c: Likewise.
7955 * cilk.c: Likewise.
7956 * stub-objc.c: Likewise.
7957
7958 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7959
7960 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7961 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7962
7963 2015-07-01 Jason Merrill <jason@redhat.com>
7964
7965 * c-common.h (D_CXX11): Rename from D_CXX0X.
7966 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7967 * c-common.c: Adjust.
7968
7969 * c-opts.c (c_common_post_options): Default to C++14.
7970
7971 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7972
7973 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7974
7975 Implement N4197 - Adding u8 character literals
7976 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7977 CPP_CHAR.
7978 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7979 CPP_UTF8CHAR_USERDEF tokens.
7980 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7981 and CPP_UTF8CHAR tokens.
7982 (lex_charconst): Treat CPP_UTF8CHAR token.
7983
7984 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7985
7986 PR fortran/66605
7987 * c-common.c (do_warn_unused_parameter): Move here.
7988 * c-common.h (do_warn_unused_parameter): Declare.
7989
7990 2015-06-29 Marek Polacek <polacek@redhat.com>
7991
7992 PR c/66322
7993 * c-common.c (check_case_bounds): Add bool * parameter. Set
7994 OUTSIDE_RANGE_P.
7995 (c_add_case_label): Add bool * parameter. Pass it down to
7996 check_case_bounds.
7997 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7998 warning here.
7999 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8000 declarations.
8001
8002 2015-06-27 Marek Polacek <polacek@redhat.com>
8003
8004 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8005 or VECTOR_INTEGER_TYPE_P throughout.
8006 * c-gimplify.c: Likewise.
8007
8008 2015-06-26 Marek Polacek <polacek@redhat.com>
8009
8010 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8011 * c-common.c (c_fully_fold_internal): Likewise.
8012 (c_alignof_expr): Likewise.
8013 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8014 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8015 * cilk.c (create_parm_list): Likewise.
8016
8017 2015-06-26 Marek Polacek <polacek@redhat.com>
8018
8019 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8020
8021 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8022
8023 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8024 * c-gimplify.c: Likewise.
8025 * c-pragma.c: Likewise.
8026 * c-ubsan.c: Likewise.
8027 * cilk.c: Likewise.
8028
8029 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8030
8031 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8032 ggc_hasher.
8033
8034 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8035
8036 * cilk.c: Move calls.h after tm.h in the include chain.
8037
8038 2015-06-25 Marek Polacek <polacek@redhat.com>
8039
8040 * array-notation-common.c: Use VAR_P throughout.
8041 * c-ada-spec.c: Likewise.
8042 * c-common.c: Likewise.
8043 * c-format.c: Likewise.
8044 * c-gimplify.c: Likewise.
8045 * c-omp.c: Likewise.
8046 * c-pragma.c: Likewise.
8047 * c-pretty-print.c: Likewise.
8048 * cilk.c: Likewise.
8049
8050 2015-06-25 Marek Polacek <polacek@redhat.com>
8051
8052 * cilk.c (extract_free_variables): Use is_global_var.
8053
8054 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8055
8056 * c-common.c: Don't include target-def.h.
8057
8058 2015-06-23 Marek Polacek <polacek@redhat.com>
8059
8060 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8061 when comparing INTEGER_CSTs.
8062
8063 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8064
8065 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8066 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8067 (dump_ada_template): Skip partially specialized types.
8068
8069 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8070
8071 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8072 swapping.
8073
8074 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8075
8076 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8077 * c-ada-spec.c: Likewise.
8078 * c-cilkplus.c: Likewise.
8079 * c-common.c: Likewise.
8080 * c-common.h: Likewise.
8081 * c-cppbuiltin.c: Likewise.
8082 * c-dump.c: Likewise.
8083 * c-format.c: Likewise.
8084 * c-gimplify.c: Likewise.
8085 * c-indentation.c: Likewise.
8086 * c-lex.c: Likewise.
8087 * c-omp.c: Likewise.
8088 * c-opts.c: Likewise.
8089 * c-pch.c: Likewise.
8090 * c-ppoutput.c: Likewise.
8091 * c-pragma.c: Likewise.
8092 * c-pretty-print.c: Likewise.
8093 * c-semantics.c: Likewise.
8094 * c-ubsan.c: Likewise.
8095 * cilk.c: Likewise.
8096 * stub-objc.c: Likewise.
8097
8098 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8099
8100 PR c++/65168
8101 * c-common.c (c_common_truthvalue_conversion): Warn when
8102 converting an address of a reference to a truth value.
8103
8104 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8105
8106 * array-notation-common.c : Adjust include files.
8107 * c-ada-spec.c : Likewise.
8108 * c-cilkplus.c : Likewise.
8109 * c-common.c : Likewise.
8110 * c-common.h : Likewise.
8111 * c-cppbuiltin.c : Likewise.
8112 * c-dump.c : Likewise.
8113 * c-format.c : Likewise.
8114 * c-gimplify.c : Likewise.
8115 * c-indentation.c : Likewise.
8116 * c-lex.c : Likewise.
8117 * c-omp.c : Likewise.
8118 * c-opts.c : Likewise.
8119 * c-pch.c : Likewise.
8120 * c-ppoutput.c : Likewise.
8121 * c-pragma.c : Likewise.
8122 * c-pretty-print.c : Likewise.
8123 * c-semantics.c : Likewise.
8124 * c-ubsan.c : Likewise.
8125 * cilk.c : Likewise.
8126 * stub-objc.c : Likewise.
8127
8128 2015-06-08 Marek Polacek <polacek@redhat.com>
8129
8130 PR c/66415
8131 * c-format.c (location_from_offset): Return LOC if LINE is null.
8132
8133 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8134
8135 * c-common.h (c_parse_final_cleanups): New prototype.
8136 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8137
8138 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8139
8140 * c-common.c (noplt): New attribute.
8141 (handle_noplt_attribute): New handler.
8142
8143 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8144
8145 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8146 * c-ada-spec.c: Likewise.
8147 * c-cilkplus.c: Likewise.
8148 * c-common.c: Likewise.
8149 * c-common.h: Likewise.
8150 * c-cppbuiltin.c: Likewise.
8151 * c-dump.c: Likewise.
8152 * c-format.c: Likewise.
8153 * c-gimplify.c: Likewise.
8154 * c-indentation.c: Likewise.
8155 * c-lex.c: Likewise.
8156 * c-omp.c: Likewise.
8157 * c-opts.c: Likewise.
8158 * c-pch.c: Likewise.
8159 * c-ppoutput.c: Likewise.
8160 * c-pragma.c: Likewise.
8161 * c-pretty-print.c: Likewise.
8162 * c-semantics.c: Likewise.
8163 * c-ubsan.c: Likewise.
8164 * cilk.c: Likewise.
8165 * stub-objc.c: Likewise.
8166
8167 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8168
8169 PR c/66220:
8170 * c-indentation.c (should_warn_for_misleading_indentation): Use
8171 expand_location rather than expand_location_to_spelling_point.
8172 Don't warn if the guarding statement is more indented than the
8173 next/body stmts.
8174
8175 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8176
8177 * c-indentation.c (warn_for_misleading_indentation): Bail out
8178 immediately if -Wmisleading-indentation isn't enabled.
8179
8180 2015-06-01 Martin Liska <mliska@suse.cz>
8181
8182 * c-format.c (check_format_arg):Use new type-based pool allocator.
8183 (check_format_info_main) Likewise.
8184
8185 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8186
8187 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8188 (has_nontrivial_methods): Likewise.
8189
8190 2015-05-25 Marek Polacek <polacek@redhat.com>
8191
8192 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8193
8194 2015-05-22 Marek Polacek <polacek@redhat.com>
8195
8196 PR c/47043
8197 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8198
8199 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8200
8201 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8202 STACK_GROWS_DOWNWARD.
8203
8204 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8205
8206 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8207 STACK_GROWS_DOWNWARD rather than if it is defined.
8208
8209 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8210
8211 PR c/52952
8212 * c-format.c (location_column_from_byte_offset): New.
8213 (location_from_offset): New.
8214 (struct format_wanted_type): Add offset_loc field.
8215 (check_format_info): Move handling of location for extra arguments
8216 closer to the point of warning.
8217 (check_format_info_main): Pass the result of location_from_offset
8218 to warning_at.
8219 (format_type_warning): Pass the result of location_from_offset
8220 to warning_at.
8221
8222 2015-05-20 Marek Polacek <polacek@redhat.com>
8223
8224 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8225
8226 2015-05-20 Marek Polacek <polacek@redhat.com>
8227
8228 * c-ada-spec.c (dump_sloc): Use DECL_P.
8229
8230 2015-05-20 Marek Polacek <polacek@redhat.com>
8231
8232 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8233 * c-common.c: Likewise.
8234
8235 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8236
8237 * c-common.h (fe_file_change): Strengthen param from
8238 const line_map * to const line_map_ordinary *.
8239 (pp_file_change): Likewise.
8240 * c-lex.c (fe_file_change): Likewise.
8241 (cb_define): Use linemap_check_ordinary when invoking
8242 SOURCE_LINE.
8243 (cb_undef): Likewise.
8244 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8245 invoking cb_file_change.
8246 (c_finish_options): Likewise.
8247 (push_command_line_include): Likewise.
8248 (cb_file_change): Strengthen param "new_map" from
8249 const line_map * to const line_map_ordinary *.
8250 * c-ppoutput.c (cb_define): Likewise for local "map".
8251 (pp_file_change): Likewise for param "map" and local "from".
8252
8253 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8254
8255 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8256
8257 2015-05-18 Tom de Vries <tom@codesourcery.com>
8258
8259 * c-common.c (build_va_arg_1): New function.
8260 (build_va_arg): Add address operator to va_list operand if necessary.
8261
8262 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8263
8264 PR c/48956
8265 * c-common.c (int_safely_convertible_to_real_p): Define.
8266 (unsafe_conversion_p): Check conversions involving complex types.
8267 (conversion_warning): Add new warning message for conversions which
8268 discard imaginary component.
8269 * c-common.h: (enum conversion_safety): Add new enumerator for such
8270 conversions.
8271
8272 2015-05-14 Marek Polacek <polacek@redhat.com>
8273
8274 PR c/66066
8275 PR c/66127
8276 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8277 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8278 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8279 use it. If FOR_INT_CONST, require that all evaluated operands be
8280 INTEGER_CSTs.
8281
8282 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8283
8284 * c-common.h (warn_for_misleading_indentation): New prototype.
8285 * c-indentation.c: New file.
8286 * c.opt (Wmisleading-indentation): New option.
8287
8288 2015-05-12 Tom de Vries <tom@codesourcery.com>
8289
8290 PR tree-optimization/66010
8291 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8292
8293 2015-05-09 Jason Merrill <jason@redhat.com>
8294
8295 * c-opts.c (c_common_post_options): Also clear
8296 cpp_opts->cpp_warn_cxx11_compat.
8297
8298 * c-common.h (enum cxx_dialect): Add cxx_unset.
8299 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8300 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8301
8302 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8303 (std=gnu++0x): Mark as Undocumented.
8304 (std=gnu++1y): Add deprecated message.
8305
8306 2015-05-08 Jason Merrill <jason@redhat.com>
8307
8308 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8309 * c-opts.c: Adjust.
8310
8311 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8312
8313 2015-05-08 Marek Polacek <polacek@redhat.com>
8314
8315 PR c/64918
8316 * c.opt (Woverride-init-side-effects): New option.
8317
8318 2015-05-07 Marek Polacek <polacek@redhat.com>
8319
8320 PR c/65179
8321 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8322 negative value.
8323 * c.opt (Wshift-negative-value): New option.
8324 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8325 when -Wextra and C99/C++11 mode.
8326
8327 2015-05-07 Marek Polacek <polacek@redhat.com>
8328 Martin Uecker <uecker@eecs.berkeley.edu>
8329
8330 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8331 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8332
8333 2015-05-05 Jason Merrill <jason@redhat.com>
8334
8335 * c.opt (Wterminate): New.
8336
8337 2015-04-30 Marek Polacek <polacek@redhat.com>
8338
8339 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8340 require that the non-constant be of a boolean type.
8341
8342 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8343
8344 * c-common.c (handle_section_attribute): Refactor to reduce
8345 nesting and distinguish between error cases.
8346
8347 2015-04-29 Marek Polacek <polacek@redhat.com>
8348
8349 PR c/64610
8350 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8351 with 0/1.
8352
8353 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8354
8355 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8356 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8357 HOST_BITS_PER_WIDE_INT.
8358
8359 2015-04-28 Tom de Vries <tom@codesourcery.com>
8360
8361 PR tree-optimization/65887
8362 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8363
8364 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8365 Pierre-Marie de Rodat <derodat@adacore.com>
8366
8367 * c-ada-spec.c (in_function): Delete.
8368 (dump_generic_ada_node): Do not change in_function and remove the
8369 redundant code dealing with it.
8370 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8371 (print_ada_methods): Output the static member functions in a nested
8372 package after the regular methods as well as associated renamings.
8373
8374 2015-04-24 Marek Polacek <polacek@redhat.com>
8375
8376 PR c/65830
8377 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8378 and OPT_Wshift_count_overflow.
8379
8380 PR c/63357
8381 * c-common.c (warn_logical_operator): Warn if the operands have the
8382 same expressions.
8383
8384 2015-04-24 Marek Polacek <polacek@redhat.com>
8385
8386 PR c/61534
8387 * c-common.c (warn_logical_operator): Bail if either operand comes
8388 from a macro expansion.
8389
8390 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8391
8392 PR target/55143
8393 * c-common.c (c_default_pointer_mode): Add definition.
8394 * c-common.h (c_default_pointer_mode): Add declaration.
8395
8396 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8397
8398 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8399 on record_builtin_type argument.
8400
8401 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8402
8403 PR c/65120
8404 * c-common.c (warn_logical_not_parentheses): Don't warn for
8405 !x == 0 or !x != 0.
8406
8407 2015-03-07 Marek Polacek <polacek@redhat.com>
8408
8409 PR sanitizer/65280
8410 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8411 before trying to figure out whether we have a flexible array member.
8412
8413 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8414 Jonathan Wakely <jwakely.gcc@gmail.com>
8415
8416 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8417
8418 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8419
8420 PR ada/65319
8421 * c-ada-spec.c (print_destructor): Remove obsolete code.
8422
8423 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8424
8425 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8426 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8427 DECL_TEMPLATE_RESULT emulations.
8428 (dump_ada_template)): Add guard for TYPE_METHODS.
8429
8430 2015-02-27 Marek Polacek <polacek@redhat.com>
8431
8432 PR c/65040
8433 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8434
8435 2015-02-27 Kai Tietz <ktietz@redhat.com>
8436
8437 PR c/35330
8438 * c-pragma.c (handle_pragma_weak): Do not try to create
8439 weak/alias of declarations not being function, or variable
8440 declarations.
8441
8442 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8443
8444 PR libgomp/64625
8445 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8446 Remove macros.
8447 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8448
8449 2015-02-16 Marek Polacek <polacek@redhat.com>
8450
8451 PR c/65066
8452 * c-format.c (check_format_types): Handle null param.
8453
8454 2015-02-13 Marek Polacek <polacek@redhat.com>
8455
8456 PR c/65040
8457 * c-format.c (check_format_types): Don't warn about different
8458 signedness if the original value is in the range of WANTED_TYPE.
8459
8460 2015-02-12 Jason Merrill <jason@redhat.com>
8461
8462 PR c++/64956
8463 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8464 to the current highest version.
8465 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8466
8467 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8468
8469 PR c/64824
8470 PR c/64868
8471 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8472 instead of RDIV_EXPR. Use build_binary_op instead of
8473 build2_loc.
8474
8475 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8476
8477 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8478 to pass input_location as first argument.
8479
8480 2015-01-23 Tom de Vries <tom@codesourcery.com>
8481
8482 PR libgomp/64672
8483 * c.opt (fopenacc): Mark as LTO option.
8484
8485 2015-01-23 Tom de Vries <tom@codesourcery.com>
8486
8487 PR libgomp/64707
8488 * c.opt (fopenmp): Mark as LTO option.
8489
8490 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8491
8492 PR c/63307
8493 * cilk.c (fill_decls_vec): Only put decls into vector v.
8494 (compare_decls): Fix up formatting.
8495
8496 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8497
8498 PR c/63307
8499 * cilk.c: Include vec.h.
8500 (struct cilk_decls): New structure.
8501 (wrapper_parm_cb): Split this function to...
8502 (fill_decls_vec): ...this...
8503 (create_parm_list): ...and this.
8504 (compare_decls): New function.
8505 (for_local_cb): Remove.
8506 (wrapper_local_cb): Ditto.
8507 (build_wrapper_type): For now first traverse and fill vector of
8508 declarations then sort it and then deal with sorted vector.
8509 (cilk_outline): Ditto.
8510 (declare_one_free_variable): Ditto.
8511
8512 2015-01-21 Jason Merrill <jason@redhat.com>
8513
8514 PR c++/64629
8515 * c-format.c (check_format_arg): Call decl_constant_value.
8516
8517 2015-01-19 Martin Liska <mliska@suse.cz>
8518
8519 * c-common.c (handle_noicf_attribute): New function.
8520
8521 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8522 Bernd Schmidt <bernds@codesourcery.com>
8523 James Norris <jnorris@codesourcery.com>
8524 Cesar Philippidis <cesar@codesourcery.com>
8525 Ilmir Usmanov <i.usmanov@samsung.com>
8526 Jakub Jelinek <jakub@redhat.com>
8527
8528 * c.opt (fopenacc): New option.
8529 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8530 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8531 New macros.
8532 * c-common.h (c_finish_oacc_wait): New prototype.
8533 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8534 (c_finish_oacc_wait): New function.
8535 * c-pragma.c (oacc_pragmas): New variable.
8536 (c_pp_lookup_pragma, init_pragma): Handle it.
8537 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8538 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8539 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8540 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8541 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8542 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8543 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8544 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8545 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8546 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8547 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8548 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8549 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8550 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8551 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8552 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8553 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8554 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8555 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8556 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8557 PRAGMA_OACC_CLAUSE_WORKER.
8558
8559 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8560
8561 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8562 for the new option fstack-protector_explicit.
8563 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8564 (handle_stack_protect_attribute): New function.
8565
8566 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8567
8568 * c.opt: New option -Warray-bounds=.
8569
8570 2015-01-09 Michael Collison <michael.collison@linaro.org>
8571
8572 * array-notation-common.c: Include hash-set.h, machmode.h,
8573 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8574 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8575 * c-ada-spec.c: Ditto.
8576 * c-cilkplus.c: Ditto.
8577 * c-common.c: Include input.h due to flattening of tree.h.
8578 Define macro GCC_C_COMMON_C.
8579 * c-common.h: Flatten tree.h header files into c-common.h.
8580 Remove include of tree-core.h.
8581 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8582 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8583 fold-const.h, wide-int.h, and inchash.h due to
8584 flattening of tree.h.
8585 * c-dump.c: Ditto.
8586 * c-format.c: Flatten tree.h header files into c-common.h.
8587 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8588 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8589 fold-const.h, wide-int.h, and inchash.h due to
8590 flattening of tree.h.
8591 * c-dump.c: Include hash-set.h, machmode.h,
8592 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8593 fold-const.h, wide-int.h, and inchash.h due to
8594 flattening of tree.h.
8595 * c-format.c: Include hash-set.h, machmode.h,
8596 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8597 fold-const.h, wide-int.h, inchash.h and real.h due to
8598 flattening of tree.h.
8599 * c-gimplify.c: Include hash-set.h, machmode.h,
8600 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8601 fold-const.h, wide-int.h, and inchash.h due to
8602 flattening of tree.h.
8603 * cilk.c: Ditto.
8604 * c-lex.c: Ditto.
8605 * c-omp.c: Ditto.
8606 * c-opts.c: Ditto.
8607 * c-pch.c: Ditto.
8608 * c-ppoutput.c: Ditto.
8609 * c-pragma.c: Ditto.
8610 * c-pretty-print.c: Ditto.
8611 * c-semantics.c: Ditto.
8612 * c-ubsan.c: Ditto.
8613 * stub-objc.c: Ditto.
8614
8615 2015-01-08 Jason Merrill <jason@redhat.com>
8616
8617 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8618 do_ubsan_in_current_function.
8619 (ubsan_maybe_instrument_reference_or_call): Likewise.
8620 * c-ubsan.h: Declare it.
8621
8622 2015-01-08 Mike Stump <mikestump@comcast.net>
8623
8624 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8625
8626 2015-01-07 Marek Polacek <polacek@redhat.com>
8627
8628 PR c/64440
8629 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8630 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8631
8632 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8633
8634 PR c++/31397
8635 * c.opt (Wsuggest-override): New option.
8636
8637 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8638
8639 Update copyright years.
8640
8641 2015-01-05 Marek Polacek <polacek@redhat.com>
8642
8643 PR c/64423
8644 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8645 parameter. Use it.
8646 * c-common.h (warn_array_subscript_with_type_char): Update
8647 declaration.
8648
8649 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8650
8651 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8652 Control macro with flag_sized_deallocation.
8653
8654 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8655
8656 * c.opt (Wdiscarded-array-qualifiers): New option.
8657
8658 2014-12-19 Jakub Jelinek <jakub@redhat.com>
8659
8660 PR preprocessor/63831
8661 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8662 and __has_cpp_attribute here.
8663 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8664 c_common_has_attribute.
8665 * c-common.h (c_common_has_attribute): New prototype.
8666 * c-lex.c (init_c_lex): Set cb->has_attribute to
8667 c_common_has_attribute instead of cb_has_attribute.
8668 (get_token_no_padding): New function.
8669 (cb_has_attribute): Renamed to ...
8670 (c_common_has_attribute): ... this. No longer static. Use
8671 get_token_no_padding, require ()s, don't build TREE_LIST
8672 unnecessarily, fix up formatting, adjust diagnostics, call
8673 init_attributes.
8674
8675 2014-12-15 Jason Merrill <jason@redhat.com>
8676
8677 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8678 (-Wsized-deallocation): New.
8679 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8680 to on in C++14 and up.
8681
8682 2014-12-11 Jason Merrill <jason@redhat.com>
8683
8684 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8685
8686 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8687 we aren't complaining about VLAs.
8688
8689 2014-12-06 Marek Polacek <polacek@redhat.com>
8690
8691 PR tree-optimization/64183
8692 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8693 shift-expression if it is integer_type_node. Use types_compatible_p.
8694
8695 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8696
8697 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8698 last argument from create_tmp_var_raw and create_tmp_var calls.
8699 * cilk.c (gimplify_cilk_spawn): Likewise.
8700 * c-omp.c (c_finish_omp_atomic): Likewise.
8701
8702 2014-11-28 Marek Polacek <polacek@redhat.com>
8703
8704 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8705 instead of unsigned_type_node.
8706
8707 2014-11-28 Marek Polacek <polacek@redhat.com>
8708
8709 PR c/63862
8710 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8711 to op1_utype.
8712 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8713 expression to unsigned_type_node.
8714
8715 2014-11-20 Mark Wielaard <mjw@redhat.com>
8716
8717 PR debug/38757
8718 * c-opts.c (set_std_c89): Set lang_hooks.name.
8719 (set_std_c99): Likewise.
8720 (set_std_c11): Likewise.
8721 (set_std_cxx98): Likewise.
8722 (set_std_cxx11): Likewise.
8723 (set_std_cxx14): Likewise.
8724 (set_std_cxx1z): Likewise.
8725
8726 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8727
8728 PR target/63764
8729 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8730 return type to bool.
8731 * c-common.c: Include gimple-expr.h.
8732 (convert_vector_to_pointer_for_subscript): Change return type to
8733 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8734 and copy it into a TARGET_EXPR and use that instead of *vecp
8735 directly.
8736
8737 2014-11-19 David Malcolm <dmalcolm@redhat.com>
8738
8739 Merger of git branch "gimple-classes-v2-option-3".
8740 * ChangeLog.gimple-classes: New.
8741 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8742 from being just a vec<gimple> to a vec<gbind *>.
8743
8744 2014-11-18 Jakub Jelinek <jakub@redhat.com>
8745
8746 PR sanitizer/63813
8747 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8748 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8749 get_pointer_alignment for non-pointers. Use ptype, or if it is
8750 reference type, corresponding pointer type, as type of kind
8751 argument.
8752 (ubsan_maybe_instrument_reference,
8753 ubsan_maybe_instrument_member_call): Adjust callers.
8754
8755 2014-11-15 Marek Polacek <polacek@redhat.com>
8756
8757 PR middle-end/63884
8758 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8759 for NULL fndecl.
8760 (extract_array_notation_exprs): Return for NULL node.
8761
8762 2014-11-12 Joseph Myers <joseph@codesourcery.com>
8763
8764 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8765 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8766
8767 2014-11-12 Jakub Jelinek <jakub@redhat.com>
8768
8769 PR c/59708
8770 * c-common.c (check_builtin_function_arguments): Handle
8771 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8772
8773 2014-11-10 Andi Kleen <ak@linux.intel.com>
8774
8775 PR c/60804
8776 * c-common.h (check_no_cilk): Declare.
8777 * cilk.c (get_error_location): New function.
8778 (check_no_cilk): Dito.
8779
8780 2014-11-10 Andi Kleen <ak@linux.intel.com>
8781
8782 * cilk.c (recognize_spawn): Use expression location
8783 for error message.
8784
8785 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8786
8787 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8788
8789 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8790
8791 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8792 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8793 (__cpp_range_based_for, __cpp_initializer_lists,
8794 __cpp_delegating_constructors, __cpp_nsdmi,
8795 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8796 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8797 __has_cpp_attribute.
8798 * c-lex.c (cb_has_attribute): New callback CPP function;
8799 (init_c_lex): Set has_attribute callback.
8800
8801 2014-11-04 Richard Biener <rguenther@suse.de>
8802
8803 * c-common.c (shorten_compare): Do not shorten mixed
8804 DFP and non-DFP compares.
8805
8806 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8807
8808 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8809 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8810 Commentary and rearrangement of tests.
8811 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8812 Commentary and rearrangement of tests.
8813 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8814 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8815
8816 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8817
8818 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8819 enum from machine_mode.
8820
8821 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8822
8823 * c-common.c: Adjust include files.
8824 * c-gimplify.c: Ditto.
8825 * cilk.c: Ditto.
8826 * c-pragma.c: Ditto.
8827 * c-ubsan.c: Ditto.
8828
8829 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8830
8831 * c-gimplify.c: Adjust include files.
8832
8833 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8834
8835 PR c++/53061
8836 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8837 c_common_initialize_diagnostics.
8838 * c-common.h: Likewise.
8839
8840 2014-10-24 Marek Polacek <polacek@redhat.com>
8841
8842 PR c/56980
8843 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8844 print "struct"/"union"/"enum" for typedefed names.
8845
8846 2014-10-23 Marek Polacek <polacek@redhat.com>
8847
8848 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8849 in unsigned type.
8850
8851 2014-10-22 Jakub Jelinek <jakub@redhat.com>
8852 Yury Gribov <y.gribov@samsung.com>
8853
8854 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8855 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8856 instead of flag_sanitize_recover as bool flag.
8857
8858 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8859
8860 * cilk.c: Revert previous change.
8861
8862 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8863
8864 PR c/63307
8865 * cilk.c: Include vec.h.
8866 (struct cilk_decls): New structure.
8867 (wrapper_parm_cb): Split this function to...
8868 (fill_decls_vec): ...this...
8869 (create_parm_list): ...and this.
8870 (compare_decls): New function.
8871 (for_local_cb): Remove.
8872 (wrapper_local_cb): Ditto.
8873 (build_wrapper_type): For now first traverse and fill vector of
8874 declarations then sort it and then deal with sorted vector.
8875 (cilk_outline): Ditto.
8876 (declare_one_free_variable): Ditto.
8877
8878 2014-10-17 Marek Polacek <polacek@redhat.com>
8879
8880 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8881 * c.opt (Wimplicit-int): Initialize to -1.
8882
8883 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8884
8885 * c-pragma.c: Adjust include files.
8886 * c-semantics.c: Likewise.
8887
8888 2014-10-16 DJ Delorie <dj@redhat.com>
8889
8890 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8891 multiples of bytes.
8892
8893 2014-10-14 Jason Merrill <jason@redhat.com>
8894
8895 PR c++/63455
8896 * c-common.h (CPP_PREPARSED_EXPR): New.
8897 (N_CP_TTYPES): Adjust.
8898
8899 2014-10-15 Marek Polacek <polacek@redhat.com>
8900
8901 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8902
8903 2014-10-14 DJ Delorie <dj@redhat.com>
8904
8905 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8906 types, not just __int128.
8907 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8908 types, not just __int128.
8909 (cpp_atomic_builtins): Round pointer sizes up.
8910 (type_suffix): Use type precision, not specific types.
8911 * c-common.c (c_common_reswords): Remove __int128 special case.
8912 (c_common_type_for_size): Check for all __intN types, not just
8913 __int128.
8914 (c_common_type_for_mode): Likewise.
8915 (c_common_signed_or_unsigned_type): Likewise.
8916 (c_build_bitfield_integer_type): Likewise.
8917 (c_common_nodes_and_builtins): Likewise.
8918 (keyword_begins_type_specifier): Likewise.
8919 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8920 __intN variants.
8921
8922 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8923
8924 * c-common.c: Use hash_table instead of hashtab.
8925
8926 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8927
8928 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8929 C++11 section.
8930
8931 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
8932
8933 PR c++/54427
8934 PR c++/57198
8935 PR c++/58845
8936 * c-common.c (warn_logical_operator): Punt for vectors.
8937
8938 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8939
8940 Implement SD-6: SG10 Feature Test Recommendations
8941 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8942 macros and the __has_header macro.
8943
8944 2014-09-30 Jason Merrill <jason@redhat.com>
8945
8946 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8947 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8948 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8949
8950 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8951 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8952
8953 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8954 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8955
8956 2014-09-24 Marek Polacek <polacek@redhat.com>
8957
8958 PR c/61405
8959 PR c/53874
8960 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8961
8962 2014-09-23 Andi Kleen <ak@linux.intel.com>
8963
8964 * c-common.c (handle_no_reorder_attribute): New function.
8965 (c_common_attribute_table): Add no_reorder attribute.
8966
8967 2014-09-22 Joseph Myers <joseph@codesourcery.com>
8968
8969 * c-cppbuiltin.c (c_cpp_builtins): Define
8970 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8971 modes.
8972
8973 2014-09-18 Joseph Myers <joseph@codesourcery.com>
8974
8975 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8976 for supported floating-point modes.
8977
8978 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8979
8980 * c.opt (Wpsabi): Use LangEnabledBy.
8981 * c-opts.c (c_common_handle_option): Do not handle here.
8982
8983 2014-09-12 Joseph Myers <joseph@codesourcery.com>
8984
8985 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8986 macros for floating-point modes.
8987
8988 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
8989
8990 PR target/58757
8991 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8992 __*_DENORM_MIN__ without denormals.
8993
8994 2014-09-10 Jakub Jelinek <jakub@redhat.com>
8995
8996 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8997 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8998 ubsan_create_data callers.
8999 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9000 index is constant or BIT_AND_EXPR with constant mask and is
9001 small enough for the bound.
9002 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9003 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9004
9005 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9006
9007 * c.opt: Add CppReason to various flags.
9008 (Wdate-time): Re-sort.
9009 * c-common.c: Include c-common.h earlier.
9010 (struct reason_option_codes_t): Delete.
9011 (c_option_controlling_cpp_error): Prefix global type and struct
9012 with cpp_.
9013
9014 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9015
9016 * c.opt (Wnormalized): New.
9017 (Wnormalized=): Use Enum and Reject Negative.
9018 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9019
9020 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9021
9022 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9023 digits of floating-point modes if -fbuilding-libgcc.
9024
9025 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9026
9027 * c-cppbuiltin.c (c_cpp_builtins): Also define
9028 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9029 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9030 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9031 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9032 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9033 __LIBGCC_STACK_GROWS_DOWNWARD__,
9034 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9035 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9036 __LIBGCC_DWARF_FRAME_REGISTERS__,
9037 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9038 __LIBGCC_STACK_POINTER_REGNUM__ and
9039 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9040 (builtin_define_with_value): Handle backslash-escaping in string
9041 macro values.
9042
9043 2014-09-05 Richard Biener <rguenther@suse.de>
9044
9045 PR middle-end/63148
9046 * c-format.c (check_format_arg): Properly handle
9047 effectively signed POINTER_PLUS_EXPR offset.
9048
9049 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9050
9051 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9052 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9053 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9054 and Init.
9055 * c-opts.c (c_common_handle_option): Do not handle here.
9056 (sanitize_cpp_opts): Likewise.
9057 * c-common.c (struct reason_option_codes_t): Handle
9058 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9059
9060 2014-09-03 Marek Polacek <polacek@redhat.com>
9061
9062 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9063
9064 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9065 Balaji V. Iyer <balaji.v.iyer@intel.com>
9066 Igor Zamyatin <igor.zamyatin@intel.com>
9067
9068 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9069 * c-common.c (c_common_reswords): Added _Cilk_for.
9070 * c-common.h (enum rid): Added RID_CILK_FOR.
9071 (cilk_for_number_of_iterations): Add declaration.
9072 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9073 CILK_FOR.
9074 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9075 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9076
9077 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9078
9079 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9080 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9081 Wundef): Use CPP, Var and Init.
9082 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9083
9084 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9085
9086 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9087 * c-opts.c (c_common_handle_option): Do not handle here.
9088
9089 2014-08-25 Jason Merrill <jason@redhat.com>
9090
9091 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9092 -std=c++14 and -std=gnu++14, rather than the reverse.
9093 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9094 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9095 * c-common.h (cxx_dialect): Remove cxx1y.
9096
9097 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9098
9099 * c-common.h (enum cxx_dialect): Add cxx14.
9100 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9101 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9102 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9103
9104 2014-08-22 Jason Merrill <jason@redhat.com>
9105
9106 * c.opt (std=gnu++17): Fix alias.
9107
9108 2014-08-22 Marek Polacek <polacek@redhat.com>
9109
9110 PR c++/62199
9111 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9112 check for vector types. Drop LHS argument.
9113 * c-common.h (warn_logical_not_parentheses): Adjust.
9114
9115 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9116
9117 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9118 (Wmultichar): Likewise.
9119 (Wdate-time): Use C-family languages instead of Common. Use CPP
9120 and Var.
9121 * c-opts.c (c_common_handle_option): Do not handle the above
9122 options here.
9123 (sanitize_cpp_opts): Likewise.
9124
9125 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9126
9127 PR fortran/44054
9128 * c-opts.c: Include tree-diagnostics.h.
9129 (c_diagnostic_finalizer): New.
9130 (c_common_initialize_diagnostics): Use it.
9131
9132 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9133
9134 PR preprocessor/51303
9135 * c-common.c (struct reason_option_codes_t option_codes):
9136 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9137
9138 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9139
9140 PR c/60975
9141 PR c/53063
9142 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9143 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9144 (c_common_post_options): Call init_global_opts_from_cpp.
9145 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9146
9147 2014-08-19 Marek Polacek <polacek@redhat.com>
9148
9149 PR c++/62153
9150 * c-common.c (maybe_warn_bool_compare): New function.
9151 * c-common.h (maybe_warn_bool_compare): Declare.
9152 * c.opt (Wbool-compare): New option.
9153
9154 2014-08-19 Marek Polacek <polacek@redhat.com>
9155
9156 * c.opt (Wc99-c11-compat): New option.
9157
9158 2014-08-19 Marek Polacek <polacek@redhat.com>
9159
9160 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9161 to warn_c90_c99_compat.
9162 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9163 to -1.
9164
9165 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9166 Steven Bosscher <steven@gcc.gnu.org>
9167
9168 PR c/52952
9169 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9170 format_check_results.
9171 (check_function_format): Use true and add comment for boolean
9172 argument.
9173 (finish_dollar_format_checking): Use explicit location when warning.
9174 (check_format_info): Likewise.
9175 (check_format_arg): Set extra_arg_loc and format_string_loc.
9176 (check_format_info_main): Use explicit location when warning.
9177 (check_format_types): Pass explicit location.
9178 (format_type_warning): Likewise.
9179
9180 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9181
9182 PR fortran/44054
9183 * c-format.c: Handle Fortran flags.
9184
9185 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9186
9187 PR other/61962
9188 * array-notation-common.c (find_rank): Added handling for other
9189 types of references.
9190
9191 2014-08-10 Marek Polacek <polacek@redhat.com>
9192
9193 PR c/51849
9194 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9195 * c.opt (Wc90-c99-compat): Add option.
9196
9197 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9198
9199 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9200
9201 2014-08-03 Marek Polacek <polacek@redhat.com>
9202
9203 * c-common.c (check_case_value): Add location_t parameter. Use it.
9204 (c_add_case_label): Pass loc to check_case_value.
9205
9206 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9207
9208 * cilk.c: Use hash_map instead of pointer_map.
9209
9210 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9211
9212 * c-gimplify.c: Use hash_set instead of pointer_set.
9213
9214 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9215
9216 PR middle-end/61455
9217 * array-notation-common.c (extract_array_notation_exprs): Handling
9218 of DECL_EXPR added.
9219
9220 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9221
9222 * c-common.h (min_align_of_type): Removed prototype.
9223 * c-common.c (min_align_of_type): Removed.
9224 * c-ubsan.h (ubsan_maybe_instrument_reference,
9225 ubsan_maybe_instrument_member_call): New prototypes.
9226 * c-ubsan.c: Include stor-layout.h and builtins.h.
9227 (ubsan_maybe_instrument_reference_or_call,
9228 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9229 functions.
9230
9231 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9232
9233 PR c++/60517
9234 * c.opt (-Wreturn-local-addr): Move to common.opt.
9235
9236 2014-07-30 Jason Merrill <jason@redhat.com>
9237
9238 PR c++/61659
9239 PR c++/61687
9240 Revert:
9241 * c.opt (-fuse-all-virtuals): New.
9242
9243 2014-07-30 Tom Tromey <tromey@redhat.com>
9244
9245 PR c/59855
9246 * c.opt (Wdesignated-init): New option.
9247 * c-common.c (c_common_attribute_table): Add "designated_init".
9248 (handle_designated_init): New function.
9249
9250 2014-07-24 Marek Polacek <polacek@redhat.com>
9251
9252 PR c/57653
9253 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9254
9255 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9256
9257 PR preprocessor/60723 - missing system-ness marks for macro tokens
9258 * c-ppoutput.c (struct print::prev_was_system_token): New data
9259 member.
9260 (init_pp_output): Initialize it.
9261 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9262 (do_line_change): Return a flag saying if a line marker was
9263 emitted or not.
9264 (scan_translation_unit): Detect if the system-ness of the token we
9265 are about to emit is different from the one of the previously
9266 emitted token. If so, emit a line marker. Avoid emitting useless
9267 adjacent line markers. Avoid emitting line markers for tokens
9268 originating from the expansion of built-in macros.
9269 (scan_translation_unit_directives_only): Adjust.
9270
9271 2014-07-15 Marek Polacek <polacek@redhat.com>
9272
9273 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9274 TYPE_MAX_VALUE is NULL.
9275
9276 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9277
9278 PR middle-end/61294
9279 * c.opt (Wmemset-transposed-args): New warning.
9280
9281 2014-07-10 Jason Merrill <jason@redhat.com>
9282
9283 PR c++/61659
9284 PR c++/61687
9285 * c.opt (-fuse-all-virtuals): New.
9286
9287 2014-07-09 Richard Biener <rguenther@suse.de>
9288
9289 PR c-family/61741
9290 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9291 using unsigned arithmetic if overflow does not wrap instead of
9292 if overflow is undefined.
9293
9294 2014-07-06 Marek Polacek <polacek@redhat.com>
9295
9296 PR c/6940
9297 * c.opt (Wsizeof-array-argument): New option.
9298
9299 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9300
9301 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9302 comments->count <= 1, as comments->entries might be NULL.
9303
9304 2014-07-01 Marek Polacek <polacek@redhat.com>
9305
9306 * c.opt (Wint-conversion): New option.
9307
9308 2014-07-01 Marek Polacek <polacek@redhat.com>
9309
9310 PR c/58286
9311 * c.opt (Wincompatible-pointer-types): New option.
9312
9313 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9314
9315 PR c++/51400
9316 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9317 Do not discard TYPE_QUALS of type.
9318
9319 2014-06-26 Jason Merrill <jason@redhat.com>
9320
9321 * c-common.h (enum cxx_dialect): Add cxx1z.
9322 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9323 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9324
9325 2014-06-26 Teresa Johnson <tejohnson@google.com>
9326
9327 * c-common.h (get_dump_info): Declare.
9328 * c-gimplify.c (c_genericize): Use saved dump files.
9329 * c-opts.c (c_common_parse_file): Begin and end dumps
9330 once around parsing invocation.
9331 (get_dump_info): New function.
9332
9333 2014-06-23 Marek Polacek <polacek@redhat.com>
9334 Andrew MacLeod <amacleod@redhat.com>
9335
9336 PR c/61553
9337 * c-common.c (get_atomic_generic_size): Don't segfault if the
9338 type doesn't have a size.
9339
9340 2014-06-20 Marek Polacek <polacek@redhat.com>
9341
9342 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9343 (ubsan_walk_array_refs_r): New function.
9344 (c_genericize): Instrument array bounds.
9345 * c-ubsan.c: Include "internal-fn.h".
9346 (ubsan_instrument_division): Mark instrumented arrays as having
9347 side effects. Adjust ubsan_type_descriptor call.
9348 (ubsan_instrument_shift): Likewise.
9349 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9350 (ubsan_instrument_bounds): New function.
9351 (ubsan_array_ref_instrumented_p): New function.
9352 (ubsan_maybe_instrument_array_ref): New function.
9353 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9354 (ubsan_array_ref_instrumented_p): Declare.
9355 (ubsan_maybe_instrument_array_ref): Declare.
9356
9357 2014-06-20 Hale Wang <hale.wang@arm.com>
9358
9359 PR lto/61123
9360 * c.opt (fshort-enums): Add to LTO.
9361 * c.opt (fshort-wchar): Likewise.
9362
9363 2014-06-16 Marek Polacek <polacek@redhat.com>
9364
9365 PR c/60439
9366 * c.opt (Wswitch-bool): Add Var.
9367
9368 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9369
9370 PR middle-end/61486
9371 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9372 #pragma omp target teams or
9373 #pragma omp {,target }teams distribute simd.
9374
9375 2014-06-12 Jason Merrill <jason@redhat.com>
9376
9377 * c.opt (Wabi=, fabi-compat-version): New.
9378 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9379 (c_common_post_options): Handle flag_abi_compat_version default.
9380 Disallow -fabi-compat-version=1.
9381 * c-common.h (abi_version_crosses): New.
9382
9383 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9384
9385 * c-common.c (handle_section_attribute): Update handling for
9386 section names that are no longer trees.
9387
9388 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9389
9390 PR fortran/60928
9391 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9392 (omp_pragmas): ... back here.
9393
9394 2014-06-05 Marek Polacek <polacek@redhat.com>
9395
9396 PR c/49706
9397 * c-common.c (warn_logical_not_parentheses): New function.
9398 * c-common.h (warn_logical_not_parentheses): Declare.
9399 * c.opt (Wlogical-not-parentheses): New option.
9400
9401 2014-06-04 Marek Polacek <polacek@redhat.com>
9402
9403 PR c/30020
9404 * c-common.c (check_case_bounds): Add location parameter.
9405 Use it.
9406 (c_add_case_label): Pass loc to check_case_bounds.
9407
9408 2014-06-03 Marek Polacek <polacek@redhat.com>
9409
9410 PR c/60439
9411 * c.opt (Wswitch-bool): New option.
9412
9413 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9414
9415 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9416 Remove prototypes.
9417 (record_types_used_by_current_var_decl): Move prototype to where
9418 it belongs.
9419
9420 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9421 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9422 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9423
9424 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9425
9426 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9427 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9428 void_zero_node.
9429 * c-pretty-print.c (pp_c_void_constant): New function.
9430 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9431 (c_pretty_printer::expression): Handle VOID_CST.
9432 * cilk.c (extract_free_variables): Likewise.
9433 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9434 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9435
9436 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9437
9438 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9439 * c-pragma.c (push_alignment): Adjust.
9440 (handle_pragma_push_options): Likewise.
9441
9442 2014-05-09 Marek Polacek <polacek@redhat.com>
9443
9444 PR c/50459
9445 * c-common.c (check_user_alignment): Return -1 if alignment is error
9446 node.
9447 (handle_aligned_attribute): Don't call default_conversion on
9448 FUNCTION_DECLs.
9449 (handle_vector_size_attribute): Likewise.
9450 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9451 (handle_sentinel_attribute): Call default_conversion and allow even
9452 integral types as an argument.
9453
9454 2014-05-08 Marek Polacek <polacek@redhat.com>
9455
9456 PR c/61053
9457 * c-common.c (min_align_of_type): New function factored out from...
9458 (c_sizeof_or_alignof_type): ...here.
9459 * c-common.h (min_align_of_type): Declare.
9460
9461 2014-05-08 Marek Polacek <polacek@redhat.com>
9462
9463 PR c/61077
9464 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9465 parameter type of main.
9466
9467 2014-05-07 DJ Delorie <dj@redhat.com>
9468
9469 * c-cppbuiltin.c (print_bits_of_hex): New.
9470 (builtin_define_type_minmax): Print values using hex so as not to
9471 require a pre-computed list of string values.
9472
9473 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9474 Mike Stump <mikestump@comcast.net>
9475 Richard Sandiford <rdsandiford@googlemail.com>
9476
9477 * c-ada-spec.c: Include wide-int.h.
9478 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9479 (dump_generic_ada_node): Use wide-int interfaces.
9480 * c-common.c: Include wide-int-print.h.
9481 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9482 (pointer_int_sum): Use wide-int interfaces.
9483 (c_common_nodes_and_builtins): Use make_int_cst.
9484 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9485 (handle_alloc_size_attribute): Use wide-int interfaces.
9486 (get_nonnull_operand): Likewise.
9487 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9488 * c-lex.c: Include wide-int.h.
9489 (narrowest_unsigned_type): Take a widest_int rather than two
9490 HOST_WIDE_INTs.
9491 (narrowest_signed_type): Likewise.
9492 (interpret_integer): Update accordingly. Use wide-int interfaces.
9493 (lex_charconst): Use wide-int interfaces.
9494 * c-pretty-print.c: Include wide-int.h.
9495 (pp_c_integer_constant): Use wide-int interfaces.
9496 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9497 INT_CST_LT_UNSIGNED.
9498
9499 2014-05-06 Richard Biener <rguenther@suse.de>
9500
9501 * c-opts.c (c_common_post_options): For -freestanding,
9502 -fno-hosted and -fno-builtin disable pattern recognition
9503 if not enabled explicitely.
9504
9505 2014-05-02 Marek Polacek <polacek@redhat.com>
9506
9507 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9508
9509 2014-05-01 Marek Polacek <polacek@redhat.com>
9510
9511 PR c/43245
9512 * c.opt (Wdiscarded-qualifiers): Add.
9513
9514 2014-04-30 Marek Polacek <polacek@redhat.com>
9515
9516 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9517 INT_MIN / -1 sanitization only for integer types.
9518
9519 2014-04-25 Marek Polacek <polacek@redhat.com>
9520
9521 PR c/18079
9522 * c-common.c (handle_noinline_attribute): Warn if the attribute
9523 conflicts with always_inline attribute.
9524 (handle_always_inline_attribute): Warn if the attribute conflicts
9525 with noinline attribute.
9526
9527 2014-04-25 Marek Polacek <polacek@redhat.com>
9528
9529 PR c/60156
9530 * c-common.c (check_main_parameter_types): Warn about variadic main.
9531
9532 2014-04-24 Mike Stump <mikestump@comcast.net>
9533
9534 * c.opt (Wshadow-ivar): Default to on.
9535
9536 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9537
9538 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9539
9540 2014-04-23 Marek Polacek <polacek@redhat.com>
9541
9542 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9543
9544 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9545
9546 PR sanitizer/60275
9547 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9548 if flag_sanitize_undefined_trap_on_error.
9549 (ubsan_instrument_division, ubsan_instrument_shift,
9550 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9551 if !flag_sanitize_recover.
9552
9553 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9554
9555 PR libstdc++/43622
9556 * c-common.c (registered_builtin_types): Make non-static.
9557 * c-common.h (registered_builtin_types): Declare.
9558
9559 2014-04-14 Richard Biener <rguenther@suse.de>
9560 Marc Glisse <marc.glisse@inria.fr>
9561
9562 PR c/60819
9563 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9564 apply may-alias the scalar pointer type when applicable.
9565
9566 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9567
9568 PR middle-end/60467
9569 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9570 as possible argument for Cilk_spawn.
9571
9572 2014-04-11 Tobias Burnus <burnus@net-b.de>
9573
9574 PR c/60194
9575 * c.opt (Wformat-signedness): Add
9576 * c-format.c(check_format_types): Use it.
9577
9578 2014-04-11 Jason Merrill <jason@redhat.com>
9579
9580 PR c++/57926
9581 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9582 default_conversion for an array argument.
9583
9584 2014-04-08 Marek Polacek <polacek@redhat.com>
9585
9586 PR sanitizer/60745
9587 * c-ubsan.c: Include asan.h.
9588 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9589
9590 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9591
9592 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9593
9594 2014-04-02 Marek Polacek <polacek@redhat.com>
9595
9596 * c-common.h (c_expand_expr): Remove declaration.
9597
9598 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9599
9600 PR c++/60689
9601 * c-common.c (add_atomic_size_parameter): When creating new
9602 params vector, push the size argument first.
9603
9604 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9605
9606 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9607 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9608 ubsan_create_data callers.
9609
9610 2014-03-22 Jakub Jelinek <jakub@redhat.com>
9611
9612 PR debug/60603
9613 * c-opts.c (c_finish_options): Restore cb_file_change call to
9614 <built-in>.
9615
9616 2014-03-13 Jakub Jelinek <jakub@redhat.com>
9617
9618 PR middle-end/36282
9619 * c-pragma.c (apply_pragma_weak): Only look at
9620 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9621 DECL_ASSEMBLER_NAME_SET_P (decl).
9622 (maybe_apply_pending_pragma_weaks): Exit early if
9623 vec_safe_is_empty (pending_weaks) rather than only when
9624 !pending_weaks.
9625 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9626 set assembler name back to NULL afterwards.
9627
9628 2014-03-11 Jason Merrill <jason@redhat.com>
9629
9630 * c.opt: Add -std=gnu++14.
9631
9632 2014-03-11 Ian Bolton <ian.bolton@arm.com>
9633
9634 * c-opts.c (c_common_post_options): Don't override
9635 -ffp-contract=fast if unsafe-math-optimizations is on.
9636
9637 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
9638
9639 * c.opt: Enable LTO FE for fshort-double.
9640
9641 2014-03-07 Jason Merrill <jason@redhat.com>
9642
9643 * c.opt: Add -std=c++14.
9644
9645 2014-03-06 Marek Polacek <polacek@redhat.com>
9646
9647 PR c/60197
9648 * cilk.c (contains_cilk_spawn_stmt): New function.
9649 (contains_cilk_spawn_stmt_walker): Likewise.
9650 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9651 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9652
9653 2014-03-03 Jakub Jelinek <jakub@redhat.com>
9654
9655 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9656 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9657 even when flag_preprocess_only.
9658
9659 2014-02-26 Jason Merrill <jason@redhat.com>
9660
9661 PR c++/59231
9662 PR c++/11586
9663 * c-common.c (shorten_compare): Don't check
9664 c_inhibit_evaluation_warnings.
9665
9666 2014-02-19 Jakub Jelinek <jakub@redhat.com>
9667
9668 PR c/37743
9669 * c-common.c (c_common_nodes_and_builtins): When initializing
9670 c_uint{16,32,64}_type_node, also set corresponding
9671 uint{16,32,64}_type_node to the same value.
9672
9673 PR c++/60267
9674 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9675 for PRAGMA_IVDEP if flag_preprocess_only.
9676
9677 2014-02-12 Jakub Jelinek <jakub@redhat.com>
9678
9679 PR c/60101
9680 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9681 if false, add ADD itself, rather than vice versa.
9682 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9683 copy. For SAVE_EXPR, only call merge_tlist once.
9684
9685 2014-02-08 Jakub Jelinek <jakub@redhat.com>
9686
9687 PR middle-end/60092
9688 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9689 and tree_to_uhwi.
9690 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9691 functions.
9692 (c_common_attribute_table): Add alloc_align and assume_aligned
9693 attributes.
9694
9695 2014-02-06 Marek Polacek <polacek@redhat.com>
9696
9697 PR c/60087
9698 * c-common.c (warn_for_sign_compare): Call warning_at with location
9699 instead of warning.
9700
9701 2014-02-05 Marek Polacek <polacek@redhat.com>
9702
9703 PR c/53123
9704 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9705 statement.
9706
9707 2014-02-04 Marek Polacek <polacek@redhat.com>
9708
9709 PR c/60036
9710 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9711 SAVE_EXPR.
9712
9713 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
9714
9715 PR c++/53017
9716 PR c++/59211
9717 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9718 handle_vector_size_attribute, handle_nonnull_attribute): Call
9719 default_conversion on the attribute argument.
9720 (handle_nonnull_attribute): Increment the argument number.
9721
9722 2014-01-31 Marek Polacek <polacek@redhat.com>
9723
9724 PR c/59963
9725 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9726 build_function_call_vec.
9727 (resolve_overloaded_builtin): Likewise.
9728 * c-common.h (build_function_call_vec): Adjust declaration.
9729
9730 2014-01-30 Marek Polacek <polacek@redhat.com>
9731
9732 PR c/59940
9733 * c-common.h (unsafe_conversion_p): Adjust declaration.
9734 (warnings_for_convert_and_check): Likewise.
9735 (convert_and_check): Likewise.
9736 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9737 expansion_point_location_if_in_system_header on it.
9738 (warnings_for_convert_and_check): Add location parameter. Call
9739 expansion_point_location_if_in_system_header on it. Use it.
9740 (convert_and_check): Add location parameter. Use it.
9741 (conversion_warning): Likewise.
9742 (c_add_case_label): Adjust convert_and_check calls.
9743 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9744
9745 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9746
9747 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9748 flag_cilkplus.
9749 * c-pragma.c (init_pragma): Likewise.
9750 * c.opt: Likewise.
9751
9752 2014-01-23 Marek Polacek <polacek@redhat.com>
9753
9754 PR c/59846
9755 * c-common.c (shorten_compare): Add location_t parameter.
9756 * c-common.h (shorten_binary_op): Adjust declaration.
9757
9758 2014-01-23 Marek Polacek <polacek@redhat.com>
9759
9760 PR c/58346
9761 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9762 * c-common.h: Declare it.
9763
9764 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9765
9766 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9767 * c-ada-spec.c (dump_ads): Likewise.
9768 (cpp_check): Likewise.
9769 (dump_ada_specs): Likewise.
9770
9771 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
9772
9773 PR c++/49718
9774 * c-common.c (handle_no_instrument_function_attribute): Allow
9775 no_instrument_function attribute in class member
9776 definition/declaration.
9777
9778 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9779
9780 PR c/58943
9781 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9782 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9783 being COMPOUND_EXPR.
9784 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9785 operand a SAVE_EXPR and second MODIFY_EXPR.
9786
9787 2014-01-09 Jakub Jelinek <jakub@redhat.com>
9788
9789 PR target/58115
9790 * c-pch.c (c_common_write_pch): Call
9791 prepare_target_option_nodes_for_pch.
9792
9793 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9794
9795 Update copyright years
9796
9797 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9798
9799 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9800 the copyright notice.
9801
9802 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9803
9804 * c-ada-spec.c (print_constructor): New function.
9805 (print_destructor): Retrieve the origin of the destructor.
9806 (print_ada_declaration): Revamp handling of constructors/destructors.
9807
9808 2013-12-23 Stuart Hastings <stuart@apple.com>
9809 Bill Maddox <maddox@google.com>
9810 Jason Merrill <jason@redhat.com>
9811
9812 * c.opt: Add -fdeclone-ctor-dtor.
9813 * c-opts.c (c_common_post_options): Default to on iff -Os.
9814
9815 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9816
9817 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9818 attribute.
9819 * c-pragma.h (enum pragma_cilk_clause): Remove.
9820 (enum pragma_omp_clause): Added the following fields:
9821 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9822 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9823 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9824 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9825 PRAGMA_CILK_CLAUSE_UNIFORM.
9826
9827
9828 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9829
9830 * cilk.c (cilk_outline): Made this function non-static.
9831 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9832 (create_cilk_wrapper): Added a new parameter: a function pointer.
9833 (c_install_body_w_frame_cleanup): Remove
9834 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9835 * c-common.h (cilk_outline): New prototype.
9836 (gimplify_cilk_spawn): Removed two parameters.
9837 (cilk_install_body_with_frame_cleanup): New prototype.
9838 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9839 CILK_SPAWN_STMT case.
9840
9841 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9842
9843 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9844
9845 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9846 (int_array_type_node): Remove.
9847 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9848
9849 2013-12-05 Marek Polacek <polacek@redhat.com>
9850
9851 PR c/52023
9852 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9853 [ADJUST_FIELD_ALIGN].
9854
9855 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9856
9857 PR c/52023
9858 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9859 and check field alignment if set.
9860 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9861 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9862
9863 2013-12-04 Jakub Jelinek <jakub@redhat.com>
9864 Marek Polacek <polacek@redhat.com>
9865
9866 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9867 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9868
9869 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9870
9871 PR c/59309
9872 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9873 arguments.
9874
9875 2013-11-29 Jakub Jelinek <jakub@redhat.com>
9876
9877 PR c/59280
9878 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9879 goto invalid. If it is error_mark_node, don't issue further
9880 diagnostics.
9881
9882 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9883
9884 * c.opt (Wopenmp-simd): New.
9885
9886 2013-11-22 Jakub Jelinek <jakub@redhat.com>
9887
9888 * c-ubsan.h (ubsan_instrument_return): New prototype.
9889 * c-ubsan.c (ubsan_instrument_return): New function.
9890
9891 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9892
9893 * c-common.c: Add required include files from gimple.h.
9894 * c-gimplify.c: Likewise.
9895 * cilk.c: Likewise.
9896
9897 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9898
9899 * c-common.c (unsafe_conversion_p): Remove use of
9900 EXPR_LOC_OR_HERE macro.
9901 (conversion_warning): Likewise.
9902 (warnings_for_convert_and_check): Likewise.
9903 (warn_for_collisions_1): Likewise.
9904 (shorten_compare): Likewise, and remove use of in_system_header
9905 macro, using the location from the former.
9906 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9907 (cb_def_pragma): Remove use of in_system_header macro.
9908 (lex_string): Likewise.
9909 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9910
9911 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9912 Mike Stump <mikestump@comcast.net>
9913 Richard Sandiford <rdsandiford@googlemail.com>
9914
9915 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9916 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9917 tree_fits_shwi_p or tree_fits_uhwi_p.
9918 (dump_generic_ada_node): Likewise.
9919 * c-format.c (check_format_arg): Likewise.
9920 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9921
9922 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9923
9924 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9925
9926 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9927
9928 PR c/53001
9929 * c-common.c (unsafe_conversion_p): Make this function
9930 return an enumeration with more detail.
9931 (conversion_warning): Use the new return type of
9932 unsafe_conversion_p to separately warn either about conversions
9933 that lower floating point number precision or about the other
9934 kinds of conversions.
9935 * c-common.h (enum conversion_safety): New enumeration.
9936 (unsafe_conversion_p): switching return type to
9937 conversion_safety enumeration.
9938 * c.opt: Adding new warning -Wfloat-conversion and
9939 enabling it with -Wconversion.
9940
9941 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9942
9943 * c-opts.c: Include plugin.h.
9944 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9945
9946 2013-11-19 Marek Polacek <polacek@redhat.com>
9947
9948 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9949 call.
9950 (ubsan_instrument_shift): Likewise.
9951 (ubsan_instrument_vla): Likewise.
9952
9953 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9954
9955 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9956 cast to unsigned type.
9957
9958 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9959
9960 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9961 tree_low_cst.
9962 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9963 rather than tree_low_cst.
9964
9965 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9966
9967 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9968 tree_to_uhwi throughout.
9969
9970 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9971
9972 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9973 tree_low_cst (..., 0) with tree_to_shwi throughout.
9974
9975 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9976
9977 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9978 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9979
9980 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9981
9982 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9983 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9984
9985 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9986
9987 * c-cilkplus.c: New file.
9988 * c-common.c (readonly_error): Add location argument.
9989 * c-common.h (readonly_error): Same.
9990 (c_finish_cilk_clauses): Protoize.
9991 (c_check_cilk_loop): Same.
9992 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9993 Do not fail on error_mark_node.
9994 Abstract increment canonicalization to here...
9995 (c_omp_for_incr_canonicalize_ptr): New.
9996 c-pragma.c (init_pragma): Register "simd" pragma.
9997 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9998 (enum pragma_cilk_clause): New.
9999
10000 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10001
10002 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10003 wchar_type and host_integerp checks.
10004
10005 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10006
10007 * c-common.c: Likewise.
10008 * c-gimplify.c: Likewise.
10009 * cilk.c: Likewise.
10010
10011 2013-11-14 Diego Novillo <dnovillo@google.com>
10012
10013 * c-common.c: Include fold-const.h.
10014 Include stor-layout.h.
10015 Include calls.h.
10016 Include stringpool.h.
10017 Include attribs.h.
10018 Include varasm.h.
10019 Include trans-mem.h.
10020 * c-cppbuiltin.c: Include stor-layout.h.
10021 Include stringpool.h.
10022 * c-format.c: Include stringpool.h.
10023 * c-lex.c: Include stringpool.h.
10024 Include stor-layout.h.
10025 * c-pragma.c: Include stringpool.h.
10026 Include attribs.h.
10027 Include varasm.h.
10028 Include gcc-symtab.h.
10029 * c-pretty-print.c: Include stor-layout.h.
10030 Include attribs.h.
10031 * cilk.c: Include stringpool.h.
10032 Include calls.h.
10033
10034 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10035
10036 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10037 * c-common.c (c_common_reswords): Add __auto_type.
10038 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10039
10040 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10041
10042 * c-common.c: Include gimplify.h.
10043 * c-gimplify.c: Likewise.
10044 * cilk.c: Likewise.
10045 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10046 * c-ubsan.c: Don't include gimple.h.
10047
10048 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10049
10050 * c-common.c (c_common_reswords): Add _Thread_local.
10051
10052 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10053
10054 * c-common.c (atomic_size_supported_p): New function.
10055 (resolve_overloaded_atomic_exchange)
10056 (resolve_overloaded_atomic_compare_exchange)
10057 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10058 Use it instead of comparing size with a local list of sizes.
10059
10060 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10061 Joseph Myers <joseph@codesourcery.com>
10062
10063 * c-common.h (enum rid): Add RID_ATOMIC.
10064 * c-common.c (c_common_reswords): Add _Atomic.
10065 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10066 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10067 * c-format.c (check_format_types): Check for extra _Atomic
10068 qualifiers in format argument.
10069 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10070 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10071
10072 2013-11-06 Tobias Burnus <burnus@net-b.de>
10073
10074 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10075
10076 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10077
10078 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10079 standards modes.
10080 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10081 to mean lack of IEEE 754 support.
10082
10083 2013-11-05 Tobias Burnus <burnus@net-b.de>
10084
10085 * c.opt (-Wdate-time): New option
10086 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10087
10088 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10089
10090 * c-cppbuiltin.c (cpp_iec_559_value): Test
10091 flag_excess_precision_cmdline not flag_excess_precision.
10092
10093 2013-11-05 Tobias Burnus <burnus@net-b.de>
10094
10095 * c.opt (fopenmp-simd): New option.
10096 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10097 (omp_pragmas): ... this new struct.
10098 (c_pp_lookup_pragma): Also walk omp_pragmas.
10099 (init_pragma): Init pragmas for -fopenmp-simd.
10100
10101 2013-11-04 Marek Polacek <polacek@redhat.com>
10102
10103 PR c++/58979
10104 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10105
10106 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10107
10108 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10109 New functions.
10110 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10111
10112 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10113
10114 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10115 (dump_ada_specs): Adjust prototype of second callback.
10116 * c-ada-spec.c (cpp_check): New global variable.
10117 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10118 (print_generic_ada_decl): Likewise.
10119 (has_static_fields): Change return type to bool and add guard.
10120 (has_nontrivial_methods): New predicate.
10121 (is_tagged_type): Change return type to bool.
10122 (separate_class_package): Call has_nontrivial_methods.
10123 (pp_ada_tree_identifier): Minor tweaks.
10124 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10125 (dump_ada_array_domains): Likewise.
10126 (dump_ada_array_type): Likewise.
10127 (dump_template_types): Remove cpp_check parameter and do not pass it to
10128 dump_generic_ada_node.
10129 (dump_ada_template): Likewise.
10130 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10131 recursively.
10132 (print_ada_methods): Change return type to integer. Remove cpp_check
10133 parameter and do not pass it down.
10134 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10135 dump_generic_ada_node.
10136 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10137 accessing methods.
10138 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10139 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10140 value of print_ada_methods.
10141 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10142 Set cpp_check to it before invoking dump_ada_nodes.
10143 (dump_ada_specs): Likewise.
10144
10145 2013-11-03 Marek Polacek <polacek@redhat.com>
10146
10147 * c-ubsan.c: Don't include hash-table.h.
10148 (ubsan_instrument_vla): New function.
10149 * c-ubsan.h: Declare it.
10150
10151 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10152
10153 Automated part of renaming of symtab_node_base to symtab_node.
10154
10155 Patch autogenerated by rename_symtab.py from
10156 https://github.com/davidmalcolm/gcc-refactoring-scripts
10157 revision 58bb219cc090b2f4516a9297d868c245495ee622
10158
10159 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10160 symtab_node_base to symtab_node.
10161
10162 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10163
10164 Implement C++14 digit separators.
10165 * c-lex.c (interpret_float): Remove digit separators from scratch string
10166 before building real literal.
10167
10168 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10169
10170 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10171
10172 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10173
10174 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10175 fields.
10176 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10177 enabled.
10178 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10179 (insert_cilk_frame): New prototype.
10180 (cilk_init_builtins): Likewise.
10181 (gimplify_cilk_spawn): Likewise.
10182 (c_cilk_install_body_w_frame_cleanup): Likewise.
10183 (cilk_detect_spawn_and_unwrap): Likewise.
10184 (cilk_set_spawn_marker): Likewise.
10185 (build_cilk_sync): Likewise.
10186 (build_cilk_spawn): Likewise.
10187 * cilk.c: New file.
10188
10189 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10190
10191 Patch autogenerated by refactor_symtab.py from
10192 https://github.com/davidmalcolm/gcc-refactoring-scripts
10193 revision 58bb219cc090b2f4516a9297d868c245495ee622
10194
10195 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10196 to a true class hierarchy.
10197 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10198
10199 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10200
10201 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10202
10203 2013-10-26 Jeff Law <law@redhat.com>
10204
10205 * c-common.c (c_define_builtins): Remove mudflap support.
10206 * c.opt: Ignore and warn for mudflap options.
10207
10208 2013-10-24 Tobias Burnus <burnus@net-b.de>
10209
10210 PR other/33426
10211 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10212 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10213
10214 2013-10-23 Jason Merrill <jason@redhat.com>
10215
10216 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10217
10218 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10219
10220 * c-common.h (omp_clause_mask::operator !=): New method.
10221 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10222 instead of if (mask & something) tests everywhere.
10223
10224 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10225 201307 instead of 201107.
10226 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10227 (c_common_attribute_table): Add "omp declare target" and
10228 "omp declare simd" attributes.
10229 (handle_omp_declare_target_attribute,
10230 handle_omp_declare_simd_attribute): New functions.
10231 * c-omp.c: Include c-pragma.h.
10232 (c_finish_omp_taskgroup): New function.
10233 (c_finish_omp_atomic): Add swapped argument, if true,
10234 build the operation first with rhs, lhs arguments and use NOP_EXPR
10235 build_modify_expr.
10236 (c_finish_omp_for): Add code argument, pass it down to make_code.
10237 (c_omp_split_clauses): New function.
10238 (c_split_parallel_clauses): Removed.
10239 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10240 c_omp_declare_simd_clauses_to_decls): New functions.
10241 * c-common.h (omp_clause_mask): New type.
10242 (OMP_CLAUSE_MASK_1): Define.
10243 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10244 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10245 omp_clause_mask::operator |, omp_clause_mask::operator &,
10246 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10247 omp_clause_mask::operator ==): New methods.
10248 (enum c_omp_clause_split): New.
10249 (c_finish_omp_taskgroup): New prototype.
10250 (c_finish_omp_atomic): Add swapped argument.
10251 (c_finish_omp_for): Add code argument.
10252 (c_omp_split_clauses): New prototype.
10253 (c_split_parallel_clauses): Removed.
10254 (c_omp_declare_simd_clauses_to_numbers,
10255 c_omp_declare_simd_clauses_to_decls): New prototypes.
10256 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10257 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10258 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10259 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10260 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10261 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10262 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10263 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10264 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10265 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10266 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10267 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10268 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10269 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10270 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10271 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10272 PRAGMA_OMP_CLAUSE_UNIFORM.
10273
10274 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10275
10276 PR tree-optimization/20318
10277 * c-common.c (handle_returns_nonnull_attribute): New function.
10278 (c_common_attribute_table): Add returns_nonnull.
10279
10280 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10281
10282 PR c++/19476
10283 * c.opt (fcheck-new): Move to common.opt.
10284
10285 2013-09-25 Marek Polacek <polacek@redhat.com>
10286 Jakub Jelinek <jakub@redhat.com>
10287
10288 PR sanitizer/58413
10289 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10290 an expression if we can prove it is correct.
10291 (ubsan_instrument_division): Likewise. Remove unnecessary
10292 check.
10293
10294 2013-09-18 Marek Polacek <polacek@redhat.com>
10295
10296 PR sanitizer/58411
10297 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10298 Declare it.
10299 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10300
10301 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10302
10303 PR target/48094
10304 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10305 fobjc-gc, freplace-objc-classes): Accept for LTO.
10306
10307 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10308
10309 * c-target.def: New hook
10310
10311 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10312
10313 PR c++/43452
10314 * c.opt (Wdelete-incomplete): Add.
10315
10316 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10317
10318 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10319 (vector_types_compatible_elements_p): New function.
10320 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10321 declaration.
10322 (vector_types_compatible_elements_p): Declare.
10323
10324 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10325
10326 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10327 a virtual member function.
10328 (pp_simple_type_specifier): Remove.
10329 (pp_c_type_specifier): Likewise.
10330 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10331 Rename from pp_c_type_specifier. Adjust.
10332 (c_pretty_printer::c_pretty_printer): Do not assign to
10333 simple_type_specifier.
10334
10335 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10336
10337 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10338 member function.
10339 (c_pretty_printer::storage_class_specifier): Likewise.
10340 (c_pretty_printer::initializer): Likewise.
10341 (pp_declaration): Remove.
10342 (pp_declaration_specifiers): Likewise.
10343 (pp_abstract_declarator): Likewise.
10344 (pp_declarator): Likewise.
10345 (pp_type_id): Likewise.
10346 (pp_statement): Likewise.
10347 (pp_constant): Likewise.
10348 (pp_id_expression): Likewise.
10349 (pp_primary_expression): Likewise.
10350 (pp_unary_expression): Likewise.
10351 (pp_multiplicative_expression): Likewise.
10352 (pp_conditional_expression): Likewise.
10353 (pp_assignment_expression): Likewise.
10354 (pp_expression): Likewise.
10355 (pp_c_type_id): Likewise.
10356 (pp_c_storage_class_specifier): Likewise.
10357 * c-pretty-print.c (pp_c_type_cast): Tidy.
10358 (pp_c_pointer): Likewise.
10359 (pp_c_type_specifier): Likewise.
10360 (pp_c_parameter_type_list): Likewise.
10361 (pp_c_function_definition): Likewise.
10362 (pp_c_init_declarator): Likewise.
10363 (pp_c_initializer_list): Likewise.
10364 (pp_c_constructor_elts): Likewise.
10365 (c_pretty_printer::direct_abstract_declarator): Likewise.
10366 (c_pretty_printer::declaration_specifiers): Likewise.
10367 (c_pretty_printer::primary_expression): Likewise.
10368 (c_pretty_printer::postfix_expression): Likewise.
10369 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10370 (c_pretty_printer::storage_class_specifier): Rename from
10371 pp_c_storage_class_specifier.
10372 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10373 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10374 storage_class_specifier, initializer, offset_list, flags.
10375
10376 2013-08-30 Marek Polacek <polacek@redhat.com>
10377
10378 * c-ubsan.c: New file.
10379 * c-ubsan.h: New file.
10380
10381 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10382
10383 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10384 member function.
10385 (c_pretty_printer::declaration_specifiers): Likewise.
10386 (c_pretty_printer::declarator): Likewise.
10387 (c_pretty_printer::abstract_declarator): Likewise.
10388 (c_pretty_printer::direct_abstract_declarator): Likewise.
10389 (c_pretty_printer::direct_declarator): Likewise.
10390 (c_pretty_printer::function_specifier): Likewise.
10391 (pp_declaration): Adjust.
10392 (pp_declaration_specifiers): Likewise.
10393 (pp_abstract_declarator): Likewise.
10394 (pp_direct_declarator): Likewise.
10395 (pp_function_specifier): Likewise.
10396 (pp_direct_abstract_declarator): Remove as unused.
10397 (pp_c_declaration): Remove.
10398 (pp_c_declaration_specifiers): Likewise.
10399 (pp_c_declarator): Likewise.
10400 (pp_c_direct_declarator): Likewise.
10401 (pp_c_function_specifier): Likewise.
10402 (pp_c_direct_abstract_declarator): Likewise.
10403 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10404 from pp_c_abstract_declarator. Adjust.
10405 (c_pretty_printer::direct_abstract_declarator): Rename from
10406 pp_c_direct_abstract_declarator. Adjust.
10407 (c_pretty_printer::function_specifier): Rename from
10408 pp_c_function_specifier. Adjust.
10409 (c_pretty_printer::declaration_specifiers): Rename from
10410 pp_c_declaration_specifiers. Adjust.
10411 (c_pretty_printer::direct_declarator): Rename from
10412 pp_c_direct_declarator. Adjust.
10413 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10414 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10415 (c_pretty_printer::c_pretty_printer): Do not assign to
10416 declaration, declaration_specifiers, declarator,
10417 direct_declarator, direct_abstract_declarator, function_specifier.
10418
10419 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10420
10421 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10422 virtual member function.
10423 (c_pretty_printer::multiplicative_expression): Likewise.
10424 (c_pretty_printer::conditional_expression): Likewise.
10425 (c_pretty_printer::assignment_expression): Likewise.
10426 (c_pretty_printer::expression): Likewise.
10427 (pp_unary_expression): Adjust.
10428 (pp_multiplicative_expression): Likewise.
10429 (pp_assignment_expression): Likewise.
10430 (pp_conditional_expression): Likewise.
10431 (pp_expression): Likewise.
10432 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10433 from pp_c_unary_expression. Adjust.
10434 (c_pretty_printer::multiplicative_expression): Rename from
10435 pp_c_multiplicative_expression. Adjust.
10436 (c_pretty_printer::conditional_expression): Rename from
10437 pp_c_conditional_expression. Adjust.
10438 (c_pretty_printer::assignment_expression): Rename from
10439 pp_c_assignment_expression. Adjust.
10440 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10441 (c_pretty_printer::c_pretty_printer): Do not assign to
10442 unary_expression, multiplicative_expression,
10443 conditional_expression, expression.
10444
10445 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10446
10447 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10448 virtual member function.
10449 (pp_postfix_expression): Adjust.
10450 (pp_c_postfix_expression): Remove.
10451 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10452 from pp_c_postfix_expression. Adjust.
10453 (c_pretty_printer::c_pretty_printer): Do not assign to
10454 postfix_expression.
10455
10456 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10457
10458 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10459 virtua member function.
10460 (pp_primary_expression): Adjust.
10461 (pp_c_primary_expression): Remove.
10462 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10463 from pp_c_primary_expression. Adjust.
10464 (pp_c_initializer_list): Use pp_primary_expression.
10465 (c_pretty_printer::c_pretty_printer): Do not assign to
10466 primary_expression.
10467
10468 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10469
10470 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10471 * c-pretty-print.c (M_): Remove.
10472 (c_pretty_printer::translate_string): Define.
10473 (pp_c_type_specifier): Use it.
10474 (pp_c_primary_expression): Likewise.
10475 (pp_c_expression): Likewise.
10476
10477 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10478
10479 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10480 virtual function.
10481 (pp_c_id_expression): Remove.
10482 (pp_id_expression): Adjust.
10483 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10484 pp_c_id_expression. Adjust.
10485 (pp_c_postfix_expression): Use pp_id_expression.
10486 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10487
10488 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10489
10490 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10491 member function.
10492 (pp_constant): Adjust.
10493 (pp_c_constant): Remove.
10494 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10495 pp_c_constant. Adjust.
10496 (pp_c_constant)
10497 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10498 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10499
10500 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10501
10502 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10503 (c_pretty_printer::c_pretty_printer): Declare.
10504 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10505 c_pretty_printer_init. Adjust.
10506 (print_c_tree): Do not call c_pretty_printer_init.
10507 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10508
10509 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10510
10511 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10512
10513 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10514
10515 PR c++/58080
10516 * c-common.c (pointer_int_sum): Add bool parameter.
10517 * c-common.h (pointer_int_sum): Adjust declaration.
10518
10519 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10520
10521 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10522 c_pretty_printer variable.
10523
10524 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10525
10526 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10527 (pp_base): Remove.
10528 (pp_c_base): Likewise. Adjust users.
10529 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10530 (pp_c_whitespace): Do not call pp_base.
10531 (pp_c_left_paren): Likewise.
10532 (pp_c_right_paren): Likewise.
10533 (pp_c_left_brace): Likewise.
10534 (pp_c_right_brace): Likewise.
10535 (pp_c_left_bracket): Likewise.
10536 (pp_c_right_bracket): Likewise.
10537 (pp_c_dot): Likewise.
10538 (pp_c_ampersand): Likewise.
10539 (pp_c_star): Likewise.
10540 (pp_c_arrow): Likewise.
10541 (pp_c_semicolon): Likewise.
10542 (pp_c_complement): Likewise.
10543 (pp_c_exclamation): Likewise.
10544 (pp_c_direct_declarator): Likewise.
10545 (pp_c_ws_string): Likewise.
10546 (pp_c_identifier): Likewise.
10547 (pp_c_statement): Likewise.
10548 (print_c_tree): Likewise.
10549
10550 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10551
10552 PR c++/58072
10553 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10554 provide useful error strings.
10555
10556 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10557
10558 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10559 printer functions instead of pp_string or operators and punctuators.
10560 (dump_generic_ada_node): Likewise.
10561 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10562 (pp_c_relational_expression): Likewise.
10563 (pp_c_logical_or_expression): Likewise.
10564
10565 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10566
10567 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10568 functions instead of pp_character.
10569 (pp_ada_tree_identifier): Likewise.
10570 (dump_ada_double_name): Likewise.
10571 (dump_ada_function_declaration): Likewise.
10572 (dump_ada_array_domains): Likewise.
10573 (dump_template_types): Likewise.
10574 (dump_generic_ada_node): Likewise.
10575 (print_ada_declaration): Likewise.
10576 (print_ada_struct_decl): Likewise.
10577 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10578
10579 2013-07-23 Tom Tromey <tromey@redhat.com>
10580
10581 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10582 * c-common.c (c_common_reswords): Add _Generic.
10583
10584 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10585
10586 * c-common.c: Fix typos.
10587 * c-common.h: Likewise.
10588
10589 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10590
10591 PR c++/55203
10592 * c-common.c (c_common_attribute_table): Add warn_unused.
10593 (handle_warn_unused_attribute): New.
10594
10595 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10596
10597 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10598 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10599
10600 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10601
10602 PR c++/57869
10603 * c.opt: Add Wconditionally-supported.
10604
10605 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10606
10607 * array-notation-common.c (length_mismatch_in_expr_p): Delete
10608 unused variables l_length and l_node.
10609
10610 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
10611
10612 PR c/57821
10613 * c-common.c (complete_array_type): Delay folding first index
10614 like other indices. When folding, check for index overflow.
10615
10616 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
10617
10618 PR c++/57509
10619 * c-common.h (c_build_vec_perm_expr): New complain argument.
10620 * c-common.c (c_build_vec_perm_expr): Likewise.
10621 Use save_expr also in C++.
10622
10623 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10624
10625 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10626 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10627 * c-opts.c (c_common_post_options): Likewise.
10628
10629 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10630
10631 * array-notation-common.c (length_mismatch_in_expr): Changed the
10632 parameter type's from a dynamic array to a vec_tree. Also removed
10633 the size parameters.
10634 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10635 the change above.
10636
10637 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10638
10639 * c-common.h (struct cilkplus_an_parts): New structure.
10640 (struct cilkplus_an_loop_parts): Likewise.
10641 (cilkplus_extract_an_triplets): New prototype.
10642 (fix_sec_implicit_args): Likewise.
10643 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10644 (fix_sec_implicit_args): Likewise.
10645
10646 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10647
10648 * array-notation-common.c (find_inv_trees): Removed an unwanted
10649 typecasting.
10650 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10651 enum rid to enum tree_code.
10652
10653 2013-06-11 Jan Hubicka <jh@suse.cz>
10654
10655 * c-common.c (handle_alias_ifunc_attribute): Do not set
10656 DECL_EXTERNAL for weakref variables.
10657 * c-pragma.c (handle_pragma_weak): Make sure aliases
10658 are not declared as external.
10659
10660 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10661
10662 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10663 function from c/c-array-notation.c.
10664 (is_cilkplus_reduce_builtin): Likewise.
10665 (find_rank): Likewise.
10666 (extract_array_notation_exprs): Likewise.
10667 (replace_array_notations): Likewise.
10668 (find_inv_trees): Likewise.
10669 (replace_inv_trees): Likewise.
10670 (contains_array_notation_expr): Likewise.
10671 (find_correct_array_notation_type): Likewise.
10672 * c-common.h (struct inv_list): Moved this struct from the file
10673 c/c-array-notation.c and added a new field called additional tcodes.
10674 (length_mismatch_in_expr_p): New prototype.
10675 (is_cilkplus_reduce_builtin): Likewise.
10676 (find_rank): Likewise.
10677 (extract_array_notation_exprs): Likewise.
10678 (replace_array_notation): Likewise.
10679 (find_inv_trees): Likewise.
10680 (replace_inv_trees): Likewise.
10681 (find_correct_array_notation_type): Likewise.
10682
10683 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10684
10685 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10686 function array_notation_init_builtins is called.
10687 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10688 * c-common.def (ARRAY_NOTATION_REF): New tree.
10689 * c-common.h (build_array_notation_expr): New function declaration.
10690 (build_array_notation_ref): Likewise.
10691 (extract_sec_implicit_index_arg): New extern declaration.
10692 (is_sec_implicit_index_fn): Likewise.
10693 (ARRAY_NOTATION_CHECK): New define.
10694 (ARRAY_NOTATION_ARRAY): Likewise.
10695 (ARRAY_NOTATION_START): Likewise.
10696 (ARRAY_NOTATION_LENGTH): Likewise.
10697 (ARRAY_NOTATION_STRIDE): Likewise.
10698 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10699 ARRAY_NOTATION_REF.
10700 (pp_c_expression): Likewise.
10701 * c.opt (flag_enable_cilkplus): New flag.
10702 * array-notation-common.c: New file.
10703
10704 2013-05-14 Jakub Jelinek <jakub@redhat.com>
10705
10706 PR c++/57274
10707 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10708
10709 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
10710
10711 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10712 vectors.
10713
10714 2013-05-07 Han Shen <shenhan@google.com>
10715
10716 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10717
10718 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10719
10720 * c-common.c (check_user_alignment): Emit error for negative values.
10721
10722 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10723
10724 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10725
10726 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10727
10728 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10729 __GXX_EXPERIMENTAL_CXX1Y__.
10730
10731 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10732 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
10733
10734 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10735 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10736 to simply use OPT_Wpointer_arith.
10737 (c_sizeof_or_alignof_type): Likewise.
10738
10739 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10740
10741 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10742
10743 2013-04-12 Jakub Jelinek <jakub@redhat.com>
10744
10745 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10746 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10747 specifiers.
10748
10749 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10750
10751 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10752
10753 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10754
10755 * c-common.c (pointer_int_sum): Remove dead code.
10756
10757 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10758
10759 PR middle-end/56524
10760 * c-common.c (handle_optimize_attribute): Don't call
10761 save_optabs_if_changed.
10762
10763 2013-03-05 Jakub Jelinek <jakub@redhat.com>
10764
10765 PR middle-end/56461
10766 * c-pch.c (pch_init): Free target_validity at the end.
10767
10768 2013-03-04 Jakub Jelinek <jakub@redhat.com>
10769
10770 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10771
10772 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10773 Jakub Jelinek <jakub@redhat.com>
10774
10775 PR sanitizer/56454
10776 * c-common.c (handle_no_sanitize_address_attribute): New function.
10777 (c_common_attribute_table): Add no_sanitize_address attribute.
10778 (handle_no_address_safety_analysis_attribute): Add
10779 no_sanitize_address attribute, not no_address_safety_analysis
10780 attribute.
10781
10782 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
10783
10784 PR target/52555
10785 * c-common.c (handle_optimize_attribute): Call
10786 save_optabs_if_changed.
10787
10788 2013-02-18 Jakub Jelinek <jakub@redhat.com>
10789 Steven Bosscher <steven@gcc.gnu.org>
10790
10791 PR pch/54117
10792 * c-opts.c (c_common_post_options): If debug info is enabled
10793 and non-dwarf*, refuse to load PCH files and when writing PCH
10794 file warn.
10795
10796 2013-02-05 Jakub Jelinek <jakub@redhat.com>
10797
10798 PR middle-end/56167
10799 * c-common.c (handle_error_attribute): Fix condition.
10800
10801 2013-01-30 Jakub Jelinek <jakub@redhat.com>
10802
10803 PR c++/55742
10804 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10805
10806 2013-01-18 Jason Merrill <jason@redhat.com>
10807
10808 PR target/54908
10809 * c.opt (-fextern-tls-init): New.
10810 * c-opts.c (c_common_post_options): Handle it.
10811
10812 2013-01-09 Jakub Jelinek <jakub@redhat.com>
10813
10814 PR c/48418
10815 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10816 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10817 and is either negative or bigger or equal to type precision
10818 of the first operand.
10819
10820 2012-12-03 Marek Polacek <polacek@redhat.com>
10821
10822 PR c/55570
10823 * c-common.c (check_user_alignment): Swap order of tests,
10824 check TREE_CODE first.
10825
10826 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10827
10828 PR c++/52654
10829 * c-common.h (overflow_type): New enum.
10830 (build_userdef_literal): Add overflow_type argument.
10831 (tree_userdef_literal): Add overflow_type.
10832 (USERDEF_LITERAL_OVERFLOW): New access macro.
10833 * c-common.c (build_userdef_literal): Add overflow_type
10834 argument.
10835 * c-lex.c (c_lex_with_flags): Add overflow_type to
10836 build_userdef_literal calls.
10837 (interpret_integer, interpret_float): Add overflow_type argument.
10838
10839 2012-11-28 Richard Biener <rguenther@suse.de>
10840
10841 PR c/35634
10842 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10843 here and use a type with proper overflow behavior for types that would
10844 need to be promoted for the arithmetic.
10845
10846 2012-11-23 Jakub Jelinek <jakub@redhat.com>
10847
10848 PR sanitizer/55435
10849 * c-common.c (handle_no_address_safety_analysis_attribute): New
10850 function.
10851 (c_common_attribute_table): Add no_address_safety_analysis.
10852
10853 2012-11-16 Simon Baldwin <simonb@google.com>
10854
10855 * c.opt: Add f[no-]canonical-system-headers.
10856 * c-opts.c (c_common_handle_option): Handle
10857 OPT_fcanonical_system_headers.
10858
10859 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10860
10861 PR c++/54413
10862 * c-opts.c (c_common_handle_option): Set new flags.
10863 * c.opt: Describe new flags.
10864
10865 2012-11-09 Jason Merrill <jason@redhat.com>
10866
10867 * c.opt (Wabi-tag): New.
10868
10869 2012-11-09 Andi Kleen <ak@linux.intel.com>
10870
10871 PR 55139
10872 * c-common.c (get_atomic_generic_size): Mask with
10873 MEMMODEL_MASK
10874
10875 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10876
10877 PR c/53063
10878 * c.opt (Wformat): Make it Alias Wformat=1.
10879 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10880 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10881 LangEnabledBy.
10882 (Wformat=): RejectNegative. Use LangEnabledBy.
10883 (Wnonnull): Use LangEnabledBy.
10884 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10885 * c-format.c (set_Wformat): Delete.
10886 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10887 (maybe_read_dollar_number): Likewise.
10888 (avoid_dollar_number): Likewise.
10889 (finish_dollar_format_checking): Likewise.
10890 (check_format_info): Likewise.
10891 (check_format_info_main): Likewise.
10892 (check_format_types): Likewise.
10893 (format_type_warning): Likewise.
10894 * c-common.c (int): Likewise.
10895 (check_function_sentinel): Likewise.
10896 * c-common.h (warn_format,set_Wformat): Do not declare here.
10897
10898 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10899
10900 PR c/53063
10901 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10902 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10903 Use LangEnabledBy.
10904 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10905 common.opt.
10906 (Wvariadic-macros): Init(1).
10907 * c-opts.c (c_common_handle_option): Do not handle them
10908 explicitly.
10909 (c_common_post_options): Likewise.
10910 (sanitize_cpp_opts): warn_unused_macros is now
10911 cpp_warn_unused_macros.
10912 (push_command_line_include): Likewise.
10913 * c-common.c (warn_unknown_pragmas): Do not define.
10914 * c-common.h (warn_unknown_pragmas): Do not declare.
10915
10916 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10917
10918 PR c/51294
10919 * c-common.c (conversion_warning): Handle conditional expressions.
10920
10921 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10922
10923 PR c++/54930
10924 * c.opt (Wreturn_local_addr): Define new option.
10925
10926 2012-10-25 Jason Merrill <jason@redhat.com>
10927
10928 * c.opt (Wvirtual-move-assign): New.
10929
10930 * c.opt (Winherited-variadic-ctor): New.
10931
10932 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10933
10934 PR c++/54427
10935 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10936
10937 2012-10-23 Joseph Myers <joseph@codesourcery.com>
10938
10939 * c-common.h (pch_cpp_save_state): Declare.
10940 * c-target.def (c_preinclude): New hook.
10941 * c-opts.c (done_preinclude): New.
10942 (push_command_line_include): Handle default preincluded header.
10943 (cb_file_change): Call pch_cpp_save_state when calling
10944 push_command_line_include.
10945 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10946 (pch_cpp_save_state): New.
10947 (pch_init): Call pch_cpp_save_state conditionally, instead of
10948 calling cpp_save_state.
10949
10950 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10951
10952 PR c/53063
10953 PR c/40989
10954 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10955 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10956 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10957 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10958 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10959 * c-opts.c (c_common_handle_option): Remove explicit handling from
10960 here.
10961 (c_common_post_options): Likewise.
10962
10963 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10964
10965 * c-ada-spec.c (LOCATION_COL): Delete.
10966 (compare_location): New function.
10967 (compare_node): Use it.
10968 (compare_comment): Likewise.
10969
10970 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10971
10972 PR c/53063
10973 PR c/40989
10974 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10975 * c-opts.c (c_common_handle_option): Do not set them here. Add
10976 comment.
10977 (c_common_post_options): Likewise.
10978
10979 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10980
10981 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10982 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10983 Remove POINTER_TYPE handling, add large unsigned handling and use
10984 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10985
10986 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10987
10988 PR c/54381
10989 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10990 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10991 locs and array of 3 trees instead of just single loc and single
10992 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10993 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10994 For *cmp* builtins that take two sources strings report warnings
10995 about first and second source, not about destination and source.
10996
10997 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
10998
10999 PR c++/53055
11000 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11001
11002 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11003
11004 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11005 declaring something coming from another file.
11006
11007 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11008
11009 PR ada/54845
11010 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11011
11012 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11013
11014 PR c++/54194
11015 * c-common.c (warn_about_parentheses): Add location_t parameter;
11016 use EXPR_LOC_OR_LOC.
11017 * c-common.h: Update declaration.
11018
11019 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11020
11021 PR c++/54427
11022 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11023 more operations. Make error messages optional.
11024 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11025 (scalar_to_vector): Declare.
11026
11027 2012-10-08 Jason Merrill <jason@redhat.com>
11028
11029 * c-common.c (c_common_reswords): Add thread_local.
11030
11031 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11032
11033 PR c++/53528 C++11 attribute support
11034 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11035 new functions.
11036 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11037 static function.
11038 (handle_aligned_attribute): In choose strictest alignment
11039 among many. Use new check_cxx_fundamental_alignment_constraints.
11040 (handle_transparent_union_attribute): In c++11 attribute syntax,
11041 don't look through typedefs.
11042
11043 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11044
11045 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11046 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11047 out of dumpfile.h.
11048
11049 2012-09-25 Dehao Chen <dehao@google.com>
11050
11051 PR middle-end/54645
11052 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11053 map when read in the pch.
11054
11055 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11056
11057 * c-ada-spec.c: Style fixes.
11058
11059 2012-09-18 Thomas Quinot <quinot@adacore.com>
11060
11061 * c.opt (-fada-spec-parent): Define new command line switch.
11062 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11063 is specified, generate binding spec as a child of the specified unit.
11064
11065 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11066 Manuel López-Ibáñez <manu@gcc.gnu.org>
11067
11068 PR c++/53210
11069 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11070
11071 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11072
11073 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11074 for pointers, and add missing Convention C pragma.
11075 (print_ada_struct_decl): Add missing aliased keyword.
11076 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11077
11078 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11079
11080 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11081 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11082 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11083 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11084 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11085
11086 2012-08-10 Richard Guenther <rguenther@suse.de>
11087
11088 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11089
11090 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11091
11092 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11093 instead of separate pp_newline and pp_flush.
11094 (print_c_tree): Likewise.
11095
11096 2012-07-26 Richard Henderson <rth@redhat.com>
11097
11098 * c-common.c (handle_hot_attribute): Allow labels.
11099 (handle_cold_attribute): Likewise.
11100
11101 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11102
11103 PR c++/28656
11104 * c-common.c (check_function_nonnull): Handle multiple nonnull
11105 attributes properly.
11106
11107 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11108
11109 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11110 * c-ada-spec.c: Likewise.
11111 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11112
11113 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11114
11115 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11116 Remove code conditional on it.
11117
11118 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11119
11120 * c-gimplify.c: Do not include basic-block.h.
11121 * c-common.c: Do not include linfuncs.h.
11122
11123 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11124
11125 * c-common.h: Include tree.h.
11126
11127 2012-07-02 Jason Merrill <jason@redhat.com>
11128
11129 PR c++/53524
11130 * c-common.c (get_priority): Call default_conversion.
11131
11132 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11133
11134 * c-pch.c (c_common_write_pch): Remove unused variables.
11135
11136 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11137
11138 * cppspec.c: Moved from gcc/ to here.
11139
11140 2012-06-27 Kai Tietz <ktietz@redhat.com>
11141
11142 PR preprocessor/37215
11143 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11144
11145 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11146
11147 * c-common.h (c_common_print_pch_checksum): Remove.
11148 * c-pch.c: Do not include output.h.
11149 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11150 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11151 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11152 (struct c_pch_header): Remove.
11153 (get_ident): Update gpch version.
11154 (pch_init): Do not print executable_checksum to asm_out_file.
11155 Do not fail if there is no asm_out_file to read back from. Set
11156 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11157 (c_common_write_pch): Verify that nothing was written to asm_out_file
11158 since pch_init was called. Do not write a c_pch_header, and do not
11159 copy from asm_out_file to the PCH.
11160 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11161 the content of asm_out_file from the PCH.
11162 (c_common_print_pch_checksum): Remove.
11163 * c-opts.c (c_common_init): Print out executable_checksum directly.
11164
11165 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11166
11167 * c-target.def (objc_declare_unresolved_class_reference,
11168 objc_declare_class_definition): Add new hooks.
11169
11170 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11171
11172 * c-lex.c: Do not include output.h.
11173 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11174 Remove uses of ASM_OUTPUT_IDENT.
11175
11176 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11177
11178 PR c++/51033
11179 * c-common.h (c_build_vec_perm_expr): Move decl here.
11180 * c-common.c (c_build_vec_perm_expr): Move definition
11181 here.
11182
11183 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11184
11185 * c.opt (fconserve-space): Turn into a no-op.
11186
11187 2012-06-04 Sterling Augustine <saugustine@google.com>
11188
11189 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11190 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11191 both the start and end of the function.
11192
11193 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11194
11195 * c-common.c: Do not include output.h.
11196 * c-pragma.c: Likewise.
11197
11198 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11199
11200 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11201 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11202 (lang_decl_name): Handle namespace decls.
11203
11204 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11205
11206 * c-ada-spec.c: Do not include output.h.
11207 * c-semantics.c: Likewise.
11208
11209 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11210
11211 * c-common.c: Fix typo.
11212
11213 2012-05-29 Michael Matz <matz@suse.de>
11214
11215 * c-common.h (c_expand_decl): Remove prototype.
11216
11217 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11218
11219 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11220 * c-opts.c (c_common_handle_option): Remove code handling
11221 warn_missing_braces.
11222
11223 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11224
11225 PR c++/25137
11226 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11227 -Wmissing_braces.
11228
11229 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11230
11231 PR c++/53322
11232 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11233
11234 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11235
11236 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11237 * c-opts.c (c_common_handle_option): Do not handle explicitly
11238 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11239
11240 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11241
11242 PR preprocessor/7263
11243 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11244 to cpp_classify_number. For diagnostics, use the precise location
11245 instead of the global input_location.
11246
11247 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11248
11249 PR c++/11856
11250 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11251
11252 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11253
11254 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11255
11256 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11257
11258 PR 53063
11259 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11260 Wreorder): Use LangEnabledBy.
11261 * c-opts.c (c_common_handle_option): Do not enable them
11262 explicitly. Call lang-specific generated functions.
11263 (c_common_post_options): Do not set them here.
11264
11265 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11266
11267 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11268 Wmissing-field-initializers,Wmissing-parameter-type,
11269 Wold-style-declaration,Woverride-init): Use EnabledBy.
11270 * c-opts.c (c_common_post_options): Do not set here explicitly.
11271
11272 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11273
11274 PR 53063
11275 * c-opts.c (c_common_handle_option): Use handle_generated_option
11276 to enable sub-options.
11277
11278 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11279
11280 PR c++/53158
11281 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11282
11283 2012-05-10 Richard Guenther <rguenther@suse.de>
11284
11285 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11286 adjust commentary about TYPE_IS_SIZETYPE types.
11287
11288 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11289
11290 PR c++/53261
11291 * c-common.c (warn_logical_operator): Check that argument of
11292 integer_zerop is not NULL.
11293
11294 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11295
11296 PR c/43772
11297 * c-common.c (warn_logical_operator): Do not warn if either side
11298 is already true or false.
11299
11300 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11301
11302 PR c/51712
11303 * c-common.c (expr_original_type): New.
11304 (shorten_compare): Do not warn for enumeration types.
11305
11306 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11307
11308 * c.opt (fpermissive): Add Var(flag_permissive).
11309
11310 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11311
11312 PR c++/51033
11313 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11314 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11315
11316 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11317
11318 Add -Wvarargs option
11319 * c.opt (Wvarargs): Define new option.
11320
11321 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11322
11323 * c-common.c (check_function_arguments): Replace
11324 Wmissing-format-attribute with Wsuggest-attribute=format.
11325
11326 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11327
11328 * c.opt (Wsuggest-attribute=format): New. Alias of
11329 Wmissing-format-attribute.
11330 * c-format.c (decode_format_type): Replace
11331 Wmissing-format-attribute with Wsuggest-attribute=format.
11332 (check_function_format): Likewise.
11333
11334 2012-04-27 Ollie Wild <aaw@google.com>
11335
11336 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11337 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11338 * c.opt: Add Wliteral-suffix.
11339
11340 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11341
11342 PR c/44774
11343 * c.opt (Wpedantic): New.
11344 (pedantic): Alias Wpedantic.
11345 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11346 (c_common_post_options): Likewise.
11347 (sanitize_cpp_opts): Likewise.
11348 * c-lex.c (interpret_float): Likewise.
11349 * c-format.c (check_format_types): Likewise.
11350 * c-common.c (pointer_int_sum): Likewise.
11351 (c_sizeof_or_alignof_type): Likewise.
11352 (c_add_case_label): Likewise.
11353 (c_do_switch_warnings): Likewise.
11354 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11355
11356 2012-04-15 Jason Merrill <jason@redhat.com>
11357
11358 PR c++/52818
11359 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11360 (C_STD_NAME): Distinguish between C++98 and C++11.
11361
11362 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11363
11364 PR target/52624
11365 * c-common.h (uint16_type_node): Rename into...
11366 (c_uint16_type_node): ...this.
11367 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11368 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11369
11370 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11371
11372 * c-common.c (warn_if_unused_value): Move definition to here.
11373 * c-common.h (warn_if_unused_value): Move declaration to here.
11374
11375 2012-03-23 William Bader <williambader@hotmail.com>
11376
11377 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11378
11379 2012-03-20 Jason Merrill <jason@redhat.com>
11380
11381 * c-common.h (enum cxx_dialect): Add cxx1y.
11382 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11383 test.
11384 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11385 * c-opts.c (c_common_post_options): Likewise.
11386 (set_std_cxx1y): New.
11387 (c_common_handle_option): Call it.
11388 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11389
11390 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11391
11392 PR c++/14710
11393 * c.opt ([Wuseless-cast]): Add.
11394
11395 2012-03-16 Richard Guenther <rguenther@suse.de>
11396
11397 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11398
11399 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11400
11401 PR c++/44783
11402 * c.opt (ftemplate-backtrace-limit) Add.
11403
11404 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11405
11406 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11407 handling.
11408 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11409 (init_pragma): Don't register extern_prefix.
11410
11411 2012-03-12 Richard Guenther <rguenther@suse.de>
11412
11413 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11414 (builtin_type_for_size): Likewise.
11415
11416 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11417
11418 PR c++/52215
11419 * c-common.c (sync_resolve_params): Don't decide whether to convert
11420 or not based on TYPE_SIZE comparison, convert whenever arg_type
11421 is unsigned INTEGER_TYPE.
11422
11423 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11424
11425 PR c/52118
11426 * c.opt ([Wunused-local-typedefs]): Fix description.
11427
11428 2012-01-24 Mike Stump <mikestump@comcast.net>
11429
11430 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11431 exactly.
11432
11433 2012-01-18 Richard Guenther <rguenther@suse.de>
11434
11435 * c-opts.c (c_common_post_options): Reset LTO flags if
11436 we are about to generate a PCH.
11437
11438 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11439
11440 PR c++/51777
11441 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11442 use pp_unsigned_wide_integer.
11443
11444 2012-01-10 Richard Guenther <rguenther@suse.de>
11445
11446 PR middle-end/51806
11447 * c-opts.c (c_common_handle_option): Move -Werror handling
11448 to language independent code.
11449
11450 2012-01-05 Richard Guenther <rguenther@suse.de>
11451
11452 PR middle-end/51764
11453 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11454 from common.opt.
11455
11456 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11457
11458 PR c++/51316
11459 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11460 of array types with an unknown bound.
11461
11462 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11463
11464 * c-common.c (flag_isoc99): Update comment to refer to C11.
11465 (flag_isoc1x): Change to flag_isoc11.
11466 * c-common.h (flag_isoc99): Update comment to refer to C11.
11467 (flag_isoc1x): Change to flag_isoc11.
11468 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11469 C11.
11470 * c-opts.c (set_std_c1x): Change to set_std_c11.
11471 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11472 Call set_std_c11.
11473 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11474 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11475 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11476 standard.
11477 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11478 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11479 (std=gnu1x): Make alias of std=gnu11.
11480
11481 2011-12-19 Jason Merrill <jason@redhat.com>
11482
11483 PR c++/51228
11484 * c-common.c (handle_transparent_union_attribute): Check the first
11485 field if the type is complete.
11486
11487 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11488
11489 PR libstdc++/51365
11490 * c-common.c (RID_IS_FINAL): Add.
11491 * c-common.h (RID_IS_FINAL): Add.
11492
11493 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11494
11495 * c.opt (fgnu-runtime): Provide full description.
11496 (fnext-runtime): Likewise.
11497 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11498
11499 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11500
11501 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11502 predefines in one place. Add LOCK_FREE predefines.
11503 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11504 new func.
11505
11506 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11507
11508 PR c/51256
11509 * c-common.c (get_atomic_generic_size): Check for various error
11510 conditions
11511 (resolve_overloaded_atomic_exchange,
11512 resolve_overloaded_atomic_compare_exchange,
11513 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11514 error_mark_node for error conditions.
11515
11516 2011-11-08 Richard Guenther <rguenther@suse.de>
11517
11518 PR middle-end/51010
11519 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11520
11521 2011-11-07 Richard Henderson <rth@redhat.com>
11522 Aldy Hernandez <aldyh@redhat.com>
11523 Torvald Riegel <triegel@redhat.com>
11524
11525 Merged from transactional-memory.
11526
11527 * c-common.c (handle_tm_wrap_attribute,
11528 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11529 (struct c_common_reswords): Added __transaction* keywords.
11530 (struct c_common_attribute_table): Added transaction* and tm_regparm
11531 attributes.
11532 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11533 masks.
11534 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11535 find_tm_attribute): Declare.
11536
11537 2011-11-07 Jason Merrill <jason@redhat.com>
11538
11539 PR c++/35688
11540 * c-common.c, c-common.h: Revert yesterday's changes.
11541
11542 2011-11-06 Jason Merrill <jason@redhat.com>
11543
11544 PR c++/35688
11545 * c-common.c (decl_has_visibility_attr): Split out from...
11546 (c_determine_visibility): ...here.
11547 * c-common.h: Declare it.
11548
11549 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11550
11551 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11552 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11553 type.
11554 (check_user_alignment): New. Split out of
11555 handle_aligned_attribute. Disallow integer constants with
11556 noninteger types. Conditionally allow zero.
11557 (handle_aligned_attribute): Use check_user_alignment.
11558 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11559
11560 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11561 Richard Henderson <rth@redhat.com>
11562
11563 Merged from cxx-mem-model.
11564
11565 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11566 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11567 parameters that are the same type size.
11568 (get_atomic_generic_size): New. Find size of generic
11569 atomic function parameters and do typechecking.
11570 (add_atomic_size_parameter): New. Insert size into parameter list.
11571 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11572 either __atomic_exchange_n or external library call.
11573 (resolve_overloaded_atomic_compare_exchange): Restructure
11574 __atomic_compare_exchange to either _n variant or external library call.
11575 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11576 __atomic_load_n or an external library call.
11577 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11578 __atomic_store_n or an external library call.
11579 (resolve_overloaded_builtin): Handle new __atomic builtins.
11580
11581 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11582
11583 PR c++/50608
11584 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11585 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11586 <INDIRECT_REF>: Return the argument.
11587 <ARRAY_REF>: Remove special code for negative offset.
11588 Call fold_build_pointer_plus instead of size_binop.
11589 (fold_offsetof): Remove STOP_REF argument and adjust.
11590 * c-common.h (fold_offsetof_1): Declare.
11591 (fold_offsetof): Remove STOP_REF argument.
11592
11593 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11594
11595 PR c++/50810
11596 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11597 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11598 Wnarrowing for C++0x and C++98.
11599 * c.opt ([Wnarrowing]): Update.
11600
11601 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11602
11603 PR c++/44277
11604 * c.opt: Add Wzero-as-null-pointer-constant.
11605
11606 2011-10-31 Jason Merrill <jason@redhat.com>
11607
11608 * c.opt (-fdeduce-init-list): Off by default.
11609
11610 PR c++/50920
11611 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11612 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11613 and -Wc++11-compat.
11614 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11615
11616 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11617
11618 PR c++/30066
11619 * c.opt (fvisibility-inlines-hidden): Description change.
11620
11621 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11622
11623 Implement C++11 user-defined literals.
11624 * c-common.c (build_userdef_literal): New.
11625 * c-common.def: New tree code.
11626 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11627 * c-lex.c (interpret_float): Add suffix parm.
11628 (c_lex_with_flags): Build literal tokens.
11629
11630 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11631
11632 PR c++/50841
11633 Revert:
11634 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11635
11636 PR c++/50810
11637 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11638 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11639 Wnarrowing for C++0x and C++98.
11640 * c.opt ([Wnarrowing]): Update.
11641
11642 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11643
11644 PR c++/50810
11645 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11646 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11647 Wnarrowing for C++0x and C++98.
11648 * c.opt ([Wnarrowing]): Update.
11649
11650 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11651
11652 PR c++/45385
11653 * c-common.c (conversion_warning): Remove code looking for
11654 artificial operands.
11655
11656 2011-10-18 Dodji Seketeli <dodji@redhat.com>
11657
11658 PR bootstrap/50760
11659 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11660 !NO_IMPLICIT_EXTERN_C.
11661
11662 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
11663
11664 * c-common.c (c_common_reswords): Add __bases,
11665 __direct_bases.
11666 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11667
11668 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11669
11670 PR c++/50757
11671 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11672
11673 2011-10-15 Tom Tromey <tromey@redhat.com>
11674 Dodji Seketeli <dodji@redhat.com>
11675
11676 * c.opt (fdebug-cpp): New option.
11677 * c-opts.c (c_common_handle_option): Handle the option.
11678 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11679 output stream in parameter. Factorized from ...
11680 (maybe_print_line): ... this. Dump location debug information when
11681 -fdebug-cpp is in effect.
11682 (print_line_1): New static function. Takes an output stream in
11683 parameter. Factorized from ...
11684 (print_line): ... here. Dump location information when -fdebug-cpp
11685 is in effect.
11686 (scan_translation_unit): Dump location information when
11687 -fdebug-cpp is in effect.
11688
11689 2011-10-15 Tom Tromey <tromey@redhat.com>
11690 Dodji Seketeli <dodji@redhat.com>
11691
11692 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11693 without argument.
11694 * c-opts.c (c_common_handle_option)<case
11695 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11696 cases. Handle -ftrack-macro-expansion with and without argument.
11697
11698 2011-10-15 Tom Tromey <tromey@redhat.com>
11699 Dodji Seketeli <dodji@redhat.com>
11700
11701 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11702 (print_line, cb_define, do_line_change): Adjust to avoid touching
11703 the internals of struct line_map. Use the public API instead.
11704 * c-pch.c (c_common_read_pch): Likewise.
11705 * c-lex.c (fe_file_change): Likewise.
11706
11707 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11708
11709 PR c++/17212
11710 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11711
11712 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11713
11714 PR c++/33067
11715 * c-pretty-print.c (pp_c_floating_constant): Output
11716 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11717
11718 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11719
11720 * c-common.c (def_builtin_1): Delete old interface with two
11721 parallel arrays to hold standard builtin declarations, and replace
11722 it with a function based interface that can support creating
11723 builtins on the fly in the future. Change all uses, and poison
11724 the old names. Make sure 0 is not a legitimate builtin index.
11725 * c-omp.c (c_finish_omp_barrier): Ditto.
11726 (c_finish_omp_taskwait): Ditto.
11727 (c_finish_omp_flush): Ditto.
11728
11729 2011-10-11 Tristan Gingold <gingold@adacore.com>
11730
11731 * c.opt: (fallow-parameterless-variadic-functions): New.
11732
11733 2011-09-08 Dodji Seketeli <dodji@redhat.com>
11734
11735 PR c++/33255 - Support -Wunused-local-typedefs warning
11736 * c-common.h (struct c_language_function::local_typedefs): New
11737 field.
11738 (record_locally_defined_typedef, maybe_record_typedef_use)
11739 (maybe_warn_unused_local_typedefs): Declare new functions.
11740 * c-common.c (record_locally_defined_typedef)
11741 (maybe_record_typedef_use)
11742 (maybe_warn_unused_local_typedefs): Define new functions.
11743 * c.opt: Declare new -Wunused-local-typedefs flag.
11744
11745 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11746
11747 PR middle-end/50266
11748 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11749 computations.
11750
11751 2011-09-05 Richard Guenther <rguenther@suse.de>
11752
11753 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11754 of integer_minus_one_node for empty array upper bounds.
11755
11756 2011-08-28 Dodji Seketeli <dodji@redhat.com>
11757
11758 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11759 it's the first time it's being called on this main TU.
11760
11761 2011-08-24 Richard Guenther <rguenther@suse.de>
11762
11763 PR c/49396
11764 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11765
11766 2011-08-22 Gabriel Charette <gchare@google.com>
11767
11768 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11769 defined in cpp_init_builtins and c_cpp_builtins.
11770
11771 2011-08-19 Joseph Myers <joseph@codesourcery.com>
11772
11773 * c-common.c (c_common_reswords): Add __builtin_complex.
11774 * c-common.h (RID_BUILTIN_COMPLEX): New.
11775
11776 2011-08-18 Joseph Myers <joseph@codesourcery.com>
11777
11778 * c-common.c (c_common_reswords): Add _Noreturn.
11779 (keyword_is_function_specifier): Handle RID_NORETURN.
11780 * c-common.h (RID_NORETURN): New.
11781
11782 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11783
11784 * c-common.c (unsafe_conversion_p): New function. Check if it is
11785 unsafe to convert an expression to the type.
11786 (conversion_warning): Adjust, use unsafe_conversion_p.
11787 * c-common.h (unsafe_conversion_p): New function declaration.
11788
11789 2011-08-02 Jakub Jelinek <jakub@redhat.com>
11790
11791 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11792 (c_finish_omp_taskyield): New prototype.
11793 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11794 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11795 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11796 or RHS1 have side-effects, evaluate those too in the right spot,
11797 if it is a decl and LHS is also a decl, error out if they
11798 aren't the same.
11799 (c_finish_omp_taskyield): New function.
11800 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11801 * c-pragma.c (omp_pragmas): Add taskyield.
11802 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11803 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11804 PRAGMA_OMP_CLAUSE_MERGEABLE.
11805
11806 2011-07-25 Dodji Seketeli <dodji@redhat.com>
11807
11808 * c-common.h (set_underlying_type): Remove parm name from
11809 declaration.
11810
11811 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
11812
11813 * c-pretty-print.h: Search c-common.h in c-family.
11814
11815 2011-07-22 Jason Merrill <jason@redhat.com>
11816
11817 PR c++/49793
11818 * c.opt (Wnarrowing): New.
11819
11820 PR c++/30112
11821 * c-common.h: Declare c_linkage_bindings.
11822 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11823
11824 PR c++/49813
11825 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11826 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11827 as flag_isoc99 for 'restrict'.
11828 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11829
11830 2011-07-21 Ian Lance Taylor <iant@google.com>
11831
11832 PR middle-end/49705
11833 * c-common.c (c_disable_warnings): New static function.
11834 (c_enable_warnings): New static function.
11835 (c_fully_fold_internal): Change local unused_p to bool. Call
11836 c_disable_warnings and c_enable_warnings rather than change
11837 c_inhibit_evaluation_warnings.
11838
11839 2011-07-20 Jason Merrill <jason@redhat.com>
11840
11841 PR c++/6709 (DR 743)
11842 PR c++/42603 (DR 950)
11843 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11844 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11845 (CPP_DECLTYPE): New.
11846 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11847
11848 2011-07-19 Richard Guenther <rguenther@suse.de>
11849
11850 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11851 * c-omp.c (c_finish_omp_for): Likewise.
11852
11853 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11854
11855 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11856 body on the next line.
11857
11858 2011-07-08 Jason Merrill <jason@redhat.com>
11859
11860 PR c++/45437
11861 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11862
11863 PR c++/49673
11864 * c-common.c (c_apply_type_quals_to_decl): Don't check
11865 TYPE_NEEDS_CONSTRUCTING.
11866
11867 2011-07-06 Richard Guenther <rguenther@suse.de>
11868
11869 * c-common.c (c_common_nodes_and_builtins):
11870 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11871
11872 2011-07-05 Richard Guenther <rguenther@suse.de>
11873
11874 * c-common.c (c_common_nodes_and_builtins): Build all common
11875 tree nodes first.
11876
11877 2011-06-27 Jakub Jelinek <jakub@redhat.com>
11878
11879 * c-common.h (c_tree_chain_next): New static inline function.
11880
11881 * c-common.c (check_builtin_function_arguments): Handle
11882 BUILT_IN_ASSUME_ALIGNED.
11883
11884 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
11885
11886 * c-common.c: Add sync_ or SYNC__ to builtin names.
11887 * c-omp.c: Add sync_ or SYNC__ to builtin names.
11888
11889 2011-06-20 Pierre Vittet <piervit@pvittet.com>
11890
11891 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11892 handler.
11893 (gen_pragma_handler): New union.
11894 (internal_pragma_handler): New type.
11895 (c_register_pragma_with_data)
11896 (c_register_pragma_with_expansion_and_data): New functions.
11897
11898 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11899 (c_register_pragma, c_register_pragma_with_expansion)
11900 (c_invoke_pragma_handler): Changed to work with
11901 internal_pragma_handler.
11902 (c_register_pragma_with_data)
11903 (c_register_pragma_with_expansion_and_data): New functions.
11904
11905 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11906
11907 * c-common.c: Include common/common-target.h.
11908 (handle_section_attribute): Use
11909 targetm_common.have_named_sections.
11910 * c-cppbuiltin.c: Include common/common-target.h.
11911 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11912
11913 2011-06-10 Richard Guenther <rguenther@suse.de>
11914
11915 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11916 to print a IDENTIFIER_NODE.
11917
11918 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11919 Joseph Myers <joseph@codesourcery.com>
11920
11921 * c.opt (fbuilding-libgcc): New option.
11922 * c-cppbuiltin.c (c_cpp_builtins): Define
11923 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11924
11925 2011-06-07 Jason Merrill <jason@redhat.com>
11926
11927 * c-common.c (max_tinst_depth): Lower default to 900.
11928
11929 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11930
11931 2011-06-07 Richard Guenther <rguenther@suse.de>
11932
11933 * c-common.c (c_common_nodes_and_builtins): Do not set
11934 size_type_node or call set_sizetype.
11935
11936 2011-06-07 Dodji Seketeli <dodji@redhat.com>
11937
11938 PR debug/49130
11939 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11940 type when using pointer comparison to compare types.
11941
11942 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11943
11944 * c.opt: Add -Wdelete-non-virtual-dtor.
11945 * c-opts.c (c_common_handle_option): Include it in -Wall.
11946
11947 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11948
11949 PR bootstrap/49190
11950
11951 Revert:
11952 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11953
11954 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11955 not tree_common.
11956
11957 2011-05-27 Jakub Jelinek <jakub@redhat.com>
11958
11959 PR c++/49165
11960 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11961 C++ don't call c_common_truthvalue_conversion on void type arms.
11962
11963 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11964
11965 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11966 (stmt_list_stack): Define.
11967 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11968 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11969
11970 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11971
11972 * c-common.c (warning_candidate_p): Check for BLOCKs.
11973
11974 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11975
11976 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11977 not tree_common.
11978
11979 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11980
11981 * c-common.c (def_fn_type): Remove extra va_end.
11982
11983 2011-05-23 Jason Merrill <jason@redhat.com>
11984
11985 PR c++/48106
11986 * c-common.c (c_common_get_narrower): New.
11987 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11988
11989 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11990
11991 * c-common.h (check_function_arguments): Tweak prototype of
11992 check_function_arguments.
11993 * c-common.c (check_function_arguments): Likewise. Adjust
11994 calls to check_function_nonnull, check_function_format, and
11995 check_function_sentinel.
11996 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11997 separate attributes and typelist arguments. Use
11998 FOREACH_FUNCTION_ARGS to iterate over argument types.
11999
12000 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12001
12002 * c-common.c (c_common_reswords): Reorder.
12003 * c-common.h (rid): Likewise.
12004
12005 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12006
12007 * c-common.c (def_fn_type): Don't call build_function_type, call
12008 build_function_type_array or build_varargs_function_type_array
12009 instead.
12010 (c_common_nodes_and_builtins): Likewise.
12011
12012 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12013
12014 * c-common.c (c_add_case_label): Omit the loc argument to
12015 build_case_label.
12016 * c-common.h (build_case_label): Remove.
12017 * c-semantics.c (build_case_label): Remove.
12018
12019 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12020
12021 * c-objc.h (objc_start_method_definition): Update prototype.
12022 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12023
12024 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12025
12026 * c-common.c (check_main_parameter_types): Reindent. Don't use
12027 TYPE_ARG_TYPES directly.
12028 (handle_nonnull_attribute): Likewise.
12029 (sync_resolve_params): Likewise.
12030 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12031 to check_format_string.
12032 (handle_format_attribute): Likewise.
12033 (check_format_string): Take a function type to examine instead of
12034 a type list. Use a function_arg_iterator to step through argument
12035 types.
12036
12037 2011-05-04 Richard Guenther <rguenther@suse.de>
12038
12039 * c-common.c (fix_string_type): Use size_int for index type bounds.
12040 (start_fname_decls): Do not pass NULL to build_int_cst.
12041 (c_init_attributes): Likewise.
12042 * c-lex.c (c_lex_with_flags): Likewise.
12043
12044 2011-04-27 Jason Merrill <jason@redhat.com>
12045
12046 * c-common.c (make_tree_vector_from_list): New.
12047 * c-common.h: Declare it.
12048
12049 2011-04-26 Richard Guenther <rguenther@suse.de>
12050
12051 PR preprocessor/48248
12052 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12053 for output size with -P.
12054
12055 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12056
12057 * c-common.c (struct c_common_resword): Add __underlying_type.
12058 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12059
12060 2011-04-20 Jim Meyering <meyering@redhat.com>
12061
12062 * c-format.c (init_dollar_format_checking): Remove useless
12063 if-before-free.
12064
12065 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12066
12067 * c-objc.h (objc_get_interface_ivars): Removed.
12068 (objc_detect_field_duplicates): New.
12069 * stub-objc.c: Likewise.
12070
12071 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12072
12073 * stub-objc.c (objc_declare_protocols): Renamed to
12074 objc_declare_protocol.
12075 * c-objc.h: Likewise.
12076
12077 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12078
12079 * stub-objc.c (objc_declare_class): Updated argument name.
12080
12081 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12082
12083 * c-common.h (c_common_init_ts): Declare.
12084 * c-common.c (c_common_init_ts): Define.
12085
12086 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12087
12088 * c-objc.h (objc_build_message_expr): Updated prototype.
12089 * stub-objc.c (objc_build_message_expr): Likewise.
12090
12091 2011-04-12 Martin Jambor <mjambor@suse.cz>
12092
12093 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12094 of cgraph_node.
12095
12096 2011-04-11 Richard Guenther <rguenther@suse.de>
12097
12098 * c-common.c (complete_array_type): Build a range type of
12099 proper type.
12100
12101 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12102
12103 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12104 (handle_type_generic_attribute): Likewise.
12105
12106 2011-04-07 Jason Merrill <jason@redhat.com>
12107
12108 PR c++/48450
12109 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12110 conversion from C++0x scoped enum.
12111
12112 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12113
12114 * c-target-def.h: New file.
12115 * c-target.def: New file.
12116 * c-target.h: New file.
12117 * c-common.c (targetcm): Don't define here.
12118 * c-common.h (default_handle_c_option): Declare.
12119 * c-format.c: Include c-target.h instead of target.h.
12120 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12121 include tm.h.
12122 (default_handle_c_option): Move from targhooks.c.
12123
12124 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12125
12126 PR preprocessor/48248
12127 * c-ppoutput.c (print): Add src_file field.
12128 (init_pp_output): Initialize it.
12129 (maybe_print_line): Don't optimize by adding up to 8 newlines
12130 if map->to_file and print.src_file are different file.
12131 (print_line): Update print.src_file.
12132
12133 2011-03-25 Kai Tietz <ktietz@redhat.com>
12134
12135 * c-ada-spec.c (compare_comment): Use filename_cmp
12136 instead of strcmp for filename.
12137
12138 2011-03-25 Jeff Law <law@redhat.com>
12139
12140 * c-common.c (def_fn_type): Add missing va_end.
12141
12142 2011-03-25 Jason Merrill <jason@redhat.com>
12143
12144 * c.opt: Add -std=c++03.
12145
12146 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12147
12148 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12149
12150 2011-03-17 Kai Tietz <ktietz@redhat.com>
12151
12152 PR target/12171
12153 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12154 Display allowed attributes for function pointer types.
12155 (pp_c_attributes_display): New function to display
12156 attributes having affects_type_identity flag set to true.
12157 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12158
12159 * c-common.c (c_common_attribute_table):
12160 Add new element.
12161 (c_common_format_attribute_table): Likewise.
12162
12163 2011-03-18 Jason Merrill <jason@redhat.com>
12164
12165 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12166 * c-common.h: Don't declare it here.
12167 * c-common.c: Or define it here.
12168 * c-opts.c (c_common_handle_option): Or set it here.
12169
12170 PR c++/35315
12171 * c-common.c (handle_transparent_union_attribute): Don't
12172 make a duplicate type in C++.
12173
12174 2011-03-15 Jason Merrill <jason@redhat.com>
12175
12176 * c-common.c (max_constexpr_depth): New.
12177 * c-common.h: Declare it.
12178 * c-opts.c (c_common_handle_option): Set it.
12179 * c.opt (fconstexpr-depth): New option.
12180
12181 2011-03-11 Jason Merrill <jason@redhat.com>
12182
12183 * c-common.c (attribute_takes_identifier_p): Add missing const.
12184
12185 PR c++/46803
12186 * c-common.c (attribute_takes_identifier_p): Assume that an
12187 unknown attribute takes an identifier.
12188
12189 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12190
12191 PR c/47786
12192 * c-common.c (c_type_hash): Call list_length instead of iterating
12193 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12194
12195 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12196
12197 PR c/47809
12198 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12199
12200 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12201
12202 * c.opt (fobjc-abi-version=) New.
12203 (fobjc-nilcheck): New.
12204
12205 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12206
12207 PR c++/46890
12208 * c-common.h (keyword_is_decl_specifier): Declare.
12209 * c-common.c (keyword_is_decl_specifier): Define.
12210 (keyword_is_function_specifier): New function.
12211
12212 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12213
12214 PR c/47473
12215 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12216 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12217 REAL_TYPE.
12218
12219 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12220
12221 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12222
12223 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12224
12225 PR pch/47430
12226 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12227 after init_c_lex if pch_file is set.
12228
12229 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12230
12231 PR c++/43601
12232 * c.opt (-fkeep-inline-dllexport): New switch.
12233
12234 2011-01-12 Richard Guenther <rguenther@suse.de>
12235
12236 PR middle-end/32511
12237 * c-common.c (handle_weak_attribute): Warn instead of error
12238 on declaring an inline function weak.
12239
12240 2011-01-05 Tom Tromey <tromey@redhat.com>
12241
12242 * c-common.h (lvalue_error): Update.
12243 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12244 not error.
12245
12246 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12247
12248 PR objc/47075
12249 * c-objc.h (objc_finish_message_expr): Added argument to
12250 prototype.
12251
12252 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12253
12254 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12255 Use prototype_p.
12256
12257 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12258
12259 * c-objc.h (objc_maybe_warn_exceptions): New.
12260 * stub-objc.c (objc_maybe_warn_exceptions): New.
12261
12262 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12263
12264 * c-common.h (readonly_error): Declare.
12265 * c-common.c (readonly_error): Define.
12266
12267 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12268
12269 * c-common.h (invalid_indirection_error): Declare.
12270 * c-common.c (invalid_indirection_error): Define.
12271
12272 2010-12-03 Richard Guenther <rguenther@suse.de>
12273
12274 PR c/46745
12275 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12276 (pp_c_unary_expression): Likewise.
12277 (pp_c_expression): Likewise.
12278
12279 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12280
12281 * c-common.h (objc_finish_function): New.
12282 (objc_non_volatilized_type): Removed.
12283 (objc_type_quals_match): Removed.
12284 * stub-objc.c (objc_finish_function): New.
12285 (objc_non_volatilized_type): Removed.
12286 (objc_type_quals_match): Removed.
12287
12288 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12289
12290 * c-common.h (parse_optimize_options): Declare.
12291 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12292 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12293
12294 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12295
12296 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12297 GET_ENVIRONMENT.
12298 * c-pch.c (O_BINARY): Don't define here.
12299 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12300
12301 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12302
12303 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12304 targetm.except_unwind_info.
12305
12306 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12307
12308 * c-opts.c (c_common_handle_option): Pass location to
12309 set_struct_debug_option.
12310
12311 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12312
12313 * c-common.c (visibility_options): Move from ../opts.c.
12314 * c-common.h (struct visibility_flags, visibility_options):
12315 Declare here.
12316 * c-opts.c (finish_options): Rename to c_finish_options.
12317 (c_common_init): Update call to finish_options.
12318
12319 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12320
12321 PR objc/34033
12322 * c-lex.c (lex_string): Check that each string in an Objective-C
12323 string concat sequence starts with either one or zero '@', and
12324 that there are no spurious '@' signs at the end.
12325
12326 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12327
12328 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12329 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12330 HANDLE_PRAGMA_VISIBILITY.
12331 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12332 HANDLE_PRAGMA_VISIBILITY): Don't define.
12333 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12334
12335 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12336
12337 PR c++/16189
12338 PR c++/36888
12339 PR c++/45331
12340 * c-common.h (keyword_begins_type_specifier): Declare.
12341 (keyword_is_storage_class_specifier): Declare.
12342 (keyword_is_type_qualifier): Declare.
12343 * c-common.c (keyword_begins_type_specifier): New function.
12344 (keyword_is_storage_class_specifier): New function.
12345 (keyword_is_type_qualifier): Declare.
12346
12347 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12348
12349 PR c/46547
12350 * c-common.c (in_late_binary_op): Define.
12351 (c_common_truthvalue_conversion): Check in_late_binary_op before
12352 calling c_save_expr.
12353 * c-common.h (in_late_binary_op): Declare.
12354
12355 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12356
12357 * c-opts.c (c_common_handle_option): Update calls to
12358 set_struct_debug_option.
12359
12360 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12361
12362 * c-common.h (objc_declare_protocols): Added additional argument.
12363 * stub-objc.c (objc_declare_protocol): Same change.
12364
12365 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12366
12367 PR c/33193
12368 * c-common.h (build_real_imag_expr): Declare.
12369 * c-semantics.c (build_real_imag_expr): Define.
12370
12371 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12372
12373 * c-opts.c (c_common_parse_file): Take no arguments.
12374 * c-common.h (c_common_parse_file): Update prototype.
12375
12376 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12377
12378 PR c++/46401
12379 * c-common.c (warning_candidate_p): Don't track non-const calls
12380 or STRING_CSTs.
12381
12382 2010-11-15 Ian Lance Taylor <iant@google.com>
12383
12384 * c-lex.c (init_c_lex): Set macro debug callbacks if
12385 flag_dump_go_spec is set.
12386
12387 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12388
12389 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12390 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12391
12392 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12393
12394 PR preprocessor/45038
12395 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12396 dialects.
12397
12398 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12399
12400 * c-common.h (c_family_lang_mask): Declare.
12401 * c-opts.c (c_family_lang_mask): Make extern.
12402 * c-pragma.c (handle_pragma_diagnostic): Use
12403 control_warning_option.
12404
12405 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12406
12407 * c-common.c (parse_optimize_options): Update call to
12408 decode_options.
12409 * c-common.h (c_common_handle_option): Update prototype.
12410 * c-opts.c (c_common_handle_option): Take location_t parameter and
12411 pass it to other functions.
12412
12413 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12414
12415 * c-opts.c (warning_as_error_callback): Remove.
12416 (c_common_initialize_diagnostics): Don't call
12417 register_warning_as_error_callback.
12418 (c_common_handle_option): Handle -Werror=normalized= here.
12419
12420 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12421
12422 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12423 in diagnostic.
12424 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12425 letter.
12426 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12427 Remove trailing '.' from diagnostics.
12428 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12429
12430 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12431
12432 * c-common.c (parse_optimize_options): Pass global_dc to
12433 decode_options.
12434 * c-opts.c (c_common_handle_option): Pass &global_options to
12435 set_Wstrict_aliasing.
12436 * c.opt (v): Don't mark Common or document here.
12437
12438 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12439
12440 PR target/44981
12441 * c-format.c (format_type): New type gcc_objc_string_format_type.
12442 (valid_stringptr_type_p): New.
12443 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12444 (check_format_string): Pass expected type, use
12445 valid_stringptr_type_p (), check that the format string types are
12446 consistent with the format specification.
12447 (decode_format_attr): Warn if NSString is used outside objective-c.
12448 (format_types_orig): Add NSString.
12449 (format_name): New.
12450 (format_flags): New.
12451 (check_format_arg): Handle format strings requiring an external parser.
12452 first_target_format_type: New variable.
12453 (handle_format_attribute): Set up first_target_format_type, pass the
12454 expected format arg string type to check_format_string().
12455 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12456 * stub-objc.c (objc_string_ref_type_p): New.
12457 (objc_check_format_arg): New.
12458
12459 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12460
12461 Fixed using the Objective-C 2.0 dot-syntax with class names.
12462 * c-common.h (objc_build_class_component_ref): New.
12463 * stub-objc.c (objc_build_class_component_ref): New.
12464
12465 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12466
12467 * c.opt (Wproperty-assign-default): New option.
12468
12469 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12470
12471 Implemented -fobjc-std=objc1 flag.
12472 * c.opt (fobjc-std=objc1): New option.
12473
12474 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12475
12476 Implemented format and noreturn attributes for Objective-C methods.
12477 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12478 attribute for Objective-C methods.
12479
12480 2010-10-31 Jason Merrill <jason@redhat.com>
12481
12482 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12483 EXPR_LOC_OR_HERE.
12484
12485 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12486
12487 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12488 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12489 (objc_add_property_declaration): Removed arguments for copies and
12490 ivar.
12491 (objc_build_getter_call): Renamed to
12492 objc_maybe_build_component_ref.
12493 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12494 (objc_is_property_ref): New.
12495 * c-common.c (c_common_reswords): Removed copies and ivar.
12496 * stub-objc.c (objc_add_property_declaration): Removed arguments
12497 for copies and ivar.
12498 (objc_build_getter_call): Renamed to
12499 objc_maybe_build_component_ref.
12500 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12501 (objc_is_property_ref): New.
12502
12503 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12504 Matthew Gingell <gingell@adacore.com>
12505
12506 * c-ada-spec.c (separate_class_package): New function.
12507 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12508 name of their enclosing package.
12509 (print_ada_declaration): Use separate_class_package.
12510
12511 2010-10-27 Jason Merrill <jason@redhat.com>
12512
12513 * c-common.c (c_common_reswords): Add __is_literal_type.
12514 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12515
12516 * c-common.c (check_case_value): Remove special C++ code.
12517
12518 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12519
12520 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12521 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12522 and RID_LAST_PATTR.
12523 (objc_add_property_declaration): Added additional arguments.
12524 (objc_property_attribute_kind): Removed.
12525 (objc_set_property_attr): Removed.
12526 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12527 copy and nonatomic.
12528 * stub-objc.c (objc_add_property_declaration): Added additional
12529 arguments.
12530 (objc_set_property_attr): Removed.
12531
12532 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12533
12534 * c-common.h (objc_add_property_variable): Renamed to
12535 objc_add_property_declaration. Added location argument.
12536 * stub-objc.c (objc_add_property_variable): Same change.
12537
12538 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12539
12540 * c-common.h (objc_maybe_printable_name): New.
12541 * stub-objc.c (objc_maybe_printable_name): New.
12542
12543 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12544 Andrew Pinski <pinskia@gmail.com>
12545
12546 * c-common.h (c_common_mark_addressable_vec): Declare.
12547 * c-common.c (c_common_mark_addressable_vec): New function.
12548
12549 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12550
12551 * c-common.h (objc_set_method_type): Removed.
12552 (objc_add_method_declaration): Added boolean argument.
12553 (objc_start_method_definition): Same change.
12554 (objc_build_method_signature): Same change.
12555 * stub-objc.c (objc_set_method_type): Removed.
12556 (objc_add_method_declaration): Added boolean argument.
12557 (objc_start_method_definition): Same change.
12558 (objc_build_method_signature): Same change.
12559
12560 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12561
12562 * c-common.h (finish_file): Removed.
12563 (objc_write_global_declarations): New.
12564 * c-opts.c (c_common_parse_file): Do not call finish_file.
12565 * stub-objc.c (objc_write_global_declarations): New.
12566
12567 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12568
12569 Implemented parsing @synthesize and @dynamic for
12570 Objective-C/Objective-C++.
12571 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12572 (objc_add_synthesize_declaration): New.
12573 (objc_add_dynamic_declaration): New.
12574 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12575 * stub-objc.c (objc_add_synthesize_declaration): New.
12576 (objc_add_dynamic_declaration): New.
12577
12578 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12579
12580 PR target/46041
12581 * c-cppbuiltin.c (mode_has_fma): Move function here from
12582 builtins.c. Don't use the fma optab, instead just use the
12583 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12584 using -save-temps.
12585
12586 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12587
12588 Merge from 'apple/trunk' branch on FSF servers.
12589
12590 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12591
12592 Radar 4330422
12593 * c-common.h (objc_non_volatilized_type): New declaration
12594 * stub-objc.c (objc_non_volatilized_type): New stub.
12595
12596 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12597
12598 Merge from 'apple/trunk' branch on FSF servers.
12599
12600 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12601
12602 Radar 4133425
12603 * c-common.h (objc_diagnose_private_ivar): New decl.
12604 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12605
12606 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12607
12608 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12609 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12610 (objc_ivar_visibility_kind): New enum.
12611 (objc_set_visibility): Adjust prototype to use visibility enum.
12612 * stub-objc.c (objc_set_visibility): Adjust stub to use
12613 visibility enum.
12614
12615 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12616
12617 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12618 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12619 has the appropriate fma builtins.
12620 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12621
12622 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12623
12624 merge from FSF apple 'trunk' branch.
12625 2006 Fariborz Jahanian <fjahanian@apple.com>
12626
12627 Radars 4436866, 4505126, 4506903, 4517826
12628 * c-common.c (c_common_resword): Define @property and its attributes.
12629 * c-common.h: Define property attribute enum entries.
12630 (OBJC_IS_PATTR_KEYWORD): New.
12631 (objc_property_attribute_kind): New enum.
12632 Declare objc_set_property_attr (), objc_add_property_variable (),
12633 objc_build_getter_call () and objc_build_setter_call ().
12634 * stub-objc.c (objc_set_property_attr): New stub.
12635 (objc_add_property_variable): Likewise.
12636 (objc_build_getter_call): Likewise.
12637 (objc_build_setter_call) Likewise.
12638
12639 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12640
12641 merge from FSF apple 'trunk' branch.
12642 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
12643
12644 Radar 3803157 (method attributes)
12645 * c-common.c (handle_deprecated_attribute): Recognize
12646 objc methods as valid declarations.
12647 * c-common.h: Declare objc_method_decl ().
12648 * stub-objc.c (objc_method_decl): New stub.
12649
12650 2010-10-08 Joseph Myers <joseph@codesourcery.com>
12651
12652 * c-common.c (parse_optimize_options): Call
12653 decode_cmdline_options_to_array_default_mask before
12654 decode_options. Update arguments to decode_options.
12655 * c-common.h (c_common_init_options_struct): Declare.
12656 * c-opts.c (c_common_init_options_struct): New. Split out from
12657 c_common_init_options.
12658
12659 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12660
12661 Implemented fast enumeration for Objective-C.
12662 * c-common.h (objc_finish_foreach_loop): New.
12663 * stub-objc.c (objc_finish_foreach_loop): New.
12664
12665 2010-10-05 Joseph Myers <joseph@codesourcery.com>
12666
12667 * c-common.h (struct diagnostic_context): Don't declare here.
12668 (c_common_initialize_diagnostics): Declare using
12669 diagnostic_context typedef.
12670 * c-opts.c (c_common_handle_option): Pass global_dc to
12671 handle_generated_option.
12672
12673 2010-10-04 Joseph Myers <joseph@codesourcery.com>
12674
12675 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12676 handle_generated_option.
12677
12678 2010-10-03 Ian Lance Taylor <iant@google.com>
12679
12680 * c.opt (-fplan9-extensions): New option.
12681
12682 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12683
12684 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12685 Remove.
12686 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12687 of duplicating code.
12688
12689 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12690
12691 * c-common.c: Add two new entries for @optional
12692 and @required keywords.
12693
12694 merge from FSF 'apple/trunk' branch.
12695 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
12696
12697 Radar 4386773
12698 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12699 objective-c keywords.
12700 (objc_set_method_opt): New declaration.
12701 * stub-objc.c (objc_set_method_opt): New stub.
12702
12703 2010-09-30 Joseph Myers <joseph@codesourcery.com>
12704
12705 * c-common.c (handle_optimize_attribute): Pass &global_options to
12706 cl_optimization_save and cl_optimization_restore.
12707 * c-opts.c (c_common_handle_option): Pass &global_options to
12708 handle_generated_option.
12709 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12710 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12711 &global_options to cl_optimization_restore.
12712
12713 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12714
12715 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12716 Objective-C/Objective-C++ keywords.
12717
12718 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12719
12720 Merge from 'apple/trunk' branch on FSF servers.
12721
12722 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
12723
12724 Radar 4281748
12725 * c-common.h (objc_check_global_decl): New declaration.
12726 * stub-objc.c (objc_check_global_decl): New stub.
12727
12728 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12729
12730 * c.opt: Don't use VarExists.
12731
12732 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12733
12734 * c-common.c (c_cpp_error): Update names of diagnostic_context
12735 members.
12736 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12737 cl_optimization members.
12738 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12739 sanitize_cpp_opts, finish_options): Update names of cpp_options
12740 members.
12741
12742 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12743
12744 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12745 (objc_is_reserved_word): Removed.
12746 * c-common.c: Updated comments.
12747 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12748 objc_is_reserved_word.
12749 * stub-objc.c (objc_is_reserved_word): Removed.
12750
12751 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12752
12753 * c-common.h (objc_add_method_declaration): Adjust prototype to
12754 include attributes.
12755 (objc_start_method_definition): Likewise.
12756 (objc_build_keyword_decl): Likewise.
12757 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12758 (objc_start_method_definition): Likewise.
12759 (objc_build_keyword_decl): Likewise.
12760
12761 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12762
12763 * c-common.h (objc_start_class_interface): Adjust prototype.
12764 (objc_start_category_interface): Likewise.
12765 (objc_start_protocol): Likewise.
12766 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12767 (objc_start_class_interface): Likewise.
12768 (objc_start_category_interface): Likewise.
12769
12770 2010-09-27 Ian Lance Taylor <iant@google.com>
12771
12772 * c-common.c (c_common_attribute_table): Add no_split_stack.
12773 (handle_no_split_stack_attribute): New static function.
12774
12775 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12776
12777 Merge from 'apple/trunk' branch on FSF servers.
12778
12779 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
12780
12781 Radar 4229905
12782 * c-common.h (objc_have_common_type): New declaration.
12783 * stub-objc.c (objc_have_common_type): New stub.
12784
12785 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12786
12787 Radar 4154928
12788 * c-common.h (objc_common_type): New prototype.
12789 * stub-objc.c (objc_common_type): New stub.
12790
12791 2010-09-24 Jan Hubicka <jh@suse.cz>
12792
12793 * c-common.c (handle_leaf_attribute): New function.
12794 (struct attribute_spec c_common_att): Add leaf.
12795
12796 2010-09-22 Joseph Myers <joseph@codesourcery.com>
12797
12798 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12799 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12800 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12801 -include-barrier, -include-directory, -include-directory=,
12802 -include-directory-after, -include-directory-after=,
12803 -include-prefix, -include-prefix=, -include-with-prefix,
12804 -include-with-prefix=, -include-with-prefix-after,
12805 -include-with-prefix-after=, -include-with-prefix-before,
12806 -include-with-prefix-before=, -no-integrated-cpp,
12807 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12808 -output=, -pedantic, -pedantic-errors, -preprocess,
12809 -print-missing-file-dependencies, -trace-includes, -traditional,
12810 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12811 -user-dependencies, -verbose, -write-dependencies,
12812 -write-user-dependencies, no-integrated-cpp, traditional): New.
12813
12814 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12815
12816 PR objc/23710
12817 * c-common.h (objc_start_method_definition): Return bool instead
12818 of void.
12819 * stub-objc.c (objc_start_method_definition): Return bool instead
12820 of void.
12821
12822 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12823
12824 PR objc/25965
12825 * c-common.h (objc_get_interface_ivars): New declaration.
12826 * stub-objc.c (objc_get_interface_ivars): New stub.
12827
12828 2010-09-15 Ian Lance Taylor <iant@google.com>
12829
12830 * c-common.c (parse_optimize_options): Do not capitalize warning
12831 messages. Remove period at end of warning message.
12832
12833 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12834
12835 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12836 (handle_alias_attribute): ... here.
12837 (handle_ifunc_attribute): New.
12838
12839 2010-09-06 Mark Mitchell <mark@codesourcery.com>
12840
12841 * c-common.h (do_warn_double_promotion): Declare.
12842 * c-common.c (do_warn_double_promotion): Define.
12843
12844 2010-09-05 Mark Mitchell <mark@codesourcery.com>
12845
12846 * c.opt (Wdouble-promotion): New.
12847
12848 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12849
12850 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12851 fvtable-thunks, fxref): Mark no longer supported in help text.
12852
12853 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12854
12855 * c.opt (Wimport, fall-virtual, falt-external-templates,
12856 fdefault-inline, fenum-int-equiv, fexternal-templates,
12857 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12858 fname-mangling-version-, fnew-abi, fnonnull-objects,
12859 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12860 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12861 applicable.
12862 (fhandle-exceptions): Mark with Alias and Warn.
12863 * c-opts.c (c_common_handle_option): Don't handle options marked
12864 as ignored.
12865
12866 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12867
12868 * c.opt (Wcomments, Werror-implicit-function-declaration,
12869 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12870 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12871 aliases.
12872 * c-common.c (option_codes): Use OPT_Wcomment instead of
12873 OPT_Wcomments.
12874 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12875 Don't handle options marked as aliases.
12876
12877 2010-08-25 Richard Guenther <rguenther@suse.de>
12878
12879 * c-common.c (c_common_get_alias_set): Remove special
12880 handling for pointers.
12881
12882 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12883
12884 * c-common.c: Use FOR_EACH_VEC_ELT.
12885 * c-gimplify.c: Likewise.
12886 * c-pragma.c: Likewise.
12887
12888 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12889
12890 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12891 RejectDriver.
12892 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12893 RejectDriver.
12894 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12895 instead of OPT_MDX and OPT_MMDX.
12896
12897 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12898
12899 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12900
12901 2010-08-12 Joseph Myers <joseph@codesourcery.com>
12902
12903 * c.opt (MD, MMD): Change to MDX and MMDX.
12904 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12905
12906 2010-08-11 Joseph Myers <joseph@codesourcery.com>
12907
12908 * c-opts.c (c_common_handle_option): Call handle_generated_option
12909 instead of handle_option.
12910
12911 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12912
12913 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12914 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12915
12916 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12917
12918 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12919 (pending_redefine_extname): Change type to a VEC.
12920 (add_to_renaming_pragma_list): Update for new type of
12921 pending_redefine_extname.
12922 (maybe_apply_renaming_pragma): Likewise.
12923
12924 2010-08-04 Arnaud Charlet <charlet@adacore.com>
12925
12926 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12927 visited.
12928 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12929 decide whether a type has already been declared/seen.
12930 Do not go to the original type.
12931 (dump_nested_types): New parameter forward.
12932 Generate forward declaration if needed and mark type as visited.
12933 (print_ada_declaration): Call dump_nested_types if not already done.
12934 Mark types as visited.
12935
12936 2010-08-03 Joseph Myers <joseph@codesourcery.com>
12937
12938 * c.opt (-print-pch-checksum): Remove option.
12939 * c-opts.c (c_common_handle_option): Don't handle
12940 OPT_print_pch_checksum.
12941
12942 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12943
12944 * c-common.h (c_common_handle_option): Update prototype and return
12945 value type.
12946 * c-opts.c (c_common_handle_option): Update prototype and return
12947 value type. Update calls to handle_option and
12948 enable_warning_as_error.
12949
12950 2010-07-27 Jakub Jelinek <jakub@redhat.com>
12951
12952 PR c/45079
12953 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12954
12955 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12956
12957 * c-common.h (c_common_missing_argument): Remove.
12958 * c-opts.c (c_common_missing_argument): Remove.
12959 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12960 idirafter, imacros, include, isysroot, isystem, iquote): Add
12961 MissingArgError.
12962 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12963
12964 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12965
12966 * c-common.h (c_common_option_lang_mask,
12967 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12968 New.
12969 (c_common_init_options): Update prototype.
12970 * c-opts.c (c_common_option_lang_mask): New.
12971 (c_common_initialize_diagnostics): Split out of
12972 c_common_init_options.
12973 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12974 New.
12975 (c_common_init_options): Update prototype. Use decoded options in
12976 search for -lang-asm.
12977
12978 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12979
12980 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12981 * c-format.c: Likewise.
12982
12983 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12984
12985 * c-common.h: Include diagnostic-core.h. Error if already
12986 included.
12987 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12988
12989 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12990
12991 * c-common.c (IN_GCC_FRONTEND): Do not undef.
12992 Do not include expr.h
12993 (vector_mode_valid_p): Move here.
12994
12995 2010-06-21 DJ Delorie <dj@redhat.com>
12996
12997 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12998 allow these pragmas anywhere.
12999
13000 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13001
13002 PR bootstrap/44509
13003 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13004 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13005 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13006 ggc_strdup instead of xstrdup.
13007
13008 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13009
13010 * c-cppbuiltin.c: Include cpp-id-data.h.
13011 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13012 (lazy_hex_fp_value): New function.
13013 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13014
13015 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13016
13017 * c-gimplify.c: Do not include tree-flow.h
13018
13019 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13020
13021 PR other/44034
13022 * c-common.c: Rename targetm member:
13023 targetm.enum_va_list -> targetm.enum_va_list_p
13024
13025 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13026
13027 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13028
13029 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13030
13031 * c-cppbuiltin.c: Do not include except.h.
13032
13033 2010-06-24 Andi Kleen <ak@linux.intel.com>
13034
13035 * c-common.c (warn_for_omitted_condop): New.
13036 * c-common.h (warn_for_omitted_condop): Add prototype.
13037
13038 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13039
13040 * c.opt (lang-objc): Remove.
13041 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13042
13043 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13044
13045 * c-opts.c: Include "tm_p.h".
13046
13047 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13048
13049 * c-common.c (parse_optimize_options): Update call to
13050 decode_options.
13051
13052 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13053
13054 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13055 new type of types_used_by_cur_var_decl.
13056
13057 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13058
13059 PR bootstrap/44512
13060 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13061 for C++ standard compliance.
13062
13063 2010-06-16 Jason Merrill <jason@redhat.com>
13064
13065 * c.opt: Add -Wnoexcept.
13066
13067 2010-06-16 Richard Guenther <rguenther@suse.de>
13068
13069 PR c/44555
13070 * c-common.c (c_common_truthvalue_conversion): Remove
13071 premature and wrong optimization concering ADDR_EXPRs.
13072
13073 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13074
13075 * c-ada-spec.c (dump_sloc): Remove column info.
13076 (is_simple_enum): New function.
13077 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13078 enum types when relevant.
13079
13080 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13081
13082 * c-common.c (conversion_warning): Warn at expression
13083 location.
13084
13085 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13086
13087 * c-opts.c (c_common_handle_option): Don't handle
13088 OPT_fshow_column.
13089
13090 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13091
13092 * c-pragma.c (push_alignment): Use typed GC allocation.
13093 (handle_pragma_push_options): Likewise.
13094
13095 * c-common.c (parse_optimize_options): Likewise.
13096
13097 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13098 option.
13099
13100 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13101
13102 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13103 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13104 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13105 flag_signed_bitfields, warn_strict_null_sentinel,
13106 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13107 flag_gen_declaration, flag_no_gnu_keywords,
13108 flag_implement_inlines, flag_implicit_templates,
13109 flag_implicit_inline_templates, flag_optional_diags,
13110 flag_elide_constructors, flag_default_inline, flag_rtti,
13111 flag_conserve_space, flag_access_control, flag_check_new,
13112 flag_new_for_scope, flag_weak, flag_working_directory,
13113 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13114 flag_enforce_eh_specs, flag_threadsafe_statics,
13115 flag_pretty_templates): Remove.
13116 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13117 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13118 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13119 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13120 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13121 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13122 flag_no_gnu_keywords, flag_implement_inlines,
13123 flag_implicit_templates, flag_implicit_inline_templates,
13124 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13125 flag_rtti, flag_conserve_space, flag_access_control,
13126 flag_check_new, flag_new_for_scope, flag_weak,
13127 flag_working_directory, flag_use_cxa_atexit,
13128 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13129 flag_threadsafe_statics, flag_pretty_templates,
13130 warn_strict_null_sentinel): Remove.
13131 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13132 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13133 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13134 fimplicit-inline-templates, fimplicit-templates,
13135 flax-vector-conversions, fms-extensions, fnil-receivers,
13136 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13137 frtti, fshort-double, fshort-enums, fshort-wchar,
13138 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13139 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13140 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13141 gen-decls, undef): Use Var.
13142 (fdefault-inline, foptional-diags): Document as doing nothing.
13143 * c-opts.c (c_common_handle_option): Remove cases for options now
13144 using Var. Mark ignored options as such.
13145
13146 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13147
13148 * c-common.c: Moved to here from parent directory.
13149 * c-common.def: Likewise.
13150 * c-common.h: Likewise.
13151 * c-cppbuiltin.c: Likewise.
13152 * c-dump.c: Likewise.
13153 * c-format.c: Likewise.
13154 * c-format.h : Likewise.
13155 * c-gimplify.c: Likewise.
13156 * c-lex.c: Likewise.
13157 * c-omp.c: Likewise.
13158 * c.opt: Likewise.
13159 * c-opts.c: Likewise.
13160 * c-pch.c: Likewise.
13161 * c-ppoutput.c: Likewise.
13162 * c-pragma.c: Likewise.
13163 * c-pragma.h: Likewise.
13164 * c-pretty-print.c: Likewise.
13165 * c-pretty-print.h: Likewise.
13166 * c-semantics.c: Likewise.
13167 * stub-objc.c: Likewise.
13168
13169 * c-common.c: Include gt-c-family-c-common.h.
13170 * c-pragma.c: Include gt-c-family-c-pragma.h.
13171 \f
13172 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13173
13174 Copying and distribution of this file, with or without modification,
13175 are permitted in any medium without royalty provided the copyright
13176 notice and this notice are preserved.