]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
analyzer: more uninit test coverage
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
bb99171b
GA
12022-01-24 Marek Polacek <polacek@redhat.com>
2
3 PR preprocessor/104030
4 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
5
9dd44357
GA
62022-01-21 Jakub Jelinek <jakub@redhat.com>
7
8 PR c++/104148
9 * c-common.h (check_function_arguments_recurse): Add for_format
10 arg.
11 * c-common.cc (check_function_nonnull): Pass false to
12 check_function_arguments_recurse's last argument.
13 (check_function_arguments_recurse): Add for_format argument,
14 if true, don't stop on warning_suppressed_p.
15 * c-format.cc (check_format_info): Pass true to
16 check_function_arguments_recurse's last argument.
17
fe1ad141
GA
182022-01-19 David Malcolm <dmalcolm@redhat.com>
19
20 * c-common.cc (c_common_c_tests): Rename to...
21 (c_common_cc_tests): ...this.
22 (c_family_tests): Update calls for .c to .cc renaming.
23 * c-common.h (c_format_c_tests): Rename to...
24 (c_format_cc_tests): ...this.
25 (c_indentation_c_tests): Rename to...
26 (c_indentation_cc_tests): ...this.
27 (c_pretty_print_c_tests): Rename to...
28 (c_pretty_print_cc_tests): ...this.
29 * c-format.cc (c_format_c_tests): Rename to...
30 (c_format_cc_tests): ...this.
31 * c-indentation.cc (c_indentation_c_tests): Rename to...
32 (c_indentation_cc_tests): ...this.
33 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
34 (c_pretty_print_cc_tests): ...this.
35
fc829782
GA
362022-01-17 Martin Liska <mliska@suse.cz>
37
38 * c-ada-spec.cc: Rename .c names to .cc.
39 * c-ada-spec.h: Likewise.
40 * c-common.cc (c_build_vec_convert): Likewise.
41 (warning_candidate_p): Likewise.
42 * c-common.h (enum rid): Likewise.
43 (build_real_imag_expr): Likewise.
44 (finish_label_address_expr): Likewise.
45 (c_get_substring_location): Likewise.
46 (c_build_bind_expr): Likewise.
47 (conflict_marker_get_final_tok_kind): Likewise.
48 (c_parse_error): Likewise.
49 (check_missing_format_attribute): Likewise.
50 (invalid_array_size_error): Likewise.
51 (warn_for_multistatement_macros): Likewise.
52 (build_attr_access_from_parms): Likewise.
53 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
54 * c-format.cc: Likewise.
55 * c-gimplify.cc (c_gimplify_expr): Likewise.
56 * c-indentation.h: Likewise.
57 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
58 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
59 * c-opts.cc (c_common_post_options): Likewise.
60 (set_std_cxx23): Likewise.
61 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
62 * c-pretty-print.h: Likewise.
63
642022-01-17 Martin Liska <mliska@suse.cz>
65
66 * c-ada-spec.c: Moved to...
67 * c-ada-spec.cc: ...here.
68 * c-attribs.c: Moved to...
69 * c-attribs.cc: ...here.
70 * c-common.c: Moved to...
71 * c-common.cc: ...here.
72 * c-cppbuiltin.c: Moved to...
73 * c-cppbuiltin.cc: ...here.
74 * c-dump.c: Moved to...
75 * c-dump.cc: ...here.
76 * c-format.c: Moved to...
77 * c-format.cc: ...here.
78 * c-gimplify.c: Moved to...
79 * c-gimplify.cc: ...here.
80 * c-indentation.c: Moved to...
81 * c-indentation.cc: ...here.
82 * c-lex.c: Moved to...
83 * c-lex.cc: ...here.
84 * c-omp.c: Moved to...
85 * c-omp.cc: ...here.
86 * c-opts.c: Moved to...
87 * c-opts.cc: ...here.
88 * c-pch.c: Moved to...
89 * c-pch.cc: ...here.
90 * c-ppoutput.c: Moved to...
91 * c-ppoutput.cc: ...here.
92 * c-pragma.c: Moved to...
93 * c-pragma.cc: ...here.
94 * c-pretty-print.c: Moved to...
95 * c-pretty-print.cc: ...here.
96 * c-semantics.c: Moved to...
97 * c-semantics.cc: ...here.
98 * c-ubsan.c: Moved to...
99 * c-ubsan.cc: ...here.
100 * c-warn.c: Moved to...
101 * c-warn.cc: ...here.
102 * cppspec.c: Moved to...
103 * cppspec.cc: ...here.
104 * stub-objc.c: Moved to...
105 * stub-objc.cc: ...here.
106
9248ee41
GA
1072022-01-15 Martin Sebor <msebor@redhat.com>
108
109 PR c/63272
110 * c.opt (-Wdangling-pointer): New option.
111
1122022-01-15 Martin Sebor <msebor@redhat.com>
113
114 PR tree-optimization/80532
115 * c.opt (-Wuse-after-free): New options.
116
617db51d
GA
1172022-01-14 David Malcolm <dmalcolm@redhat.com>
118
119 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
120 (handle_tainted_args_attribute): New.
121
ad3f0d08
GA
1222022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
123 Jason Merrill <jason@redhat.com>
124
125 PR c++/70417
126 * c.opt: Added -Wmissing-template-keyword.
127
1282022-01-13 Richard Biener <rguenther@suse.de>
129
130 PR c/104002
131 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
132
02a8a01b
GA
1332022-01-12 Martin Liska <mliska@suse.cz>
134
135 PR target/103804
136 * c-attribs.c (handle_optimize_attribute): Do not call
137 cl_optimization_compare if we seen an error.
138
01a254e3
GA
1392022-01-11 Jakub Jelinek <jakub@redhat.com>
140
141 PR c/101537
142 PR c/103881
143 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
144 and BIT_XOR_EXPR.
145
d9450aa0
GA
1462022-01-10 Richard Biener <rguenther@suse.de>
147
148 PR middle-end/101530
149 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
150 in a TARGET_EXPR to force a temporary.
151
11ce8d04
GA
1522022-01-06 Marek Polacek <polacek@redhat.com>
153
154 PR c++/103758
155 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
156 diagnostic messages.
157 (handle_pragma_diagnostic): Likewise.
158
a4ae8c37
GA
1592022-01-03 Marek Polacek <polacek@redhat.com>
160
161 PR c++/103758
162 * c-format.c (check_tokens): Accept "decl-specifier*".
163
1642022-01-03 Jakub Jelinek <jakub@redhat.com>
165
166 PR c++/103600
167 * c-attribs.c (handle_non_overlapping_attribute): New function.
168 (c_common_attribute_table): Add "non overlapping" attribute.
169
84790a9d
GA
1702021-12-30 Jakub Jelinek <jakub@redhat.com>
171
172 PR c++/103012
173 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
174 cpp_define_unused/cpp_undef calls with forced token locations
175 BUILTINS_LOCATION.
176
d1e111da
GA
1772021-12-27 Patrick Palka <ppalka@redhat.com>
178
179 PR c++/103700
180 * c-common.c (pointer_int_sum): When quiet, return
181 error_mark_node for an incomplete pointed-to type and don't
182 call size_in_bytes_loc.
183
2554e2da
GA
1842021-12-17 Jason Merrill <jason@redhat.com>
185
186 PR c++/103681
187 * c-opts.c (c_common_post_options): Update defaults.
188
774269aa
GA
1892021-12-16 Martin Liska <mliska@suse.cz>
190
191 PR target/103709
192 * c-pragma.c (handle_pragma_pop_options): Do not check
193 global options modification when an error is seen in parsing
194 of options (pragmas or attributes).
195
c8dcf64b
GA
1962021-12-12 Jonathan Wakely <jwakely@redhat.com>
197
198 * known-headers.cc: Define INCLUDE_MEMORY instead of
199 INCLUDE_UNIQUE_PTR.
200 * name-hint.h: Likewise.
201 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
202
4b4839e3
GA
2032021-12-09 Jakub Jelinek <jakub@redhat.com>
204
205 PR pch/71934
206 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
207 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
208
03a9bd05
GA
2092021-12-03 Jakub Jelinek <jakub@redhat.com>
210
211 PR pch/71934
212 * c-pch.c (struct c_pch_validity): Remove pch_init member.
213 (pch_init): Don't initialize v.pch_init.
214 (c_common_valid_pch): Don't warn and punt if .text addresses change.
215
40fa651e
GA
2162021-12-01 Jason Merrill <jason@redhat.com>
217
218 PR c++/103310
219 * c.opt: Add -fconstexpr-fp-except.
220
87cd82c8
GA
2212021-11-29 Richard Biener <rguenther@suse.de>
222
223 * c-format.c (check_format_string): Remove spurious
224 gcc_unreachable.
225
2262021-11-29 Richard Biener <rguenther@suse.de>
227
228 * c-opts.c (c_common_post_options): Remove unreachable return.
229 * c-pragma.c (handle_pragma_target): Likewise.
230 (handle_pragma_optimize): Likewise.
231
091ccc06
GA
2322021-11-25 Jakub Jelinek <jakub@redhat.com>
233
234 PR c++/102611
235 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
236 default for C++23 regardless of warn_deprecated.
237 * c-cppbuiltin.c (c_cpp_builtins): Predefine
238 __cpp_multidimensional_subscript=202110L for C++23.
239
e1d43592
GA
2402021-11-23 Martin Sebor <msebor@redhat.com>
241
242 PR middle-end/88232
243 * c.opt: Add -Winfinite-recursion.
244
9c077398
GA
2452021-11-19 Martin Sebor <msebor@redhat.com>
246
247 PR c++/33925
248 PR c/102867
249 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
250 and improve handling tof defined symbols.
251
2522021-11-19 Martin Liska <mliska@suse.cz>
253
254 Revert:
255 2021-11-18 Martin Liska <mliska@suse.cz>
256
257 * c-gimplify.c (genericize_c_loop): Use option directly.
258
483092d3
GA
2592021-11-18 Matthias Kretz <m.kretz@gsi.de>
260
261 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
262 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
263
2642021-11-18 Martin Liska <mliska@suse.cz>
265
266 * c-gimplify.c (genericize_c_loop): Use option directly.
267
280d2838
GA
2682021-11-17 Martin Uecker <uecker@gcc.gnu.org>
269
270 PR c/91038
271 PR c/29970
272 * c-common.c (pointer_int_sum): Make sure pointer expressions
273 are evaluated first when the size expression depends on for
274 variably-modified types.
275
2762021-11-17 Marek Polacek <polacek@redhat.com>
277
278 PR preprocessor/103026
279 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
280
6b1695f4
GA
2812021-11-16 Jason Merrill <jason@redhat.com>
282
283 * c-common.c (release_tree_vector): Only cache vecs smaller than
284 16 elements.
285
e2b57363
GA
2862021-11-15 Jason Merrill <jason@redhat.com>
287
288 * c.opt: Add -fimplicit-constexpr.
289 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
290 * c-opts.c (c_common_post_options): Disable below C++14.
291
2922021-11-15 Jakub Jelinek <jakub@redhat.com>
293
294 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
295 Duplicate to both OMP_TARGET and OMP_TEAMS.
296
8d36a0d2
GA
2972021-11-10 Marek Polacek <polacek@redhat.com>
298
299 PR c++/101940
300 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
301 ignored_attributes.
302
c9b1334e
GA
3032021-11-09 David Malcolm <dmalcolm@redhat.com>
304
305 * c-pragma.c (GCC_BAD_AT): New macro.
306 (GCC_BAD2_AT): New macro.
307 (handle_pragma_pack): Use the location of the pertinent token when
308 issuing diagnostics about invalid constants/actions, and trailing
309 junk.
310 (handle_pragma_target): Likewise for non-string "GCC option".
311 (handle_pragma_message): Likewise for trailing junk.
312
18ae471f
GA
3132021-11-03 Joseph Myers <joseph@codesourcery.com>
314
315 PR c/103031
316 * c-common.c (convert_and_check): Add argument init_const. Call
317 convert_init if init_const.
318 * c-common.h (convert_and_check): Update prototype.
319 (convert_init): New prototype.
320
cf82e8d9
GA
3212021-11-01 David Malcolm <dmalcolm@redhat.com>
322
323 * c-lex.c (c_lex_with_flags): When complaining about non-printable
324 CPP_OTHER tokens, set the "escape on output" flag.
325
04a2cf3f
GA
3262021-10-27 Jakub Jelinek <jakub@redhat.com>
327
328 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
329 POINTER_PLUS_EXPR.
330 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
331 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
332
3332021-10-27 Jakub Jelinek <jakub@redhat.com>
334
335 PR c++/102854
336 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
337 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
338 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
339 conversions temporarily clear the 3rd bit from d->kind while walking
340 subtrees.
341 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
342 if possibly non-rectangular.
343
ae5c5406
GA
3442021-10-21 Jakub Jelinek <jakub@redhat.com>
345
346 PR middle-end/64888
347 * c-omp.c (c_omp_predefined_variable): Return true also for
348 ubsan_create_data created artificial variables.
349
5d5885c9
GA
3502021-10-14 Joseph Myers <joseph@codesourcery.com>
351
352 * c-format.c (printf_length_specs, scanf_length_specs)
353 (print_char_table, scan_char_table): Support DFP formats for C2X.
354 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
355 (T2X_D32, T2X_D64, T2X_D128): New macros.
356
3572021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
358
359 * c-omp.c (c_omp_check_context_selector): Rename to
360 omp_check_context_selector and move to omp-general.c.
361 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
362 move to omp-general.c.
363
52055987
GA
3642021-10-12 Joseph Myers <joseph@codesourcery.com>
365
366 * c-format.c (print_char_table): Add %b and %B formats.
367 (scan_char_table): Add %b format.
368 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
369 (T2X_UPD, T2X_UIM): New macros.
370
3712021-10-12 Jakub Jelinek <jakub@redhat.com>
372
373 * c-omp.c (c_finish_omp_atomic): Use
374 clear_padding_type_may_have_padding_p.
375
ce6eec39
GA
3762021-10-08 Martin Liska <mliska@suse.cz>
377
378 * c-opts.c (c_common_post_options): Use new macro
379 OPTION_SET_P.
380
50e20ee6
GA
3812021-10-07 Martin Liska <mliska@suse.cz>
382
383 * c-common.c (parse_optimize_options): Make
384 save_opt_decoded_options a pointer type.
385
57c7ec62
GA
3862021-10-06 Jakub Jelinek <jakub@redhat.com>
387
388 PR tree-optimization/102571
389 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
390 padding, but the non-padding bits are contiguous set of bytes
391 by adjusting the memcmp call arguments instead of emitting
392 __builtin_clear_padding and then comparing all the type's bytes.
393
3942021-10-06 Jakub Jelinek <jakub@redhat.com>
395
396 PR c++/102612
397 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
398 __cpp_constexpr to 202110L rather than 201907L.
399
da9c5f78
GA
4002021-10-04 Marek Polacek <polacek@redhat.com>
401
402 PR c++/97573
403 * c-common.h (do_warn_array_compare): Declare.
404 * c-warn.c (do_warn_array_compare): New.
405 * c.opt (Warray-compare): New option.
406
e3e07b89
GA
4072021-10-02 Iain Sandoe <iain@sandoe.co.uk>
408
409 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
410 NULL, this is not needed.
411
9d116bcc
GA
4122021-10-01 Martin Sebor <msebor@redhat.com>
413
414 PR c/102103
415 * c-common.c (decl_with_nonnull_addr_p): Handle members.
416 Check and perform warning suppression.
417 (c_common_truthvalue_conversion): Enhance warning suppression.
418
4192021-10-01 Martin Liska <mliska@suse.cz>
420
421 PR target/102552
422 * c-common.c (parse_optimize_options): decoded_options[0] is
423 used for program name, so merged_decoded_options should also
424 respect that.
425
4262021-10-01 Jakub Jelinek <jakub@redhat.com>
427 Richard Biener <rguenther@suse.de>
428
429 PR sanitizer/102515
430 * c-ubsan.c (ubsan_instrument_division): Check the right
431 flag_sanitize_recover bit, depending on which sanitization
432 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
433 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
434 and SANITIZE_DIVIDE is enabled, neither check is known
435 to be false and flag_sanitize_recover bits for those two
436 aren't the same, emit both __ubsan_handle_divrem_overflow
437 and __ubsan_handle_divrem_overflow_abort calls.
438
4392021-10-01 Martin Liska <mliska@suse.cz>
440
441 * c-common.c (parse_optimize_options): Combine optimize
442 options with what was provided on the command line.
443
4442021-10-01 Jakub Jelinek <jakub@redhat.com>
445
446 * c-omp.c (c_omp_split_clauses): Also copy
447 OMP_CLAUSE_ORDER_REPRODUCIBLE.
448
cf966403
GA
4492021-09-27 Martin Liska <mliska@suse.cz>
450
451 * c-opts.c (c_common_init_options_struct): Set also
452 x_flag_default_complex_method.
453
e4777439
GA
4542021-09-22 Jakub Jelinek <jakub@redhat.com>
455
456 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
457
62498024
GA
4582021-09-20 Matthias Kretz <m.kretz@gsi.de>
459
460 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
461 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
462 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
463 __ROUNDING_MATH__ according to the new optimization flags.
464
cf74e7b5
GA
4652021-09-18 Jakub Jelinek <jakub@redhat.com>
466
467 * c-omp.c (c_omp_split_clauses): Split order clause also to
468 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
469
0a4cb439
GA
4702021-09-17 Jakub Jelinek <jakub@redhat.com>
471
472 * c-omp.c (c_finish_omp_atomic): Avoid creating
473 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
474 create_tmp_var and add a zero initializer to TARGET_EXPRs that
475 had NULL initializer. When omitting operands after v = x,
476 use type of v rather than type of x. Fix type of vtmp
477 TARGET_EXPR.
478
07985c47
GA
4792021-09-13 Jason Merrill <jason@redhat.com>
480
481 * c.opt: Add -Winterference-size.
482 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
483 and __GCC_CONSTRUCTIVE_SIZE.
484
a26206ec
GA
4852021-09-10 Jakub Jelinek <jakub@redhat.com>
486
487 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
488 * c-omp.c: Include gimple-fold.h.
489 (c_finish_omp_atomic): Add r and weak arguments. Add support for
490 OpenMP 5.1 atomics.
491
f84e2f0b
GA
4922021-09-09 qing zhao <qing.zhao@oracle.com>
493
494 * c-attribs.c (handle_uninitialized_attribute): New function.
495 (c_common_attribute_table): Add "uninitialized" attribute.
496
b6db7cd4
GA
4972021-09-08 liuhongt <hongtao.liu@intel.com>
498
499 * c-common.c (excess_precision_mode_join): Update below comments.
500 (c_ts18661_flt_eval_method): Set excess_precision_type to
501 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
502 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
503 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
504 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
505
b2748138
GA
5062021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
507
508 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
509
7b739540
GA
5102021-09-03 Eric Botcazou <ebotcazou@adacore.com>
511
512 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
513 and -gnatwu warning for the package specification.
514
e11c6046
GA
5152021-09-01 Iain Sandoe <iain@sandoe.co.uk>
516
517 * c-attribs.c (handle_unavailable_attribute): New.
518
1e2f030b
GA
5192021-08-30 Jason Merrill <jason@redhat.com>
520
521 * c.opt: Add -Wmissing-requires.
522
85d77ac4
GA
5232021-08-25 Lewis Hyatt <lhyatt@gmail.com>
524
525 PR other/93067
526 * c-opts.c (c_common_input_charset_cb): New function.
527 (c_common_post_options): Call new function
528 diagnostic_initialize_input_context().
529
7c9e1645
GA
5302021-08-20 Tobias Burnus <tobias@codesourcery.com>
531
532 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
533 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
534 "di" and "u", respecitively; fill with BADLEN to match
535 size of 'types'.
536 (get_init_dynamic_hwi): Split off from ...
537 (init_dynamic_diag_info): ... here. Call it.
538 (init_dynamic_gfc_info): Call it.
539
5402021-08-20 Jakub Jelinek <jakub@redhat.com>
541
542 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
543 * c-pragma.c (omp_pragmas): Add error directive.
544 * c-omp.c (omp_directives): Uncomment error directive entry.
545
6e529985
GA
5462021-08-18 Jakub Jelinek <jakub@redhat.com>
547
548 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
549 * c-pragma.c (omp_pragmas): Add nothing directive.
550 * c-omp.c (omp_directives): Uncomment nothing directive entry.
551
2d14d64b
GA
5522021-08-17 Jakub Jelinek <jakub@redhat.com>
553
554 PR c++/101539
555 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
556 * c-common.c (c_common_reswords): Add __is_layout_compatible.
557
5582021-08-17 Matt Jacobson <mhjacobson@me.com>
559
560 * c-opts.c (c_common_post_options): Default to
561 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
562
5632021-08-17 Jakub Jelinek <jakub@redhat.com>
564
565 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
566 * c-pragma.c (omp_pragmas): Add scope construct.
567 * c-omp.c (omp_directives): Uncomment scope directive entry.
568
9d1d9fc8
GA
5692021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
570
571 * c-cppbuiltin.c (c_cpp_builtins): Define
572 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
573
72be20e2
GA
5742021-08-12 Jakub Jelinek <jakub@redhat.com>
575
576 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
577 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
578 * c-pragma.c (omp_pragmas_simd): Add masked construct.
579 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
580 enumerator.
581 (c_finish_omp_masked): Declare.
582 * c-omp.c (c_finish_omp_masked): New function.
583 (c_omp_split_clauses): Handle combined masked constructs.
584
4d17ca1b
GA
5852021-07-30 Jakub Jelinek <jakub@redhat.com>
586
587 PR c++/101539
588 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
589 * c-common.c (c_common_reswords): Add
590 __is_pointer_interconvertible_base_of.
591
5922021-07-29 Richard Biener <rguenther@suse.de>
593
594 PR c/101512
595 * c-common.c (c_common_mark_addressable_vec): Look through
596 C_MAYBE_CONST_EXPR even if not at the toplevel.
597
af3f12e6
GA
5982021-07-27 Martin Sebor <msebor@redhat.com>
599
600 PR c/101585
601 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
602
ead235f6
GA
6032021-07-23 Jakub Jelinek <jakub@redhat.com>
604
605 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
606 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
607 and later.
608
6092021-07-23 Jakub Jelinek <jakub@redhat.com>
610
611 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
612 PRAGMA_OMP__LAST_ enumerators.
613
419c6c68
GA
6142021-07-21 Thomas Schwinge <thomas@codesourcery.com>
615 Joseph Myers <joseph@codesourcery.com>
616 Cesar Philippidis <cesar@codesourcery.com>
617
618 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
619
92d45509
GA
6202021-07-20 Martin Sebor <msebor@redhat.com>
621
622 * c-common.c (c_build_shufflevector): Adjust by-value argument to
623 by-const-reference.
624 * c-common.h (c_build_shufflevector): Same.
625
87277b6a
GA
6262021-07-16 Andrew Pinski <apinski@marvell.com>
627
628 PR c/101453
629 * c-common.c (parse_optimize_options): Use the correct
630 size for buffer.
631
d97d71a1
GA
6322021-07-15 Martin Sebor <msebor@redhat.com>
633
634 PR c/101289
635 PR c/97548
636 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
637
c4fee1c6
GA
6382021-07-14 Jason Merrill <jason@redhat.com>
639
640 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
641
6fba0eea
GA
6422021-07-06 Martin Sebor <msebor@redhat.com>
643
644 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
645 (gcc_cdiag_char_table): Same.
646 (gcc_cxxdiag_char_table): Same.
647
7a60a6e8
GA
6482021-07-02 Jakub Jelinek <jakub@redhat.com>
649
650 * c-common.h (enum c_omp_directive_kind): New enum.
651 (struct c_omp_directive): New type.
652 (c_omp_categorize_directive): Declare.
653 * c-omp.c (omp_directives): New variable.
654 (c_omp_categorize_directive): New function.
655
bea7c16a
GA
6562021-07-01 Eric Botcazou <ebotcazou@adacore.com>
657
658 * c-ada-spec.c (packed_layout): New global variable.
659 (dump_ada_declaration): Set it upon seeing a packed record type.
660 Do not put the "aliased" keyword if it is set.
661 (dump_ada_structure): Add Pack aspect if it is set and clear it.
662
6632021-07-01 Eric Botcazou <ebotcazou@adacore.com>
664
665 * c-ada-spec.c (check_name): Rename into...
666 (check_type_name_conflict): ...this. Minor tweak.
667 (dump_ada_function_declaration): Adjust to above renaming.
668 (dump_ada_array_domains): Fix oversight.
669 (dump_ada_declaration): Call check_type_name_conflict for variables.
670
90708f87
GA
6712021-06-25 Martin Sebor <msebor@redhat.com>
672
673 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
674 (c_common_truthvalue_conversion): Replace direct uses of
675 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
676 copy_no_warning.
677 (check_function_arguments_recurse): Same.
678 * c-gimplify.c (c_gimplify_expr): Same.
679 * c-warn.c (overflow_warning): Same.
680 (warn_logical_operator): Same.
681 (warn_if_unused_value): Same.
682 (do_warn_unused_parameter): Same.
683
9aa8327e
GA
6842021-06-24 Jakub Jelinek <jakub@redhat.com>
685
686 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
687 C_ORT_OMP_TARGET.
688 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
689 combined target constructs also add map (always, tofrom:) clause.
690
ede6c356
GA
6912021-06-15 Robin Dapp <rdapp@linux.ibm.com>
692
693 * c-attribs.c (common_handle_aligned_attribute): Remove short
694 circuit and dead code.
695
8dc48181
GA
6962021-06-14 Jonathan Wakely <jwakely@redhat.com>
697
698 PR c++/101052
699 * known-headers.cc (get_stdlib_header_for_name): Add known
700 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
701 exit, and getenv.
702
8b8c3912
GA
7032021-06-12 Jason Merrill <jason@redhat.com>
704
705 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
706
f16f65f8
GA
7072021-06-11 Jakub Jelinek <jakub@redhat.com>
708
709 PR c++/100974
710 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
711 -std=c++2b for P1938R3 consteval if support.
712
4f625f47
GA
7132021-06-09 Jason Merrill <jason@redhat.com>
714
715 PR c++/100879
716 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
717 warning.
718
438aac59
GA
7192021-06-07 Martin Liska <mliska@suse.cz>
720
721 * c-target.def: Split long lines and replace them
722 with '\n\'.
723
600f90cb
GA
7242021-06-04 Martin Sebor <msebor@redhat.com>
725
726 PR c/100783
727 * c-attribs.c (positional_argument): Bail on erroneous types.
728
7292021-06-04 Martin Sebor <msebor@redhat.com>
730
731 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
732 for element presence.
733
440c8a0a
GA
7342021-06-03 Eric Botcazou <ebotcazou@adacore.com>
735
736 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
737 (dump_ada_decl_name): Likewise.
738 (dump_anonymous_type_name): Remove parent parameter and adjust.
739 (dump_sloc): Minor tweak.
740 (dump_ada_array_type): Remove type parameter and adjust.
741 (dump_ada_enum_type): Remove parent parameter and adjust.
742 (dump_ada_node): Adjust calls to above functions.
743 (dumped_anonymous_types): New global variable.
744 (dump_nested_types_1): Rename into...
745 (dump_nested_types): ...this.
746 (dump_nested_type): Remove parent and dumped_types parameters.
747 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
748 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
749 (dump_ada_specs): Initialize and free dumped_anonymous_types.
750
7512021-06-03 Eric Botcazou <ebotcazou@adacore.com>
752
753 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
754 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
755
7562021-06-03 Eric Botcazou <ebotcazou@adacore.com>
757
758 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
759 (htable_t): New typedef.
760 (overloaded_names): Use it.
761 (add_name): New function.
762 (init_overloaded_names): Use add_name to populate the table and add
763 special cases for sigaction and stat.
764 (overloaded_name_p): Rename into...
765 (overloading_index): ...this. Do not initialize overloaded_names table
766 here. Return the index or zero.
767 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
768 but add an overloading suffix instead.
769 (dump_ada_specs): Initialize overloaded_names tables here.
770
b75978d1
GA
7712021-06-01 Martin Liska <mliska@suse.cz>
772
773 PR other/100759
774 * c-attribs.c (handle_optimize_attribute): Limit sanity check
775 to a situation where we are not in processing of an optimize
776 pragma.
777 * c-pragma.c (handle_pragma_pop_options): Restore target
778 options.
779
ee682192
GA
7802021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
781
782 PR testsuite/100749
783 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
784
7852021-05-31 Richard Biener <rguenther@suse.de>
786
787 PR c++/88601
788 * c-common.c: Include tree-vector-builder.h and
789 vec-perm-indices.h.
790 (c_common_reswords): Add __builtin_shufflevector.
791 (c_build_shufflevector): New funtion.
792 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
793 (c_build_shufflevector): Declare.
794
48166757
GA
7952021-05-28 Jakub Jelinek <jakub@redhat.com>
796
797 PR middle-end/99928
798 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
799 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
800
8012021-05-28 Tobias Burnus <tobias@codesourcery.com>
802
803 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
804
2bc6dace
GA
8052021-05-25 Martin Liska <mliska@suse.cz>
806
807 PR tree-optimization/92860
808 PR target/99592
809 * c-attribs.c (handle_optimize_attribute): Save target node
810 before calling parse_optimize_options and save it in case
811 it changes.
812 * c-pragma.c (handle_pragma_target): Similarly for pragma.
813 (handle_pragma_pop_options): Likewise here.
814
8152021-05-25 Martin Liska <mliska@suse.cz>
816
817 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
818
8192021-05-25 Jakub Jelinek <jakub@redhat.com>
820
821 PR middle-end/99928
822 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
823 combined with simd and not with taskloop or for.
824
2832d51b
GA
8252021-05-21 Jakub Jelinek <jakub@redhat.com>
826
827 PR middle-end/99928
828 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
829 on firstprivate clause copy going to target construct, and for
830 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
831
ea34e2ed
GA
8322021-05-20 Jonathan Wakely <jwakely@redhat.com>
833
834 * c.opt (Wc++11-extensions, Wc++14-extensions)
835 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
836 options.
837
8382021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
839
840 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
841
8422021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
843
844 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
845 * c-pch.c (struct c_pch_validity): Use type uint32_t.
846 (pch_init): Renamed member.
847 (c_common_valid_pch): Adjust access to debug_type_names.
848
65f32e5d
GA
8492021-05-19 Martin Sebor <msebor@redhat.com>
850
851 PR c/100619
852 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
853 bounds.
854
a8daf9a1
GA
8552021-05-18 Richard Biener <rguenther@suse.de>
856
857 PR c/100547
858 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
859 Reword existing nunit diagnostic.
860
a7ffc1ef
GA
8612021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
862
863 * c-common.c (braced_list_to_string): Return CTOR unchanged
864 if host and target character sizes don't match.
865
87a7d10c
GA
8662021-05-14 Martin Liska <mliska@suse.cz>
867
868 * c.opt: Add Warning keyword for 2 options.
869
f9af11c7
GA
8702021-05-13 Martin Liska <mliska@suse.cz>
871
872 PR middle-end/100504
873 * c-attribs.c (handle_target_clones_attribute): Expect a string
874 argument to target_clone argument.
875
037e3661
GA
8762021-05-11 Joseph Myers <joseph@codesourcery.com>
877
878 * c-lex.c (interpret_float): Handle digit separators for C2X.
879
aa891c56
GA
8802021-05-10 Martin Liska <mliska@suse.cz>
881
882 * c-ada-spec.c (print_destructor): Use startswith
883 function instead of strncmp.
884 (dump_ada_declaration): Likewise.
885 * c-common.c (disable_builtin_function): Likewise.
886 (def_builtin_1): Likewise.
887 * c-format.c (check_tokens): Likewise.
888 (check_plain): Likewise.
889 (convert_format_name_to_system_name): Likewise.
890
e4ff4ffb
GA
8912021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
892
893 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
894 complex divide
895
c0fa3f2f
GA
8962021-04-26 Thomas Schwinge <thomas@codesourcery.com>
897 Nathan Sidwell <nathan@codesourcery.com>
898 Tom de Vries <vries@codesourcery.com>
899 Julian Brown <julian@codesourcery.com>
900 Kwok Cheung Yeung <kcy@codesourcery.com>
901
902 * c.opt (Wopenacc-parallelism): New.
903
6e81e015
GA
9042021-04-19 Thomas Schwinge <thomas@codesourcery.com>
905
906 * c.opt (fopenacc-kernels=): Remove.
907
019a9220
GA
9082021-04-08 Jakub Jelinek <jakub@redhat.com>
909
910 * c-warn.c (do_warn_double_promotion): Fix comment typo,
911 occured -> occurred.
912 (check_alignment_of_packed_member): Fix a comment typo,
913 memeber -> member.
914 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
915 and onless -> unless.
916 (warn_parm_array_mismatch): Fix comment typos, declaratation
917 -> declaration and woud -> would. Fix up comment indentation.
918
9192021-04-08 Martin Sebor <msebor@redhat.com>
920
921 PR middle-end/99883
922 * c.opt (Wmismatched-new-delete): Correct spelling.
923
b1da9916
GA
9242021-04-05 Eric Botcazou <ebotcazou@adacore.com>
925
926 * c-ada-spec.c (is_simple_enum): Minor tweaks.
927 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
928 enumeral types use again the type name for the enumeration constants.
929 (dump_ada_node): Adjust call to dump_ada_enum_type.
930 (dump_nested_type): Likewise.
931
f1607029
GA
9322021-04-01 Jason Merrill <jason@redhat.com>
933
934 PR c++/98481
935 * c-opts.c (c_common_post_options): Bump latest_abi_version.
936
4493b1c1
GA
9372021-03-25 Jakub Jelinek <jakub@redhat.com>
938
939 PR c++/99565
940 * c-warn.c (do_warn_duplicated_branches): Pass also
941 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
942
6af7b307
GA
9432021-03-20 Jakub Jelinek <jakub@redhat.com>
944
945 PR debug/99230
946 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
947
ceae9533
GA
9482021-03-05 Eric Botcazou <ebotcazou@adacore.com>
949
950 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
951 after entering the separate class package, if any.
952
67f10d28
GA
9532021-03-04 Richard Biener <rguenther@suse.de>
954
955 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
956 Handle ERROR_MARK.
957
9582021-03-04 Jakub Jelinek <jakub@redhat.com>
959
960 PR c/99325
961 * c-ppoutput.c (print): Change src_line type from int to unsigned.
962 (token_streamer::stream) Likewise.
963 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
964 UNKNOWN_LOCATION.
965
f3641ac7
GA
9662021-03-03 Jakub Jelinek <jakub@redhat.com>
967
968 PR c/99324
969 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
970 instead of mark_addressable. Fix a comment typo -
971 neutrallly -> neutrally.
972
2c83c3fb
GA
9732021-02-28 Jakub Jelinek <jakub@redhat.com>
974
975 PR c/99304
976 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
977 message - refernced -> referenced. Remove superfluous space before
978 closing paren of function calls.
979
daa68844
GA
9802021-02-25 Nathan Sidwell <nathan@acm.org>
981
982 PR c++/99166
983 * c.opt (-flang-info-module-cmi): Renamed option.
984
50352c6c
GA
9852021-02-19 Nathan Sidwell <nathan@acm.org>
986
987 * c.opt (flang-info-module-read, flang-info-module-read=): New.
988
bf81237e
GA
9892021-02-18 H.J. Lu <hjl.tools@gmail.com>
990
991 PR target/99113
992 * c-attribs.c (c_common_attribute_table): Add the "retain"
993 attribute.
994 (handle_retain_attribute): New function.
995
0e804ce3
GA
9962021-02-16 Marek Polacek <polacek@redhat.com>
997
998 PR c++/99062
999 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1000 alignment argument is non-negative. Tweak a warning message.
1001
fab095da
GA
10022021-02-12 Martin Sebor <msebor@redhat.com>
1003
1004 PR c/99055
1005 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1006 print_generic_expr_to_str.
1007
4b37c3ea
GA
10082021-02-10 Richard Biener <rguenther@suse.de>
1009
1010 * c-common.c (parse_optimize_options): Free decoded_options.
1011
a19dd5e6
GA
10122021-02-04 emsr <3dw4rd@verizon.net>
1013
1014 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1015
9faaa807
GA
10162021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1017
1018 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1019 * c-lex.c (interpret_integer): Set node type for size literal.
1020
85d04a2e
GA
10212021-01-28 Jakub Jelinek <jakub@redhat.com>
1022
1023 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1024 draft from description.
1025 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1026
e62bb7f0
GA
10272021-01-26 Paul Fee <paul.f.fee@gmail.com>
1028
1029 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1030 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1031 and -std=gnu++2b
1032 * c-opts.c (set_std_cxx23): New.
1033 (c_common_handle_option): Set options when -std=c++23 is enabled.
1034 (c_common_post_options): Adjust comments.
1035 (set_std_cxx20): Likewise.
1036
161e4c08
GA
10372021-01-25 Martin Sebor <msebor@redhat.com>
1038
1039 PR c++/98646
1040 * c-common.c (check_nonnull_arg): Adjust warning text.
1041
4c9bcd5c
GA
10422021-01-17 Martin Sebor <msebor@redhat.com>
1043
1044 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1045 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1046
59cf67d1
GA
10472021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1048
1049 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1050 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1051
2f7f0d32
GA
10522021-01-15 Jakub Jelinek <jakub@redhat.com>
1053
1054 PR tree-optimization/98597
1055 * c-pretty-print.c: Include options.h.
1056 (c_fold_indirect_ref_for_warn): New function.
1057 (print_mem_ref): Use it. If it returns something that has compatible
1058 type and is TBAA compatible with zero offset, print it and return,
1059 otherwise print it using offsetof syntax or array ref syntax. Fix up
1060 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1061 argument has pointer to array type. Print pointers using the standard
1062 formatting.
1063
6851dda2
GA
10642021-01-12 Martin Sebor <msebor@redhat.com>
1065
1066 PR c/98597
1067 PR c/98592
1068 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1069 has pointer type. Remove redundant code. Avoid calling
1070 gimple_canonical_types_compatible_p.
1071
7d187e4f
GA
10722021-01-07 Martin Sebor <msebor@redhat.com>
1073
1074 PR middle-end/98578
1075 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1076 Avoid assuming acces type's size is constant. Correct condition
1077 guarding the printing of a parenthesis.
1078
942ae5be
GA
10792021-01-06 Martin Sebor <msebor@redhat.com>
1080
1081 PR c++/95768
1082 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1083 SSA_NAMEs print VLA names and GIMPLE defining statements.
1084 (print_mem_ref): New function.
1085 (c_pretty_printer::unary_expression): Call it.
1086
10872021-01-06 Richard Biener <rguenther@suse.de>
1088
1089 PR tree-optimization/95582
1090 * c-attribs.c (c_common_attribute_table): Add entry for
1091 signed_bool_precision.
1092 (handle_signed_bool_precision_attribute): New.
1093
8daa719b
GA
10942020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1095
1096 * c.opt: Add -stdlib= option and enumerations for
1097 libstdc++ and libc++.
1098
eefe499f
GA
10992020-12-16 Martin Liska <mliska@suse.cz>
1100
1101 * c.opt: Remove usage of Report.
1102
d52945ce
GA
11032020-12-14 Martin Sebor <msebor@redhat.com>
1104
1105 PR middle-end/98166
1106 PR c++/57111
1107 PR middle-end/98160
1108 * c-attribs.c (maybe_add_noinline): New function.
1109 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1110 Implicitly add attribute noinline to functions not declared inline
1111 and warn on those.
1112
ca2bd949
GA
11132020-12-09 Tobias Burnus <tobias@codesourcery.com>
1114
1115 * c-pragma.c (omp_pragmas): Add 'allocate'.
1116 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1117
f6e8e279
GA
11182020-12-08 Jakub Jelinek <jakub@redhat.com>
1119
1120 PR c++/98187
1121 * c-pragma.c (omp_pragmas): Remove "master".
1122 (omp_pragmas_simd): Add "master".
1123
bc8a7013
GA
11242020-12-07 Marek Polacek <polacek@redhat.com>
1125
1126 PR c++/98126
1127 * c-common.c (verify_tree_lim_r): New function.
1128 (verify_sequence_points): Use it. Use nullptr instead of 0.
1129
b8dd0ef7
GA
11302020-12-03 Martin Sebor <msebor@redhat.com>
1131
1132 PR c++/90629
1133 PR middle-end/94527
1134 * c-attribs.c (handle_dealloc_attribute): New function.
1135 (handle_malloc_attribute): Handle argument forms of attribute.
1136 * c.opt (-Wmismatched-dealloc): New option.
1137 (-Wmismatched-new-delete): New option.
1138
11392020-12-03 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR libstdc++/93121
1142 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1143 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1144
e0f5e792
GA
11452020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1146
1147 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1148 {__GNUC_EXECUTION_CHARSET_NAME} and
1149 _WIDE_EXECUTION_CHARSET_NAME} macros.
1150
11512020-12-01 Nathan Sidwell <nathan@acm.org>
1152
1153 * c-common.c (module, import, export): New internal tokens (with
1154 trailing space).
1155 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1156 them.
1157 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1158 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1159
11602020-12-01 Nathan Sidwell <nathan@acm.org>
1161
1162 * c-opts.c (c_common_init_options): Ask for module dependencies.
1163 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1164 * c-pch.c (c_common_valid_pch): ... does not play with C++
1165 modules.
1166 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1167 options.
1168 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1169 (fmodule-only, fmodule-mapper, fmodule-lazy)
1170 (fmodule-version-ignore, Winvalid-imported-macros)
1171 (flang-info-include-translate, flang-info-include-translate-not):
1172 New options
1173
5fbf0ecb
GA
11742020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1175
1176 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1177 (dump_ada_structure): Also deal with convention, unchecked union and
1178 bit-field for nested types. In the latter case, print an Alignment
1179 aspect along with the Pack aspect.
1180
360258da
GA
11812020-11-25 Martin Sebor <msebor@redhat.com>
1182
1183 PR bootstrap/94982
1184 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1185 -Wformat-diag.
1186
1e2c9a27
GA
11872020-11-24 Martin Sebor <msebor@redhat.com>
1188
1189 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1190
8e6198d0
GA
11912020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1192
1193 * c-attribs.c (handle_special_var_sec_attribute): New.
1194 (handle_noinit_attribute): Remove.
1195 (attr_noinit_exclusions): Rename to...
1196 (attr_section_exclusions): ...this, and add "persistent" attribute
1197 exclusion.
1198 (c_common_attribute_table): Add "persistent" attribute.
1199
7a97e2fc
GA
12002020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1201
1202 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1203 Treat opaque types like other types.
1204 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1205 supported types.
1206
82e5048e
GA
12072020-11-20 Martin Sebor <msebor@redhat.com>
1208
1209 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1210 with fewer arguments.
1211
12122020-11-20 Martin Sebor <msebor@redhat.com>
1213
1214 PR middle-end/97879
1215 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1216 Error out on invalid modes.
1217
12182020-11-20 Jakub Jelinek <jakub@redhat.com>
1219
1220 PR libstdc++/88101
1221 * c-common.c (check_builtin_function_arguments): Handle
1222 BUILT_IN_CLEAR_PADDING.
1223
25bb75f8
GA
12242020-11-18 Nathan Sidwell <nathan@acm.org>
1225
1226 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1227
4dabb037
GA
12282020-11-17 Nathan Sidwell <nathan@acm.org>
1229
1230 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1231 after newly-added CTI_MODULE_HWM.
1232
12332020-11-17 Joseph Myers <joseph@codesourcery.com>
1234
1235 * c-cppbuiltin.c (builtin_define_float_constants): Define
1236 "*_IS_IEC_60559__" macros.
1237
12382020-11-17 Nathan Sidwell <nathan@acm.org>
1239
1240 * c-lex.c: #include "langhooks.h".
1241 (cb_undef): Maybe call preprocess_undef lang hook.
1242 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1243 lang hook.
1244 (push_command_line_include): Maybe call preprocess_main_file lang
1245 hook.
1246 (cb_file_change): Likewise.
1247 * c-ppoutput.c: #include "langhooks.h.
1248 (scan_translation_unit): Maybe call preprocess_token lang hook.
1249 (class do_streamer): New, derive from token_streamer.
1250 (directives_only_cb): Data pointer is do_streamer, call
1251 preprocess_token lang hook.
1252 (scan_translation_unit_directives_only): Use do_streamer.
1253 (print_line_1): Move src_line recording to after string output.
1254 (cb_undef): Maybe call preprocess_undef lang hook.
1255
12562020-11-17 Nathan Sidwell <nathan@acm.org>
1257
1258 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1259 code duplicating that functionality.
1260
12612020-11-17 Jakub Jelinek <jakub@redhat.com>
1262
1263 PR c/90628
1264 * c-common.c (check_builtin_function_arguments)
1265 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1266 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1267 for more builtins and argument positions.
1268
29c5d9ce
GA
12692020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1270
1271 PR objc/97854
1272 * stub-objc.c: Include c-common.h to declare enum rid.
1273
77f67db2
GA
12742020-11-13 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c++/63287
1277 * c-cppbuiltin.c: Include configargs.h.
1278 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1279 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1280 "single".
1281
12822020-11-13 Gergö Barany <gergo@codesourcery.com>
1283 Thomas Schwinge <thomas@codesourcery.com>
1284
1285 * c.opt (fopenacc-kernels): Add.
1286
12872020-11-13 Jason Merrill <jason@redhat.com>
1288
1289 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1290
12912020-11-13 Piotr H. Dabrowski <phd@phd.re>
1292
1293 PR c++/91318
1294 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1295
12962020-11-13 Martin Liska <mliska@suse.cz>
1297
1298 * c-attribs.c (build_attr_access_from_parms): Format properly.
1299
13002020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1301
1302 PR objc/90707
1303 * c-common.c (c_common_reswords): null_unspecified, nullable,
1304 nonnull, null_resettable: New keywords.
1305 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1306 RID_NONNULL, RID_NULL_RESETTABLE: New.
1307 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1308 ranges accepted for property attributes.
1309 * c-attribs.c (handle_objc_nullability_attribute): New.
1310 * c-objc.h (enum objc_property_attribute_group): Add
1311 OBJC_PROPATTR_GROUP_NULLABLE.
1312 (enum objc_property_attribute_kind):Add
1313 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1314 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1315
13162020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1317
1318 PR objc/77404
1319 * c-attribs.c (handle_objc_root_class_attribute): New
1320 * c-objc.h (objc_start_class_interface): Add a location
1321 value for the position of the class name.
1322 * c.opt: Add Wobjc-root-class.
1323 * stub-objc.c (objc_start_class_interface): Add a location
1324 value for the position of the class name.
1325
a5a11525
GA
13262020-11-12 Joseph Myers <joseph@codesourcery.com>
1327
1328 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1329 Allow scope for C. Handle standard attributes for C. Do not
1330 accept unscoped attributes if std_syntax and not handled as
1331 standard attributes.
1332 * c-common.h (c_common_has_attribute): Update prototype.
1333
13342020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1335
1336 PR pch/86674
1337 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1338 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1339
0f5f9ed5
GA
13402020-11-11 Patrick Palka <ppalka@redhat.com>
1341
1342 PR c++/88115
1343 * c-opts.c (c_common_post_options): Update latest_abi_version.
1344
bb622641
GA
13452020-11-10 Jakub Jelinek <jakub@redhat.com>
1346
1347 PR c/97748
1348 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1349 to false.
1350 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1351 recursively and just return true instead of warning if it is true.
1352 Handle COMPLEX_EXPR.
1353
13542020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1355
1356 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1357 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1358 (c_omp_adjust_map_clauses): New function.
1359
2bee28dd
GA
13602020-11-09 Marek Polacek <polacek@redhat.com>
1361
1362 DR 1914
1363 * c-common.c (attribute_fallthrough_p): Tweak the warning
1364 message.
1365
13662020-11-09 Patrick Palka <ppalka@redhat.com>
1367
1368 * c-pragma.c (handle_pragma_diagnostic): Split the
1369 unknown-option -Wpragmas diagnostic into a warning and a
1370 subsequent note containing a spelling suggestion. Avoid
1371 computing the suggestion if -Wpragmas warnings are being
1372 suppressed.
1373
13742020-11-09 Patrick Palka <ppalka@redhat.com>
1375
1376 PR testsuite/97117
1377 * c-indentation.c (get_visual_column): Remove location_t
1378 parameter. Move the column-tracking diagnostic code from here
1379 to ...
1380 (should_warn_for_misleading_indentation): ... here, before the
1381 early exit for when the loci are not all distinct. Don't pass a
1382 location_t argument to get_visual_column.
1383 (assert_get_visual_column_succeeds): Don't pass a location_t
1384 argument to get_visual_column.
1385 (assert_get_visual_column_fails): Likewise.
1386
fb95de7a
GA
13872020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1388
1389 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1390 of keywords accepted in @property attribute contexts.
1391 * c-objc.h (enum objc_property_attribute_group): Add
1392 OBJC_PROPATTR_GROUP_CLASS.
1393 (enum objc_property_attribute_kind): Add
1394 OBJC_PROPERTY_ATTR_CLASS.
1395
2da7ee05
GA
13962020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1397
1398 * c-common.c (c_common_reswords): Add 'atomic' property
1399 attribute.
1400 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1401 property attributes.
1402
14032020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1404
1405 * c-attribs.c (handle_nsobject_attribute): New.
1406 * c.opt: Add WNSObject-attribute.
1407
44cab2d8
GA
14082020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1409
1410 * c-objc.h (enum objc_property_attribute_group): New
1411 (enum objc_property_attribute_kind): New.
1412 (OBJC_PROPATTR_GROUP_MASK): New.
1413 (struct property_attribute_info): Small class encapsulating
1414 parser output from property attributes.
1415 (objc_prop_attr_kind_for_rid): New
1416 (objc_add_property_declaration): Simplify interface.
1417 * stub-objc.c (enum rid): Dummy type.
1418 (objc_add_property_declaration): Simplify interface.
1419 (objc_prop_attr_kind_for_rid): New.
1420
14212020-11-06 Nathan Sidwell <nathan@acm.org>
1422
1423 * c-ada-spec.c (collect_ada_nodes): Rename
1424 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1425 (collect_ada_node): Likewise.
1426 (dump_forward_type): Likewise.
1427 * c-common.c (set_underlying_type): Rename
1428 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1429 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1430
14312020-11-06 Jakub Jelinek <jakub@redhat.com>
1432
1433 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1434
0cfd9109
GA
14352020-11-05 Marek Polacek <polacek@redhat.com>
1436
1437 PR c++/97675
1438 * c.opt (Wexceptions): New option.
1439
14402020-11-05 Marek Polacek <polacek@redhat.com>
1441
1442 PR c++/25814
1443 * c.opt (Wvexing-parse): New option.
1444
35c125cb
GA
14452020-11-04 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c++/97670
1448 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1449 underlying decl to clear in the allocate_head bitmap.
1450
14512020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1452
1453 * c-objc.h (objc_non_constant_expr_p): New.
1454 * stub-objc.c (objc_non_constant_expr_p): New.
1455
fd2325ea
GA
14562020-11-03 Nathan Sidwell <nathan@acm.org>
1457
1458 * c.opt (MQ,MT): Reword description to be make-agnostic.
1459
88ce3d5f
GA
14602020-11-02 Nathan Sidwell <nathan@acm.org>
1461
1462 * c-opts.c (c_common_post_options): Move var decl to its
1463 initialization point.
1464
14652020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1466
1467 * c-lex.c (c_lex_with_flags): When combining '@' with a
1468 keyword for Objective-C, combine the location ranges too.
1469
14702020-10-30 Qing Zhao <qing.zhao@oracle.com>
1471 H.J.Lu <hjl.tools@gmail.com>
1472
1473 * c-attribs.c (c_common_attribute_table): Add new attribute
1474 zero_call_used_regs.
1475 (handle_zero_call_used_regs_attribute): New function.
1476
e93aae4a
GA
14772020-10-28 Marek Polacek <polacek@redhat.com>
1478
1479 PR c++/97573
1480 * c-opts.c (c_common_post_options): In C++20, turn on
1481 -Wdeprecated-enum-enum-conversion and
1482 -Wdeprecated-enum-float-conversion.
1483 * c.opt (Wdeprecated-enum-enum-conversion,
1484 Wdeprecated-enum-float-conversion): New options.
1485 (Wenum-conversion): Allow for C++ too.
1486
14872020-10-28 Jakub Jelinek <jakub@redhat.com>
1488
1489 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1490 * c-omp.c: Include bitmap.h.
1491 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1492
f19e7c8d
GA
14932020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1494
1495 * c-common.c (__is_nothrow_assignable): New.
1496 (__is_nothrow_constructible): Likewise.
1497 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1498 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1499
efe71fcc
GA
15002020-10-23 Jan Hubicka <hubicka@ucw.cz>
1501
1502 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1503
15042020-10-23 Marek Polacek <polacek@redhat.com>
1505
1506 PR c++/91741
1507 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1508 (c_common_init_ts): Likewise.
1509 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1510 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1511 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1512 (maybe_warn_sizeof_array_div): New function.
1513 * c.opt (Wsizeof-array-div): New option.
1514
15152020-10-23 Martin Sebor <msebor@redhat.com>
1516
1517 PR c/97463
1518 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1519
56ddd5e2
GA
15202020-10-22 Martin Liska <mliska@suse.cz>
1521
1522 PR c/94722
1523 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1524 (handle_stack_protect_attribute): Add error message for a
1525 no_stack_protector function.
1526
15272020-10-22 Martin Liska <mliska@suse.cz>
1528
1529 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1530
15312020-10-22 Jan Hubicka <hubicka@ucw.cz>
1532
1533 * c-gimplify.c: Include tree-nested.h
1534 (c_genericize): Update for new nested function info.
1535
b2698c21
GA
15362020-10-14 Martin Sebor <msebor@redhat.com>
1537
1538 PR c/97413
1539 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1540 bounds in an extra list.
1541
7e9282ae
GA
15422020-10-05 Richard Biener <rguenther@suse.de>
1543 Jakub Jelinek <jakub@redhat.com>
1544
1545 PR c++/97197
1546 * c-pretty-print.c: Include langhooks.h.
1547 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1548 expression.
1549 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1550 unary_expression.
1551 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1552
660bfe61
GA
15532020-09-30 Martin Sebor <msebor@redhat.com>
1554
1555 PR middle-end/97189
1556 * c-attribs.c (append_access_attr): Use the function declaration
1557 location for a warning about an attribute access argument.
1558
93bca37c
GA
15592020-09-29 Marek Polacek <polacek@redhat.com>
1560
1561 PR c++/94695
1562 * c.opt (Wrange-loop-construct): New option.
1563
82b77dee
GA
15642020-09-23 Martin Sebor <msebor@redhat.com>
1565
1566 PR c/97131
1567 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1568
15692020-09-23 Marek Polacek <polacek@redhat.com>
1570
1571 PR c/97125
1572 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1573 after loops and other structured control constructs have been lowered.
1574
521d2711
GA
15752020-09-22 Jakub Jelinek <jakub@redhat.com>
1576
1577 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1578 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1579
44135373
GA
15802020-09-21 Marek Polacek <polacek@redhat.com>
1581
1582 * c.opt (Wctad-maybe-unsupported): New option.
1583
2fe5b7d1
GA
15842020-09-19 Martin Sebor <msebor@redhat.com>
1585
1586 PR c/50584
1587 * c-common.h (warn_parm_array_mismatch): Declare new function.
1588 (has_attribute): Move declaration of an existing function.
1589 (build_attr_access_from_parms): Declare new function.
1590 * c-warn.c (parm_array_as_string): Define new function.
1591 (plus_one): Define new function.
1592 (warn_parm_ptrarray_mismatch): Define new function.
1593 (warn_parm_array_mismatch): Define new function.
1594 (vla_bound_parm_decl): New function.
1595 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1596 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1597 qualifiers here...
1598 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1599 them in brackets here. Also print [static]. Strip extraneous
1600 expressions from VLA bounds.
1601
16022020-09-19 Martin Sebor <msebor@redhat.com>
1603
1604 PR c/50584
1605 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1606 (handle_argspec_attribute): New function.
1607 (get_argument, get_argument_type): New functions.
1608 (append_access_attrs): Add overload. Handle internal attribute
1609 representation in addition to external.
1610 (handle_access_attribute): Handle internal attribute representation
1611 in addition to external.
1612 (build_attr_access_from_parms): New function.
1613
16142020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1615
1616 * c-gimplify.c (genericize_c_loop): Rewrite to match
1617 c_finish_loop in c-typeck.c.
1618
16192020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1620
1621 * c-common.c (c_block_may_fallthrough): New, split from
1622 cxx_block_may_fallthrough in the cp front end.
1623 (c_common_init_ts): Move handling of loop and switch-related
1624 statements here from the cp front end.
1625 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1626 cp front end.
1627 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1628 * c-common.h (c_block_may_fallthru): Declare.
1629 (bc_state_t): Move here from cp front end.
1630 (save_bc_state, restore_bc_state): Declare.
1631 (c_genericize_control_stmt): Declare.
1632 (WHILE_COND, WHILE_BODY): Likewise.
1633 (DO_COND, DO_BODY): Likewise.
1634 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1635 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1636 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1637 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1638 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1639 * c-dump.c (dump_stmt): Copy from cp front end.
1640 (c_dump_tree): Move code to handle structured loop and switch
1641 tree nodes here from cp front end.
1642 * c-gimplify.c: Adjust includes.
1643 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1644 cp front end.
1645 (save_bc_state, restore_bc_state): New functions using old code
1646 from cp front end.
1647 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1648 (genericize_c_loop): Move from cp front end.
1649 (genericize_for_stmt, genericize_while_stmt): Likewise.
1650 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1651 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1652 (genericize_omp_for_stmt): Likewise.
1653 (c_genericize_control_stmt): New function using code split from
1654 cp front end.
1655 (c_genericize_control_r): New.
1656 (c_genericize): Call walk_tree with c_genericize_control_r.
1657 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1658 structured loop and switch tree nodes here from cp front end.
1659
2aad20c0
GA
16602020-09-17 Patrick Palka <ppalka@redhat.com>
1661
1662 PR c/80076
1663 * c-indentation.c (should_warn_for_misleading_indentation): Move
1664 declarations of local variables closer to their first use.
1665 Handle virtual token locations by resolving them to their
1666 respective macro expansion points. If all three tokens are
1667 produced from the same macro expansion, then instead use their
1668 loci within the macro definition.
1669
ecde1b0a
GA
16702020-09-16 Martin Sebor <msebor@redhat.com>
1671
1672 PR c/78666
1673 PR c/96126
1674 * c-attribs.c (validate_attr_args): New function.
1675 (validate_attr_arg): Same.
1676 (handle_section_attribute): Call it. Introduce a local variable.
1677 (handle_alloc_size_attribute): Same.
1678 (handle_alloc_align_attribute): Same.
1679
50a71cd0
GA
16802020-09-14 Jakub Jelinek <jakub@redhat.com>
1681
1682 * c-attribs.c (handle_optimize_attribute): Adjust
1683 cl_optimization_save, cl_optimization_restore and
1684 build_optimization_node callers.
1685 * c-pragma.c (handle_pragma_optimize): Adjust
1686 build_optimization_node caller.
1687 (handle_pragma_push_options): Adjust
1688 build_optimization_node and build_target_option_node callers.
1689 (handle_pragma_pop_options, handle_pragma_reset_options):
1690 Adjust cl_optimization_restore callers.
1691
8f7ea26a
GA
16922020-08-28 Martin Sebor <msebor@redhat.com>
1693
1694 * c.opt (Wstringop-overread): New option.
1695
a6493809
GA
16962020-08-11 Jakub Jelinek <jakub@redhat.com>
1697
1698 PR c/96545
1699 * c-common.c (get_atomic_generic_size): Require that first argument's
1700 type points to a complete type and use tree_fits_uhwi_p instead of
1701 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1702
48cc2e46
GA
17032020-07-31 Martin Sebor <msebor@redhat.com>
1704
1705 PR c++/96003
1706 * c-common.c (check_function_arguments_recurse): Return early when
1707 no-warning bit is set.
1708
17092020-07-31 Richard Biener <rguenther@suse.de>
1710
1711 PR debug/96383
1712 * c-common.h (c_common_finalize_early_debug): Declare.
1713 * c-common.c: Include debug.h.
1714 (c_common_finalize_early_debug): finalize_early_debug langhook
1715 implementation generating debug for extern declarations.
1716
e71dab87
GA
17172020-07-27 Nathan Sidwell <nathan@acm.org>
1718
1719 * c-common.c (try_to_locate_new_include_insertion_point): Use
1720 strcmp, not pointer equality.
1721
ae2e0bc1
GA
17222020-07-25 Martin Sebor <msebor@redhat.com>
1723
1724 PR c++/96310
1725 * c-common.c (check_nonnull_arg): Print note only when warning was
1726 issued.
1727
3ea9abca
GA
17282020-07-22 Tobias Burnus <tobias@codesourcery.com>
1729
1730 * c-omp.c (c_finish_omp_critical): Check for no name but
1731 nonzero hint provided.
1732
0933f508
GA
17332020-07-20 Jason Merrill <jason@redhat.com>
1734
1735 * c-cppbuiltin.c (c_cpp_builtins): Update
1736 __cpp_nontype_template_args for C++20.
1737
17382020-07-20 Martin Sebor <msebor@redhat.com>
1739
1740 PR c/96249
1741 * c.opt: Remove stray text.
1742
8ca07a30
GA
17432020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1744
1745 PR other/86904
1746 * c-indentation.c (should_warn_for_misleading_indentation): Get
1747 global tabstop from the new source.
1748 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1749 is now a common option.
1750 * c.opt: Likewise.
1751
a82c4c4c 17522020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1753
1754 * c.opt (Wscalar-storage-order): Add explicit variable.
1755
f60ee68d
GA
17562020-07-07 Nathan Sidwell <nathan@acm.org>
1757
1758 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1759 cpp_read_main_file.
1760 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1761 maps. Force token position to line_table's highest line.
1762 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1763 (cb_define): Always increment source line.
1764
4077d74c
GA
17652020-07-06 Martin Sebor <msebor@redhat.com>
1766
1767 PR c++/95984
1768 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1769 to stub lambda objects with null this pointer.
1770 (check_nonnull_arg): Handle C++ nullptr.
1771
b5f24739
GA
17722020-07-02 Jason Merrill <jason@redhat.com>
1773 Jakub Jelinek <jakub@redhat.com>
1774
1775 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1776
46fbb6c6
GA
17772020-06-30 Jakub Jelinek <jakub@redhat.com>
1778
1779 PR c++/95963
1780 * c-common.c (check_function_arguments_recurse): Don't crash on
1781 calls to internal functions.
1782
69273534
GA
17832020-06-28 Martin Sebor <msebor@redhat.com>
1784
1785 PR c++/86568
1786 * c-common.c (struct nonnull_arg_ctx): Add members.
1787 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1788 C++ member functions specially. Consider the this pointer implicitly
1789 nonnull.
1790 (check_nonnull_arg): Use location of argument when available.
1791 (check_function_arguments): Use nonnull_arg_ctx as argument.
1792
9a33c41f
GA
17932020-06-27 Jakub Jelinek <jakub@redhat.com>
1794
1795 PR middle-end/95903
1796 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1797 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1798 smaller precision intop operands separately.
1799
c9c05f73
GA
18002020-06-26 Marek Polacek <polacek@redhat.com>
1801
1802 * c-opts.c (c_common_init_options): Default to gnu++17.
1803
aff95ee7
GA
18042020-06-17 Jonathan Wakely <jwakely@redhat.com>
1805
bd0a89dc 1806 PR c/95378
aff95ee7
GA
1807 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1808 pointer arguments.
1809
56638b9b
GA
18102020-06-16 Jakub Jelinek <jakub@redhat.com>
1811
1812 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1813 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1814 idx members.
1815 (c_omp_is_loop_iterator): New function.
1816 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1817 if outer loop iterator is present. Perform duplicate checking through
1818 hash_set in the function rather than expecting caller to do that.
1819 Pass NULL instead of d->ppset to walk_tree_1.
1820 (c_omp_check_nonrect_loop_iv): New function.
1821 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1822 non-rectangular loop forms, diagnose multiple associated loops with
1823 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1824 (c_omp_check_loop_iv_exprs): Likewise.
1825
ec6ffbb9
GA
18262020-06-10 Martin Liska <mliska@suse.cz>
1827
1828 PR tree-optimization/92860
1829 * c-attribs.c (handle_optimize_attribute):
1830 Save global options and compare it after parsing of function
1831 attribute.
1832 * c-pragma.c (opt_stack::saved_global_options): New field.
1833 (handle_pragma_push_options): Save global_options.
1834 (handle_pragma_pop_options): Compare them after pop.
1835
b952c2cf
GA
18362020-06-09 Jakub Jelinek <jakub@redhat.com>
1837
1838 PR c/95580
1839 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1840 case when MEM_REF's first argument has type pointer to incomplete type.
1841
1a59f3db
GA
18422020-06-05 Jason Merrill <jason@redhat.com>
1843
1844 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1845 operand to POINTER_PLUS_EXPR.
1846
3add3425
GA
18472020-06-04 Martin Sebor <msebor@redhat.com>
1848
1849 PR middle-end/10138
1850 PR middle-end/95136
1851 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1852 (handle_access_attribute): Same.
1853
9a5b7438
GA
18542020-06-03 Mark Wielaard <mark@klomp.org>
1855
1856 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1857 New function.
1858 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1859 New function declaration.
1860
18612020-06-03 Mark Wielaard <mark@klomp.org>
1862
1863 * known-headers.cc (get_string_macro_hint): New function.
1864 (get_stdlib_header_for_name): Use get_string_macro_hint.
1865 (get_c_stdlib_header_for_string_macro_name): New function.
1866 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1867 New function declaration.
1868
18692020-06-03 Tobias Burnus <tobias@codesourcery.com>
1870
1871 * c-common.h (c_omp_predetermined_mapping): Declare.
1872 * c-omp.c (c_omp_predetermined_mapping): New.
1873
af114c38
MW
18742020-05-22 Mark Wielaard <mark@klomp.org>
1875
1876 * known-headers.cc (get_stdlib_header_for_name): Add a new
1877 stdlib_hint array for stdbool and stdint.
1878
45c50b6a
MW
18792020-05-22 Mark Wielaard <mark@klomp.org>
1880
1881 * known-headers.cc (get_stdlib_header_for_name): Return
1882 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1883 flag_isoc99.
1884
c22027a0
NS
18852020-05-20 Nathan Sidwell <nathan@acm.org>
1886
38a4db21
NS
1887 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1888
c22027a0
NS
1889 * c-common.c (try_to_locate_new_include_insertion_point): Use
1890 strcmp to compare filenames.
1891 * c-lex.c (init_c_lex): Move declaration to initialization.
1892 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1893 deferred count loop.
1894
29f0e90d
JM
18952020-05-15 Jason Merrill <jason@redhat.com>
1896
1897 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1898
b04445d4
JM
18992020-05-13 Jason Merrill <jason@redhat.com>
1900
1901 * c.opt (std=c++20): Make c++2a the alias.
1902 (std=gnu++20): Likewise.
1903 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1904 * c-opts.c: Adjust.
1905 * c-cppbuiltin.c: Adjust.
1906 * c-ubsan.c: Adjust.
1907 * c-warn.c: Adjust.
1908
11dd3be5
EB
19092020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1910
1911 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1912
b224c376
NS
19132020-05-08 Nathan Sidwell <nathan@acm.org>
1914
1915 Reimplement directives only processing.
1916 * c-ppoutput.c (token_streamer): Ne.
1917 (directives_only_cb): New. Swallow ...
1918 (print_lines_directives_only): ... this.
1919 (scan_translation_unit_directives_only): Reimplment using the
1920 published interface.
1921
f1d94677
MP
19222020-05-07 Marek Polacek <polacek@redhat.com>
1923
1924 * c-format.c (badwords): Add "nonstatic".
1925
9b95bb52
JJ
1926202-05-07 Jakub Jelinek <jakub@redhat.com>
1927
1928 PR c/94968
1929 * c-common.c (speculation_safe_value_resolve_params): Return false if
1930 error_operand_p (val2).
1931 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1932 Remove extraneous semicolon.
1933
530b4409 19342020-05-06 qing zhao <qing.zhao@oracle.com>
1935
1936 PR c/94230
1937 * c-indentation.c (get_visual_column): Add a hint to use the new
1938 -flarge-source-files option.
1939
b776bdca
SSF
19402020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1941
1942 * c-attribs.c (handle_vector_size_attribute): Add attribute
1943 nonnull for argument args in order to silence warning of
1944 uninitialized variable usage. Since this is local to the
1945 compilation unit and thus cannot be checked at call sides by the
1946 compiler, added an assert statement in order to verify this.
1947
6607bdd9
L
19482020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1949
1950 PR target/93492
1951 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1952 value to USHRT_MAX (65535).
1953
691eeb65
JJ
19542020-04-29 Jakub Jelinek <jakub@redhat.com>
1955
1956 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1957
26d76be7
JJ
19582020-04-27 Jakub Jelinek <jakub@redhat.com>
1959
1960 PR c/94755
1961 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1962 fncode == BUILT_IN_NONE before initialization of first_param.
1963
7291b2ed
MP
19642020-04-23 Marek Polacek <polacek@redhat.com>
1965
1966 PR c++/94733
1967 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1968 TREE_PURPOSE.
1969
58a29af8
PP
19702020-04-14 Patrick Palka <ppalka@redhat.com>
1971
1972 PR c++/85278
1973 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1974 ampersand if it's an rvalue reference type.
1975
09f04139
MS
19762020-04-13 Martin Sebor <msebor@redhat.com>
1977
1978 PR c/92326
1979 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1980 printing array bound for flexible array members.
1981
ee26baf4
IS
19822020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1983
1984 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1985 define, per n4861.
1986
75efe9cb
RB
19872020-04-02 Richard Biener <rguenther@suse.de>
1988
1989 PR c/94392
1990 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1991 for -O2 and C++11 or newer.
1992
75defde9
PP
19932020-03-28 Patrick Palka <ppalka@redhat.com>
1994
1995 * c.opt: Add -fconcepts-diagnostics-depth.
1996
52f24a9e
MS
19972020-03-27 Martin Sebor <msebor@redhat.com>
1998
1999 PR c++/94346
2000 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2001 to decl_attributes. Make handling of different kinds of entities
2002 more robust.
2003
ccacf77b
MS
20042020-03-27 Martin Sebor <msebor@redhat.com>
2005
2006 PR c++/94098
2007 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2008 here.
2009
ca6c7225
JJ
20102020-03-23 Jakub Jelinek <jakub@redhat.com>
2011
2012 PR c++/91993
2013 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2014 result being COMPOUND_EXPRs, skip to ultimate rhs.
2015
1aa22b19
RS
20162020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2017
2018 PR middle-end/94072
2019 * c-common.c (c_common_type_for_mode): Before using a registered
2020 built-in type, check that the vectorness of the type matches
2021 the vectorness of the mode.
2022
700d4cb0
JJ
20232020-03-17 Jakub Jelinek <jakub@redhat.com>
2024
2025 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2026 issue in a diagnostic message.
2027
b408e010
LH
20282020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2029
2030 * c.opt: Avoid redundancy in the help text.
2031
e78e50d5
MP
20322020-03-02 Marek Polacek <polacek@redhat.com>
2033
2034 PR c++/93958 - add missing -std=gnu++20.
2035 * c.opt: Add -std=gnu++20.
2036
649e1741
MS
20372020-03-01 Martin Sebor <msebor@redhat.com>
2038
2039 PR c++/92721
2040 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2041 (handle_access_attribute): Same.
2042
7b60f3ba
JJ
20432020-02-25 Jakub Jelinek <jakub@redhat.com>
2044
2045 PR c/93858
2046 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2047 "did you mean" hint in diagnostics.
2048
fb260504
JM
20492020-02-15 Jason Merrill <jason@redhat.com>
2050
2051 * c.opt: Add -std=c++20.
2052
1d757b09
EB
20532020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2054
2055 * c-ada-spec.c: Include bitmap.h.
2056 (dump_ada_double_name): Rename into...
2057 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2058 (dump_ada_array_type): Adjust to above renaming. Robustify.
2059 (dump_nested_types_1): New function copied from... Add dumped_types
2060 parameter and pass it down to dump_nested_type.
2061 (dump_nested_types): ...this. Remove parent parameter. Just call
2062 dump_nested_types_1 on an automatic bitmap.
2063 (dump_nested_type): Add dumped_types parameter.
2064 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2065 Adjust recursive calls and adjust to above renaming.
2066 (dump_ada_declaration): Adjust call to dump_nested_types.
2067 Tidy up and adjust to above renaming.
2068 (dump_ada_specs): Initialize and release bitmap obstack.
2069
0cc575e4
MS
20702020-02-10 Martin Sebor <msebor@redhat.com>
2071
2072 PR c/93640
2073 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2074
a59aa302
JJ
20752020-02-10 Jakub Jelinek <jakub@redhat.com>
2076
2077 PR other/93641
2078 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2079 Remove useless extra test.
2080
e464fc90
TB
20812020-02-03 Julian Brown <julian@codesourcery.com>
2082 Tobias Burnus <tobias@codesourcery.com>
2083
2084 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2085
e3b6c052
JM
20862020-01-29 Jason Merrill <jason@redhat.com>
2087
2088 PR c++/89357
2089 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2090
6d00f052
JM
20912020-01-23 Jason Merrill <jason@redhat.com>
2092
2093 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2094
8a990ffa
MS
20952020-01-23 Martin Sebor <msebor@redhat.com>
2096
2097 PR c/84919
2098 * c-common.c (check_function_arguments): Avoid overlap checking
2099 of sprintf functions.
2100
55b7df8b
JM
21012020-01-22 Jason Merrill <jason@redhat.com>
2102
2103 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2104 PR c++/40752
2105 * c-warn.c (conversion_warning): Check operands only after checking
2106 the whole expression. Don't check second operand of + for sign.
2107
c77074d0
JM
21082020-01-21 Jason Merrill <jason@redhat.com>
2109 Manuel López-Ibáñez <manu@gcc.gnu.org>
2110
2111 PR c++/40752 - useless -Wconversion with short +=.
2112 * c.opt (-Warith-conversion): New.
2113 * c-warn.c (conversion_warning): Recurse for operands of
2114 operators. Only warn about the whole expression with
2115 -Warith-conversion.
2116
731dbfc3
JM
21172020-01-21 Jason Merrill <jason@redhat.com>
2118
2119 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2120 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2121
ad1a3914
NS
21222020-01-20 Nathan Sidwell <nathan@acm.org>
2123
2124 PR preprocessor/80005
2125 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2126
49789fd0
IS
21272020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2128
2129 * c-common.c (co_await, co_yield, co_return): New.
2130 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2131 RID_CO_RETURN): New enumeration values.
2132 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2133 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2134 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2135 * c.opt (fcoroutines): New command-line switch.
2136
4bc1899b
DM
21372020-01-10 David Malcolm <dmalcolm@redhat.com>
2138
2139 * c-format.c (local_event_ptr_node): New.
2140 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2141 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2142 * c-format.h (T_EVENT_PTR): New define.
2143
f25e33fa
MS
21442020-01-10 Martin Sebor <msebor@redhat.com>
2145
2146 PR c/93132
2147 * c-attribs.c (append_access_attrs): Validate against the translated
2148 access string rather than the human-readable representation.
2149
8d9254fc
JJ
21502020-01-01 Jakub Jelinek <jakub@redhat.com>
2151
2152 Update copyright years.
2153
39292e25
EB
21542019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2155
2156 * c-ada-spec.h (decl_sloc): Delete.
2157 * c-ada-spec.c (decl_sloc): Make static.
2158
519d7496
JB
21592019-12-19 Julian Brown <julian@codesourcery.com>
2160
2161 * c-common.h (c_omp_map_clause_name): Add prototype.
2162 * c-omp.c (c_omp_map_clause_name): New function.
2163 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2164 PRAGMA_OACC_CLAUSE_DETACH.
2165
a6163563
JB
21662019-12-19 Julian Brown <julian@codesourcery.com>
2167 Maciej W. Rozycki <macro@codesourcery.com>
2168 Tobias Burnus <tobias@codesourcery.com>
2169 Thomas Schwinge <thomas@codesourcery.com>
2170
2171 * c-pragma.h (pragma_omp_clause): Add
2172 PRAGMA_OACC_CLAUSE_NO_CREATE.
2173
e8f1ade2
MS
21742019-12-17 Martin Sebor <msebor@redhat.com>
2175
2176 PR c++/61339
2177 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2178
368877a1
DM
21792019-12-11 David Malcolm <dmalcolm@redhat.com>
2180
2181 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2182 implementation.
2183 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2184
d68f5d45
DM
21852019-12-09 David Malcolm <dmalcolm@redhat.com>
2186
2187 * c-format.c (range_label_for_format_type_mismatch::get_text):
2188 Replace label_text ctor called with true with label_text::take.
2189
d3e28653
DM
21902019-12-09 David Malcolm <dmalcolm@redhat.com>
2191
2192 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2193 initial newline from expected outputs.
2194 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2195 call to diagnostic_show_locus.
2196
abd6d8cc
JJ
21972019-12-06 Jakub Jelinek <jakub@redhat.com>
2198
2199 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2200 now.
2201
7906797e
MP
22022019-12-05 Marek Polacek <polacek@redhat.com>
2203 Jakub Jelinek <jakub@redhat.com>
2204
2205 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2206 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2207
5c04da88
MP
22082019-12-05 Marek Polacek <polacek@redhat.com>
2209
2210 PR c++/92271 - make __is_same alias for __is_same_as.
2211 * c-common.c: Add __is_same, an alias for __is_same_as.
2212
43aae289
MP
22132019-12-03 Marek Polacek <polacek@redhat.com>
2214
2215 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2216 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2217 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2218
d7ddfbcb
JH
22192019-11-30 Jan Hubicka <hubicka@ucw.cz>
2220
2221 * c-attribs.c (handle_symver_attribute): New function
2222 (c_common_attributes): Add symver.
2223
65ef05d0
RS
22242019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2225
2226 * c-common.c (pointer_int_sum): Use verify_type_context to check
2227 whether the target allows pointer arithmetic for the types involved.
2228 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2229 to check whether the target allows sizeof and alignof operations
2230 for the types involved.
2231
1a291106
JM
22322019-11-27 Jason Merrill <jason@redhat.com>
2233
2234 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2235
05d6cb1a
JJ
22362019-11-26 Jakub Jelinek <jakub@redhat.com>
2237
2238 PR c++/61414
2239 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2240 ENUMERAL_TYPEs.
2241
5b8d9367
JM
22422019-11-25 Joseph Myers <joseph@codesourcery.com>
2243
2244 PR c/91985
2245 * c-common.c (c_common_type_for_mode): Handle decimal
2246 floating-point types being NULL_TREE.
2247 * c-format.c (get_format_for_type_1): Handle specified types being
2248 NULL_TREE.
2249 * c-lex.c (interpret_float): Give an error for decimal
2250 floating-point constants when decimal floating-point not
2251 supported.
2252
1fbf51cb
JJ
22532019-11-23 Jakub Jelinek <jakub@redhat.com>
2254
2255 PR middle-end/83859
2256 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2257 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2258 group warning with inform together.
2259 (handle_access_attribute): Formatting fix.
2260
761df906
JJ
22612019-11-22 Jakub Jelinek <jakub@redhat.com>
2262
bdaf8be1
JJ
2263 PR c/90677
2264 * c-common.h (identifier_global_tag): Declare.
2265 * c-format.c (get_pointer_to_named_type): Renamed to ...
2266 (get_named_type): ... this. Use identifier_global_tag instead of
2267 identifier_global_value, handle the return value being a TYPE_P.
2268 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2269 to call get_named_type instead. Formatting fixes.
2270
c2ecce6d 2271 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2272 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2273 and __cpp_generic_lambdas for -std=c++2a. Define
2274 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2275 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2276 __cpp_concepts for -std=c++2a.
2277
54aa6b58
MS
22782019-11-22 Martin Sebor <msebor@redhat.com>
2279
2280 PR middle-end/83859
2281 * c-attribs.c (handle_access_attribute): New function.
2282 (c_common_attribute_table): Add new attribute.
2283 (get_argument_type): New function.
2284 (append_access_attrs): New function.
2285 (get_nonnull_operand): Rename...
2286 (get_attribute_operand): ...to this.
2287 * c-common.c (get_nonnull_operand): Rename...
2288 (get_attribute_operand): ...to this.
2289
6c80b1b5
JM
22902019-11-21 Joseph Myers <joseph@codesourcery.com>
2291
2292 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2293 of warning.
2294
192961ff
JM
22952019-11-19 Joseph Myers <joseph@codesourcery.com>
2296
2297 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2298 warning for standard attributes mixed with fallthrough attributes.
2299
f8aea5e3
JM
23002019-11-15 Joseph Myers <joseph@codesourcery.com>
2301
2302 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2303 * c-common.h (handle_fallthrough_attribute): Declare.
2304
2cc94aa8
JM
23052019-11-15 Joseph Myers <joseph@codesourcery.com>
2306
2307 * c-attribs.c (handle_deprecated_attribute): Remove static.
2308 * c-common.h (handle_deprecated_attribute): Declare.
2309
7c5890cc
JM
23102019-11-14 Joseph Myers <joseph@codesourcery.com>
2311
2312 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2313 char for C.
2314
b2417b59
JJ
23152019-11-14 Jakub Jelinek <jakub@redhat.com>
2316
d0ec7c93
JJ
2317 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2318 valid vendors.
2319
b2417b59
JJ
2320 * c-omp.c (c_omp_check_context_selector): Handle name lists
2321 containing string literals. Don't diagnose atomic_default_mem_order
2322 with multiple props.
2323
00be2a5f
JM
23242019-11-13 Joseph Myers <joseph@codesourcery.com>
2325
2326 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2327 NORM_MAX constants. Update call to get_max_float.
2328 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2329 constants.
2330
2dbad62d
EB
23312019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2332
2333 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2334 (dump_forward_type): Do not generate a declaration for function types.
2335 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2336 of the component type if it is declared in another file.
2337
6ed76044
ML
23382019-11-12 Martin Liska <mliska@suse.cz>
2339
2340 * c-opts.c (c_common_post_options):
2341 Use SET_OPTION_IF_UNSET.
2342
62aee289
MR
23432019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2344 Frederik Harwath <frederik@codesourcery.com>
2345
2346 gcc/c-family/
2347 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2348 constant.
2349 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2350
f486280c
RS
23512019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2352
2353 * c-common.h (gnu_vector_type_p): New function.
2354 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2355 vectors to satisfy gnu_vector_type_p.
2356 (c_build_vec_convert): Likewise __builtin_convertvector.
2357 (convert_vector_to_array_for_subscript): Likewise when applying
2358 implicit vector to array conversion.
2359 (scalar_to_vector): Likewise when converting vector-scalar
2360 operations to vector-vector operations.
2361
017c6491
JM
23622019-11-08 Joseph Myers <joseph@codesourcery.com>
2363
2364 * c.opt (Wold-style-definition): Initialize to -1.
2365 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2366 to flag_isoc2x if not set explicitly.
2367
c01bd174
JM
23682019-11-07 Joseph Myers <joseph@codesourcery.com>
2369
2370 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2371
0df65305
JM
23722019-11-05 Jason Merrill <jason@redhat.com>
2373
2374 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2375 -fconcepts.
2376
e0c866dd
KK
23772019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2378
2379 * c-opts.c (c_common_post_options): Update
2380 latest_abi_version.
2381
f968ef9b
JJ
23822019-11-02 Jakub Jelinek <jakub@redhat.com>
2383
d0c464d2
JJ
2384 * c-common.h (c_omp_get_context_selector): Remove.
2385 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2386 and renamed to omp_get_context_selector.
2387
917dd789
JJ
2388 * c-omp.c (c_omp_mark_declare_variant): Use
2389 omp_context_selector_set_compare.
2390
f968ef9b
JJ
2391 PR c++/88335 - Implement P1073R3: Immediate functions
2392 * c-common.h (enum rid): Add RID_CONSTEVAL.
2393 * c-common.c (c_common_reswords): Add consteval.
2394
5f6705b7
JJ
23952019-11-01 Martin Sebor <msebor@redhat.com>
2396
2397 PR middle-end/91679
2398 PR middle-end/91647
2399 PR middle-end/91463
2400 PR middle-end/92312
2401 * c-pretty-print.c (direct_abstract_declarator): Print
2402 bound in zero-length arrays.
2403 * c.opt (-Wzero-length-bounds): New option.
2404
43f1814c
NS
24052019-10-30 Nathan Sidwell <nathan@acm.org>
2406
2407 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2408 macros.
2409
ad1539d5
MS
24102019-10-28 Martin Sebor <msebor@redhat.com>
2411
2412 PR c/66970
2413 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2414 even when only preprocessing.
2415 * c-common.h (names_builtin_p): Declare new function.
2416 * c-lex.c (init_c_lex): Set has_builtin.
2417 (c_common_has_builtin): Define a new function.
2418 * c-ppoutput.c (init_pp_output): Set has_builtin.
2419
135df52c
JJ
24202019-10-24 Jakub Jelinek <jakub@redhat.com>
2421
2422 * c-common.h (c_omp_context_selector_matches): Remove.
2423 * c-omp.c (c_omp_context_selector_matches): Remove.
2424 * c-attribs.c (c_common_attribute_table): Add
2425 "omp declare target {host,nohost,block}" attributes.
2426
8ad0c477
JM
24272019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2428
2429 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2430
56898e43
RS
24312019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2432
2433 * c-common.h (user_facing_original_type_p): Declare.
2434 * c-common.c: Include c-spellcheck.h.
2435 (user_facing_original_type_p): New function.
2436
20de9568
JJ
24372019-10-12 Jakub Jelinek <jakub@redhat.com>
2438
2439 * c-common.h (c_omp_mark_declare_variant,
2440 c_omp_context_selector_matches): Declare.
2441 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2442 and hsa-common.h.
2443 (c_omp_get_context_selector): Support second argument NULL.
2444 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2445 functions.
2446 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2447 attribute, add "omp declare variant base" and
2448 "omp declare variant variant" attributes.
2449
175a85b2
JM
24502019-10-11 Joseph Myers <joseph@codesourcery.com>
2451
2452 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2453 CppReason(CPP_W_C11_C2X_COMPAT).
2454
fe2bc27c
JM
24552019-10-11 Joseph Myers <joseph@codesourcery.com>
2456
2457 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2458 _Decimal64 and _Decimal128.
2459
27dfdc0f
JM
24602019-10-10 Joseph Myers <joseph@codesourcery.com>
2461
2462 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2463 types if DFP not supported.
2464
94e7f906
JJ
24652019-10-10 Jakub Jelinek <jakub@redhat.com>
2466
2467 * c-common.h (c_omp_check_context_selector,
2468 c_omp_get_context_selector): Declare.
2469 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2470 in diagnostic message.
2471 (c_omp_check_context_selector, c_omp_get_context_selector): New
2472 functions.
2473 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2474 attribute.
2475 (handle_omp_declare_variant_attribute): New function.
2476
a7160771
MS
24772019-10-09 Martin Sebor <msebor@redhat.com>
2478
2479 PR tree-optimization/90879
2480 * c.opt (-Wstring-compare): New option.
2481
cb57504a
JM
24822019-10-08 Andrew Sutton <asutton@lock3software.com>
2483 Jason Merrill <jason@redhat.com>
2484
2485 Update the concepts implementation to conform to the C++20
2486 specification, improve compile times, and generally clean up
2487 the implementation.
2488
2489 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2490 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2491 * c.opt: Add -Wconcepts-ts.
2492 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2493 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2494 (set_std_cxx2a): Enable concepts by default.
2495
fbb2a6dc
JM
24962019-10-08 Joseph Myers <joseph@codesourcery.com>
2497
2498 * c-opts.c (c_common_post_options): Set
2499 -fno-fp-int-builtin-inexact for C2X.
2500
8e007055
JJ
25012019-10-05 Jakub Jelinek <jakub@redhat.com>
2502
2503 PR c++/91369 - Implement P0784R7: constexpr new
2504 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2505 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2506
843f104d
JM
25072019-10-04 Joseph Myers <joseph@codesourcery.com>
2508
2509 PR c/82752
2510 * c-format.c (C_STD_VER): Handle C2x.
2511 (C_STD_NAME): Likewise.
2512 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2513 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2514 modifier allowed and 'p' flag.
2515 * c-format.h (enum format_std_version): Add STD_C2X.
2516 (struct format_char_info): Mention 'p' in comment on flags2.
2517
e9c9a142
DM
25182019-10-01 David Malcolm <dmalcolm@redhat.com>
2519
2520 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2521 calling diagnostic_show_locus, rather than destroying it afterwards.
2522
7552c36a
JJ
25232019-10-01 Jakub Jelinek <jakub@redhat.com>
2524
2525 PR c++/91925
2526 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2527 with NULL DECL_FIELD_OFFSET.
2528
8209db25
RS
25292019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2530
2531 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2532 has a type name, use it in preference to the __vector syntax.
2533
9343bf99
RS
25342019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2535
2536 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2537 two spaces between a comma and "...".
2538
59bc434a
JJ
25392019-09-27 Jakub Jelinek <jakub@redhat.com>
2540
2541 PR c++/88203
2542 * c-common.h (c_omp_predefined_variable): Declare.
2543 * c-omp.c (c_omp_predefined_variable): New function.
2544 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2545 for predefined variables.
2546
c6447c20
RS
25472019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2548
2549 * c-common.h (build_function_call_vec): Take the original
2550 function decl as an optional final parameter.
2551 (check_builtin_function_arguments): Take the original function decl.
2552 * c-common.c (check_builtin_function_arguments): Likewise.
2553 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2554 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2555
c4438114
JM
25562019-09-15 Jason Merrill <jason@redhat.com>
2557
2558 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2559 fold_for_warn in "|| mask" warning.
2560
68a57628
ML
25612019-09-10 Martin Liska <mliska@suse.cz>
2562
2563 * c.opt: Use newly added WarnRemoved.
2564
f48ef52e
ML
25652019-09-09 Martin Liska <mliska@suse.cz>
2566
2567 * c.opt: Update comment of removed
2568 options that are preserved only for backward
2569 compatibility.
2570
67f6e649
ML
25712019-09-06 Martin Liska <mliska@suse.cz>
2572
2573 PR c++/91125
2574 * c-common.c: Remove definition of flag_use_repository.
2575 * c-common.h: Likewise.
2576 * c-opts.c (c_common_handle_option):
2577 Do not handle OPT_frepo option.
2578 * c.opt: Mark the option with Deprecated.
2579
db9d2274
MP
25802019-09-04 Marek Polacek <polacek@redhat.com>
2581
2582 * c.opt (fdeduce-init-list): Ignored.
2583
68e2c199
PK
25842019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2585
2586 PR c/78736
2587 * c.opt (Wenum-conversion): New option.
2588
7a4418a5
JL
25892019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2590
2591 * c-attribs.c (handle_section_attribute): Call the
2592 handle_generic_attribute target hook after performing target
2593 independent processing.
2594 (handle_noinit_attribute): Likewise.
2595
5f76ab15
ILT
25962019-09-03 Ian Lance Taylor <iant@golang.org>
2597
2598 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2599 when using -fgo-dump-spec.
2600
ae0d3f6a
ML
26012019-09-02 Martin Liska <mliska@suse.cz>
2602
2603 PR c++/91155
2604 * c-common.c (fname_as_string): Use cxx_printable_name for
2605 __PRETTY_FUNCTION__ same as was used before r265711.
2606
8a902edb
MP
26072019-08-28 Marek Polacek <polacek@redhat.com>
2608
2609 Implement P1152R4: Deprecating some uses of volatile.
2610 PR c++/91361
2611 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2612 default for C++2a, unless -Wno-deprecated.
2613 * c.opt (Wvolatile): New warning.
2614
4742dbe7
MP
26152019-08-28 Marek Polacek <polacek@redhat.com>
2616
2617 PR c++/91360 - Implement C++20 P1143R2: constinit.
2618 * c-common.c (c_common_reswords): Add constinit and __constinit.
2619 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2620 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2621 RID_LAST_CXX20.
2622 (D_CXX20): Define.
2623 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2624 * c-format.c (cxx_keywords): Add "constinit".
2625 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2626
6a074892
JJ
26272019-08-27 Jakub Jelinek <jakub@redhat.com>
2628
2629 PR c++/91415
2630 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2631 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2632 like COMPOUND_EXPR rather than normal expression.
2633
22f8849d
IS
26342019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2635
2636 PR pch/61250
2637 * c-lex.c (c_lex_with_flags): Don't call
2638 c_common_no_more_pch () from here.
2639
df375b03
JJ
26402019-08-23 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR middle-end/91283
2643 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2644 instead of flag_excess_precision_cmdline.
2645 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2646 * c-opts.c (c_common_post_options): Likewise.
2647
14b7950f
MS
26482019-08-22 Martin Sebor <msebor@redhat.com>
2649
2650 PR middle-end/91490
2651 * c-common.c (braced_list_to_string): Add argument and overload.
2652 Handle flexible length arrays and unions.
2653
8bb2ee59
EB
26542019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2655
2656 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2657 function declarations where arguments are missing. Rename variables.
2658
21c1e205
RB
26592019-08-15 Richard Biener <rguenther@suse.de>
2660
2661 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2662 enabled, define __SIZETYPE__.
2663
f0033821
CL
26642019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2665
2666 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2667 exclusion with "section" attribute.
2668 (attr_noinit_exclusions): New table.
2669 (handle_noinit_attribute): New function.
2670
4d732405
RS
26712019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2672
2673 PR middle-end/91421
2674 * c-common.c (resolve_overloaded_builtin): Use
2675 copy_decl_built_in_function.
2676
51ad8481
MS
26772019-08-13 Martin Sebor <msebor@redhat.com>
2678
2679 PR c/80619
2680 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2681 (asm_fprintf_length_spec): Same.
2682 * c-format.h (format_lengths): Add FMT_LEN_w.
2683
77eb117f
JJ
26842019-08-10 Jakub Jelinek <jakub@redhat.com>
2685
2686 * c-pragma.h (enum pragma_omp_clause): Add
2687 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2688
398e3feb
JJ
26892019-08-07 Jakub Jelinek <jakub@redhat.com>
2690
2691 * c-pragma.h (enum pragma_omp_clause): Add
2692 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2693 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2694 enumeration value.
2695
ab574db6
MP
26962019-08-05 Marek Polacek <polacek@redhat.com>
2697
2698 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2699 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2700 default for C++2a, unless -Wno-deprecated.
2701 * c.opt (Wcomma-subscript): New warning.
2702
554a530f
JJ
27032019-07-20 Jakub Jelinek <jakub@redhat.com>
2704
2705 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2706 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2707 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2708 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2709 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2710 constructs with the loop construct.
2711
1a888209
JJ
27122019-07-13 Jakub Jelinek <jakub@redhat.com>
2713
2714 PR c/91149
2715 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2716 OMP_CLAUSE_REDUCTION_TASK handling.
2717
1fdd6f04
JJ
27182019-07-12 Jakub Jelinek <jakub@redhat.com>
2719
2720 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2721 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2722
99b1c316
MS
27232019-07-09 Martin Sebor <msebor@redhat.com>
2724
2725 PR c++/61339
1fdd6f04 2726 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2727 and others to class.
2728 * c-pretty-print.h: Same.
2729
6c1dae73
MS
27302019-07-09 Martin Sebor <msebor@redhat.com>
2731
2732 PR c++/61339
2733 * c-format.c (check_argument_type): Change class-key from class to
2734 struct and vice versa to match convention and avoid -Wclass-is-pod
2735 and -Wstruct-no-pod.
2736 * c-pretty-print.h: Same.
2737
8ba6ea87
ML
27382019-07-03 Martin Liska <mliska@suse.cz>
2739
2740 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2741 dead assignemts.
2742
83eb9522
JJ
27432019-07-03 Jakub Jelinek <jakub@redhat.com>
2744
2745 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2746 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2747 with OMP_PARALLEL.
2748
1c6ffbab
QZ
27492019-07-02 qing zhao <qing.zhao@oracle.com>
2750
2751 PR preprocessor/90581
2752 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2753 * c.opt: Add new option -fmax-include-depth.
2754
7ffc7de5
JM
27552019-06-26 Jason Merrill <jason@redhat.com>
2756
2757 PR c++/55442 - memory-hog with highly recursive constexpr.
2758 * c.opt (fconstexpr-loop-limit): New.
2759
361af3e4
JJ
27602019-06-25 Jakub Jelinek <jakub@redhat.com>
2761
2762 PR sanitizer/90954
2763 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2764 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2765
ab20d992
JJ
27662019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2767
2768 * c-common.c (c_common_nodes_and_builtins): Define
2769 alternate "__intN__" name for "__intN" types.
2770
f4af4019
JH
27712019-06-24 Jan Hubicka <jh@suse.cz>
2772
2773 * c-common.c (braced_lists_to_strings): Check that
2774 type is array or integer prior checking string flag.
2775
da9e9b57
MB
27762019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2777
2778 PR c++/90875 - added -Wswitch-outside-range option
2779 * c.opt (Wswitch-outside-range): Added new option.
2780 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2781
3f3d6a6f
MP
27822019-06-21 Marek Polacek <polacek@redhat.com>
2783
2784 PR c++/90953 - ICE with -Wmissing-format-attribute.
2785 * c-common.c (check_function_arguments_recurse): Use
2786 get_attribute_name.
2787 (check_missing_format_attribute): Likewise.
2788
1bf32c11
MP
27892019-06-19 Marek Polacek <polacek@redhat.com>
2790
2791 PR c++/60364 - noreturn after first decl not diagnosed.
2792 * c-attribs.c (handle_noreturn_attribute): No longer static.
2793 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2794 Declare.
2795 * c-format.c (check_function_format): Use get_attribute_name.
2796
a04c0734
MS
27972019-06-19 Martin Sebor <msebor@redhat.com>
2798
2799 PR translation/90156
2800 * c-format.c (function_format_info::format_type): Adjust type.
2801 (function_format_info::is_raw): New member.
2802 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2803 (decode_format_attr): Adjust call to decode_format_type.
2804 Avoid a redundant call to convert_format_name_to_system_name.
2805 Avoid abbreviating the word "arguments" in a diagnostic.
2806 (format_warning_substr): New function.
2807 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2808 (finish_dollar_format_checking): Same.
2809 (check_format_info): Same.
2810 (struct baltoks_t): New.
2811 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2812 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2813 functions.
2814 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2815 maybe_diag_unbalanced_tokens.
2816 (handle_format_attribute): Spell out the word "arguments" in
2817 a diagnostic.
2818
d3786ebb
MB
28192019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2820
2821 PR c++/90449 - add -Winaccessible-base option.
2822 * c.opt (Winaccessible-base): New option.
2823
bf38f7e9
JJ
28242019-06-10 Jakub Jelinek <jakub@redhat.com>
2825
2826 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2827 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2828 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2829 combined/composite constructs where it is not allowed. Copy over
2830 OMP_CLAUSE_REDUCTION_INSCAN.
2831
0ecf545c
MS
28322019-06-05 Martin Sebor <msebor@redhat.com>
2833
2834 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2835 (handle_alias_ifunc_attribute): Same.
2836 (handle_copy_attribute): Same.
2837 (handle_weakref_attribute): Same.
2838 (handle_nonnull_attribute): Same.
2839 * c-warn.c (warn_for_sign_compare): Same.
2840 (warn_for_restrict): Same.
2841 * c.opt: Same.
2842
36b34127
MS
28432019-06-05 Martin Sebor <msebor@redhat.com>
2844
2845 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2846 * c.opt (-Wformat-diag): Remove a spurious period.
2847
357a352f
JJ
28482019-05-29 Jakub Jelinek <jakub@redhat.com>
2849
2850 PR c/90628
2851 * c-common.c (check_builtin_function_arguments)
2852 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2853 as last argument.
2854
2b8235ea
EB
28552019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2856
2857 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2858
6d86ddc4
ML
28592019-05-22 Martin Liska <mliska@suse.cz>
2860
2861 PR lto/90500
2862 * c-attribs.c (handle_copy_attribute): Do not copy
2863 target_clones attribute.
2864
419ba5b9
EB
28652019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2866
2867 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2868 * c-ada-spec.c (print_assignment_operator): New function.
2869 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2870 assignment operators declared as methods and filter out the others.
2871
e03436e7
TS
28722019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2873
2874 PR c/89433
2875 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2876 "omp declare target".
2877
a9c697b8
MS
28782019-05-16 Martin Sebor <msebor@redhat.com>
2879
ab20d992
JJ
2880 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2881 keywords, operators, and types in diagnostics.
2882 (handle_scalar_storage_order_attribute): Same.
2883 (handle_mode_attribute): Same.
2884 (handle_visibility_attribute): Same.
2885 (handle_assume_aligned_attribute): Same.
2886 (handle_no_split_stack_attribute): Same.
2887 * c-common.c (shorten_compare): Same.
2888 (c_common_truthvalue_conversion): Same.
2889 (cb_get_source_date_epoch): Same.
2890 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2891 in diagnostics.
2892 (interpret_float): Same.
2893 * c-omp.c (c_finish_omp_for): Same.
2894 * c-opts.c (c_common_post_options): Same.
2895 * c-pch.c (c_common_pch_pragma): Same.
2896 * c-pragma.c (pop_alignment): Same.
2897 (handle_pragma_pack): Same.
2898 (apply_pragma_weak): Same.
2899 (handle_pragma_weak): Same.
2900 (handle_pragma_scalar_storage_order): Same.
2901 (handle_pragma_redefine_extname): Same.
2902 (add_to_renaming_pragma_list): Same.
2903 (maybe_apply_renaming_pragma): Same.
2904 (push_visibility): Same.
2905 (handle_pragma_visibility): Same.
2906 (handle_pragma_optimize): Same.
2907 (handle_pragma_message): Same.
2908 * c-warn.c (warn_for_omitted_condop): Same.
2909 (lvalue_error): Same.
a9c697b8 2910
6b943512
RB
29112019-05-15 Richard Biener <rguenther@suse.de>
2912
2913 PR c/90474
2914 * c-common.c (c_common_mark_addressable_vec): Also mark
2915 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2916 c_mark_addressable.
ab20d992 2917
b744fc85
NS
29182019-05-06 Nathan Sidwell <nathan@acm.org>
2919
2920 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2921
598f50d7
NS
29222019-04-30 Nathan Sidwell <nathan@acm.org>
2923
2924 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2925
5bcc5a3b
ML
29262019-04-30 Martin Liska <mliska@suse.cz>
2927
2928 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2929 for unknown options.
2930
e78a87f7
RS
29312019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2932
2933 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2934 the pointer target rather than the pointer itself.
2935
c280b7ee
JJ
29362019-04-19 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR c/89888
2939 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2940 arguments.
2941 (c_do_switch_warnings): Remove outside_range_p argument.
2942 * c-common.c (check_case_bounds): Removed.
2943 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2944 Don't call check_case_bounds. Fold low_value as well as high_value.
2945 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2946 Check for case labels outside of range of original type here and
2947 adjust them.
2948
8e8225e6
JJ
29492019-04-12 Jakub Jelinek <jakub@redhat.com>
2950
63b8a166
JJ
2951 PR translation/90041
2952 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2953 in the Warn diagnostics.
2954
8e8225e6
JJ
2955 PR c/89946
2956 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2957 function comment. Warn if arguments of the attribute are not positive
2958 integer constants.
2959
53a3f614
EB
29602019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2961
2962 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2963 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2964
22be5873
EB
29652019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2966
2967 * c-ada-spec.c (is_float128): New predicate extracted from...
2968 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2969 <REAL_TYPE>: ...here. Call it.
2970
34facf20
DM
29712019-04-05 David Malcolm <dmalcolm@redhat.com>
2972
2973 PR c/89985
2974 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2975 auto_diagnostic_group. Guard inform calls by result of
2976 warning_at call.
2977
05564120
MP
29782019-04-05 Marek Polacek <polacek@redhat.com>
2979
ab20d992 2980 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2981 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2982 of RHS.
2983
7a506c3c
JM
29842019-04-03 Jason Merrill <jason@redhat.com>
2985
2986 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2987 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2988
ddeae8c8
MS
29892019-04-01 Martin Sebor <msebor@redhat.com>
2990
2991 PR c/89685
2992 * c-attribs.c (handle_copy_attribute): Handle references and
2993 non-constant expressions.
2994
a15ffa22
JJ
29952019-03-22 Jakub Jelinek <jakub@redhat.com>
2996
2997 PR c++/87481
2998 * c.opt (-fconstexpr-ops-limit=): New option.
2999
36a3a7a3
JJ
30002019-03-21 Jakub Jelinek <jakub@redhat.com>
3001
3002 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3003 template param.
3004
bec1da64
MS
30052019-03-19 Martin Sebor <msebor@redhat.com>
3006
3007 PR tree-optimization/89688
3008 * c-common.c (braced_list_to_string): Make static.
3009 (braced_lists_to_strings): Define new function.
3010 * c-common.h (braced_list_to_string): Remove.
3011 (braced_lists_to_strings): Declare.
3012
1fe61adf
ML
30132019-03-12 Martin Liska <mliska@suse.cz>
3014
3015 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3016
93964ebd
ML
30172019-03-11 Martin Liska <mliska@suse.cz>
3018
3019 * c-opts.c (c_common_post_options): Wrap apostrophes
3020 in gcc internal format with %'.
3021
a3f9f006
ML
30222019-03-11 Martin Liska <mliska@suse.cz>
3023
3024 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3025 in a string format message and fix GNU coding style.
3026 * c-common.c (vector_types_convertible_p): Likewise.
3027 (c_build_vec_perm_expr): Likewise.
3028 * c-indentation.c (get_visual_column): Likewise.
3029 * c-opts.c (c_common_handle_option): Likewise.
3030 (c_common_post_options): Likewise.
3031 (sanitize_cpp_opts): Likewise.
3032 * c-pch.c (c_common_pch_pragma): Likewise.
3033 * c-pragma.c (handle_pragma_pack): Likewise.
3034
1db01ff9
JJ
30352019-03-08 Jakub Jelinek <jakub@redhat.com>
3036
3037 PR tree-optimization/89550
3038 * c-common.c (c_common_truthvalue_conversion): Only set
3039 TREE_NO_WARNING if warning_at returned true.
3040 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3041
ba790e6f
JJ
30422019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3043 Martin Sebor <msebor@gmail.com>
3044
3045 * c.opt (Wmissing-attributes): Clean up doc string.
3046
7da73ba7
JJ
30472019-02-25 Jakub Jelinek <jakub@redhat.com>
3048
3049 PR c/89495
3050 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3051 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3052 checking.
3053
921bb9d1
RB
30542019-02-22 Richard Biener <rguenther@suse.de>
3055
3056 * c-pch.c (no_checksum): Remove.
3057 (pch_init): Remove assertion that executable_checksum is not
3058 all zero.
3059 (c_common_valid_pch): Likewise.
3060
e2ebb05c
MS
30612019-02-18 Martin Sebor <msebor@redhat.com>
3062
3063 PR middle-end/89294
3064 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3065
3fe53000
DM
30662019-02-16 David Malcolm <dmalcolm@redhat.com>
3067
3068 PR c++/88680
3069 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3070 implementing -Wtype-limits.
3071
28a8cef1
MS
30722019-02-11 Martin Sebor <msebor@redhat.com>
3073
3074 PR c++/87996
3075 * c-common.c (invalid_array_size_error): New function.
3076 (valid_array_size_p): Call it. Handle size as well as type.
3077 * c-common.h (valid_constant_size_p): New function.
3078 (enum cst_size_error): New type.
3079
ec2be203
DM
30802019-01-31 David Malcolm <dmalcolm@redhat.com>
3081
3082 PR c/89122
3083 * known-headers.cc (get_stdlib_header_for_name): Add
3084 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3085
8936f047
JJ
30862019-01-31 Jakub Jelinek <jakub@redhat.com>
3087
3088 PR libstdc++/88170
3089 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3090 a C cast in pp_c_flag_gnu_v3 mode.
3091
6a335b96
JJ
30922019-01-29 Jakub Jelinek <jakub@redhat.com>
3093
3094 PR c/86125
3095 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3096 builtin_structptr_types types even for C.
3097
2a06eba5
BE
30982019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3099
3100 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3101 when rhs is of array type correctly. Fix handling of nested structures.
3102 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3103 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3104 type casts within nested compound expressions.
3105
18a23298
JJ
31062019-01-22 Jakub Jelinek <jakub@redhat.com>
3107
3108 PR middle-end/88968
3109 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3110 variable after using BIT_FIELD_REF.
3111
420183d9
L
31122019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3113
3114 PR c/51628
3115 PR c/88664
3116 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3117 Remove the boolean argument.
3118 * c-warn.c (check_address_of_packed_member): Renamed to ...
3119 (check_address_or_pointer_of_packed_member): This. Also
3120 warn pointer conversion.
3121 (check_and_warn_address_of_packed_member): Renamed to ...
3122 (check_and_warn_address_or_pointer_of_packed_member): This.
3123 Also warn pointer conversion.
3124 (warn_for_address_or_pointer_of_packed_member): Remove the
3125 boolean argument. Don't check pointer conversion here.
3126
99063eee
RS
31272019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3128
3129 PR inline-asm/52813
3130 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3131
a30d0196
JJ
31322019-01-14 Jakub Jelinek <jakub@redhat.com>
3133
3134 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3135 and __cpp_nontype_template_parameter_auto. Add a comment that
3136 __cpp_template_auto is deprecated.
3137
2d91f79d
TH
31382019-01-14 Tom Honermann <tom@honermann.net>
3139
3140 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3141 * c-common.c (c_common_reswords): Add char8_t.
3142 (fix_string_type): Use char8_t for the type of u8 string literals.
3143 (c_common_get_alias_set): char8_t doesn't alias.
3144 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3145 C++.
3146 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3147 (keyword_begins_type_specifier): Add RID_CHAR8.
3148 * c-common.h (rid): Add RID_CHAR8.
3149 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3150 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3151 Define char8_type_node and char8_array_type_node.
3152 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3153 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3154 (c_cpp_builtins): Predefine __cpp_char8_t.
3155 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3156 CPP_UTF8STRING.
3157 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3158 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3159 targeting C++2a.
3160 * c.opt: Add the -fchar8_t command line option.
3161
23db6ced
MS
31622019-01-14 Martin Sebor <msebor@redhat.com>
3163
3164 PR target/88638
3165 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3166 and issue errors if it fails.
3167 * c-common.h (valid_format_string_type_p): Declare.
3168 * c-format.c (valid_stringptr_type_p): Rename...
3169 (valid_format_string_type_p): ...to this and make extern.
3170 (handle_format_arg_attribute): Adjust to new name.
3171 (check_format_string): Same.
3172
234c3818
L
31732019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3174
3175 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3176 Replace "may may" with "may" in warning message.
3177
d8fcab68
JJ
31782019-01-07 Jakub Jelinek <jakub@redhat.com>
3179
3180 PR c++/85052
3181 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3182 (c_build_vec_convert): Declare.
3183 * c-common.c (c_build_vec_convert): New function.
3184
29d24852
MS
31852019-01-04 Martin Sebor <msebor@redhat.com>
3186
3187 PR c/88546
3188 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3189 Handle C++ empty throw specification and C11 _Noreturn.
3190 (has_attribute): Also handle C11 _Noreturn.
3191
9069a4c9
MS
31922019-01-04 Martin Sebor <msebor@redhat.com>
3193
3194 PR c/88363
3195 * c-attribs.c (positional_argument): Also accept enumerated types.
3196
a5544970
JJ
31972019-01-01 Jakub Jelinek <jakub@redhat.com>
3198
3199 Update copyright years.
3200
da77eace
L
32012018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3202
3203 PR c/51628
3204 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3205 * c-warn.c (check_alignment_of_packed_member): New function.
3206 (check_address_of_packed_member): Likewise.
3207 (check_and_warn_address_of_packed_member): Likewise.
3208 (warn_for_address_or_pointer_of_packed_member): Likewise.
3209 * c.opt: Add -Wno-address-of-packed-member.
3210
573767d4
DM
32112018-12-20 David Malcolm <dmalcolm@redhat.com>
3212
3213 PR c++/87504
3214 * c-warn.c (get_outermost_macro_expansion): New function.
3215 (spelled_the_same_p): Use it to unwind the macro expansions, and
3216 compare the outermost macro in each nested expansion, rather than
3217 the innermost.
3218
a14feb3c
DM
32192018-12-19 David Malcolm <dmalcolm@redhat.com>
3220
3221 PR c++/87504
3222 * c-common.h (warn_tautological_cmp): Convert 1st param from
3223 location_t to const op_location_t &.
3224 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3225 when testing for INTEGER_CST.
3226 (warn_tautological_bitwise_comparison): Convert 1st param from
3227 location_t to const op_location_t &; use it to build a
3228 binary_op_rich_location, and use this.
3229 (spelled_the_same_p): New function.
3230 (warn_tautological_cmp): Convert 1st param from location_t to
3231 const op_location_t &. Warn for macro expansions if
3232 spelled_the_same_p. Use binary_op_rich_location.
3233
dfd7fdca
DM
32342018-12-19 David Malcolm <dmalcolm@redhat.com>
3235
3236 PR c++/43064
3237 PR c++/43486
3238 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3239 (verify_tree): Handle location wrappers.
3240 (c_common_truthvalue_conversion): Strip any location wrapper.
3241 Handle CONST_DECL.
3242 (fold_offsetof): Strip any location wrapper.
3243 (complete_array_type): Likewise for initial_value.
3244 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3245 index before checking for INTEGER_CST.
3246 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3247 print parentheses around location wrappers.
3248 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3249 before checking for INTEGER_CST.
3250 (warn_tautological_bitwise_comparison): Call
3251 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3252 before checking for INTEGER_CST.
3253 (readonly_error): Strip any location wrapper.
3254 (warn_array_subscript_with_type_char): Strip location wrappers
3255 before checking for INTEGER_CST. Use the location of the index if
3256 available.
3257
5c8b3702
JM
32582018-12-06 Jason Merrill <jason@redhat.com>
3259
3260 PR c++/88136 - -Wdeprecated-copy false positives
3261 * c.opt (Wdeprecated-copy-dtor): New.
3262 (Wdeprecated-copy): Move to -Wextra.
3263
673670da
MS
32642018-11-29 Martin Sebor <msebor@redhat.com>
3265
3266 PR c/88172
3267 PR testsuite/88208
3268 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3269 alignments to values less than the target requires.
3270 (has_attribute): For attribute aligned consider both the attribute
3271 and the alignment bits.
3272 * c-common.c (c_init_attributes): Optionally issue a warning for
3273 zero alignment.
3274
04864ec8
MS
32752018-11-28 Martin Sebor <msebor@redhat.com>
3276
3277 PR c/88065
3278 PR c/87297
3279 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3280 or destination is an error.
3281
ace83db0
JJ
32822018-11-28 Jakub Jelinek <jakub@redhat.com>
3283
3284 PR c++/88215
3285 * c-ubsan.c: Include langhooks.h.
3286 (ubsan_instrument_division): Change gcc_assert that main variants
3287 of op0 and op1 types are equal to gcc_checking_assert that the
3288 main variants are compatible types.
3289
da193a27
EB
32902018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3291
3292 * c-ada-spec.c: Include stringpool.h.
3293 (has_static_fields): Return false for incomplete types.
3294 (is_tagged_type): Likewise.
3295 (has_nontrivial_methods): Likewise.
3296 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3297 (struct overloaded_name_hash): New structure.
3298 (struct overloaded_name_hasher): Likewise.
3299 (overloaded_names): New global variable.
3300 (init_overloaded_names): New static function.
3301 (overloaded_name_p): New predicate.
3302 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3303 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3304 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3305 Remove always-true condition and dump forward types.
3306 (dump_ada_specs): Delete overloaded_names.
3307
98f08eb8
MS
33082018-11-20 Martin Sebor <msebor@redhat.com>
3309
3310 * c-attribs.c (type_for_vector_size): New function.
3311 (type_valid_for_vector_size): Same.
3312 (handle_vector_size_attribute): Move code to the functions above
3313 and call them.
3314 (validate_attribute, has_attribute): New functions.
3315 * c-common.h (has_attribute): Declare.
3316 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3317 * c-common.c (c_common_resword): Same.
3318
2674fa47
JM
33192018-11-16 Jason Merrill <jason@redhat.com>
3320
3321 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3322 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3323
258b3854
JJ
33242018-11-16 Jakub Jelinek <jakub@redhat.com>
3325
3326 PR middle-end/87854
3327 * c-common.c (fix_string_type): Reject string literals larger than
3328 TYPE_MAX_VALUE (ssizetype) bytes.
3329
1d249509
MS
33302018-11-15 Martin Sebor <msebor@redhat.com>
3331
3332 PR c++/87541
3333 PR c++/87542
3334 * c-attribs.c (positional_argument): New function.
3335 (handle_alloc_size_attribute): Use it and simplify.
3336 (handle_alloc_align_attribute): Same.
3337 (handle_assume_aligned_attribute): Same.
3338 (handle_nonnull_attribute): Same.
3339 * c-common.c (check_function_arguments): Pass fntype to
3340 check_function_format.
3341 * c-common.h (check_function_format): Add an argument.
3342 (PosArgFlags, positional_argument): Declare new type and function.
3343 * c-format.c (decode_format_attr): Add arguments.
3344 (check_format_string, get_constant): Same.
3345 (convert_format_name_to_system_name): Adjust.
3346
478dd60d
DM
33472018-11-15 David Malcolm <dmalcolm@redhat.com>
3348
3349 PR other/19165
3350 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3351
8cca0163
JJ
33522018-11-14 Jakub Jelinek <jakub@redhat.com>
3353
8ee09943
JJ
3354 P1236R1 - Signed integers are two's complement
3355 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3356 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3357 with in-range second operand well defined for -std=c++2a.
3358
8cca0163
JJ
3359 PR other/88007
3360 * c-common.c (parse_optimize_options): Allocate option string from
3361 opts_obstack rather than as GC memory. Move the allocation after
3362 warning for invalid option.
3363
620e594b
DM
33642018-11-13 David Malcolm <dmalcolm@redhat.com>
3365
3366 * c-common.c (c_get_substring_location): Update for renaming of
3367 get_source_location_for_substring to get_location_within_string.
3368 * c-lex.c: Replace "source_location" with "location_t".
3369 * c-opts.c: Likewise.
3370 * c-ppoutput.c: Likewise.
3371
f9731de3
MS
33722018-11-13 Martin Sebor <msebor@redhat.com>
3373
3374 PR middle-end/81824
3375 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3376 (handle_tls_model_attribute): Improve diagnostics.
3377
e4bd6d5e
JM
33782018-11-12 Jason Merrill <jason@redhat.com>
3379
a6bb6b07
JM
3380 * c-cppbuiltin.c (c_cpp_builtins): Define
3381 __cpp_impl_destroying_delete.
3382
e4bd6d5e
JM
3383 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3384 __cpp_conditional_explicit.
3385
79a2c428
MS
33862018-11-09 Martin Sebor <msebor@redhat.com>
3387
3388 PR middle-end/81824
3389 * c-attribs.c (handle_copy_attribute): New function.
3390
4c7bd361
MS
33912018-11-09 Martin Sebor <msebor@redhat.com>
3392
3393 PR c/87795
3394 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3395
28567c40
JJ
33962018-11-08 Jakub Jelinek <jakub@redhat.com>
3397
3398 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3399 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3400 enum omp_memory_order MEMORY_ORDER.
3401 (c_finish_omp_flush): Add MO argument.
3402 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3403 (c_finish_omp_for): Add FINAL_P argument.
3404 * c-omp.c: Include memmodel.h.
3405 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3406 OMP_TASKGROUP_CLAUSES to it.
3407 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3408 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3409 instead of OMP_ATOMIC_SEQ_CST.
3410 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3411 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3412 __atomic_thread_fence call with the given value.
3413 (check_omp_for_incr_expr): Formatting fixes.
3414 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3415 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3416 is not constant expression 1 or -1. Transform NE_EXPR loops
3417 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3418 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3419 loops too.
3420 (c_omp_split_clauses): Add support for combined
3421 #pragma omp parallel master and
3422 #pragma omp {,parallel }master taskloop{, simd} constructs.
3423 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3424 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3425 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3426 (c_omp_predetermined_sharing): Don't return
3427 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3428 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3429 PRAGMA_OMP_REQUIRES.
3430 * c-pragma.h (enum pragma_kind): Likewise.
3431 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3432 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3433
204839e7
DM
34342018-11-08 David Malcolm <dmalcolm@redhat.com>
3435
3436 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3437
d8010ee4
DM
34382018-11-08 David Malcolm <dmalcolm@redhat.com>
3439
3440 * c-format.c (local_cgraph_node_ptr_node): New variable.
3441 (gcc_dump_printf_char_table): Add entry for %C.
3442 (get_pointer_to_named_type): New function, taken from the handling
3443 code for "gimple *" from...
3444 (init_dynamic_diag_info): ...here. Add handling for
3445 "cgraph_node *".
3446 * c-format.h (T_CGRAPH_NODE): New.
3447
4be5c72c
JM
34482018-10-19 Jason Merrill <jason@redhat.com>
3449
3450 * c-cppbuiltin.c (c_cpp_builtins): Add
3451 __cpp_nontype_template_parameter_class.
3452
f3f6029d
NS
34532018-10-31 Nathan Sidwell <nathan@acm.org>
3454
ab5324fb
NS
3455 * c-opts.c (c_finish_options): Force command line macro
3456 location. Refactor to avoid repeating main debug hook.
3457 (push_command_line_include): Clarify comment.
3458
f3f6029d
NS
3459 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3460
91e3ec29
MS
34612018-10-30 Martin Sebor <msebor@redhat.com>
3462
3463 PR middle-end/87041
3464 * c-format.c (check_format_types): Avoid diagnosing null pointer
3465 arguments to printf-family of functions.
3466
b5ff4f5c
MP
34672018-10-30 Marek Polacek <polacek@redhat.com>
3468
3469 Implement P0892R2, explicit(bool).
3470 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3471
7e2de6df
DM
34722018-10-29 David Malcolm <dmalcolm@redhat.com>
3473
3474 * name-hint.h (name_hint::take_deferred): New member function.
3475
b2bf438c
DM
34762018-10-29 David Malcolm <dmalcolm@redhat.com>
3477
3478 PR c++/56856
3479 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3480 argument.
3481 (check_function_restrict): Rename param "argarray" to
3482 "unfolded_argarray", and make a copy named "argarray", calling
3483 fold_for_warn on each argument.
3484 (check_function_arguments): Add note about responsibility for
3485 folding the arguments.
3486
9f936c86
JM
34872018-10-17 Joseph Myers <joseph@codesourcery.com>
3488
3489 * c-common.c (flag_isoc2x): New variable.
3490 * c-common.h (clk_c): Update comment to reference C2X.
3491 (flag_isoc99, flag_isoc11): Update comments to reference future
3492 standard versions in general.
3493 (flag_isoc2x): Declare.
3494 * c-opts.c (set_std_c2x): New function.
3495 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3496 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3497 flag_isoc2x to 0.
3498 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3499
7a8a92c4
JM
35002018-10-17 Joseph Myers <joseph@codesourcery.com>
3501
3502 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3503 (std=iso9899:2018): Document C17 as published in 2018.
3504
4dc003ff
CL
35052018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3506
3507 PR c++/87364
3508 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3509
79371671
WW
35102018-10-11 Will Wray <wjwray@gmail.com>
3511
3512 PR c++/87364
3513 * c-pretty-print.h (pp_c_type_cast): Prototype.
3514 (pp_c_integer_constant): Likewise.
3515 * c-pretty-print.c (pp_c_type_cast): No longer static.
3516 (pp_c_integer_constant): Likewise.
3517 (pp_c_enumeration_constant): Fix loop termination when finding
3518 name of constant. No longer returns a value. Call
3519 pp_c_integer_constant.
3520 (c_pretty_printer::constant): Update for changes to
3521 pp_c_enumeration_constant.
3522
46c62690
JJ
35232018-10-11 Jakub Jelinek <jakub@redhat.com>
3524
3525 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3526 for no_unique_address.
3527
c24300ba
DM
35282018-10-09 David Malcolm <dmalcolm@redhat.com>
3529
3530 * c-common.c (c_option_controlling_cpp_error): Rename to...
3531 (c_option_controlling_cpp_diagnostic): ...this, and convert
3532 "reason" from int to enum.
3533 (c_cpp_error): Rename to...
3534 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3535 * c-common.h (c_cpp_error): Rename to...
3536 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3537 * c-opts.c (c_common_init_options): Update for renaming.
3538
8656dafa
RS
35392018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3540
3541 PR c/87286
3542 * c-common.c (vector_types_compatible_elements_p): Use
3543 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3544
8cff0652
VK
35452018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3546
3547 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3548 to generate constructor destructor priority warning.
3549 * c.opt (-Wprio-ctor-dtor): New option.
3550
bedf03a2
JM
35512018-10-01 Jason Merrill <jason@redhat.com>
3552
3553 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3554
6cc430c1
EB
35552018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3556
3557 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3558 (dump_ada_node): Add const keyword.
3559
87677ac7
ML
35602018-09-25 Martin Liska <mliska@suse.cz>
3561
3562 * c-common.c (c_common_truthvalue_conversion):
3563 Remove Pascal from documentation.
3564
518196cb
EB
35652018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3566
3567 * c-ada-spec.c: Include diagnostic.h.
3568 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3569
a599af84
MP
35702018-09-19 Marek Polacek <polacek@redhat.com>
3571
3572 * c.opt (Wclass-conversion): New.
3573
9c4a4b3c
DM
35742018-09-17 David Malcolm <dmalcolm@redhat.com>
3575
3576 * c-format.c (range_label_for_format_type_mismatch::get_text):
3577 Update for new param.
3578
c896ecfe
DM
35792018-09-17 David Malcolm <dmalcolm@redhat.com>
3580
3581 * c-format.c (format_warning_at_char): Update for introduction of
3582 format_string_diagnostic_t.
3583 (format_type_warning): Likewise.
3584
80c6d1f4
MJ
35852018-09-17 Martin Jambor <mjambor@suse.cz>
3586
3587 PR c/63886
3588 * c.opt (Wabsolute-value): New.
3589
6d900107
BE
35902018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3591
3592 * c-common.c (complete_flexible_array_elts): New helper function.
3593 * c-common.h (complete_flexible_array_elts): Declare.
3594
b5764229
BE
35952018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3596
3597 * c-common.c (braced_list_to_string): Remove eval parameter.
3598 Add some more checks. Always create zero-terminated STRING_CST.
3599 * c-common.h (braced_list_to_string): Adjust prototype.
3600
85204e23
DM
36012018-08-27 David Malcolm <dmalcolm@redhat.com>
3602
3603 PR 87091
3604 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3605 to a tri-state.
3606 (maybe_suggest_missing_token_insertion): Likewise.
3607 (maybe_add_include_fixit): Add param "override_location". If set,
3608 and source-printing is enabled, then override the rich_location's
3609 primary location with that of the insertion point for the fix-it
3610 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3611 * c-common.h (extern void maybe_add_include_fixit): Add bool
3612 param.
3613 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3614 for conversion of show_caret_p to a tri-state.
3615 * c-warn.c (warn_for_restrict): Likewise.
3616 * known-headers.cc
3617 (suggest_missing_header::~suggest_missing_header): Update call to
3618 maybe_add_include_fixit to suggest overriding the location, as it
3619 is for a note.
3620
3d78e008
ML
36212018-08-27 Martin Liska <mliska@suse.cz>
3622
3623 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3624 fndecl_built_in_p and remove check for FUNCTION_DECL if
3625 possible.
3d78e008
ML
3626 (check_builtin_function_arguments): Likewise.
3627 (reject_gcc_builtin): Likewise.
3628 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3629
b5be6d0c
MP
36302018-08-26 Marek Polacek <polacek@redhat.com>
3631
3632 PR c++/87029, Implement -Wredundant-move.
3633 * c.opt (Wredundant-move): New option.
3634
79ca9c35
MP
36352018-08-21 Marek Polacek <polacek@redhat.com>
3636
3637 PR c++/86981, Implement -Wpessimizing-move.
3638 * c.opt (Wpessimizing-move): New option.
3639
097f82ec
DM
36402018-08-20 David Malcolm <dmalcolm@redhat.com>
3641
3642 PR other/84889
3643 * c-attribs.c (common_handle_aligned_attribute): Add
3644 auto_diagnostic_group instance.
3645 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3646 * c-opts.c (c_common_post_options): Likewise.
3647 * c-warn.c (warn_logical_not_parentheses): Likewise.
3648 (warn_duplicated_cond_add_or_warn): Likewise.
3649 (warn_for_multistatement_macros): Likewise.
3650
3fb558b1
NS
36512018-08-20 Nathan Sidwell <nathan@acm.org>
3652
3653 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3654 access.
3655
800c0e98
NS
36562018-08-17 Nathan Sidwell <nathan@acm.org>
3657
3658 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3659 field.
3660 (laxy_hex_fp_value_count): Make unsigned.
3661 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3662 manipulate the macro.
3663 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3664 cpp_define_lazily.
3665
6f795a92
DM
36662018-08-17 David Malcolm <dmalcolm@redhat.com>
3667
3668 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3669 (gcc_dump_printf_length_specs): New.
3670 (gcc_dump_printf_flag_pairs): New.
3671 (gcc_dump_printf_flag_specs): New.
3672 (gcc_dump_printf_char_table): New.
3673 (format_types_orig): Add entry for "gcc_dump_printf".
3674 (init_dynamic_diag_info): Set up length_char_specs and
3675 conversion_specs for gcc_dump_printf_format_type.
3676 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3677
c5d725c0
NS
36782018-08-17 Nathan Sidwell <nathan@acm.org>
3679
10f04917
NS
3680 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3681
c5d725c0
NS
3682 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3683 * c-cppbuiltin.c: Likewise.
3684
c0c12356
ML
36852018-08-17 Martin Liska <mliska@suse.cz>
3686
3687 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3688 Ignore/Deprecated flag. Warning is done automatically for
3689 Deprecated flags.
c0c12356 3690
10fcc142
DM
36912018-08-16 David Malcolm <dmalcolm@redhat.com>
3692
3693 PR c++/70693
3694 * c-common.c (selftest::c_family_tests): Call
3695 selftest::c_indentation_c_tests.
3696 * c-common.h (selftest::c_indentation_c_tests): New decl.
3697 * c-indentation.c: Include "selftest.h".
3698 (next_tab_stop): Add "tab_width" param, rather than accessing
3699 cpp_opts.
3700 (get_visual_column): Likewise. Clarify comment. Bulletproof
3701 against reading past the end of the line.
3702 (get_first_nws_vis_column): Add "tab_width" param.
3703 (detect_intervening_unindent): Likewise.
3704 (should_warn_for_misleading_indentation): Read tab width from
3705 cpp_opts and pass around.
3706 (selftest::test_next_tab_stop): New test.
3707 (selftest::assert_get_visual_column_succeeds): New function.
3708 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3709 (selftest::assert_get_visual_column_fails): New function.
3710 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3711 (selftest::test_get_visual_column): New test.
3712 (selftest::c_indentation_c_tests): New function.
3713
3f6677f4
NS
37142018-08-16 Nathan Sidwell <nathan@acm.org>
3715
3716 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3717 (store_ada_macro): Likewise.
3718 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3719 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3720
96e6ae57
DM
37212018-08-15 David Malcolm <dmalcolm@redhat.com>
3722
3723 * c-format.c: Include "selftest-diagnostic.h" and
3724 "gcc-rich-location.h".
3725 (format_warning_at_char): Pass NULL for new label params of
3726 format_warning_va.
3727 (class indirection_suffix): New class.
3728 (class range_label_for_format_type_mismatch): New class.
3729 (format_type_warning): Move logic for generating "*" suffix to
3730 class indirection_suffix. Create "fmt_label" and "param_label"
3731 to show their types, and pass them to the
3732 format_warning_at_substring calls.
3733 (selftest::test_type_mismatch_range_labels): New test.
3734 (selftest::c_format_c_tests): Call it.
3735
23aa9f7c
MS
37362018-08-13 Martin Sebor <msebor@redhat.com>
3737
3738 PR tree-optimization/71625
3739 * c-common.c (braced_list_to_string): New function.
3740 * c-common.h (braced_list_to_string): Declare it.
3741
f10a9135
NS
37422018-08-08 Nathan Sidwell <nathan@acm.org>
3743
3744 * c-common.c (try_to_locate_new_include_inertion_point): Use
3745 linemap_included_from_linemap.
3746 * c-lex.c (fe_file_change): Use linemap_included_from.
3747 * c-ppoutput.c (pp_file_change): Likewise.
3748
8a45b051
MS
37492018-08-01 Martin Sebor <msebor@redhat.com>
3750
3751 PR tree-optimization/86650
ab20d992 3752 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3753 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3754 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3755 * c-format.h (T89_G): Update to be "gimple *" rather than
3756 "gcall *".
3757 (local_gcall_ptr_node): Rename...
3758 (local_gimple_ptr_node): ...to this.
3759
e540ccc0
DM
37602018-07-31 David Malcolm <dmalcolm@redhat.com>
3761
3762 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3763 table entries for gcc_diag_char_table, and the 'Z' entry from
3764 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3765 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3766 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3767 adding missing "Z" for this table. Remove erroneous "G" and "K"
3768 entries.
3769 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3770 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3771 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3772
425fc685
RE
37732018-07-31 Richard Earnshaw <rearnsha@arm.com>
3774
3775 * c-common.c (speculation_safe_resolve_call): New function.
3776 (speculation_safe_resolve_params): New function.
3777 (speculation_safe_resolve_return): New function.
3778 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3779 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3780 __HAVE_SPECULATION_SAFE_VALUE.
3781
181463c2
DM
37822018-07-20 David Malcolm <dmalcolm@redhat.com>
3783
3784 * c-common.c (c_cpp_error): Remove redundant "line_table"
3785 parameter from call to rich_location::set_range.
3786 (maybe_suggest_missing_token_insertion): Likewise.
3787
0d7f9065
MS
37882018-07-20 Martin Sebor <msebor@redhat.com>
3789
3790 PR middle-end/82063
ab20d992 3791 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3792
00abf86c
MS
37932018-07-20 Martin Sebor <msebor@redhat.com>
3794
3795 PR middle-end/82063
3796 * c-common.h (c_common_handle_option): Change function argument
3797 to HOST_WIDE_INT.
3798 * c-opts.c (c_common_init_options): Same.
3799 (c_common_handle_option): Same. Remove special handling of
3800 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3801 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3802 options to take a HOST_WIDE_INT argument and accept a byte-size
3803 suffix. Initialize.
3804 (-Wvla-larger-than): Same.
3805 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3806 (-Wno-vla-larger-than): Same.
3807
9b452033
JJ
38082018-07-12 Jakub Jelinek <jakub@redhat.com>
3809
3810 * c-attribs.c (c_common_attribute_table): Add
3811 "omp declare target implicit" attribute.
3812
cd0762f3
RB
38132018-07-12 Richard Biener <rguenther@suse.de>
3814
3815 PR c/86453
3816 * c-attribs.c (handle_packed_attribute): Do not build a variant
3817 type with TYPE_PACKED, instead ignore the attribute if we may
3818 not apply to the original type.
3819
0b27c3ed
JJ
38202018-07-10 Jakub Jelinek <jakub@redhat.com>
3821
3822 PR c++/86443
3823 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3824 to contain TREE_LIST for both the original class iterator and the
3825 "last" helper var.
3826
e730a0ef
EB
38272018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3828
3829 * c-ada-spec.c (to_ada_name): Remove index parameter.
3830 (pp_ada_tree_identifier): Likewise.
3831 (dump_ada_macros): Adjust call to to_ada_name.
3832 (struct overloaded_name_hash): Delete.
3833 (struct overloaded_name_hasher): Likewise.
3834 (overloaded_names): Likewise.
3835 (compute_overloading_index): Likewise.
3836 (dump_ada_decl_name): Do not call compute_overloading_index and
3837 adjust calls to pp_ada_tree_identifier.
3838 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3839 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3840 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3841 (dump_ada_enum_type): Remove type and display_convention parameters.
3842 Adjust calls to pp_ada_tree_identifier.
3843 (dump_ada_node): Likewise and for dump_ada_structure.
3844 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3845 and tidy up.
3846 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3847 syntax.
3848 (print_constructor): Adjust call to pp_ada_tree_identifier.
3849 (print_destructor): Likewise.
3850 (dump_ada_declaration): Switch to aspect syntax.
3851 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3852 parameter with nested parameter.
3853 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3854 (dump_ada_specs): Do not delete overloaded_names table.
3855
8de583fc
PB
38562018-07-06 Peter Bergner <bergner@linux.ibm.com>
3857
3858 PR target/86324
e730a0ef 3859 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3860 target hook.
3861
09cff37b
NS
38622018-07-05 Nathan Sidwell <nathan@acm.org>
3863
3864 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3865 NO_IMPLICIT_EXTERN_C.
3866
98086b2b
ML
38672018-06-28 Martin Liska <mliska@suse.cz>
3868
3869 * cppspec.c: Include opt-suggestions.h.
3870
ab20d992
JJ
38712018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3872 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3873 Cesar Philippidis <cesar@codesourcery.com>
3874
3875 * c-pragma.h (enum pragma_omp_clause): Add
3876 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3877 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3878
f41b7612
JJ
38792018-06-20 Jakub Jelinek <jakub@redhat.com>
3880
3881 PR c++/86210
3882 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3883 comment.
3884
4252ccd7
MS
38852018-06-18 Martin Sebor <msebor@redhat.com>
3886
3887 PR middle-end/85602
3888 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3889 nonstring.
3890
e197e64e
KV
38912018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3892
3893 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3894
34a7a230
JM
38952018-06-13 Jason Merrill <jason@redhat.com>
3896
5cef3733
JM
3897 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3898 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3899 handling.
3900
34a7a230
JM
3901 PR c++/86094 - wrong code with defaulted move ctor.
3902 * c-opts.c (c_common_post_options): Bump the current ABI version to
3903 13. Set warn_abi_version and flag_abi_compat_version to the current
3904 version rather than 0. Fix defaulting flag_abi_compat_version from
3905 warn_abi_version.
3906
bb0f14ae
MS
39072018-06-12 Martin Sebor <msebor@redhat.com>
3908
3909 PR c/85931
3910 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3911 sizeof source and destination yields the same value.
3912
3713f2e2
ML
39132018-06-12 Martin Liska <mliska@suse.cz>
3914
3915 * c.opt: Make MPX-related options as Deprecated.
3916
4af78ef8
DM
39172018-06-08 David Malcolm <dmalcolm@redhat.com>
3918
3919 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3920 rather than 0.
3921
31db0fe0
ML
39222018-06-08 Martin Liska <mliska@suse.cz>
3923
3924 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3925 for MPX (macros, related functions, fields in cgraph_node, ...).
3926 (handle_bnd_legacy): Likewise.
3927 (handle_bnd_instrument): Likewise.
3928 * c.opt: Likewise.
3929
fe16acf2
JJ
39302018-06-06 Jakub Jelinek <jakub@redhat.com>
3931
3932 PR c++/86068
3933 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3934 __cpp_transactional_memory to 201500 instead of 210500.
3935
4dbdb49b
JM
39362018-06-06 Jason Merrill <jason@redhat.com>
3937
3938 PR c++/85710 - ICE with -Wmemset-elt-size.
3939 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3940
f8ad043f
JM
39412018-06-01 Jason Merrill <jason@redhat.com>
3942
3943 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3944 201703.
3945
abc24d93
EB
39462018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3947
3948 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3949 declaration for a typedef independently of whether the declaration of
3950 the subtype is generated.
3951
d258f4aa
MS
39522018-05-31 Martin Sebor <msebor@redhat.com>
3953
3954 PR c/82063
3955 * c.opt (-Wno-alloc-size-larger-than): New option.
3956
b67b9225
DP
39572018-04-22 David Pagan <dave.pagan@oracle.com>
3958
3959 PR c/55976
3960 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3961 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3962 differentiate between default (no option), -Wreturn-type, and
3963 -Wno-return-type.
3964
04eb9c55
JM
39652018-05-29 Jason Merrill <jason@redhat.com>
3966
3967 * c.opt (Winit-list-lifetime): New flag.
3968
b0c31bc6
BE
39692018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3970
3971 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3972 splay_tree_delete_pointers.
3973
44284983
JJ
39742018-05-26 Jakub Jelinek <jakub@redhat.com>
3975
3976 PR bootstrap/85921
3977 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3978 noinline variable to workaround broken kernel headers.
3979
b46b715d
JM
39802018-05-18 Jason Merrill <jason@redhat.com>
3981
3982 * c.opt (Wdeprecated-copy): New flag.
3983
40659769
ML
39842018-05-17 Martin Liska <mliska@suse.cz>
3985
3986 * c-warn.c (overflow_warning): Do not use
3987 space in between 'G_' and '('.
3988
403962ea
JM
39892018-05-09 Jason Merrill <jason@redhat.com>
3990
3991 * c-common.c (valid_array_size_p): Add complain parameter.
3992 * c-common.h: ...which defaults to true.
3993
1c9ee609
JJ
39942018-05-11 Jakub Jelinek <jakub@redhat.com>
3995
3996 PR c/85696
3997 * c-omp.c (c_omp_predetermined_sharing): Return
3998 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3999
19916065
ML
40002018-05-11 Martin Liska <mliska@suse.cz>
4001
92a285c1 4002 PR sanitizer/85556
19916065
ML
4003 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4004 TREE_LIST values.
4005
79e7b1fe
JJ
40062018-05-10 Jakub Jelinek <jakub@redhat.com>
4007
4008 PR c++/85662
4009 * c-common.h (fold_offsetof_1): Removed.
4010 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4011 CTX argument defaulted to ERROR_MARK.
4012 * c-common.c (fold_offsetof_1): Renamed to ...
4013 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4014 argument, convert the pointer constant to TYPE and use size_binop
4015 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4016 a pointer type. Adjust recursive calls.
4017
86c12f76
EB
40182018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4019
4020 PR c++/85400
4021 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4022
ee336e84
NS
40232018-05-07 Nathan Sidwell <nathan@acm.org>
4024
4025 * c.opt (ffor-scope): Remove functionality, issue warning.
4026
6c072e21
NS
40272018-05-03 Nathan Sidwell <nathan@acm.org>
4028
4029 * c.opt (ffriend-injection): Remove functionality, issue warning.
4030
2cc7d3a7
DM
40312018-05-01 David Malcolm <dmalcolm@redhat.com>
4032
4033 PR c/84258
4034 * c-format.c (struct format_check_results): Add field
4035 "number_non_char".
4036 (check_format_info): Initialize it, and warn if encountered.
4037 (check_format_arg): Distinguish between wide char and
4038 everything else when detecting arrays of non-char.
4039
7761dfbe
DM
40402018-04-30 David Malcolm <dmalcolm@redhat.com>
4041
4042 * c-format.c (get_corrected_substring): Update for
4043 location_get_source_line returning a char_span. Use a char_span
4044 when handling the prefix of the correction.
4045 * c-indentation.c (get_visual_column): Update for
4046 location_get_source_line returning a char_span.
4047 (get_first_nws_vis_column): Likewise.
4048
62e98ef1
DM
40492018-03-29 David Malcolm <dmalcolm@redhat.com>
4050
4051 PR c++/84269
4052 * known-headers.cc (get_stdlib_header_for_name): Add various names
4053 from <assert.h>, <string.h>, and <memory.h>; add more names from
4054 <stdio.h>.
4055
a7dea617
JJ
40562018-03-27 Jakub Jelinek <jakub@redhat.com>
4057
4058 PR c++/85061
4059 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4060 get_base_address of the second operand is a VAR_P, rather than the
4061 operand itself, and use gcc_checking_assert instead of gcc_assert.
4062
889a3a30
MP
40632018-03-23 Marek Polacek <polacek@redhat.com>
4064
4065 PR c++/85045
4066 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4067 <case RDIV_EXPR>: Tweak condition.
4068
452154b9
EB
40692018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4070
4071 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4072
63ecb626
JJ
40732018-03-16 Jakub Jelinek <jakub@redhat.com>
4074
ce811fc4
JJ
4075 PR c/84909
4076 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4077 diagnostics.
4078
63ecb626
JJ
4079 PR c/84910
4080 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4081 diagnostics.
4082
a1295eec
RB
40832018-03-16 Richard Biener <rguenther@suse.de>
4084
4085 PR c/84873
4086 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4087 unshare the possibly folded expression.
4088
919674fb
RB
40892018-03-15 Richard Biener <rguenther@suse.de>
4090
4091 PR c/84873
4092 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4093
f99309b2
MS
40942018-03-13 Martin Sebor <msebor@redhat.com>
4095
4096 PR tree-optimization/84725
4097 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4098 with all three narrow character types, including their qualified forms.
4099
e9b9fa4c
MS
41002018-03-12 Martin Sebor <msebor@redhat.com>
4101
4102 PR tree-optimization/83456
ab20d992 4103 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4104 Restore checking of bounded built-in functions.
4105 (check_function_arguments): Also return the result
4106 of warn_for_restrict.
ab20d992
JJ
4107 * c-common.c (check_function_restrict): Return bool.
4108 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4109
0805d020
MP
41102018-03-02 Marek Polacek <polacek@redhat.com>
4111
4112 PR c++/84171
4113 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4114 is erroneous.
4115
ed2a2f08
TS
41162018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4117
4118 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4119 function".
4120
90abdde0
MP
41212018-03-01 Marek Polacek <polacek@redhat.com>
4122
4123 PR c++/84639
4124 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4125 alignment in computation.
4126
c6db43fa
EB
41272018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4128
4129 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4130 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4131
9e25c7ed
EB
41322018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4133
4134 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4135 (is_char_array): Take a type instead of a declaration.
4136 (dump_ada_array_type): Likewise.
4137 (is_simple_enum): Minor tweak.
4138 (dump_ada_enum_type): New function extracted from...
4139 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4140 <INTEGER_TYPE>: Remove unreachable code.
4141 <RECORD_TYPE>: Likewise. Minor tweaks.
4142 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4143 <ENUMERAL_TYPE>: New case.
4144 <RECORD_TYPE>: Factor out common code.
4145 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4146 Minor tweaks. Deal with enumeral types.
4147 (dump_ada_structure): Minor tweaks.
4148
09de3550
EB
41492018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4150
4151 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4152 address for incomplete structures.
4153 (dump_forward_type): Do not bail out for incomplete structures.
4154 (dump_ada_declaration): Do not special-case incomplete structures
4155 for subtypes. Dump them as null records for types.
4156
095d8d4b
EB
41572018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4158
4159 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4160 (is_char_array): Fix formatting.
4161 (dump_template_types): Likewise.
4162 (dump_generic_ada_node): Rename into...
4163 (dump_ada_node): ...this.
4164 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4165 incomplete structures and not for empty structures. Do not use it
4166 when forward declarations are needed.
4167 (dump_forward_type): New function.
4168 (dump_nested_types): Remove FORWARD parameter. Do not consider
4169 TREE_VISITED and do not generate a forward declaration. Only dump
4170 original nested types for nested declaration.
4171 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4172 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4173 <RECORD_TYPE>: Do not consider TREE_VISITED.
4174 (dump_ada_declaration): Use booleans and fix formatting throughout.
4175 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4176 Call dump_forward_type instead of dump_nested_types for a typedef.
4177 Remove superfluous check and adjust call to dump_nested_types.
4178 <POINTER_TYPE>: Call dump_forward_type and fall through.
4179 (dump_ada_struct_decl): Rename into...
4180 (dump_ada_structure): ...this. Do not special-case empty structures.
4181
d4cfd486
MS
41822018-02-27 Martin Sebor <msebor@redhat.com>
4183
4184 PR c++/83871
4185 * c.opt (-Wmissing-attributes): New option.
4186
b22dbd03
ML
41872018-02-21 Martin Liska <mliska@suse.cz>
4188
4189 * c.opt (Wcatch-value=): Add IntegerRange.
4190
883dfe2a
JM
41912018-02-15 Jason Merrill <jason@redhat.com>
4192
4193 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4194
0444aa9c
NS
41952018-02-09 Nathan Sidwell <nathan@acm.org>
4196
4197 PR c/84293
4198 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4199 arg.
4200 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4201 arg. Adjust.
4202
cea71f0a
MS
42032018-02-09 Martin Sebor <msebor@redhat.com>
4204
4205 PR lto/84212
4206 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4207 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4208 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4209 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4210 (-Wuninitialized): Same.
4211
8c8b7be5
EB
42122018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4213
4214 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4215 keyword for components.
4216
7c30b12a
PC
42172018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4218
4219 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4220
eece7fe5
JK
42212018-02-02 Julia Koval <julia.koval@intel.com>
4222
4223 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4224
7d07a93a
MP
42252018-01-29 Marek Polacek <polacek@redhat.com>
4226
4227 PR c/83966
4228 * c-format.c (check_function_format): Check current_function_decl.
4229
53723269
JJ
42302018-01-27 Jakub Jelinek <jakub@redhat.com>
4231
4232 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4233 argument.
4234 (LAZY_HEX_FP_VALUES_CNT): Define.
4235 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4236 values rather than just 12.
4237 (builtin_define_with_hex_fp_value): Likewise.
4238
7365279f
BK
42392018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4240
92a285c1
ML
4241 PR other/70268
4242 * c.opt (-fmacro-prefix-map): New option.
4243 * c-opts.c (c_common_handle_option): Handle it.
4244 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4245 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4246
bb9869d5
DM
42472018-01-17 David Malcolm <dmalcolm@redhat.com>
4248
4249 PR c++/83814
4250 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4251
68dc87c3
EB
42522018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4253
4254 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4255 Skip 'f' and 'F' characters if it is true.
4256 (store_ada_macro): Minor tweak.
4257 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4258 <CPP_WSTRING>: Likewise.
4259 <CPP_STRING>: Output '&' in the buffer if not the first string.
4260 <CPP_NUMBER>: Adjust calls to dump_number.
4261
9a004410
DM
42622018-01-10 David Malcolm <dmalcolm@redhat.com>
4263
4264 PR c++/43486
4265 * c-common.c: Include "selftest.h".
4266 (get_atomic_generic_size): Perform the test for integral type
4267 before the range test for any integer constant, fixing indentation
4268 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4269 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4270 (selftest::test_fold_for_warn): New function.
4271 (selftest::c_common_c_tests): New function.
4272 (selftest::c_family_tests): Call it, and
4273 selftest::c_pretty_print_c_tests.
4274 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4275 * c-format.c (check_format_arg): Convert VAR_P check to a
4276 fold_for_warn.
4277 * c-pretty-print.c: Include "selftest.h".
4278 (pp_c_cast_expression): Don't print casts for location wrappers.
4279 (selftest::assert_c_pretty_printer_output): New function.
4280 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4281 (selftest::test_location_wrappers): New function.
4282 (selftest::c_pretty_print_c_tests): New function.
4283 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4284
5c0caeb3
RS
42852018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4286 Alan Hayward <alan.hayward@arm.com>
4287 David Sherwood <david.sherwood@arm.com>
4288
4289 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4290
73a699ae
RS
42912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4292 Alan Hayward <alan.hayward@arm.com>
4293 David Sherwood <david.sherwood@arm.com>
4294
4295 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4296 as polynomial.
4297
928686b1
RS
42982018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4299 Alan Hayward <alan.hayward@arm.com>
4300 David Sherwood <david.sherwood@arm.com>
4301
4302 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4303 (convert_vector_to_array_for_subscript): Handle polynomial
4304 TYPE_VECTOR_SUBPARTS.
4305 (c_common_type_for_mode): Check valid_vector_subparts_p.
4306 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4307 VECTOR_CST_NELTS.
4308
85ec4feb
JJ
43092018-01-03 Jakub Jelinek <jakub@redhat.com>
4310
4311 Update copyright years.
4312
170a8bd6 43132017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4314 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4315
4316 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4317 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4318
ab20d992 43192017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4320
4321 PR debug/83527
4322 PR debug/83419
4323 * c-semantics.c (only_debug_stmts_after_p): New.
4324 (pop_stmt_list): Clear side effects in debug-only stmt list.
4325 Check for single nondebug stmt followed by debug stmts only.
4326
c12d20d4
AO
43272017-12-21 Alexandre Oliva <aoliva@redhat.com>
4328
4329 PR debug/83419
4330 * c-semantics.c (pop_stmt_list): Propagate side effects from
4331 single nondebug stmt to container list.
4332
01512446
JJ
43332017-12-19 Jakub Jelinek <jakub@redhat.com>
4334
4335 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4336 conditions with typical order conditions.
4337
82cfbd01
MP
43382017-12-18 Marek Polacek <polacek@redhat.com>
4339
4340 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4341 not in effect.
4342
99da11ec
MS
43432017-12-17 Martin Sebor <msebor@redhat.com>
4344
4345 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4346 an error for attribute warn_if_not_aligned.
4347
cc8bea0a
MS
43482017-12-16 Martin Sebor <msebor@redhat.com>
4349
4350 PR tree-optimization/78918
4351 * c-common.c (check_function_restrict): Avoid checking built-ins.
4352 * c.opt (-Wrestrict): Include in -Wall.
4353
4849deb1
JJ
43542017-12-15 Jakub Jelinek <jakub@redhat.com>
4355
4356 * c-attribs.c (c_common_attribute_table,
4357 c_common_format_attribute_table): Swap affects_type_identity
4358 and handler fields, adjust comments.
4359
c65e18d3
BE
43602017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4361
4362 * c.opt (Wcast-function-type): New warning option.
4363 * c-lex.c (get_fileinfo): Avoid warning.
4364 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4365
2004617a
QZ
43662017-12-14 Qing Zhao <qing.zhao@oracle.com>
4367
7365279f 4368 PR middle_end/79538
2004617a
QZ
4369 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4370 Adjust the size of buf1 and buf2, add a new buf to avoid
4371 format-overflow warning.
4372
ab20d992 43732017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4374
4375 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4376 subsequent statement list.
4377
5d9ae53d
MS
43782017-12-07 Martin Sebor <msebor@redhat.com>
4379
4380 PR c/81544
4381 PR c/81566
4382 * c-attribs.c (attr_aligned_exclusions): New array.
4383 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4384 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4385 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4386 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4387 (attr_warn_unused_result_exclusions): Same.
4388 (handle_hot_attribute, handle_cold_attribute): Simplify.
4389 (handle_const_attribute): Warn on function returning void.
4390 (handle_pure_attribute): Same.
4391 (handle_aligned_attribute): Diagnose conflicting attribute
4392 specifications.
4393 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4394
c79144f8
DM
43952017-12-06 David Malcolm <dmalcolm@redhat.com>
4396
4397 PR c/83236
4398 * c-common.c (selftest::c_family_tests): Call
4399 selftest::c_spellcheck_cc_tests.
4400 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4401 * c-spellcheck.cc: Include "selftest.h".
4402 (name_reserved_for_implementation_p): New function.
4403 (should_suggest_as_macro_p): New function.
4404 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4405 should_suggest_as_macro_p and call it.
4406 (selftest::test_name_reserved_for_implementation_p): New function.
4407 (selftest::c_spellcheck_cc_tests): New function.
4408 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4409
613bc14f
DM
44102017-12-06 David Malcolm <dmalcolm@redhat.com>
4411
4412 * c-spellcheck.cc: New file, taken from macro-handling code in
4413 spellcheck-tree.c.
4414 * c-spellcheck.h: New file, taken from macro-handling code in
4415 spellcheck-tree.h.
4416
e76c7157
JJ
44172017-12-01 Jakub Jelinek <jakub@redhat.com>
4418
4419 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4420 attribute.
4421 (handle_simd_attribute): Don't check for "cilk simd function"
4422 attribute. Reindent, formatting changes.
4423
b0da4034
JK
44242017-11-30 Julia Koval <julia.koval@intel.com>
4425
4426 * c-common.h (inv_list): Remove.
4427
058f0b9e
JJ
44282017-11-28 Jakub Jelinek <jakub@redhat.com>
4429
4430 PR sanitizer/81275
4431 * c-common.c (c_switch_covers_all_cases_p_1,
4432 c_switch_covers_all_cases_p): New functions.
4433 * c-common.h (c_switch_covers_all_cases_p): Declare.
4434
5e9d6aa4 44352017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4436 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4437
4438 * array-notation-common.c: Delete.
4439 * c-cilkplus.c: Ditto.
4440 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4441 * c-common.def (ARRAY_NOTATION_REF): Remove.
4442 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4443 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4444 c_validate_cilk_plus_loop, cilkplus_an_parts,
4445 cilk_ignorable_spawn_rhs_op,
4446 cilk_recognize_spawn): Remove.
4447 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4448 * c-omp.c: Remove CILK_SIMD check.
4449 * c-pragma.c: Ditto.
4450 * c-pragma.h: Remove CILK related pragmas.
4451 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4452 ARRAY_NOTATION_REF condition.
4453 (c_pretty_printer::expression): Ditto.
4454 * c.opt (fcilkplus): Remove.
4455 * cilk.c: Delete.
4456
1af4ebf5
MG
44572017-11-21 Marc Glisse <marc.glisse@inria.fr>
4458
4459 * c-pretty-print.c (pp_c_additive_expression,
4460 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4461
d44ed508
JJ
44622017-11-21 Jakub Jelinek <jakub@redhat.com>
4463
7d2f0f9b
JJ
4464 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4465
d44ed508
JJ
4466 PR c++/83059
4467 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4468 instead of tree_to_uhwi, formatting fix.
4469
26edace6
DM
44702017-11-20 David Malcolm <dmalcolm@redhat.com>
4471
4472 PR c/81404
4473 * known-headers.cc: New file, based on material from c/c-decl.c.
4474 (suggest_missing_header): Copied as-is.
4475 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4476 heavily edited to add C++ support. Add some knowledge about
4477 <limits.h>, <stdint.h>, and <wchar.h>.
4478 * known-headers.h: Likewise.
4479
6c7a259b
DM
44802017-11-20 David Malcolm <dmalcolm@redhat.com>
4481
4482 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4483 (lookup_name_fuzzy): Likewise. Convert return type from
4484 const char * to name_hint. Add location_t param.
4485 * name-hint.h: New header.
4486
f9c59f7e
JJ
44872017-11-19 Jakub Jelinek <jakub@redhat.com>
4488
4489 PR c/66618
4490 PR c/69960
4491 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4492
1e39313a
JM
44932017-11-16 Joseph Myers <joseph@codesourcery.com>
4494
4495 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4496 expected publication date of C17.
4497 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4498
3ca0dc60
JM
44992017-11-15 Joseph Myers <joseph@codesourcery.com>
4500
4501 PR c/81156
4502 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4503 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4504
025d57f0
MS
45052017-11-10 Martin Sebor <msebor@redhat.com>
4506
4507 PR c/81117
4508 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4509 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4510 * c.opt (-Wstringop-truncation): New option.
4511
1b6fa695
ML
45122017-11-06 Martin Liska <mliska@suse.cz>
4513
4514 PR middle-end/82404
4515 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4516 FE.
4517 * c.opt: Set default value of warn_return_type.
4518
64a5912c
DM
45192017-10-31 David Malcolm <dmalcolm@redhat.com>
4520
4521 * c-common.c (binary_op_error): Update for renaming of
4522 error_at_rich_loc.
4523 (c_parse_error): Likewise.
4524 * c-warn.c (warn_logical_not_parentheses): Likewise for
4525 renaming of inform_at_rich_loc.
4526 (warn_for_restrict): Likewise for renaming of
4527 warning_at_rich_loc_n.
4528
c76dc9c3
JM
45292017-10-30 Joseph Myers <joseph@codesourcery.com>
4530
4531 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4532 * c-opts.c (set_std_c17): New function.
4533 (c_common_init_options): Use gnu17 as default C version.
4534 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4535
ee5fd23a
MM
45362017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4537
4538 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4539 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4540 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4541 __FP_FAST_FMA<N>X.
4542
d1047465
MP
45432017-10-23 Marek Polacek <polacek@redhat.com>
4544
4545 PR c/82681
4546 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4547
9e878cf1
EB
45482017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4549
4550 * c-common.c (check_builtin_function_arguments): Also check arguments
4551 of __builtin_alloca_with_align_and_max.
4552
89b6abbb
DM
45532017-10-17 David Malcolm <dmalcolm@redhat.com>
4554
4555 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4556 rather than NULL to format_warning_va.
4557 (check_format_types): Likewise when calling format_type_warning.
4558 Remove code to extract source_ranges and source_range * in favor
4559 of just a location_t.
4560 (format_type_warning): Convert source_range * param to a
4561 location_t.
4562
39382c09
JJ
45632017-10-13 Jakub Jelinek <jakub@redhat.com>
4564
4565 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4566 [LR]SHIFT_EXPR.
4567
62e1c678
DM
45682017-10-12 David Malcolm <dmalcolm@redhat.com>
4569
4570 * c-common.c (enum missing_token_insertion_kind): New enum.
4571 (get_missing_token_insertion_kind): New function.
4572 (maybe_suggest_missing_token_insertion): New function.
4573 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4574
b90c9338
NS
45752017-10-11 Nathan Sidwell <nathan@acm.org>
4576
4577 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4578 (c_common_handle_option): Update incpath_kind names.
4579
3a266bcd
ML
45802017-10-11 Martin Liska <mliska@suse.cz>
4581
4582 PR sanitizer/82490
4583 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4584 Wattributes warning.
4585
8e6cdc90
RS
45862017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4587
4588 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4589 operating on trees as wide_ints.
4590 * c-common.c (pointer_int_sum): Likewise.
4591 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4592 * c-warn.c (match_case_to_enum_1): Likewise.
4593 (c_do_switch_warnings): Likewise.
4594 (maybe_warn_shift_overflow): Likewise.
4595
802b38c9
JJ
45962017-10-10 Jakub Jelinek <jakub@redhat.com>
4597
4598 PR c/82437
4599 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4600 instead of wide_int::from.
4601
4e34b338
JJ
46022017-10-06 Jakub Jelinek <jakub@redhat.com>
4603
4604 PR c/82437
4605 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4606 using to_widest use wide_int with the larger of the two precisions.
4607
4bc4b2b4
BE
46082017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4609
4610 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4611 functions.
4612
a1488398
RS
46132017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4614
4615 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4616 when combining the original unconverted comparison operands.
4617
01c9fb68
JJ
46182017-09-29 Jakub Jelinek <jakub@redhat.com>
4619
4620 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4621 attribute.
4622
6e3e8419
EB
46232017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4624
4625 * c-ada-spec.c (to_ada_name): Add index parameter.
4626 (pp_ada_tree_identifier): Likewise.
4627 (dump_ada_macros): Adjust call to to_ada_name.
4628 (struct overloaded_name_hash): New type.
4629 (struct overloaded_name_hasher): Likewise.
4630 (overloaded_names): New hash table.
4631 (compute_overloading_index): New function.
4632 (dump_ada_decl_name): Call it and pass the result to
4633 pp_ada_tree_identifier.
4634 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4635 (dump_ada_function_declaration): Likewise.
4636 (dump_generic_ada_node): Likewise.
4637 (print_constructor): Likewise.
4638 (print_destructor): Likewise.
4639 (dump_ada_specs): Delete overloaded_names table.
4640
79310774
EB
46412017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4642
4643 * c-ada-spec.c (max_ada_macros): Move around.
4644 (store_ada_macro_index): Likewise.
4645 (source_file): Rename into...
4646 (macro_source_file): ...this.
4647 (count_ada_macro): Move around.
4648 (store_ada_macro): Likewise.
4649 (compare_macro): Likewise.
4650 (print_ada_macros): Merge in...
4651 (dump_ada_macros): ...this.
4652 (source_file_base): Rename into...
4653 (current_source_file): ...this.
4654 (print_comment): Move around.
4655 (dump_ada_nodes): Call dump_ada_declaration directly.
4656 (struct with): Change type of limited field to bool.
4657 (append_withs): Change type of limited_access parameter to bool.
4658 (pp_ada_tree_identifie): Likewise.
4659 (dump_ada_decl_nam): Likewise.
4660 (dump_generic_ada_node): Likewise. Do not print the return type.
4661 (to_ada_name): Change type of space_found parameter to bool.
4662 (dump_ada_function_declaration): Return void and change type of
4663 parameters to bool. Also print the return type for a function.
4664 (print_ada_methods): Rename into...
4665 (dump_ada_methods): ...this.
4666 (print_ada_declaration): Rename into ...
4667 (dump_ada_declaration): ...this. Do not print the return type.
4668 (print_ada_struct_decl): Rename into...
4669 (dump_ada_struct_decl): ...this.
4670
7d386d45
JJ
46712017-09-29 Jakub Jelinek <jakub@redhat.com>
4672
4673 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4674 rather than DECL_INITIAL.
4675 (common_handle_aligned_attribute): Likewise.
4676
ab20d992 46772017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4678
4679 * c.opt (gen-decls): Add RejectNegative.
4680
026a79f7
AS
46812017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4682 Jakub Jelinek <jakub@redhat.com>
4683
4684 Add support for -std=c++2a.
4685 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4686 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4687 * c-opts.c (set_std_cxx2a): New.
4688 (c_common_handle_option): Set options when -std=c++2a is enabled.
4689 (c_common_post_options): Adjust comments.
4690 (set_std_cxx14, set_std_cxx17): Likewise.
4691
4a8ca690
EB
46922017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4693
4694 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4695 message for non-uniform endianness and issue a warning in C++.
4696
7b936140
JJ
46972017-09-15 Jakub Jelinek <jakub@redhat.com>
4698
4699 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4700 (Wc++17-compat): Change from undocumented alias to option.
4701 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4702 change C++1z to C++17 in description.
4703 (std=c++1z, std=gnu++1z): Change from option to undocumented
4704 deprecated alias.
4705 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4706 Adjust description.
4707 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4708 * c-opts.c (set_std_cxx1z): Rename to ...
4709 (set_std_cxx17): ... this.
4710 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4711 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4712 caller.
7b936140
JJ
4713 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4714 comments.
4715
12263f13
L
47162017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4717
4718 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4719 function alignment if warn_if_not_aligned_p is true.
4720
6836632e
NS
47212017-09-12 Nathan Sidwell <nathan@acm.org>
4722
4723 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4724 resort_sorted_fields): Move to c/c-decl.c.
4725 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4726 (struct sorted_fields_type): Move to c/c-lang.h.
4727
019bf9ad
JW
47282017-09-09 Jonathan Wakely <jwakely@redhat.com>
4729
4730 PR c++/81852
4731 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4732
bc7fe952
MP
47332017-09-04 Marek Polacek <polacek@redhat.com>
4734
4735 PR c/81783
4736 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4737 (warn_tautological_cmp): Call it.
4738
ab20d992 47392017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4740
4741 * c-opts.c (c_common_finish): Write dependency information even if
4742 there are errors.
4743
d2e05fcb
JJ
47442017-09-01 Jakub Jelinek <jakub@redhat.com>
4745
4746 PR c/81887
4747 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4748 (omp_pragmas_simd): ... here.
4749 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4750 create new clauses list containing just simd clause.
4751
18e2a8b8
RS
47522017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4753 Alan Hayward <alan.hayward@arm.com>
4754 David Sherwood <david.sherwood@arm.com>
4755
4756 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4757 into scalar_mode_supported_p call.
4758 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4759
16d22000
RS
47602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4761 Alan Hayward <alan.hayward@arm.com>
4762 David Sherwood <david.sherwood@arm.com>
4763
4764 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4765 for the mode iterator.
4766
b397965c
RS
47672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4768 Alan Hayward <alan.hayward@arm.com>
4769 David Sherwood <david.sherwood@arm.com>
4770
4771 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4772 * c-common.c (c_build_vec_perm_expr): Likewise.
4773
357b7604
RS
47742017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4775 Alan Hayward <alan.hayward@arm.com>
4776 David Sherwood <david.sherwood@arm.com>
4777
4778 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4779
e05c94ba
RS
47802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4781 Alan Hayward <alan.hayward@arm.com>
4782 David Sherwood <david.sherwood@arm.com>
4783
4784 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4785 before calling targetm.addr_space.valid_pointer_mode.
4786
5c20c4af
RS
47872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4788 Alan Hayward <alan.hayward@arm.com>
4789 David Sherwood <david.sherwood@arm.com>
4790
4791 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4792
c94843d2 47932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4794 Alan Hayward <alan.hayward@arm.com>
4795 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4796
4797 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4798 iterators.
4799 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4800
4e10a5a7
RS
48012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4802 Alan Hayward <alan.hayward@arm.com>
4803 David Sherwood <david.sherwood@arm.com>
4804
4805 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4806 case statements.
4807
130fcab0
ML
48082017-08-29 Martin Liska <mliska@suse.cz>
4809
4810 PR other/39851
4811 * c-common.c (parse_optimize_options): Add argument to function
4812 call.
4813 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4814
14e18d71
DM
48152017-08-24 David Malcolm <dmalcolm@redhat.com>
4816
4817 * c-lex.c (interpret_float): Use token location
4818 when building an EXCESS_PRECISION_EXPR.
4819
2f687306
DM
48202017-08-21 David Malcolm <dmalcolm@redhat.com>
4821
4822 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4823 it to check_function_format.
4824 * c-common.h (check_function_arguments): Add vec<location_t> *
4825 param.
4826 (check_function_format): Likewise.
4827 * c-format.c (struct format_check_context): Add field "arglocs".
4828 (check_function_format): Add param "arglocs"; pass it to
4829 check_format_info.
ab20d992 4830 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4831 new field of format_ctx.
4832 (check_format_arg): Pass format_ctx->arglocs to new param of
4833 check_format_info_main.
4834 (class argument_parser): New field "arglocs".
4835 (argument_parser::argument_parser): Add "arglocs_" param and use
4836 it to initialize new field.
4837 (argument_parser::check_argument_type): Pass new arglocs field to
4838 check_format_types.
4839 (check_format_info_main): Add param "arglocs", and use it when
4840 constructing arg_parser.
4841 (check_format_types): Add param "arglocs"; use it if non-NULL when
4842 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4843
00aa1fa2
L
48442017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4845
4846 PR c/53037
4847 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4848 (c_common_attribute_table): Add warn_if_not_aligned.
4849 (handle_aligned_attribute): Renamed to ...
4850 (common_handle_aligned_attribute): Remove argument, name, and add
4851 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4852 (handle_aligned_attribute): New.
4853 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4854
27be025d
MS
48552017-08-14 Martin Sebor <msebor@redhat.com>
4856
4857 PR c/81117
4858 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4859 (handle_nonstring_attribute): New function.
4860
da67acb9
MS
48612017-08-14 Martin Sebor <msebor@redhat.com>
4862
4863 PR c/81117
4864 * c-format.h (T89_G): New macro.
4865 * c-format.c (local_gcall_ptr_node): New variable.
4866 (init_dynamic_diag_info): Initialize it.
4867
a8b522b4
ML
48682017-08-11 Martin Liska <mliska@suse.cz>
4869
4870 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4871 TARGET_SUPPORTS_ALIASES.
4872
32129a17
DM
48732017-08-10 David Malcolm <dmalcolm@redhat.com>
4874
4875 * c-common.c (c_parse_error): Add rich_location * param, using it
4876 rather implicitly using input_location.
4877 * c-common.h (c_parse_error): Add rich_location * param.
4878
30af3a2b
MP
48792017-08-09 Marek Polacek <polacek@redhat.com>
4880
4881 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4882 (c_common_truthvalue_conversion): Likewise.
4883 * c-omp.c (c_finish_omp_atomic): Likewise.
4884 * c-common.h (build_binary_op): Update declaration.
4885
314e6352
ML
48862017-08-08 Martin Liska <mliska@suse.cz>
4887
4888 * c-ada-spec.c: Include header files.
4889 * c-ubsan.c: Likewise.
4890 * c-warn.c: Likewise.
4891
56b5041c
JJ
48922017-08-07 Jakub Jelinek <jakub@redhat.com>
4893
4894 PR c/69389
4895 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4896
db440138
EB
48972017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4898
4899 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4900 (print_ada_methods): Likewise.
4901 (print_ada_declaration): Likewise.
4902
577eec56
ML
49032017-08-07 Martin Liska <mliska@suse.cz>
4904
4905 * array-notation-common.c: Add new includes.
4906 * c-format.c( handle_format_attribute): Canonicalize a format
4907 function name.
4908 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4909 attribute.
4910 * c-pretty-print.c: Add new include.
4911
b854df3c
EB
49122017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4913
4914 * c-ada-spec.c (has_static_fields): Look only into variables.
4915 (print_constructor): Add TYPE parameter and use it for the name.
4916 (print_destructor): Likewise.
4917 (print_ada_declaration): Adjust to new constructor/destructor names.
4918 Adjust calls to print_constructor and print_destructor.
4919 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4920 Look only into variables in the final loop.
4921
9f2cb25e
EB
49222017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4923
4924 * c-ada-spec.c (has_static_fields): Look only into fields.
4925 (dump_generic_ada_node): Small tweak.
4926 (dump_nested_types): Look only into fields.
4927 (print_ada_declaration): Look only into methods. Small tweak.
4928 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4929
f4bcd9eb
EB
49302017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4931
4932 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4933 (dump_ada_function_declaration): Likewise.
4934 (dump_generic_ada_node): Likewise.
4935 (print_ada_declaration): Add support for const-qualified variables.
4936
f34ebeb2
ML
49372017-07-31 Martin Liska <mliska@suse.cz>
4938
4939 PR sanitize/81530
4940 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4941 Guard condition with flag_sanitize_p also with current_function_decl
4942 non-null equality.
4943 (ubsan_maybe_instrument_reference_or_call): Likewise.
4944
218e5d04
UB
49452017-07-30 Uros Bizjak <ubizjak@gmail.com>
4946
4947 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4948
942047f2
EB
49492017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4950
4951 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4952 for enumeral types.
4953 (print_ada_declaration): Add missing guard for record types.
4954
a40ff0ae
JJ
49552017-07-27 Jakub Jelinek <jakub@redhat.com>
4956
4957 PR c/45784
4958 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4959 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4960 new COMPOUND_EXPRs around the rhs of the comparison.
4961
06bd22f6
MP
49622017-07-27 Marek Polacek <polacek@redhat.com>
4963
4964 PR c/81417
4965 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4966 the types.
4967
036ea399
JJ
49682017-07-27 Jakub Jelinek <jakub@redhat.com>
4969
4970 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4971 (handle_noipa_attribute): New function.
4972
417ca011
TD
49732017-07-07 Torsten Duwe <duwe@suse.de>
4974
4975 * c-attribs.c (c_common_attribute_table): Add entry for
4976 "patchable_function_entry".
4977
5aaa8fb4
NS
49782017-07-20 Nathan Sidwell <nathan@acm.org>
4979
4980 Remove TYPE_METHODS.
4981 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4982 dump_ada_template, print_ada_methods,
4983 print_ada_declaration): Member fns are on TYPE_FIELDS.
4984
ff22eb12
NS
49852017-07-18 Nathan Sidwell <nathan@acm.org>
4986
4987 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4988
eea77d1f
DM
49892017-07-14 David Malcolm <dmalcolm@redhat.com>
4990
4991 * c-common.c (try_to_locate_new_include_insertion_point): New
4992 function.
4993 (per_file_includes_t): New typedef.
4994 (added_includes_t): New typedef.
4995 (added_includes): New variable.
4996 (maybe_add_include_fixit): New function.
4997 * c-common.h (maybe_add_include_fixit): New decl.
4998
281ac396
MS
49992017-07-10 Martin Sebor <msebor@redhat.com>
5000
5001 PR other/81345
5002 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5003
b6f43128
DM
50042017-07-06 David Malcolm <dmalcolm@redhat.com>
5005
5006 * c-common.c (selftest::c_family_tests): New.
5007 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5008 (selftest::c_family_tests): New decl.
5009
efbf55b0
MP
50102017-07-04 Marek Polacek <polacek@redhat.com>
5011
5012 PR c/81231
5013 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5014 types.
5015
6c86bd88
MP
50162017-07-04 Marek Polacek <polacek@redhat.com>
5017
5018 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5019
17a7218b
ML
50202017-06-28 Martin Liska <mliska@suse.cz>
5021
5022 PR ipa/81128
5023 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5024 to a function declaration.
5025
63010089
ML
50262017-06-28 Martin Liska <mliska@suse.cz>
5027
5028 PR driver/79659
5029 * c.opt: Add IntegerRange to various options.
5030
3e2becc4
MP
50312017-06-26 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/80116
5034 * c-common.h (warn_for_multistatement_macros): Declare.
5035 * c-warn.c: Include "c-family/c-indentation.h".
5036 (warn_for_multistatement_macros): New function.
5037 * c.opt (Wmultistatement-macros): New option.
5038 * c-indentation.c (guard_tinfo_to_string): No longer static.
5039 Change the parameter type to "enum rid". Handle RID_SWITCH.
5040 * c-indentation.h (guard_tinfo_to_string): Declare.
5041
2db9b7cd
MG
50422017-06-23 Marc Glisse <marc.glisse@inria.fr>
5043
5044 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5045
c3684b7b
MS
50462017-06-15 Martin Sebor <msebor@redhat.com>
5047
5048 PR c++/80560
5049 * c.opt (-Wclass-memaccess): New option.
5050
e72c4afd
BK
50512017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5052
5053 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5054
8a516588
MP
50552017-06-13 Marek Polacek <polacek@redhat.com>
5056
5057 PR objc/80949
5058 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5059 branches is null.
5060
45b2222a
ML
50612017-06-13 Martin Liska <mliska@suse.cz>
5062
5063 PR sanitize/78204
5064 * c-attribs.c (add_no_sanitize_value): New function.
5065 (handle_no_sanitize_attribute): Likewise.
5066 (handle_no_sanitize_address_attribute): Use the function.
5067 (handle_no_sanitize_thread_attribute): New function.
5068 (handle_no_address_safety_analysis_attribute): Use
5069 add_no_sanitize_value.
5070 (handle_no_sanitize_undefined_attribute): Likewise.
5071 * c-common.h: Declare new functions.
5072 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5073 (ubsan_instrument_shift): Likewise.
5074 (ubsan_instrument_bounds): Likewise.
5075 (ubsan_maybe_instrument_array_ref): Likewise.
5076 (ubsan_maybe_instrument_reference_or_call): Likewise.
5077
a01f151f
JM
50782017-06-11 Jason Merrill <jason@redhat.com>
5079
5080 * c-ada-spec.c, c-pragma.c: Use id_equal.
5081
3de4ac6d
MP
50822017-06-04 Marek Polacek <polacek@redhat.com>
5083
5084 PR c/80919
5085 * c-format.c (matching_type_p): Return false if any of the types
5086 requires structural equality.
5087
2474f48f
MS
50882017-06-02 Martin Sebor <msebor@redhat.com>
5089
5090 PR c/80892
5091 * c-warn.c (conversion_warning): Use -Wconversion for integer
5092 conversion and -Wfloat-conversion for floating one.
5093
40ffd95f
BE
50942017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5095
5096 * c.opt (Wsizeof-pointer-div): New warning option.
5097
3fa4634c
VR
50982017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5099
5100 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5101 (Wcatch-value=1): Enable by -Wall.
5102
f012c8ef
DM
51032017-05-30 David Malcolm <dmalcolm@redhat.com>
5104
5105 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5106 format_chars.
5107 * c.opt (fdiagnostics-show-template-tree): New option.
5108 (felide-type): New option.
5109
63dbcd13
VR
51102017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5111
5112 * c.opt (Wcatch-value=): New C++ warning flag.
5113
be136b5c
NS
51142017-05-24 Nathan Sidwell <nathan@acm.org>
5115
5116 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5117 const casts to avoid warning.
5118
3cd211af
MS
51192017-05-24 Martin Sebor <msebor@redhat.com>
5120
5121 PR c/80731
5122 * c-common.h (unsafe_conversion_p): Add a function argument.
5123 * c-common.c (unsafe_conversion_p): Same.
5124 Add type names and values to diagnostics.
5125 (scalar_to_vector): Adjust.
5126 * c-warn.c (constant_expression_error): Add a function argument.
5127 Add type names and values to diagnostics.
5128 (conversion_warning): Add a function argument.
5129 Add type names and values to diagnostics.
5130 (warnings_for_convert_and_check): Same.
5131
1ff7be5a
JM
51322017-05-19 Jason Merrill <jason@redhat.com>
5133
5134 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5135 enumerators.
5136
ff502317
BE
51372017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5138
5139 * c-format.c (locus): Move out of function scope,
5140 add GTY attribute.
5141
2a8a8d7b
NS
51422017-05-19 Nathan Sidwell <nathan@acm.org>
5143
5144 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5145 (c_common_parse_file): Remove class dump handling.
5146 (get_dump_info): Likewise.
5147
39aac208
RB
51482017-05-19 Richard Biener <rguenther@suse.de>
5149
5150 PR c++/80593
5151 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5152 to alias-set zero memory.
5153
6ecd2339
BE
51542017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5155
5156 * c-format.c (local_tree_type_node): Add GTY attribute.
5157
6574d78e
MP
51582017-05-18 Marek Polacek <polacek@redhat.com>
5159
5160 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5161 (c_common_fixed_point_type_for_size): Likewise.
5162 (c_common_type_for_mode): Likewise.
5163 (shorten_compare): Likewise.
5164 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5165 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5166
e3455240
MP
51672017-05-18 Marek Polacek <polacek@redhat.com>
5168
5169 * c-common.c (self_promoting_args_p): Change the return type to bool.
5170 Use false/true instead of 0/1.
5171 * c-common.h (self_promoting_args_p): Update.
5172
3fa8871b
MP
51732017-05-17 Marek Polacek <polacek@redhat.com>
5174
5175 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5176 * c-warn.c: Likewise.
5177
b42cc3ca
VV
51782017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5179
5180 Implement new C++ intrinsics __is_assignable and __is_constructible.
5181 * c-common.c (__is_assignable, __is_constructible): New.
5182 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5183
1a817418
ML
51842017-05-17 Martin Liska <mliska@suse.cz>
5185
5186 * c-common.h: Introduce dump_flags_t type and
5187 use it instead of int type.
5188 * c-gimplify.c (c_genericize): Likewise.
5189 * c-opts.c: Likewise.
5190
b2fa0a8b
MP
51912017-05-17 Marek Polacek <polacek@redhat.com>
5192
5193 * c-common.c (c_save_expr): Remove.
5194 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5195 * c-common.h (c_save_expr): Remove declaration.
5196
31c2d57d
VR
51972017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5198
5199 PR c/35441
5200 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5201 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5202 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5203 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5204 RDIV_EXPR.
5205 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5206
684f84de
MP
52072017-05-09 Marek Polacek <polacek@redhat.com>
5208
5209 PR c/80525
5210 * c-warn.c (unwrap_c_maybe_const): New.
5211 (warn_logical_operator): Call it.
5212
641da50a
NS
52132017-05-09 Nathan Sidwell <nathan@acm.org>
5214
5215 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5216 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5217
631238ac
MS
52182017-05-08 Martin Sebor <msebor@redhat.com>
5219
5220 PR translation/80280
5221 * c-format.h (struct format_flag_spec): Add new member.
5222 (T89_T): New macro.
5223 * c-format.c (local_tree_type_node): New global.
5224 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5225 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5226 (strfmon_flag_specs): Likewise.
5227 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5228 with distinct quoting properties.
5229 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5230 (flag_chars_t::validate): Add argument and handle bad quoting.
5231 (check_format_info_main): Handle quoting problems.
5232 (init_dynamic_diag_info): Simplify.
5233
49f0c04c
JM
52342017-05-08 Jason Merrill <jason@redhat.com>
5235
5236 * c-opts.c (c_common_post_options): Update defaults for
5237 flag_abi_version and flag_abi_compat_version.
5238
56d35585
DM
52392017-05-05 David Malcolm <dmalcolm@redhat.com>
5240
5241 * c-common.c (c_cpp_error): Replace report_diagnostic
5242 with diagnostic_report_diagnostic.
5243
0f2c4a8f
MS
52442017-05-04 Martin Sebor <msebor@redhat.com>
5245
5246 PR translation/80280
5247 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5248 (handle_weakref_attribute): Same.
5249
6fe63fb4
NS
52502017-05-03 Nathan Sidwell <nathan@acm.org>
5251
5252 Canonicalize canonical type hashing
5253 * c-common.c (complete_array_type): Use type_hash_canon.
5254
815d9cc6
XR
52552017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5256
92a285c1 5257 PR c++/80038
815d9cc6
XR
5258 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5259 prototype.
5260 (cilk_install_body_pedigree_operations): Likewise.
5261 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5262 detatched.
5263 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5264 (cilk_install_body_pedigree_operations): Likewise.
5265 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5266 unwrapping.
5267
f8a36447
JJ
52682017-04-27 Jakub Jelinek <jakub@redhat.com>
5269
5270 PR c++/80534
5271 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5272 flag on non-aggregate element types.
5273
7c145456
BE
52742017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5275
5276 * c-common.c (c_type_hasher, type_hash_table): Remove.
5277 (c_common_get_alias_set): Remove unreachable code.
5278 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5279
c3cbcd45
VR
52802017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5281
5282 * c.opt (Wextra-semi): New C++ warning flag.
5283
8a59d466
JJ
52842017-04-20 Jakub Jelinek <jakub@redhat.com>
5285
5286 PR middle-end/80423
5287 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5288
8487c9a5
JJ
52892017-04-18 Jakub Jelinek <jakub@redhat.com>
5290
5291 PR middle-end/79788
5292 PR middle-end/80375
5293 * c-common.c (c_common_type_for_mode): Don't handle
5294 widest_*_literal_type_node here.
5295 c_common_signed_or_unsigned_type): Likewise.
5296 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5297 to *intTI_type_node or *intDI_type_node depending on whether
5298 TImode is supported by the target or not.
5299
3ee0fb02
ML
53002017-04-10 Martin Liska <mliska@suse.cz>
5301
5302 PR sanitizer/80350
5303 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5304 doing an UBSAN check.
5305
5764ee3c
JW
53062017-04-03 Jonathan Wakely <jwakely@redhat.com>
5307
5308 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5309
6f3af356
JJ
53102017-03-31 Jakub Jelinek <jakub@redhat.com>
5311
5312 PR c++/79572
5313 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5314 tree *.
5315 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5316 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5317 REFERENCE_TYPE.
5318
f6a7a9d5
DM
53192017-03-31 David Malcolm <dmalcolm@redhat.com>
5320
5321 PR documentation/78732
5322 * c.opt (Wendif-labels): Fix description to refer to
5323 #else rather than #elif.
5324
af88f557
JJ
53252017-03-31 Jakub Jelinek <jakub@redhat.com>
5326
5327 PR libstdc++/80251
5328 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5329 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5330
a9e4a1a5
JJ
53312017-03-27 Jakub Jelinek <jakub@redhat.com>
5332
5333 PR middle-end/80162
5334 * c-common.c (c_common_mark_addressable_vec): Don't set
5335 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5336
3f01b620
MS
53372017-03-21 Martin Sebor <msebor@redhat.com>
5338
5339 PR c++/79548
5340 * c-common.c (set_underlying_type): Mark type used only when
5341 original del is declared unused.
5342
2f6f187a
DM
53432017-03-10 David Malcolm <dmalcolm@redhat.com>
5344
5345 PR translation/79848
5346 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5347 "%qs".
5348
a02fa805
DM
53492017-03-10 David Malcolm <dmalcolm@redhat.com>
5350
5351 PR c/79921
5352 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5353 from inform's message, so that xgettext can locate it.
5354
822a132c
MP
53552017-03-09 Marek Polacek <polacek@redhat.com>
5356
5357 PR c++/79962
5358 PR c++/79984
5359 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5360 conversion to the attribute list.
5361
bba81f1c
ML
53622017-03-09 Martin Liska <mliska@suse.cz>
5363
5364 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5365
108154ff
JM
53662017-03-03 Jason Merrill <jason@redhat.com>
5367
5368 * c.opt (Wnoexcept-type): New.
5369
eb0e7c34
RB
53702017-03-02 Richard Biener <rguenther@suse.de>
5371
5372 PR c/79756
5373 * c-common.c (c_common_mark_addressable_vec): Look through
5374 C_MAYBE_CONST_EXPR.
5375
9453ba0a
ML
53762017-02-28 Martin Liska <mliska@suse.cz>
5377
5378 * c.opt: Replace space with tabular for options of <number>
5379 type.
5380
6a825afe
ML
53812017-02-28 Martin Liska <mliska@suse.cz>
5382
5383 * c.opt: Fix --help=option -Q for options which are of
5384 an enum type.
5385
4227c9ad
JJ
53862017-02-24 Jakub Jelinek <jakub@redhat.com>
5387
5388 PR c++/79588
5389 * c-common.c (check_function_restrict): New function.
5390 (check_function_arguments): Add FNDECL argument. Call
5391 check_function_restrict if -Wrestrict.
5392 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5393 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5394 * c-common.h (check_function_arguments): Add FNDECL argument.
5395 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5396
59909673
EB
53972017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5398
5399 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5400 treatment of parameters with pointer-to-tagged type and tidy up.
5401 (print_ada_methods): Remove the special treatment of C++ static member
5402 functions.
5403
54dcd526
ML
54042017-02-22 Martin Liska <mliska@suse.cz>
5405
5406 * c.opt: Replace inequality signs with square brackets
5407 for -Wnornalized.
5408
00bc9de3
JJ
54092017-02-21 Jakub Jelinek <jakub@redhat.com>
5410
5411 PR c++/79641
5412 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5413 preserve quals.
5414
97fcf744
JM
54152017-02-17 Joseph Myers <joseph@codesourcery.com>
5416
5417 * c-cppbuiltin.c (builtin_define_float_constants): Define
5418 __DECIMAL_DIG__ to the value for long double.
5419
c7545f1c
MP
54202017-02-15 Marek Polacek <polacek@redhat.com>
5421
5422 PR c/79515
5423 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5424 conversion has occured.
5425
c2e84327
DM
54262017-01-24 David Malcolm <dmalcolm@redhat.com>
5427
5428 * c-common.c (c_common_reswords): Add "__RTL".
5429 * c-common.h (enum rid): Add RID_RTL.
5430
2ebd93e1
MP
54312017-01-20 Marek Polacek <polacek@redhat.com>
5432
5433 PR c/64279
5434 * c-common.h (do_warn_duplicated_branches_r): Declare.
5435 * c-gimplify.c (c_genericize): Walk the function tree calling
5436 do_warn_duplicated_branches_r.
5437 * c-warn.c (expr_from_macro_expansion_r): New.
5438 (do_warn_duplicated_branches): New.
5439 (do_warn_duplicated_branches_r): New.
5440 * c.opt (Wduplicated-branches): New option.
5441
0d80ab91
DM
54422017-01-17 David Malcolm <dmalcolm@redhat.com>
5443
5444 PR c++/71497
5445 * c-indentation.c (warn_for_misleading_indentation): Use the past
5446 subjunctive in the note.
5447
7f991c36
AH
54482017-01-17 Aldy Hernandez <aldyh@redhat.com>
5449
5450 PR c/79116
5451 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5452 start type to integer_type.
5453
1c70261c
JJ
54542017-01-16 Jakub Jelinek <jakub@redhat.com>
5455
5456 PR driver/49726
5457 * c.opt (gen-decls): Add Driver flag.
5458
1ddca3f3
PC
54592017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5460
5461 Revert:
5462 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5463
5464 PR c++/71737
5465 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5466
7d2f3f1d
PC
54672017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5468
5469 PR c++/71737
5470 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5471
bce6f760
MS
54722017-01-12 Martin Sebor <msebor@redhat.com>
5473
5474 (-Wformat-overflow): ...to this.
5475
bf5fbf46
MS
54762017-01-11 Martin Sebor <msebor@redhat.com>
5477
5478 PR c/78768
5479 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5480 Also enable for LTO.
5481
e363df3f
JM
54822017-01-10 Jason Merrill <jason@redhat.com>
5483
5484 Implement P0195R2, C++17 variadic using.
5485 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5486
bd2c6270
JJ
54872017-01-09 Jakub Jelinek <jakub@redhat.com>
5488
5489 PR translation/79019
5490 PR translation/79020
5491 * c.opt (Wnormalized=): Fix typo in description.
5492
efcc8d38
MS
54932017-01-08 Martin Sebor <msebor@redhat.com>
5494
5495 PR middle-end/77708
5496 * c.opt (-Wformat-truncation): New option.
5497
ab20d992 54982017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5499
5500 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5501 value to unsigned short to fit in 4 hex digits without
5502 warnings.
5503
4e89adf9
EB
55042017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5505
5506 * c.opt (fsso-struct): Add 'native' value.
5507
cd445b54
ML
55082017-01-05 Martin Liska <mliska@suse.cz>
5509
5510 PR pch/78970
5511 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5512 header.
5513
a9342885
MP
55142017-01-04 Marek Polacek <polacek@redhat.com>
5515
5516 PR c++/64767
5517 * c.opt (Wpointer-compare): New option.
5518
fc73e60c
JJ
55192017-01-04 Jakub Jelinek <jakub@redhat.com>
5520
5521 PR driver/78957
5522 * c.opt (fsso-struct=): Add RejectNegative.
5523
cbe34bb5
JJ
55242017-01-01 Jakub Jelinek <jakub@redhat.com>
5525
5526 Update copyright years.
5527
d4a6c0ea
ML
55282016-12-29 Martin Liska <mliska@suse.cz>
5529
5530 PR c/78933
5531 * c.opt (strong-eval-order): Add RejectNegative keyword.
5532
67a5ad7c
JM
55332016-12-22 Jason Merrill <jason@redhat.com>
5534
5535 Implement P0522R0, matching of template template arguments.
5536 * c-cppbuiltin.c (c_cpp_builtins): Define
5537 __cpp_template_template_args.
5538
0dba7960
JJ
55392016-12-21 Jakub Jelinek <jakub@redhat.com>
5540
5541 PR bootstrap/78817
5542 * c-common.c (struct nonnull_arg_ctx): New type.
5543 (check_function_nonnull): Return bool instead of void. Use
5544 nonnull_arg_ctx as context rather than just location_t.
5545 (check_nonnull_arg): Adjust for the new context type, set
5546 warned_p to true if a warning has been diagnosed.
5547 (check_function_arguments): Return bool instead of void.
5548 * c-common.h (check_function_arguments): Adjust prototype.
5549
31bfc9b9
JM
55502016-12-21 Jason Merrill <jason@redhat.com>
5551
5552 * c.opt (-fnew-ttp-matching): New flag.
5553 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5554
629b3d75
MJ
55552016-12-14 Martin Jambor <mjambor@suse.cz>
5556
5557 * c-omp.c: Include omp-general.h instead of omp-low.h.
5558 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5559 name.
5560
474da67e
MS
55612016-12-14 Martin Sebor <msebor@redhat.com>
5562
5563 PR c/17308
5564 * c-common.c (check_nonnull_arg): Disable when optimization
5565 is enabled.
5566
fe366b87
MP
55672016-12-12 Marek Polacek <polacek@redhat.com>
5568
5569 PR c++/78647
5570 * c-common.c (attribute_fallthrough_p): Return false for
5571 error_mark_node.
5572
8bd9f164
MS
55732016-12-08 Martin Sebor <msebor@redhat.com>
5574
5575 PR c/78284
5576 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5577
060162e0
MS
55782016-12-08 Martin Sebor <msebor@redhat.com>
5579
5580 PR c/78165
92a285c1
ML
5581 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5582 suffix.
060162e0 5583
ee92e7ba
MS
55842016-12-07 Martin Sebor <msebor@redhat.com>
5585
5586 PR c/53562
5587 PR middle-end/77784
5588 PR middle-end/78149
5589 PR middle-end/78138
5590 * c.opt (-Wstringop-overflow): New option.
5591
84b0769e
MO
55922016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5593
5594 * c-attribs.c (asan odr indicator): New attribute.
5595 (handle_asan_odr_indicator_attribute): New function.
5596
7fa6a965
PK
55972016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5598
5599 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5600 ptrdiff_type_node;
5601
56d8ffc1
JG
56022016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5603
5604 * c-common.c (excess_precision_mode_join): New.
5605 (c_ts18661_flt_eval_method): New.
5606 (c_c11_flt_eval_method): Likewise.
5607 (c_flt_eval_method): Likewise.
5608 * c-common.h (excess_precision_mode_join): New.
5609 (c_flt_eval_method): Likewise.
5610 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5611 (cpp_iec_559_value): Call it.
5612 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5613 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5614 __FLT_EVAL_METHOD_TS_18661_3__.
5615
04f0fcf7
JG
56162016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5617
5618 * c-opts.c (c_common_post_options): Add logic to handle the default
5619 case for -fpermitted-flt-eval-methods.
5620
fb2675cb
PB
56212016-11-23 Paolo Bonzini <bonzini@gnu.org>
5622
5623 * c.opt (Wexpansion-to-defined): New.
5624
ec1c5694
JJ
56252016-11-23 Jakub Jelinek <jakub@redhat.com>
5626
5627 PR target/78451
5628 * c-pragma.c (handle_pragma_target): Don't replace
5629 current_target_pragma, but chainon the new args to the current one.
5630
730c9e75
NS
56312016-11-22 Nathan Sidwell <nathan@acm.org>
5632
5633 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5634 indentation and formatting.
730c9e75 5635
89990732
MS
56362016-11-21 Martin Sebor <msebor@redhat.com>
5637
5638 * c.opt (-fprintf-return-value): Enable by default.
5639
48330c93
BE
56402016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5641
5642 PR c++/71973
5643 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5644 * c-common.c (c_common_nodes_and_builtins): Initialize
5645 const_tm_ptr_type_node.
5646
0d939c95
MP
56472016-11-16 Marek Polacek <polacek@redhat.com>
5648
5649 PR c/78285
5650 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5651
8e745a17
JJ
56522016-11-14 Jakub Jelinek <jakub@redhat.com>
5653
5654 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5655
1ee62b92 56562016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5657 Richard Biener <rguenther@suse.de>
5658
5659 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5660 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5661 * c.opt (fgimple): New option.
1ee62b92 5662
22b15758
UB
56632016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5664
5665 PR c/35503
5666 * c-common.h (warn_for_restrict): Declare.
5667 * c-warn.c: Include gcc-rich-location.h.
5668 (warn_for_restrict): New function.
5669 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5670 (gcc_cdiag_char_table): Likewise.
5671 (gcc_cxxdiag_char_table): Likewise.
5672 * c.opt (Wrestrict): New option.
5673
4be719cd
EB
56742016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5675
5676 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5677 for nested types only if the type is a record or union and dump SLOC.
5678
4a826ca6
JM
56792016-11-09 Jason Merrill <jason@redhat.com>
5680
5681 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5682
2e955d50
JJ
56832016-11-09 Jakub Jelinek <jakub@redhat.com>
5684
5685 * c-ubsan.c (ubsan_instrument_shift): Handle split
5686 -fsanitize=shift-base and -fsanitize=shift-exponent.
5687
51dc6603
JM
56882016-11-07 Jason Merrill <jason@redhat.com>
5689
5690 * c.opt (Wc++1z-compat): New.
5691 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5692
6dc4a604
ML
56932016-11-07 Martin Liska <mliska@suse.cz>
5694
5695 * c-warn.c (warn_for_unused_label): Save all labels used
5696 in goto or in &label.
5697
b302001e
JM
56982016-11-03 Jason Merrill <jason@redhat.com>
5699
5700 * c-cppbuiltin.c (c_cpp_builtins): Correct
5701 __cpp_inheriting_constructors.
5702
31f7f784
JM
57032016-11-01 Jason Merrill <jason@redhat.com>
5704
2bc78e3c
JM
5705 * c-cppbuiltin.c (c_cpp_builtins): Update
5706 __cpp_inheriting_constructors.
5707
31f7f784
JM
5708 * c.opt (-fnew-inheriting-ctors): New.
5709 * c-opts.c: Default to on for ABI 11+.
5710
dcb466ec
JJ
57112016-10-31 Jakub Jelinek <jakub@redhat.com>
5712
5713 PR c++/77948
5714 * c.opt (fext-numeric-literals): Add Var and Init.
5715 * c-opts.c (c_common_handle_option): Don't clear
5716 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5717 (c_common_post_options): Clear it here if not set
5718 explicitly.
5719
52e1b91e
AH
57202016-10-28 Aldy Hernandez <aldyh@redhat.com>
5721
5722 PR debug/77773
5723 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5724 if NULL.
5725
e16f1cc7
JJ
57262016-10-25 Jakub Jelinek <jakub@redhat.com>
5727
5728 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5729 * c-common.c (c_common_reswords): Add __builtin_launder.
5730
f8348061
BE
57312016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5732
5733 * c-common.c (c_common_truthvalue_conversion): Warn for
5734 multiplications in boolean context. Fix the quoting of '<<' and '<'
5735 in the shift warning.
5736
eff89e01
BE
57372016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5738
5739 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5740
24bc7bf4
JM
57412016-10-20 Jason Merrill <jason@redhat.com>
5742
5743 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5744
4c712374
BE
57452016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5746
5747 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5748 integer shift ops in boolean context.
5749
57502016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5751
5752 * c.opt (Walloca): New.
5753 (Walloca-larger-than=): New.
5754 (Wvla-larger-than=): New.
5755
8fa18c06
MP
57562016-10-17 Marek Polacek <polacek@redhat.com>
5757
5758 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5759 Return immediately when finding a match.
5760 (warn_tautological_cmp): Remove a boolean variable that is no longer
5761 needed.
5762
b12b1915
MP
57632016-10-17 Marek Polacek <polacek@redhat.com>
5764
5765 * c-attribs.c: New file.
5766 * c-common.c: Move attributes handling to c-attribs.c.
5767 (get_nonnull_operand): No longer static.
5768 * c-common.h: Move the declarations from c-attribs.c to its own section.
5769
2045acd9
JM
57702016-10-14 Jason Merrill <jason@redhat.com>
5771
5772 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5773 and __cpp_deduction_guides.
5774
14a2c9aa
JM
57752016-10-13 Jason Merrill <jason@redhat.com>
5776
5777 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5778
4d0cdd0c
TP
57792016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5780
5781 * c-cppbuiltin.c: Include memmodel.h.
5782 * c-opts.c: Likewise.
5783 * c-pragma.c: Likewise.
5784 * c-warn.c: Likewise.
5785
70f6d5e1
JJ
57862016-10-12 Jakub Jelinek <jakub@redhat.com>
5787
5788 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5789 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5790 * c-opts.c (sanitize_cpp_opts): Initialize
5791 cpp_opts->cpp_warn_implicit_fallthrough.
5792
78f61294
MP
57932016-10-11 Marek Polacek <polacek@redhat.com>
5794
5795 * c-common.c (warning_candidate_p): Change the return type to bool
5796 and return true/false instead of 1/0.
5797 (vector_mode_valid_p): Likewise.
5798
038b5cc0
MP
57992016-10-11 Marek Polacek <polacek@redhat.com>
5800
5801 * c-common.c (fold_for_warn): No longer static.
5802 (bool_promoted_to_int_p): Likewise.
5803 (c_common_get_narrower): Likewise.
5804 (constant_expression_warning): Move to c-warn.c.
5805 (constant_expression_error): Likewise.
5806 (overflow_warning): Likewise.
5807 (warn_logical_operator): Likewise.
5808 (find_array_ref_with_const_idx_r): Likewise.
5809 (warn_tautological_cmp): Likewise.
5810 (expr_has_boolean_operands_p): Likewise.
5811 (warn_logical_not_parentheses): Likewise.
5812 (warn_if_unused_value): Likewise.
5813 (strict_aliasing_warning): Likewise.
5814 (sizeof_pointer_memaccess_warning): Likewise.
5815 (check_main_parameter_types): Likewise.
5816 (conversion_warning): Likewise.
5817 (warnings_for_convert_and_check): Likewise.
5818 (match_case_to_enum_1): Likewise.
5819 (match_case_to_enum): Likewise.
5820 (c_do_switch_warnings): Likewise.
5821 (warn_for_omitted_condop): Likewise.
5822 (readonly_error): Likewise.
5823 (lvalue_error): Likewise.
5824 (invalid_indirection_error): Likewise.
5825 (warn_array_subscript_with_type_char): Likewise.
5826 (warn_about_parentheses): Likewise.
5827 (warn_for_unused_label): Likewise.
5828 (warn_for_div_by_zero): Likewise.
5829 (warn_for_memset): Likewise.
5830 (warn_for_sign_compare): Likewise.
5831 (do_warn_double_promotion): Likewise.
5832 (do_warn_unused_parameter): Likewise.
5833 (record_locally_defined_typedef): Likewise.
5834 (maybe_record_typedef_use): Likewise.
5835 (maybe_warn_unused_local_typedefs): Likewise.
5836 (maybe_warn_bool_compare): Likewise.
5837 (maybe_warn_shift_overflow): Likewise.
5838 (warn_duplicated_cond_add_or_warn): Likewise.
5839 (diagnose_mismatched_attributes): Likewise.
5840 * c-common.h: Move the declarations from c-warn.c to its own section.
5841 * c-warn.c: New file.
5842
627be19f
JM
58432016-10-08 Jason Merrill <jason@redhat.com>
5844
5845 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5846 into COND_EXPR in C++.
5847
7bad794a
JJ
58482016-10-08 Jakub Jelinek <jakub@redhat.com>
5849
5850 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5851 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5852 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5853
be845b04
JJ
58542016-10-07 Jakub Jelinek <jakub@redhat.com>
5855
5856 Implement LWG2296 helper intrinsic
5857 * c-common.h (enum rid): Add RID_ADDRESSOF.
5858 * c-common.c (c_common_reswords): Add __builtin_addressof.
5859
c09c4992
BE
58602016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5861
5862 PR c++/77700
5863 * c-common.c (c_common_truthvalue_conversion): Warn also for
5864 suspicious enum values in boolean context.
5865
342cfb3e
JJ
58662016-10-06 Jakub Jelinek <jakub@redhat.com>
5867
5868 Implement P0258R2 - helper for C++17
5869 std::has_unique_object_representations trait
5870 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5871 * c-common.c (c_common_reswords): Add
5872 __has_unique_object_representations.
5873
2e69f143
JJ
58742016-10-05 Jakub Jelinek <jakub@redhat.com>
5875
5876 PR sanitizer/66343
5877 * c-ubsan.c (ubsan_instrument_return): Don't call
5878 initialize_sanitizer_builtins here.
5879
700fff34
BE
58802016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5881
5882 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5883 conditional expression in boolean context when only one arm is
5884 non-boolean.
5885
9563bfcd
JJ
58862016-10-05 Jakub Jelinek <jakub@redhat.com>
5887
04a32443
JJ
5888 PR sanitizer/77823
5889 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5890 is not integral.
5891
9563bfcd
JJ
5892 * c-common.c (c_common_reswords): Update comment for C++11.
5893
f1644724
JM
58942016-10-04 Jason Merrill <jason@redhat.com>
5895
5896 * c-common.c (make_tree_vector_from_ctor): New.
5897 * c-common.h: Declare it.
5898
5a79befb
JJ
58992016-10-04 Jakub Jelinek <jakub@redhat.com>
5900
5901 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5902 __LIBGCC_JCR_SECTION_NAME__.
5903
1633d3b9
BE
59042016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5905
5906 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5907 left shift in boolean context.
5908
a2c6e7f2
JJ
59092016-09-29 Jakub Jelinek <jakub@redhat.com>
5910
5911 Implement P0001R1 - C++17 removal of register storage class specifier
5912 * c.opt (Wregister): New warning.
5913 * c-opts.c (c_common_post_options): Enable -Wregister by
5914 default for C++17.
5915
75304c87
JG
59162016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5917
5918 * c-opts.c (c_common_post_options): Remove special case for
5919 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5920 in C++.
5921
bbfac6da
JJ
59222016-09-27 Jakub Jelinek <jakub@redhat.com>
5923
6e39060a
JJ
5924 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5925 -std=c++1z.
5926
bbfac6da
JJ
5927 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5928
e73cf9a2
TP
59292016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5930
5931 * c-common.c: Include memmodel.h.
5932
c6147dc4
MP
59332016-09-26 Marek Polacek <polacek@redhat.com>
5934
5935 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5936
81fea426
MP
59372016-09-26 Marek Polacek <polacek@redhat.com>
5938
5939 PR c/7652
5940 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5941 (handle_fallthrough_attribute): New function.
5942 (attribute_fallthrough_p): New function.
5943 * c-common.h (attribute_fallthrough_p): Declare.
5944
9a2300e9
MP
59452016-09-24 Marek Polacek <polacek@redhat.com>
5946
5947 PR c/77490
5948 * c.opt (Wbool-operation): New.
5949
a09e9e35
BE
59502016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5951
5952 * c-common.c (c_common_truthvalue_conversion): Inhibit
5953 Wint-in-bool-context warning with from_macro_definition_at.
5954 Mention the expression will always evaluate to true.
5955
d43b4ccc
MS
59562016-09-21 Martin Sebor <msebor@redhat.com>
5957
5958 PR bootstrap/77676
5959 * c.opt (fprintf-return-value): Temporarily initialize to zero
5960 to unblock bootstrap failures.
5961
2e1c20b1
JJ
59622016-09-21 Jakub Jelinek <jakub@redhat.com>
5963
5964 PR c++/77651
5965 * c.opt (Waligned-new=): Add RejectNegative.
5966 (faligned-new=): Likewise. Spelling fix - change
5967 aligned_new_threshhold to aligned_new_threshold.
5968 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5969 to aligned_new_threshold.
5970
88d0c3f0
MS
59712016-09-20 Martin Sebor <msebor@redhat.com>
5972
5973 PR middle-end/49905
5974 * c.opt: Add -Wformat-length and -fprintf-return-value.
5975
144a96e4
BE
59762016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5977
5978 PR c++/77434
5979 * c.opt (Wint-in-bool-context): New warning.
5980 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5981 constants in boolean context.
5982
63012d9a
JM
59832016-09-19 Joseph Myers <joseph@codesourcery.com>
5984
5985 * c-common.c (max_align_t_align): Also consider alignment of
5986 float128_type_node.
5987
931388ce
JM
59882016-09-15 Jason Merrill <jason@redhat.com>
5989
5990 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5991 DECL_EXTERNAL.
5992
38711381
JM
59932016-09-14 Jason Merrill <jason@redhat.com>
5994
5995 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5996 limit FIELD_DECL, either.
5997
e51fbec3
MP
59982016-09-14 Marek Polacek <polacek@redhat.com>
5999
6000 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6001 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6002 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6003
254830ba
DM
60042016-09-13 David Malcolm <dmalcolm@redhat.com>
6005
6006 * c-common.c (warn_logical_not_parentheses): Replace
6007 rich_location::add_fixit_insert calls with add_fixit_insert_before
6008 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6009
42763690
JM
60102016-09-13 Jason Merrill <jason@redhat.com>
6011 Tom de Vries <tom@codesourcery.com>
6012
6013 PR c++/77427
6014 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6015
9453eee9
JM
60162016-09-13 Jason Merrill <jason@redhat.com>
6017
6018 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6019 limit types at all.
6020
e96809e3
JM
60212016-09-12 Jason Merrill <jason@redhat.com>
6022
6023 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6024 bit/byte confusion, allow large alignment for types.
6025
54dcdb88
BE
60262016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6027
6028 PR c++/77496
6029 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6030
d1463eb9
DM
60312016-09-12 David Malcolm <dmalcolm@redhat.com>
6032
6033 PR c/72858
6034 * c-format.c (argument_parser::check_argument_type): Add params
6035 "type_start" and "conversion_char". Use the former to generate
6036 offset_to_type_start and pass it and conversion_char to
6037 check_format_types.
6038 (check_format_info_main): Capture the start of the type
6039 information as "type_start", and pass it an format_char
6040 to arg_parser.check_argument_type.
6041 (check_format_types): Provide an example in the leading comment.
6042 Add params "offset_to_type_start" and "conversion_char"; pass
6043 them to format_type_warning calls.
6044 (test_get_modifier_for_format_len): Likewise.
6045 (matching_type_p): New function.
6046 (get_format_for_type): Add param "conversion_char" and move
6047 implementation into...
6048 (get_format_for_type_1): ...new function, called twice.
6049 Use new function matching_type_p rather than checking for
6050 TYPE_CANONICAL equality.
6051 (get_corrected_substring): New function.
6052 (format_type_warning): Provide an example in the leading comment.
6053 Add params "offset_to_type_start" and "conversion_char". Replace
6054 call to get_format_for_type with call to get_corrected_substring
6055 and move rejection of hints for widths/precisions there.
6056 (assert_format_for_type_streq): Add param "conversion_char".
6057 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6058 (test_get_format_for_type_printf): Add conversion chars to the
6059 tests, adding coverage for various combinations of integer
6060 vs double conversions, and for preserving octal and hexadecimal
6061 conversions.
6062 (test_get_format_for_type_scanf): Add conversion chars to the
6063 tests.
6064
5b28efbb
TV
60652016-09-10 Tom de Vries <tom@codesourcery.com>
6066
6067 PR C/71602
6068 * c-common.c (build_va_arg): Handle more strict
6069 targetm.canonical_va_list_type. Replace first argument type error with
6070 assert.
6071
3f0177e7
MS
60722016-09-09 Martin Sebor <msebor@redhat.com>
6073
6074 PR c/77520
6075 PR c/77521
6076 * c-format.c (argument_parser::find_format_char_info): Use %qc
6077 format directive unconditionally.
6078
af63ba4b
JM
60792016-09-09 Jason Merrill <jason@redhat.com>
6080
6081 Implement C++17 new of over-aligned types.
6082 * c.opt: Add -faligned-new and -Waligned-new.
6083 * c-common.c (max_align_t_align): Split out from...
6084 (cxx_fundamental_alignment_p): ...here.
6085 * c-common.h: Declare it.
6086 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6087
c65248cb
JM
60882016-09-09 Joseph Myers <joseph@codesourcery.com>
6089
6090 * c-cppbuiltin.c (builtin_define_type_width): New function.
6091 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6092 macros.
6093
e5106e27
DM
60942016-09-07 David Malcolm <dmalcolm@redhat.com>
6095
6096 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6097 a POINTER_TYPE.
6098 (substring_loc::get_location): Move to substring-locations.c,
6099 keeping implementation as...
6100 (c_get_substring_location): New function, from the above, reworked
6101 to use accessors rather than member lookup.
6102 * c-common.h (class substring_loc): Move to substring-locations.h,
6103 replacing with a forward decl.
6104 (c_get_substring_location): New decl.
6105 * c-format.c: Include "substring-locations.h".
6106 (format_warning_va): Move to substring-locations.c.
6107 (format_warning_at_substring): Likewise.
6108
ab20d992 61092016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6110
6111 PR c/77336
6112 * c-format.c (check_function_format): Avoid issuing warnings for
6113 functions unless they call format functions with non-constant
6114 format strings.
6115
b772a565
RB
61162016-09-06 Richard Biener <rguenther@suse.de>
6117
6118 PR c/77450
6119 * c-common.c (c_common_mark_addressable_vec): Handle
6120 COMPOUND_LITERAL_EXPR.
6121
25ff5dd3
MP
61222016-09-05 Marek Polacek <polacek@redhat.com>
6123
6124 PR c/77423
6125 * c-common.c (bool_promoted_to_int_p): New function.
6126 (expr_has_boolean_operands_p): New function.
6127 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6128 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6129
21234eb5
TV
61302016-09-04 Tom de Vries <tom@codesourcery.com>
6131
6132 revert:
6133 2016-08-29 Tom de Vries <tom@codesourcery.com>
6134
6135 * c-common.c (build_va_arg): Replace first argument type error
6136 with assert.
6137
9dc5773f
JJ
61382016-09-02 Jakub Jelinek <jakub@redhat.com>
6139
6140 PR c/65467
6141 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6142 (c_finish_omp_for): Reject _Atomic qualified iterators.
6143
61442016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6145
6146 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6147 size to guarantee it fits the output of the formatted function
6148 regardless of its arguments.
6149
295844f6
MP
61502016-09-01 Marek Polacek <polacek@redhat.com>
6151
6152 PR c/7652
6153 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6154 FALLTHRU comments.
6155
3d06b6f2
MP
61562016-08-29 Marek Polacek <polacek@redhat.com>
6157
6158 PR c/77292
6159 * c-common.c (warn_logical_not_parentheses): Don't warn for
6160 a comparison or a logical operator.
6161
34cedad5
TV
61622016-08-29 Tom de Vries <tom@codesourcery.com>
6163
6164 * c-common.c (build_va_arg): Fix type comparison assert.
6165
f162d717
TV
61662016-08-29 Tom de Vries <tom@codesourcery.com>
6167
6168 * c-common.c (build_va_arg): Replace first argument type error
6169 with assert.
6170
ba9bbd6f
TV
61712016-08-29 Tom de Vries <tom@codesourcery.com>
6172
6173 PR c/77398
6174 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6175 with error_mark_node as va_list instead of with illegal va_list.
6176
ebef225f
MP
61772016-08-25 Marek Polacek <polacek@redhat.com>
6178 David Malcolm <dmalcolm@redhat.com>
6179
6180 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6181 * c-common.h (warn_logical_not_parentheses): Update declaration.
6182
b00e6e75
MP
61832016-08-22 Marek Polacek <polacek@redhat.com>
6184
6185 PR c++/77321
6186 * c-common.c (warn_for_memset): Check type for null.
6187
6dc198e3
JM
61882016-08-22 Joseph Myers <joseph@codesourcery.com>
6189
14ec014e 6190 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6191 _FloatNx types for suffixes for built-in functions.
6192
c65699ef
JM
61932016-08-19 Joseph Myers <joseph@codesourcery.com>
6194
6195 PR c/32187
6196 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6197 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6198 (RID_FLOAT128X): New enum rid values.
6199 (CASE_RID_FLOATN_NX): New macro.
6200 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6201 keywords.
6202 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6203 corresponding complex types.
6204 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6205 _FloatNx and corresponding complex types.
6206 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6207 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6208 and _FloatNx types for the widest type for determining
6209 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6210 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6211 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6212 and _FloatNx types.
6213 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6214 constants.
6215 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6216 _FloatNx types.
6217
cc015f3a
DM
62182016-08-18 David Malcolm <dmalcolm@redhat.com>
6219
6220 * c-opts.c (c_diagnostic_finalizer): Update for change to
6221 diagnostic_show_locus.
6222
cb18fd07
DM
62232016-08-18 David Malcolm <dmalcolm@redhat.com>
6224
6225 * c-common.c: Include "spellcheck.h".
6226 (cb_get_suggestion): New function.
6227 * c-common.h (cb_get_suggestion): New decl.
6228 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6229 cb_get_suggestion.
6230
a76989dc
MP
62312016-08-18 Marek Polacek <polacek@redhat.com>
6232
6233 PR c/71514
6234 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6235 and pointer-to-VLA.
6236
65e736c0
DM
62372016-08-16 David Malcolm <dmalcolm@redhat.com>
6238
6239 PR c/72857
6240 * c-common.c (substring_loc::get_range): Rename to...
6241 (substring_loc::get_location): ...this, converting param from a
6242 source_range * to a location_t *. Call
6243 get_source_location_for_substring rather than
6244 get_source_range_for_substring, and pass in m_caret_idx.
6245 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6246 (substring_loc::get_range): Replace with...
6247 (substring_loc::get_location): ...this.
6248 (substring_loc::set_caret_index): New method.
6249 (substring_loc): Add field m_caret_idx.
6250 * c-format.c (format_warning_va): Update for above changes.
6251 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6252 clashing with type name.
6253 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6254 (check_argument_type): Likewise.
6255 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6256 Use a copy when emitting warnings, setting the caret index from TYPE.
6257
7e1dde14 62582016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6259 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6260
6261 * c-ada-spec.c (dump_number): New function.
6262 (handle_escape_character): Likewise.
6263 (print_ada_macros): Add handling of constant integers and strings.
6264
191816a3
MP
62652016-08-12 Marek Polacek <polacek@redhat.com>
6266
6267 PR c/7652
6268 * c-common.c (scalar_to_vector): Adjust fall through comment.
6269 * c-opts.c (c_common_handle_option): Likewise.
6270 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6271 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6272 fall through comment.
6273 * cilk.c (extract_free_variables): Add FALLTHRU.
6274
452df4a4
JM
62752016-08-10 Jason Merrill <jason@redhat.com>
6276
6277 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6278
f3365c12
JM
62792016-08-09 Jason Merrill <jason@redhat.com>
6280
6281 * c-common.c (c_common_attribute_table): vector_size affects type
6282 identity.
6283
f0bc3323
MP
62842016-08-09 Marek Polacek <polacek@redhat.com>
6285
6286 PR c/7652
6287 * c-ada-spec.c (dump_generic_ada_node): Add return.
6288
98e5a19a
JM
62892016-08-09 Jason Merrill <jason@redhat.com>
6290
6291 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6292 C++17 constexpr lambdas.
6293
895aa8e1
DM
62942016-08-08 David Malcolm <dmalcolm@redhat.com>
6295
6296 PR c/64955
6297 * c-common.h (selftest::c_format_c_tests): New declaration.
6298 (selftest::run_c_tests): New declaration.
6299 * c-format.c: Include "selftest.h.
6300 (format_warning_va): Add param "corrected_substring" and use
6301 it to add a replacement fix-it hint.
6302 (format_warning_at_substring): Likewise.
6303 (format_warning_at_char): Update for new param of
6304 format_warning_va.
6305 (argument_parser::check_argument_type): Pass "fki" to
6306 check_format_types.
6307 (check_format_types): Add param "fki" and pass it to
6308 format_type_warning.
6309 (deref_n_times): New function.
6310 (get_modifier_for_format_len): New function.
6311 (selftest::test_get_modifier_for_format_len): New function.
6312 (get_format_for_type): New function.
6313 (format_type_warning): Add param "fki" and use it to attempt
6314 to provide hints for argument types when calling
6315 format_warning_at_substring.
6316 (selftest::get_info): New function.
6317 (selftest::assert_format_for_type_streq): New function.
6318 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6319 (selftest::test_get_format_for_type_printf): New function.
6320 (selftest::test_get_format_for_type_scanf): New function.
6321 (selftest::c_format_c_tests): New function.
6322
e52ed3fe
DM
63232016-08-08 David Malcolm <dmalcolm@redhat.com>
6324
6325 PR c/52952
6326 * c-format.c: Include "diagnostic.h".
6327 (location_column_from_byte_offset): Delete.
6328 (location_from_offset): Delete.
6329 (format_warning_va): New function.
6330 (format_warning_at_substring): New function.
6331 (format_warning_at_char): New function.
6332 (check_format_arg): Capture location of format_tree and pass to
6333 check_format_info_main.
6334 (argument_parser): Add fields "start_of_this_format" and
6335 "format_string_cst".
6336 (flag_chars_t::validate): Add param "format_string_cst". Convert
6337 warning_at call using location_from_offset to call to
6338 format_warning_at_char.
6339 (argument_parser::argument_parser): Add param "format_string_cst_"
6340 and use use it to initialize field "format_string_cst".
6341 Initialize new field "start_of_this_format".
6342 (argument_parser::read_format_flags): Convert warning_at call
6343 using location_from_offset to a call to format_warning_at_char.
6344 (argument_parser::read_any_format_left_precision): Likewise.
6345 (argument_parser::read_any_format_precision): Likewise.
6346 (argument_parser::read_any_other_modifier): Likewise.
6347 (argument_parser::find_format_char_info): Likewise, in three places.
6348 (argument_parser::parse_any_scan_set): Likewise, in one place.
6349 (argument_parser::handle_conversions): Likewise, in two places.
6350 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6351 and use it to make a substring_loc. Pass the latter to
6352 check_format_types.
6353 (check_format_info_main): Add params "fmt_param_loc" and
6354 "format_string_cst". Convert warning_at calls using
6355 location_from_offset to calls to format_warning_at_char. Pass the
6356 new params to the arg_parser ctor. Pass "format_string_cst" to
6357 flag_chars.validate. Pass "fmt_param_loc" to
6358 arg_parser.check_argument_type.
6359 (check_format_types): Convert first param from a location_t
6360 to a const substring_loc & and rename to "fmt_loc". Attempt
6361 to extract the range of the relevant parameter and pass it
6362 to format_type_warning.
6363 (format_type_warning): Convert first param from a location_t
6364 to a const substring_loc & and rename to "fmt_loc". Add
6365 params "param_range" and "type". Replace calls to warning_at
6366 with calls to format_warning_at_substring.
6367
1c4d457e
DM
63682016-08-08 David Malcolm <dmalcolm@redhat.com>
6369
6370 * c-format.c (class flag_chars_t): New class.
6371 (struct length_modifier): New struct.
6372 (class argument_parser): New class.
6373 (flag_chars_t::flag_chars_t): New ctor.
6374 (flag_chars_t::has_char_p): New method.
6375 (flag_chars_t::add_char): New method.
6376 (flag_chars_t::validate): New method.
6377 (flag_chars_t::get_alloc_flag): New method.
6378 (flag_chars_t::assignment_suppression_p): New method.
6379 (argument_parser::argument_parser): New ctor.
6380 (argument_parser::read_any_dollar): New method.
6381 (argument_parser::read_format_flags): New method.
6382 (argument_parser::read_any_format_width): New method.
6383 (argument_parser::read_any_format_left_precision): New method.
6384 (argument_parser::read_any_format_precision): New method.
6385 (argument_parser::handle_alloc_chars): New method.
6386 (argument_parser::read_any_length_modifier): New method.
6387 (argument_parser::read_any_other_modifier): New method.
6388 (argument_parser::find_format_char_info): New method.
6389 (argument_parser::validate_flag_pairs): New method.
6390 (argument_parser::give_y2k_warnings): New method.
6391 (argument_parser::parse_any_scan_set): New method.
6392 (argument_parser::handle_conversions): New method.
6393 (argument_parser::check_argument_type): New method.
6394 (check_format_info_main): Introduce classes argument_parser
6395 and flag_chars_t, moving the code within the loop into methods
6396 of these classes. Make various locals "const".
6397
88fa5555
DM
63982016-08-05 David Malcolm <dmalcolm@redhat.com>
6399
6400 * c-common.c: Include "substring-locations.h".
6401 (get_cpp_ttype_from_string_type): New function.
6402 (g_string_concat_db): New global.
6403 (substring_loc::get_range): New method.
6404 * c-common.h (g_string_concat_db): New declaration.
6405 (class substring_loc): New class.
6406 * c-lex.c (lex_string): When concatenating strings, capture the
6407 locations of all tokens using a new obstack, and record the
6408 concatenation locations within g_string_concat_db.
6409 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6410 on the ggc-heap.
6411
78169471
MP
64122016-07-29 Marek Polacek <polacek@redhat.com>
6413
638fc14f
MP
6414 PR c/71926
6415 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6416 parentheses warning.
6417
78169471
MP
6418 PR c/71574
6419 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6420
1225d6b1
ML
64212016-07-28 Martin Liska <mliska@suse.cz>
6422
6423 PR gcov-profile/68025
6424 * c-common.c (handle_no_profile_instrument_function_attribute):
6425
ec1e2a40
BE
64262016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6427
6428 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6429 BITS_PER_UNIT_LOG.
6430
5ec2cd9f
JM
64312016-07-25 Jason Merrill <jason@redhat.com>
6432
6433 PR c++/65970
6434 * c.opt (fconstexpr-loop-limit): New.
6435
9dc5773f 64362016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6437
6438 PR c++/71675
6439 * c-common.c (resolve_overloaded_builtin): Avoid converting
6440 __atomic_compare_exchange_n return type to that of what its
6441 first argument points to.
6442
e3fe09c1
UB
64432016-07-22 Uros Bizjak <ubizjak@gmail.com>
6444
6445 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6446 ~(unsigned HOST_WIDE_INT) 0.
6447
bc91c436
ML
64482016-07-22 Martin Liska <mliska@suse.cz>
6449
6450 PR gcov-profile/69028
6451 PR gcov-profile/62047
6452 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6453 to the current_function_decl.
6454
451dcc66
JM
64552016-07-21 Jason Merrill <jason@redhat.com>
6456
6457 PR c++/65168
6458 * c-common.c (c_common_truthvalue_conversion): Check
6459 c_inhibit_evaluation_warnings for warning about address of
6460 reference.
6461
de6a69ee
DM
64622016-07-20 David Malcolm <dmalcolm@redhat.com>
6463
6464 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6465 const char *.
6466
d022c55a
JM
64672016-07-15 Jason Merrill <jason@redhat.com>
6468
6469 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6470
ddbbcb19
JJ
64712016-07-15 Jakub Jelinek <jakub@redhat.com>
6472
6473 PR c/71858
6474 * c-common.h (enum lookup_name_fuzzy_kind): Add
6475 FUZZY_LOOKUP_FUNCTION_NAME.
6476
d0cf395a
JM
64772016-07-08 Jason Merrill <jason@redhat.com>
6478
6479 P0145: Refining Expression Order for C++.
6480 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6481 * c-opts.c: Adjust.
6482
98d44e93
MT
64832016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6484
6485 PR c++/71214
6486 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6487
f9d8d994
TS
64882016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6489
6490 * c-pragma.h (enum pragma_kind): Rename
6491 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6492 users.
6493
4aa83879
RB
64942016-06-29 Richard Biener <rguenther@suse.de>
6495
6496 PR middle-end/71002
6497 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6498
a25bd9e6
JM
64992016-06-24 Jason Merrill <jason@redhat.com>
6500
6501 P0145R2: Refining Expression Order for C++.
6502 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6503 MODIFY_EXPR.
6504
a86451b9
JJ
65052016-06-24 Jakub Jelinek <jakub@redhat.com>
6506
6507 * c-common.c (check_builtin_function_arguments): Require last
6508 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6509 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6510 if the last argument is pointer to enumerated or boolean type.
6511
1a4f11c8
DM
65122016-06-22 David Malcolm <dmalcolm@redhat.com>
6513
6514 PR c/70339
6515 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6516 (lookup_name_fuzzy): New prototype.
6517
fe55692c
JDA
65182016-06-21 John David Anglin <danglin@gcc.gnu.org>
6519
6520 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6521
4eb24e01
JM
65222016-06-14 Jason Merrill <jason@redhat.com>
6523
6524 P0145R2: Refining Expression Order for C++.
6525 * c.opt (fargs-in-order): New.
6526 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6527
ef7cf206
JJ
65282016-06-13 Jakub Jelinek <jakub@redhat.com>
6529
0dda258b
JJ
6530 PR sanitizer/71498
6531 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6532 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6533
ef7cf206
JJ
6534 PR preprocessor/71183
6535 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6536 to cb_get_source_date_epoch.
6537
50b15873
JJ
65382016-06-10 Jakub Jelinek <jakub@redhat.com>
6539
6540 PR c/68657
6541 * c.opt (Wpsabi): Add Warning flag.
6542
4d926e34
MS
65432016-06-10 Martin Sebor <msebor@redhat.com>
6544
6545 PR c/71392
14ec014e 6546 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6547 the nonnull attribute in type-generic builtins.
6548
e01b4e16
MS
65492016-06-09 Martin Sebor <msebor@redhat.com>
6550
6551 PR c/70883
6552 * c-common.c (builtin_function_validate_nargs): Make text of error
6553 message consistent with others like it.
6554
44a845ca
MS
65552016-06-08 Martin Sebor <msebor@redhat.com>
6556 Jakub Jelinek <jakub@redhat.com>
6557
6558 PR c++/70507
6559 PR c/68120
6560 * c-common.c (check_builtin_function_arguments): Handle
6561 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6562
a80a7051
RB
65632016-06-08 Richard Biener <rguenther@suse.de>
6564
6565 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6566
bfd67b47
RB
65672016-06-07 Richard Biener <rguenther@suse.de>
6568
6569 PR c/61564
6570 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6571 options and warn about others.
6572
15c98b2e
ES
65732016-06-01 Eduard Sanou <dhole@openmailbox.org>
6574
6575 * c-common.c (get_source_date_epoch): Rename to
6576 cb_get_source_date_epoch.
6577 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6578 message when the parsing fails. Use error_at instead of fatal_error.
6579 * c-common.h (get_source_date_epoch): Rename to
6580 cb_get_source_date_epoch.
6581 * c-common.h (cb_get_source_date_epoch): Prototype.
6582 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6583 * c-common.h (c_omp_region_type): Remove trailing comma.
6584 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6585 * c-lex.c (c_lex_with_flags): Remove initialization of
6586 pfile->source_date_epoch.
6587
00631022
JJ
65882016-05-30 Jakub Jelinek <jakub@redhat.com>
6589
6590 PR c++/71349
6591 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6592 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6593 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6594 instead of C_OMP_CLAUSE_SPLIT_FOR.
6595
f17a223d
RB
65962016-05-24 Richard Biener <rguenther@suse.de>
6597
6598 PR middle-end/70434
6599 PR c/69504
6600 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6601 (convert_vector_to_array_for_subscript): ... this.
6602 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6603 VIEW_CONVERT_EXPR to an array type. Rename to ...
6604 (convert_vector_to_array_for_subscript): ... this.
6605
4f2e1536
MP
66062016-05-12 Marek Polacek <polacek@redhat.com>
6607
6608 PR c/70756
6609 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6610 size_in_bytes and pass LOC to it.
6611
d6e83a8d
MM
66122016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6613
6614 PR c/43651
6615 * c.opt (Wduplicate-decl-specifier): New option.
6616
5c3a10fb
MP
66172016-05-11 Marek Polacek <polacek@redhat.com>
6618
6619 PR c++/71024
6620 * c-common.c (diagnose_mismatched_attributes): New function.
6621 * c-common.h (diagnose_mismatched_attributes): Declare.
6622
deef7113
MP
66232016-05-04 Marek Polacek <polacek@redhat.com>
6624
6625 * c.opt (Wdangling-else): New option.
6626
79ce98bc
MP
66272016-05-03 Marek Polacek <polacek@redhat.com>
6628
6629 PR c/70859
6630 * c-common.c (builtin_function_validate_nargs): Add location
6631 parameter. Use it.
6632 (check_builtin_function_arguments): Add location and arguments
6633 parameters. Use them.
6634 * c-common.h (check_builtin_function_arguments): Update declaration.
6635
381cdae4
RB
66362016-05-03 Richard Biener <rguenther@suse.de>
6637
6638 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6639 allow call args to gimplify to SSA names.
6640
1d793c34
MP
66412016-05-03 Marek Polacek <polacek@redhat.com>
6642
6643 * c-common.h (enum c_omp_region_type): Remove stray comma.
6644
77886428
CP
66452016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6646
6647 * c-common.h (enum c_omp_region_type): Define.
6648
697e0b28
RS
66492016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6650
6651 * c-common.c (shorten_compare): Use wi::to_wide.
6652
e7ff0319
CP
66532016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6654
6655 PR middle-end/70626
6656 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6657 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6658 reduction clauses in acc parallel loops.
6659
2fff3db8
MP
66602016-04-29 Marek Polacek <polacek@redhat.com>
6661
6662 PR c/70852
6663 * c-common.c (warn_for_memset): Check domain before accessing it.
6664
509063eb
DV
66652016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6666
6667 PR/69089
6668 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6669 "aligned" attribute.
6670
b632761d
JM
66712016-04-28 Jason Merrill <jason@redhat.com>
6672
6673 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6674
174f6622
ES
66752016-04-28 Eduard Sanou <dhole@openmailbox.org>
6676 Matthias Klose <doko@debian.org>
6677
6678 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6679 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6680 handling.
6681 * c-common.h (get_source_date_epoch): Prototype.
6682 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6683
6bc2bb18
RB
66842015-04-27 Ryan Burn <contact@rnburn.com>
6685
6686 PR c++/69024
6687 PR c++/68997
6688 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6689 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6690 external linkage.
6691 (cilk_detect_and_unwrap): Corresponding changes.
6692 (extract_free_variables): Don't extract free variables from
6693 AGGR_INIT_EXPR slot.
6694 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6695 (cilk_recognize_spawn): Likewise.
6696
c1e1f433
BS
66972016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6698
6699 * c.opt (Wmemset-elt-size): New option.
6700 * c-common.c (warn_for_memset): New function.
6701 * c-common.h (warn_for_memset): Declare.
6702
d067e05f
JM
67032016-04-25 Jason Merrill <jason@redhat.com>
6704
6705 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6706 No longer static.
6707 * c-common.h: Declare it.
6708 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6709
9aa36ae5
JM
67102016-04-22 Jason Merrill <jason@redhat.com>
6711
6712 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6713
477d4906
IV
67142016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6715
6716 PR c++/69363
6717 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6718 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6719
fe37c7af
MM
67202016-04-18 Michael Matz <matz@suse.de>
6721
6722 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6723 and SET_DECL_ALIGN.
6724
23f2660f
EB
67252016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6726
6727 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6728 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6729 to incomplete types.
6730 (dump_nested_type): Remove redundant tests and tidy up.
6731 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6732 a type which is the typedef of an original type.
6733
1e77281b
MP
67342016-04-15 Marek Polacek <polacek@redhat.com>
6735
6736 PR c/70651
6737 * c-common.c (build_va_arg): Change two asserts into errors and return
6738 error_mark_node.
6739
b3a77f21
MP
67402016-04-13 Marek Polacek <polacek@redhat.com>
6741
6742 PR c++/70639
6743 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6744 for switch statements, too.
6745
322b8466
JM
67462016-03-28 Jason Merrill <jason@redhat.com>
6747
6748 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6749
fbdb6baf
MP
67502016-03-23 Marek Polacek <polacek@redhat.com>
6751
6752 PR c++/69884
6753 * c.opt (Wignored-attributes): New option.
6754
5c240f4d
DM
67552016-03-22 David Malcolm <dmalcolm@redhat.com>
6756
6757 PR c/69993
6758 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6759 diagnostic text, reversing the order of the warning and note so
6760 that they appear in source order.
6761
14ba7b28
MP
67622016-03-17 Marek Polacek <polacek@redhat.com>
6763
6764 PR c/69407
6765 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6766 operations.
6767
08a1cadc
JM
67682016-03-14 Jason Merrill <jason@redhat.com>
6769
2aaeea19
JM
6770 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6771
08a1cadc
JM
6772 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6773
c06d25bb
RB
67742016-03-09 Richard Biener <rguenther@suse.de>
6775
6776 PR c/70143
6777 * c-common.c (strict_aliasing_warning): Add back
6778 alias_sets_conflict_p check.
6779
80aac5c8
JM
67802016-03-08 Jason Merrill <jason@redhat.com>
6781
6782 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6783
64b23c13
DM
67842016-03-04 David Malcolm <dmalcolm@redhat.com>
6785
6786 PR c/68187
6787 * c-indentation.c (get_visual_column): Move code to determine next
6788 tab stop to...
6789 (next_tab_stop): ...this new function.
6790 (line_contains_hash_if): Delete function.
6791 (detect_preprocessor_logic): Delete function.
6792 (get_first_nws_vis_column): New function.
6793 (detect_intervening_unindent): New function.
6794 (should_warn_for_misleading_indentation): Replace call to
6795 detect_preprocessor_logic with a call to
6796 detect_intervening_unindent.
6797
729526f5
DM
67982016-03-04 David Malcolm <dmalcolm@redhat.com>
6799
6800 PR c/68187
6801 * c-indentation.c (should_warn_for_misleading_indentation): When
6802 suppressing warnings about cases where the guard and body are on
6803 the same column, only use the first non-whitespace column in place
6804 of the guard token column when dealing with "else" clauses.
6805 When rejecting aligned BODY and NEXT, loosen the requirement
6806 from equality with the first non-whitespace of guard to simply
6807 that they not be indented relative to it.
6808
e9a35493
RB
68092016-03-04 Richard Biener <rguenther@suse.de>
6810
6811 PR c++/70054
6812 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6813 instead of alias_sets_conflict_p.
6814
1be56bc5
MP
68152016-03-01 Marek Polacek <polacek@redhat.com>
6816
6817 PR c++/69795
6818 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6819 any DECL.
6820
35886f0b
MS
68212016-02-22 Martin Sebor <msebor@redhat.com>
6822
6823 PR middle-end/69780
6824 * c-common.c (check_builtin_function_arguments): Validate and
6825 reject invalid arguments to __builtin_alloca_with_align.
6826
4246c8da
MW
68272016-02-20 Mark Wielaard <mjw@redhat.com>
6828
6829 PR c/28901
6830 * c.opt (Wunused-const-variable): Turn into Alias for...
6831 (Wunused-const-variable=): New option.
6832
268be88c
BE
68332016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6834
6835 PR c++/69865
6836 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6837 here...
6838 (c_common_init_options): ...to here.
6839 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6840
871b3f47
JJ
68412016-02-19 Jakub Jelinek <jakub@redhat.com>
6842
6843 PR c++/69826
6844 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6845 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6846 flag_preprocess_only.
6847
bf14eba2
JJ
68482016-02-16 Jakub Jelinek <jakub@redhat.com>
6849
6850 PR c/69835
6851 * c.opt (Wnonnull-compare): Enable for -Wall.
6852
ba6b3795
JJ
68532016-02-15 Jakub Jelinek <jakub@redhat.com>
6854
6855 PR c++/69797
6856 * c-common.c (sync_resolve_size): Diagnose too few arguments
6857 even when params is non-NULL empty vector.
6858
a011cd92
BS
68592016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6860
6861 PR target/60410
6862 * c.opt (fshort-double): Remove.
6863
46cb9332
MS
68642016-02-05 Martin Sebor <msebor@redhat.com>
6865
6866 PR c++/69662
6867 * c.opt (Warning options): Update -Wplacement-new to take
6868 an optional argument.
6869
e1b81f2b
JJ
68702016-02-01 Jakub Jelinek <jakub@redhat.com>
6871
6872 PR preprocessor/69543
6873 PR c/69558
6874 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6875 instead of loc to control_warning_option.
6876
b6adbb9f
NS
68772016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6878
6879 * c.opt (fopenacc-dim=): New option.
6880
5d70666e
RB
68812016-01-27 Ryan Burn <contact@rnburn.com>
6882
6883 PR cilkplus/69267
6884 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6885 gimplify_arg. Removed superfluous post_p argument.
6886 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6887 superfluous post_p argument.
6888 * c-gimplify.c (c_gimplify_expr): Likewise.
6889
01e1dea3
DM
68902016-01-26 David Malcolm <dmalcolm@redhat.com>
6891
6892 PR other/69006
6893 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6894 pp_newline_and_flush with pp_flush.
6895
9f04a53e
MS
68962016-01-20 Martin Sebor <msebor@redhat.com>
6897
6898 PR c/69405
6899 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6900 an incompatible argument when the argument isn't a valid tree node.
6901
7f26f7df
JM
69022016-01-18 Jason Merrill <jason@redhat.com>
6903
6904 PR c++/68767
6905 * c-common.c (check_function_arguments_recurse): Fold the whole
6906 COND_EXPR, not just the condition.
6907
f62bf092
TV
69082016-01-18 Tom de Vries <tom@codesourcery.com>
6909
6910 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6911 classify as loop clause.
6912
e0a575ff
JJ
69132016-01-15 Jakub Jelinek <jakub@redhat.com>
6914
6915 PR bootstrap/68271
6916 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6917 C++ FE no longer has limit on number of pragmas.
6918
69192015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6920
6921 PR c++/69048
6922 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6923 to add missing cleanup point.
b6e3db06 6924
c7df95d8
DM
69252016-01-14 David Malcolm <dmalcolm@redhat.com>
6926
6927 PR c++/68819
6928 * c-indentation.c (get_visual_column): Add location_t param.
6929 Handle the column number being zero by effectively disabling the
6930 warning, with an "inform".
6931 (should_warn_for_misleading_indentation): Add location_t argument
6932 for all uses of get_visual_column.
6933
21efdd80
PP
69342016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6935
6936 PR c++/69029
6937 * c-indentation.c (should_warn_for_misleading_indentation):
6938 Don't warn about do-while statements.
6939
7a127fa7
MS
69402016-01-07 Martin Sebor <msebor@redhat.com>
6941
6942 PR c/68966
6943 * c-common.c (sync_resolve_size): Reject first argument when it's
6944 a pointer to _Bool.
6945
c589e975
DM
69462016-01-05 David Malcolm <dmalcolm@redhat.com>
6947
6948 PR c/69122
6949 * c-indentation.c (get_visual_column): Remove default argument.
6950 (should_warn_for_misleading_indentation): For the multiline case,
6951 update call to get_visual_column for next_stmt_exploc so that it
6952 captures the location of the first non-whitespace character in the
6953 relevant line. Don't issue warnings if there is non-whitespace
6954 before the next statement.
6955
818ab71a
JJ
69562016-01-04 Jakub Jelinek <jakub@redhat.com>
6957
6958 Update copyright years.
6959
745e411d
DM
69602015-12-21 David Malcolm <dmalcolm@redhat.com>
6961
6962 * c-common.c (binary_op_error): Convert first param from
6963 location_t to rich_location * and use it when emitting an error.
6964 * c-common.h (binary_op_error): Convert first param from
6965 location_t to rich_location *.
6966
de67c4c3
DM
69672015-12-16 David Malcolm <dmalcolm@redhat.com>
6968
6969 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6970 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6971
4a38b02b
IV
69722015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6973
6974 * c-common.c (c_common_attribute_table): Handle "omp declare target
6975 link" attribute.
6976
54d62f51
JJ
69772015-12-14 Jakub Jelinek <jakub@redhat.com>
6978
6979 PR c/68833
6980 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6981
8d4227c8
TB
69822014-12-12 Tobias Burnus <burnus@net-b.de>
6983
6984 PR fortran/68815
6985 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6986 specifiers (%d, %i,%u and %c).
6987
f6069ccc
DM
69882015-12-10 David Malcolm <dmalcolm@redhat.com>
6989
6990 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6991
63bbf46d
JJ
69922015-12-08 Jakub Jelinek <jakub@redhat.com>
6993
6994 PR c/48088
6995 PR c/68657
6996 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6997 * c-pragma.c (handle_pragma_diagnostic): Adjust
6998 control_warning_option caller.
6999
f79520bb
DM
70002015-12-07 David Malcolm <dmalcolm@redhat.com>
7001
7002 * c-common.c (c_cpp_error): Update for change to
7003 rich_location::set_range.
7004
b3d5bc62
JJ
70052015-12-04 Paolo Bonzini <bonzini@gnu.org>
7006
7007 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7008 shifting 1 out of the sign bit.
7009
70102015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7011
7012 * c-common.c (c_common_attribute_table[]): Update max arguments
7013 count for "simd" attribute.
7014 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7015
6eb4a537
JJ
70162015-12-03 Jakub Jelinek <jakub@redhat.com>
7017
7018 PR preprocessor/57580
7019 * c-ppoutput.c (print): Change printed field to bool.
7020 Move src_file last for smaller padding.
7021 (init_pp_output): Set print.printed to false instead of 0.
7022 (scan_translation_unit): Fix up formatting. Set print.printed
7023 to true after printing something other than newline.
7024 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7025 (maybe_print_line_1): Set print.printed to false instead of 0.
7026 (print_line_1): Likewise.
7027 (do_line_change): Set print.printed to true instead of 1.
7028 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7029 dump_macro): Set print.printed to false after printing newline.
7030
4250754e
JM
70312015-12-02 Jason Merrill <jason@redhat.com>
7032
f479b43d
JM
7033 * c-common.c (fold_for_warn): New.
7034 (warn_logical_operator, warn_tautological_cmp)
7035 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7036
4250754e
JM
7037 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7038 (c_fully_fold_internal, decl_constant_value_for_optimization):
7039 Move to c/c-fold.c.
7040 * c-common.h: Don't declare decl_constant_value_for_optimization.
7041
e9e32ee6
JM
70422015-12-02 Joseph Myers <joseph@codesourcery.com>
7043
7044 PR c/68162
7045 * c-common.h (c_build_qualified_type): Add extra default
7046 arguments.
7047
37d5ad46
JB
70482015-12-01 Julian Brown <julian@codesourcery.com>
7049 Cesar Philippidis <cesar@codesourcery.com>
7050 James Norris <James_Norris@mentor.com>
7051
7052 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7053 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7054 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7055
f07862c7
EB
70562015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7057
7058 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7059 (decl_sloc_common): Delete and move bulk of processing to...
7060 (decl_sloc): ...here.
7061 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7062 (dump_ada_double_name): Remove S parameter and compute the suffix.
7063 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7064 element type and deal with an anonymous one.
7065 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7066 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7067 and remove reference to QUAL_UNION_TYPE.
7068 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7069 (dump_nested_type): ...here. New function extracted from above.
7070 Generate a full declaration for anonymous element type of arrays.
7071 (print_ada_declaration): Really skip anonymous declarations. Remove
7072 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7073 Clean up processing of declarations of array types and objects.
7074 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7075 Remove obsolete code and tidy up.
7076
75c8aac3
JH
70772015-11-29 Jan Hubicka <hubicka@ucw.cz>
7078
7079 PR c/67581
7080 * c-common.c (handle_transparent_union_attribute): Update
7081 also type variants.
7082
b58d3df2
ML
70832015-11-27 Martin Liska <mliska@suse.cz>
7084
7085 PR c++/68312
7086 * array-notation-common.c (cilkplus_extract_an_triplets):
7087 Release vector of vectors.
7088 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7089
89a01fcf
EB
70902015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7091
7092 PR c++/68527
7093 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7094 (print_ada_struct_decl): Likewise.
7095
cc5c5226
IZ
70962015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7097
7098 PR c++/68001
7099 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7100 * cilk.c (recognize_spawn): Determine location in a more precise
7101 way.
7102
269adb9d
JM
71032015-11-19 Jason Merrill <jason@redhat.com>
7104
7105 * c-common.c (shorten_compare): But look through macros from
7106 system headers.
7107
d0eccfcd
JM
71082015-11-18 Jason Merrill <jason@redhat.com>
7109
7110 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7111 non-constant operand comes from a macro.
7112
3e44547c
JM
71132015-11-17 Jason Merrill <jason@redhat.com>
7114
7115 PR bootstrap/68346
7116 * c-common.c (warn_tautological_cmp): Fold before checking for
7117 constants.
7118
0f62c7a0
MP
71192015-11-16 Marek Polacek <polacek@redhat.com>
7120
7121 PR c++/68362
7122 * c-common.c (check_case_bounds): Fold low and high cases.
7123
a868811e
MP
71242015-11-16 Marek Polacek <polacek@redhat.com>
7125
7126 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7127 * c-common.c (c_common_get_alias_set): Likewise.
7128 (handle_visibility_attribute): Likewise.
7129
fff77217
KY
71302015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7131
7132 * c-common.c (handle_simd_attribute): New.
7133 (struct attribute_spec): Add entry for "simd".
7134 (handle_simd_attribute): New.
7135
269e63b7
KT
71362015-11-13 Kai Tietz <ktietz70@googlemail.com>
7137
7138 * c-lex.c (interpret_float): Use fold_convert.
7139
ebedc9a3
DM
71402015-11-13 David Malcolm <dmalcolm@redhat.com>
7141
7142 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7143 and store it on the result.
7144 * c-opts.c (c_common_init_options): Set
7145 global_dc->colorize_source_p.
7146
6e232ba4
JN
71472015-11-12 James Norris <jnorris@codesourcery.com>
7148 Joseph Myers <joseph@codesourcery.com>
7149
7365279f 7150 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7151 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7152 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7153 PRAGMA_OACC_CLAUSE_LINK.
7154
e78bede6
MP
71552015-11-11 Marek Polacek <polacek@redhat.com>
7156
7157 PR c/68107
7158 PR c++/68266
7159 * c-common.c (valid_array_size_p): New function.
7160 * c-common.h (valid_array_size_p): Declare.
7161
3f8257db 71622015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7163
7164 PR bootstrap/68271
7165 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7166
69f293c9
AM
71672015-11-11 Andrew MacLeod <amacleod@redhat.com>
7168
7169 * array-notation-common.c: Remove unused header files.
7170 * c-ada-spec.c: Likewise.
7171 * c-cilkplus.c: Likewise.
7172 * c-common.c: Likewise.
7173 * c-cppbuiltin.c: Likewise.
7174 * c-dump.c: Likewise.
7175 * c-format.c: Likewise.
7176 * c-gimplify.c: Likewise.
7177 * c-indentation.c: Likewise.
7178 * c-lex.c: Likewise.
7179 * c-omp.c: Likewise.
7180 * c-opts.c: Likewise.
7181 * c-pch.c: Likewise.
7182 * c-ppoutput.c: Likewise.
7183 * c-pragma.c: Likewise.
7184 * c-pretty-print.c: Likewise.
7185 * c-semantics.c: Likewise.
7186 * c-ubsan.c: Likewise.
7187 * cilk.c: Likewise.
7188 * stub-objc.c: Likewise.
7189
3a40d81d
NS
71902015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7191 Cesar Philippidis <cesar@codesourcery.com>
7192 James Norris <jnorris@codesourcery.com>
7193 Julian Brown <julian@codesourcery.com>
7194 Nathan Sidwell <nathan@codesourcery.com>
7195
7196 * c-pragma.c (oacc_pragmas): Add "routine".
7197 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7198
ee45a32d
EB
71992015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7200
7201 * c-common.c (c_common_attributes): Add scalar_storage_order.
7202 (handle_scalar_storage_order_attribute): New function.
7203 * c-pragma.c (global_sso): New variable.
7204 (maybe_apply_pragma_scalar_storage_order): New function.
7205 (handle_pragma_scalar_storage_order): Likewise.
7206 (init_pragma): Register scalar_storage_order.
7207 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7208 * c.opt (Wscalar-storage-order): New warning.
7209 (fsso-struct=): New option.
7210
eb11eb15
MS
72112015-11-08 Martin Sebor <msebor@redhat.com>
7212
7213 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7214
0aad0198
RS
72152015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7216
7217 * c-common.c: Don't undef DEF_BUILTIN.
7218
8a645150
DM
72192015-11-06 David Malcolm <dmalcolm@redhat.com>
7220
7221 * c-common.c (c_cpp_error): Convert parameter from location_t to
7222 rich_location *. Eliminate the "column_override" parameter and
7223 the call to diagnostic_override_column.
7224 Update the "done_lexing" clause to set range 0
7225 on the rich_location, rather than overwriting a location_t.
7226 * c-common.h (c_cpp_error): Convert parameter from location_t to
7227 rich_location *. Eliminate the "column_override" parameter.
7228
7a5e4956
CP
72292015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7230 Thomas Schwinge <thomas@codesourcery.com>
7231 James Norris <jnorris@codesourcery.com>
7232
7233 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7234 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7235 clauses with parallel and kernels and loops.
7236 * c-pragma.h (enum pragma_omp_clause): Add entries for
7237 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7238 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7239 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7240 INDEPENDENT,SEQ}.
7241 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7242
e2f5cc96
MS
72432015-11-05 Martin Sebor <msebor@redhat.com>
7244
7245 PR c++/67942
7246 * c.opt (-Wplacement-new): New option.
7247
e01d41e5
JJ
72482015-11-05 Jakub Jelinek <jakub@redhat.com>
7249
7250 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7251 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7252 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7253 save_expr or create_tmp_var* if TEST is true.
7254 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7255 Don't call add_stmt here.
7256 (struct c_omp_check_loop_iv_data): New type.
7257 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7258 c_omp_check_loop_iv_exprs): New functions.
7259 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7260 distribute.
7261 (c_omp_declare_simd_clauses_to_numbers): Change
7262 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7263 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7264 from numbers to PARM_DECLs.
7265
595278be
MM
72662015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7267
7268 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7269 flag_checking.
7270
3f8257db 72712015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7272
7273 PR c++-common/67882
b3d5bc62
JJ
7274 * c-common.h (fold_offsetof_1): Add argument.
7275 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7276 offsetof expressions that reference elements past the end of
7277 an array.
7278
4bf9e5a8
TS
72792015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7280 Chung-Lin Tang <cltang@codesourcery.com>
7281
7282 * c-pragma.c (oacc_pragmas): Add "atomic".
7283 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7284
3b1661a9
ES
72852015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7286
7287 * c-common.c (handle_target_clones_attribute): New.
7288 (c_common_attribute_table): Add handle_target_clones_attribute.
7289 (handle_always_inline_attribute): Add check on target_clones attribute.
7290 (handle_target_attribute): Ditto.
7291
2adfab87
AM
72922015-10-29 Andrew MacLeod <amacleod@redhat.com>
7293
7294 * array-notation-common.c: Reorder #include's and remove duplicates.
7295 * c-ada-spec.c: Likewise.
7296 * c-cilkplus.c: Likewise.
7297 * c-common.c: Likewise.
7298 * c-cppbuiltin.c: Likewise.
7299 * c-dump.c: Likewise.
7300 * c-format.c: Likewise.
7301 * c-gimplify.c: Likewise.
7302 * c-indentation.c: Likewise.
7303 * c-lex.c: Likewise.
7304 * c-omp.c: Likewise.
7305 * c-opts.c: Likewise.
7306 * c-pch.c: Likewise.
7307 * c-ppoutput.c: Likewise.
7308 * c-pragma.c: Likewise.
7309 * c-pretty-print.c: Likewise.
7310 * c-semantics.c: Likewise.
7311 * c-ubsan.c: Likewise.
7312 * cilk.c: Likewise.
7313 * stub-objc.c: Likewise.
7314
d90ec4f2
JM
73152015-10-28 Jason Merrill <jason@redhat.com>
7316
7317 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7318
88bae6f4
TS
73192015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7320 James Norris <jnorris@codesourcery.com>
7321 Cesar Philippidis <cesar@codesourcery.com>
7322
7323 PR c/64765
7324 PR c/64880
7325 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7326 * c-omp.c (c_oacc_split_loop_clauses): New function.
7327
b1726d6c
MS
73282015-10-21 Martin Sebor <msebor@redhat.com>
7329
7330 PR driver/68043
7331 * c.opt: End each sentence that describes an option with a period.
7332
fa60eeb9
MP
73332015-10-20 Marek Polacek <polacek@redhat.com>
7334
7335 * array-notation-common.c (is_cilkplus_vector_p): Define.
7336 * c-common.h (is_cilkplus_vector_p): Declare.
7337
95979049
MP
73382015-10-20 Marek Polacek <polacek@redhat.com>
7339
7340 * c.opt (std=gnu++11): Do not describe as experimental.
7341 (std=gnu++14): Likewise.
7342
2a9fb712
JM
73432015-10-19 Jason Merrill <jason@redhat.com>
7344
7345 * c-cppbuiltin.c (c_cpp_builtins): Define
7346 __cpp_nontype_template_args.
7347
13b380a3
JM
73482015-10-19 Jason Merrill <jason@redhat.com>
7349
7350 * c-cppbuiltin.c (c_cpp_builtins): Define
7351 __cpp_enumerator_attributes, __cpp_fold_expressions,
7352 __cpp_unicode_characters.
7353
d9a6bd32
JJ
73542015-10-13 Jakub Jelinek <jakub@redhat.com>
7355 Aldy Hernandez <aldyh@redhat.com>
7356
7357 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7358 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7359 (c_define_builtins): Likewise.
7360 * c-common.h (enum c_omp_clause_split): Add
7361 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7362 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7363 (c_finish_omp_for): Add ORIG_DECLV argument.
7364 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7365 201511 instead of 201307.
7366 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7367 OMP_CRITICAL_CLAUSES to it.
7368 (c_finish_omp_ordered): Add CLAUSES argument, set
7369 OMP_ORDERED_CLAUSES to it.
7370 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7371 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7372 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7373 constructs and new OpenMP 4.5 clauses. Clear
7374 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7375 verification code.
7376 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7377 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7378 (enum pragma_omp_clause): Add
7379 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7380 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7381
624d31fe
RS
73822015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7383
7384 * c-lex.c (interpret_float): Use real_equal instead of
7385 REAL_VALUES_EQUAL.
7386
b8fd7909
JM
73872015-10-04 Jason Merrill <jason@redhat.com>
7388
7389 Implement N4514, C++ Extensions for Transactional Memory.
7390 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7391 (c_common_attribute_table): Add transaction_safe_dynamic.
7392 transaction_safe now affects type identity.
7393 (handle_tm_attribute): Handle transaction_safe_dynamic.
7394 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7395 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7396 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7397 (D_TRANSMEM): New.
7398 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7399 * c-pretty-print.c (pp_c_attributes_display): Don't print
7400 transaction_safe in C++.
7401
12651878
MP
74022015-10-02 Marek Polacek <polacek@redhat.com>
7403
7404 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7405
3e3b8d63
MP
74062015-10-02 Marek Polacek <polacek@redhat.com>
7407
7408 PR c/64249
7409 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7410 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7411 * c.opt (Wduplicated-cond): New option.
7412
0d1a8f75
JM
74132015-10-01 Joseph Myers <joseph@codesourcery.com>
7414
7415 * c.opt (std=c11): Do not describe as experimental.
7416 (std=gnu11): Likewise.
7417 (std=iso9899:2011): Likewise.
7418
3e32ee19
NS
74192015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7420
7421 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7422 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7423
974348ee
MP
74242015-09-25 Marek Polacek <polacek@redhat.com>
7425
7426 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7427 (ubsan_instrument_shift): Likewise.
7428
15dbc1a6
MP
74292015-09-25 Marek Polacek <polacek@redhat.com>
7430
7431 PR sanitizer/64906
7432 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7433
6b95d7cc
PP
74342015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7435
7436 * c-indentation.c (should_warn_for_misleading_indentation):
7437 Compare next_stmt_vis_column with guard_line_first_nws instead
7438 of with guard_line_vis_column.
7439
c1822f9c
MLI
74402015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7441
7442 PR c/49654
7443 PR c/49655
7444 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7445 options and options not valid for the current language.
7446
d5398058
PP
74472015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7448
7449 * c-indentation.c (should_warn_for_misleading_indentation):
7450 Float out and consolidate the calls to get_visual_column that
7451 are passed guard_exploc as an argument. Compare
7452 next_stmt_vis_column with guard_line_first_nws instead of with
7453 body_line_first_nws.
7454
6b333269
NS
74552015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7456
7457 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7458 Wnamespaces): New C++ warnings.
7459
a75f1574
JM
74602015-09-22 Jason Merrill <jason@redhat.com>
7461
7462 * c-common.h (abi_compat_version_crosses): New.
7463 (warn_abi_version): Declare.
7464 * c-common.c: Define it.
7465 * c-opts.c (c_common_post_options): Handle it.
7466 flag_abi_compat_version defaults to 8.
7467
bdaaa8b7
VV
74682015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7469
7470 Complete the implementation of N4230, Nested namespace definition.
7471 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7472 __cpp_nested_namespace_definitions.
7473
eaa797e8
MLI
74742015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7475
7476 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7477
c4914de6
MLI
74782015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7479
7480 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7481 when warning.
7482 * c-pragma.h (pragma_lex): Add optional loc argument.
7483
fcb87c50
MM
74842015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7485
7486 * c-format.c (check_format_arg): Adjust to use common block size in all
7487 object pools.
7488
31bdd08a
DM
74892015-09-15 David Malcolm <dmalcolm@redhat.com>
7490
7491 * c-format.c (location_from_offset): Update for change in
7492 signature of location_get_source_line.
7493 * c-indentation.c (get_visual_column): Likewise.
7494 (line_contains_hash_if): Likewise.
7495
aa9f4b4c
MP
74962015-09-14 Marek Polacek <polacek@redhat.com>
7497
7498 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7499 setting various warnings.
7500
aa256c4a
MP
75012015-09-14 Marek Polacek <polacek@redhat.com>
7502
7503 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7504 a negative value.
7505
0f876f22
MW
75062015-09-11 Mark Wielaard <mjw@redhat.com>
7507
7508 PR c/28901
7509 * c.opt (Wunused-variable): Option from common.opt.
7510 (Wunused-const-variable): New option.
7511
273aa49e
PC
75122015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7513
7514 PR c++/53184
7515 * c.opt ([Wsubobject-linkage]): Add.
7516
1807ffc1
MS
75172015-09-03 Martin Sebor <msebor@redhat.com>
7518
7519 PR c/66516
7520 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7521 functions.
7522 * c-common.c (reject_gcc_builtin): Define.
7523
38942840
BI
75242015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7525
7526 PR middle-end/60586
7527 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7528 prototype.
7529 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7530 cilk_gimplify_call_params_in_spawned_fn.
7531 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7532 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7533 unwrapping.
7534
c316b5e4
MP
75352015-08-25 Marek Polacek <polacek@redhat.com>
7536
7537 PR middle-end/67330
7538 * c-common.c (handle_weak_attribute): Don't check whether the
7539 visibility can be changed here.
7540
584a7c46
MLI
75412015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7542
7543 * c-lex.c (c_lex_with_flags): Use explicit locations.
7544
a79683d5
TS
75452015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7546
7547 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7548 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7549
61717a45
FXC
75502015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7551
7552 PR middle-end/36757
7553 * c-common.c (check_builtin_function_arguments): Add check
7554 for BUILT_IN_SIGNBIT argument.
7555
329524f5
PC
75562015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7557
7558 PR c++/67160
7559 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7560 in c++1z mode.
7561
4ee55665
MP
75622015-08-17 Marek Polacek <polacek@redhat.com>
7563
7564 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7565 with whitespaces before qualifier names.
7566
b893e375
MP
75672015-08-12 Marek Polacek <polacek@redhat.com>
7568
7569 PR c++/55095
7570 * c-common.c (maybe_warn_shift_overflow): Properly handle
7571 left-shifting 1 into the sign bit.
7572
c2d89095
MLI
75732015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7574
7575 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7576
971e17ff
AS
75772015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7578 Braden Obrzut <admin@maniacsvault.net>
7579 Jason Merrill <jason@redhat.com>
7580
7581 Add C++ Concepts TS support.
7582 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7583 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7584 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7585 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7586 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7587 * c.opt (fconcepts): New.
7588
b3d5bc62
JJ
75892015-08-02 Martin Sebor <msebor@redhat.com>
7590
7591 * c.opt (-Wframe-address): New warning option.
7592
8ebca419
PP
75932015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7594
7595 * c-indentation.c (should_warn_for_misleading_indentation):
7596 Improve heuristics.
7597
1a1e101f
PP
75982015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7599
7600 * c-indentation.c (get_visual_column): Add parameter first_nws,
7601 use it. Update comment documenting the function.
7602 (is_first_nonwhitespace_on_line): Remove.
7603 (should_warn_for_misleading_indentation): Replace usage of
7604 of is_first_nonwhitespace_on_line with get_visual_column.
7605
992118a1
PP
76062015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7607
7608 * c-indentation.h (struct token_indent_info): Define.
7609 (get_token_indent_info): Define.
7610 (warn_for_misleading_information): Declare.
7611 * c-common.h (warn_for_misleading_information): Remove.
7612 * c-identation.c (warn_for_misleading_indentation):
7613 Change declaration to take three token_indent_infos. Adjust
7614 accordingly.
7615 * c-identation.c (should_warn_for_misleading_indentation):
7616 Likewise. Bail out early if the body is a compound statement.
7617 (guard_tinfo_to_string): Define.
7618
e8fa3817
JM
76192015-07-30 Jason Merrill <jason@redhat.com>
7620
7621 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7622 '*' for reference decay.
7623
173864e8
MP
76242015-07-30 Marek Polacek <polacek@redhat.com>
7625
7626 * c-common.c (warn_tautological_cmp): Bail for float types.
7627
f2afe6dd
MP
76282015-07-27 Marek Polacek <polacek@redhat.com>
7629
7630 PR bootstrap/67030
7631 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7632
05b28fd6
MP
76332015-07-27 Marek Polacek <polacek@redhat.com>
7634
7635 PR c++/66555
7636 PR c/54979
7637 * c-common.c (find_array_ref_with_const_idx_r): New function.
7638 (warn_tautological_cmp): New function.
7639 * c-common.h (warn_tautological_cmp): Declare.
7640 * c.opt (Wtautological-compare): New option.
7641
5a5062b8
MP
76422015-07-23 Marek Polacek <polacek@redhat.com>
7643
7644 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7645 (ubsan_instrument_shift): Likewise.
7646
dc891fe7
MP
76472015-07-23 Marek Polacek <polacek@redhat.com>
7648
7649 PR sanitizer/66908
7650 * c-ubsan.c: Include gimplify.h.
7651 (ubsan_instrument_division): Unshare OP0 and OP1.
7652 (ubsan_instrument_shift): Likewise.
7653
451b5e48
MP
76542015-07-20 Marek Polacek <polacek@redhat.com>
7655 Richard Sandiford <richard.sandiford@arm.com>
7656
7657 PR c++/55095
7658 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7659 Use EXPR_LOC_OR_LOC.
7660 (maybe_warn_shift_overflow): New function.
7661 * c-common.h (maybe_warn_shift_overflow): Declare.
7662 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7663 * c.opt (Wshift-overflow): New option.
7664
fb0b2914
ML
76652015-07-16 Martin Liska <mliska@suse.cz>
7666
7667 * c-format.c (static void check_format_info_main): Use
7668 object_allocator instead of pool_allocator.
7669 (check_format_arg): Likewise.
7670 (check_format_info_main): Likewise.
7671
903f5c23
AM
76722015-07-15 Andrew MacLeod <amacleod@redhat.com>
7673
7674 * c-opts.c: Remove multiline #include comment.
7675
026c3cfd
AH
76762015-07-12 Aldy Hernandez <aldyh@redhat.com>
7677
7678 * c-common.c: Fix double word typos.
7679
bb49ee66
EB
76802015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7681
7682 * c-ada-spec.h (cpp_operation): Revert latest change.
7683 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7684 constructors and destructors.
7685
1916bcb5
AM
76862015-07-09 Andrew MacLeod <amacleod@redhat.com>
7687
7688 * c-common.h: Adjust includes for flags.h changes.
7689 * stub-objc.c: Likewise.
026c3cfd 7690
a9dcd529
EB
76912015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7692
7693 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7694 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7695
b03b462f
JJ
76962015-07-08 Jakub Jelinek <jakub@redhat.com>
7697
7698 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7699 are to be removed, return NULL rather than original clauses list.
7700
c7131fb2
AM
77012015-07-07 Andrew MacLeod <amacleod@redhat.com>
7702
7703 * array-notation-common.c: Adjust includes.
7704 * c-ada-spec.c: Likewise.
7705 * c-cilkplus.c: Likewise.
7706 * c-common.h: Likewise.
7707 * c-cppbuiltin.c: Likewise.
7708 * c-dump.c: Likewise.
7709 * c-format.c: Likewise.
7710 * c-gimplify.c: Likewise.
7711 * c-indentation.c: Likewise.
7712 * c-lex.c: Likewise.
7713 * c-omp.c: Likewise.
7714 * c-opts.c: Likewise.
7715 * c-pch.c: Likewise.
7716 * c-ppoutput.c: Likewise.
7717 * c-pragma.c: Likewise.
7718 * c-pretty-print.c: Likewise.
7719 * c-semantics.c: Likewise.
7720 * c-ubsan.c: Likewise.
7721 * cilk.c: Likewise.
7722 * stub-objc.c: Likewise.
7723
2a7fb83f
EB
77242015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7725
7726 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7727 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7728
a03c9bf1
JM
77292015-07-01 Jason Merrill <jason@redhat.com>
7730
36a85135
JM
7731 * c-common.h (D_CXX11): Rename from D_CXX0X.
7732 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7733 * c-common.c: Adjust.
7734
e7fa68d5
JM
7735 * c-opts.c (c_common_post_options): Default to C++14.
7736
a03c9bf1
JM
7737 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7738
fe95b036
ESR
77392015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7740
7741 Implement N4197 - Adding u8 character literals
b3d5bc62 7742 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7743 CPP_CHAR.
b3d5bc62 7744 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7745 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7746 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7747 and CPP_UTF8CHAR tokens.
7748 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7749
da2e71c9
MLI
77502015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7751
7752 PR fortran/66605
7753 * c-common.c (do_warn_unused_parameter): Move here.
7754 * c-common.h (do_warn_unused_parameter): Declare.
7755
b155cfd9
MP
77562015-06-29 Marek Polacek <polacek@redhat.com>
7757
7758 PR c/66322
7759 * c-common.c (check_case_bounds): Add bool * parameter. Set
7760 OUTSIDE_RANGE_P.
7761 (c_add_case_label): Add bool * parameter. Pass it down to
7762 check_case_bounds.
7763 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7764 warning here.
7765 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7766 declarations.
7767
31521951
MP
77682015-06-27 Marek Polacek <polacek@redhat.com>
7769
7770 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7771 or VECTOR_INTEGER_TYPE_P throughout.
7772 * c-gimplify.c: Likewise.
7773
22d03525
MP
77742015-06-26 Marek Polacek <polacek@redhat.com>
7775
7776 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7777 * c-common.c (c_fully_fold_internal): Likewise.
7778 (c_alignof_expr): Likewise.
7779 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7780 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7781 * cilk.c (create_parm_list): Likewise.
22d03525 7782
af05e6e5
MP
77832015-06-26 Marek Polacek <polacek@redhat.com>
7784
7785 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7786
f0889939
AM
77872015-06-25 Andrew MacLeod <amacleod@redhat.com>
7788
7789 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7790 * c-gimplify.c: Likewise.
7791 * c-pragma.c: Likewise.
7792 * c-ubsan.c: Likewise.
7793 * cilk.c: Likewise.
7794
ca752f39
RS
77952015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7796
7797 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7798 ggc_hasher.
7799
16a16ec7
AM
78002015-06-25 Andrew MacLeod <amacleod@redhat.com>
7801
7802 * cilk.c: Move calls.h after tm.h in the include chain.
7803
0ae9bd27
MP
78042015-06-25 Marek Polacek <polacek@redhat.com>
7805
7806 * array-notation-common.c: Use VAR_P throughout.
7807 * c-ada-spec.c: Likewise.
7808 * c-common.c: Likewise.
7809 * c-format.c: Likewise.
7810 * c-gimplify.c: Likewise.
7811 * c-omp.c: Likewise.
7812 * c-pragma.c: Likewise.
7813 * c-pretty-print.c: Likewise.
7814 * cilk.c: Likewise.
7815
62f9079a
MP
78162015-06-25 Marek Polacek <polacek@redhat.com>
7817
7818 * cilk.c (extract_free_variables): Use is_global_var.
7819
0fa16060
RS
78202015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7821
7822 * c-common.c: Don't include target-def.h.
7823
a68ae2e1
MP
78242015-06-23 Marek Polacek <polacek@redhat.com>
7825
7826 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7827 when comparing INTEGER_CSTs.
7828
c6a2f2d9
PMR
78292015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7830
7831 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7832 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7833 (dump_ada_template): Skip partially specialized types.
7834
6b4db501
MM
78352015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7836
7837 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7838 swapping.
7839
abb226c9
AM
78402015-06-17 Andrew MacLeod <amacleod@redhat.com>
7841
7842 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7843 * c-ada-spec.c: Likewise.
7844 * c-cilkplus.c: Likewise.
7845 * c-common.c: Likewise.
7846 * c-common.h: Likewise.
7847 * c-cppbuiltin.c: Likewise.
7848 * c-dump.c: Likewise.
7849 * c-format.c: Likewise.
7850 * c-gimplify.c: Likewise.
7851 * c-indentation.c: Likewise.
7852 * c-lex.c: Likewise.
7853 * c-omp.c: Likewise.
7854 * c-opts.c: Likewise.
7855 * c-pch.c: Likewise.
7856 * c-ppoutput.c: Likewise.
7857 * c-pragma.c: Likewise.
7858 * c-pretty-print.c: Likewise.
7859 * c-semantics.c: Likewise.
7860 * c-ubsan.c: Likewise.
7861 * cilk.c: Likewise.
7862 * stub-objc.c: Likewise.
7863
076fecad
PP
78642015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7865
7866 PR c++/65168
7867 * c-common.c (c_common_truthvalue_conversion): Warn when
7868 converting an address of a reference to a truth value.
7869
13fdf2e2
AM
78702015-06-08 Andrew MacLeod <amacleod@redhat.com>
7871
7872 * array-notation-common.c : Adjust include files.
7873 * c-ada-spec.c : Likewise.
7874 * c-cilkplus.c : Likewise.
7875 * c-common.c : Likewise.
7876 * c-common.h : Likewise.
7877 * c-cppbuiltin.c : Likewise.
7878 * c-dump.c : Likewise.
7879 * c-format.c : Likewise.
7880 * c-gimplify.c : Likewise.
7881 * c-indentation.c : Likewise.
7882 * c-lex.c : Likewise.
7883 * c-omp.c : Likewise.
7884 * c-opts.c : Likewise.
7885 * c-pch.c : Likewise.
7886 * c-ppoutput.c : Likewise.
7887 * c-pragma.c : Likewise.
7888 * c-pretty-print.c : Likewise.
7889 * c-semantics.c : Likewise.
7890 * c-ubsan.c : Likewise.
7891 * cilk.c : Likewise.
7892 * stub-objc.c : Likewise.
7893
a1661b90
MP
78942015-06-08 Marek Polacek <polacek@redhat.com>
7895
7896 PR c/66415
7897 * c-format.c (location_from_offset): Return LOC if LINE is null.
7898
d7438551
AH
78992015-06-05 Aldy Hernandez <aldyh@redhat.com>
7900
7901 * c-common.h (c_parse_final_cleanups): New prototype.
7902 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7903
b3d5bc62
JJ
79042015-06-04 Sriraman Tallam <tmsriram@google.com>
7905
7906 * c-common.c (noplt): New attribute.
7907 (handle_noplt_attribute): New handler.
7908
ecb9f223
AM
79092015-06-04 Andrew MacLeod <amacleod@redhat.com>
7910
7911 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7912 * c-ada-spec.c: Likewise.
7913 * c-cilkplus.c: Likewise.
7914 * c-common.c: Likewise.
7915 * c-common.h: Likewise.
7916 * c-cppbuiltin.c: Likewise.
7917 * c-dump.c: Likewise.
7918 * c-format.c: Likewise.
7919 * c-gimplify.c: Likewise.
7920 * c-indentation.c: Likewise.
7921 * c-lex.c: Likewise.
7922 * c-omp.c: Likewise.
7923 * c-opts.c: Likewise.
7924 * c-pch.c: Likewise.
7925 * c-ppoutput.c: Likewise.
7926 * c-pragma.c: Likewise.
7927 * c-pretty-print.c: Likewise.
7928 * c-semantics.c: Likewise.
7929 * c-ubsan.c: Likewise.
7930 * cilk.c: Likewise.
7931 * stub-objc.c: Likewise.
7932
6ac48155
DM
79332015-06-02 David Malcolm <dmalcolm@redhat.com>
7934
7935 PR c/66220:
7936 * c-indentation.c (should_warn_for_misleading_indentation): Use
7937 expand_location rather than expand_location_to_spelling_point.
7938 Don't warn if the guarding statement is more indented than the
7939 next/body stmts.
7940
773ce42e
DM
79412015-06-02 David Malcolm <dmalcolm@redhat.com>
7942
7943 * c-indentation.c (warn_for_misleading_indentation): Bail out
7944 immediately if -Wmisleading-indentation isn't enabled.
7945
4fef8379
ML
79462015-06-01 Martin Liska <mliska@suse.cz>
7947
7948 * c-format.c (check_format_arg):Use new type-based pool allocator.
7949 (check_format_info_main) Likewise.
7950
1edfb384
EB
79512015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7952
7953 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7954 (has_nontrivial_methods): Likewise.
7955
9677ef52
MP
79562015-05-25 Marek Polacek <polacek@redhat.com>
7957
7958 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7959
fd5c817a
MP
79602015-05-22 Marek Polacek <polacek@redhat.com>
7961
7962 PR c/47043
7963 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7964
a2f45fe6 79652015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7966
7967 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7968 STACK_GROWS_DOWNWARD.
7969
a2f45fe6 79702015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7971
7972 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7973 STACK_GROWS_DOWNWARD rather than if it is defined.
7974
0fee2ac2 79752015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7976
0fee2ac2
MLI
7977 PR c/52952
7978 * c-format.c (location_column_from_byte_offset): New.
7979 (location_from_offset): New.
7980 (struct format_wanted_type): Add offset_loc field.
7981 (check_format_info): Move handling of location for extra arguments
7982 closer to the point of warning.
7983 (check_format_info_main): Pass the result of location_from_offset
7984 to warning_at.
7985 (format_type_warning): Pass the result of location_from_offset
7986 to warning_at.
7987
cf4ef6f7
MP
79882015-05-20 Marek Polacek <polacek@redhat.com>
7989
7990 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7991
3a65ee74
MP
79922015-05-20 Marek Polacek <polacek@redhat.com>
7993
7994 * c-ada-spec.c (dump_sloc): Use DECL_P.
7995
21b634ae
MP
79962015-05-20 Marek Polacek <polacek@redhat.com>
7997
7998 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7999 * c-common.c: Likewise.
8000
0e50b624
DM
80012015-05-19 David Malcolm <dmalcolm@redhat.com>
8002
8003 * c-common.h (fe_file_change): Strengthen param from
8004 const line_map * to const line_map_ordinary *.
8005 (pp_file_change): Likewise.
8006 * c-lex.c (fe_file_change): Likewise.
8007 (cb_define): Use linemap_check_ordinary when invoking
8008 SOURCE_LINE.
8009 (cb_undef): Likewise.
8010 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8011 invoking cb_file_change.
8012 (c_finish_options): Likewise.
8013 (push_command_line_include): Likewise.
8014 (cb_file_change): Strengthen param "new_map" from
8015 const line_map * to const line_map_ordinary *.
8016 * c-ppoutput.c (cb_define): Likewise for local "map".
8017 (pp_file_change): Likewise for param "map" and local "from".
8018
fab27f52
MM
80192015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8020
8021 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8022
2fe1d762
TV
80232015-05-18 Tom de Vries <tom@codesourcery.com>
8024
8025 * c-common.c (build_va_arg_1): New function.
8026 (build_va_arg): Add address operator to va_list operand if necessary.
8027
7a37fa90
MM
80282015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8029
8030 PR c/48956
8031 * c-common.c (int_safely_convertible_to_real_p): Define.
8032 (unsafe_conversion_p): Check conversions involving complex types.
8033 (conversion_warning): Add new warning message for conversions which
8034 discard imaginary component.
8035 * c-common.h: (enum conversion_safety): Add new enumerator for such
8036 conversions.
8037
3aa3c9fc
MP
80382015-05-14 Marek Polacek <polacek@redhat.com>
8039
8040 PR c/66066
8041 PR c/66127
8042 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8043 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8044 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8045 use it. If FOR_INT_CONST, require that all evaluated operands be
8046 INTEGER_CSTs.
8047
c3388e62
DM
80482015-05-12 David Malcolm <dmalcolm@redhat.com>
8049
8050 * c-common.h (warn_for_misleading_indentation): New prototype.
8051 * c-indentation.c: New file.
8052 * c.opt (Wmisleading-indentation): New option.
8053
c7b38fd5
TV
80542015-05-12 Tom de Vries <tom@codesourcery.com>
8055
8056 PR tree-optimization/66010
8057 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8058
381bf11e
JM
80592015-05-09 Jason Merrill <jason@redhat.com>
8060
edff0c06
JM
8061 * c-opts.c (c_common_post_options): Also clear
8062 cpp_opts->cpp_warn_cxx11_compat.
8063
129211bc
JM
8064 * c-common.h (enum cxx_dialect): Add cxx_unset.
8065 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8066 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8067
381bf11e
JM
8068 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8069 (std=gnu++0x): Mark as Undocumented.
8070 (std=gnu++1y): Add deprecated message.
8071
fe191308
JM
80722015-05-08 Jason Merrill <jason@redhat.com>
8073
765189ff
JM
8074 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8075 * c-opts.c: Adjust.
8076
fe191308
JM
8077 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8078
755e528f
MP
80792015-05-08 Marek Polacek <polacek@redhat.com>
8080
8081 PR c/64918
8082 * c.opt (Woverride-init-side-effects): New option.
8083
0173bd2a
MP
80842015-05-07 Marek Polacek <polacek@redhat.com>
8085
8086 PR c/65179
8087 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8088 negative value.
8089 * c.opt (Wshift-negative-value): New option.
8090 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8091 when -Wextra and C99/C++11 mode.
8092
e0f0d3b9
MP
80932015-05-07 Marek Polacek <polacek@redhat.com>
8094 Martin Uecker <uecker@eecs.berkeley.edu>
8095
8096 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8097 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8098
8243e2a9
JM
80992015-05-05 Jason Merrill <jason@redhat.com>
8100
8101 * c.opt (Wterminate): New.
8102
577cd070
MP
81032015-04-30 Marek Polacek <polacek@redhat.com>
8104
8105 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8106 require that the non-constant be of a boolean type.
8107
0373796b
JT
81082015-04-29 Josh Triplett <josh@joshtriplett.org>
8109
e0f0d3b9
MP
8110 * c-common.c (handle_section_attribute): Refactor to reduce
8111 nesting and distinguish between error cases.
0373796b 8112
716c0ba6
MP
81132015-04-29 Marek Polacek <polacek@redhat.com>
8114
8115 PR c/64610
8116 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8117 with 0/1.
8118
8848828b
JJ
81192015-04-29 Jakub Jelinek <jakub@redhat.com>
8120
8121 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8122 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8123 HOST_BITS_PER_WIDE_INT.
8124
ecd0e562
TV
81252015-04-28 Tom de Vries <tom@codesourcery.com>
8126
8127 PR tree-optimization/65887
8128 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8129
2a877204 81302015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8131 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8132
8133 * c-ada-spec.c (in_function): Delete.
8134 (dump_generic_ada_node): Do not change in_function and remove the
8135 redundant code dealing with it.
8136 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8137 (print_ada_methods): Output the static member functions in a nested
8138 package after the regular methods as well as associated renamings.
8139
4853031e
MP
81402015-04-24 Marek Polacek <polacek@redhat.com>
8141
8142 PR c/65830
8143 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8144 and OPT_Wshift_count_overflow.
8145
8c2b7f79
MP
8146 PR c/63357
8147 * c-common.c (warn_logical_operator): Warn if the operands have the
8148 same expressions.
8149
b8787813
MP
81502015-04-24 Marek Polacek <polacek@redhat.com>
8151
8152 PR c/61534
8153 * c-common.c (warn_logical_operator): Bail if either operand comes
8154 from a macro expansion.
8155
8fba1830
BRF
81562015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8157
8158 PR target/55143
8159 * c-common.c (c_default_pointer_mode): Add definition.
8160 * c-common.h (c_default_pointer_mode): Add declaration.
8161
17958621
JJ
81622015-03-11 Jakub Jelinek <jakub@redhat.com>
8163
8164 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8165 on record_builtin_type argument.
8166
7ccb1a11
JJ
81672015-03-10 Jakub Jelinek <jakub@redhat.com>
8168
8169 PR c/65120
8170 * c-common.c (warn_logical_not_parentheses): Don't warn for
8171 !x == 0 or !x != 0.
8172
04fd785e
MP
81732015-03-07 Marek Polacek <polacek@redhat.com>
8174
8175 PR sanitizer/65280
8176 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8177 before trying to figure out whether we have a flexible array member.
8178
a4e26206 81792015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8180 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8181
8182 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8183
0d2489f4
EB
81842015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8185
8186 PR ada/65319
8187 * c-ada-spec.c (print_destructor): Remove obsolete code.
8188
83ed54d7
EB
81892015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8190
8191 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8192 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8193 DECL_TEMPLATE_RESULT emulations.
8194 (dump_ada_template)): Add guard for TYPE_METHODS.
8195
7631f0e2
MP
81962015-02-27 Marek Polacek <polacek@redhat.com>
8197
8198 PR c/65040
8199 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8200
d1783ae5
KT
82012015-02-27 Kai Tietz <ktietz@redhat.com>
8202
8203 PR c/35330
8204 * c-pragma.c (handle_pragma_weak): Do not try to create
8205 weak/alias of declarations not being function, or variable
8206 declarations.
8207
56a9f6bc
TS
82082015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8209
8210 PR libgomp/64625
8211 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8212 Remove macros.
8213 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8214
3d5cb23d
MP
82152015-02-16 Marek Polacek <polacek@redhat.com>
8216
8217 PR c/65066
8218 * c-format.c (check_format_types): Handle null param.
8219
fa008882
MP
82202015-02-13 Marek Polacek <polacek@redhat.com>
8221
8222 PR c/65040
8223 * c-format.c (check_format_types): Don't warn about different
8224 signedness if the original value is in the range of WANTED_TYPE.
8225
785f21af
JM
82262015-02-12 Jason Merrill <jason@redhat.com>
8227
8228 PR c++/64956
8229 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8230 to the current highest version.
8231 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8232
4886ec8e
JJ
82332015-02-04 Jakub Jelinek <jakub@redhat.com>
8234
8235 PR c/64824
8236 PR c/64868
8237 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8238 instead of RDIV_EXPR. Use build_binary_op instead of
8239 build2_loc.
8240
40fecdd6
JM
82412015-01-30 Joseph Myers <joseph@codesourcery.com>
8242
8243 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8244 to pass input_location as first argument.
8245
a0c88d06
TV
82462015-01-23 Tom de Vries <tom@codesourcery.com>
8247
8248 PR libgomp/64672
8249 * c.opt (fopenacc): Mark as LTO option.
8250
1506ae0e
TV
82512015-01-23 Tom de Vries <tom@codesourcery.com>
8252
8253 PR libgomp/64707
8254 * c.opt (fopenmp): Mark as LTO option.
8255
31be63ab
JJ
82562015-01-21 Jakub Jelinek <jakub@redhat.com>
8257
8258 PR c/63307
b1726d6c 8259 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8260 (compare_decls): Fix up formatting.
8261
82622015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8263
8264 PR c/63307
8265 * cilk.c: Include vec.h.
8266 (struct cilk_decls): New structure.
8267 (wrapper_parm_cb): Split this function to...
8268 (fill_decls_vec): ...this...
8269 (create_parm_list): ...and this.
8270 (compare_decls): New function.
8271 (for_local_cb): Remove.
8272 (wrapper_local_cb): Ditto.
8273 (build_wrapper_type): For now first traverse and fill vector of
8274 declarations then sort it and then deal with sorted vector.
8275 (cilk_outline): Ditto.
8276 (declare_one_free_variable): Ditto.
8277
6875457f
JM
82782015-01-21 Jason Merrill <jason@redhat.com>
8279
8280 PR c++/64629
8281 * c-format.c (check_format_arg): Call decl_constant_value.
8282
185c9e56
ML
82832015-01-19 Martin Liska <mliska@suse.cz>
8284
8285 * c-common.c (handle_noicf_attribute): New function.
8286
41dbbb37
TS
82872015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8288 Bernd Schmidt <bernds@codesourcery.com>
8289 James Norris <jnorris@codesourcery.com>
8290 Cesar Philippidis <cesar@codesourcery.com>
8291 Ilmir Usmanov <i.usmanov@samsung.com>
8292 Jakub Jelinek <jakub@redhat.com>
8293
8294 * c.opt (fopenacc): New option.
8295 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8296 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8297 New macros.
8298 * c-common.h (c_finish_oacc_wait): New prototype.
8299 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8300 (c_finish_oacc_wait): New function.
8301 * c-pragma.c (oacc_pragmas): New variable.
8302 (c_pp_lookup_pragma, init_pragma): Handle it.
8303 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8304 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8305 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8306 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8307 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8308 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8309 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8310 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8311 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8312 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8313 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8314 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8315 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8316 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8317 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8318 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8319 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8320 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8321 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8322 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8323 PRAGMA_OACC_CLAUSE_WORKER.
8324
3f8257db 83252015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8326
8327 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8328 for the new option fstack-protector_explicit.
8329 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8330 (handle_stack_protect_attribute): New function.
8331
3f8257db 83322015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8333
8334 * c.opt: New option -Warray-bounds=.
8335
adfac8df
JJ
83362015-01-09 Michael Collison <michael.collison@linaro.org>
8337
8338 * array-notation-common.c: Include hash-set.h, machmode.h,
8339 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8340 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8341 * c-ada-spec.c: Ditto.
8342 * c-cilkplus.c: Ditto.
8343 * c-common.c: Include input.h due to flattening of tree.h.
8344 Define macro GCC_C_COMMON_C.
8345 * c-common.h: Flatten tree.h header files into c-common.h.
8346 Remove include of tree-core.h.
8347 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8348 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8349 fold-const.h, wide-int.h, and inchash.h due to
8350 flattening of tree.h.
8351 * c-dump.c: Ditto.
8352 * c-format.c: Flatten tree.h header files into c-common.h.
8353 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8354 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8355 fold-const.h, wide-int.h, and inchash.h due to
8356 flattening of tree.h.
8357 * c-dump.c: Include hash-set.h, machmode.h,
8358 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8359 fold-const.h, wide-int.h, and inchash.h due to
8360 flattening of tree.h.
8361 * c-format.c: Include hash-set.h, machmode.h,
8362 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8363 fold-const.h, wide-int.h, inchash.h and real.h due to
8364 flattening of tree.h.
8365 * c-gimplify.c: Include hash-set.h, machmode.h,
8366 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8367 fold-const.h, wide-int.h, and inchash.h due to
8368 flattening of tree.h.
8369 * cilk.c: Ditto.
8370 * c-lex.c: Ditto.
8371 * c-omp.c: Ditto.
8372 * c-opts.c: Ditto.
8373 * c-pch.c: Ditto.
8374 * c-ppoutput.c: Ditto.
8375 * c-pragma.c: Ditto.
8376 * c-pretty-print.c: Ditto.
8377 * c-semantics.c: Ditto.
8378 * c-ubsan.c: Ditto.
8379 * stub-objc.c: Ditto.
8380
f5481fc4
JM
83812015-01-08 Jason Merrill <jason@redhat.com>
8382
8383 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8384 do_ubsan_in_current_function.
8385 (ubsan_maybe_instrument_reference_or_call): Likewise.
8386 * c-ubsan.h: Declare it.
8387
de35aa66
MS
83882015-01-08 Mike Stump <mikestump@comcast.net>
8389
8390 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8391
4a9a42ab
MP
83922015-01-07 Marek Polacek <polacek@redhat.com>
8393
8394 PR c/64440
8395 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8396 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8397
2f42e5de
TS
83982015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8399
8400 PR c++/31397
8401 * c.opt (Wsuggest-override): New option.
8402
5624e564
JJ
84032015-01-05 Jakub Jelinek <jakub@redhat.com>
8404
8405 Update copyright years.
8406
5bd012f8
MP
84072015-01-05 Marek Polacek <polacek@redhat.com>
8408
8409 PR c/64423
8410 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8411 parameter. Use it.
8412 * c-common.h (warn_array_subscript_with_type_char): Update
8413 declaration.
8414
a7fa8d18
ESR
84152014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8416
8417 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8418 Control macro with flag_sized_deallocation.
8419
3f8257db 84202014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8421
8422 * c.opt (Wdiscarded-array-qualifiers): New option.
8423
1f8d3e84
JJ
84242014-12-19 Jakub Jelinek <jakub@redhat.com>
8425
8426 PR preprocessor/63831
8427 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8428 and __has_cpp_attribute here.
8429 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8430 c_common_has_attribute.
8431 * c-common.h (c_common_has_attribute): New prototype.
8432 * c-lex.c (init_c_lex): Set cb->has_attribute to
8433 c_common_has_attribute instead of cb_has_attribute.
8434 (get_token_no_padding): New function.
8435 (cb_has_attribute): Renamed to ...
8436 (c_common_has_attribute): ... this. No longer static. Use
8437 get_token_no_padding, require ()s, don't build TREE_LIST
8438 unnecessarily, fix up formatting, adjust diagnostics, call
8439 init_attributes.
8440
20b06add
JM
84412014-12-15 Jason Merrill <jason@redhat.com>
8442
8443 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8444 (-Wsized-deallocation): New.
8445 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8446 to on in C++14 and up.
8447
94a073b2
JM
84482014-12-11 Jason Merrill <jason@redhat.com>
8449
acaa5911
JM
8450 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8451
94a073b2
JM
8452 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8453 we aren't complaining about VLAs.
8454
7fb66c15
MP
84552014-12-06 Marek Polacek <polacek@redhat.com>
8456
8457 PR tree-optimization/64183
8458 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8459 shift-expression if it is integer_type_node. Use types_compatible_p.
8460
b731b390
JJ
84612014-11-29 Jakub Jelinek <jakub@redhat.com>
8462
8463 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8464 last argument from create_tmp_var_raw and create_tmp_var calls.
8465 * cilk.c (gimplify_cilk_spawn): Likewise.
8466 * c-omp.c (c_finish_omp_atomic): Likewise.
8467
6a4da643
MP
84682014-11-28 Marek Polacek <polacek@redhat.com>
8469
8470 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8471 instead of unsigned_type_node.
8472
541e35a6
MP
84732014-11-28 Marek Polacek <polacek@redhat.com>
8474
8475 PR c/63862
8476 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8477 to op1_utype.
8478 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8479 expression to unsigned_type_node.
8480
dcc97066
MW
84812014-11-20 Mark Wielaard <mjw@redhat.com>
8482
8483 PR debug/38757
8484 * c-opts.c (set_std_c89): Set lang_hooks.name.
8485 (set_std_c99): Likewise.
8486 (set_std_c11): Likewise.
8487 (set_std_cxx98): Likewise.
8488 (set_std_cxx11): Likewise.
8489 (set_std_cxx14): Likewise.
8490 (set_std_cxx1z): Likewise.
8491
aa7da51a
JJ
84922014-11-21 Jakub Jelinek <jakub@redhat.com>
8493
8494 PR target/63764
8495 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8496 return type to bool.
009a3480 8497 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8498 (convert_vector_to_pointer_for_subscript): Change return type to
8499 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8500 and copy it into a TARGET_EXPR and use that instead of *vecp
8501 directly.
8502
538dd0b7
DM
85032014-11-19 David Malcolm <dmalcolm@redhat.com>
8504
8505 Merger of git branch "gimple-classes-v2-option-3".
8506 * ChangeLog.gimple-classes: New.
8507 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8508 from being just a vec<gimple> to a vec<gbind *>.
8509
c39a5e99
JJ
85102014-11-18 Jakub Jelinek <jakub@redhat.com>
8511
8512 PR sanitizer/63813
8513 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8514 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8515 get_pointer_alignment for non-pointers. Use ptype, or if it is
8516 reference type, corresponding pointer type, as type of kind
8517 argument.
8518 (ubsan_maybe_instrument_reference,
8519 ubsan_maybe_instrument_member_call): Adjust callers.
8520
8537a4a9
MP
85212014-11-15 Marek Polacek <polacek@redhat.com>
8522
8523 PR middle-end/63884
8524 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8525 for NULL fndecl.
8526 (extract_array_notation_exprs): Return for NULL node.
8527
2079956a
JM
85282014-11-12 Joseph Myers <joseph@codesourcery.com>
8529
8530 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8531 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8532
1304953e
JJ
85332014-11-12 Jakub Jelinek <jakub@redhat.com>
8534
8535 PR c/59708
8536 * c-common.c (check_builtin_function_arguments): Handle
8537 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8538
e5e44252
AK
85392014-11-10 Andi Kleen <ak@linux.intel.com>
8540
8541 PR c/60804
8542 * c-common.h (check_no_cilk): Declare.
8543 * cilk.c (get_error_location): New function.
8544 (check_no_cilk): Dito.
8545
e64b984d
AK
85462014-11-10 Andi Kleen <ak@linux.intel.com>
8547
8548 * cilk.c (recognize_spawn): Use expression location
8549 for error message.
8550
13c21655
PC
85512014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8552
8553 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8554
42fd12b1
ESR
85552014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8556
8557 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8558 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8559 (__cpp_range_based_for, __cpp_initializer_lists,
8560 __cpp_delegating_constructors, __cpp_nsdmi,
8561 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8562 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8563 __has_cpp_attribute.
8564 * c-lex.c (cb_has_attribute): New callback CPP function;
8565 (init_c_lex): Set has_attribute callback.
8566
6f450181
RB
85672014-11-04 Richard Biener <rguenther@suse.de>
8568
8569 * c-common.c (shorten_compare): Do not shorten mixed
8570 DFP and non-DFP compares.
8571
26f0e1d6
ESR
85722014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8573
8574 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8575 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8576 Commentary and rearrangement of tests.
8577 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8578 Commentary and rearrangement of tests.
ab20d992 8579 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8580 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8581
ef4bddc2
RS
85822014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8583
8584 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8585 enum from machine_mode.
8586
c582198b
AM
85872014-10-28 Andrew MacLeod <amacleod@redhat.com>
8588
adfac8df
JJ
8589 * c-common.c: Adjust include files.
8590 * c-gimplify.c: Ditto.
8591 * cilk.c: Ditto.
8592 * c-pragma.c: Ditto.
8593 * c-ubsan.c: Ditto.
c582198b 8594
60393bbc
AM
85952014-10-27 Andrew MacLeod <amacleod@redhat.com>
8596
8597 * c-gimplify.c: Adjust include files.
8598
d723bb7c
MLI
85992014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8600
8601 PR c++/53061
8602 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8603 c_common_initialize_diagnostics.
8604 * c-common.h: Likewise.
8605
90f3520e
MP
86062014-10-24 Marek Polacek <polacek@redhat.com>
8607
8608 PR c/56980
8609 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8610 print "struct"/"union"/"enum" for typedefed names.
8611
59d7607a
MP
86122014-10-23 Marek Polacek <polacek@redhat.com>
8613
8614 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8615 in unsigned type.
8616
d95a2703
JJ
86172014-10-22 Jakub Jelinek <jakub@redhat.com>
8618 Yury Gribov <y.gribov@samsung.com>
8619
8620 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8621 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8622 instead of flag_sanitize_recover as bool flag.
8623
8e6ef852
KY
86242014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8625
8626 * cilk.c: Revert previous change.
8627
948cf550
IZ
86282014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8629
8630 PR c/63307
8631 * cilk.c: Include vec.h.
8632 (struct cilk_decls): New structure.
8633 (wrapper_parm_cb): Split this function to...
8634 (fill_decls_vec): ...this...
8635 (create_parm_list): ...and this.
8636 (compare_decls): New function.
8637 (for_local_cb): Remove.
8638 (wrapper_local_cb): Ditto.
8639 (build_wrapper_type): For now first traverse and fill vector of
8640 declarations then sort it and then deal with sorted vector.
8641 (cilk_outline): Ditto.
8642 (declare_one_free_variable): Ditto.
8643
92574c7c
MP
86442014-10-17 Marek Polacek <polacek@redhat.com>
8645
8646 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8647 * c.opt (Wimplicit-int): Initialize to -1.
8648
83685514
AM
86492014-10-16 Andrew MacLeod <amacleod@redhat.com>
8650
8651 * c-pragma.c: Adjust include files.
8652 * c-semantics.c: Likewise.
8653
5b8300ea
DD
86542014-10-16 DJ Delorie <dj@redhat.com>
8655
8656 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8657 multiples of bytes.
8658
5f83e90b
JM
86592014-10-14 Jason Merrill <jason@redhat.com>
8660
8661 PR c++/63455
8662 * c-common.h (CPP_PREPARSED_EXPR): New.
8663 (N_CP_TTYPES): Adjust.
8664
d73326ca
MP
86652014-10-15 Marek Polacek <polacek@redhat.com>
8666
8667 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8668
78a7c317
DD
86692014-10-14 DJ Delorie <dj@redhat.com>
8670
8671 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8672 types, not just __int128.
8673 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8674 types, not just __int128.
8675 (cpp_atomic_builtins): Round pointer sizes up.
8676 (type_suffix): Use type precision, not specific types.
8677 * c-common.c (c_common_reswords): Remove __int128 special case.
8678 (c_common_type_for_size): Check for all __intN types, not just
8679 __int128.
8680 (c_common_type_for_mode): Likewise.
8681 (c_common_signed_or_unsigned_type): Likewise.
8682 (c_build_bitfield_integer_type): Likewise.
8683 (c_common_nodes_and_builtins): Likewise.
8684 (keyword_begins_type_specifier): Likewise.
8685 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8686 __intN variants.
8687
2a22f99c
TS
86882014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8689
8690 * c-common.c: Use hash_table instead of hashtab.
8691
2a8ef767
ESR
86922014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8693
adfac8df 8694 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8695 C++11 section.
8696
3c9aabbd
MG
86972014-10-03 Marc Glisse <marc.glisse@inria.fr>
8698
8699 PR c++/54427
8700 PR c++/57198
8701 PR c++/58845
8702 * c-common.c (warn_logical_operator): Punt for vectors.
8703
a15f7cb8
ESR
87042014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8705
8706 Implement SD-6: SG10 Feature Test Recommendations
8707 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8708 macros and the __has_header macro.
8709
8d0cf15e
JM
87102014-09-30 Jason Merrill <jason@redhat.com>
8711
dd5d5481
JM
8712 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8713 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8714 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8715
b752325e
JM
8716 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8717 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8718
8d0cf15e
JM
8719 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8720 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8721
083e891e
MP
87222014-09-24 Marek Polacek <polacek@redhat.com>
8723
8724 PR c/61405
8725 PR c/53874
8726 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8727
7861b648
AK
87282014-09-23 Andi Kleen <ak@linux.intel.com>
8729
8730 * c-common.c (handle_no_reorder_attribute): New function.
8731 (c_common_attribute_table): Add no_reorder attribute.
8732
9a79452d
JM
87332014-09-22 Joseph Myers <joseph@codesourcery.com>
8734
8735 * c-cppbuiltin.c (c_cpp_builtins): Define
8736 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8737 modes.
8738
dd69f047
JM
87392014-09-18 Joseph Myers <joseph@codesourcery.com>
8740
8741 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8742 for supported floating-point modes.
8743
737a4826
MLI
87442014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8745
8746 * c.opt (Wpsabi): Use LangEnabledBy.
8747 * c-opts.c (c_common_handle_option): Do not handle here.
8748
8cc4b7a2
JM
87492014-09-12 Joseph Myers <joseph@codesourcery.com>
8750
8751 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8752 macros for floating-point modes.
8753
179b5a55
MG
87542014-09-11 Marc Glisse <marc.glisse@inria.fr>
8755
8756 PR target/58757
8757 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8758 __*_DENORM_MIN__ without denormals.
8759
570a11fe
JJ
87602014-09-10 Jakub Jelinek <jakub@redhat.com>
8761
8762 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8763 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8764 ubsan_create_data callers.
8765 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8766 index is constant or BIT_AND_EXPR with constant mask and is
8767 small enough for the bound.
8768 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8769 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8770
b559c810
MLI
87712014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8772
8773 * c.opt: Add CppReason to various flags.
8774 (Wdate-time): Re-sort.
8775 * c-common.c: Include c-common.h earlier.
8776 (struct reason_option_codes_t): Delete.
8777 (c_option_controlling_cpp_error): Prefix global type and struct
8778 with cpp_.
8779
1ef33fd4
MLI
87802014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8781
8782 * c.opt (Wnormalized): New.
8783 (Wnormalized=): Use Enum and Reject Negative.
8784 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8785
66bb34c0
JM
87862014-09-08 Joseph Myers <joseph@codesourcery.com>
8787
8788 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8789 digits of floating-point modes if -fbuilding-libgcc.
8790
53d68b9f
JM
87912014-09-05 Joseph Myers <joseph@codesourcery.com>
8792
8793 * c-cppbuiltin.c (c_cpp_builtins): Also define
8794 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8795 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8796 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8797 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8798 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8799 __LIBGCC_STACK_GROWS_DOWNWARD__,
8800 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8801 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8802 __LIBGCC_DWARF_FRAME_REGISTERS__,
8803 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8804 __LIBGCC_STACK_POINTER_REGNUM__ and
8805 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8806 (builtin_define_with_value): Handle backslash-escaping in string
8807 macro values.
8808
f65586dc
RB
88092014-09-05 Richard Biener <rguenther@suse.de>
8810
8811 PR middle-end/63148
8812 * c-format.c (check_format_arg): Properly handle
8813 effectively signed POINTER_PLUS_EXPR offset.
8814
2b71f4a4
MLI
88152014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8816
8817 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8818 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8819 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8820 and Init.
8821 * c-opts.c (c_common_handle_option): Do not handle here.
8822 (sanitize_cpp_opts): Likewise.
8823 * c-common.c (struct reason_option_codes_t): Handle
8824 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8825
d2e4feca
MP
88262014-09-03 Marek Polacek <polacek@redhat.com>
8827
8828 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8829
9a771876
JJ
88302014-09-02 Jakub Jelinek <jakub@redhat.com>
8831 Balaji V. Iyer <balaji.v.iyer@intel.com>
8832 Igor Zamyatin <igor.zamyatin@intel.com>
8833
8834 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8835 * c-common.c (c_common_reswords): Added _Cilk_for.
8836 * c-common.h (enum rid): Added RID_CILK_FOR.
8837 (cilk_for_number_of_iterations): Add declaration.
8838 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8839 CILK_FOR.
8840 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8841 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8842
81b5d104
MLI
88432014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8844
8845 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8846 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8847 Wundef): Use CPP, Var and Init.
8848 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8849
b753b37b
MLI
88502014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8851
8852 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8853 * c-opts.c (c_common_handle_option): Do not handle here.
8854
028aee17
JM
88552014-08-25 Jason Merrill <jason@redhat.com>
8856
8857 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8858 -std=c++14 and -std=gnu++14, rather than the reverse.
8859 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8860 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8861 * c-common.h (cxx_dialect): Remove cxx1y.
8862
e4276ba5
ESR
88632014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8864
8865 * c-common.h (enum cxx_dialect): Add cxx14.
8866 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8867 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8868 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8869
a545cacd
JM
88702014-08-22 Jason Merrill <jason@redhat.com>
8871
8872 * c.opt (std=gnu++17): Fix alias.
8873
59ea0364
MP
88742014-08-22 Marek Polacek <polacek@redhat.com>
8875
8876 PR c++/62199
8877 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8878 check for vector types. Drop LHS argument.
8879 * c-common.h (warn_logical_not_parentheses): Adjust.
8880
596e808c
MLI
88812014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8882
8883 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8884 (Wmultichar): Likewise.
8885 (Wdate-time): Use C-family languages instead of Common. Use CPP
8886 and Var.
8887 * c-opts.c (c_common_handle_option): Do not handle the above
8888 options here.
8889 (sanitize_cpp_opts): Likewise.
8890
18767f65
MLI
88912014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8892
8893 PR fortran/44054
8894 * c-opts.c: Include tree-diagnostics.h.
8895 (c_diagnostic_finalizer): New.
8896 (c_common_initialize_diagnostics): Use it.
8897
b4413594
MLI
88982014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8899
8900 PR preprocessor/51303
8901 * c-common.c (struct reason_option_codes_t option_codes):
8902 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8903
43f9a13c
MLI
89042014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8905
8906 PR c/60975
8907 PR c/53063
8908 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8909 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8910 (c_common_post_options): Call init_global_opts_from_cpp.
8911 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8912
04159acf
MP
89132014-08-19 Marek Polacek <polacek@redhat.com>
8914
8915 PR c++/62153
8916 * c-common.c (maybe_warn_bool_compare): New function.
8917 * c-common.h (maybe_warn_bool_compare): Declare.
8918 * c.opt (Wbool-compare): New option.
8919
35aff4fb
MP
89202014-08-19 Marek Polacek <polacek@redhat.com>
8921
8922 * c.opt (Wc99-c11-compat): New option.
8923
177cce46
MP
89242014-08-19 Marek Polacek <polacek@redhat.com>
8925
8926 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8927 to warn_c90_c99_compat.
8928 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8929 to -1.
8930
6ae9194f
MLI
89312014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8932 Steven Bosscher <steven@gcc.gnu.org>
8933
8934 PR c/52952
8935 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8936 format_check_results.
8937 (check_function_format): Use true and add comment for boolean
8938 argument.
8939 (finish_dollar_format_checking): Use explicit location when warning.
8940 (check_format_info): Likewise.
8941 (check_format_arg): Set extra_arg_loc and format_string_loc.
8942 (check_format_info_main): Use explicit location when warning.
8943 (check_format_types): Pass explicit location.
8944 (format_type_warning): Likewise.
8945
8e54f6d3
MLI
89462014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8947
8948 PR fortran/44054
8949 * c-format.c: Handle Fortran flags.
8950
cd4e76fc
IZ
89512014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8952
8953 PR other/61962
8954 * array-notation-common.c (find_rank): Added handling for other
8955 types of references.
8956
f3bede71
MP
89572014-08-10 Marek Polacek <polacek@redhat.com>
8958
8959 PR c/51849
8960 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8961 * c.opt (Wc90-c99-compat): Add option.
8962
9f25a338
TS
89632014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8964
8965 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8966
62e4eb35
MP
89672014-08-03 Marek Polacek <polacek@redhat.com>
8968
ab20d992 8969 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8970 (c_add_case_label): Pass loc to check_case_value.
8971
b787e7a2
TS
89722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8973
8974 * cilk.c: Use hash_map instead of pointer_map.
8975
6e2830c3
TS
89762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8977
8978 * c-gimplify.c: Use hash_set instead of pointer_set.
8979
a7ee52fb
IZ
89802014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8981
8982 PR middle-end/61455
8983 * array-notation-common.c (extract_array_notation_exprs): Handling
8984 of DECL_EXPR added.
8985
944fa280
JJ
89862014-08-01 Jakub Jelinek <jakub@redhat.com>
8987
8988 * c-common.h (min_align_of_type): Removed prototype.
8989 * c-common.c (min_align_of_type): Removed.
8990 * c-ubsan.h (ubsan_maybe_instrument_reference,
8991 ubsan_maybe_instrument_member_call): New prototypes.
8992 * c-ubsan.c: Include stor-layout.h and builtins.h.
8993 (ubsan_maybe_instrument_reference_or_call,
8994 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8995 functions.
8996
b4dfdc11
MG
89972014-07-31 Marc Glisse <marc.glisse@inria.fr>
8998
8999 PR c++/60517
9000 * c.opt (-Wreturn-local-addr): Move to common.opt.
9001
a41844e5
JM
90022014-07-30 Jason Merrill <jason@redhat.com>
9003
9004 PR c++/61659
9005 PR c++/61687
9006 Revert:
9007 * c.opt (-fuse-all-virtuals): New.
9008
976d5a22
TT
90092014-07-30 Tom Tromey <tromey@redhat.com>
9010
9011 PR c/59855
9012 * c.opt (Wdesignated-init): New option.
9013 * c-common.c (c_common_attribute_table): Add "designated_init".
9014 (handle_designated_init): New function.
9015
cdc94aca
MP
90162014-07-24 Marek Polacek <polacek@redhat.com>
9017
9018 PR c/57653
9019 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9020
f41373b6
DS
90212014-07-16 Dodji Seketeli <dodji@redhat.com>
9022
9023 PR preprocessor/60723 - missing system-ness marks for macro tokens
9024 * c-ppoutput.c (struct print::prev_was_system_token): New data
9025 member.
9026 (init_pp_output): Initialize it.
9027 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9028 (do_line_change): Return a flag saying if a line marker was
9029 emitted or not.
9030 (scan_translation_unit): Detect if the system-ness of the token we
9031 are about to emit is different from the one of the previously
9032 emitted token. If so, emit a line marker. Avoid emitting useless
9033 adjacent line markers. Avoid emitting line markers for tokens
9034 originating from the expansion of built-in macros.
9035 (scan_translation_unit_directives_only): Adjust.
9036
4d661eaa
MP
90372014-07-15 Marek Polacek <polacek@redhat.com>
9038
9039 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9040 TYPE_MAX_VALUE is NULL.
9041
b108f48f
JJ
90422014-07-14 Jakub Jelinek <jakub@redhat.com>
9043
9044 PR middle-end/61294
9045 * c.opt (Wmemset-transposed-args): New warning.
9046
c0221884
JM
90472014-07-10 Jason Merrill <jason@redhat.com>
9048
9049 PR c++/61659
9050 PR c++/61687
9051 * c.opt (-fuse-all-virtuals): New.
9052
63dfbb95
RB
90532014-07-09 Richard Biener <rguenther@suse.de>
9054
9055 PR c-family/61741
9056 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9057 using unsigned arithmetic if overflow does not wrap instead of
9058 if overflow is undefined.
9059
773ec47f
MP
90602014-07-06 Marek Polacek <polacek@redhat.com>
9061
9062 PR c/6940
9063 * c.opt (Wsizeof-array-argument): New option.
9064
00a7ba58
JJ
90652014-07-03 Jakub Jelinek <jakub@redhat.com>
9066
b1726d6c 9067 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9068 comments->count <= 1, as comments->entries might be NULL.
9069
52ec0ea3
MP
90702014-07-01 Marek Polacek <polacek@redhat.com>
9071
9072 * c.opt (Wint-conversion): New option.
9073
d5c3d343
MP
90742014-07-01 Marek Polacek <polacek@redhat.com>
9075
9076 PR c/58286
9077 * c.opt (Wincompatible-pointer-types): New option.
9078
6e7ceb17
PC
90792014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9080
9081 PR c++/51400
9082 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9083 Do not discard TYPE_QUALS of type.
9084
da73100b
JM
90852014-06-26 Jason Merrill <jason@redhat.com>
9086
9087 * c-common.h (enum cxx_dialect): Add cxx1z.
9088 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9089 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9090
08eedf75
TJ
90912014-06-26 Teresa Johnson <tejohnson@google.com>
9092
9093 * c-common.h (get_dump_info): Declare.
9094 * c-gimplify.c (c_genericize): Use saved dump files.
9095 * c-opts.c (c_common_parse_file): Begin and end dumps
9096 once around parsing invocation.
9097 (get_dump_info): New function.
9098
7b56b2f8
MP
90992014-06-23 Marek Polacek <polacek@redhat.com>
9100 Andrew MacLeod <amacleod@redhat.com>
9101
9102 PR c/61553
9103 * c-common.c (get_atomic_generic_size): Don't segfault if the
9104 type doesn't have a size.
9105
0e37a2f3
MP
91062014-06-20 Marek Polacek <polacek@redhat.com>
9107
9108 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9109 (ubsan_walk_array_refs_r): New function.
9110 (c_genericize): Instrument array bounds.
9111 * c-ubsan.c: Include "internal-fn.h".
9112 (ubsan_instrument_division): Mark instrumented arrays as having
9113 side effects. Adjust ubsan_type_descriptor call.
9114 (ubsan_instrument_shift): Likewise.
9115 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9116 (ubsan_instrument_bounds): New function.
9117 (ubsan_array_ref_instrumented_p): New function.
9118 (ubsan_maybe_instrument_array_ref): New function.
9119 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9120 (ubsan_array_ref_instrumented_p): Declare.
9121 (ubsan_maybe_instrument_array_ref): Declare.
9122
91232014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9124
9125 PR lto/61123
9126 * c.opt (fshort-enums): Add to LTO.
9127 * c.opt (fshort-wchar): Likewise.
9128
5c3d09f7
MP
91292014-06-16 Marek Polacek <polacek@redhat.com>
9130
9131 PR c/60439
9132 * c.opt (Wswitch-bool): Add Var.
9133
9cf32741
JJ
91342014-06-12 Jakub Jelinek <jakub@redhat.com>
9135
9136 PR middle-end/61486
9137 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9138 #pragma omp target teams or
9139 #pragma omp {,target }teams distribute simd.
9140
62984918
JM
91412014-06-12 Jason Merrill <jason@redhat.com>
9142
9143 * c.opt (Wabi=, fabi-compat-version): New.
9144 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9145 (c_common_post_options): Handle flag_abi_compat_version default.
9146 Disallow -fabi-compat-version=1.
9147 * c-common.h (abi_version_crosses): New.
9148
f961457f
JH
91492014-06-11 Jan Hubicka <hubicka@ucw.cz>
9150
adfac8df 9151 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9152 section names that are no longer trees.
9153
92d28cbb
JJ
91542014-06-10 Jakub Jelinek <jakub@redhat.com>
9155
9156 PR fortran/60928
9157 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9158 (omp_pragmas): ... back here.
9159
742938c9
MP
91602014-06-05 Marek Polacek <polacek@redhat.com>
9161
9162 PR c/49706
9163 * c-common.c (warn_logical_not_parentheses): New function.
9164 * c-common.h (warn_logical_not_parentheses): Declare.
9165 * c.opt (Wlogical-not-parentheses): New option.
9166
9d548dfb
MP
91672014-06-04 Marek Polacek <polacek@redhat.com>
9168
9169 PR c/30020
9170 * c-common.c (check_case_bounds): Add location parameter.
9171 Use it.
9172 (c_add_case_label): Pass loc to check_case_bounds.
9173
fedfecef
MP
91742014-06-03 Marek Polacek <polacek@redhat.com>
9175
9176 PR c/60439
9177 * c.opt (Wswitch-bool): New option.
9178
f6a7cffc
TS
91792014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9180
040d18b6
TS
9181 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9182 Remove prototypes.
9183 (record_types_used_by_current_var_decl): Move prototype to where
9184 it belongs.
9185
f6a7cffc
TS
9186 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9187 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9188 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9189
632f2871
RS
91902014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9191
9192 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9193 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9194 void_zero_node.
9195 * c-pretty-print.c (pp_c_void_constant): New function.
9196 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9197 (c_pretty_printer::expression): Handle VOID_CST.
9198 * cilk.c (extract_free_variables): Likewise.
9199 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9200 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9201
766090c2
TS
92022014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9203
9204 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9205 * c-pragma.c (push_alignment): Adjust.
9206 (handle_pragma_push_options): Likewise.
9207
661a0813
MP
92082014-05-09 Marek Polacek <polacek@redhat.com>
9209
9210 PR c/50459
9211 * c-common.c (check_user_alignment): Return -1 if alignment is error
9212 node.
9213 (handle_aligned_attribute): Don't call default_conversion on
9214 FUNCTION_DECLs.
9215 (handle_vector_size_attribute): Likewise.
9216 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9217 (handle_sentinel_attribute): Call default_conversion and allow even
9218 integral types as an argument.
9219
2793eeab
MP
92202014-05-08 Marek Polacek <polacek@redhat.com>
9221
9222 PR c/61053
9223 * c-common.c (min_align_of_type): New function factored out from...
9224 (c_sizeof_or_alignof_type): ...here.
9225 * c-common.h (min_align_of_type): Declare.
9226
f827930a
MP
92272014-05-08 Marek Polacek <polacek@redhat.com>
9228
9229 PR c/61077
9230 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9231 parameter type of main.
9232
ca49b74e
DD
92332014-05-07 DJ Delorie <dj@redhat.com>
9234
9235 * c-cppbuiltin.c (print_bits_of_hex): New.
9236 (builtin_define_type_minmax): Print values using hex so as not to
9237 require a pre-computed list of string values.
9238
1d60af08
KZ
92392014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9240 Mike Stump <mikestump@comcast.net>
9241 Richard Sandiford <rdsandiford@googlemail.com>
9242
9243 * c-ada-spec.c: Include wide-int.h.
9244 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9245 (dump_generic_ada_node): Use wide-int interfaces.
9246 * c-common.c: Include wide-int-print.h.
9247 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9248 (pointer_int_sum): Use wide-int interfaces.
9249 (c_common_nodes_and_builtins): Use make_int_cst.
9250 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9251 (handle_alloc_size_attribute): Use wide-int interfaces.
9252 (get_nonnull_operand): Likewise.
9253 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9254 * c-lex.c: Include wide-int.h.
9255 (narrowest_unsigned_type): Take a widest_int rather than two
9256 HOST_WIDE_INTs.
9257 (narrowest_signed_type): Likewise.
9258 (interpret_integer): Update accordingly. Use wide-int interfaces.
9259 (lex_charconst): Use wide-int interfaces.
9260 * c-pretty-print.c: Include wide-int.h.
9261 (pp_c_integer_constant): Use wide-int interfaces.
9262 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9263 INT_CST_LT_UNSIGNED.
9264
b15458be
RB
92652014-05-06 Richard Biener <rguenther@suse.de>
9266
9267 * c-opts.c (c_common_post_options): For -freestanding,
9268 -fno-hosted and -fno-builtin disable pattern recognition
9269 if not enabled explicitely.
9270
6577374e
MP
92712014-05-02 Marek Polacek <polacek@redhat.com>
9272
9273 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9274
d00887e8
MP
92752014-05-01 Marek Polacek <polacek@redhat.com>
9276
9277 PR c/43245
9278 * c.opt (Wdiscarded-qualifiers): Add.
9279
f8ed5150
MP
92802014-04-30 Marek Polacek <polacek@redhat.com>
9281
9282 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9283 INT_MIN / -1 sanitization only for integer types.
9284
45484dcf
MP
92852014-04-25 Marek Polacek <polacek@redhat.com>
9286
9287 PR c/18079
9288 * c-common.c (handle_noinline_attribute): Warn if the attribute
9289 conflicts with always_inline attribute.
9290 (handle_always_inline_attribute): Warn if the attribute conflicts
9291 with noinline attribute.
9292
38e514c0
MP
92932014-04-25 Marek Polacek <polacek@redhat.com>
9294
9295 PR c/60156
9296 * c-common.c (check_main_parameter_types): Warn about variadic main.
9297
44875f92
MS
92982014-04-24 Mike Stump <mikestump@comcast.net>
9299
9300 * c.opt (Wshadow-ivar): Default to on.
9301
dcaaa5a0
DP
93022014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9303
9304 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9305
c07d7c02
MP
93062014-04-23 Marek Polacek <polacek@redhat.com>
9307
9308 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9309
1c33c9b7
JJ
93102014-04-22 Jakub Jelinek <jakub@redhat.com>
9311
9312 PR sanitizer/60275
9313 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9314 if flag_sanitize_undefined_trap_on_error.
9315 (ubsan_instrument_division, ubsan_instrument_shift,
9316 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9317 if !flag_sanitize_recover.
9318
793c625f
MG
93192014-04-22 Marc Glisse <marc.glisse@inria.fr>
9320
9321 PR libstdc++/43622
9322 * c-common.c (registered_builtin_types): Make non-static.
9323 * c-common.h (registered_builtin_types): Declare.
9324
b0f1bf36 93252014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9326 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9327
9328 PR c/60819
9329 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9330 apply may-alias the scalar pointer type when applicable.
9331
3b07fa4a
IZ
93322014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9333
9334 PR middle-end/60467
9335 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9336 as possible argument for Cilk_spawn.
9337
cbbd2b1c
TB
93382014-04-11 Tobias Burnus <burnus@net-b.de>
9339
9340 PR c/60194
9341 * c.opt (Wformat-signedness): Add
9342 * c-format.c(check_format_types): Use it.
9343
6415bd5d
JM
93442014-04-11 Jason Merrill <jason@redhat.com>
9345
9346 PR c++/57926
9347 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9348 default_conversion for an array argument.
9349
6525783a
MP
93502014-04-08 Marek Polacek <polacek@redhat.com>
9351
9352 PR sanitizer/60745
9353 * c-ubsan.c: Include asan.h.
9354 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9355
880a467b
NS
93562014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9357
9358 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9359
7b59ff2d
MP
93602014-04-02 Marek Polacek <polacek@redhat.com>
9361
9362 * c-common.h (c_expand_expr): Remove declaration.
9363
8edbfaa6
JJ
93642014-03-28 Jakub Jelinek <jakub@redhat.com>
9365
9366 PR c++/60689
9367 * c-common.c (add_atomic_size_parameter): When creating new
9368 params vector, push the size argument first.
9369
07d72e1d
JJ
93702014-03-26 Jakub Jelinek <jakub@redhat.com>
9371
9372 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9373 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9374 ubsan_create_data callers.
9375
b35e0fa0
JJ
93762014-03-22 Jakub Jelinek <jakub@redhat.com>
9377
9378 PR debug/60603
9379 * c-opts.c (c_finish_options): Restore cb_file_change call to
9380 <built-in>.
9381
39a1ebb3
JJ
93822014-03-13 Jakub Jelinek <jakub@redhat.com>
9383
9384 PR middle-end/36282
9385 * c-pragma.c (apply_pragma_weak): Only look at
9386 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9387 DECL_ASSEMBLER_NAME_SET_P (decl).
9388 (maybe_apply_pending_pragma_weaks): Exit early if
9389 vec_safe_is_empty (pending_weaks) rather than only when
9390 !pending_weaks.
9391 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9392 set assembler name back to NULL afterwards.
9393
a07f6ed2
JM
93942014-03-11 Jason Merrill <jason@redhat.com>
9395
9396 * c.opt: Add -std=gnu++14.
9397
75b107f5
IB
93982014-03-11 Ian Bolton <ian.bolton@arm.com>
9399
9400 * c-opts.c (c_common_post_options): Don't override
9401 -ffp-contract=fast if unsafe-math-optimizations is on.
9402
f42c637e
PM
94032014-03-08 Paulo Matos <paulo@matos-sorge.com>
9404
22b15758 9405 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9406
70e24808
JM
94072014-03-07 Jason Merrill <jason@redhat.com>
9408
9409 * c.opt: Add -std=c++14.
9410
3af9c5e9
MP
94112014-03-06 Marek Polacek <polacek@redhat.com>
9412
9413 PR c/60197
9414 * cilk.c (contains_cilk_spawn_stmt): New function.
9415 (contains_cilk_spawn_stmt_walker): Likewise.
9416 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9417 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9418
b3bdf019
JJ
94192014-03-03 Jakub Jelinek <jakub@redhat.com>
9420
9421 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9422 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9423 even when flag_preprocess_only.
9424
ca7e759d
JM
94252014-02-26 Jason Merrill <jason@redhat.com>
9426
9427 PR c++/59231
9428 PR c++/11586
9429 * c-common.c (shorten_compare): Don't check
9430 c_inhibit_evaluation_warnings.
9431
28e41874
JJ
94322014-02-19 Jakub Jelinek <jakub@redhat.com>
9433
cca615af
JJ
9434 PR c/37743
9435 * c-common.c (c_common_nodes_and_builtins): When initializing
9436 c_uint{16,32,64}_type_node, also set corresponding
9437 uint{16,32,64}_type_node to the same value.
9438
28e41874
JJ
9439 PR c++/60267
9440 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9441 for PRAGMA_IVDEP if flag_preprocess_only.
9442
c2bf53a1
JJ
94432014-02-12 Jakub Jelinek <jakub@redhat.com>
9444
9445 PR c/60101
9446 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9447 if false, add ADD itself, rather than vice versa.
9448 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9449 copy. For SAVE_EXPR, only call merge_tlist once.
9450
8fcbce72
JJ
94512014-02-08 Jakub Jelinek <jakub@redhat.com>
9452
9453 PR middle-end/60092
9454 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9455 and tree_to_uhwi.
9456 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9457 functions.
9458 (c_common_attribute_table): Add alloc_align and assume_aligned
9459 attributes.
9460
0a756a3f
MP
94612014-02-06 Marek Polacek <polacek@redhat.com>
9462
9463 PR c/60087
9464 * c-common.c (warn_for_sign_compare): Call warning_at with location
9465 instead of warning.
9466
7ec4847a
MP
94672014-02-05 Marek Polacek <polacek@redhat.com>
9468
9469 PR c/53123
9470 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9471 statement.
9472
66f20604
MP
94732014-02-04 Marek Polacek <polacek@redhat.com>
9474
9475 PR c/60036
9476 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9477 SAVE_EXPR.
9478
5d77fb19
MG
94792014-02-03 Marc Glisse <marc.glisse@inria.fr>
9480
9481 PR c++/53017
9482 PR c++/59211
9483 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9484 handle_vector_size_attribute, handle_nonnull_attribute): Call
9485 default_conversion on the attribute argument.
9486 (handle_nonnull_attribute): Increment the argument number.
9487
81e5eca8
MP
94882014-01-31 Marek Polacek <polacek@redhat.com>
9489
9490 PR c/59963
9491 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9492 build_function_call_vec.
9493 (resolve_overloaded_builtin): Likewise.
9494 * c-common.h (build_function_call_vec): Adjust declaration.
9495
68fca595
MP
94962014-01-30 Marek Polacek <polacek@redhat.com>
9497
9498 PR c/59940
9499 * c-common.h (unsafe_conversion_p): Adjust declaration.
9500 (warnings_for_convert_and_check): Likewise.
9501 (convert_and_check): Likewise.
9502 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9503 expansion_point_location_if_in_system_header on it.
9504 (warnings_for_convert_and_check): Add location parameter. Call
9505 expansion_point_location_if_in_system_header on it. Use it.
9506 (convert_and_check): Add location parameter. Use it.
9507 (conversion_warning): Likewise.
9508 (c_add_case_label): Adjust convert_and_check calls.
9509 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9510
b72271b9
BI
95112014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9512
9513 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9514 flag_cilkplus.
9515 * c-pragma.c (init_pragma): Likewise.
9516 * c.opt: Likewise.
9517
393e8e8b
MP
95182014-01-23 Marek Polacek <polacek@redhat.com>
9519
9520 PR c/59846
9521 * c-common.c (shorten_compare): Add location_t parameter.
9522 * c-common.h (shorten_binary_op): Adjust declaration.
9523
f04dda30
MP
95242014-01-23 Marek Polacek <polacek@redhat.com>
9525
9526 PR c/58346
9527 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9528 * c-common.h: Declare it.
9529
621955cb
EB
95302014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9531
9532 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9533 * c-ada-spec.c (dump_ads): Likewise.
9534 (cpp_check): Likewise.
9535 (dump_ada_specs): Likewise.
9536
95372014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9538
9539 PR c++/49718
9540 * c-common.c (handle_no_instrument_function_attribute): Allow
9541 no_instrument_function attribute in class member
9542 definition/declaration.
9543
241f845a
JJ
95442014-01-15 Jakub Jelinek <jakub@redhat.com>
9545
9546 PR c/58943
9547 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9548 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9549 being COMPOUND_EXPR.
9550 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9551 operand a SAVE_EXPR and second MODIFY_EXPR.
9552
e83b8e2e
JJ
95532014-01-09 Jakub Jelinek <jakub@redhat.com>
9554
9555 PR target/58115
9556 * c-pch.c (c_common_write_pch): Call
9557 prepare_target_option_nodes_for_pch.
9558
23a5b65a
RS
95592014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9560
9561 Update copyright years
9562
f9030485
RS
95632014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9564
9565 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9566 the copyright notice.
9567
f2aa696b
EB
95682013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9569
9570 * c-ada-spec.c (print_constructor): New function.
9571 (print_destructor): Retrieve the origin of the destructor.
9572 (print_ada_declaration): Revamp handling of constructors/destructors.
9573
3f8257db 95742013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9575 Bill Maddox <maddox@google.com>
9576 Jason Merrill <jason@redhat.com>
9577
9578 * c.opt: Add -fdeclone-ctor-dtor.
9579 * c-opts.c (c_common_post_options): Default to on iff -Os.
9580
41958c28
BI
95812013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9582
9583 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9584 attribute.
9585 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9586 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9587 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9588 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9589 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9590 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9591 PRAGMA_CILK_CLAUSE_UNIFORM.
9592
b1726d6c 9593
12893402
BI
95942013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9595
9596 * cilk.c (cilk_outline): Made this function non-static.
9597 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9598 (create_cilk_wrapper): Added a new parameter: a function pointer.
9599 (c_install_body_w_frame_cleanup): Remove
9600 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9601 * c-common.h (cilk_outline): New prototype.
9602 (gimplify_cilk_spawn): Removed two parameters.
9603 (cilk_install_body_with_frame_cleanup): New prototype.
9604 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9605 CILK_SPAWN_STMT case.
9606
085b42ed
BS
96072013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9608
2ce064c3
BS
9609 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9610
085b42ed
BS
9611 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9612 (int_array_type_node): Remove.
9613 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9614
9e36c9ed
MP
96152013-12-05 Marek Polacek <polacek@redhat.com>
9616
9617 PR c/52023
9618 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9619 [ADJUST_FIELD_ALIGN].
9620
296674db
JM
96212013-12-04 Joseph Myers <joseph@codesourcery.com>
9622
9623 PR c/52023
9624 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9625 and check field alignment if set.
9626 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9627 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9628
b1726d6c 96292013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9630 Marek Polacek <polacek@redhat.com>
9631
9632 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9633 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9634
d7947e19
L
96352013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9636
9637 PR c/59309
9638 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9639 arguments.
9640
fad7652e
JJ
96412013-11-29 Jakub Jelinek <jakub@redhat.com>
9642
9643 PR c/59280
9644 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9645 goto invalid. If it is error_mark_node, don't issue further
9646 diagnostics.
9647
8b5e1202
SO
96482013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9649
9650 * c.opt (Wopenmp-simd): New.
9651
0a508bb6
JJ
96522013-11-22 Jakub Jelinek <jakub@redhat.com>
9653
9654 * c-ubsan.h (ubsan_instrument_return): New prototype.
9655 * c-ubsan.c (ubsan_instrument_return): New function.
9656
2fb9a547
AM
96572013-11-22 Andrew MacLeod <amacleod@redhat.com>
9658
9659 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9660 * c-gimplify.c: Likewise.
9661 * cilk.c: Likewise.
2fb9a547 9662
8400e75e
DM
96632013-11-22 David Malcolm <dmalcolm@redhat.com>
9664
9665 * c-common.c (unsafe_conversion_p): Remove use of
9666 EXPR_LOC_OR_HERE macro.
9667 (conversion_warning): Likewise.
9668 (warnings_for_convert_and_check): Likewise.
9669 (warn_for_collisions_1): Likewise.
9670 (shorten_compare): Likewise, and remove use of in_system_header
9671 macro, using the location from the former.
9672 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9673 (cb_def_pragma): Remove use of in_system_header macro.
9674 (lex_string): Likewise.
9675 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9676
eb1ce453
KZ
96772013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9678 Mike Stump <mikestump@comcast.net>
9679 Richard Sandiford <rdsandiford@googlemail.com>
9680
9681 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9682 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9683 tree_fits_shwi_p or tree_fits_uhwi_p.
9684 (dump_generic_ada_node): Likewise.
9685 * c-format.c (check_format_arg): Likewise.
9686 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9687
6b3b8c27
KZ
96882013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9689
9690 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9691
49b0aa18
JC
96922013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9693
9694 PR c/53001
9695 * c-common.c (unsafe_conversion_p): Make this function
9696 return an enumeration with more detail.
9697 (conversion_warning): Use the new return type of
9698 unsafe_conversion_p to separately warn either about conversions
9699 that lower floating point number precision or about the other
9700 kinds of conversions.
9701 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9702 (unsafe_conversion_p): switching return type to
9703 conversion_safety enumeration.
49b0aa18
JC
9704 * c.opt: Adding new warning -Wfloat-conversion and
9705 enabling it with -Wconversion.
9706
b826515a
BS
97072013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9708
8e745a17
JJ
9709 * c-opts.c: Include plugin.h.
9710 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9711
b9a55b13
MP
97122013-11-19 Marek Polacek <polacek@redhat.com>
9713
9714 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9715 call.
9716 (ubsan_instrument_shift): Likewise.
9717 (ubsan_instrument_vla): Likewise.
9718
7d362f6c
RS
97192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9720
9721 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9722 cast to unsigned type.
9723
386b1f1f
RS
97242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9725
9726 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9727 tree_low_cst.
9728 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9729 rather than tree_low_cst.
9730
ae7e9ddd
RS
97312013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9732
9733 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9734 tree_to_uhwi throughout.
9735
9439e9a1
RS
97362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9737
9738 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9739 tree_low_cst (..., 0) with tree_to_shwi throughout.
9740
cc269bb6
RS
97412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9742
9743 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9744 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9745
9541ffee
RS
97462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9747
9748 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9749 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9750
c02065fc
AH
97512013-11-15 Aldy Hernandez <aldyh@redhat.com>
9752
9753 * c-cilkplus.c: New file.
9754 * c-common.c (readonly_error): Add location argument.
9755 * c-common.h (readonly_error): Same.
9756 (c_finish_cilk_clauses): Protoize.
9757 (c_check_cilk_loop): Same.
9758 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9759 Do not fail on error_mark_node.
9760 Abstract increment canonicalization to here...
9761 (c_omp_for_incr_canonicalize_ptr): New.
9762 c-pragma.c (init_pragma): Register "simd" pragma.
9763 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9764 (enum pragma_cilk_clause): New.
9765
9cc65f15
RS
97662013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9767
9768 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9769 wchar_type and host_integerp checks.
9770
18f429e2
AM
97712013-11-14 Andrew MacLeod <amacleod@redhat.com>
9772
9773 * c-common.c: Likewise.
9774 * c-gimplify.c: Likewise.
9775 * cilk.c: Likewise.
9776
d8a2d370
DN
97772013-11-14 Diego Novillo <dnovillo@google.com>
9778
9779 * c-common.c: Include fold-const.h.
9780 Include stor-layout.h.
9781 Include calls.h.
9782 Include stringpool.h.
9783 Include attribs.h.
9784 Include varasm.h.
9785 Include trans-mem.h.
9786 * c-cppbuiltin.c: Include stor-layout.h.
9787 Include stringpool.h.
9788 * c-format.c: Include stringpool.h.
9789 * c-lex.c: Include stringpool.h.
9790 Include stor-layout.h.
9791 * c-pragma.c: Include stringpool.h.
9792 Include attribs.h.
9793 Include varasm.h.
9794 Include gcc-symtab.h.
9795 * c-pretty-print.c: Include stor-layout.h.
9796 Include attribs.h.
9797 * cilk.c: Include stringpool.h.
9798 Include calls.h.
9799
38b7bc7f
JM
98002013-11-13 Joseph Myers <joseph@codesourcery.com>
9801
9802 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9803 * c-common.c (c_common_reswords): Add __auto_type.
9804 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9805
45b0be94
AM
98062013-11-12 Andrew MacLeod <amacleod@redhat.com>
9807
18f429e2
AM
9808 * c-common.c: Include gimplify.h.
9809 * c-gimplify.c: Likewise.
9810 * cilk.c: Likewise.
9811 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9812 * c-ubsan.c: Don't include gimple.h.
45b0be94 9813
582d9b50
JM
98142013-11-12 Joseph Myers <joseph@codesourcery.com>
9815
9816 * c-common.c (c_common_reswords): Add _Thread_local.
9817
6b28e197
JM
98182013-11-09 Joseph Myers <joseph@codesourcery.com>
9819
9820 * c-common.c (atomic_size_supported_p): New function.
9821 (resolve_overloaded_atomic_exchange)
9822 (resolve_overloaded_atomic_compare_exchange)
9823 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9824 Use it instead of comparing size with a local list of sizes.
9825
267bac10
JM
98262013-11-07 Andrew MacLeod <amacleod@redhat.com>
9827 Joseph Myers <joseph@codesourcery.com>
9828
9829 * c-common.h (enum rid): Add RID_ATOMIC.
9830 * c-common.c (c_common_reswords): Add _Atomic.
9831 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9832 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9833 * c-format.c (check_format_types): Check for extra _Atomic
9834 qualifiers in format argument.
9835 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9836 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9837
5157b91e
TB
98382013-11-06 Tobias Burnus <burnus@net-b.de>
9839
9840 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9841
6dbe0958
JM
98422013-11-06 Joseph Myers <joseph@codesourcery.com>
9843
9844 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9845 standards modes.
9846 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9847 to mean lack of IEEE 754 support.
9848
e8ff5196
TB
98492013-11-05 Tobias Burnus <burnus@net-b.de>
9850
9851 * c.opt (-Wdate-time): New option
9852 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9853
254a0760
JM
98542013-11-05 Joseph Myers <joseph@codesourcery.com>
9855
9856 * c-cppbuiltin.c (cpp_iec_559_value): Test
9857 flag_excess_precision_cmdline not flag_excess_precision.
9858
6d7f7e0a
TB
98592013-11-05 Tobias Burnus <burnus@net-b.de>
9860
9861 * c.opt (fopenmp-simd): New option.
9862 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9863 (omp_pragmas): ... this new struct.
9864 (c_pp_lookup_pragma): Also walk omp_pragmas.
9865 (init_pragma): Init pragmas for -fopenmp-simd.
9866
55a7f02f
MP
98672013-11-04 Marek Polacek <polacek@redhat.com>
9868
9869 PR c++/58979
9870 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9871
9193fb05
JM
98722013-11-04 Joseph Myers <joseph@codesourcery.com>
9873
9874 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9875 New functions.
9876 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9877
94159ecf
EB
98782013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9879
9880 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9881 (dump_ada_specs): Adjust prototype of second callback.
9882 * c-ada-spec.c (cpp_check): New global variable.
9883 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9884 (print_generic_ada_decl): Likewise.
9885 (has_static_fields): Change return type to bool and add guard.
9886 (has_nontrivial_methods): New predicate.
9887 (is_tagged_type): Change return type to bool.
9888 (separate_class_package): Call has_nontrivial_methods.
9889 (pp_ada_tree_identifier): Minor tweaks.
9890 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9891 (dump_ada_array_domains): Likewise.
9892 (dump_ada_array_type): Likewise.
9893 (dump_template_types): Remove cpp_check parameter and do not pass it to
9894 dump_generic_ada_node.
9895 (dump_ada_template): Likewise.
9896 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9897 recursively.
9898 (print_ada_methods): Change return type to integer. Remove cpp_check
9899 parameter and do not pass it down.
9900 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9901 dump_generic_ada_node.
9902 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9903 accessing methods.
9904 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9905 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9906 value of print_ada_methods.
9907 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9908 Set cpp_check to it before invoking dump_ada_nodes.
9909 (dump_ada_specs): Likewise.
9910
b906f4ca
MP
99112013-11-03 Marek Polacek <polacek@redhat.com>
9912
9913 * c-ubsan.c: Don't include hash-table.h.
9914 (ubsan_instrument_vla): New function.
9915 * c-ubsan.h: Declare it.
9916
5e20cdc9
DM
99172013-10-31 David Malcolm <dmalcolm@redhat.com>
9918
9919 Automated part of renaming of symtab_node_base to symtab_node.
9920
9921 Patch autogenerated by rename_symtab.py from
9922 https://github.com/davidmalcolm/gcc-refactoring-scripts
9923 revision 58bb219cc090b2f4516a9297d868c245495ee622
9924
9925 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9926 symtab_node_base to symtab_node.
9927
7057e645
ESR
99282013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9929
8e745a17 9930 Implement C++14 digit separators.
7057e645
ESR
9931 * c-lex.c (interpret_float): Remove digit separators from scratch string
9932 before building real literal.
9933
193ea7bc
JJ
99342013-10-30 Jakub Jelinek <jakub@redhat.com>
9935
9936 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9937
939b37da
BI
99382013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9939
9940 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9941 fields.
9942 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9943 enabled.
9944 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9945 (insert_cilk_frame): New prototype.
9946 (cilk_init_builtins): Likewise.
9947 (gimplify_cilk_spawn): Likewise.
9948 (c_cilk_install_body_w_frame_cleanup): Likewise.
9949 (cilk_detect_spawn_and_unwrap): Likewise.
9950 (cilk_set_spawn_marker): Likewise.
9951 (build_cilk_sync): Likewise.
9952 (build_cilk_spawn): Likewise.
9953 * cilk.c: New file.
9954
67348ccc
DM
99552013-10-29 David Malcolm <dmalcolm@redhat.com>
9956
9957 Patch autogenerated by refactor_symtab.py from
9958 https://github.com/davidmalcolm/gcc-refactoring-scripts
9959 revision 58bb219cc090b2f4516a9297d868c245495ee622
9960
9961 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9962 to a true class hierarchy.
9963 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9964
d570872d
RS
99652013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9966
9967 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9968
98906124
JL
99692013-10-26 Jeff Law <law@redhat.com>
9970
adfac8df
JJ
9971 * c-common.c (c_define_builtins): Remove mudflap support.
9972 * c.opt: Ignore and warn for mudflap options.
98906124 9973
d73749df 99742013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9975
9976 PR other/33426
9977 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9978 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9979
3f04b1bb
JM
99802013-10-23 Jason Merrill <jason@redhat.com>
9981
9982 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9983
acf0174b
JJ
99842013-10-11 Jakub Jelinek <jakub@redhat.com>
9985
acd15a28
JJ
9986 * c-common.h (omp_clause_mask::operator !=): New method.
9987 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9988 instead of if (mask & something) tests everywhere.
9989
acf0174b
JJ
9990 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9991 201307 instead of 201107.
9992 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9993 (c_common_attribute_table): Add "omp declare target" and
9994 "omp declare simd" attributes.
9995 (handle_omp_declare_target_attribute,
9996 handle_omp_declare_simd_attribute): New functions.
9997 * c-omp.c: Include c-pragma.h.
9998 (c_finish_omp_taskgroup): New function.
9999 (c_finish_omp_atomic): Add swapped argument, if true,
10000 build the operation first with rhs, lhs arguments and use NOP_EXPR
10001 build_modify_expr.
10002 (c_finish_omp_for): Add code argument, pass it down to make_code.
10003 (c_omp_split_clauses): New function.
10004 (c_split_parallel_clauses): Removed.
10005 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10006 c_omp_declare_simd_clauses_to_decls): New functions.
10007 * c-common.h (omp_clause_mask): New type.
10008 (OMP_CLAUSE_MASK_1): Define.
10009 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10010 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10011 omp_clause_mask::operator |, omp_clause_mask::operator &,
10012 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10013 omp_clause_mask::operator ==): New methods.
10014 (enum c_omp_clause_split): New.
10015 (c_finish_omp_taskgroup): New prototype.
10016 (c_finish_omp_atomic): Add swapped argument.
10017 (c_finish_omp_for): Add code argument.
10018 (c_omp_split_clauses): New prototype.
10019 (c_split_parallel_clauses): Removed.
10020 (c_omp_declare_simd_clauses_to_numbers,
10021 c_omp_declare_simd_clauses_to_decls): New prototypes.
10022 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10023 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10024 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10025 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10026 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10027 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10028 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10029 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10030 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10031 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10032 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10033 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10034 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10035 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10036 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10037 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10038 PRAGMA_OMP_CLAUSE_UNIFORM.
10039
826cacfe
MG
100402013-10-09 Marc Glisse <marc.glisse@inria.fr>
10041
10042 PR tree-optimization/20318
10043 * c-common.c (handle_returns_nonnull_attribute): New function.
10044 (c_common_attribute_table): Add returns_nonnull.
10045
2284b034
MG
100462013-10-03 Marc Glisse <marc.glisse@inria.fr>
10047
10048 PR c++/19476
10049 * c.opt (fcheck-new): Move to common.opt.
10050
b56e9788
MP
100512013-09-25 Marek Polacek <polacek@redhat.com>
10052 Jakub Jelinek <jakub@redhat.com>
10053
10054 PR sanitizer/58413
10055 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10056 an expression if we can prove it is correct.
10057 (ubsan_instrument_division): Likewise. Remove unnecessary
10058 check.
10059
ce6923c5
MP
100602013-09-18 Marek Polacek <polacek@redhat.com>
10061
10062 PR sanitizer/58411
10063 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10064 Declare it.
10065 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10066
fb5610fb
IS
100672013-09-14 Iain Sandoe <iain@codesourcery.com>
10068
10069 PR target/48094
10070 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10071 fobjc-gc, freplace-objc-classes): Accept for LTO.
10072
88b0e79e
JC
100732013-09-13 Jacek Caban <jacek@codeweavers.com>
10074
10075 * c-target.def: New hook
10076
c9b0866a
PC
100772013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10078
10079 PR c++/43452
10080 * c.opt (Wdelete-incomplete): Add.
10081
0af94e6f
JR
100822013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10083
10084 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10085 (vector_types_compatible_elements_p): New function.
10086 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10087 declaration.
10088 (vector_types_compatible_elements_p): Declare.
10089
7c26172c
GDR
100902013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10091
10092 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10093 a virtual member function.
10094 (pp_simple_type_specifier): Remove.
10095 (pp_c_type_specifier): Likewise.
10096 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10097 Rename from pp_c_type_specifier. Adjust.
10098 (c_pretty_printer::c_pretty_printer): Do not assign to
10099 simple_type_specifier.
10100
20059c8b
GDR
101012013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10102
10103 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10104 member function.
10105 (c_pretty_printer::storage_class_specifier): Likewise.
10106 (c_pretty_printer::initializer): Likewise.
10107 (pp_declaration): Remove.
10108 (pp_declaration_specifiers): Likewise.
10109 (pp_abstract_declarator): Likewise.
10110 (pp_declarator): Likewise.
10111 (pp_type_id): Likewise.
10112 (pp_statement): Likewise.
10113 (pp_constant): Likewise.
10114 (pp_id_expression): Likewise.
10115 (pp_primary_expression): Likewise.
10116 (pp_unary_expression): Likewise.
10117 (pp_multiplicative_expression): Likewise.
10118 (pp_conditional_expression): Likewise.
10119 (pp_assignment_expression): Likewise.
10120 (pp_expression): Likewise.
10121 (pp_c_type_id): Likewise.
10122 (pp_c_storage_class_specifier): Likewise.
10123 * c-pretty-print.c (pp_c_type_cast): Tidy.
10124 (pp_c_pointer): Likewise.
10125 (pp_c_type_specifier): Likewise.
10126 (pp_c_parameter_type_list): Likewise.
10127 (pp_c_function_definition): Likewise.
10128 (pp_c_init_declarator): Likewise.
10129 (pp_c_initializer_list): Likewise.
10130 (pp_c_constructor_elts): Likewise.
10131 (c_pretty_printer::direct_abstract_declarator): Likewise.
10132 (c_pretty_printer::declaration_specifiers): Likewise.
10133 (c_pretty_printer::primary_expression): Likewise.
10134 (c_pretty_printer::postfix_expression): Likewise.
10135 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10136 (c_pretty_printer::storage_class_specifier): Rename from
10137 pp_c_storage_class_specifier.
10138 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10139 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10140 storage_class_specifier, initializer, offset_list, flags.
10141
de5a5fa1
MP
101422013-08-30 Marek Polacek <polacek@redhat.com>
10143
10144 * c-ubsan.c: New file.
10145 * c-ubsan.h: New file.
10146
8f0e4d72
GDR
101472013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10148
10149 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10150 member function.
10151 (c_pretty_printer::declaration_specifiers): Likewise.
10152 (c_pretty_printer::declarator): Likewise.
10153 (c_pretty_printer::abstract_declarator): Likewise.
10154 (c_pretty_printer::direct_abstract_declarator): Likewise.
10155 (c_pretty_printer::direct_declarator): Likewise.
10156 (c_pretty_printer::function_specifier): Likewise.
10157 (pp_declaration): Adjust.
10158 (pp_declaration_specifiers): Likewise.
10159 (pp_abstract_declarator): Likewise.
10160 (pp_direct_declarator): Likewise.
10161 (pp_function_specifier): Likewise.
10162 (pp_direct_abstract_declarator): Remove as unused.
10163 (pp_c_declaration): Remove.
10164 (pp_c_declaration_specifiers): Likewise.
10165 (pp_c_declarator): Likewise.
10166 (pp_c_direct_declarator): Likewise.
10167 (pp_c_function_specifier): Likewise.
10168 (pp_c_direct_abstract_declarator): Likewise.
10169 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10170 from pp_c_abstract_declarator. Adjust.
ab20d992 10171 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10172 pp_c_direct_abstract_declarator. Adjust.
10173 (c_pretty_printer::function_specifier): Rename from
10174 pp_c_function_specifier. Adjust.
10175 (c_pretty_printer::declaration_specifiers): Rename from
10176 pp_c_declaration_specifiers. Adjust.
10177 (c_pretty_printer::direct_declarator): Rename from
10178 pp_c_direct_declarator. Adjust.
10179 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10180 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10181 (c_pretty_printer::c_pretty_printer): Do not assign to
10182 declaration, declaration_specifiers, declarator,
10183 direct_declarator, direct_abstract_declarator, function_specifier.
10184
00d34d3a
GDR
101852013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10186
10187 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10188 virtual member function.
10189 (c_pretty_printer::multiplicative_expression): Likewise.
10190 (c_pretty_printer::conditional_expression): Likewise.
10191 (c_pretty_printer::assignment_expression): Likewise.
10192 (c_pretty_printer::expression): Likewise.
10193 (pp_unary_expression): Adjust.
10194 (pp_multiplicative_expression): Likewise.
10195 (pp_assignment_expression): Likewise.
10196 (pp_conditional_expression): Likewise.
10197 (pp_expression): Likewise.
10198 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10199 from pp_c_unary_expression. Adjust.
10200 (c_pretty_printer::multiplicative_expression): Rename from
10201 pp_c_multiplicative_expression. Adjust.
10202 (c_pretty_printer::conditional_expression): Rename from
10203 pp_c_conditional_expression. Adjust.
10204 (c_pretty_printer::assignment_expression): Rename from
10205 pp_c_assignment_expression. Adjust.
10206 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10207 (c_pretty_printer::c_pretty_printer): Do not assign to
10208 unary_expression, multiplicative_expression,
10209 conditional_expression, expression.
10210
fb22178f
GDR
102112013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10212
10213 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10214 virtual member function.
10215 (pp_postfix_expression): Adjust.
10216 (pp_c_postfix_expression): Remove.
10217 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10218 from pp_c_postfix_expression. Adjust.
10219 (c_pretty_printer::c_pretty_printer): Do not assign to
10220 postfix_expression.
10221
7ecc2600
GDR
102222013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10223
10224 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10225 virtua member function.
10226 (pp_primary_expression): Adjust.
10227 (pp_c_primary_expression): Remove.
10228 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10229 from pp_c_primary_expression. Adjust.
10230 (pp_c_initializer_list): Use pp_primary_expression.
10231 (c_pretty_printer::c_pretty_printer): Do not assign to
10232 primary_expression.
10233
0691175f
GDR
102342013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10235
10236 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10237 * c-pretty-print.c (M_): Remove.
10238 (c_pretty_printer::translate_string): Define.
10239 (pp_c_type_specifier): Use it.
10240 (pp_c_primary_expression): Likewise.
10241 (pp_c_expression): Likewise.
10242
66dfe4c4
GDR
102432013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10244
10245 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10246 virtual function.
10247 (pp_c_id_expression): Remove.
10248 (pp_id_expression): Adjust.
10249 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10250 pp_c_id_expression. Adjust.
10251 (pp_c_postfix_expression): Use pp_id_expression.
10252 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10253
ca43e9d5
GDR
102542013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10255
10256 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10257 member function.
10258 (pp_constant): Adjust.
10259 (pp_c_constant): Remove.
10260 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10261 pp_c_constant. Adjust.
10262 (pp_c_constant)
10263 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10264 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10265
da6ca2b5
GDR
102662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10267
10268 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10269 (c_pretty_printer::c_pretty_printer): Declare.
10270 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10271 c_pretty_printer_init. Adjust.
10272 (print_c_tree): Do not call c_pretty_printer_init.
10273 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10274
65a372f4
AC
102752013-08-09 Arnaud Charlet <charlet@adacore.com>
10276
10277 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10278
fd9b0f32
PC
102792013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10280
10281 PR c++/58080
10282 * c-common.c (pointer_int_sum): Add bool parameter.
10283 * c-common.h (pointer_int_sum): Adjust declaration.
10284
e0aec1e9
GDR
102852013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10286
10287 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10288 c_pretty_printer variable.
10289
b066401f
GDR
102902013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10291
10292 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10293 (pp_base): Remove.
10294 (pp_c_base): Likewise. Adjust users.
10295 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10296 (pp_c_whitespace): Do not call pp_base.
10297 (pp_c_left_paren): Likewise.
10298 (pp_c_right_paren): Likewise.
10299 (pp_c_left_brace): Likewise.
10300 (pp_c_right_brace): Likewise.
10301 (pp_c_left_bracket): Likewise.
10302 (pp_c_right_bracket): Likewise.
10303 (pp_c_dot): Likewise.
10304 (pp_c_ampersand): Likewise.
10305 (pp_c_star): Likewise.
10306 (pp_c_arrow): Likewise.
10307 (pp_c_semicolon): Likewise.
10308 (pp_c_complement): Likewise.
10309 (pp_c_exclamation): Likewise.
10310 (pp_c_direct_declarator): Likewise.
10311 (pp_c_ws_string): Likewise.
10312 (pp_c_identifier): Likewise.
10313 (pp_c_statement): Likewise.
10314 (print_c_tree): Likewise.
10315
65e5a578
ESR
103162013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10317
10318 PR c++/58072
10319 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10320 provide useful error strings.
10321
137a1a27
GDR
103222013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10323
10324 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10325 printer functions instead of pp_string or operators and punctuators.
10326 (dump_generic_ada_node): Likewise.
10327 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10328 (pp_c_relational_expression): Likewise.
10329 (pp_c_logical_or_expression): Likewise.
10330
07838b13
GDR
103312013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10332
10333 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10334 functions instead of pp_character.
10335 (pp_ada_tree_identifier): Likewise.
10336 (dump_ada_double_name): Likewise.
10337 (dump_ada_function_declaration): Likewise.
10338 (dump_ada_array_domains): Likewise.
10339 (dump_template_types): Likewise.
10340 (dump_generic_ada_node): Likewise.
10341 (print_ada_declaration): Likewise.
10342 (print_ada_struct_decl): Likewise.
10343 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10344
433cc7b0
TT
103452013-07-23 Tom Tromey <tromey@redhat.com>
10346
10347 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10348 * c-common.c (c_common_reswords): Add _Generic.
10349
688010ba
OB
103502013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10351
10352 * c-common.c: Fix typos.
10353 * c-common.h: Likewise.
10354
2a99e5e6
LL
103552013-07-13 Lubos Lunak <l.lunak@suse.cz>
10356
10357 PR c++/55203
10358 * c-common.c (c_common_attribute_table): Add warn_unused.
10359 (handle_warn_unused_attribute): New.
10360
c26302d5
JJ
103612013-07-10 Jakub Jelinek <jakub@redhat.com>
10362
10363 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10364 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10365
dfeadaa0
PC
103662013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10367
10368 PR c++/57869
10369 * c.opt: Add Wconditionally-supported.
10370
6a2fa4b2
GS
103712013-07-08 Graham Stott <graham.stott@btinternet.com>
10372
adfac8df 10373 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10374 unused variables l_length and l_node.
10375
ecdbd01a 103762013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10377
10378 PR c/57821
10379 * c-common.c (complete_array_type): Delay folding first index
10380 like other indices. When folding, check for index overflow.
10381
bedc293e
MG
103822013-06-27 Marc Glisse <marc.glisse@inria.fr>
10383
10384 PR c++/57509
10385 * c-common.h (c_build_vec_perm_expr): New complain argument.
10386 * c-common.c (c_build_vec_perm_expr): Likewise.
10387 Use save_expr also in C++.
10388
604b2bfc
GDR
103892013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10390
10391 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10392 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10393 * c-opts.c (c_common_post_options): Likewise.
10394
dfeadaa0 103952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10396
10397 * array-notation-common.c (length_mismatch_in_expr): Changed the
10398 parameter type's from a dynamic array to a vec_tree. Also removed
10399 the size parameters.
10400 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10401 the change above.
10402
2ce86d2e
BI
104032013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10404
10405 * c-common.h (struct cilkplus_an_parts): New structure.
10406 (struct cilkplus_an_loop_parts): Likewise.
10407 (cilkplus_extract_an_triplets): New prototype.
10408 (fix_sec_implicit_args): Likewise.
10409 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10410 (fix_sec_implicit_args): Likewise.
604b2bfc 10411
07a6825b
BI
104122013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10413
10414 * array-notation-common.c (find_inv_trees): Removed an unwanted
10415 typecasting.
10416 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10417 enum rid to enum tree_code.
10418
08346abd
JH
104192013-06-11 Jan Hubicka <jh@suse.cz>
10420
10421 * c-common.c (handle_alias_ifunc_attribute): Do not set
10422 DECL_EXTERNAL for weakref variables.
10423 * c-pragma.c (handle_pragma_weak): Make sure aliases
10424 are not declared as external.
10425
d60f1706
BI
104262013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10427
10428 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10429 function from c/c-array-notation.c.
10430 (is_cilkplus_reduce_builtin): Likewise.
10431 (find_rank): Likewise.
10432 (extract_array_notation_exprs): Likewise.
10433 (replace_array_notations): Likewise.
10434 (find_inv_trees): Likewise.
10435 (replace_inv_trees): Likewise.
10436 (contains_array_notation_expr): Likewise.
10437 (find_correct_array_notation_type): Likewise.
10438 * c-common.h (struct inv_list): Moved this struct from the file
10439 c/c-array-notation.c and added a new field called additional tcodes.
10440 (length_mismatch_in_expr_p): New prototype.
10441 (is_cilkplus_reduce_builtin): Likewise.
10442 (find_rank): Likewise.
10443 (extract_array_notation_exprs): Likewise.
10444 (replace_array_notation): Likewise.
10445 (find_inv_trees): Likewise.
10446 (replace_inv_trees): Likewise.
10447 (find_correct_array_notation_type): Likewise.
dfeadaa0 10448
36536d79
BI
104492013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10450
10451 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10452 function array_notation_init_builtins is called.
10453 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10454 * c-common.def (ARRAY_NOTATION_REF): New tree.
10455 * c-common.h (build_array_notation_expr): New function declaration.
10456 (build_array_notation_ref): Likewise.
10457 (extract_sec_implicit_index_arg): New extern declaration.
10458 (is_sec_implicit_index_fn): Likewise.
10459 (ARRAY_NOTATION_CHECK): New define.
10460 (ARRAY_NOTATION_ARRAY): Likewise.
10461 (ARRAY_NOTATION_START): Likewise.
10462 (ARRAY_NOTATION_LENGTH): Likewise.
10463 (ARRAY_NOTATION_STRIDE): Likewise.
10464 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10465 ARRAY_NOTATION_REF.
10466 (pp_c_expression): Likewise.
10467 * c.opt (flag_enable_cilkplus): New flag.
10468 * array-notation-common.c: New file.
10469
f7716d57
JJ
104702013-05-14 Jakub Jelinek <jakub@redhat.com>
10471
10472 PR c++/57274
10473 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10474
a5e0cd1d
MG
104752013-05-10 Marc Glisse <marc.glisse@inria.fr>
10476
10477 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10478 vectors.
10479
f6bc1c4a
HS
104802013-05-07 Han Shen <shenhan@google.com>
10481
10482 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10483
3f12f6e9
SKS
104842013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10485
10486 * c-common.c (check_user_alignment): Emit error for negative values.
10487
61949153
PC
104882013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10489
10490 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10491
e93e18e9
PC
104922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10493
10494 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10495 __GXX_EXPERIMENTAL_CXX1Y__.
10496
44d90fe1 104972013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10498 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10499
10500 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10501 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10502 to simply use OPT_Wpointer_arith.
10503 (c_sizeof_or_alignof_type): Likewise.
10504
13f39b2e
PC
105052013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10506
10507 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10508
4b84d650
JJ
105092013-04-12 Jakub Jelinek <jakub@redhat.com>
10510
10511 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10512 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10513 specifiers.
10514
fb037b5d
SB
105152013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10516
10517 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10518
4e856798
PC
105192013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10520
10521 * c-common.c (pointer_int_sum): Remove dead code.
10522
4b1baac8
RS
105232013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10524
10525 PR middle-end/56524
10526 * c-common.c (handle_optimize_attribute): Don't call
10527 save_optabs_if_changed.
10528
0b50e654
JJ
105292013-03-05 Jakub Jelinek <jakub@redhat.com>
10530
10531 PR middle-end/56461
10532 * c-pch.c (pch_init): Free target_validity at the end.
10533
48c41403
JJ
105342013-03-04 Jakub Jelinek <jakub@redhat.com>
10535
10536 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10537
e664c61c
KS
105382013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10539 Jakub Jelinek <jakub@redhat.com>
10540
10541 PR sanitizer/56454
10542 * c-common.c (handle_no_sanitize_address_attribute): New function.
10543 (c_common_attribute_table): Add no_sanitize_address attribute.
10544 (handle_no_address_safety_analysis_attribute): Add
10545 no_sanitize_address attribute, not no_address_safety_analysis
10546 attribute.
10547
a475fd3d 105482013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10549
10550 PR target/52555
10551 * c-common.c (handle_optimize_attribute): Call
10552 save_optabs_if_changed.
10553
f6007d99
JJ
105542013-02-18 Jakub Jelinek <jakub@redhat.com>
10555 Steven Bosscher <steven@gcc.gnu.org>
10556
10557 PR pch/54117
10558 * c-opts.c (c_common_post_options): If debug info is enabled
10559 and non-dwarf*, refuse to load PCH files and when writing PCH
10560 file warn.
10561
cf35e2b1
JJ
105622013-02-05 Jakub Jelinek <jakub@redhat.com>
10563
10564 PR middle-end/56167
10565 * c-common.c (handle_error_attribute): Fix condition.
10566
32887460
JJ
105672013-01-30 Jakub Jelinek <jakub@redhat.com>
10568
10569 PR c++/55742
10570 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10571
5af057d8
JM
105722013-01-18 Jason Merrill <jason@redhat.com>
10573
10574 PR target/54908
10575 * c.opt (-fextern-tls-init): New.
10576 * c-opts.c (c_common_post_options): Handle it.
10577
cc83c823
JJ
105782013-01-09 Jakub Jelinek <jakub@redhat.com>
10579
10580 PR c/48418
10581 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10582 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10583 and is either negative or bigger or equal to type precision
10584 of the first operand.
10585
a859517f
MP
105862012-12-03 Marek Polacek <polacek@redhat.com>
10587
10588 PR c/55570
10589 * c-common.c (check_user_alignment): Swap order of tests,
10590 check TREE_CODE first.
10591
2d7aa578
ESR
105922012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10593
10594 PR c++/52654
10595 * c-common.h (overflow_type): New enum.
10596 (build_userdef_literal): Add overflow_type argument.
10597 (tree_userdef_literal): Add overflow_type.
10598 (USERDEF_LITERAL_OVERFLOW): New access macro.
10599 * c-common.c (build_userdef_literal): Add overflow_type
10600 argument.
10601 * c-lex.c (c_lex_with_flags): Add overflow_type to
10602 build_userdef_literal calls.
10603 (interpret_integer, interpret_float): Add overflow_type argument.
10604
cc3c4f62
RB
106052012-11-28 Richard Biener <rguenther@suse.de>
10606
10607 PR c/35634
10608 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10609 here and use a type with proper overflow behavior for types that would
10610 need to be promoted for the arithmetic.
10611
77bc5132
JJ
106122012-11-23 Jakub Jelinek <jakub@redhat.com>
10613
10614 PR sanitizer/55435
10615 * c-common.c (handle_no_address_safety_analysis_attribute): New
10616 function.
10617 (c_common_attribute_table): Add no_address_safety_analysis.
10618
5dc99c46
SB
106192012-11-16 Simon Baldwin <simonb@google.com>
10620
10621 * c.opt: Add f[no-]canonical-system-headers.
10622 * c-opts.c (c_common_handle_option): Handle
10623 OPT_fcanonical_system_headers.
10624
a4a0016d
ESR
106252012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10626
10627 PR c++/54413
10628 * c-opts.c (c_common_handle_option): Set new flags.
10629 * c.opt: Describe new flags.
10630
7dbb85a7
JM
106312012-11-09 Jason Merrill <jason@redhat.com>
10632
10633 * c.opt (Wabi-tag): New.
10634
ad7bac31
AK
106352012-11-09 Andi Kleen <ak@linux.intel.com>
10636
10637 PR 55139
10638 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10639 MEMMODEL_MASK
ad7bac31 10640
7332899a
MLI
106412012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10642
10643 PR c/53063
10644 * c.opt (Wformat): Make it Alias Wformat=1.
10645 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10646 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10647 LangEnabledBy.
10648 (Wformat=): RejectNegative. Use LangEnabledBy.
10649 (Wnonnull): Use LangEnabledBy.
10650 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10651 * c-format.c (set_Wformat): Delete.
10652 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10653 (maybe_read_dollar_number): Likewise.
10654 (avoid_dollar_number): Likewise.
10655 (finish_dollar_format_checking): Likewise.
10656 (check_format_info): Likewise.
10657 (check_format_info_main): Likewise.
10658 (check_format_types): Likewise.
10659 (format_type_warning): Likewise.
10660 * c-common.c (int): Likewise.
10661 (check_function_sentinel): Likewise.
8e745a17 10662 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10663
34a180a6
MLI
106642012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10665
10666 PR c/53063
10667 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10668 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10669 Use LangEnabledBy.
10670 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10671 common.opt.
10672 (Wvariadic-macros): Init(1).
10673 * c-opts.c (c_common_handle_option): Do not handle them
10674 explicitly.
10675 (c_common_post_options): Likewise.
10676 (sanitize_cpp_opts): warn_unused_macros is now
10677 cpp_warn_unused_macros.
10678 (push_command_line_include): Likewise.
10679 * c-common.c (warn_unknown_pragmas): Do not define.
10680 * c-common.h (warn_unknown_pragmas): Do not declare.
10681
3f46d6a5
MLI
106822012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10683
10684 PR c/51294
10685 * c-common.c (conversion_warning): Handle conditional expressions.
10686
880661a4
JW
106872012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10688
10689 PR c++/54930
10690 * c.opt (Wreturn_local_addr): Define new option.
10691
4514a96b
JM
106922012-10-25 Jason Merrill <jason@redhat.com>
10693
f14edc1a
JM
10694 * c.opt (Wvirtual-move-assign): New.
10695
4514a96b
JM
10696 * c.opt (Winherited-variadic-ctor): New.
10697
93100c6b
MG
106982012-10-25 Marc Glisse <marc.glisse@inria.fr>
10699
10700 PR c++/54427
10701 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10702
1efcb8c6
JM
107032012-10-23 Joseph Myers <joseph@codesourcery.com>
10704
10705 * c-common.h (pch_cpp_save_state): Declare.
10706 * c-target.def (c_preinclude): New hook.
10707 * c-opts.c (done_preinclude): New.
10708 (push_command_line_include): Handle default preincluded header.
10709 (cb_file_change): Call pch_cpp_save_state when calling
10710 push_command_line_include.
10711 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10712 (pch_cpp_save_state): New.
10713 (pch_init): Call pch_cpp_save_state conditionally, instead of
10714 calling cpp_save_state.
10715
4a0ae68e
MLI
107162012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10717
10718 PR c/53063
10719 PR c/40989
10720 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10721 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10722 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10723 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10724 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10725 * c-opts.c (c_common_handle_option): Remove explicit handling from
10726 here.
10727 (c_common_post_options): Likewise.
10728
67e4210b
EB
107292012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10730
10731 * c-ada-spec.c (LOCATION_COL): Delete.
10732 (compare_location): New function.
10733 (compare_node): Use it.
10734 (compare_comment): Likewise.
10735
65d4f2cd
MLI
107362012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10737
10738 PR c/53063
10739 PR c/40989
10740 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10741 * c-opts.c (c_common_handle_option): Do not set them here. Add
10742 comment.
10743 (c_common_post_options): Likewise.
10744
909881cb
EB
107452012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10746
10747 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10748 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10749 Remove POINTER_TYPE handling, add large unsigned handling and use
10750 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10751
3a785c97
JJ
107522012-10-12 Jakub Jelinek <jakub@redhat.com>
10753
10754 PR c/54381
10755 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10756 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10757 locs and array of 3 trees instead of just single loc and single
10758 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10759 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10760 For *cmp* builtins that take two sources strings report warnings
10761 about first and second source, not about destination and source.
10762
5e54f81d
MG
107632012-10-12 Marc Glisse <marc.glisse@inria.fr>
10764
10765 PR c++/53055
10766 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10767
f5b02f1e
EB
107682012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10769
10770 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10771 declaring something coming from another file.
10772
b46dbc6c
AC
107732012-10-10 Arnaud Charlet <charlet@adacore.com>
10774
f5b02f1e 10775 PR ada/54845
b46dbc6c
AC
10776 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10777
5d9de0d0
PC
107782012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10779
10780 PR c++/54194
10781 * c-common.c (warn_about_parentheses): Add location_t parameter;
10782 use EXPR_LOC_OR_LOC.
10783 * c-common.h: Update declaration.
10784
a212e43f
MG
107852012-10-09 Marc Glisse <marc.glisse@inria.fr>
10786
10787 PR c++/54427
10788 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10789 more operations. Make error messages optional.
10790 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10791 (scalar_to_vector): Declare.
10792
b1db7f91
JM
107932012-10-08 Jason Merrill <jason@redhat.com>
10794
10795 * c-common.c (c_common_reswords): Add thread_local.
10796
e28d52cf
DS
107972012-10-08 Dodji Seketeli <dodji@redhat.com>
10798
10799 PR c++/53528 C++11 attribute support
10800 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10801 new functions.
10802 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10803 static function.
10804 (handle_aligned_attribute): In choose strictest alignment
10805 among many. Use new check_cxx_fundamental_alignment_constraints.
10806 (handle_transparent_union_attribute): In c++11 attribute syntax,
10807 don't look through typedefs.
10808
3b78de56
AC
108092012-10-04 Arnaud Charlet <charlet@adacore.com>
10810
10811 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10812 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10813 out of dumpfile.h.
10814
6040bb5f
DC
108152012-09-25 Dehao Chen <dehao@google.com>
10816
10817 PR middle-end/54645
3b78de56 10818 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10819 map when read in the pch.
10820
3f8257db 108212012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10822
10823 * c-ada-spec.c: Style fixes.
10824
3f8257db 108252012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10826
10827 * c.opt (-fada-spec-parent): Define new command line switch.
10828 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10829 is specified, generate binding spec as a child of the specified unit.
10830
0ccb505d
PC
108312012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10832 Manuel López-Ibáñez <manu@gcc.gnu.org>
10833
10834 PR c++/53210
10835 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10836
c583af79
AC
108372012-08-23 Arnaud Charlet <charlet@adacore.com>
10838
10839 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10840 for pointers, and add missing Convention C pragma.
10841 (print_ada_struct_decl): Add missing aliased keyword.
10842 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10843
1a4049e7
JJ
108442012-08-17 Jakub Jelinek <jakub@redhat.com>
10845
10846 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10847 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10848 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10849 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10850 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10851
70b5e7dc
RG
108522012-08-10 Richard Guenther <rguenther@suse.de>
10853
10854 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10855
f8923f7e
SB
108562012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10857
10858 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10859 instead of separate pp_newline and pp_flush.
10860 (print_c_tree): Likewise.
10861
e45abe1f
RH
108622012-07-26 Richard Henderson <rth@redhat.com>
10863
10864 * c-common.c (handle_hot_attribute): Allow labels.
10865 (handle_cold_attribute): Likewise.
10866
332f1d24
JJ
108672012-07-20 Jakub Jelinek <jakub@redhat.com>
10868
10869 PR c++/28656
10870 * c-common.c (check_function_nonnull): Handle multiple nonnull
10871 attributes properly.
10872
7ee2468b
SB
108732012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10874
10875 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10876 * c-ada-spec.c: Likewise.
10877 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10878
ee7b28eb
SB
108792012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10880
10881 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10882 Remove code conditional on it.
10883
6bdf3519
SB
108842012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10885
10886 * c-gimplify.c: Do not include basic-block.h.
10887 * c-common.c: Do not include linfuncs.h.
10888
532aafad
SB
108892012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10890
10891 * c-common.h: Include tree.h.
10892
8d0d1915
JM
108932012-07-02 Jason Merrill <jason@redhat.com>
10894
10895 PR c++/53524
10896 * c-common.c (get_priority): Call default_conversion.
10897
fbc873ad
UB
108982012-07-01 Uros Bizjak <ubizjak@gmail.com>
10899
10900 * c-pch.c (c_common_write_pch): Remove unused variables.
10901
d4a10d0a
SB
109022012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10903
10904 * cppspec.c: Moved from gcc/ to here.
10905
6f3a2e23
KT
109062012-06-27 Kai Tietz <ktietz@redhat.com>
10907
10908 PR preprocessor/37215
10909 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10910
8ca92d04
SB
109112012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10912
10913 * c-common.h (c_common_print_pch_checksum): Remove.
10914 * c-pch.c: Do not include output.h.
10915 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10916 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10917 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10918 (struct c_pch_header): Remove.
10919 (get_ident): Update gpch version.
10920 (pch_init): Do not print executable_checksum to asm_out_file.
10921 Do not fail if there is no asm_out_file to read back from. Set
10922 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10923 (c_common_write_pch): Verify that nothing was written to asm_out_file
10924 since pch_init was called. Do not write a c_pch_header, and do not
10925 copy from asm_out_file to the PCH.
10926 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10927 the content of asm_out_file from the PCH.
10928 (c_common_print_pch_checksum): Remove.
10929 * c-opts.c (c_common_init): Print out executable_checksum directly.
10930
70f42967
SB
109312012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10932
10933 * c-target.def (objc_declare_unresolved_class_reference,
10934 objc_declare_class_definition): Add new hooks.
10935
a8781821
SB
109362012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10937
10938 * c-lex.c: Do not include output.h.
10939 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10940 Remove uses of ASM_OUTPUT_IDENT.
10941
9e1a8dd1
RR
109422012-06-15 Marc Glisse <marc.glisse@inria.fr>
10943
10944 PR c++/51033
10945 * c-common.h (c_build_vec_perm_expr): Move decl here.
10946 * c-common.c (c_build_vec_perm_expr): Move definition
10947 here.
10948
6f07a821
SB
109492012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10950
10951 * c.opt (fconserve-space): Turn into a no-op.
10952
9faeb493 109532012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10954
10955 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10956 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10957 both the start and end of the function.
10958
a4b7d13c
SB
109592012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10960
10961 * c-common.c: Do not include output.h.
10962 * c-pragma.c: Likewise.
10963
c265f413
SA
109642012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10965
10966 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10967 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10968 (lang_decl_name): Handle namespace decls.
10969
be7a421e
SB
109702012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10971
10972 * c-ada-spec.c: Do not include output.h.
10973 * c-semantics.c: Likewise.
10974
65de6659
JM
109752012-05-29 Joseph Myers <joseph@codesourcery.com>
10976
10977 * c-common.c: Fix typo.
10978
ca5f4331
MM
109792012-05-29 Michael Matz <matz@suse.de>
10980
10981 * c-common.h (c_expand_decl): Remove prototype.
10982
4f7f7aca
MLI
109832012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10984
10985 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10986 * c-opts.c (c_common_handle_option): Remove code handling
10987 warn_missing_braces.
10988
4a792f9b
PC
109892012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10990
10991 PR c++/25137
10992 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10993 -Wmissing_braces.
10994
650dc14a
DS
109952012-05-22 Dodji Seketeli <dodji@redhat.com>
10996
10997 PR c++/53322
10998 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10999
9b095bf1
MLI
110002012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11001
11002 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11003 * c-opts.c (c_common_handle_option): Do not handle explicitly
11004 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11005
0b2c4be5
DS
110062012-05-16 Dodji Seketeli <dodji@redhat.com>
11007
11008 PR preprocessor/7263
ab20d992 11009 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11010 to cpp_classify_number. For diagnostics, use the precise location
11011 instead of the global input_location.
11012
a1bde5af
PC
110132012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11014
d02924ef 11015 PR c++/11856
a1bde5af
PC
11016 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11017
d1ede5f4
BS
110182012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11019
a1bde5af 11020 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11021
f2bc201f
MLI
110222012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11023
11024 PR 53063
11025 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11026 Wreorder): Use LangEnabledBy.
11027 * c-opts.c (c_common_handle_option): Do not enable them
11028 explicitly. Call lang-specific generated functions.
11029 (c_common_post_options): Do not set them here.
11030
95744782
MLI
110312012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11032
11033 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11034 Wmissing-field-initializers,Wmissing-parameter-type,
11035 Wold-style-declaration,Woverride-init): Use EnabledBy.
11036 * c-opts.c (c_common_post_options): Do not set here explicitly.
11037
7d5a5747
MLI
110382012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11039
11040 PR 53063
11041 * c-opts.c (c_common_handle_option): Use handle_generated_option
11042 to enable sub-options.
11043
5a3c9cf2
PC
110442012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11045
11046 PR c++/53158
11047 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11048
3ac8781c
RG
110492012-05-10 Richard Guenther <rguenther@suse.de>
11050
11051 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11052 adjust commentary about TYPE_IS_SIZETYPE types.
11053
1e537948
MLI
110542012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11055
11056 PR c++/53261
11057 * c-common.c (warn_logical_operator): Check that argument of
11058 integer_zerop is not NULL.
11059
f2c4a785
MLI
110602012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11061
11062 PR c/43772
11063 * c-common.c (warn_logical_operator): Do not warn if either side
11064 is already true or false.
11065
50f305ca
MLI
110662012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11067
11068 PR c/51712
11069 * c-common.c (expr_original_type): New.
11070 (shorten_compare): Do not warn for enumeration types.
11071
0c3641b0
MLI
110722012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11073
11074 * c.opt (fpermissive): Add Var(flag_permissive).
11075
7edaa4d2
MG
110762012-04-30 Marc Glisse <marc.glisse@inria.fr>
11077
11078 PR c++/51033
11079 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11080 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11081
b9c8da34
DS
110822012-04-30 Dodji Seketeli <dodji@redhat.com>
11083
11084 Add -Wvarargs option
ab20d992 11085 * c.opt (Wvarargs): Define new option.
b9c8da34 11086
e6c69da0
MLI
110872012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11088
11089 * c-common.c (check_function_arguments): Replace
11090 Wmissing-format-attribute with Wsuggest-attribute=format.
11091
90137d8f
MLI
110922012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11093
11094 * c.opt (Wsuggest-attribute=format): New. Alias of
11095 Wmissing-format-attribute.
11096 * c-format.c (decode_format_type): Replace
11097 Wmissing-format-attribute with Wsuggest-attribute=format.
11098 (check_function_format): Likewise.
11099
9faeb493 111002012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11101
11102 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11103 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11104 * c.opt: Add Wliteral-suffix.
11105
c1771a20
MLI
111062012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11107
11108 PR c/44774
11109 * c.opt (Wpedantic): New.
11110 (pedantic): Alias Wpedantic.
11111 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11112 (c_common_post_options): Likewise.
11113 (sanitize_cpp_opts): Likewise.
11114 * c-lex.c (interpret_float): Likewise.
11115 * c-format.c (check_format_types): Likewise.
11116 * c-common.c (pointer_int_sum): Likewise.
11117 (c_sizeof_or_alignof_type): Likewise.
11118 (c_add_case_label): Likewise.
11119 (c_do_switch_warnings): Likewise.
11120 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11121
04b391c1
JM
111222012-04-15 Jason Merrill <jason@redhat.com>
11123
11124 PR c++/52818
11125 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11126 (C_STD_NAME): Distinguish between C++98 and C++11.
11127
ac868f29
EB
111282012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11129
11130 PR target/52624
11131 * c-common.h (uint16_type_node): Rename into...
11132 (c_uint16_type_node): ...this.
11133 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11134 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11135
fd4116f4
MLI
111362012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11137
11138 * c-common.c (warn_if_unused_value): Move definition to here.
11139 * c-common.h (warn_if_unused_value): Move declaration to here.
11140
573ac65e
WB
111412012-03-23 William Bader <williambader@hotmail.com>
11142
11143 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11144
552b8185
JM
111452012-03-20 Jason Merrill <jason@redhat.com>
11146
11147 * c-common.h (enum cxx_dialect): Add cxx1y.
11148 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11149 test.
11150 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11151 * c-opts.c (c_common_post_options): Likewise.
11152 (set_std_cxx1y): New.
11153 (c_common_handle_option): Call it.
11154 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11155
04398fa8
PC
111562012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11157
11158 PR c++/14710
11159 * c.opt ([Wuseless-cast]): Add.
11160
d2a12ae7
RG
111612012-03-16 Richard Guenther <rguenther@suse.de>
11162
11163 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11164
a12bf402
MLI
111652012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11166
11167 PR c++/44783
11168 * c.opt (ftemplate-backtrace-limit) Add.
11169
5c30094f
RO
111702012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11171
11172 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11173 handling.
11174 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11175 (init_pragma): Don't register extern_prefix.
11176
21fa2faf
RG
111772012-03-12 Richard Guenther <rguenther@suse.de>
11178
11179 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11180 (builtin_type_for_size): Likewise.
11181
e3793c6f
JJ
111822012-02-13 Jakub Jelinek <jakub@redhat.com>
11183
11184 PR c++/52215
11185 * c-common.c (sync_resolve_params): Don't decide whether to convert
11186 or not based on TYPE_SIZE comparison, convert whenever arg_type
11187 is unsigned INTEGER_TYPE.
11188
93286335
PC
111892012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11190
11191 PR c/52118
11192 * c.opt ([Wunused-local-typedefs]): Fix description.
11193
7a421706
MS
111942012-01-24 Mike Stump <mikestump@comcast.net>
11195
11196 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11197 exactly.
11198
ba9b1f11
RG
111992012-01-18 Richard Guenther <rguenther@suse.de>
11200
11201 * c-opts.c (c_common_post_options): Reset LTO flags if
11202 we are about to generate a PCH.
11203
465406be
PC
112042012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11205
11206 PR c++/51777
11207 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11208 use pp_unsigned_wide_integer.
11209
aee15221
RG
112102012-01-10 Richard Guenther <rguenther@suse.de>
11211
11212 PR middle-end/51806
11213 * c-opts.c (c_common_handle_option): Move -Werror handling
11214 to language independent code.
11215
5720c0dc
RG
112162012-01-05 Richard Guenther <rguenther@suse.de>
11217
11218 PR middle-end/51764
11219 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11220 from common.opt.
11221
73ac190a
PC
112222011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11223
11224 PR c++/51316
11225 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11226 of array types with an unknown bound.
11227
48b0b196
JM
112282011-12-20 Joseph Myers <joseph@codesourcery.com>
11229
11230 * c-common.c (flag_isoc99): Update comment to refer to C11.
11231 (flag_isoc1x): Change to flag_isoc11.
11232 * c-common.h (flag_isoc99): Update comment to refer to C11.
11233 (flag_isoc1x): Change to flag_isoc11.
11234 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11235 C11.
11236 * c-opts.c (set_std_c1x): Change to set_std_c11.
11237 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11238 Call set_std_c11.
11239 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11240 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11241 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11242 standard.
11243 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11244 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11245 (std=gnu1x): Make alias of std=gnu11.
11246
d58d6eb5
JM
112472011-12-19 Jason Merrill <jason@redhat.com>
11248
11249 PR c++/51228
11250 * c-common.c (handle_transparent_union_attribute): Check the first
11251 field if the type is complete.
11252
b3908fcc
JW
112532011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11254
11255 PR libstdc++/51365
11256 * c-common.c (RID_IS_FINAL): Add.
11257 * c-common.h (RID_IS_FINAL): Add.
11258
fea3ca91
IS
112592011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11260
11261 * c.opt (fgnu-runtime): Provide full description.
11262 (fnext-runtime): Likewise.
11263 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11264
62bad7cd
AM
112652011-11-28 Andrew MacLeod <amacleod@redhat.com>
11266
11267 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11268 predefines in one place. Add LOCK_FREE predefines.
11269 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11270 new func.
11271
c466c4ff
AM
112722011-11-24 Andrew MacLeod <amacleod@redhat.com>
11273
11274 PR c/51256
9faeb493 11275 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11276 conditions
9faeb493
UB
11277 (resolve_overloaded_atomic_exchange,
11278 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11279 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11280 error_mark_node for error conditions.
9faeb493 11281
a5952633
RG
112822011-11-08 Richard Guenther <rguenther@suse.de>
11283
11284 PR middle-end/51010
ab20d992 11285 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11286
0a35513e
AH
112872011-11-07 Richard Henderson <rth@redhat.com>
11288 Aldy Hernandez <aldyh@redhat.com>
11289 Torvald Riegel <triegel@redhat.com>
11290
11291 Merged from transactional-memory.
11292
11293 * c-common.c (handle_tm_wrap_attribute,
11294 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11295 (struct c_common_reswords): Added __transaction* keywords.
11296 (struct c_common_attribute_table): Added transaction* and tm_regparm
11297 attributes.
11298 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11299 masks.
11300 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11301 find_tm_attribute): Declare.
11302
6d87092d
JM
113032011-11-07 Jason Merrill <jason@redhat.com>
11304
11305 PR c++/35688
11306 * c-common.c, c-common.h: Revert yesterday's changes.
11307
8e7860a1
JM
113082011-11-06 Jason Merrill <jason@redhat.com>
11309
11310 PR c++/35688
11311 * c-common.c (decl_has_visibility_attr): Split out from...
11312 (c_determine_visibility): ...here.
11313 * c-common.h: Declare it.
11314
d19fa6b5
JM
113152011-11-06 Joseph Myers <joseph@codesourcery.com>
11316
11317 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11318 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11319 type.
11320 (check_user_alignment): New. Split out of
11321 handle_aligned_attribute. Disallow integer constants with
11322 noninteger types. Conditionally allow zero.
11323 (handle_aligned_attribute): Use check_user_alignment.
11324 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11325
86951993
AM
113262011-11-06 Andrew MacLeod <amacleod@redhat.com>
11327 Richard Henderson <rth@redhat.com>
11328
11329 Merged from cxx-mem-model.
11330
11331 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11332 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11333 parameters that are the same type size.
11334 (get_atomic_generic_size): New. Find size of generic
11335 atomic function parameters and do typechecking.
11336 (add_atomic_size_parameter): New. Insert size into parameter list.
11337 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11338 either __atomic_exchange_n or external library call.
9faeb493 11339 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11340 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11341 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11342 __atomic_load_n or an external library call.
11343 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11344 __atomic_store_n or an external library call.
11345 (resolve_overloaded_builtin): Handle new __atomic builtins.
11346
cf9e9959
EB
113472011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11348
11349 PR c++/50608
11350 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11351 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11352 <INDIRECT_REF>: Return the argument.
11353 <ARRAY_REF>: Remove special code for negative offset.
11354 Call fold_build_pointer_plus instead of size_binop.
11355 (fold_offsetof): Remove STOP_REF argument and adjust.
11356 * c-common.h (fold_offsetof_1): Declare.
11357 (fold_offsetof): Remove STOP_REF argument.
11358
25339f10
JM
113592011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11360
11361 PR c++/50810
11362 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11363 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11364 Wnarrowing for C++0x and C++98.
11365 * c.opt ([Wnarrowing]): Update.
11366
89401152
PC
113672011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11368
11369 PR c++/44277
11370 * c.opt: Add Wzero-as-null-pointer-constant.
11371
97e3ad20
JM
113722011-10-31 Jason Merrill <jason@redhat.com>
11373
15694fdd
JM
11374 * c.opt (-fdeduce-init-list): Off by default.
11375
97e3ad20
JM
11376 PR c++/50920
11377 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11378 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11379 and -Wc++11-compat.
11380 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11381
fb9120e3
RAV
113822011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11383
11384 PR c++/30066
11385 * c.opt (fvisibility-inlines-hidden): Description change.
11386
3ce4f9e4
ESR
113872011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11388
11389 Implement C++11 user-defined literals.
11390 * c-common.c (build_userdef_literal): New.
11391 * c-common.def: New tree code.
11392 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11393 * c-lex.c (interpret_float): Add suffix parm.
11394 (c_lex_with_flags): Build literal tokens.
11395
5f53c243
PC
113962011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11397
11398 PR c++/50841
11399 Revert:
11400 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11401
11402 PR c++/50810
11403 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11404 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11405 Wnarrowing for C++0x and C++98.
11406 * c.opt ([Wnarrowing]): Update.
11407
263734e1
PC
114082011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11409
11410 PR c++/50810
11411 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11412 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11413 Wnarrowing for C++0x and C++98.
11414 * c.opt ([Wnarrowing]): Update.
11415
d2e312d7
PC
114162011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11417
11418 PR c++/45385
11419 * c-common.c (conversion_warning): Remove code looking for
11420 artificial operands.
11421
d17687f6
DS
114222011-10-18 Dodji Seketeli <dodji@redhat.com>
11423
11424 PR bootstrap/50760
11425 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11426 !NO_IMPLICIT_EXTERN_C.
d17687f6 11427
fc8396e9
PC
114282011-10-17 Michael Spertus <mike_spertus@symantec.com>
11429
11430 * c-common.c (c_common_reswords): Add __bases,
11431 __direct_bases.
11432 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11433
114342011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11435
11436 PR c++/50757
11437 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11438
847e697a
TT
114392011-10-15 Tom Tromey <tromey@redhat.com>
11440 Dodji Seketeli <dodji@redhat.com>
11441
11442 * c.opt (fdebug-cpp): New option.
11443 * c-opts.c (c_common_handle_option): Handle the option.
11444 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11445 output stream in parameter. Factorized from ...
11446 (maybe_print_line): ... this. Dump location debug information when
11447 -fdebug-cpp is in effect.
11448 (print_line_1): New static function. Takes an output stream in
11449 parameter. Factorized from ...
11450 (print_line): ... here. Dump location information when -fdebug-cpp
11451 is in effect.
11452 (scan_translation_unit): Dump location information when
11453 -fdebug-cpp is in effect.
11454
92582b75
TT
114552011-10-15 Tom Tromey <tromey@redhat.com>
11456 Dodji Seketeli <dodji@redhat.com>
11457
11458 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11459 without argument.
11460 * c-opts.c (c_common_handle_option)<case
11461 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11462 cases. Handle -ftrack-macro-expansion with and without argument.
11463
46427374
TT
114642011-10-15 Tom Tromey <tromey@redhat.com>
11465 Dodji Seketeli <dodji@redhat.com>
11466
11467 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11468 (print_line, cb_define, do_line_change): Adjust to avoid touching
11469 the internals of struct line_map. Use the public API instead.
11470 * c-pch.c (c_common_read_pch): Likewise.
11471 * c-lex.c (fe_file_change): Likewise.
11472
fc8396e9
PC
114732011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11474
11475 PR c++/17212
11476 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11477
114782011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11479
11480 PR c++/33067
11481 * c-pretty-print.c (pp_c_floating_constant): Output
11482 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11483
e79983f4
MM
114842011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11485
11486 * c-common.c (def_builtin_1): Delete old interface with two
11487 parallel arrays to hold standard builtin declarations, and replace
11488 it with a function based interface that can support creating
11489 builtins on the fly in the future. Change all uses, and poison
11490 the old names. Make sure 0 is not a legitimate builtin index.
11491 * c-omp.c (c_finish_omp_barrier): Ditto.
11492 (c_finish_omp_taskwait): Ditto.
11493 (c_finish_omp_flush): Ditto.
11494
6637388f
TG
114952011-10-11 Tristan Gingold <gingold@adacore.com>
11496
11497 * c.opt: (fallow-parameterless-variadic-functions): New.
11498
3797cb21
DS
114992011-09-08 Dodji Seketeli <dodji@redhat.com>
11500
11501 PR c++/33255 - Support -Wunused-local-typedefs warning
11502 * c-common.h (struct c_language_function::local_typedefs): New
11503 field.
9faeb493
UB
11504 (record_locally_defined_typedef, maybe_record_typedef_use)
11505 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11506 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11507 (maybe_record_typedef_use)
11508 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11509 * c.opt: Declare new -Wunused-local-typedefs flag.
11510
693ddb1b
EB
115112011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11512
11513 PR middle-end/50266
11514 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11515 computations.
11516
830c740f
RG
115172011-09-05 Richard Guenther <rguenther@suse.de>
11518
11519 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11520 of integer_minus_one_node for empty array upper bounds.
11521
892a371f
DS
115222011-08-28 Dodji Seketeli <dodji@redhat.com>
11523
11524 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11525 it's the first time it's being called on this main TU.
11526
0e3fdb48
RB
115272011-08-24 Richard Guenther <rguenther@suse.de>
11528
11529 PR c/49396
11530 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11531
115322011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11533
11534 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11535 defined in cpp_init_builtins and c_cpp_builtins.
11536
d4a83c10
JM
115372011-08-19 Joseph Myers <joseph@codesourcery.com>
11538
11539 * c-common.c (c_common_reswords): Add __builtin_complex.
11540 * c-common.h (RID_BUILTIN_COMPLEX): New.
11541
bbceee64
JM
115422011-08-18 Joseph Myers <joseph@codesourcery.com>
11543
11544 * c-common.c (c_common_reswords): Add _Noreturn.
11545 (keyword_is_function_specifier): Handle RID_NORETURN.
11546 * c-common.h (RID_NORETURN): New.
11547
3f8257db 115482011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11549
11550 * c-common.c (unsafe_conversion_p): New function. Check if it is
11551 unsafe to convert an expression to the type.
11552 (conversion_warning): Adjust, use unsafe_conversion_p.
11553 * c-common.h (unsafe_conversion_p): New function declaration.
11554
20906c66
JJ
115552011-08-02 Jakub Jelinek <jakub@redhat.com>
11556
11557 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11558 (c_finish_omp_taskyield): New prototype.
11559 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11560 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11561 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11562 or RHS1 have side-effects, evaluate those too in the right spot,
11563 if it is a decl and LHS is also a decl, error out if they
11564 aren't the same.
11565 (c_finish_omp_taskyield): New function.
11566 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11567 * c-pragma.c (omp_pragmas): Add taskyield.
11568 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11569 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11570 PRAGMA_OMP_CLAUSE_MERGEABLE.
11571
770e5a2e
DS
115722011-07-25 Dodji Seketeli <dodji@redhat.com>
11573
11574 * c-common.h (set_underlying_type): Remove parm name from
11575 declaration.
11576
1baae426
RG
115772011-07-25 Romain Geissler <romain.geissler@gmail.com>
11578
11579 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11580
fcb21722
JM
115812011-07-22 Jason Merrill <jason@redhat.com>
11582
76f86d00
JM
11583 PR c++/49793
11584 * c.opt (Wnarrowing): New.
11585
3a636414
JM
11586 PR c++/30112
11587 * c-common.h: Declare c_linkage_bindings.
11588 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11589
fcb21722
JM
11590 PR c++/49813
11591 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11592 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11593 as flag_isoc99 for 'restrict'.
11594 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11595
02614448
ILT
115962011-07-21 Ian Lance Taylor <iant@google.com>
11597
11598 PR middle-end/49705
11599 * c-common.c (c_disable_warnings): New static function.
11600 (c_enable_warnings): New static function.
11601 (c_fully_fold_internal): Change local unused_p to bool. Call
11602 c_disable_warnings and c_enable_warnings rather than change
11603 c_inhibit_evaluation_warnings.
11604
34429675
JM
116052011-07-20 Jason Merrill <jason@redhat.com>
11606
11607 PR c++/6709 (DR 743)
11608 PR c++/42603 (DR 950)
11609 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11610 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11611 (CPP_DECLTYPE): New.
11612 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11613
5d49b6a7
RG
116142011-07-19 Richard Guenther <rguenther@suse.de>
11615
11616 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11617 * c-omp.c (c_finish_omp_for): Likewise.
11618
e84a58ff
EB
116192011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11620
11621 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11622 body on the next line.
11623
329af3c7
JM
116242011-07-08 Jason Merrill <jason@redhat.com>
11625
4063e61b
JM
11626 PR c++/45437
11627 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11628
329af3c7
JM
11629 PR c++/49673
11630 * c-common.c (c_apply_type_quals_to_decl): Don't check
11631 TYPE_NEEDS_CONSTRUCTING.
11632
1a072294
RG
116332011-07-06 Richard Guenther <rguenther@suse.de>
11634
11635 * c-common.c (c_common_nodes_and_builtins):
11636 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11637
fce5dddd
RG
116382011-07-05 Richard Guenther <rguenther@suse.de>
11639
11640 * c-common.c (c_common_nodes_and_builtins): Build all common
11641 tree nodes first.
11642
45d439ac
JJ
116432011-06-27 Jakub Jelinek <jakub@redhat.com>
11644
56300785
JJ
11645 * c-common.h (c_tree_chain_next): New static inline function.
11646
45d439ac
JJ
11647 * c-common.c (check_builtin_function_arguments): Handle
11648 BUILT_IN_ASSUME_ALIGNED.
11649
e0a8ecf2
AM
116502011-06-21 Andrew MacLeod <amacleod@redhat.com>
11651
11652 * c-common.c: Add sync_ or SYNC__ to builtin names.
11653 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11654
116552011-06-20 Pierre Vittet <piervit@pvittet.com>
11656
11657 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11658 handler.
11659 (gen_pragma_handler): New union.
11660 (internal_pragma_handler): New type.
11661 (c_register_pragma_with_data)
11662 (c_register_pragma_with_expansion_and_data): New functions.
11663
11664 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11665 (c_register_pragma, c_register_pragma_with_expansion)
11666 (c_invoke_pragma_handler): Changed to work with
11667 internal_pragma_handler.
11668 (c_register_pragma_with_data)
11669 (c_register_pragma_with_expansion_and_data): New functions.
11670
677f3fa8
JM
116712011-06-14 Joseph Myers <joseph@codesourcery.com>
11672
11673 * c-common.c: Include common/common-target.h.
11674 (handle_section_attribute): Use
11675 targetm_common.have_named_sections.
11676 * c-cppbuiltin.c: Include common/common-target.h.
11677 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11678
d7fc8c14
RG
116792011-06-10 Richard Guenther <rguenther@suse.de>
11680
11681 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11682 to print a IDENTIFIER_NODE.
11683
10e48e39
RO
116842011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11685 Joseph Myers <joseph@codesourcery.com>
11686
11687 * c.opt (fbuilding-libgcc): New option.
11688 * c-cppbuiltin.c (c_cpp_builtins): Define
11689 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11690
6976ae51
JM
116912011-06-07 Jason Merrill <jason@redhat.com>
11692
3ff60975
JM
11693 * c-common.c (max_tinst_depth): Lower default to 900.
11694
6976ae51
JM
11695 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11696
009db074
RG
116972011-06-07 Richard Guenther <rguenther@suse.de>
11698
11699 * c-common.c (c_common_nodes_and_builtins): Do not set
11700 size_type_node or call set_sizetype.
11701
b4592b92
DS
117022011-06-07 Dodji Seketeli <dodji@redhat.com>
11703
11704 PR debug/49130
11705 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11706 type when using pointer comparison to compare types.
b4592b92 11707
014ab419
JW
117082011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11709
11710 * c.opt: Add -Wdelete-non-virtual-dtor.
11711 * c-opts.c (c_common_handle_option): Include it in -Wall.
11712
4f60111f
NF
117132011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11714
11715 PR bootstrap/49190
11716
11717 Revert:
11718 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11719
11720 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11721 not tree_common.
11722
4cc4f2f4
JJ
117232011-05-27 Jakub Jelinek <jakub@redhat.com>
11724
11725 PR c++/49165
11726 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11727 C++ don't call c_common_truthvalue_conversion on void type arms.
11728
38e01f9e
NF
117292011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11730
11731 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11732 (stmt_list_stack): Define.
11733 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11734 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11735
92e948a8
NF
117362011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11737
11738 * c-common.c (warning_candidate_p): Check for BLOCKs.
11739
a2fc3e63
NF
117402011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11741
11742 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11743 not tree_common.
11744
0957c029
JJ
117452011-05-25 Jakub Jelinek <jakub@redhat.com>
11746
11747 * c-common.c (def_fn_type): Remove extra va_end.
11748
828fb3ba
JM
117492011-05-23 Jason Merrill <jason@redhat.com>
11750
11751 PR c++/48106
11752 * c-common.c (c_common_get_narrower): New.
11753 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11754
dde05067
NF
117552011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11756
11757 * c-common.h (check_function_arguments): Tweak prototype of
11758 check_function_arguments.
11759 * c-common.c (check_function_arguments): Likewise. Adjust
11760 calls to check_function_nonnull, check_function_format, and
11761 check_function_sentinel.
11762 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11763 separate attributes and typelist arguments. Use
11764 FOREACH_FUNCTION_ARGS to iterate over argument types.
11765
3c0d13bf
PC
117662011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11767
11768 * c-common.c (c_common_reswords): Reorder.
11769 * c-common.h (rid): Likewise.
11770
8242dd04
NF
117712011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11772
11773 * c-common.c (def_fn_type): Don't call build_function_type, call
11774 build_function_type_array or build_varargs_function_type_array
11775 instead.
11776 (c_common_nodes_and_builtins): Likewise.
11777
3d528853
NF
117782011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11779
11780 * c-common.c (c_add_case_label): Omit the loc argument to
11781 build_case_label.
11782 * c-common.h (build_case_label): Remove.
11783 * c-semantics.c (build_case_label): Remove.
11784
a04a722b
JM
117852011-05-05 Joseph Myers <joseph@codesourcery.com>
11786
11787 * c-objc.h (objc_start_method_definition): Update prototype.
11788 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11789
e19a18d4
NF
117902011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11791
11792 * c-common.c (check_main_parameter_types): Reindent. Don't use
11793 TYPE_ARG_TYPES directly.
11794 (handle_nonnull_attribute): Likewise.
11795 (sync_resolve_params): Likewise.
11796 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11797 to check_format_string.
11798 (handle_format_attribute): Likewise.
11799 (check_format_string): Take a function type to examine instead of
11800 a type list. Use a function_arg_iterator to step through argument
11801 types.
11802
c62c040f
RG
118032011-05-04 Richard Guenther <rguenther@suse.de>
11804
11805 * c-common.c (fix_string_type): Use size_int for index type bounds.
11806 (start_fname_decls): Do not pass NULL to build_int_cst.
11807 (c_init_attributes): Likewise.
11808 * c-lex.c (c_lex_with_flags): Likewise.
11809
c12ff9d8
JM
118102011-04-27 Jason Merrill <jason@redhat.com>
11811
11812 * c-common.c (make_tree_vector_from_list): New.
11813 * c-common.h: Declare it.
11814
304dfbe3
RG
118152011-04-26 Richard Guenther <rguenther@suse.de>
11816
11817 PR preprocessor/48248
11818 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11819 for output size with -P.
11820
3c0d13bf
PC
118212011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11822
11823 * c-common.c (struct c_common_resword): Add __underlying_type.
11824 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11825
04695783
JM
118262011-04-20 Jim Meyering <meyering@redhat.com>
11827
11828 * c-format.c (init_dollar_format_checking): Remove useless
11829 if-before-free.
11830
0dc33c3c
NP
118312011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11832
11833 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11834 (objc_detect_field_duplicates): New.
0dc33c3c 11835 * stub-objc.c: Likewise.
3c0d13bf 11836
c59633d9
NP
118372011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11838
11839 * stub-objc.c (objc_declare_protocols): Renamed to
11840 objc_declare_protocol.
11841 * c-objc.h: Likewise.
3c0d13bf 11842
32dabdaf
NP
118432011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11844
11845 * stub-objc.c (objc_declare_class): Updated argument name.
11846
81f653d6
NF
118472011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11848
11849 * c-common.h (c_common_init_ts): Declare.
11850 * c-common.c (c_common_init_ts): Define.
11851
eb345401
NP
118522011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11853
11854 * c-objc.h (objc_build_message_expr): Updated prototype.
11855 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11856
a358e188
MJ
118572011-04-12 Martin Jambor <mjambor@suse.cz>
11858
11859 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11860 of cgraph_node.
11861
e6313a78
RG
118622011-04-11 Richard Guenther <rguenther@suse.de>
11863
11864 * c-common.c (complete_array_type): Build a range type of
11865 proper type.
11866
dcf0c47e
NF
118672011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11868
11869 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11870 (handle_type_generic_attribute): Likewise.
11871
1ee44b26
JM
118722011-04-07 Jason Merrill <jason@redhat.com>
11873
11874 PR c++/48450
11875 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11876 conversion from C++0x scoped enum.
11877
acce4e77
JM
118782011-04-06 Joseph Myers <joseph@codesourcery.com>
11879
11880 * c-target-def.h: New file.
11881 * c-target.def: New file.
11882 * c-target.h: New file.
11883 * c-common.c (targetcm): Don't define here.
11884 * c-common.h (default_handle_c_option): Declare.
11885 * c-format.c: Include c-target.h instead of target.h.
11886 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11887 include tm.h.
11888 (default_handle_c_option): Move from targhooks.c.
11889
e2eefb55
JJ
118902011-03-29 Jakub Jelinek <jakub@redhat.com>
11891
11892 PR preprocessor/48248
11893 * c-ppoutput.c (print): Add src_file field.
11894 (init_pp_output): Initialize it.
11895 (maybe_print_line): Don't optimize by adding up to 8 newlines
11896 if map->to_file and print.src_file are different file.
11897 (print_line): Update print.src_file.
11898
ba78087b
KT
118992011-03-25 Kai Tietz <ktietz@redhat.com>
11900
11901 * c-ada-spec.c (compare_comment): Use filename_cmp
11902 instead of strcmp for filename.
11903
0edf1bb2
JL
119042011-03-25 Jeff Law <law@redhat.com>
11905
adfac8df 11906 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11907
c7dc8804
JM
119082011-03-25 Jason Merrill <jason@redhat.com>
11909
11910 * c.opt: Add -std=c++03.
11911
d1d879b1
EB
119122011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11913
11914 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11915
3f8257db 119162011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11917
11918 PR target/12171
5050afdf
KT
11919 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11920 Display allowed attributes for function pointer types.
11921 (pp_c_attributes_display): New function to display
11922 attributes having affects_type_identity flag set to true.
11923 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11924
62d784f7
KT
11925 * c-common.c (c_common_attribute_table):
11926 Add new element.
11927 (c_common_format_attribute_table): Likewise.
11928
82d37118
JM
119292011-03-18 Jason Merrill <jason@redhat.com>
11930
49a000c3
JM
11931 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11932 * c-common.h: Don't declare it here.
11933 * c-common.c: Or define it here.
11934 * c-opts.c (c_common_handle_option): Or set it here.
11935
82d37118
JM
11936 PR c++/35315
11937 * c-common.c (handle_transparent_union_attribute): Don't
11938 make a duplicate type in C++.
11939
17bc631c
JM
119402011-03-15 Jason Merrill <jason@redhat.com>
11941
11942 * c-common.c (max_constexpr_depth): New.
11943 * c-common.h: Declare it.
11944 * c-opts.c (c_common_handle_option): Set it.
11945 * c.opt (fconstexpr-depth): New option.
11946
1b9b91a6
JM
119472011-03-11 Jason Merrill <jason@redhat.com>
11948
f231b5ff
JM
11949 * c-common.c (attribute_takes_identifier_p): Add missing const.
11950
1b9b91a6
JM
11951 PR c++/46803
11952 * c-common.c (attribute_takes_identifier_p): Assume that an
11953 unknown attribute takes an identifier.
11954
a19e4d44
NF
119552011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11956
11957 PR c/47786
11958 * c-common.c (c_type_hash): Call list_length instead of iterating
11959 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11960
982d62f6
JJ
119612011-02-19 Jakub Jelinek <jakub@redhat.com>
11962
11963 PR c/47809
11964 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11965
0a256240
NP
119662011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11967
11968 * c.opt (fobjc-abi-version=) New.
11969 (fobjc-nilcheck): New.
11970
ba9e6dd5
NF
119712011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11972
11973 PR c++/46890
11974 * c-common.h (keyword_is_decl_specifier): Declare.
11975 * c-common.c (keyword_is_decl_specifier): Define.
11976 (keyword_is_function_specifier): New function.
11977
7273813a
JJ
119782011-01-26 Jakub Jelinek <jakub@redhat.com>
11979
11980 PR c/47473
11981 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11982 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11983 REAL_TYPE.
11984
908ef79b
AC
119852011-01-26 Arnaud Charlet <charlet@adacore.com>
11986
11987 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11988
237e9384
JJ
119892011-01-26 Jakub Jelinek <jakub@redhat.com>
11990
11991 PR pch/47430
11992 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11993 after init_c_lex if pch_file is set.
11994
47ea1edf
DK
119952011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11996
d4dba752 11997 PR c++/43601
47ea1edf
DK
11998 * c.opt (-fkeep-inline-dllexport): New switch.
11999
2aa9c6ae
RG
120002011-01-12 Richard Guenther <rguenther@suse.de>
12001
12002 PR middle-end/32511
12003 * c-common.c (handle_weak_attribute): Warn instead of error
12004 on declaring an inline function weak.
12005
7bd11157
TT
120062011-01-05 Tom Tromey <tromey@redhat.com>
12007
12008 * c-common.h (lvalue_error): Update.
12009 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12010 not error.
12011
0e66e494 120122010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12013
b4f588c4
NP
12014 PR objc/47075
12015 * c-objc.h (objc_finish_message_expr): Added argument to
12016 prototype.
12017
f4da8dce
NF
120182010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12019
12020 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12021 Use prototype_p.
12022
46270f14
NP
120232010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12024
12025 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12026 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12027
4816c593
NF
120282010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12029
12030 * c-common.h (readonly_error): Declare.
12031 * c-common.c (readonly_error): Define.
12032
7a6daeb0
NF
120332010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12034
12035 * c-common.h (invalid_indirection_error): Declare.
12036 * c-common.c (invalid_indirection_error): Define.
12037
892f6119
RG
120382010-12-03 Richard Guenther <rguenther@suse.de>
12039
12040 PR c/46745
12041 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12042 (pp_c_unary_expression): Likewise.
12043 (pp_c_expression): Likewise.
12044
6c39e757
NP
120452010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12046
12047 * c-common.h (objc_finish_function): New.
12048 (objc_non_volatilized_type): Removed.
12049 (objc_type_quals_match): Removed.
12050 * stub-objc.c (objc_finish_function): New.
12051 (objc_non_volatilized_type): Removed.
12052 (objc_type_quals_match): Removed.
9faeb493 12053
7c475d11
JM
120542010-11-30 Joseph Myers <joseph@codesourcery.com>
12055
12056 * c-common.h (parse_optimize_options): Declare.
12057 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12058 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12059
71f3e391
JM
120602010-11-29 Joseph Myers <joseph@codesourcery.com>
12061
12062 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12063 GET_ENVIRONMENT.
12064 * c-pch.c (O_BINARY): Don't define here.
12065 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12066
d5fabb58
JM
120672010-11-25 Joseph Myers <joseph@codesourcery.com>
12068
12069 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12070 targetm.except_unwind_info.
12071
299404a1
JM
120722010-11-23 Joseph Myers <joseph@codesourcery.com>
12073
12074 * c-opts.c (c_common_handle_option): Pass location to
12075 set_struct_debug_option.
12076
c98cd5bf
JM
120772010-11-23 Joseph Myers <joseph@codesourcery.com>
12078
12079 * c-common.c (visibility_options): Move from ../opts.c.
12080 * c-common.h (struct visibility_flags, visibility_options):
12081 Declare here.
12082 * c-opts.c (finish_options): Rename to c_finish_options.
12083 (c_common_init): Update call to finish_options.
12084
a9546771
NP
120852010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12086
12087 PR objc/34033
12088 * c-lex.c (lex_string): Check that each string in an Objective-C
12089 string concat sequence starts with either one or zero '@', and
12090 that there are no spurious '@' signs at the end.
12091
24a57808
JM
120922010-11-20 Joseph Myers <joseph@codesourcery.com>
12093
12094 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12095 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12096 HANDLE_PRAGMA_VISIBILITY.
12097 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12098 HANDLE_PRAGMA_VISIBILITY): Don't define.
12099 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12100
a9aa2c3a
NF
121012010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12102
12103 PR c++/16189
12104 PR c++/36888
12105 PR c++/45331
12106 * c-common.h (keyword_begins_type_specifier): Declare.
12107 (keyword_is_storage_class_specifier): Declare.
12108 (keyword_is_type_qualifier): Declare.
12109 * c-common.c (keyword_begins_type_specifier): New function.
12110 (keyword_is_storage_class_specifier): New function.
12111 (keyword_is_type_qualifier): Declare.
12112
5386338c
JM
121132010-11-19 Joseph Myers <joseph@codesourcery.com>
12114
12115 PR c/46547
12116 * c-common.c (in_late_binary_op): Define.
12117 (c_common_truthvalue_conversion): Check in_late_binary_op before
12118 calling c_save_expr.
12119 * c-common.h (in_late_binary_op): Declare.
12120
69ccdddb
JM
121212010-11-19 Joseph Myers <joseph@codesourcery.com>
12122
12123 * c-opts.c (c_common_handle_option): Update calls to
12124 set_struct_debug_option.
12125
6b192a09
NP
121262010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12127
12128 * c-common.h (objc_declare_protocols): Added additional argument.
12129 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12130
fb52b50a
NF
121312010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12132
12133 PR c/33193
12134 * c-common.h (build_real_imag_expr): Declare.
12135 * c-semantics.c (build_real_imag_expr): Define.
12136
b37421c6
JM
121372010-11-17 Joseph Myers <joseph@codesourcery.com>
12138
12139 * c-opts.c (c_common_parse_file): Take no arguments.
12140 * c-common.h (c_common_parse_file): Update prototype.
12141
07078664
JJ
121422010-11-16 Jakub Jelinek <jakub@redhat.com>
12143
12144 PR c++/46401
12145 * c-common.c (warning_candidate_p): Don't track non-const calls
12146 or STRING_CSTs.
12147
c6a13190
ILT
121482010-11-15 Ian Lance Taylor <iant@google.com>
12149
12150 * c-lex.c (init_c_lex): Set macro debug callbacks if
12151 flag_dump_go_spec is set.
12152
925e8657
NP
121532010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12154
12155 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12156 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12157
bb0a9581
NF
121582010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12159
12160 PR preprocessor/45038
12161 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12162 dialects.
12163
c5fa0890
JM
121642010-11-12 Joseph Myers <joseph@codesourcery.com>
12165
12166 * c-common.h (c_family_lang_mask): Declare.
12167 * c-opts.c (c_family_lang_mask): Make extern.
12168 * c-pragma.c (handle_pragma_diagnostic): Use
12169 control_warning_option.
12170
a4d8c676
JM
121712010-11-12 Joseph Myers <joseph@codesourcery.com>
12172
12173 * c-common.c (parse_optimize_options): Update call to
12174 decode_options.
12175 * c-common.h (c_common_handle_option): Update prototype.
12176 * c-opts.c (c_common_handle_option): Take location_t parameter and
12177 pass it to other functions.
12178
f954bd2c
JM
121792010-11-11 Joseph Myers <joseph@codesourcery.com>
12180
12181 * c-opts.c (warning_as_error_callback): Remove.
12182 (c_common_initialize_diagnostics): Don't call
12183 register_warning_as_error_callback.
12184 (c_common_handle_option): Handle -Werror=normalized= here.
12185
d8a07487
JM
121862010-11-10 Joseph Myers <joseph@codesourcery.com>
12187
12188 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12189 in diagnostic.
12190 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12191 letter.
12192 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12193 Remove trailing '.' from diagnostics.
12194 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12195
d5478783
JM
121962010-11-10 Joseph Myers <joseph@codesourcery.com>
12197
12198 * c-common.c (parse_optimize_options): Pass global_dc to
12199 decode_options.
12200 * c-opts.c (c_common_handle_option): Pass &global_options to
12201 set_Wstrict_aliasing.
12202 * c.opt (v): Don't mark Common or document here.
12203
91ebb981
IS
122042010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12205
12206 PR target/44981
12207 * c-format.c (format_type): New type gcc_objc_string_format_type.
12208 (valid_stringptr_type_p): New.
12209 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12210 (check_format_string): Pass expected type, use
91ebb981
IS
12211 valid_stringptr_type_p (), check that the format string types are
12212 consistent with the format specification.
12213 (decode_format_attr): Warn if NSString is used outside objective-c.
12214 (format_types_orig): Add NSString.
12215 (format_name): New.
12216 (format_flags): New.
12217 (check_format_arg): Handle format strings requiring an external parser.
12218 first_target_format_type: New variable.
12219 (handle_format_attribute): Set up first_target_format_type, pass the
12220 expected format arg string type to check_format_string().
ab20d992 12221 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12222 * stub-objc.c (objc_string_ref_type_p): New.
12223 (objc_check_format_arg): New.
12224
bede2adc
NP
122252010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12226
9faeb493 12227 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12228 * c-common.h (objc_build_class_component_ref): New.
12229 * stub-objc.c (objc_build_class_component_ref): New.
12230
9a179d01
NP
122312010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12232
12233 * c.opt (Wproperty-assign-default): New option.
12234
22d8d616
NP
122352010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12236
12237 Implemented -fobjc-std=objc1 flag.
12238 * c.opt (fobjc-std=objc1): New option.
12239
2debdb4f
NP
122402010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12241
12242 Implemented format and noreturn attributes for Objective-C methods.
12243 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12244 attribute for Objective-C methods.
12245
ec52b111
JM
122462010-10-31 Jason Merrill <jason@redhat.com>
12247
12248 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12249 EXPR_LOC_OR_HERE.
12250
46a88c12
NP
122512010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12252
12253 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12254 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12255 (objc_add_property_declaration): Removed arguments for copies and
12256 ivar.
12257 (objc_build_getter_call): Renamed to
12258 objc_maybe_build_component_ref.
12259 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12260 (objc_is_property_ref): New.
12261 * c-common.c (c_common_reswords): Removed copies and ivar.
12262 * stub-objc.c (objc_add_property_declaration): Removed arguments
12263 for copies and ivar.
12264 (objc_build_getter_call): Renamed to
12265 objc_maybe_build_component_ref.
12266 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12267 (objc_is_property_ref): New.
9faeb493 12268
1e4bf85b
AC
122692010-10-29 Arnaud Charlet <charlet@adacore.com>
12270 Matthew Gingell <gingell@adacore.com>
12271
12272 * c-ada-spec.c (separate_class_package): New function.
12273 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12274 name of their enclosing package.
12275 (print_ada_declaration): Use separate_class_package.
12276
81f0bab2
JM
122772010-10-27 Jason Merrill <jason@redhat.com>
12278
2b08f2c5
JM
12279 * c-common.c (c_common_reswords): Add __is_literal_type.
12280 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12281
81f0bab2
JM
12282 * c-common.c (check_case_value): Remove special C++ code.
12283
200290f2
NP
122842010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12285
12286 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12287 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12288 and RID_LAST_PATTR.
12289 (objc_add_property_declaration): Added additional arguments.
12290 (objc_property_attribute_kind): Removed.
12291 (objc_set_property_attr): Removed.
12292 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12293 copy and nonatomic.
12294 * stub-objc.c (objc_add_property_declaration): Added additional
12295 arguments.
12296 (objc_set_property_attr): Removed.
9faeb493 12297
f614132b
NP
122982010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12299
12300 * c-common.h (objc_add_property_variable): Renamed to
12301 objc_add_property_declaration. Added location argument.
12302 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12303
b8a18805
NP
123042010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12305
12306 * c-common.h (objc_maybe_printable_name): New.
12307 * stub-objc.c (objc_maybe_printable_name): New.
12308
3f8257db
JJ
123092010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12310 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12311
12312 * c-common.h (c_common_mark_addressable_vec): Declare.
12313 * c-common.c (c_common_mark_addressable_vec): New function.
12314
249a82c4
NP
123152010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12316
12317 * c-common.h (objc_set_method_type): Removed.
12318 (objc_add_method_declaration): Added boolean argument.
12319 (objc_start_method_definition): Same change.
12320 (objc_build_method_signature): Same change.
12321 * stub-objc.c (objc_set_method_type): Removed.
12322 (objc_add_method_declaration): Added boolean argument.
12323 (objc_start_method_definition): Same change.
12324 (objc_build_method_signature): Same change.
12325
977e30bc
NP
123262010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12327
12328 * c-common.h (finish_file): Removed.
12329 (objc_write_global_declarations): New.
12330 * c-opts.c (c_common_parse_file): Do not call finish_file.
12331 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12332
da57d1b9
NP
123332010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12334
12335 Implemented parsing @synthesize and @dynamic for
12336 Objective-C/Objective-C++.
12337 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12338 (objc_add_synthesize_declaration): New.
12339 (objc_add_dynamic_declaration): New.
12340 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12341 * stub-objc.c (objc_add_synthesize_declaration): New.
12342 (objc_add_dynamic_declaration): New.
9faeb493 12343
0069111f
MM
123442010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12345
12346 PR target/46041
12347 * c-cppbuiltin.c (mode_has_fma): Move function here from
12348 builtins.c. Don't use the fma optab, instead just use the
12349 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12350 using -save-temps.
12351
e426b47b
NP
123522010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12353
12354 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12355
3f8257db 12356 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12357
9faeb493 12358 Radar 4330422
e426b47b
NP
12359 * c-common.h (objc_non_volatilized_type): New declaration
12360 * stub-objc.c (objc_non_volatilized_type): New stub.
12361
90fbfdc3
NP
123622010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12363
e426b47b 12364 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12365
ab20d992 12366 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12367
9faeb493 12368 Radar 4133425
90fbfdc3 12369 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12370 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12371
c37d8c30
IS
123722010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12373
12374 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12375 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12376 (objc_ivar_visibility_kind): New enum.
12377 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12378 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12379 visibility enum.
12380
1b1562a5
MM
123812010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12382
12383 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12384 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12385 has the appropriate fma builtins.
12386 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12387
668ea4b1
IS
123882010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12389
1b1562a5 12390 merge from FSF apple 'trunk' branch.
3f8257db 12391 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12392
668ea4b1
IS
12393 Radars 4436866, 4505126, 4506903, 4517826
12394 * c-common.c (c_common_resword): Define @property and its attributes.
12395 * c-common.h: Define property attribute enum entries.
12396 (OBJC_IS_PATTR_KEYWORD): New.
12397 (objc_property_attribute_kind): New enum.
12398 Declare objc_set_property_attr (), objc_add_property_variable (),
12399 objc_build_getter_call () and objc_build_setter_call ().
12400 * stub-objc.c (objc_set_property_attr): New stub.
12401 (objc_add_property_variable): Likewise.
12402 (objc_build_getter_call): Likewise.
12403 (objc_build_setter_call) Likewise.
1b1562a5 12404
a1178b30
IS
124052010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12406
1b1562a5 12407 merge from FSF apple 'trunk' branch.
ab20d992 12408 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12409
12410 Radar 3803157 (method attributes)
12411 * c-common.c (handle_deprecated_attribute): Recognize
12412 objc methods as valid declarations.
12413 * c-common.h: Declare objc_method_decl ().
1b1562a5 12414 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12415
a75bfaa6
JM
124162010-10-08 Joseph Myers <joseph@codesourcery.com>
12417
12418 * c-common.c (parse_optimize_options): Call
12419 decode_cmdline_options_to_array_default_mask before
12420 decode_options. Update arguments to decode_options.
12421 * c-common.h (c_common_init_options_struct): Declare.
12422 * c-opts.c (c_common_init_options_struct): New. Split out from
12423 c_common_init_options.
12424
f05b9d93
NP
124252010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12426
12427 Implemented fast enumeration for Objective-C.
12428 * c-common.h (objc_finish_foreach_loop): New.
12429 * stub-objc.c (objc_finish_foreach_loop): New.
12430
1ebe4b4f
JM
124312010-10-05 Joseph Myers <joseph@codesourcery.com>
12432
12433 * c-common.h (struct diagnostic_context): Don't declare here.
12434 (c_common_initialize_diagnostics): Declare using
12435 diagnostic_context typedef.
12436 * c-opts.c (c_common_handle_option): Pass global_dc to
12437 handle_generated_option.
12438
d4d24ba4
JM
124392010-10-04 Joseph Myers <joseph@codesourcery.com>
12440
12441 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12442 handle_generated_option.
12443
478a1c5b
ILT
124442010-10-03 Ian Lance Taylor <iant@google.com>
12445
12446 * c.opt (-fplan9-extensions): New option.
12447
82a1c2fe
FXC
124482010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12449
12450 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12451 Remove.
12452 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12453 of duplicating code.
12454
92902b1b
IS
124552010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12456
12457 * c-common.c: Add two new entries for @optional
12458 and @required keywords.
12459
12460 merge from FSF 'apple/trunk' branch.
3f8257db 12461 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12462
12463 Radar 4386773
12464 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12465 objective-c keywords.
12466 (objc_set_method_opt): New declaration.
12467 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12468
46625112
JM
124692010-09-30 Joseph Myers <joseph@codesourcery.com>
12470
12471 * c-common.c (handle_optimize_attribute): Pass &global_options to
12472 cl_optimization_save and cl_optimization_restore.
12473 * c-opts.c (c_common_handle_option): Pass &global_options to
12474 handle_generated_option.
12475 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12476 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12477 &global_options to cl_optimization_restore.
12478
49b91f05
NP
124792010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12480
12481 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12482 Objective-C/Objective-C++ keywords.
12483
13ed556f 124842010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12485
9faeb493
UB
12486 Merge from 'apple/trunk' branch on FSF servers.
12487
3f8257db 12488 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12489
12490 Radar 4281748
12491 * c-common.h (objc_check_global_decl): New declaration.
12492 * stub-objc.c (objc_check_global_decl): New stub.
12493
f0036cca
JM
124942010-09-29 Joseph Myers <joseph@codesourcery.com>
12495
12496 * c.opt: Don't use VarExists.
12497
e3339d0f
JM
124982010-09-29 Joseph Myers <joseph@codesourcery.com>
12499
12500 * c-common.c (c_cpp_error): Update names of diagnostic_context
12501 members.
12502 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12503 cl_optimization members.
12504 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12505 sanitize_cpp_opts, finish_options): Update names of cpp_options
12506 members.
12507
1973201f
NP
125082010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12509
12510 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12511 (objc_is_reserved_word): Removed.
12512 * c-common.c: Updated comments.
12513 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12514 objc_is_reserved_word.
12515 * stub-objc.c (objc_is_reserved_word): Removed.
12516
f7e71da5
IS
125172010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12518
9faeb493 12519 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12520 include attributes.
12521 (objc_start_method_definition): Likewise.
12522 (objc_build_keyword_decl): Likewise.
12523 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12524 (objc_start_method_definition): Likewise.
12525 (objc_build_keyword_decl): Likewise.
12526
c165dca7
IS
125272010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12528
12529 * c-common.h (objc_start_class_interface): Adjust prototype.
12530 (objc_start_category_interface): Likewise.
12531 (objc_start_protocol): Likewise.
12532 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12533 (objc_start_class_interface): Likewise.
12534 (objc_start_category_interface): Likewise.
12535
7458026b
ILT
125362010-09-27 Ian Lance Taylor <iant@google.com>
12537
12538 * c-common.c (c_common_attribute_table): Add no_split_stack.
12539 (handle_no_split_stack_attribute): New static function.
12540
b581b85b
NP
125412010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12542
9faeb493 12543 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12544
3f8257db 12545 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12546
9faeb493 12547 Radar 4229905
b581b85b
NP
12548 * c-common.h (objc_have_common_type): New declaration.
12549 * stub-objc.c (objc_have_common_type): New stub.
12550
12551 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12552
12553 Radar 4154928
12554 * c-common.h (objc_common_type): New prototype.
9faeb493 12555 * stub-objc.c (objc_common_type): New stub.
b581b85b 12556
46a4da10
JH
125572010-09-24 Jan Hubicka <jh@suse.cz>
12558
12559 * c-common.c (handle_leaf_attribute): New function.
12560 (struct attribute_spec c_common_att): Add leaf.
12561
e200444e
JM
125622010-09-22 Joseph Myers <joseph@codesourcery.com>
12563
12564 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12565 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12566 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12567 -include-barrier, -include-directory, -include-directory=,
12568 -include-directory-after, -include-directory-after=,
12569 -include-prefix, -include-prefix=, -include-with-prefix,
12570 -include-with-prefix=, -include-with-prefix-after,
12571 -include-with-prefix-after=, -include-with-prefix-before,
12572 -include-with-prefix-before=, -no-integrated-cpp,
12573 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12574 -output=, -pedantic, -pedantic-errors, -preprocess,
12575 -print-missing-file-dependencies, -trace-includes, -traditional,
12576 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12577 -user-dependencies, -verbose, -write-dependencies,
12578 -write-user-dependencies, no-integrated-cpp, traditional): New.
12579
29a80ea6
NP
125802010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12581
12582 PR objc/23710
ac1fc2fc
NP
12583 * c-common.h (objc_start_method_definition): Return bool instead
12584 of void.
12585 * stub-objc.c (objc_start_method_definition): Return bool instead
12586 of void.
12587
125882010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12589
12590 PR objc/25965
12591 * c-common.h (objc_get_interface_ivars): New declaration.
12592 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12593
de621752
ILT
125942010-09-15 Ian Lance Taylor <iant@google.com>
12595
12596 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12597 messages. Remove period at end of warning message.
de621752 12598
ba885ec5
NS
125992010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12600
12601 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12602 (handle_alias_attribute): ... here.
12603 (handle_ifunc_attribute): New.
12604
c5ee1358
MM
126052010-09-06 Mark Mitchell <mark@codesourcery.com>
12606
12607 * c-common.h (do_warn_double_promotion): Declare.
12608 * c-common.c (do_warn_double_promotion): Define.
12609
0a0b3574
MM
126102010-09-05 Mark Mitchell <mark@codesourcery.com>
12611
12612 * c.opt (Wdouble-promotion): New.
12613
d1779886
JM
126142010-09-02 Joseph Myers <joseph@codesourcery.com>
12615
12616 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12617 fvtable-thunks, fxref): Mark no longer supported in help text.
12618
2d2bd949
JM
126192010-09-02 Joseph Myers <joseph@codesourcery.com>
12620
12621 * c.opt (Wimport, fall-virtual, falt-external-templates,
12622 fdefault-inline, fenum-int-equiv, fexternal-templates,
12623 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12624 fname-mangling-version-, fnew-abi, fnonnull-objects,
12625 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12626 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12627 applicable.
12628 (fhandle-exceptions): Mark with Alias and Warn.
12629 * c-opts.c (c_common_handle_option): Don't handle options marked
12630 as ignored.
12631
5de8299c
JM
126322010-09-02 Joseph Myers <joseph@codesourcery.com>
12633
12634 * c.opt (Wcomments, Werror-implicit-function-declaration,
12635 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12636 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12637 aliases.
12638 * c-common.c (option_codes): Use OPT_Wcomment instead of
12639 OPT_Wcomments.
12640 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12641 Don't handle options marked as aliases.
12642
0ceb0201
RG
126432010-08-25 Richard Guenther <rguenther@suse.de>
12644
12645 * c-common.c (c_common_get_alias_set): Remove special
12646 handling for pointers.
12647
ac47786e
NF
126482010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12649
12650 * c-common.c: Use FOR_EACH_VEC_ELT.
12651 * c-gimplify.c: Likewise.
12652 * c-pragma.c: Likewise.
12653
c878765b
JM
126542010-08-16 Joseph Myers <joseph@codesourcery.com>
12655
12656 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12657 RejectDriver.
12658 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12659 RejectDriver.
12660 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12661 instead of OPT_MDX and OPT_MMDX.
12662
603349bf
JM
126632010-08-16 Joseph Myers <joseph@codesourcery.com>
12664
12665 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12666
644fa7ac
JM
126672010-08-12 Joseph Myers <joseph@codesourcery.com>
12668
12669 * c.opt (MD, MMD): Change to MDX and MMDX.
12670 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12671
481e1176
JM
126722010-08-11 Joseph Myers <joseph@codesourcery.com>
12673
12674 * c-opts.c (c_common_handle_option): Call handle_generated_option
12675 instead of handle_option.
12676
ac8dc9f7
NF
126772010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12678
12679 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12680 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12681
4f8c876d
NF
126822010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12683
12684 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12685 (pending_redefine_extname): Change type to a VEC.
12686 (add_to_renaming_pragma_list): Update for new type of
12687 pending_redefine_extname.
ac8dc9f7 12688 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12689
3b0c690e
AC
126902010-08-04 Arnaud Charlet <charlet@adacore.com>
12691
12692 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12693 visited.
12694 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12695 decide whether a type has already been declared/seen.
12696 Do not go to the original type.
12697 (dump_nested_types): New parameter forward.
12698 Generate forward declaration if needed and mark type as visited.
12699 (print_ada_declaration): Call dump_nested_types if not already done.
12700 Mark types as visited.
12701
1890bccc
JM
127022010-08-03 Joseph Myers <joseph@codesourcery.com>
12703
12704 * c.opt (-print-pch-checksum): Remove option.
12705 * c-opts.c (c_common_handle_option): Don't handle
12706 OPT_print_pch_checksum.
12707
5f20c657
JM
127082010-07-27 Joseph Myers <joseph@codesourcery.com>
12709
12710 * c-common.h (c_common_handle_option): Update prototype and return
12711 value type.
12712 * c-opts.c (c_common_handle_option): Update prototype and return
12713 value type. Update calls to handle_option and
12714 enable_warning_as_error.
12715
f551f80c
JJ
127162010-07-27 Jakub Jelinek <jakub@redhat.com>
12717
12718 PR c/45079
12719 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12720
61ff2bdc
JM
127212010-07-27 Joseph Myers <joseph@codesourcery.com>
12722
12723 * c-common.h (c_common_missing_argument): Remove.
12724 * c-opts.c (c_common_missing_argument): Remove.
12725 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12726 idirafter, imacros, include, isysroot, isystem, iquote): Add
12727 MissingArgError.
12728 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12729
7a9bf9a4
JM
127302010-07-27 Joseph Myers <joseph@codesourcery.com>
12731
12732 * c-common.h (c_common_option_lang_mask,
12733 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12734 New.
12735 (c_common_init_options): Update prototype.
12736 * c-opts.c (c_common_option_lang_mask): New.
12737 (c_common_initialize_diagnostics): Split out of
12738 c_common_init_options.
12739 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12740 New.
12741 (c_common_init_options): Update prototype. Use decoded options in
12742 search for -lang-asm.
12743
910ad8de
NF
127442010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12745
12746 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12747 * c-format.c: Likewise.
12748
718f9c0f
MLI
127492010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12750
12751 * c-common.h: Include diagnostic-core.h. Error if already
12752 included.
12753 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12754
4d451982
MLI
127552010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12756
adfac8df 12757 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12758 Do not include expr.h
12759 (vector_mode_valid_p): Move here.
12760
119fe915
SB
127612010-06-21 DJ Delorie <dj@redhat.com>
12762
12763 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12764 allow these pragmas anywhere.
12765
127662010-06-14 Jakub Jelinek <jakub@redhat.com>
12767
12768 PR bootstrap/44509
12769 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12770 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12771 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12772 ggc_strdup instead of xstrdup.
12773
127742010-06-10 Jakub Jelinek <jakub@redhat.com>
12775
12776 * c-cppbuiltin.c: Include cpp-id-data.h.
12777 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12778 (lazy_hex_fp_value): New function.
12779 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12780
6662d794
MLI
127812010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12782
12783 * c-gimplify.c: Do not include tree-flow.h
12784
38f8b050
JR
127852010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12786
12787 PR other/44034
12788 * c-common.c: Rename targetm member:
12789 targetm.enum_va_list -> targetm.enum_va_list_p
12790
9589f23e
AS
127912010-06-28 Anatoly Sokolov <aesok@post.ru>
12792
12793 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12794
3b06d379
SB
127952010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12796
12797 * c-cppbuiltin.c: Do not include except.h.
12798
d166d4c3
AK
127992010-06-24 Andi Kleen <ak@linux.intel.com>
12800
9faeb493
UB
12801 * c-common.c (warn_for_omitted_condop): New.
12802 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12803
70cb8be6
JM
128042010-06-21 Joseph Myers <joseph@codesourcery.com>
12805
12806 * c.opt (lang-objc): Remove.
12807 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12808
a4c97feb
JR
128092010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12810
12811 * c-opts.c: Include "tm_p.h".
12812
6e2f1956
JM
128132010-06-20 Joseph Myers <joseph@codesourcery.com>
12814
12815 * c-common.c (parse_optimize_options): Update call to
12816 decode_options.
12817
bc87224e
NF
128182010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12819
12820 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12821 new type of types_used_by_cur_var_decl.
12822
b49cf425
JR
128232010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12824
12825 PR bootstrap/44512
12826 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12827 for C++ standard compliance.
12828
59f9c2ed
JM
128292010-06-16 Jason Merrill <jason@redhat.com>
12830
12831 * c.opt: Add -Wnoexcept.
12832
33766b66
RG
128332010-06-16 Richard Guenther <rguenther@suse.de>
12834
12835 PR c/44555
12836 * c-common.c (c_common_truthvalue_conversion): Remove
12837 premature and wrong optimization concering ADDR_EXPRs.
12838
eff7e30c
AC
128392010-06-15 Arnaud Charlet <charlet@adacore.com>
12840
12841 * c-ada-spec.c (dump_sloc): Remove column info.
12842 (is_simple_enum): New function.
12843 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12844 enum types when relevant.
12845
6312e84d
MLI
128462010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12847
9faeb493 12848 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12849 location.
12850
1cb42611
JM
128512010-06-10 Joseph Myers <joseph@codesourcery.com>
12852
12853 * c-opts.c (c_common_handle_option): Don't handle
12854 OPT_fshow_column.
12855
a9429e29
LB
128562010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12857
12858 * c-pragma.c (push_alignment): Use typed GC allocation.
12859 (handle_pragma_push_options): Likewise.
12860
12861 * c-common.c (parse_optimize_options): Likewise.
12862
12863 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12864 option.
12865
5498f011
JM
128662010-06-07 Joseph Myers <joseph@codesourcery.com>
12867
12868 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12869 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12870 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12871 flag_signed_bitfields, warn_strict_null_sentinel,
12872 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12873 flag_gen_declaration, flag_no_gnu_keywords,
12874 flag_implement_inlines, flag_implicit_templates,
12875 flag_implicit_inline_templates, flag_optional_diags,
12876 flag_elide_constructors, flag_default_inline, flag_rtti,
12877 flag_conserve_space, flag_access_control, flag_check_new,
12878 flag_new_for_scope, flag_weak, flag_working_directory,
12879 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12880 flag_enforce_eh_specs, flag_threadsafe_statics,
12881 flag_pretty_templates): Remove.
12882 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12883 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12884 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12885 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12886 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12887 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12888 flag_no_gnu_keywords, flag_implement_inlines,
12889 flag_implicit_templates, flag_implicit_inline_templates,
12890 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12891 flag_rtti, flag_conserve_space, flag_access_control,
12892 flag_check_new, flag_new_for_scope, flag_weak,
12893 flag_working_directory, flag_use_cxa_atexit,
12894 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12895 flag_threadsafe_statics, flag_pretty_templates,
12896 warn_strict_null_sentinel): Remove.
12897 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12898 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12899 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12900 fimplicit-inline-templates, fimplicit-templates,
12901 flax-vector-conversions, fms-extensions, fnil-receivers,
12902 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12903 frtti, fshort-double, fshort-enums, fshort-wchar,
12904 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12905 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12906 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12907 gen-decls, undef): Use Var.
12908 (fdefault-inline, foptional-diags): Document as doing nothing.
12909 * c-opts.c (c_common_handle_option): Remove cases for options now
12910 using Var. Mark ignored options as such.
12911
39dabefd
SB
129122010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12913
9faeb493 12914 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12915 * c-common.def: Likewise.
12916 * c-common.h: Likewise.
12917 * c-cppbuiltin.c: Likewise.
12918 * c-dump.c: Likewise.
12919 * c-format.c: Likewise.
12920 * c-format.h : Likewise.
12921 * c-gimplify.c: Likewise.
12922 * c-lex.c: Likewise.
12923 * c-omp.c: Likewise.
12924 * c.opt: Likewise.
12925 * c-opts.c: Likewise.
12926 * c-pch.c: Likewise.
12927 * c-ppoutput.c: Likewise.
12928 * c-pragma.c: Likewise.
12929 * c-pragma.h: Likewise.
12930 * c-pretty-print.c: Likewise.
12931 * c-pretty-print.h: Likewise.
12932 * c-semantics.c: Likewise.
12933 * stub-objc.c: Likewise.
12934
12935 * c-common.c: Include gt-c-family-c-common.h.
12936 * c-pragma.c: Include gt-c-family-c-pragma.h.
12937\f
877e3c2a 12938Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
12939
12940Copying and distribution of this file, with or without modification,
12941are permitted in any medium without royalty provided the copyright
12942notice and this notice are preserved.
This page took 4.629626 seconds and 5 git commands to generate.