]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
c++: tweak to (*(fn))() patch [PR104618]
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
12d4552e
GA
12022-03-01 Martin Liska <mliska@suse.cz>
2
3 PR ipa/104533
4 * c-attribs.cc (handle_target_clones_attribute): Use
5 get_target_clone_attr_len and report warning soon.
6
0bdb0498
GA
72022-02-17 Jonathan Wakely <jwakely@redhat.com>
8
9 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
10 (handle_pragma_weak): Likewise.
11 (handle_pragma_scalar_storage_order): Likewise.
12 (handle_pragma_redefine_extname): Likewise.
13 (handle_pragma_visibility): Likewise.
14 (handle_pragma_diagnostic): Likewise.
15 (handle_pragma_target): Likewise.
16 (handle_pragma_optimize): Likewise.
17 (handle_pragma_push_options): Likewise.
18 (handle_pragma_pop_options): Likewise.
19 (handle_pragma_reset_options): Likewise.
20 (handle_pragma_message): Likewise.
21 (handle_pragma_float_const_decimal64): Likewise.
22
cb3afcd2
GA
232022-02-16 Jakub Jelinek <jakub@redhat.com>
24
25 PR c/104531
26 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
27 build_binary_op with LT_EXPR and only if that doesn't return
28 error_mark_node call build_modify_expr.
29
302022-02-16 Jakub Jelinek <jakub@redhat.com>
31
32 PR c/104510
33 * c-common.cc (shorten_compare): Convert original arguments to
34 the original *restype_ptr when mixing binary and decimal float.
35
1f8a09d2
GA
362022-02-14 Richard Biener <rguenther@suse.de>
37
38 PR c/104505
39 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
40 internal function calls.
41
e8d68f0a
GA
422022-02-11 Richard Biener <rguenther@suse.de>
43
44 * c-attribs.cc (c_common_attribute_table): Add entry for
45 vector_mask.
46 (handle_vector_mask_attribute): New.
47
a645583d
GA
482022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
49
50 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
51 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
52 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
53
3adf509f
GA
542022-02-09 Jason Merrill <jason@redhat.com>
55
56 * c-cppbuiltin.cc (c_cpp_builtins): Update values
57 of __cpp_constexpr and __cpp_concepts for C++20.
58
bb99171b
GA
592022-01-24 Marek Polacek <polacek@redhat.com>
60
61 PR preprocessor/104030
62 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
63
9dd44357
GA
642022-01-21 Jakub Jelinek <jakub@redhat.com>
65
66 PR c++/104148
67 * c-common.h (check_function_arguments_recurse): Add for_format
68 arg.
69 * c-common.cc (check_function_nonnull): Pass false to
70 check_function_arguments_recurse's last argument.
71 (check_function_arguments_recurse): Add for_format argument,
72 if true, don't stop on warning_suppressed_p.
73 * c-format.cc (check_format_info): Pass true to
74 check_function_arguments_recurse's last argument.
75
fe1ad141
GA
762022-01-19 David Malcolm <dmalcolm@redhat.com>
77
78 * c-common.cc (c_common_c_tests): Rename to...
79 (c_common_cc_tests): ...this.
80 (c_family_tests): Update calls for .c to .cc renaming.
81 * c-common.h (c_format_c_tests): Rename to...
82 (c_format_cc_tests): ...this.
83 (c_indentation_c_tests): Rename to...
84 (c_indentation_cc_tests): ...this.
85 (c_pretty_print_c_tests): Rename to...
86 (c_pretty_print_cc_tests): ...this.
87 * c-format.cc (c_format_c_tests): Rename to...
88 (c_format_cc_tests): ...this.
89 * c-indentation.cc (c_indentation_c_tests): Rename to...
90 (c_indentation_cc_tests): ...this.
91 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
92 (c_pretty_print_cc_tests): ...this.
93
fc829782
GA
942022-01-17 Martin Liska <mliska@suse.cz>
95
96 * c-ada-spec.cc: Rename .c names to .cc.
97 * c-ada-spec.h: Likewise.
98 * c-common.cc (c_build_vec_convert): Likewise.
99 (warning_candidate_p): Likewise.
100 * c-common.h (enum rid): Likewise.
101 (build_real_imag_expr): Likewise.
102 (finish_label_address_expr): Likewise.
103 (c_get_substring_location): Likewise.
104 (c_build_bind_expr): Likewise.
105 (conflict_marker_get_final_tok_kind): Likewise.
106 (c_parse_error): Likewise.
107 (check_missing_format_attribute): Likewise.
108 (invalid_array_size_error): Likewise.
109 (warn_for_multistatement_macros): Likewise.
110 (build_attr_access_from_parms): Likewise.
111 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
112 * c-format.cc: Likewise.
113 * c-gimplify.cc (c_gimplify_expr): Likewise.
114 * c-indentation.h: Likewise.
115 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
116 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
117 * c-opts.cc (c_common_post_options): Likewise.
118 (set_std_cxx23): Likewise.
119 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
120 * c-pretty-print.h: Likewise.
121
1222022-01-17 Martin Liska <mliska@suse.cz>
123
124 * c-ada-spec.c: Moved to...
125 * c-ada-spec.cc: ...here.
126 * c-attribs.c: Moved to...
127 * c-attribs.cc: ...here.
128 * c-common.c: Moved to...
129 * c-common.cc: ...here.
130 * c-cppbuiltin.c: Moved to...
131 * c-cppbuiltin.cc: ...here.
132 * c-dump.c: Moved to...
133 * c-dump.cc: ...here.
134 * c-format.c: Moved to...
135 * c-format.cc: ...here.
136 * c-gimplify.c: Moved to...
137 * c-gimplify.cc: ...here.
138 * c-indentation.c: Moved to...
139 * c-indentation.cc: ...here.
140 * c-lex.c: Moved to...
141 * c-lex.cc: ...here.
142 * c-omp.c: Moved to...
143 * c-omp.cc: ...here.
144 * c-opts.c: Moved to...
145 * c-opts.cc: ...here.
146 * c-pch.c: Moved to...
147 * c-pch.cc: ...here.
148 * c-ppoutput.c: Moved to...
149 * c-ppoutput.cc: ...here.
150 * c-pragma.c: Moved to...
151 * c-pragma.cc: ...here.
152 * c-pretty-print.c: Moved to...
153 * c-pretty-print.cc: ...here.
154 * c-semantics.c: Moved to...
155 * c-semantics.cc: ...here.
156 * c-ubsan.c: Moved to...
157 * c-ubsan.cc: ...here.
158 * c-warn.c: Moved to...
159 * c-warn.cc: ...here.
160 * cppspec.c: Moved to...
161 * cppspec.cc: ...here.
162 * stub-objc.c: Moved to...
163 * stub-objc.cc: ...here.
164
9248ee41
GA
1652022-01-15 Martin Sebor <msebor@redhat.com>
166
167 PR c/63272
168 * c.opt (-Wdangling-pointer): New option.
169
1702022-01-15 Martin Sebor <msebor@redhat.com>
171
172 PR tree-optimization/80532
173 * c.opt (-Wuse-after-free): New options.
174
617db51d
GA
1752022-01-14 David Malcolm <dmalcolm@redhat.com>
176
177 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
178 (handle_tainted_args_attribute): New.
179
ad3f0d08
GA
1802022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
181 Jason Merrill <jason@redhat.com>
182
183 PR c++/70417
184 * c.opt: Added -Wmissing-template-keyword.
185
1862022-01-13 Richard Biener <rguenther@suse.de>
187
188 PR c/104002
189 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
190
02a8a01b
GA
1912022-01-12 Martin Liska <mliska@suse.cz>
192
193 PR target/103804
194 * c-attribs.c (handle_optimize_attribute): Do not call
195 cl_optimization_compare if we seen an error.
196
01a254e3
GA
1972022-01-11 Jakub Jelinek <jakub@redhat.com>
198
199 PR c/101537
200 PR c/103881
201 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
202 and BIT_XOR_EXPR.
203
d9450aa0
GA
2042022-01-10 Richard Biener <rguenther@suse.de>
205
206 PR middle-end/101530
207 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
208 in a TARGET_EXPR to force a temporary.
209
11ce8d04
GA
2102022-01-06 Marek Polacek <polacek@redhat.com>
211
212 PR c++/103758
213 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
214 diagnostic messages.
215 (handle_pragma_diagnostic): Likewise.
216
a4ae8c37
GA
2172022-01-03 Marek Polacek <polacek@redhat.com>
218
219 PR c++/103758
220 * c-format.c (check_tokens): Accept "decl-specifier*".
221
2222022-01-03 Jakub Jelinek <jakub@redhat.com>
223
224 PR c++/103600
225 * c-attribs.c (handle_non_overlapping_attribute): New function.
226 (c_common_attribute_table): Add "non overlapping" attribute.
227
84790a9d
GA
2282021-12-30 Jakub Jelinek <jakub@redhat.com>
229
230 PR c++/103012
231 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
232 cpp_define_unused/cpp_undef calls with forced token locations
233 BUILTINS_LOCATION.
234
d1e111da
GA
2352021-12-27 Patrick Palka <ppalka@redhat.com>
236
237 PR c++/103700
238 * c-common.c (pointer_int_sum): When quiet, return
239 error_mark_node for an incomplete pointed-to type and don't
240 call size_in_bytes_loc.
241
2554e2da
GA
2422021-12-17 Jason Merrill <jason@redhat.com>
243
244 PR c++/103681
245 * c-opts.c (c_common_post_options): Update defaults.
246
774269aa
GA
2472021-12-16 Martin Liska <mliska@suse.cz>
248
249 PR target/103709
250 * c-pragma.c (handle_pragma_pop_options): Do not check
251 global options modification when an error is seen in parsing
252 of options (pragmas or attributes).
253
c8dcf64b
GA
2542021-12-12 Jonathan Wakely <jwakely@redhat.com>
255
256 * known-headers.cc: Define INCLUDE_MEMORY instead of
257 INCLUDE_UNIQUE_PTR.
258 * name-hint.h: Likewise.
259 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
260
4b4839e3
GA
2612021-12-09 Jakub Jelinek <jakub@redhat.com>
262
263 PR pch/71934
264 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
265 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
266
03a9bd05
GA
2672021-12-03 Jakub Jelinek <jakub@redhat.com>
268
269 PR pch/71934
270 * c-pch.c (struct c_pch_validity): Remove pch_init member.
271 (pch_init): Don't initialize v.pch_init.
272 (c_common_valid_pch): Don't warn and punt if .text addresses change.
273
40fa651e
GA
2742021-12-01 Jason Merrill <jason@redhat.com>
275
276 PR c++/103310
277 * c.opt: Add -fconstexpr-fp-except.
278
87cd82c8
GA
2792021-11-29 Richard Biener <rguenther@suse.de>
280
281 * c-format.c (check_format_string): Remove spurious
282 gcc_unreachable.
283
2842021-11-29 Richard Biener <rguenther@suse.de>
285
286 * c-opts.c (c_common_post_options): Remove unreachable return.
287 * c-pragma.c (handle_pragma_target): Likewise.
288 (handle_pragma_optimize): Likewise.
289
091ccc06
GA
2902021-11-25 Jakub Jelinek <jakub@redhat.com>
291
292 PR c++/102611
293 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
294 default for C++23 regardless of warn_deprecated.
295 * c-cppbuiltin.c (c_cpp_builtins): Predefine
296 __cpp_multidimensional_subscript=202110L for C++23.
297
e1d43592
GA
2982021-11-23 Martin Sebor <msebor@redhat.com>
299
300 PR middle-end/88232
301 * c.opt: Add -Winfinite-recursion.
302
9c077398
GA
3032021-11-19 Martin Sebor <msebor@redhat.com>
304
305 PR c++/33925
306 PR c/102867
307 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
308 and improve handling tof defined symbols.
309
3102021-11-19 Martin Liska <mliska@suse.cz>
311
312 Revert:
313 2021-11-18 Martin Liska <mliska@suse.cz>
314
315 * c-gimplify.c (genericize_c_loop): Use option directly.
316
483092d3
GA
3172021-11-18 Matthias Kretz <m.kretz@gsi.de>
318
319 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
320 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
321
3222021-11-18 Martin Liska <mliska@suse.cz>
323
324 * c-gimplify.c (genericize_c_loop): Use option directly.
325
280d2838
GA
3262021-11-17 Martin Uecker <uecker@gcc.gnu.org>
327
328 PR c/91038
329 PR c/29970
330 * c-common.c (pointer_int_sum): Make sure pointer expressions
331 are evaluated first when the size expression depends on for
332 variably-modified types.
333
3342021-11-17 Marek Polacek <polacek@redhat.com>
335
336 PR preprocessor/103026
337 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
338
6b1695f4
GA
3392021-11-16 Jason Merrill <jason@redhat.com>
340
341 * c-common.c (release_tree_vector): Only cache vecs smaller than
342 16 elements.
343
e2b57363
GA
3442021-11-15 Jason Merrill <jason@redhat.com>
345
346 * c.opt: Add -fimplicit-constexpr.
347 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
348 * c-opts.c (c_common_post_options): Disable below C++14.
349
3502021-11-15 Jakub Jelinek <jakub@redhat.com>
351
352 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
353 Duplicate to both OMP_TARGET and OMP_TEAMS.
354
8d36a0d2
GA
3552021-11-10 Marek Polacek <polacek@redhat.com>
356
357 PR c++/101940
358 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
359 ignored_attributes.
360
c9b1334e
GA
3612021-11-09 David Malcolm <dmalcolm@redhat.com>
362
363 * c-pragma.c (GCC_BAD_AT): New macro.
364 (GCC_BAD2_AT): New macro.
365 (handle_pragma_pack): Use the location of the pertinent token when
366 issuing diagnostics about invalid constants/actions, and trailing
367 junk.
368 (handle_pragma_target): Likewise for non-string "GCC option".
369 (handle_pragma_message): Likewise for trailing junk.
370
18ae471f
GA
3712021-11-03 Joseph Myers <joseph@codesourcery.com>
372
373 PR c/103031
374 * c-common.c (convert_and_check): Add argument init_const. Call
375 convert_init if init_const.
376 * c-common.h (convert_and_check): Update prototype.
377 (convert_init): New prototype.
378
cf82e8d9
GA
3792021-11-01 David Malcolm <dmalcolm@redhat.com>
380
381 * c-lex.c (c_lex_with_flags): When complaining about non-printable
382 CPP_OTHER tokens, set the "escape on output" flag.
383
04a2cf3f
GA
3842021-10-27 Jakub Jelinek <jakub@redhat.com>
385
386 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
387 POINTER_PLUS_EXPR.
388 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
389 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
390
3912021-10-27 Jakub Jelinek <jakub@redhat.com>
392
393 PR c++/102854
394 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
395 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
396 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
397 conversions temporarily clear the 3rd bit from d->kind while walking
398 subtrees.
399 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
400 if possibly non-rectangular.
401
ae5c5406
GA
4022021-10-21 Jakub Jelinek <jakub@redhat.com>
403
404 PR middle-end/64888
405 * c-omp.c (c_omp_predefined_variable): Return true also for
406 ubsan_create_data created artificial variables.
407
5d5885c9
GA
4082021-10-14 Joseph Myers <joseph@codesourcery.com>
409
410 * c-format.c (printf_length_specs, scanf_length_specs)
411 (print_char_table, scan_char_table): Support DFP formats for C2X.
412 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
413 (T2X_D32, T2X_D64, T2X_D128): New macros.
414
4152021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
416
417 * c-omp.c (c_omp_check_context_selector): Rename to
418 omp_check_context_selector and move to omp-general.c.
419 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
420 move to omp-general.c.
421
52055987
GA
4222021-10-12 Joseph Myers <joseph@codesourcery.com>
423
424 * c-format.c (print_char_table): Add %b and %B formats.
425 (scan_char_table): Add %b format.
426 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
427 (T2X_UPD, T2X_UIM): New macros.
428
4292021-10-12 Jakub Jelinek <jakub@redhat.com>
430
431 * c-omp.c (c_finish_omp_atomic): Use
432 clear_padding_type_may_have_padding_p.
433
ce6eec39
GA
4342021-10-08 Martin Liska <mliska@suse.cz>
435
436 * c-opts.c (c_common_post_options): Use new macro
437 OPTION_SET_P.
438
50e20ee6
GA
4392021-10-07 Martin Liska <mliska@suse.cz>
440
441 * c-common.c (parse_optimize_options): Make
442 save_opt_decoded_options a pointer type.
443
57c7ec62
GA
4442021-10-06 Jakub Jelinek <jakub@redhat.com>
445
446 PR tree-optimization/102571
447 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
448 padding, but the non-padding bits are contiguous set of bytes
449 by adjusting the memcmp call arguments instead of emitting
450 __builtin_clear_padding and then comparing all the type's bytes.
451
4522021-10-06 Jakub Jelinek <jakub@redhat.com>
453
454 PR c++/102612
455 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
456 __cpp_constexpr to 202110L rather than 201907L.
457
da9c5f78
GA
4582021-10-04 Marek Polacek <polacek@redhat.com>
459
460 PR c++/97573
461 * c-common.h (do_warn_array_compare): Declare.
462 * c-warn.c (do_warn_array_compare): New.
463 * c.opt (Warray-compare): New option.
464
e3e07b89
GA
4652021-10-02 Iain Sandoe <iain@sandoe.co.uk>
466
467 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
468 NULL, this is not needed.
469
9d116bcc
GA
4702021-10-01 Martin Sebor <msebor@redhat.com>
471
472 PR c/102103
473 * c-common.c (decl_with_nonnull_addr_p): Handle members.
474 Check and perform warning suppression.
475 (c_common_truthvalue_conversion): Enhance warning suppression.
476
4772021-10-01 Martin Liska <mliska@suse.cz>
478
479 PR target/102552
480 * c-common.c (parse_optimize_options): decoded_options[0] is
481 used for program name, so merged_decoded_options should also
482 respect that.
483
4842021-10-01 Jakub Jelinek <jakub@redhat.com>
485 Richard Biener <rguenther@suse.de>
486
487 PR sanitizer/102515
488 * c-ubsan.c (ubsan_instrument_division): Check the right
489 flag_sanitize_recover bit, depending on which sanitization
490 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
491 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
492 and SANITIZE_DIVIDE is enabled, neither check is known
493 to be false and flag_sanitize_recover bits for those two
494 aren't the same, emit both __ubsan_handle_divrem_overflow
495 and __ubsan_handle_divrem_overflow_abort calls.
496
4972021-10-01 Martin Liska <mliska@suse.cz>
498
499 * c-common.c (parse_optimize_options): Combine optimize
500 options with what was provided on the command line.
501
5022021-10-01 Jakub Jelinek <jakub@redhat.com>
503
504 * c-omp.c (c_omp_split_clauses): Also copy
505 OMP_CLAUSE_ORDER_REPRODUCIBLE.
506
cf966403
GA
5072021-09-27 Martin Liska <mliska@suse.cz>
508
509 * c-opts.c (c_common_init_options_struct): Set also
510 x_flag_default_complex_method.
511
e4777439
GA
5122021-09-22 Jakub Jelinek <jakub@redhat.com>
513
514 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
515
62498024
GA
5162021-09-20 Matthias Kretz <m.kretz@gsi.de>
517
518 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
519 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
520 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
521 __ROUNDING_MATH__ according to the new optimization flags.
522
cf74e7b5
GA
5232021-09-18 Jakub Jelinek <jakub@redhat.com>
524
525 * c-omp.c (c_omp_split_clauses): Split order clause also to
526 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
527
0a4cb439
GA
5282021-09-17 Jakub Jelinek <jakub@redhat.com>
529
530 * c-omp.c (c_finish_omp_atomic): Avoid creating
531 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
532 create_tmp_var and add a zero initializer to TARGET_EXPRs that
533 had NULL initializer. When omitting operands after v = x,
534 use type of v rather than type of x. Fix type of vtmp
535 TARGET_EXPR.
536
07985c47
GA
5372021-09-13 Jason Merrill <jason@redhat.com>
538
539 * c.opt: Add -Winterference-size.
540 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
541 and __GCC_CONSTRUCTIVE_SIZE.
542
a26206ec
GA
5432021-09-10 Jakub Jelinek <jakub@redhat.com>
544
545 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
546 * c-omp.c: Include gimple-fold.h.
547 (c_finish_omp_atomic): Add r and weak arguments. Add support for
548 OpenMP 5.1 atomics.
549
f84e2f0b
GA
5502021-09-09 qing zhao <qing.zhao@oracle.com>
551
552 * c-attribs.c (handle_uninitialized_attribute): New function.
553 (c_common_attribute_table): Add "uninitialized" attribute.
554
b6db7cd4
GA
5552021-09-08 liuhongt <hongtao.liu@intel.com>
556
557 * c-common.c (excess_precision_mode_join): Update below comments.
558 (c_ts18661_flt_eval_method): Set excess_precision_type to
559 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
560 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
561 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
562 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
563
b2748138
GA
5642021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
565
566 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
567
7b739540
GA
5682021-09-03 Eric Botcazou <ebotcazou@adacore.com>
569
570 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
571 and -gnatwu warning for the package specification.
572
e11c6046
GA
5732021-09-01 Iain Sandoe <iain@sandoe.co.uk>
574
575 * c-attribs.c (handle_unavailable_attribute): New.
576
1e2f030b
GA
5772021-08-30 Jason Merrill <jason@redhat.com>
578
579 * c.opt: Add -Wmissing-requires.
580
85d77ac4
GA
5812021-08-25 Lewis Hyatt <lhyatt@gmail.com>
582
583 PR other/93067
584 * c-opts.c (c_common_input_charset_cb): New function.
585 (c_common_post_options): Call new function
586 diagnostic_initialize_input_context().
587
7c9e1645
GA
5882021-08-20 Tobias Burnus <tobias@codesourcery.com>
589
590 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
591 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
592 "di" and "u", respecitively; fill with BADLEN to match
593 size of 'types'.
594 (get_init_dynamic_hwi): Split off from ...
595 (init_dynamic_diag_info): ... here. Call it.
596 (init_dynamic_gfc_info): Call it.
597
5982021-08-20 Jakub Jelinek <jakub@redhat.com>
599
600 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
601 * c-pragma.c (omp_pragmas): Add error directive.
602 * c-omp.c (omp_directives): Uncomment error directive entry.
603
6e529985
GA
6042021-08-18 Jakub Jelinek <jakub@redhat.com>
605
606 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
607 * c-pragma.c (omp_pragmas): Add nothing directive.
608 * c-omp.c (omp_directives): Uncomment nothing directive entry.
609
2d14d64b
GA
6102021-08-17 Jakub Jelinek <jakub@redhat.com>
611
612 PR c++/101539
613 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
614 * c-common.c (c_common_reswords): Add __is_layout_compatible.
615
6162021-08-17 Matt Jacobson <mhjacobson@me.com>
617
618 * c-opts.c (c_common_post_options): Default to
619 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
620
6212021-08-17 Jakub Jelinek <jakub@redhat.com>
622
623 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
624 * c-pragma.c (omp_pragmas): Add scope construct.
625 * c-omp.c (omp_directives): Uncomment scope directive entry.
626
9d1d9fc8
GA
6272021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
628
629 * c-cppbuiltin.c (c_cpp_builtins): Define
630 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
631
72be20e2
GA
6322021-08-12 Jakub Jelinek <jakub@redhat.com>
633
634 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
635 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
636 * c-pragma.c (omp_pragmas_simd): Add masked construct.
637 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
638 enumerator.
639 (c_finish_omp_masked): Declare.
640 * c-omp.c (c_finish_omp_masked): New function.
641 (c_omp_split_clauses): Handle combined masked constructs.
642
4d17ca1b
GA
6432021-07-30 Jakub Jelinek <jakub@redhat.com>
644
645 PR c++/101539
646 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
647 * c-common.c (c_common_reswords): Add
648 __is_pointer_interconvertible_base_of.
649
6502021-07-29 Richard Biener <rguenther@suse.de>
651
652 PR c/101512
653 * c-common.c (c_common_mark_addressable_vec): Look through
654 C_MAYBE_CONST_EXPR even if not at the toplevel.
655
af3f12e6
GA
6562021-07-27 Martin Sebor <msebor@redhat.com>
657
658 PR c/101585
659 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
660
ead235f6
GA
6612021-07-23 Jakub Jelinek <jakub@redhat.com>
662
663 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
664 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
665 and later.
666
6672021-07-23 Jakub Jelinek <jakub@redhat.com>
668
669 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
670 PRAGMA_OMP__LAST_ enumerators.
671
419c6c68
GA
6722021-07-21 Thomas Schwinge <thomas@codesourcery.com>
673 Joseph Myers <joseph@codesourcery.com>
674 Cesar Philippidis <cesar@codesourcery.com>
675
676 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
677
92d45509
GA
6782021-07-20 Martin Sebor <msebor@redhat.com>
679
680 * c-common.c (c_build_shufflevector): Adjust by-value argument to
681 by-const-reference.
682 * c-common.h (c_build_shufflevector): Same.
683
87277b6a
GA
6842021-07-16 Andrew Pinski <apinski@marvell.com>
685
686 PR c/101453
687 * c-common.c (parse_optimize_options): Use the correct
688 size for buffer.
689
d97d71a1
GA
6902021-07-15 Martin Sebor <msebor@redhat.com>
691
692 PR c/101289
693 PR c/97548
694 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
695
c4fee1c6
GA
6962021-07-14 Jason Merrill <jason@redhat.com>
697
698 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
699
6fba0eea
GA
7002021-07-06 Martin Sebor <msebor@redhat.com>
701
702 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
703 (gcc_cdiag_char_table): Same.
704 (gcc_cxxdiag_char_table): Same.
705
7a60a6e8
GA
7062021-07-02 Jakub Jelinek <jakub@redhat.com>
707
708 * c-common.h (enum c_omp_directive_kind): New enum.
709 (struct c_omp_directive): New type.
710 (c_omp_categorize_directive): Declare.
711 * c-omp.c (omp_directives): New variable.
712 (c_omp_categorize_directive): New function.
713
bea7c16a
GA
7142021-07-01 Eric Botcazou <ebotcazou@adacore.com>
715
716 * c-ada-spec.c (packed_layout): New global variable.
717 (dump_ada_declaration): Set it upon seeing a packed record type.
718 Do not put the "aliased" keyword if it is set.
719 (dump_ada_structure): Add Pack aspect if it is set and clear it.
720
7212021-07-01 Eric Botcazou <ebotcazou@adacore.com>
722
723 * c-ada-spec.c (check_name): Rename into...
724 (check_type_name_conflict): ...this. Minor tweak.
725 (dump_ada_function_declaration): Adjust to above renaming.
726 (dump_ada_array_domains): Fix oversight.
727 (dump_ada_declaration): Call check_type_name_conflict for variables.
728
90708f87
GA
7292021-06-25 Martin Sebor <msebor@redhat.com>
730
731 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
732 (c_common_truthvalue_conversion): Replace direct uses of
733 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
734 copy_no_warning.
735 (check_function_arguments_recurse): Same.
736 * c-gimplify.c (c_gimplify_expr): Same.
737 * c-warn.c (overflow_warning): Same.
738 (warn_logical_operator): Same.
739 (warn_if_unused_value): Same.
740 (do_warn_unused_parameter): Same.
741
9aa8327e
GA
7422021-06-24 Jakub Jelinek <jakub@redhat.com>
743
744 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
745 C_ORT_OMP_TARGET.
746 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
747 combined target constructs also add map (always, tofrom:) clause.
748
ede6c356
GA
7492021-06-15 Robin Dapp <rdapp@linux.ibm.com>
750
751 * c-attribs.c (common_handle_aligned_attribute): Remove short
752 circuit and dead code.
753
8dc48181
GA
7542021-06-14 Jonathan Wakely <jwakely@redhat.com>
755
756 PR c++/101052
757 * known-headers.cc (get_stdlib_header_for_name): Add known
758 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
759 exit, and getenv.
760
8b8c3912
GA
7612021-06-12 Jason Merrill <jason@redhat.com>
762
763 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
764
f16f65f8
GA
7652021-06-11 Jakub Jelinek <jakub@redhat.com>
766
767 PR c++/100974
768 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
769 -std=c++2b for P1938R3 consteval if support.
770
4f625f47
GA
7712021-06-09 Jason Merrill <jason@redhat.com>
772
773 PR c++/100879
774 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
775 warning.
776
438aac59
GA
7772021-06-07 Martin Liska <mliska@suse.cz>
778
779 * c-target.def: Split long lines and replace them
780 with '\n\'.
781
600f90cb
GA
7822021-06-04 Martin Sebor <msebor@redhat.com>
783
784 PR c/100783
785 * c-attribs.c (positional_argument): Bail on erroneous types.
786
7872021-06-04 Martin Sebor <msebor@redhat.com>
788
789 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
790 for element presence.
791
440c8a0a
GA
7922021-06-03 Eric Botcazou <ebotcazou@adacore.com>
793
794 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
795 (dump_ada_decl_name): Likewise.
796 (dump_anonymous_type_name): Remove parent parameter and adjust.
797 (dump_sloc): Minor tweak.
798 (dump_ada_array_type): Remove type parameter and adjust.
799 (dump_ada_enum_type): Remove parent parameter and adjust.
800 (dump_ada_node): Adjust calls to above functions.
801 (dumped_anonymous_types): New global variable.
802 (dump_nested_types_1): Rename into...
803 (dump_nested_types): ...this.
804 (dump_nested_type): Remove parent and dumped_types parameters.
805 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
806 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
807 (dump_ada_specs): Initialize and free dumped_anonymous_types.
808
8092021-06-03 Eric Botcazou <ebotcazou@adacore.com>
810
811 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
812 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
813
8142021-06-03 Eric Botcazou <ebotcazou@adacore.com>
815
816 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
817 (htable_t): New typedef.
818 (overloaded_names): Use it.
819 (add_name): New function.
820 (init_overloaded_names): Use add_name to populate the table and add
821 special cases for sigaction and stat.
822 (overloaded_name_p): Rename into...
823 (overloading_index): ...this. Do not initialize overloaded_names table
824 here. Return the index or zero.
825 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
826 but add an overloading suffix instead.
827 (dump_ada_specs): Initialize overloaded_names tables here.
828
b75978d1
GA
8292021-06-01 Martin Liska <mliska@suse.cz>
830
831 PR other/100759
832 * c-attribs.c (handle_optimize_attribute): Limit sanity check
833 to a situation where we are not in processing of an optimize
834 pragma.
835 * c-pragma.c (handle_pragma_pop_options): Restore target
836 options.
837
ee682192
GA
8382021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
839
840 PR testsuite/100749
841 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
842
8432021-05-31 Richard Biener <rguenther@suse.de>
844
845 PR c++/88601
846 * c-common.c: Include tree-vector-builder.h and
847 vec-perm-indices.h.
848 (c_common_reswords): Add __builtin_shufflevector.
849 (c_build_shufflevector): New funtion.
850 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
851 (c_build_shufflevector): Declare.
852
48166757
GA
8532021-05-28 Jakub Jelinek <jakub@redhat.com>
854
855 PR middle-end/99928
856 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
857 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
858
8592021-05-28 Tobias Burnus <tobias@codesourcery.com>
860
861 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
862
2bc6dace
GA
8632021-05-25 Martin Liska <mliska@suse.cz>
864
865 PR tree-optimization/92860
866 PR target/99592
867 * c-attribs.c (handle_optimize_attribute): Save target node
868 before calling parse_optimize_options and save it in case
869 it changes.
870 * c-pragma.c (handle_pragma_target): Similarly for pragma.
871 (handle_pragma_pop_options): Likewise here.
872
8732021-05-25 Martin Liska <mliska@suse.cz>
874
875 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
876
8772021-05-25 Jakub Jelinek <jakub@redhat.com>
878
879 PR middle-end/99928
880 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
881 combined with simd and not with taskloop or for.
882
2832d51b
GA
8832021-05-21 Jakub Jelinek <jakub@redhat.com>
884
885 PR middle-end/99928
886 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
887 on firstprivate clause copy going to target construct, and for
888 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
889
ea34e2ed
GA
8902021-05-20 Jonathan Wakely <jwakely@redhat.com>
891
892 * c.opt (Wc++11-extensions, Wc++14-extensions)
893 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
894 options.
895
8962021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
897
898 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
899
9002021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
901
902 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
903 * c-pch.c (struct c_pch_validity): Use type uint32_t.
904 (pch_init): Renamed member.
905 (c_common_valid_pch): Adjust access to debug_type_names.
906
65f32e5d
GA
9072021-05-19 Martin Sebor <msebor@redhat.com>
908
909 PR c/100619
910 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
911 bounds.
912
a8daf9a1
GA
9132021-05-18 Richard Biener <rguenther@suse.de>
914
915 PR c/100547
916 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
917 Reword existing nunit diagnostic.
918
a7ffc1ef
GA
9192021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
920
921 * c-common.c (braced_list_to_string): Return CTOR unchanged
922 if host and target character sizes don't match.
923
87a7d10c
GA
9242021-05-14 Martin Liska <mliska@suse.cz>
925
926 * c.opt: Add Warning keyword for 2 options.
927
f9af11c7
GA
9282021-05-13 Martin Liska <mliska@suse.cz>
929
930 PR middle-end/100504
931 * c-attribs.c (handle_target_clones_attribute): Expect a string
932 argument to target_clone argument.
933
037e3661
GA
9342021-05-11 Joseph Myers <joseph@codesourcery.com>
935
936 * c-lex.c (interpret_float): Handle digit separators for C2X.
937
aa891c56
GA
9382021-05-10 Martin Liska <mliska@suse.cz>
939
940 * c-ada-spec.c (print_destructor): Use startswith
941 function instead of strncmp.
942 (dump_ada_declaration): Likewise.
943 * c-common.c (disable_builtin_function): Likewise.
944 (def_builtin_1): Likewise.
945 * c-format.c (check_tokens): Likewise.
946 (check_plain): Likewise.
947 (convert_format_name_to_system_name): Likewise.
948
e4ff4ffb
GA
9492021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
950
951 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
952 complex divide
953
c0fa3f2f
GA
9542021-04-26 Thomas Schwinge <thomas@codesourcery.com>
955 Nathan Sidwell <nathan@codesourcery.com>
956 Tom de Vries <vries@codesourcery.com>
957 Julian Brown <julian@codesourcery.com>
958 Kwok Cheung Yeung <kcy@codesourcery.com>
959
960 * c.opt (Wopenacc-parallelism): New.
961
6e81e015
GA
9622021-04-19 Thomas Schwinge <thomas@codesourcery.com>
963
964 * c.opt (fopenacc-kernels=): Remove.
965
019a9220
GA
9662021-04-08 Jakub Jelinek <jakub@redhat.com>
967
968 * c-warn.c (do_warn_double_promotion): Fix comment typo,
969 occured -> occurred.
970 (check_alignment_of_packed_member): Fix a comment typo,
971 memeber -> member.
972 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
973 and onless -> unless.
974 (warn_parm_array_mismatch): Fix comment typos, declaratation
975 -> declaration and woud -> would. Fix up comment indentation.
976
9772021-04-08 Martin Sebor <msebor@redhat.com>
978
979 PR middle-end/99883
980 * c.opt (Wmismatched-new-delete): Correct spelling.
981
b1da9916
GA
9822021-04-05 Eric Botcazou <ebotcazou@adacore.com>
983
984 * c-ada-spec.c (is_simple_enum): Minor tweaks.
985 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
986 enumeral types use again the type name for the enumeration constants.
987 (dump_ada_node): Adjust call to dump_ada_enum_type.
988 (dump_nested_type): Likewise.
989
f1607029
GA
9902021-04-01 Jason Merrill <jason@redhat.com>
991
992 PR c++/98481
993 * c-opts.c (c_common_post_options): Bump latest_abi_version.
994
4493b1c1
GA
9952021-03-25 Jakub Jelinek <jakub@redhat.com>
996
997 PR c++/99565
998 * c-warn.c (do_warn_duplicated_branches): Pass also
999 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1000
6af7b307
GA
10012021-03-20 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR debug/99230
1004 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1005
ceae9533
GA
10062021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1007
1008 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1009 after entering the separate class package, if any.
1010
67f10d28
GA
10112021-03-04 Richard Biener <rguenther@suse.de>
1012
1013 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1014 Handle ERROR_MARK.
1015
10162021-03-04 Jakub Jelinek <jakub@redhat.com>
1017
1018 PR c/99325
1019 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1020 (token_streamer::stream) Likewise.
1021 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1022 UNKNOWN_LOCATION.
1023
f3641ac7
GA
10242021-03-03 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c/99324
1027 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1028 instead of mark_addressable. Fix a comment typo -
1029 neutrallly -> neutrally.
1030
2c83c3fb
GA
10312021-02-28 Jakub Jelinek <jakub@redhat.com>
1032
1033 PR c/99304
1034 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1035 message - refernced -> referenced. Remove superfluous space before
1036 closing paren of function calls.
1037
daa68844
GA
10382021-02-25 Nathan Sidwell <nathan@acm.org>
1039
1040 PR c++/99166
1041 * c.opt (-flang-info-module-cmi): Renamed option.
1042
50352c6c
GA
10432021-02-19 Nathan Sidwell <nathan@acm.org>
1044
1045 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1046
bf81237e
GA
10472021-02-18 H.J. Lu <hjl.tools@gmail.com>
1048
1049 PR target/99113
1050 * c-attribs.c (c_common_attribute_table): Add the "retain"
1051 attribute.
1052 (handle_retain_attribute): New function.
1053
0e804ce3
GA
10542021-02-16 Marek Polacek <polacek@redhat.com>
1055
1056 PR c++/99062
1057 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1058 alignment argument is non-negative. Tweak a warning message.
1059
fab095da
GA
10602021-02-12 Martin Sebor <msebor@redhat.com>
1061
1062 PR c/99055
1063 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1064 print_generic_expr_to_str.
1065
4b37c3ea
GA
10662021-02-10 Richard Biener <rguenther@suse.de>
1067
1068 * c-common.c (parse_optimize_options): Free decoded_options.
1069
a19dd5e6
GA
10702021-02-04 emsr <3dw4rd@verizon.net>
1071
1072 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1073
9faaa807
GA
10742021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1075
1076 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1077 * c-lex.c (interpret_integer): Set node type for size literal.
1078
85d04a2e
GA
10792021-01-28 Jakub Jelinek <jakub@redhat.com>
1080
1081 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1082 draft from description.
1083 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1084
e62bb7f0
GA
10852021-01-26 Paul Fee <paul.f.fee@gmail.com>
1086
1087 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1088 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1089 and -std=gnu++2b
1090 * c-opts.c (set_std_cxx23): New.
1091 (c_common_handle_option): Set options when -std=c++23 is enabled.
1092 (c_common_post_options): Adjust comments.
1093 (set_std_cxx20): Likewise.
1094
161e4c08
GA
10952021-01-25 Martin Sebor <msebor@redhat.com>
1096
1097 PR c++/98646
1098 * c-common.c (check_nonnull_arg): Adjust warning text.
1099
4c9bcd5c
GA
11002021-01-17 Martin Sebor <msebor@redhat.com>
1101
1102 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1103 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1104
59cf67d1
GA
11052021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1106
1107 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1108 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1109
2f7f0d32
GA
11102021-01-15 Jakub Jelinek <jakub@redhat.com>
1111
1112 PR tree-optimization/98597
1113 * c-pretty-print.c: Include options.h.
1114 (c_fold_indirect_ref_for_warn): New function.
1115 (print_mem_ref): Use it. If it returns something that has compatible
1116 type and is TBAA compatible with zero offset, print it and return,
1117 otherwise print it using offsetof syntax or array ref syntax. Fix up
1118 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1119 argument has pointer to array type. Print pointers using the standard
1120 formatting.
1121
6851dda2
GA
11222021-01-12 Martin Sebor <msebor@redhat.com>
1123
1124 PR c/98597
1125 PR c/98592
1126 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1127 has pointer type. Remove redundant code. Avoid calling
1128 gimple_canonical_types_compatible_p.
1129
7d187e4f
GA
11302021-01-07 Martin Sebor <msebor@redhat.com>
1131
1132 PR middle-end/98578
1133 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1134 Avoid assuming acces type's size is constant. Correct condition
1135 guarding the printing of a parenthesis.
1136
942ae5be
GA
11372021-01-06 Martin Sebor <msebor@redhat.com>
1138
1139 PR c++/95768
1140 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1141 SSA_NAMEs print VLA names and GIMPLE defining statements.
1142 (print_mem_ref): New function.
1143 (c_pretty_printer::unary_expression): Call it.
1144
11452021-01-06 Richard Biener <rguenther@suse.de>
1146
1147 PR tree-optimization/95582
1148 * c-attribs.c (c_common_attribute_table): Add entry for
1149 signed_bool_precision.
1150 (handle_signed_bool_precision_attribute): New.
1151
8daa719b
GA
11522020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1153
1154 * c.opt: Add -stdlib= option and enumerations for
1155 libstdc++ and libc++.
1156
eefe499f
GA
11572020-12-16 Martin Liska <mliska@suse.cz>
1158
1159 * c.opt: Remove usage of Report.
1160
d52945ce
GA
11612020-12-14 Martin Sebor <msebor@redhat.com>
1162
1163 PR middle-end/98166
1164 PR c++/57111
1165 PR middle-end/98160
1166 * c-attribs.c (maybe_add_noinline): New function.
1167 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1168 Implicitly add attribute noinline to functions not declared inline
1169 and warn on those.
1170
ca2bd949
GA
11712020-12-09 Tobias Burnus <tobias@codesourcery.com>
1172
1173 * c-pragma.c (omp_pragmas): Add 'allocate'.
1174 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1175
f6e8e279
GA
11762020-12-08 Jakub Jelinek <jakub@redhat.com>
1177
1178 PR c++/98187
1179 * c-pragma.c (omp_pragmas): Remove "master".
1180 (omp_pragmas_simd): Add "master".
1181
bc8a7013
GA
11822020-12-07 Marek Polacek <polacek@redhat.com>
1183
1184 PR c++/98126
1185 * c-common.c (verify_tree_lim_r): New function.
1186 (verify_sequence_points): Use it. Use nullptr instead of 0.
1187
b8dd0ef7
GA
11882020-12-03 Martin Sebor <msebor@redhat.com>
1189
1190 PR c++/90629
1191 PR middle-end/94527
1192 * c-attribs.c (handle_dealloc_attribute): New function.
1193 (handle_malloc_attribute): Handle argument forms of attribute.
1194 * c.opt (-Wmismatched-dealloc): New option.
1195 (-Wmismatched-new-delete): New option.
1196
11972020-12-03 Jakub Jelinek <jakub@redhat.com>
1198
1199 PR libstdc++/93121
1200 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1201 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1202
e0f5e792
GA
12032020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1204
1205 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1206 {__GNUC_EXECUTION_CHARSET_NAME} and
1207 _WIDE_EXECUTION_CHARSET_NAME} macros.
1208
12092020-12-01 Nathan Sidwell <nathan@acm.org>
1210
1211 * c-common.c (module, import, export): New internal tokens (with
1212 trailing space).
1213 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1214 them.
1215 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1216 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1217
12182020-12-01 Nathan Sidwell <nathan@acm.org>
1219
1220 * c-opts.c (c_common_init_options): Ask for module dependencies.
1221 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1222 * c-pch.c (c_common_valid_pch): ... does not play with C++
1223 modules.
1224 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1225 options.
1226 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1227 (fmodule-only, fmodule-mapper, fmodule-lazy)
1228 (fmodule-version-ignore, Winvalid-imported-macros)
1229 (flang-info-include-translate, flang-info-include-translate-not):
1230 New options
1231
5fbf0ecb
GA
12322020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1233
1234 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1235 (dump_ada_structure): Also deal with convention, unchecked union and
1236 bit-field for nested types. In the latter case, print an Alignment
1237 aspect along with the Pack aspect.
1238
360258da
GA
12392020-11-25 Martin Sebor <msebor@redhat.com>
1240
1241 PR bootstrap/94982
1242 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1243 -Wformat-diag.
1244
1e2c9a27
GA
12452020-11-24 Martin Sebor <msebor@redhat.com>
1246
1247 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1248
8e6198d0
GA
12492020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1250
1251 * c-attribs.c (handle_special_var_sec_attribute): New.
1252 (handle_noinit_attribute): Remove.
1253 (attr_noinit_exclusions): Rename to...
1254 (attr_section_exclusions): ...this, and add "persistent" attribute
1255 exclusion.
1256 (c_common_attribute_table): Add "persistent" attribute.
1257
7a97e2fc
GA
12582020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1259
1260 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1261 Treat opaque types like other types.
1262 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1263 supported types.
1264
82e5048e
GA
12652020-11-20 Martin Sebor <msebor@redhat.com>
1266
1267 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1268 with fewer arguments.
1269
12702020-11-20 Martin Sebor <msebor@redhat.com>
1271
1272 PR middle-end/97879
1273 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1274 Error out on invalid modes.
1275
12762020-11-20 Jakub Jelinek <jakub@redhat.com>
1277
1278 PR libstdc++/88101
1279 * c-common.c (check_builtin_function_arguments): Handle
1280 BUILT_IN_CLEAR_PADDING.
1281
25bb75f8
GA
12822020-11-18 Nathan Sidwell <nathan@acm.org>
1283
1284 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1285
4dabb037
GA
12862020-11-17 Nathan Sidwell <nathan@acm.org>
1287
1288 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1289 after newly-added CTI_MODULE_HWM.
1290
12912020-11-17 Joseph Myers <joseph@codesourcery.com>
1292
1293 * c-cppbuiltin.c (builtin_define_float_constants): Define
1294 "*_IS_IEC_60559__" macros.
1295
12962020-11-17 Nathan Sidwell <nathan@acm.org>
1297
1298 * c-lex.c: #include "langhooks.h".
1299 (cb_undef): Maybe call preprocess_undef lang hook.
1300 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1301 lang hook.
1302 (push_command_line_include): Maybe call preprocess_main_file lang
1303 hook.
1304 (cb_file_change): Likewise.
1305 * c-ppoutput.c: #include "langhooks.h.
1306 (scan_translation_unit): Maybe call preprocess_token lang hook.
1307 (class do_streamer): New, derive from token_streamer.
1308 (directives_only_cb): Data pointer is do_streamer, call
1309 preprocess_token lang hook.
1310 (scan_translation_unit_directives_only): Use do_streamer.
1311 (print_line_1): Move src_line recording to after string output.
1312 (cb_undef): Maybe call preprocess_undef lang hook.
1313
13142020-11-17 Nathan Sidwell <nathan@acm.org>
1315
1316 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1317 code duplicating that functionality.
1318
13192020-11-17 Jakub Jelinek <jakub@redhat.com>
1320
1321 PR c/90628
1322 * c-common.c (check_builtin_function_arguments)
1323 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1324 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1325 for more builtins and argument positions.
1326
29c5d9ce
GA
13272020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1328
1329 PR objc/97854
1330 * stub-objc.c: Include c-common.h to declare enum rid.
1331
77f67db2
GA
13322020-11-13 Jakub Jelinek <jakub@redhat.com>
1333
1334 PR c++/63287
1335 * c-cppbuiltin.c: Include configargs.h.
1336 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1337 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1338 "single".
1339
13402020-11-13 Gergö Barany <gergo@codesourcery.com>
1341 Thomas Schwinge <thomas@codesourcery.com>
1342
1343 * c.opt (fopenacc-kernels): Add.
1344
13452020-11-13 Jason Merrill <jason@redhat.com>
1346
1347 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1348
13492020-11-13 Piotr H. Dabrowski <phd@phd.re>
1350
1351 PR c++/91318
1352 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1353
13542020-11-13 Martin Liska <mliska@suse.cz>
1355
1356 * c-attribs.c (build_attr_access_from_parms): Format properly.
1357
13582020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1359
1360 PR objc/90707
1361 * c-common.c (c_common_reswords): null_unspecified, nullable,
1362 nonnull, null_resettable: New keywords.
1363 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1364 RID_NONNULL, RID_NULL_RESETTABLE: New.
1365 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1366 ranges accepted for property attributes.
1367 * c-attribs.c (handle_objc_nullability_attribute): New.
1368 * c-objc.h (enum objc_property_attribute_group): Add
1369 OBJC_PROPATTR_GROUP_NULLABLE.
1370 (enum objc_property_attribute_kind):Add
1371 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1372 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1373
13742020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1375
1376 PR objc/77404
1377 * c-attribs.c (handle_objc_root_class_attribute): New
1378 * c-objc.h (objc_start_class_interface): Add a location
1379 value for the position of the class name.
1380 * c.opt: Add Wobjc-root-class.
1381 * stub-objc.c (objc_start_class_interface): Add a location
1382 value for the position of the class name.
1383
a5a11525
GA
13842020-11-12 Joseph Myers <joseph@codesourcery.com>
1385
1386 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1387 Allow scope for C. Handle standard attributes for C. Do not
1388 accept unscoped attributes if std_syntax and not handled as
1389 standard attributes.
1390 * c-common.h (c_common_has_attribute): Update prototype.
1391
13922020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1393
1394 PR pch/86674
1395 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1396 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1397
0f5f9ed5
GA
13982020-11-11 Patrick Palka <ppalka@redhat.com>
1399
1400 PR c++/88115
1401 * c-opts.c (c_common_post_options): Update latest_abi_version.
1402
bb622641
GA
14032020-11-10 Jakub Jelinek <jakub@redhat.com>
1404
1405 PR c/97748
1406 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1407 to false.
1408 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1409 recursively and just return true instead of warning if it is true.
1410 Handle COMPLEX_EXPR.
1411
14122020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1413
1414 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1415 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1416 (c_omp_adjust_map_clauses): New function.
1417
2bee28dd
GA
14182020-11-09 Marek Polacek <polacek@redhat.com>
1419
1420 DR 1914
1421 * c-common.c (attribute_fallthrough_p): Tweak the warning
1422 message.
1423
14242020-11-09 Patrick Palka <ppalka@redhat.com>
1425
1426 * c-pragma.c (handle_pragma_diagnostic): Split the
1427 unknown-option -Wpragmas diagnostic into a warning and a
1428 subsequent note containing a spelling suggestion. Avoid
1429 computing the suggestion if -Wpragmas warnings are being
1430 suppressed.
1431
14322020-11-09 Patrick Palka <ppalka@redhat.com>
1433
1434 PR testsuite/97117
1435 * c-indentation.c (get_visual_column): Remove location_t
1436 parameter. Move the column-tracking diagnostic code from here
1437 to ...
1438 (should_warn_for_misleading_indentation): ... here, before the
1439 early exit for when the loci are not all distinct. Don't pass a
1440 location_t argument to get_visual_column.
1441 (assert_get_visual_column_succeeds): Don't pass a location_t
1442 argument to get_visual_column.
1443 (assert_get_visual_column_fails): Likewise.
1444
fb95de7a
GA
14452020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1446
1447 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1448 of keywords accepted in @property attribute contexts.
1449 * c-objc.h (enum objc_property_attribute_group): Add
1450 OBJC_PROPATTR_GROUP_CLASS.
1451 (enum objc_property_attribute_kind): Add
1452 OBJC_PROPERTY_ATTR_CLASS.
1453
2da7ee05
GA
14542020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1455
1456 * c-common.c (c_common_reswords): Add 'atomic' property
1457 attribute.
1458 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1459 property attributes.
1460
14612020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1462
1463 * c-attribs.c (handle_nsobject_attribute): New.
1464 * c.opt: Add WNSObject-attribute.
1465
44cab2d8
GA
14662020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1467
1468 * c-objc.h (enum objc_property_attribute_group): New
1469 (enum objc_property_attribute_kind): New.
1470 (OBJC_PROPATTR_GROUP_MASK): New.
1471 (struct property_attribute_info): Small class encapsulating
1472 parser output from property attributes.
1473 (objc_prop_attr_kind_for_rid): New
1474 (objc_add_property_declaration): Simplify interface.
1475 * stub-objc.c (enum rid): Dummy type.
1476 (objc_add_property_declaration): Simplify interface.
1477 (objc_prop_attr_kind_for_rid): New.
1478
14792020-11-06 Nathan Sidwell <nathan@acm.org>
1480
1481 * c-ada-spec.c (collect_ada_nodes): Rename
1482 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1483 (collect_ada_node): Likewise.
1484 (dump_forward_type): Likewise.
1485 * c-common.c (set_underlying_type): Rename
1486 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1487 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1488
14892020-11-06 Jakub Jelinek <jakub@redhat.com>
1490
1491 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1492
0cfd9109
GA
14932020-11-05 Marek Polacek <polacek@redhat.com>
1494
1495 PR c++/97675
1496 * c.opt (Wexceptions): New option.
1497
14982020-11-05 Marek Polacek <polacek@redhat.com>
1499
1500 PR c++/25814
1501 * c.opt (Wvexing-parse): New option.
1502
35c125cb
GA
15032020-11-04 Jakub Jelinek <jakub@redhat.com>
1504
1505 PR c++/97670
1506 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1507 underlying decl to clear in the allocate_head bitmap.
1508
15092020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1510
1511 * c-objc.h (objc_non_constant_expr_p): New.
1512 * stub-objc.c (objc_non_constant_expr_p): New.
1513
fd2325ea
GA
15142020-11-03 Nathan Sidwell <nathan@acm.org>
1515
1516 * c.opt (MQ,MT): Reword description to be make-agnostic.
1517
88ce3d5f
GA
15182020-11-02 Nathan Sidwell <nathan@acm.org>
1519
1520 * c-opts.c (c_common_post_options): Move var decl to its
1521 initialization point.
1522
15232020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1524
1525 * c-lex.c (c_lex_with_flags): When combining '@' with a
1526 keyword for Objective-C, combine the location ranges too.
1527
15282020-10-30 Qing Zhao <qing.zhao@oracle.com>
1529 H.J.Lu <hjl.tools@gmail.com>
1530
1531 * c-attribs.c (c_common_attribute_table): Add new attribute
1532 zero_call_used_regs.
1533 (handle_zero_call_used_regs_attribute): New function.
1534
e93aae4a
GA
15352020-10-28 Marek Polacek <polacek@redhat.com>
1536
1537 PR c++/97573
1538 * c-opts.c (c_common_post_options): In C++20, turn on
1539 -Wdeprecated-enum-enum-conversion and
1540 -Wdeprecated-enum-float-conversion.
1541 * c.opt (Wdeprecated-enum-enum-conversion,
1542 Wdeprecated-enum-float-conversion): New options.
1543 (Wenum-conversion): Allow for C++ too.
1544
15452020-10-28 Jakub Jelinek <jakub@redhat.com>
1546
1547 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1548 * c-omp.c: Include bitmap.h.
1549 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1550
f19e7c8d
GA
15512020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1552
1553 * c-common.c (__is_nothrow_assignable): New.
1554 (__is_nothrow_constructible): Likewise.
1555 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1556 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1557
efe71fcc
GA
15582020-10-23 Jan Hubicka <hubicka@ucw.cz>
1559
1560 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1561
15622020-10-23 Marek Polacek <polacek@redhat.com>
1563
1564 PR c++/91741
1565 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1566 (c_common_init_ts): Likewise.
1567 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1568 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1569 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1570 (maybe_warn_sizeof_array_div): New function.
1571 * c.opt (Wsizeof-array-div): New option.
1572
15732020-10-23 Martin Sebor <msebor@redhat.com>
1574
1575 PR c/97463
1576 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1577
56ddd5e2
GA
15782020-10-22 Martin Liska <mliska@suse.cz>
1579
1580 PR c/94722
1581 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1582 (handle_stack_protect_attribute): Add error message for a
1583 no_stack_protector function.
1584
15852020-10-22 Martin Liska <mliska@suse.cz>
1586
1587 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1588
15892020-10-22 Jan Hubicka <hubicka@ucw.cz>
1590
1591 * c-gimplify.c: Include tree-nested.h
1592 (c_genericize): Update for new nested function info.
1593
b2698c21
GA
15942020-10-14 Martin Sebor <msebor@redhat.com>
1595
1596 PR c/97413
1597 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1598 bounds in an extra list.
1599
7e9282ae
GA
16002020-10-05 Richard Biener <rguenther@suse.de>
1601 Jakub Jelinek <jakub@redhat.com>
1602
1603 PR c++/97197
1604 * c-pretty-print.c: Include langhooks.h.
1605 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1606 expression.
1607 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1608 unary_expression.
1609 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1610
660bfe61
GA
16112020-09-30 Martin Sebor <msebor@redhat.com>
1612
1613 PR middle-end/97189
1614 * c-attribs.c (append_access_attr): Use the function declaration
1615 location for a warning about an attribute access argument.
1616
93bca37c
GA
16172020-09-29 Marek Polacek <polacek@redhat.com>
1618
1619 PR c++/94695
1620 * c.opt (Wrange-loop-construct): New option.
1621
82b77dee
GA
16222020-09-23 Martin Sebor <msebor@redhat.com>
1623
1624 PR c/97131
1625 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1626
16272020-09-23 Marek Polacek <polacek@redhat.com>
1628
1629 PR c/97125
1630 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1631 after loops and other structured control constructs have been lowered.
1632
521d2711
GA
16332020-09-22 Jakub Jelinek <jakub@redhat.com>
1634
1635 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1636 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1637
44135373
GA
16382020-09-21 Marek Polacek <polacek@redhat.com>
1639
1640 * c.opt (Wctad-maybe-unsupported): New option.
1641
2fe5b7d1
GA
16422020-09-19 Martin Sebor <msebor@redhat.com>
1643
1644 PR c/50584
1645 * c-common.h (warn_parm_array_mismatch): Declare new function.
1646 (has_attribute): Move declaration of an existing function.
1647 (build_attr_access_from_parms): Declare new function.
1648 * c-warn.c (parm_array_as_string): Define new function.
1649 (plus_one): Define new function.
1650 (warn_parm_ptrarray_mismatch): Define new function.
1651 (warn_parm_array_mismatch): Define new function.
1652 (vla_bound_parm_decl): New function.
1653 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1654 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1655 qualifiers here...
1656 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1657 them in brackets here. Also print [static]. Strip extraneous
1658 expressions from VLA bounds.
1659
16602020-09-19 Martin Sebor <msebor@redhat.com>
1661
1662 PR c/50584
1663 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1664 (handle_argspec_attribute): New function.
1665 (get_argument, get_argument_type): New functions.
1666 (append_access_attrs): Add overload. Handle internal attribute
1667 representation in addition to external.
1668 (handle_access_attribute): Handle internal attribute representation
1669 in addition to external.
1670 (build_attr_access_from_parms): New function.
1671
16722020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1673
1674 * c-gimplify.c (genericize_c_loop): Rewrite to match
1675 c_finish_loop in c-typeck.c.
1676
16772020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1678
1679 * c-common.c (c_block_may_fallthrough): New, split from
1680 cxx_block_may_fallthrough in the cp front end.
1681 (c_common_init_ts): Move handling of loop and switch-related
1682 statements here from the cp front end.
1683 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1684 cp front end.
1685 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1686 * c-common.h (c_block_may_fallthru): Declare.
1687 (bc_state_t): Move here from cp front end.
1688 (save_bc_state, restore_bc_state): Declare.
1689 (c_genericize_control_stmt): Declare.
1690 (WHILE_COND, WHILE_BODY): Likewise.
1691 (DO_COND, DO_BODY): Likewise.
1692 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1693 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1694 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1695 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1696 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1697 * c-dump.c (dump_stmt): Copy from cp front end.
1698 (c_dump_tree): Move code to handle structured loop and switch
1699 tree nodes here from cp front end.
1700 * c-gimplify.c: Adjust includes.
1701 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1702 cp front end.
1703 (save_bc_state, restore_bc_state): New functions using old code
1704 from cp front end.
1705 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1706 (genericize_c_loop): Move from cp front end.
1707 (genericize_for_stmt, genericize_while_stmt): Likewise.
1708 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1709 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1710 (genericize_omp_for_stmt): Likewise.
1711 (c_genericize_control_stmt): New function using code split from
1712 cp front end.
1713 (c_genericize_control_r): New.
1714 (c_genericize): Call walk_tree with c_genericize_control_r.
1715 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1716 structured loop and switch tree nodes here from cp front end.
1717
2aad20c0
GA
17182020-09-17 Patrick Palka <ppalka@redhat.com>
1719
1720 PR c/80076
1721 * c-indentation.c (should_warn_for_misleading_indentation): Move
1722 declarations of local variables closer to their first use.
1723 Handle virtual token locations by resolving them to their
1724 respective macro expansion points. If all three tokens are
1725 produced from the same macro expansion, then instead use their
1726 loci within the macro definition.
1727
ecde1b0a
GA
17282020-09-16 Martin Sebor <msebor@redhat.com>
1729
1730 PR c/78666
1731 PR c/96126
1732 * c-attribs.c (validate_attr_args): New function.
1733 (validate_attr_arg): Same.
1734 (handle_section_attribute): Call it. Introduce a local variable.
1735 (handle_alloc_size_attribute): Same.
1736 (handle_alloc_align_attribute): Same.
1737
50a71cd0
GA
17382020-09-14 Jakub Jelinek <jakub@redhat.com>
1739
1740 * c-attribs.c (handle_optimize_attribute): Adjust
1741 cl_optimization_save, cl_optimization_restore and
1742 build_optimization_node callers.
1743 * c-pragma.c (handle_pragma_optimize): Adjust
1744 build_optimization_node caller.
1745 (handle_pragma_push_options): Adjust
1746 build_optimization_node and build_target_option_node callers.
1747 (handle_pragma_pop_options, handle_pragma_reset_options):
1748 Adjust cl_optimization_restore callers.
1749
8f7ea26a
GA
17502020-08-28 Martin Sebor <msebor@redhat.com>
1751
1752 * c.opt (Wstringop-overread): New option.
1753
a6493809
GA
17542020-08-11 Jakub Jelinek <jakub@redhat.com>
1755
1756 PR c/96545
1757 * c-common.c (get_atomic_generic_size): Require that first argument's
1758 type points to a complete type and use tree_fits_uhwi_p instead of
1759 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1760
48cc2e46
GA
17612020-07-31 Martin Sebor <msebor@redhat.com>
1762
1763 PR c++/96003
1764 * c-common.c (check_function_arguments_recurse): Return early when
1765 no-warning bit is set.
1766
17672020-07-31 Richard Biener <rguenther@suse.de>
1768
1769 PR debug/96383
1770 * c-common.h (c_common_finalize_early_debug): Declare.
1771 * c-common.c: Include debug.h.
1772 (c_common_finalize_early_debug): finalize_early_debug langhook
1773 implementation generating debug for extern declarations.
1774
e71dab87
GA
17752020-07-27 Nathan Sidwell <nathan@acm.org>
1776
1777 * c-common.c (try_to_locate_new_include_insertion_point): Use
1778 strcmp, not pointer equality.
1779
ae2e0bc1
GA
17802020-07-25 Martin Sebor <msebor@redhat.com>
1781
1782 PR c++/96310
1783 * c-common.c (check_nonnull_arg): Print note only when warning was
1784 issued.
1785
3ea9abca
GA
17862020-07-22 Tobias Burnus <tobias@codesourcery.com>
1787
1788 * c-omp.c (c_finish_omp_critical): Check for no name but
1789 nonzero hint provided.
1790
0933f508
GA
17912020-07-20 Jason Merrill <jason@redhat.com>
1792
1793 * c-cppbuiltin.c (c_cpp_builtins): Update
1794 __cpp_nontype_template_args for C++20.
1795
17962020-07-20 Martin Sebor <msebor@redhat.com>
1797
1798 PR c/96249
1799 * c.opt: Remove stray text.
1800
8ca07a30
GA
18012020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1802
1803 PR other/86904
1804 * c-indentation.c (should_warn_for_misleading_indentation): Get
1805 global tabstop from the new source.
1806 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1807 is now a common option.
1808 * c.opt: Likewise.
1809
a82c4c4c 18102020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1811
1812 * c.opt (Wscalar-storage-order): Add explicit variable.
1813
f60ee68d
GA
18142020-07-07 Nathan Sidwell <nathan@acm.org>
1815
1816 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1817 cpp_read_main_file.
1818 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1819 maps. Force token position to line_table's highest line.
1820 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1821 (cb_define): Always increment source line.
1822
4077d74c
GA
18232020-07-06 Martin Sebor <msebor@redhat.com>
1824
1825 PR c++/95984
1826 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1827 to stub lambda objects with null this pointer.
1828 (check_nonnull_arg): Handle C++ nullptr.
1829
b5f24739
GA
18302020-07-02 Jason Merrill <jason@redhat.com>
1831 Jakub Jelinek <jakub@redhat.com>
1832
1833 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1834
46fbb6c6
GA
18352020-06-30 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR c++/95963
1838 * c-common.c (check_function_arguments_recurse): Don't crash on
1839 calls to internal functions.
1840
69273534
GA
18412020-06-28 Martin Sebor <msebor@redhat.com>
1842
1843 PR c++/86568
1844 * c-common.c (struct nonnull_arg_ctx): Add members.
1845 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1846 C++ member functions specially. Consider the this pointer implicitly
1847 nonnull.
1848 (check_nonnull_arg): Use location of argument when available.
1849 (check_function_arguments): Use nonnull_arg_ctx as argument.
1850
9a33c41f
GA
18512020-06-27 Jakub Jelinek <jakub@redhat.com>
1852
1853 PR middle-end/95903
1854 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1855 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1856 smaller precision intop operands separately.
1857
c9c05f73
GA
18582020-06-26 Marek Polacek <polacek@redhat.com>
1859
1860 * c-opts.c (c_common_init_options): Default to gnu++17.
1861
aff95ee7
GA
18622020-06-17 Jonathan Wakely <jwakely@redhat.com>
1863
bd0a89dc 1864 PR c/95378
aff95ee7
GA
1865 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1866 pointer arguments.
1867
56638b9b
GA
18682020-06-16 Jakub Jelinek <jakub@redhat.com>
1869
1870 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1871 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1872 idx members.
1873 (c_omp_is_loop_iterator): New function.
1874 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1875 if outer loop iterator is present. Perform duplicate checking through
1876 hash_set in the function rather than expecting caller to do that.
1877 Pass NULL instead of d->ppset to walk_tree_1.
1878 (c_omp_check_nonrect_loop_iv): New function.
1879 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1880 non-rectangular loop forms, diagnose multiple associated loops with
1881 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1882 (c_omp_check_loop_iv_exprs): Likewise.
1883
ec6ffbb9
GA
18842020-06-10 Martin Liska <mliska@suse.cz>
1885
1886 PR tree-optimization/92860
1887 * c-attribs.c (handle_optimize_attribute):
1888 Save global options and compare it after parsing of function
1889 attribute.
1890 * c-pragma.c (opt_stack::saved_global_options): New field.
1891 (handle_pragma_push_options): Save global_options.
1892 (handle_pragma_pop_options): Compare them after pop.
1893
b952c2cf
GA
18942020-06-09 Jakub Jelinek <jakub@redhat.com>
1895
1896 PR c/95580
1897 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1898 case when MEM_REF's first argument has type pointer to incomplete type.
1899
1a59f3db
GA
19002020-06-05 Jason Merrill <jason@redhat.com>
1901
1902 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1903 operand to POINTER_PLUS_EXPR.
1904
3add3425
GA
19052020-06-04 Martin Sebor <msebor@redhat.com>
1906
1907 PR middle-end/10138
1908 PR middle-end/95136
1909 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1910 (handle_access_attribute): Same.
1911
9a5b7438
GA
19122020-06-03 Mark Wielaard <mark@klomp.org>
1913
1914 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1915 New function.
1916 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1917 New function declaration.
1918
19192020-06-03 Mark Wielaard <mark@klomp.org>
1920
1921 * known-headers.cc (get_string_macro_hint): New function.
1922 (get_stdlib_header_for_name): Use get_string_macro_hint.
1923 (get_c_stdlib_header_for_string_macro_name): New function.
1924 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1925 New function declaration.
1926
19272020-06-03 Tobias Burnus <tobias@codesourcery.com>
1928
1929 * c-common.h (c_omp_predetermined_mapping): Declare.
1930 * c-omp.c (c_omp_predetermined_mapping): New.
1931
af114c38
MW
19322020-05-22 Mark Wielaard <mark@klomp.org>
1933
1934 * known-headers.cc (get_stdlib_header_for_name): Add a new
1935 stdlib_hint array for stdbool and stdint.
1936
45c50b6a
MW
19372020-05-22 Mark Wielaard <mark@klomp.org>
1938
1939 * known-headers.cc (get_stdlib_header_for_name): Return
1940 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1941 flag_isoc99.
1942
c22027a0
NS
19432020-05-20 Nathan Sidwell <nathan@acm.org>
1944
38a4db21
NS
1945 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1946
c22027a0
NS
1947 * c-common.c (try_to_locate_new_include_insertion_point): Use
1948 strcmp to compare filenames.
1949 * c-lex.c (init_c_lex): Move declaration to initialization.
1950 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1951 deferred count loop.
1952
29f0e90d
JM
19532020-05-15 Jason Merrill <jason@redhat.com>
1954
1955 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1956
b04445d4
JM
19572020-05-13 Jason Merrill <jason@redhat.com>
1958
1959 * c.opt (std=c++20): Make c++2a the alias.
1960 (std=gnu++20): Likewise.
1961 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1962 * c-opts.c: Adjust.
1963 * c-cppbuiltin.c: Adjust.
1964 * c-ubsan.c: Adjust.
1965 * c-warn.c: Adjust.
1966
11dd3be5
EB
19672020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1968
1969 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1970
b224c376
NS
19712020-05-08 Nathan Sidwell <nathan@acm.org>
1972
1973 Reimplement directives only processing.
1974 * c-ppoutput.c (token_streamer): Ne.
1975 (directives_only_cb): New. Swallow ...
1976 (print_lines_directives_only): ... this.
1977 (scan_translation_unit_directives_only): Reimplment using the
1978 published interface.
1979
f1d94677
MP
19802020-05-07 Marek Polacek <polacek@redhat.com>
1981
1982 * c-format.c (badwords): Add "nonstatic".
1983
9b95bb52
JJ
1984202-05-07 Jakub Jelinek <jakub@redhat.com>
1985
1986 PR c/94968
1987 * c-common.c (speculation_safe_value_resolve_params): Return false if
1988 error_operand_p (val2).
1989 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1990 Remove extraneous semicolon.
1991
530b4409 19922020-05-06 qing zhao <qing.zhao@oracle.com>
1993
1994 PR c/94230
1995 * c-indentation.c (get_visual_column): Add a hint to use the new
1996 -flarge-source-files option.
1997
b776bdca
SSF
19982020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1999
2000 * c-attribs.c (handle_vector_size_attribute): Add attribute
2001 nonnull for argument args in order to silence warning of
2002 uninitialized variable usage. Since this is local to the
2003 compilation unit and thus cannot be checked at call sides by the
2004 compiler, added an assert statement in order to verify this.
2005
6607bdd9
L
20062020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2007
2008 PR target/93492
2009 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2010 value to USHRT_MAX (65535).
2011
691eeb65
JJ
20122020-04-29 Jakub Jelinek <jakub@redhat.com>
2013
2014 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2015
26d76be7
JJ
20162020-04-27 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c/94755
2019 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2020 fncode == BUILT_IN_NONE before initialization of first_param.
2021
7291b2ed
MP
20222020-04-23 Marek Polacek <polacek@redhat.com>
2023
2024 PR c++/94733
2025 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2026 TREE_PURPOSE.
2027
58a29af8
PP
20282020-04-14 Patrick Palka <ppalka@redhat.com>
2029
2030 PR c++/85278
2031 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2032 ampersand if it's an rvalue reference type.
2033
09f04139
MS
20342020-04-13 Martin Sebor <msebor@redhat.com>
2035
2036 PR c/92326
2037 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2038 printing array bound for flexible array members.
2039
ee26baf4
IS
20402020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2041
2042 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2043 define, per n4861.
2044
75efe9cb
RB
20452020-04-02 Richard Biener <rguenther@suse.de>
2046
2047 PR c/94392
2048 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2049 for -O2 and C++11 or newer.
2050
75defde9
PP
20512020-03-28 Patrick Palka <ppalka@redhat.com>
2052
2053 * c.opt: Add -fconcepts-diagnostics-depth.
2054
52f24a9e
MS
20552020-03-27 Martin Sebor <msebor@redhat.com>
2056
2057 PR c++/94346
2058 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2059 to decl_attributes. Make handling of different kinds of entities
2060 more robust.
2061
ccacf77b
MS
20622020-03-27 Martin Sebor <msebor@redhat.com>
2063
2064 PR c++/94098
2065 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2066 here.
2067
ca6c7225
JJ
20682020-03-23 Jakub Jelinek <jakub@redhat.com>
2069
2070 PR c++/91993
2071 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2072 result being COMPOUND_EXPRs, skip to ultimate rhs.
2073
1aa22b19
RS
20742020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2075
2076 PR middle-end/94072
2077 * c-common.c (c_common_type_for_mode): Before using a registered
2078 built-in type, check that the vectorness of the type matches
2079 the vectorness of the mode.
2080
700d4cb0
JJ
20812020-03-17 Jakub Jelinek <jakub@redhat.com>
2082
2083 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2084 issue in a diagnostic message.
2085
b408e010
LH
20862020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2087
2088 * c.opt: Avoid redundancy in the help text.
2089
e78e50d5
MP
20902020-03-02 Marek Polacek <polacek@redhat.com>
2091
2092 PR c++/93958 - add missing -std=gnu++20.
2093 * c.opt: Add -std=gnu++20.
2094
649e1741
MS
20952020-03-01 Martin Sebor <msebor@redhat.com>
2096
2097 PR c++/92721
2098 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2099 (handle_access_attribute): Same.
2100
7b60f3ba
JJ
21012020-02-25 Jakub Jelinek <jakub@redhat.com>
2102
2103 PR c/93858
2104 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2105 "did you mean" hint in diagnostics.
2106
fb260504
JM
21072020-02-15 Jason Merrill <jason@redhat.com>
2108
2109 * c.opt: Add -std=c++20.
2110
1d757b09
EB
21112020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2112
2113 * c-ada-spec.c: Include bitmap.h.
2114 (dump_ada_double_name): Rename into...
2115 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2116 (dump_ada_array_type): Adjust to above renaming. Robustify.
2117 (dump_nested_types_1): New function copied from... Add dumped_types
2118 parameter and pass it down to dump_nested_type.
2119 (dump_nested_types): ...this. Remove parent parameter. Just call
2120 dump_nested_types_1 on an automatic bitmap.
2121 (dump_nested_type): Add dumped_types parameter.
2122 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2123 Adjust recursive calls and adjust to above renaming.
2124 (dump_ada_declaration): Adjust call to dump_nested_types.
2125 Tidy up and adjust to above renaming.
2126 (dump_ada_specs): Initialize and release bitmap obstack.
2127
0cc575e4
MS
21282020-02-10 Martin Sebor <msebor@redhat.com>
2129
2130 PR c/93640
2131 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2132
a59aa302
JJ
21332020-02-10 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR other/93641
2136 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2137 Remove useless extra test.
2138
e464fc90
TB
21392020-02-03 Julian Brown <julian@codesourcery.com>
2140 Tobias Burnus <tobias@codesourcery.com>
2141
2142 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2143
e3b6c052
JM
21442020-01-29 Jason Merrill <jason@redhat.com>
2145
2146 PR c++/89357
2147 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2148
6d00f052
JM
21492020-01-23 Jason Merrill <jason@redhat.com>
2150
2151 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2152
8a990ffa
MS
21532020-01-23 Martin Sebor <msebor@redhat.com>
2154
2155 PR c/84919
2156 * c-common.c (check_function_arguments): Avoid overlap checking
2157 of sprintf functions.
2158
55b7df8b
JM
21592020-01-22 Jason Merrill <jason@redhat.com>
2160
2161 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2162 PR c++/40752
2163 * c-warn.c (conversion_warning): Check operands only after checking
2164 the whole expression. Don't check second operand of + for sign.
2165
c77074d0
JM
21662020-01-21 Jason Merrill <jason@redhat.com>
2167 Manuel López-Ibáñez <manu@gcc.gnu.org>
2168
2169 PR c++/40752 - useless -Wconversion with short +=.
2170 * c.opt (-Warith-conversion): New.
2171 * c-warn.c (conversion_warning): Recurse for operands of
2172 operators. Only warn about the whole expression with
2173 -Warith-conversion.
2174
731dbfc3
JM
21752020-01-21 Jason Merrill <jason@redhat.com>
2176
2177 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2178 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2179
ad1a3914
NS
21802020-01-20 Nathan Sidwell <nathan@acm.org>
2181
2182 PR preprocessor/80005
2183 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2184
49789fd0
IS
21852020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2186
2187 * c-common.c (co_await, co_yield, co_return): New.
2188 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2189 RID_CO_RETURN): New enumeration values.
2190 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2191 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2192 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2193 * c.opt (fcoroutines): New command-line switch.
2194
4bc1899b
DM
21952020-01-10 David Malcolm <dmalcolm@redhat.com>
2196
2197 * c-format.c (local_event_ptr_node): New.
2198 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2199 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2200 * c-format.h (T_EVENT_PTR): New define.
2201
f25e33fa
MS
22022020-01-10 Martin Sebor <msebor@redhat.com>
2203
2204 PR c/93132
2205 * c-attribs.c (append_access_attrs): Validate against the translated
2206 access string rather than the human-readable representation.
2207
8d9254fc
JJ
22082020-01-01 Jakub Jelinek <jakub@redhat.com>
2209
2210 Update copyright years.
2211
39292e25
EB
22122019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2213
2214 * c-ada-spec.h (decl_sloc): Delete.
2215 * c-ada-spec.c (decl_sloc): Make static.
2216
519d7496
JB
22172019-12-19 Julian Brown <julian@codesourcery.com>
2218
2219 * c-common.h (c_omp_map_clause_name): Add prototype.
2220 * c-omp.c (c_omp_map_clause_name): New function.
2221 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2222 PRAGMA_OACC_CLAUSE_DETACH.
2223
a6163563
JB
22242019-12-19 Julian Brown <julian@codesourcery.com>
2225 Maciej W. Rozycki <macro@codesourcery.com>
2226 Tobias Burnus <tobias@codesourcery.com>
2227 Thomas Schwinge <thomas@codesourcery.com>
2228
2229 * c-pragma.h (pragma_omp_clause): Add
2230 PRAGMA_OACC_CLAUSE_NO_CREATE.
2231
e8f1ade2
MS
22322019-12-17 Martin Sebor <msebor@redhat.com>
2233
2234 PR c++/61339
2235 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2236
368877a1
DM
22372019-12-11 David Malcolm <dmalcolm@redhat.com>
2238
2239 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2240 implementation.
2241 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2242
d68f5d45
DM
22432019-12-09 David Malcolm <dmalcolm@redhat.com>
2244
2245 * c-format.c (range_label_for_format_type_mismatch::get_text):
2246 Replace label_text ctor called with true with label_text::take.
2247
d3e28653
DM
22482019-12-09 David Malcolm <dmalcolm@redhat.com>
2249
2250 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2251 initial newline from expected outputs.
2252 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2253 call to diagnostic_show_locus.
2254
abd6d8cc
JJ
22552019-12-06 Jakub Jelinek <jakub@redhat.com>
2256
2257 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2258 now.
2259
7906797e
MP
22602019-12-05 Marek Polacek <polacek@redhat.com>
2261 Jakub Jelinek <jakub@redhat.com>
2262
2263 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2264 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2265
5c04da88
MP
22662019-12-05 Marek Polacek <polacek@redhat.com>
2267
2268 PR c++/92271 - make __is_same alias for __is_same_as.
2269 * c-common.c: Add __is_same, an alias for __is_same_as.
2270
43aae289
MP
22712019-12-03 Marek Polacek <polacek@redhat.com>
2272
2273 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2274 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2275 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2276
d7ddfbcb
JH
22772019-11-30 Jan Hubicka <hubicka@ucw.cz>
2278
2279 * c-attribs.c (handle_symver_attribute): New function
2280 (c_common_attributes): Add symver.
2281
65ef05d0
RS
22822019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2283
2284 * c-common.c (pointer_int_sum): Use verify_type_context to check
2285 whether the target allows pointer arithmetic for the types involved.
2286 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2287 to check whether the target allows sizeof and alignof operations
2288 for the types involved.
2289
1a291106
JM
22902019-11-27 Jason Merrill <jason@redhat.com>
2291
2292 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2293
05d6cb1a
JJ
22942019-11-26 Jakub Jelinek <jakub@redhat.com>
2295
2296 PR c++/61414
2297 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2298 ENUMERAL_TYPEs.
2299
5b8d9367
JM
23002019-11-25 Joseph Myers <joseph@codesourcery.com>
2301
2302 PR c/91985
2303 * c-common.c (c_common_type_for_mode): Handle decimal
2304 floating-point types being NULL_TREE.
2305 * c-format.c (get_format_for_type_1): Handle specified types being
2306 NULL_TREE.
2307 * c-lex.c (interpret_float): Give an error for decimal
2308 floating-point constants when decimal floating-point not
2309 supported.
2310
1fbf51cb
JJ
23112019-11-23 Jakub Jelinek <jakub@redhat.com>
2312
2313 PR middle-end/83859
2314 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2315 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2316 group warning with inform together.
2317 (handle_access_attribute): Formatting fix.
2318
761df906
JJ
23192019-11-22 Jakub Jelinek <jakub@redhat.com>
2320
bdaf8be1
JJ
2321 PR c/90677
2322 * c-common.h (identifier_global_tag): Declare.
2323 * c-format.c (get_pointer_to_named_type): Renamed to ...
2324 (get_named_type): ... this. Use identifier_global_tag instead of
2325 identifier_global_value, handle the return value being a TYPE_P.
2326 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2327 to call get_named_type instead. Formatting fixes.
2328
c2ecce6d 2329 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2330 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2331 and __cpp_generic_lambdas for -std=c++2a. Define
2332 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2333 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2334 __cpp_concepts for -std=c++2a.
2335
54aa6b58
MS
23362019-11-22 Martin Sebor <msebor@redhat.com>
2337
2338 PR middle-end/83859
2339 * c-attribs.c (handle_access_attribute): New function.
2340 (c_common_attribute_table): Add new attribute.
2341 (get_argument_type): New function.
2342 (append_access_attrs): New function.
2343 (get_nonnull_operand): Rename...
2344 (get_attribute_operand): ...to this.
2345 * c-common.c (get_nonnull_operand): Rename...
2346 (get_attribute_operand): ...to this.
2347
6c80b1b5
JM
23482019-11-21 Joseph Myers <joseph@codesourcery.com>
2349
2350 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2351 of warning.
2352
192961ff
JM
23532019-11-19 Joseph Myers <joseph@codesourcery.com>
2354
2355 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2356 warning for standard attributes mixed with fallthrough attributes.
2357
f8aea5e3
JM
23582019-11-15 Joseph Myers <joseph@codesourcery.com>
2359
2360 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2361 * c-common.h (handle_fallthrough_attribute): Declare.
2362
2cc94aa8
JM
23632019-11-15 Joseph Myers <joseph@codesourcery.com>
2364
2365 * c-attribs.c (handle_deprecated_attribute): Remove static.
2366 * c-common.h (handle_deprecated_attribute): Declare.
2367
7c5890cc
JM
23682019-11-14 Joseph Myers <joseph@codesourcery.com>
2369
2370 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2371 char for C.
2372
b2417b59
JJ
23732019-11-14 Jakub Jelinek <jakub@redhat.com>
2374
d0ec7c93
JJ
2375 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2376 valid vendors.
2377
b2417b59
JJ
2378 * c-omp.c (c_omp_check_context_selector): Handle name lists
2379 containing string literals. Don't diagnose atomic_default_mem_order
2380 with multiple props.
2381
00be2a5f
JM
23822019-11-13 Joseph Myers <joseph@codesourcery.com>
2383
2384 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2385 NORM_MAX constants. Update call to get_max_float.
2386 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2387 constants.
2388
2dbad62d
EB
23892019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2390
2391 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2392 (dump_forward_type): Do not generate a declaration for function types.
2393 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2394 of the component type if it is declared in another file.
2395
6ed76044
ML
23962019-11-12 Martin Liska <mliska@suse.cz>
2397
2398 * c-opts.c (c_common_post_options):
2399 Use SET_OPTION_IF_UNSET.
2400
62aee289
MR
24012019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2402 Frederik Harwath <frederik@codesourcery.com>
2403
2404 gcc/c-family/
2405 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2406 constant.
2407 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2408
f486280c
RS
24092019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2410
2411 * c-common.h (gnu_vector_type_p): New function.
2412 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2413 vectors to satisfy gnu_vector_type_p.
2414 (c_build_vec_convert): Likewise __builtin_convertvector.
2415 (convert_vector_to_array_for_subscript): Likewise when applying
2416 implicit vector to array conversion.
2417 (scalar_to_vector): Likewise when converting vector-scalar
2418 operations to vector-vector operations.
2419
017c6491
JM
24202019-11-08 Joseph Myers <joseph@codesourcery.com>
2421
2422 * c.opt (Wold-style-definition): Initialize to -1.
2423 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2424 to flag_isoc2x if not set explicitly.
2425
c01bd174
JM
24262019-11-07 Joseph Myers <joseph@codesourcery.com>
2427
2428 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2429
0df65305
JM
24302019-11-05 Jason Merrill <jason@redhat.com>
2431
2432 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2433 -fconcepts.
2434
e0c866dd
KK
24352019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2436
2437 * c-opts.c (c_common_post_options): Update
2438 latest_abi_version.
2439
f968ef9b
JJ
24402019-11-02 Jakub Jelinek <jakub@redhat.com>
2441
d0c464d2
JJ
2442 * c-common.h (c_omp_get_context_selector): Remove.
2443 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2444 and renamed to omp_get_context_selector.
2445
917dd789
JJ
2446 * c-omp.c (c_omp_mark_declare_variant): Use
2447 omp_context_selector_set_compare.
2448
f968ef9b
JJ
2449 PR c++/88335 - Implement P1073R3: Immediate functions
2450 * c-common.h (enum rid): Add RID_CONSTEVAL.
2451 * c-common.c (c_common_reswords): Add consteval.
2452
5f6705b7
JJ
24532019-11-01 Martin Sebor <msebor@redhat.com>
2454
2455 PR middle-end/91679
2456 PR middle-end/91647
2457 PR middle-end/91463
2458 PR middle-end/92312
2459 * c-pretty-print.c (direct_abstract_declarator): Print
2460 bound in zero-length arrays.
2461 * c.opt (-Wzero-length-bounds): New option.
2462
43f1814c
NS
24632019-10-30 Nathan Sidwell <nathan@acm.org>
2464
2465 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2466 macros.
2467
ad1539d5
MS
24682019-10-28 Martin Sebor <msebor@redhat.com>
2469
2470 PR c/66970
2471 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2472 even when only preprocessing.
2473 * c-common.h (names_builtin_p): Declare new function.
2474 * c-lex.c (init_c_lex): Set has_builtin.
2475 (c_common_has_builtin): Define a new function.
2476 * c-ppoutput.c (init_pp_output): Set has_builtin.
2477
135df52c
JJ
24782019-10-24 Jakub Jelinek <jakub@redhat.com>
2479
2480 * c-common.h (c_omp_context_selector_matches): Remove.
2481 * c-omp.c (c_omp_context_selector_matches): Remove.
2482 * c-attribs.c (c_common_attribute_table): Add
2483 "omp declare target {host,nohost,block}" attributes.
2484
8ad0c477
JM
24852019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2486
2487 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2488
56898e43
RS
24892019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2490
2491 * c-common.h (user_facing_original_type_p): Declare.
2492 * c-common.c: Include c-spellcheck.h.
2493 (user_facing_original_type_p): New function.
2494
20de9568
JJ
24952019-10-12 Jakub Jelinek <jakub@redhat.com>
2496
2497 * c-common.h (c_omp_mark_declare_variant,
2498 c_omp_context_selector_matches): Declare.
2499 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2500 and hsa-common.h.
2501 (c_omp_get_context_selector): Support second argument NULL.
2502 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2503 functions.
2504 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2505 attribute, add "omp declare variant base" and
2506 "omp declare variant variant" attributes.
2507
175a85b2
JM
25082019-10-11 Joseph Myers <joseph@codesourcery.com>
2509
2510 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2511 CppReason(CPP_W_C11_C2X_COMPAT).
2512
fe2bc27c
JM
25132019-10-11 Joseph Myers <joseph@codesourcery.com>
2514
2515 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2516 _Decimal64 and _Decimal128.
2517
27dfdc0f
JM
25182019-10-10 Joseph Myers <joseph@codesourcery.com>
2519
2520 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2521 types if DFP not supported.
2522
94e7f906
JJ
25232019-10-10 Jakub Jelinek <jakub@redhat.com>
2524
2525 * c-common.h (c_omp_check_context_selector,
2526 c_omp_get_context_selector): Declare.
2527 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2528 in diagnostic message.
2529 (c_omp_check_context_selector, c_omp_get_context_selector): New
2530 functions.
2531 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2532 attribute.
2533 (handle_omp_declare_variant_attribute): New function.
2534
a7160771
MS
25352019-10-09 Martin Sebor <msebor@redhat.com>
2536
2537 PR tree-optimization/90879
2538 * c.opt (-Wstring-compare): New option.
2539
cb57504a
JM
25402019-10-08 Andrew Sutton <asutton@lock3software.com>
2541 Jason Merrill <jason@redhat.com>
2542
2543 Update the concepts implementation to conform to the C++20
2544 specification, improve compile times, and generally clean up
2545 the implementation.
2546
2547 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2548 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2549 * c.opt: Add -Wconcepts-ts.
2550 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2551 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2552 (set_std_cxx2a): Enable concepts by default.
2553
fbb2a6dc
JM
25542019-10-08 Joseph Myers <joseph@codesourcery.com>
2555
2556 * c-opts.c (c_common_post_options): Set
2557 -fno-fp-int-builtin-inexact for C2X.
2558
8e007055
JJ
25592019-10-05 Jakub Jelinek <jakub@redhat.com>
2560
2561 PR c++/91369 - Implement P0784R7: constexpr new
2562 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2563 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2564
843f104d
JM
25652019-10-04 Joseph Myers <joseph@codesourcery.com>
2566
2567 PR c/82752
2568 * c-format.c (C_STD_VER): Handle C2x.
2569 (C_STD_NAME): Likewise.
2570 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2571 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2572 modifier allowed and 'p' flag.
2573 * c-format.h (enum format_std_version): Add STD_C2X.
2574 (struct format_char_info): Mention 'p' in comment on flags2.
2575
e9c9a142
DM
25762019-10-01 David Malcolm <dmalcolm@redhat.com>
2577
2578 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2579 calling diagnostic_show_locus, rather than destroying it afterwards.
2580
7552c36a
JJ
25812019-10-01 Jakub Jelinek <jakub@redhat.com>
2582
2583 PR c++/91925
2584 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2585 with NULL DECL_FIELD_OFFSET.
2586
8209db25
RS
25872019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2588
2589 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2590 has a type name, use it in preference to the __vector syntax.
2591
9343bf99
RS
25922019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2593
2594 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2595 two spaces between a comma and "...".
2596
59bc434a
JJ
25972019-09-27 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR c++/88203
2600 * c-common.h (c_omp_predefined_variable): Declare.
2601 * c-omp.c (c_omp_predefined_variable): New function.
2602 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2603 for predefined variables.
2604
c6447c20
RS
26052019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2606
2607 * c-common.h (build_function_call_vec): Take the original
2608 function decl as an optional final parameter.
2609 (check_builtin_function_arguments): Take the original function decl.
2610 * c-common.c (check_builtin_function_arguments): Likewise.
2611 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2612 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2613
c4438114
JM
26142019-09-15 Jason Merrill <jason@redhat.com>
2615
2616 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2617 fold_for_warn in "|| mask" warning.
2618
68a57628
ML
26192019-09-10 Martin Liska <mliska@suse.cz>
2620
2621 * c.opt: Use newly added WarnRemoved.
2622
f48ef52e
ML
26232019-09-09 Martin Liska <mliska@suse.cz>
2624
2625 * c.opt: Update comment of removed
2626 options that are preserved only for backward
2627 compatibility.
2628
67f6e649
ML
26292019-09-06 Martin Liska <mliska@suse.cz>
2630
2631 PR c++/91125
2632 * c-common.c: Remove definition of flag_use_repository.
2633 * c-common.h: Likewise.
2634 * c-opts.c (c_common_handle_option):
2635 Do not handle OPT_frepo option.
2636 * c.opt: Mark the option with Deprecated.
2637
db9d2274
MP
26382019-09-04 Marek Polacek <polacek@redhat.com>
2639
2640 * c.opt (fdeduce-init-list): Ignored.
2641
68e2c199
PK
26422019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2643
2644 PR c/78736
2645 * c.opt (Wenum-conversion): New option.
2646
7a4418a5
JL
26472019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2648
2649 * c-attribs.c (handle_section_attribute): Call the
2650 handle_generic_attribute target hook after performing target
2651 independent processing.
2652 (handle_noinit_attribute): Likewise.
2653
5f76ab15
ILT
26542019-09-03 Ian Lance Taylor <iant@golang.org>
2655
2656 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2657 when using -fgo-dump-spec.
2658
ae0d3f6a
ML
26592019-09-02 Martin Liska <mliska@suse.cz>
2660
2661 PR c++/91155
2662 * c-common.c (fname_as_string): Use cxx_printable_name for
2663 __PRETTY_FUNCTION__ same as was used before r265711.
2664
8a902edb
MP
26652019-08-28 Marek Polacek <polacek@redhat.com>
2666
2667 Implement P1152R4: Deprecating some uses of volatile.
2668 PR c++/91361
2669 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2670 default for C++2a, unless -Wno-deprecated.
2671 * c.opt (Wvolatile): New warning.
2672
4742dbe7
MP
26732019-08-28 Marek Polacek <polacek@redhat.com>
2674
2675 PR c++/91360 - Implement C++20 P1143R2: constinit.
2676 * c-common.c (c_common_reswords): Add constinit and __constinit.
2677 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2678 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2679 RID_LAST_CXX20.
2680 (D_CXX20): Define.
2681 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2682 * c-format.c (cxx_keywords): Add "constinit".
2683 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2684
6a074892
JJ
26852019-08-27 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c++/91415
2688 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2689 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2690 like COMPOUND_EXPR rather than normal expression.
2691
22f8849d
IS
26922019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2693
2694 PR pch/61250
2695 * c-lex.c (c_lex_with_flags): Don't call
2696 c_common_no_more_pch () from here.
2697
df375b03
JJ
26982019-08-23 Jakub Jelinek <jakub@redhat.com>
2699
2700 PR middle-end/91283
2701 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2702 instead of flag_excess_precision_cmdline.
2703 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2704 * c-opts.c (c_common_post_options): Likewise.
2705
14b7950f
MS
27062019-08-22 Martin Sebor <msebor@redhat.com>
2707
2708 PR middle-end/91490
2709 * c-common.c (braced_list_to_string): Add argument and overload.
2710 Handle flexible length arrays and unions.
2711
8bb2ee59
EB
27122019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2713
2714 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2715 function declarations where arguments are missing. Rename variables.
2716
21c1e205
RB
27172019-08-15 Richard Biener <rguenther@suse.de>
2718
2719 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2720 enabled, define __SIZETYPE__.
2721
f0033821
CL
27222019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2723
2724 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2725 exclusion with "section" attribute.
2726 (attr_noinit_exclusions): New table.
2727 (handle_noinit_attribute): New function.
2728
4d732405
RS
27292019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2730
2731 PR middle-end/91421
2732 * c-common.c (resolve_overloaded_builtin): Use
2733 copy_decl_built_in_function.
2734
51ad8481
MS
27352019-08-13 Martin Sebor <msebor@redhat.com>
2736
2737 PR c/80619
2738 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2739 (asm_fprintf_length_spec): Same.
2740 * c-format.h (format_lengths): Add FMT_LEN_w.
2741
77eb117f
JJ
27422019-08-10 Jakub Jelinek <jakub@redhat.com>
2743
2744 * c-pragma.h (enum pragma_omp_clause): Add
2745 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2746
398e3feb
JJ
27472019-08-07 Jakub Jelinek <jakub@redhat.com>
2748
2749 * c-pragma.h (enum pragma_omp_clause): Add
2750 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2751 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2752 enumeration value.
2753
ab574db6
MP
27542019-08-05 Marek Polacek <polacek@redhat.com>
2755
2756 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2757 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2758 default for C++2a, unless -Wno-deprecated.
2759 * c.opt (Wcomma-subscript): New warning.
2760
554a530f
JJ
27612019-07-20 Jakub Jelinek <jakub@redhat.com>
2762
2763 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2764 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2765 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2766 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2767 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2768 constructs with the loop construct.
2769
1a888209
JJ
27702019-07-13 Jakub Jelinek <jakub@redhat.com>
2771
2772 PR c/91149
2773 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2774 OMP_CLAUSE_REDUCTION_TASK handling.
2775
1fdd6f04
JJ
27762019-07-12 Jakub Jelinek <jakub@redhat.com>
2777
2778 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2779 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2780
99b1c316
MS
27812019-07-09 Martin Sebor <msebor@redhat.com>
2782
2783 PR c++/61339
1fdd6f04 2784 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2785 and others to class.
2786 * c-pretty-print.h: Same.
2787
6c1dae73
MS
27882019-07-09 Martin Sebor <msebor@redhat.com>
2789
2790 PR c++/61339
2791 * c-format.c (check_argument_type): Change class-key from class to
2792 struct and vice versa to match convention and avoid -Wclass-is-pod
2793 and -Wstruct-no-pod.
2794 * c-pretty-print.h: Same.
2795
8ba6ea87
ML
27962019-07-03 Martin Liska <mliska@suse.cz>
2797
2798 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2799 dead assignemts.
2800
83eb9522
JJ
28012019-07-03 Jakub Jelinek <jakub@redhat.com>
2802
2803 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2804 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2805 with OMP_PARALLEL.
2806
1c6ffbab
QZ
28072019-07-02 qing zhao <qing.zhao@oracle.com>
2808
2809 PR preprocessor/90581
2810 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2811 * c.opt: Add new option -fmax-include-depth.
2812
7ffc7de5
JM
28132019-06-26 Jason Merrill <jason@redhat.com>
2814
2815 PR c++/55442 - memory-hog with highly recursive constexpr.
2816 * c.opt (fconstexpr-loop-limit): New.
2817
361af3e4
JJ
28182019-06-25 Jakub Jelinek <jakub@redhat.com>
2819
2820 PR sanitizer/90954
2821 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2822 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2823
ab20d992
JJ
28242019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2825
2826 * c-common.c (c_common_nodes_and_builtins): Define
2827 alternate "__intN__" name for "__intN" types.
2828
f4af4019
JH
28292019-06-24 Jan Hubicka <jh@suse.cz>
2830
2831 * c-common.c (braced_lists_to_strings): Check that
2832 type is array or integer prior checking string flag.
2833
da9e9b57
MB
28342019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2835
2836 PR c++/90875 - added -Wswitch-outside-range option
2837 * c.opt (Wswitch-outside-range): Added new option.
2838 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2839
3f3d6a6f
MP
28402019-06-21 Marek Polacek <polacek@redhat.com>
2841
2842 PR c++/90953 - ICE with -Wmissing-format-attribute.
2843 * c-common.c (check_function_arguments_recurse): Use
2844 get_attribute_name.
2845 (check_missing_format_attribute): Likewise.
2846
1bf32c11
MP
28472019-06-19 Marek Polacek <polacek@redhat.com>
2848
2849 PR c++/60364 - noreturn after first decl not diagnosed.
2850 * c-attribs.c (handle_noreturn_attribute): No longer static.
2851 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2852 Declare.
2853 * c-format.c (check_function_format): Use get_attribute_name.
2854
a04c0734
MS
28552019-06-19 Martin Sebor <msebor@redhat.com>
2856
2857 PR translation/90156
2858 * c-format.c (function_format_info::format_type): Adjust type.
2859 (function_format_info::is_raw): New member.
2860 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2861 (decode_format_attr): Adjust call to decode_format_type.
2862 Avoid a redundant call to convert_format_name_to_system_name.
2863 Avoid abbreviating the word "arguments" in a diagnostic.
2864 (format_warning_substr): New function.
2865 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2866 (finish_dollar_format_checking): Same.
2867 (check_format_info): Same.
2868 (struct baltoks_t): New.
2869 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2870 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2871 functions.
2872 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2873 maybe_diag_unbalanced_tokens.
2874 (handle_format_attribute): Spell out the word "arguments" in
2875 a diagnostic.
2876
d3786ebb
MB
28772019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2878
2879 PR c++/90449 - add -Winaccessible-base option.
2880 * c.opt (Winaccessible-base): New option.
2881
bf38f7e9
JJ
28822019-06-10 Jakub Jelinek <jakub@redhat.com>
2883
2884 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2885 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2886 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2887 combined/composite constructs where it is not allowed. Copy over
2888 OMP_CLAUSE_REDUCTION_INSCAN.
2889
0ecf545c
MS
28902019-06-05 Martin Sebor <msebor@redhat.com>
2891
2892 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2893 (handle_alias_ifunc_attribute): Same.
2894 (handle_copy_attribute): Same.
2895 (handle_weakref_attribute): Same.
2896 (handle_nonnull_attribute): Same.
2897 * c-warn.c (warn_for_sign_compare): Same.
2898 (warn_for_restrict): Same.
2899 * c.opt: Same.
2900
36b34127
MS
29012019-06-05 Martin Sebor <msebor@redhat.com>
2902
2903 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2904 * c.opt (-Wformat-diag): Remove a spurious period.
2905
357a352f
JJ
29062019-05-29 Jakub Jelinek <jakub@redhat.com>
2907
2908 PR c/90628
2909 * c-common.c (check_builtin_function_arguments)
2910 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2911 as last argument.
2912
2b8235ea
EB
29132019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2914
2915 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2916
6d86ddc4
ML
29172019-05-22 Martin Liska <mliska@suse.cz>
2918
2919 PR lto/90500
2920 * c-attribs.c (handle_copy_attribute): Do not copy
2921 target_clones attribute.
2922
419ba5b9
EB
29232019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2924
2925 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2926 * c-ada-spec.c (print_assignment_operator): New function.
2927 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2928 assignment operators declared as methods and filter out the others.
2929
e03436e7
TS
29302019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2931
2932 PR c/89433
2933 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2934 "omp declare target".
2935
a9c697b8
MS
29362019-05-16 Martin Sebor <msebor@redhat.com>
2937
ab20d992
JJ
2938 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2939 keywords, operators, and types in diagnostics.
2940 (handle_scalar_storage_order_attribute): Same.
2941 (handle_mode_attribute): Same.
2942 (handle_visibility_attribute): Same.
2943 (handle_assume_aligned_attribute): Same.
2944 (handle_no_split_stack_attribute): Same.
2945 * c-common.c (shorten_compare): Same.
2946 (c_common_truthvalue_conversion): Same.
2947 (cb_get_source_date_epoch): Same.
2948 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2949 in diagnostics.
2950 (interpret_float): Same.
2951 * c-omp.c (c_finish_omp_for): Same.
2952 * c-opts.c (c_common_post_options): Same.
2953 * c-pch.c (c_common_pch_pragma): Same.
2954 * c-pragma.c (pop_alignment): Same.
2955 (handle_pragma_pack): Same.
2956 (apply_pragma_weak): Same.
2957 (handle_pragma_weak): Same.
2958 (handle_pragma_scalar_storage_order): Same.
2959 (handle_pragma_redefine_extname): Same.
2960 (add_to_renaming_pragma_list): Same.
2961 (maybe_apply_renaming_pragma): Same.
2962 (push_visibility): Same.
2963 (handle_pragma_visibility): Same.
2964 (handle_pragma_optimize): Same.
2965 (handle_pragma_message): Same.
2966 * c-warn.c (warn_for_omitted_condop): Same.
2967 (lvalue_error): Same.
a9c697b8 2968
6b943512
RB
29692019-05-15 Richard Biener <rguenther@suse.de>
2970
2971 PR c/90474
2972 * c-common.c (c_common_mark_addressable_vec): Also mark
2973 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2974 c_mark_addressable.
ab20d992 2975
b744fc85
NS
29762019-05-06 Nathan Sidwell <nathan@acm.org>
2977
2978 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2979
598f50d7
NS
29802019-04-30 Nathan Sidwell <nathan@acm.org>
2981
2982 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2983
5bcc5a3b
ML
29842019-04-30 Martin Liska <mliska@suse.cz>
2985
2986 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2987 for unknown options.
2988
e78a87f7
RS
29892019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2990
2991 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2992 the pointer target rather than the pointer itself.
2993
c280b7ee
JJ
29942019-04-19 Jakub Jelinek <jakub@redhat.com>
2995
2996 PR c/89888
2997 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2998 arguments.
2999 (c_do_switch_warnings): Remove outside_range_p argument.
3000 * c-common.c (check_case_bounds): Removed.
3001 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3002 Don't call check_case_bounds. Fold low_value as well as high_value.
3003 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3004 Check for case labels outside of range of original type here and
3005 adjust them.
3006
8e8225e6
JJ
30072019-04-12 Jakub Jelinek <jakub@redhat.com>
3008
63b8a166
JJ
3009 PR translation/90041
3010 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3011 in the Warn diagnostics.
3012
8e8225e6
JJ
3013 PR c/89946
3014 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3015 function comment. Warn if arguments of the attribute are not positive
3016 integer constants.
3017
53a3f614
EB
30182019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3019
3020 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3021 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3022
22be5873
EB
30232019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3024
3025 * c-ada-spec.c (is_float128): New predicate extracted from...
3026 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3027 <REAL_TYPE>: ...here. Call it.
3028
34facf20
DM
30292019-04-05 David Malcolm <dmalcolm@redhat.com>
3030
3031 PR c/89985
3032 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3033 auto_diagnostic_group. Guard inform calls by result of
3034 warning_at call.
3035
05564120
MP
30362019-04-05 Marek Polacek <polacek@redhat.com>
3037
ab20d992 3038 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3039 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3040 of RHS.
3041
7a506c3c
JM
30422019-04-03 Jason Merrill <jason@redhat.com>
3043
3044 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3045 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3046
ddeae8c8
MS
30472019-04-01 Martin Sebor <msebor@redhat.com>
3048
3049 PR c/89685
3050 * c-attribs.c (handle_copy_attribute): Handle references and
3051 non-constant expressions.
3052
a15ffa22
JJ
30532019-03-22 Jakub Jelinek <jakub@redhat.com>
3054
3055 PR c++/87481
3056 * c.opt (-fconstexpr-ops-limit=): New option.
3057
36a3a7a3
JJ
30582019-03-21 Jakub Jelinek <jakub@redhat.com>
3059
3060 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3061 template param.
3062
bec1da64
MS
30632019-03-19 Martin Sebor <msebor@redhat.com>
3064
3065 PR tree-optimization/89688
3066 * c-common.c (braced_list_to_string): Make static.
3067 (braced_lists_to_strings): Define new function.
3068 * c-common.h (braced_list_to_string): Remove.
3069 (braced_lists_to_strings): Declare.
3070
1fe61adf
ML
30712019-03-12 Martin Liska <mliska@suse.cz>
3072
3073 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3074
93964ebd
ML
30752019-03-11 Martin Liska <mliska@suse.cz>
3076
3077 * c-opts.c (c_common_post_options): Wrap apostrophes
3078 in gcc internal format with %'.
3079
a3f9f006
ML
30802019-03-11 Martin Liska <mliska@suse.cz>
3081
3082 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3083 in a string format message and fix GNU coding style.
3084 * c-common.c (vector_types_convertible_p): Likewise.
3085 (c_build_vec_perm_expr): Likewise.
3086 * c-indentation.c (get_visual_column): Likewise.
3087 * c-opts.c (c_common_handle_option): Likewise.
3088 (c_common_post_options): Likewise.
3089 (sanitize_cpp_opts): Likewise.
3090 * c-pch.c (c_common_pch_pragma): Likewise.
3091 * c-pragma.c (handle_pragma_pack): Likewise.
3092
1db01ff9
JJ
30932019-03-08 Jakub Jelinek <jakub@redhat.com>
3094
3095 PR tree-optimization/89550
3096 * c-common.c (c_common_truthvalue_conversion): Only set
3097 TREE_NO_WARNING if warning_at returned true.
3098 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3099
ba790e6f
JJ
31002019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3101 Martin Sebor <msebor@gmail.com>
3102
3103 * c.opt (Wmissing-attributes): Clean up doc string.
3104
7da73ba7
JJ
31052019-02-25 Jakub Jelinek <jakub@redhat.com>
3106
3107 PR c/89495
3108 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3109 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3110 checking.
3111
921bb9d1
RB
31122019-02-22 Richard Biener <rguenther@suse.de>
3113
3114 * c-pch.c (no_checksum): Remove.
3115 (pch_init): Remove assertion that executable_checksum is not
3116 all zero.
3117 (c_common_valid_pch): Likewise.
3118
e2ebb05c
MS
31192019-02-18 Martin Sebor <msebor@redhat.com>
3120
3121 PR middle-end/89294
3122 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3123
3fe53000
DM
31242019-02-16 David Malcolm <dmalcolm@redhat.com>
3125
3126 PR c++/88680
3127 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3128 implementing -Wtype-limits.
3129
28a8cef1
MS
31302019-02-11 Martin Sebor <msebor@redhat.com>
3131
3132 PR c++/87996
3133 * c-common.c (invalid_array_size_error): New function.
3134 (valid_array_size_p): Call it. Handle size as well as type.
3135 * c-common.h (valid_constant_size_p): New function.
3136 (enum cst_size_error): New type.
3137
ec2be203
DM
31382019-01-31 David Malcolm <dmalcolm@redhat.com>
3139
3140 PR c/89122
3141 * known-headers.cc (get_stdlib_header_for_name): Add
3142 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3143
8936f047
JJ
31442019-01-31 Jakub Jelinek <jakub@redhat.com>
3145
3146 PR libstdc++/88170
3147 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3148 a C cast in pp_c_flag_gnu_v3 mode.
3149
6a335b96
JJ
31502019-01-29 Jakub Jelinek <jakub@redhat.com>
3151
3152 PR c/86125
3153 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3154 builtin_structptr_types types even for C.
3155
2a06eba5
BE
31562019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3157
3158 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3159 when rhs is of array type correctly. Fix handling of nested structures.
3160 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3161 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3162 type casts within nested compound expressions.
3163
18a23298
JJ
31642019-01-22 Jakub Jelinek <jakub@redhat.com>
3165
3166 PR middle-end/88968
3167 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3168 variable after using BIT_FIELD_REF.
3169
420183d9
L
31702019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3171
3172 PR c/51628
3173 PR c/88664
3174 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3175 Remove the boolean argument.
3176 * c-warn.c (check_address_of_packed_member): Renamed to ...
3177 (check_address_or_pointer_of_packed_member): This. Also
3178 warn pointer conversion.
3179 (check_and_warn_address_of_packed_member): Renamed to ...
3180 (check_and_warn_address_or_pointer_of_packed_member): This.
3181 Also warn pointer conversion.
3182 (warn_for_address_or_pointer_of_packed_member): Remove the
3183 boolean argument. Don't check pointer conversion here.
3184
99063eee
RS
31852019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3186
3187 PR inline-asm/52813
3188 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3189
a30d0196
JJ
31902019-01-14 Jakub Jelinek <jakub@redhat.com>
3191
3192 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3193 and __cpp_nontype_template_parameter_auto. Add a comment that
3194 __cpp_template_auto is deprecated.
3195
2d91f79d
TH
31962019-01-14 Tom Honermann <tom@honermann.net>
3197
3198 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3199 * c-common.c (c_common_reswords): Add char8_t.
3200 (fix_string_type): Use char8_t for the type of u8 string literals.
3201 (c_common_get_alias_set): char8_t doesn't alias.
3202 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3203 C++.
3204 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3205 (keyword_begins_type_specifier): Add RID_CHAR8.
3206 * c-common.h (rid): Add RID_CHAR8.
3207 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3208 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3209 Define char8_type_node and char8_array_type_node.
3210 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3211 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3212 (c_cpp_builtins): Predefine __cpp_char8_t.
3213 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3214 CPP_UTF8STRING.
3215 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3216 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3217 targeting C++2a.
3218 * c.opt: Add the -fchar8_t command line option.
3219
23db6ced
MS
32202019-01-14 Martin Sebor <msebor@redhat.com>
3221
3222 PR target/88638
3223 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3224 and issue errors if it fails.
3225 * c-common.h (valid_format_string_type_p): Declare.
3226 * c-format.c (valid_stringptr_type_p): Rename...
3227 (valid_format_string_type_p): ...to this and make extern.
3228 (handle_format_arg_attribute): Adjust to new name.
3229 (check_format_string): Same.
3230
234c3818
L
32312019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3232
3233 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3234 Replace "may may" with "may" in warning message.
3235
d8fcab68
JJ
32362019-01-07 Jakub Jelinek <jakub@redhat.com>
3237
3238 PR c++/85052
3239 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3240 (c_build_vec_convert): Declare.
3241 * c-common.c (c_build_vec_convert): New function.
3242
29d24852
MS
32432019-01-04 Martin Sebor <msebor@redhat.com>
3244
3245 PR c/88546
3246 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3247 Handle C++ empty throw specification and C11 _Noreturn.
3248 (has_attribute): Also handle C11 _Noreturn.
3249
9069a4c9
MS
32502019-01-04 Martin Sebor <msebor@redhat.com>
3251
3252 PR c/88363
3253 * c-attribs.c (positional_argument): Also accept enumerated types.
3254
a5544970
JJ
32552019-01-01 Jakub Jelinek <jakub@redhat.com>
3256
3257 Update copyright years.
3258
da77eace
L
32592018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3260
3261 PR c/51628
3262 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3263 * c-warn.c (check_alignment_of_packed_member): New function.
3264 (check_address_of_packed_member): Likewise.
3265 (check_and_warn_address_of_packed_member): Likewise.
3266 (warn_for_address_or_pointer_of_packed_member): Likewise.
3267 * c.opt: Add -Wno-address-of-packed-member.
3268
573767d4
DM
32692018-12-20 David Malcolm <dmalcolm@redhat.com>
3270
3271 PR c++/87504
3272 * c-warn.c (get_outermost_macro_expansion): New function.
3273 (spelled_the_same_p): Use it to unwind the macro expansions, and
3274 compare the outermost macro in each nested expansion, rather than
3275 the innermost.
3276
a14feb3c
DM
32772018-12-19 David Malcolm <dmalcolm@redhat.com>
3278
3279 PR c++/87504
3280 * c-common.h (warn_tautological_cmp): Convert 1st param from
3281 location_t to const op_location_t &.
3282 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3283 when testing for INTEGER_CST.
3284 (warn_tautological_bitwise_comparison): Convert 1st param from
3285 location_t to const op_location_t &; use it to build a
3286 binary_op_rich_location, and use this.
3287 (spelled_the_same_p): New function.
3288 (warn_tautological_cmp): Convert 1st param from location_t to
3289 const op_location_t &. Warn for macro expansions if
3290 spelled_the_same_p. Use binary_op_rich_location.
3291
dfd7fdca
DM
32922018-12-19 David Malcolm <dmalcolm@redhat.com>
3293
3294 PR c++/43064
3295 PR c++/43486
3296 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3297 (verify_tree): Handle location wrappers.
3298 (c_common_truthvalue_conversion): Strip any location wrapper.
3299 Handle CONST_DECL.
3300 (fold_offsetof): Strip any location wrapper.
3301 (complete_array_type): Likewise for initial_value.
3302 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3303 index before checking for INTEGER_CST.
3304 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3305 print parentheses around location wrappers.
3306 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3307 before checking for INTEGER_CST.
3308 (warn_tautological_bitwise_comparison): Call
3309 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3310 before checking for INTEGER_CST.
3311 (readonly_error): Strip any location wrapper.
3312 (warn_array_subscript_with_type_char): Strip location wrappers
3313 before checking for INTEGER_CST. Use the location of the index if
3314 available.
3315
5c8b3702
JM
33162018-12-06 Jason Merrill <jason@redhat.com>
3317
3318 PR c++/88136 - -Wdeprecated-copy false positives
3319 * c.opt (Wdeprecated-copy-dtor): New.
3320 (Wdeprecated-copy): Move to -Wextra.
3321
673670da
MS
33222018-11-29 Martin Sebor <msebor@redhat.com>
3323
3324 PR c/88172
3325 PR testsuite/88208
3326 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3327 alignments to values less than the target requires.
3328 (has_attribute): For attribute aligned consider both the attribute
3329 and the alignment bits.
3330 * c-common.c (c_init_attributes): Optionally issue a warning for
3331 zero alignment.
3332
04864ec8
MS
33332018-11-28 Martin Sebor <msebor@redhat.com>
3334
3335 PR c/88065
3336 PR c/87297
3337 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3338 or destination is an error.
3339
ace83db0
JJ
33402018-11-28 Jakub Jelinek <jakub@redhat.com>
3341
3342 PR c++/88215
3343 * c-ubsan.c: Include langhooks.h.
3344 (ubsan_instrument_division): Change gcc_assert that main variants
3345 of op0 and op1 types are equal to gcc_checking_assert that the
3346 main variants are compatible types.
3347
da193a27
EB
33482018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3349
3350 * c-ada-spec.c: Include stringpool.h.
3351 (has_static_fields): Return false for incomplete types.
3352 (is_tagged_type): Likewise.
3353 (has_nontrivial_methods): Likewise.
3354 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3355 (struct overloaded_name_hash): New structure.
3356 (struct overloaded_name_hasher): Likewise.
3357 (overloaded_names): New global variable.
3358 (init_overloaded_names): New static function.
3359 (overloaded_name_p): New predicate.
3360 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3361 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3362 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3363 Remove always-true condition and dump forward types.
3364 (dump_ada_specs): Delete overloaded_names.
3365
98f08eb8
MS
33662018-11-20 Martin Sebor <msebor@redhat.com>
3367
3368 * c-attribs.c (type_for_vector_size): New function.
3369 (type_valid_for_vector_size): Same.
3370 (handle_vector_size_attribute): Move code to the functions above
3371 and call them.
3372 (validate_attribute, has_attribute): New functions.
3373 * c-common.h (has_attribute): Declare.
3374 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3375 * c-common.c (c_common_resword): Same.
3376
2674fa47
JM
33772018-11-16 Jason Merrill <jason@redhat.com>
3378
3379 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3380 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3381
258b3854
JJ
33822018-11-16 Jakub Jelinek <jakub@redhat.com>
3383
3384 PR middle-end/87854
3385 * c-common.c (fix_string_type): Reject string literals larger than
3386 TYPE_MAX_VALUE (ssizetype) bytes.
3387
1d249509
MS
33882018-11-15 Martin Sebor <msebor@redhat.com>
3389
3390 PR c++/87541
3391 PR c++/87542
3392 * c-attribs.c (positional_argument): New function.
3393 (handle_alloc_size_attribute): Use it and simplify.
3394 (handle_alloc_align_attribute): Same.
3395 (handle_assume_aligned_attribute): Same.
3396 (handle_nonnull_attribute): Same.
3397 * c-common.c (check_function_arguments): Pass fntype to
3398 check_function_format.
3399 * c-common.h (check_function_format): Add an argument.
3400 (PosArgFlags, positional_argument): Declare new type and function.
3401 * c-format.c (decode_format_attr): Add arguments.
3402 (check_format_string, get_constant): Same.
3403 (convert_format_name_to_system_name): Adjust.
3404
478dd60d
DM
34052018-11-15 David Malcolm <dmalcolm@redhat.com>
3406
3407 PR other/19165
3408 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3409
8cca0163
JJ
34102018-11-14 Jakub Jelinek <jakub@redhat.com>
3411
8ee09943
JJ
3412 P1236R1 - Signed integers are two's complement
3413 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3414 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3415 with in-range second operand well defined for -std=c++2a.
3416
8cca0163
JJ
3417 PR other/88007
3418 * c-common.c (parse_optimize_options): Allocate option string from
3419 opts_obstack rather than as GC memory. Move the allocation after
3420 warning for invalid option.
3421
620e594b
DM
34222018-11-13 David Malcolm <dmalcolm@redhat.com>
3423
3424 * c-common.c (c_get_substring_location): Update for renaming of
3425 get_source_location_for_substring to get_location_within_string.
3426 * c-lex.c: Replace "source_location" with "location_t".
3427 * c-opts.c: Likewise.
3428 * c-ppoutput.c: Likewise.
3429
f9731de3
MS
34302018-11-13 Martin Sebor <msebor@redhat.com>
3431
3432 PR middle-end/81824
3433 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3434 (handle_tls_model_attribute): Improve diagnostics.
3435
e4bd6d5e
JM
34362018-11-12 Jason Merrill <jason@redhat.com>
3437
a6bb6b07
JM
3438 * c-cppbuiltin.c (c_cpp_builtins): Define
3439 __cpp_impl_destroying_delete.
3440
e4bd6d5e
JM
3441 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3442 __cpp_conditional_explicit.
3443
79a2c428
MS
34442018-11-09 Martin Sebor <msebor@redhat.com>
3445
3446 PR middle-end/81824
3447 * c-attribs.c (handle_copy_attribute): New function.
3448
4c7bd361
MS
34492018-11-09 Martin Sebor <msebor@redhat.com>
3450
3451 PR c/87795
3452 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3453
28567c40
JJ
34542018-11-08 Jakub Jelinek <jakub@redhat.com>
3455
3456 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3457 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3458 enum omp_memory_order MEMORY_ORDER.
3459 (c_finish_omp_flush): Add MO argument.
3460 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3461 (c_finish_omp_for): Add FINAL_P argument.
3462 * c-omp.c: Include memmodel.h.
3463 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3464 OMP_TASKGROUP_CLAUSES to it.
3465 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3466 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3467 instead of OMP_ATOMIC_SEQ_CST.
3468 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3469 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3470 __atomic_thread_fence call with the given value.
3471 (check_omp_for_incr_expr): Formatting fixes.
3472 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3473 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3474 is not constant expression 1 or -1. Transform NE_EXPR loops
3475 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3476 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3477 loops too.
3478 (c_omp_split_clauses): Add support for combined
3479 #pragma omp parallel master and
3480 #pragma omp {,parallel }master taskloop{, simd} constructs.
3481 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3482 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3483 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3484 (c_omp_predetermined_sharing): Don't return
3485 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3486 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3487 PRAGMA_OMP_REQUIRES.
3488 * c-pragma.h (enum pragma_kind): Likewise.
3489 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3490 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3491
204839e7
DM
34922018-11-08 David Malcolm <dmalcolm@redhat.com>
3493
3494 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3495
d8010ee4
DM
34962018-11-08 David Malcolm <dmalcolm@redhat.com>
3497
3498 * c-format.c (local_cgraph_node_ptr_node): New variable.
3499 (gcc_dump_printf_char_table): Add entry for %C.
3500 (get_pointer_to_named_type): New function, taken from the handling
3501 code for "gimple *" from...
3502 (init_dynamic_diag_info): ...here. Add handling for
3503 "cgraph_node *".
3504 * c-format.h (T_CGRAPH_NODE): New.
3505
4be5c72c
JM
35062018-10-19 Jason Merrill <jason@redhat.com>
3507
3508 * c-cppbuiltin.c (c_cpp_builtins): Add
3509 __cpp_nontype_template_parameter_class.
3510
f3f6029d
NS
35112018-10-31 Nathan Sidwell <nathan@acm.org>
3512
ab5324fb
NS
3513 * c-opts.c (c_finish_options): Force command line macro
3514 location. Refactor to avoid repeating main debug hook.
3515 (push_command_line_include): Clarify comment.
3516
f3f6029d
NS
3517 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3518
91e3ec29
MS
35192018-10-30 Martin Sebor <msebor@redhat.com>
3520
3521 PR middle-end/87041
3522 * c-format.c (check_format_types): Avoid diagnosing null pointer
3523 arguments to printf-family of functions.
3524
b5ff4f5c
MP
35252018-10-30 Marek Polacek <polacek@redhat.com>
3526
3527 Implement P0892R2, explicit(bool).
3528 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3529
7e2de6df
DM
35302018-10-29 David Malcolm <dmalcolm@redhat.com>
3531
3532 * name-hint.h (name_hint::take_deferred): New member function.
3533
b2bf438c
DM
35342018-10-29 David Malcolm <dmalcolm@redhat.com>
3535
3536 PR c++/56856
3537 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3538 argument.
3539 (check_function_restrict): Rename param "argarray" to
3540 "unfolded_argarray", and make a copy named "argarray", calling
3541 fold_for_warn on each argument.
3542 (check_function_arguments): Add note about responsibility for
3543 folding the arguments.
3544
9f936c86
JM
35452018-10-17 Joseph Myers <joseph@codesourcery.com>
3546
3547 * c-common.c (flag_isoc2x): New variable.
3548 * c-common.h (clk_c): Update comment to reference C2X.
3549 (flag_isoc99, flag_isoc11): Update comments to reference future
3550 standard versions in general.
3551 (flag_isoc2x): Declare.
3552 * c-opts.c (set_std_c2x): New function.
3553 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3554 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3555 flag_isoc2x to 0.
3556 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3557
7a8a92c4
JM
35582018-10-17 Joseph Myers <joseph@codesourcery.com>
3559
3560 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3561 (std=iso9899:2018): Document C17 as published in 2018.
3562
4dc003ff
CL
35632018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3564
3565 PR c++/87364
3566 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3567
79371671
WW
35682018-10-11 Will Wray <wjwray@gmail.com>
3569
3570 PR c++/87364
3571 * c-pretty-print.h (pp_c_type_cast): Prototype.
3572 (pp_c_integer_constant): Likewise.
3573 * c-pretty-print.c (pp_c_type_cast): No longer static.
3574 (pp_c_integer_constant): Likewise.
3575 (pp_c_enumeration_constant): Fix loop termination when finding
3576 name of constant. No longer returns a value. Call
3577 pp_c_integer_constant.
3578 (c_pretty_printer::constant): Update for changes to
3579 pp_c_enumeration_constant.
3580
46c62690
JJ
35812018-10-11 Jakub Jelinek <jakub@redhat.com>
3582
3583 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3584 for no_unique_address.
3585
c24300ba
DM
35862018-10-09 David Malcolm <dmalcolm@redhat.com>
3587
3588 * c-common.c (c_option_controlling_cpp_error): Rename to...
3589 (c_option_controlling_cpp_diagnostic): ...this, and convert
3590 "reason" from int to enum.
3591 (c_cpp_error): Rename to...
3592 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3593 * c-common.h (c_cpp_error): Rename to...
3594 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3595 * c-opts.c (c_common_init_options): Update for renaming.
3596
8656dafa
RS
35972018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3598
3599 PR c/87286
3600 * c-common.c (vector_types_compatible_elements_p): Use
3601 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3602
8cff0652
VK
36032018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3604
3605 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3606 to generate constructor destructor priority warning.
3607 * c.opt (-Wprio-ctor-dtor): New option.
3608
bedf03a2
JM
36092018-10-01 Jason Merrill <jason@redhat.com>
3610
3611 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3612
6cc430c1
EB
36132018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3614
3615 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3616 (dump_ada_node): Add const keyword.
3617
87677ac7
ML
36182018-09-25 Martin Liska <mliska@suse.cz>
3619
3620 * c-common.c (c_common_truthvalue_conversion):
3621 Remove Pascal from documentation.
3622
518196cb
EB
36232018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3624
3625 * c-ada-spec.c: Include diagnostic.h.
3626 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3627
a599af84
MP
36282018-09-19 Marek Polacek <polacek@redhat.com>
3629
3630 * c.opt (Wclass-conversion): New.
3631
9c4a4b3c
DM
36322018-09-17 David Malcolm <dmalcolm@redhat.com>
3633
3634 * c-format.c (range_label_for_format_type_mismatch::get_text):
3635 Update for new param.
3636
c896ecfe
DM
36372018-09-17 David Malcolm <dmalcolm@redhat.com>
3638
3639 * c-format.c (format_warning_at_char): Update for introduction of
3640 format_string_diagnostic_t.
3641 (format_type_warning): Likewise.
3642
80c6d1f4
MJ
36432018-09-17 Martin Jambor <mjambor@suse.cz>
3644
3645 PR c/63886
3646 * c.opt (Wabsolute-value): New.
3647
6d900107
BE
36482018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3649
3650 * c-common.c (complete_flexible_array_elts): New helper function.
3651 * c-common.h (complete_flexible_array_elts): Declare.
3652
b5764229
BE
36532018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3654
3655 * c-common.c (braced_list_to_string): Remove eval parameter.
3656 Add some more checks. Always create zero-terminated STRING_CST.
3657 * c-common.h (braced_list_to_string): Adjust prototype.
3658
85204e23
DM
36592018-08-27 David Malcolm <dmalcolm@redhat.com>
3660
3661 PR 87091
3662 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3663 to a tri-state.
3664 (maybe_suggest_missing_token_insertion): Likewise.
3665 (maybe_add_include_fixit): Add param "override_location". If set,
3666 and source-printing is enabled, then override the rich_location's
3667 primary location with that of the insertion point for the fix-it
3668 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3669 * c-common.h (extern void maybe_add_include_fixit): Add bool
3670 param.
3671 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3672 for conversion of show_caret_p to a tri-state.
3673 * c-warn.c (warn_for_restrict): Likewise.
3674 * known-headers.cc
3675 (suggest_missing_header::~suggest_missing_header): Update call to
3676 maybe_add_include_fixit to suggest overriding the location, as it
3677 is for a note.
3678
3d78e008
ML
36792018-08-27 Martin Liska <mliska@suse.cz>
3680
3681 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3682 fndecl_built_in_p and remove check for FUNCTION_DECL if
3683 possible.
3d78e008
ML
3684 (check_builtin_function_arguments): Likewise.
3685 (reject_gcc_builtin): Likewise.
3686 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3687
b5be6d0c
MP
36882018-08-26 Marek Polacek <polacek@redhat.com>
3689
3690 PR c++/87029, Implement -Wredundant-move.
3691 * c.opt (Wredundant-move): New option.
3692
79ca9c35
MP
36932018-08-21 Marek Polacek <polacek@redhat.com>
3694
3695 PR c++/86981, Implement -Wpessimizing-move.
3696 * c.opt (Wpessimizing-move): New option.
3697
097f82ec
DM
36982018-08-20 David Malcolm <dmalcolm@redhat.com>
3699
3700 PR other/84889
3701 * c-attribs.c (common_handle_aligned_attribute): Add
3702 auto_diagnostic_group instance.
3703 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3704 * c-opts.c (c_common_post_options): Likewise.
3705 * c-warn.c (warn_logical_not_parentheses): Likewise.
3706 (warn_duplicated_cond_add_or_warn): Likewise.
3707 (warn_for_multistatement_macros): Likewise.
3708
3fb558b1
NS
37092018-08-20 Nathan Sidwell <nathan@acm.org>
3710
3711 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3712 access.
3713
800c0e98
NS
37142018-08-17 Nathan Sidwell <nathan@acm.org>
3715
3716 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3717 field.
3718 (laxy_hex_fp_value_count): Make unsigned.
3719 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3720 manipulate the macro.
3721 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3722 cpp_define_lazily.
3723
6f795a92
DM
37242018-08-17 David Malcolm <dmalcolm@redhat.com>
3725
3726 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3727 (gcc_dump_printf_length_specs): New.
3728 (gcc_dump_printf_flag_pairs): New.
3729 (gcc_dump_printf_flag_specs): New.
3730 (gcc_dump_printf_char_table): New.
3731 (format_types_orig): Add entry for "gcc_dump_printf".
3732 (init_dynamic_diag_info): Set up length_char_specs and
3733 conversion_specs for gcc_dump_printf_format_type.
3734 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3735
c5d725c0
NS
37362018-08-17 Nathan Sidwell <nathan@acm.org>
3737
10f04917
NS
3738 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3739
c5d725c0
NS
3740 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3741 * c-cppbuiltin.c: Likewise.
3742
c0c12356
ML
37432018-08-17 Martin Liska <mliska@suse.cz>
3744
3745 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3746 Ignore/Deprecated flag. Warning is done automatically for
3747 Deprecated flags.
c0c12356 3748
10fcc142
DM
37492018-08-16 David Malcolm <dmalcolm@redhat.com>
3750
3751 PR c++/70693
3752 * c-common.c (selftest::c_family_tests): Call
3753 selftest::c_indentation_c_tests.
3754 * c-common.h (selftest::c_indentation_c_tests): New decl.
3755 * c-indentation.c: Include "selftest.h".
3756 (next_tab_stop): Add "tab_width" param, rather than accessing
3757 cpp_opts.
3758 (get_visual_column): Likewise. Clarify comment. Bulletproof
3759 against reading past the end of the line.
3760 (get_first_nws_vis_column): Add "tab_width" param.
3761 (detect_intervening_unindent): Likewise.
3762 (should_warn_for_misleading_indentation): Read tab width from
3763 cpp_opts and pass around.
3764 (selftest::test_next_tab_stop): New test.
3765 (selftest::assert_get_visual_column_succeeds): New function.
3766 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3767 (selftest::assert_get_visual_column_fails): New function.
3768 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3769 (selftest::test_get_visual_column): New test.
3770 (selftest::c_indentation_c_tests): New function.
3771
3f6677f4
NS
37722018-08-16 Nathan Sidwell <nathan@acm.org>
3773
3774 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3775 (store_ada_macro): Likewise.
3776 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3777 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3778
96e6ae57
DM
37792018-08-15 David Malcolm <dmalcolm@redhat.com>
3780
3781 * c-format.c: Include "selftest-diagnostic.h" and
3782 "gcc-rich-location.h".
3783 (format_warning_at_char): Pass NULL for new label params of
3784 format_warning_va.
3785 (class indirection_suffix): New class.
3786 (class range_label_for_format_type_mismatch): New class.
3787 (format_type_warning): Move logic for generating "*" suffix to
3788 class indirection_suffix. Create "fmt_label" and "param_label"
3789 to show their types, and pass them to the
3790 format_warning_at_substring calls.
3791 (selftest::test_type_mismatch_range_labels): New test.
3792 (selftest::c_format_c_tests): Call it.
3793
23aa9f7c
MS
37942018-08-13 Martin Sebor <msebor@redhat.com>
3795
3796 PR tree-optimization/71625
3797 * c-common.c (braced_list_to_string): New function.
3798 * c-common.h (braced_list_to_string): Declare it.
3799
f10a9135
NS
38002018-08-08 Nathan Sidwell <nathan@acm.org>
3801
3802 * c-common.c (try_to_locate_new_include_inertion_point): Use
3803 linemap_included_from_linemap.
3804 * c-lex.c (fe_file_change): Use linemap_included_from.
3805 * c-ppoutput.c (pp_file_change): Likewise.
3806
8a45b051
MS
38072018-08-01 Martin Sebor <msebor@redhat.com>
3808
3809 PR tree-optimization/86650
ab20d992 3810 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3811 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3812 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3813 * c-format.h (T89_G): Update to be "gimple *" rather than
3814 "gcall *".
3815 (local_gcall_ptr_node): Rename...
3816 (local_gimple_ptr_node): ...to this.
3817
e540ccc0
DM
38182018-07-31 David Malcolm <dmalcolm@redhat.com>
3819
3820 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3821 table entries for gcc_diag_char_table, and the 'Z' entry from
3822 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3823 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3824 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3825 adding missing "Z" for this table. Remove erroneous "G" and "K"
3826 entries.
3827 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3828 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3829 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3830
425fc685
RE
38312018-07-31 Richard Earnshaw <rearnsha@arm.com>
3832
3833 * c-common.c (speculation_safe_resolve_call): New function.
3834 (speculation_safe_resolve_params): New function.
3835 (speculation_safe_resolve_return): New function.
3836 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3837 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3838 __HAVE_SPECULATION_SAFE_VALUE.
3839
181463c2
DM
38402018-07-20 David Malcolm <dmalcolm@redhat.com>
3841
3842 * c-common.c (c_cpp_error): Remove redundant "line_table"
3843 parameter from call to rich_location::set_range.
3844 (maybe_suggest_missing_token_insertion): Likewise.
3845
0d7f9065
MS
38462018-07-20 Martin Sebor <msebor@redhat.com>
3847
3848 PR middle-end/82063
ab20d992 3849 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3850
00abf86c
MS
38512018-07-20 Martin Sebor <msebor@redhat.com>
3852
3853 PR middle-end/82063
3854 * c-common.h (c_common_handle_option): Change function argument
3855 to HOST_WIDE_INT.
3856 * c-opts.c (c_common_init_options): Same.
3857 (c_common_handle_option): Same. Remove special handling of
3858 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3859 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3860 options to take a HOST_WIDE_INT argument and accept a byte-size
3861 suffix. Initialize.
3862 (-Wvla-larger-than): Same.
3863 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3864 (-Wno-vla-larger-than): Same.
3865
9b452033
JJ
38662018-07-12 Jakub Jelinek <jakub@redhat.com>
3867
3868 * c-attribs.c (c_common_attribute_table): Add
3869 "omp declare target implicit" attribute.
3870
cd0762f3
RB
38712018-07-12 Richard Biener <rguenther@suse.de>
3872
3873 PR c/86453
3874 * c-attribs.c (handle_packed_attribute): Do not build a variant
3875 type with TYPE_PACKED, instead ignore the attribute if we may
3876 not apply to the original type.
3877
0b27c3ed
JJ
38782018-07-10 Jakub Jelinek <jakub@redhat.com>
3879
3880 PR c++/86443
3881 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3882 to contain TREE_LIST for both the original class iterator and the
3883 "last" helper var.
3884
e730a0ef
EB
38852018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3886
3887 * c-ada-spec.c (to_ada_name): Remove index parameter.
3888 (pp_ada_tree_identifier): Likewise.
3889 (dump_ada_macros): Adjust call to to_ada_name.
3890 (struct overloaded_name_hash): Delete.
3891 (struct overloaded_name_hasher): Likewise.
3892 (overloaded_names): Likewise.
3893 (compute_overloading_index): Likewise.
3894 (dump_ada_decl_name): Do not call compute_overloading_index and
3895 adjust calls to pp_ada_tree_identifier.
3896 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3897 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3898 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3899 (dump_ada_enum_type): Remove type and display_convention parameters.
3900 Adjust calls to pp_ada_tree_identifier.
3901 (dump_ada_node): Likewise and for dump_ada_structure.
3902 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3903 and tidy up.
3904 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3905 syntax.
3906 (print_constructor): Adjust call to pp_ada_tree_identifier.
3907 (print_destructor): Likewise.
3908 (dump_ada_declaration): Switch to aspect syntax.
3909 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3910 parameter with nested parameter.
3911 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3912 (dump_ada_specs): Do not delete overloaded_names table.
3913
8de583fc
PB
39142018-07-06 Peter Bergner <bergner@linux.ibm.com>
3915
3916 PR target/86324
e730a0ef 3917 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3918 target hook.
3919
09cff37b
NS
39202018-07-05 Nathan Sidwell <nathan@acm.org>
3921
3922 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3923 NO_IMPLICIT_EXTERN_C.
3924
98086b2b
ML
39252018-06-28 Martin Liska <mliska@suse.cz>
3926
3927 * cppspec.c: Include opt-suggestions.h.
3928
ab20d992
JJ
39292018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3930 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3931 Cesar Philippidis <cesar@codesourcery.com>
3932
3933 * c-pragma.h (enum pragma_omp_clause): Add
3934 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3935 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3936
f41b7612
JJ
39372018-06-20 Jakub Jelinek <jakub@redhat.com>
3938
3939 PR c++/86210
3940 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3941 comment.
3942
4252ccd7
MS
39432018-06-18 Martin Sebor <msebor@redhat.com>
3944
3945 PR middle-end/85602
3946 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3947 nonstring.
3948
e197e64e
KV
39492018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3950
3951 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3952
34a7a230
JM
39532018-06-13 Jason Merrill <jason@redhat.com>
3954
5cef3733
JM
3955 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3956 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3957 handling.
3958
34a7a230
JM
3959 PR c++/86094 - wrong code with defaulted move ctor.
3960 * c-opts.c (c_common_post_options): Bump the current ABI version to
3961 13. Set warn_abi_version and flag_abi_compat_version to the current
3962 version rather than 0. Fix defaulting flag_abi_compat_version from
3963 warn_abi_version.
3964
bb0f14ae
MS
39652018-06-12 Martin Sebor <msebor@redhat.com>
3966
3967 PR c/85931
3968 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3969 sizeof source and destination yields the same value.
3970
3713f2e2
ML
39712018-06-12 Martin Liska <mliska@suse.cz>
3972
3973 * c.opt: Make MPX-related options as Deprecated.
3974
4af78ef8
DM
39752018-06-08 David Malcolm <dmalcolm@redhat.com>
3976
3977 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3978 rather than 0.
3979
31db0fe0
ML
39802018-06-08 Martin Liska <mliska@suse.cz>
3981
3982 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3983 for MPX (macros, related functions, fields in cgraph_node, ...).
3984 (handle_bnd_legacy): Likewise.
3985 (handle_bnd_instrument): Likewise.
3986 * c.opt: Likewise.
3987
fe16acf2
JJ
39882018-06-06 Jakub Jelinek <jakub@redhat.com>
3989
3990 PR c++/86068
3991 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3992 __cpp_transactional_memory to 201500 instead of 210500.
3993
4dbdb49b
JM
39942018-06-06 Jason Merrill <jason@redhat.com>
3995
3996 PR c++/85710 - ICE with -Wmemset-elt-size.
3997 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3998
f8ad043f
JM
39992018-06-01 Jason Merrill <jason@redhat.com>
4000
4001 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4002 201703.
4003
abc24d93
EB
40042018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4005
4006 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4007 declaration for a typedef independently of whether the declaration of
4008 the subtype is generated.
4009
d258f4aa
MS
40102018-05-31 Martin Sebor <msebor@redhat.com>
4011
4012 PR c/82063
4013 * c.opt (-Wno-alloc-size-larger-than): New option.
4014
b67b9225
DP
40152018-04-22 David Pagan <dave.pagan@oracle.com>
4016
4017 PR c/55976
4018 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4019 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4020 differentiate between default (no option), -Wreturn-type, and
4021 -Wno-return-type.
4022
04eb9c55
JM
40232018-05-29 Jason Merrill <jason@redhat.com>
4024
4025 * c.opt (Winit-list-lifetime): New flag.
4026
b0c31bc6
BE
40272018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4028
4029 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4030 splay_tree_delete_pointers.
4031
44284983
JJ
40322018-05-26 Jakub Jelinek <jakub@redhat.com>
4033
4034 PR bootstrap/85921
4035 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4036 noinline variable to workaround broken kernel headers.
4037
b46b715d
JM
40382018-05-18 Jason Merrill <jason@redhat.com>
4039
4040 * c.opt (Wdeprecated-copy): New flag.
4041
40659769
ML
40422018-05-17 Martin Liska <mliska@suse.cz>
4043
4044 * c-warn.c (overflow_warning): Do not use
4045 space in between 'G_' and '('.
4046
403962ea
JM
40472018-05-09 Jason Merrill <jason@redhat.com>
4048
4049 * c-common.c (valid_array_size_p): Add complain parameter.
4050 * c-common.h: ...which defaults to true.
4051
1c9ee609
JJ
40522018-05-11 Jakub Jelinek <jakub@redhat.com>
4053
4054 PR c/85696
4055 * c-omp.c (c_omp_predetermined_sharing): Return
4056 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4057
19916065
ML
40582018-05-11 Martin Liska <mliska@suse.cz>
4059
92a285c1 4060 PR sanitizer/85556
19916065
ML
4061 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4062 TREE_LIST values.
4063
79e7b1fe
JJ
40642018-05-10 Jakub Jelinek <jakub@redhat.com>
4065
4066 PR c++/85662
4067 * c-common.h (fold_offsetof_1): Removed.
4068 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4069 CTX argument defaulted to ERROR_MARK.
4070 * c-common.c (fold_offsetof_1): Renamed to ...
4071 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4072 argument, convert the pointer constant to TYPE and use size_binop
4073 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4074 a pointer type. Adjust recursive calls.
4075
86c12f76
EB
40762018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4077
4078 PR c++/85400
4079 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4080
ee336e84
NS
40812018-05-07 Nathan Sidwell <nathan@acm.org>
4082
4083 * c.opt (ffor-scope): Remove functionality, issue warning.
4084
6c072e21
NS
40852018-05-03 Nathan Sidwell <nathan@acm.org>
4086
4087 * c.opt (ffriend-injection): Remove functionality, issue warning.
4088
2cc7d3a7
DM
40892018-05-01 David Malcolm <dmalcolm@redhat.com>
4090
4091 PR c/84258
4092 * c-format.c (struct format_check_results): Add field
4093 "number_non_char".
4094 (check_format_info): Initialize it, and warn if encountered.
4095 (check_format_arg): Distinguish between wide char and
4096 everything else when detecting arrays of non-char.
4097
7761dfbe
DM
40982018-04-30 David Malcolm <dmalcolm@redhat.com>
4099
4100 * c-format.c (get_corrected_substring): Update for
4101 location_get_source_line returning a char_span. Use a char_span
4102 when handling the prefix of the correction.
4103 * c-indentation.c (get_visual_column): Update for
4104 location_get_source_line returning a char_span.
4105 (get_first_nws_vis_column): Likewise.
4106
62e98ef1
DM
41072018-03-29 David Malcolm <dmalcolm@redhat.com>
4108
4109 PR c++/84269
4110 * known-headers.cc (get_stdlib_header_for_name): Add various names
4111 from <assert.h>, <string.h>, and <memory.h>; add more names from
4112 <stdio.h>.
4113
a7dea617
JJ
41142018-03-27 Jakub Jelinek <jakub@redhat.com>
4115
4116 PR c++/85061
4117 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4118 get_base_address of the second operand is a VAR_P, rather than the
4119 operand itself, and use gcc_checking_assert instead of gcc_assert.
4120
889a3a30
MP
41212018-03-23 Marek Polacek <polacek@redhat.com>
4122
4123 PR c++/85045
4124 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4125 <case RDIV_EXPR>: Tweak condition.
4126
452154b9
EB
41272018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4128
4129 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4130
63ecb626
JJ
41312018-03-16 Jakub Jelinek <jakub@redhat.com>
4132
ce811fc4
JJ
4133 PR c/84909
4134 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4135 diagnostics.
4136
63ecb626
JJ
4137 PR c/84910
4138 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4139 diagnostics.
4140
a1295eec
RB
41412018-03-16 Richard Biener <rguenther@suse.de>
4142
4143 PR c/84873
4144 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4145 unshare the possibly folded expression.
4146
919674fb
RB
41472018-03-15 Richard Biener <rguenther@suse.de>
4148
4149 PR c/84873
4150 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4151
f99309b2
MS
41522018-03-13 Martin Sebor <msebor@redhat.com>
4153
4154 PR tree-optimization/84725
4155 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4156 with all three narrow character types, including their qualified forms.
4157
e9b9fa4c
MS
41582018-03-12 Martin Sebor <msebor@redhat.com>
4159
4160 PR tree-optimization/83456
ab20d992 4161 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4162 Restore checking of bounded built-in functions.
4163 (check_function_arguments): Also return the result
4164 of warn_for_restrict.
ab20d992
JJ
4165 * c-common.c (check_function_restrict): Return bool.
4166 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4167
0805d020
MP
41682018-03-02 Marek Polacek <polacek@redhat.com>
4169
4170 PR c++/84171
4171 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4172 is erroneous.
4173
ed2a2f08
TS
41742018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4175
4176 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4177 function".
4178
90abdde0
MP
41792018-03-01 Marek Polacek <polacek@redhat.com>
4180
4181 PR c++/84639
4182 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4183 alignment in computation.
4184
c6db43fa
EB
41852018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4186
4187 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4188 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4189
9e25c7ed
EB
41902018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4191
4192 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4193 (is_char_array): Take a type instead of a declaration.
4194 (dump_ada_array_type): Likewise.
4195 (is_simple_enum): Minor tweak.
4196 (dump_ada_enum_type): New function extracted from...
4197 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4198 <INTEGER_TYPE>: Remove unreachable code.
4199 <RECORD_TYPE>: Likewise. Minor tweaks.
4200 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4201 <ENUMERAL_TYPE>: New case.
4202 <RECORD_TYPE>: Factor out common code.
4203 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4204 Minor tweaks. Deal with enumeral types.
4205 (dump_ada_structure): Minor tweaks.
4206
09de3550
EB
42072018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4208
4209 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4210 address for incomplete structures.
4211 (dump_forward_type): Do not bail out for incomplete structures.
4212 (dump_ada_declaration): Do not special-case incomplete structures
4213 for subtypes. Dump them as null records for types.
4214
095d8d4b
EB
42152018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4216
4217 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4218 (is_char_array): Fix formatting.
4219 (dump_template_types): Likewise.
4220 (dump_generic_ada_node): Rename into...
4221 (dump_ada_node): ...this.
4222 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4223 incomplete structures and not for empty structures. Do not use it
4224 when forward declarations are needed.
4225 (dump_forward_type): New function.
4226 (dump_nested_types): Remove FORWARD parameter. Do not consider
4227 TREE_VISITED and do not generate a forward declaration. Only dump
4228 original nested types for nested declaration.
4229 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4230 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4231 <RECORD_TYPE>: Do not consider TREE_VISITED.
4232 (dump_ada_declaration): Use booleans and fix formatting throughout.
4233 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4234 Call dump_forward_type instead of dump_nested_types for a typedef.
4235 Remove superfluous check and adjust call to dump_nested_types.
4236 <POINTER_TYPE>: Call dump_forward_type and fall through.
4237 (dump_ada_struct_decl): Rename into...
4238 (dump_ada_structure): ...this. Do not special-case empty structures.
4239
d4cfd486
MS
42402018-02-27 Martin Sebor <msebor@redhat.com>
4241
4242 PR c++/83871
4243 * c.opt (-Wmissing-attributes): New option.
4244
b22dbd03
ML
42452018-02-21 Martin Liska <mliska@suse.cz>
4246
4247 * c.opt (Wcatch-value=): Add IntegerRange.
4248
883dfe2a
JM
42492018-02-15 Jason Merrill <jason@redhat.com>
4250
4251 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4252
0444aa9c
NS
42532018-02-09 Nathan Sidwell <nathan@acm.org>
4254
4255 PR c/84293
4256 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4257 arg.
4258 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4259 arg. Adjust.
4260
cea71f0a
MS
42612018-02-09 Martin Sebor <msebor@redhat.com>
4262
4263 PR lto/84212
4264 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4265 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4266 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4267 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4268 (-Wuninitialized): Same.
4269
8c8b7be5
EB
42702018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4271
4272 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4273 keyword for components.
4274
7c30b12a
PC
42752018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4276
4277 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4278
eece7fe5
JK
42792018-02-02 Julia Koval <julia.koval@intel.com>
4280
4281 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4282
7d07a93a
MP
42832018-01-29 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/83966
4286 * c-format.c (check_function_format): Check current_function_decl.
4287
53723269
JJ
42882018-01-27 Jakub Jelinek <jakub@redhat.com>
4289
4290 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4291 argument.
4292 (LAZY_HEX_FP_VALUES_CNT): Define.
4293 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4294 values rather than just 12.
4295 (builtin_define_with_hex_fp_value): Likewise.
4296
7365279f
BK
42972018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4298
92a285c1
ML
4299 PR other/70268
4300 * c.opt (-fmacro-prefix-map): New option.
4301 * c-opts.c (c_common_handle_option): Handle it.
4302 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4303 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4304
bb9869d5
DM
43052018-01-17 David Malcolm <dmalcolm@redhat.com>
4306
4307 PR c++/83814
4308 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4309
68dc87c3
EB
43102018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4311
4312 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4313 Skip 'f' and 'F' characters if it is true.
4314 (store_ada_macro): Minor tweak.
4315 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4316 <CPP_WSTRING>: Likewise.
4317 <CPP_STRING>: Output '&' in the buffer if not the first string.
4318 <CPP_NUMBER>: Adjust calls to dump_number.
4319
9a004410
DM
43202018-01-10 David Malcolm <dmalcolm@redhat.com>
4321
4322 PR c++/43486
4323 * c-common.c: Include "selftest.h".
4324 (get_atomic_generic_size): Perform the test for integral type
4325 before the range test for any integer constant, fixing indentation
4326 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4327 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4328 (selftest::test_fold_for_warn): New function.
4329 (selftest::c_common_c_tests): New function.
4330 (selftest::c_family_tests): Call it, and
4331 selftest::c_pretty_print_c_tests.
4332 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4333 * c-format.c (check_format_arg): Convert VAR_P check to a
4334 fold_for_warn.
4335 * c-pretty-print.c: Include "selftest.h".
4336 (pp_c_cast_expression): Don't print casts for location wrappers.
4337 (selftest::assert_c_pretty_printer_output): New function.
4338 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4339 (selftest::test_location_wrappers): New function.
4340 (selftest::c_pretty_print_c_tests): New function.
4341 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4342
5c0caeb3
RS
43432018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4344 Alan Hayward <alan.hayward@arm.com>
4345 David Sherwood <david.sherwood@arm.com>
4346
4347 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4348
73a699ae
RS
43492018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4350 Alan Hayward <alan.hayward@arm.com>
4351 David Sherwood <david.sherwood@arm.com>
4352
4353 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4354 as polynomial.
4355
928686b1
RS
43562018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4357 Alan Hayward <alan.hayward@arm.com>
4358 David Sherwood <david.sherwood@arm.com>
4359
4360 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4361 (convert_vector_to_array_for_subscript): Handle polynomial
4362 TYPE_VECTOR_SUBPARTS.
4363 (c_common_type_for_mode): Check valid_vector_subparts_p.
4364 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4365 VECTOR_CST_NELTS.
4366
85ec4feb
JJ
43672018-01-03 Jakub Jelinek <jakub@redhat.com>
4368
4369 Update copyright years.
4370
170a8bd6 43712017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4372 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4373
4374 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4375 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4376
ab20d992 43772017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4378
4379 PR debug/83527
4380 PR debug/83419
4381 * c-semantics.c (only_debug_stmts_after_p): New.
4382 (pop_stmt_list): Clear side effects in debug-only stmt list.
4383 Check for single nondebug stmt followed by debug stmts only.
4384
c12d20d4
AO
43852017-12-21 Alexandre Oliva <aoliva@redhat.com>
4386
4387 PR debug/83419
4388 * c-semantics.c (pop_stmt_list): Propagate side effects from
4389 single nondebug stmt to container list.
4390
01512446
JJ
43912017-12-19 Jakub Jelinek <jakub@redhat.com>
4392
4393 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4394 conditions with typical order conditions.
4395
82cfbd01
MP
43962017-12-18 Marek Polacek <polacek@redhat.com>
4397
4398 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4399 not in effect.
4400
99da11ec
MS
44012017-12-17 Martin Sebor <msebor@redhat.com>
4402
4403 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4404 an error for attribute warn_if_not_aligned.
4405
cc8bea0a
MS
44062017-12-16 Martin Sebor <msebor@redhat.com>
4407
4408 PR tree-optimization/78918
4409 * c-common.c (check_function_restrict): Avoid checking built-ins.
4410 * c.opt (-Wrestrict): Include in -Wall.
4411
4849deb1
JJ
44122017-12-15 Jakub Jelinek <jakub@redhat.com>
4413
4414 * c-attribs.c (c_common_attribute_table,
4415 c_common_format_attribute_table): Swap affects_type_identity
4416 and handler fields, adjust comments.
4417
c65e18d3
BE
44182017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4419
4420 * c.opt (Wcast-function-type): New warning option.
4421 * c-lex.c (get_fileinfo): Avoid warning.
4422 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4423
2004617a
QZ
44242017-12-14 Qing Zhao <qing.zhao@oracle.com>
4425
7365279f 4426 PR middle_end/79538
2004617a
QZ
4427 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4428 Adjust the size of buf1 and buf2, add a new buf to avoid
4429 format-overflow warning.
4430
ab20d992 44312017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4432
4433 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4434 subsequent statement list.
4435
5d9ae53d
MS
44362017-12-07 Martin Sebor <msebor@redhat.com>
4437
4438 PR c/81544
4439 PR c/81566
4440 * c-attribs.c (attr_aligned_exclusions): New array.
4441 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4442 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4443 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4444 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4445 (attr_warn_unused_result_exclusions): Same.
4446 (handle_hot_attribute, handle_cold_attribute): Simplify.
4447 (handle_const_attribute): Warn on function returning void.
4448 (handle_pure_attribute): Same.
4449 (handle_aligned_attribute): Diagnose conflicting attribute
4450 specifications.
4451 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4452
c79144f8
DM
44532017-12-06 David Malcolm <dmalcolm@redhat.com>
4454
4455 PR c/83236
4456 * c-common.c (selftest::c_family_tests): Call
4457 selftest::c_spellcheck_cc_tests.
4458 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4459 * c-spellcheck.cc: Include "selftest.h".
4460 (name_reserved_for_implementation_p): New function.
4461 (should_suggest_as_macro_p): New function.
4462 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4463 should_suggest_as_macro_p and call it.
4464 (selftest::test_name_reserved_for_implementation_p): New function.
4465 (selftest::c_spellcheck_cc_tests): New function.
4466 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4467
613bc14f
DM
44682017-12-06 David Malcolm <dmalcolm@redhat.com>
4469
4470 * c-spellcheck.cc: New file, taken from macro-handling code in
4471 spellcheck-tree.c.
4472 * c-spellcheck.h: New file, taken from macro-handling code in
4473 spellcheck-tree.h.
4474
e76c7157
JJ
44752017-12-01 Jakub Jelinek <jakub@redhat.com>
4476
4477 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4478 attribute.
4479 (handle_simd_attribute): Don't check for "cilk simd function"
4480 attribute. Reindent, formatting changes.
4481
b0da4034
JK
44822017-11-30 Julia Koval <julia.koval@intel.com>
4483
4484 * c-common.h (inv_list): Remove.
4485
058f0b9e
JJ
44862017-11-28 Jakub Jelinek <jakub@redhat.com>
4487
4488 PR sanitizer/81275
4489 * c-common.c (c_switch_covers_all_cases_p_1,
4490 c_switch_covers_all_cases_p): New functions.
4491 * c-common.h (c_switch_covers_all_cases_p): Declare.
4492
5e9d6aa4 44932017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4494 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4495
4496 * array-notation-common.c: Delete.
4497 * c-cilkplus.c: Ditto.
4498 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4499 * c-common.def (ARRAY_NOTATION_REF): Remove.
4500 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4501 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4502 c_validate_cilk_plus_loop, cilkplus_an_parts,
4503 cilk_ignorable_spawn_rhs_op,
4504 cilk_recognize_spawn): Remove.
4505 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4506 * c-omp.c: Remove CILK_SIMD check.
4507 * c-pragma.c: Ditto.
4508 * c-pragma.h: Remove CILK related pragmas.
4509 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4510 ARRAY_NOTATION_REF condition.
4511 (c_pretty_printer::expression): Ditto.
4512 * c.opt (fcilkplus): Remove.
4513 * cilk.c: Delete.
4514
1af4ebf5
MG
45152017-11-21 Marc Glisse <marc.glisse@inria.fr>
4516
4517 * c-pretty-print.c (pp_c_additive_expression,
4518 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4519
d44ed508
JJ
45202017-11-21 Jakub Jelinek <jakub@redhat.com>
4521
7d2f0f9b
JJ
4522 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4523
d44ed508
JJ
4524 PR c++/83059
4525 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4526 instead of tree_to_uhwi, formatting fix.
4527
26edace6
DM
45282017-11-20 David Malcolm <dmalcolm@redhat.com>
4529
4530 PR c/81404
4531 * known-headers.cc: New file, based on material from c/c-decl.c.
4532 (suggest_missing_header): Copied as-is.
4533 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4534 heavily edited to add C++ support. Add some knowledge about
4535 <limits.h>, <stdint.h>, and <wchar.h>.
4536 * known-headers.h: Likewise.
4537
6c7a259b
DM
45382017-11-20 David Malcolm <dmalcolm@redhat.com>
4539
4540 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4541 (lookup_name_fuzzy): Likewise. Convert return type from
4542 const char * to name_hint. Add location_t param.
4543 * name-hint.h: New header.
4544
f9c59f7e
JJ
45452017-11-19 Jakub Jelinek <jakub@redhat.com>
4546
4547 PR c/66618
4548 PR c/69960
4549 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4550
1e39313a
JM
45512017-11-16 Joseph Myers <joseph@codesourcery.com>
4552
4553 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4554 expected publication date of C17.
4555 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4556
3ca0dc60
JM
45572017-11-15 Joseph Myers <joseph@codesourcery.com>
4558
4559 PR c/81156
4560 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4561 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4562
025d57f0
MS
45632017-11-10 Martin Sebor <msebor@redhat.com>
4564
4565 PR c/81117
4566 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4567 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4568 * c.opt (-Wstringop-truncation): New option.
4569
1b6fa695
ML
45702017-11-06 Martin Liska <mliska@suse.cz>
4571
4572 PR middle-end/82404
4573 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4574 FE.
4575 * c.opt: Set default value of warn_return_type.
4576
64a5912c
DM
45772017-10-31 David Malcolm <dmalcolm@redhat.com>
4578
4579 * c-common.c (binary_op_error): Update for renaming of
4580 error_at_rich_loc.
4581 (c_parse_error): Likewise.
4582 * c-warn.c (warn_logical_not_parentheses): Likewise for
4583 renaming of inform_at_rich_loc.
4584 (warn_for_restrict): Likewise for renaming of
4585 warning_at_rich_loc_n.
4586
c76dc9c3
JM
45872017-10-30 Joseph Myers <joseph@codesourcery.com>
4588
4589 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4590 * c-opts.c (set_std_c17): New function.
4591 (c_common_init_options): Use gnu17 as default C version.
4592 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4593
ee5fd23a
MM
45942017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4595
4596 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4597 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4598 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4599 __FP_FAST_FMA<N>X.
4600
d1047465
MP
46012017-10-23 Marek Polacek <polacek@redhat.com>
4602
4603 PR c/82681
4604 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4605
9e878cf1
EB
46062017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4607
4608 * c-common.c (check_builtin_function_arguments): Also check arguments
4609 of __builtin_alloca_with_align_and_max.
4610
89b6abbb
DM
46112017-10-17 David Malcolm <dmalcolm@redhat.com>
4612
4613 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4614 rather than NULL to format_warning_va.
4615 (check_format_types): Likewise when calling format_type_warning.
4616 Remove code to extract source_ranges and source_range * in favor
4617 of just a location_t.
4618 (format_type_warning): Convert source_range * param to a
4619 location_t.
4620
39382c09
JJ
46212017-10-13 Jakub Jelinek <jakub@redhat.com>
4622
4623 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4624 [LR]SHIFT_EXPR.
4625
62e1c678
DM
46262017-10-12 David Malcolm <dmalcolm@redhat.com>
4627
4628 * c-common.c (enum missing_token_insertion_kind): New enum.
4629 (get_missing_token_insertion_kind): New function.
4630 (maybe_suggest_missing_token_insertion): New function.
4631 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4632
b90c9338
NS
46332017-10-11 Nathan Sidwell <nathan@acm.org>
4634
4635 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4636 (c_common_handle_option): Update incpath_kind names.
4637
3a266bcd
ML
46382017-10-11 Martin Liska <mliska@suse.cz>
4639
4640 PR sanitizer/82490
4641 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4642 Wattributes warning.
4643
8e6cdc90
RS
46442017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4645
4646 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4647 operating on trees as wide_ints.
4648 * c-common.c (pointer_int_sum): Likewise.
4649 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4650 * c-warn.c (match_case_to_enum_1): Likewise.
4651 (c_do_switch_warnings): Likewise.
4652 (maybe_warn_shift_overflow): Likewise.
4653
802b38c9
JJ
46542017-10-10 Jakub Jelinek <jakub@redhat.com>
4655
4656 PR c/82437
4657 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4658 instead of wide_int::from.
4659
4e34b338
JJ
46602017-10-06 Jakub Jelinek <jakub@redhat.com>
4661
4662 PR c/82437
4663 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4664 using to_widest use wide_int with the larger of the two precisions.
4665
4bc4b2b4
BE
46662017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4667
4668 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4669 functions.
4670
a1488398
RS
46712017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4672
4673 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4674 when combining the original unconverted comparison operands.
4675
01c9fb68
JJ
46762017-09-29 Jakub Jelinek <jakub@redhat.com>
4677
4678 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4679 attribute.
4680
6e3e8419
EB
46812017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4682
4683 * c-ada-spec.c (to_ada_name): Add index parameter.
4684 (pp_ada_tree_identifier): Likewise.
4685 (dump_ada_macros): Adjust call to to_ada_name.
4686 (struct overloaded_name_hash): New type.
4687 (struct overloaded_name_hasher): Likewise.
4688 (overloaded_names): New hash table.
4689 (compute_overloading_index): New function.
4690 (dump_ada_decl_name): Call it and pass the result to
4691 pp_ada_tree_identifier.
4692 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4693 (dump_ada_function_declaration): Likewise.
4694 (dump_generic_ada_node): Likewise.
4695 (print_constructor): Likewise.
4696 (print_destructor): Likewise.
4697 (dump_ada_specs): Delete overloaded_names table.
4698
79310774
EB
46992017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4700
4701 * c-ada-spec.c (max_ada_macros): Move around.
4702 (store_ada_macro_index): Likewise.
4703 (source_file): Rename into...
4704 (macro_source_file): ...this.
4705 (count_ada_macro): Move around.
4706 (store_ada_macro): Likewise.
4707 (compare_macro): Likewise.
4708 (print_ada_macros): Merge in...
4709 (dump_ada_macros): ...this.
4710 (source_file_base): Rename into...
4711 (current_source_file): ...this.
4712 (print_comment): Move around.
4713 (dump_ada_nodes): Call dump_ada_declaration directly.
4714 (struct with): Change type of limited field to bool.
4715 (append_withs): Change type of limited_access parameter to bool.
4716 (pp_ada_tree_identifie): Likewise.
4717 (dump_ada_decl_nam): Likewise.
4718 (dump_generic_ada_node): Likewise. Do not print the return type.
4719 (to_ada_name): Change type of space_found parameter to bool.
4720 (dump_ada_function_declaration): Return void and change type of
4721 parameters to bool. Also print the return type for a function.
4722 (print_ada_methods): Rename into...
4723 (dump_ada_methods): ...this.
4724 (print_ada_declaration): Rename into ...
4725 (dump_ada_declaration): ...this. Do not print the return type.
4726 (print_ada_struct_decl): Rename into...
4727 (dump_ada_struct_decl): ...this.
4728
7d386d45
JJ
47292017-09-29 Jakub Jelinek <jakub@redhat.com>
4730
4731 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4732 rather than DECL_INITIAL.
4733 (common_handle_aligned_attribute): Likewise.
4734
ab20d992 47352017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4736
4737 * c.opt (gen-decls): Add RejectNegative.
4738
026a79f7
AS
47392017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4740 Jakub Jelinek <jakub@redhat.com>
4741
4742 Add support for -std=c++2a.
4743 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4744 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4745 * c-opts.c (set_std_cxx2a): New.
4746 (c_common_handle_option): Set options when -std=c++2a is enabled.
4747 (c_common_post_options): Adjust comments.
4748 (set_std_cxx14, set_std_cxx17): Likewise.
4749
4a8ca690
EB
47502017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4751
4752 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4753 message for non-uniform endianness and issue a warning in C++.
4754
7b936140
JJ
47552017-09-15 Jakub Jelinek <jakub@redhat.com>
4756
4757 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4758 (Wc++17-compat): Change from undocumented alias to option.
4759 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4760 change C++1z to C++17 in description.
4761 (std=c++1z, std=gnu++1z): Change from option to undocumented
4762 deprecated alias.
4763 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4764 Adjust description.
4765 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4766 * c-opts.c (set_std_cxx1z): Rename to ...
4767 (set_std_cxx17): ... this.
4768 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4769 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4770 caller.
7b936140
JJ
4771 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4772 comments.
4773
12263f13
L
47742017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4775
4776 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4777 function alignment if warn_if_not_aligned_p is true.
4778
6836632e
NS
47792017-09-12 Nathan Sidwell <nathan@acm.org>
4780
4781 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4782 resort_sorted_fields): Move to c/c-decl.c.
4783 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4784 (struct sorted_fields_type): Move to c/c-lang.h.
4785
019bf9ad
JW
47862017-09-09 Jonathan Wakely <jwakely@redhat.com>
4787
4788 PR c++/81852
4789 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4790
bc7fe952
MP
47912017-09-04 Marek Polacek <polacek@redhat.com>
4792
4793 PR c/81783
4794 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4795 (warn_tautological_cmp): Call it.
4796
ab20d992 47972017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4798
4799 * c-opts.c (c_common_finish): Write dependency information even if
4800 there are errors.
4801
d2e05fcb
JJ
48022017-09-01 Jakub Jelinek <jakub@redhat.com>
4803
4804 PR c/81887
4805 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4806 (omp_pragmas_simd): ... here.
4807 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4808 create new clauses list containing just simd clause.
4809
18e2a8b8
RS
48102017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4811 Alan Hayward <alan.hayward@arm.com>
4812 David Sherwood <david.sherwood@arm.com>
4813
4814 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4815 into scalar_mode_supported_p call.
4816 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4817
16d22000
RS
48182017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4819 Alan Hayward <alan.hayward@arm.com>
4820 David Sherwood <david.sherwood@arm.com>
4821
4822 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4823 for the mode iterator.
4824
b397965c
RS
48252017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4826 Alan Hayward <alan.hayward@arm.com>
4827 David Sherwood <david.sherwood@arm.com>
4828
4829 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4830 * c-common.c (c_build_vec_perm_expr): Likewise.
4831
357b7604
RS
48322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4833 Alan Hayward <alan.hayward@arm.com>
4834 David Sherwood <david.sherwood@arm.com>
4835
4836 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4837
e05c94ba
RS
48382017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4839 Alan Hayward <alan.hayward@arm.com>
4840 David Sherwood <david.sherwood@arm.com>
4841
4842 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4843 before calling targetm.addr_space.valid_pointer_mode.
4844
5c20c4af
RS
48452017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4846 Alan Hayward <alan.hayward@arm.com>
4847 David Sherwood <david.sherwood@arm.com>
4848
4849 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4850
c94843d2 48512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4852 Alan Hayward <alan.hayward@arm.com>
4853 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4854
4855 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4856 iterators.
4857 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4858
4e10a5a7
RS
48592017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4860 Alan Hayward <alan.hayward@arm.com>
4861 David Sherwood <david.sherwood@arm.com>
4862
4863 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4864 case statements.
4865
130fcab0
ML
48662017-08-29 Martin Liska <mliska@suse.cz>
4867
4868 PR other/39851
4869 * c-common.c (parse_optimize_options): Add argument to function
4870 call.
4871 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4872
14e18d71
DM
48732017-08-24 David Malcolm <dmalcolm@redhat.com>
4874
4875 * c-lex.c (interpret_float): Use token location
4876 when building an EXCESS_PRECISION_EXPR.
4877
2f687306
DM
48782017-08-21 David Malcolm <dmalcolm@redhat.com>
4879
4880 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4881 it to check_function_format.
4882 * c-common.h (check_function_arguments): Add vec<location_t> *
4883 param.
4884 (check_function_format): Likewise.
4885 * c-format.c (struct format_check_context): Add field "arglocs".
4886 (check_function_format): Add param "arglocs"; pass it to
4887 check_format_info.
ab20d992 4888 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4889 new field of format_ctx.
4890 (check_format_arg): Pass format_ctx->arglocs to new param of
4891 check_format_info_main.
4892 (class argument_parser): New field "arglocs".
4893 (argument_parser::argument_parser): Add "arglocs_" param and use
4894 it to initialize new field.
4895 (argument_parser::check_argument_type): Pass new arglocs field to
4896 check_format_types.
4897 (check_format_info_main): Add param "arglocs", and use it when
4898 constructing arg_parser.
4899 (check_format_types): Add param "arglocs"; use it if non-NULL when
4900 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4901
00aa1fa2
L
49022017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4903
4904 PR c/53037
4905 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4906 (c_common_attribute_table): Add warn_if_not_aligned.
4907 (handle_aligned_attribute): Renamed to ...
4908 (common_handle_aligned_attribute): Remove argument, name, and add
4909 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4910 (handle_aligned_attribute): New.
4911 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4912
27be025d
MS
49132017-08-14 Martin Sebor <msebor@redhat.com>
4914
4915 PR c/81117
4916 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4917 (handle_nonstring_attribute): New function.
4918
da67acb9
MS
49192017-08-14 Martin Sebor <msebor@redhat.com>
4920
4921 PR c/81117
4922 * c-format.h (T89_G): New macro.
4923 * c-format.c (local_gcall_ptr_node): New variable.
4924 (init_dynamic_diag_info): Initialize it.
4925
a8b522b4
ML
49262017-08-11 Martin Liska <mliska@suse.cz>
4927
4928 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4929 TARGET_SUPPORTS_ALIASES.
4930
32129a17
DM
49312017-08-10 David Malcolm <dmalcolm@redhat.com>
4932
4933 * c-common.c (c_parse_error): Add rich_location * param, using it
4934 rather implicitly using input_location.
4935 * c-common.h (c_parse_error): Add rich_location * param.
4936
30af3a2b
MP
49372017-08-09 Marek Polacek <polacek@redhat.com>
4938
4939 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4940 (c_common_truthvalue_conversion): Likewise.
4941 * c-omp.c (c_finish_omp_atomic): Likewise.
4942 * c-common.h (build_binary_op): Update declaration.
4943
314e6352
ML
49442017-08-08 Martin Liska <mliska@suse.cz>
4945
4946 * c-ada-spec.c: Include header files.
4947 * c-ubsan.c: Likewise.
4948 * c-warn.c: Likewise.
4949
56b5041c
JJ
49502017-08-07 Jakub Jelinek <jakub@redhat.com>
4951
4952 PR c/69389
4953 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4954
db440138
EB
49552017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4956
4957 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4958 (print_ada_methods): Likewise.
4959 (print_ada_declaration): Likewise.
4960
577eec56
ML
49612017-08-07 Martin Liska <mliska@suse.cz>
4962
4963 * array-notation-common.c: Add new includes.
4964 * c-format.c( handle_format_attribute): Canonicalize a format
4965 function name.
4966 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4967 attribute.
4968 * c-pretty-print.c: Add new include.
4969
b854df3c
EB
49702017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4971
4972 * c-ada-spec.c (has_static_fields): Look only into variables.
4973 (print_constructor): Add TYPE parameter and use it for the name.
4974 (print_destructor): Likewise.
4975 (print_ada_declaration): Adjust to new constructor/destructor names.
4976 Adjust calls to print_constructor and print_destructor.
4977 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4978 Look only into variables in the final loop.
4979
9f2cb25e
EB
49802017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4981
4982 * c-ada-spec.c (has_static_fields): Look only into fields.
4983 (dump_generic_ada_node): Small tweak.
4984 (dump_nested_types): Look only into fields.
4985 (print_ada_declaration): Look only into methods. Small tweak.
4986 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4987
f4bcd9eb
EB
49882017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4989
4990 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4991 (dump_ada_function_declaration): Likewise.
4992 (dump_generic_ada_node): Likewise.
4993 (print_ada_declaration): Add support for const-qualified variables.
4994
f34ebeb2
ML
49952017-07-31 Martin Liska <mliska@suse.cz>
4996
4997 PR sanitize/81530
4998 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4999 Guard condition with flag_sanitize_p also with current_function_decl
5000 non-null equality.
5001 (ubsan_maybe_instrument_reference_or_call): Likewise.
5002
218e5d04
UB
50032017-07-30 Uros Bizjak <ubizjak@gmail.com>
5004
5005 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5006
942047f2
EB
50072017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5008
5009 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5010 for enumeral types.
5011 (print_ada_declaration): Add missing guard for record types.
5012
a40ff0ae
JJ
50132017-07-27 Jakub Jelinek <jakub@redhat.com>
5014
5015 PR c/45784
5016 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5017 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5018 new COMPOUND_EXPRs around the rhs of the comparison.
5019
06bd22f6
MP
50202017-07-27 Marek Polacek <polacek@redhat.com>
5021
5022 PR c/81417
5023 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5024 the types.
5025
036ea399
JJ
50262017-07-27 Jakub Jelinek <jakub@redhat.com>
5027
5028 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5029 (handle_noipa_attribute): New function.
5030
417ca011
TD
50312017-07-07 Torsten Duwe <duwe@suse.de>
5032
5033 * c-attribs.c (c_common_attribute_table): Add entry for
5034 "patchable_function_entry".
5035
5aaa8fb4
NS
50362017-07-20 Nathan Sidwell <nathan@acm.org>
5037
5038 Remove TYPE_METHODS.
5039 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5040 dump_ada_template, print_ada_methods,
5041 print_ada_declaration): Member fns are on TYPE_FIELDS.
5042
ff22eb12
NS
50432017-07-18 Nathan Sidwell <nathan@acm.org>
5044
5045 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5046
eea77d1f
DM
50472017-07-14 David Malcolm <dmalcolm@redhat.com>
5048
5049 * c-common.c (try_to_locate_new_include_insertion_point): New
5050 function.
5051 (per_file_includes_t): New typedef.
5052 (added_includes_t): New typedef.
5053 (added_includes): New variable.
5054 (maybe_add_include_fixit): New function.
5055 * c-common.h (maybe_add_include_fixit): New decl.
5056
281ac396
MS
50572017-07-10 Martin Sebor <msebor@redhat.com>
5058
5059 PR other/81345
5060 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5061
b6f43128
DM
50622017-07-06 David Malcolm <dmalcolm@redhat.com>
5063
5064 * c-common.c (selftest::c_family_tests): New.
5065 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5066 (selftest::c_family_tests): New decl.
5067
efbf55b0
MP
50682017-07-04 Marek Polacek <polacek@redhat.com>
5069
5070 PR c/81231
5071 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5072 types.
5073
6c86bd88
MP
50742017-07-04 Marek Polacek <polacek@redhat.com>
5075
5076 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5077
17a7218b
ML
50782017-06-28 Martin Liska <mliska@suse.cz>
5079
5080 PR ipa/81128
5081 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5082 to a function declaration.
5083
63010089
ML
50842017-06-28 Martin Liska <mliska@suse.cz>
5085
5086 PR driver/79659
5087 * c.opt: Add IntegerRange to various options.
5088
3e2becc4
MP
50892017-06-26 Marek Polacek <polacek@redhat.com>
5090
5091 PR c/80116
5092 * c-common.h (warn_for_multistatement_macros): Declare.
5093 * c-warn.c: Include "c-family/c-indentation.h".
5094 (warn_for_multistatement_macros): New function.
5095 * c.opt (Wmultistatement-macros): New option.
5096 * c-indentation.c (guard_tinfo_to_string): No longer static.
5097 Change the parameter type to "enum rid". Handle RID_SWITCH.
5098 * c-indentation.h (guard_tinfo_to_string): Declare.
5099
2db9b7cd
MG
51002017-06-23 Marc Glisse <marc.glisse@inria.fr>
5101
5102 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5103
c3684b7b
MS
51042017-06-15 Martin Sebor <msebor@redhat.com>
5105
5106 PR c++/80560
5107 * c.opt (-Wclass-memaccess): New option.
5108
e72c4afd
BK
51092017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5110
5111 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5112
8a516588
MP
51132017-06-13 Marek Polacek <polacek@redhat.com>
5114
5115 PR objc/80949
5116 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5117 branches is null.
5118
45b2222a
ML
51192017-06-13 Martin Liska <mliska@suse.cz>
5120
5121 PR sanitize/78204
5122 * c-attribs.c (add_no_sanitize_value): New function.
5123 (handle_no_sanitize_attribute): Likewise.
5124 (handle_no_sanitize_address_attribute): Use the function.
5125 (handle_no_sanitize_thread_attribute): New function.
5126 (handle_no_address_safety_analysis_attribute): Use
5127 add_no_sanitize_value.
5128 (handle_no_sanitize_undefined_attribute): Likewise.
5129 * c-common.h: Declare new functions.
5130 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5131 (ubsan_instrument_shift): Likewise.
5132 (ubsan_instrument_bounds): Likewise.
5133 (ubsan_maybe_instrument_array_ref): Likewise.
5134 (ubsan_maybe_instrument_reference_or_call): Likewise.
5135
a01f151f
JM
51362017-06-11 Jason Merrill <jason@redhat.com>
5137
5138 * c-ada-spec.c, c-pragma.c: Use id_equal.
5139
3de4ac6d
MP
51402017-06-04 Marek Polacek <polacek@redhat.com>
5141
5142 PR c/80919
5143 * c-format.c (matching_type_p): Return false if any of the types
5144 requires structural equality.
5145
2474f48f
MS
51462017-06-02 Martin Sebor <msebor@redhat.com>
5147
5148 PR c/80892
5149 * c-warn.c (conversion_warning): Use -Wconversion for integer
5150 conversion and -Wfloat-conversion for floating one.
5151
40ffd95f
BE
51522017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5153
5154 * c.opt (Wsizeof-pointer-div): New warning option.
5155
3fa4634c
VR
51562017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5157
5158 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5159 (Wcatch-value=1): Enable by -Wall.
5160
f012c8ef
DM
51612017-05-30 David Malcolm <dmalcolm@redhat.com>
5162
5163 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5164 format_chars.
5165 * c.opt (fdiagnostics-show-template-tree): New option.
5166 (felide-type): New option.
5167
63dbcd13
VR
51682017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5169
5170 * c.opt (Wcatch-value=): New C++ warning flag.
5171
be136b5c
NS
51722017-05-24 Nathan Sidwell <nathan@acm.org>
5173
5174 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5175 const casts to avoid warning.
5176
3cd211af
MS
51772017-05-24 Martin Sebor <msebor@redhat.com>
5178
5179 PR c/80731
5180 * c-common.h (unsafe_conversion_p): Add a function argument.
5181 * c-common.c (unsafe_conversion_p): Same.
5182 Add type names and values to diagnostics.
5183 (scalar_to_vector): Adjust.
5184 * c-warn.c (constant_expression_error): Add a function argument.
5185 Add type names and values to diagnostics.
5186 (conversion_warning): Add a function argument.
5187 Add type names and values to diagnostics.
5188 (warnings_for_convert_and_check): Same.
5189
1ff7be5a
JM
51902017-05-19 Jason Merrill <jason@redhat.com>
5191
5192 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5193 enumerators.
5194
ff502317
BE
51952017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5196
5197 * c-format.c (locus): Move out of function scope,
5198 add GTY attribute.
5199
2a8a8d7b
NS
52002017-05-19 Nathan Sidwell <nathan@acm.org>
5201
5202 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5203 (c_common_parse_file): Remove class dump handling.
5204 (get_dump_info): Likewise.
5205
39aac208
RB
52062017-05-19 Richard Biener <rguenther@suse.de>
5207
5208 PR c++/80593
5209 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5210 to alias-set zero memory.
5211
6ecd2339
BE
52122017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5213
5214 * c-format.c (local_tree_type_node): Add GTY attribute.
5215
6574d78e
MP
52162017-05-18 Marek Polacek <polacek@redhat.com>
5217
5218 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5219 (c_common_fixed_point_type_for_size): Likewise.
5220 (c_common_type_for_mode): Likewise.
5221 (shorten_compare): Likewise.
5222 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5223 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5224
e3455240
MP
52252017-05-18 Marek Polacek <polacek@redhat.com>
5226
5227 * c-common.c (self_promoting_args_p): Change the return type to bool.
5228 Use false/true instead of 0/1.
5229 * c-common.h (self_promoting_args_p): Update.
5230
3fa8871b
MP
52312017-05-17 Marek Polacek <polacek@redhat.com>
5232
5233 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5234 * c-warn.c: Likewise.
5235
b42cc3ca
VV
52362017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5237
5238 Implement new C++ intrinsics __is_assignable and __is_constructible.
5239 * c-common.c (__is_assignable, __is_constructible): New.
5240 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5241
1a817418
ML
52422017-05-17 Martin Liska <mliska@suse.cz>
5243
5244 * c-common.h: Introduce dump_flags_t type and
5245 use it instead of int type.
5246 * c-gimplify.c (c_genericize): Likewise.
5247 * c-opts.c: Likewise.
5248
b2fa0a8b
MP
52492017-05-17 Marek Polacek <polacek@redhat.com>
5250
5251 * c-common.c (c_save_expr): Remove.
5252 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5253 * c-common.h (c_save_expr): Remove declaration.
5254
31c2d57d
VR
52552017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5256
5257 PR c/35441
5258 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5259 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5260 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5261 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5262 RDIV_EXPR.
5263 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5264
684f84de
MP
52652017-05-09 Marek Polacek <polacek@redhat.com>
5266
5267 PR c/80525
5268 * c-warn.c (unwrap_c_maybe_const): New.
5269 (warn_logical_operator): Call it.
5270
641da50a
NS
52712017-05-09 Nathan Sidwell <nathan@acm.org>
5272
5273 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5274 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5275
631238ac
MS
52762017-05-08 Martin Sebor <msebor@redhat.com>
5277
5278 PR translation/80280
5279 * c-format.h (struct format_flag_spec): Add new member.
5280 (T89_T): New macro.
5281 * c-format.c (local_tree_type_node): New global.
5282 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5283 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5284 (strfmon_flag_specs): Likewise.
5285 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5286 with distinct quoting properties.
5287 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5288 (flag_chars_t::validate): Add argument and handle bad quoting.
5289 (check_format_info_main): Handle quoting problems.
5290 (init_dynamic_diag_info): Simplify.
5291
49f0c04c
JM
52922017-05-08 Jason Merrill <jason@redhat.com>
5293
5294 * c-opts.c (c_common_post_options): Update defaults for
5295 flag_abi_version and flag_abi_compat_version.
5296
56d35585
DM
52972017-05-05 David Malcolm <dmalcolm@redhat.com>
5298
5299 * c-common.c (c_cpp_error): Replace report_diagnostic
5300 with diagnostic_report_diagnostic.
5301
0f2c4a8f
MS
53022017-05-04 Martin Sebor <msebor@redhat.com>
5303
5304 PR translation/80280
5305 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5306 (handle_weakref_attribute): Same.
5307
6fe63fb4
NS
53082017-05-03 Nathan Sidwell <nathan@acm.org>
5309
5310 Canonicalize canonical type hashing
5311 * c-common.c (complete_array_type): Use type_hash_canon.
5312
815d9cc6
XR
53132017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5314
92a285c1 5315 PR c++/80038
815d9cc6
XR
5316 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5317 prototype.
5318 (cilk_install_body_pedigree_operations): Likewise.
5319 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5320 detatched.
5321 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5322 (cilk_install_body_pedigree_operations): Likewise.
5323 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5324 unwrapping.
5325
f8a36447
JJ
53262017-04-27 Jakub Jelinek <jakub@redhat.com>
5327
5328 PR c++/80534
5329 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5330 flag on non-aggregate element types.
5331
7c145456
BE
53322017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5333
5334 * c-common.c (c_type_hasher, type_hash_table): Remove.
5335 (c_common_get_alias_set): Remove unreachable code.
5336 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5337
c3cbcd45
VR
53382017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5339
5340 * c.opt (Wextra-semi): New C++ warning flag.
5341
8a59d466
JJ
53422017-04-20 Jakub Jelinek <jakub@redhat.com>
5343
5344 PR middle-end/80423
5345 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5346
8487c9a5
JJ
53472017-04-18 Jakub Jelinek <jakub@redhat.com>
5348
5349 PR middle-end/79788
5350 PR middle-end/80375
5351 * c-common.c (c_common_type_for_mode): Don't handle
5352 widest_*_literal_type_node here.
5353 c_common_signed_or_unsigned_type): Likewise.
5354 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5355 to *intTI_type_node or *intDI_type_node depending on whether
5356 TImode is supported by the target or not.
5357
3ee0fb02
ML
53582017-04-10 Martin Liska <mliska@suse.cz>
5359
5360 PR sanitizer/80350
5361 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5362 doing an UBSAN check.
5363
5764ee3c
JW
53642017-04-03 Jonathan Wakely <jwakely@redhat.com>
5365
5366 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5367
6f3af356
JJ
53682017-03-31 Jakub Jelinek <jakub@redhat.com>
5369
5370 PR c++/79572
5371 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5372 tree *.
5373 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5374 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5375 REFERENCE_TYPE.
5376
f6a7a9d5
DM
53772017-03-31 David Malcolm <dmalcolm@redhat.com>
5378
5379 PR documentation/78732
5380 * c.opt (Wendif-labels): Fix description to refer to
5381 #else rather than #elif.
5382
af88f557
JJ
53832017-03-31 Jakub Jelinek <jakub@redhat.com>
5384
5385 PR libstdc++/80251
5386 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5387 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5388
a9e4a1a5
JJ
53892017-03-27 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR middle-end/80162
5392 * c-common.c (c_common_mark_addressable_vec): Don't set
5393 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5394
3f01b620
MS
53952017-03-21 Martin Sebor <msebor@redhat.com>
5396
5397 PR c++/79548
5398 * c-common.c (set_underlying_type): Mark type used only when
5399 original del is declared unused.
5400
2f6f187a
DM
54012017-03-10 David Malcolm <dmalcolm@redhat.com>
5402
5403 PR translation/79848
5404 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5405 "%qs".
5406
a02fa805
DM
54072017-03-10 David Malcolm <dmalcolm@redhat.com>
5408
5409 PR c/79921
5410 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5411 from inform's message, so that xgettext can locate it.
5412
822a132c
MP
54132017-03-09 Marek Polacek <polacek@redhat.com>
5414
5415 PR c++/79962
5416 PR c++/79984
5417 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5418 conversion to the attribute list.
5419
bba81f1c
ML
54202017-03-09 Martin Liska <mliska@suse.cz>
5421
5422 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5423
108154ff
JM
54242017-03-03 Jason Merrill <jason@redhat.com>
5425
5426 * c.opt (Wnoexcept-type): New.
5427
eb0e7c34
RB
54282017-03-02 Richard Biener <rguenther@suse.de>
5429
5430 PR c/79756
5431 * c-common.c (c_common_mark_addressable_vec): Look through
5432 C_MAYBE_CONST_EXPR.
5433
9453ba0a
ML
54342017-02-28 Martin Liska <mliska@suse.cz>
5435
5436 * c.opt: Replace space with tabular for options of <number>
5437 type.
5438
6a825afe
ML
54392017-02-28 Martin Liska <mliska@suse.cz>
5440
5441 * c.opt: Fix --help=option -Q for options which are of
5442 an enum type.
5443
4227c9ad
JJ
54442017-02-24 Jakub Jelinek <jakub@redhat.com>
5445
5446 PR c++/79588
5447 * c-common.c (check_function_restrict): New function.
5448 (check_function_arguments): Add FNDECL argument. Call
5449 check_function_restrict if -Wrestrict.
5450 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5451 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5452 * c-common.h (check_function_arguments): Add FNDECL argument.
5453 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5454
59909673
EB
54552017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5456
5457 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5458 treatment of parameters with pointer-to-tagged type and tidy up.
5459 (print_ada_methods): Remove the special treatment of C++ static member
5460 functions.
5461
54dcd526
ML
54622017-02-22 Martin Liska <mliska@suse.cz>
5463
5464 * c.opt: Replace inequality signs with square brackets
5465 for -Wnornalized.
5466
00bc9de3
JJ
54672017-02-21 Jakub Jelinek <jakub@redhat.com>
5468
5469 PR c++/79641
5470 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5471 preserve quals.
5472
97fcf744
JM
54732017-02-17 Joseph Myers <joseph@codesourcery.com>
5474
5475 * c-cppbuiltin.c (builtin_define_float_constants): Define
5476 __DECIMAL_DIG__ to the value for long double.
5477
c7545f1c
MP
54782017-02-15 Marek Polacek <polacek@redhat.com>
5479
5480 PR c/79515
5481 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5482 conversion has occured.
5483
c2e84327
DM
54842017-01-24 David Malcolm <dmalcolm@redhat.com>
5485
5486 * c-common.c (c_common_reswords): Add "__RTL".
5487 * c-common.h (enum rid): Add RID_RTL.
5488
2ebd93e1
MP
54892017-01-20 Marek Polacek <polacek@redhat.com>
5490
5491 PR c/64279
5492 * c-common.h (do_warn_duplicated_branches_r): Declare.
5493 * c-gimplify.c (c_genericize): Walk the function tree calling
5494 do_warn_duplicated_branches_r.
5495 * c-warn.c (expr_from_macro_expansion_r): New.
5496 (do_warn_duplicated_branches): New.
5497 (do_warn_duplicated_branches_r): New.
5498 * c.opt (Wduplicated-branches): New option.
5499
0d80ab91
DM
55002017-01-17 David Malcolm <dmalcolm@redhat.com>
5501
5502 PR c++/71497
5503 * c-indentation.c (warn_for_misleading_indentation): Use the past
5504 subjunctive in the note.
5505
7f991c36
AH
55062017-01-17 Aldy Hernandez <aldyh@redhat.com>
5507
5508 PR c/79116
5509 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5510 start type to integer_type.
5511
1c70261c
JJ
55122017-01-16 Jakub Jelinek <jakub@redhat.com>
5513
5514 PR driver/49726
5515 * c.opt (gen-decls): Add Driver flag.
5516
1ddca3f3
PC
55172017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5518
5519 Revert:
5520 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5521
5522 PR c++/71737
5523 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5524
7d2f3f1d
PC
55252017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5526
5527 PR c++/71737
5528 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5529
bce6f760
MS
55302017-01-12 Martin Sebor <msebor@redhat.com>
5531
5532 (-Wformat-overflow): ...to this.
5533
bf5fbf46
MS
55342017-01-11 Martin Sebor <msebor@redhat.com>
5535
5536 PR c/78768
5537 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5538 Also enable for LTO.
5539
e363df3f
JM
55402017-01-10 Jason Merrill <jason@redhat.com>
5541
5542 Implement P0195R2, C++17 variadic using.
5543 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5544
bd2c6270
JJ
55452017-01-09 Jakub Jelinek <jakub@redhat.com>
5546
5547 PR translation/79019
5548 PR translation/79020
5549 * c.opt (Wnormalized=): Fix typo in description.
5550
efcc8d38
MS
55512017-01-08 Martin Sebor <msebor@redhat.com>
5552
5553 PR middle-end/77708
5554 * c.opt (-Wformat-truncation): New option.
5555
ab20d992 55562017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5557
5558 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5559 value to unsigned short to fit in 4 hex digits without
5560 warnings.
5561
4e89adf9
EB
55622017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5563
5564 * c.opt (fsso-struct): Add 'native' value.
5565
cd445b54
ML
55662017-01-05 Martin Liska <mliska@suse.cz>
5567
5568 PR pch/78970
5569 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5570 header.
5571
a9342885
MP
55722017-01-04 Marek Polacek <polacek@redhat.com>
5573
5574 PR c++/64767
5575 * c.opt (Wpointer-compare): New option.
5576
fc73e60c
JJ
55772017-01-04 Jakub Jelinek <jakub@redhat.com>
5578
5579 PR driver/78957
5580 * c.opt (fsso-struct=): Add RejectNegative.
5581
cbe34bb5
JJ
55822017-01-01 Jakub Jelinek <jakub@redhat.com>
5583
5584 Update copyright years.
5585
d4a6c0ea
ML
55862016-12-29 Martin Liska <mliska@suse.cz>
5587
5588 PR c/78933
5589 * c.opt (strong-eval-order): Add RejectNegative keyword.
5590
67a5ad7c
JM
55912016-12-22 Jason Merrill <jason@redhat.com>
5592
5593 Implement P0522R0, matching of template template arguments.
5594 * c-cppbuiltin.c (c_cpp_builtins): Define
5595 __cpp_template_template_args.
5596
0dba7960
JJ
55972016-12-21 Jakub Jelinek <jakub@redhat.com>
5598
5599 PR bootstrap/78817
5600 * c-common.c (struct nonnull_arg_ctx): New type.
5601 (check_function_nonnull): Return bool instead of void. Use
5602 nonnull_arg_ctx as context rather than just location_t.
5603 (check_nonnull_arg): Adjust for the new context type, set
5604 warned_p to true if a warning has been diagnosed.
5605 (check_function_arguments): Return bool instead of void.
5606 * c-common.h (check_function_arguments): Adjust prototype.
5607
31bfc9b9
JM
56082016-12-21 Jason Merrill <jason@redhat.com>
5609
5610 * c.opt (-fnew-ttp-matching): New flag.
5611 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5612
629b3d75
MJ
56132016-12-14 Martin Jambor <mjambor@suse.cz>
5614
5615 * c-omp.c: Include omp-general.h instead of omp-low.h.
5616 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5617 name.
5618
474da67e
MS
56192016-12-14 Martin Sebor <msebor@redhat.com>
5620
5621 PR c/17308
5622 * c-common.c (check_nonnull_arg): Disable when optimization
5623 is enabled.
5624
fe366b87
MP
56252016-12-12 Marek Polacek <polacek@redhat.com>
5626
5627 PR c++/78647
5628 * c-common.c (attribute_fallthrough_p): Return false for
5629 error_mark_node.
5630
8bd9f164
MS
56312016-12-08 Martin Sebor <msebor@redhat.com>
5632
5633 PR c/78284
5634 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5635
060162e0
MS
56362016-12-08 Martin Sebor <msebor@redhat.com>
5637
5638 PR c/78165
92a285c1
ML
5639 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5640 suffix.
060162e0 5641
ee92e7ba
MS
56422016-12-07 Martin Sebor <msebor@redhat.com>
5643
5644 PR c/53562
5645 PR middle-end/77784
5646 PR middle-end/78149
5647 PR middle-end/78138
5648 * c.opt (-Wstringop-overflow): New option.
5649
84b0769e
MO
56502016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5651
5652 * c-attribs.c (asan odr indicator): New attribute.
5653 (handle_asan_odr_indicator_attribute): New function.
5654
7fa6a965
PK
56552016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5656
5657 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5658 ptrdiff_type_node;
5659
56d8ffc1
JG
56602016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5661
5662 * c-common.c (excess_precision_mode_join): New.
5663 (c_ts18661_flt_eval_method): New.
5664 (c_c11_flt_eval_method): Likewise.
5665 (c_flt_eval_method): Likewise.
5666 * c-common.h (excess_precision_mode_join): New.
5667 (c_flt_eval_method): Likewise.
5668 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5669 (cpp_iec_559_value): Call it.
5670 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5671 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5672 __FLT_EVAL_METHOD_TS_18661_3__.
5673
04f0fcf7
JG
56742016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5675
5676 * c-opts.c (c_common_post_options): Add logic to handle the default
5677 case for -fpermitted-flt-eval-methods.
5678
fb2675cb
PB
56792016-11-23 Paolo Bonzini <bonzini@gnu.org>
5680
5681 * c.opt (Wexpansion-to-defined): New.
5682
ec1c5694
JJ
56832016-11-23 Jakub Jelinek <jakub@redhat.com>
5684
5685 PR target/78451
5686 * c-pragma.c (handle_pragma_target): Don't replace
5687 current_target_pragma, but chainon the new args to the current one.
5688
730c9e75
NS
56892016-11-22 Nathan Sidwell <nathan@acm.org>
5690
5691 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5692 indentation and formatting.
730c9e75 5693
89990732
MS
56942016-11-21 Martin Sebor <msebor@redhat.com>
5695
5696 * c.opt (-fprintf-return-value): Enable by default.
5697
48330c93
BE
56982016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5699
5700 PR c++/71973
5701 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5702 * c-common.c (c_common_nodes_and_builtins): Initialize
5703 const_tm_ptr_type_node.
5704
0d939c95
MP
57052016-11-16 Marek Polacek <polacek@redhat.com>
5706
5707 PR c/78285
5708 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5709
8e745a17
JJ
57102016-11-14 Jakub Jelinek <jakub@redhat.com>
5711
5712 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5713
1ee62b92 57142016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5715 Richard Biener <rguenther@suse.de>
5716
5717 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5718 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5719 * c.opt (fgimple): New option.
1ee62b92 5720
22b15758
UB
57212016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5722
5723 PR c/35503
5724 * c-common.h (warn_for_restrict): Declare.
5725 * c-warn.c: Include gcc-rich-location.h.
5726 (warn_for_restrict): New function.
5727 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5728 (gcc_cdiag_char_table): Likewise.
5729 (gcc_cxxdiag_char_table): Likewise.
5730 * c.opt (Wrestrict): New option.
5731
4be719cd
EB
57322016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5733
5734 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5735 for nested types only if the type is a record or union and dump SLOC.
5736
4a826ca6
JM
57372016-11-09 Jason Merrill <jason@redhat.com>
5738
5739 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5740
2e955d50
JJ
57412016-11-09 Jakub Jelinek <jakub@redhat.com>
5742
5743 * c-ubsan.c (ubsan_instrument_shift): Handle split
5744 -fsanitize=shift-base and -fsanitize=shift-exponent.
5745
51dc6603
JM
57462016-11-07 Jason Merrill <jason@redhat.com>
5747
5748 * c.opt (Wc++1z-compat): New.
5749 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5750
6dc4a604
ML
57512016-11-07 Martin Liska <mliska@suse.cz>
5752
5753 * c-warn.c (warn_for_unused_label): Save all labels used
5754 in goto or in &label.
5755
b302001e
JM
57562016-11-03 Jason Merrill <jason@redhat.com>
5757
5758 * c-cppbuiltin.c (c_cpp_builtins): Correct
5759 __cpp_inheriting_constructors.
5760
31f7f784
JM
57612016-11-01 Jason Merrill <jason@redhat.com>
5762
2bc78e3c
JM
5763 * c-cppbuiltin.c (c_cpp_builtins): Update
5764 __cpp_inheriting_constructors.
5765
31f7f784
JM
5766 * c.opt (-fnew-inheriting-ctors): New.
5767 * c-opts.c: Default to on for ABI 11+.
5768
dcb466ec
JJ
57692016-10-31 Jakub Jelinek <jakub@redhat.com>
5770
5771 PR c++/77948
5772 * c.opt (fext-numeric-literals): Add Var and Init.
5773 * c-opts.c (c_common_handle_option): Don't clear
5774 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5775 (c_common_post_options): Clear it here if not set
5776 explicitly.
5777
52e1b91e
AH
57782016-10-28 Aldy Hernandez <aldyh@redhat.com>
5779
5780 PR debug/77773
5781 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5782 if NULL.
5783
e16f1cc7
JJ
57842016-10-25 Jakub Jelinek <jakub@redhat.com>
5785
5786 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5787 * c-common.c (c_common_reswords): Add __builtin_launder.
5788
f8348061
BE
57892016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5790
5791 * c-common.c (c_common_truthvalue_conversion): Warn for
5792 multiplications in boolean context. Fix the quoting of '<<' and '<'
5793 in the shift warning.
5794
eff89e01
BE
57952016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5796
5797 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5798
24bc7bf4
JM
57992016-10-20 Jason Merrill <jason@redhat.com>
5800
5801 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5802
4c712374
BE
58032016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5804
5805 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5806 integer shift ops in boolean context.
5807
58082016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5809
5810 * c.opt (Walloca): New.
5811 (Walloca-larger-than=): New.
5812 (Wvla-larger-than=): New.
5813
8fa18c06
MP
58142016-10-17 Marek Polacek <polacek@redhat.com>
5815
5816 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5817 Return immediately when finding a match.
5818 (warn_tautological_cmp): Remove a boolean variable that is no longer
5819 needed.
5820
b12b1915
MP
58212016-10-17 Marek Polacek <polacek@redhat.com>
5822
5823 * c-attribs.c: New file.
5824 * c-common.c: Move attributes handling to c-attribs.c.
5825 (get_nonnull_operand): No longer static.
5826 * c-common.h: Move the declarations from c-attribs.c to its own section.
5827
2045acd9
JM
58282016-10-14 Jason Merrill <jason@redhat.com>
5829
5830 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5831 and __cpp_deduction_guides.
5832
14a2c9aa
JM
58332016-10-13 Jason Merrill <jason@redhat.com>
5834
5835 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5836
4d0cdd0c
TP
58372016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5838
5839 * c-cppbuiltin.c: Include memmodel.h.
5840 * c-opts.c: Likewise.
5841 * c-pragma.c: Likewise.
5842 * c-warn.c: Likewise.
5843
70f6d5e1
JJ
58442016-10-12 Jakub Jelinek <jakub@redhat.com>
5845
5846 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5847 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5848 * c-opts.c (sanitize_cpp_opts): Initialize
5849 cpp_opts->cpp_warn_implicit_fallthrough.
5850
78f61294
MP
58512016-10-11 Marek Polacek <polacek@redhat.com>
5852
5853 * c-common.c (warning_candidate_p): Change the return type to bool
5854 and return true/false instead of 1/0.
5855 (vector_mode_valid_p): Likewise.
5856
038b5cc0
MP
58572016-10-11 Marek Polacek <polacek@redhat.com>
5858
5859 * c-common.c (fold_for_warn): No longer static.
5860 (bool_promoted_to_int_p): Likewise.
5861 (c_common_get_narrower): Likewise.
5862 (constant_expression_warning): Move to c-warn.c.
5863 (constant_expression_error): Likewise.
5864 (overflow_warning): Likewise.
5865 (warn_logical_operator): Likewise.
5866 (find_array_ref_with_const_idx_r): Likewise.
5867 (warn_tautological_cmp): Likewise.
5868 (expr_has_boolean_operands_p): Likewise.
5869 (warn_logical_not_parentheses): Likewise.
5870 (warn_if_unused_value): Likewise.
5871 (strict_aliasing_warning): Likewise.
5872 (sizeof_pointer_memaccess_warning): Likewise.
5873 (check_main_parameter_types): Likewise.
5874 (conversion_warning): Likewise.
5875 (warnings_for_convert_and_check): Likewise.
5876 (match_case_to_enum_1): Likewise.
5877 (match_case_to_enum): Likewise.
5878 (c_do_switch_warnings): Likewise.
5879 (warn_for_omitted_condop): Likewise.
5880 (readonly_error): Likewise.
5881 (lvalue_error): Likewise.
5882 (invalid_indirection_error): Likewise.
5883 (warn_array_subscript_with_type_char): Likewise.
5884 (warn_about_parentheses): Likewise.
5885 (warn_for_unused_label): Likewise.
5886 (warn_for_div_by_zero): Likewise.
5887 (warn_for_memset): Likewise.
5888 (warn_for_sign_compare): Likewise.
5889 (do_warn_double_promotion): Likewise.
5890 (do_warn_unused_parameter): Likewise.
5891 (record_locally_defined_typedef): Likewise.
5892 (maybe_record_typedef_use): Likewise.
5893 (maybe_warn_unused_local_typedefs): Likewise.
5894 (maybe_warn_bool_compare): Likewise.
5895 (maybe_warn_shift_overflow): Likewise.
5896 (warn_duplicated_cond_add_or_warn): Likewise.
5897 (diagnose_mismatched_attributes): Likewise.
5898 * c-common.h: Move the declarations from c-warn.c to its own section.
5899 * c-warn.c: New file.
5900
627be19f
JM
59012016-10-08 Jason Merrill <jason@redhat.com>
5902
5903 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5904 into COND_EXPR in C++.
5905
7bad794a
JJ
59062016-10-08 Jakub Jelinek <jakub@redhat.com>
5907
5908 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5909 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5910 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5911
be845b04
JJ
59122016-10-07 Jakub Jelinek <jakub@redhat.com>
5913
5914 Implement LWG2296 helper intrinsic
5915 * c-common.h (enum rid): Add RID_ADDRESSOF.
5916 * c-common.c (c_common_reswords): Add __builtin_addressof.
5917
c09c4992
BE
59182016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5919
5920 PR c++/77700
5921 * c-common.c (c_common_truthvalue_conversion): Warn also for
5922 suspicious enum values in boolean context.
5923
342cfb3e
JJ
59242016-10-06 Jakub Jelinek <jakub@redhat.com>
5925
5926 Implement P0258R2 - helper for C++17
5927 std::has_unique_object_representations trait
5928 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5929 * c-common.c (c_common_reswords): Add
5930 __has_unique_object_representations.
5931
2e69f143
JJ
59322016-10-05 Jakub Jelinek <jakub@redhat.com>
5933
5934 PR sanitizer/66343
5935 * c-ubsan.c (ubsan_instrument_return): Don't call
5936 initialize_sanitizer_builtins here.
5937
700fff34
BE
59382016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5939
5940 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5941 conditional expression in boolean context when only one arm is
5942 non-boolean.
5943
9563bfcd
JJ
59442016-10-05 Jakub Jelinek <jakub@redhat.com>
5945
04a32443
JJ
5946 PR sanitizer/77823
5947 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5948 is not integral.
5949
9563bfcd
JJ
5950 * c-common.c (c_common_reswords): Update comment for C++11.
5951
f1644724
JM
59522016-10-04 Jason Merrill <jason@redhat.com>
5953
5954 * c-common.c (make_tree_vector_from_ctor): New.
5955 * c-common.h: Declare it.
5956
5a79befb
JJ
59572016-10-04 Jakub Jelinek <jakub@redhat.com>
5958
5959 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5960 __LIBGCC_JCR_SECTION_NAME__.
5961
1633d3b9
BE
59622016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5963
5964 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5965 left shift in boolean context.
5966
a2c6e7f2
JJ
59672016-09-29 Jakub Jelinek <jakub@redhat.com>
5968
5969 Implement P0001R1 - C++17 removal of register storage class specifier
5970 * c.opt (Wregister): New warning.
5971 * c-opts.c (c_common_post_options): Enable -Wregister by
5972 default for C++17.
5973
75304c87
JG
59742016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5975
5976 * c-opts.c (c_common_post_options): Remove special case for
5977 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5978 in C++.
5979
bbfac6da
JJ
59802016-09-27 Jakub Jelinek <jakub@redhat.com>
5981
6e39060a
JJ
5982 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5983 -std=c++1z.
5984
bbfac6da
JJ
5985 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5986
e73cf9a2
TP
59872016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5988
5989 * c-common.c: Include memmodel.h.
5990
c6147dc4
MP
59912016-09-26 Marek Polacek <polacek@redhat.com>
5992
5993 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5994
81fea426
MP
59952016-09-26 Marek Polacek <polacek@redhat.com>
5996
5997 PR c/7652
5998 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5999 (handle_fallthrough_attribute): New function.
6000 (attribute_fallthrough_p): New function.
6001 * c-common.h (attribute_fallthrough_p): Declare.
6002
9a2300e9
MP
60032016-09-24 Marek Polacek <polacek@redhat.com>
6004
6005 PR c/77490
6006 * c.opt (Wbool-operation): New.
6007
a09e9e35
BE
60082016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6009
6010 * c-common.c (c_common_truthvalue_conversion): Inhibit
6011 Wint-in-bool-context warning with from_macro_definition_at.
6012 Mention the expression will always evaluate to true.
6013
d43b4ccc
MS
60142016-09-21 Martin Sebor <msebor@redhat.com>
6015
6016 PR bootstrap/77676
6017 * c.opt (fprintf-return-value): Temporarily initialize to zero
6018 to unblock bootstrap failures.
6019
2e1c20b1
JJ
60202016-09-21 Jakub Jelinek <jakub@redhat.com>
6021
6022 PR c++/77651
6023 * c.opt (Waligned-new=): Add RejectNegative.
6024 (faligned-new=): Likewise. Spelling fix - change
6025 aligned_new_threshhold to aligned_new_threshold.
6026 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6027 to aligned_new_threshold.
6028
88d0c3f0
MS
60292016-09-20 Martin Sebor <msebor@redhat.com>
6030
6031 PR middle-end/49905
6032 * c.opt: Add -Wformat-length and -fprintf-return-value.
6033
144a96e4
BE
60342016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6035
6036 PR c++/77434
6037 * c.opt (Wint-in-bool-context): New warning.
6038 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6039 constants in boolean context.
6040
63012d9a
JM
60412016-09-19 Joseph Myers <joseph@codesourcery.com>
6042
6043 * c-common.c (max_align_t_align): Also consider alignment of
6044 float128_type_node.
6045
931388ce
JM
60462016-09-15 Jason Merrill <jason@redhat.com>
6047
6048 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6049 DECL_EXTERNAL.
6050
38711381
JM
60512016-09-14 Jason Merrill <jason@redhat.com>
6052
6053 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6054 limit FIELD_DECL, either.
6055
e51fbec3
MP
60562016-09-14 Marek Polacek <polacek@redhat.com>
6057
6058 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6059 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6060 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6061
254830ba
DM
60622016-09-13 David Malcolm <dmalcolm@redhat.com>
6063
6064 * c-common.c (warn_logical_not_parentheses): Replace
6065 rich_location::add_fixit_insert calls with add_fixit_insert_before
6066 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6067
42763690
JM
60682016-09-13 Jason Merrill <jason@redhat.com>
6069 Tom de Vries <tom@codesourcery.com>
6070
6071 PR c++/77427
6072 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6073
9453eee9
JM
60742016-09-13 Jason Merrill <jason@redhat.com>
6075
6076 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6077 limit types at all.
6078
e96809e3
JM
60792016-09-12 Jason Merrill <jason@redhat.com>
6080
6081 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6082 bit/byte confusion, allow large alignment for types.
6083
54dcdb88
BE
60842016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6085
6086 PR c++/77496
6087 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6088
d1463eb9
DM
60892016-09-12 David Malcolm <dmalcolm@redhat.com>
6090
6091 PR c/72858
6092 * c-format.c (argument_parser::check_argument_type): Add params
6093 "type_start" and "conversion_char". Use the former to generate
6094 offset_to_type_start and pass it and conversion_char to
6095 check_format_types.
6096 (check_format_info_main): Capture the start of the type
6097 information as "type_start", and pass it an format_char
6098 to arg_parser.check_argument_type.
6099 (check_format_types): Provide an example in the leading comment.
6100 Add params "offset_to_type_start" and "conversion_char"; pass
6101 them to format_type_warning calls.
6102 (test_get_modifier_for_format_len): Likewise.
6103 (matching_type_p): New function.
6104 (get_format_for_type): Add param "conversion_char" and move
6105 implementation into...
6106 (get_format_for_type_1): ...new function, called twice.
6107 Use new function matching_type_p rather than checking for
6108 TYPE_CANONICAL equality.
6109 (get_corrected_substring): New function.
6110 (format_type_warning): Provide an example in the leading comment.
6111 Add params "offset_to_type_start" and "conversion_char". Replace
6112 call to get_format_for_type with call to get_corrected_substring
6113 and move rejection of hints for widths/precisions there.
6114 (assert_format_for_type_streq): Add param "conversion_char".
6115 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6116 (test_get_format_for_type_printf): Add conversion chars to the
6117 tests, adding coverage for various combinations of integer
6118 vs double conversions, and for preserving octal and hexadecimal
6119 conversions.
6120 (test_get_format_for_type_scanf): Add conversion chars to the
6121 tests.
6122
5b28efbb
TV
61232016-09-10 Tom de Vries <tom@codesourcery.com>
6124
6125 PR C/71602
6126 * c-common.c (build_va_arg): Handle more strict
6127 targetm.canonical_va_list_type. Replace first argument type error with
6128 assert.
6129
3f0177e7
MS
61302016-09-09 Martin Sebor <msebor@redhat.com>
6131
6132 PR c/77520
6133 PR c/77521
6134 * c-format.c (argument_parser::find_format_char_info): Use %qc
6135 format directive unconditionally.
6136
af63ba4b
JM
61372016-09-09 Jason Merrill <jason@redhat.com>
6138
6139 Implement C++17 new of over-aligned types.
6140 * c.opt: Add -faligned-new and -Waligned-new.
6141 * c-common.c (max_align_t_align): Split out from...
6142 (cxx_fundamental_alignment_p): ...here.
6143 * c-common.h: Declare it.
6144 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6145
c65248cb
JM
61462016-09-09 Joseph Myers <joseph@codesourcery.com>
6147
6148 * c-cppbuiltin.c (builtin_define_type_width): New function.
6149 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6150 macros.
6151
e5106e27
DM
61522016-09-07 David Malcolm <dmalcolm@redhat.com>
6153
6154 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6155 a POINTER_TYPE.
6156 (substring_loc::get_location): Move to substring-locations.c,
6157 keeping implementation as...
6158 (c_get_substring_location): New function, from the above, reworked
6159 to use accessors rather than member lookup.
6160 * c-common.h (class substring_loc): Move to substring-locations.h,
6161 replacing with a forward decl.
6162 (c_get_substring_location): New decl.
6163 * c-format.c: Include "substring-locations.h".
6164 (format_warning_va): Move to substring-locations.c.
6165 (format_warning_at_substring): Likewise.
6166
ab20d992 61672016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6168
6169 PR c/77336
6170 * c-format.c (check_function_format): Avoid issuing warnings for
6171 functions unless they call format functions with non-constant
6172 format strings.
6173
b772a565
RB
61742016-09-06 Richard Biener <rguenther@suse.de>
6175
6176 PR c/77450
6177 * c-common.c (c_common_mark_addressable_vec): Handle
6178 COMPOUND_LITERAL_EXPR.
6179
25ff5dd3
MP
61802016-09-05 Marek Polacek <polacek@redhat.com>
6181
6182 PR c/77423
6183 * c-common.c (bool_promoted_to_int_p): New function.
6184 (expr_has_boolean_operands_p): New function.
6185 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6186 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6187
21234eb5
TV
61882016-09-04 Tom de Vries <tom@codesourcery.com>
6189
6190 revert:
6191 2016-08-29 Tom de Vries <tom@codesourcery.com>
6192
6193 * c-common.c (build_va_arg): Replace first argument type error
6194 with assert.
6195
9dc5773f
JJ
61962016-09-02 Jakub Jelinek <jakub@redhat.com>
6197
6198 PR c/65467
6199 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6200 (c_finish_omp_for): Reject _Atomic qualified iterators.
6201
62022016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6203
6204 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6205 size to guarantee it fits the output of the formatted function
6206 regardless of its arguments.
6207
295844f6
MP
62082016-09-01 Marek Polacek <polacek@redhat.com>
6209
6210 PR c/7652
6211 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6212 FALLTHRU comments.
6213
3d06b6f2
MP
62142016-08-29 Marek Polacek <polacek@redhat.com>
6215
6216 PR c/77292
6217 * c-common.c (warn_logical_not_parentheses): Don't warn for
6218 a comparison or a logical operator.
6219
34cedad5
TV
62202016-08-29 Tom de Vries <tom@codesourcery.com>
6221
6222 * c-common.c (build_va_arg): Fix type comparison assert.
6223
f162d717
TV
62242016-08-29 Tom de Vries <tom@codesourcery.com>
6225
6226 * c-common.c (build_va_arg): Replace first argument type error
6227 with assert.
6228
ba9bbd6f
TV
62292016-08-29 Tom de Vries <tom@codesourcery.com>
6230
6231 PR c/77398
6232 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6233 with error_mark_node as va_list instead of with illegal va_list.
6234
ebef225f
MP
62352016-08-25 Marek Polacek <polacek@redhat.com>
6236 David Malcolm <dmalcolm@redhat.com>
6237
6238 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6239 * c-common.h (warn_logical_not_parentheses): Update declaration.
6240
b00e6e75
MP
62412016-08-22 Marek Polacek <polacek@redhat.com>
6242
6243 PR c++/77321
6244 * c-common.c (warn_for_memset): Check type for null.
6245
6dc198e3
JM
62462016-08-22 Joseph Myers <joseph@codesourcery.com>
6247
14ec014e 6248 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6249 _FloatNx types for suffixes for built-in functions.
6250
c65699ef
JM
62512016-08-19 Joseph Myers <joseph@codesourcery.com>
6252
6253 PR c/32187
6254 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6255 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6256 (RID_FLOAT128X): New enum rid values.
6257 (CASE_RID_FLOATN_NX): New macro.
6258 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6259 keywords.
6260 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6261 corresponding complex types.
6262 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6263 _FloatNx and corresponding complex types.
6264 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6265 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6266 and _FloatNx types for the widest type for determining
6267 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6268 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6269 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6270 and _FloatNx types.
6271 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6272 constants.
6273 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6274 _FloatNx types.
6275
cc015f3a
DM
62762016-08-18 David Malcolm <dmalcolm@redhat.com>
6277
6278 * c-opts.c (c_diagnostic_finalizer): Update for change to
6279 diagnostic_show_locus.
6280
cb18fd07
DM
62812016-08-18 David Malcolm <dmalcolm@redhat.com>
6282
6283 * c-common.c: Include "spellcheck.h".
6284 (cb_get_suggestion): New function.
6285 * c-common.h (cb_get_suggestion): New decl.
6286 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6287 cb_get_suggestion.
6288
a76989dc
MP
62892016-08-18 Marek Polacek <polacek@redhat.com>
6290
6291 PR c/71514
6292 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6293 and pointer-to-VLA.
6294
65e736c0
DM
62952016-08-16 David Malcolm <dmalcolm@redhat.com>
6296
6297 PR c/72857
6298 * c-common.c (substring_loc::get_range): Rename to...
6299 (substring_loc::get_location): ...this, converting param from a
6300 source_range * to a location_t *. Call
6301 get_source_location_for_substring rather than
6302 get_source_range_for_substring, and pass in m_caret_idx.
6303 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6304 (substring_loc::get_range): Replace with...
6305 (substring_loc::get_location): ...this.
6306 (substring_loc::set_caret_index): New method.
6307 (substring_loc): Add field m_caret_idx.
6308 * c-format.c (format_warning_va): Update for above changes.
6309 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6310 clashing with type name.
6311 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6312 (check_argument_type): Likewise.
6313 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6314 Use a copy when emitting warnings, setting the caret index from TYPE.
6315
7e1dde14 63162016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6317 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6318
6319 * c-ada-spec.c (dump_number): New function.
6320 (handle_escape_character): Likewise.
6321 (print_ada_macros): Add handling of constant integers and strings.
6322
191816a3
MP
63232016-08-12 Marek Polacek <polacek@redhat.com>
6324
6325 PR c/7652
6326 * c-common.c (scalar_to_vector): Adjust fall through comment.
6327 * c-opts.c (c_common_handle_option): Likewise.
6328 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6329 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6330 fall through comment.
6331 * cilk.c (extract_free_variables): Add FALLTHRU.
6332
452df4a4
JM
63332016-08-10 Jason Merrill <jason@redhat.com>
6334
6335 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6336
f3365c12
JM
63372016-08-09 Jason Merrill <jason@redhat.com>
6338
6339 * c-common.c (c_common_attribute_table): vector_size affects type
6340 identity.
6341
f0bc3323
MP
63422016-08-09 Marek Polacek <polacek@redhat.com>
6343
6344 PR c/7652
6345 * c-ada-spec.c (dump_generic_ada_node): Add return.
6346
98e5a19a
JM
63472016-08-09 Jason Merrill <jason@redhat.com>
6348
6349 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6350 C++17 constexpr lambdas.
6351
895aa8e1
DM
63522016-08-08 David Malcolm <dmalcolm@redhat.com>
6353
6354 PR c/64955
6355 * c-common.h (selftest::c_format_c_tests): New declaration.
6356 (selftest::run_c_tests): New declaration.
6357 * c-format.c: Include "selftest.h.
6358 (format_warning_va): Add param "corrected_substring" and use
6359 it to add a replacement fix-it hint.
6360 (format_warning_at_substring): Likewise.
6361 (format_warning_at_char): Update for new param of
6362 format_warning_va.
6363 (argument_parser::check_argument_type): Pass "fki" to
6364 check_format_types.
6365 (check_format_types): Add param "fki" and pass it to
6366 format_type_warning.
6367 (deref_n_times): New function.
6368 (get_modifier_for_format_len): New function.
6369 (selftest::test_get_modifier_for_format_len): New function.
6370 (get_format_for_type): New function.
6371 (format_type_warning): Add param "fki" and use it to attempt
6372 to provide hints for argument types when calling
6373 format_warning_at_substring.
6374 (selftest::get_info): New function.
6375 (selftest::assert_format_for_type_streq): New function.
6376 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6377 (selftest::test_get_format_for_type_printf): New function.
6378 (selftest::test_get_format_for_type_scanf): New function.
6379 (selftest::c_format_c_tests): New function.
6380
e52ed3fe
DM
63812016-08-08 David Malcolm <dmalcolm@redhat.com>
6382
6383 PR c/52952
6384 * c-format.c: Include "diagnostic.h".
6385 (location_column_from_byte_offset): Delete.
6386 (location_from_offset): Delete.
6387 (format_warning_va): New function.
6388 (format_warning_at_substring): New function.
6389 (format_warning_at_char): New function.
6390 (check_format_arg): Capture location of format_tree and pass to
6391 check_format_info_main.
6392 (argument_parser): Add fields "start_of_this_format" and
6393 "format_string_cst".
6394 (flag_chars_t::validate): Add param "format_string_cst". Convert
6395 warning_at call using location_from_offset to call to
6396 format_warning_at_char.
6397 (argument_parser::argument_parser): Add param "format_string_cst_"
6398 and use use it to initialize field "format_string_cst".
6399 Initialize new field "start_of_this_format".
6400 (argument_parser::read_format_flags): Convert warning_at call
6401 using location_from_offset to a call to format_warning_at_char.
6402 (argument_parser::read_any_format_left_precision): Likewise.
6403 (argument_parser::read_any_format_precision): Likewise.
6404 (argument_parser::read_any_other_modifier): Likewise.
6405 (argument_parser::find_format_char_info): Likewise, in three places.
6406 (argument_parser::parse_any_scan_set): Likewise, in one place.
6407 (argument_parser::handle_conversions): Likewise, in two places.
6408 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6409 and use it to make a substring_loc. Pass the latter to
6410 check_format_types.
6411 (check_format_info_main): Add params "fmt_param_loc" and
6412 "format_string_cst". Convert warning_at calls using
6413 location_from_offset to calls to format_warning_at_char. Pass the
6414 new params to the arg_parser ctor. Pass "format_string_cst" to
6415 flag_chars.validate. Pass "fmt_param_loc" to
6416 arg_parser.check_argument_type.
6417 (check_format_types): Convert first param from a location_t
6418 to a const substring_loc & and rename to "fmt_loc". Attempt
6419 to extract the range of the relevant parameter and pass it
6420 to format_type_warning.
6421 (format_type_warning): Convert first param from a location_t
6422 to a const substring_loc & and rename to "fmt_loc". Add
6423 params "param_range" and "type". Replace calls to warning_at
6424 with calls to format_warning_at_substring.
6425
1c4d457e
DM
64262016-08-08 David Malcolm <dmalcolm@redhat.com>
6427
6428 * c-format.c (class flag_chars_t): New class.
6429 (struct length_modifier): New struct.
6430 (class argument_parser): New class.
6431 (flag_chars_t::flag_chars_t): New ctor.
6432 (flag_chars_t::has_char_p): New method.
6433 (flag_chars_t::add_char): New method.
6434 (flag_chars_t::validate): New method.
6435 (flag_chars_t::get_alloc_flag): New method.
6436 (flag_chars_t::assignment_suppression_p): New method.
6437 (argument_parser::argument_parser): New ctor.
6438 (argument_parser::read_any_dollar): New method.
6439 (argument_parser::read_format_flags): New method.
6440 (argument_parser::read_any_format_width): New method.
6441 (argument_parser::read_any_format_left_precision): New method.
6442 (argument_parser::read_any_format_precision): New method.
6443 (argument_parser::handle_alloc_chars): New method.
6444 (argument_parser::read_any_length_modifier): New method.
6445 (argument_parser::read_any_other_modifier): New method.
6446 (argument_parser::find_format_char_info): New method.
6447 (argument_parser::validate_flag_pairs): New method.
6448 (argument_parser::give_y2k_warnings): New method.
6449 (argument_parser::parse_any_scan_set): New method.
6450 (argument_parser::handle_conversions): New method.
6451 (argument_parser::check_argument_type): New method.
6452 (check_format_info_main): Introduce classes argument_parser
6453 and flag_chars_t, moving the code within the loop into methods
6454 of these classes. Make various locals "const".
6455
88fa5555
DM
64562016-08-05 David Malcolm <dmalcolm@redhat.com>
6457
6458 * c-common.c: Include "substring-locations.h".
6459 (get_cpp_ttype_from_string_type): New function.
6460 (g_string_concat_db): New global.
6461 (substring_loc::get_range): New method.
6462 * c-common.h (g_string_concat_db): New declaration.
6463 (class substring_loc): New class.
6464 * c-lex.c (lex_string): When concatenating strings, capture the
6465 locations of all tokens using a new obstack, and record the
6466 concatenation locations within g_string_concat_db.
6467 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6468 on the ggc-heap.
6469
78169471
MP
64702016-07-29 Marek Polacek <polacek@redhat.com>
6471
638fc14f
MP
6472 PR c/71926
6473 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6474 parentheses warning.
6475
78169471
MP
6476 PR c/71574
6477 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6478
1225d6b1
ML
64792016-07-28 Martin Liska <mliska@suse.cz>
6480
6481 PR gcov-profile/68025
6482 * c-common.c (handle_no_profile_instrument_function_attribute):
6483
ec1e2a40
BE
64842016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6485
6486 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6487 BITS_PER_UNIT_LOG.
6488
5ec2cd9f
JM
64892016-07-25 Jason Merrill <jason@redhat.com>
6490
6491 PR c++/65970
6492 * c.opt (fconstexpr-loop-limit): New.
6493
9dc5773f 64942016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6495
6496 PR c++/71675
6497 * c-common.c (resolve_overloaded_builtin): Avoid converting
6498 __atomic_compare_exchange_n return type to that of what its
6499 first argument points to.
6500
e3fe09c1
UB
65012016-07-22 Uros Bizjak <ubizjak@gmail.com>
6502
6503 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6504 ~(unsigned HOST_WIDE_INT) 0.
6505
bc91c436
ML
65062016-07-22 Martin Liska <mliska@suse.cz>
6507
6508 PR gcov-profile/69028
6509 PR gcov-profile/62047
6510 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6511 to the current_function_decl.
6512
451dcc66
JM
65132016-07-21 Jason Merrill <jason@redhat.com>
6514
6515 PR c++/65168
6516 * c-common.c (c_common_truthvalue_conversion): Check
6517 c_inhibit_evaluation_warnings for warning about address of
6518 reference.
6519
de6a69ee
DM
65202016-07-20 David Malcolm <dmalcolm@redhat.com>
6521
6522 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6523 const char *.
6524
d022c55a
JM
65252016-07-15 Jason Merrill <jason@redhat.com>
6526
6527 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6528
ddbbcb19
JJ
65292016-07-15 Jakub Jelinek <jakub@redhat.com>
6530
6531 PR c/71858
6532 * c-common.h (enum lookup_name_fuzzy_kind): Add
6533 FUZZY_LOOKUP_FUNCTION_NAME.
6534
d0cf395a
JM
65352016-07-08 Jason Merrill <jason@redhat.com>
6536
6537 P0145: Refining Expression Order for C++.
6538 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6539 * c-opts.c: Adjust.
6540
98d44e93
MT
65412016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6542
6543 PR c++/71214
6544 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6545
f9d8d994
TS
65462016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6547
6548 * c-pragma.h (enum pragma_kind): Rename
6549 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6550 users.
6551
4aa83879
RB
65522016-06-29 Richard Biener <rguenther@suse.de>
6553
6554 PR middle-end/71002
6555 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6556
a25bd9e6
JM
65572016-06-24 Jason Merrill <jason@redhat.com>
6558
6559 P0145R2: Refining Expression Order for C++.
6560 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6561 MODIFY_EXPR.
6562
a86451b9
JJ
65632016-06-24 Jakub Jelinek <jakub@redhat.com>
6564
6565 * c-common.c (check_builtin_function_arguments): Require last
6566 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6567 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6568 if the last argument is pointer to enumerated or boolean type.
6569
1a4f11c8
DM
65702016-06-22 David Malcolm <dmalcolm@redhat.com>
6571
6572 PR c/70339
6573 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6574 (lookup_name_fuzzy): New prototype.
6575
fe55692c
JDA
65762016-06-21 John David Anglin <danglin@gcc.gnu.org>
6577
6578 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6579
4eb24e01
JM
65802016-06-14 Jason Merrill <jason@redhat.com>
6581
6582 P0145R2: Refining Expression Order for C++.
6583 * c.opt (fargs-in-order): New.
6584 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6585
ef7cf206
JJ
65862016-06-13 Jakub Jelinek <jakub@redhat.com>
6587
0dda258b
JJ
6588 PR sanitizer/71498
6589 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6590 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6591
ef7cf206
JJ
6592 PR preprocessor/71183
6593 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6594 to cb_get_source_date_epoch.
6595
50b15873
JJ
65962016-06-10 Jakub Jelinek <jakub@redhat.com>
6597
6598 PR c/68657
6599 * c.opt (Wpsabi): Add Warning flag.
6600
4d926e34
MS
66012016-06-10 Martin Sebor <msebor@redhat.com>
6602
6603 PR c/71392
14ec014e 6604 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6605 the nonnull attribute in type-generic builtins.
6606
e01b4e16
MS
66072016-06-09 Martin Sebor <msebor@redhat.com>
6608
6609 PR c/70883
6610 * c-common.c (builtin_function_validate_nargs): Make text of error
6611 message consistent with others like it.
6612
44a845ca
MS
66132016-06-08 Martin Sebor <msebor@redhat.com>
6614 Jakub Jelinek <jakub@redhat.com>
6615
6616 PR c++/70507
6617 PR c/68120
6618 * c-common.c (check_builtin_function_arguments): Handle
6619 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6620
a80a7051
RB
66212016-06-08 Richard Biener <rguenther@suse.de>
6622
6623 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6624
bfd67b47
RB
66252016-06-07 Richard Biener <rguenther@suse.de>
6626
6627 PR c/61564
6628 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6629 options and warn about others.
6630
15c98b2e
ES
66312016-06-01 Eduard Sanou <dhole@openmailbox.org>
6632
6633 * c-common.c (get_source_date_epoch): Rename to
6634 cb_get_source_date_epoch.
6635 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6636 message when the parsing fails. Use error_at instead of fatal_error.
6637 * c-common.h (get_source_date_epoch): Rename to
6638 cb_get_source_date_epoch.
6639 * c-common.h (cb_get_source_date_epoch): Prototype.
6640 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6641 * c-common.h (c_omp_region_type): Remove trailing comma.
6642 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6643 * c-lex.c (c_lex_with_flags): Remove initialization of
6644 pfile->source_date_epoch.
6645
00631022
JJ
66462016-05-30 Jakub Jelinek <jakub@redhat.com>
6647
6648 PR c++/71349
6649 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6650 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6651 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6652 instead of C_OMP_CLAUSE_SPLIT_FOR.
6653
f17a223d
RB
66542016-05-24 Richard Biener <rguenther@suse.de>
6655
6656 PR middle-end/70434
6657 PR c/69504
6658 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6659 (convert_vector_to_array_for_subscript): ... this.
6660 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6661 VIEW_CONVERT_EXPR to an array type. Rename to ...
6662 (convert_vector_to_array_for_subscript): ... this.
6663
4f2e1536
MP
66642016-05-12 Marek Polacek <polacek@redhat.com>
6665
6666 PR c/70756
6667 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6668 size_in_bytes and pass LOC to it.
6669
d6e83a8d
MM
66702016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6671
6672 PR c/43651
6673 * c.opt (Wduplicate-decl-specifier): New option.
6674
5c3a10fb
MP
66752016-05-11 Marek Polacek <polacek@redhat.com>
6676
6677 PR c++/71024
6678 * c-common.c (diagnose_mismatched_attributes): New function.
6679 * c-common.h (diagnose_mismatched_attributes): Declare.
6680
deef7113
MP
66812016-05-04 Marek Polacek <polacek@redhat.com>
6682
6683 * c.opt (Wdangling-else): New option.
6684
79ce98bc
MP
66852016-05-03 Marek Polacek <polacek@redhat.com>
6686
6687 PR c/70859
6688 * c-common.c (builtin_function_validate_nargs): Add location
6689 parameter. Use it.
6690 (check_builtin_function_arguments): Add location and arguments
6691 parameters. Use them.
6692 * c-common.h (check_builtin_function_arguments): Update declaration.
6693
381cdae4
RB
66942016-05-03 Richard Biener <rguenther@suse.de>
6695
6696 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6697 allow call args to gimplify to SSA names.
6698
1d793c34
MP
66992016-05-03 Marek Polacek <polacek@redhat.com>
6700
6701 * c-common.h (enum c_omp_region_type): Remove stray comma.
6702
77886428
CP
67032016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6704
6705 * c-common.h (enum c_omp_region_type): Define.
6706
697e0b28
RS
67072016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6708
6709 * c-common.c (shorten_compare): Use wi::to_wide.
6710
e7ff0319
CP
67112016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6712
6713 PR middle-end/70626
6714 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6715 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6716 reduction clauses in acc parallel loops.
6717
2fff3db8
MP
67182016-04-29 Marek Polacek <polacek@redhat.com>
6719
6720 PR c/70852
6721 * c-common.c (warn_for_memset): Check domain before accessing it.
6722
509063eb
DV
67232016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6724
6725 PR/69089
6726 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6727 "aligned" attribute.
6728
b632761d
JM
67292016-04-28 Jason Merrill <jason@redhat.com>
6730
6731 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6732
174f6622
ES
67332016-04-28 Eduard Sanou <dhole@openmailbox.org>
6734 Matthias Klose <doko@debian.org>
6735
6736 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6737 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6738 handling.
6739 * c-common.h (get_source_date_epoch): Prototype.
6740 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6741
6bc2bb18
RB
67422015-04-27 Ryan Burn <contact@rnburn.com>
6743
6744 PR c++/69024
6745 PR c++/68997
6746 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6747 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6748 external linkage.
6749 (cilk_detect_and_unwrap): Corresponding changes.
6750 (extract_free_variables): Don't extract free variables from
6751 AGGR_INIT_EXPR slot.
6752 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6753 (cilk_recognize_spawn): Likewise.
6754
c1e1f433
BS
67552016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6756
6757 * c.opt (Wmemset-elt-size): New option.
6758 * c-common.c (warn_for_memset): New function.
6759 * c-common.h (warn_for_memset): Declare.
6760
d067e05f
JM
67612016-04-25 Jason Merrill <jason@redhat.com>
6762
6763 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6764 No longer static.
6765 * c-common.h: Declare it.
6766 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6767
9aa36ae5
JM
67682016-04-22 Jason Merrill <jason@redhat.com>
6769
6770 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6771
477d4906
IV
67722016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6773
6774 PR c++/69363
6775 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6776 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6777
fe37c7af
MM
67782016-04-18 Michael Matz <matz@suse.de>
6779
6780 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6781 and SET_DECL_ALIGN.
6782
23f2660f
EB
67832016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6784
6785 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6786 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6787 to incomplete types.
6788 (dump_nested_type): Remove redundant tests and tidy up.
6789 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6790 a type which is the typedef of an original type.
6791
1e77281b
MP
67922016-04-15 Marek Polacek <polacek@redhat.com>
6793
6794 PR c/70651
6795 * c-common.c (build_va_arg): Change two asserts into errors and return
6796 error_mark_node.
6797
b3a77f21
MP
67982016-04-13 Marek Polacek <polacek@redhat.com>
6799
6800 PR c++/70639
6801 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6802 for switch statements, too.
6803
322b8466
JM
68042016-03-28 Jason Merrill <jason@redhat.com>
6805
6806 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6807
fbdb6baf
MP
68082016-03-23 Marek Polacek <polacek@redhat.com>
6809
6810 PR c++/69884
6811 * c.opt (Wignored-attributes): New option.
6812
5c240f4d
DM
68132016-03-22 David Malcolm <dmalcolm@redhat.com>
6814
6815 PR c/69993
6816 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6817 diagnostic text, reversing the order of the warning and note so
6818 that they appear in source order.
6819
14ba7b28
MP
68202016-03-17 Marek Polacek <polacek@redhat.com>
6821
6822 PR c/69407
6823 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6824 operations.
6825
08a1cadc
JM
68262016-03-14 Jason Merrill <jason@redhat.com>
6827
2aaeea19
JM
6828 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6829
08a1cadc
JM
6830 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6831
c06d25bb
RB
68322016-03-09 Richard Biener <rguenther@suse.de>
6833
6834 PR c/70143
6835 * c-common.c (strict_aliasing_warning): Add back
6836 alias_sets_conflict_p check.
6837
80aac5c8
JM
68382016-03-08 Jason Merrill <jason@redhat.com>
6839
6840 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6841
64b23c13
DM
68422016-03-04 David Malcolm <dmalcolm@redhat.com>
6843
6844 PR c/68187
6845 * c-indentation.c (get_visual_column): Move code to determine next
6846 tab stop to...
6847 (next_tab_stop): ...this new function.
6848 (line_contains_hash_if): Delete function.
6849 (detect_preprocessor_logic): Delete function.
6850 (get_first_nws_vis_column): New function.
6851 (detect_intervening_unindent): New function.
6852 (should_warn_for_misleading_indentation): Replace call to
6853 detect_preprocessor_logic with a call to
6854 detect_intervening_unindent.
6855
729526f5
DM
68562016-03-04 David Malcolm <dmalcolm@redhat.com>
6857
6858 PR c/68187
6859 * c-indentation.c (should_warn_for_misleading_indentation): When
6860 suppressing warnings about cases where the guard and body are on
6861 the same column, only use the first non-whitespace column in place
6862 of the guard token column when dealing with "else" clauses.
6863 When rejecting aligned BODY and NEXT, loosen the requirement
6864 from equality with the first non-whitespace of guard to simply
6865 that they not be indented relative to it.
6866
e9a35493
RB
68672016-03-04 Richard Biener <rguenther@suse.de>
6868
6869 PR c++/70054
6870 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6871 instead of alias_sets_conflict_p.
6872
1be56bc5
MP
68732016-03-01 Marek Polacek <polacek@redhat.com>
6874
6875 PR c++/69795
6876 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6877 any DECL.
6878
35886f0b
MS
68792016-02-22 Martin Sebor <msebor@redhat.com>
6880
6881 PR middle-end/69780
6882 * c-common.c (check_builtin_function_arguments): Validate and
6883 reject invalid arguments to __builtin_alloca_with_align.
6884
4246c8da
MW
68852016-02-20 Mark Wielaard <mjw@redhat.com>
6886
6887 PR c/28901
6888 * c.opt (Wunused-const-variable): Turn into Alias for...
6889 (Wunused-const-variable=): New option.
6890
268be88c
BE
68912016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6892
6893 PR c++/69865
6894 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6895 here...
6896 (c_common_init_options): ...to here.
6897 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6898
871b3f47
JJ
68992016-02-19 Jakub Jelinek <jakub@redhat.com>
6900
6901 PR c++/69826
6902 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6903 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6904 flag_preprocess_only.
6905
bf14eba2
JJ
69062016-02-16 Jakub Jelinek <jakub@redhat.com>
6907
6908 PR c/69835
6909 * c.opt (Wnonnull-compare): Enable for -Wall.
6910
ba6b3795
JJ
69112016-02-15 Jakub Jelinek <jakub@redhat.com>
6912
6913 PR c++/69797
6914 * c-common.c (sync_resolve_size): Diagnose too few arguments
6915 even when params is non-NULL empty vector.
6916
a011cd92
BS
69172016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6918
6919 PR target/60410
6920 * c.opt (fshort-double): Remove.
6921
46cb9332
MS
69222016-02-05 Martin Sebor <msebor@redhat.com>
6923
6924 PR c++/69662
6925 * c.opt (Warning options): Update -Wplacement-new to take
6926 an optional argument.
6927
e1b81f2b
JJ
69282016-02-01 Jakub Jelinek <jakub@redhat.com>
6929
6930 PR preprocessor/69543
6931 PR c/69558
6932 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6933 instead of loc to control_warning_option.
6934
b6adbb9f
NS
69352016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6936
6937 * c.opt (fopenacc-dim=): New option.
6938
5d70666e
RB
69392016-01-27 Ryan Burn <contact@rnburn.com>
6940
6941 PR cilkplus/69267
6942 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6943 gimplify_arg. Removed superfluous post_p argument.
6944 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6945 superfluous post_p argument.
6946 * c-gimplify.c (c_gimplify_expr): Likewise.
6947
01e1dea3
DM
69482016-01-26 David Malcolm <dmalcolm@redhat.com>
6949
6950 PR other/69006
6951 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6952 pp_newline_and_flush with pp_flush.
6953
9f04a53e
MS
69542016-01-20 Martin Sebor <msebor@redhat.com>
6955
6956 PR c/69405
6957 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6958 an incompatible argument when the argument isn't a valid tree node.
6959
7f26f7df
JM
69602016-01-18 Jason Merrill <jason@redhat.com>
6961
6962 PR c++/68767
6963 * c-common.c (check_function_arguments_recurse): Fold the whole
6964 COND_EXPR, not just the condition.
6965
f62bf092
TV
69662016-01-18 Tom de Vries <tom@codesourcery.com>
6967
6968 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6969 classify as loop clause.
6970
e0a575ff
JJ
69712016-01-15 Jakub Jelinek <jakub@redhat.com>
6972
6973 PR bootstrap/68271
6974 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6975 C++ FE no longer has limit on number of pragmas.
6976
69772015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6978
6979 PR c++/69048
6980 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6981 to add missing cleanup point.
b6e3db06 6982
c7df95d8
DM
69832016-01-14 David Malcolm <dmalcolm@redhat.com>
6984
6985 PR c++/68819
6986 * c-indentation.c (get_visual_column): Add location_t param.
6987 Handle the column number being zero by effectively disabling the
6988 warning, with an "inform".
6989 (should_warn_for_misleading_indentation): Add location_t argument
6990 for all uses of get_visual_column.
6991
21efdd80
PP
69922016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6993
6994 PR c++/69029
6995 * c-indentation.c (should_warn_for_misleading_indentation):
6996 Don't warn about do-while statements.
6997
7a127fa7
MS
69982016-01-07 Martin Sebor <msebor@redhat.com>
6999
7000 PR c/68966
7001 * c-common.c (sync_resolve_size): Reject first argument when it's
7002 a pointer to _Bool.
7003
c589e975
DM
70042016-01-05 David Malcolm <dmalcolm@redhat.com>
7005
7006 PR c/69122
7007 * c-indentation.c (get_visual_column): Remove default argument.
7008 (should_warn_for_misleading_indentation): For the multiline case,
7009 update call to get_visual_column for next_stmt_exploc so that it
7010 captures the location of the first non-whitespace character in the
7011 relevant line. Don't issue warnings if there is non-whitespace
7012 before the next statement.
7013
818ab71a
JJ
70142016-01-04 Jakub Jelinek <jakub@redhat.com>
7015
7016 Update copyright years.
7017
745e411d
DM
70182015-12-21 David Malcolm <dmalcolm@redhat.com>
7019
7020 * c-common.c (binary_op_error): Convert first param from
7021 location_t to rich_location * and use it when emitting an error.
7022 * c-common.h (binary_op_error): Convert first param from
7023 location_t to rich_location *.
7024
de67c4c3
DM
70252015-12-16 David Malcolm <dmalcolm@redhat.com>
7026
7027 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7028 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7029
4a38b02b
IV
70302015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7031
7032 * c-common.c (c_common_attribute_table): Handle "omp declare target
7033 link" attribute.
7034
54d62f51
JJ
70352015-12-14 Jakub Jelinek <jakub@redhat.com>
7036
7037 PR c/68833
7038 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7039
8d4227c8
TB
70402014-12-12 Tobias Burnus <burnus@net-b.de>
7041
7042 PR fortran/68815
7043 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7044 specifiers (%d, %i,%u and %c).
7045
f6069ccc
DM
70462015-12-10 David Malcolm <dmalcolm@redhat.com>
7047
7048 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7049
63bbf46d
JJ
70502015-12-08 Jakub Jelinek <jakub@redhat.com>
7051
7052 PR c/48088
7053 PR c/68657
7054 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7055 * c-pragma.c (handle_pragma_diagnostic): Adjust
7056 control_warning_option caller.
7057
f79520bb
DM
70582015-12-07 David Malcolm <dmalcolm@redhat.com>
7059
7060 * c-common.c (c_cpp_error): Update for change to
7061 rich_location::set_range.
7062
b3d5bc62
JJ
70632015-12-04 Paolo Bonzini <bonzini@gnu.org>
7064
7065 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7066 shifting 1 out of the sign bit.
7067
70682015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7069
7070 * c-common.c (c_common_attribute_table[]): Update max arguments
7071 count for "simd" attribute.
7072 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7073
6eb4a537
JJ
70742015-12-03 Jakub Jelinek <jakub@redhat.com>
7075
7076 PR preprocessor/57580
7077 * c-ppoutput.c (print): Change printed field to bool.
7078 Move src_file last for smaller padding.
7079 (init_pp_output): Set print.printed to false instead of 0.
7080 (scan_translation_unit): Fix up formatting. Set print.printed
7081 to true after printing something other than newline.
7082 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7083 (maybe_print_line_1): Set print.printed to false instead of 0.
7084 (print_line_1): Likewise.
7085 (do_line_change): Set print.printed to true instead of 1.
7086 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7087 dump_macro): Set print.printed to false after printing newline.
7088
4250754e
JM
70892015-12-02 Jason Merrill <jason@redhat.com>
7090
f479b43d
JM
7091 * c-common.c (fold_for_warn): New.
7092 (warn_logical_operator, warn_tautological_cmp)
7093 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7094
4250754e
JM
7095 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7096 (c_fully_fold_internal, decl_constant_value_for_optimization):
7097 Move to c/c-fold.c.
7098 * c-common.h: Don't declare decl_constant_value_for_optimization.
7099
e9e32ee6
JM
71002015-12-02 Joseph Myers <joseph@codesourcery.com>
7101
7102 PR c/68162
7103 * c-common.h (c_build_qualified_type): Add extra default
7104 arguments.
7105
37d5ad46
JB
71062015-12-01 Julian Brown <julian@codesourcery.com>
7107 Cesar Philippidis <cesar@codesourcery.com>
7108 James Norris <James_Norris@mentor.com>
7109
7110 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7111 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7112 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7113
f07862c7
EB
71142015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7115
7116 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7117 (decl_sloc_common): Delete and move bulk of processing to...
7118 (decl_sloc): ...here.
7119 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7120 (dump_ada_double_name): Remove S parameter and compute the suffix.
7121 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7122 element type and deal with an anonymous one.
7123 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7124 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7125 and remove reference to QUAL_UNION_TYPE.
7126 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7127 (dump_nested_type): ...here. New function extracted from above.
7128 Generate a full declaration for anonymous element type of arrays.
7129 (print_ada_declaration): Really skip anonymous declarations. Remove
7130 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7131 Clean up processing of declarations of array types and objects.
7132 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7133 Remove obsolete code and tidy up.
7134
75c8aac3
JH
71352015-11-29 Jan Hubicka <hubicka@ucw.cz>
7136
7137 PR c/67581
7138 * c-common.c (handle_transparent_union_attribute): Update
7139 also type variants.
7140
b58d3df2
ML
71412015-11-27 Martin Liska <mliska@suse.cz>
7142
7143 PR c++/68312
7144 * array-notation-common.c (cilkplus_extract_an_triplets):
7145 Release vector of vectors.
7146 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7147
89a01fcf
EB
71482015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7149
7150 PR c++/68527
7151 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7152 (print_ada_struct_decl): Likewise.
7153
cc5c5226
IZ
71542015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7155
7156 PR c++/68001
7157 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7158 * cilk.c (recognize_spawn): Determine location in a more precise
7159 way.
7160
269adb9d
JM
71612015-11-19 Jason Merrill <jason@redhat.com>
7162
7163 * c-common.c (shorten_compare): But look through macros from
7164 system headers.
7165
d0eccfcd
JM
71662015-11-18 Jason Merrill <jason@redhat.com>
7167
7168 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7169 non-constant operand comes from a macro.
7170
3e44547c
JM
71712015-11-17 Jason Merrill <jason@redhat.com>
7172
7173 PR bootstrap/68346
7174 * c-common.c (warn_tautological_cmp): Fold before checking for
7175 constants.
7176
0f62c7a0
MP
71772015-11-16 Marek Polacek <polacek@redhat.com>
7178
7179 PR c++/68362
7180 * c-common.c (check_case_bounds): Fold low and high cases.
7181
a868811e
MP
71822015-11-16 Marek Polacek <polacek@redhat.com>
7183
7184 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7185 * c-common.c (c_common_get_alias_set): Likewise.
7186 (handle_visibility_attribute): Likewise.
7187
fff77217
KY
71882015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7189
7190 * c-common.c (handle_simd_attribute): New.
7191 (struct attribute_spec): Add entry for "simd".
7192 (handle_simd_attribute): New.
7193
269e63b7
KT
71942015-11-13 Kai Tietz <ktietz70@googlemail.com>
7195
7196 * c-lex.c (interpret_float): Use fold_convert.
7197
ebedc9a3
DM
71982015-11-13 David Malcolm <dmalcolm@redhat.com>
7199
7200 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7201 and store it on the result.
7202 * c-opts.c (c_common_init_options): Set
7203 global_dc->colorize_source_p.
7204
6e232ba4
JN
72052015-11-12 James Norris <jnorris@codesourcery.com>
7206 Joseph Myers <joseph@codesourcery.com>
7207
7365279f 7208 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7209 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7210 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7211 PRAGMA_OACC_CLAUSE_LINK.
7212
e78bede6
MP
72132015-11-11 Marek Polacek <polacek@redhat.com>
7214
7215 PR c/68107
7216 PR c++/68266
7217 * c-common.c (valid_array_size_p): New function.
7218 * c-common.h (valid_array_size_p): Declare.
7219
3f8257db 72202015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7221
7222 PR bootstrap/68271
7223 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7224
69f293c9
AM
72252015-11-11 Andrew MacLeod <amacleod@redhat.com>
7226
7227 * array-notation-common.c: Remove unused header files.
7228 * c-ada-spec.c: Likewise.
7229 * c-cilkplus.c: Likewise.
7230 * c-common.c: Likewise.
7231 * c-cppbuiltin.c: Likewise.
7232 * c-dump.c: Likewise.
7233 * c-format.c: Likewise.
7234 * c-gimplify.c: Likewise.
7235 * c-indentation.c: Likewise.
7236 * c-lex.c: Likewise.
7237 * c-omp.c: Likewise.
7238 * c-opts.c: Likewise.
7239 * c-pch.c: Likewise.
7240 * c-ppoutput.c: Likewise.
7241 * c-pragma.c: Likewise.
7242 * c-pretty-print.c: Likewise.
7243 * c-semantics.c: Likewise.
7244 * c-ubsan.c: Likewise.
7245 * cilk.c: Likewise.
7246 * stub-objc.c: Likewise.
7247
3a40d81d
NS
72482015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7249 Cesar Philippidis <cesar@codesourcery.com>
7250 James Norris <jnorris@codesourcery.com>
7251 Julian Brown <julian@codesourcery.com>
7252 Nathan Sidwell <nathan@codesourcery.com>
7253
7254 * c-pragma.c (oacc_pragmas): Add "routine".
7255 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7256
ee45a32d
EB
72572015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7258
7259 * c-common.c (c_common_attributes): Add scalar_storage_order.
7260 (handle_scalar_storage_order_attribute): New function.
7261 * c-pragma.c (global_sso): New variable.
7262 (maybe_apply_pragma_scalar_storage_order): New function.
7263 (handle_pragma_scalar_storage_order): Likewise.
7264 (init_pragma): Register scalar_storage_order.
7265 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7266 * c.opt (Wscalar-storage-order): New warning.
7267 (fsso-struct=): New option.
7268
eb11eb15
MS
72692015-11-08 Martin Sebor <msebor@redhat.com>
7270
7271 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7272
0aad0198
RS
72732015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7274
7275 * c-common.c: Don't undef DEF_BUILTIN.
7276
8a645150
DM
72772015-11-06 David Malcolm <dmalcolm@redhat.com>
7278
7279 * c-common.c (c_cpp_error): Convert parameter from location_t to
7280 rich_location *. Eliminate the "column_override" parameter and
7281 the call to diagnostic_override_column.
7282 Update the "done_lexing" clause to set range 0
7283 on the rich_location, rather than overwriting a location_t.
7284 * c-common.h (c_cpp_error): Convert parameter from location_t to
7285 rich_location *. Eliminate the "column_override" parameter.
7286
7a5e4956
CP
72872015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7288 Thomas Schwinge <thomas@codesourcery.com>
7289 James Norris <jnorris@codesourcery.com>
7290
7291 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7292 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7293 clauses with parallel and kernels and loops.
7294 * c-pragma.h (enum pragma_omp_clause): Add entries for
7295 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7296 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7297 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7298 INDEPENDENT,SEQ}.
7299 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7300
e2f5cc96
MS
73012015-11-05 Martin Sebor <msebor@redhat.com>
7302
7303 PR c++/67942
7304 * c.opt (-Wplacement-new): New option.
7305
e01d41e5
JJ
73062015-11-05 Jakub Jelinek <jakub@redhat.com>
7307
7308 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7309 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7310 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7311 save_expr or create_tmp_var* if TEST is true.
7312 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7313 Don't call add_stmt here.
7314 (struct c_omp_check_loop_iv_data): New type.
7315 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7316 c_omp_check_loop_iv_exprs): New functions.
7317 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7318 distribute.
7319 (c_omp_declare_simd_clauses_to_numbers): Change
7320 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7321 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7322 from numbers to PARM_DECLs.
7323
595278be
MM
73242015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7325
7326 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7327 flag_checking.
7328
3f8257db 73292015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7330
7331 PR c++-common/67882
b3d5bc62
JJ
7332 * c-common.h (fold_offsetof_1): Add argument.
7333 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7334 offsetof expressions that reference elements past the end of
7335 an array.
7336
4bf9e5a8
TS
73372015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7338 Chung-Lin Tang <cltang@codesourcery.com>
7339
7340 * c-pragma.c (oacc_pragmas): Add "atomic".
7341 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7342
3b1661a9
ES
73432015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7344
7345 * c-common.c (handle_target_clones_attribute): New.
7346 (c_common_attribute_table): Add handle_target_clones_attribute.
7347 (handle_always_inline_attribute): Add check on target_clones attribute.
7348 (handle_target_attribute): Ditto.
7349
2adfab87
AM
73502015-10-29 Andrew MacLeod <amacleod@redhat.com>
7351
7352 * array-notation-common.c: Reorder #include's and remove duplicates.
7353 * c-ada-spec.c: Likewise.
7354 * c-cilkplus.c: Likewise.
7355 * c-common.c: Likewise.
7356 * c-cppbuiltin.c: Likewise.
7357 * c-dump.c: Likewise.
7358 * c-format.c: Likewise.
7359 * c-gimplify.c: Likewise.
7360 * c-indentation.c: Likewise.
7361 * c-lex.c: Likewise.
7362 * c-omp.c: Likewise.
7363 * c-opts.c: Likewise.
7364 * c-pch.c: Likewise.
7365 * c-ppoutput.c: Likewise.
7366 * c-pragma.c: Likewise.
7367 * c-pretty-print.c: Likewise.
7368 * c-semantics.c: Likewise.
7369 * c-ubsan.c: Likewise.
7370 * cilk.c: Likewise.
7371 * stub-objc.c: Likewise.
7372
d90ec4f2
JM
73732015-10-28 Jason Merrill <jason@redhat.com>
7374
7375 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7376
88bae6f4
TS
73772015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7378 James Norris <jnorris@codesourcery.com>
7379 Cesar Philippidis <cesar@codesourcery.com>
7380
7381 PR c/64765
7382 PR c/64880
7383 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7384 * c-omp.c (c_oacc_split_loop_clauses): New function.
7385
b1726d6c
MS
73862015-10-21 Martin Sebor <msebor@redhat.com>
7387
7388 PR driver/68043
7389 * c.opt: End each sentence that describes an option with a period.
7390
fa60eeb9
MP
73912015-10-20 Marek Polacek <polacek@redhat.com>
7392
7393 * array-notation-common.c (is_cilkplus_vector_p): Define.
7394 * c-common.h (is_cilkplus_vector_p): Declare.
7395
95979049
MP
73962015-10-20 Marek Polacek <polacek@redhat.com>
7397
7398 * c.opt (std=gnu++11): Do not describe as experimental.
7399 (std=gnu++14): Likewise.
7400
2a9fb712
JM
74012015-10-19 Jason Merrill <jason@redhat.com>
7402
7403 * c-cppbuiltin.c (c_cpp_builtins): Define
7404 __cpp_nontype_template_args.
7405
13b380a3
JM
74062015-10-19 Jason Merrill <jason@redhat.com>
7407
7408 * c-cppbuiltin.c (c_cpp_builtins): Define
7409 __cpp_enumerator_attributes, __cpp_fold_expressions,
7410 __cpp_unicode_characters.
7411
d9a6bd32
JJ
74122015-10-13 Jakub Jelinek <jakub@redhat.com>
7413 Aldy Hernandez <aldyh@redhat.com>
7414
7415 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7416 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7417 (c_define_builtins): Likewise.
7418 * c-common.h (enum c_omp_clause_split): Add
7419 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7420 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7421 (c_finish_omp_for): Add ORIG_DECLV argument.
7422 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7423 201511 instead of 201307.
7424 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7425 OMP_CRITICAL_CLAUSES to it.
7426 (c_finish_omp_ordered): Add CLAUSES argument, set
7427 OMP_ORDERED_CLAUSES to it.
7428 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7429 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7430 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7431 constructs and new OpenMP 4.5 clauses. Clear
7432 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7433 verification code.
7434 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7435 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7436 (enum pragma_omp_clause): Add
7437 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7438 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7439
624d31fe
RS
74402015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7441
7442 * c-lex.c (interpret_float): Use real_equal instead of
7443 REAL_VALUES_EQUAL.
7444
b8fd7909
JM
74452015-10-04 Jason Merrill <jason@redhat.com>
7446
7447 Implement N4514, C++ Extensions for Transactional Memory.
7448 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7449 (c_common_attribute_table): Add transaction_safe_dynamic.
7450 transaction_safe now affects type identity.
7451 (handle_tm_attribute): Handle transaction_safe_dynamic.
7452 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7453 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7454 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7455 (D_TRANSMEM): New.
7456 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7457 * c-pretty-print.c (pp_c_attributes_display): Don't print
7458 transaction_safe in C++.
7459
12651878
MP
74602015-10-02 Marek Polacek <polacek@redhat.com>
7461
7462 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7463
3e3b8d63
MP
74642015-10-02 Marek Polacek <polacek@redhat.com>
7465
7466 PR c/64249
7467 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7468 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7469 * c.opt (Wduplicated-cond): New option.
7470
0d1a8f75
JM
74712015-10-01 Joseph Myers <joseph@codesourcery.com>
7472
7473 * c.opt (std=c11): Do not describe as experimental.
7474 (std=gnu11): Likewise.
7475 (std=iso9899:2011): Likewise.
7476
3e32ee19
NS
74772015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7478
7479 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7480 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7481
974348ee
MP
74822015-09-25 Marek Polacek <polacek@redhat.com>
7483
7484 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7485 (ubsan_instrument_shift): Likewise.
7486
15dbc1a6
MP
74872015-09-25 Marek Polacek <polacek@redhat.com>
7488
7489 PR sanitizer/64906
7490 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7491
6b95d7cc
PP
74922015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7493
7494 * c-indentation.c (should_warn_for_misleading_indentation):
7495 Compare next_stmt_vis_column with guard_line_first_nws instead
7496 of with guard_line_vis_column.
7497
c1822f9c
MLI
74982015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7499
7500 PR c/49654
7501 PR c/49655
7502 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7503 options and options not valid for the current language.
7504
d5398058
PP
75052015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7506
7507 * c-indentation.c (should_warn_for_misleading_indentation):
7508 Float out and consolidate the calls to get_visual_column that
7509 are passed guard_exploc as an argument. Compare
7510 next_stmt_vis_column with guard_line_first_nws instead of with
7511 body_line_first_nws.
7512
6b333269
NS
75132015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7514
7515 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7516 Wnamespaces): New C++ warnings.
7517
a75f1574
JM
75182015-09-22 Jason Merrill <jason@redhat.com>
7519
7520 * c-common.h (abi_compat_version_crosses): New.
7521 (warn_abi_version): Declare.
7522 * c-common.c: Define it.
7523 * c-opts.c (c_common_post_options): Handle it.
7524 flag_abi_compat_version defaults to 8.
7525
bdaaa8b7
VV
75262015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7527
7528 Complete the implementation of N4230, Nested namespace definition.
7529 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7530 __cpp_nested_namespace_definitions.
7531
eaa797e8
MLI
75322015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7533
7534 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7535
c4914de6
MLI
75362015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7537
7538 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7539 when warning.
7540 * c-pragma.h (pragma_lex): Add optional loc argument.
7541
fcb87c50
MM
75422015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7543
7544 * c-format.c (check_format_arg): Adjust to use common block size in all
7545 object pools.
7546
31bdd08a
DM
75472015-09-15 David Malcolm <dmalcolm@redhat.com>
7548
7549 * c-format.c (location_from_offset): Update for change in
7550 signature of location_get_source_line.
7551 * c-indentation.c (get_visual_column): Likewise.
7552 (line_contains_hash_if): Likewise.
7553
aa9f4b4c
MP
75542015-09-14 Marek Polacek <polacek@redhat.com>
7555
7556 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7557 setting various warnings.
7558
aa256c4a
MP
75592015-09-14 Marek Polacek <polacek@redhat.com>
7560
7561 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7562 a negative value.
7563
0f876f22
MW
75642015-09-11 Mark Wielaard <mjw@redhat.com>
7565
7566 PR c/28901
7567 * c.opt (Wunused-variable): Option from common.opt.
7568 (Wunused-const-variable): New option.
7569
273aa49e
PC
75702015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7571
7572 PR c++/53184
7573 * c.opt ([Wsubobject-linkage]): Add.
7574
1807ffc1
MS
75752015-09-03 Martin Sebor <msebor@redhat.com>
7576
7577 PR c/66516
7578 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7579 functions.
7580 * c-common.c (reject_gcc_builtin): Define.
7581
38942840
BI
75822015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7583
7584 PR middle-end/60586
7585 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7586 prototype.
7587 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7588 cilk_gimplify_call_params_in_spawned_fn.
7589 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7590 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7591 unwrapping.
7592
c316b5e4
MP
75932015-08-25 Marek Polacek <polacek@redhat.com>
7594
7595 PR middle-end/67330
7596 * c-common.c (handle_weak_attribute): Don't check whether the
7597 visibility can be changed here.
7598
584a7c46
MLI
75992015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7600
7601 * c-lex.c (c_lex_with_flags): Use explicit locations.
7602
a79683d5
TS
76032015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7604
7605 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7606 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7607
61717a45
FXC
76082015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7609
7610 PR middle-end/36757
7611 * c-common.c (check_builtin_function_arguments): Add check
7612 for BUILT_IN_SIGNBIT argument.
7613
329524f5
PC
76142015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7615
7616 PR c++/67160
7617 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7618 in c++1z mode.
7619
4ee55665
MP
76202015-08-17 Marek Polacek <polacek@redhat.com>
7621
7622 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7623 with whitespaces before qualifier names.
7624
b893e375
MP
76252015-08-12 Marek Polacek <polacek@redhat.com>
7626
7627 PR c++/55095
7628 * c-common.c (maybe_warn_shift_overflow): Properly handle
7629 left-shifting 1 into the sign bit.
7630
c2d89095
MLI
76312015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7632
7633 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7634
971e17ff
AS
76352015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7636 Braden Obrzut <admin@maniacsvault.net>
7637 Jason Merrill <jason@redhat.com>
7638
7639 Add C++ Concepts TS support.
7640 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7641 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7642 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7643 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7644 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7645 * c.opt (fconcepts): New.
7646
b3d5bc62
JJ
76472015-08-02 Martin Sebor <msebor@redhat.com>
7648
7649 * c.opt (-Wframe-address): New warning option.
7650
8ebca419
PP
76512015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7652
7653 * c-indentation.c (should_warn_for_misleading_indentation):
7654 Improve heuristics.
7655
1a1e101f
PP
76562015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7657
7658 * c-indentation.c (get_visual_column): Add parameter first_nws,
7659 use it. Update comment documenting the function.
7660 (is_first_nonwhitespace_on_line): Remove.
7661 (should_warn_for_misleading_indentation): Replace usage of
7662 of is_first_nonwhitespace_on_line with get_visual_column.
7663
992118a1
PP
76642015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7665
7666 * c-indentation.h (struct token_indent_info): Define.
7667 (get_token_indent_info): Define.
7668 (warn_for_misleading_information): Declare.
7669 * c-common.h (warn_for_misleading_information): Remove.
7670 * c-identation.c (warn_for_misleading_indentation):
7671 Change declaration to take three token_indent_infos. Adjust
7672 accordingly.
7673 * c-identation.c (should_warn_for_misleading_indentation):
7674 Likewise. Bail out early if the body is a compound statement.
7675 (guard_tinfo_to_string): Define.
7676
e8fa3817
JM
76772015-07-30 Jason Merrill <jason@redhat.com>
7678
7679 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7680 '*' for reference decay.
7681
173864e8
MP
76822015-07-30 Marek Polacek <polacek@redhat.com>
7683
7684 * c-common.c (warn_tautological_cmp): Bail for float types.
7685
f2afe6dd
MP
76862015-07-27 Marek Polacek <polacek@redhat.com>
7687
7688 PR bootstrap/67030
7689 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7690
05b28fd6
MP
76912015-07-27 Marek Polacek <polacek@redhat.com>
7692
7693 PR c++/66555
7694 PR c/54979
7695 * c-common.c (find_array_ref_with_const_idx_r): New function.
7696 (warn_tautological_cmp): New function.
7697 * c-common.h (warn_tautological_cmp): Declare.
7698 * c.opt (Wtautological-compare): New option.
7699
5a5062b8
MP
77002015-07-23 Marek Polacek <polacek@redhat.com>
7701
7702 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7703 (ubsan_instrument_shift): Likewise.
7704
dc891fe7
MP
77052015-07-23 Marek Polacek <polacek@redhat.com>
7706
7707 PR sanitizer/66908
7708 * c-ubsan.c: Include gimplify.h.
7709 (ubsan_instrument_division): Unshare OP0 and OP1.
7710 (ubsan_instrument_shift): Likewise.
7711
451b5e48
MP
77122015-07-20 Marek Polacek <polacek@redhat.com>
7713 Richard Sandiford <richard.sandiford@arm.com>
7714
7715 PR c++/55095
7716 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7717 Use EXPR_LOC_OR_LOC.
7718 (maybe_warn_shift_overflow): New function.
7719 * c-common.h (maybe_warn_shift_overflow): Declare.
7720 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7721 * c.opt (Wshift-overflow): New option.
7722
fb0b2914
ML
77232015-07-16 Martin Liska <mliska@suse.cz>
7724
7725 * c-format.c (static void check_format_info_main): Use
7726 object_allocator instead of pool_allocator.
7727 (check_format_arg): Likewise.
7728 (check_format_info_main): Likewise.
7729
903f5c23
AM
77302015-07-15 Andrew MacLeod <amacleod@redhat.com>
7731
7732 * c-opts.c: Remove multiline #include comment.
7733
026c3cfd
AH
77342015-07-12 Aldy Hernandez <aldyh@redhat.com>
7735
7736 * c-common.c: Fix double word typos.
7737
bb49ee66
EB
77382015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7739
7740 * c-ada-spec.h (cpp_operation): Revert latest change.
7741 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7742 constructors and destructors.
7743
1916bcb5
AM
77442015-07-09 Andrew MacLeod <amacleod@redhat.com>
7745
7746 * c-common.h: Adjust includes for flags.h changes.
7747 * stub-objc.c: Likewise.
026c3cfd 7748
a9dcd529
EB
77492015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7750
7751 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7752 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7753
b03b462f
JJ
77542015-07-08 Jakub Jelinek <jakub@redhat.com>
7755
7756 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7757 are to be removed, return NULL rather than original clauses list.
7758
c7131fb2
AM
77592015-07-07 Andrew MacLeod <amacleod@redhat.com>
7760
7761 * array-notation-common.c: Adjust includes.
7762 * c-ada-spec.c: Likewise.
7763 * c-cilkplus.c: Likewise.
7764 * c-common.h: Likewise.
7765 * c-cppbuiltin.c: Likewise.
7766 * c-dump.c: Likewise.
7767 * c-format.c: Likewise.
7768 * c-gimplify.c: Likewise.
7769 * c-indentation.c: Likewise.
7770 * c-lex.c: Likewise.
7771 * c-omp.c: Likewise.
7772 * c-opts.c: Likewise.
7773 * c-pch.c: Likewise.
7774 * c-ppoutput.c: Likewise.
7775 * c-pragma.c: Likewise.
7776 * c-pretty-print.c: Likewise.
7777 * c-semantics.c: Likewise.
7778 * c-ubsan.c: Likewise.
7779 * cilk.c: Likewise.
7780 * stub-objc.c: Likewise.
7781
2a7fb83f
EB
77822015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7783
7784 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7785 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7786
a03c9bf1
JM
77872015-07-01 Jason Merrill <jason@redhat.com>
7788
36a85135
JM
7789 * c-common.h (D_CXX11): Rename from D_CXX0X.
7790 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7791 * c-common.c: Adjust.
7792
e7fa68d5
JM
7793 * c-opts.c (c_common_post_options): Default to C++14.
7794
a03c9bf1
JM
7795 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7796
fe95b036
ESR
77972015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7798
7799 Implement N4197 - Adding u8 character literals
b3d5bc62 7800 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7801 CPP_CHAR.
b3d5bc62 7802 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7803 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7804 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7805 and CPP_UTF8CHAR tokens.
7806 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7807
da2e71c9
MLI
78082015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7809
7810 PR fortran/66605
7811 * c-common.c (do_warn_unused_parameter): Move here.
7812 * c-common.h (do_warn_unused_parameter): Declare.
7813
b155cfd9
MP
78142015-06-29 Marek Polacek <polacek@redhat.com>
7815
7816 PR c/66322
7817 * c-common.c (check_case_bounds): Add bool * parameter. Set
7818 OUTSIDE_RANGE_P.
7819 (c_add_case_label): Add bool * parameter. Pass it down to
7820 check_case_bounds.
7821 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7822 warning here.
7823 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7824 declarations.
7825
31521951
MP
78262015-06-27 Marek Polacek <polacek@redhat.com>
7827
7828 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7829 or VECTOR_INTEGER_TYPE_P throughout.
7830 * c-gimplify.c: Likewise.
7831
22d03525
MP
78322015-06-26 Marek Polacek <polacek@redhat.com>
7833
7834 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7835 * c-common.c (c_fully_fold_internal): Likewise.
7836 (c_alignof_expr): Likewise.
7837 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7838 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7839 * cilk.c (create_parm_list): Likewise.
22d03525 7840
af05e6e5
MP
78412015-06-26 Marek Polacek <polacek@redhat.com>
7842
7843 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7844
f0889939
AM
78452015-06-25 Andrew MacLeod <amacleod@redhat.com>
7846
7847 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7848 * c-gimplify.c: Likewise.
7849 * c-pragma.c: Likewise.
7850 * c-ubsan.c: Likewise.
7851 * cilk.c: Likewise.
7852
ca752f39
RS
78532015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7854
7855 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7856 ggc_hasher.
7857
16a16ec7
AM
78582015-06-25 Andrew MacLeod <amacleod@redhat.com>
7859
7860 * cilk.c: Move calls.h after tm.h in the include chain.
7861
0ae9bd27
MP
78622015-06-25 Marek Polacek <polacek@redhat.com>
7863
7864 * array-notation-common.c: Use VAR_P throughout.
7865 * c-ada-spec.c: Likewise.
7866 * c-common.c: Likewise.
7867 * c-format.c: Likewise.
7868 * c-gimplify.c: Likewise.
7869 * c-omp.c: Likewise.
7870 * c-pragma.c: Likewise.
7871 * c-pretty-print.c: Likewise.
7872 * cilk.c: Likewise.
7873
62f9079a
MP
78742015-06-25 Marek Polacek <polacek@redhat.com>
7875
7876 * cilk.c (extract_free_variables): Use is_global_var.
7877
0fa16060
RS
78782015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7879
7880 * c-common.c: Don't include target-def.h.
7881
a68ae2e1
MP
78822015-06-23 Marek Polacek <polacek@redhat.com>
7883
7884 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7885 when comparing INTEGER_CSTs.
7886
c6a2f2d9
PMR
78872015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7888
7889 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7890 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7891 (dump_ada_template): Skip partially specialized types.
7892
6b4db501
MM
78932015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7894
7895 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7896 swapping.
7897
abb226c9
AM
78982015-06-17 Andrew MacLeod <amacleod@redhat.com>
7899
7900 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7901 * c-ada-spec.c: Likewise.
7902 * c-cilkplus.c: Likewise.
7903 * c-common.c: Likewise.
7904 * c-common.h: Likewise.
7905 * c-cppbuiltin.c: Likewise.
7906 * c-dump.c: Likewise.
7907 * c-format.c: Likewise.
7908 * c-gimplify.c: Likewise.
7909 * c-indentation.c: Likewise.
7910 * c-lex.c: Likewise.
7911 * c-omp.c: Likewise.
7912 * c-opts.c: Likewise.
7913 * c-pch.c: Likewise.
7914 * c-ppoutput.c: Likewise.
7915 * c-pragma.c: Likewise.
7916 * c-pretty-print.c: Likewise.
7917 * c-semantics.c: Likewise.
7918 * c-ubsan.c: Likewise.
7919 * cilk.c: Likewise.
7920 * stub-objc.c: Likewise.
7921
076fecad
PP
79222015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7923
7924 PR c++/65168
7925 * c-common.c (c_common_truthvalue_conversion): Warn when
7926 converting an address of a reference to a truth value.
7927
13fdf2e2
AM
79282015-06-08 Andrew MacLeod <amacleod@redhat.com>
7929
7930 * array-notation-common.c : Adjust include files.
7931 * c-ada-spec.c : Likewise.
7932 * c-cilkplus.c : Likewise.
7933 * c-common.c : Likewise.
7934 * c-common.h : Likewise.
7935 * c-cppbuiltin.c : Likewise.
7936 * c-dump.c : Likewise.
7937 * c-format.c : Likewise.
7938 * c-gimplify.c : Likewise.
7939 * c-indentation.c : Likewise.
7940 * c-lex.c : Likewise.
7941 * c-omp.c : Likewise.
7942 * c-opts.c : Likewise.
7943 * c-pch.c : Likewise.
7944 * c-ppoutput.c : Likewise.
7945 * c-pragma.c : Likewise.
7946 * c-pretty-print.c : Likewise.
7947 * c-semantics.c : Likewise.
7948 * c-ubsan.c : Likewise.
7949 * cilk.c : Likewise.
7950 * stub-objc.c : Likewise.
7951
a1661b90
MP
79522015-06-08 Marek Polacek <polacek@redhat.com>
7953
7954 PR c/66415
7955 * c-format.c (location_from_offset): Return LOC if LINE is null.
7956
d7438551
AH
79572015-06-05 Aldy Hernandez <aldyh@redhat.com>
7958
7959 * c-common.h (c_parse_final_cleanups): New prototype.
7960 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7961
b3d5bc62
JJ
79622015-06-04 Sriraman Tallam <tmsriram@google.com>
7963
7964 * c-common.c (noplt): New attribute.
7965 (handle_noplt_attribute): New handler.
7966
ecb9f223
AM
79672015-06-04 Andrew MacLeod <amacleod@redhat.com>
7968
7969 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7970 * c-ada-spec.c: Likewise.
7971 * c-cilkplus.c: Likewise.
7972 * c-common.c: Likewise.
7973 * c-common.h: Likewise.
7974 * c-cppbuiltin.c: Likewise.
7975 * c-dump.c: Likewise.
7976 * c-format.c: Likewise.
7977 * c-gimplify.c: Likewise.
7978 * c-indentation.c: Likewise.
7979 * c-lex.c: Likewise.
7980 * c-omp.c: Likewise.
7981 * c-opts.c: Likewise.
7982 * c-pch.c: Likewise.
7983 * c-ppoutput.c: Likewise.
7984 * c-pragma.c: Likewise.
7985 * c-pretty-print.c: Likewise.
7986 * c-semantics.c: Likewise.
7987 * c-ubsan.c: Likewise.
7988 * cilk.c: Likewise.
7989 * stub-objc.c: Likewise.
7990
6ac48155
DM
79912015-06-02 David Malcolm <dmalcolm@redhat.com>
7992
7993 PR c/66220:
7994 * c-indentation.c (should_warn_for_misleading_indentation): Use
7995 expand_location rather than expand_location_to_spelling_point.
7996 Don't warn if the guarding statement is more indented than the
7997 next/body stmts.
7998
773ce42e
DM
79992015-06-02 David Malcolm <dmalcolm@redhat.com>
8000
8001 * c-indentation.c (warn_for_misleading_indentation): Bail out
8002 immediately if -Wmisleading-indentation isn't enabled.
8003
4fef8379
ML
80042015-06-01 Martin Liska <mliska@suse.cz>
8005
8006 * c-format.c (check_format_arg):Use new type-based pool allocator.
8007 (check_format_info_main) Likewise.
8008
1edfb384
EB
80092015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8010
8011 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8012 (has_nontrivial_methods): Likewise.
8013
9677ef52
MP
80142015-05-25 Marek Polacek <polacek@redhat.com>
8015
8016 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8017
fd5c817a
MP
80182015-05-22 Marek Polacek <polacek@redhat.com>
8019
8020 PR c/47043
8021 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8022
a2f45fe6 80232015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8024
8025 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8026 STACK_GROWS_DOWNWARD.
8027
a2f45fe6 80282015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8029
8030 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8031 STACK_GROWS_DOWNWARD rather than if it is defined.
8032
0fee2ac2 80332015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8034
0fee2ac2
MLI
8035 PR c/52952
8036 * c-format.c (location_column_from_byte_offset): New.
8037 (location_from_offset): New.
8038 (struct format_wanted_type): Add offset_loc field.
8039 (check_format_info): Move handling of location for extra arguments
8040 closer to the point of warning.
8041 (check_format_info_main): Pass the result of location_from_offset
8042 to warning_at.
8043 (format_type_warning): Pass the result of location_from_offset
8044 to warning_at.
8045
cf4ef6f7
MP
80462015-05-20 Marek Polacek <polacek@redhat.com>
8047
8048 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8049
3a65ee74
MP
80502015-05-20 Marek Polacek <polacek@redhat.com>
8051
8052 * c-ada-spec.c (dump_sloc): Use DECL_P.
8053
21b634ae
MP
80542015-05-20 Marek Polacek <polacek@redhat.com>
8055
8056 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8057 * c-common.c: Likewise.
8058
0e50b624
DM
80592015-05-19 David Malcolm <dmalcolm@redhat.com>
8060
8061 * c-common.h (fe_file_change): Strengthen param from
8062 const line_map * to const line_map_ordinary *.
8063 (pp_file_change): Likewise.
8064 * c-lex.c (fe_file_change): Likewise.
8065 (cb_define): Use linemap_check_ordinary when invoking
8066 SOURCE_LINE.
8067 (cb_undef): Likewise.
8068 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8069 invoking cb_file_change.
8070 (c_finish_options): Likewise.
8071 (push_command_line_include): Likewise.
8072 (cb_file_change): Strengthen param "new_map" from
8073 const line_map * to const line_map_ordinary *.
8074 * c-ppoutput.c (cb_define): Likewise for local "map".
8075 (pp_file_change): Likewise for param "map" and local "from".
8076
fab27f52
MM
80772015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8078
8079 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8080
2fe1d762
TV
80812015-05-18 Tom de Vries <tom@codesourcery.com>
8082
8083 * c-common.c (build_va_arg_1): New function.
8084 (build_va_arg): Add address operator to va_list operand if necessary.
8085
7a37fa90
MM
80862015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8087
8088 PR c/48956
8089 * c-common.c (int_safely_convertible_to_real_p): Define.
8090 (unsafe_conversion_p): Check conversions involving complex types.
8091 (conversion_warning): Add new warning message for conversions which
8092 discard imaginary component.
8093 * c-common.h: (enum conversion_safety): Add new enumerator for such
8094 conversions.
8095
3aa3c9fc
MP
80962015-05-14 Marek Polacek <polacek@redhat.com>
8097
8098 PR c/66066
8099 PR c/66127
8100 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8101 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8102 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8103 use it. If FOR_INT_CONST, require that all evaluated operands be
8104 INTEGER_CSTs.
8105
c3388e62
DM
81062015-05-12 David Malcolm <dmalcolm@redhat.com>
8107
8108 * c-common.h (warn_for_misleading_indentation): New prototype.
8109 * c-indentation.c: New file.
8110 * c.opt (Wmisleading-indentation): New option.
8111
c7b38fd5
TV
81122015-05-12 Tom de Vries <tom@codesourcery.com>
8113
8114 PR tree-optimization/66010
8115 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8116
381bf11e
JM
81172015-05-09 Jason Merrill <jason@redhat.com>
8118
edff0c06
JM
8119 * c-opts.c (c_common_post_options): Also clear
8120 cpp_opts->cpp_warn_cxx11_compat.
8121
129211bc
JM
8122 * c-common.h (enum cxx_dialect): Add cxx_unset.
8123 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8124 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8125
381bf11e
JM
8126 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8127 (std=gnu++0x): Mark as Undocumented.
8128 (std=gnu++1y): Add deprecated message.
8129
fe191308
JM
81302015-05-08 Jason Merrill <jason@redhat.com>
8131
765189ff
JM
8132 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8133 * c-opts.c: Adjust.
8134
fe191308
JM
8135 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8136
755e528f
MP
81372015-05-08 Marek Polacek <polacek@redhat.com>
8138
8139 PR c/64918
8140 * c.opt (Woverride-init-side-effects): New option.
8141
0173bd2a
MP
81422015-05-07 Marek Polacek <polacek@redhat.com>
8143
8144 PR c/65179
8145 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8146 negative value.
8147 * c.opt (Wshift-negative-value): New option.
8148 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8149 when -Wextra and C99/C++11 mode.
8150
e0f0d3b9
MP
81512015-05-07 Marek Polacek <polacek@redhat.com>
8152 Martin Uecker <uecker@eecs.berkeley.edu>
8153
8154 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8155 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8156
8243e2a9
JM
81572015-05-05 Jason Merrill <jason@redhat.com>
8158
8159 * c.opt (Wterminate): New.
8160
577cd070
MP
81612015-04-30 Marek Polacek <polacek@redhat.com>
8162
8163 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8164 require that the non-constant be of a boolean type.
8165
0373796b
JT
81662015-04-29 Josh Triplett <josh@joshtriplett.org>
8167
e0f0d3b9
MP
8168 * c-common.c (handle_section_attribute): Refactor to reduce
8169 nesting and distinguish between error cases.
0373796b 8170
716c0ba6
MP
81712015-04-29 Marek Polacek <polacek@redhat.com>
8172
8173 PR c/64610
8174 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8175 with 0/1.
8176
8848828b
JJ
81772015-04-29 Jakub Jelinek <jakub@redhat.com>
8178
8179 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8180 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8181 HOST_BITS_PER_WIDE_INT.
8182
ecd0e562
TV
81832015-04-28 Tom de Vries <tom@codesourcery.com>
8184
8185 PR tree-optimization/65887
8186 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8187
2a877204 81882015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8189 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8190
8191 * c-ada-spec.c (in_function): Delete.
8192 (dump_generic_ada_node): Do not change in_function and remove the
8193 redundant code dealing with it.
8194 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8195 (print_ada_methods): Output the static member functions in a nested
8196 package after the regular methods as well as associated renamings.
8197
4853031e
MP
81982015-04-24 Marek Polacek <polacek@redhat.com>
8199
8200 PR c/65830
8201 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8202 and OPT_Wshift_count_overflow.
8203
8c2b7f79
MP
8204 PR c/63357
8205 * c-common.c (warn_logical_operator): Warn if the operands have the
8206 same expressions.
8207
b8787813
MP
82082015-04-24 Marek Polacek <polacek@redhat.com>
8209
8210 PR c/61534
8211 * c-common.c (warn_logical_operator): Bail if either operand comes
8212 from a macro expansion.
8213
8fba1830
BRF
82142015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8215
8216 PR target/55143
8217 * c-common.c (c_default_pointer_mode): Add definition.
8218 * c-common.h (c_default_pointer_mode): Add declaration.
8219
17958621
JJ
82202015-03-11 Jakub Jelinek <jakub@redhat.com>
8221
8222 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8223 on record_builtin_type argument.
8224
7ccb1a11
JJ
82252015-03-10 Jakub Jelinek <jakub@redhat.com>
8226
8227 PR c/65120
8228 * c-common.c (warn_logical_not_parentheses): Don't warn for
8229 !x == 0 or !x != 0.
8230
04fd785e
MP
82312015-03-07 Marek Polacek <polacek@redhat.com>
8232
8233 PR sanitizer/65280
8234 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8235 before trying to figure out whether we have a flexible array member.
8236
a4e26206 82372015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8238 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8239
8240 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8241
0d2489f4
EB
82422015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8243
8244 PR ada/65319
8245 * c-ada-spec.c (print_destructor): Remove obsolete code.
8246
83ed54d7
EB
82472015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8248
8249 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8250 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8251 DECL_TEMPLATE_RESULT emulations.
8252 (dump_ada_template)): Add guard for TYPE_METHODS.
8253
7631f0e2
MP
82542015-02-27 Marek Polacek <polacek@redhat.com>
8255
8256 PR c/65040
8257 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8258
d1783ae5
KT
82592015-02-27 Kai Tietz <ktietz@redhat.com>
8260
8261 PR c/35330
8262 * c-pragma.c (handle_pragma_weak): Do not try to create
8263 weak/alias of declarations not being function, or variable
8264 declarations.
8265
56a9f6bc
TS
82662015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8267
8268 PR libgomp/64625
8269 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8270 Remove macros.
8271 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8272
3d5cb23d
MP
82732015-02-16 Marek Polacek <polacek@redhat.com>
8274
8275 PR c/65066
8276 * c-format.c (check_format_types): Handle null param.
8277
fa008882
MP
82782015-02-13 Marek Polacek <polacek@redhat.com>
8279
8280 PR c/65040
8281 * c-format.c (check_format_types): Don't warn about different
8282 signedness if the original value is in the range of WANTED_TYPE.
8283
785f21af
JM
82842015-02-12 Jason Merrill <jason@redhat.com>
8285
8286 PR c++/64956
8287 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8288 to the current highest version.
8289 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8290
4886ec8e
JJ
82912015-02-04 Jakub Jelinek <jakub@redhat.com>
8292
8293 PR c/64824
8294 PR c/64868
8295 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8296 instead of RDIV_EXPR. Use build_binary_op instead of
8297 build2_loc.
8298
40fecdd6
JM
82992015-01-30 Joseph Myers <joseph@codesourcery.com>
8300
8301 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8302 to pass input_location as first argument.
8303
a0c88d06
TV
83042015-01-23 Tom de Vries <tom@codesourcery.com>
8305
8306 PR libgomp/64672
8307 * c.opt (fopenacc): Mark as LTO option.
8308
1506ae0e
TV
83092015-01-23 Tom de Vries <tom@codesourcery.com>
8310
8311 PR libgomp/64707
8312 * c.opt (fopenmp): Mark as LTO option.
8313
31be63ab
JJ
83142015-01-21 Jakub Jelinek <jakub@redhat.com>
8315
8316 PR c/63307
b1726d6c 8317 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8318 (compare_decls): Fix up formatting.
8319
83202015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8321
8322 PR c/63307
8323 * cilk.c: Include vec.h.
8324 (struct cilk_decls): New structure.
8325 (wrapper_parm_cb): Split this function to...
8326 (fill_decls_vec): ...this...
8327 (create_parm_list): ...and this.
8328 (compare_decls): New function.
8329 (for_local_cb): Remove.
8330 (wrapper_local_cb): Ditto.
8331 (build_wrapper_type): For now first traverse and fill vector of
8332 declarations then sort it and then deal with sorted vector.
8333 (cilk_outline): Ditto.
8334 (declare_one_free_variable): Ditto.
8335
6875457f
JM
83362015-01-21 Jason Merrill <jason@redhat.com>
8337
8338 PR c++/64629
8339 * c-format.c (check_format_arg): Call decl_constant_value.
8340
185c9e56
ML
83412015-01-19 Martin Liska <mliska@suse.cz>
8342
8343 * c-common.c (handle_noicf_attribute): New function.
8344
41dbbb37
TS
83452015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8346 Bernd Schmidt <bernds@codesourcery.com>
8347 James Norris <jnorris@codesourcery.com>
8348 Cesar Philippidis <cesar@codesourcery.com>
8349 Ilmir Usmanov <i.usmanov@samsung.com>
8350 Jakub Jelinek <jakub@redhat.com>
8351
8352 * c.opt (fopenacc): New option.
8353 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8354 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8355 New macros.
8356 * c-common.h (c_finish_oacc_wait): New prototype.
8357 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8358 (c_finish_oacc_wait): New function.
8359 * c-pragma.c (oacc_pragmas): New variable.
8360 (c_pp_lookup_pragma, init_pragma): Handle it.
8361 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8362 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8363 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8364 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8365 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8366 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8367 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8368 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8369 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8370 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8371 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8372 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8373 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8374 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8375 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8376 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8377 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8378 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8379 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8380 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8381 PRAGMA_OACC_CLAUSE_WORKER.
8382
3f8257db 83832015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8384
8385 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8386 for the new option fstack-protector_explicit.
8387 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8388 (handle_stack_protect_attribute): New function.
8389
3f8257db 83902015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8391
8392 * c.opt: New option -Warray-bounds=.
8393
adfac8df
JJ
83942015-01-09 Michael Collison <michael.collison@linaro.org>
8395
8396 * array-notation-common.c: Include hash-set.h, machmode.h,
8397 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8398 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8399 * c-ada-spec.c: Ditto.
8400 * c-cilkplus.c: Ditto.
8401 * c-common.c: Include input.h due to flattening of tree.h.
8402 Define macro GCC_C_COMMON_C.
8403 * c-common.h: Flatten tree.h header files into c-common.h.
8404 Remove include of tree-core.h.
8405 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8406 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8407 fold-const.h, wide-int.h, and inchash.h due to
8408 flattening of tree.h.
8409 * c-dump.c: Ditto.
8410 * c-format.c: Flatten tree.h header files into c-common.h.
8411 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8412 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8413 fold-const.h, wide-int.h, and inchash.h due to
8414 flattening of tree.h.
8415 * c-dump.c: Include hash-set.h, machmode.h,
8416 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8417 fold-const.h, wide-int.h, and inchash.h due to
8418 flattening of tree.h.
8419 * c-format.c: Include hash-set.h, machmode.h,
8420 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8421 fold-const.h, wide-int.h, inchash.h and real.h due to
8422 flattening of tree.h.
8423 * c-gimplify.c: Include hash-set.h, machmode.h,
8424 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8425 fold-const.h, wide-int.h, and inchash.h due to
8426 flattening of tree.h.
8427 * cilk.c: Ditto.
8428 * c-lex.c: Ditto.
8429 * c-omp.c: Ditto.
8430 * c-opts.c: Ditto.
8431 * c-pch.c: Ditto.
8432 * c-ppoutput.c: Ditto.
8433 * c-pragma.c: Ditto.
8434 * c-pretty-print.c: Ditto.
8435 * c-semantics.c: Ditto.
8436 * c-ubsan.c: Ditto.
8437 * stub-objc.c: Ditto.
8438
f5481fc4
JM
84392015-01-08 Jason Merrill <jason@redhat.com>
8440
8441 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8442 do_ubsan_in_current_function.
8443 (ubsan_maybe_instrument_reference_or_call): Likewise.
8444 * c-ubsan.h: Declare it.
8445
de35aa66
MS
84462015-01-08 Mike Stump <mikestump@comcast.net>
8447
8448 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8449
4a9a42ab
MP
84502015-01-07 Marek Polacek <polacek@redhat.com>
8451
8452 PR c/64440
8453 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8454 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8455
2f42e5de
TS
84562015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8457
8458 PR c++/31397
8459 * c.opt (Wsuggest-override): New option.
8460
5624e564
JJ
84612015-01-05 Jakub Jelinek <jakub@redhat.com>
8462
8463 Update copyright years.
8464
5bd012f8
MP
84652015-01-05 Marek Polacek <polacek@redhat.com>
8466
8467 PR c/64423
8468 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8469 parameter. Use it.
8470 * c-common.h (warn_array_subscript_with_type_char): Update
8471 declaration.
8472
a7fa8d18
ESR
84732014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8474
8475 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8476 Control macro with flag_sized_deallocation.
8477
3f8257db 84782014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8479
8480 * c.opt (Wdiscarded-array-qualifiers): New option.
8481
1f8d3e84
JJ
84822014-12-19 Jakub Jelinek <jakub@redhat.com>
8483
8484 PR preprocessor/63831
8485 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8486 and __has_cpp_attribute here.
8487 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8488 c_common_has_attribute.
8489 * c-common.h (c_common_has_attribute): New prototype.
8490 * c-lex.c (init_c_lex): Set cb->has_attribute to
8491 c_common_has_attribute instead of cb_has_attribute.
8492 (get_token_no_padding): New function.
8493 (cb_has_attribute): Renamed to ...
8494 (c_common_has_attribute): ... this. No longer static. Use
8495 get_token_no_padding, require ()s, don't build TREE_LIST
8496 unnecessarily, fix up formatting, adjust diagnostics, call
8497 init_attributes.
8498
20b06add
JM
84992014-12-15 Jason Merrill <jason@redhat.com>
8500
8501 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8502 (-Wsized-deallocation): New.
8503 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8504 to on in C++14 and up.
8505
94a073b2
JM
85062014-12-11 Jason Merrill <jason@redhat.com>
8507
acaa5911
JM
8508 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8509
94a073b2
JM
8510 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8511 we aren't complaining about VLAs.
8512
7fb66c15
MP
85132014-12-06 Marek Polacek <polacek@redhat.com>
8514
8515 PR tree-optimization/64183
8516 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8517 shift-expression if it is integer_type_node. Use types_compatible_p.
8518
b731b390
JJ
85192014-11-29 Jakub Jelinek <jakub@redhat.com>
8520
8521 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8522 last argument from create_tmp_var_raw and create_tmp_var calls.
8523 * cilk.c (gimplify_cilk_spawn): Likewise.
8524 * c-omp.c (c_finish_omp_atomic): Likewise.
8525
6a4da643
MP
85262014-11-28 Marek Polacek <polacek@redhat.com>
8527
8528 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8529 instead of unsigned_type_node.
8530
541e35a6
MP
85312014-11-28 Marek Polacek <polacek@redhat.com>
8532
8533 PR c/63862
8534 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8535 to op1_utype.
8536 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8537 expression to unsigned_type_node.
8538
dcc97066
MW
85392014-11-20 Mark Wielaard <mjw@redhat.com>
8540
8541 PR debug/38757
8542 * c-opts.c (set_std_c89): Set lang_hooks.name.
8543 (set_std_c99): Likewise.
8544 (set_std_c11): Likewise.
8545 (set_std_cxx98): Likewise.
8546 (set_std_cxx11): Likewise.
8547 (set_std_cxx14): Likewise.
8548 (set_std_cxx1z): Likewise.
8549
aa7da51a
JJ
85502014-11-21 Jakub Jelinek <jakub@redhat.com>
8551
8552 PR target/63764
8553 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8554 return type to bool.
009a3480 8555 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8556 (convert_vector_to_pointer_for_subscript): Change return type to
8557 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8558 and copy it into a TARGET_EXPR and use that instead of *vecp
8559 directly.
8560
538dd0b7
DM
85612014-11-19 David Malcolm <dmalcolm@redhat.com>
8562
8563 Merger of git branch "gimple-classes-v2-option-3".
8564 * ChangeLog.gimple-classes: New.
8565 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8566 from being just a vec<gimple> to a vec<gbind *>.
8567
c39a5e99
JJ
85682014-11-18 Jakub Jelinek <jakub@redhat.com>
8569
8570 PR sanitizer/63813
8571 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8572 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8573 get_pointer_alignment for non-pointers. Use ptype, or if it is
8574 reference type, corresponding pointer type, as type of kind
8575 argument.
8576 (ubsan_maybe_instrument_reference,
8577 ubsan_maybe_instrument_member_call): Adjust callers.
8578
8537a4a9
MP
85792014-11-15 Marek Polacek <polacek@redhat.com>
8580
8581 PR middle-end/63884
8582 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8583 for NULL fndecl.
8584 (extract_array_notation_exprs): Return for NULL node.
8585
2079956a
JM
85862014-11-12 Joseph Myers <joseph@codesourcery.com>
8587
8588 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8589 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8590
1304953e
JJ
85912014-11-12 Jakub Jelinek <jakub@redhat.com>
8592
8593 PR c/59708
8594 * c-common.c (check_builtin_function_arguments): Handle
8595 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8596
e5e44252
AK
85972014-11-10 Andi Kleen <ak@linux.intel.com>
8598
8599 PR c/60804
8600 * c-common.h (check_no_cilk): Declare.
8601 * cilk.c (get_error_location): New function.
8602 (check_no_cilk): Dito.
8603
e64b984d
AK
86042014-11-10 Andi Kleen <ak@linux.intel.com>
8605
8606 * cilk.c (recognize_spawn): Use expression location
8607 for error message.
8608
13c21655
PC
86092014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8610
8611 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8612
42fd12b1
ESR
86132014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8614
8615 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8616 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8617 (__cpp_range_based_for, __cpp_initializer_lists,
8618 __cpp_delegating_constructors, __cpp_nsdmi,
8619 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8620 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8621 __has_cpp_attribute.
8622 * c-lex.c (cb_has_attribute): New callback CPP function;
8623 (init_c_lex): Set has_attribute callback.
8624
6f450181
RB
86252014-11-04 Richard Biener <rguenther@suse.de>
8626
8627 * c-common.c (shorten_compare): Do not shorten mixed
8628 DFP and non-DFP compares.
8629
26f0e1d6
ESR
86302014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8631
8632 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8633 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8634 Commentary and rearrangement of tests.
8635 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8636 Commentary and rearrangement of tests.
ab20d992 8637 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8638 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8639
ef4bddc2
RS
86402014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8641
8642 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8643 enum from machine_mode.
8644
c582198b
AM
86452014-10-28 Andrew MacLeod <amacleod@redhat.com>
8646
adfac8df
JJ
8647 * c-common.c: Adjust include files.
8648 * c-gimplify.c: Ditto.
8649 * cilk.c: Ditto.
8650 * c-pragma.c: Ditto.
8651 * c-ubsan.c: Ditto.
c582198b 8652
60393bbc
AM
86532014-10-27 Andrew MacLeod <amacleod@redhat.com>
8654
8655 * c-gimplify.c: Adjust include files.
8656
d723bb7c
MLI
86572014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8658
8659 PR c++/53061
8660 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8661 c_common_initialize_diagnostics.
8662 * c-common.h: Likewise.
8663
90f3520e
MP
86642014-10-24 Marek Polacek <polacek@redhat.com>
8665
8666 PR c/56980
8667 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8668 print "struct"/"union"/"enum" for typedefed names.
8669
59d7607a
MP
86702014-10-23 Marek Polacek <polacek@redhat.com>
8671
8672 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8673 in unsigned type.
8674
d95a2703
JJ
86752014-10-22 Jakub Jelinek <jakub@redhat.com>
8676 Yury Gribov <y.gribov@samsung.com>
8677
8678 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8679 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8680 instead of flag_sanitize_recover as bool flag.
8681
8e6ef852
KY
86822014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8683
8684 * cilk.c: Revert previous change.
8685
948cf550
IZ
86862014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8687
8688 PR c/63307
8689 * cilk.c: Include vec.h.
8690 (struct cilk_decls): New structure.
8691 (wrapper_parm_cb): Split this function to...
8692 (fill_decls_vec): ...this...
8693 (create_parm_list): ...and this.
8694 (compare_decls): New function.
8695 (for_local_cb): Remove.
8696 (wrapper_local_cb): Ditto.
8697 (build_wrapper_type): For now first traverse and fill vector of
8698 declarations then sort it and then deal with sorted vector.
8699 (cilk_outline): Ditto.
8700 (declare_one_free_variable): Ditto.
8701
92574c7c
MP
87022014-10-17 Marek Polacek <polacek@redhat.com>
8703
8704 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8705 * c.opt (Wimplicit-int): Initialize to -1.
8706
83685514
AM
87072014-10-16 Andrew MacLeod <amacleod@redhat.com>
8708
8709 * c-pragma.c: Adjust include files.
8710 * c-semantics.c: Likewise.
8711
5b8300ea
DD
87122014-10-16 DJ Delorie <dj@redhat.com>
8713
8714 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8715 multiples of bytes.
8716
5f83e90b
JM
87172014-10-14 Jason Merrill <jason@redhat.com>
8718
8719 PR c++/63455
8720 * c-common.h (CPP_PREPARSED_EXPR): New.
8721 (N_CP_TTYPES): Adjust.
8722
d73326ca
MP
87232014-10-15 Marek Polacek <polacek@redhat.com>
8724
8725 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8726
78a7c317
DD
87272014-10-14 DJ Delorie <dj@redhat.com>
8728
8729 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8730 types, not just __int128.
8731 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8732 types, not just __int128.
8733 (cpp_atomic_builtins): Round pointer sizes up.
8734 (type_suffix): Use type precision, not specific types.
8735 * c-common.c (c_common_reswords): Remove __int128 special case.
8736 (c_common_type_for_size): Check for all __intN types, not just
8737 __int128.
8738 (c_common_type_for_mode): Likewise.
8739 (c_common_signed_or_unsigned_type): Likewise.
8740 (c_build_bitfield_integer_type): Likewise.
8741 (c_common_nodes_and_builtins): Likewise.
8742 (keyword_begins_type_specifier): Likewise.
8743 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8744 __intN variants.
8745
2a22f99c
TS
87462014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8747
8748 * c-common.c: Use hash_table instead of hashtab.
8749
2a8ef767
ESR
87502014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8751
adfac8df 8752 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8753 C++11 section.
8754
3c9aabbd
MG
87552014-10-03 Marc Glisse <marc.glisse@inria.fr>
8756
8757 PR c++/54427
8758 PR c++/57198
8759 PR c++/58845
8760 * c-common.c (warn_logical_operator): Punt for vectors.
8761
a15f7cb8
ESR
87622014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8763
8764 Implement SD-6: SG10 Feature Test Recommendations
8765 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8766 macros and the __has_header macro.
8767
8d0cf15e
JM
87682014-09-30 Jason Merrill <jason@redhat.com>
8769
dd5d5481
JM
8770 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8771 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8772 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8773
b752325e
JM
8774 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8775 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8776
8d0cf15e
JM
8777 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8778 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8779
083e891e
MP
87802014-09-24 Marek Polacek <polacek@redhat.com>
8781
8782 PR c/61405
8783 PR c/53874
8784 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8785
7861b648
AK
87862014-09-23 Andi Kleen <ak@linux.intel.com>
8787
8788 * c-common.c (handle_no_reorder_attribute): New function.
8789 (c_common_attribute_table): Add no_reorder attribute.
8790
9a79452d
JM
87912014-09-22 Joseph Myers <joseph@codesourcery.com>
8792
8793 * c-cppbuiltin.c (c_cpp_builtins): Define
8794 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8795 modes.
8796
dd69f047
JM
87972014-09-18 Joseph Myers <joseph@codesourcery.com>
8798
8799 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8800 for supported floating-point modes.
8801
737a4826
MLI
88022014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8803
8804 * c.opt (Wpsabi): Use LangEnabledBy.
8805 * c-opts.c (c_common_handle_option): Do not handle here.
8806
8cc4b7a2
JM
88072014-09-12 Joseph Myers <joseph@codesourcery.com>
8808
8809 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8810 macros for floating-point modes.
8811
179b5a55
MG
88122014-09-11 Marc Glisse <marc.glisse@inria.fr>
8813
8814 PR target/58757
8815 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8816 __*_DENORM_MIN__ without denormals.
8817
570a11fe
JJ
88182014-09-10 Jakub Jelinek <jakub@redhat.com>
8819
8820 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8821 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8822 ubsan_create_data callers.
8823 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8824 index is constant or BIT_AND_EXPR with constant mask and is
8825 small enough for the bound.
8826 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8827 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8828
b559c810
MLI
88292014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8830
8831 * c.opt: Add CppReason to various flags.
8832 (Wdate-time): Re-sort.
8833 * c-common.c: Include c-common.h earlier.
8834 (struct reason_option_codes_t): Delete.
8835 (c_option_controlling_cpp_error): Prefix global type and struct
8836 with cpp_.
8837
1ef33fd4
MLI
88382014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8839
8840 * c.opt (Wnormalized): New.
8841 (Wnormalized=): Use Enum and Reject Negative.
8842 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8843
66bb34c0
JM
88442014-09-08 Joseph Myers <joseph@codesourcery.com>
8845
8846 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8847 digits of floating-point modes if -fbuilding-libgcc.
8848
53d68b9f
JM
88492014-09-05 Joseph Myers <joseph@codesourcery.com>
8850
8851 * c-cppbuiltin.c (c_cpp_builtins): Also define
8852 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8853 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8854 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8855 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8856 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8857 __LIBGCC_STACK_GROWS_DOWNWARD__,
8858 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8859 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8860 __LIBGCC_DWARF_FRAME_REGISTERS__,
8861 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8862 __LIBGCC_STACK_POINTER_REGNUM__ and
8863 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8864 (builtin_define_with_value): Handle backslash-escaping in string
8865 macro values.
8866
f65586dc
RB
88672014-09-05 Richard Biener <rguenther@suse.de>
8868
8869 PR middle-end/63148
8870 * c-format.c (check_format_arg): Properly handle
8871 effectively signed POINTER_PLUS_EXPR offset.
8872
2b71f4a4
MLI
88732014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8874
8875 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8876 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8877 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8878 and Init.
8879 * c-opts.c (c_common_handle_option): Do not handle here.
8880 (sanitize_cpp_opts): Likewise.
8881 * c-common.c (struct reason_option_codes_t): Handle
8882 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8883
d2e4feca
MP
88842014-09-03 Marek Polacek <polacek@redhat.com>
8885
8886 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8887
9a771876
JJ
88882014-09-02 Jakub Jelinek <jakub@redhat.com>
8889 Balaji V. Iyer <balaji.v.iyer@intel.com>
8890 Igor Zamyatin <igor.zamyatin@intel.com>
8891
8892 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8893 * c-common.c (c_common_reswords): Added _Cilk_for.
8894 * c-common.h (enum rid): Added RID_CILK_FOR.
8895 (cilk_for_number_of_iterations): Add declaration.
8896 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8897 CILK_FOR.
8898 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8899 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8900
81b5d104
MLI
89012014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8902
8903 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8904 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8905 Wundef): Use CPP, Var and Init.
8906 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8907
b753b37b
MLI
89082014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8909
8910 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8911 * c-opts.c (c_common_handle_option): Do not handle here.
8912
028aee17
JM
89132014-08-25 Jason Merrill <jason@redhat.com>
8914
8915 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8916 -std=c++14 and -std=gnu++14, rather than the reverse.
8917 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8918 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8919 * c-common.h (cxx_dialect): Remove cxx1y.
8920
e4276ba5
ESR
89212014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8922
8923 * c-common.h (enum cxx_dialect): Add cxx14.
8924 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8925 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8926 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8927
a545cacd
JM
89282014-08-22 Jason Merrill <jason@redhat.com>
8929
8930 * c.opt (std=gnu++17): Fix alias.
8931
59ea0364
MP
89322014-08-22 Marek Polacek <polacek@redhat.com>
8933
8934 PR c++/62199
8935 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8936 check for vector types. Drop LHS argument.
8937 * c-common.h (warn_logical_not_parentheses): Adjust.
8938
596e808c
MLI
89392014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8940
8941 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8942 (Wmultichar): Likewise.
8943 (Wdate-time): Use C-family languages instead of Common. Use CPP
8944 and Var.
8945 * c-opts.c (c_common_handle_option): Do not handle the above
8946 options here.
8947 (sanitize_cpp_opts): Likewise.
8948
18767f65
MLI
89492014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8950
8951 PR fortran/44054
8952 * c-opts.c: Include tree-diagnostics.h.
8953 (c_diagnostic_finalizer): New.
8954 (c_common_initialize_diagnostics): Use it.
8955
b4413594
MLI
89562014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8957
8958 PR preprocessor/51303
8959 * c-common.c (struct reason_option_codes_t option_codes):
8960 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8961
43f9a13c
MLI
89622014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8963
8964 PR c/60975
8965 PR c/53063
8966 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8967 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8968 (c_common_post_options): Call init_global_opts_from_cpp.
8969 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8970
04159acf
MP
89712014-08-19 Marek Polacek <polacek@redhat.com>
8972
8973 PR c++/62153
8974 * c-common.c (maybe_warn_bool_compare): New function.
8975 * c-common.h (maybe_warn_bool_compare): Declare.
8976 * c.opt (Wbool-compare): New option.
8977
35aff4fb
MP
89782014-08-19 Marek Polacek <polacek@redhat.com>
8979
8980 * c.opt (Wc99-c11-compat): New option.
8981
177cce46
MP
89822014-08-19 Marek Polacek <polacek@redhat.com>
8983
8984 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8985 to warn_c90_c99_compat.
8986 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8987 to -1.
8988
6ae9194f
MLI
89892014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8990 Steven Bosscher <steven@gcc.gnu.org>
8991
8992 PR c/52952
8993 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8994 format_check_results.
8995 (check_function_format): Use true and add comment for boolean
8996 argument.
8997 (finish_dollar_format_checking): Use explicit location when warning.
8998 (check_format_info): Likewise.
8999 (check_format_arg): Set extra_arg_loc and format_string_loc.
9000 (check_format_info_main): Use explicit location when warning.
9001 (check_format_types): Pass explicit location.
9002 (format_type_warning): Likewise.
9003
8e54f6d3
MLI
90042014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9005
9006 PR fortran/44054
9007 * c-format.c: Handle Fortran flags.
9008
cd4e76fc
IZ
90092014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9010
9011 PR other/61962
9012 * array-notation-common.c (find_rank): Added handling for other
9013 types of references.
9014
f3bede71
MP
90152014-08-10 Marek Polacek <polacek@redhat.com>
9016
9017 PR c/51849
9018 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9019 * c.opt (Wc90-c99-compat): Add option.
9020
9f25a338
TS
90212014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9022
9023 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9024
62e4eb35
MP
90252014-08-03 Marek Polacek <polacek@redhat.com>
9026
ab20d992 9027 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9028 (c_add_case_label): Pass loc to check_case_value.
9029
b787e7a2
TS
90302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9031
9032 * cilk.c: Use hash_map instead of pointer_map.
9033
6e2830c3
TS
90342014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9035
9036 * c-gimplify.c: Use hash_set instead of pointer_set.
9037
a7ee52fb
IZ
90382014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9039
9040 PR middle-end/61455
9041 * array-notation-common.c (extract_array_notation_exprs): Handling
9042 of DECL_EXPR added.
9043
944fa280
JJ
90442014-08-01 Jakub Jelinek <jakub@redhat.com>
9045
9046 * c-common.h (min_align_of_type): Removed prototype.
9047 * c-common.c (min_align_of_type): Removed.
9048 * c-ubsan.h (ubsan_maybe_instrument_reference,
9049 ubsan_maybe_instrument_member_call): New prototypes.
9050 * c-ubsan.c: Include stor-layout.h and builtins.h.
9051 (ubsan_maybe_instrument_reference_or_call,
9052 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9053 functions.
9054
b4dfdc11
MG
90552014-07-31 Marc Glisse <marc.glisse@inria.fr>
9056
9057 PR c++/60517
9058 * c.opt (-Wreturn-local-addr): Move to common.opt.
9059
a41844e5
JM
90602014-07-30 Jason Merrill <jason@redhat.com>
9061
9062 PR c++/61659
9063 PR c++/61687
9064 Revert:
9065 * c.opt (-fuse-all-virtuals): New.
9066
976d5a22
TT
90672014-07-30 Tom Tromey <tromey@redhat.com>
9068
9069 PR c/59855
9070 * c.opt (Wdesignated-init): New option.
9071 * c-common.c (c_common_attribute_table): Add "designated_init".
9072 (handle_designated_init): New function.
9073
cdc94aca
MP
90742014-07-24 Marek Polacek <polacek@redhat.com>
9075
9076 PR c/57653
9077 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9078
f41373b6
DS
90792014-07-16 Dodji Seketeli <dodji@redhat.com>
9080
9081 PR preprocessor/60723 - missing system-ness marks for macro tokens
9082 * c-ppoutput.c (struct print::prev_was_system_token): New data
9083 member.
9084 (init_pp_output): Initialize it.
9085 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9086 (do_line_change): Return a flag saying if a line marker was
9087 emitted or not.
9088 (scan_translation_unit): Detect if the system-ness of the token we
9089 are about to emit is different from the one of the previously
9090 emitted token. If so, emit a line marker. Avoid emitting useless
9091 adjacent line markers. Avoid emitting line markers for tokens
9092 originating from the expansion of built-in macros.
9093 (scan_translation_unit_directives_only): Adjust.
9094
4d661eaa
MP
90952014-07-15 Marek Polacek <polacek@redhat.com>
9096
9097 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9098 TYPE_MAX_VALUE is NULL.
9099
b108f48f
JJ
91002014-07-14 Jakub Jelinek <jakub@redhat.com>
9101
9102 PR middle-end/61294
9103 * c.opt (Wmemset-transposed-args): New warning.
9104
c0221884
JM
91052014-07-10 Jason Merrill <jason@redhat.com>
9106
9107 PR c++/61659
9108 PR c++/61687
9109 * c.opt (-fuse-all-virtuals): New.
9110
63dfbb95
RB
91112014-07-09 Richard Biener <rguenther@suse.de>
9112
9113 PR c-family/61741
9114 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9115 using unsigned arithmetic if overflow does not wrap instead of
9116 if overflow is undefined.
9117
773ec47f
MP
91182014-07-06 Marek Polacek <polacek@redhat.com>
9119
9120 PR c/6940
9121 * c.opt (Wsizeof-array-argument): New option.
9122
00a7ba58
JJ
91232014-07-03 Jakub Jelinek <jakub@redhat.com>
9124
b1726d6c 9125 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9126 comments->count <= 1, as comments->entries might be NULL.
9127
52ec0ea3
MP
91282014-07-01 Marek Polacek <polacek@redhat.com>
9129
9130 * c.opt (Wint-conversion): New option.
9131
d5c3d343
MP
91322014-07-01 Marek Polacek <polacek@redhat.com>
9133
9134 PR c/58286
9135 * c.opt (Wincompatible-pointer-types): New option.
9136
6e7ceb17
PC
91372014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9138
9139 PR c++/51400
9140 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9141 Do not discard TYPE_QUALS of type.
9142
da73100b
JM
91432014-06-26 Jason Merrill <jason@redhat.com>
9144
9145 * c-common.h (enum cxx_dialect): Add cxx1z.
9146 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9147 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9148
08eedf75
TJ
91492014-06-26 Teresa Johnson <tejohnson@google.com>
9150
9151 * c-common.h (get_dump_info): Declare.
9152 * c-gimplify.c (c_genericize): Use saved dump files.
9153 * c-opts.c (c_common_parse_file): Begin and end dumps
9154 once around parsing invocation.
9155 (get_dump_info): New function.
9156
7b56b2f8
MP
91572014-06-23 Marek Polacek <polacek@redhat.com>
9158 Andrew MacLeod <amacleod@redhat.com>
9159
9160 PR c/61553
9161 * c-common.c (get_atomic_generic_size): Don't segfault if the
9162 type doesn't have a size.
9163
0e37a2f3
MP
91642014-06-20 Marek Polacek <polacek@redhat.com>
9165
9166 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9167 (ubsan_walk_array_refs_r): New function.
9168 (c_genericize): Instrument array bounds.
9169 * c-ubsan.c: Include "internal-fn.h".
9170 (ubsan_instrument_division): Mark instrumented arrays as having
9171 side effects. Adjust ubsan_type_descriptor call.
9172 (ubsan_instrument_shift): Likewise.
9173 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9174 (ubsan_instrument_bounds): New function.
9175 (ubsan_array_ref_instrumented_p): New function.
9176 (ubsan_maybe_instrument_array_ref): New function.
9177 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9178 (ubsan_array_ref_instrumented_p): Declare.
9179 (ubsan_maybe_instrument_array_ref): Declare.
9180
91812014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9182
9183 PR lto/61123
9184 * c.opt (fshort-enums): Add to LTO.
9185 * c.opt (fshort-wchar): Likewise.
9186
5c3d09f7
MP
91872014-06-16 Marek Polacek <polacek@redhat.com>
9188
9189 PR c/60439
9190 * c.opt (Wswitch-bool): Add Var.
9191
9cf32741
JJ
91922014-06-12 Jakub Jelinek <jakub@redhat.com>
9193
9194 PR middle-end/61486
9195 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9196 #pragma omp target teams or
9197 #pragma omp {,target }teams distribute simd.
9198
62984918
JM
91992014-06-12 Jason Merrill <jason@redhat.com>
9200
9201 * c.opt (Wabi=, fabi-compat-version): New.
9202 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9203 (c_common_post_options): Handle flag_abi_compat_version default.
9204 Disallow -fabi-compat-version=1.
9205 * c-common.h (abi_version_crosses): New.
9206
f961457f
JH
92072014-06-11 Jan Hubicka <hubicka@ucw.cz>
9208
adfac8df 9209 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9210 section names that are no longer trees.
9211
92d28cbb
JJ
92122014-06-10 Jakub Jelinek <jakub@redhat.com>
9213
9214 PR fortran/60928
9215 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9216 (omp_pragmas): ... back here.
9217
742938c9
MP
92182014-06-05 Marek Polacek <polacek@redhat.com>
9219
9220 PR c/49706
9221 * c-common.c (warn_logical_not_parentheses): New function.
9222 * c-common.h (warn_logical_not_parentheses): Declare.
9223 * c.opt (Wlogical-not-parentheses): New option.
9224
9d548dfb
MP
92252014-06-04 Marek Polacek <polacek@redhat.com>
9226
9227 PR c/30020
9228 * c-common.c (check_case_bounds): Add location parameter.
9229 Use it.
9230 (c_add_case_label): Pass loc to check_case_bounds.
9231
fedfecef
MP
92322014-06-03 Marek Polacek <polacek@redhat.com>
9233
9234 PR c/60439
9235 * c.opt (Wswitch-bool): New option.
9236
f6a7cffc
TS
92372014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9238
040d18b6
TS
9239 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9240 Remove prototypes.
9241 (record_types_used_by_current_var_decl): Move prototype to where
9242 it belongs.
9243
f6a7cffc
TS
9244 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9245 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9246 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9247
632f2871
RS
92482014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9249
9250 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9251 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9252 void_zero_node.
9253 * c-pretty-print.c (pp_c_void_constant): New function.
9254 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9255 (c_pretty_printer::expression): Handle VOID_CST.
9256 * cilk.c (extract_free_variables): Likewise.
9257 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9258 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9259
766090c2
TS
92602014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9261
9262 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9263 * c-pragma.c (push_alignment): Adjust.
9264 (handle_pragma_push_options): Likewise.
9265
661a0813
MP
92662014-05-09 Marek Polacek <polacek@redhat.com>
9267
9268 PR c/50459
9269 * c-common.c (check_user_alignment): Return -1 if alignment is error
9270 node.
9271 (handle_aligned_attribute): Don't call default_conversion on
9272 FUNCTION_DECLs.
9273 (handle_vector_size_attribute): Likewise.
9274 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9275 (handle_sentinel_attribute): Call default_conversion and allow even
9276 integral types as an argument.
9277
2793eeab
MP
92782014-05-08 Marek Polacek <polacek@redhat.com>
9279
9280 PR c/61053
9281 * c-common.c (min_align_of_type): New function factored out from...
9282 (c_sizeof_or_alignof_type): ...here.
9283 * c-common.h (min_align_of_type): Declare.
9284
f827930a
MP
92852014-05-08 Marek Polacek <polacek@redhat.com>
9286
9287 PR c/61077
9288 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9289 parameter type of main.
9290
ca49b74e
DD
92912014-05-07 DJ Delorie <dj@redhat.com>
9292
9293 * c-cppbuiltin.c (print_bits_of_hex): New.
9294 (builtin_define_type_minmax): Print values using hex so as not to
9295 require a pre-computed list of string values.
9296
1d60af08
KZ
92972014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9298 Mike Stump <mikestump@comcast.net>
9299 Richard Sandiford <rdsandiford@googlemail.com>
9300
9301 * c-ada-spec.c: Include wide-int.h.
9302 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9303 (dump_generic_ada_node): Use wide-int interfaces.
9304 * c-common.c: Include wide-int-print.h.
9305 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9306 (pointer_int_sum): Use wide-int interfaces.
9307 (c_common_nodes_and_builtins): Use make_int_cst.
9308 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9309 (handle_alloc_size_attribute): Use wide-int interfaces.
9310 (get_nonnull_operand): Likewise.
9311 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9312 * c-lex.c: Include wide-int.h.
9313 (narrowest_unsigned_type): Take a widest_int rather than two
9314 HOST_WIDE_INTs.
9315 (narrowest_signed_type): Likewise.
9316 (interpret_integer): Update accordingly. Use wide-int interfaces.
9317 (lex_charconst): Use wide-int interfaces.
9318 * c-pretty-print.c: Include wide-int.h.
9319 (pp_c_integer_constant): Use wide-int interfaces.
9320 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9321 INT_CST_LT_UNSIGNED.
9322
b15458be
RB
93232014-05-06 Richard Biener <rguenther@suse.de>
9324
9325 * c-opts.c (c_common_post_options): For -freestanding,
9326 -fno-hosted and -fno-builtin disable pattern recognition
9327 if not enabled explicitely.
9328
6577374e
MP
93292014-05-02 Marek Polacek <polacek@redhat.com>
9330
9331 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9332
d00887e8
MP
93332014-05-01 Marek Polacek <polacek@redhat.com>
9334
9335 PR c/43245
9336 * c.opt (Wdiscarded-qualifiers): Add.
9337
f8ed5150
MP
93382014-04-30 Marek Polacek <polacek@redhat.com>
9339
9340 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9341 INT_MIN / -1 sanitization only for integer types.
9342
45484dcf
MP
93432014-04-25 Marek Polacek <polacek@redhat.com>
9344
9345 PR c/18079
9346 * c-common.c (handle_noinline_attribute): Warn if the attribute
9347 conflicts with always_inline attribute.
9348 (handle_always_inline_attribute): Warn if the attribute conflicts
9349 with noinline attribute.
9350
38e514c0
MP
93512014-04-25 Marek Polacek <polacek@redhat.com>
9352
9353 PR c/60156
9354 * c-common.c (check_main_parameter_types): Warn about variadic main.
9355
44875f92
MS
93562014-04-24 Mike Stump <mikestump@comcast.net>
9357
9358 * c.opt (Wshadow-ivar): Default to on.
9359
dcaaa5a0
DP
93602014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9361
9362 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9363
c07d7c02
MP
93642014-04-23 Marek Polacek <polacek@redhat.com>
9365
9366 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9367
1c33c9b7
JJ
93682014-04-22 Jakub Jelinek <jakub@redhat.com>
9369
9370 PR sanitizer/60275
9371 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9372 if flag_sanitize_undefined_trap_on_error.
9373 (ubsan_instrument_division, ubsan_instrument_shift,
9374 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9375 if !flag_sanitize_recover.
9376
793c625f
MG
93772014-04-22 Marc Glisse <marc.glisse@inria.fr>
9378
9379 PR libstdc++/43622
9380 * c-common.c (registered_builtin_types): Make non-static.
9381 * c-common.h (registered_builtin_types): Declare.
9382
b0f1bf36 93832014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9384 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9385
9386 PR c/60819
9387 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9388 apply may-alias the scalar pointer type when applicable.
9389
3b07fa4a
IZ
93902014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9391
9392 PR middle-end/60467
9393 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9394 as possible argument for Cilk_spawn.
9395
cbbd2b1c
TB
93962014-04-11 Tobias Burnus <burnus@net-b.de>
9397
9398 PR c/60194
9399 * c.opt (Wformat-signedness): Add
9400 * c-format.c(check_format_types): Use it.
9401
6415bd5d
JM
94022014-04-11 Jason Merrill <jason@redhat.com>
9403
9404 PR c++/57926
9405 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9406 default_conversion for an array argument.
9407
6525783a
MP
94082014-04-08 Marek Polacek <polacek@redhat.com>
9409
9410 PR sanitizer/60745
9411 * c-ubsan.c: Include asan.h.
9412 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9413
880a467b
NS
94142014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9415
9416 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9417
7b59ff2d
MP
94182014-04-02 Marek Polacek <polacek@redhat.com>
9419
9420 * c-common.h (c_expand_expr): Remove declaration.
9421
8edbfaa6
JJ
94222014-03-28 Jakub Jelinek <jakub@redhat.com>
9423
9424 PR c++/60689
9425 * c-common.c (add_atomic_size_parameter): When creating new
9426 params vector, push the size argument first.
9427
07d72e1d
JJ
94282014-03-26 Jakub Jelinek <jakub@redhat.com>
9429
9430 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9431 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9432 ubsan_create_data callers.
9433
b35e0fa0
JJ
94342014-03-22 Jakub Jelinek <jakub@redhat.com>
9435
9436 PR debug/60603
9437 * c-opts.c (c_finish_options): Restore cb_file_change call to
9438 <built-in>.
9439
39a1ebb3
JJ
94402014-03-13 Jakub Jelinek <jakub@redhat.com>
9441
9442 PR middle-end/36282
9443 * c-pragma.c (apply_pragma_weak): Only look at
9444 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9445 DECL_ASSEMBLER_NAME_SET_P (decl).
9446 (maybe_apply_pending_pragma_weaks): Exit early if
9447 vec_safe_is_empty (pending_weaks) rather than only when
9448 !pending_weaks.
9449 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9450 set assembler name back to NULL afterwards.
9451
a07f6ed2
JM
94522014-03-11 Jason Merrill <jason@redhat.com>
9453
9454 * c.opt: Add -std=gnu++14.
9455
75b107f5
IB
94562014-03-11 Ian Bolton <ian.bolton@arm.com>
9457
9458 * c-opts.c (c_common_post_options): Don't override
9459 -ffp-contract=fast if unsafe-math-optimizations is on.
9460
f42c637e
PM
94612014-03-08 Paulo Matos <paulo@matos-sorge.com>
9462
22b15758 9463 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9464
70e24808
JM
94652014-03-07 Jason Merrill <jason@redhat.com>
9466
9467 * c.opt: Add -std=c++14.
9468
3af9c5e9
MP
94692014-03-06 Marek Polacek <polacek@redhat.com>
9470
9471 PR c/60197
9472 * cilk.c (contains_cilk_spawn_stmt): New function.
9473 (contains_cilk_spawn_stmt_walker): Likewise.
9474 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9475 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9476
b3bdf019
JJ
94772014-03-03 Jakub Jelinek <jakub@redhat.com>
9478
9479 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9480 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9481 even when flag_preprocess_only.
9482
ca7e759d
JM
94832014-02-26 Jason Merrill <jason@redhat.com>
9484
9485 PR c++/59231
9486 PR c++/11586
9487 * c-common.c (shorten_compare): Don't check
9488 c_inhibit_evaluation_warnings.
9489
28e41874
JJ
94902014-02-19 Jakub Jelinek <jakub@redhat.com>
9491
cca615af
JJ
9492 PR c/37743
9493 * c-common.c (c_common_nodes_and_builtins): When initializing
9494 c_uint{16,32,64}_type_node, also set corresponding
9495 uint{16,32,64}_type_node to the same value.
9496
28e41874
JJ
9497 PR c++/60267
9498 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9499 for PRAGMA_IVDEP if flag_preprocess_only.
9500
c2bf53a1
JJ
95012014-02-12 Jakub Jelinek <jakub@redhat.com>
9502
9503 PR c/60101
9504 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9505 if false, add ADD itself, rather than vice versa.
9506 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9507 copy. For SAVE_EXPR, only call merge_tlist once.
9508
8fcbce72
JJ
95092014-02-08 Jakub Jelinek <jakub@redhat.com>
9510
9511 PR middle-end/60092
9512 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9513 and tree_to_uhwi.
9514 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9515 functions.
9516 (c_common_attribute_table): Add alloc_align and assume_aligned
9517 attributes.
9518
0a756a3f
MP
95192014-02-06 Marek Polacek <polacek@redhat.com>
9520
9521 PR c/60087
9522 * c-common.c (warn_for_sign_compare): Call warning_at with location
9523 instead of warning.
9524
7ec4847a
MP
95252014-02-05 Marek Polacek <polacek@redhat.com>
9526
9527 PR c/53123
9528 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9529 statement.
9530
66f20604
MP
95312014-02-04 Marek Polacek <polacek@redhat.com>
9532
9533 PR c/60036
9534 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9535 SAVE_EXPR.
9536
5d77fb19
MG
95372014-02-03 Marc Glisse <marc.glisse@inria.fr>
9538
9539 PR c++/53017
9540 PR c++/59211
9541 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9542 handle_vector_size_attribute, handle_nonnull_attribute): Call
9543 default_conversion on the attribute argument.
9544 (handle_nonnull_attribute): Increment the argument number.
9545
81e5eca8
MP
95462014-01-31 Marek Polacek <polacek@redhat.com>
9547
9548 PR c/59963
9549 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9550 build_function_call_vec.
9551 (resolve_overloaded_builtin): Likewise.
9552 * c-common.h (build_function_call_vec): Adjust declaration.
9553
68fca595
MP
95542014-01-30 Marek Polacek <polacek@redhat.com>
9555
9556 PR c/59940
9557 * c-common.h (unsafe_conversion_p): Adjust declaration.
9558 (warnings_for_convert_and_check): Likewise.
9559 (convert_and_check): Likewise.
9560 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9561 expansion_point_location_if_in_system_header on it.
9562 (warnings_for_convert_and_check): Add location parameter. Call
9563 expansion_point_location_if_in_system_header on it. Use it.
9564 (convert_and_check): Add location parameter. Use it.
9565 (conversion_warning): Likewise.
9566 (c_add_case_label): Adjust convert_and_check calls.
9567 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9568
b72271b9
BI
95692014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9570
9571 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9572 flag_cilkplus.
9573 * c-pragma.c (init_pragma): Likewise.
9574 * c.opt: Likewise.
9575
393e8e8b
MP
95762014-01-23 Marek Polacek <polacek@redhat.com>
9577
9578 PR c/59846
9579 * c-common.c (shorten_compare): Add location_t parameter.
9580 * c-common.h (shorten_binary_op): Adjust declaration.
9581
f04dda30
MP
95822014-01-23 Marek Polacek <polacek@redhat.com>
9583
9584 PR c/58346
9585 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9586 * c-common.h: Declare it.
9587
621955cb
EB
95882014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9589
9590 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9591 * c-ada-spec.c (dump_ads): Likewise.
9592 (cpp_check): Likewise.
9593 (dump_ada_specs): Likewise.
9594
95952014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9596
9597 PR c++/49718
9598 * c-common.c (handle_no_instrument_function_attribute): Allow
9599 no_instrument_function attribute in class member
9600 definition/declaration.
9601
241f845a
JJ
96022014-01-15 Jakub Jelinek <jakub@redhat.com>
9603
9604 PR c/58943
9605 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9606 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9607 being COMPOUND_EXPR.
9608 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9609 operand a SAVE_EXPR and second MODIFY_EXPR.
9610
e83b8e2e
JJ
96112014-01-09 Jakub Jelinek <jakub@redhat.com>
9612
9613 PR target/58115
9614 * c-pch.c (c_common_write_pch): Call
9615 prepare_target_option_nodes_for_pch.
9616
23a5b65a
RS
96172014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9618
9619 Update copyright years
9620
f9030485
RS
96212014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9622
9623 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9624 the copyright notice.
9625
f2aa696b
EB
96262013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9627
9628 * c-ada-spec.c (print_constructor): New function.
9629 (print_destructor): Retrieve the origin of the destructor.
9630 (print_ada_declaration): Revamp handling of constructors/destructors.
9631
3f8257db 96322013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9633 Bill Maddox <maddox@google.com>
9634 Jason Merrill <jason@redhat.com>
9635
9636 * c.opt: Add -fdeclone-ctor-dtor.
9637 * c-opts.c (c_common_post_options): Default to on iff -Os.
9638
41958c28
BI
96392013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9640
9641 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9642 attribute.
9643 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9644 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9645 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9646 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9647 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9648 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9649 PRAGMA_CILK_CLAUSE_UNIFORM.
9650
b1726d6c 9651
12893402
BI
96522013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9653
9654 * cilk.c (cilk_outline): Made this function non-static.
9655 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9656 (create_cilk_wrapper): Added a new parameter: a function pointer.
9657 (c_install_body_w_frame_cleanup): Remove
9658 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9659 * c-common.h (cilk_outline): New prototype.
9660 (gimplify_cilk_spawn): Removed two parameters.
9661 (cilk_install_body_with_frame_cleanup): New prototype.
9662 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9663 CILK_SPAWN_STMT case.
9664
085b42ed
BS
96652013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9666
2ce064c3
BS
9667 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9668
085b42ed
BS
9669 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9670 (int_array_type_node): Remove.
9671 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9672
9e36c9ed
MP
96732013-12-05 Marek Polacek <polacek@redhat.com>
9674
9675 PR c/52023
9676 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9677 [ADJUST_FIELD_ALIGN].
9678
296674db
JM
96792013-12-04 Joseph Myers <joseph@codesourcery.com>
9680
9681 PR c/52023
9682 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9683 and check field alignment if set.
9684 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9685 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9686
b1726d6c 96872013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9688 Marek Polacek <polacek@redhat.com>
9689
9690 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9691 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9692
d7947e19
L
96932013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9694
9695 PR c/59309
9696 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9697 arguments.
9698
fad7652e
JJ
96992013-11-29 Jakub Jelinek <jakub@redhat.com>
9700
9701 PR c/59280
9702 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9703 goto invalid. If it is error_mark_node, don't issue further
9704 diagnostics.
9705
8b5e1202
SO
97062013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9707
9708 * c.opt (Wopenmp-simd): New.
9709
0a508bb6
JJ
97102013-11-22 Jakub Jelinek <jakub@redhat.com>
9711
9712 * c-ubsan.h (ubsan_instrument_return): New prototype.
9713 * c-ubsan.c (ubsan_instrument_return): New function.
9714
2fb9a547
AM
97152013-11-22 Andrew MacLeod <amacleod@redhat.com>
9716
9717 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9718 * c-gimplify.c: Likewise.
9719 * cilk.c: Likewise.
2fb9a547 9720
8400e75e
DM
97212013-11-22 David Malcolm <dmalcolm@redhat.com>
9722
9723 * c-common.c (unsafe_conversion_p): Remove use of
9724 EXPR_LOC_OR_HERE macro.
9725 (conversion_warning): Likewise.
9726 (warnings_for_convert_and_check): Likewise.
9727 (warn_for_collisions_1): Likewise.
9728 (shorten_compare): Likewise, and remove use of in_system_header
9729 macro, using the location from the former.
9730 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9731 (cb_def_pragma): Remove use of in_system_header macro.
9732 (lex_string): Likewise.
9733 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9734
eb1ce453
KZ
97352013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9736 Mike Stump <mikestump@comcast.net>
9737 Richard Sandiford <rdsandiford@googlemail.com>
9738
9739 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9740 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9741 tree_fits_shwi_p or tree_fits_uhwi_p.
9742 (dump_generic_ada_node): Likewise.
9743 * c-format.c (check_format_arg): Likewise.
9744 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9745
6b3b8c27
KZ
97462013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9747
9748 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9749
49b0aa18
JC
97502013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9751
9752 PR c/53001
9753 * c-common.c (unsafe_conversion_p): Make this function
9754 return an enumeration with more detail.
9755 (conversion_warning): Use the new return type of
9756 unsafe_conversion_p to separately warn either about conversions
9757 that lower floating point number precision or about the other
9758 kinds of conversions.
9759 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9760 (unsafe_conversion_p): switching return type to
9761 conversion_safety enumeration.
49b0aa18
JC
9762 * c.opt: Adding new warning -Wfloat-conversion and
9763 enabling it with -Wconversion.
9764
b826515a
BS
97652013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9766
8e745a17
JJ
9767 * c-opts.c: Include plugin.h.
9768 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9769
b9a55b13
MP
97702013-11-19 Marek Polacek <polacek@redhat.com>
9771
9772 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9773 call.
9774 (ubsan_instrument_shift): Likewise.
9775 (ubsan_instrument_vla): Likewise.
9776
7d362f6c
RS
97772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9778
9779 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9780 cast to unsigned type.
9781
386b1f1f
RS
97822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9783
9784 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9785 tree_low_cst.
9786 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9787 rather than tree_low_cst.
9788
ae7e9ddd
RS
97892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9790
9791 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9792 tree_to_uhwi throughout.
9793
9439e9a1
RS
97942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9795
9796 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9797 tree_low_cst (..., 0) with tree_to_shwi throughout.
9798
cc269bb6
RS
97992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9800
9801 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9802 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9803
9541ffee
RS
98042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9805
9806 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9807 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9808
c02065fc
AH
98092013-11-15 Aldy Hernandez <aldyh@redhat.com>
9810
9811 * c-cilkplus.c: New file.
9812 * c-common.c (readonly_error): Add location argument.
9813 * c-common.h (readonly_error): Same.
9814 (c_finish_cilk_clauses): Protoize.
9815 (c_check_cilk_loop): Same.
9816 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9817 Do not fail on error_mark_node.
9818 Abstract increment canonicalization to here...
9819 (c_omp_for_incr_canonicalize_ptr): New.
9820 c-pragma.c (init_pragma): Register "simd" pragma.
9821 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9822 (enum pragma_cilk_clause): New.
9823
9cc65f15
RS
98242013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9825
9826 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9827 wchar_type and host_integerp checks.
9828
18f429e2
AM
98292013-11-14 Andrew MacLeod <amacleod@redhat.com>
9830
9831 * c-common.c: Likewise.
9832 * c-gimplify.c: Likewise.
9833 * cilk.c: Likewise.
9834
d8a2d370
DN
98352013-11-14 Diego Novillo <dnovillo@google.com>
9836
9837 * c-common.c: Include fold-const.h.
9838 Include stor-layout.h.
9839 Include calls.h.
9840 Include stringpool.h.
9841 Include attribs.h.
9842 Include varasm.h.
9843 Include trans-mem.h.
9844 * c-cppbuiltin.c: Include stor-layout.h.
9845 Include stringpool.h.
9846 * c-format.c: Include stringpool.h.
9847 * c-lex.c: Include stringpool.h.
9848 Include stor-layout.h.
9849 * c-pragma.c: Include stringpool.h.
9850 Include attribs.h.
9851 Include varasm.h.
9852 Include gcc-symtab.h.
9853 * c-pretty-print.c: Include stor-layout.h.
9854 Include attribs.h.
9855 * cilk.c: Include stringpool.h.
9856 Include calls.h.
9857
38b7bc7f
JM
98582013-11-13 Joseph Myers <joseph@codesourcery.com>
9859
9860 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9861 * c-common.c (c_common_reswords): Add __auto_type.
9862 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9863
45b0be94
AM
98642013-11-12 Andrew MacLeod <amacleod@redhat.com>
9865
18f429e2
AM
9866 * c-common.c: Include gimplify.h.
9867 * c-gimplify.c: Likewise.
9868 * cilk.c: Likewise.
9869 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9870 * c-ubsan.c: Don't include gimple.h.
45b0be94 9871
582d9b50
JM
98722013-11-12 Joseph Myers <joseph@codesourcery.com>
9873
9874 * c-common.c (c_common_reswords): Add _Thread_local.
9875
6b28e197
JM
98762013-11-09 Joseph Myers <joseph@codesourcery.com>
9877
9878 * c-common.c (atomic_size_supported_p): New function.
9879 (resolve_overloaded_atomic_exchange)
9880 (resolve_overloaded_atomic_compare_exchange)
9881 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9882 Use it instead of comparing size with a local list of sizes.
9883
267bac10
JM
98842013-11-07 Andrew MacLeod <amacleod@redhat.com>
9885 Joseph Myers <joseph@codesourcery.com>
9886
9887 * c-common.h (enum rid): Add RID_ATOMIC.
9888 * c-common.c (c_common_reswords): Add _Atomic.
9889 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9890 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9891 * c-format.c (check_format_types): Check for extra _Atomic
9892 qualifiers in format argument.
9893 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9894 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9895
5157b91e
TB
98962013-11-06 Tobias Burnus <burnus@net-b.de>
9897
9898 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9899
6dbe0958
JM
99002013-11-06 Joseph Myers <joseph@codesourcery.com>
9901
9902 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9903 standards modes.
9904 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9905 to mean lack of IEEE 754 support.
9906
e8ff5196
TB
99072013-11-05 Tobias Burnus <burnus@net-b.de>
9908
9909 * c.opt (-Wdate-time): New option
9910 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9911
254a0760
JM
99122013-11-05 Joseph Myers <joseph@codesourcery.com>
9913
9914 * c-cppbuiltin.c (cpp_iec_559_value): Test
9915 flag_excess_precision_cmdline not flag_excess_precision.
9916
6d7f7e0a
TB
99172013-11-05 Tobias Burnus <burnus@net-b.de>
9918
9919 * c.opt (fopenmp-simd): New option.
9920 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9921 (omp_pragmas): ... this new struct.
9922 (c_pp_lookup_pragma): Also walk omp_pragmas.
9923 (init_pragma): Init pragmas for -fopenmp-simd.
9924
55a7f02f
MP
99252013-11-04 Marek Polacek <polacek@redhat.com>
9926
9927 PR c++/58979
9928 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9929
9193fb05
JM
99302013-11-04 Joseph Myers <joseph@codesourcery.com>
9931
9932 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9933 New functions.
9934 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9935
94159ecf
EB
99362013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9937
9938 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9939 (dump_ada_specs): Adjust prototype of second callback.
9940 * c-ada-spec.c (cpp_check): New global variable.
9941 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9942 (print_generic_ada_decl): Likewise.
9943 (has_static_fields): Change return type to bool and add guard.
9944 (has_nontrivial_methods): New predicate.
9945 (is_tagged_type): Change return type to bool.
9946 (separate_class_package): Call has_nontrivial_methods.
9947 (pp_ada_tree_identifier): Minor tweaks.
9948 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9949 (dump_ada_array_domains): Likewise.
9950 (dump_ada_array_type): Likewise.
9951 (dump_template_types): Remove cpp_check parameter and do not pass it to
9952 dump_generic_ada_node.
9953 (dump_ada_template): Likewise.
9954 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9955 recursively.
9956 (print_ada_methods): Change return type to integer. Remove cpp_check
9957 parameter and do not pass it down.
9958 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9959 dump_generic_ada_node.
9960 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9961 accessing methods.
9962 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9963 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9964 value of print_ada_methods.
9965 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9966 Set cpp_check to it before invoking dump_ada_nodes.
9967 (dump_ada_specs): Likewise.
9968
b906f4ca
MP
99692013-11-03 Marek Polacek <polacek@redhat.com>
9970
9971 * c-ubsan.c: Don't include hash-table.h.
9972 (ubsan_instrument_vla): New function.
9973 * c-ubsan.h: Declare it.
9974
5e20cdc9
DM
99752013-10-31 David Malcolm <dmalcolm@redhat.com>
9976
9977 Automated part of renaming of symtab_node_base to symtab_node.
9978
9979 Patch autogenerated by rename_symtab.py from
9980 https://github.com/davidmalcolm/gcc-refactoring-scripts
9981 revision 58bb219cc090b2f4516a9297d868c245495ee622
9982
9983 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9984 symtab_node_base to symtab_node.
9985
7057e645
ESR
99862013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9987
8e745a17 9988 Implement C++14 digit separators.
7057e645
ESR
9989 * c-lex.c (interpret_float): Remove digit separators from scratch string
9990 before building real literal.
9991
193ea7bc
JJ
99922013-10-30 Jakub Jelinek <jakub@redhat.com>
9993
9994 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9995
939b37da
BI
99962013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9997
9998 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9999 fields.
10000 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10001 enabled.
10002 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10003 (insert_cilk_frame): New prototype.
10004 (cilk_init_builtins): Likewise.
10005 (gimplify_cilk_spawn): Likewise.
10006 (c_cilk_install_body_w_frame_cleanup): Likewise.
10007 (cilk_detect_spawn_and_unwrap): Likewise.
10008 (cilk_set_spawn_marker): Likewise.
10009 (build_cilk_sync): Likewise.
10010 (build_cilk_spawn): Likewise.
10011 * cilk.c: New file.
10012
67348ccc
DM
100132013-10-29 David Malcolm <dmalcolm@redhat.com>
10014
10015 Patch autogenerated by refactor_symtab.py from
10016 https://github.com/davidmalcolm/gcc-refactoring-scripts
10017 revision 58bb219cc090b2f4516a9297d868c245495ee622
10018
10019 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10020 to a true class hierarchy.
10021 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10022
d570872d
RS
100232013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10024
10025 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10026
98906124
JL
100272013-10-26 Jeff Law <law@redhat.com>
10028
adfac8df
JJ
10029 * c-common.c (c_define_builtins): Remove mudflap support.
10030 * c.opt: Ignore and warn for mudflap options.
98906124 10031
d73749df 100322013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10033
10034 PR other/33426
10035 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10036 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10037
3f04b1bb
JM
100382013-10-23 Jason Merrill <jason@redhat.com>
10039
10040 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10041
acf0174b
JJ
100422013-10-11 Jakub Jelinek <jakub@redhat.com>
10043
acd15a28
JJ
10044 * c-common.h (omp_clause_mask::operator !=): New method.
10045 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10046 instead of if (mask & something) tests everywhere.
10047
acf0174b
JJ
10048 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10049 201307 instead of 201107.
10050 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10051 (c_common_attribute_table): Add "omp declare target" and
10052 "omp declare simd" attributes.
10053 (handle_omp_declare_target_attribute,
10054 handle_omp_declare_simd_attribute): New functions.
10055 * c-omp.c: Include c-pragma.h.
10056 (c_finish_omp_taskgroup): New function.
10057 (c_finish_omp_atomic): Add swapped argument, if true,
10058 build the operation first with rhs, lhs arguments and use NOP_EXPR
10059 build_modify_expr.
10060 (c_finish_omp_for): Add code argument, pass it down to make_code.
10061 (c_omp_split_clauses): New function.
10062 (c_split_parallel_clauses): Removed.
10063 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10064 c_omp_declare_simd_clauses_to_decls): New functions.
10065 * c-common.h (omp_clause_mask): New type.
10066 (OMP_CLAUSE_MASK_1): Define.
10067 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10068 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10069 omp_clause_mask::operator |, omp_clause_mask::operator &,
10070 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10071 omp_clause_mask::operator ==): New methods.
10072 (enum c_omp_clause_split): New.
10073 (c_finish_omp_taskgroup): New prototype.
10074 (c_finish_omp_atomic): Add swapped argument.
10075 (c_finish_omp_for): Add code argument.
10076 (c_omp_split_clauses): New prototype.
10077 (c_split_parallel_clauses): Removed.
10078 (c_omp_declare_simd_clauses_to_numbers,
10079 c_omp_declare_simd_clauses_to_decls): New prototypes.
10080 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10081 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10082 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10083 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10084 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10085 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10086 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10087 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10088 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10089 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10090 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10091 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10092 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10093 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10094 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10095 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10096 PRAGMA_OMP_CLAUSE_UNIFORM.
10097
826cacfe
MG
100982013-10-09 Marc Glisse <marc.glisse@inria.fr>
10099
10100 PR tree-optimization/20318
10101 * c-common.c (handle_returns_nonnull_attribute): New function.
10102 (c_common_attribute_table): Add returns_nonnull.
10103
2284b034
MG
101042013-10-03 Marc Glisse <marc.glisse@inria.fr>
10105
10106 PR c++/19476
10107 * c.opt (fcheck-new): Move to common.opt.
10108
b56e9788
MP
101092013-09-25 Marek Polacek <polacek@redhat.com>
10110 Jakub Jelinek <jakub@redhat.com>
10111
10112 PR sanitizer/58413
10113 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10114 an expression if we can prove it is correct.
10115 (ubsan_instrument_division): Likewise. Remove unnecessary
10116 check.
10117
ce6923c5
MP
101182013-09-18 Marek Polacek <polacek@redhat.com>
10119
10120 PR sanitizer/58411
10121 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10122 Declare it.
10123 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10124
fb5610fb
IS
101252013-09-14 Iain Sandoe <iain@codesourcery.com>
10126
10127 PR target/48094
10128 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10129 fobjc-gc, freplace-objc-classes): Accept for LTO.
10130
88b0e79e
JC
101312013-09-13 Jacek Caban <jacek@codeweavers.com>
10132
10133 * c-target.def: New hook
10134
c9b0866a
PC
101352013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10136
10137 PR c++/43452
10138 * c.opt (Wdelete-incomplete): Add.
10139
0af94e6f
JR
101402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10141
10142 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10143 (vector_types_compatible_elements_p): New function.
10144 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10145 declaration.
10146 (vector_types_compatible_elements_p): Declare.
10147
7c26172c
GDR
101482013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10149
10150 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10151 a virtual member function.
10152 (pp_simple_type_specifier): Remove.
10153 (pp_c_type_specifier): Likewise.
10154 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10155 Rename from pp_c_type_specifier. Adjust.
10156 (c_pretty_printer::c_pretty_printer): Do not assign to
10157 simple_type_specifier.
10158
20059c8b
GDR
101592013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10160
10161 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10162 member function.
10163 (c_pretty_printer::storage_class_specifier): Likewise.
10164 (c_pretty_printer::initializer): Likewise.
10165 (pp_declaration): Remove.
10166 (pp_declaration_specifiers): Likewise.
10167 (pp_abstract_declarator): Likewise.
10168 (pp_declarator): Likewise.
10169 (pp_type_id): Likewise.
10170 (pp_statement): Likewise.
10171 (pp_constant): Likewise.
10172 (pp_id_expression): Likewise.
10173 (pp_primary_expression): Likewise.
10174 (pp_unary_expression): Likewise.
10175 (pp_multiplicative_expression): Likewise.
10176 (pp_conditional_expression): Likewise.
10177 (pp_assignment_expression): Likewise.
10178 (pp_expression): Likewise.
10179 (pp_c_type_id): Likewise.
10180 (pp_c_storage_class_specifier): Likewise.
10181 * c-pretty-print.c (pp_c_type_cast): Tidy.
10182 (pp_c_pointer): Likewise.
10183 (pp_c_type_specifier): Likewise.
10184 (pp_c_parameter_type_list): Likewise.
10185 (pp_c_function_definition): Likewise.
10186 (pp_c_init_declarator): Likewise.
10187 (pp_c_initializer_list): Likewise.
10188 (pp_c_constructor_elts): Likewise.
10189 (c_pretty_printer::direct_abstract_declarator): Likewise.
10190 (c_pretty_printer::declaration_specifiers): Likewise.
10191 (c_pretty_printer::primary_expression): Likewise.
10192 (c_pretty_printer::postfix_expression): Likewise.
10193 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10194 (c_pretty_printer::storage_class_specifier): Rename from
10195 pp_c_storage_class_specifier.
10196 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10197 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10198 storage_class_specifier, initializer, offset_list, flags.
10199
de5a5fa1
MP
102002013-08-30 Marek Polacek <polacek@redhat.com>
10201
10202 * c-ubsan.c: New file.
10203 * c-ubsan.h: New file.
10204
8f0e4d72
GDR
102052013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10206
10207 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10208 member function.
10209 (c_pretty_printer::declaration_specifiers): Likewise.
10210 (c_pretty_printer::declarator): Likewise.
10211 (c_pretty_printer::abstract_declarator): Likewise.
10212 (c_pretty_printer::direct_abstract_declarator): Likewise.
10213 (c_pretty_printer::direct_declarator): Likewise.
10214 (c_pretty_printer::function_specifier): Likewise.
10215 (pp_declaration): Adjust.
10216 (pp_declaration_specifiers): Likewise.
10217 (pp_abstract_declarator): Likewise.
10218 (pp_direct_declarator): Likewise.
10219 (pp_function_specifier): Likewise.
10220 (pp_direct_abstract_declarator): Remove as unused.
10221 (pp_c_declaration): Remove.
10222 (pp_c_declaration_specifiers): Likewise.
10223 (pp_c_declarator): Likewise.
10224 (pp_c_direct_declarator): Likewise.
10225 (pp_c_function_specifier): Likewise.
10226 (pp_c_direct_abstract_declarator): Likewise.
10227 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10228 from pp_c_abstract_declarator. Adjust.
ab20d992 10229 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10230 pp_c_direct_abstract_declarator. Adjust.
10231 (c_pretty_printer::function_specifier): Rename from
10232 pp_c_function_specifier. Adjust.
10233 (c_pretty_printer::declaration_specifiers): Rename from
10234 pp_c_declaration_specifiers. Adjust.
10235 (c_pretty_printer::direct_declarator): Rename from
10236 pp_c_direct_declarator. Adjust.
10237 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10238 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10239 (c_pretty_printer::c_pretty_printer): Do not assign to
10240 declaration, declaration_specifiers, declarator,
10241 direct_declarator, direct_abstract_declarator, function_specifier.
10242
00d34d3a
GDR
102432013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10244
10245 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10246 virtual member function.
10247 (c_pretty_printer::multiplicative_expression): Likewise.
10248 (c_pretty_printer::conditional_expression): Likewise.
10249 (c_pretty_printer::assignment_expression): Likewise.
10250 (c_pretty_printer::expression): Likewise.
10251 (pp_unary_expression): Adjust.
10252 (pp_multiplicative_expression): Likewise.
10253 (pp_assignment_expression): Likewise.
10254 (pp_conditional_expression): Likewise.
10255 (pp_expression): Likewise.
10256 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10257 from pp_c_unary_expression. Adjust.
10258 (c_pretty_printer::multiplicative_expression): Rename from
10259 pp_c_multiplicative_expression. Adjust.
10260 (c_pretty_printer::conditional_expression): Rename from
10261 pp_c_conditional_expression. Adjust.
10262 (c_pretty_printer::assignment_expression): Rename from
10263 pp_c_assignment_expression. Adjust.
10264 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10265 (c_pretty_printer::c_pretty_printer): Do not assign to
10266 unary_expression, multiplicative_expression,
10267 conditional_expression, expression.
10268
fb22178f
GDR
102692013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10270
10271 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10272 virtual member function.
10273 (pp_postfix_expression): Adjust.
10274 (pp_c_postfix_expression): Remove.
10275 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10276 from pp_c_postfix_expression. Adjust.
10277 (c_pretty_printer::c_pretty_printer): Do not assign to
10278 postfix_expression.
10279
7ecc2600
GDR
102802013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10281
10282 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10283 virtua member function.
10284 (pp_primary_expression): Adjust.
10285 (pp_c_primary_expression): Remove.
10286 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10287 from pp_c_primary_expression. Adjust.
10288 (pp_c_initializer_list): Use pp_primary_expression.
10289 (c_pretty_printer::c_pretty_printer): Do not assign to
10290 primary_expression.
10291
0691175f
GDR
102922013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10293
10294 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10295 * c-pretty-print.c (M_): Remove.
10296 (c_pretty_printer::translate_string): Define.
10297 (pp_c_type_specifier): Use it.
10298 (pp_c_primary_expression): Likewise.
10299 (pp_c_expression): Likewise.
10300
66dfe4c4
GDR
103012013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10302
10303 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10304 virtual function.
10305 (pp_c_id_expression): Remove.
10306 (pp_id_expression): Adjust.
10307 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10308 pp_c_id_expression. Adjust.
10309 (pp_c_postfix_expression): Use pp_id_expression.
10310 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10311
ca43e9d5
GDR
103122013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10313
10314 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10315 member function.
10316 (pp_constant): Adjust.
10317 (pp_c_constant): Remove.
10318 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10319 pp_c_constant. Adjust.
10320 (pp_c_constant)
10321 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10322 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10323
da6ca2b5
GDR
103242013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10325
10326 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10327 (c_pretty_printer::c_pretty_printer): Declare.
10328 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10329 c_pretty_printer_init. Adjust.
10330 (print_c_tree): Do not call c_pretty_printer_init.
10331 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10332
65a372f4
AC
103332013-08-09 Arnaud Charlet <charlet@adacore.com>
10334
10335 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10336
fd9b0f32
PC
103372013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10338
10339 PR c++/58080
10340 * c-common.c (pointer_int_sum): Add bool parameter.
10341 * c-common.h (pointer_int_sum): Adjust declaration.
10342
e0aec1e9
GDR
103432013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10344
10345 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10346 c_pretty_printer variable.
10347
b066401f
GDR
103482013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10349
10350 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10351 (pp_base): Remove.
10352 (pp_c_base): Likewise. Adjust users.
10353 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10354 (pp_c_whitespace): Do not call pp_base.
10355 (pp_c_left_paren): Likewise.
10356 (pp_c_right_paren): Likewise.
10357 (pp_c_left_brace): Likewise.
10358 (pp_c_right_brace): Likewise.
10359 (pp_c_left_bracket): Likewise.
10360 (pp_c_right_bracket): Likewise.
10361 (pp_c_dot): Likewise.
10362 (pp_c_ampersand): Likewise.
10363 (pp_c_star): Likewise.
10364 (pp_c_arrow): Likewise.
10365 (pp_c_semicolon): Likewise.
10366 (pp_c_complement): Likewise.
10367 (pp_c_exclamation): Likewise.
10368 (pp_c_direct_declarator): Likewise.
10369 (pp_c_ws_string): Likewise.
10370 (pp_c_identifier): Likewise.
10371 (pp_c_statement): Likewise.
10372 (print_c_tree): Likewise.
10373
65e5a578
ESR
103742013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10375
10376 PR c++/58072
10377 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10378 provide useful error strings.
10379
137a1a27
GDR
103802013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10381
10382 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10383 printer functions instead of pp_string or operators and punctuators.
10384 (dump_generic_ada_node): Likewise.
10385 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10386 (pp_c_relational_expression): Likewise.
10387 (pp_c_logical_or_expression): Likewise.
10388
07838b13
GDR
103892013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10390
10391 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10392 functions instead of pp_character.
10393 (pp_ada_tree_identifier): Likewise.
10394 (dump_ada_double_name): Likewise.
10395 (dump_ada_function_declaration): Likewise.
10396 (dump_ada_array_domains): Likewise.
10397 (dump_template_types): Likewise.
10398 (dump_generic_ada_node): Likewise.
10399 (print_ada_declaration): Likewise.
10400 (print_ada_struct_decl): Likewise.
10401 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10402
433cc7b0
TT
104032013-07-23 Tom Tromey <tromey@redhat.com>
10404
10405 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10406 * c-common.c (c_common_reswords): Add _Generic.
10407
688010ba
OB
104082013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10409
10410 * c-common.c: Fix typos.
10411 * c-common.h: Likewise.
10412
2a99e5e6
LL
104132013-07-13 Lubos Lunak <l.lunak@suse.cz>
10414
10415 PR c++/55203
10416 * c-common.c (c_common_attribute_table): Add warn_unused.
10417 (handle_warn_unused_attribute): New.
10418
c26302d5
JJ
104192013-07-10 Jakub Jelinek <jakub@redhat.com>
10420
10421 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10422 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10423
dfeadaa0
PC
104242013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10425
10426 PR c++/57869
10427 * c.opt: Add Wconditionally-supported.
10428
6a2fa4b2
GS
104292013-07-08 Graham Stott <graham.stott@btinternet.com>
10430
adfac8df 10431 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10432 unused variables l_length and l_node.
10433
ecdbd01a 104342013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10435
10436 PR c/57821
10437 * c-common.c (complete_array_type): Delay folding first index
10438 like other indices. When folding, check for index overflow.
10439
bedc293e
MG
104402013-06-27 Marc Glisse <marc.glisse@inria.fr>
10441
10442 PR c++/57509
10443 * c-common.h (c_build_vec_perm_expr): New complain argument.
10444 * c-common.c (c_build_vec_perm_expr): Likewise.
10445 Use save_expr also in C++.
10446
604b2bfc
GDR
104472013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10448
10449 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10450 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10451 * c-opts.c (c_common_post_options): Likewise.
10452
dfeadaa0 104532013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10454
10455 * array-notation-common.c (length_mismatch_in_expr): Changed the
10456 parameter type's from a dynamic array to a vec_tree. Also removed
10457 the size parameters.
10458 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10459 the change above.
10460
2ce86d2e
BI
104612013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10462
10463 * c-common.h (struct cilkplus_an_parts): New structure.
10464 (struct cilkplus_an_loop_parts): Likewise.
10465 (cilkplus_extract_an_triplets): New prototype.
10466 (fix_sec_implicit_args): Likewise.
10467 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10468 (fix_sec_implicit_args): Likewise.
604b2bfc 10469
07a6825b
BI
104702013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10471
10472 * array-notation-common.c (find_inv_trees): Removed an unwanted
10473 typecasting.
10474 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10475 enum rid to enum tree_code.
10476
08346abd
JH
104772013-06-11 Jan Hubicka <jh@suse.cz>
10478
10479 * c-common.c (handle_alias_ifunc_attribute): Do not set
10480 DECL_EXTERNAL for weakref variables.
10481 * c-pragma.c (handle_pragma_weak): Make sure aliases
10482 are not declared as external.
10483
d60f1706
BI
104842013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10485
10486 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10487 function from c/c-array-notation.c.
10488 (is_cilkplus_reduce_builtin): Likewise.
10489 (find_rank): Likewise.
10490 (extract_array_notation_exprs): Likewise.
10491 (replace_array_notations): Likewise.
10492 (find_inv_trees): Likewise.
10493 (replace_inv_trees): Likewise.
10494 (contains_array_notation_expr): Likewise.
10495 (find_correct_array_notation_type): Likewise.
10496 * c-common.h (struct inv_list): Moved this struct from the file
10497 c/c-array-notation.c and added a new field called additional tcodes.
10498 (length_mismatch_in_expr_p): New prototype.
10499 (is_cilkplus_reduce_builtin): Likewise.
10500 (find_rank): Likewise.
10501 (extract_array_notation_exprs): Likewise.
10502 (replace_array_notation): Likewise.
10503 (find_inv_trees): Likewise.
10504 (replace_inv_trees): Likewise.
10505 (find_correct_array_notation_type): Likewise.
dfeadaa0 10506
36536d79
BI
105072013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10508
10509 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10510 function array_notation_init_builtins is called.
10511 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10512 * c-common.def (ARRAY_NOTATION_REF): New tree.
10513 * c-common.h (build_array_notation_expr): New function declaration.
10514 (build_array_notation_ref): Likewise.
10515 (extract_sec_implicit_index_arg): New extern declaration.
10516 (is_sec_implicit_index_fn): Likewise.
10517 (ARRAY_NOTATION_CHECK): New define.
10518 (ARRAY_NOTATION_ARRAY): Likewise.
10519 (ARRAY_NOTATION_START): Likewise.
10520 (ARRAY_NOTATION_LENGTH): Likewise.
10521 (ARRAY_NOTATION_STRIDE): Likewise.
10522 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10523 ARRAY_NOTATION_REF.
10524 (pp_c_expression): Likewise.
10525 * c.opt (flag_enable_cilkplus): New flag.
10526 * array-notation-common.c: New file.
10527
f7716d57
JJ
105282013-05-14 Jakub Jelinek <jakub@redhat.com>
10529
10530 PR c++/57274
10531 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10532
a5e0cd1d
MG
105332013-05-10 Marc Glisse <marc.glisse@inria.fr>
10534
10535 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10536 vectors.
10537
f6bc1c4a
HS
105382013-05-07 Han Shen <shenhan@google.com>
10539
10540 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10541
3f12f6e9
SKS
105422013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10543
10544 * c-common.c (check_user_alignment): Emit error for negative values.
10545
61949153
PC
105462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10547
10548 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10549
e93e18e9
PC
105502013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10551
10552 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10553 __GXX_EXPERIMENTAL_CXX1Y__.
10554
44d90fe1 105552013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10556 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10557
10558 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10559 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10560 to simply use OPT_Wpointer_arith.
10561 (c_sizeof_or_alignof_type): Likewise.
10562
13f39b2e
PC
105632013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10564
10565 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10566
4b84d650
JJ
105672013-04-12 Jakub Jelinek <jakub@redhat.com>
10568
10569 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10570 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10571 specifiers.
10572
fb037b5d
SB
105732013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10574
10575 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10576
4e856798
PC
105772013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10578
10579 * c-common.c (pointer_int_sum): Remove dead code.
10580
4b1baac8
RS
105812013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10582
10583 PR middle-end/56524
10584 * c-common.c (handle_optimize_attribute): Don't call
10585 save_optabs_if_changed.
10586
0b50e654
JJ
105872013-03-05 Jakub Jelinek <jakub@redhat.com>
10588
10589 PR middle-end/56461
10590 * c-pch.c (pch_init): Free target_validity at the end.
10591
48c41403
JJ
105922013-03-04 Jakub Jelinek <jakub@redhat.com>
10593
10594 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10595
e664c61c
KS
105962013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10597 Jakub Jelinek <jakub@redhat.com>
10598
10599 PR sanitizer/56454
10600 * c-common.c (handle_no_sanitize_address_attribute): New function.
10601 (c_common_attribute_table): Add no_sanitize_address attribute.
10602 (handle_no_address_safety_analysis_attribute): Add
10603 no_sanitize_address attribute, not no_address_safety_analysis
10604 attribute.
10605
a475fd3d 106062013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10607
10608 PR target/52555
10609 * c-common.c (handle_optimize_attribute): Call
10610 save_optabs_if_changed.
10611
f6007d99
JJ
106122013-02-18 Jakub Jelinek <jakub@redhat.com>
10613 Steven Bosscher <steven@gcc.gnu.org>
10614
10615 PR pch/54117
10616 * c-opts.c (c_common_post_options): If debug info is enabled
10617 and non-dwarf*, refuse to load PCH files and when writing PCH
10618 file warn.
10619
cf35e2b1
JJ
106202013-02-05 Jakub Jelinek <jakub@redhat.com>
10621
10622 PR middle-end/56167
10623 * c-common.c (handle_error_attribute): Fix condition.
10624
32887460
JJ
106252013-01-30 Jakub Jelinek <jakub@redhat.com>
10626
10627 PR c++/55742
10628 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10629
5af057d8
JM
106302013-01-18 Jason Merrill <jason@redhat.com>
10631
10632 PR target/54908
10633 * c.opt (-fextern-tls-init): New.
10634 * c-opts.c (c_common_post_options): Handle it.
10635
cc83c823
JJ
106362013-01-09 Jakub Jelinek <jakub@redhat.com>
10637
10638 PR c/48418
10639 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10640 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10641 and is either negative or bigger or equal to type precision
10642 of the first operand.
10643
a859517f
MP
106442012-12-03 Marek Polacek <polacek@redhat.com>
10645
10646 PR c/55570
10647 * c-common.c (check_user_alignment): Swap order of tests,
10648 check TREE_CODE first.
10649
2d7aa578
ESR
106502012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10651
10652 PR c++/52654
10653 * c-common.h (overflow_type): New enum.
10654 (build_userdef_literal): Add overflow_type argument.
10655 (tree_userdef_literal): Add overflow_type.
10656 (USERDEF_LITERAL_OVERFLOW): New access macro.
10657 * c-common.c (build_userdef_literal): Add overflow_type
10658 argument.
10659 * c-lex.c (c_lex_with_flags): Add overflow_type to
10660 build_userdef_literal calls.
10661 (interpret_integer, interpret_float): Add overflow_type argument.
10662
cc3c4f62
RB
106632012-11-28 Richard Biener <rguenther@suse.de>
10664
10665 PR c/35634
10666 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10667 here and use a type with proper overflow behavior for types that would
10668 need to be promoted for the arithmetic.
10669
77bc5132
JJ
106702012-11-23 Jakub Jelinek <jakub@redhat.com>
10671
10672 PR sanitizer/55435
10673 * c-common.c (handle_no_address_safety_analysis_attribute): New
10674 function.
10675 (c_common_attribute_table): Add no_address_safety_analysis.
10676
5dc99c46
SB
106772012-11-16 Simon Baldwin <simonb@google.com>
10678
10679 * c.opt: Add f[no-]canonical-system-headers.
10680 * c-opts.c (c_common_handle_option): Handle
10681 OPT_fcanonical_system_headers.
10682
a4a0016d
ESR
106832012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10684
10685 PR c++/54413
10686 * c-opts.c (c_common_handle_option): Set new flags.
10687 * c.opt: Describe new flags.
10688
7dbb85a7
JM
106892012-11-09 Jason Merrill <jason@redhat.com>
10690
10691 * c.opt (Wabi-tag): New.
10692
ad7bac31
AK
106932012-11-09 Andi Kleen <ak@linux.intel.com>
10694
10695 PR 55139
10696 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10697 MEMMODEL_MASK
ad7bac31 10698
7332899a
MLI
106992012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10700
10701 PR c/53063
10702 * c.opt (Wformat): Make it Alias Wformat=1.
10703 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10704 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10705 LangEnabledBy.
10706 (Wformat=): RejectNegative. Use LangEnabledBy.
10707 (Wnonnull): Use LangEnabledBy.
10708 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10709 * c-format.c (set_Wformat): Delete.
10710 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10711 (maybe_read_dollar_number): Likewise.
10712 (avoid_dollar_number): Likewise.
10713 (finish_dollar_format_checking): Likewise.
10714 (check_format_info): Likewise.
10715 (check_format_info_main): Likewise.
10716 (check_format_types): Likewise.
10717 (format_type_warning): Likewise.
10718 * c-common.c (int): Likewise.
10719 (check_function_sentinel): Likewise.
8e745a17 10720 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10721
34a180a6
MLI
107222012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10723
10724 PR c/53063
10725 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10726 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10727 Use LangEnabledBy.
10728 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10729 common.opt.
10730 (Wvariadic-macros): Init(1).
10731 * c-opts.c (c_common_handle_option): Do not handle them
10732 explicitly.
10733 (c_common_post_options): Likewise.
10734 (sanitize_cpp_opts): warn_unused_macros is now
10735 cpp_warn_unused_macros.
10736 (push_command_line_include): Likewise.
10737 * c-common.c (warn_unknown_pragmas): Do not define.
10738 * c-common.h (warn_unknown_pragmas): Do not declare.
10739
3f46d6a5
MLI
107402012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10741
10742 PR c/51294
10743 * c-common.c (conversion_warning): Handle conditional expressions.
10744
880661a4
JW
107452012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10746
10747 PR c++/54930
10748 * c.opt (Wreturn_local_addr): Define new option.
10749
4514a96b
JM
107502012-10-25 Jason Merrill <jason@redhat.com>
10751
f14edc1a
JM
10752 * c.opt (Wvirtual-move-assign): New.
10753
4514a96b
JM
10754 * c.opt (Winherited-variadic-ctor): New.
10755
93100c6b
MG
107562012-10-25 Marc Glisse <marc.glisse@inria.fr>
10757
10758 PR c++/54427
10759 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10760
1efcb8c6
JM
107612012-10-23 Joseph Myers <joseph@codesourcery.com>
10762
10763 * c-common.h (pch_cpp_save_state): Declare.
10764 * c-target.def (c_preinclude): New hook.
10765 * c-opts.c (done_preinclude): New.
10766 (push_command_line_include): Handle default preincluded header.
10767 (cb_file_change): Call pch_cpp_save_state when calling
10768 push_command_line_include.
10769 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10770 (pch_cpp_save_state): New.
10771 (pch_init): Call pch_cpp_save_state conditionally, instead of
10772 calling cpp_save_state.
10773
4a0ae68e
MLI
107742012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10775
10776 PR c/53063
10777 PR c/40989
10778 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10779 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10780 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10781 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10782 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10783 * c-opts.c (c_common_handle_option): Remove explicit handling from
10784 here.
10785 (c_common_post_options): Likewise.
10786
67e4210b
EB
107872012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10788
10789 * c-ada-spec.c (LOCATION_COL): Delete.
10790 (compare_location): New function.
10791 (compare_node): Use it.
10792 (compare_comment): Likewise.
10793
65d4f2cd
MLI
107942012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10795
10796 PR c/53063
10797 PR c/40989
10798 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10799 * c-opts.c (c_common_handle_option): Do not set them here. Add
10800 comment.
10801 (c_common_post_options): Likewise.
10802
909881cb
EB
108032012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10804
10805 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10806 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10807 Remove POINTER_TYPE handling, add large unsigned handling and use
10808 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10809
3a785c97
JJ
108102012-10-12 Jakub Jelinek <jakub@redhat.com>
10811
10812 PR c/54381
10813 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10814 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10815 locs and array of 3 trees instead of just single loc and single
10816 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10817 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10818 For *cmp* builtins that take two sources strings report warnings
10819 about first and second source, not about destination and source.
10820
5e54f81d
MG
108212012-10-12 Marc Glisse <marc.glisse@inria.fr>
10822
10823 PR c++/53055
10824 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10825
f5b02f1e
EB
108262012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10827
10828 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10829 declaring something coming from another file.
10830
b46dbc6c
AC
108312012-10-10 Arnaud Charlet <charlet@adacore.com>
10832
f5b02f1e 10833 PR ada/54845
b46dbc6c
AC
10834 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10835
5d9de0d0
PC
108362012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10837
10838 PR c++/54194
10839 * c-common.c (warn_about_parentheses): Add location_t parameter;
10840 use EXPR_LOC_OR_LOC.
10841 * c-common.h: Update declaration.
10842
a212e43f
MG
108432012-10-09 Marc Glisse <marc.glisse@inria.fr>
10844
10845 PR c++/54427
10846 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10847 more operations. Make error messages optional.
10848 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10849 (scalar_to_vector): Declare.
10850
b1db7f91
JM
108512012-10-08 Jason Merrill <jason@redhat.com>
10852
10853 * c-common.c (c_common_reswords): Add thread_local.
10854
e28d52cf
DS
108552012-10-08 Dodji Seketeli <dodji@redhat.com>
10856
10857 PR c++/53528 C++11 attribute support
10858 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10859 new functions.
10860 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10861 static function.
10862 (handle_aligned_attribute): In choose strictest alignment
10863 among many. Use new check_cxx_fundamental_alignment_constraints.
10864 (handle_transparent_union_attribute): In c++11 attribute syntax,
10865 don't look through typedefs.
10866
3b78de56
AC
108672012-10-04 Arnaud Charlet <charlet@adacore.com>
10868
10869 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10870 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10871 out of dumpfile.h.
10872
6040bb5f
DC
108732012-09-25 Dehao Chen <dehao@google.com>
10874
10875 PR middle-end/54645
3b78de56 10876 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10877 map when read in the pch.
10878
3f8257db 108792012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10880
10881 * c-ada-spec.c: Style fixes.
10882
3f8257db 108832012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10884
10885 * c.opt (-fada-spec-parent): Define new command line switch.
10886 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10887 is specified, generate binding spec as a child of the specified unit.
10888
0ccb505d
PC
108892012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10890 Manuel López-Ibáñez <manu@gcc.gnu.org>
10891
10892 PR c++/53210
10893 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10894
c583af79
AC
108952012-08-23 Arnaud Charlet <charlet@adacore.com>
10896
10897 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10898 for pointers, and add missing Convention C pragma.
10899 (print_ada_struct_decl): Add missing aliased keyword.
10900 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10901
1a4049e7
JJ
109022012-08-17 Jakub Jelinek <jakub@redhat.com>
10903
10904 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10905 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10906 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10907 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10908 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10909
70b5e7dc
RG
109102012-08-10 Richard Guenther <rguenther@suse.de>
10911
10912 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10913
f8923f7e
SB
109142012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10915
10916 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10917 instead of separate pp_newline and pp_flush.
10918 (print_c_tree): Likewise.
10919
e45abe1f
RH
109202012-07-26 Richard Henderson <rth@redhat.com>
10921
10922 * c-common.c (handle_hot_attribute): Allow labels.
10923 (handle_cold_attribute): Likewise.
10924
332f1d24
JJ
109252012-07-20 Jakub Jelinek <jakub@redhat.com>
10926
10927 PR c++/28656
10928 * c-common.c (check_function_nonnull): Handle multiple nonnull
10929 attributes properly.
10930
7ee2468b
SB
109312012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10932
10933 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10934 * c-ada-spec.c: Likewise.
10935 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10936
ee7b28eb
SB
109372012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10938
10939 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10940 Remove code conditional on it.
10941
6bdf3519
SB
109422012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10943
10944 * c-gimplify.c: Do not include basic-block.h.
10945 * c-common.c: Do not include linfuncs.h.
10946
532aafad
SB
109472012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10948
10949 * c-common.h: Include tree.h.
10950
8d0d1915
JM
109512012-07-02 Jason Merrill <jason@redhat.com>
10952
10953 PR c++/53524
10954 * c-common.c (get_priority): Call default_conversion.
10955
fbc873ad
UB
109562012-07-01 Uros Bizjak <ubizjak@gmail.com>
10957
10958 * c-pch.c (c_common_write_pch): Remove unused variables.
10959
d4a10d0a
SB
109602012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10961
10962 * cppspec.c: Moved from gcc/ to here.
10963
6f3a2e23
KT
109642012-06-27 Kai Tietz <ktietz@redhat.com>
10965
10966 PR preprocessor/37215
10967 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10968
8ca92d04
SB
109692012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10970
10971 * c-common.h (c_common_print_pch_checksum): Remove.
10972 * c-pch.c: Do not include output.h.
10973 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10974 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10975 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10976 (struct c_pch_header): Remove.
10977 (get_ident): Update gpch version.
10978 (pch_init): Do not print executable_checksum to asm_out_file.
10979 Do not fail if there is no asm_out_file to read back from. Set
10980 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10981 (c_common_write_pch): Verify that nothing was written to asm_out_file
10982 since pch_init was called. Do not write a c_pch_header, and do not
10983 copy from asm_out_file to the PCH.
10984 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10985 the content of asm_out_file from the PCH.
10986 (c_common_print_pch_checksum): Remove.
10987 * c-opts.c (c_common_init): Print out executable_checksum directly.
10988
70f42967
SB
109892012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10990
10991 * c-target.def (objc_declare_unresolved_class_reference,
10992 objc_declare_class_definition): Add new hooks.
10993
a8781821
SB
109942012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10995
10996 * c-lex.c: Do not include output.h.
10997 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10998 Remove uses of ASM_OUTPUT_IDENT.
10999
9e1a8dd1
RR
110002012-06-15 Marc Glisse <marc.glisse@inria.fr>
11001
11002 PR c++/51033
11003 * c-common.h (c_build_vec_perm_expr): Move decl here.
11004 * c-common.c (c_build_vec_perm_expr): Move definition
11005 here.
11006
6f07a821
SB
110072012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11008
11009 * c.opt (fconserve-space): Turn into a no-op.
11010
9faeb493 110112012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11012
11013 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11014 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11015 both the start and end of the function.
11016
a4b7d13c
SB
110172012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11018
11019 * c-common.c: Do not include output.h.
11020 * c-pragma.c: Likewise.
11021
c265f413
SA
110222012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11023
11024 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11025 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11026 (lang_decl_name): Handle namespace decls.
11027
be7a421e
SB
110282012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11029
11030 * c-ada-spec.c: Do not include output.h.
11031 * c-semantics.c: Likewise.
11032
65de6659
JM
110332012-05-29 Joseph Myers <joseph@codesourcery.com>
11034
11035 * c-common.c: Fix typo.
11036
ca5f4331
MM
110372012-05-29 Michael Matz <matz@suse.de>
11038
11039 * c-common.h (c_expand_decl): Remove prototype.
11040
4f7f7aca
MLI
110412012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11042
11043 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11044 * c-opts.c (c_common_handle_option): Remove code handling
11045 warn_missing_braces.
11046
4a792f9b
PC
110472012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11048
11049 PR c++/25137
11050 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11051 -Wmissing_braces.
11052
650dc14a
DS
110532012-05-22 Dodji Seketeli <dodji@redhat.com>
11054
11055 PR c++/53322
11056 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11057
9b095bf1
MLI
110582012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11059
11060 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11061 * c-opts.c (c_common_handle_option): Do not handle explicitly
11062 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11063
0b2c4be5
DS
110642012-05-16 Dodji Seketeli <dodji@redhat.com>
11065
11066 PR preprocessor/7263
ab20d992 11067 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11068 to cpp_classify_number. For diagnostics, use the precise location
11069 instead of the global input_location.
11070
a1bde5af
PC
110712012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11072
d02924ef 11073 PR c++/11856
a1bde5af
PC
11074 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11075
d1ede5f4
BS
110762012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11077
a1bde5af 11078 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11079
f2bc201f
MLI
110802012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11081
11082 PR 53063
11083 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11084 Wreorder): Use LangEnabledBy.
11085 * c-opts.c (c_common_handle_option): Do not enable them
11086 explicitly. Call lang-specific generated functions.
11087 (c_common_post_options): Do not set them here.
11088
95744782
MLI
110892012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11090
11091 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11092 Wmissing-field-initializers,Wmissing-parameter-type,
11093 Wold-style-declaration,Woverride-init): Use EnabledBy.
11094 * c-opts.c (c_common_post_options): Do not set here explicitly.
11095
7d5a5747
MLI
110962012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11097
11098 PR 53063
11099 * c-opts.c (c_common_handle_option): Use handle_generated_option
11100 to enable sub-options.
11101
5a3c9cf2
PC
111022012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11103
11104 PR c++/53158
11105 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11106
3ac8781c
RG
111072012-05-10 Richard Guenther <rguenther@suse.de>
11108
11109 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11110 adjust commentary about TYPE_IS_SIZETYPE types.
11111
1e537948
MLI
111122012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11113
11114 PR c++/53261
11115 * c-common.c (warn_logical_operator): Check that argument of
11116 integer_zerop is not NULL.
11117
f2c4a785
MLI
111182012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11119
11120 PR c/43772
11121 * c-common.c (warn_logical_operator): Do not warn if either side
11122 is already true or false.
11123
50f305ca
MLI
111242012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11125
11126 PR c/51712
11127 * c-common.c (expr_original_type): New.
11128 (shorten_compare): Do not warn for enumeration types.
11129
0c3641b0
MLI
111302012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11131
11132 * c.opt (fpermissive): Add Var(flag_permissive).
11133
7edaa4d2
MG
111342012-04-30 Marc Glisse <marc.glisse@inria.fr>
11135
11136 PR c++/51033
11137 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11138 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11139
b9c8da34
DS
111402012-04-30 Dodji Seketeli <dodji@redhat.com>
11141
11142 Add -Wvarargs option
ab20d992 11143 * c.opt (Wvarargs): Define new option.
b9c8da34 11144
e6c69da0
MLI
111452012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11146
11147 * c-common.c (check_function_arguments): Replace
11148 Wmissing-format-attribute with Wsuggest-attribute=format.
11149
90137d8f
MLI
111502012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11151
11152 * c.opt (Wsuggest-attribute=format): New. Alias of
11153 Wmissing-format-attribute.
11154 * c-format.c (decode_format_type): Replace
11155 Wmissing-format-attribute with Wsuggest-attribute=format.
11156 (check_function_format): Likewise.
11157
9faeb493 111582012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11159
11160 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11161 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11162 * c.opt: Add Wliteral-suffix.
11163
c1771a20
MLI
111642012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11165
11166 PR c/44774
11167 * c.opt (Wpedantic): New.
11168 (pedantic): Alias Wpedantic.
11169 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11170 (c_common_post_options): Likewise.
11171 (sanitize_cpp_opts): Likewise.
11172 * c-lex.c (interpret_float): Likewise.
11173 * c-format.c (check_format_types): Likewise.
11174 * c-common.c (pointer_int_sum): Likewise.
11175 (c_sizeof_or_alignof_type): Likewise.
11176 (c_add_case_label): Likewise.
11177 (c_do_switch_warnings): Likewise.
11178 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11179
04b391c1
JM
111802012-04-15 Jason Merrill <jason@redhat.com>
11181
11182 PR c++/52818
11183 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11184 (C_STD_NAME): Distinguish between C++98 and C++11.
11185
ac868f29
EB
111862012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11187
11188 PR target/52624
11189 * c-common.h (uint16_type_node): Rename into...
11190 (c_uint16_type_node): ...this.
11191 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11192 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11193
fd4116f4
MLI
111942012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11195
11196 * c-common.c (warn_if_unused_value): Move definition to here.
11197 * c-common.h (warn_if_unused_value): Move declaration to here.
11198
573ac65e
WB
111992012-03-23 William Bader <williambader@hotmail.com>
11200
11201 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11202
552b8185
JM
112032012-03-20 Jason Merrill <jason@redhat.com>
11204
11205 * c-common.h (enum cxx_dialect): Add cxx1y.
11206 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11207 test.
11208 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11209 * c-opts.c (c_common_post_options): Likewise.
11210 (set_std_cxx1y): New.
11211 (c_common_handle_option): Call it.
11212 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11213
04398fa8
PC
112142012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11215
11216 PR c++/14710
11217 * c.opt ([Wuseless-cast]): Add.
11218
d2a12ae7
RG
112192012-03-16 Richard Guenther <rguenther@suse.de>
11220
11221 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11222
a12bf402
MLI
112232012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11224
11225 PR c++/44783
11226 * c.opt (ftemplate-backtrace-limit) Add.
11227
5c30094f
RO
112282012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11229
11230 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11231 handling.
11232 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11233 (init_pragma): Don't register extern_prefix.
11234
21fa2faf
RG
112352012-03-12 Richard Guenther <rguenther@suse.de>
11236
11237 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11238 (builtin_type_for_size): Likewise.
11239
e3793c6f
JJ
112402012-02-13 Jakub Jelinek <jakub@redhat.com>
11241
11242 PR c++/52215
11243 * c-common.c (sync_resolve_params): Don't decide whether to convert
11244 or not based on TYPE_SIZE comparison, convert whenever arg_type
11245 is unsigned INTEGER_TYPE.
11246
93286335
PC
112472012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11248
11249 PR c/52118
11250 * c.opt ([Wunused-local-typedefs]): Fix description.
11251
7a421706
MS
112522012-01-24 Mike Stump <mikestump@comcast.net>
11253
11254 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11255 exactly.
11256
ba9b1f11
RG
112572012-01-18 Richard Guenther <rguenther@suse.de>
11258
11259 * c-opts.c (c_common_post_options): Reset LTO flags if
11260 we are about to generate a PCH.
11261
465406be
PC
112622012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11263
11264 PR c++/51777
11265 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11266 use pp_unsigned_wide_integer.
11267
aee15221
RG
112682012-01-10 Richard Guenther <rguenther@suse.de>
11269
11270 PR middle-end/51806
11271 * c-opts.c (c_common_handle_option): Move -Werror handling
11272 to language independent code.
11273
5720c0dc
RG
112742012-01-05 Richard Guenther <rguenther@suse.de>
11275
11276 PR middle-end/51764
11277 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11278 from common.opt.
11279
73ac190a
PC
112802011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11281
11282 PR c++/51316
11283 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11284 of array types with an unknown bound.
11285
48b0b196
JM
112862011-12-20 Joseph Myers <joseph@codesourcery.com>
11287
11288 * c-common.c (flag_isoc99): Update comment to refer to C11.
11289 (flag_isoc1x): Change to flag_isoc11.
11290 * c-common.h (flag_isoc99): Update comment to refer to C11.
11291 (flag_isoc1x): Change to flag_isoc11.
11292 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11293 C11.
11294 * c-opts.c (set_std_c1x): Change to set_std_c11.
11295 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11296 Call set_std_c11.
11297 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11298 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11299 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11300 standard.
11301 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11302 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11303 (std=gnu1x): Make alias of std=gnu11.
11304
d58d6eb5
JM
113052011-12-19 Jason Merrill <jason@redhat.com>
11306
11307 PR c++/51228
11308 * c-common.c (handle_transparent_union_attribute): Check the first
11309 field if the type is complete.
11310
b3908fcc
JW
113112011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11312
11313 PR libstdc++/51365
11314 * c-common.c (RID_IS_FINAL): Add.
11315 * c-common.h (RID_IS_FINAL): Add.
11316
fea3ca91
IS
113172011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11318
11319 * c.opt (fgnu-runtime): Provide full description.
11320 (fnext-runtime): Likewise.
11321 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11322
62bad7cd
AM
113232011-11-28 Andrew MacLeod <amacleod@redhat.com>
11324
11325 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11326 predefines in one place. Add LOCK_FREE predefines.
11327 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11328 new func.
11329
c466c4ff
AM
113302011-11-24 Andrew MacLeod <amacleod@redhat.com>
11331
11332 PR c/51256
9faeb493 11333 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11334 conditions
9faeb493
UB
11335 (resolve_overloaded_atomic_exchange,
11336 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11337 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11338 error_mark_node for error conditions.
9faeb493 11339
a5952633
RG
113402011-11-08 Richard Guenther <rguenther@suse.de>
11341
11342 PR middle-end/51010
ab20d992 11343 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11344
0a35513e
AH
113452011-11-07 Richard Henderson <rth@redhat.com>
11346 Aldy Hernandez <aldyh@redhat.com>
11347 Torvald Riegel <triegel@redhat.com>
11348
11349 Merged from transactional-memory.
11350
11351 * c-common.c (handle_tm_wrap_attribute,
11352 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11353 (struct c_common_reswords): Added __transaction* keywords.
11354 (struct c_common_attribute_table): Added transaction* and tm_regparm
11355 attributes.
11356 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11357 masks.
11358 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11359 find_tm_attribute): Declare.
11360
6d87092d
JM
113612011-11-07 Jason Merrill <jason@redhat.com>
11362
11363 PR c++/35688
11364 * c-common.c, c-common.h: Revert yesterday's changes.
11365
8e7860a1
JM
113662011-11-06 Jason Merrill <jason@redhat.com>
11367
11368 PR c++/35688
11369 * c-common.c (decl_has_visibility_attr): Split out from...
11370 (c_determine_visibility): ...here.
11371 * c-common.h: Declare it.
11372
d19fa6b5
JM
113732011-11-06 Joseph Myers <joseph@codesourcery.com>
11374
11375 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11376 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11377 type.
11378 (check_user_alignment): New. Split out of
11379 handle_aligned_attribute. Disallow integer constants with
11380 noninteger types. Conditionally allow zero.
11381 (handle_aligned_attribute): Use check_user_alignment.
11382 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11383
86951993
AM
113842011-11-06 Andrew MacLeod <amacleod@redhat.com>
11385 Richard Henderson <rth@redhat.com>
11386
11387 Merged from cxx-mem-model.
11388
11389 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11390 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11391 parameters that are the same type size.
11392 (get_atomic_generic_size): New. Find size of generic
11393 atomic function parameters and do typechecking.
11394 (add_atomic_size_parameter): New. Insert size into parameter list.
11395 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11396 either __atomic_exchange_n or external library call.
9faeb493 11397 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11398 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11399 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11400 __atomic_load_n or an external library call.
11401 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11402 __atomic_store_n or an external library call.
11403 (resolve_overloaded_builtin): Handle new __atomic builtins.
11404
cf9e9959
EB
114052011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11406
11407 PR c++/50608
11408 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11409 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11410 <INDIRECT_REF>: Return the argument.
11411 <ARRAY_REF>: Remove special code for negative offset.
11412 Call fold_build_pointer_plus instead of size_binop.
11413 (fold_offsetof): Remove STOP_REF argument and adjust.
11414 * c-common.h (fold_offsetof_1): Declare.
11415 (fold_offsetof): Remove STOP_REF argument.
11416
25339f10
JM
114172011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11418
11419 PR c++/50810
11420 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11421 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11422 Wnarrowing for C++0x and C++98.
11423 * c.opt ([Wnarrowing]): Update.
11424
89401152
PC
114252011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11426
11427 PR c++/44277
11428 * c.opt: Add Wzero-as-null-pointer-constant.
11429
97e3ad20
JM
114302011-10-31 Jason Merrill <jason@redhat.com>
11431
15694fdd
JM
11432 * c.opt (-fdeduce-init-list): Off by default.
11433
97e3ad20
JM
11434 PR c++/50920
11435 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11436 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11437 and -Wc++11-compat.
11438 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11439
fb9120e3
RAV
114402011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11441
11442 PR c++/30066
11443 * c.opt (fvisibility-inlines-hidden): Description change.
11444
3ce4f9e4
ESR
114452011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11446
11447 Implement C++11 user-defined literals.
11448 * c-common.c (build_userdef_literal): New.
11449 * c-common.def: New tree code.
11450 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11451 * c-lex.c (interpret_float): Add suffix parm.
11452 (c_lex_with_flags): Build literal tokens.
11453
5f53c243
PC
114542011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11455
11456 PR c++/50841
11457 Revert:
11458 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11459
11460 PR c++/50810
11461 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11462 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11463 Wnarrowing for C++0x and C++98.
11464 * c.opt ([Wnarrowing]): Update.
11465
263734e1
PC
114662011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11467
11468 PR c++/50810
11469 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11470 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11471 Wnarrowing for C++0x and C++98.
11472 * c.opt ([Wnarrowing]): Update.
11473
d2e312d7
PC
114742011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11475
11476 PR c++/45385
11477 * c-common.c (conversion_warning): Remove code looking for
11478 artificial operands.
11479
d17687f6
DS
114802011-10-18 Dodji Seketeli <dodji@redhat.com>
11481
11482 PR bootstrap/50760
11483 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11484 !NO_IMPLICIT_EXTERN_C.
d17687f6 11485
fc8396e9
PC
114862011-10-17 Michael Spertus <mike_spertus@symantec.com>
11487
11488 * c-common.c (c_common_reswords): Add __bases,
11489 __direct_bases.
11490 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11491
114922011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11493
11494 PR c++/50757
11495 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11496
847e697a
TT
114972011-10-15 Tom Tromey <tromey@redhat.com>
11498 Dodji Seketeli <dodji@redhat.com>
11499
11500 * c.opt (fdebug-cpp): New option.
11501 * c-opts.c (c_common_handle_option): Handle the option.
11502 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11503 output stream in parameter. Factorized from ...
11504 (maybe_print_line): ... this. Dump location debug information when
11505 -fdebug-cpp is in effect.
11506 (print_line_1): New static function. Takes an output stream in
11507 parameter. Factorized from ...
11508 (print_line): ... here. Dump location information when -fdebug-cpp
11509 is in effect.
11510 (scan_translation_unit): Dump location information when
11511 -fdebug-cpp is in effect.
11512
92582b75
TT
115132011-10-15 Tom Tromey <tromey@redhat.com>
11514 Dodji Seketeli <dodji@redhat.com>
11515
11516 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11517 without argument.
11518 * c-opts.c (c_common_handle_option)<case
11519 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11520 cases. Handle -ftrack-macro-expansion with and without argument.
11521
46427374
TT
115222011-10-15 Tom Tromey <tromey@redhat.com>
11523 Dodji Seketeli <dodji@redhat.com>
11524
11525 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11526 (print_line, cb_define, do_line_change): Adjust to avoid touching
11527 the internals of struct line_map. Use the public API instead.
11528 * c-pch.c (c_common_read_pch): Likewise.
11529 * c-lex.c (fe_file_change): Likewise.
11530
fc8396e9
PC
115312011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11532
11533 PR c++/17212
11534 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11535
115362011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11537
11538 PR c++/33067
11539 * c-pretty-print.c (pp_c_floating_constant): Output
11540 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11541
e79983f4
MM
115422011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11543
11544 * c-common.c (def_builtin_1): Delete old interface with two
11545 parallel arrays to hold standard builtin declarations, and replace
11546 it with a function based interface that can support creating
11547 builtins on the fly in the future. Change all uses, and poison
11548 the old names. Make sure 0 is not a legitimate builtin index.
11549 * c-omp.c (c_finish_omp_barrier): Ditto.
11550 (c_finish_omp_taskwait): Ditto.
11551 (c_finish_omp_flush): Ditto.
11552
6637388f
TG
115532011-10-11 Tristan Gingold <gingold@adacore.com>
11554
11555 * c.opt: (fallow-parameterless-variadic-functions): New.
11556
3797cb21
DS
115572011-09-08 Dodji Seketeli <dodji@redhat.com>
11558
11559 PR c++/33255 - Support -Wunused-local-typedefs warning
11560 * c-common.h (struct c_language_function::local_typedefs): New
11561 field.
9faeb493
UB
11562 (record_locally_defined_typedef, maybe_record_typedef_use)
11563 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11564 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11565 (maybe_record_typedef_use)
11566 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11567 * c.opt: Declare new -Wunused-local-typedefs flag.
11568
693ddb1b
EB
115692011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11570
11571 PR middle-end/50266
11572 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11573 computations.
11574
830c740f
RG
115752011-09-05 Richard Guenther <rguenther@suse.de>
11576
11577 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11578 of integer_minus_one_node for empty array upper bounds.
11579
892a371f
DS
115802011-08-28 Dodji Seketeli <dodji@redhat.com>
11581
11582 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11583 it's the first time it's being called on this main TU.
11584
0e3fdb48
RB
115852011-08-24 Richard Guenther <rguenther@suse.de>
11586
11587 PR c/49396
11588 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11589
115902011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11591
11592 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11593 defined in cpp_init_builtins and c_cpp_builtins.
11594
d4a83c10
JM
115952011-08-19 Joseph Myers <joseph@codesourcery.com>
11596
11597 * c-common.c (c_common_reswords): Add __builtin_complex.
11598 * c-common.h (RID_BUILTIN_COMPLEX): New.
11599
bbceee64
JM
116002011-08-18 Joseph Myers <joseph@codesourcery.com>
11601
11602 * c-common.c (c_common_reswords): Add _Noreturn.
11603 (keyword_is_function_specifier): Handle RID_NORETURN.
11604 * c-common.h (RID_NORETURN): New.
11605
3f8257db 116062011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11607
11608 * c-common.c (unsafe_conversion_p): New function. Check if it is
11609 unsafe to convert an expression to the type.
11610 (conversion_warning): Adjust, use unsafe_conversion_p.
11611 * c-common.h (unsafe_conversion_p): New function declaration.
11612
20906c66
JJ
116132011-08-02 Jakub Jelinek <jakub@redhat.com>
11614
11615 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11616 (c_finish_omp_taskyield): New prototype.
11617 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11618 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11619 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11620 or RHS1 have side-effects, evaluate those too in the right spot,
11621 if it is a decl and LHS is also a decl, error out if they
11622 aren't the same.
11623 (c_finish_omp_taskyield): New function.
11624 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11625 * c-pragma.c (omp_pragmas): Add taskyield.
11626 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11627 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11628 PRAGMA_OMP_CLAUSE_MERGEABLE.
11629
770e5a2e
DS
116302011-07-25 Dodji Seketeli <dodji@redhat.com>
11631
11632 * c-common.h (set_underlying_type): Remove parm name from
11633 declaration.
11634
1baae426
RG
116352011-07-25 Romain Geissler <romain.geissler@gmail.com>
11636
11637 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11638
fcb21722
JM
116392011-07-22 Jason Merrill <jason@redhat.com>
11640
76f86d00
JM
11641 PR c++/49793
11642 * c.opt (Wnarrowing): New.
11643
3a636414
JM
11644 PR c++/30112
11645 * c-common.h: Declare c_linkage_bindings.
11646 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11647
fcb21722
JM
11648 PR c++/49813
11649 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11650 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11651 as flag_isoc99 for 'restrict'.
11652 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11653
02614448
ILT
116542011-07-21 Ian Lance Taylor <iant@google.com>
11655
11656 PR middle-end/49705
11657 * c-common.c (c_disable_warnings): New static function.
11658 (c_enable_warnings): New static function.
11659 (c_fully_fold_internal): Change local unused_p to bool. Call
11660 c_disable_warnings and c_enable_warnings rather than change
11661 c_inhibit_evaluation_warnings.
11662
34429675
JM
116632011-07-20 Jason Merrill <jason@redhat.com>
11664
11665 PR c++/6709 (DR 743)
11666 PR c++/42603 (DR 950)
11667 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11668 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11669 (CPP_DECLTYPE): New.
11670 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11671
5d49b6a7
RG
116722011-07-19 Richard Guenther <rguenther@suse.de>
11673
11674 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11675 * c-omp.c (c_finish_omp_for): Likewise.
11676
e84a58ff
EB
116772011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11678
11679 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11680 body on the next line.
11681
329af3c7
JM
116822011-07-08 Jason Merrill <jason@redhat.com>
11683
4063e61b
JM
11684 PR c++/45437
11685 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11686
329af3c7
JM
11687 PR c++/49673
11688 * c-common.c (c_apply_type_quals_to_decl): Don't check
11689 TYPE_NEEDS_CONSTRUCTING.
11690
1a072294
RG
116912011-07-06 Richard Guenther <rguenther@suse.de>
11692
11693 * c-common.c (c_common_nodes_and_builtins):
11694 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11695
fce5dddd
RG
116962011-07-05 Richard Guenther <rguenther@suse.de>
11697
11698 * c-common.c (c_common_nodes_and_builtins): Build all common
11699 tree nodes first.
11700
45d439ac
JJ
117012011-06-27 Jakub Jelinek <jakub@redhat.com>
11702
56300785
JJ
11703 * c-common.h (c_tree_chain_next): New static inline function.
11704
45d439ac
JJ
11705 * c-common.c (check_builtin_function_arguments): Handle
11706 BUILT_IN_ASSUME_ALIGNED.
11707
e0a8ecf2
AM
117082011-06-21 Andrew MacLeod <amacleod@redhat.com>
11709
11710 * c-common.c: Add sync_ or SYNC__ to builtin names.
11711 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11712
117132011-06-20 Pierre Vittet <piervit@pvittet.com>
11714
11715 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11716 handler.
11717 (gen_pragma_handler): New union.
11718 (internal_pragma_handler): New type.
11719 (c_register_pragma_with_data)
11720 (c_register_pragma_with_expansion_and_data): New functions.
11721
11722 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11723 (c_register_pragma, c_register_pragma_with_expansion)
11724 (c_invoke_pragma_handler): Changed to work with
11725 internal_pragma_handler.
11726 (c_register_pragma_with_data)
11727 (c_register_pragma_with_expansion_and_data): New functions.
11728
677f3fa8
JM
117292011-06-14 Joseph Myers <joseph@codesourcery.com>
11730
11731 * c-common.c: Include common/common-target.h.
11732 (handle_section_attribute): Use
11733 targetm_common.have_named_sections.
11734 * c-cppbuiltin.c: Include common/common-target.h.
11735 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11736
d7fc8c14
RG
117372011-06-10 Richard Guenther <rguenther@suse.de>
11738
11739 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11740 to print a IDENTIFIER_NODE.
11741
10e48e39
RO
117422011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11743 Joseph Myers <joseph@codesourcery.com>
11744
11745 * c.opt (fbuilding-libgcc): New option.
11746 * c-cppbuiltin.c (c_cpp_builtins): Define
11747 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11748
6976ae51
JM
117492011-06-07 Jason Merrill <jason@redhat.com>
11750
3ff60975
JM
11751 * c-common.c (max_tinst_depth): Lower default to 900.
11752
6976ae51
JM
11753 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11754
009db074
RG
117552011-06-07 Richard Guenther <rguenther@suse.de>
11756
11757 * c-common.c (c_common_nodes_and_builtins): Do not set
11758 size_type_node or call set_sizetype.
11759
b4592b92
DS
117602011-06-07 Dodji Seketeli <dodji@redhat.com>
11761
11762 PR debug/49130
11763 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11764 type when using pointer comparison to compare types.
b4592b92 11765
014ab419
JW
117662011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11767
11768 * c.opt: Add -Wdelete-non-virtual-dtor.
11769 * c-opts.c (c_common_handle_option): Include it in -Wall.
11770
4f60111f
NF
117712011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11772
11773 PR bootstrap/49190
11774
11775 Revert:
11776 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11777
11778 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11779 not tree_common.
11780
4cc4f2f4
JJ
117812011-05-27 Jakub Jelinek <jakub@redhat.com>
11782
11783 PR c++/49165
11784 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11785 C++ don't call c_common_truthvalue_conversion on void type arms.
11786
38e01f9e
NF
117872011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11788
11789 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11790 (stmt_list_stack): Define.
11791 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11792 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11793
92e948a8
NF
117942011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11795
11796 * c-common.c (warning_candidate_p): Check for BLOCKs.
11797
a2fc3e63
NF
117982011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11799
11800 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11801 not tree_common.
11802
0957c029
JJ
118032011-05-25 Jakub Jelinek <jakub@redhat.com>
11804
11805 * c-common.c (def_fn_type): Remove extra va_end.
11806
828fb3ba
JM
118072011-05-23 Jason Merrill <jason@redhat.com>
11808
11809 PR c++/48106
11810 * c-common.c (c_common_get_narrower): New.
11811 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11812
dde05067
NF
118132011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11814
11815 * c-common.h (check_function_arguments): Tweak prototype of
11816 check_function_arguments.
11817 * c-common.c (check_function_arguments): Likewise. Adjust
11818 calls to check_function_nonnull, check_function_format, and
11819 check_function_sentinel.
11820 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11821 separate attributes and typelist arguments. Use
11822 FOREACH_FUNCTION_ARGS to iterate over argument types.
11823
3c0d13bf
PC
118242011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11825
11826 * c-common.c (c_common_reswords): Reorder.
11827 * c-common.h (rid): Likewise.
11828
8242dd04
NF
118292011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11830
11831 * c-common.c (def_fn_type): Don't call build_function_type, call
11832 build_function_type_array or build_varargs_function_type_array
11833 instead.
11834 (c_common_nodes_and_builtins): Likewise.
11835
3d528853
NF
118362011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11837
11838 * c-common.c (c_add_case_label): Omit the loc argument to
11839 build_case_label.
11840 * c-common.h (build_case_label): Remove.
11841 * c-semantics.c (build_case_label): Remove.
11842
a04a722b
JM
118432011-05-05 Joseph Myers <joseph@codesourcery.com>
11844
11845 * c-objc.h (objc_start_method_definition): Update prototype.
11846 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11847
e19a18d4
NF
118482011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11849
11850 * c-common.c (check_main_parameter_types): Reindent. Don't use
11851 TYPE_ARG_TYPES directly.
11852 (handle_nonnull_attribute): Likewise.
11853 (sync_resolve_params): Likewise.
11854 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11855 to check_format_string.
11856 (handle_format_attribute): Likewise.
11857 (check_format_string): Take a function type to examine instead of
11858 a type list. Use a function_arg_iterator to step through argument
11859 types.
11860
c62c040f
RG
118612011-05-04 Richard Guenther <rguenther@suse.de>
11862
11863 * c-common.c (fix_string_type): Use size_int for index type bounds.
11864 (start_fname_decls): Do not pass NULL to build_int_cst.
11865 (c_init_attributes): Likewise.
11866 * c-lex.c (c_lex_with_flags): Likewise.
11867
c12ff9d8
JM
118682011-04-27 Jason Merrill <jason@redhat.com>
11869
11870 * c-common.c (make_tree_vector_from_list): New.
11871 * c-common.h: Declare it.
11872
304dfbe3
RG
118732011-04-26 Richard Guenther <rguenther@suse.de>
11874
11875 PR preprocessor/48248
11876 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11877 for output size with -P.
11878
3c0d13bf
PC
118792011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11880
11881 * c-common.c (struct c_common_resword): Add __underlying_type.
11882 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11883
04695783
JM
118842011-04-20 Jim Meyering <meyering@redhat.com>
11885
11886 * c-format.c (init_dollar_format_checking): Remove useless
11887 if-before-free.
11888
0dc33c3c
NP
118892011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11890
11891 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11892 (objc_detect_field_duplicates): New.
0dc33c3c 11893 * stub-objc.c: Likewise.
3c0d13bf 11894
c59633d9
NP
118952011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11896
11897 * stub-objc.c (objc_declare_protocols): Renamed to
11898 objc_declare_protocol.
11899 * c-objc.h: Likewise.
3c0d13bf 11900
32dabdaf
NP
119012011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11902
11903 * stub-objc.c (objc_declare_class): Updated argument name.
11904
81f653d6
NF
119052011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11906
11907 * c-common.h (c_common_init_ts): Declare.
11908 * c-common.c (c_common_init_ts): Define.
11909
eb345401
NP
119102011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11911
11912 * c-objc.h (objc_build_message_expr): Updated prototype.
11913 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11914
a358e188
MJ
119152011-04-12 Martin Jambor <mjambor@suse.cz>
11916
11917 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11918 of cgraph_node.
11919
e6313a78
RG
119202011-04-11 Richard Guenther <rguenther@suse.de>
11921
11922 * c-common.c (complete_array_type): Build a range type of
11923 proper type.
11924
dcf0c47e
NF
119252011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11926
11927 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11928 (handle_type_generic_attribute): Likewise.
11929
1ee44b26
JM
119302011-04-07 Jason Merrill <jason@redhat.com>
11931
11932 PR c++/48450
11933 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11934 conversion from C++0x scoped enum.
11935
acce4e77
JM
119362011-04-06 Joseph Myers <joseph@codesourcery.com>
11937
11938 * c-target-def.h: New file.
11939 * c-target.def: New file.
11940 * c-target.h: New file.
11941 * c-common.c (targetcm): Don't define here.
11942 * c-common.h (default_handle_c_option): Declare.
11943 * c-format.c: Include c-target.h instead of target.h.
11944 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11945 include tm.h.
11946 (default_handle_c_option): Move from targhooks.c.
11947
e2eefb55
JJ
119482011-03-29 Jakub Jelinek <jakub@redhat.com>
11949
11950 PR preprocessor/48248
11951 * c-ppoutput.c (print): Add src_file field.
11952 (init_pp_output): Initialize it.
11953 (maybe_print_line): Don't optimize by adding up to 8 newlines
11954 if map->to_file and print.src_file are different file.
11955 (print_line): Update print.src_file.
11956
ba78087b
KT
119572011-03-25 Kai Tietz <ktietz@redhat.com>
11958
11959 * c-ada-spec.c (compare_comment): Use filename_cmp
11960 instead of strcmp for filename.
11961
0edf1bb2
JL
119622011-03-25 Jeff Law <law@redhat.com>
11963
adfac8df 11964 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11965
c7dc8804
JM
119662011-03-25 Jason Merrill <jason@redhat.com>
11967
11968 * c.opt: Add -std=c++03.
11969
d1d879b1
EB
119702011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11971
11972 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11973
3f8257db 119742011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11975
11976 PR target/12171
5050afdf
KT
11977 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11978 Display allowed attributes for function pointer types.
11979 (pp_c_attributes_display): New function to display
11980 attributes having affects_type_identity flag set to true.
11981 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11982
62d784f7
KT
11983 * c-common.c (c_common_attribute_table):
11984 Add new element.
11985 (c_common_format_attribute_table): Likewise.
11986
82d37118
JM
119872011-03-18 Jason Merrill <jason@redhat.com>
11988
49a000c3
JM
11989 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11990 * c-common.h: Don't declare it here.
11991 * c-common.c: Or define it here.
11992 * c-opts.c (c_common_handle_option): Or set it here.
11993
82d37118
JM
11994 PR c++/35315
11995 * c-common.c (handle_transparent_union_attribute): Don't
11996 make a duplicate type in C++.
11997
17bc631c
JM
119982011-03-15 Jason Merrill <jason@redhat.com>
11999
12000 * c-common.c (max_constexpr_depth): New.
12001 * c-common.h: Declare it.
12002 * c-opts.c (c_common_handle_option): Set it.
12003 * c.opt (fconstexpr-depth): New option.
12004
1b9b91a6
JM
120052011-03-11 Jason Merrill <jason@redhat.com>
12006
f231b5ff
JM
12007 * c-common.c (attribute_takes_identifier_p): Add missing const.
12008
1b9b91a6
JM
12009 PR c++/46803
12010 * c-common.c (attribute_takes_identifier_p): Assume that an
12011 unknown attribute takes an identifier.
12012
a19e4d44
NF
120132011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12014
12015 PR c/47786
12016 * c-common.c (c_type_hash): Call list_length instead of iterating
12017 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12018
982d62f6
JJ
120192011-02-19 Jakub Jelinek <jakub@redhat.com>
12020
12021 PR c/47809
12022 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12023
0a256240
NP
120242011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12025
12026 * c.opt (fobjc-abi-version=) New.
12027 (fobjc-nilcheck): New.
12028
ba9e6dd5
NF
120292011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12030
12031 PR c++/46890
12032 * c-common.h (keyword_is_decl_specifier): Declare.
12033 * c-common.c (keyword_is_decl_specifier): Define.
12034 (keyword_is_function_specifier): New function.
12035
7273813a
JJ
120362011-01-26 Jakub Jelinek <jakub@redhat.com>
12037
12038 PR c/47473
12039 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12040 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12041 REAL_TYPE.
12042
908ef79b
AC
120432011-01-26 Arnaud Charlet <charlet@adacore.com>
12044
12045 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12046
237e9384
JJ
120472011-01-26 Jakub Jelinek <jakub@redhat.com>
12048
12049 PR pch/47430
12050 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12051 after init_c_lex if pch_file is set.
12052
47ea1edf
DK
120532011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12054
d4dba752 12055 PR c++/43601
47ea1edf
DK
12056 * c.opt (-fkeep-inline-dllexport): New switch.
12057
2aa9c6ae
RG
120582011-01-12 Richard Guenther <rguenther@suse.de>
12059
12060 PR middle-end/32511
12061 * c-common.c (handle_weak_attribute): Warn instead of error
12062 on declaring an inline function weak.
12063
7bd11157
TT
120642011-01-05 Tom Tromey <tromey@redhat.com>
12065
12066 * c-common.h (lvalue_error): Update.
12067 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12068 not error.
12069
0e66e494 120702010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12071
b4f588c4
NP
12072 PR objc/47075
12073 * c-objc.h (objc_finish_message_expr): Added argument to
12074 prototype.
12075
f4da8dce
NF
120762010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12077
12078 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12079 Use prototype_p.
12080
46270f14
NP
120812010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12082
12083 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12084 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12085
4816c593
NF
120862010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12087
12088 * c-common.h (readonly_error): Declare.
12089 * c-common.c (readonly_error): Define.
12090
7a6daeb0
NF
120912010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12092
12093 * c-common.h (invalid_indirection_error): Declare.
12094 * c-common.c (invalid_indirection_error): Define.
12095
892f6119
RG
120962010-12-03 Richard Guenther <rguenther@suse.de>
12097
12098 PR c/46745
12099 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12100 (pp_c_unary_expression): Likewise.
12101 (pp_c_expression): Likewise.
12102
6c39e757
NP
121032010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12104
12105 * c-common.h (objc_finish_function): New.
12106 (objc_non_volatilized_type): Removed.
12107 (objc_type_quals_match): Removed.
12108 * stub-objc.c (objc_finish_function): New.
12109 (objc_non_volatilized_type): Removed.
12110 (objc_type_quals_match): Removed.
9faeb493 12111
7c475d11
JM
121122010-11-30 Joseph Myers <joseph@codesourcery.com>
12113
12114 * c-common.h (parse_optimize_options): Declare.
12115 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12116 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12117
71f3e391
JM
121182010-11-29 Joseph Myers <joseph@codesourcery.com>
12119
12120 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12121 GET_ENVIRONMENT.
12122 * c-pch.c (O_BINARY): Don't define here.
12123 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12124
d5fabb58
JM
121252010-11-25 Joseph Myers <joseph@codesourcery.com>
12126
12127 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12128 targetm.except_unwind_info.
12129
299404a1
JM
121302010-11-23 Joseph Myers <joseph@codesourcery.com>
12131
12132 * c-opts.c (c_common_handle_option): Pass location to
12133 set_struct_debug_option.
12134
c98cd5bf
JM
121352010-11-23 Joseph Myers <joseph@codesourcery.com>
12136
12137 * c-common.c (visibility_options): Move from ../opts.c.
12138 * c-common.h (struct visibility_flags, visibility_options):
12139 Declare here.
12140 * c-opts.c (finish_options): Rename to c_finish_options.
12141 (c_common_init): Update call to finish_options.
12142
a9546771
NP
121432010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12144
12145 PR objc/34033
12146 * c-lex.c (lex_string): Check that each string in an Objective-C
12147 string concat sequence starts with either one or zero '@', and
12148 that there are no spurious '@' signs at the end.
12149
24a57808
JM
121502010-11-20 Joseph Myers <joseph@codesourcery.com>
12151
12152 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12153 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12154 HANDLE_PRAGMA_VISIBILITY.
12155 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12156 HANDLE_PRAGMA_VISIBILITY): Don't define.
12157 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12158
a9aa2c3a
NF
121592010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12160
12161 PR c++/16189
12162 PR c++/36888
12163 PR c++/45331
12164 * c-common.h (keyword_begins_type_specifier): Declare.
12165 (keyword_is_storage_class_specifier): Declare.
12166 (keyword_is_type_qualifier): Declare.
12167 * c-common.c (keyword_begins_type_specifier): New function.
12168 (keyword_is_storage_class_specifier): New function.
12169 (keyword_is_type_qualifier): Declare.
12170
5386338c
JM
121712010-11-19 Joseph Myers <joseph@codesourcery.com>
12172
12173 PR c/46547
12174 * c-common.c (in_late_binary_op): Define.
12175 (c_common_truthvalue_conversion): Check in_late_binary_op before
12176 calling c_save_expr.
12177 * c-common.h (in_late_binary_op): Declare.
12178
69ccdddb
JM
121792010-11-19 Joseph Myers <joseph@codesourcery.com>
12180
12181 * c-opts.c (c_common_handle_option): Update calls to
12182 set_struct_debug_option.
12183
6b192a09
NP
121842010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12185
12186 * c-common.h (objc_declare_protocols): Added additional argument.
12187 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12188
fb52b50a
NF
121892010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12190
12191 PR c/33193
12192 * c-common.h (build_real_imag_expr): Declare.
12193 * c-semantics.c (build_real_imag_expr): Define.
12194
b37421c6
JM
121952010-11-17 Joseph Myers <joseph@codesourcery.com>
12196
12197 * c-opts.c (c_common_parse_file): Take no arguments.
12198 * c-common.h (c_common_parse_file): Update prototype.
12199
07078664
JJ
122002010-11-16 Jakub Jelinek <jakub@redhat.com>
12201
12202 PR c++/46401
12203 * c-common.c (warning_candidate_p): Don't track non-const calls
12204 or STRING_CSTs.
12205
c6a13190
ILT
122062010-11-15 Ian Lance Taylor <iant@google.com>
12207
12208 * c-lex.c (init_c_lex): Set macro debug callbacks if
12209 flag_dump_go_spec is set.
12210
925e8657
NP
122112010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12212
12213 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12214 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12215
bb0a9581
NF
122162010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12217
12218 PR preprocessor/45038
12219 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12220 dialects.
12221
c5fa0890
JM
122222010-11-12 Joseph Myers <joseph@codesourcery.com>
12223
12224 * c-common.h (c_family_lang_mask): Declare.
12225 * c-opts.c (c_family_lang_mask): Make extern.
12226 * c-pragma.c (handle_pragma_diagnostic): Use
12227 control_warning_option.
12228
a4d8c676
JM
122292010-11-12 Joseph Myers <joseph@codesourcery.com>
12230
12231 * c-common.c (parse_optimize_options): Update call to
12232 decode_options.
12233 * c-common.h (c_common_handle_option): Update prototype.
12234 * c-opts.c (c_common_handle_option): Take location_t parameter and
12235 pass it to other functions.
12236
f954bd2c
JM
122372010-11-11 Joseph Myers <joseph@codesourcery.com>
12238
12239 * c-opts.c (warning_as_error_callback): Remove.
12240 (c_common_initialize_diagnostics): Don't call
12241 register_warning_as_error_callback.
12242 (c_common_handle_option): Handle -Werror=normalized= here.
12243
d8a07487
JM
122442010-11-10 Joseph Myers <joseph@codesourcery.com>
12245
12246 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12247 in diagnostic.
12248 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12249 letter.
12250 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12251 Remove trailing '.' from diagnostics.
12252 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12253
d5478783
JM
122542010-11-10 Joseph Myers <joseph@codesourcery.com>
12255
12256 * c-common.c (parse_optimize_options): Pass global_dc to
12257 decode_options.
12258 * c-opts.c (c_common_handle_option): Pass &global_options to
12259 set_Wstrict_aliasing.
12260 * c.opt (v): Don't mark Common or document here.
12261
91ebb981
IS
122622010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12263
12264 PR target/44981
12265 * c-format.c (format_type): New type gcc_objc_string_format_type.
12266 (valid_stringptr_type_p): New.
12267 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12268 (check_format_string): Pass expected type, use
91ebb981
IS
12269 valid_stringptr_type_p (), check that the format string types are
12270 consistent with the format specification.
12271 (decode_format_attr): Warn if NSString is used outside objective-c.
12272 (format_types_orig): Add NSString.
12273 (format_name): New.
12274 (format_flags): New.
12275 (check_format_arg): Handle format strings requiring an external parser.
12276 first_target_format_type: New variable.
12277 (handle_format_attribute): Set up first_target_format_type, pass the
12278 expected format arg string type to check_format_string().
ab20d992 12279 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12280 * stub-objc.c (objc_string_ref_type_p): New.
12281 (objc_check_format_arg): New.
12282
bede2adc
NP
122832010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12284
9faeb493 12285 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12286 * c-common.h (objc_build_class_component_ref): New.
12287 * stub-objc.c (objc_build_class_component_ref): New.
12288
9a179d01
NP
122892010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12290
12291 * c.opt (Wproperty-assign-default): New option.
12292
22d8d616
NP
122932010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12294
12295 Implemented -fobjc-std=objc1 flag.
12296 * c.opt (fobjc-std=objc1): New option.
12297
2debdb4f
NP
122982010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12299
12300 Implemented format and noreturn attributes for Objective-C methods.
12301 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12302 attribute for Objective-C methods.
12303
ec52b111
JM
123042010-10-31 Jason Merrill <jason@redhat.com>
12305
12306 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12307 EXPR_LOC_OR_HERE.
12308
46a88c12
NP
123092010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12310
12311 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12312 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12313 (objc_add_property_declaration): Removed arguments for copies and
12314 ivar.
12315 (objc_build_getter_call): Renamed to
12316 objc_maybe_build_component_ref.
12317 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12318 (objc_is_property_ref): New.
12319 * c-common.c (c_common_reswords): Removed copies and ivar.
12320 * stub-objc.c (objc_add_property_declaration): Removed arguments
12321 for copies and ivar.
12322 (objc_build_getter_call): Renamed to
12323 objc_maybe_build_component_ref.
12324 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12325 (objc_is_property_ref): New.
9faeb493 12326
1e4bf85b
AC
123272010-10-29 Arnaud Charlet <charlet@adacore.com>
12328 Matthew Gingell <gingell@adacore.com>
12329
12330 * c-ada-spec.c (separate_class_package): New function.
12331 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12332 name of their enclosing package.
12333 (print_ada_declaration): Use separate_class_package.
12334
81f0bab2
JM
123352010-10-27 Jason Merrill <jason@redhat.com>
12336
2b08f2c5
JM
12337 * c-common.c (c_common_reswords): Add __is_literal_type.
12338 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12339
81f0bab2
JM
12340 * c-common.c (check_case_value): Remove special C++ code.
12341
200290f2
NP
123422010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12343
12344 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12345 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12346 and RID_LAST_PATTR.
12347 (objc_add_property_declaration): Added additional arguments.
12348 (objc_property_attribute_kind): Removed.
12349 (objc_set_property_attr): Removed.
12350 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12351 copy and nonatomic.
12352 * stub-objc.c (objc_add_property_declaration): Added additional
12353 arguments.
12354 (objc_set_property_attr): Removed.
9faeb493 12355
f614132b
NP
123562010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12357
12358 * c-common.h (objc_add_property_variable): Renamed to
12359 objc_add_property_declaration. Added location argument.
12360 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12361
b8a18805
NP
123622010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12363
12364 * c-common.h (objc_maybe_printable_name): New.
12365 * stub-objc.c (objc_maybe_printable_name): New.
12366
3f8257db
JJ
123672010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12368 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12369
12370 * c-common.h (c_common_mark_addressable_vec): Declare.
12371 * c-common.c (c_common_mark_addressable_vec): New function.
12372
249a82c4
NP
123732010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12374
12375 * c-common.h (objc_set_method_type): Removed.
12376 (objc_add_method_declaration): Added boolean argument.
12377 (objc_start_method_definition): Same change.
12378 (objc_build_method_signature): Same change.
12379 * stub-objc.c (objc_set_method_type): Removed.
12380 (objc_add_method_declaration): Added boolean argument.
12381 (objc_start_method_definition): Same change.
12382 (objc_build_method_signature): Same change.
12383
977e30bc
NP
123842010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12385
12386 * c-common.h (finish_file): Removed.
12387 (objc_write_global_declarations): New.
12388 * c-opts.c (c_common_parse_file): Do not call finish_file.
12389 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12390
da57d1b9
NP
123912010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12392
12393 Implemented parsing @synthesize and @dynamic for
12394 Objective-C/Objective-C++.
12395 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12396 (objc_add_synthesize_declaration): New.
12397 (objc_add_dynamic_declaration): New.
12398 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12399 * stub-objc.c (objc_add_synthesize_declaration): New.
12400 (objc_add_dynamic_declaration): New.
9faeb493 12401
0069111f
MM
124022010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12403
12404 PR target/46041
12405 * c-cppbuiltin.c (mode_has_fma): Move function here from
12406 builtins.c. Don't use the fma optab, instead just use the
12407 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12408 using -save-temps.
12409
e426b47b
NP
124102010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12411
12412 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12413
3f8257db 12414 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12415
9faeb493 12416 Radar 4330422
e426b47b
NP
12417 * c-common.h (objc_non_volatilized_type): New declaration
12418 * stub-objc.c (objc_non_volatilized_type): New stub.
12419
90fbfdc3
NP
124202010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12421
e426b47b 12422 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12423
ab20d992 12424 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12425
9faeb493 12426 Radar 4133425
90fbfdc3 12427 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12428 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12429
c37d8c30
IS
124302010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12431
12432 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12433 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12434 (objc_ivar_visibility_kind): New enum.
12435 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12436 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12437 visibility enum.
12438
1b1562a5
MM
124392010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12440
12441 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12442 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12443 has the appropriate fma builtins.
12444 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12445
668ea4b1
IS
124462010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12447
1b1562a5 12448 merge from FSF apple 'trunk' branch.
3f8257db 12449 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12450
668ea4b1
IS
12451 Radars 4436866, 4505126, 4506903, 4517826
12452 * c-common.c (c_common_resword): Define @property and its attributes.
12453 * c-common.h: Define property attribute enum entries.
12454 (OBJC_IS_PATTR_KEYWORD): New.
12455 (objc_property_attribute_kind): New enum.
12456 Declare objc_set_property_attr (), objc_add_property_variable (),
12457 objc_build_getter_call () and objc_build_setter_call ().
12458 * stub-objc.c (objc_set_property_attr): New stub.
12459 (objc_add_property_variable): Likewise.
12460 (objc_build_getter_call): Likewise.
12461 (objc_build_setter_call) Likewise.
1b1562a5 12462
a1178b30
IS
124632010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12464
1b1562a5 12465 merge from FSF apple 'trunk' branch.
ab20d992 12466 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12467
12468 Radar 3803157 (method attributes)
12469 * c-common.c (handle_deprecated_attribute): Recognize
12470 objc methods as valid declarations.
12471 * c-common.h: Declare objc_method_decl ().
1b1562a5 12472 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12473
a75bfaa6
JM
124742010-10-08 Joseph Myers <joseph@codesourcery.com>
12475
12476 * c-common.c (parse_optimize_options): Call
12477 decode_cmdline_options_to_array_default_mask before
12478 decode_options. Update arguments to decode_options.
12479 * c-common.h (c_common_init_options_struct): Declare.
12480 * c-opts.c (c_common_init_options_struct): New. Split out from
12481 c_common_init_options.
12482
f05b9d93
NP
124832010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12484
12485 Implemented fast enumeration for Objective-C.
12486 * c-common.h (objc_finish_foreach_loop): New.
12487 * stub-objc.c (objc_finish_foreach_loop): New.
12488
1ebe4b4f
JM
124892010-10-05 Joseph Myers <joseph@codesourcery.com>
12490
12491 * c-common.h (struct diagnostic_context): Don't declare here.
12492 (c_common_initialize_diagnostics): Declare using
12493 diagnostic_context typedef.
12494 * c-opts.c (c_common_handle_option): Pass global_dc to
12495 handle_generated_option.
12496
d4d24ba4
JM
124972010-10-04 Joseph Myers <joseph@codesourcery.com>
12498
12499 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12500 handle_generated_option.
12501
478a1c5b
ILT
125022010-10-03 Ian Lance Taylor <iant@google.com>
12503
12504 * c.opt (-fplan9-extensions): New option.
12505
82a1c2fe
FXC
125062010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12507
12508 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12509 Remove.
12510 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12511 of duplicating code.
12512
92902b1b
IS
125132010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12514
12515 * c-common.c: Add two new entries for @optional
12516 and @required keywords.
12517
12518 merge from FSF 'apple/trunk' branch.
3f8257db 12519 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12520
12521 Radar 4386773
12522 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12523 objective-c keywords.
12524 (objc_set_method_opt): New declaration.
12525 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12526
46625112
JM
125272010-09-30 Joseph Myers <joseph@codesourcery.com>
12528
12529 * c-common.c (handle_optimize_attribute): Pass &global_options to
12530 cl_optimization_save and cl_optimization_restore.
12531 * c-opts.c (c_common_handle_option): Pass &global_options to
12532 handle_generated_option.
12533 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12534 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12535 &global_options to cl_optimization_restore.
12536
49b91f05
NP
125372010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12538
12539 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12540 Objective-C/Objective-C++ keywords.
12541
13ed556f 125422010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12543
9faeb493
UB
12544 Merge from 'apple/trunk' branch on FSF servers.
12545
3f8257db 12546 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12547
12548 Radar 4281748
12549 * c-common.h (objc_check_global_decl): New declaration.
12550 * stub-objc.c (objc_check_global_decl): New stub.
12551
f0036cca
JM
125522010-09-29 Joseph Myers <joseph@codesourcery.com>
12553
12554 * c.opt: Don't use VarExists.
12555
e3339d0f
JM
125562010-09-29 Joseph Myers <joseph@codesourcery.com>
12557
12558 * c-common.c (c_cpp_error): Update names of diagnostic_context
12559 members.
12560 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12561 cl_optimization members.
12562 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12563 sanitize_cpp_opts, finish_options): Update names of cpp_options
12564 members.
12565
1973201f
NP
125662010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12567
12568 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12569 (objc_is_reserved_word): Removed.
12570 * c-common.c: Updated comments.
12571 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12572 objc_is_reserved_word.
12573 * stub-objc.c (objc_is_reserved_word): Removed.
12574
f7e71da5
IS
125752010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12576
9faeb493 12577 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12578 include attributes.
12579 (objc_start_method_definition): Likewise.
12580 (objc_build_keyword_decl): Likewise.
12581 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12582 (objc_start_method_definition): Likewise.
12583 (objc_build_keyword_decl): Likewise.
12584
c165dca7
IS
125852010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12586
12587 * c-common.h (objc_start_class_interface): Adjust prototype.
12588 (objc_start_category_interface): Likewise.
12589 (objc_start_protocol): Likewise.
12590 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12591 (objc_start_class_interface): Likewise.
12592 (objc_start_category_interface): Likewise.
12593
7458026b
ILT
125942010-09-27 Ian Lance Taylor <iant@google.com>
12595
12596 * c-common.c (c_common_attribute_table): Add no_split_stack.
12597 (handle_no_split_stack_attribute): New static function.
12598
b581b85b
NP
125992010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12600
9faeb493 12601 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12602
3f8257db 12603 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12604
9faeb493 12605 Radar 4229905
b581b85b
NP
12606 * c-common.h (objc_have_common_type): New declaration.
12607 * stub-objc.c (objc_have_common_type): New stub.
12608
12609 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12610
12611 Radar 4154928
12612 * c-common.h (objc_common_type): New prototype.
9faeb493 12613 * stub-objc.c (objc_common_type): New stub.
b581b85b 12614
46a4da10
JH
126152010-09-24 Jan Hubicka <jh@suse.cz>
12616
12617 * c-common.c (handle_leaf_attribute): New function.
12618 (struct attribute_spec c_common_att): Add leaf.
12619
e200444e
JM
126202010-09-22 Joseph Myers <joseph@codesourcery.com>
12621
12622 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12623 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12624 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12625 -include-barrier, -include-directory, -include-directory=,
12626 -include-directory-after, -include-directory-after=,
12627 -include-prefix, -include-prefix=, -include-with-prefix,
12628 -include-with-prefix=, -include-with-prefix-after,
12629 -include-with-prefix-after=, -include-with-prefix-before,
12630 -include-with-prefix-before=, -no-integrated-cpp,
12631 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12632 -output=, -pedantic, -pedantic-errors, -preprocess,
12633 -print-missing-file-dependencies, -trace-includes, -traditional,
12634 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12635 -user-dependencies, -verbose, -write-dependencies,
12636 -write-user-dependencies, no-integrated-cpp, traditional): New.
12637
29a80ea6
NP
126382010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12639
12640 PR objc/23710
ac1fc2fc
NP
12641 * c-common.h (objc_start_method_definition): Return bool instead
12642 of void.
12643 * stub-objc.c (objc_start_method_definition): Return bool instead
12644 of void.
12645
126462010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12647
12648 PR objc/25965
12649 * c-common.h (objc_get_interface_ivars): New declaration.
12650 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12651
de621752
ILT
126522010-09-15 Ian Lance Taylor <iant@google.com>
12653
12654 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12655 messages. Remove period at end of warning message.
de621752 12656
ba885ec5
NS
126572010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12658
12659 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12660 (handle_alias_attribute): ... here.
12661 (handle_ifunc_attribute): New.
12662
c5ee1358
MM
126632010-09-06 Mark Mitchell <mark@codesourcery.com>
12664
12665 * c-common.h (do_warn_double_promotion): Declare.
12666 * c-common.c (do_warn_double_promotion): Define.
12667
0a0b3574
MM
126682010-09-05 Mark Mitchell <mark@codesourcery.com>
12669
12670 * c.opt (Wdouble-promotion): New.
12671
d1779886
JM
126722010-09-02 Joseph Myers <joseph@codesourcery.com>
12673
12674 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12675 fvtable-thunks, fxref): Mark no longer supported in help text.
12676
2d2bd949
JM
126772010-09-02 Joseph Myers <joseph@codesourcery.com>
12678
12679 * c.opt (Wimport, fall-virtual, falt-external-templates,
12680 fdefault-inline, fenum-int-equiv, fexternal-templates,
12681 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12682 fname-mangling-version-, fnew-abi, fnonnull-objects,
12683 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12684 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12685 applicable.
12686 (fhandle-exceptions): Mark with Alias and Warn.
12687 * c-opts.c (c_common_handle_option): Don't handle options marked
12688 as ignored.
12689
5de8299c
JM
126902010-09-02 Joseph Myers <joseph@codesourcery.com>
12691
12692 * c.opt (Wcomments, Werror-implicit-function-declaration,
12693 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12694 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12695 aliases.
12696 * c-common.c (option_codes): Use OPT_Wcomment instead of
12697 OPT_Wcomments.
12698 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12699 Don't handle options marked as aliases.
12700
0ceb0201
RG
127012010-08-25 Richard Guenther <rguenther@suse.de>
12702
12703 * c-common.c (c_common_get_alias_set): Remove special
12704 handling for pointers.
12705
ac47786e
NF
127062010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12707
12708 * c-common.c: Use FOR_EACH_VEC_ELT.
12709 * c-gimplify.c: Likewise.
12710 * c-pragma.c: Likewise.
12711
c878765b
JM
127122010-08-16 Joseph Myers <joseph@codesourcery.com>
12713
12714 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12715 RejectDriver.
12716 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12717 RejectDriver.
12718 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12719 instead of OPT_MDX and OPT_MMDX.
12720
603349bf
JM
127212010-08-16 Joseph Myers <joseph@codesourcery.com>
12722
12723 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12724
644fa7ac
JM
127252010-08-12 Joseph Myers <joseph@codesourcery.com>
12726
12727 * c.opt (MD, MMD): Change to MDX and MMDX.
12728 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12729
481e1176
JM
127302010-08-11 Joseph Myers <joseph@codesourcery.com>
12731
12732 * c-opts.c (c_common_handle_option): Call handle_generated_option
12733 instead of handle_option.
12734
ac8dc9f7
NF
127352010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12736
12737 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12738 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12739
4f8c876d
NF
127402010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12741
12742 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12743 (pending_redefine_extname): Change type to a VEC.
12744 (add_to_renaming_pragma_list): Update for new type of
12745 pending_redefine_extname.
ac8dc9f7 12746 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12747
3b0c690e
AC
127482010-08-04 Arnaud Charlet <charlet@adacore.com>
12749
12750 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12751 visited.
12752 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12753 decide whether a type has already been declared/seen.
12754 Do not go to the original type.
12755 (dump_nested_types): New parameter forward.
12756 Generate forward declaration if needed and mark type as visited.
12757 (print_ada_declaration): Call dump_nested_types if not already done.
12758 Mark types as visited.
12759
1890bccc
JM
127602010-08-03 Joseph Myers <joseph@codesourcery.com>
12761
12762 * c.opt (-print-pch-checksum): Remove option.
12763 * c-opts.c (c_common_handle_option): Don't handle
12764 OPT_print_pch_checksum.
12765
5f20c657
JM
127662010-07-27 Joseph Myers <joseph@codesourcery.com>
12767
12768 * c-common.h (c_common_handle_option): Update prototype and return
12769 value type.
12770 * c-opts.c (c_common_handle_option): Update prototype and return
12771 value type. Update calls to handle_option and
12772 enable_warning_as_error.
12773
f551f80c
JJ
127742010-07-27 Jakub Jelinek <jakub@redhat.com>
12775
12776 PR c/45079
12777 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12778
61ff2bdc
JM
127792010-07-27 Joseph Myers <joseph@codesourcery.com>
12780
12781 * c-common.h (c_common_missing_argument): Remove.
12782 * c-opts.c (c_common_missing_argument): Remove.
12783 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12784 idirafter, imacros, include, isysroot, isystem, iquote): Add
12785 MissingArgError.
12786 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12787
7a9bf9a4
JM
127882010-07-27 Joseph Myers <joseph@codesourcery.com>
12789
12790 * c-common.h (c_common_option_lang_mask,
12791 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12792 New.
12793 (c_common_init_options): Update prototype.
12794 * c-opts.c (c_common_option_lang_mask): New.
12795 (c_common_initialize_diagnostics): Split out of
12796 c_common_init_options.
12797 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12798 New.
12799 (c_common_init_options): Update prototype. Use decoded options in
12800 search for -lang-asm.
12801
910ad8de
NF
128022010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12803
12804 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12805 * c-format.c: Likewise.
12806
718f9c0f
MLI
128072010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12808
12809 * c-common.h: Include diagnostic-core.h. Error if already
12810 included.
12811 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12812
4d451982
MLI
128132010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12814
adfac8df 12815 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12816 Do not include expr.h
12817 (vector_mode_valid_p): Move here.
12818
119fe915
SB
128192010-06-21 DJ Delorie <dj@redhat.com>
12820
12821 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12822 allow these pragmas anywhere.
12823
128242010-06-14 Jakub Jelinek <jakub@redhat.com>
12825
12826 PR bootstrap/44509
12827 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12828 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12829 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12830 ggc_strdup instead of xstrdup.
12831
128322010-06-10 Jakub Jelinek <jakub@redhat.com>
12833
12834 * c-cppbuiltin.c: Include cpp-id-data.h.
12835 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12836 (lazy_hex_fp_value): New function.
12837 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12838
6662d794
MLI
128392010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12840
12841 * c-gimplify.c: Do not include tree-flow.h
12842
38f8b050
JR
128432010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12844
12845 PR other/44034
12846 * c-common.c: Rename targetm member:
12847 targetm.enum_va_list -> targetm.enum_va_list_p
12848
9589f23e
AS
128492010-06-28 Anatoly Sokolov <aesok@post.ru>
12850
12851 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12852
3b06d379
SB
128532010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12854
12855 * c-cppbuiltin.c: Do not include except.h.
12856
d166d4c3
AK
128572010-06-24 Andi Kleen <ak@linux.intel.com>
12858
9faeb493
UB
12859 * c-common.c (warn_for_omitted_condop): New.
12860 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12861
70cb8be6
JM
128622010-06-21 Joseph Myers <joseph@codesourcery.com>
12863
12864 * c.opt (lang-objc): Remove.
12865 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12866
a4c97feb
JR
128672010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12868
12869 * c-opts.c: Include "tm_p.h".
12870
6e2f1956
JM
128712010-06-20 Joseph Myers <joseph@codesourcery.com>
12872
12873 * c-common.c (parse_optimize_options): Update call to
12874 decode_options.
12875
bc87224e
NF
128762010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12877
12878 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12879 new type of types_used_by_cur_var_decl.
12880
b49cf425
JR
128812010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12882
12883 PR bootstrap/44512
12884 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12885 for C++ standard compliance.
12886
59f9c2ed
JM
128872010-06-16 Jason Merrill <jason@redhat.com>
12888
12889 * c.opt: Add -Wnoexcept.
12890
33766b66
RG
128912010-06-16 Richard Guenther <rguenther@suse.de>
12892
12893 PR c/44555
12894 * c-common.c (c_common_truthvalue_conversion): Remove
12895 premature and wrong optimization concering ADDR_EXPRs.
12896
eff7e30c
AC
128972010-06-15 Arnaud Charlet <charlet@adacore.com>
12898
12899 * c-ada-spec.c (dump_sloc): Remove column info.
12900 (is_simple_enum): New function.
12901 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12902 enum types when relevant.
12903
6312e84d
MLI
129042010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12905
9faeb493 12906 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12907 location.
12908
1cb42611
JM
129092010-06-10 Joseph Myers <joseph@codesourcery.com>
12910
12911 * c-opts.c (c_common_handle_option): Don't handle
12912 OPT_fshow_column.
12913
a9429e29
LB
129142010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12915
12916 * c-pragma.c (push_alignment): Use typed GC allocation.
12917 (handle_pragma_push_options): Likewise.
12918
12919 * c-common.c (parse_optimize_options): Likewise.
12920
12921 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12922 option.
12923
5498f011
JM
129242010-06-07 Joseph Myers <joseph@codesourcery.com>
12925
12926 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12927 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12928 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12929 flag_signed_bitfields, warn_strict_null_sentinel,
12930 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12931 flag_gen_declaration, flag_no_gnu_keywords,
12932 flag_implement_inlines, flag_implicit_templates,
12933 flag_implicit_inline_templates, flag_optional_diags,
12934 flag_elide_constructors, flag_default_inline, flag_rtti,
12935 flag_conserve_space, flag_access_control, flag_check_new,
12936 flag_new_for_scope, flag_weak, flag_working_directory,
12937 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12938 flag_enforce_eh_specs, flag_threadsafe_statics,
12939 flag_pretty_templates): Remove.
12940 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12941 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12942 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12943 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12944 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12945 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12946 flag_no_gnu_keywords, flag_implement_inlines,
12947 flag_implicit_templates, flag_implicit_inline_templates,
12948 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12949 flag_rtti, flag_conserve_space, flag_access_control,
12950 flag_check_new, flag_new_for_scope, flag_weak,
12951 flag_working_directory, flag_use_cxa_atexit,
12952 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12953 flag_threadsafe_statics, flag_pretty_templates,
12954 warn_strict_null_sentinel): Remove.
12955 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12956 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12957 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12958 fimplicit-inline-templates, fimplicit-templates,
12959 flax-vector-conversions, fms-extensions, fnil-receivers,
12960 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12961 frtti, fshort-double, fshort-enums, fshort-wchar,
12962 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12963 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12964 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12965 gen-decls, undef): Use Var.
12966 (fdefault-inline, foptional-diags): Document as doing nothing.
12967 * c-opts.c (c_common_handle_option): Remove cases for options now
12968 using Var. Mark ignored options as such.
12969
39dabefd
SB
129702010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12971
9faeb493 12972 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12973 * c-common.def: Likewise.
12974 * c-common.h: Likewise.
12975 * c-cppbuiltin.c: Likewise.
12976 * c-dump.c: Likewise.
12977 * c-format.c: Likewise.
12978 * c-format.h : Likewise.
12979 * c-gimplify.c: Likewise.
12980 * c-lex.c: Likewise.
12981 * c-omp.c: Likewise.
12982 * c.opt: Likewise.
12983 * c-opts.c: Likewise.
12984 * c-pch.c: Likewise.
12985 * c-ppoutput.c: Likewise.
12986 * c-pragma.c: Likewise.
12987 * c-pragma.h: Likewise.
12988 * c-pretty-print.c: Likewise.
12989 * c-pretty-print.h: Likewise.
12990 * c-semantics.c: Likewise.
12991 * stub-objc.c: Likewise.
12992
12993 * c-common.c: Include gt-c-family-c-common.h.
12994 * c-pragma.c: Include gt-c-family-c-pragma.h.
12995\f
877e3c2a 12996Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
12997
12998Copying and distribution of this file, with or without modification,
12999are permitted in any medium without royalty provided the copyright
13000notice and this notice are preserved.