]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
Add -Wdangling-pointer [PR63272].
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
617db51d
GA
12022-01-14 David Malcolm <dmalcolm@redhat.com>
2
3 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
4 (handle_tainted_args_attribute): New.
5
ad3f0d08
GA
62022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
7 Jason Merrill <jason@redhat.com>
8
9 PR c++/70417
10 * c.opt: Added -Wmissing-template-keyword.
11
122022-01-13 Richard Biener <rguenther@suse.de>
13
14 PR c/104002
15 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
16
02a8a01b
GA
172022-01-12 Martin Liska <mliska@suse.cz>
18
19 PR target/103804
20 * c-attribs.c (handle_optimize_attribute): Do not call
21 cl_optimization_compare if we seen an error.
22
01a254e3
GA
232022-01-11 Jakub Jelinek <jakub@redhat.com>
24
25 PR c/101537
26 PR c/103881
27 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
28 and BIT_XOR_EXPR.
29
d9450aa0
GA
302022-01-10 Richard Biener <rguenther@suse.de>
31
32 PR middle-end/101530
33 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
34 in a TARGET_EXPR to force a temporary.
35
11ce8d04
GA
362022-01-06 Marek Polacek <polacek@redhat.com>
37
38 PR c++/103758
39 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
40 diagnostic messages.
41 (handle_pragma_diagnostic): Likewise.
42
a4ae8c37
GA
432022-01-03 Marek Polacek <polacek@redhat.com>
44
45 PR c++/103758
46 * c-format.c (check_tokens): Accept "decl-specifier*".
47
482022-01-03 Jakub Jelinek <jakub@redhat.com>
49
50 PR c++/103600
51 * c-attribs.c (handle_non_overlapping_attribute): New function.
52 (c_common_attribute_table): Add "non overlapping" attribute.
53
84790a9d
GA
542021-12-30 Jakub Jelinek <jakub@redhat.com>
55
56 PR c++/103012
57 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
58 cpp_define_unused/cpp_undef calls with forced token locations
59 BUILTINS_LOCATION.
60
d1e111da
GA
612021-12-27 Patrick Palka <ppalka@redhat.com>
62
63 PR c++/103700
64 * c-common.c (pointer_int_sum): When quiet, return
65 error_mark_node for an incomplete pointed-to type and don't
66 call size_in_bytes_loc.
67
2554e2da
GA
682021-12-17 Jason Merrill <jason@redhat.com>
69
70 PR c++/103681
71 * c-opts.c (c_common_post_options): Update defaults.
72
774269aa
GA
732021-12-16 Martin Liska <mliska@suse.cz>
74
75 PR target/103709
76 * c-pragma.c (handle_pragma_pop_options): Do not check
77 global options modification when an error is seen in parsing
78 of options (pragmas or attributes).
79
c8dcf64b
GA
802021-12-12 Jonathan Wakely <jwakely@redhat.com>
81
82 * known-headers.cc: Define INCLUDE_MEMORY instead of
83 INCLUDE_UNIQUE_PTR.
84 * name-hint.h: Likewise.
85 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
86
4b4839e3
GA
872021-12-09 Jakub Jelinek <jakub@redhat.com>
88
89 PR pch/71934
90 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
91 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
92
03a9bd05
GA
932021-12-03 Jakub Jelinek <jakub@redhat.com>
94
95 PR pch/71934
96 * c-pch.c (struct c_pch_validity): Remove pch_init member.
97 (pch_init): Don't initialize v.pch_init.
98 (c_common_valid_pch): Don't warn and punt if .text addresses change.
99
40fa651e
GA
1002021-12-01 Jason Merrill <jason@redhat.com>
101
102 PR c++/103310
103 * c.opt: Add -fconstexpr-fp-except.
104
87cd82c8
GA
1052021-11-29 Richard Biener <rguenther@suse.de>
106
107 * c-format.c (check_format_string): Remove spurious
108 gcc_unreachable.
109
1102021-11-29 Richard Biener <rguenther@suse.de>
111
112 * c-opts.c (c_common_post_options): Remove unreachable return.
113 * c-pragma.c (handle_pragma_target): Likewise.
114 (handle_pragma_optimize): Likewise.
115
091ccc06
GA
1162021-11-25 Jakub Jelinek <jakub@redhat.com>
117
118 PR c++/102611
119 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
120 default for C++23 regardless of warn_deprecated.
121 * c-cppbuiltin.c (c_cpp_builtins): Predefine
122 __cpp_multidimensional_subscript=202110L for C++23.
123
e1d43592
GA
1242021-11-23 Martin Sebor <msebor@redhat.com>
125
126 PR middle-end/88232
127 * c.opt: Add -Winfinite-recursion.
128
9c077398
GA
1292021-11-19 Martin Sebor <msebor@redhat.com>
130
131 PR c++/33925
132 PR c/102867
133 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
134 and improve handling tof defined symbols.
135
1362021-11-19 Martin Liska <mliska@suse.cz>
137
138 Revert:
139 2021-11-18 Martin Liska <mliska@suse.cz>
140
141 * c-gimplify.c (genericize_c_loop): Use option directly.
142
483092d3
GA
1432021-11-18 Matthias Kretz <m.kretz@gsi.de>
144
145 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
146 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
147
1482021-11-18 Martin Liska <mliska@suse.cz>
149
150 * c-gimplify.c (genericize_c_loop): Use option directly.
151
280d2838
GA
1522021-11-17 Martin Uecker <uecker@gcc.gnu.org>
153
154 PR c/91038
155 PR c/29970
156 * c-common.c (pointer_int_sum): Make sure pointer expressions
157 are evaluated first when the size expression depends on for
158 variably-modified types.
159
1602021-11-17 Marek Polacek <polacek@redhat.com>
161
162 PR preprocessor/103026
163 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
164
6b1695f4
GA
1652021-11-16 Jason Merrill <jason@redhat.com>
166
167 * c-common.c (release_tree_vector): Only cache vecs smaller than
168 16 elements.
169
e2b57363
GA
1702021-11-15 Jason Merrill <jason@redhat.com>
171
172 * c.opt: Add -fimplicit-constexpr.
173 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
174 * c-opts.c (c_common_post_options): Disable below C++14.
175
1762021-11-15 Jakub Jelinek <jakub@redhat.com>
177
178 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
179 Duplicate to both OMP_TARGET and OMP_TEAMS.
180
8d36a0d2
GA
1812021-11-10 Marek Polacek <polacek@redhat.com>
182
183 PR c++/101940
184 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
185 ignored_attributes.
186
c9b1334e
GA
1872021-11-09 David Malcolm <dmalcolm@redhat.com>
188
189 * c-pragma.c (GCC_BAD_AT): New macro.
190 (GCC_BAD2_AT): New macro.
191 (handle_pragma_pack): Use the location of the pertinent token when
192 issuing diagnostics about invalid constants/actions, and trailing
193 junk.
194 (handle_pragma_target): Likewise for non-string "GCC option".
195 (handle_pragma_message): Likewise for trailing junk.
196
18ae471f
GA
1972021-11-03 Joseph Myers <joseph@codesourcery.com>
198
199 PR c/103031
200 * c-common.c (convert_and_check): Add argument init_const. Call
201 convert_init if init_const.
202 * c-common.h (convert_and_check): Update prototype.
203 (convert_init): New prototype.
204
cf82e8d9
GA
2052021-11-01 David Malcolm <dmalcolm@redhat.com>
206
207 * c-lex.c (c_lex_with_flags): When complaining about non-printable
208 CPP_OTHER tokens, set the "escape on output" flag.
209
04a2cf3f
GA
2102021-10-27 Jakub Jelinek <jakub@redhat.com>
211
212 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
213 POINTER_PLUS_EXPR.
214 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
215 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
216
2172021-10-27 Jakub Jelinek <jakub@redhat.com>
218
219 PR c++/102854
220 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
221 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
222 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
223 conversions temporarily clear the 3rd bit from d->kind while walking
224 subtrees.
225 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
226 if possibly non-rectangular.
227
ae5c5406
GA
2282021-10-21 Jakub Jelinek <jakub@redhat.com>
229
230 PR middle-end/64888
231 * c-omp.c (c_omp_predefined_variable): Return true also for
232 ubsan_create_data created artificial variables.
233
5d5885c9
GA
2342021-10-14 Joseph Myers <joseph@codesourcery.com>
235
236 * c-format.c (printf_length_specs, scanf_length_specs)
237 (print_char_table, scan_char_table): Support DFP formats for C2X.
238 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
239 (T2X_D32, T2X_D64, T2X_D128): New macros.
240
2412021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
242
243 * c-omp.c (c_omp_check_context_selector): Rename to
244 omp_check_context_selector and move to omp-general.c.
245 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
246 move to omp-general.c.
247
52055987
GA
2482021-10-12 Joseph Myers <joseph@codesourcery.com>
249
250 * c-format.c (print_char_table): Add %b and %B formats.
251 (scan_char_table): Add %b format.
252 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
253 (T2X_UPD, T2X_UIM): New macros.
254
2552021-10-12 Jakub Jelinek <jakub@redhat.com>
256
257 * c-omp.c (c_finish_omp_atomic): Use
258 clear_padding_type_may_have_padding_p.
259
ce6eec39
GA
2602021-10-08 Martin Liska <mliska@suse.cz>
261
262 * c-opts.c (c_common_post_options): Use new macro
263 OPTION_SET_P.
264
50e20ee6
GA
2652021-10-07 Martin Liska <mliska@suse.cz>
266
267 * c-common.c (parse_optimize_options): Make
268 save_opt_decoded_options a pointer type.
269
57c7ec62
GA
2702021-10-06 Jakub Jelinek <jakub@redhat.com>
271
272 PR tree-optimization/102571
273 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
274 padding, but the non-padding bits are contiguous set of bytes
275 by adjusting the memcmp call arguments instead of emitting
276 __builtin_clear_padding and then comparing all the type's bytes.
277
2782021-10-06 Jakub Jelinek <jakub@redhat.com>
279
280 PR c++/102612
281 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
282 __cpp_constexpr to 202110L rather than 201907L.
283
da9c5f78
GA
2842021-10-04 Marek Polacek <polacek@redhat.com>
285
286 PR c++/97573
287 * c-common.h (do_warn_array_compare): Declare.
288 * c-warn.c (do_warn_array_compare): New.
289 * c.opt (Warray-compare): New option.
290
e3e07b89
GA
2912021-10-02 Iain Sandoe <iain@sandoe.co.uk>
292
293 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
294 NULL, this is not needed.
295
9d116bcc
GA
2962021-10-01 Martin Sebor <msebor@redhat.com>
297
298 PR c/102103
299 * c-common.c (decl_with_nonnull_addr_p): Handle members.
300 Check and perform warning suppression.
301 (c_common_truthvalue_conversion): Enhance warning suppression.
302
3032021-10-01 Martin Liska <mliska@suse.cz>
304
305 PR target/102552
306 * c-common.c (parse_optimize_options): decoded_options[0] is
307 used for program name, so merged_decoded_options should also
308 respect that.
309
3102021-10-01 Jakub Jelinek <jakub@redhat.com>
311 Richard Biener <rguenther@suse.de>
312
313 PR sanitizer/102515
314 * c-ubsan.c (ubsan_instrument_division): Check the right
315 flag_sanitize_recover bit, depending on which sanitization
316 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
317 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
318 and SANITIZE_DIVIDE is enabled, neither check is known
319 to be false and flag_sanitize_recover bits for those two
320 aren't the same, emit both __ubsan_handle_divrem_overflow
321 and __ubsan_handle_divrem_overflow_abort calls.
322
3232021-10-01 Martin Liska <mliska@suse.cz>
324
325 * c-common.c (parse_optimize_options): Combine optimize
326 options with what was provided on the command line.
327
3282021-10-01 Jakub Jelinek <jakub@redhat.com>
329
330 * c-omp.c (c_omp_split_clauses): Also copy
331 OMP_CLAUSE_ORDER_REPRODUCIBLE.
332
cf966403
GA
3332021-09-27 Martin Liska <mliska@suse.cz>
334
335 * c-opts.c (c_common_init_options_struct): Set also
336 x_flag_default_complex_method.
337
e4777439
GA
3382021-09-22 Jakub Jelinek <jakub@redhat.com>
339
340 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
341
62498024
GA
3422021-09-20 Matthias Kretz <m.kretz@gsi.de>
343
344 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
345 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
346 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
347 __ROUNDING_MATH__ according to the new optimization flags.
348
cf74e7b5
GA
3492021-09-18 Jakub Jelinek <jakub@redhat.com>
350
351 * c-omp.c (c_omp_split_clauses): Split order clause also to
352 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
353
0a4cb439
GA
3542021-09-17 Jakub Jelinek <jakub@redhat.com>
355
356 * c-omp.c (c_finish_omp_atomic): Avoid creating
357 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
358 create_tmp_var and add a zero initializer to TARGET_EXPRs that
359 had NULL initializer. When omitting operands after v = x,
360 use type of v rather than type of x. Fix type of vtmp
361 TARGET_EXPR.
362
07985c47
GA
3632021-09-13 Jason Merrill <jason@redhat.com>
364
365 * c.opt: Add -Winterference-size.
366 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
367 and __GCC_CONSTRUCTIVE_SIZE.
368
a26206ec
GA
3692021-09-10 Jakub Jelinek <jakub@redhat.com>
370
371 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
372 * c-omp.c: Include gimple-fold.h.
373 (c_finish_omp_atomic): Add r and weak arguments. Add support for
374 OpenMP 5.1 atomics.
375
f84e2f0b
GA
3762021-09-09 qing zhao <qing.zhao@oracle.com>
377
378 * c-attribs.c (handle_uninitialized_attribute): New function.
379 (c_common_attribute_table): Add "uninitialized" attribute.
380
b6db7cd4
GA
3812021-09-08 liuhongt <hongtao.liu@intel.com>
382
383 * c-common.c (excess_precision_mode_join): Update below comments.
384 (c_ts18661_flt_eval_method): Set excess_precision_type to
385 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
386 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
387 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
388 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
389
b2748138
GA
3902021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
391
392 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
393
7b739540
GA
3942021-09-03 Eric Botcazou <ebotcazou@adacore.com>
395
396 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
397 and -gnatwu warning for the package specification.
398
e11c6046
GA
3992021-09-01 Iain Sandoe <iain@sandoe.co.uk>
400
401 * c-attribs.c (handle_unavailable_attribute): New.
402
1e2f030b
GA
4032021-08-30 Jason Merrill <jason@redhat.com>
404
405 * c.opt: Add -Wmissing-requires.
406
85d77ac4
GA
4072021-08-25 Lewis Hyatt <lhyatt@gmail.com>
408
409 PR other/93067
410 * c-opts.c (c_common_input_charset_cb): New function.
411 (c_common_post_options): Call new function
412 diagnostic_initialize_input_context().
413
7c9e1645
GA
4142021-08-20 Tobias Burnus <tobias@codesourcery.com>
415
416 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
417 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
418 "di" and "u", respecitively; fill with BADLEN to match
419 size of 'types'.
420 (get_init_dynamic_hwi): Split off from ...
421 (init_dynamic_diag_info): ... here. Call it.
422 (init_dynamic_gfc_info): Call it.
423
4242021-08-20 Jakub Jelinek <jakub@redhat.com>
425
426 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
427 * c-pragma.c (omp_pragmas): Add error directive.
428 * c-omp.c (omp_directives): Uncomment error directive entry.
429
6e529985
GA
4302021-08-18 Jakub Jelinek <jakub@redhat.com>
431
432 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
433 * c-pragma.c (omp_pragmas): Add nothing directive.
434 * c-omp.c (omp_directives): Uncomment nothing directive entry.
435
2d14d64b
GA
4362021-08-17 Jakub Jelinek <jakub@redhat.com>
437
438 PR c++/101539
439 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
440 * c-common.c (c_common_reswords): Add __is_layout_compatible.
441
4422021-08-17 Matt Jacobson <mhjacobson@me.com>
443
444 * c-opts.c (c_common_post_options): Default to
445 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
446
4472021-08-17 Jakub Jelinek <jakub@redhat.com>
448
449 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
450 * c-pragma.c (omp_pragmas): Add scope construct.
451 * c-omp.c (omp_directives): Uncomment scope directive entry.
452
9d1d9fc8
GA
4532021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
454
455 * c-cppbuiltin.c (c_cpp_builtins): Define
456 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
457
72be20e2
GA
4582021-08-12 Jakub Jelinek <jakub@redhat.com>
459
460 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
461 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
462 * c-pragma.c (omp_pragmas_simd): Add masked construct.
463 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
464 enumerator.
465 (c_finish_omp_masked): Declare.
466 * c-omp.c (c_finish_omp_masked): New function.
467 (c_omp_split_clauses): Handle combined masked constructs.
468
4d17ca1b
GA
4692021-07-30 Jakub Jelinek <jakub@redhat.com>
470
471 PR c++/101539
472 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
473 * c-common.c (c_common_reswords): Add
474 __is_pointer_interconvertible_base_of.
475
4762021-07-29 Richard Biener <rguenther@suse.de>
477
478 PR c/101512
479 * c-common.c (c_common_mark_addressable_vec): Look through
480 C_MAYBE_CONST_EXPR even if not at the toplevel.
481
af3f12e6
GA
4822021-07-27 Martin Sebor <msebor@redhat.com>
483
484 PR c/101585
485 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
486
ead235f6
GA
4872021-07-23 Jakub Jelinek <jakub@redhat.com>
488
489 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
490 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
491 and later.
492
4932021-07-23 Jakub Jelinek <jakub@redhat.com>
494
495 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
496 PRAGMA_OMP__LAST_ enumerators.
497
419c6c68
GA
4982021-07-21 Thomas Schwinge <thomas@codesourcery.com>
499 Joseph Myers <joseph@codesourcery.com>
500 Cesar Philippidis <cesar@codesourcery.com>
501
502 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
503
92d45509
GA
5042021-07-20 Martin Sebor <msebor@redhat.com>
505
506 * c-common.c (c_build_shufflevector): Adjust by-value argument to
507 by-const-reference.
508 * c-common.h (c_build_shufflevector): Same.
509
87277b6a
GA
5102021-07-16 Andrew Pinski <apinski@marvell.com>
511
512 PR c/101453
513 * c-common.c (parse_optimize_options): Use the correct
514 size for buffer.
515
d97d71a1
GA
5162021-07-15 Martin Sebor <msebor@redhat.com>
517
518 PR c/101289
519 PR c/97548
520 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
521
c4fee1c6
GA
5222021-07-14 Jason Merrill <jason@redhat.com>
523
524 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
525
6fba0eea
GA
5262021-07-06 Martin Sebor <msebor@redhat.com>
527
528 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
529 (gcc_cdiag_char_table): Same.
530 (gcc_cxxdiag_char_table): Same.
531
7a60a6e8
GA
5322021-07-02 Jakub Jelinek <jakub@redhat.com>
533
534 * c-common.h (enum c_omp_directive_kind): New enum.
535 (struct c_omp_directive): New type.
536 (c_omp_categorize_directive): Declare.
537 * c-omp.c (omp_directives): New variable.
538 (c_omp_categorize_directive): New function.
539
bea7c16a
GA
5402021-07-01 Eric Botcazou <ebotcazou@adacore.com>
541
542 * c-ada-spec.c (packed_layout): New global variable.
543 (dump_ada_declaration): Set it upon seeing a packed record type.
544 Do not put the "aliased" keyword if it is set.
545 (dump_ada_structure): Add Pack aspect if it is set and clear it.
546
5472021-07-01 Eric Botcazou <ebotcazou@adacore.com>
548
549 * c-ada-spec.c (check_name): Rename into...
550 (check_type_name_conflict): ...this. Minor tweak.
551 (dump_ada_function_declaration): Adjust to above renaming.
552 (dump_ada_array_domains): Fix oversight.
553 (dump_ada_declaration): Call check_type_name_conflict for variables.
554
90708f87
GA
5552021-06-25 Martin Sebor <msebor@redhat.com>
556
557 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
558 (c_common_truthvalue_conversion): Replace direct uses of
559 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
560 copy_no_warning.
561 (check_function_arguments_recurse): Same.
562 * c-gimplify.c (c_gimplify_expr): Same.
563 * c-warn.c (overflow_warning): Same.
564 (warn_logical_operator): Same.
565 (warn_if_unused_value): Same.
566 (do_warn_unused_parameter): Same.
567
9aa8327e
GA
5682021-06-24 Jakub Jelinek <jakub@redhat.com>
569
570 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
571 C_ORT_OMP_TARGET.
572 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
573 combined target constructs also add map (always, tofrom:) clause.
574
ede6c356
GA
5752021-06-15 Robin Dapp <rdapp@linux.ibm.com>
576
577 * c-attribs.c (common_handle_aligned_attribute): Remove short
578 circuit and dead code.
579
8dc48181
GA
5802021-06-14 Jonathan Wakely <jwakely@redhat.com>
581
582 PR c++/101052
583 * known-headers.cc (get_stdlib_header_for_name): Add known
584 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
585 exit, and getenv.
586
8b8c3912
GA
5872021-06-12 Jason Merrill <jason@redhat.com>
588
589 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
590
f16f65f8
GA
5912021-06-11 Jakub Jelinek <jakub@redhat.com>
592
593 PR c++/100974
594 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
595 -std=c++2b for P1938R3 consteval if support.
596
4f625f47
GA
5972021-06-09 Jason Merrill <jason@redhat.com>
598
599 PR c++/100879
600 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
601 warning.
602
438aac59
GA
6032021-06-07 Martin Liska <mliska@suse.cz>
604
605 * c-target.def: Split long lines and replace them
606 with '\n\'.
607
600f90cb
GA
6082021-06-04 Martin Sebor <msebor@redhat.com>
609
610 PR c/100783
611 * c-attribs.c (positional_argument): Bail on erroneous types.
612
6132021-06-04 Martin Sebor <msebor@redhat.com>
614
615 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
616 for element presence.
617
440c8a0a
GA
6182021-06-03 Eric Botcazou <ebotcazou@adacore.com>
619
620 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
621 (dump_ada_decl_name): Likewise.
622 (dump_anonymous_type_name): Remove parent parameter and adjust.
623 (dump_sloc): Minor tweak.
624 (dump_ada_array_type): Remove type parameter and adjust.
625 (dump_ada_enum_type): Remove parent parameter and adjust.
626 (dump_ada_node): Adjust calls to above functions.
627 (dumped_anonymous_types): New global variable.
628 (dump_nested_types_1): Rename into...
629 (dump_nested_types): ...this.
630 (dump_nested_type): Remove parent and dumped_types parameters.
631 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
632 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
633 (dump_ada_specs): Initialize and free dumped_anonymous_types.
634
6352021-06-03 Eric Botcazou <ebotcazou@adacore.com>
636
637 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
638 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
639
6402021-06-03 Eric Botcazou <ebotcazou@adacore.com>
641
642 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
643 (htable_t): New typedef.
644 (overloaded_names): Use it.
645 (add_name): New function.
646 (init_overloaded_names): Use add_name to populate the table and add
647 special cases for sigaction and stat.
648 (overloaded_name_p): Rename into...
649 (overloading_index): ...this. Do not initialize overloaded_names table
650 here. Return the index or zero.
651 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
652 but add an overloading suffix instead.
653 (dump_ada_specs): Initialize overloaded_names tables here.
654
b75978d1
GA
6552021-06-01 Martin Liska <mliska@suse.cz>
656
657 PR other/100759
658 * c-attribs.c (handle_optimize_attribute): Limit sanity check
659 to a situation where we are not in processing of an optimize
660 pragma.
661 * c-pragma.c (handle_pragma_pop_options): Restore target
662 options.
663
ee682192
GA
6642021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
665
666 PR testsuite/100749
667 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
668
6692021-05-31 Richard Biener <rguenther@suse.de>
670
671 PR c++/88601
672 * c-common.c: Include tree-vector-builder.h and
673 vec-perm-indices.h.
674 (c_common_reswords): Add __builtin_shufflevector.
675 (c_build_shufflevector): New funtion.
676 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
677 (c_build_shufflevector): Declare.
678
48166757
GA
6792021-05-28 Jakub Jelinek <jakub@redhat.com>
680
681 PR middle-end/99928
682 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
683 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
684
6852021-05-28 Tobias Burnus <tobias@codesourcery.com>
686
687 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
688
2bc6dace
GA
6892021-05-25 Martin Liska <mliska@suse.cz>
690
691 PR tree-optimization/92860
692 PR target/99592
693 * c-attribs.c (handle_optimize_attribute): Save target node
694 before calling parse_optimize_options and save it in case
695 it changes.
696 * c-pragma.c (handle_pragma_target): Similarly for pragma.
697 (handle_pragma_pop_options): Likewise here.
698
6992021-05-25 Martin Liska <mliska@suse.cz>
700
701 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
702
7032021-05-25 Jakub Jelinek <jakub@redhat.com>
704
705 PR middle-end/99928
706 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
707 combined with simd and not with taskloop or for.
708
2832d51b
GA
7092021-05-21 Jakub Jelinek <jakub@redhat.com>
710
711 PR middle-end/99928
712 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
713 on firstprivate clause copy going to target construct, and for
714 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
715
ea34e2ed
GA
7162021-05-20 Jonathan Wakely <jwakely@redhat.com>
717
718 * c.opt (Wc++11-extensions, Wc++14-extensions)
719 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
720 options.
721
7222021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
723
724 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
725
7262021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
727
728 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
729 * c-pch.c (struct c_pch_validity): Use type uint32_t.
730 (pch_init): Renamed member.
731 (c_common_valid_pch): Adjust access to debug_type_names.
732
65f32e5d
GA
7332021-05-19 Martin Sebor <msebor@redhat.com>
734
735 PR c/100619
736 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
737 bounds.
738
a8daf9a1
GA
7392021-05-18 Richard Biener <rguenther@suse.de>
740
741 PR c/100547
742 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
743 Reword existing nunit diagnostic.
744
a7ffc1ef
GA
7452021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
746
747 * c-common.c (braced_list_to_string): Return CTOR unchanged
748 if host and target character sizes don't match.
749
87a7d10c
GA
7502021-05-14 Martin Liska <mliska@suse.cz>
751
752 * c.opt: Add Warning keyword for 2 options.
753
f9af11c7
GA
7542021-05-13 Martin Liska <mliska@suse.cz>
755
756 PR middle-end/100504
757 * c-attribs.c (handle_target_clones_attribute): Expect a string
758 argument to target_clone argument.
759
037e3661
GA
7602021-05-11 Joseph Myers <joseph@codesourcery.com>
761
762 * c-lex.c (interpret_float): Handle digit separators for C2X.
763
aa891c56
GA
7642021-05-10 Martin Liska <mliska@suse.cz>
765
766 * c-ada-spec.c (print_destructor): Use startswith
767 function instead of strncmp.
768 (dump_ada_declaration): Likewise.
769 * c-common.c (disable_builtin_function): Likewise.
770 (def_builtin_1): Likewise.
771 * c-format.c (check_tokens): Likewise.
772 (check_plain): Likewise.
773 (convert_format_name_to_system_name): Likewise.
774
e4ff4ffb
GA
7752021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
776
777 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
778 complex divide
779
c0fa3f2f
GA
7802021-04-26 Thomas Schwinge <thomas@codesourcery.com>
781 Nathan Sidwell <nathan@codesourcery.com>
782 Tom de Vries <vries@codesourcery.com>
783 Julian Brown <julian@codesourcery.com>
784 Kwok Cheung Yeung <kcy@codesourcery.com>
785
786 * c.opt (Wopenacc-parallelism): New.
787
6e81e015
GA
7882021-04-19 Thomas Schwinge <thomas@codesourcery.com>
789
790 * c.opt (fopenacc-kernels=): Remove.
791
019a9220
GA
7922021-04-08 Jakub Jelinek <jakub@redhat.com>
793
794 * c-warn.c (do_warn_double_promotion): Fix comment typo,
795 occured -> occurred.
796 (check_alignment_of_packed_member): Fix a comment typo,
797 memeber -> member.
798 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
799 and onless -> unless.
800 (warn_parm_array_mismatch): Fix comment typos, declaratation
801 -> declaration and woud -> would. Fix up comment indentation.
802
8032021-04-08 Martin Sebor <msebor@redhat.com>
804
805 PR middle-end/99883
806 * c.opt (Wmismatched-new-delete): Correct spelling.
807
b1da9916
GA
8082021-04-05 Eric Botcazou <ebotcazou@adacore.com>
809
810 * c-ada-spec.c (is_simple_enum): Minor tweaks.
811 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
812 enumeral types use again the type name for the enumeration constants.
813 (dump_ada_node): Adjust call to dump_ada_enum_type.
814 (dump_nested_type): Likewise.
815
f1607029
GA
8162021-04-01 Jason Merrill <jason@redhat.com>
817
818 PR c++/98481
819 * c-opts.c (c_common_post_options): Bump latest_abi_version.
820
4493b1c1
GA
8212021-03-25 Jakub Jelinek <jakub@redhat.com>
822
823 PR c++/99565
824 * c-warn.c (do_warn_duplicated_branches): Pass also
825 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
826
6af7b307
GA
8272021-03-20 Jakub Jelinek <jakub@redhat.com>
828
829 PR debug/99230
830 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
831
ceae9533
GA
8322021-03-05 Eric Botcazou <ebotcazou@adacore.com>
833
834 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
835 after entering the separate class package, if any.
836
67f10d28
GA
8372021-03-04 Richard Biener <rguenther@suse.de>
838
839 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
840 Handle ERROR_MARK.
841
8422021-03-04 Jakub Jelinek <jakub@redhat.com>
843
844 PR c/99325
845 * c-ppoutput.c (print): Change src_line type from int to unsigned.
846 (token_streamer::stream) Likewise.
847 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
848 UNKNOWN_LOCATION.
849
f3641ac7
GA
8502021-03-03 Jakub Jelinek <jakub@redhat.com>
851
852 PR c/99324
853 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
854 instead of mark_addressable. Fix a comment typo -
855 neutrallly -> neutrally.
856
2c83c3fb
GA
8572021-02-28 Jakub Jelinek <jakub@redhat.com>
858
859 PR c/99304
860 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
861 message - refernced -> referenced. Remove superfluous space before
862 closing paren of function calls.
863
daa68844
GA
8642021-02-25 Nathan Sidwell <nathan@acm.org>
865
866 PR c++/99166
867 * c.opt (-flang-info-module-cmi): Renamed option.
868
50352c6c
GA
8692021-02-19 Nathan Sidwell <nathan@acm.org>
870
871 * c.opt (flang-info-module-read, flang-info-module-read=): New.
872
bf81237e
GA
8732021-02-18 H.J. Lu <hjl.tools@gmail.com>
874
875 PR target/99113
876 * c-attribs.c (c_common_attribute_table): Add the "retain"
877 attribute.
878 (handle_retain_attribute): New function.
879
0e804ce3
GA
8802021-02-16 Marek Polacek <polacek@redhat.com>
881
882 PR c++/99062
883 * c-attribs.c (handle_assume_aligned_attribute): Check that the
884 alignment argument is non-negative. Tweak a warning message.
885
fab095da
GA
8862021-02-12 Martin Sebor <msebor@redhat.com>
887
888 PR c/99055
889 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
890 print_generic_expr_to_str.
891
4b37c3ea
GA
8922021-02-10 Richard Biener <rguenther@suse.de>
893
894 * c-common.c (parse_optimize_options): Free decoded_options.
895
a19dd5e6
GA
8962021-02-04 emsr <3dw4rd@verizon.net>
897
898 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
899
9faaa807
GA
9002021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
901
902 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
903 * c-lex.c (interpret_integer): Set node type for size literal.
904
85d04a2e
GA
9052021-01-28 Jakub Jelinek <jakub@redhat.com>
906
907 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
908 draft from description.
909 (-std=c++2b): Fix a pasto, 2020 -> 2023.
910
e62bb7f0
GA
9112021-01-26 Paul Fee <paul.f.fee@gmail.com>
912
913 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
914 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
915 and -std=gnu++2b
916 * c-opts.c (set_std_cxx23): New.
917 (c_common_handle_option): Set options when -std=c++23 is enabled.
918 (c_common_post_options): Adjust comments.
919 (set_std_cxx20): Likewise.
920
161e4c08
GA
9212021-01-25 Martin Sebor <msebor@redhat.com>
922
923 PR c++/98646
924 * c-common.c (check_nonnull_arg): Adjust warning text.
925
4c9bcd5c
GA
9262021-01-17 Martin Sebor <msebor@redhat.com>
927
928 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
929 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
930
59cf67d1
GA
9312021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
932
933 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
934 Redefine PRAGMA_OACC_CLAUSE_DETACH.
935
2f7f0d32
GA
9362021-01-15 Jakub Jelinek <jakub@redhat.com>
937
938 PR tree-optimization/98597
939 * c-pretty-print.c: Include options.h.
940 (c_fold_indirect_ref_for_warn): New function.
941 (print_mem_ref): Use it. If it returns something that has compatible
942 type and is TBAA compatible with zero offset, print it and return,
943 otherwise print it using offsetof syntax or array ref syntax. Fix up
944 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
945 argument has pointer to array type. Print pointers using the standard
946 formatting.
947
6851dda2
GA
9482021-01-12 Martin Sebor <msebor@redhat.com>
949
950 PR c/98597
951 PR c/98592
952 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
953 has pointer type. Remove redundant code. Avoid calling
954 gimple_canonical_types_compatible_p.
955
7d187e4f
GA
9562021-01-07 Martin Sebor <msebor@redhat.com>
957
958 PR middle-end/98578
959 * c-pretty-print.c (print_mem_ref): Strip array from access type.
960 Avoid assuming acces type's size is constant. Correct condition
961 guarding the printing of a parenthesis.
962
942ae5be
GA
9632021-01-06 Martin Sebor <msebor@redhat.com>
964
965 PR c++/95768
966 * c-pretty-print.c (c_pretty_printer::primary_expression): For
967 SSA_NAMEs print VLA names and GIMPLE defining statements.
968 (print_mem_ref): New function.
969 (c_pretty_printer::unary_expression): Call it.
970
9712021-01-06 Richard Biener <rguenther@suse.de>
972
973 PR tree-optimization/95582
974 * c-attribs.c (c_common_attribute_table): Add entry for
975 signed_bool_precision.
976 (handle_signed_bool_precision_attribute): New.
977
8daa719b
GA
9782020-12-24 Iain Sandoe <iain@sandoe.co.uk>
979
980 * c.opt: Add -stdlib= option and enumerations for
981 libstdc++ and libc++.
982
eefe499f
GA
9832020-12-16 Martin Liska <mliska@suse.cz>
984
985 * c.opt: Remove usage of Report.
986
d52945ce
GA
9872020-12-14 Martin Sebor <msebor@redhat.com>
988
989 PR middle-end/98166
990 PR c++/57111
991 PR middle-end/98160
992 * c-attribs.c (maybe_add_noinline): New function.
993 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
994 Implicitly add attribute noinline to functions not declared inline
995 and warn on those.
996
ca2bd949
GA
9972020-12-09 Tobias Burnus <tobias@codesourcery.com>
998
999 * c-pragma.c (omp_pragmas): Add 'allocate'.
1000 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1001
f6e8e279
GA
10022020-12-08 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c++/98187
1005 * c-pragma.c (omp_pragmas): Remove "master".
1006 (omp_pragmas_simd): Add "master".
1007
bc8a7013
GA
10082020-12-07 Marek Polacek <polacek@redhat.com>
1009
1010 PR c++/98126
1011 * c-common.c (verify_tree_lim_r): New function.
1012 (verify_sequence_points): Use it. Use nullptr instead of 0.
1013
b8dd0ef7
GA
10142020-12-03 Martin Sebor <msebor@redhat.com>
1015
1016 PR c++/90629
1017 PR middle-end/94527
1018 * c-attribs.c (handle_dealloc_attribute): New function.
1019 (handle_malloc_attribute): Handle argument forms of attribute.
1020 * c.opt (-Wmismatched-dealloc): New option.
1021 (-Wmismatched-new-delete): New option.
1022
10232020-12-03 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR libstdc++/93121
1026 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1027 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1028
e0f5e792
GA
10292020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1030
1031 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1032 {__GNUC_EXECUTION_CHARSET_NAME} and
1033 _WIDE_EXECUTION_CHARSET_NAME} macros.
1034
10352020-12-01 Nathan Sidwell <nathan@acm.org>
1036
1037 * c-common.c (module, import, export): New internal tokens (with
1038 trailing space).
1039 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1040 them.
1041 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1042 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1043
10442020-12-01 Nathan Sidwell <nathan@acm.org>
1045
1046 * c-opts.c (c_common_init_options): Ask for module dependencies.
1047 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1048 * c-pch.c (c_common_valid_pch): ... does not play with C++
1049 modules.
1050 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1051 options.
1052 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1053 (fmodule-only, fmodule-mapper, fmodule-lazy)
1054 (fmodule-version-ignore, Winvalid-imported-macros)
1055 (flang-info-include-translate, flang-info-include-translate-not):
1056 New options
1057
5fbf0ecb
GA
10582020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1059
1060 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1061 (dump_ada_structure): Also deal with convention, unchecked union and
1062 bit-field for nested types. In the latter case, print an Alignment
1063 aspect along with the Pack aspect.
1064
360258da
GA
10652020-11-25 Martin Sebor <msebor@redhat.com>
1066
1067 PR bootstrap/94982
1068 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1069 -Wformat-diag.
1070
1e2c9a27
GA
10712020-11-24 Martin Sebor <msebor@redhat.com>
1072
1073 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1074
8e6198d0
GA
10752020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1076
1077 * c-attribs.c (handle_special_var_sec_attribute): New.
1078 (handle_noinit_attribute): Remove.
1079 (attr_noinit_exclusions): Rename to...
1080 (attr_section_exclusions): ...this, and add "persistent" attribute
1081 exclusion.
1082 (c_common_attribute_table): Add "persistent" attribute.
1083
7a97e2fc
GA
10842020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1085
1086 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1087 Treat opaque types like other types.
1088 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1089 supported types.
1090
82e5048e
GA
10912020-11-20 Martin Sebor <msebor@redhat.com>
1092
1093 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1094 with fewer arguments.
1095
10962020-11-20 Martin Sebor <msebor@redhat.com>
1097
1098 PR middle-end/97879
1099 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1100 Error out on invalid modes.
1101
11022020-11-20 Jakub Jelinek <jakub@redhat.com>
1103
1104 PR libstdc++/88101
1105 * c-common.c (check_builtin_function_arguments): Handle
1106 BUILT_IN_CLEAR_PADDING.
1107
25bb75f8
GA
11082020-11-18 Nathan Sidwell <nathan@acm.org>
1109
1110 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1111
4dabb037
GA
11122020-11-17 Nathan Sidwell <nathan@acm.org>
1113
1114 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1115 after newly-added CTI_MODULE_HWM.
1116
11172020-11-17 Joseph Myers <joseph@codesourcery.com>
1118
1119 * c-cppbuiltin.c (builtin_define_float_constants): Define
1120 "*_IS_IEC_60559__" macros.
1121
11222020-11-17 Nathan Sidwell <nathan@acm.org>
1123
1124 * c-lex.c: #include "langhooks.h".
1125 (cb_undef): Maybe call preprocess_undef lang hook.
1126 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1127 lang hook.
1128 (push_command_line_include): Maybe call preprocess_main_file lang
1129 hook.
1130 (cb_file_change): Likewise.
1131 * c-ppoutput.c: #include "langhooks.h.
1132 (scan_translation_unit): Maybe call preprocess_token lang hook.
1133 (class do_streamer): New, derive from token_streamer.
1134 (directives_only_cb): Data pointer is do_streamer, call
1135 preprocess_token lang hook.
1136 (scan_translation_unit_directives_only): Use do_streamer.
1137 (print_line_1): Move src_line recording to after string output.
1138 (cb_undef): Maybe call preprocess_undef lang hook.
1139
11402020-11-17 Nathan Sidwell <nathan@acm.org>
1141
1142 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1143 code duplicating that functionality.
1144
11452020-11-17 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c/90628
1148 * c-common.c (check_builtin_function_arguments)
1149 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1150 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1151 for more builtins and argument positions.
1152
29c5d9ce
GA
11532020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1154
1155 PR objc/97854
1156 * stub-objc.c: Include c-common.h to declare enum rid.
1157
77f67db2
GA
11582020-11-13 Jakub Jelinek <jakub@redhat.com>
1159
1160 PR c++/63287
1161 * c-cppbuiltin.c: Include configargs.h.
1162 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1163 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1164 "single".
1165
11662020-11-13 Gergö Barany <gergo@codesourcery.com>
1167 Thomas Schwinge <thomas@codesourcery.com>
1168
1169 * c.opt (fopenacc-kernels): Add.
1170
11712020-11-13 Jason Merrill <jason@redhat.com>
1172
1173 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1174
11752020-11-13 Piotr H. Dabrowski <phd@phd.re>
1176
1177 PR c++/91318
1178 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1179
11802020-11-13 Martin Liska <mliska@suse.cz>
1181
1182 * c-attribs.c (build_attr_access_from_parms): Format properly.
1183
11842020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1185
1186 PR objc/90707
1187 * c-common.c (c_common_reswords): null_unspecified, nullable,
1188 nonnull, null_resettable: New keywords.
1189 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1190 RID_NONNULL, RID_NULL_RESETTABLE: New.
1191 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1192 ranges accepted for property attributes.
1193 * c-attribs.c (handle_objc_nullability_attribute): New.
1194 * c-objc.h (enum objc_property_attribute_group): Add
1195 OBJC_PROPATTR_GROUP_NULLABLE.
1196 (enum objc_property_attribute_kind):Add
1197 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1198 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1199
12002020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1201
1202 PR objc/77404
1203 * c-attribs.c (handle_objc_root_class_attribute): New
1204 * c-objc.h (objc_start_class_interface): Add a location
1205 value for the position of the class name.
1206 * c.opt: Add Wobjc-root-class.
1207 * stub-objc.c (objc_start_class_interface): Add a location
1208 value for the position of the class name.
1209
a5a11525
GA
12102020-11-12 Joseph Myers <joseph@codesourcery.com>
1211
1212 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1213 Allow scope for C. Handle standard attributes for C. Do not
1214 accept unscoped attributes if std_syntax and not handled as
1215 standard attributes.
1216 * c-common.h (c_common_has_attribute): Update prototype.
1217
12182020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1219
1220 PR pch/86674
1221 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1222 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1223
0f5f9ed5
GA
12242020-11-11 Patrick Palka <ppalka@redhat.com>
1225
1226 PR c++/88115
1227 * c-opts.c (c_common_post_options): Update latest_abi_version.
1228
bb622641
GA
12292020-11-10 Jakub Jelinek <jakub@redhat.com>
1230
1231 PR c/97748
1232 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1233 to false.
1234 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1235 recursively and just return true instead of warning if it is true.
1236 Handle COMPLEX_EXPR.
1237
12382020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1239
1240 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1241 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1242 (c_omp_adjust_map_clauses): New function.
1243
2bee28dd
GA
12442020-11-09 Marek Polacek <polacek@redhat.com>
1245
1246 DR 1914
1247 * c-common.c (attribute_fallthrough_p): Tweak the warning
1248 message.
1249
12502020-11-09 Patrick Palka <ppalka@redhat.com>
1251
1252 * c-pragma.c (handle_pragma_diagnostic): Split the
1253 unknown-option -Wpragmas diagnostic into a warning and a
1254 subsequent note containing a spelling suggestion. Avoid
1255 computing the suggestion if -Wpragmas warnings are being
1256 suppressed.
1257
12582020-11-09 Patrick Palka <ppalka@redhat.com>
1259
1260 PR testsuite/97117
1261 * c-indentation.c (get_visual_column): Remove location_t
1262 parameter. Move the column-tracking diagnostic code from here
1263 to ...
1264 (should_warn_for_misleading_indentation): ... here, before the
1265 early exit for when the loci are not all distinct. Don't pass a
1266 location_t argument to get_visual_column.
1267 (assert_get_visual_column_succeeds): Don't pass a location_t
1268 argument to get_visual_column.
1269 (assert_get_visual_column_fails): Likewise.
1270
fb95de7a
GA
12712020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1272
1273 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1274 of keywords accepted in @property attribute contexts.
1275 * c-objc.h (enum objc_property_attribute_group): Add
1276 OBJC_PROPATTR_GROUP_CLASS.
1277 (enum objc_property_attribute_kind): Add
1278 OBJC_PROPERTY_ATTR_CLASS.
1279
2da7ee05
GA
12802020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1281
1282 * c-common.c (c_common_reswords): Add 'atomic' property
1283 attribute.
1284 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1285 property attributes.
1286
12872020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1288
1289 * c-attribs.c (handle_nsobject_attribute): New.
1290 * c.opt: Add WNSObject-attribute.
1291
44cab2d8
GA
12922020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1293
1294 * c-objc.h (enum objc_property_attribute_group): New
1295 (enum objc_property_attribute_kind): New.
1296 (OBJC_PROPATTR_GROUP_MASK): New.
1297 (struct property_attribute_info): Small class encapsulating
1298 parser output from property attributes.
1299 (objc_prop_attr_kind_for_rid): New
1300 (objc_add_property_declaration): Simplify interface.
1301 * stub-objc.c (enum rid): Dummy type.
1302 (objc_add_property_declaration): Simplify interface.
1303 (objc_prop_attr_kind_for_rid): New.
1304
13052020-11-06 Nathan Sidwell <nathan@acm.org>
1306
1307 * c-ada-spec.c (collect_ada_nodes): Rename
1308 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1309 (collect_ada_node): Likewise.
1310 (dump_forward_type): Likewise.
1311 * c-common.c (set_underlying_type): Rename
1312 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1313 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1314
13152020-11-06 Jakub Jelinek <jakub@redhat.com>
1316
1317 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1318
0cfd9109
GA
13192020-11-05 Marek Polacek <polacek@redhat.com>
1320
1321 PR c++/97675
1322 * c.opt (Wexceptions): New option.
1323
13242020-11-05 Marek Polacek <polacek@redhat.com>
1325
1326 PR c++/25814
1327 * c.opt (Wvexing-parse): New option.
1328
35c125cb
GA
13292020-11-04 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR c++/97670
1332 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1333 underlying decl to clear in the allocate_head bitmap.
1334
13352020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1336
1337 * c-objc.h (objc_non_constant_expr_p): New.
1338 * stub-objc.c (objc_non_constant_expr_p): New.
1339
fd2325ea
GA
13402020-11-03 Nathan Sidwell <nathan@acm.org>
1341
1342 * c.opt (MQ,MT): Reword description to be make-agnostic.
1343
88ce3d5f
GA
13442020-11-02 Nathan Sidwell <nathan@acm.org>
1345
1346 * c-opts.c (c_common_post_options): Move var decl to its
1347 initialization point.
1348
13492020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1350
1351 * c-lex.c (c_lex_with_flags): When combining '@' with a
1352 keyword for Objective-C, combine the location ranges too.
1353
13542020-10-30 Qing Zhao <qing.zhao@oracle.com>
1355 H.J.Lu <hjl.tools@gmail.com>
1356
1357 * c-attribs.c (c_common_attribute_table): Add new attribute
1358 zero_call_used_regs.
1359 (handle_zero_call_used_regs_attribute): New function.
1360
e93aae4a
GA
13612020-10-28 Marek Polacek <polacek@redhat.com>
1362
1363 PR c++/97573
1364 * c-opts.c (c_common_post_options): In C++20, turn on
1365 -Wdeprecated-enum-enum-conversion and
1366 -Wdeprecated-enum-float-conversion.
1367 * c.opt (Wdeprecated-enum-enum-conversion,
1368 Wdeprecated-enum-float-conversion): New options.
1369 (Wenum-conversion): Allow for C++ too.
1370
13712020-10-28 Jakub Jelinek <jakub@redhat.com>
1372
1373 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1374 * c-omp.c: Include bitmap.h.
1375 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1376
f19e7c8d
GA
13772020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1378
1379 * c-common.c (__is_nothrow_assignable): New.
1380 (__is_nothrow_constructible): Likewise.
1381 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1382 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1383
efe71fcc
GA
13842020-10-23 Jan Hubicka <hubicka@ucw.cz>
1385
1386 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1387
13882020-10-23 Marek Polacek <polacek@redhat.com>
1389
1390 PR c++/91741
1391 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1392 (c_common_init_ts): Likewise.
1393 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1394 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1395 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1396 (maybe_warn_sizeof_array_div): New function.
1397 * c.opt (Wsizeof-array-div): New option.
1398
13992020-10-23 Martin Sebor <msebor@redhat.com>
1400
1401 PR c/97463
1402 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1403
56ddd5e2
GA
14042020-10-22 Martin Liska <mliska@suse.cz>
1405
1406 PR c/94722
1407 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1408 (handle_stack_protect_attribute): Add error message for a
1409 no_stack_protector function.
1410
14112020-10-22 Martin Liska <mliska@suse.cz>
1412
1413 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1414
14152020-10-22 Jan Hubicka <hubicka@ucw.cz>
1416
1417 * c-gimplify.c: Include tree-nested.h
1418 (c_genericize): Update for new nested function info.
1419
b2698c21
GA
14202020-10-14 Martin Sebor <msebor@redhat.com>
1421
1422 PR c/97413
1423 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1424 bounds in an extra list.
1425
7e9282ae
GA
14262020-10-05 Richard Biener <rguenther@suse.de>
1427 Jakub Jelinek <jakub@redhat.com>
1428
1429 PR c++/97197
1430 * c-pretty-print.c: Include langhooks.h.
1431 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1432 expression.
1433 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1434 unary_expression.
1435 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1436
660bfe61
GA
14372020-09-30 Martin Sebor <msebor@redhat.com>
1438
1439 PR middle-end/97189
1440 * c-attribs.c (append_access_attr): Use the function declaration
1441 location for a warning about an attribute access argument.
1442
93bca37c
GA
14432020-09-29 Marek Polacek <polacek@redhat.com>
1444
1445 PR c++/94695
1446 * c.opt (Wrange-loop-construct): New option.
1447
82b77dee
GA
14482020-09-23 Martin Sebor <msebor@redhat.com>
1449
1450 PR c/97131
1451 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1452
14532020-09-23 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/97125
1456 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1457 after loops and other structured control constructs have been lowered.
1458
521d2711
GA
14592020-09-22 Jakub Jelinek <jakub@redhat.com>
1460
1461 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1462 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1463
44135373
GA
14642020-09-21 Marek Polacek <polacek@redhat.com>
1465
1466 * c.opt (Wctad-maybe-unsupported): New option.
1467
2fe5b7d1
GA
14682020-09-19 Martin Sebor <msebor@redhat.com>
1469
1470 PR c/50584
1471 * c-common.h (warn_parm_array_mismatch): Declare new function.
1472 (has_attribute): Move declaration of an existing function.
1473 (build_attr_access_from_parms): Declare new function.
1474 * c-warn.c (parm_array_as_string): Define new function.
1475 (plus_one): Define new function.
1476 (warn_parm_ptrarray_mismatch): Define new function.
1477 (warn_parm_array_mismatch): Define new function.
1478 (vla_bound_parm_decl): New function.
1479 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1480 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1481 qualifiers here...
1482 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1483 them in brackets here. Also print [static]. Strip extraneous
1484 expressions from VLA bounds.
1485
14862020-09-19 Martin Sebor <msebor@redhat.com>
1487
1488 PR c/50584
1489 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1490 (handle_argspec_attribute): New function.
1491 (get_argument, get_argument_type): New functions.
1492 (append_access_attrs): Add overload. Handle internal attribute
1493 representation in addition to external.
1494 (handle_access_attribute): Handle internal attribute representation
1495 in addition to external.
1496 (build_attr_access_from_parms): New function.
1497
14982020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1499
1500 * c-gimplify.c (genericize_c_loop): Rewrite to match
1501 c_finish_loop in c-typeck.c.
1502
15032020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1504
1505 * c-common.c (c_block_may_fallthrough): New, split from
1506 cxx_block_may_fallthrough in the cp front end.
1507 (c_common_init_ts): Move handling of loop and switch-related
1508 statements here from the cp front end.
1509 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1510 cp front end.
1511 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1512 * c-common.h (c_block_may_fallthru): Declare.
1513 (bc_state_t): Move here from cp front end.
1514 (save_bc_state, restore_bc_state): Declare.
1515 (c_genericize_control_stmt): Declare.
1516 (WHILE_COND, WHILE_BODY): Likewise.
1517 (DO_COND, DO_BODY): Likewise.
1518 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1519 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1520 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1521 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1522 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1523 * c-dump.c (dump_stmt): Copy from cp front end.
1524 (c_dump_tree): Move code to handle structured loop and switch
1525 tree nodes here from cp front end.
1526 * c-gimplify.c: Adjust includes.
1527 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1528 cp front end.
1529 (save_bc_state, restore_bc_state): New functions using old code
1530 from cp front end.
1531 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1532 (genericize_c_loop): Move from cp front end.
1533 (genericize_for_stmt, genericize_while_stmt): Likewise.
1534 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1535 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1536 (genericize_omp_for_stmt): Likewise.
1537 (c_genericize_control_stmt): New function using code split from
1538 cp front end.
1539 (c_genericize_control_r): New.
1540 (c_genericize): Call walk_tree with c_genericize_control_r.
1541 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1542 structured loop and switch tree nodes here from cp front end.
1543
2aad20c0
GA
15442020-09-17 Patrick Palka <ppalka@redhat.com>
1545
1546 PR c/80076
1547 * c-indentation.c (should_warn_for_misleading_indentation): Move
1548 declarations of local variables closer to their first use.
1549 Handle virtual token locations by resolving them to their
1550 respective macro expansion points. If all three tokens are
1551 produced from the same macro expansion, then instead use their
1552 loci within the macro definition.
1553
ecde1b0a
GA
15542020-09-16 Martin Sebor <msebor@redhat.com>
1555
1556 PR c/78666
1557 PR c/96126
1558 * c-attribs.c (validate_attr_args): New function.
1559 (validate_attr_arg): Same.
1560 (handle_section_attribute): Call it. Introduce a local variable.
1561 (handle_alloc_size_attribute): Same.
1562 (handle_alloc_align_attribute): Same.
1563
50a71cd0
GA
15642020-09-14 Jakub Jelinek <jakub@redhat.com>
1565
1566 * c-attribs.c (handle_optimize_attribute): Adjust
1567 cl_optimization_save, cl_optimization_restore and
1568 build_optimization_node callers.
1569 * c-pragma.c (handle_pragma_optimize): Adjust
1570 build_optimization_node caller.
1571 (handle_pragma_push_options): Adjust
1572 build_optimization_node and build_target_option_node callers.
1573 (handle_pragma_pop_options, handle_pragma_reset_options):
1574 Adjust cl_optimization_restore callers.
1575
8f7ea26a
GA
15762020-08-28 Martin Sebor <msebor@redhat.com>
1577
1578 * c.opt (Wstringop-overread): New option.
1579
a6493809
GA
15802020-08-11 Jakub Jelinek <jakub@redhat.com>
1581
1582 PR c/96545
1583 * c-common.c (get_atomic_generic_size): Require that first argument's
1584 type points to a complete type and use tree_fits_uhwi_p instead of
1585 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1586
48cc2e46
GA
15872020-07-31 Martin Sebor <msebor@redhat.com>
1588
1589 PR c++/96003
1590 * c-common.c (check_function_arguments_recurse): Return early when
1591 no-warning bit is set.
1592
15932020-07-31 Richard Biener <rguenther@suse.de>
1594
1595 PR debug/96383
1596 * c-common.h (c_common_finalize_early_debug): Declare.
1597 * c-common.c: Include debug.h.
1598 (c_common_finalize_early_debug): finalize_early_debug langhook
1599 implementation generating debug for extern declarations.
1600
e71dab87
GA
16012020-07-27 Nathan Sidwell <nathan@acm.org>
1602
1603 * c-common.c (try_to_locate_new_include_insertion_point): Use
1604 strcmp, not pointer equality.
1605
ae2e0bc1
GA
16062020-07-25 Martin Sebor <msebor@redhat.com>
1607
1608 PR c++/96310
1609 * c-common.c (check_nonnull_arg): Print note only when warning was
1610 issued.
1611
3ea9abca
GA
16122020-07-22 Tobias Burnus <tobias@codesourcery.com>
1613
1614 * c-omp.c (c_finish_omp_critical): Check for no name but
1615 nonzero hint provided.
1616
0933f508
GA
16172020-07-20 Jason Merrill <jason@redhat.com>
1618
1619 * c-cppbuiltin.c (c_cpp_builtins): Update
1620 __cpp_nontype_template_args for C++20.
1621
16222020-07-20 Martin Sebor <msebor@redhat.com>
1623
1624 PR c/96249
1625 * c.opt: Remove stray text.
1626
8ca07a30
GA
16272020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1628
1629 PR other/86904
1630 * c-indentation.c (should_warn_for_misleading_indentation): Get
1631 global tabstop from the new source.
1632 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1633 is now a common option.
1634 * c.opt: Likewise.
1635
a82c4c4c 16362020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1637
1638 * c.opt (Wscalar-storage-order): Add explicit variable.
1639
f60ee68d
GA
16402020-07-07 Nathan Sidwell <nathan@acm.org>
1641
1642 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1643 cpp_read_main_file.
1644 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1645 maps. Force token position to line_table's highest line.
1646 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1647 (cb_define): Always increment source line.
1648
4077d74c
GA
16492020-07-06 Martin Sebor <msebor@redhat.com>
1650
1651 PR c++/95984
1652 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1653 to stub lambda objects with null this pointer.
1654 (check_nonnull_arg): Handle C++ nullptr.
1655
b5f24739
GA
16562020-07-02 Jason Merrill <jason@redhat.com>
1657 Jakub Jelinek <jakub@redhat.com>
1658
1659 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1660
46fbb6c6
GA
16612020-06-30 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c++/95963
1664 * c-common.c (check_function_arguments_recurse): Don't crash on
1665 calls to internal functions.
1666
69273534
GA
16672020-06-28 Martin Sebor <msebor@redhat.com>
1668
1669 PR c++/86568
1670 * c-common.c (struct nonnull_arg_ctx): Add members.
1671 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1672 C++ member functions specially. Consider the this pointer implicitly
1673 nonnull.
1674 (check_nonnull_arg): Use location of argument when available.
1675 (check_function_arguments): Use nonnull_arg_ctx as argument.
1676
9a33c41f
GA
16772020-06-27 Jakub Jelinek <jakub@redhat.com>
1678
1679 PR middle-end/95903
1680 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1681 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1682 smaller precision intop operands separately.
1683
c9c05f73
GA
16842020-06-26 Marek Polacek <polacek@redhat.com>
1685
1686 * c-opts.c (c_common_init_options): Default to gnu++17.
1687
aff95ee7
GA
16882020-06-17 Jonathan Wakely <jwakely@redhat.com>
1689
bd0a89dc 1690 PR c/95378
aff95ee7
GA
1691 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1692 pointer arguments.
1693
56638b9b
GA
16942020-06-16 Jakub Jelinek <jakub@redhat.com>
1695
1696 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1697 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1698 idx members.
1699 (c_omp_is_loop_iterator): New function.
1700 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1701 if outer loop iterator is present. Perform duplicate checking through
1702 hash_set in the function rather than expecting caller to do that.
1703 Pass NULL instead of d->ppset to walk_tree_1.
1704 (c_omp_check_nonrect_loop_iv): New function.
1705 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1706 non-rectangular loop forms, diagnose multiple associated loops with
1707 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1708 (c_omp_check_loop_iv_exprs): Likewise.
1709
ec6ffbb9
GA
17102020-06-10 Martin Liska <mliska@suse.cz>
1711
1712 PR tree-optimization/92860
1713 * c-attribs.c (handle_optimize_attribute):
1714 Save global options and compare it after parsing of function
1715 attribute.
1716 * c-pragma.c (opt_stack::saved_global_options): New field.
1717 (handle_pragma_push_options): Save global_options.
1718 (handle_pragma_pop_options): Compare them after pop.
1719
b952c2cf
GA
17202020-06-09 Jakub Jelinek <jakub@redhat.com>
1721
1722 PR c/95580
1723 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1724 case when MEM_REF's first argument has type pointer to incomplete type.
1725
1a59f3db
GA
17262020-06-05 Jason Merrill <jason@redhat.com>
1727
1728 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1729 operand to POINTER_PLUS_EXPR.
1730
3add3425
GA
17312020-06-04 Martin Sebor <msebor@redhat.com>
1732
1733 PR middle-end/10138
1734 PR middle-end/95136
1735 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1736 (handle_access_attribute): Same.
1737
9a5b7438
GA
17382020-06-03 Mark Wielaard <mark@klomp.org>
1739
1740 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1741 New function.
1742 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1743 New function declaration.
1744
17452020-06-03 Mark Wielaard <mark@klomp.org>
1746
1747 * known-headers.cc (get_string_macro_hint): New function.
1748 (get_stdlib_header_for_name): Use get_string_macro_hint.
1749 (get_c_stdlib_header_for_string_macro_name): New function.
1750 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1751 New function declaration.
1752
17532020-06-03 Tobias Burnus <tobias@codesourcery.com>
1754
1755 * c-common.h (c_omp_predetermined_mapping): Declare.
1756 * c-omp.c (c_omp_predetermined_mapping): New.
1757
af114c38
MW
17582020-05-22 Mark Wielaard <mark@klomp.org>
1759
1760 * known-headers.cc (get_stdlib_header_for_name): Add a new
1761 stdlib_hint array for stdbool and stdint.
1762
45c50b6a
MW
17632020-05-22 Mark Wielaard <mark@klomp.org>
1764
1765 * known-headers.cc (get_stdlib_header_for_name): Return
1766 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1767 flag_isoc99.
1768
c22027a0
NS
17692020-05-20 Nathan Sidwell <nathan@acm.org>
1770
38a4db21
NS
1771 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1772
c22027a0
NS
1773 * c-common.c (try_to_locate_new_include_insertion_point): Use
1774 strcmp to compare filenames.
1775 * c-lex.c (init_c_lex): Move declaration to initialization.
1776 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1777 deferred count loop.
1778
29f0e90d
JM
17792020-05-15 Jason Merrill <jason@redhat.com>
1780
1781 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1782
b04445d4
JM
17832020-05-13 Jason Merrill <jason@redhat.com>
1784
1785 * c.opt (std=c++20): Make c++2a the alias.
1786 (std=gnu++20): Likewise.
1787 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1788 * c-opts.c: Adjust.
1789 * c-cppbuiltin.c: Adjust.
1790 * c-ubsan.c: Adjust.
1791 * c-warn.c: Adjust.
1792
11dd3be5
EB
17932020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1794
1795 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1796
b224c376
NS
17972020-05-08 Nathan Sidwell <nathan@acm.org>
1798
1799 Reimplement directives only processing.
1800 * c-ppoutput.c (token_streamer): Ne.
1801 (directives_only_cb): New. Swallow ...
1802 (print_lines_directives_only): ... this.
1803 (scan_translation_unit_directives_only): Reimplment using the
1804 published interface.
1805
f1d94677
MP
18062020-05-07 Marek Polacek <polacek@redhat.com>
1807
1808 * c-format.c (badwords): Add "nonstatic".
1809
9b95bb52
JJ
1810202-05-07 Jakub Jelinek <jakub@redhat.com>
1811
1812 PR c/94968
1813 * c-common.c (speculation_safe_value_resolve_params): Return false if
1814 error_operand_p (val2).
1815 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1816 Remove extraneous semicolon.
1817
530b4409 18182020-05-06 qing zhao <qing.zhao@oracle.com>
1819
1820 PR c/94230
1821 * c-indentation.c (get_visual_column): Add a hint to use the new
1822 -flarge-source-files option.
1823
b776bdca
SSF
18242020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1825
1826 * c-attribs.c (handle_vector_size_attribute): Add attribute
1827 nonnull for argument args in order to silence warning of
1828 uninitialized variable usage. Since this is local to the
1829 compilation unit and thus cannot be checked at call sides by the
1830 compiler, added an assert statement in order to verify this.
1831
6607bdd9
L
18322020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1833
1834 PR target/93492
1835 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1836 value to USHRT_MAX (65535).
1837
691eeb65
JJ
18382020-04-29 Jakub Jelinek <jakub@redhat.com>
1839
1840 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1841
26d76be7
JJ
18422020-04-27 Jakub Jelinek <jakub@redhat.com>
1843
1844 PR c/94755
1845 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1846 fncode == BUILT_IN_NONE before initialization of first_param.
1847
7291b2ed
MP
18482020-04-23 Marek Polacek <polacek@redhat.com>
1849
1850 PR c++/94733
1851 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1852 TREE_PURPOSE.
1853
58a29af8
PP
18542020-04-14 Patrick Palka <ppalka@redhat.com>
1855
1856 PR c++/85278
1857 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1858 ampersand if it's an rvalue reference type.
1859
09f04139
MS
18602020-04-13 Martin Sebor <msebor@redhat.com>
1861
1862 PR c/92326
1863 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1864 printing array bound for flexible array members.
1865
ee26baf4
IS
18662020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1867
1868 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1869 define, per n4861.
1870
75efe9cb
RB
18712020-04-02 Richard Biener <rguenther@suse.de>
1872
1873 PR c/94392
1874 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1875 for -O2 and C++11 or newer.
1876
75defde9
PP
18772020-03-28 Patrick Palka <ppalka@redhat.com>
1878
1879 * c.opt: Add -fconcepts-diagnostics-depth.
1880
52f24a9e
MS
18812020-03-27 Martin Sebor <msebor@redhat.com>
1882
1883 PR c++/94346
1884 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1885 to decl_attributes. Make handling of different kinds of entities
1886 more robust.
1887
ccacf77b
MS
18882020-03-27 Martin Sebor <msebor@redhat.com>
1889
1890 PR c++/94098
1891 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1892 here.
1893
ca6c7225
JJ
18942020-03-23 Jakub Jelinek <jakub@redhat.com>
1895
1896 PR c++/91993
1897 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1898 result being COMPOUND_EXPRs, skip to ultimate rhs.
1899
1aa22b19
RS
19002020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1901
1902 PR middle-end/94072
1903 * c-common.c (c_common_type_for_mode): Before using a registered
1904 built-in type, check that the vectorness of the type matches
1905 the vectorness of the mode.
1906
700d4cb0
JJ
19072020-03-17 Jakub Jelinek <jakub@redhat.com>
1908
1909 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1910 issue in a diagnostic message.
1911
b408e010
LH
19122020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1913
1914 * c.opt: Avoid redundancy in the help text.
1915
e78e50d5
MP
19162020-03-02 Marek Polacek <polacek@redhat.com>
1917
1918 PR c++/93958 - add missing -std=gnu++20.
1919 * c.opt: Add -std=gnu++20.
1920
649e1741
MS
19212020-03-01 Martin Sebor <msebor@redhat.com>
1922
1923 PR c++/92721
1924 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1925 (handle_access_attribute): Same.
1926
7b60f3ba
JJ
19272020-02-25 Jakub Jelinek <jakub@redhat.com>
1928
1929 PR c/93858
1930 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1931 "did you mean" hint in diagnostics.
1932
fb260504
JM
19332020-02-15 Jason Merrill <jason@redhat.com>
1934
1935 * c.opt: Add -std=c++20.
1936
1d757b09
EB
19372020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1938
1939 * c-ada-spec.c: Include bitmap.h.
1940 (dump_ada_double_name): Rename into...
1941 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1942 (dump_ada_array_type): Adjust to above renaming. Robustify.
1943 (dump_nested_types_1): New function copied from... Add dumped_types
1944 parameter and pass it down to dump_nested_type.
1945 (dump_nested_types): ...this. Remove parent parameter. Just call
1946 dump_nested_types_1 on an automatic bitmap.
1947 (dump_nested_type): Add dumped_types parameter.
1948 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1949 Adjust recursive calls and adjust to above renaming.
1950 (dump_ada_declaration): Adjust call to dump_nested_types.
1951 Tidy up and adjust to above renaming.
1952 (dump_ada_specs): Initialize and release bitmap obstack.
1953
0cc575e4
MS
19542020-02-10 Martin Sebor <msebor@redhat.com>
1955
1956 PR c/93640
1957 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1958
a59aa302
JJ
19592020-02-10 Jakub Jelinek <jakub@redhat.com>
1960
1961 PR other/93641
1962 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1963 Remove useless extra test.
1964
e464fc90
TB
19652020-02-03 Julian Brown <julian@codesourcery.com>
1966 Tobias Burnus <tobias@codesourcery.com>
1967
1968 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1969
e3b6c052
JM
19702020-01-29 Jason Merrill <jason@redhat.com>
1971
1972 PR c++/89357
1973 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1974
6d00f052
JM
19752020-01-23 Jason Merrill <jason@redhat.com>
1976
1977 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1978
8a990ffa
MS
19792020-01-23 Martin Sebor <msebor@redhat.com>
1980
1981 PR c/84919
1982 * c-common.c (check_function_arguments): Avoid overlap checking
1983 of sprintf functions.
1984
55b7df8b
JM
19852020-01-22 Jason Merrill <jason@redhat.com>
1986
1987 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1988 PR c++/40752
1989 * c-warn.c (conversion_warning): Check operands only after checking
1990 the whole expression. Don't check second operand of + for sign.
1991
c77074d0
JM
19922020-01-21 Jason Merrill <jason@redhat.com>
1993 Manuel López-Ibáñez <manu@gcc.gnu.org>
1994
1995 PR c++/40752 - useless -Wconversion with short +=.
1996 * c.opt (-Warith-conversion): New.
1997 * c-warn.c (conversion_warning): Recurse for operands of
1998 operators. Only warn about the whole expression with
1999 -Warith-conversion.
2000
731dbfc3
JM
20012020-01-21 Jason Merrill <jason@redhat.com>
2002
2003 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2004 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2005
ad1a3914
NS
20062020-01-20 Nathan Sidwell <nathan@acm.org>
2007
2008 PR preprocessor/80005
2009 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2010
49789fd0
IS
20112020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2012
2013 * c-common.c (co_await, co_yield, co_return): New.
2014 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2015 RID_CO_RETURN): New enumeration values.
2016 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2017 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2018 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2019 * c.opt (fcoroutines): New command-line switch.
2020
4bc1899b
DM
20212020-01-10 David Malcolm <dmalcolm@redhat.com>
2022
2023 * c-format.c (local_event_ptr_node): New.
2024 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2025 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2026 * c-format.h (T_EVENT_PTR): New define.
2027
f25e33fa
MS
20282020-01-10 Martin Sebor <msebor@redhat.com>
2029
2030 PR c/93132
2031 * c-attribs.c (append_access_attrs): Validate against the translated
2032 access string rather than the human-readable representation.
2033
8d9254fc
JJ
20342020-01-01 Jakub Jelinek <jakub@redhat.com>
2035
2036 Update copyright years.
2037
39292e25
EB
20382019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2039
2040 * c-ada-spec.h (decl_sloc): Delete.
2041 * c-ada-spec.c (decl_sloc): Make static.
2042
519d7496
JB
20432019-12-19 Julian Brown <julian@codesourcery.com>
2044
2045 * c-common.h (c_omp_map_clause_name): Add prototype.
2046 * c-omp.c (c_omp_map_clause_name): New function.
2047 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2048 PRAGMA_OACC_CLAUSE_DETACH.
2049
a6163563
JB
20502019-12-19 Julian Brown <julian@codesourcery.com>
2051 Maciej W. Rozycki <macro@codesourcery.com>
2052 Tobias Burnus <tobias@codesourcery.com>
2053 Thomas Schwinge <thomas@codesourcery.com>
2054
2055 * c-pragma.h (pragma_omp_clause): Add
2056 PRAGMA_OACC_CLAUSE_NO_CREATE.
2057
e8f1ade2
MS
20582019-12-17 Martin Sebor <msebor@redhat.com>
2059
2060 PR c++/61339
2061 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2062
368877a1
DM
20632019-12-11 David Malcolm <dmalcolm@redhat.com>
2064
2065 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2066 implementation.
2067 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2068
d68f5d45
DM
20692019-12-09 David Malcolm <dmalcolm@redhat.com>
2070
2071 * c-format.c (range_label_for_format_type_mismatch::get_text):
2072 Replace label_text ctor called with true with label_text::take.
2073
d3e28653
DM
20742019-12-09 David Malcolm <dmalcolm@redhat.com>
2075
2076 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2077 initial newline from expected outputs.
2078 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2079 call to diagnostic_show_locus.
2080
abd6d8cc
JJ
20812019-12-06 Jakub Jelinek <jakub@redhat.com>
2082
2083 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2084 now.
2085
7906797e
MP
20862019-12-05 Marek Polacek <polacek@redhat.com>
2087 Jakub Jelinek <jakub@redhat.com>
2088
2089 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2090 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2091
5c04da88
MP
20922019-12-05 Marek Polacek <polacek@redhat.com>
2093
2094 PR c++/92271 - make __is_same alias for __is_same_as.
2095 * c-common.c: Add __is_same, an alias for __is_same_as.
2096
43aae289
MP
20972019-12-03 Marek Polacek <polacek@redhat.com>
2098
2099 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2100 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2101 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2102
d7ddfbcb
JH
21032019-11-30 Jan Hubicka <hubicka@ucw.cz>
2104
2105 * c-attribs.c (handle_symver_attribute): New function
2106 (c_common_attributes): Add symver.
2107
65ef05d0
RS
21082019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2109
2110 * c-common.c (pointer_int_sum): Use verify_type_context to check
2111 whether the target allows pointer arithmetic for the types involved.
2112 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2113 to check whether the target allows sizeof and alignof operations
2114 for the types involved.
2115
1a291106
JM
21162019-11-27 Jason Merrill <jason@redhat.com>
2117
2118 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2119
05d6cb1a
JJ
21202019-11-26 Jakub Jelinek <jakub@redhat.com>
2121
2122 PR c++/61414
2123 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2124 ENUMERAL_TYPEs.
2125
5b8d9367
JM
21262019-11-25 Joseph Myers <joseph@codesourcery.com>
2127
2128 PR c/91985
2129 * c-common.c (c_common_type_for_mode): Handle decimal
2130 floating-point types being NULL_TREE.
2131 * c-format.c (get_format_for_type_1): Handle specified types being
2132 NULL_TREE.
2133 * c-lex.c (interpret_float): Give an error for decimal
2134 floating-point constants when decimal floating-point not
2135 supported.
2136
1fbf51cb
JJ
21372019-11-23 Jakub Jelinek <jakub@redhat.com>
2138
2139 PR middle-end/83859
2140 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2141 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2142 group warning with inform together.
2143 (handle_access_attribute): Formatting fix.
2144
761df906
JJ
21452019-11-22 Jakub Jelinek <jakub@redhat.com>
2146
bdaf8be1
JJ
2147 PR c/90677
2148 * c-common.h (identifier_global_tag): Declare.
2149 * c-format.c (get_pointer_to_named_type): Renamed to ...
2150 (get_named_type): ... this. Use identifier_global_tag instead of
2151 identifier_global_value, handle the return value being a TYPE_P.
2152 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2153 to call get_named_type instead. Formatting fixes.
2154
c2ecce6d 2155 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2156 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2157 and __cpp_generic_lambdas for -std=c++2a. Define
2158 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2159 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2160 __cpp_concepts for -std=c++2a.
2161
54aa6b58
MS
21622019-11-22 Martin Sebor <msebor@redhat.com>
2163
2164 PR middle-end/83859
2165 * c-attribs.c (handle_access_attribute): New function.
2166 (c_common_attribute_table): Add new attribute.
2167 (get_argument_type): New function.
2168 (append_access_attrs): New function.
2169 (get_nonnull_operand): Rename...
2170 (get_attribute_operand): ...to this.
2171 * c-common.c (get_nonnull_operand): Rename...
2172 (get_attribute_operand): ...to this.
2173
6c80b1b5
JM
21742019-11-21 Joseph Myers <joseph@codesourcery.com>
2175
2176 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2177 of warning.
2178
192961ff
JM
21792019-11-19 Joseph Myers <joseph@codesourcery.com>
2180
2181 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2182 warning for standard attributes mixed with fallthrough attributes.
2183
f8aea5e3
JM
21842019-11-15 Joseph Myers <joseph@codesourcery.com>
2185
2186 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2187 * c-common.h (handle_fallthrough_attribute): Declare.
2188
2cc94aa8
JM
21892019-11-15 Joseph Myers <joseph@codesourcery.com>
2190
2191 * c-attribs.c (handle_deprecated_attribute): Remove static.
2192 * c-common.h (handle_deprecated_attribute): Declare.
2193
7c5890cc
JM
21942019-11-14 Joseph Myers <joseph@codesourcery.com>
2195
2196 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2197 char for C.
2198
b2417b59
JJ
21992019-11-14 Jakub Jelinek <jakub@redhat.com>
2200
d0ec7c93
JJ
2201 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2202 valid vendors.
2203
b2417b59
JJ
2204 * c-omp.c (c_omp_check_context_selector): Handle name lists
2205 containing string literals. Don't diagnose atomic_default_mem_order
2206 with multiple props.
2207
00be2a5f
JM
22082019-11-13 Joseph Myers <joseph@codesourcery.com>
2209
2210 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2211 NORM_MAX constants. Update call to get_max_float.
2212 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2213 constants.
2214
2dbad62d
EB
22152019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2216
2217 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2218 (dump_forward_type): Do not generate a declaration for function types.
2219 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2220 of the component type if it is declared in another file.
2221
6ed76044
ML
22222019-11-12 Martin Liska <mliska@suse.cz>
2223
2224 * c-opts.c (c_common_post_options):
2225 Use SET_OPTION_IF_UNSET.
2226
62aee289
MR
22272019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2228 Frederik Harwath <frederik@codesourcery.com>
2229
2230 gcc/c-family/
2231 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2232 constant.
2233 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2234
f486280c
RS
22352019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2236
2237 * c-common.h (gnu_vector_type_p): New function.
2238 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2239 vectors to satisfy gnu_vector_type_p.
2240 (c_build_vec_convert): Likewise __builtin_convertvector.
2241 (convert_vector_to_array_for_subscript): Likewise when applying
2242 implicit vector to array conversion.
2243 (scalar_to_vector): Likewise when converting vector-scalar
2244 operations to vector-vector operations.
2245
017c6491
JM
22462019-11-08 Joseph Myers <joseph@codesourcery.com>
2247
2248 * c.opt (Wold-style-definition): Initialize to -1.
2249 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2250 to flag_isoc2x if not set explicitly.
2251
c01bd174
JM
22522019-11-07 Joseph Myers <joseph@codesourcery.com>
2253
2254 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2255
0df65305
JM
22562019-11-05 Jason Merrill <jason@redhat.com>
2257
2258 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2259 -fconcepts.
2260
e0c866dd
KK
22612019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2262
2263 * c-opts.c (c_common_post_options): Update
2264 latest_abi_version.
2265
f968ef9b
JJ
22662019-11-02 Jakub Jelinek <jakub@redhat.com>
2267
d0c464d2
JJ
2268 * c-common.h (c_omp_get_context_selector): Remove.
2269 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2270 and renamed to omp_get_context_selector.
2271
917dd789
JJ
2272 * c-omp.c (c_omp_mark_declare_variant): Use
2273 omp_context_selector_set_compare.
2274
f968ef9b
JJ
2275 PR c++/88335 - Implement P1073R3: Immediate functions
2276 * c-common.h (enum rid): Add RID_CONSTEVAL.
2277 * c-common.c (c_common_reswords): Add consteval.
2278
5f6705b7
JJ
22792019-11-01 Martin Sebor <msebor@redhat.com>
2280
2281 PR middle-end/91679
2282 PR middle-end/91647
2283 PR middle-end/91463
2284 PR middle-end/92312
2285 * c-pretty-print.c (direct_abstract_declarator): Print
2286 bound in zero-length arrays.
2287 * c.opt (-Wzero-length-bounds): New option.
2288
43f1814c
NS
22892019-10-30 Nathan Sidwell <nathan@acm.org>
2290
2291 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2292 macros.
2293
ad1539d5
MS
22942019-10-28 Martin Sebor <msebor@redhat.com>
2295
2296 PR c/66970
2297 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2298 even when only preprocessing.
2299 * c-common.h (names_builtin_p): Declare new function.
2300 * c-lex.c (init_c_lex): Set has_builtin.
2301 (c_common_has_builtin): Define a new function.
2302 * c-ppoutput.c (init_pp_output): Set has_builtin.
2303
135df52c
JJ
23042019-10-24 Jakub Jelinek <jakub@redhat.com>
2305
2306 * c-common.h (c_omp_context_selector_matches): Remove.
2307 * c-omp.c (c_omp_context_selector_matches): Remove.
2308 * c-attribs.c (c_common_attribute_table): Add
2309 "omp declare target {host,nohost,block}" attributes.
2310
8ad0c477
JM
23112019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2312
2313 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2314
56898e43
RS
23152019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2316
2317 * c-common.h (user_facing_original_type_p): Declare.
2318 * c-common.c: Include c-spellcheck.h.
2319 (user_facing_original_type_p): New function.
2320
20de9568
JJ
23212019-10-12 Jakub Jelinek <jakub@redhat.com>
2322
2323 * c-common.h (c_omp_mark_declare_variant,
2324 c_omp_context_selector_matches): Declare.
2325 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2326 and hsa-common.h.
2327 (c_omp_get_context_selector): Support second argument NULL.
2328 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2329 functions.
2330 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2331 attribute, add "omp declare variant base" and
2332 "omp declare variant variant" attributes.
2333
175a85b2
JM
23342019-10-11 Joseph Myers <joseph@codesourcery.com>
2335
2336 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2337 CppReason(CPP_W_C11_C2X_COMPAT).
2338
fe2bc27c
JM
23392019-10-11 Joseph Myers <joseph@codesourcery.com>
2340
2341 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2342 _Decimal64 and _Decimal128.
2343
27dfdc0f
JM
23442019-10-10 Joseph Myers <joseph@codesourcery.com>
2345
2346 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2347 types if DFP not supported.
2348
94e7f906
JJ
23492019-10-10 Jakub Jelinek <jakub@redhat.com>
2350
2351 * c-common.h (c_omp_check_context_selector,
2352 c_omp_get_context_selector): Declare.
2353 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2354 in diagnostic message.
2355 (c_omp_check_context_selector, c_omp_get_context_selector): New
2356 functions.
2357 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2358 attribute.
2359 (handle_omp_declare_variant_attribute): New function.
2360
a7160771
MS
23612019-10-09 Martin Sebor <msebor@redhat.com>
2362
2363 PR tree-optimization/90879
2364 * c.opt (-Wstring-compare): New option.
2365
cb57504a
JM
23662019-10-08 Andrew Sutton <asutton@lock3software.com>
2367 Jason Merrill <jason@redhat.com>
2368
2369 Update the concepts implementation to conform to the C++20
2370 specification, improve compile times, and generally clean up
2371 the implementation.
2372
2373 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2374 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2375 * c.opt: Add -Wconcepts-ts.
2376 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2377 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2378 (set_std_cxx2a): Enable concepts by default.
2379
fbb2a6dc
JM
23802019-10-08 Joseph Myers <joseph@codesourcery.com>
2381
2382 * c-opts.c (c_common_post_options): Set
2383 -fno-fp-int-builtin-inexact for C2X.
2384
8e007055
JJ
23852019-10-05 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR c++/91369 - Implement P0784R7: constexpr new
2388 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2389 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2390
843f104d
JM
23912019-10-04 Joseph Myers <joseph@codesourcery.com>
2392
2393 PR c/82752
2394 * c-format.c (C_STD_VER): Handle C2x.
2395 (C_STD_NAME): Likewise.
2396 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2397 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2398 modifier allowed and 'p' flag.
2399 * c-format.h (enum format_std_version): Add STD_C2X.
2400 (struct format_char_info): Mention 'p' in comment on flags2.
2401
e9c9a142
DM
24022019-10-01 David Malcolm <dmalcolm@redhat.com>
2403
2404 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2405 calling diagnostic_show_locus, rather than destroying it afterwards.
2406
7552c36a
JJ
24072019-10-01 Jakub Jelinek <jakub@redhat.com>
2408
2409 PR c++/91925
2410 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2411 with NULL DECL_FIELD_OFFSET.
2412
8209db25
RS
24132019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2414
2415 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2416 has a type name, use it in preference to the __vector syntax.
2417
9343bf99
RS
24182019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2419
2420 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2421 two spaces between a comma and "...".
2422
59bc434a
JJ
24232019-09-27 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR c++/88203
2426 * c-common.h (c_omp_predefined_variable): Declare.
2427 * c-omp.c (c_omp_predefined_variable): New function.
2428 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2429 for predefined variables.
2430
c6447c20
RS
24312019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2432
2433 * c-common.h (build_function_call_vec): Take the original
2434 function decl as an optional final parameter.
2435 (check_builtin_function_arguments): Take the original function decl.
2436 * c-common.c (check_builtin_function_arguments): Likewise.
2437 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2438 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2439
c4438114
JM
24402019-09-15 Jason Merrill <jason@redhat.com>
2441
2442 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2443 fold_for_warn in "|| mask" warning.
2444
68a57628
ML
24452019-09-10 Martin Liska <mliska@suse.cz>
2446
2447 * c.opt: Use newly added WarnRemoved.
2448
f48ef52e
ML
24492019-09-09 Martin Liska <mliska@suse.cz>
2450
2451 * c.opt: Update comment of removed
2452 options that are preserved only for backward
2453 compatibility.
2454
67f6e649
ML
24552019-09-06 Martin Liska <mliska@suse.cz>
2456
2457 PR c++/91125
2458 * c-common.c: Remove definition of flag_use_repository.
2459 * c-common.h: Likewise.
2460 * c-opts.c (c_common_handle_option):
2461 Do not handle OPT_frepo option.
2462 * c.opt: Mark the option with Deprecated.
2463
db9d2274
MP
24642019-09-04 Marek Polacek <polacek@redhat.com>
2465
2466 * c.opt (fdeduce-init-list): Ignored.
2467
68e2c199
PK
24682019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2469
2470 PR c/78736
2471 * c.opt (Wenum-conversion): New option.
2472
7a4418a5
JL
24732019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2474
2475 * c-attribs.c (handle_section_attribute): Call the
2476 handle_generic_attribute target hook after performing target
2477 independent processing.
2478 (handle_noinit_attribute): Likewise.
2479
5f76ab15
ILT
24802019-09-03 Ian Lance Taylor <iant@golang.org>
2481
2482 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2483 when using -fgo-dump-spec.
2484
ae0d3f6a
ML
24852019-09-02 Martin Liska <mliska@suse.cz>
2486
2487 PR c++/91155
2488 * c-common.c (fname_as_string): Use cxx_printable_name for
2489 __PRETTY_FUNCTION__ same as was used before r265711.
2490
8a902edb
MP
24912019-08-28 Marek Polacek <polacek@redhat.com>
2492
2493 Implement P1152R4: Deprecating some uses of volatile.
2494 PR c++/91361
2495 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2496 default for C++2a, unless -Wno-deprecated.
2497 * c.opt (Wvolatile): New warning.
2498
4742dbe7
MP
24992019-08-28 Marek Polacek <polacek@redhat.com>
2500
2501 PR c++/91360 - Implement C++20 P1143R2: constinit.
2502 * c-common.c (c_common_reswords): Add constinit and __constinit.
2503 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2504 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2505 RID_LAST_CXX20.
2506 (D_CXX20): Define.
2507 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2508 * c-format.c (cxx_keywords): Add "constinit".
2509 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2510
6a074892
JJ
25112019-08-27 Jakub Jelinek <jakub@redhat.com>
2512
2513 PR c++/91415
2514 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2515 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2516 like COMPOUND_EXPR rather than normal expression.
2517
22f8849d
IS
25182019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2519
2520 PR pch/61250
2521 * c-lex.c (c_lex_with_flags): Don't call
2522 c_common_no_more_pch () from here.
2523
df375b03
JJ
25242019-08-23 Jakub Jelinek <jakub@redhat.com>
2525
2526 PR middle-end/91283
2527 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2528 instead of flag_excess_precision_cmdline.
2529 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2530 * c-opts.c (c_common_post_options): Likewise.
2531
14b7950f
MS
25322019-08-22 Martin Sebor <msebor@redhat.com>
2533
2534 PR middle-end/91490
2535 * c-common.c (braced_list_to_string): Add argument and overload.
2536 Handle flexible length arrays and unions.
2537
8bb2ee59
EB
25382019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2539
2540 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2541 function declarations where arguments are missing. Rename variables.
2542
21c1e205
RB
25432019-08-15 Richard Biener <rguenther@suse.de>
2544
2545 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2546 enabled, define __SIZETYPE__.
2547
f0033821
CL
25482019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2549
2550 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2551 exclusion with "section" attribute.
2552 (attr_noinit_exclusions): New table.
2553 (handle_noinit_attribute): New function.
2554
4d732405
RS
25552019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2556
2557 PR middle-end/91421
2558 * c-common.c (resolve_overloaded_builtin): Use
2559 copy_decl_built_in_function.
2560
51ad8481
MS
25612019-08-13 Martin Sebor <msebor@redhat.com>
2562
2563 PR c/80619
2564 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2565 (asm_fprintf_length_spec): Same.
2566 * c-format.h (format_lengths): Add FMT_LEN_w.
2567
77eb117f
JJ
25682019-08-10 Jakub Jelinek <jakub@redhat.com>
2569
2570 * c-pragma.h (enum pragma_omp_clause): Add
2571 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2572
398e3feb
JJ
25732019-08-07 Jakub Jelinek <jakub@redhat.com>
2574
2575 * c-pragma.h (enum pragma_omp_clause): Add
2576 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2577 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2578 enumeration value.
2579
ab574db6
MP
25802019-08-05 Marek Polacek <polacek@redhat.com>
2581
2582 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2583 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2584 default for C++2a, unless -Wno-deprecated.
2585 * c.opt (Wcomma-subscript): New warning.
2586
554a530f
JJ
25872019-07-20 Jakub Jelinek <jakub@redhat.com>
2588
2589 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2590 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2591 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2592 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2593 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2594 constructs with the loop construct.
2595
1a888209
JJ
25962019-07-13 Jakub Jelinek <jakub@redhat.com>
2597
2598 PR c/91149
2599 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2600 OMP_CLAUSE_REDUCTION_TASK handling.
2601
1fdd6f04
JJ
26022019-07-12 Jakub Jelinek <jakub@redhat.com>
2603
2604 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2605 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2606
99b1c316
MS
26072019-07-09 Martin Sebor <msebor@redhat.com>
2608
2609 PR c++/61339
1fdd6f04 2610 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2611 and others to class.
2612 * c-pretty-print.h: Same.
2613
6c1dae73
MS
26142019-07-09 Martin Sebor <msebor@redhat.com>
2615
2616 PR c++/61339
2617 * c-format.c (check_argument_type): Change class-key from class to
2618 struct and vice versa to match convention and avoid -Wclass-is-pod
2619 and -Wstruct-no-pod.
2620 * c-pretty-print.h: Same.
2621
8ba6ea87
ML
26222019-07-03 Martin Liska <mliska@suse.cz>
2623
2624 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2625 dead assignemts.
2626
83eb9522
JJ
26272019-07-03 Jakub Jelinek <jakub@redhat.com>
2628
2629 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2630 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2631 with OMP_PARALLEL.
2632
1c6ffbab
QZ
26332019-07-02 qing zhao <qing.zhao@oracle.com>
2634
2635 PR preprocessor/90581
2636 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2637 * c.opt: Add new option -fmax-include-depth.
2638
7ffc7de5
JM
26392019-06-26 Jason Merrill <jason@redhat.com>
2640
2641 PR c++/55442 - memory-hog with highly recursive constexpr.
2642 * c.opt (fconstexpr-loop-limit): New.
2643
361af3e4
JJ
26442019-06-25 Jakub Jelinek <jakub@redhat.com>
2645
2646 PR sanitizer/90954
2647 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2648 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2649
ab20d992
JJ
26502019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2651
2652 * c-common.c (c_common_nodes_and_builtins): Define
2653 alternate "__intN__" name for "__intN" types.
2654
f4af4019
JH
26552019-06-24 Jan Hubicka <jh@suse.cz>
2656
2657 * c-common.c (braced_lists_to_strings): Check that
2658 type is array or integer prior checking string flag.
2659
da9e9b57
MB
26602019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2661
2662 PR c++/90875 - added -Wswitch-outside-range option
2663 * c.opt (Wswitch-outside-range): Added new option.
2664 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2665
3f3d6a6f
MP
26662019-06-21 Marek Polacek <polacek@redhat.com>
2667
2668 PR c++/90953 - ICE with -Wmissing-format-attribute.
2669 * c-common.c (check_function_arguments_recurse): Use
2670 get_attribute_name.
2671 (check_missing_format_attribute): Likewise.
2672
1bf32c11
MP
26732019-06-19 Marek Polacek <polacek@redhat.com>
2674
2675 PR c++/60364 - noreturn after first decl not diagnosed.
2676 * c-attribs.c (handle_noreturn_attribute): No longer static.
2677 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2678 Declare.
2679 * c-format.c (check_function_format): Use get_attribute_name.
2680
a04c0734
MS
26812019-06-19 Martin Sebor <msebor@redhat.com>
2682
2683 PR translation/90156
2684 * c-format.c (function_format_info::format_type): Adjust type.
2685 (function_format_info::is_raw): New member.
2686 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2687 (decode_format_attr): Adjust call to decode_format_type.
2688 Avoid a redundant call to convert_format_name_to_system_name.
2689 Avoid abbreviating the word "arguments" in a diagnostic.
2690 (format_warning_substr): New function.
2691 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2692 (finish_dollar_format_checking): Same.
2693 (check_format_info): Same.
2694 (struct baltoks_t): New.
2695 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2696 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2697 functions.
2698 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2699 maybe_diag_unbalanced_tokens.
2700 (handle_format_attribute): Spell out the word "arguments" in
2701 a diagnostic.
2702
d3786ebb
MB
27032019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2704
2705 PR c++/90449 - add -Winaccessible-base option.
2706 * c.opt (Winaccessible-base): New option.
2707
bf38f7e9
JJ
27082019-06-10 Jakub Jelinek <jakub@redhat.com>
2709
2710 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2711 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2712 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2713 combined/composite constructs where it is not allowed. Copy over
2714 OMP_CLAUSE_REDUCTION_INSCAN.
2715
0ecf545c
MS
27162019-06-05 Martin Sebor <msebor@redhat.com>
2717
2718 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2719 (handle_alias_ifunc_attribute): Same.
2720 (handle_copy_attribute): Same.
2721 (handle_weakref_attribute): Same.
2722 (handle_nonnull_attribute): Same.
2723 * c-warn.c (warn_for_sign_compare): Same.
2724 (warn_for_restrict): Same.
2725 * c.opt: Same.
2726
36b34127
MS
27272019-06-05 Martin Sebor <msebor@redhat.com>
2728
2729 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2730 * c.opt (-Wformat-diag): Remove a spurious period.
2731
357a352f
JJ
27322019-05-29 Jakub Jelinek <jakub@redhat.com>
2733
2734 PR c/90628
2735 * c-common.c (check_builtin_function_arguments)
2736 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2737 as last argument.
2738
2b8235ea
EB
27392019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2740
2741 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2742
6d86ddc4
ML
27432019-05-22 Martin Liska <mliska@suse.cz>
2744
2745 PR lto/90500
2746 * c-attribs.c (handle_copy_attribute): Do not copy
2747 target_clones attribute.
2748
419ba5b9
EB
27492019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2750
2751 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2752 * c-ada-spec.c (print_assignment_operator): New function.
2753 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2754 assignment operators declared as methods and filter out the others.
2755
e03436e7
TS
27562019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2757
2758 PR c/89433
2759 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2760 "omp declare target".
2761
a9c697b8
MS
27622019-05-16 Martin Sebor <msebor@redhat.com>
2763
ab20d992
JJ
2764 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2765 keywords, operators, and types in diagnostics.
2766 (handle_scalar_storage_order_attribute): Same.
2767 (handle_mode_attribute): Same.
2768 (handle_visibility_attribute): Same.
2769 (handle_assume_aligned_attribute): Same.
2770 (handle_no_split_stack_attribute): Same.
2771 * c-common.c (shorten_compare): Same.
2772 (c_common_truthvalue_conversion): Same.
2773 (cb_get_source_date_epoch): Same.
2774 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2775 in diagnostics.
2776 (interpret_float): Same.
2777 * c-omp.c (c_finish_omp_for): Same.
2778 * c-opts.c (c_common_post_options): Same.
2779 * c-pch.c (c_common_pch_pragma): Same.
2780 * c-pragma.c (pop_alignment): Same.
2781 (handle_pragma_pack): Same.
2782 (apply_pragma_weak): Same.
2783 (handle_pragma_weak): Same.
2784 (handle_pragma_scalar_storage_order): Same.
2785 (handle_pragma_redefine_extname): Same.
2786 (add_to_renaming_pragma_list): Same.
2787 (maybe_apply_renaming_pragma): Same.
2788 (push_visibility): Same.
2789 (handle_pragma_visibility): Same.
2790 (handle_pragma_optimize): Same.
2791 (handle_pragma_message): Same.
2792 * c-warn.c (warn_for_omitted_condop): Same.
2793 (lvalue_error): Same.
a9c697b8 2794
6b943512
RB
27952019-05-15 Richard Biener <rguenther@suse.de>
2796
2797 PR c/90474
2798 * c-common.c (c_common_mark_addressable_vec): Also mark
2799 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2800 c_mark_addressable.
ab20d992 2801
b744fc85
NS
28022019-05-06 Nathan Sidwell <nathan@acm.org>
2803
2804 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2805
598f50d7
NS
28062019-04-30 Nathan Sidwell <nathan@acm.org>
2807
2808 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2809
5bcc5a3b
ML
28102019-04-30 Martin Liska <mliska@suse.cz>
2811
2812 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2813 for unknown options.
2814
e78a87f7
RS
28152019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2816
2817 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2818 the pointer target rather than the pointer itself.
2819
c280b7ee
JJ
28202019-04-19 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c/89888
2823 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2824 arguments.
2825 (c_do_switch_warnings): Remove outside_range_p argument.
2826 * c-common.c (check_case_bounds): Removed.
2827 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2828 Don't call check_case_bounds. Fold low_value as well as high_value.
2829 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2830 Check for case labels outside of range of original type here and
2831 adjust them.
2832
8e8225e6
JJ
28332019-04-12 Jakub Jelinek <jakub@redhat.com>
2834
63b8a166
JJ
2835 PR translation/90041
2836 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2837 in the Warn diagnostics.
2838
8e8225e6
JJ
2839 PR c/89946
2840 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2841 function comment. Warn if arguments of the attribute are not positive
2842 integer constants.
2843
53a3f614
EB
28442019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2845
2846 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2847 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2848
22be5873
EB
28492019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 * c-ada-spec.c (is_float128): New predicate extracted from...
2852 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2853 <REAL_TYPE>: ...here. Call it.
2854
34facf20
DM
28552019-04-05 David Malcolm <dmalcolm@redhat.com>
2856
2857 PR c/89985
2858 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2859 auto_diagnostic_group. Guard inform calls by result of
2860 warning_at call.
2861
05564120
MP
28622019-04-05 Marek Polacek <polacek@redhat.com>
2863
ab20d992 2864 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2865 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2866 of RHS.
2867
7a506c3c
JM
28682019-04-03 Jason Merrill <jason@redhat.com>
2869
2870 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2871 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2872
ddeae8c8
MS
28732019-04-01 Martin Sebor <msebor@redhat.com>
2874
2875 PR c/89685
2876 * c-attribs.c (handle_copy_attribute): Handle references and
2877 non-constant expressions.
2878
a15ffa22
JJ
28792019-03-22 Jakub Jelinek <jakub@redhat.com>
2880
2881 PR c++/87481
2882 * c.opt (-fconstexpr-ops-limit=): New option.
2883
36a3a7a3
JJ
28842019-03-21 Jakub Jelinek <jakub@redhat.com>
2885
2886 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2887 template param.
2888
bec1da64
MS
28892019-03-19 Martin Sebor <msebor@redhat.com>
2890
2891 PR tree-optimization/89688
2892 * c-common.c (braced_list_to_string): Make static.
2893 (braced_lists_to_strings): Define new function.
2894 * c-common.h (braced_list_to_string): Remove.
2895 (braced_lists_to_strings): Declare.
2896
1fe61adf
ML
28972019-03-12 Martin Liska <mliska@suse.cz>
2898
2899 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2900
93964ebd
ML
29012019-03-11 Martin Liska <mliska@suse.cz>
2902
2903 * c-opts.c (c_common_post_options): Wrap apostrophes
2904 in gcc internal format with %'.
2905
a3f9f006
ML
29062019-03-11 Martin Liska <mliska@suse.cz>
2907
2908 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2909 in a string format message and fix GNU coding style.
2910 * c-common.c (vector_types_convertible_p): Likewise.
2911 (c_build_vec_perm_expr): Likewise.
2912 * c-indentation.c (get_visual_column): Likewise.
2913 * c-opts.c (c_common_handle_option): Likewise.
2914 (c_common_post_options): Likewise.
2915 (sanitize_cpp_opts): Likewise.
2916 * c-pch.c (c_common_pch_pragma): Likewise.
2917 * c-pragma.c (handle_pragma_pack): Likewise.
2918
1db01ff9
JJ
29192019-03-08 Jakub Jelinek <jakub@redhat.com>
2920
2921 PR tree-optimization/89550
2922 * c-common.c (c_common_truthvalue_conversion): Only set
2923 TREE_NO_WARNING if warning_at returned true.
2924 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2925
ba790e6f
JJ
29262019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2927 Martin Sebor <msebor@gmail.com>
2928
2929 * c.opt (Wmissing-attributes): Clean up doc string.
2930
7da73ba7
JJ
29312019-02-25 Jakub Jelinek <jakub@redhat.com>
2932
2933 PR c/89495
2934 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2935 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2936 checking.
2937
921bb9d1
RB
29382019-02-22 Richard Biener <rguenther@suse.de>
2939
2940 * c-pch.c (no_checksum): Remove.
2941 (pch_init): Remove assertion that executable_checksum is not
2942 all zero.
2943 (c_common_valid_pch): Likewise.
2944
e2ebb05c
MS
29452019-02-18 Martin Sebor <msebor@redhat.com>
2946
2947 PR middle-end/89294
2948 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2949
3fe53000
DM
29502019-02-16 David Malcolm <dmalcolm@redhat.com>
2951
2952 PR c++/88680
2953 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2954 implementing -Wtype-limits.
2955
28a8cef1
MS
29562019-02-11 Martin Sebor <msebor@redhat.com>
2957
2958 PR c++/87996
2959 * c-common.c (invalid_array_size_error): New function.
2960 (valid_array_size_p): Call it. Handle size as well as type.
2961 * c-common.h (valid_constant_size_p): New function.
2962 (enum cst_size_error): New type.
2963
ec2be203
DM
29642019-01-31 David Malcolm <dmalcolm@redhat.com>
2965
2966 PR c/89122
2967 * known-headers.cc (get_stdlib_header_for_name): Add
2968 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2969
8936f047
JJ
29702019-01-31 Jakub Jelinek <jakub@redhat.com>
2971
2972 PR libstdc++/88170
2973 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2974 a C cast in pp_c_flag_gnu_v3 mode.
2975
6a335b96
JJ
29762019-01-29 Jakub Jelinek <jakub@redhat.com>
2977
2978 PR c/86125
2979 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2980 builtin_structptr_types types even for C.
2981
2a06eba5
BE
29822019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2983
2984 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2985 when rhs is of array type correctly. Fix handling of nested structures.
2986 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2987 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2988 type casts within nested compound expressions.
2989
18a23298
JJ
29902019-01-22 Jakub Jelinek <jakub@redhat.com>
2991
2992 PR middle-end/88968
2993 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2994 variable after using BIT_FIELD_REF.
2995
420183d9
L
29962019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2997
2998 PR c/51628
2999 PR c/88664
3000 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3001 Remove the boolean argument.
3002 * c-warn.c (check_address_of_packed_member): Renamed to ...
3003 (check_address_or_pointer_of_packed_member): This. Also
3004 warn pointer conversion.
3005 (check_and_warn_address_of_packed_member): Renamed to ...
3006 (check_and_warn_address_or_pointer_of_packed_member): This.
3007 Also warn pointer conversion.
3008 (warn_for_address_or_pointer_of_packed_member): Remove the
3009 boolean argument. Don't check pointer conversion here.
3010
99063eee
RS
30112019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3012
3013 PR inline-asm/52813
3014 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3015
a30d0196
JJ
30162019-01-14 Jakub Jelinek <jakub@redhat.com>
3017
3018 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3019 and __cpp_nontype_template_parameter_auto. Add a comment that
3020 __cpp_template_auto is deprecated.
3021
2d91f79d
TH
30222019-01-14 Tom Honermann <tom@honermann.net>
3023
3024 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3025 * c-common.c (c_common_reswords): Add char8_t.
3026 (fix_string_type): Use char8_t for the type of u8 string literals.
3027 (c_common_get_alias_set): char8_t doesn't alias.
3028 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3029 C++.
3030 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3031 (keyword_begins_type_specifier): Add RID_CHAR8.
3032 * c-common.h (rid): Add RID_CHAR8.
3033 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3034 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3035 Define char8_type_node and char8_array_type_node.
3036 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3037 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3038 (c_cpp_builtins): Predefine __cpp_char8_t.
3039 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3040 CPP_UTF8STRING.
3041 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3042 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3043 targeting C++2a.
3044 * c.opt: Add the -fchar8_t command line option.
3045
23db6ced
MS
30462019-01-14 Martin Sebor <msebor@redhat.com>
3047
3048 PR target/88638
3049 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3050 and issue errors if it fails.
3051 * c-common.h (valid_format_string_type_p): Declare.
3052 * c-format.c (valid_stringptr_type_p): Rename...
3053 (valid_format_string_type_p): ...to this and make extern.
3054 (handle_format_arg_attribute): Adjust to new name.
3055 (check_format_string): Same.
3056
234c3818
L
30572019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3058
3059 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3060 Replace "may may" with "may" in warning message.
3061
d8fcab68
JJ
30622019-01-07 Jakub Jelinek <jakub@redhat.com>
3063
3064 PR c++/85052
3065 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3066 (c_build_vec_convert): Declare.
3067 * c-common.c (c_build_vec_convert): New function.
3068
29d24852
MS
30692019-01-04 Martin Sebor <msebor@redhat.com>
3070
3071 PR c/88546
3072 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3073 Handle C++ empty throw specification and C11 _Noreturn.
3074 (has_attribute): Also handle C11 _Noreturn.
3075
9069a4c9
MS
30762019-01-04 Martin Sebor <msebor@redhat.com>
3077
3078 PR c/88363
3079 * c-attribs.c (positional_argument): Also accept enumerated types.
3080
a5544970
JJ
30812019-01-01 Jakub Jelinek <jakub@redhat.com>
3082
3083 Update copyright years.
3084
da77eace
L
30852018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3086
3087 PR c/51628
3088 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3089 * c-warn.c (check_alignment_of_packed_member): New function.
3090 (check_address_of_packed_member): Likewise.
3091 (check_and_warn_address_of_packed_member): Likewise.
3092 (warn_for_address_or_pointer_of_packed_member): Likewise.
3093 * c.opt: Add -Wno-address-of-packed-member.
3094
573767d4
DM
30952018-12-20 David Malcolm <dmalcolm@redhat.com>
3096
3097 PR c++/87504
3098 * c-warn.c (get_outermost_macro_expansion): New function.
3099 (spelled_the_same_p): Use it to unwind the macro expansions, and
3100 compare the outermost macro in each nested expansion, rather than
3101 the innermost.
3102
a14feb3c
DM
31032018-12-19 David Malcolm <dmalcolm@redhat.com>
3104
3105 PR c++/87504
3106 * c-common.h (warn_tautological_cmp): Convert 1st param from
3107 location_t to const op_location_t &.
3108 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3109 when testing for INTEGER_CST.
3110 (warn_tautological_bitwise_comparison): Convert 1st param from
3111 location_t to const op_location_t &; use it to build a
3112 binary_op_rich_location, and use this.
3113 (spelled_the_same_p): New function.
3114 (warn_tautological_cmp): Convert 1st param from location_t to
3115 const op_location_t &. Warn for macro expansions if
3116 spelled_the_same_p. Use binary_op_rich_location.
3117
dfd7fdca
DM
31182018-12-19 David Malcolm <dmalcolm@redhat.com>
3119
3120 PR c++/43064
3121 PR c++/43486
3122 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3123 (verify_tree): Handle location wrappers.
3124 (c_common_truthvalue_conversion): Strip any location wrapper.
3125 Handle CONST_DECL.
3126 (fold_offsetof): Strip any location wrapper.
3127 (complete_array_type): Likewise for initial_value.
3128 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3129 index before checking for INTEGER_CST.
3130 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3131 print parentheses around location wrappers.
3132 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3133 before checking for INTEGER_CST.
3134 (warn_tautological_bitwise_comparison): Call
3135 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3136 before checking for INTEGER_CST.
3137 (readonly_error): Strip any location wrapper.
3138 (warn_array_subscript_with_type_char): Strip location wrappers
3139 before checking for INTEGER_CST. Use the location of the index if
3140 available.
3141
5c8b3702
JM
31422018-12-06 Jason Merrill <jason@redhat.com>
3143
3144 PR c++/88136 - -Wdeprecated-copy false positives
3145 * c.opt (Wdeprecated-copy-dtor): New.
3146 (Wdeprecated-copy): Move to -Wextra.
3147
673670da
MS
31482018-11-29 Martin Sebor <msebor@redhat.com>
3149
3150 PR c/88172
3151 PR testsuite/88208
3152 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3153 alignments to values less than the target requires.
3154 (has_attribute): For attribute aligned consider both the attribute
3155 and the alignment bits.
3156 * c-common.c (c_init_attributes): Optionally issue a warning for
3157 zero alignment.
3158
04864ec8
MS
31592018-11-28 Martin Sebor <msebor@redhat.com>
3160
3161 PR c/88065
3162 PR c/87297
3163 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3164 or destination is an error.
3165
ace83db0
JJ
31662018-11-28 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR c++/88215
3169 * c-ubsan.c: Include langhooks.h.
3170 (ubsan_instrument_division): Change gcc_assert that main variants
3171 of op0 and op1 types are equal to gcc_checking_assert that the
3172 main variants are compatible types.
3173
da193a27
EB
31742018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3175
3176 * c-ada-spec.c: Include stringpool.h.
3177 (has_static_fields): Return false for incomplete types.
3178 (is_tagged_type): Likewise.
3179 (has_nontrivial_methods): Likewise.
3180 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3181 (struct overloaded_name_hash): New structure.
3182 (struct overloaded_name_hasher): Likewise.
3183 (overloaded_names): New global variable.
3184 (init_overloaded_names): New static function.
3185 (overloaded_name_p): New predicate.
3186 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3187 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3188 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3189 Remove always-true condition and dump forward types.
3190 (dump_ada_specs): Delete overloaded_names.
3191
98f08eb8
MS
31922018-11-20 Martin Sebor <msebor@redhat.com>
3193
3194 * c-attribs.c (type_for_vector_size): New function.
3195 (type_valid_for_vector_size): Same.
3196 (handle_vector_size_attribute): Move code to the functions above
3197 and call them.
3198 (validate_attribute, has_attribute): New functions.
3199 * c-common.h (has_attribute): Declare.
3200 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3201 * c-common.c (c_common_resword): Same.
3202
2674fa47
JM
32032018-11-16 Jason Merrill <jason@redhat.com>
3204
3205 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3206 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3207
258b3854
JJ
32082018-11-16 Jakub Jelinek <jakub@redhat.com>
3209
3210 PR middle-end/87854
3211 * c-common.c (fix_string_type): Reject string literals larger than
3212 TYPE_MAX_VALUE (ssizetype) bytes.
3213
1d249509
MS
32142018-11-15 Martin Sebor <msebor@redhat.com>
3215
3216 PR c++/87541
3217 PR c++/87542
3218 * c-attribs.c (positional_argument): New function.
3219 (handle_alloc_size_attribute): Use it and simplify.
3220 (handle_alloc_align_attribute): Same.
3221 (handle_assume_aligned_attribute): Same.
3222 (handle_nonnull_attribute): Same.
3223 * c-common.c (check_function_arguments): Pass fntype to
3224 check_function_format.
3225 * c-common.h (check_function_format): Add an argument.
3226 (PosArgFlags, positional_argument): Declare new type and function.
3227 * c-format.c (decode_format_attr): Add arguments.
3228 (check_format_string, get_constant): Same.
3229 (convert_format_name_to_system_name): Adjust.
3230
478dd60d
DM
32312018-11-15 David Malcolm <dmalcolm@redhat.com>
3232
3233 PR other/19165
3234 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3235
8cca0163
JJ
32362018-11-14 Jakub Jelinek <jakub@redhat.com>
3237
8ee09943
JJ
3238 P1236R1 - Signed integers are two's complement
3239 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3240 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3241 with in-range second operand well defined for -std=c++2a.
3242
8cca0163
JJ
3243 PR other/88007
3244 * c-common.c (parse_optimize_options): Allocate option string from
3245 opts_obstack rather than as GC memory. Move the allocation after
3246 warning for invalid option.
3247
620e594b
DM
32482018-11-13 David Malcolm <dmalcolm@redhat.com>
3249
3250 * c-common.c (c_get_substring_location): Update for renaming of
3251 get_source_location_for_substring to get_location_within_string.
3252 * c-lex.c: Replace "source_location" with "location_t".
3253 * c-opts.c: Likewise.
3254 * c-ppoutput.c: Likewise.
3255
f9731de3
MS
32562018-11-13 Martin Sebor <msebor@redhat.com>
3257
3258 PR middle-end/81824
3259 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3260 (handle_tls_model_attribute): Improve diagnostics.
3261
e4bd6d5e
JM
32622018-11-12 Jason Merrill <jason@redhat.com>
3263
a6bb6b07
JM
3264 * c-cppbuiltin.c (c_cpp_builtins): Define
3265 __cpp_impl_destroying_delete.
3266
e4bd6d5e
JM
3267 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3268 __cpp_conditional_explicit.
3269
79a2c428
MS
32702018-11-09 Martin Sebor <msebor@redhat.com>
3271
3272 PR middle-end/81824
3273 * c-attribs.c (handle_copy_attribute): New function.
3274
4c7bd361
MS
32752018-11-09 Martin Sebor <msebor@redhat.com>
3276
3277 PR c/87795
3278 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3279
28567c40
JJ
32802018-11-08 Jakub Jelinek <jakub@redhat.com>
3281
3282 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3283 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3284 enum omp_memory_order MEMORY_ORDER.
3285 (c_finish_omp_flush): Add MO argument.
3286 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3287 (c_finish_omp_for): Add FINAL_P argument.
3288 * c-omp.c: Include memmodel.h.
3289 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3290 OMP_TASKGROUP_CLAUSES to it.
3291 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3292 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3293 instead of OMP_ATOMIC_SEQ_CST.
3294 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3295 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3296 __atomic_thread_fence call with the given value.
3297 (check_omp_for_incr_expr): Formatting fixes.
3298 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3299 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3300 is not constant expression 1 or -1. Transform NE_EXPR loops
3301 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3302 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3303 loops too.
3304 (c_omp_split_clauses): Add support for combined
3305 #pragma omp parallel master and
3306 #pragma omp {,parallel }master taskloop{, simd} constructs.
3307 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3308 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3309 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3310 (c_omp_predetermined_sharing): Don't return
3311 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3312 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3313 PRAGMA_OMP_REQUIRES.
3314 * c-pragma.h (enum pragma_kind): Likewise.
3315 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3316 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3317
204839e7
DM
33182018-11-08 David Malcolm <dmalcolm@redhat.com>
3319
3320 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3321
d8010ee4
DM
33222018-11-08 David Malcolm <dmalcolm@redhat.com>
3323
3324 * c-format.c (local_cgraph_node_ptr_node): New variable.
3325 (gcc_dump_printf_char_table): Add entry for %C.
3326 (get_pointer_to_named_type): New function, taken from the handling
3327 code for "gimple *" from...
3328 (init_dynamic_diag_info): ...here. Add handling for
3329 "cgraph_node *".
3330 * c-format.h (T_CGRAPH_NODE): New.
3331
4be5c72c
JM
33322018-10-19 Jason Merrill <jason@redhat.com>
3333
3334 * c-cppbuiltin.c (c_cpp_builtins): Add
3335 __cpp_nontype_template_parameter_class.
3336
f3f6029d
NS
33372018-10-31 Nathan Sidwell <nathan@acm.org>
3338
ab5324fb
NS
3339 * c-opts.c (c_finish_options): Force command line macro
3340 location. Refactor to avoid repeating main debug hook.
3341 (push_command_line_include): Clarify comment.
3342
f3f6029d
NS
3343 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3344
91e3ec29
MS
33452018-10-30 Martin Sebor <msebor@redhat.com>
3346
3347 PR middle-end/87041
3348 * c-format.c (check_format_types): Avoid diagnosing null pointer
3349 arguments to printf-family of functions.
3350
b5ff4f5c
MP
33512018-10-30 Marek Polacek <polacek@redhat.com>
3352
3353 Implement P0892R2, explicit(bool).
3354 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3355
7e2de6df
DM
33562018-10-29 David Malcolm <dmalcolm@redhat.com>
3357
3358 * name-hint.h (name_hint::take_deferred): New member function.
3359
b2bf438c
DM
33602018-10-29 David Malcolm <dmalcolm@redhat.com>
3361
3362 PR c++/56856
3363 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3364 argument.
3365 (check_function_restrict): Rename param "argarray" to
3366 "unfolded_argarray", and make a copy named "argarray", calling
3367 fold_for_warn on each argument.
3368 (check_function_arguments): Add note about responsibility for
3369 folding the arguments.
3370
9f936c86
JM
33712018-10-17 Joseph Myers <joseph@codesourcery.com>
3372
3373 * c-common.c (flag_isoc2x): New variable.
3374 * c-common.h (clk_c): Update comment to reference C2X.
3375 (flag_isoc99, flag_isoc11): Update comments to reference future
3376 standard versions in general.
3377 (flag_isoc2x): Declare.
3378 * c-opts.c (set_std_c2x): New function.
3379 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3380 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3381 flag_isoc2x to 0.
3382 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3383
7a8a92c4
JM
33842018-10-17 Joseph Myers <joseph@codesourcery.com>
3385
3386 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3387 (std=iso9899:2018): Document C17 as published in 2018.
3388
4dc003ff
CL
33892018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3390
3391 PR c++/87364
3392 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3393
79371671
WW
33942018-10-11 Will Wray <wjwray@gmail.com>
3395
3396 PR c++/87364
3397 * c-pretty-print.h (pp_c_type_cast): Prototype.
3398 (pp_c_integer_constant): Likewise.
3399 * c-pretty-print.c (pp_c_type_cast): No longer static.
3400 (pp_c_integer_constant): Likewise.
3401 (pp_c_enumeration_constant): Fix loop termination when finding
3402 name of constant. No longer returns a value. Call
3403 pp_c_integer_constant.
3404 (c_pretty_printer::constant): Update for changes to
3405 pp_c_enumeration_constant.
3406
46c62690
JJ
34072018-10-11 Jakub Jelinek <jakub@redhat.com>
3408
3409 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3410 for no_unique_address.
3411
c24300ba
DM
34122018-10-09 David Malcolm <dmalcolm@redhat.com>
3413
3414 * c-common.c (c_option_controlling_cpp_error): Rename to...
3415 (c_option_controlling_cpp_diagnostic): ...this, and convert
3416 "reason" from int to enum.
3417 (c_cpp_error): Rename to...
3418 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3419 * c-common.h (c_cpp_error): Rename to...
3420 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3421 * c-opts.c (c_common_init_options): Update for renaming.
3422
8656dafa
RS
34232018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3424
3425 PR c/87286
3426 * c-common.c (vector_types_compatible_elements_p): Use
3427 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3428
8cff0652
VK
34292018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3430
3431 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3432 to generate constructor destructor priority warning.
3433 * c.opt (-Wprio-ctor-dtor): New option.
3434
bedf03a2
JM
34352018-10-01 Jason Merrill <jason@redhat.com>
3436
3437 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3438
6cc430c1
EB
34392018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3440
3441 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3442 (dump_ada_node): Add const keyword.
3443
87677ac7
ML
34442018-09-25 Martin Liska <mliska@suse.cz>
3445
3446 * c-common.c (c_common_truthvalue_conversion):
3447 Remove Pascal from documentation.
3448
518196cb
EB
34492018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3450
3451 * c-ada-spec.c: Include diagnostic.h.
3452 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3453
a599af84
MP
34542018-09-19 Marek Polacek <polacek@redhat.com>
3455
3456 * c.opt (Wclass-conversion): New.
3457
9c4a4b3c
DM
34582018-09-17 David Malcolm <dmalcolm@redhat.com>
3459
3460 * c-format.c (range_label_for_format_type_mismatch::get_text):
3461 Update for new param.
3462
c896ecfe
DM
34632018-09-17 David Malcolm <dmalcolm@redhat.com>
3464
3465 * c-format.c (format_warning_at_char): Update for introduction of
3466 format_string_diagnostic_t.
3467 (format_type_warning): Likewise.
3468
80c6d1f4
MJ
34692018-09-17 Martin Jambor <mjambor@suse.cz>
3470
3471 PR c/63886
3472 * c.opt (Wabsolute-value): New.
3473
6d900107
BE
34742018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3475
3476 * c-common.c (complete_flexible_array_elts): New helper function.
3477 * c-common.h (complete_flexible_array_elts): Declare.
3478
b5764229
BE
34792018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3480
3481 * c-common.c (braced_list_to_string): Remove eval parameter.
3482 Add some more checks. Always create zero-terminated STRING_CST.
3483 * c-common.h (braced_list_to_string): Adjust prototype.
3484
85204e23
DM
34852018-08-27 David Malcolm <dmalcolm@redhat.com>
3486
3487 PR 87091
3488 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3489 to a tri-state.
3490 (maybe_suggest_missing_token_insertion): Likewise.
3491 (maybe_add_include_fixit): Add param "override_location". If set,
3492 and source-printing is enabled, then override the rich_location's
3493 primary location with that of the insertion point for the fix-it
3494 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3495 * c-common.h (extern void maybe_add_include_fixit): Add bool
3496 param.
3497 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3498 for conversion of show_caret_p to a tri-state.
3499 * c-warn.c (warn_for_restrict): Likewise.
3500 * known-headers.cc
3501 (suggest_missing_header::~suggest_missing_header): Update call to
3502 maybe_add_include_fixit to suggest overriding the location, as it
3503 is for a note.
3504
3d78e008
ML
35052018-08-27 Martin Liska <mliska@suse.cz>
3506
3507 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3508 fndecl_built_in_p and remove check for FUNCTION_DECL if
3509 possible.
3d78e008
ML
3510 (check_builtin_function_arguments): Likewise.
3511 (reject_gcc_builtin): Likewise.
3512 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3513
b5be6d0c
MP
35142018-08-26 Marek Polacek <polacek@redhat.com>
3515
3516 PR c++/87029, Implement -Wredundant-move.
3517 * c.opt (Wredundant-move): New option.
3518
79ca9c35
MP
35192018-08-21 Marek Polacek <polacek@redhat.com>
3520
3521 PR c++/86981, Implement -Wpessimizing-move.
3522 * c.opt (Wpessimizing-move): New option.
3523
097f82ec
DM
35242018-08-20 David Malcolm <dmalcolm@redhat.com>
3525
3526 PR other/84889
3527 * c-attribs.c (common_handle_aligned_attribute): Add
3528 auto_diagnostic_group instance.
3529 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3530 * c-opts.c (c_common_post_options): Likewise.
3531 * c-warn.c (warn_logical_not_parentheses): Likewise.
3532 (warn_duplicated_cond_add_or_warn): Likewise.
3533 (warn_for_multistatement_macros): Likewise.
3534
3fb558b1
NS
35352018-08-20 Nathan Sidwell <nathan@acm.org>
3536
3537 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3538 access.
3539
800c0e98
NS
35402018-08-17 Nathan Sidwell <nathan@acm.org>
3541
3542 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3543 field.
3544 (laxy_hex_fp_value_count): Make unsigned.
3545 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3546 manipulate the macro.
3547 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3548 cpp_define_lazily.
3549
6f795a92
DM
35502018-08-17 David Malcolm <dmalcolm@redhat.com>
3551
3552 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3553 (gcc_dump_printf_length_specs): New.
3554 (gcc_dump_printf_flag_pairs): New.
3555 (gcc_dump_printf_flag_specs): New.
3556 (gcc_dump_printf_char_table): New.
3557 (format_types_orig): Add entry for "gcc_dump_printf".
3558 (init_dynamic_diag_info): Set up length_char_specs and
3559 conversion_specs for gcc_dump_printf_format_type.
3560 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3561
c5d725c0
NS
35622018-08-17 Nathan Sidwell <nathan@acm.org>
3563
10f04917
NS
3564 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3565
c5d725c0
NS
3566 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3567 * c-cppbuiltin.c: Likewise.
3568
c0c12356
ML
35692018-08-17 Martin Liska <mliska@suse.cz>
3570
3571 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3572 Ignore/Deprecated flag. Warning is done automatically for
3573 Deprecated flags.
c0c12356 3574
10fcc142
DM
35752018-08-16 David Malcolm <dmalcolm@redhat.com>
3576
3577 PR c++/70693
3578 * c-common.c (selftest::c_family_tests): Call
3579 selftest::c_indentation_c_tests.
3580 * c-common.h (selftest::c_indentation_c_tests): New decl.
3581 * c-indentation.c: Include "selftest.h".
3582 (next_tab_stop): Add "tab_width" param, rather than accessing
3583 cpp_opts.
3584 (get_visual_column): Likewise. Clarify comment. Bulletproof
3585 against reading past the end of the line.
3586 (get_first_nws_vis_column): Add "tab_width" param.
3587 (detect_intervening_unindent): Likewise.
3588 (should_warn_for_misleading_indentation): Read tab width from
3589 cpp_opts and pass around.
3590 (selftest::test_next_tab_stop): New test.
3591 (selftest::assert_get_visual_column_succeeds): New function.
3592 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3593 (selftest::assert_get_visual_column_fails): New function.
3594 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3595 (selftest::test_get_visual_column): New test.
3596 (selftest::c_indentation_c_tests): New function.
3597
3f6677f4
NS
35982018-08-16 Nathan Sidwell <nathan@acm.org>
3599
3600 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3601 (store_ada_macro): Likewise.
3602 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3603 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3604
96e6ae57
DM
36052018-08-15 David Malcolm <dmalcolm@redhat.com>
3606
3607 * c-format.c: Include "selftest-diagnostic.h" and
3608 "gcc-rich-location.h".
3609 (format_warning_at_char): Pass NULL for new label params of
3610 format_warning_va.
3611 (class indirection_suffix): New class.
3612 (class range_label_for_format_type_mismatch): New class.
3613 (format_type_warning): Move logic for generating "*" suffix to
3614 class indirection_suffix. Create "fmt_label" and "param_label"
3615 to show their types, and pass them to the
3616 format_warning_at_substring calls.
3617 (selftest::test_type_mismatch_range_labels): New test.
3618 (selftest::c_format_c_tests): Call it.
3619
23aa9f7c
MS
36202018-08-13 Martin Sebor <msebor@redhat.com>
3621
3622 PR tree-optimization/71625
3623 * c-common.c (braced_list_to_string): New function.
3624 * c-common.h (braced_list_to_string): Declare it.
3625
f10a9135
NS
36262018-08-08 Nathan Sidwell <nathan@acm.org>
3627
3628 * c-common.c (try_to_locate_new_include_inertion_point): Use
3629 linemap_included_from_linemap.
3630 * c-lex.c (fe_file_change): Use linemap_included_from.
3631 * c-ppoutput.c (pp_file_change): Likewise.
3632
8a45b051
MS
36332018-08-01 Martin Sebor <msebor@redhat.com>
3634
3635 PR tree-optimization/86650
ab20d992 3636 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3637 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3638 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3639 * c-format.h (T89_G): Update to be "gimple *" rather than
3640 "gcall *".
3641 (local_gcall_ptr_node): Rename...
3642 (local_gimple_ptr_node): ...to this.
3643
e540ccc0
DM
36442018-07-31 David Malcolm <dmalcolm@redhat.com>
3645
3646 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3647 table entries for gcc_diag_char_table, and the 'Z' entry from
3648 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3649 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3650 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3651 adding missing "Z" for this table. Remove erroneous "G" and "K"
3652 entries.
3653 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3654 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3655 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3656
425fc685
RE
36572018-07-31 Richard Earnshaw <rearnsha@arm.com>
3658
3659 * c-common.c (speculation_safe_resolve_call): New function.
3660 (speculation_safe_resolve_params): New function.
3661 (speculation_safe_resolve_return): New function.
3662 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3663 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3664 __HAVE_SPECULATION_SAFE_VALUE.
3665
181463c2
DM
36662018-07-20 David Malcolm <dmalcolm@redhat.com>
3667
3668 * c-common.c (c_cpp_error): Remove redundant "line_table"
3669 parameter from call to rich_location::set_range.
3670 (maybe_suggest_missing_token_insertion): Likewise.
3671
0d7f9065
MS
36722018-07-20 Martin Sebor <msebor@redhat.com>
3673
3674 PR middle-end/82063
ab20d992 3675 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3676
00abf86c
MS
36772018-07-20 Martin Sebor <msebor@redhat.com>
3678
3679 PR middle-end/82063
3680 * c-common.h (c_common_handle_option): Change function argument
3681 to HOST_WIDE_INT.
3682 * c-opts.c (c_common_init_options): Same.
3683 (c_common_handle_option): Same. Remove special handling of
3684 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3685 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3686 options to take a HOST_WIDE_INT argument and accept a byte-size
3687 suffix. Initialize.
3688 (-Wvla-larger-than): Same.
3689 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3690 (-Wno-vla-larger-than): Same.
3691
9b452033
JJ
36922018-07-12 Jakub Jelinek <jakub@redhat.com>
3693
3694 * c-attribs.c (c_common_attribute_table): Add
3695 "omp declare target implicit" attribute.
3696
cd0762f3
RB
36972018-07-12 Richard Biener <rguenther@suse.de>
3698
3699 PR c/86453
3700 * c-attribs.c (handle_packed_attribute): Do not build a variant
3701 type with TYPE_PACKED, instead ignore the attribute if we may
3702 not apply to the original type.
3703
0b27c3ed
JJ
37042018-07-10 Jakub Jelinek <jakub@redhat.com>
3705
3706 PR c++/86443
3707 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3708 to contain TREE_LIST for both the original class iterator and the
3709 "last" helper var.
3710
e730a0ef
EB
37112018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3712
3713 * c-ada-spec.c (to_ada_name): Remove index parameter.
3714 (pp_ada_tree_identifier): Likewise.
3715 (dump_ada_macros): Adjust call to to_ada_name.
3716 (struct overloaded_name_hash): Delete.
3717 (struct overloaded_name_hasher): Likewise.
3718 (overloaded_names): Likewise.
3719 (compute_overloading_index): Likewise.
3720 (dump_ada_decl_name): Do not call compute_overloading_index and
3721 adjust calls to pp_ada_tree_identifier.
3722 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3723 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3724 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3725 (dump_ada_enum_type): Remove type and display_convention parameters.
3726 Adjust calls to pp_ada_tree_identifier.
3727 (dump_ada_node): Likewise and for dump_ada_structure.
3728 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3729 and tidy up.
3730 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3731 syntax.
3732 (print_constructor): Adjust call to pp_ada_tree_identifier.
3733 (print_destructor): Likewise.
3734 (dump_ada_declaration): Switch to aspect syntax.
3735 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3736 parameter with nested parameter.
3737 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3738 (dump_ada_specs): Do not delete overloaded_names table.
3739
8de583fc
PB
37402018-07-06 Peter Bergner <bergner@linux.ibm.com>
3741
3742 PR target/86324
e730a0ef 3743 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3744 target hook.
3745
09cff37b
NS
37462018-07-05 Nathan Sidwell <nathan@acm.org>
3747
3748 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3749 NO_IMPLICIT_EXTERN_C.
3750
98086b2b
ML
37512018-06-28 Martin Liska <mliska@suse.cz>
3752
3753 * cppspec.c: Include opt-suggestions.h.
3754
ab20d992
JJ
37552018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3756 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3757 Cesar Philippidis <cesar@codesourcery.com>
3758
3759 * c-pragma.h (enum pragma_omp_clause): Add
3760 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3761 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3762
f41b7612
JJ
37632018-06-20 Jakub Jelinek <jakub@redhat.com>
3764
3765 PR c++/86210
3766 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3767 comment.
3768
4252ccd7
MS
37692018-06-18 Martin Sebor <msebor@redhat.com>
3770
3771 PR middle-end/85602
3772 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3773 nonstring.
3774
e197e64e
KV
37752018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3776
3777 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3778
34a7a230
JM
37792018-06-13 Jason Merrill <jason@redhat.com>
3780
5cef3733
JM
3781 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3782 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3783 handling.
3784
34a7a230
JM
3785 PR c++/86094 - wrong code with defaulted move ctor.
3786 * c-opts.c (c_common_post_options): Bump the current ABI version to
3787 13. Set warn_abi_version and flag_abi_compat_version to the current
3788 version rather than 0. Fix defaulting flag_abi_compat_version from
3789 warn_abi_version.
3790
bb0f14ae
MS
37912018-06-12 Martin Sebor <msebor@redhat.com>
3792
3793 PR c/85931
3794 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3795 sizeof source and destination yields the same value.
3796
3713f2e2
ML
37972018-06-12 Martin Liska <mliska@suse.cz>
3798
3799 * c.opt: Make MPX-related options as Deprecated.
3800
4af78ef8
DM
38012018-06-08 David Malcolm <dmalcolm@redhat.com>
3802
3803 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3804 rather than 0.
3805
31db0fe0
ML
38062018-06-08 Martin Liska <mliska@suse.cz>
3807
3808 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3809 for MPX (macros, related functions, fields in cgraph_node, ...).
3810 (handle_bnd_legacy): Likewise.
3811 (handle_bnd_instrument): Likewise.
3812 * c.opt: Likewise.
3813
fe16acf2
JJ
38142018-06-06 Jakub Jelinek <jakub@redhat.com>
3815
3816 PR c++/86068
3817 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3818 __cpp_transactional_memory to 201500 instead of 210500.
3819
4dbdb49b
JM
38202018-06-06 Jason Merrill <jason@redhat.com>
3821
3822 PR c++/85710 - ICE with -Wmemset-elt-size.
3823 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3824
f8ad043f
JM
38252018-06-01 Jason Merrill <jason@redhat.com>
3826
3827 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3828 201703.
3829
abc24d93
EB
38302018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3831
3832 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3833 declaration for a typedef independently of whether the declaration of
3834 the subtype is generated.
3835
d258f4aa
MS
38362018-05-31 Martin Sebor <msebor@redhat.com>
3837
3838 PR c/82063
3839 * c.opt (-Wno-alloc-size-larger-than): New option.
3840
b67b9225
DP
38412018-04-22 David Pagan <dave.pagan@oracle.com>
3842
3843 PR c/55976
3844 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3845 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3846 differentiate between default (no option), -Wreturn-type, and
3847 -Wno-return-type.
3848
04eb9c55
JM
38492018-05-29 Jason Merrill <jason@redhat.com>
3850
3851 * c.opt (Winit-list-lifetime): New flag.
3852
b0c31bc6
BE
38532018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3854
3855 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3856 splay_tree_delete_pointers.
3857
44284983
JJ
38582018-05-26 Jakub Jelinek <jakub@redhat.com>
3859
3860 PR bootstrap/85921
3861 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3862 noinline variable to workaround broken kernel headers.
3863
b46b715d
JM
38642018-05-18 Jason Merrill <jason@redhat.com>
3865
3866 * c.opt (Wdeprecated-copy): New flag.
3867
40659769
ML
38682018-05-17 Martin Liska <mliska@suse.cz>
3869
3870 * c-warn.c (overflow_warning): Do not use
3871 space in between 'G_' and '('.
3872
403962ea
JM
38732018-05-09 Jason Merrill <jason@redhat.com>
3874
3875 * c-common.c (valid_array_size_p): Add complain parameter.
3876 * c-common.h: ...which defaults to true.
3877
1c9ee609
JJ
38782018-05-11 Jakub Jelinek <jakub@redhat.com>
3879
3880 PR c/85696
3881 * c-omp.c (c_omp_predetermined_sharing): Return
3882 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3883
19916065
ML
38842018-05-11 Martin Liska <mliska@suse.cz>
3885
92a285c1 3886 PR sanitizer/85556
19916065
ML
3887 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3888 TREE_LIST values.
3889
79e7b1fe
JJ
38902018-05-10 Jakub Jelinek <jakub@redhat.com>
3891
3892 PR c++/85662
3893 * c-common.h (fold_offsetof_1): Removed.
3894 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3895 CTX argument defaulted to ERROR_MARK.
3896 * c-common.c (fold_offsetof_1): Renamed to ...
3897 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3898 argument, convert the pointer constant to TYPE and use size_binop
3899 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3900 a pointer type. Adjust recursive calls.
3901
86c12f76
EB
39022018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3903
3904 PR c++/85400
3905 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3906
ee336e84
NS
39072018-05-07 Nathan Sidwell <nathan@acm.org>
3908
3909 * c.opt (ffor-scope): Remove functionality, issue warning.
3910
6c072e21
NS
39112018-05-03 Nathan Sidwell <nathan@acm.org>
3912
3913 * c.opt (ffriend-injection): Remove functionality, issue warning.
3914
2cc7d3a7
DM
39152018-05-01 David Malcolm <dmalcolm@redhat.com>
3916
3917 PR c/84258
3918 * c-format.c (struct format_check_results): Add field
3919 "number_non_char".
3920 (check_format_info): Initialize it, and warn if encountered.
3921 (check_format_arg): Distinguish between wide char and
3922 everything else when detecting arrays of non-char.
3923
7761dfbe
DM
39242018-04-30 David Malcolm <dmalcolm@redhat.com>
3925
3926 * c-format.c (get_corrected_substring): Update for
3927 location_get_source_line returning a char_span. Use a char_span
3928 when handling the prefix of the correction.
3929 * c-indentation.c (get_visual_column): Update for
3930 location_get_source_line returning a char_span.
3931 (get_first_nws_vis_column): Likewise.
3932
62e98ef1
DM
39332018-03-29 David Malcolm <dmalcolm@redhat.com>
3934
3935 PR c++/84269
3936 * known-headers.cc (get_stdlib_header_for_name): Add various names
3937 from <assert.h>, <string.h>, and <memory.h>; add more names from
3938 <stdio.h>.
3939
a7dea617
JJ
39402018-03-27 Jakub Jelinek <jakub@redhat.com>
3941
3942 PR c++/85061
3943 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3944 get_base_address of the second operand is a VAR_P, rather than the
3945 operand itself, and use gcc_checking_assert instead of gcc_assert.
3946
889a3a30
MP
39472018-03-23 Marek Polacek <polacek@redhat.com>
3948
3949 PR c++/85045
3950 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3951 <case RDIV_EXPR>: Tweak condition.
3952
452154b9
EB
39532018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3954
3955 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3956
63ecb626
JJ
39572018-03-16 Jakub Jelinek <jakub@redhat.com>
3958
ce811fc4
JJ
3959 PR c/84909
3960 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3961 diagnostics.
3962
63ecb626
JJ
3963 PR c/84910
3964 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3965 diagnostics.
3966
a1295eec
RB
39672018-03-16 Richard Biener <rguenther@suse.de>
3968
3969 PR c/84873
3970 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3971 unshare the possibly folded expression.
3972
919674fb
RB
39732018-03-15 Richard Biener <rguenther@suse.de>
3974
3975 PR c/84873
3976 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3977
f99309b2
MS
39782018-03-13 Martin Sebor <msebor@redhat.com>
3979
3980 PR tree-optimization/84725
3981 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3982 with all three narrow character types, including their qualified forms.
3983
e9b9fa4c
MS
39842018-03-12 Martin Sebor <msebor@redhat.com>
3985
3986 PR tree-optimization/83456
ab20d992 3987 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3988 Restore checking of bounded built-in functions.
3989 (check_function_arguments): Also return the result
3990 of warn_for_restrict.
ab20d992
JJ
3991 * c-common.c (check_function_restrict): Return bool.
3992 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3993
0805d020
MP
39942018-03-02 Marek Polacek <polacek@redhat.com>
3995
3996 PR c++/84171
3997 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3998 is erroneous.
3999
ed2a2f08
TS
40002018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4001
4002 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4003 function".
4004
90abdde0
MP
40052018-03-01 Marek Polacek <polacek@redhat.com>
4006
4007 PR c++/84639
4008 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4009 alignment in computation.
4010
c6db43fa
EB
40112018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4012
4013 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4014 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4015
9e25c7ed
EB
40162018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4017
4018 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4019 (is_char_array): Take a type instead of a declaration.
4020 (dump_ada_array_type): Likewise.
4021 (is_simple_enum): Minor tweak.
4022 (dump_ada_enum_type): New function extracted from...
4023 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4024 <INTEGER_TYPE>: Remove unreachable code.
4025 <RECORD_TYPE>: Likewise. Minor tweaks.
4026 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4027 <ENUMERAL_TYPE>: New case.
4028 <RECORD_TYPE>: Factor out common code.
4029 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4030 Minor tweaks. Deal with enumeral types.
4031 (dump_ada_structure): Minor tweaks.
4032
09de3550
EB
40332018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4034
4035 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4036 address for incomplete structures.
4037 (dump_forward_type): Do not bail out for incomplete structures.
4038 (dump_ada_declaration): Do not special-case incomplete structures
4039 for subtypes. Dump them as null records for types.
4040
095d8d4b
EB
40412018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4042
4043 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4044 (is_char_array): Fix formatting.
4045 (dump_template_types): Likewise.
4046 (dump_generic_ada_node): Rename into...
4047 (dump_ada_node): ...this.
4048 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4049 incomplete structures and not for empty structures. Do not use it
4050 when forward declarations are needed.
4051 (dump_forward_type): New function.
4052 (dump_nested_types): Remove FORWARD parameter. Do not consider
4053 TREE_VISITED and do not generate a forward declaration. Only dump
4054 original nested types for nested declaration.
4055 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4056 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4057 <RECORD_TYPE>: Do not consider TREE_VISITED.
4058 (dump_ada_declaration): Use booleans and fix formatting throughout.
4059 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4060 Call dump_forward_type instead of dump_nested_types for a typedef.
4061 Remove superfluous check and adjust call to dump_nested_types.
4062 <POINTER_TYPE>: Call dump_forward_type and fall through.
4063 (dump_ada_struct_decl): Rename into...
4064 (dump_ada_structure): ...this. Do not special-case empty structures.
4065
d4cfd486
MS
40662018-02-27 Martin Sebor <msebor@redhat.com>
4067
4068 PR c++/83871
4069 * c.opt (-Wmissing-attributes): New option.
4070
b22dbd03
ML
40712018-02-21 Martin Liska <mliska@suse.cz>
4072
4073 * c.opt (Wcatch-value=): Add IntegerRange.
4074
883dfe2a
JM
40752018-02-15 Jason Merrill <jason@redhat.com>
4076
4077 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4078
0444aa9c
NS
40792018-02-09 Nathan Sidwell <nathan@acm.org>
4080
4081 PR c/84293
4082 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4083 arg.
4084 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4085 arg. Adjust.
4086
cea71f0a
MS
40872018-02-09 Martin Sebor <msebor@redhat.com>
4088
4089 PR lto/84212
4090 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4091 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4092 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4093 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4094 (-Wuninitialized): Same.
4095
8c8b7be5
EB
40962018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4097
4098 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4099 keyword for components.
4100
7c30b12a
PC
41012018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4102
4103 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4104
eece7fe5
JK
41052018-02-02 Julia Koval <julia.koval@intel.com>
4106
4107 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4108
7d07a93a
MP
41092018-01-29 Marek Polacek <polacek@redhat.com>
4110
4111 PR c/83966
4112 * c-format.c (check_function_format): Check current_function_decl.
4113
53723269
JJ
41142018-01-27 Jakub Jelinek <jakub@redhat.com>
4115
4116 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4117 argument.
4118 (LAZY_HEX_FP_VALUES_CNT): Define.
4119 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4120 values rather than just 12.
4121 (builtin_define_with_hex_fp_value): Likewise.
4122
7365279f
BK
41232018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4124
92a285c1
ML
4125 PR other/70268
4126 * c.opt (-fmacro-prefix-map): New option.
4127 * c-opts.c (c_common_handle_option): Handle it.
4128 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4129 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4130
bb9869d5
DM
41312018-01-17 David Malcolm <dmalcolm@redhat.com>
4132
4133 PR c++/83814
4134 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4135
68dc87c3
EB
41362018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4137
4138 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4139 Skip 'f' and 'F' characters if it is true.
4140 (store_ada_macro): Minor tweak.
4141 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4142 <CPP_WSTRING>: Likewise.
4143 <CPP_STRING>: Output '&' in the buffer if not the first string.
4144 <CPP_NUMBER>: Adjust calls to dump_number.
4145
9a004410
DM
41462018-01-10 David Malcolm <dmalcolm@redhat.com>
4147
4148 PR c++/43486
4149 * c-common.c: Include "selftest.h".
4150 (get_atomic_generic_size): Perform the test for integral type
4151 before the range test for any integer constant, fixing indentation
4152 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4153 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4154 (selftest::test_fold_for_warn): New function.
4155 (selftest::c_common_c_tests): New function.
4156 (selftest::c_family_tests): Call it, and
4157 selftest::c_pretty_print_c_tests.
4158 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4159 * c-format.c (check_format_arg): Convert VAR_P check to a
4160 fold_for_warn.
4161 * c-pretty-print.c: Include "selftest.h".
4162 (pp_c_cast_expression): Don't print casts for location wrappers.
4163 (selftest::assert_c_pretty_printer_output): New function.
4164 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4165 (selftest::test_location_wrappers): New function.
4166 (selftest::c_pretty_print_c_tests): New function.
4167 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4168
5c0caeb3
RS
41692018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4170 Alan Hayward <alan.hayward@arm.com>
4171 David Sherwood <david.sherwood@arm.com>
4172
4173 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4174
73a699ae
RS
41752018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4176 Alan Hayward <alan.hayward@arm.com>
4177 David Sherwood <david.sherwood@arm.com>
4178
4179 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4180 as polynomial.
4181
928686b1
RS
41822018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4183 Alan Hayward <alan.hayward@arm.com>
4184 David Sherwood <david.sherwood@arm.com>
4185
4186 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4187 (convert_vector_to_array_for_subscript): Handle polynomial
4188 TYPE_VECTOR_SUBPARTS.
4189 (c_common_type_for_mode): Check valid_vector_subparts_p.
4190 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4191 VECTOR_CST_NELTS.
4192
85ec4feb
JJ
41932018-01-03 Jakub Jelinek <jakub@redhat.com>
4194
4195 Update copyright years.
4196
170a8bd6 41972017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4198 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4199
4200 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4201 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4202
ab20d992 42032017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4204
4205 PR debug/83527
4206 PR debug/83419
4207 * c-semantics.c (only_debug_stmts_after_p): New.
4208 (pop_stmt_list): Clear side effects in debug-only stmt list.
4209 Check for single nondebug stmt followed by debug stmts only.
4210
c12d20d4
AO
42112017-12-21 Alexandre Oliva <aoliva@redhat.com>
4212
4213 PR debug/83419
4214 * c-semantics.c (pop_stmt_list): Propagate side effects from
4215 single nondebug stmt to container list.
4216
01512446
JJ
42172017-12-19 Jakub Jelinek <jakub@redhat.com>
4218
4219 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4220 conditions with typical order conditions.
4221
82cfbd01
MP
42222017-12-18 Marek Polacek <polacek@redhat.com>
4223
4224 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4225 not in effect.
4226
99da11ec
MS
42272017-12-17 Martin Sebor <msebor@redhat.com>
4228
4229 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4230 an error for attribute warn_if_not_aligned.
4231
cc8bea0a
MS
42322017-12-16 Martin Sebor <msebor@redhat.com>
4233
4234 PR tree-optimization/78918
4235 * c-common.c (check_function_restrict): Avoid checking built-ins.
4236 * c.opt (-Wrestrict): Include in -Wall.
4237
4849deb1
JJ
42382017-12-15 Jakub Jelinek <jakub@redhat.com>
4239
4240 * c-attribs.c (c_common_attribute_table,
4241 c_common_format_attribute_table): Swap affects_type_identity
4242 and handler fields, adjust comments.
4243
c65e18d3
BE
42442017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4245
4246 * c.opt (Wcast-function-type): New warning option.
4247 * c-lex.c (get_fileinfo): Avoid warning.
4248 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4249
2004617a
QZ
42502017-12-14 Qing Zhao <qing.zhao@oracle.com>
4251
7365279f 4252 PR middle_end/79538
2004617a
QZ
4253 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4254 Adjust the size of buf1 and buf2, add a new buf to avoid
4255 format-overflow warning.
4256
ab20d992 42572017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4258
4259 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4260 subsequent statement list.
4261
5d9ae53d
MS
42622017-12-07 Martin Sebor <msebor@redhat.com>
4263
4264 PR c/81544
4265 PR c/81566
4266 * c-attribs.c (attr_aligned_exclusions): New array.
4267 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4268 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4269 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4270 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4271 (attr_warn_unused_result_exclusions): Same.
4272 (handle_hot_attribute, handle_cold_attribute): Simplify.
4273 (handle_const_attribute): Warn on function returning void.
4274 (handle_pure_attribute): Same.
4275 (handle_aligned_attribute): Diagnose conflicting attribute
4276 specifications.
4277 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4278
c79144f8
DM
42792017-12-06 David Malcolm <dmalcolm@redhat.com>
4280
4281 PR c/83236
4282 * c-common.c (selftest::c_family_tests): Call
4283 selftest::c_spellcheck_cc_tests.
4284 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4285 * c-spellcheck.cc: Include "selftest.h".
4286 (name_reserved_for_implementation_p): New function.
4287 (should_suggest_as_macro_p): New function.
4288 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4289 should_suggest_as_macro_p and call it.
4290 (selftest::test_name_reserved_for_implementation_p): New function.
4291 (selftest::c_spellcheck_cc_tests): New function.
4292 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4293
613bc14f
DM
42942017-12-06 David Malcolm <dmalcolm@redhat.com>
4295
4296 * c-spellcheck.cc: New file, taken from macro-handling code in
4297 spellcheck-tree.c.
4298 * c-spellcheck.h: New file, taken from macro-handling code in
4299 spellcheck-tree.h.
4300
e76c7157
JJ
43012017-12-01 Jakub Jelinek <jakub@redhat.com>
4302
4303 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4304 attribute.
4305 (handle_simd_attribute): Don't check for "cilk simd function"
4306 attribute. Reindent, formatting changes.
4307
b0da4034
JK
43082017-11-30 Julia Koval <julia.koval@intel.com>
4309
4310 * c-common.h (inv_list): Remove.
4311
058f0b9e
JJ
43122017-11-28 Jakub Jelinek <jakub@redhat.com>
4313
4314 PR sanitizer/81275
4315 * c-common.c (c_switch_covers_all_cases_p_1,
4316 c_switch_covers_all_cases_p): New functions.
4317 * c-common.h (c_switch_covers_all_cases_p): Declare.
4318
5e9d6aa4 43192017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4320 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4321
4322 * array-notation-common.c: Delete.
4323 * c-cilkplus.c: Ditto.
4324 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4325 * c-common.def (ARRAY_NOTATION_REF): Remove.
4326 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4327 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4328 c_validate_cilk_plus_loop, cilkplus_an_parts,
4329 cilk_ignorable_spawn_rhs_op,
4330 cilk_recognize_spawn): Remove.
4331 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4332 * c-omp.c: Remove CILK_SIMD check.
4333 * c-pragma.c: Ditto.
4334 * c-pragma.h: Remove CILK related pragmas.
4335 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4336 ARRAY_NOTATION_REF condition.
4337 (c_pretty_printer::expression): Ditto.
4338 * c.opt (fcilkplus): Remove.
4339 * cilk.c: Delete.
4340
1af4ebf5
MG
43412017-11-21 Marc Glisse <marc.glisse@inria.fr>
4342
4343 * c-pretty-print.c (pp_c_additive_expression,
4344 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4345
d44ed508
JJ
43462017-11-21 Jakub Jelinek <jakub@redhat.com>
4347
7d2f0f9b
JJ
4348 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4349
d44ed508
JJ
4350 PR c++/83059
4351 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4352 instead of tree_to_uhwi, formatting fix.
4353
26edace6
DM
43542017-11-20 David Malcolm <dmalcolm@redhat.com>
4355
4356 PR c/81404
4357 * known-headers.cc: New file, based on material from c/c-decl.c.
4358 (suggest_missing_header): Copied as-is.
4359 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4360 heavily edited to add C++ support. Add some knowledge about
4361 <limits.h>, <stdint.h>, and <wchar.h>.
4362 * known-headers.h: Likewise.
4363
6c7a259b
DM
43642017-11-20 David Malcolm <dmalcolm@redhat.com>
4365
4366 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4367 (lookup_name_fuzzy): Likewise. Convert return type from
4368 const char * to name_hint. Add location_t param.
4369 * name-hint.h: New header.
4370
f9c59f7e
JJ
43712017-11-19 Jakub Jelinek <jakub@redhat.com>
4372
4373 PR c/66618
4374 PR c/69960
4375 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4376
1e39313a
JM
43772017-11-16 Joseph Myers <joseph@codesourcery.com>
4378
4379 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4380 expected publication date of C17.
4381 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4382
3ca0dc60
JM
43832017-11-15 Joseph Myers <joseph@codesourcery.com>
4384
4385 PR c/81156
4386 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4387 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4388
025d57f0
MS
43892017-11-10 Martin Sebor <msebor@redhat.com>
4390
4391 PR c/81117
4392 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4393 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4394 * c.opt (-Wstringop-truncation): New option.
4395
1b6fa695
ML
43962017-11-06 Martin Liska <mliska@suse.cz>
4397
4398 PR middle-end/82404
4399 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4400 FE.
4401 * c.opt: Set default value of warn_return_type.
4402
64a5912c
DM
44032017-10-31 David Malcolm <dmalcolm@redhat.com>
4404
4405 * c-common.c (binary_op_error): Update for renaming of
4406 error_at_rich_loc.
4407 (c_parse_error): Likewise.
4408 * c-warn.c (warn_logical_not_parentheses): Likewise for
4409 renaming of inform_at_rich_loc.
4410 (warn_for_restrict): Likewise for renaming of
4411 warning_at_rich_loc_n.
4412
c76dc9c3
JM
44132017-10-30 Joseph Myers <joseph@codesourcery.com>
4414
4415 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4416 * c-opts.c (set_std_c17): New function.
4417 (c_common_init_options): Use gnu17 as default C version.
4418 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4419
ee5fd23a
MM
44202017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4421
4422 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4423 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4424 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4425 __FP_FAST_FMA<N>X.
4426
d1047465
MP
44272017-10-23 Marek Polacek <polacek@redhat.com>
4428
4429 PR c/82681
4430 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4431
9e878cf1
EB
44322017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4433
4434 * c-common.c (check_builtin_function_arguments): Also check arguments
4435 of __builtin_alloca_with_align_and_max.
4436
89b6abbb
DM
44372017-10-17 David Malcolm <dmalcolm@redhat.com>
4438
4439 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4440 rather than NULL to format_warning_va.
4441 (check_format_types): Likewise when calling format_type_warning.
4442 Remove code to extract source_ranges and source_range * in favor
4443 of just a location_t.
4444 (format_type_warning): Convert source_range * param to a
4445 location_t.
4446
39382c09
JJ
44472017-10-13 Jakub Jelinek <jakub@redhat.com>
4448
4449 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4450 [LR]SHIFT_EXPR.
4451
62e1c678
DM
44522017-10-12 David Malcolm <dmalcolm@redhat.com>
4453
4454 * c-common.c (enum missing_token_insertion_kind): New enum.
4455 (get_missing_token_insertion_kind): New function.
4456 (maybe_suggest_missing_token_insertion): New function.
4457 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4458
b90c9338
NS
44592017-10-11 Nathan Sidwell <nathan@acm.org>
4460
4461 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4462 (c_common_handle_option): Update incpath_kind names.
4463
3a266bcd
ML
44642017-10-11 Martin Liska <mliska@suse.cz>
4465
4466 PR sanitizer/82490
4467 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4468 Wattributes warning.
4469
8e6cdc90
RS
44702017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4471
4472 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4473 operating on trees as wide_ints.
4474 * c-common.c (pointer_int_sum): Likewise.
4475 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4476 * c-warn.c (match_case_to_enum_1): Likewise.
4477 (c_do_switch_warnings): Likewise.
4478 (maybe_warn_shift_overflow): Likewise.
4479
802b38c9
JJ
44802017-10-10 Jakub Jelinek <jakub@redhat.com>
4481
4482 PR c/82437
4483 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4484 instead of wide_int::from.
4485
4e34b338
JJ
44862017-10-06 Jakub Jelinek <jakub@redhat.com>
4487
4488 PR c/82437
4489 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4490 using to_widest use wide_int with the larger of the two precisions.
4491
4bc4b2b4
BE
44922017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4493
4494 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4495 functions.
4496
a1488398
RS
44972017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4498
4499 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4500 when combining the original unconverted comparison operands.
4501
01c9fb68
JJ
45022017-09-29 Jakub Jelinek <jakub@redhat.com>
4503
4504 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4505 attribute.
4506
6e3e8419
EB
45072017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4508
4509 * c-ada-spec.c (to_ada_name): Add index parameter.
4510 (pp_ada_tree_identifier): Likewise.
4511 (dump_ada_macros): Adjust call to to_ada_name.
4512 (struct overloaded_name_hash): New type.
4513 (struct overloaded_name_hasher): Likewise.
4514 (overloaded_names): New hash table.
4515 (compute_overloading_index): New function.
4516 (dump_ada_decl_name): Call it and pass the result to
4517 pp_ada_tree_identifier.
4518 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4519 (dump_ada_function_declaration): Likewise.
4520 (dump_generic_ada_node): Likewise.
4521 (print_constructor): Likewise.
4522 (print_destructor): Likewise.
4523 (dump_ada_specs): Delete overloaded_names table.
4524
79310774
EB
45252017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4526
4527 * c-ada-spec.c (max_ada_macros): Move around.
4528 (store_ada_macro_index): Likewise.
4529 (source_file): Rename into...
4530 (macro_source_file): ...this.
4531 (count_ada_macro): Move around.
4532 (store_ada_macro): Likewise.
4533 (compare_macro): Likewise.
4534 (print_ada_macros): Merge in...
4535 (dump_ada_macros): ...this.
4536 (source_file_base): Rename into...
4537 (current_source_file): ...this.
4538 (print_comment): Move around.
4539 (dump_ada_nodes): Call dump_ada_declaration directly.
4540 (struct with): Change type of limited field to bool.
4541 (append_withs): Change type of limited_access parameter to bool.
4542 (pp_ada_tree_identifie): Likewise.
4543 (dump_ada_decl_nam): Likewise.
4544 (dump_generic_ada_node): Likewise. Do not print the return type.
4545 (to_ada_name): Change type of space_found parameter to bool.
4546 (dump_ada_function_declaration): Return void and change type of
4547 parameters to bool. Also print the return type for a function.
4548 (print_ada_methods): Rename into...
4549 (dump_ada_methods): ...this.
4550 (print_ada_declaration): Rename into ...
4551 (dump_ada_declaration): ...this. Do not print the return type.
4552 (print_ada_struct_decl): Rename into...
4553 (dump_ada_struct_decl): ...this.
4554
7d386d45
JJ
45552017-09-29 Jakub Jelinek <jakub@redhat.com>
4556
4557 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4558 rather than DECL_INITIAL.
4559 (common_handle_aligned_attribute): Likewise.
4560
ab20d992 45612017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4562
4563 * c.opt (gen-decls): Add RejectNegative.
4564
026a79f7
AS
45652017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4566 Jakub Jelinek <jakub@redhat.com>
4567
4568 Add support for -std=c++2a.
4569 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4570 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4571 * c-opts.c (set_std_cxx2a): New.
4572 (c_common_handle_option): Set options when -std=c++2a is enabled.
4573 (c_common_post_options): Adjust comments.
4574 (set_std_cxx14, set_std_cxx17): Likewise.
4575
4a8ca690
EB
45762017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4579 message for non-uniform endianness and issue a warning in C++.
4580
7b936140
JJ
45812017-09-15 Jakub Jelinek <jakub@redhat.com>
4582
4583 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4584 (Wc++17-compat): Change from undocumented alias to option.
4585 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4586 change C++1z to C++17 in description.
4587 (std=c++1z, std=gnu++1z): Change from option to undocumented
4588 deprecated alias.
4589 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4590 Adjust description.
4591 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4592 * c-opts.c (set_std_cxx1z): Rename to ...
4593 (set_std_cxx17): ... this.
4594 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4595 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4596 caller.
7b936140
JJ
4597 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4598 comments.
4599
12263f13
L
46002017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4601
4602 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4603 function alignment if warn_if_not_aligned_p is true.
4604
6836632e
NS
46052017-09-12 Nathan Sidwell <nathan@acm.org>
4606
4607 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4608 resort_sorted_fields): Move to c/c-decl.c.
4609 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4610 (struct sorted_fields_type): Move to c/c-lang.h.
4611
019bf9ad
JW
46122017-09-09 Jonathan Wakely <jwakely@redhat.com>
4613
4614 PR c++/81852
4615 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4616
bc7fe952
MP
46172017-09-04 Marek Polacek <polacek@redhat.com>
4618
4619 PR c/81783
4620 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4621 (warn_tautological_cmp): Call it.
4622
ab20d992 46232017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4624
4625 * c-opts.c (c_common_finish): Write dependency information even if
4626 there are errors.
4627
d2e05fcb
JJ
46282017-09-01 Jakub Jelinek <jakub@redhat.com>
4629
4630 PR c/81887
4631 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4632 (omp_pragmas_simd): ... here.
4633 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4634 create new clauses list containing just simd clause.
4635
18e2a8b8
RS
46362017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4637 Alan Hayward <alan.hayward@arm.com>
4638 David Sherwood <david.sherwood@arm.com>
4639
4640 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4641 into scalar_mode_supported_p call.
4642 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4643
16d22000
RS
46442017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4645 Alan Hayward <alan.hayward@arm.com>
4646 David Sherwood <david.sherwood@arm.com>
4647
4648 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4649 for the mode iterator.
4650
b397965c
RS
46512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4652 Alan Hayward <alan.hayward@arm.com>
4653 David Sherwood <david.sherwood@arm.com>
4654
4655 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4656 * c-common.c (c_build_vec_perm_expr): Likewise.
4657
357b7604
RS
46582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4659 Alan Hayward <alan.hayward@arm.com>
4660 David Sherwood <david.sherwood@arm.com>
4661
4662 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4663
e05c94ba
RS
46642017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4665 Alan Hayward <alan.hayward@arm.com>
4666 David Sherwood <david.sherwood@arm.com>
4667
4668 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4669 before calling targetm.addr_space.valid_pointer_mode.
4670
5c20c4af
RS
46712017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4672 Alan Hayward <alan.hayward@arm.com>
4673 David Sherwood <david.sherwood@arm.com>
4674
4675 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4676
c94843d2 46772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4678 Alan Hayward <alan.hayward@arm.com>
4679 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4680
4681 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4682 iterators.
4683 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4684
4e10a5a7
RS
46852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4686 Alan Hayward <alan.hayward@arm.com>
4687 David Sherwood <david.sherwood@arm.com>
4688
4689 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4690 case statements.
4691
130fcab0
ML
46922017-08-29 Martin Liska <mliska@suse.cz>
4693
4694 PR other/39851
4695 * c-common.c (parse_optimize_options): Add argument to function
4696 call.
4697 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4698
14e18d71
DM
46992017-08-24 David Malcolm <dmalcolm@redhat.com>
4700
4701 * c-lex.c (interpret_float): Use token location
4702 when building an EXCESS_PRECISION_EXPR.
4703
2f687306
DM
47042017-08-21 David Malcolm <dmalcolm@redhat.com>
4705
4706 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4707 it to check_function_format.
4708 * c-common.h (check_function_arguments): Add vec<location_t> *
4709 param.
4710 (check_function_format): Likewise.
4711 * c-format.c (struct format_check_context): Add field "arglocs".
4712 (check_function_format): Add param "arglocs"; pass it to
4713 check_format_info.
ab20d992 4714 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4715 new field of format_ctx.
4716 (check_format_arg): Pass format_ctx->arglocs to new param of
4717 check_format_info_main.
4718 (class argument_parser): New field "arglocs".
4719 (argument_parser::argument_parser): Add "arglocs_" param and use
4720 it to initialize new field.
4721 (argument_parser::check_argument_type): Pass new arglocs field to
4722 check_format_types.
4723 (check_format_info_main): Add param "arglocs", and use it when
4724 constructing arg_parser.
4725 (check_format_types): Add param "arglocs"; use it if non-NULL when
4726 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4727
00aa1fa2
L
47282017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4729
4730 PR c/53037
4731 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4732 (c_common_attribute_table): Add warn_if_not_aligned.
4733 (handle_aligned_attribute): Renamed to ...
4734 (common_handle_aligned_attribute): Remove argument, name, and add
4735 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4736 (handle_aligned_attribute): New.
4737 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4738
27be025d
MS
47392017-08-14 Martin Sebor <msebor@redhat.com>
4740
4741 PR c/81117
4742 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4743 (handle_nonstring_attribute): New function.
4744
da67acb9
MS
47452017-08-14 Martin Sebor <msebor@redhat.com>
4746
4747 PR c/81117
4748 * c-format.h (T89_G): New macro.
4749 * c-format.c (local_gcall_ptr_node): New variable.
4750 (init_dynamic_diag_info): Initialize it.
4751
a8b522b4
ML
47522017-08-11 Martin Liska <mliska@suse.cz>
4753
4754 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4755 TARGET_SUPPORTS_ALIASES.
4756
32129a17
DM
47572017-08-10 David Malcolm <dmalcolm@redhat.com>
4758
4759 * c-common.c (c_parse_error): Add rich_location * param, using it
4760 rather implicitly using input_location.
4761 * c-common.h (c_parse_error): Add rich_location * param.
4762
30af3a2b
MP
47632017-08-09 Marek Polacek <polacek@redhat.com>
4764
4765 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4766 (c_common_truthvalue_conversion): Likewise.
4767 * c-omp.c (c_finish_omp_atomic): Likewise.
4768 * c-common.h (build_binary_op): Update declaration.
4769
314e6352
ML
47702017-08-08 Martin Liska <mliska@suse.cz>
4771
4772 * c-ada-spec.c: Include header files.
4773 * c-ubsan.c: Likewise.
4774 * c-warn.c: Likewise.
4775
56b5041c
JJ
47762017-08-07 Jakub Jelinek <jakub@redhat.com>
4777
4778 PR c/69389
4779 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4780
db440138
EB
47812017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4782
4783 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4784 (print_ada_methods): Likewise.
4785 (print_ada_declaration): Likewise.
4786
577eec56
ML
47872017-08-07 Martin Liska <mliska@suse.cz>
4788
4789 * array-notation-common.c: Add new includes.
4790 * c-format.c( handle_format_attribute): Canonicalize a format
4791 function name.
4792 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4793 attribute.
4794 * c-pretty-print.c: Add new include.
4795
b854df3c
EB
47962017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4797
4798 * c-ada-spec.c (has_static_fields): Look only into variables.
4799 (print_constructor): Add TYPE parameter and use it for the name.
4800 (print_destructor): Likewise.
4801 (print_ada_declaration): Adjust to new constructor/destructor names.
4802 Adjust calls to print_constructor and print_destructor.
4803 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4804 Look only into variables in the final loop.
4805
9f2cb25e
EB
48062017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4807
4808 * c-ada-spec.c (has_static_fields): Look only into fields.
4809 (dump_generic_ada_node): Small tweak.
4810 (dump_nested_types): Look only into fields.
4811 (print_ada_declaration): Look only into methods. Small tweak.
4812 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4813
f4bcd9eb
EB
48142017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4815
4816 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4817 (dump_ada_function_declaration): Likewise.
4818 (dump_generic_ada_node): Likewise.
4819 (print_ada_declaration): Add support for const-qualified variables.
4820
f34ebeb2
ML
48212017-07-31 Martin Liska <mliska@suse.cz>
4822
4823 PR sanitize/81530
4824 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4825 Guard condition with flag_sanitize_p also with current_function_decl
4826 non-null equality.
4827 (ubsan_maybe_instrument_reference_or_call): Likewise.
4828
218e5d04
UB
48292017-07-30 Uros Bizjak <ubizjak@gmail.com>
4830
4831 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4832
942047f2
EB
48332017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4834
4835 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4836 for enumeral types.
4837 (print_ada_declaration): Add missing guard for record types.
4838
a40ff0ae
JJ
48392017-07-27 Jakub Jelinek <jakub@redhat.com>
4840
4841 PR c/45784
4842 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4843 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4844 new COMPOUND_EXPRs around the rhs of the comparison.
4845
06bd22f6
MP
48462017-07-27 Marek Polacek <polacek@redhat.com>
4847
4848 PR c/81417
4849 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4850 the types.
4851
036ea399
JJ
48522017-07-27 Jakub Jelinek <jakub@redhat.com>
4853
4854 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4855 (handle_noipa_attribute): New function.
4856
417ca011
TD
48572017-07-07 Torsten Duwe <duwe@suse.de>
4858
4859 * c-attribs.c (c_common_attribute_table): Add entry for
4860 "patchable_function_entry".
4861
5aaa8fb4
NS
48622017-07-20 Nathan Sidwell <nathan@acm.org>
4863
4864 Remove TYPE_METHODS.
4865 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4866 dump_ada_template, print_ada_methods,
4867 print_ada_declaration): Member fns are on TYPE_FIELDS.
4868
ff22eb12
NS
48692017-07-18 Nathan Sidwell <nathan@acm.org>
4870
4871 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4872
eea77d1f
DM
48732017-07-14 David Malcolm <dmalcolm@redhat.com>
4874
4875 * c-common.c (try_to_locate_new_include_insertion_point): New
4876 function.
4877 (per_file_includes_t): New typedef.
4878 (added_includes_t): New typedef.
4879 (added_includes): New variable.
4880 (maybe_add_include_fixit): New function.
4881 * c-common.h (maybe_add_include_fixit): New decl.
4882
281ac396
MS
48832017-07-10 Martin Sebor <msebor@redhat.com>
4884
4885 PR other/81345
4886 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4887
b6f43128
DM
48882017-07-06 David Malcolm <dmalcolm@redhat.com>
4889
4890 * c-common.c (selftest::c_family_tests): New.
4891 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4892 (selftest::c_family_tests): New decl.
4893
efbf55b0
MP
48942017-07-04 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/81231
4897 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4898 types.
4899
6c86bd88
MP
49002017-07-04 Marek Polacek <polacek@redhat.com>
4901
4902 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4903
17a7218b
ML
49042017-06-28 Martin Liska <mliska@suse.cz>
4905
4906 PR ipa/81128
4907 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4908 to a function declaration.
4909
63010089
ML
49102017-06-28 Martin Liska <mliska@suse.cz>
4911
4912 PR driver/79659
4913 * c.opt: Add IntegerRange to various options.
4914
3e2becc4
MP
49152017-06-26 Marek Polacek <polacek@redhat.com>
4916
4917 PR c/80116
4918 * c-common.h (warn_for_multistatement_macros): Declare.
4919 * c-warn.c: Include "c-family/c-indentation.h".
4920 (warn_for_multistatement_macros): New function.
4921 * c.opt (Wmultistatement-macros): New option.
4922 * c-indentation.c (guard_tinfo_to_string): No longer static.
4923 Change the parameter type to "enum rid". Handle RID_SWITCH.
4924 * c-indentation.h (guard_tinfo_to_string): Declare.
4925
2db9b7cd
MG
49262017-06-23 Marc Glisse <marc.glisse@inria.fr>
4927
4928 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4929
c3684b7b
MS
49302017-06-15 Martin Sebor <msebor@redhat.com>
4931
4932 PR c++/80560
4933 * c.opt (-Wclass-memaccess): New option.
4934
e72c4afd
BK
49352017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4936
4937 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4938
8a516588
MP
49392017-06-13 Marek Polacek <polacek@redhat.com>
4940
4941 PR objc/80949
4942 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4943 branches is null.
4944
45b2222a
ML
49452017-06-13 Martin Liska <mliska@suse.cz>
4946
4947 PR sanitize/78204
4948 * c-attribs.c (add_no_sanitize_value): New function.
4949 (handle_no_sanitize_attribute): Likewise.
4950 (handle_no_sanitize_address_attribute): Use the function.
4951 (handle_no_sanitize_thread_attribute): New function.
4952 (handle_no_address_safety_analysis_attribute): Use
4953 add_no_sanitize_value.
4954 (handle_no_sanitize_undefined_attribute): Likewise.
4955 * c-common.h: Declare new functions.
4956 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4957 (ubsan_instrument_shift): Likewise.
4958 (ubsan_instrument_bounds): Likewise.
4959 (ubsan_maybe_instrument_array_ref): Likewise.
4960 (ubsan_maybe_instrument_reference_or_call): Likewise.
4961
a01f151f
JM
49622017-06-11 Jason Merrill <jason@redhat.com>
4963
4964 * c-ada-spec.c, c-pragma.c: Use id_equal.
4965
3de4ac6d
MP
49662017-06-04 Marek Polacek <polacek@redhat.com>
4967
4968 PR c/80919
4969 * c-format.c (matching_type_p): Return false if any of the types
4970 requires structural equality.
4971
2474f48f
MS
49722017-06-02 Martin Sebor <msebor@redhat.com>
4973
4974 PR c/80892
4975 * c-warn.c (conversion_warning): Use -Wconversion for integer
4976 conversion and -Wfloat-conversion for floating one.
4977
40ffd95f
BE
49782017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4979
4980 * c.opt (Wsizeof-pointer-div): New warning option.
4981
3fa4634c
VR
49822017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4983
4984 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4985 (Wcatch-value=1): Enable by -Wall.
4986
f012c8ef
DM
49872017-05-30 David Malcolm <dmalcolm@redhat.com>
4988
4989 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4990 format_chars.
4991 * c.opt (fdiagnostics-show-template-tree): New option.
4992 (felide-type): New option.
4993
63dbcd13
VR
49942017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4995
4996 * c.opt (Wcatch-value=): New C++ warning flag.
4997
be136b5c
NS
49982017-05-24 Nathan Sidwell <nathan@acm.org>
4999
5000 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5001 const casts to avoid warning.
5002
3cd211af
MS
50032017-05-24 Martin Sebor <msebor@redhat.com>
5004
5005 PR c/80731
5006 * c-common.h (unsafe_conversion_p): Add a function argument.
5007 * c-common.c (unsafe_conversion_p): Same.
5008 Add type names and values to diagnostics.
5009 (scalar_to_vector): Adjust.
5010 * c-warn.c (constant_expression_error): Add a function argument.
5011 Add type names and values to diagnostics.
5012 (conversion_warning): Add a function argument.
5013 Add type names and values to diagnostics.
5014 (warnings_for_convert_and_check): Same.
5015
1ff7be5a
JM
50162017-05-19 Jason Merrill <jason@redhat.com>
5017
5018 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5019 enumerators.
5020
ff502317
BE
50212017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5022
5023 * c-format.c (locus): Move out of function scope,
5024 add GTY attribute.
5025
2a8a8d7b
NS
50262017-05-19 Nathan Sidwell <nathan@acm.org>
5027
5028 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5029 (c_common_parse_file): Remove class dump handling.
5030 (get_dump_info): Likewise.
5031
39aac208
RB
50322017-05-19 Richard Biener <rguenther@suse.de>
5033
5034 PR c++/80593
5035 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5036 to alias-set zero memory.
5037
6ecd2339
BE
50382017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5039
5040 * c-format.c (local_tree_type_node): Add GTY attribute.
5041
6574d78e
MP
50422017-05-18 Marek Polacek <polacek@redhat.com>
5043
5044 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5045 (c_common_fixed_point_type_for_size): Likewise.
5046 (c_common_type_for_mode): Likewise.
5047 (shorten_compare): Likewise.
5048 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5049 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5050
e3455240
MP
50512017-05-18 Marek Polacek <polacek@redhat.com>
5052
5053 * c-common.c (self_promoting_args_p): Change the return type to bool.
5054 Use false/true instead of 0/1.
5055 * c-common.h (self_promoting_args_p): Update.
5056
3fa8871b
MP
50572017-05-17 Marek Polacek <polacek@redhat.com>
5058
5059 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5060 * c-warn.c: Likewise.
5061
b42cc3ca
VV
50622017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5063
5064 Implement new C++ intrinsics __is_assignable and __is_constructible.
5065 * c-common.c (__is_assignable, __is_constructible): New.
5066 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5067
1a817418
ML
50682017-05-17 Martin Liska <mliska@suse.cz>
5069
5070 * c-common.h: Introduce dump_flags_t type and
5071 use it instead of int type.
5072 * c-gimplify.c (c_genericize): Likewise.
5073 * c-opts.c: Likewise.
5074
b2fa0a8b
MP
50752017-05-17 Marek Polacek <polacek@redhat.com>
5076
5077 * c-common.c (c_save_expr): Remove.
5078 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5079 * c-common.h (c_save_expr): Remove declaration.
5080
31c2d57d
VR
50812017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5082
5083 PR c/35441
5084 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5085 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5086 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5087 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5088 RDIV_EXPR.
5089 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5090
684f84de
MP
50912017-05-09 Marek Polacek <polacek@redhat.com>
5092
5093 PR c/80525
5094 * c-warn.c (unwrap_c_maybe_const): New.
5095 (warn_logical_operator): Call it.
5096
641da50a
NS
50972017-05-09 Nathan Sidwell <nathan@acm.org>
5098
5099 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5100 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5101
631238ac
MS
51022017-05-08 Martin Sebor <msebor@redhat.com>
5103
5104 PR translation/80280
5105 * c-format.h (struct format_flag_spec): Add new member.
5106 (T89_T): New macro.
5107 * c-format.c (local_tree_type_node): New global.
5108 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5109 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5110 (strfmon_flag_specs): Likewise.
5111 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5112 with distinct quoting properties.
5113 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5114 (flag_chars_t::validate): Add argument and handle bad quoting.
5115 (check_format_info_main): Handle quoting problems.
5116 (init_dynamic_diag_info): Simplify.
5117
49f0c04c
JM
51182017-05-08 Jason Merrill <jason@redhat.com>
5119
5120 * c-opts.c (c_common_post_options): Update defaults for
5121 flag_abi_version and flag_abi_compat_version.
5122
56d35585
DM
51232017-05-05 David Malcolm <dmalcolm@redhat.com>
5124
5125 * c-common.c (c_cpp_error): Replace report_diagnostic
5126 with diagnostic_report_diagnostic.
5127
0f2c4a8f
MS
51282017-05-04 Martin Sebor <msebor@redhat.com>
5129
5130 PR translation/80280
5131 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5132 (handle_weakref_attribute): Same.
5133
6fe63fb4
NS
51342017-05-03 Nathan Sidwell <nathan@acm.org>
5135
5136 Canonicalize canonical type hashing
5137 * c-common.c (complete_array_type): Use type_hash_canon.
5138
815d9cc6
XR
51392017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5140
92a285c1 5141 PR c++/80038
815d9cc6
XR
5142 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5143 prototype.
5144 (cilk_install_body_pedigree_operations): Likewise.
5145 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5146 detatched.
5147 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5148 (cilk_install_body_pedigree_operations): Likewise.
5149 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5150 unwrapping.
5151
f8a36447
JJ
51522017-04-27 Jakub Jelinek <jakub@redhat.com>
5153
5154 PR c++/80534
5155 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5156 flag on non-aggregate element types.
5157
7c145456
BE
51582017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5159
5160 * c-common.c (c_type_hasher, type_hash_table): Remove.
5161 (c_common_get_alias_set): Remove unreachable code.
5162 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5163
c3cbcd45
VR
51642017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5165
5166 * c.opt (Wextra-semi): New C++ warning flag.
5167
8a59d466
JJ
51682017-04-20 Jakub Jelinek <jakub@redhat.com>
5169
5170 PR middle-end/80423
5171 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5172
8487c9a5
JJ
51732017-04-18 Jakub Jelinek <jakub@redhat.com>
5174
5175 PR middle-end/79788
5176 PR middle-end/80375
5177 * c-common.c (c_common_type_for_mode): Don't handle
5178 widest_*_literal_type_node here.
5179 c_common_signed_or_unsigned_type): Likewise.
5180 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5181 to *intTI_type_node or *intDI_type_node depending on whether
5182 TImode is supported by the target or not.
5183
3ee0fb02
ML
51842017-04-10 Martin Liska <mliska@suse.cz>
5185
5186 PR sanitizer/80350
5187 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5188 doing an UBSAN check.
5189
5764ee3c
JW
51902017-04-03 Jonathan Wakely <jwakely@redhat.com>
5191
5192 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5193
6f3af356
JJ
51942017-03-31 Jakub Jelinek <jakub@redhat.com>
5195
5196 PR c++/79572
5197 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5198 tree *.
5199 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5200 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5201 REFERENCE_TYPE.
5202
f6a7a9d5
DM
52032017-03-31 David Malcolm <dmalcolm@redhat.com>
5204
5205 PR documentation/78732
5206 * c.opt (Wendif-labels): Fix description to refer to
5207 #else rather than #elif.
5208
af88f557
JJ
52092017-03-31 Jakub Jelinek <jakub@redhat.com>
5210
5211 PR libstdc++/80251
5212 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5213 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5214
a9e4a1a5
JJ
52152017-03-27 Jakub Jelinek <jakub@redhat.com>
5216
5217 PR middle-end/80162
5218 * c-common.c (c_common_mark_addressable_vec): Don't set
5219 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5220
3f01b620
MS
52212017-03-21 Martin Sebor <msebor@redhat.com>
5222
5223 PR c++/79548
5224 * c-common.c (set_underlying_type): Mark type used only when
5225 original del is declared unused.
5226
2f6f187a
DM
52272017-03-10 David Malcolm <dmalcolm@redhat.com>
5228
5229 PR translation/79848
5230 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5231 "%qs".
5232
a02fa805
DM
52332017-03-10 David Malcolm <dmalcolm@redhat.com>
5234
5235 PR c/79921
5236 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5237 from inform's message, so that xgettext can locate it.
5238
822a132c
MP
52392017-03-09 Marek Polacek <polacek@redhat.com>
5240
5241 PR c++/79962
5242 PR c++/79984
5243 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5244 conversion to the attribute list.
5245
bba81f1c
ML
52462017-03-09 Martin Liska <mliska@suse.cz>
5247
5248 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5249
108154ff
JM
52502017-03-03 Jason Merrill <jason@redhat.com>
5251
5252 * c.opt (Wnoexcept-type): New.
5253
eb0e7c34
RB
52542017-03-02 Richard Biener <rguenther@suse.de>
5255
5256 PR c/79756
5257 * c-common.c (c_common_mark_addressable_vec): Look through
5258 C_MAYBE_CONST_EXPR.
5259
9453ba0a
ML
52602017-02-28 Martin Liska <mliska@suse.cz>
5261
5262 * c.opt: Replace space with tabular for options of <number>
5263 type.
5264
6a825afe
ML
52652017-02-28 Martin Liska <mliska@suse.cz>
5266
5267 * c.opt: Fix --help=option -Q for options which are of
5268 an enum type.
5269
4227c9ad
JJ
52702017-02-24 Jakub Jelinek <jakub@redhat.com>
5271
5272 PR c++/79588
5273 * c-common.c (check_function_restrict): New function.
5274 (check_function_arguments): Add FNDECL argument. Call
5275 check_function_restrict if -Wrestrict.
5276 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5277 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5278 * c-common.h (check_function_arguments): Add FNDECL argument.
5279 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5280
59909673
EB
52812017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5282
5283 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5284 treatment of parameters with pointer-to-tagged type and tidy up.
5285 (print_ada_methods): Remove the special treatment of C++ static member
5286 functions.
5287
54dcd526
ML
52882017-02-22 Martin Liska <mliska@suse.cz>
5289
5290 * c.opt: Replace inequality signs with square brackets
5291 for -Wnornalized.
5292
00bc9de3
JJ
52932017-02-21 Jakub Jelinek <jakub@redhat.com>
5294
5295 PR c++/79641
5296 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5297 preserve quals.
5298
97fcf744
JM
52992017-02-17 Joseph Myers <joseph@codesourcery.com>
5300
5301 * c-cppbuiltin.c (builtin_define_float_constants): Define
5302 __DECIMAL_DIG__ to the value for long double.
5303
c7545f1c
MP
53042017-02-15 Marek Polacek <polacek@redhat.com>
5305
5306 PR c/79515
5307 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5308 conversion has occured.
5309
c2e84327
DM
53102017-01-24 David Malcolm <dmalcolm@redhat.com>
5311
5312 * c-common.c (c_common_reswords): Add "__RTL".
5313 * c-common.h (enum rid): Add RID_RTL.
5314
2ebd93e1
MP
53152017-01-20 Marek Polacek <polacek@redhat.com>
5316
5317 PR c/64279
5318 * c-common.h (do_warn_duplicated_branches_r): Declare.
5319 * c-gimplify.c (c_genericize): Walk the function tree calling
5320 do_warn_duplicated_branches_r.
5321 * c-warn.c (expr_from_macro_expansion_r): New.
5322 (do_warn_duplicated_branches): New.
5323 (do_warn_duplicated_branches_r): New.
5324 * c.opt (Wduplicated-branches): New option.
5325
0d80ab91
DM
53262017-01-17 David Malcolm <dmalcolm@redhat.com>
5327
5328 PR c++/71497
5329 * c-indentation.c (warn_for_misleading_indentation): Use the past
5330 subjunctive in the note.
5331
7f991c36
AH
53322017-01-17 Aldy Hernandez <aldyh@redhat.com>
5333
5334 PR c/79116
5335 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5336 start type to integer_type.
5337
1c70261c
JJ
53382017-01-16 Jakub Jelinek <jakub@redhat.com>
5339
5340 PR driver/49726
5341 * c.opt (gen-decls): Add Driver flag.
5342
1ddca3f3
PC
53432017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5344
5345 Revert:
5346 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5347
5348 PR c++/71737
5349 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5350
7d2f3f1d
PC
53512017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5352
5353 PR c++/71737
5354 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5355
bce6f760
MS
53562017-01-12 Martin Sebor <msebor@redhat.com>
5357
5358 (-Wformat-overflow): ...to this.
5359
bf5fbf46
MS
53602017-01-11 Martin Sebor <msebor@redhat.com>
5361
5362 PR c/78768
5363 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5364 Also enable for LTO.
5365
e363df3f
JM
53662017-01-10 Jason Merrill <jason@redhat.com>
5367
5368 Implement P0195R2, C++17 variadic using.
5369 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5370
bd2c6270
JJ
53712017-01-09 Jakub Jelinek <jakub@redhat.com>
5372
5373 PR translation/79019
5374 PR translation/79020
5375 * c.opt (Wnormalized=): Fix typo in description.
5376
efcc8d38
MS
53772017-01-08 Martin Sebor <msebor@redhat.com>
5378
5379 PR middle-end/77708
5380 * c.opt (-Wformat-truncation): New option.
5381
ab20d992 53822017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5383
5384 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5385 value to unsigned short to fit in 4 hex digits without
5386 warnings.
5387
4e89adf9
EB
53882017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5389
5390 * c.opt (fsso-struct): Add 'native' value.
5391
cd445b54
ML
53922017-01-05 Martin Liska <mliska@suse.cz>
5393
5394 PR pch/78970
5395 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5396 header.
5397
a9342885
MP
53982017-01-04 Marek Polacek <polacek@redhat.com>
5399
5400 PR c++/64767
5401 * c.opt (Wpointer-compare): New option.
5402
fc73e60c
JJ
54032017-01-04 Jakub Jelinek <jakub@redhat.com>
5404
5405 PR driver/78957
5406 * c.opt (fsso-struct=): Add RejectNegative.
5407
cbe34bb5
JJ
54082017-01-01 Jakub Jelinek <jakub@redhat.com>
5409
5410 Update copyright years.
5411
d4a6c0ea
ML
54122016-12-29 Martin Liska <mliska@suse.cz>
5413
5414 PR c/78933
5415 * c.opt (strong-eval-order): Add RejectNegative keyword.
5416
67a5ad7c
JM
54172016-12-22 Jason Merrill <jason@redhat.com>
5418
5419 Implement P0522R0, matching of template template arguments.
5420 * c-cppbuiltin.c (c_cpp_builtins): Define
5421 __cpp_template_template_args.
5422
0dba7960
JJ
54232016-12-21 Jakub Jelinek <jakub@redhat.com>
5424
5425 PR bootstrap/78817
5426 * c-common.c (struct nonnull_arg_ctx): New type.
5427 (check_function_nonnull): Return bool instead of void. Use
5428 nonnull_arg_ctx as context rather than just location_t.
5429 (check_nonnull_arg): Adjust for the new context type, set
5430 warned_p to true if a warning has been diagnosed.
5431 (check_function_arguments): Return bool instead of void.
5432 * c-common.h (check_function_arguments): Adjust prototype.
5433
31bfc9b9
JM
54342016-12-21 Jason Merrill <jason@redhat.com>
5435
5436 * c.opt (-fnew-ttp-matching): New flag.
5437 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5438
629b3d75
MJ
54392016-12-14 Martin Jambor <mjambor@suse.cz>
5440
5441 * c-omp.c: Include omp-general.h instead of omp-low.h.
5442 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5443 name.
5444
474da67e
MS
54452016-12-14 Martin Sebor <msebor@redhat.com>
5446
5447 PR c/17308
5448 * c-common.c (check_nonnull_arg): Disable when optimization
5449 is enabled.
5450
fe366b87
MP
54512016-12-12 Marek Polacek <polacek@redhat.com>
5452
5453 PR c++/78647
5454 * c-common.c (attribute_fallthrough_p): Return false for
5455 error_mark_node.
5456
8bd9f164
MS
54572016-12-08 Martin Sebor <msebor@redhat.com>
5458
5459 PR c/78284
5460 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5461
060162e0
MS
54622016-12-08 Martin Sebor <msebor@redhat.com>
5463
5464 PR c/78165
92a285c1
ML
5465 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5466 suffix.
060162e0 5467
ee92e7ba
MS
54682016-12-07 Martin Sebor <msebor@redhat.com>
5469
5470 PR c/53562
5471 PR middle-end/77784
5472 PR middle-end/78149
5473 PR middle-end/78138
5474 * c.opt (-Wstringop-overflow): New option.
5475
84b0769e
MO
54762016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5477
5478 * c-attribs.c (asan odr indicator): New attribute.
5479 (handle_asan_odr_indicator_attribute): New function.
5480
7fa6a965
PK
54812016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5482
5483 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5484 ptrdiff_type_node;
5485
56d8ffc1
JG
54862016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5487
5488 * c-common.c (excess_precision_mode_join): New.
5489 (c_ts18661_flt_eval_method): New.
5490 (c_c11_flt_eval_method): Likewise.
5491 (c_flt_eval_method): Likewise.
5492 * c-common.h (excess_precision_mode_join): New.
5493 (c_flt_eval_method): Likewise.
5494 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5495 (cpp_iec_559_value): Call it.
5496 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5497 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5498 __FLT_EVAL_METHOD_TS_18661_3__.
5499
04f0fcf7
JG
55002016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5501
5502 * c-opts.c (c_common_post_options): Add logic to handle the default
5503 case for -fpermitted-flt-eval-methods.
5504
fb2675cb
PB
55052016-11-23 Paolo Bonzini <bonzini@gnu.org>
5506
5507 * c.opt (Wexpansion-to-defined): New.
5508
ec1c5694
JJ
55092016-11-23 Jakub Jelinek <jakub@redhat.com>
5510
5511 PR target/78451
5512 * c-pragma.c (handle_pragma_target): Don't replace
5513 current_target_pragma, but chainon the new args to the current one.
5514
730c9e75
NS
55152016-11-22 Nathan Sidwell <nathan@acm.org>
5516
5517 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5518 indentation and formatting.
730c9e75 5519
89990732
MS
55202016-11-21 Martin Sebor <msebor@redhat.com>
5521
5522 * c.opt (-fprintf-return-value): Enable by default.
5523
48330c93
BE
55242016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5525
5526 PR c++/71973
5527 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5528 * c-common.c (c_common_nodes_and_builtins): Initialize
5529 const_tm_ptr_type_node.
5530
0d939c95
MP
55312016-11-16 Marek Polacek <polacek@redhat.com>
5532
5533 PR c/78285
5534 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5535
8e745a17
JJ
55362016-11-14 Jakub Jelinek <jakub@redhat.com>
5537
5538 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5539
1ee62b92 55402016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5541 Richard Biener <rguenther@suse.de>
5542
5543 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5544 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5545 * c.opt (fgimple): New option.
1ee62b92 5546
22b15758
UB
55472016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5548
5549 PR c/35503
5550 * c-common.h (warn_for_restrict): Declare.
5551 * c-warn.c: Include gcc-rich-location.h.
5552 (warn_for_restrict): New function.
5553 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5554 (gcc_cdiag_char_table): Likewise.
5555 (gcc_cxxdiag_char_table): Likewise.
5556 * c.opt (Wrestrict): New option.
5557
4be719cd
EB
55582016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5559
5560 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5561 for nested types only if the type is a record or union and dump SLOC.
5562
4a826ca6
JM
55632016-11-09 Jason Merrill <jason@redhat.com>
5564
5565 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5566
2e955d50
JJ
55672016-11-09 Jakub Jelinek <jakub@redhat.com>
5568
5569 * c-ubsan.c (ubsan_instrument_shift): Handle split
5570 -fsanitize=shift-base and -fsanitize=shift-exponent.
5571
51dc6603
JM
55722016-11-07 Jason Merrill <jason@redhat.com>
5573
5574 * c.opt (Wc++1z-compat): New.
5575 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5576
6dc4a604
ML
55772016-11-07 Martin Liska <mliska@suse.cz>
5578
5579 * c-warn.c (warn_for_unused_label): Save all labels used
5580 in goto or in &label.
5581
b302001e
JM
55822016-11-03 Jason Merrill <jason@redhat.com>
5583
5584 * c-cppbuiltin.c (c_cpp_builtins): Correct
5585 __cpp_inheriting_constructors.
5586
31f7f784
JM
55872016-11-01 Jason Merrill <jason@redhat.com>
5588
2bc78e3c
JM
5589 * c-cppbuiltin.c (c_cpp_builtins): Update
5590 __cpp_inheriting_constructors.
5591
31f7f784
JM
5592 * c.opt (-fnew-inheriting-ctors): New.
5593 * c-opts.c: Default to on for ABI 11+.
5594
dcb466ec
JJ
55952016-10-31 Jakub Jelinek <jakub@redhat.com>
5596
5597 PR c++/77948
5598 * c.opt (fext-numeric-literals): Add Var and Init.
5599 * c-opts.c (c_common_handle_option): Don't clear
5600 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5601 (c_common_post_options): Clear it here if not set
5602 explicitly.
5603
52e1b91e
AH
56042016-10-28 Aldy Hernandez <aldyh@redhat.com>
5605
5606 PR debug/77773
5607 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5608 if NULL.
5609
e16f1cc7
JJ
56102016-10-25 Jakub Jelinek <jakub@redhat.com>
5611
5612 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5613 * c-common.c (c_common_reswords): Add __builtin_launder.
5614
f8348061
BE
56152016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5616
5617 * c-common.c (c_common_truthvalue_conversion): Warn for
5618 multiplications in boolean context. Fix the quoting of '<<' and '<'
5619 in the shift warning.
5620
eff89e01
BE
56212016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5622
5623 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5624
24bc7bf4
JM
56252016-10-20 Jason Merrill <jason@redhat.com>
5626
5627 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5628
4c712374
BE
56292016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5630
5631 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5632 integer shift ops in boolean context.
5633
56342016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5635
5636 * c.opt (Walloca): New.
5637 (Walloca-larger-than=): New.
5638 (Wvla-larger-than=): New.
5639
8fa18c06
MP
56402016-10-17 Marek Polacek <polacek@redhat.com>
5641
5642 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5643 Return immediately when finding a match.
5644 (warn_tautological_cmp): Remove a boolean variable that is no longer
5645 needed.
5646
b12b1915
MP
56472016-10-17 Marek Polacek <polacek@redhat.com>
5648
5649 * c-attribs.c: New file.
5650 * c-common.c: Move attributes handling to c-attribs.c.
5651 (get_nonnull_operand): No longer static.
5652 * c-common.h: Move the declarations from c-attribs.c to its own section.
5653
2045acd9
JM
56542016-10-14 Jason Merrill <jason@redhat.com>
5655
5656 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5657 and __cpp_deduction_guides.
5658
14a2c9aa
JM
56592016-10-13 Jason Merrill <jason@redhat.com>
5660
5661 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5662
4d0cdd0c
TP
56632016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5664
5665 * c-cppbuiltin.c: Include memmodel.h.
5666 * c-opts.c: Likewise.
5667 * c-pragma.c: Likewise.
5668 * c-warn.c: Likewise.
5669
70f6d5e1
JJ
56702016-10-12 Jakub Jelinek <jakub@redhat.com>
5671
5672 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5673 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5674 * c-opts.c (sanitize_cpp_opts): Initialize
5675 cpp_opts->cpp_warn_implicit_fallthrough.
5676
78f61294
MP
56772016-10-11 Marek Polacek <polacek@redhat.com>
5678
5679 * c-common.c (warning_candidate_p): Change the return type to bool
5680 and return true/false instead of 1/0.
5681 (vector_mode_valid_p): Likewise.
5682
038b5cc0
MP
56832016-10-11 Marek Polacek <polacek@redhat.com>
5684
5685 * c-common.c (fold_for_warn): No longer static.
5686 (bool_promoted_to_int_p): Likewise.
5687 (c_common_get_narrower): Likewise.
5688 (constant_expression_warning): Move to c-warn.c.
5689 (constant_expression_error): Likewise.
5690 (overflow_warning): Likewise.
5691 (warn_logical_operator): Likewise.
5692 (find_array_ref_with_const_idx_r): Likewise.
5693 (warn_tautological_cmp): Likewise.
5694 (expr_has_boolean_operands_p): Likewise.
5695 (warn_logical_not_parentheses): Likewise.
5696 (warn_if_unused_value): Likewise.
5697 (strict_aliasing_warning): Likewise.
5698 (sizeof_pointer_memaccess_warning): Likewise.
5699 (check_main_parameter_types): Likewise.
5700 (conversion_warning): Likewise.
5701 (warnings_for_convert_and_check): Likewise.
5702 (match_case_to_enum_1): Likewise.
5703 (match_case_to_enum): Likewise.
5704 (c_do_switch_warnings): Likewise.
5705 (warn_for_omitted_condop): Likewise.
5706 (readonly_error): Likewise.
5707 (lvalue_error): Likewise.
5708 (invalid_indirection_error): Likewise.
5709 (warn_array_subscript_with_type_char): Likewise.
5710 (warn_about_parentheses): Likewise.
5711 (warn_for_unused_label): Likewise.
5712 (warn_for_div_by_zero): Likewise.
5713 (warn_for_memset): Likewise.
5714 (warn_for_sign_compare): Likewise.
5715 (do_warn_double_promotion): Likewise.
5716 (do_warn_unused_parameter): Likewise.
5717 (record_locally_defined_typedef): Likewise.
5718 (maybe_record_typedef_use): Likewise.
5719 (maybe_warn_unused_local_typedefs): Likewise.
5720 (maybe_warn_bool_compare): Likewise.
5721 (maybe_warn_shift_overflow): Likewise.
5722 (warn_duplicated_cond_add_or_warn): Likewise.
5723 (diagnose_mismatched_attributes): Likewise.
5724 * c-common.h: Move the declarations from c-warn.c to its own section.
5725 * c-warn.c: New file.
5726
627be19f
JM
57272016-10-08 Jason Merrill <jason@redhat.com>
5728
5729 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5730 into COND_EXPR in C++.
5731
7bad794a
JJ
57322016-10-08 Jakub Jelinek <jakub@redhat.com>
5733
5734 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5735 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5736 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5737
be845b04
JJ
57382016-10-07 Jakub Jelinek <jakub@redhat.com>
5739
5740 Implement LWG2296 helper intrinsic
5741 * c-common.h (enum rid): Add RID_ADDRESSOF.
5742 * c-common.c (c_common_reswords): Add __builtin_addressof.
5743
c09c4992
BE
57442016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5745
5746 PR c++/77700
5747 * c-common.c (c_common_truthvalue_conversion): Warn also for
5748 suspicious enum values in boolean context.
5749
342cfb3e
JJ
57502016-10-06 Jakub Jelinek <jakub@redhat.com>
5751
5752 Implement P0258R2 - helper for C++17
5753 std::has_unique_object_representations trait
5754 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5755 * c-common.c (c_common_reswords): Add
5756 __has_unique_object_representations.
5757
2e69f143
JJ
57582016-10-05 Jakub Jelinek <jakub@redhat.com>
5759
5760 PR sanitizer/66343
5761 * c-ubsan.c (ubsan_instrument_return): Don't call
5762 initialize_sanitizer_builtins here.
5763
700fff34
BE
57642016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5765
5766 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5767 conditional expression in boolean context when only one arm is
5768 non-boolean.
5769
9563bfcd
JJ
57702016-10-05 Jakub Jelinek <jakub@redhat.com>
5771
04a32443
JJ
5772 PR sanitizer/77823
5773 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5774 is not integral.
5775
9563bfcd
JJ
5776 * c-common.c (c_common_reswords): Update comment for C++11.
5777
f1644724
JM
57782016-10-04 Jason Merrill <jason@redhat.com>
5779
5780 * c-common.c (make_tree_vector_from_ctor): New.
5781 * c-common.h: Declare it.
5782
5a79befb
JJ
57832016-10-04 Jakub Jelinek <jakub@redhat.com>
5784
5785 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5786 __LIBGCC_JCR_SECTION_NAME__.
5787
1633d3b9
BE
57882016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5789
5790 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5791 left shift in boolean context.
5792
a2c6e7f2
JJ
57932016-09-29 Jakub Jelinek <jakub@redhat.com>
5794
5795 Implement P0001R1 - C++17 removal of register storage class specifier
5796 * c.opt (Wregister): New warning.
5797 * c-opts.c (c_common_post_options): Enable -Wregister by
5798 default for C++17.
5799
75304c87
JG
58002016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5801
5802 * c-opts.c (c_common_post_options): Remove special case for
5803 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5804 in C++.
5805
bbfac6da
JJ
58062016-09-27 Jakub Jelinek <jakub@redhat.com>
5807
6e39060a
JJ
5808 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5809 -std=c++1z.
5810
bbfac6da
JJ
5811 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5812
e73cf9a2
TP
58132016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5814
5815 * c-common.c: Include memmodel.h.
5816
c6147dc4
MP
58172016-09-26 Marek Polacek <polacek@redhat.com>
5818
5819 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5820
81fea426
MP
58212016-09-26 Marek Polacek <polacek@redhat.com>
5822
5823 PR c/7652
5824 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5825 (handle_fallthrough_attribute): New function.
5826 (attribute_fallthrough_p): New function.
5827 * c-common.h (attribute_fallthrough_p): Declare.
5828
9a2300e9
MP
58292016-09-24 Marek Polacek <polacek@redhat.com>
5830
5831 PR c/77490
5832 * c.opt (Wbool-operation): New.
5833
a09e9e35
BE
58342016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5835
5836 * c-common.c (c_common_truthvalue_conversion): Inhibit
5837 Wint-in-bool-context warning with from_macro_definition_at.
5838 Mention the expression will always evaluate to true.
5839
d43b4ccc
MS
58402016-09-21 Martin Sebor <msebor@redhat.com>
5841
5842 PR bootstrap/77676
5843 * c.opt (fprintf-return-value): Temporarily initialize to zero
5844 to unblock bootstrap failures.
5845
2e1c20b1
JJ
58462016-09-21 Jakub Jelinek <jakub@redhat.com>
5847
5848 PR c++/77651
5849 * c.opt (Waligned-new=): Add RejectNegative.
5850 (faligned-new=): Likewise. Spelling fix - change
5851 aligned_new_threshhold to aligned_new_threshold.
5852 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5853 to aligned_new_threshold.
5854
88d0c3f0
MS
58552016-09-20 Martin Sebor <msebor@redhat.com>
5856
5857 PR middle-end/49905
5858 * c.opt: Add -Wformat-length and -fprintf-return-value.
5859
144a96e4
BE
58602016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5861
5862 PR c++/77434
5863 * c.opt (Wint-in-bool-context): New warning.
5864 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5865 constants in boolean context.
5866
63012d9a
JM
58672016-09-19 Joseph Myers <joseph@codesourcery.com>
5868
5869 * c-common.c (max_align_t_align): Also consider alignment of
5870 float128_type_node.
5871
931388ce
JM
58722016-09-15 Jason Merrill <jason@redhat.com>
5873
5874 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5875 DECL_EXTERNAL.
5876
38711381
JM
58772016-09-14 Jason Merrill <jason@redhat.com>
5878
5879 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5880 limit FIELD_DECL, either.
5881
e51fbec3
MP
58822016-09-14 Marek Polacek <polacek@redhat.com>
5883
5884 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5885 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5886 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5887
254830ba
DM
58882016-09-13 David Malcolm <dmalcolm@redhat.com>
5889
5890 * c-common.c (warn_logical_not_parentheses): Replace
5891 rich_location::add_fixit_insert calls with add_fixit_insert_before
5892 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5893
42763690
JM
58942016-09-13 Jason Merrill <jason@redhat.com>
5895 Tom de Vries <tom@codesourcery.com>
5896
5897 PR c++/77427
5898 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5899
9453eee9
JM
59002016-09-13 Jason Merrill <jason@redhat.com>
5901
5902 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5903 limit types at all.
5904
e96809e3
JM
59052016-09-12 Jason Merrill <jason@redhat.com>
5906
5907 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5908 bit/byte confusion, allow large alignment for types.
5909
54dcdb88
BE
59102016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5911
5912 PR c++/77496
5913 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5914
d1463eb9
DM
59152016-09-12 David Malcolm <dmalcolm@redhat.com>
5916
5917 PR c/72858
5918 * c-format.c (argument_parser::check_argument_type): Add params
5919 "type_start" and "conversion_char". Use the former to generate
5920 offset_to_type_start and pass it and conversion_char to
5921 check_format_types.
5922 (check_format_info_main): Capture the start of the type
5923 information as "type_start", and pass it an format_char
5924 to arg_parser.check_argument_type.
5925 (check_format_types): Provide an example in the leading comment.
5926 Add params "offset_to_type_start" and "conversion_char"; pass
5927 them to format_type_warning calls.
5928 (test_get_modifier_for_format_len): Likewise.
5929 (matching_type_p): New function.
5930 (get_format_for_type): Add param "conversion_char" and move
5931 implementation into...
5932 (get_format_for_type_1): ...new function, called twice.
5933 Use new function matching_type_p rather than checking for
5934 TYPE_CANONICAL equality.
5935 (get_corrected_substring): New function.
5936 (format_type_warning): Provide an example in the leading comment.
5937 Add params "offset_to_type_start" and "conversion_char". Replace
5938 call to get_format_for_type with call to get_corrected_substring
5939 and move rejection of hints for widths/precisions there.
5940 (assert_format_for_type_streq): Add param "conversion_char".
5941 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5942 (test_get_format_for_type_printf): Add conversion chars to the
5943 tests, adding coverage for various combinations of integer
5944 vs double conversions, and for preserving octal and hexadecimal
5945 conversions.
5946 (test_get_format_for_type_scanf): Add conversion chars to the
5947 tests.
5948
5b28efbb
TV
59492016-09-10 Tom de Vries <tom@codesourcery.com>
5950
5951 PR C/71602
5952 * c-common.c (build_va_arg): Handle more strict
5953 targetm.canonical_va_list_type. Replace first argument type error with
5954 assert.
5955
3f0177e7
MS
59562016-09-09 Martin Sebor <msebor@redhat.com>
5957
5958 PR c/77520
5959 PR c/77521
5960 * c-format.c (argument_parser::find_format_char_info): Use %qc
5961 format directive unconditionally.
5962
af63ba4b
JM
59632016-09-09 Jason Merrill <jason@redhat.com>
5964
5965 Implement C++17 new of over-aligned types.
5966 * c.opt: Add -faligned-new and -Waligned-new.
5967 * c-common.c (max_align_t_align): Split out from...
5968 (cxx_fundamental_alignment_p): ...here.
5969 * c-common.h: Declare it.
5970 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5971
c65248cb
JM
59722016-09-09 Joseph Myers <joseph@codesourcery.com>
5973
5974 * c-cppbuiltin.c (builtin_define_type_width): New function.
5975 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5976 macros.
5977
e5106e27
DM
59782016-09-07 David Malcolm <dmalcolm@redhat.com>
5979
5980 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5981 a POINTER_TYPE.
5982 (substring_loc::get_location): Move to substring-locations.c,
5983 keeping implementation as...
5984 (c_get_substring_location): New function, from the above, reworked
5985 to use accessors rather than member lookup.
5986 * c-common.h (class substring_loc): Move to substring-locations.h,
5987 replacing with a forward decl.
5988 (c_get_substring_location): New decl.
5989 * c-format.c: Include "substring-locations.h".
5990 (format_warning_va): Move to substring-locations.c.
5991 (format_warning_at_substring): Likewise.
5992
ab20d992 59932016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5994
5995 PR c/77336
5996 * c-format.c (check_function_format): Avoid issuing warnings for
5997 functions unless they call format functions with non-constant
5998 format strings.
5999
b772a565
RB
60002016-09-06 Richard Biener <rguenther@suse.de>
6001
6002 PR c/77450
6003 * c-common.c (c_common_mark_addressable_vec): Handle
6004 COMPOUND_LITERAL_EXPR.
6005
25ff5dd3
MP
60062016-09-05 Marek Polacek <polacek@redhat.com>
6007
6008 PR c/77423
6009 * c-common.c (bool_promoted_to_int_p): New function.
6010 (expr_has_boolean_operands_p): New function.
6011 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6012 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6013
21234eb5
TV
60142016-09-04 Tom de Vries <tom@codesourcery.com>
6015
6016 revert:
6017 2016-08-29 Tom de Vries <tom@codesourcery.com>
6018
6019 * c-common.c (build_va_arg): Replace first argument type error
6020 with assert.
6021
9dc5773f
JJ
60222016-09-02 Jakub Jelinek <jakub@redhat.com>
6023
6024 PR c/65467
6025 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6026 (c_finish_omp_for): Reject _Atomic qualified iterators.
6027
60282016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6029
6030 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6031 size to guarantee it fits the output of the formatted function
6032 regardless of its arguments.
6033
295844f6
MP
60342016-09-01 Marek Polacek <polacek@redhat.com>
6035
6036 PR c/7652
6037 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6038 FALLTHRU comments.
6039
3d06b6f2
MP
60402016-08-29 Marek Polacek <polacek@redhat.com>
6041
6042 PR c/77292
6043 * c-common.c (warn_logical_not_parentheses): Don't warn for
6044 a comparison or a logical operator.
6045
34cedad5
TV
60462016-08-29 Tom de Vries <tom@codesourcery.com>
6047
6048 * c-common.c (build_va_arg): Fix type comparison assert.
6049
f162d717
TV
60502016-08-29 Tom de Vries <tom@codesourcery.com>
6051
6052 * c-common.c (build_va_arg): Replace first argument type error
6053 with assert.
6054
ba9bbd6f
TV
60552016-08-29 Tom de Vries <tom@codesourcery.com>
6056
6057 PR c/77398
6058 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6059 with error_mark_node as va_list instead of with illegal va_list.
6060
ebef225f
MP
60612016-08-25 Marek Polacek <polacek@redhat.com>
6062 David Malcolm <dmalcolm@redhat.com>
6063
6064 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6065 * c-common.h (warn_logical_not_parentheses): Update declaration.
6066
b00e6e75
MP
60672016-08-22 Marek Polacek <polacek@redhat.com>
6068
6069 PR c++/77321
6070 * c-common.c (warn_for_memset): Check type for null.
6071
6dc198e3
JM
60722016-08-22 Joseph Myers <joseph@codesourcery.com>
6073
14ec014e 6074 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6075 _FloatNx types for suffixes for built-in functions.
6076
c65699ef
JM
60772016-08-19 Joseph Myers <joseph@codesourcery.com>
6078
6079 PR c/32187
6080 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6081 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6082 (RID_FLOAT128X): New enum rid values.
6083 (CASE_RID_FLOATN_NX): New macro.
6084 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6085 keywords.
6086 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6087 corresponding complex types.
6088 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6089 _FloatNx and corresponding complex types.
6090 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6091 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6092 and _FloatNx types for the widest type for determining
6093 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6094 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6095 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6096 and _FloatNx types.
6097 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6098 constants.
6099 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6100 _FloatNx types.
6101
cc015f3a
DM
61022016-08-18 David Malcolm <dmalcolm@redhat.com>
6103
6104 * c-opts.c (c_diagnostic_finalizer): Update for change to
6105 diagnostic_show_locus.
6106
cb18fd07
DM
61072016-08-18 David Malcolm <dmalcolm@redhat.com>
6108
6109 * c-common.c: Include "spellcheck.h".
6110 (cb_get_suggestion): New function.
6111 * c-common.h (cb_get_suggestion): New decl.
6112 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6113 cb_get_suggestion.
6114
a76989dc
MP
61152016-08-18 Marek Polacek <polacek@redhat.com>
6116
6117 PR c/71514
6118 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6119 and pointer-to-VLA.
6120
65e736c0
DM
61212016-08-16 David Malcolm <dmalcolm@redhat.com>
6122
6123 PR c/72857
6124 * c-common.c (substring_loc::get_range): Rename to...
6125 (substring_loc::get_location): ...this, converting param from a
6126 source_range * to a location_t *. Call
6127 get_source_location_for_substring rather than
6128 get_source_range_for_substring, and pass in m_caret_idx.
6129 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6130 (substring_loc::get_range): Replace with...
6131 (substring_loc::get_location): ...this.
6132 (substring_loc::set_caret_index): New method.
6133 (substring_loc): Add field m_caret_idx.
6134 * c-format.c (format_warning_va): Update for above changes.
6135 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6136 clashing with type name.
6137 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6138 (check_argument_type): Likewise.
6139 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6140 Use a copy when emitting warnings, setting the caret index from TYPE.
6141
7e1dde14 61422016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6143 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6144
6145 * c-ada-spec.c (dump_number): New function.
6146 (handle_escape_character): Likewise.
6147 (print_ada_macros): Add handling of constant integers and strings.
6148
191816a3
MP
61492016-08-12 Marek Polacek <polacek@redhat.com>
6150
6151 PR c/7652
6152 * c-common.c (scalar_to_vector): Adjust fall through comment.
6153 * c-opts.c (c_common_handle_option): Likewise.
6154 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6155 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6156 fall through comment.
6157 * cilk.c (extract_free_variables): Add FALLTHRU.
6158
452df4a4
JM
61592016-08-10 Jason Merrill <jason@redhat.com>
6160
6161 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6162
f3365c12
JM
61632016-08-09 Jason Merrill <jason@redhat.com>
6164
6165 * c-common.c (c_common_attribute_table): vector_size affects type
6166 identity.
6167
f0bc3323
MP
61682016-08-09 Marek Polacek <polacek@redhat.com>
6169
6170 PR c/7652
6171 * c-ada-spec.c (dump_generic_ada_node): Add return.
6172
98e5a19a
JM
61732016-08-09 Jason Merrill <jason@redhat.com>
6174
6175 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6176 C++17 constexpr lambdas.
6177
895aa8e1
DM
61782016-08-08 David Malcolm <dmalcolm@redhat.com>
6179
6180 PR c/64955
6181 * c-common.h (selftest::c_format_c_tests): New declaration.
6182 (selftest::run_c_tests): New declaration.
6183 * c-format.c: Include "selftest.h.
6184 (format_warning_va): Add param "corrected_substring" and use
6185 it to add a replacement fix-it hint.
6186 (format_warning_at_substring): Likewise.
6187 (format_warning_at_char): Update for new param of
6188 format_warning_va.
6189 (argument_parser::check_argument_type): Pass "fki" to
6190 check_format_types.
6191 (check_format_types): Add param "fki" and pass it to
6192 format_type_warning.
6193 (deref_n_times): New function.
6194 (get_modifier_for_format_len): New function.
6195 (selftest::test_get_modifier_for_format_len): New function.
6196 (get_format_for_type): New function.
6197 (format_type_warning): Add param "fki" and use it to attempt
6198 to provide hints for argument types when calling
6199 format_warning_at_substring.
6200 (selftest::get_info): New function.
6201 (selftest::assert_format_for_type_streq): New function.
6202 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6203 (selftest::test_get_format_for_type_printf): New function.
6204 (selftest::test_get_format_for_type_scanf): New function.
6205 (selftest::c_format_c_tests): New function.
6206
e52ed3fe
DM
62072016-08-08 David Malcolm <dmalcolm@redhat.com>
6208
6209 PR c/52952
6210 * c-format.c: Include "diagnostic.h".
6211 (location_column_from_byte_offset): Delete.
6212 (location_from_offset): Delete.
6213 (format_warning_va): New function.
6214 (format_warning_at_substring): New function.
6215 (format_warning_at_char): New function.
6216 (check_format_arg): Capture location of format_tree and pass to
6217 check_format_info_main.
6218 (argument_parser): Add fields "start_of_this_format" and
6219 "format_string_cst".
6220 (flag_chars_t::validate): Add param "format_string_cst". Convert
6221 warning_at call using location_from_offset to call to
6222 format_warning_at_char.
6223 (argument_parser::argument_parser): Add param "format_string_cst_"
6224 and use use it to initialize field "format_string_cst".
6225 Initialize new field "start_of_this_format".
6226 (argument_parser::read_format_flags): Convert warning_at call
6227 using location_from_offset to a call to format_warning_at_char.
6228 (argument_parser::read_any_format_left_precision): Likewise.
6229 (argument_parser::read_any_format_precision): Likewise.
6230 (argument_parser::read_any_other_modifier): Likewise.
6231 (argument_parser::find_format_char_info): Likewise, in three places.
6232 (argument_parser::parse_any_scan_set): Likewise, in one place.
6233 (argument_parser::handle_conversions): Likewise, in two places.
6234 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6235 and use it to make a substring_loc. Pass the latter to
6236 check_format_types.
6237 (check_format_info_main): Add params "fmt_param_loc" and
6238 "format_string_cst". Convert warning_at calls using
6239 location_from_offset to calls to format_warning_at_char. Pass the
6240 new params to the arg_parser ctor. Pass "format_string_cst" to
6241 flag_chars.validate. Pass "fmt_param_loc" to
6242 arg_parser.check_argument_type.
6243 (check_format_types): Convert first param from a location_t
6244 to a const substring_loc & and rename to "fmt_loc". Attempt
6245 to extract the range of the relevant parameter and pass it
6246 to format_type_warning.
6247 (format_type_warning): Convert first param from a location_t
6248 to a const substring_loc & and rename to "fmt_loc". Add
6249 params "param_range" and "type". Replace calls to warning_at
6250 with calls to format_warning_at_substring.
6251
1c4d457e
DM
62522016-08-08 David Malcolm <dmalcolm@redhat.com>
6253
6254 * c-format.c (class flag_chars_t): New class.
6255 (struct length_modifier): New struct.
6256 (class argument_parser): New class.
6257 (flag_chars_t::flag_chars_t): New ctor.
6258 (flag_chars_t::has_char_p): New method.
6259 (flag_chars_t::add_char): New method.
6260 (flag_chars_t::validate): New method.
6261 (flag_chars_t::get_alloc_flag): New method.
6262 (flag_chars_t::assignment_suppression_p): New method.
6263 (argument_parser::argument_parser): New ctor.
6264 (argument_parser::read_any_dollar): New method.
6265 (argument_parser::read_format_flags): New method.
6266 (argument_parser::read_any_format_width): New method.
6267 (argument_parser::read_any_format_left_precision): New method.
6268 (argument_parser::read_any_format_precision): New method.
6269 (argument_parser::handle_alloc_chars): New method.
6270 (argument_parser::read_any_length_modifier): New method.
6271 (argument_parser::read_any_other_modifier): New method.
6272 (argument_parser::find_format_char_info): New method.
6273 (argument_parser::validate_flag_pairs): New method.
6274 (argument_parser::give_y2k_warnings): New method.
6275 (argument_parser::parse_any_scan_set): New method.
6276 (argument_parser::handle_conversions): New method.
6277 (argument_parser::check_argument_type): New method.
6278 (check_format_info_main): Introduce classes argument_parser
6279 and flag_chars_t, moving the code within the loop into methods
6280 of these classes. Make various locals "const".
6281
88fa5555
DM
62822016-08-05 David Malcolm <dmalcolm@redhat.com>
6283
6284 * c-common.c: Include "substring-locations.h".
6285 (get_cpp_ttype_from_string_type): New function.
6286 (g_string_concat_db): New global.
6287 (substring_loc::get_range): New method.
6288 * c-common.h (g_string_concat_db): New declaration.
6289 (class substring_loc): New class.
6290 * c-lex.c (lex_string): When concatenating strings, capture the
6291 locations of all tokens using a new obstack, and record the
6292 concatenation locations within g_string_concat_db.
6293 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6294 on the ggc-heap.
6295
78169471
MP
62962016-07-29 Marek Polacek <polacek@redhat.com>
6297
638fc14f
MP
6298 PR c/71926
6299 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6300 parentheses warning.
6301
78169471
MP
6302 PR c/71574
6303 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6304
1225d6b1
ML
63052016-07-28 Martin Liska <mliska@suse.cz>
6306
6307 PR gcov-profile/68025
6308 * c-common.c (handle_no_profile_instrument_function_attribute):
6309
ec1e2a40
BE
63102016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6311
6312 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6313 BITS_PER_UNIT_LOG.
6314
5ec2cd9f
JM
63152016-07-25 Jason Merrill <jason@redhat.com>
6316
6317 PR c++/65970
6318 * c.opt (fconstexpr-loop-limit): New.
6319
9dc5773f 63202016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6321
6322 PR c++/71675
6323 * c-common.c (resolve_overloaded_builtin): Avoid converting
6324 __atomic_compare_exchange_n return type to that of what its
6325 first argument points to.
6326
e3fe09c1
UB
63272016-07-22 Uros Bizjak <ubizjak@gmail.com>
6328
6329 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6330 ~(unsigned HOST_WIDE_INT) 0.
6331
bc91c436
ML
63322016-07-22 Martin Liska <mliska@suse.cz>
6333
6334 PR gcov-profile/69028
6335 PR gcov-profile/62047
6336 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6337 to the current_function_decl.
6338
451dcc66
JM
63392016-07-21 Jason Merrill <jason@redhat.com>
6340
6341 PR c++/65168
6342 * c-common.c (c_common_truthvalue_conversion): Check
6343 c_inhibit_evaluation_warnings for warning about address of
6344 reference.
6345
de6a69ee
DM
63462016-07-20 David Malcolm <dmalcolm@redhat.com>
6347
6348 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6349 const char *.
6350
d022c55a
JM
63512016-07-15 Jason Merrill <jason@redhat.com>
6352
6353 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6354
ddbbcb19
JJ
63552016-07-15 Jakub Jelinek <jakub@redhat.com>
6356
6357 PR c/71858
6358 * c-common.h (enum lookup_name_fuzzy_kind): Add
6359 FUZZY_LOOKUP_FUNCTION_NAME.
6360
d0cf395a
JM
63612016-07-08 Jason Merrill <jason@redhat.com>
6362
6363 P0145: Refining Expression Order for C++.
6364 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6365 * c-opts.c: Adjust.
6366
98d44e93
MT
63672016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6368
6369 PR c++/71214
6370 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6371
f9d8d994
TS
63722016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6373
6374 * c-pragma.h (enum pragma_kind): Rename
6375 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6376 users.
6377
4aa83879
RB
63782016-06-29 Richard Biener <rguenther@suse.de>
6379
6380 PR middle-end/71002
6381 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6382
a25bd9e6
JM
63832016-06-24 Jason Merrill <jason@redhat.com>
6384
6385 P0145R2: Refining Expression Order for C++.
6386 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6387 MODIFY_EXPR.
6388
a86451b9
JJ
63892016-06-24 Jakub Jelinek <jakub@redhat.com>
6390
6391 * c-common.c (check_builtin_function_arguments): Require last
6392 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6393 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6394 if the last argument is pointer to enumerated or boolean type.
6395
1a4f11c8
DM
63962016-06-22 David Malcolm <dmalcolm@redhat.com>
6397
6398 PR c/70339
6399 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6400 (lookup_name_fuzzy): New prototype.
6401
fe55692c
JDA
64022016-06-21 John David Anglin <danglin@gcc.gnu.org>
6403
6404 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6405
4eb24e01
JM
64062016-06-14 Jason Merrill <jason@redhat.com>
6407
6408 P0145R2: Refining Expression Order for C++.
6409 * c.opt (fargs-in-order): New.
6410 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6411
ef7cf206
JJ
64122016-06-13 Jakub Jelinek <jakub@redhat.com>
6413
0dda258b
JJ
6414 PR sanitizer/71498
6415 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6416 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6417
ef7cf206
JJ
6418 PR preprocessor/71183
6419 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6420 to cb_get_source_date_epoch.
6421
50b15873
JJ
64222016-06-10 Jakub Jelinek <jakub@redhat.com>
6423
6424 PR c/68657
6425 * c.opt (Wpsabi): Add Warning flag.
6426
4d926e34
MS
64272016-06-10 Martin Sebor <msebor@redhat.com>
6428
6429 PR c/71392
14ec014e 6430 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6431 the nonnull attribute in type-generic builtins.
6432
e01b4e16
MS
64332016-06-09 Martin Sebor <msebor@redhat.com>
6434
6435 PR c/70883
6436 * c-common.c (builtin_function_validate_nargs): Make text of error
6437 message consistent with others like it.
6438
44a845ca
MS
64392016-06-08 Martin Sebor <msebor@redhat.com>
6440 Jakub Jelinek <jakub@redhat.com>
6441
6442 PR c++/70507
6443 PR c/68120
6444 * c-common.c (check_builtin_function_arguments): Handle
6445 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6446
a80a7051
RB
64472016-06-08 Richard Biener <rguenther@suse.de>
6448
6449 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6450
bfd67b47
RB
64512016-06-07 Richard Biener <rguenther@suse.de>
6452
6453 PR c/61564
6454 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6455 options and warn about others.
6456
15c98b2e
ES
64572016-06-01 Eduard Sanou <dhole@openmailbox.org>
6458
6459 * c-common.c (get_source_date_epoch): Rename to
6460 cb_get_source_date_epoch.
6461 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6462 message when the parsing fails. Use error_at instead of fatal_error.
6463 * c-common.h (get_source_date_epoch): Rename to
6464 cb_get_source_date_epoch.
6465 * c-common.h (cb_get_source_date_epoch): Prototype.
6466 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6467 * c-common.h (c_omp_region_type): Remove trailing comma.
6468 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6469 * c-lex.c (c_lex_with_flags): Remove initialization of
6470 pfile->source_date_epoch.
6471
00631022
JJ
64722016-05-30 Jakub Jelinek <jakub@redhat.com>
6473
6474 PR c++/71349
6475 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6476 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6477 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6478 instead of C_OMP_CLAUSE_SPLIT_FOR.
6479
f17a223d
RB
64802016-05-24 Richard Biener <rguenther@suse.de>
6481
6482 PR middle-end/70434
6483 PR c/69504
6484 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6485 (convert_vector_to_array_for_subscript): ... this.
6486 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6487 VIEW_CONVERT_EXPR to an array type. Rename to ...
6488 (convert_vector_to_array_for_subscript): ... this.
6489
4f2e1536
MP
64902016-05-12 Marek Polacek <polacek@redhat.com>
6491
6492 PR c/70756
6493 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6494 size_in_bytes and pass LOC to it.
6495
d6e83a8d
MM
64962016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6497
6498 PR c/43651
6499 * c.opt (Wduplicate-decl-specifier): New option.
6500
5c3a10fb
MP
65012016-05-11 Marek Polacek <polacek@redhat.com>
6502
6503 PR c++/71024
6504 * c-common.c (diagnose_mismatched_attributes): New function.
6505 * c-common.h (diagnose_mismatched_attributes): Declare.
6506
deef7113
MP
65072016-05-04 Marek Polacek <polacek@redhat.com>
6508
6509 * c.opt (Wdangling-else): New option.
6510
79ce98bc
MP
65112016-05-03 Marek Polacek <polacek@redhat.com>
6512
6513 PR c/70859
6514 * c-common.c (builtin_function_validate_nargs): Add location
6515 parameter. Use it.
6516 (check_builtin_function_arguments): Add location and arguments
6517 parameters. Use them.
6518 * c-common.h (check_builtin_function_arguments): Update declaration.
6519
381cdae4
RB
65202016-05-03 Richard Biener <rguenther@suse.de>
6521
6522 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6523 allow call args to gimplify to SSA names.
6524
1d793c34
MP
65252016-05-03 Marek Polacek <polacek@redhat.com>
6526
6527 * c-common.h (enum c_omp_region_type): Remove stray comma.
6528
77886428
CP
65292016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6530
6531 * c-common.h (enum c_omp_region_type): Define.
6532
697e0b28
RS
65332016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6534
6535 * c-common.c (shorten_compare): Use wi::to_wide.
6536
e7ff0319
CP
65372016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6538
6539 PR middle-end/70626
6540 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6541 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6542 reduction clauses in acc parallel loops.
6543
2fff3db8
MP
65442016-04-29 Marek Polacek <polacek@redhat.com>
6545
6546 PR c/70852
6547 * c-common.c (warn_for_memset): Check domain before accessing it.
6548
509063eb
DV
65492016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6550
6551 PR/69089
6552 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6553 "aligned" attribute.
6554
b632761d
JM
65552016-04-28 Jason Merrill <jason@redhat.com>
6556
6557 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6558
174f6622
ES
65592016-04-28 Eduard Sanou <dhole@openmailbox.org>
6560 Matthias Klose <doko@debian.org>
6561
6562 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6563 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6564 handling.
6565 * c-common.h (get_source_date_epoch): Prototype.
6566 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6567
6bc2bb18
RB
65682015-04-27 Ryan Burn <contact@rnburn.com>
6569
6570 PR c++/69024
6571 PR c++/68997
6572 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6573 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6574 external linkage.
6575 (cilk_detect_and_unwrap): Corresponding changes.
6576 (extract_free_variables): Don't extract free variables from
6577 AGGR_INIT_EXPR slot.
6578 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6579 (cilk_recognize_spawn): Likewise.
6580
c1e1f433
BS
65812016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6582
6583 * c.opt (Wmemset-elt-size): New option.
6584 * c-common.c (warn_for_memset): New function.
6585 * c-common.h (warn_for_memset): Declare.
6586
d067e05f
JM
65872016-04-25 Jason Merrill <jason@redhat.com>
6588
6589 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6590 No longer static.
6591 * c-common.h: Declare it.
6592 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6593
9aa36ae5
JM
65942016-04-22 Jason Merrill <jason@redhat.com>
6595
6596 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6597
477d4906
IV
65982016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6599
6600 PR c++/69363
6601 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6602 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6603
fe37c7af
MM
66042016-04-18 Michael Matz <matz@suse.de>
6605
6606 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6607 and SET_DECL_ALIGN.
6608
23f2660f
EB
66092016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6610
6611 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6612 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6613 to incomplete types.
6614 (dump_nested_type): Remove redundant tests and tidy up.
6615 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6616 a type which is the typedef of an original type.
6617
1e77281b
MP
66182016-04-15 Marek Polacek <polacek@redhat.com>
6619
6620 PR c/70651
6621 * c-common.c (build_va_arg): Change two asserts into errors and return
6622 error_mark_node.
6623
b3a77f21
MP
66242016-04-13 Marek Polacek <polacek@redhat.com>
6625
6626 PR c++/70639
6627 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6628 for switch statements, too.
6629
322b8466
JM
66302016-03-28 Jason Merrill <jason@redhat.com>
6631
6632 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6633
fbdb6baf
MP
66342016-03-23 Marek Polacek <polacek@redhat.com>
6635
6636 PR c++/69884
6637 * c.opt (Wignored-attributes): New option.
6638
5c240f4d
DM
66392016-03-22 David Malcolm <dmalcolm@redhat.com>
6640
6641 PR c/69993
6642 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6643 diagnostic text, reversing the order of the warning and note so
6644 that they appear in source order.
6645
14ba7b28
MP
66462016-03-17 Marek Polacek <polacek@redhat.com>
6647
6648 PR c/69407
6649 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6650 operations.
6651
08a1cadc
JM
66522016-03-14 Jason Merrill <jason@redhat.com>
6653
2aaeea19
JM
6654 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6655
08a1cadc
JM
6656 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6657
c06d25bb
RB
66582016-03-09 Richard Biener <rguenther@suse.de>
6659
6660 PR c/70143
6661 * c-common.c (strict_aliasing_warning): Add back
6662 alias_sets_conflict_p check.
6663
80aac5c8
JM
66642016-03-08 Jason Merrill <jason@redhat.com>
6665
6666 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6667
64b23c13
DM
66682016-03-04 David Malcolm <dmalcolm@redhat.com>
6669
6670 PR c/68187
6671 * c-indentation.c (get_visual_column): Move code to determine next
6672 tab stop to...
6673 (next_tab_stop): ...this new function.
6674 (line_contains_hash_if): Delete function.
6675 (detect_preprocessor_logic): Delete function.
6676 (get_first_nws_vis_column): New function.
6677 (detect_intervening_unindent): New function.
6678 (should_warn_for_misleading_indentation): Replace call to
6679 detect_preprocessor_logic with a call to
6680 detect_intervening_unindent.
6681
729526f5
DM
66822016-03-04 David Malcolm <dmalcolm@redhat.com>
6683
6684 PR c/68187
6685 * c-indentation.c (should_warn_for_misleading_indentation): When
6686 suppressing warnings about cases where the guard and body are on
6687 the same column, only use the first non-whitespace column in place
6688 of the guard token column when dealing with "else" clauses.
6689 When rejecting aligned BODY and NEXT, loosen the requirement
6690 from equality with the first non-whitespace of guard to simply
6691 that they not be indented relative to it.
6692
e9a35493
RB
66932016-03-04 Richard Biener <rguenther@suse.de>
6694
6695 PR c++/70054
6696 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6697 instead of alias_sets_conflict_p.
6698
1be56bc5
MP
66992016-03-01 Marek Polacek <polacek@redhat.com>
6700
6701 PR c++/69795
6702 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6703 any DECL.
6704
35886f0b
MS
67052016-02-22 Martin Sebor <msebor@redhat.com>
6706
6707 PR middle-end/69780
6708 * c-common.c (check_builtin_function_arguments): Validate and
6709 reject invalid arguments to __builtin_alloca_with_align.
6710
4246c8da
MW
67112016-02-20 Mark Wielaard <mjw@redhat.com>
6712
6713 PR c/28901
6714 * c.opt (Wunused-const-variable): Turn into Alias for...
6715 (Wunused-const-variable=): New option.
6716
268be88c
BE
67172016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6718
6719 PR c++/69865
6720 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6721 here...
6722 (c_common_init_options): ...to here.
6723 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6724
871b3f47
JJ
67252016-02-19 Jakub Jelinek <jakub@redhat.com>
6726
6727 PR c++/69826
6728 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6729 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6730 flag_preprocess_only.
6731
bf14eba2
JJ
67322016-02-16 Jakub Jelinek <jakub@redhat.com>
6733
6734 PR c/69835
6735 * c.opt (Wnonnull-compare): Enable for -Wall.
6736
ba6b3795
JJ
67372016-02-15 Jakub Jelinek <jakub@redhat.com>
6738
6739 PR c++/69797
6740 * c-common.c (sync_resolve_size): Diagnose too few arguments
6741 even when params is non-NULL empty vector.
6742
a011cd92
BS
67432016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6744
6745 PR target/60410
6746 * c.opt (fshort-double): Remove.
6747
46cb9332
MS
67482016-02-05 Martin Sebor <msebor@redhat.com>
6749
6750 PR c++/69662
6751 * c.opt (Warning options): Update -Wplacement-new to take
6752 an optional argument.
6753
e1b81f2b
JJ
67542016-02-01 Jakub Jelinek <jakub@redhat.com>
6755
6756 PR preprocessor/69543
6757 PR c/69558
6758 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6759 instead of loc to control_warning_option.
6760
b6adbb9f
NS
67612016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6762
6763 * c.opt (fopenacc-dim=): New option.
6764
5d70666e
RB
67652016-01-27 Ryan Burn <contact@rnburn.com>
6766
6767 PR cilkplus/69267
6768 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6769 gimplify_arg. Removed superfluous post_p argument.
6770 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6771 superfluous post_p argument.
6772 * c-gimplify.c (c_gimplify_expr): Likewise.
6773
01e1dea3
DM
67742016-01-26 David Malcolm <dmalcolm@redhat.com>
6775
6776 PR other/69006
6777 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6778 pp_newline_and_flush with pp_flush.
6779
9f04a53e
MS
67802016-01-20 Martin Sebor <msebor@redhat.com>
6781
6782 PR c/69405
6783 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6784 an incompatible argument when the argument isn't a valid tree node.
6785
7f26f7df
JM
67862016-01-18 Jason Merrill <jason@redhat.com>
6787
6788 PR c++/68767
6789 * c-common.c (check_function_arguments_recurse): Fold the whole
6790 COND_EXPR, not just the condition.
6791
f62bf092
TV
67922016-01-18 Tom de Vries <tom@codesourcery.com>
6793
6794 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6795 classify as loop clause.
6796
e0a575ff
JJ
67972016-01-15 Jakub Jelinek <jakub@redhat.com>
6798
6799 PR bootstrap/68271
6800 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6801 C++ FE no longer has limit on number of pragmas.
6802
68032015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6804
6805 PR c++/69048
6806 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6807 to add missing cleanup point.
b6e3db06 6808
c7df95d8
DM
68092016-01-14 David Malcolm <dmalcolm@redhat.com>
6810
6811 PR c++/68819
6812 * c-indentation.c (get_visual_column): Add location_t param.
6813 Handle the column number being zero by effectively disabling the
6814 warning, with an "inform".
6815 (should_warn_for_misleading_indentation): Add location_t argument
6816 for all uses of get_visual_column.
6817
21efdd80
PP
68182016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6819
6820 PR c++/69029
6821 * c-indentation.c (should_warn_for_misleading_indentation):
6822 Don't warn about do-while statements.
6823
7a127fa7
MS
68242016-01-07 Martin Sebor <msebor@redhat.com>
6825
6826 PR c/68966
6827 * c-common.c (sync_resolve_size): Reject first argument when it's
6828 a pointer to _Bool.
6829
c589e975
DM
68302016-01-05 David Malcolm <dmalcolm@redhat.com>
6831
6832 PR c/69122
6833 * c-indentation.c (get_visual_column): Remove default argument.
6834 (should_warn_for_misleading_indentation): For the multiline case,
6835 update call to get_visual_column for next_stmt_exploc so that it
6836 captures the location of the first non-whitespace character in the
6837 relevant line. Don't issue warnings if there is non-whitespace
6838 before the next statement.
6839
818ab71a
JJ
68402016-01-04 Jakub Jelinek <jakub@redhat.com>
6841
6842 Update copyright years.
6843
745e411d
DM
68442015-12-21 David Malcolm <dmalcolm@redhat.com>
6845
6846 * c-common.c (binary_op_error): Convert first param from
6847 location_t to rich_location * and use it when emitting an error.
6848 * c-common.h (binary_op_error): Convert first param from
6849 location_t to rich_location *.
6850
de67c4c3
DM
68512015-12-16 David Malcolm <dmalcolm@redhat.com>
6852
6853 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6854 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6855
4a38b02b
IV
68562015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6857
6858 * c-common.c (c_common_attribute_table): Handle "omp declare target
6859 link" attribute.
6860
54d62f51
JJ
68612015-12-14 Jakub Jelinek <jakub@redhat.com>
6862
6863 PR c/68833
6864 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6865
8d4227c8
TB
68662014-12-12 Tobias Burnus <burnus@net-b.de>
6867
6868 PR fortran/68815
6869 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6870 specifiers (%d, %i,%u and %c).
6871
f6069ccc
DM
68722015-12-10 David Malcolm <dmalcolm@redhat.com>
6873
6874 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6875
63bbf46d
JJ
68762015-12-08 Jakub Jelinek <jakub@redhat.com>
6877
6878 PR c/48088
6879 PR c/68657
6880 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6881 * c-pragma.c (handle_pragma_diagnostic): Adjust
6882 control_warning_option caller.
6883
f79520bb
DM
68842015-12-07 David Malcolm <dmalcolm@redhat.com>
6885
6886 * c-common.c (c_cpp_error): Update for change to
6887 rich_location::set_range.
6888
b3d5bc62
JJ
68892015-12-04 Paolo Bonzini <bonzini@gnu.org>
6890
6891 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6892 shifting 1 out of the sign bit.
6893
68942015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6895
6896 * c-common.c (c_common_attribute_table[]): Update max arguments
6897 count for "simd" attribute.
6898 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6899
6eb4a537
JJ
69002015-12-03 Jakub Jelinek <jakub@redhat.com>
6901
6902 PR preprocessor/57580
6903 * c-ppoutput.c (print): Change printed field to bool.
6904 Move src_file last for smaller padding.
6905 (init_pp_output): Set print.printed to false instead of 0.
6906 (scan_translation_unit): Fix up formatting. Set print.printed
6907 to true after printing something other than newline.
6908 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6909 (maybe_print_line_1): Set print.printed to false instead of 0.
6910 (print_line_1): Likewise.
6911 (do_line_change): Set print.printed to true instead of 1.
6912 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6913 dump_macro): Set print.printed to false after printing newline.
6914
4250754e
JM
69152015-12-02 Jason Merrill <jason@redhat.com>
6916
f479b43d
JM
6917 * c-common.c (fold_for_warn): New.
6918 (warn_logical_operator, warn_tautological_cmp)
6919 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6920
4250754e
JM
6921 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6922 (c_fully_fold_internal, decl_constant_value_for_optimization):
6923 Move to c/c-fold.c.
6924 * c-common.h: Don't declare decl_constant_value_for_optimization.
6925
e9e32ee6
JM
69262015-12-02 Joseph Myers <joseph@codesourcery.com>
6927
6928 PR c/68162
6929 * c-common.h (c_build_qualified_type): Add extra default
6930 arguments.
6931
37d5ad46
JB
69322015-12-01 Julian Brown <julian@codesourcery.com>
6933 Cesar Philippidis <cesar@codesourcery.com>
6934 James Norris <James_Norris@mentor.com>
6935
6936 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6937 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6938 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6939
f07862c7
EB
69402015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6941
6942 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6943 (decl_sloc_common): Delete and move bulk of processing to...
6944 (decl_sloc): ...here.
6945 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6946 (dump_ada_double_name): Remove S parameter and compute the suffix.
6947 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6948 element type and deal with an anonymous one.
6949 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6950 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6951 and remove reference to QUAL_UNION_TYPE.
6952 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6953 (dump_nested_type): ...here. New function extracted from above.
6954 Generate a full declaration for anonymous element type of arrays.
6955 (print_ada_declaration): Really skip anonymous declarations. Remove
6956 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6957 Clean up processing of declarations of array types and objects.
6958 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6959 Remove obsolete code and tidy up.
6960
75c8aac3
JH
69612015-11-29 Jan Hubicka <hubicka@ucw.cz>
6962
6963 PR c/67581
6964 * c-common.c (handle_transparent_union_attribute): Update
6965 also type variants.
6966
b58d3df2
ML
69672015-11-27 Martin Liska <mliska@suse.cz>
6968
6969 PR c++/68312
6970 * array-notation-common.c (cilkplus_extract_an_triplets):
6971 Release vector of vectors.
6972 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6973
89a01fcf
EB
69742015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6975
6976 PR c++/68527
6977 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6978 (print_ada_struct_decl): Likewise.
6979
cc5c5226
IZ
69802015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6981
6982 PR c++/68001
6983 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6984 * cilk.c (recognize_spawn): Determine location in a more precise
6985 way.
6986
269adb9d
JM
69872015-11-19 Jason Merrill <jason@redhat.com>
6988
6989 * c-common.c (shorten_compare): But look through macros from
6990 system headers.
6991
d0eccfcd
JM
69922015-11-18 Jason Merrill <jason@redhat.com>
6993
6994 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6995 non-constant operand comes from a macro.
6996
3e44547c
JM
69972015-11-17 Jason Merrill <jason@redhat.com>
6998
6999 PR bootstrap/68346
7000 * c-common.c (warn_tautological_cmp): Fold before checking for
7001 constants.
7002
0f62c7a0
MP
70032015-11-16 Marek Polacek <polacek@redhat.com>
7004
7005 PR c++/68362
7006 * c-common.c (check_case_bounds): Fold low and high cases.
7007
a868811e
MP
70082015-11-16 Marek Polacek <polacek@redhat.com>
7009
7010 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7011 * c-common.c (c_common_get_alias_set): Likewise.
7012 (handle_visibility_attribute): Likewise.
7013
fff77217
KY
70142015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7015
7016 * c-common.c (handle_simd_attribute): New.
7017 (struct attribute_spec): Add entry for "simd".
7018 (handle_simd_attribute): New.
7019
269e63b7
KT
70202015-11-13 Kai Tietz <ktietz70@googlemail.com>
7021
7022 * c-lex.c (interpret_float): Use fold_convert.
7023
ebedc9a3
DM
70242015-11-13 David Malcolm <dmalcolm@redhat.com>
7025
7026 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7027 and store it on the result.
7028 * c-opts.c (c_common_init_options): Set
7029 global_dc->colorize_source_p.
7030
6e232ba4
JN
70312015-11-12 James Norris <jnorris@codesourcery.com>
7032 Joseph Myers <joseph@codesourcery.com>
7033
7365279f 7034 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7035 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7036 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7037 PRAGMA_OACC_CLAUSE_LINK.
7038
e78bede6
MP
70392015-11-11 Marek Polacek <polacek@redhat.com>
7040
7041 PR c/68107
7042 PR c++/68266
7043 * c-common.c (valid_array_size_p): New function.
7044 * c-common.h (valid_array_size_p): Declare.
7045
3f8257db 70462015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7047
7048 PR bootstrap/68271
7049 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7050
69f293c9
AM
70512015-11-11 Andrew MacLeod <amacleod@redhat.com>
7052
7053 * array-notation-common.c: Remove unused header files.
7054 * c-ada-spec.c: Likewise.
7055 * c-cilkplus.c: Likewise.
7056 * c-common.c: Likewise.
7057 * c-cppbuiltin.c: Likewise.
7058 * c-dump.c: Likewise.
7059 * c-format.c: Likewise.
7060 * c-gimplify.c: Likewise.
7061 * c-indentation.c: Likewise.
7062 * c-lex.c: Likewise.
7063 * c-omp.c: Likewise.
7064 * c-opts.c: Likewise.
7065 * c-pch.c: Likewise.
7066 * c-ppoutput.c: Likewise.
7067 * c-pragma.c: Likewise.
7068 * c-pretty-print.c: Likewise.
7069 * c-semantics.c: Likewise.
7070 * c-ubsan.c: Likewise.
7071 * cilk.c: Likewise.
7072 * stub-objc.c: Likewise.
7073
3a40d81d
NS
70742015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7075 Cesar Philippidis <cesar@codesourcery.com>
7076 James Norris <jnorris@codesourcery.com>
7077 Julian Brown <julian@codesourcery.com>
7078 Nathan Sidwell <nathan@codesourcery.com>
7079
7080 * c-pragma.c (oacc_pragmas): Add "routine".
7081 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7082
ee45a32d
EB
70832015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7084
7085 * c-common.c (c_common_attributes): Add scalar_storage_order.
7086 (handle_scalar_storage_order_attribute): New function.
7087 * c-pragma.c (global_sso): New variable.
7088 (maybe_apply_pragma_scalar_storage_order): New function.
7089 (handle_pragma_scalar_storage_order): Likewise.
7090 (init_pragma): Register scalar_storage_order.
7091 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7092 * c.opt (Wscalar-storage-order): New warning.
7093 (fsso-struct=): New option.
7094
eb11eb15
MS
70952015-11-08 Martin Sebor <msebor@redhat.com>
7096
7097 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7098
0aad0198
RS
70992015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7100
7101 * c-common.c: Don't undef DEF_BUILTIN.
7102
8a645150
DM
71032015-11-06 David Malcolm <dmalcolm@redhat.com>
7104
7105 * c-common.c (c_cpp_error): Convert parameter from location_t to
7106 rich_location *. Eliminate the "column_override" parameter and
7107 the call to diagnostic_override_column.
7108 Update the "done_lexing" clause to set range 0
7109 on the rich_location, rather than overwriting a location_t.
7110 * c-common.h (c_cpp_error): Convert parameter from location_t to
7111 rich_location *. Eliminate the "column_override" parameter.
7112
7a5e4956
CP
71132015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7114 Thomas Schwinge <thomas@codesourcery.com>
7115 James Norris <jnorris@codesourcery.com>
7116
7117 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7118 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7119 clauses with parallel and kernels and loops.
7120 * c-pragma.h (enum pragma_omp_clause): Add entries for
7121 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7122 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7123 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7124 INDEPENDENT,SEQ}.
7125 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7126
e2f5cc96
MS
71272015-11-05 Martin Sebor <msebor@redhat.com>
7128
7129 PR c++/67942
7130 * c.opt (-Wplacement-new): New option.
7131
e01d41e5
JJ
71322015-11-05 Jakub Jelinek <jakub@redhat.com>
7133
7134 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7135 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7136 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7137 save_expr or create_tmp_var* if TEST is true.
7138 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7139 Don't call add_stmt here.
7140 (struct c_omp_check_loop_iv_data): New type.
7141 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7142 c_omp_check_loop_iv_exprs): New functions.
7143 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7144 distribute.
7145 (c_omp_declare_simd_clauses_to_numbers): Change
7146 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7147 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7148 from numbers to PARM_DECLs.
7149
595278be
MM
71502015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7151
7152 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7153 flag_checking.
7154
3f8257db 71552015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7156
7157 PR c++-common/67882
b3d5bc62
JJ
7158 * c-common.h (fold_offsetof_1): Add argument.
7159 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7160 offsetof expressions that reference elements past the end of
7161 an array.
7162
4bf9e5a8
TS
71632015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7164 Chung-Lin Tang <cltang@codesourcery.com>
7165
7166 * c-pragma.c (oacc_pragmas): Add "atomic".
7167 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7168
3b1661a9
ES
71692015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7170
7171 * c-common.c (handle_target_clones_attribute): New.
7172 (c_common_attribute_table): Add handle_target_clones_attribute.
7173 (handle_always_inline_attribute): Add check on target_clones attribute.
7174 (handle_target_attribute): Ditto.
7175
2adfab87
AM
71762015-10-29 Andrew MacLeod <amacleod@redhat.com>
7177
7178 * array-notation-common.c: Reorder #include's and remove duplicates.
7179 * c-ada-spec.c: Likewise.
7180 * c-cilkplus.c: Likewise.
7181 * c-common.c: Likewise.
7182 * c-cppbuiltin.c: Likewise.
7183 * c-dump.c: Likewise.
7184 * c-format.c: Likewise.
7185 * c-gimplify.c: Likewise.
7186 * c-indentation.c: Likewise.
7187 * c-lex.c: Likewise.
7188 * c-omp.c: Likewise.
7189 * c-opts.c: Likewise.
7190 * c-pch.c: Likewise.
7191 * c-ppoutput.c: Likewise.
7192 * c-pragma.c: Likewise.
7193 * c-pretty-print.c: Likewise.
7194 * c-semantics.c: Likewise.
7195 * c-ubsan.c: Likewise.
7196 * cilk.c: Likewise.
7197 * stub-objc.c: Likewise.
7198
d90ec4f2
JM
71992015-10-28 Jason Merrill <jason@redhat.com>
7200
7201 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7202
88bae6f4
TS
72032015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7204 James Norris <jnorris@codesourcery.com>
7205 Cesar Philippidis <cesar@codesourcery.com>
7206
7207 PR c/64765
7208 PR c/64880
7209 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7210 * c-omp.c (c_oacc_split_loop_clauses): New function.
7211
b1726d6c
MS
72122015-10-21 Martin Sebor <msebor@redhat.com>
7213
7214 PR driver/68043
7215 * c.opt: End each sentence that describes an option with a period.
7216
fa60eeb9
MP
72172015-10-20 Marek Polacek <polacek@redhat.com>
7218
7219 * array-notation-common.c (is_cilkplus_vector_p): Define.
7220 * c-common.h (is_cilkplus_vector_p): Declare.
7221
95979049
MP
72222015-10-20 Marek Polacek <polacek@redhat.com>
7223
7224 * c.opt (std=gnu++11): Do not describe as experimental.
7225 (std=gnu++14): Likewise.
7226
2a9fb712
JM
72272015-10-19 Jason Merrill <jason@redhat.com>
7228
7229 * c-cppbuiltin.c (c_cpp_builtins): Define
7230 __cpp_nontype_template_args.
7231
13b380a3
JM
72322015-10-19 Jason Merrill <jason@redhat.com>
7233
7234 * c-cppbuiltin.c (c_cpp_builtins): Define
7235 __cpp_enumerator_attributes, __cpp_fold_expressions,
7236 __cpp_unicode_characters.
7237
d9a6bd32
JJ
72382015-10-13 Jakub Jelinek <jakub@redhat.com>
7239 Aldy Hernandez <aldyh@redhat.com>
7240
7241 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7242 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7243 (c_define_builtins): Likewise.
7244 * c-common.h (enum c_omp_clause_split): Add
7245 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7246 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7247 (c_finish_omp_for): Add ORIG_DECLV argument.
7248 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7249 201511 instead of 201307.
7250 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7251 OMP_CRITICAL_CLAUSES to it.
7252 (c_finish_omp_ordered): Add CLAUSES argument, set
7253 OMP_ORDERED_CLAUSES to it.
7254 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7255 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7256 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7257 constructs and new OpenMP 4.5 clauses. Clear
7258 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7259 verification code.
7260 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7261 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7262 (enum pragma_omp_clause): Add
7263 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7264 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7265
624d31fe
RS
72662015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7267
7268 * c-lex.c (interpret_float): Use real_equal instead of
7269 REAL_VALUES_EQUAL.
7270
b8fd7909
JM
72712015-10-04 Jason Merrill <jason@redhat.com>
7272
7273 Implement N4514, C++ Extensions for Transactional Memory.
7274 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7275 (c_common_attribute_table): Add transaction_safe_dynamic.
7276 transaction_safe now affects type identity.
7277 (handle_tm_attribute): Handle transaction_safe_dynamic.
7278 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7279 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7280 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7281 (D_TRANSMEM): New.
7282 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7283 * c-pretty-print.c (pp_c_attributes_display): Don't print
7284 transaction_safe in C++.
7285
12651878
MP
72862015-10-02 Marek Polacek <polacek@redhat.com>
7287
7288 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7289
3e3b8d63
MP
72902015-10-02 Marek Polacek <polacek@redhat.com>
7291
7292 PR c/64249
7293 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7294 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7295 * c.opt (Wduplicated-cond): New option.
7296
0d1a8f75
JM
72972015-10-01 Joseph Myers <joseph@codesourcery.com>
7298
7299 * c.opt (std=c11): Do not describe as experimental.
7300 (std=gnu11): Likewise.
7301 (std=iso9899:2011): Likewise.
7302
3e32ee19
NS
73032015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7304
7305 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7306 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7307
974348ee
MP
73082015-09-25 Marek Polacek <polacek@redhat.com>
7309
7310 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7311 (ubsan_instrument_shift): Likewise.
7312
15dbc1a6
MP
73132015-09-25 Marek Polacek <polacek@redhat.com>
7314
7315 PR sanitizer/64906
7316 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7317
6b95d7cc
PP
73182015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7319
7320 * c-indentation.c (should_warn_for_misleading_indentation):
7321 Compare next_stmt_vis_column with guard_line_first_nws instead
7322 of with guard_line_vis_column.
7323
c1822f9c
MLI
73242015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7325
7326 PR c/49654
7327 PR c/49655
7328 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7329 options and options not valid for the current language.
7330
d5398058
PP
73312015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7332
7333 * c-indentation.c (should_warn_for_misleading_indentation):
7334 Float out and consolidate the calls to get_visual_column that
7335 are passed guard_exploc as an argument. Compare
7336 next_stmt_vis_column with guard_line_first_nws instead of with
7337 body_line_first_nws.
7338
6b333269
NS
73392015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7340
7341 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7342 Wnamespaces): New C++ warnings.
7343
a75f1574
JM
73442015-09-22 Jason Merrill <jason@redhat.com>
7345
7346 * c-common.h (abi_compat_version_crosses): New.
7347 (warn_abi_version): Declare.
7348 * c-common.c: Define it.
7349 * c-opts.c (c_common_post_options): Handle it.
7350 flag_abi_compat_version defaults to 8.
7351
bdaaa8b7
VV
73522015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7353
7354 Complete the implementation of N4230, Nested namespace definition.
7355 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7356 __cpp_nested_namespace_definitions.
7357
eaa797e8
MLI
73582015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7359
7360 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7361
c4914de6
MLI
73622015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7363
7364 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7365 when warning.
7366 * c-pragma.h (pragma_lex): Add optional loc argument.
7367
fcb87c50
MM
73682015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7369
7370 * c-format.c (check_format_arg): Adjust to use common block size in all
7371 object pools.
7372
31bdd08a
DM
73732015-09-15 David Malcolm <dmalcolm@redhat.com>
7374
7375 * c-format.c (location_from_offset): Update for change in
7376 signature of location_get_source_line.
7377 * c-indentation.c (get_visual_column): Likewise.
7378 (line_contains_hash_if): Likewise.
7379
aa9f4b4c
MP
73802015-09-14 Marek Polacek <polacek@redhat.com>
7381
7382 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7383 setting various warnings.
7384
aa256c4a
MP
73852015-09-14 Marek Polacek <polacek@redhat.com>
7386
7387 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7388 a negative value.
7389
0f876f22
MW
73902015-09-11 Mark Wielaard <mjw@redhat.com>
7391
7392 PR c/28901
7393 * c.opt (Wunused-variable): Option from common.opt.
7394 (Wunused-const-variable): New option.
7395
273aa49e
PC
73962015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7397
7398 PR c++/53184
7399 * c.opt ([Wsubobject-linkage]): Add.
7400
1807ffc1
MS
74012015-09-03 Martin Sebor <msebor@redhat.com>
7402
7403 PR c/66516
7404 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7405 functions.
7406 * c-common.c (reject_gcc_builtin): Define.
7407
38942840
BI
74082015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7409
7410 PR middle-end/60586
7411 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7412 prototype.
7413 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7414 cilk_gimplify_call_params_in_spawned_fn.
7415 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7416 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7417 unwrapping.
7418
c316b5e4
MP
74192015-08-25 Marek Polacek <polacek@redhat.com>
7420
7421 PR middle-end/67330
7422 * c-common.c (handle_weak_attribute): Don't check whether the
7423 visibility can be changed here.
7424
584a7c46
MLI
74252015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7426
7427 * c-lex.c (c_lex_with_flags): Use explicit locations.
7428
a79683d5
TS
74292015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7430
7431 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7432 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7433
61717a45
FXC
74342015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7435
7436 PR middle-end/36757
7437 * c-common.c (check_builtin_function_arguments): Add check
7438 for BUILT_IN_SIGNBIT argument.
7439
329524f5
PC
74402015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7441
7442 PR c++/67160
7443 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7444 in c++1z mode.
7445
4ee55665
MP
74462015-08-17 Marek Polacek <polacek@redhat.com>
7447
7448 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7449 with whitespaces before qualifier names.
7450
b893e375
MP
74512015-08-12 Marek Polacek <polacek@redhat.com>
7452
7453 PR c++/55095
7454 * c-common.c (maybe_warn_shift_overflow): Properly handle
7455 left-shifting 1 into the sign bit.
7456
c2d89095
MLI
74572015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7458
7459 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7460
971e17ff
AS
74612015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7462 Braden Obrzut <admin@maniacsvault.net>
7463 Jason Merrill <jason@redhat.com>
7464
7465 Add C++ Concepts TS support.
7466 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7467 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7468 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7469 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7470 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7471 * c.opt (fconcepts): New.
7472
b3d5bc62
JJ
74732015-08-02 Martin Sebor <msebor@redhat.com>
7474
7475 * c.opt (-Wframe-address): New warning option.
7476
8ebca419
PP
74772015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7478
7479 * c-indentation.c (should_warn_for_misleading_indentation):
7480 Improve heuristics.
7481
1a1e101f
PP
74822015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7483
7484 * c-indentation.c (get_visual_column): Add parameter first_nws,
7485 use it. Update comment documenting the function.
7486 (is_first_nonwhitespace_on_line): Remove.
7487 (should_warn_for_misleading_indentation): Replace usage of
7488 of is_first_nonwhitespace_on_line with get_visual_column.
7489
992118a1
PP
74902015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7491
7492 * c-indentation.h (struct token_indent_info): Define.
7493 (get_token_indent_info): Define.
7494 (warn_for_misleading_information): Declare.
7495 * c-common.h (warn_for_misleading_information): Remove.
7496 * c-identation.c (warn_for_misleading_indentation):
7497 Change declaration to take three token_indent_infos. Adjust
7498 accordingly.
7499 * c-identation.c (should_warn_for_misleading_indentation):
7500 Likewise. Bail out early if the body is a compound statement.
7501 (guard_tinfo_to_string): Define.
7502
e8fa3817
JM
75032015-07-30 Jason Merrill <jason@redhat.com>
7504
7505 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7506 '*' for reference decay.
7507
173864e8
MP
75082015-07-30 Marek Polacek <polacek@redhat.com>
7509
7510 * c-common.c (warn_tautological_cmp): Bail for float types.
7511
f2afe6dd
MP
75122015-07-27 Marek Polacek <polacek@redhat.com>
7513
7514 PR bootstrap/67030
7515 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7516
05b28fd6
MP
75172015-07-27 Marek Polacek <polacek@redhat.com>
7518
7519 PR c++/66555
7520 PR c/54979
7521 * c-common.c (find_array_ref_with_const_idx_r): New function.
7522 (warn_tautological_cmp): New function.
7523 * c-common.h (warn_tautological_cmp): Declare.
7524 * c.opt (Wtautological-compare): New option.
7525
5a5062b8
MP
75262015-07-23 Marek Polacek <polacek@redhat.com>
7527
7528 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7529 (ubsan_instrument_shift): Likewise.
7530
dc891fe7
MP
75312015-07-23 Marek Polacek <polacek@redhat.com>
7532
7533 PR sanitizer/66908
7534 * c-ubsan.c: Include gimplify.h.
7535 (ubsan_instrument_division): Unshare OP0 and OP1.
7536 (ubsan_instrument_shift): Likewise.
7537
451b5e48
MP
75382015-07-20 Marek Polacek <polacek@redhat.com>
7539 Richard Sandiford <richard.sandiford@arm.com>
7540
7541 PR c++/55095
7542 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7543 Use EXPR_LOC_OR_LOC.
7544 (maybe_warn_shift_overflow): New function.
7545 * c-common.h (maybe_warn_shift_overflow): Declare.
7546 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7547 * c.opt (Wshift-overflow): New option.
7548
fb0b2914
ML
75492015-07-16 Martin Liska <mliska@suse.cz>
7550
7551 * c-format.c (static void check_format_info_main): Use
7552 object_allocator instead of pool_allocator.
7553 (check_format_arg): Likewise.
7554 (check_format_info_main): Likewise.
7555
903f5c23
AM
75562015-07-15 Andrew MacLeod <amacleod@redhat.com>
7557
7558 * c-opts.c: Remove multiline #include comment.
7559
026c3cfd
AH
75602015-07-12 Aldy Hernandez <aldyh@redhat.com>
7561
7562 * c-common.c: Fix double word typos.
7563
bb49ee66
EB
75642015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7565
7566 * c-ada-spec.h (cpp_operation): Revert latest change.
7567 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7568 constructors and destructors.
7569
1916bcb5
AM
75702015-07-09 Andrew MacLeod <amacleod@redhat.com>
7571
7572 * c-common.h: Adjust includes for flags.h changes.
7573 * stub-objc.c: Likewise.
026c3cfd 7574
a9dcd529
EB
75752015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7576
7577 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7578 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7579
b03b462f
JJ
75802015-07-08 Jakub Jelinek <jakub@redhat.com>
7581
7582 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7583 are to be removed, return NULL rather than original clauses list.
7584
c7131fb2
AM
75852015-07-07 Andrew MacLeod <amacleod@redhat.com>
7586
7587 * array-notation-common.c: Adjust includes.
7588 * c-ada-spec.c: Likewise.
7589 * c-cilkplus.c: Likewise.
7590 * c-common.h: Likewise.
7591 * c-cppbuiltin.c: Likewise.
7592 * c-dump.c: Likewise.
7593 * c-format.c: Likewise.
7594 * c-gimplify.c: Likewise.
7595 * c-indentation.c: Likewise.
7596 * c-lex.c: Likewise.
7597 * c-omp.c: Likewise.
7598 * c-opts.c: Likewise.
7599 * c-pch.c: Likewise.
7600 * c-ppoutput.c: Likewise.
7601 * c-pragma.c: Likewise.
7602 * c-pretty-print.c: Likewise.
7603 * c-semantics.c: Likewise.
7604 * c-ubsan.c: Likewise.
7605 * cilk.c: Likewise.
7606 * stub-objc.c: Likewise.
7607
2a7fb83f
EB
76082015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7609
7610 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7611 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7612
a03c9bf1
JM
76132015-07-01 Jason Merrill <jason@redhat.com>
7614
36a85135
JM
7615 * c-common.h (D_CXX11): Rename from D_CXX0X.
7616 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7617 * c-common.c: Adjust.
7618
e7fa68d5
JM
7619 * c-opts.c (c_common_post_options): Default to C++14.
7620
a03c9bf1
JM
7621 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7622
fe95b036
ESR
76232015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7624
7625 Implement N4197 - Adding u8 character literals
b3d5bc62 7626 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7627 CPP_CHAR.
b3d5bc62 7628 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7629 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7630 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7631 and CPP_UTF8CHAR tokens.
7632 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7633
da2e71c9
MLI
76342015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7635
7636 PR fortran/66605
7637 * c-common.c (do_warn_unused_parameter): Move here.
7638 * c-common.h (do_warn_unused_parameter): Declare.
7639
b155cfd9
MP
76402015-06-29 Marek Polacek <polacek@redhat.com>
7641
7642 PR c/66322
7643 * c-common.c (check_case_bounds): Add bool * parameter. Set
7644 OUTSIDE_RANGE_P.
7645 (c_add_case_label): Add bool * parameter. Pass it down to
7646 check_case_bounds.
7647 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7648 warning here.
7649 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7650 declarations.
7651
31521951
MP
76522015-06-27 Marek Polacek <polacek@redhat.com>
7653
7654 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7655 or VECTOR_INTEGER_TYPE_P throughout.
7656 * c-gimplify.c: Likewise.
7657
22d03525
MP
76582015-06-26 Marek Polacek <polacek@redhat.com>
7659
7660 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7661 * c-common.c (c_fully_fold_internal): Likewise.
7662 (c_alignof_expr): Likewise.
7663 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7664 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7665 * cilk.c (create_parm_list): Likewise.
22d03525 7666
af05e6e5
MP
76672015-06-26 Marek Polacek <polacek@redhat.com>
7668
7669 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7670
f0889939
AM
76712015-06-25 Andrew MacLeod <amacleod@redhat.com>
7672
7673 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7674 * c-gimplify.c: Likewise.
7675 * c-pragma.c: Likewise.
7676 * c-ubsan.c: Likewise.
7677 * cilk.c: Likewise.
7678
ca752f39
RS
76792015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7680
7681 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7682 ggc_hasher.
7683
16a16ec7
AM
76842015-06-25 Andrew MacLeod <amacleod@redhat.com>
7685
7686 * cilk.c: Move calls.h after tm.h in the include chain.
7687
0ae9bd27
MP
76882015-06-25 Marek Polacek <polacek@redhat.com>
7689
7690 * array-notation-common.c: Use VAR_P throughout.
7691 * c-ada-spec.c: Likewise.
7692 * c-common.c: Likewise.
7693 * c-format.c: Likewise.
7694 * c-gimplify.c: Likewise.
7695 * c-omp.c: Likewise.
7696 * c-pragma.c: Likewise.
7697 * c-pretty-print.c: Likewise.
7698 * cilk.c: Likewise.
7699
62f9079a
MP
77002015-06-25 Marek Polacek <polacek@redhat.com>
7701
7702 * cilk.c (extract_free_variables): Use is_global_var.
7703
0fa16060
RS
77042015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7705
7706 * c-common.c: Don't include target-def.h.
7707
a68ae2e1
MP
77082015-06-23 Marek Polacek <polacek@redhat.com>
7709
7710 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7711 when comparing INTEGER_CSTs.
7712
c6a2f2d9
PMR
77132015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7714
7715 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7716 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7717 (dump_ada_template): Skip partially specialized types.
7718
6b4db501
MM
77192015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7720
7721 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7722 swapping.
7723
abb226c9
AM
77242015-06-17 Andrew MacLeod <amacleod@redhat.com>
7725
7726 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7727 * c-ada-spec.c: Likewise.
7728 * c-cilkplus.c: Likewise.
7729 * c-common.c: Likewise.
7730 * c-common.h: Likewise.
7731 * c-cppbuiltin.c: Likewise.
7732 * c-dump.c: Likewise.
7733 * c-format.c: Likewise.
7734 * c-gimplify.c: Likewise.
7735 * c-indentation.c: Likewise.
7736 * c-lex.c: Likewise.
7737 * c-omp.c: Likewise.
7738 * c-opts.c: Likewise.
7739 * c-pch.c: Likewise.
7740 * c-ppoutput.c: Likewise.
7741 * c-pragma.c: Likewise.
7742 * c-pretty-print.c: Likewise.
7743 * c-semantics.c: Likewise.
7744 * c-ubsan.c: Likewise.
7745 * cilk.c: Likewise.
7746 * stub-objc.c: Likewise.
7747
076fecad
PP
77482015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7749
7750 PR c++/65168
7751 * c-common.c (c_common_truthvalue_conversion): Warn when
7752 converting an address of a reference to a truth value.
7753
13fdf2e2
AM
77542015-06-08 Andrew MacLeod <amacleod@redhat.com>
7755
7756 * array-notation-common.c : Adjust include files.
7757 * c-ada-spec.c : Likewise.
7758 * c-cilkplus.c : Likewise.
7759 * c-common.c : Likewise.
7760 * c-common.h : Likewise.
7761 * c-cppbuiltin.c : Likewise.
7762 * c-dump.c : Likewise.
7763 * c-format.c : Likewise.
7764 * c-gimplify.c : Likewise.
7765 * c-indentation.c : Likewise.
7766 * c-lex.c : Likewise.
7767 * c-omp.c : Likewise.
7768 * c-opts.c : Likewise.
7769 * c-pch.c : Likewise.
7770 * c-ppoutput.c : Likewise.
7771 * c-pragma.c : Likewise.
7772 * c-pretty-print.c : Likewise.
7773 * c-semantics.c : Likewise.
7774 * c-ubsan.c : Likewise.
7775 * cilk.c : Likewise.
7776 * stub-objc.c : Likewise.
7777
a1661b90
MP
77782015-06-08 Marek Polacek <polacek@redhat.com>
7779
7780 PR c/66415
7781 * c-format.c (location_from_offset): Return LOC if LINE is null.
7782
d7438551
AH
77832015-06-05 Aldy Hernandez <aldyh@redhat.com>
7784
7785 * c-common.h (c_parse_final_cleanups): New prototype.
7786 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7787
b3d5bc62
JJ
77882015-06-04 Sriraman Tallam <tmsriram@google.com>
7789
7790 * c-common.c (noplt): New attribute.
7791 (handle_noplt_attribute): New handler.
7792
ecb9f223
AM
77932015-06-04 Andrew MacLeod <amacleod@redhat.com>
7794
7795 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7796 * c-ada-spec.c: Likewise.
7797 * c-cilkplus.c: Likewise.
7798 * c-common.c: Likewise.
7799 * c-common.h: Likewise.
7800 * c-cppbuiltin.c: Likewise.
7801 * c-dump.c: Likewise.
7802 * c-format.c: Likewise.
7803 * c-gimplify.c: Likewise.
7804 * c-indentation.c: Likewise.
7805 * c-lex.c: Likewise.
7806 * c-omp.c: Likewise.
7807 * c-opts.c: Likewise.
7808 * c-pch.c: Likewise.
7809 * c-ppoutput.c: Likewise.
7810 * c-pragma.c: Likewise.
7811 * c-pretty-print.c: Likewise.
7812 * c-semantics.c: Likewise.
7813 * c-ubsan.c: Likewise.
7814 * cilk.c: Likewise.
7815 * stub-objc.c: Likewise.
7816
6ac48155
DM
78172015-06-02 David Malcolm <dmalcolm@redhat.com>
7818
7819 PR c/66220:
7820 * c-indentation.c (should_warn_for_misleading_indentation): Use
7821 expand_location rather than expand_location_to_spelling_point.
7822 Don't warn if the guarding statement is more indented than the
7823 next/body stmts.
7824
773ce42e
DM
78252015-06-02 David Malcolm <dmalcolm@redhat.com>
7826
7827 * c-indentation.c (warn_for_misleading_indentation): Bail out
7828 immediately if -Wmisleading-indentation isn't enabled.
7829
4fef8379
ML
78302015-06-01 Martin Liska <mliska@suse.cz>
7831
7832 * c-format.c (check_format_arg):Use new type-based pool allocator.
7833 (check_format_info_main) Likewise.
7834
1edfb384
EB
78352015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7836
7837 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7838 (has_nontrivial_methods): Likewise.
7839
9677ef52
MP
78402015-05-25 Marek Polacek <polacek@redhat.com>
7841
7842 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7843
fd5c817a
MP
78442015-05-22 Marek Polacek <polacek@redhat.com>
7845
7846 PR c/47043
7847 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7848
a2f45fe6 78492015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7850
7851 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7852 STACK_GROWS_DOWNWARD.
7853
a2f45fe6 78542015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7855
7856 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7857 STACK_GROWS_DOWNWARD rather than if it is defined.
7858
0fee2ac2 78592015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7860
0fee2ac2
MLI
7861 PR c/52952
7862 * c-format.c (location_column_from_byte_offset): New.
7863 (location_from_offset): New.
7864 (struct format_wanted_type): Add offset_loc field.
7865 (check_format_info): Move handling of location for extra arguments
7866 closer to the point of warning.
7867 (check_format_info_main): Pass the result of location_from_offset
7868 to warning_at.
7869 (format_type_warning): Pass the result of location_from_offset
7870 to warning_at.
7871
cf4ef6f7
MP
78722015-05-20 Marek Polacek <polacek@redhat.com>
7873
7874 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7875
3a65ee74
MP
78762015-05-20 Marek Polacek <polacek@redhat.com>
7877
7878 * c-ada-spec.c (dump_sloc): Use DECL_P.
7879
21b634ae
MP
78802015-05-20 Marek Polacek <polacek@redhat.com>
7881
7882 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7883 * c-common.c: Likewise.
7884
0e50b624
DM
78852015-05-19 David Malcolm <dmalcolm@redhat.com>
7886
7887 * c-common.h (fe_file_change): Strengthen param from
7888 const line_map * to const line_map_ordinary *.
7889 (pp_file_change): Likewise.
7890 * c-lex.c (fe_file_change): Likewise.
7891 (cb_define): Use linemap_check_ordinary when invoking
7892 SOURCE_LINE.
7893 (cb_undef): Likewise.
7894 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7895 invoking cb_file_change.
7896 (c_finish_options): Likewise.
7897 (push_command_line_include): Likewise.
7898 (cb_file_change): Strengthen param "new_map" from
7899 const line_map * to const line_map_ordinary *.
7900 * c-ppoutput.c (cb_define): Likewise for local "map".
7901 (pp_file_change): Likewise for param "map" and local "from".
7902
fab27f52
MM
79032015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7904
7905 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7906
2fe1d762
TV
79072015-05-18 Tom de Vries <tom@codesourcery.com>
7908
7909 * c-common.c (build_va_arg_1): New function.
7910 (build_va_arg): Add address operator to va_list operand if necessary.
7911
7a37fa90
MM
79122015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7913
7914 PR c/48956
7915 * c-common.c (int_safely_convertible_to_real_p): Define.
7916 (unsafe_conversion_p): Check conversions involving complex types.
7917 (conversion_warning): Add new warning message for conversions which
7918 discard imaginary component.
7919 * c-common.h: (enum conversion_safety): Add new enumerator for such
7920 conversions.
7921
3aa3c9fc
MP
79222015-05-14 Marek Polacek <polacek@redhat.com>
7923
7924 PR c/66066
7925 PR c/66127
7926 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7927 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7928 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7929 use it. If FOR_INT_CONST, require that all evaluated operands be
7930 INTEGER_CSTs.
7931
c3388e62
DM
79322015-05-12 David Malcolm <dmalcolm@redhat.com>
7933
7934 * c-common.h (warn_for_misleading_indentation): New prototype.
7935 * c-indentation.c: New file.
7936 * c.opt (Wmisleading-indentation): New option.
7937
c7b38fd5
TV
79382015-05-12 Tom de Vries <tom@codesourcery.com>
7939
7940 PR tree-optimization/66010
7941 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7942
381bf11e
JM
79432015-05-09 Jason Merrill <jason@redhat.com>
7944
edff0c06
JM
7945 * c-opts.c (c_common_post_options): Also clear
7946 cpp_opts->cpp_warn_cxx11_compat.
7947
129211bc
JM
7948 * c-common.h (enum cxx_dialect): Add cxx_unset.
7949 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7950 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7951
381bf11e
JM
7952 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7953 (std=gnu++0x): Mark as Undocumented.
7954 (std=gnu++1y): Add deprecated message.
7955
fe191308
JM
79562015-05-08 Jason Merrill <jason@redhat.com>
7957
765189ff
JM
7958 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7959 * c-opts.c: Adjust.
7960
fe191308
JM
7961 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7962
755e528f
MP
79632015-05-08 Marek Polacek <polacek@redhat.com>
7964
7965 PR c/64918
7966 * c.opt (Woverride-init-side-effects): New option.
7967
0173bd2a
MP
79682015-05-07 Marek Polacek <polacek@redhat.com>
7969
7970 PR c/65179
7971 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7972 negative value.
7973 * c.opt (Wshift-negative-value): New option.
7974 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7975 when -Wextra and C99/C++11 mode.
7976
e0f0d3b9
MP
79772015-05-07 Marek Polacek <polacek@redhat.com>
7978 Martin Uecker <uecker@eecs.berkeley.edu>
7979
7980 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7981 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7982
8243e2a9
JM
79832015-05-05 Jason Merrill <jason@redhat.com>
7984
7985 * c.opt (Wterminate): New.
7986
577cd070
MP
79872015-04-30 Marek Polacek <polacek@redhat.com>
7988
7989 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7990 require that the non-constant be of a boolean type.
7991
0373796b
JT
79922015-04-29 Josh Triplett <josh@joshtriplett.org>
7993
e0f0d3b9
MP
7994 * c-common.c (handle_section_attribute): Refactor to reduce
7995 nesting and distinguish between error cases.
0373796b 7996
716c0ba6
MP
79972015-04-29 Marek Polacek <polacek@redhat.com>
7998
7999 PR c/64610
8000 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8001 with 0/1.
8002
8848828b
JJ
80032015-04-29 Jakub Jelinek <jakub@redhat.com>
8004
8005 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8006 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8007 HOST_BITS_PER_WIDE_INT.
8008
ecd0e562
TV
80092015-04-28 Tom de Vries <tom@codesourcery.com>
8010
8011 PR tree-optimization/65887
8012 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8013
2a877204 80142015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8015 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8016
8017 * c-ada-spec.c (in_function): Delete.
8018 (dump_generic_ada_node): Do not change in_function and remove the
8019 redundant code dealing with it.
8020 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8021 (print_ada_methods): Output the static member functions in a nested
8022 package after the regular methods as well as associated renamings.
8023
4853031e
MP
80242015-04-24 Marek Polacek <polacek@redhat.com>
8025
8026 PR c/65830
8027 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8028 and OPT_Wshift_count_overflow.
8029
8c2b7f79
MP
8030 PR c/63357
8031 * c-common.c (warn_logical_operator): Warn if the operands have the
8032 same expressions.
8033
b8787813
MP
80342015-04-24 Marek Polacek <polacek@redhat.com>
8035
8036 PR c/61534
8037 * c-common.c (warn_logical_operator): Bail if either operand comes
8038 from a macro expansion.
8039
8fba1830
BRF
80402015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8041
8042 PR target/55143
8043 * c-common.c (c_default_pointer_mode): Add definition.
8044 * c-common.h (c_default_pointer_mode): Add declaration.
8045
17958621
JJ
80462015-03-11 Jakub Jelinek <jakub@redhat.com>
8047
8048 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8049 on record_builtin_type argument.
8050
7ccb1a11
JJ
80512015-03-10 Jakub Jelinek <jakub@redhat.com>
8052
8053 PR c/65120
8054 * c-common.c (warn_logical_not_parentheses): Don't warn for
8055 !x == 0 or !x != 0.
8056
04fd785e
MP
80572015-03-07 Marek Polacek <polacek@redhat.com>
8058
8059 PR sanitizer/65280
8060 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8061 before trying to figure out whether we have a flexible array member.
8062
a4e26206 80632015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8064 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8065
8066 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8067
0d2489f4
EB
80682015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8069
8070 PR ada/65319
8071 * c-ada-spec.c (print_destructor): Remove obsolete code.
8072
83ed54d7
EB
80732015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8074
8075 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8076 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8077 DECL_TEMPLATE_RESULT emulations.
8078 (dump_ada_template)): Add guard for TYPE_METHODS.
8079
7631f0e2
MP
80802015-02-27 Marek Polacek <polacek@redhat.com>
8081
8082 PR c/65040
8083 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8084
d1783ae5
KT
80852015-02-27 Kai Tietz <ktietz@redhat.com>
8086
8087 PR c/35330
8088 * c-pragma.c (handle_pragma_weak): Do not try to create
8089 weak/alias of declarations not being function, or variable
8090 declarations.
8091
56a9f6bc
TS
80922015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8093
8094 PR libgomp/64625
8095 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8096 Remove macros.
8097 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8098
3d5cb23d
MP
80992015-02-16 Marek Polacek <polacek@redhat.com>
8100
8101 PR c/65066
8102 * c-format.c (check_format_types): Handle null param.
8103
fa008882
MP
81042015-02-13 Marek Polacek <polacek@redhat.com>
8105
8106 PR c/65040
8107 * c-format.c (check_format_types): Don't warn about different
8108 signedness if the original value is in the range of WANTED_TYPE.
8109
785f21af
JM
81102015-02-12 Jason Merrill <jason@redhat.com>
8111
8112 PR c++/64956
8113 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8114 to the current highest version.
8115 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8116
4886ec8e
JJ
81172015-02-04 Jakub Jelinek <jakub@redhat.com>
8118
8119 PR c/64824
8120 PR c/64868
8121 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8122 instead of RDIV_EXPR. Use build_binary_op instead of
8123 build2_loc.
8124
40fecdd6
JM
81252015-01-30 Joseph Myers <joseph@codesourcery.com>
8126
8127 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8128 to pass input_location as first argument.
8129
a0c88d06
TV
81302015-01-23 Tom de Vries <tom@codesourcery.com>
8131
8132 PR libgomp/64672
8133 * c.opt (fopenacc): Mark as LTO option.
8134
1506ae0e
TV
81352015-01-23 Tom de Vries <tom@codesourcery.com>
8136
8137 PR libgomp/64707
8138 * c.opt (fopenmp): Mark as LTO option.
8139
31be63ab
JJ
81402015-01-21 Jakub Jelinek <jakub@redhat.com>
8141
8142 PR c/63307
b1726d6c 8143 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8144 (compare_decls): Fix up formatting.
8145
81462015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8147
8148 PR c/63307
8149 * cilk.c: Include vec.h.
8150 (struct cilk_decls): New structure.
8151 (wrapper_parm_cb): Split this function to...
8152 (fill_decls_vec): ...this...
8153 (create_parm_list): ...and this.
8154 (compare_decls): New function.
8155 (for_local_cb): Remove.
8156 (wrapper_local_cb): Ditto.
8157 (build_wrapper_type): For now first traverse and fill vector of
8158 declarations then sort it and then deal with sorted vector.
8159 (cilk_outline): Ditto.
8160 (declare_one_free_variable): Ditto.
8161
6875457f
JM
81622015-01-21 Jason Merrill <jason@redhat.com>
8163
8164 PR c++/64629
8165 * c-format.c (check_format_arg): Call decl_constant_value.
8166
185c9e56
ML
81672015-01-19 Martin Liska <mliska@suse.cz>
8168
8169 * c-common.c (handle_noicf_attribute): New function.
8170
41dbbb37
TS
81712015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8172 Bernd Schmidt <bernds@codesourcery.com>
8173 James Norris <jnorris@codesourcery.com>
8174 Cesar Philippidis <cesar@codesourcery.com>
8175 Ilmir Usmanov <i.usmanov@samsung.com>
8176 Jakub Jelinek <jakub@redhat.com>
8177
8178 * c.opt (fopenacc): New option.
8179 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8180 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8181 New macros.
8182 * c-common.h (c_finish_oacc_wait): New prototype.
8183 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8184 (c_finish_oacc_wait): New function.
8185 * c-pragma.c (oacc_pragmas): New variable.
8186 (c_pp_lookup_pragma, init_pragma): Handle it.
8187 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8188 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8189 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8190 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8191 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8192 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8193 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8194 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8195 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8196 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8197 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8198 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8199 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8200 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8201 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8202 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8203 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8204 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8205 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8206 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8207 PRAGMA_OACC_CLAUSE_WORKER.
8208
3f8257db 82092015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8210
8211 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8212 for the new option fstack-protector_explicit.
8213 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8214 (handle_stack_protect_attribute): New function.
8215
3f8257db 82162015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8217
8218 * c.opt: New option -Warray-bounds=.
8219
adfac8df
JJ
82202015-01-09 Michael Collison <michael.collison@linaro.org>
8221
8222 * array-notation-common.c: Include hash-set.h, machmode.h,
8223 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8224 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8225 * c-ada-spec.c: Ditto.
8226 * c-cilkplus.c: Ditto.
8227 * c-common.c: Include input.h due to flattening of tree.h.
8228 Define macro GCC_C_COMMON_C.
8229 * c-common.h: Flatten tree.h header files into c-common.h.
8230 Remove include of tree-core.h.
8231 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8232 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8233 fold-const.h, wide-int.h, and inchash.h due to
8234 flattening of tree.h.
8235 * c-dump.c: Ditto.
8236 * c-format.c: Flatten tree.h header files into c-common.h.
8237 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8238 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8239 fold-const.h, wide-int.h, and inchash.h due to
8240 flattening of tree.h.
8241 * c-dump.c: Include hash-set.h, machmode.h,
8242 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8243 fold-const.h, wide-int.h, and inchash.h due to
8244 flattening of tree.h.
8245 * c-format.c: Include hash-set.h, machmode.h,
8246 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8247 fold-const.h, wide-int.h, inchash.h and real.h due to
8248 flattening of tree.h.
8249 * c-gimplify.c: Include hash-set.h, machmode.h,
8250 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8251 fold-const.h, wide-int.h, and inchash.h due to
8252 flattening of tree.h.
8253 * cilk.c: Ditto.
8254 * c-lex.c: Ditto.
8255 * c-omp.c: Ditto.
8256 * c-opts.c: Ditto.
8257 * c-pch.c: Ditto.
8258 * c-ppoutput.c: Ditto.
8259 * c-pragma.c: Ditto.
8260 * c-pretty-print.c: Ditto.
8261 * c-semantics.c: Ditto.
8262 * c-ubsan.c: Ditto.
8263 * stub-objc.c: Ditto.
8264
f5481fc4
JM
82652015-01-08 Jason Merrill <jason@redhat.com>
8266
8267 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8268 do_ubsan_in_current_function.
8269 (ubsan_maybe_instrument_reference_or_call): Likewise.
8270 * c-ubsan.h: Declare it.
8271
de35aa66
MS
82722015-01-08 Mike Stump <mikestump@comcast.net>
8273
8274 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8275
4a9a42ab
MP
82762015-01-07 Marek Polacek <polacek@redhat.com>
8277
8278 PR c/64440
8279 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8280 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8281
2f42e5de
TS
82822015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8283
8284 PR c++/31397
8285 * c.opt (Wsuggest-override): New option.
8286
5624e564
JJ
82872015-01-05 Jakub Jelinek <jakub@redhat.com>
8288
8289 Update copyright years.
8290
5bd012f8
MP
82912015-01-05 Marek Polacek <polacek@redhat.com>
8292
8293 PR c/64423
8294 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8295 parameter. Use it.
8296 * c-common.h (warn_array_subscript_with_type_char): Update
8297 declaration.
8298
a7fa8d18
ESR
82992014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8300
8301 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8302 Control macro with flag_sized_deallocation.
8303
3f8257db 83042014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8305
8306 * c.opt (Wdiscarded-array-qualifiers): New option.
8307
1f8d3e84
JJ
83082014-12-19 Jakub Jelinek <jakub@redhat.com>
8309
8310 PR preprocessor/63831
8311 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8312 and __has_cpp_attribute here.
8313 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8314 c_common_has_attribute.
8315 * c-common.h (c_common_has_attribute): New prototype.
8316 * c-lex.c (init_c_lex): Set cb->has_attribute to
8317 c_common_has_attribute instead of cb_has_attribute.
8318 (get_token_no_padding): New function.
8319 (cb_has_attribute): Renamed to ...
8320 (c_common_has_attribute): ... this. No longer static. Use
8321 get_token_no_padding, require ()s, don't build TREE_LIST
8322 unnecessarily, fix up formatting, adjust diagnostics, call
8323 init_attributes.
8324
20b06add
JM
83252014-12-15 Jason Merrill <jason@redhat.com>
8326
8327 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8328 (-Wsized-deallocation): New.
8329 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8330 to on in C++14 and up.
8331
94a073b2
JM
83322014-12-11 Jason Merrill <jason@redhat.com>
8333
acaa5911
JM
8334 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8335
94a073b2
JM
8336 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8337 we aren't complaining about VLAs.
8338
7fb66c15
MP
83392014-12-06 Marek Polacek <polacek@redhat.com>
8340
8341 PR tree-optimization/64183
8342 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8343 shift-expression if it is integer_type_node. Use types_compatible_p.
8344
b731b390
JJ
83452014-11-29 Jakub Jelinek <jakub@redhat.com>
8346
8347 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8348 last argument from create_tmp_var_raw and create_tmp_var calls.
8349 * cilk.c (gimplify_cilk_spawn): Likewise.
8350 * c-omp.c (c_finish_omp_atomic): Likewise.
8351
6a4da643
MP
83522014-11-28 Marek Polacek <polacek@redhat.com>
8353
8354 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8355 instead of unsigned_type_node.
8356
541e35a6
MP
83572014-11-28 Marek Polacek <polacek@redhat.com>
8358
8359 PR c/63862
8360 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8361 to op1_utype.
8362 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8363 expression to unsigned_type_node.
8364
dcc97066
MW
83652014-11-20 Mark Wielaard <mjw@redhat.com>
8366
8367 PR debug/38757
8368 * c-opts.c (set_std_c89): Set lang_hooks.name.
8369 (set_std_c99): Likewise.
8370 (set_std_c11): Likewise.
8371 (set_std_cxx98): Likewise.
8372 (set_std_cxx11): Likewise.
8373 (set_std_cxx14): Likewise.
8374 (set_std_cxx1z): Likewise.
8375
aa7da51a
JJ
83762014-11-21 Jakub Jelinek <jakub@redhat.com>
8377
8378 PR target/63764
8379 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8380 return type to bool.
009a3480 8381 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8382 (convert_vector_to_pointer_for_subscript): Change return type to
8383 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8384 and copy it into a TARGET_EXPR and use that instead of *vecp
8385 directly.
8386
538dd0b7
DM
83872014-11-19 David Malcolm <dmalcolm@redhat.com>
8388
8389 Merger of git branch "gimple-classes-v2-option-3".
8390 * ChangeLog.gimple-classes: New.
8391 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8392 from being just a vec<gimple> to a vec<gbind *>.
8393
c39a5e99
JJ
83942014-11-18 Jakub Jelinek <jakub@redhat.com>
8395
8396 PR sanitizer/63813
8397 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8398 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8399 get_pointer_alignment for non-pointers. Use ptype, or if it is
8400 reference type, corresponding pointer type, as type of kind
8401 argument.
8402 (ubsan_maybe_instrument_reference,
8403 ubsan_maybe_instrument_member_call): Adjust callers.
8404
8537a4a9
MP
84052014-11-15 Marek Polacek <polacek@redhat.com>
8406
8407 PR middle-end/63884
8408 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8409 for NULL fndecl.
8410 (extract_array_notation_exprs): Return for NULL node.
8411
2079956a
JM
84122014-11-12 Joseph Myers <joseph@codesourcery.com>
8413
8414 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8415 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8416
1304953e
JJ
84172014-11-12 Jakub Jelinek <jakub@redhat.com>
8418
8419 PR c/59708
8420 * c-common.c (check_builtin_function_arguments): Handle
8421 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8422
e5e44252
AK
84232014-11-10 Andi Kleen <ak@linux.intel.com>
8424
8425 PR c/60804
8426 * c-common.h (check_no_cilk): Declare.
8427 * cilk.c (get_error_location): New function.
8428 (check_no_cilk): Dito.
8429
e64b984d
AK
84302014-11-10 Andi Kleen <ak@linux.intel.com>
8431
8432 * cilk.c (recognize_spawn): Use expression location
8433 for error message.
8434
13c21655
PC
84352014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8436
8437 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8438
42fd12b1
ESR
84392014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8440
8441 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8442 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8443 (__cpp_range_based_for, __cpp_initializer_lists,
8444 __cpp_delegating_constructors, __cpp_nsdmi,
8445 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8446 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8447 __has_cpp_attribute.
8448 * c-lex.c (cb_has_attribute): New callback CPP function;
8449 (init_c_lex): Set has_attribute callback.
8450
6f450181
RB
84512014-11-04 Richard Biener <rguenther@suse.de>
8452
8453 * c-common.c (shorten_compare): Do not shorten mixed
8454 DFP and non-DFP compares.
8455
26f0e1d6
ESR
84562014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8457
8458 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8459 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8460 Commentary and rearrangement of tests.
8461 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8462 Commentary and rearrangement of tests.
ab20d992 8463 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8464 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8465
ef4bddc2
RS
84662014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8467
8468 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8469 enum from machine_mode.
8470
c582198b
AM
84712014-10-28 Andrew MacLeod <amacleod@redhat.com>
8472
adfac8df
JJ
8473 * c-common.c: Adjust include files.
8474 * c-gimplify.c: Ditto.
8475 * cilk.c: Ditto.
8476 * c-pragma.c: Ditto.
8477 * c-ubsan.c: Ditto.
c582198b 8478
60393bbc
AM
84792014-10-27 Andrew MacLeod <amacleod@redhat.com>
8480
8481 * c-gimplify.c: Adjust include files.
8482
d723bb7c
MLI
84832014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8484
8485 PR c++/53061
8486 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8487 c_common_initialize_diagnostics.
8488 * c-common.h: Likewise.
8489
90f3520e
MP
84902014-10-24 Marek Polacek <polacek@redhat.com>
8491
8492 PR c/56980
8493 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8494 print "struct"/"union"/"enum" for typedefed names.
8495
59d7607a
MP
84962014-10-23 Marek Polacek <polacek@redhat.com>
8497
8498 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8499 in unsigned type.
8500
d95a2703
JJ
85012014-10-22 Jakub Jelinek <jakub@redhat.com>
8502 Yury Gribov <y.gribov@samsung.com>
8503
8504 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8505 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8506 instead of flag_sanitize_recover as bool flag.
8507
8e6ef852
KY
85082014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8509
8510 * cilk.c: Revert previous change.
8511
948cf550
IZ
85122014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8513
8514 PR c/63307
8515 * cilk.c: Include vec.h.
8516 (struct cilk_decls): New structure.
8517 (wrapper_parm_cb): Split this function to...
8518 (fill_decls_vec): ...this...
8519 (create_parm_list): ...and this.
8520 (compare_decls): New function.
8521 (for_local_cb): Remove.
8522 (wrapper_local_cb): Ditto.
8523 (build_wrapper_type): For now first traverse and fill vector of
8524 declarations then sort it and then deal with sorted vector.
8525 (cilk_outline): Ditto.
8526 (declare_one_free_variable): Ditto.
8527
92574c7c
MP
85282014-10-17 Marek Polacek <polacek@redhat.com>
8529
8530 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8531 * c.opt (Wimplicit-int): Initialize to -1.
8532
83685514
AM
85332014-10-16 Andrew MacLeod <amacleod@redhat.com>
8534
8535 * c-pragma.c: Adjust include files.
8536 * c-semantics.c: Likewise.
8537
5b8300ea
DD
85382014-10-16 DJ Delorie <dj@redhat.com>
8539
8540 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8541 multiples of bytes.
8542
5f83e90b
JM
85432014-10-14 Jason Merrill <jason@redhat.com>
8544
8545 PR c++/63455
8546 * c-common.h (CPP_PREPARSED_EXPR): New.
8547 (N_CP_TTYPES): Adjust.
8548
d73326ca
MP
85492014-10-15 Marek Polacek <polacek@redhat.com>
8550
8551 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8552
78a7c317
DD
85532014-10-14 DJ Delorie <dj@redhat.com>
8554
8555 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8556 types, not just __int128.
8557 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8558 types, not just __int128.
8559 (cpp_atomic_builtins): Round pointer sizes up.
8560 (type_suffix): Use type precision, not specific types.
8561 * c-common.c (c_common_reswords): Remove __int128 special case.
8562 (c_common_type_for_size): Check for all __intN types, not just
8563 __int128.
8564 (c_common_type_for_mode): Likewise.
8565 (c_common_signed_or_unsigned_type): Likewise.
8566 (c_build_bitfield_integer_type): Likewise.
8567 (c_common_nodes_and_builtins): Likewise.
8568 (keyword_begins_type_specifier): Likewise.
8569 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8570 __intN variants.
8571
2a22f99c
TS
85722014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8573
8574 * c-common.c: Use hash_table instead of hashtab.
8575
2a8ef767
ESR
85762014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8577
adfac8df 8578 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8579 C++11 section.
8580
3c9aabbd
MG
85812014-10-03 Marc Glisse <marc.glisse@inria.fr>
8582
8583 PR c++/54427
8584 PR c++/57198
8585 PR c++/58845
8586 * c-common.c (warn_logical_operator): Punt for vectors.
8587
a15f7cb8
ESR
85882014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8589
8590 Implement SD-6: SG10 Feature Test Recommendations
8591 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8592 macros and the __has_header macro.
8593
8d0cf15e
JM
85942014-09-30 Jason Merrill <jason@redhat.com>
8595
dd5d5481
JM
8596 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8597 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8598 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8599
b752325e
JM
8600 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8601 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8602
8d0cf15e
JM
8603 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8604 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8605
083e891e
MP
86062014-09-24 Marek Polacek <polacek@redhat.com>
8607
8608 PR c/61405
8609 PR c/53874
8610 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8611
7861b648
AK
86122014-09-23 Andi Kleen <ak@linux.intel.com>
8613
8614 * c-common.c (handle_no_reorder_attribute): New function.
8615 (c_common_attribute_table): Add no_reorder attribute.
8616
9a79452d
JM
86172014-09-22 Joseph Myers <joseph@codesourcery.com>
8618
8619 * c-cppbuiltin.c (c_cpp_builtins): Define
8620 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8621 modes.
8622
dd69f047
JM
86232014-09-18 Joseph Myers <joseph@codesourcery.com>
8624
8625 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8626 for supported floating-point modes.
8627
737a4826
MLI
86282014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8629
8630 * c.opt (Wpsabi): Use LangEnabledBy.
8631 * c-opts.c (c_common_handle_option): Do not handle here.
8632
8cc4b7a2
JM
86332014-09-12 Joseph Myers <joseph@codesourcery.com>
8634
8635 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8636 macros for floating-point modes.
8637
179b5a55
MG
86382014-09-11 Marc Glisse <marc.glisse@inria.fr>
8639
8640 PR target/58757
8641 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8642 __*_DENORM_MIN__ without denormals.
8643
570a11fe
JJ
86442014-09-10 Jakub Jelinek <jakub@redhat.com>
8645
8646 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8647 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8648 ubsan_create_data callers.
8649 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8650 index is constant or BIT_AND_EXPR with constant mask and is
8651 small enough for the bound.
8652 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8653 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8654
b559c810
MLI
86552014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8656
8657 * c.opt: Add CppReason to various flags.
8658 (Wdate-time): Re-sort.
8659 * c-common.c: Include c-common.h earlier.
8660 (struct reason_option_codes_t): Delete.
8661 (c_option_controlling_cpp_error): Prefix global type and struct
8662 with cpp_.
8663
1ef33fd4
MLI
86642014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8665
8666 * c.opt (Wnormalized): New.
8667 (Wnormalized=): Use Enum and Reject Negative.
8668 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8669
66bb34c0
JM
86702014-09-08 Joseph Myers <joseph@codesourcery.com>
8671
8672 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8673 digits of floating-point modes if -fbuilding-libgcc.
8674
53d68b9f
JM
86752014-09-05 Joseph Myers <joseph@codesourcery.com>
8676
8677 * c-cppbuiltin.c (c_cpp_builtins): Also define
8678 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8679 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8680 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8681 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8682 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8683 __LIBGCC_STACK_GROWS_DOWNWARD__,
8684 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8685 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8686 __LIBGCC_DWARF_FRAME_REGISTERS__,
8687 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8688 __LIBGCC_STACK_POINTER_REGNUM__ and
8689 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8690 (builtin_define_with_value): Handle backslash-escaping in string
8691 macro values.
8692
f65586dc
RB
86932014-09-05 Richard Biener <rguenther@suse.de>
8694
8695 PR middle-end/63148
8696 * c-format.c (check_format_arg): Properly handle
8697 effectively signed POINTER_PLUS_EXPR offset.
8698
2b71f4a4
MLI
86992014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8700
8701 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8702 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8703 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8704 and Init.
8705 * c-opts.c (c_common_handle_option): Do not handle here.
8706 (sanitize_cpp_opts): Likewise.
8707 * c-common.c (struct reason_option_codes_t): Handle
8708 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8709
d2e4feca
MP
87102014-09-03 Marek Polacek <polacek@redhat.com>
8711
8712 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8713
9a771876
JJ
87142014-09-02 Jakub Jelinek <jakub@redhat.com>
8715 Balaji V. Iyer <balaji.v.iyer@intel.com>
8716 Igor Zamyatin <igor.zamyatin@intel.com>
8717
8718 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8719 * c-common.c (c_common_reswords): Added _Cilk_for.
8720 * c-common.h (enum rid): Added RID_CILK_FOR.
8721 (cilk_for_number_of_iterations): Add declaration.
8722 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8723 CILK_FOR.
8724 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8725 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8726
81b5d104
MLI
87272014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8728
8729 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8730 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8731 Wundef): Use CPP, Var and Init.
8732 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8733
b753b37b
MLI
87342014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8735
8736 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8737 * c-opts.c (c_common_handle_option): Do not handle here.
8738
028aee17
JM
87392014-08-25 Jason Merrill <jason@redhat.com>
8740
8741 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8742 -std=c++14 and -std=gnu++14, rather than the reverse.
8743 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8744 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8745 * c-common.h (cxx_dialect): Remove cxx1y.
8746
e4276ba5
ESR
87472014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8748
8749 * c-common.h (enum cxx_dialect): Add cxx14.
8750 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8751 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8752 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8753
a545cacd
JM
87542014-08-22 Jason Merrill <jason@redhat.com>
8755
8756 * c.opt (std=gnu++17): Fix alias.
8757
59ea0364
MP
87582014-08-22 Marek Polacek <polacek@redhat.com>
8759
8760 PR c++/62199
8761 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8762 check for vector types. Drop LHS argument.
8763 * c-common.h (warn_logical_not_parentheses): Adjust.
8764
596e808c
MLI
87652014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8766
8767 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8768 (Wmultichar): Likewise.
8769 (Wdate-time): Use C-family languages instead of Common. Use CPP
8770 and Var.
8771 * c-opts.c (c_common_handle_option): Do not handle the above
8772 options here.
8773 (sanitize_cpp_opts): Likewise.
8774
18767f65
MLI
87752014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8776
8777 PR fortran/44054
8778 * c-opts.c: Include tree-diagnostics.h.
8779 (c_diagnostic_finalizer): New.
8780 (c_common_initialize_diagnostics): Use it.
8781
b4413594
MLI
87822014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8783
8784 PR preprocessor/51303
8785 * c-common.c (struct reason_option_codes_t option_codes):
8786 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8787
43f9a13c
MLI
87882014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8789
8790 PR c/60975
8791 PR c/53063
8792 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8793 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8794 (c_common_post_options): Call init_global_opts_from_cpp.
8795 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8796
04159acf
MP
87972014-08-19 Marek Polacek <polacek@redhat.com>
8798
8799 PR c++/62153
8800 * c-common.c (maybe_warn_bool_compare): New function.
8801 * c-common.h (maybe_warn_bool_compare): Declare.
8802 * c.opt (Wbool-compare): New option.
8803
35aff4fb
MP
88042014-08-19 Marek Polacek <polacek@redhat.com>
8805
8806 * c.opt (Wc99-c11-compat): New option.
8807
177cce46
MP
88082014-08-19 Marek Polacek <polacek@redhat.com>
8809
8810 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8811 to warn_c90_c99_compat.
8812 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8813 to -1.
8814
6ae9194f
MLI
88152014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8816 Steven Bosscher <steven@gcc.gnu.org>
8817
8818 PR c/52952
8819 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8820 format_check_results.
8821 (check_function_format): Use true and add comment for boolean
8822 argument.
8823 (finish_dollar_format_checking): Use explicit location when warning.
8824 (check_format_info): Likewise.
8825 (check_format_arg): Set extra_arg_loc and format_string_loc.
8826 (check_format_info_main): Use explicit location when warning.
8827 (check_format_types): Pass explicit location.
8828 (format_type_warning): Likewise.
8829
8e54f6d3
MLI
88302014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8831
8832 PR fortran/44054
8833 * c-format.c: Handle Fortran flags.
8834
cd4e76fc
IZ
88352014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8836
8837 PR other/61962
8838 * array-notation-common.c (find_rank): Added handling for other
8839 types of references.
8840
f3bede71
MP
88412014-08-10 Marek Polacek <polacek@redhat.com>
8842
8843 PR c/51849
8844 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8845 * c.opt (Wc90-c99-compat): Add option.
8846
9f25a338
TS
88472014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8848
8849 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8850
62e4eb35
MP
88512014-08-03 Marek Polacek <polacek@redhat.com>
8852
ab20d992 8853 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8854 (c_add_case_label): Pass loc to check_case_value.
8855
b787e7a2
TS
88562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8857
8858 * cilk.c: Use hash_map instead of pointer_map.
8859
6e2830c3
TS
88602014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8861
8862 * c-gimplify.c: Use hash_set instead of pointer_set.
8863
a7ee52fb
IZ
88642014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8865
8866 PR middle-end/61455
8867 * array-notation-common.c (extract_array_notation_exprs): Handling
8868 of DECL_EXPR added.
8869
944fa280
JJ
88702014-08-01 Jakub Jelinek <jakub@redhat.com>
8871
8872 * c-common.h (min_align_of_type): Removed prototype.
8873 * c-common.c (min_align_of_type): Removed.
8874 * c-ubsan.h (ubsan_maybe_instrument_reference,
8875 ubsan_maybe_instrument_member_call): New prototypes.
8876 * c-ubsan.c: Include stor-layout.h and builtins.h.
8877 (ubsan_maybe_instrument_reference_or_call,
8878 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8879 functions.
8880
b4dfdc11
MG
88812014-07-31 Marc Glisse <marc.glisse@inria.fr>
8882
8883 PR c++/60517
8884 * c.opt (-Wreturn-local-addr): Move to common.opt.
8885
a41844e5
JM
88862014-07-30 Jason Merrill <jason@redhat.com>
8887
8888 PR c++/61659
8889 PR c++/61687
8890 Revert:
8891 * c.opt (-fuse-all-virtuals): New.
8892
976d5a22
TT
88932014-07-30 Tom Tromey <tromey@redhat.com>
8894
8895 PR c/59855
8896 * c.opt (Wdesignated-init): New option.
8897 * c-common.c (c_common_attribute_table): Add "designated_init".
8898 (handle_designated_init): New function.
8899
cdc94aca
MP
89002014-07-24 Marek Polacek <polacek@redhat.com>
8901
8902 PR c/57653
8903 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8904
f41373b6
DS
89052014-07-16 Dodji Seketeli <dodji@redhat.com>
8906
8907 PR preprocessor/60723 - missing system-ness marks for macro tokens
8908 * c-ppoutput.c (struct print::prev_was_system_token): New data
8909 member.
8910 (init_pp_output): Initialize it.
8911 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8912 (do_line_change): Return a flag saying if a line marker was
8913 emitted or not.
8914 (scan_translation_unit): Detect if the system-ness of the token we
8915 are about to emit is different from the one of the previously
8916 emitted token. If so, emit a line marker. Avoid emitting useless
8917 adjacent line markers. Avoid emitting line markers for tokens
8918 originating from the expansion of built-in macros.
8919 (scan_translation_unit_directives_only): Adjust.
8920
4d661eaa
MP
89212014-07-15 Marek Polacek <polacek@redhat.com>
8922
8923 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8924 TYPE_MAX_VALUE is NULL.
8925
b108f48f
JJ
89262014-07-14 Jakub Jelinek <jakub@redhat.com>
8927
8928 PR middle-end/61294
8929 * c.opt (Wmemset-transposed-args): New warning.
8930
c0221884
JM
89312014-07-10 Jason Merrill <jason@redhat.com>
8932
8933 PR c++/61659
8934 PR c++/61687
8935 * c.opt (-fuse-all-virtuals): New.
8936
63dfbb95
RB
89372014-07-09 Richard Biener <rguenther@suse.de>
8938
8939 PR c-family/61741
8940 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8941 using unsigned arithmetic if overflow does not wrap instead of
8942 if overflow is undefined.
8943
773ec47f
MP
89442014-07-06 Marek Polacek <polacek@redhat.com>
8945
8946 PR c/6940
8947 * c.opt (Wsizeof-array-argument): New option.
8948
00a7ba58
JJ
89492014-07-03 Jakub Jelinek <jakub@redhat.com>
8950
b1726d6c 8951 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8952 comments->count <= 1, as comments->entries might be NULL.
8953
52ec0ea3
MP
89542014-07-01 Marek Polacek <polacek@redhat.com>
8955
8956 * c.opt (Wint-conversion): New option.
8957
d5c3d343
MP
89582014-07-01 Marek Polacek <polacek@redhat.com>
8959
8960 PR c/58286
8961 * c.opt (Wincompatible-pointer-types): New option.
8962
6e7ceb17
PC
89632014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8964
8965 PR c++/51400
8966 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8967 Do not discard TYPE_QUALS of type.
8968
da73100b
JM
89692014-06-26 Jason Merrill <jason@redhat.com>
8970
8971 * c-common.h (enum cxx_dialect): Add cxx1z.
8972 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8973 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8974
08eedf75
TJ
89752014-06-26 Teresa Johnson <tejohnson@google.com>
8976
8977 * c-common.h (get_dump_info): Declare.
8978 * c-gimplify.c (c_genericize): Use saved dump files.
8979 * c-opts.c (c_common_parse_file): Begin and end dumps
8980 once around parsing invocation.
8981 (get_dump_info): New function.
8982
7b56b2f8
MP
89832014-06-23 Marek Polacek <polacek@redhat.com>
8984 Andrew MacLeod <amacleod@redhat.com>
8985
8986 PR c/61553
8987 * c-common.c (get_atomic_generic_size): Don't segfault if the
8988 type doesn't have a size.
8989
0e37a2f3
MP
89902014-06-20 Marek Polacek <polacek@redhat.com>
8991
8992 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8993 (ubsan_walk_array_refs_r): New function.
8994 (c_genericize): Instrument array bounds.
8995 * c-ubsan.c: Include "internal-fn.h".
8996 (ubsan_instrument_division): Mark instrumented arrays as having
8997 side effects. Adjust ubsan_type_descriptor call.
8998 (ubsan_instrument_shift): Likewise.
8999 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9000 (ubsan_instrument_bounds): New function.
9001 (ubsan_array_ref_instrumented_p): New function.
9002 (ubsan_maybe_instrument_array_ref): New function.
9003 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9004 (ubsan_array_ref_instrumented_p): Declare.
9005 (ubsan_maybe_instrument_array_ref): Declare.
9006
90072014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9008
9009 PR lto/61123
9010 * c.opt (fshort-enums): Add to LTO.
9011 * c.opt (fshort-wchar): Likewise.
9012
5c3d09f7
MP
90132014-06-16 Marek Polacek <polacek@redhat.com>
9014
9015 PR c/60439
9016 * c.opt (Wswitch-bool): Add Var.
9017
9cf32741
JJ
90182014-06-12 Jakub Jelinek <jakub@redhat.com>
9019
9020 PR middle-end/61486
9021 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9022 #pragma omp target teams or
9023 #pragma omp {,target }teams distribute simd.
9024
62984918
JM
90252014-06-12 Jason Merrill <jason@redhat.com>
9026
9027 * c.opt (Wabi=, fabi-compat-version): New.
9028 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9029 (c_common_post_options): Handle flag_abi_compat_version default.
9030 Disallow -fabi-compat-version=1.
9031 * c-common.h (abi_version_crosses): New.
9032
f961457f
JH
90332014-06-11 Jan Hubicka <hubicka@ucw.cz>
9034
adfac8df 9035 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9036 section names that are no longer trees.
9037
92d28cbb
JJ
90382014-06-10 Jakub Jelinek <jakub@redhat.com>
9039
9040 PR fortran/60928
9041 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9042 (omp_pragmas): ... back here.
9043
742938c9
MP
90442014-06-05 Marek Polacek <polacek@redhat.com>
9045
9046 PR c/49706
9047 * c-common.c (warn_logical_not_parentheses): New function.
9048 * c-common.h (warn_logical_not_parentheses): Declare.
9049 * c.opt (Wlogical-not-parentheses): New option.
9050
9d548dfb
MP
90512014-06-04 Marek Polacek <polacek@redhat.com>
9052
9053 PR c/30020
9054 * c-common.c (check_case_bounds): Add location parameter.
9055 Use it.
9056 (c_add_case_label): Pass loc to check_case_bounds.
9057
fedfecef
MP
90582014-06-03 Marek Polacek <polacek@redhat.com>
9059
9060 PR c/60439
9061 * c.opt (Wswitch-bool): New option.
9062
f6a7cffc
TS
90632014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9064
040d18b6
TS
9065 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9066 Remove prototypes.
9067 (record_types_used_by_current_var_decl): Move prototype to where
9068 it belongs.
9069
f6a7cffc
TS
9070 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9071 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9072 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9073
632f2871
RS
90742014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9075
9076 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9077 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9078 void_zero_node.
9079 * c-pretty-print.c (pp_c_void_constant): New function.
9080 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9081 (c_pretty_printer::expression): Handle VOID_CST.
9082 * cilk.c (extract_free_variables): Likewise.
9083 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9084 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9085
766090c2
TS
90862014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9087
9088 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9089 * c-pragma.c (push_alignment): Adjust.
9090 (handle_pragma_push_options): Likewise.
9091
661a0813
MP
90922014-05-09 Marek Polacek <polacek@redhat.com>
9093
9094 PR c/50459
9095 * c-common.c (check_user_alignment): Return -1 if alignment is error
9096 node.
9097 (handle_aligned_attribute): Don't call default_conversion on
9098 FUNCTION_DECLs.
9099 (handle_vector_size_attribute): Likewise.
9100 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9101 (handle_sentinel_attribute): Call default_conversion and allow even
9102 integral types as an argument.
9103
2793eeab
MP
91042014-05-08 Marek Polacek <polacek@redhat.com>
9105
9106 PR c/61053
9107 * c-common.c (min_align_of_type): New function factored out from...
9108 (c_sizeof_or_alignof_type): ...here.
9109 * c-common.h (min_align_of_type): Declare.
9110
f827930a
MP
91112014-05-08 Marek Polacek <polacek@redhat.com>
9112
9113 PR c/61077
9114 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9115 parameter type of main.
9116
ca49b74e
DD
91172014-05-07 DJ Delorie <dj@redhat.com>
9118
9119 * c-cppbuiltin.c (print_bits_of_hex): New.
9120 (builtin_define_type_minmax): Print values using hex so as not to
9121 require a pre-computed list of string values.
9122
1d60af08
KZ
91232014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9124 Mike Stump <mikestump@comcast.net>
9125 Richard Sandiford <rdsandiford@googlemail.com>
9126
9127 * c-ada-spec.c: Include wide-int.h.
9128 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9129 (dump_generic_ada_node): Use wide-int interfaces.
9130 * c-common.c: Include wide-int-print.h.
9131 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9132 (pointer_int_sum): Use wide-int interfaces.
9133 (c_common_nodes_and_builtins): Use make_int_cst.
9134 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9135 (handle_alloc_size_attribute): Use wide-int interfaces.
9136 (get_nonnull_operand): Likewise.
9137 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9138 * c-lex.c: Include wide-int.h.
9139 (narrowest_unsigned_type): Take a widest_int rather than two
9140 HOST_WIDE_INTs.
9141 (narrowest_signed_type): Likewise.
9142 (interpret_integer): Update accordingly. Use wide-int interfaces.
9143 (lex_charconst): Use wide-int interfaces.
9144 * c-pretty-print.c: Include wide-int.h.
9145 (pp_c_integer_constant): Use wide-int interfaces.
9146 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9147 INT_CST_LT_UNSIGNED.
9148
b15458be
RB
91492014-05-06 Richard Biener <rguenther@suse.de>
9150
9151 * c-opts.c (c_common_post_options): For -freestanding,
9152 -fno-hosted and -fno-builtin disable pattern recognition
9153 if not enabled explicitely.
9154
6577374e
MP
91552014-05-02 Marek Polacek <polacek@redhat.com>
9156
9157 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9158
d00887e8
MP
91592014-05-01 Marek Polacek <polacek@redhat.com>
9160
9161 PR c/43245
9162 * c.opt (Wdiscarded-qualifiers): Add.
9163
f8ed5150
MP
91642014-04-30 Marek Polacek <polacek@redhat.com>
9165
9166 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9167 INT_MIN / -1 sanitization only for integer types.
9168
45484dcf
MP
91692014-04-25 Marek Polacek <polacek@redhat.com>
9170
9171 PR c/18079
9172 * c-common.c (handle_noinline_attribute): Warn if the attribute
9173 conflicts with always_inline attribute.
9174 (handle_always_inline_attribute): Warn if the attribute conflicts
9175 with noinline attribute.
9176
38e514c0
MP
91772014-04-25 Marek Polacek <polacek@redhat.com>
9178
9179 PR c/60156
9180 * c-common.c (check_main_parameter_types): Warn about variadic main.
9181
44875f92
MS
91822014-04-24 Mike Stump <mikestump@comcast.net>
9183
9184 * c.opt (Wshadow-ivar): Default to on.
9185
dcaaa5a0
DP
91862014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9187
9188 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9189
c07d7c02
MP
91902014-04-23 Marek Polacek <polacek@redhat.com>
9191
9192 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9193
1c33c9b7
JJ
91942014-04-22 Jakub Jelinek <jakub@redhat.com>
9195
9196 PR sanitizer/60275
9197 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9198 if flag_sanitize_undefined_trap_on_error.
9199 (ubsan_instrument_division, ubsan_instrument_shift,
9200 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9201 if !flag_sanitize_recover.
9202
793c625f
MG
92032014-04-22 Marc Glisse <marc.glisse@inria.fr>
9204
9205 PR libstdc++/43622
9206 * c-common.c (registered_builtin_types): Make non-static.
9207 * c-common.h (registered_builtin_types): Declare.
9208
b0f1bf36 92092014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9210 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9211
9212 PR c/60819
9213 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9214 apply may-alias the scalar pointer type when applicable.
9215
3b07fa4a
IZ
92162014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9217
9218 PR middle-end/60467
9219 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9220 as possible argument for Cilk_spawn.
9221
cbbd2b1c
TB
92222014-04-11 Tobias Burnus <burnus@net-b.de>
9223
9224 PR c/60194
9225 * c.opt (Wformat-signedness): Add
9226 * c-format.c(check_format_types): Use it.
9227
6415bd5d
JM
92282014-04-11 Jason Merrill <jason@redhat.com>
9229
9230 PR c++/57926
9231 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9232 default_conversion for an array argument.
9233
6525783a
MP
92342014-04-08 Marek Polacek <polacek@redhat.com>
9235
9236 PR sanitizer/60745
9237 * c-ubsan.c: Include asan.h.
9238 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9239
880a467b
NS
92402014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9241
9242 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9243
7b59ff2d
MP
92442014-04-02 Marek Polacek <polacek@redhat.com>
9245
9246 * c-common.h (c_expand_expr): Remove declaration.
9247
8edbfaa6
JJ
92482014-03-28 Jakub Jelinek <jakub@redhat.com>
9249
9250 PR c++/60689
9251 * c-common.c (add_atomic_size_parameter): When creating new
9252 params vector, push the size argument first.
9253
07d72e1d
JJ
92542014-03-26 Jakub Jelinek <jakub@redhat.com>
9255
9256 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9257 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9258 ubsan_create_data callers.
9259
b35e0fa0
JJ
92602014-03-22 Jakub Jelinek <jakub@redhat.com>
9261
9262 PR debug/60603
9263 * c-opts.c (c_finish_options): Restore cb_file_change call to
9264 <built-in>.
9265
39a1ebb3
JJ
92662014-03-13 Jakub Jelinek <jakub@redhat.com>
9267
9268 PR middle-end/36282
9269 * c-pragma.c (apply_pragma_weak): Only look at
9270 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9271 DECL_ASSEMBLER_NAME_SET_P (decl).
9272 (maybe_apply_pending_pragma_weaks): Exit early if
9273 vec_safe_is_empty (pending_weaks) rather than only when
9274 !pending_weaks.
9275 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9276 set assembler name back to NULL afterwards.
9277
a07f6ed2
JM
92782014-03-11 Jason Merrill <jason@redhat.com>
9279
9280 * c.opt: Add -std=gnu++14.
9281
75b107f5
IB
92822014-03-11 Ian Bolton <ian.bolton@arm.com>
9283
9284 * c-opts.c (c_common_post_options): Don't override
9285 -ffp-contract=fast if unsafe-math-optimizations is on.
9286
f42c637e
PM
92872014-03-08 Paulo Matos <paulo@matos-sorge.com>
9288
22b15758 9289 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9290
70e24808
JM
92912014-03-07 Jason Merrill <jason@redhat.com>
9292
9293 * c.opt: Add -std=c++14.
9294
3af9c5e9
MP
92952014-03-06 Marek Polacek <polacek@redhat.com>
9296
9297 PR c/60197
9298 * cilk.c (contains_cilk_spawn_stmt): New function.
9299 (contains_cilk_spawn_stmt_walker): Likewise.
9300 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9301 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9302
b3bdf019
JJ
93032014-03-03 Jakub Jelinek <jakub@redhat.com>
9304
9305 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9306 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9307 even when flag_preprocess_only.
9308
ca7e759d
JM
93092014-02-26 Jason Merrill <jason@redhat.com>
9310
9311 PR c++/59231
9312 PR c++/11586
9313 * c-common.c (shorten_compare): Don't check
9314 c_inhibit_evaluation_warnings.
9315
28e41874
JJ
93162014-02-19 Jakub Jelinek <jakub@redhat.com>
9317
cca615af
JJ
9318 PR c/37743
9319 * c-common.c (c_common_nodes_and_builtins): When initializing
9320 c_uint{16,32,64}_type_node, also set corresponding
9321 uint{16,32,64}_type_node to the same value.
9322
28e41874
JJ
9323 PR c++/60267
9324 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9325 for PRAGMA_IVDEP if flag_preprocess_only.
9326
c2bf53a1
JJ
93272014-02-12 Jakub Jelinek <jakub@redhat.com>
9328
9329 PR c/60101
9330 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9331 if false, add ADD itself, rather than vice versa.
9332 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9333 copy. For SAVE_EXPR, only call merge_tlist once.
9334
8fcbce72
JJ
93352014-02-08 Jakub Jelinek <jakub@redhat.com>
9336
9337 PR middle-end/60092
9338 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9339 and tree_to_uhwi.
9340 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9341 functions.
9342 (c_common_attribute_table): Add alloc_align and assume_aligned
9343 attributes.
9344
0a756a3f
MP
93452014-02-06 Marek Polacek <polacek@redhat.com>
9346
9347 PR c/60087
9348 * c-common.c (warn_for_sign_compare): Call warning_at with location
9349 instead of warning.
9350
7ec4847a
MP
93512014-02-05 Marek Polacek <polacek@redhat.com>
9352
9353 PR c/53123
9354 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9355 statement.
9356
66f20604
MP
93572014-02-04 Marek Polacek <polacek@redhat.com>
9358
9359 PR c/60036
9360 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9361 SAVE_EXPR.
9362
5d77fb19
MG
93632014-02-03 Marc Glisse <marc.glisse@inria.fr>
9364
9365 PR c++/53017
9366 PR c++/59211
9367 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9368 handle_vector_size_attribute, handle_nonnull_attribute): Call
9369 default_conversion on the attribute argument.
9370 (handle_nonnull_attribute): Increment the argument number.
9371
81e5eca8
MP
93722014-01-31 Marek Polacek <polacek@redhat.com>
9373
9374 PR c/59963
9375 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9376 build_function_call_vec.
9377 (resolve_overloaded_builtin): Likewise.
9378 * c-common.h (build_function_call_vec): Adjust declaration.
9379
68fca595
MP
93802014-01-30 Marek Polacek <polacek@redhat.com>
9381
9382 PR c/59940
9383 * c-common.h (unsafe_conversion_p): Adjust declaration.
9384 (warnings_for_convert_and_check): Likewise.
9385 (convert_and_check): Likewise.
9386 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9387 expansion_point_location_if_in_system_header on it.
9388 (warnings_for_convert_and_check): Add location parameter. Call
9389 expansion_point_location_if_in_system_header on it. Use it.
9390 (convert_and_check): Add location parameter. Use it.
9391 (conversion_warning): Likewise.
9392 (c_add_case_label): Adjust convert_and_check calls.
9393 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9394
b72271b9
BI
93952014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9396
9397 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9398 flag_cilkplus.
9399 * c-pragma.c (init_pragma): Likewise.
9400 * c.opt: Likewise.
9401
393e8e8b
MP
94022014-01-23 Marek Polacek <polacek@redhat.com>
9403
9404 PR c/59846
9405 * c-common.c (shorten_compare): Add location_t parameter.
9406 * c-common.h (shorten_binary_op): Adjust declaration.
9407
f04dda30
MP
94082014-01-23 Marek Polacek <polacek@redhat.com>
9409
9410 PR c/58346
9411 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9412 * c-common.h: Declare it.
9413
621955cb
EB
94142014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9415
9416 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9417 * c-ada-spec.c (dump_ads): Likewise.
9418 (cpp_check): Likewise.
9419 (dump_ada_specs): Likewise.
9420
94212014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9422
9423 PR c++/49718
9424 * c-common.c (handle_no_instrument_function_attribute): Allow
9425 no_instrument_function attribute in class member
9426 definition/declaration.
9427
241f845a
JJ
94282014-01-15 Jakub Jelinek <jakub@redhat.com>
9429
9430 PR c/58943
9431 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9432 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9433 being COMPOUND_EXPR.
9434 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9435 operand a SAVE_EXPR and second MODIFY_EXPR.
9436
e83b8e2e
JJ
94372014-01-09 Jakub Jelinek <jakub@redhat.com>
9438
9439 PR target/58115
9440 * c-pch.c (c_common_write_pch): Call
9441 prepare_target_option_nodes_for_pch.
9442
23a5b65a
RS
94432014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9444
9445 Update copyright years
9446
f9030485
RS
94472014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9448
9449 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9450 the copyright notice.
9451
f2aa696b
EB
94522013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9453
9454 * c-ada-spec.c (print_constructor): New function.
9455 (print_destructor): Retrieve the origin of the destructor.
9456 (print_ada_declaration): Revamp handling of constructors/destructors.
9457
3f8257db 94582013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9459 Bill Maddox <maddox@google.com>
9460 Jason Merrill <jason@redhat.com>
9461
9462 * c.opt: Add -fdeclone-ctor-dtor.
9463 * c-opts.c (c_common_post_options): Default to on iff -Os.
9464
41958c28
BI
94652013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9466
9467 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9468 attribute.
9469 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9470 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9471 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9472 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9473 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9474 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9475 PRAGMA_CILK_CLAUSE_UNIFORM.
9476
b1726d6c 9477
12893402
BI
94782013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9479
9480 * cilk.c (cilk_outline): Made this function non-static.
9481 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9482 (create_cilk_wrapper): Added a new parameter: a function pointer.
9483 (c_install_body_w_frame_cleanup): Remove
9484 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9485 * c-common.h (cilk_outline): New prototype.
9486 (gimplify_cilk_spawn): Removed two parameters.
9487 (cilk_install_body_with_frame_cleanup): New prototype.
9488 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9489 CILK_SPAWN_STMT case.
9490
085b42ed
BS
94912013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9492
2ce064c3
BS
9493 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9494
085b42ed
BS
9495 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9496 (int_array_type_node): Remove.
9497 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9498
9e36c9ed
MP
94992013-12-05 Marek Polacek <polacek@redhat.com>
9500
9501 PR c/52023
9502 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9503 [ADJUST_FIELD_ALIGN].
9504
296674db
JM
95052013-12-04 Joseph Myers <joseph@codesourcery.com>
9506
9507 PR c/52023
9508 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9509 and check field alignment if set.
9510 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9511 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9512
b1726d6c 95132013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9514 Marek Polacek <polacek@redhat.com>
9515
9516 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9517 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9518
d7947e19
L
95192013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9520
9521 PR c/59309
9522 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9523 arguments.
9524
fad7652e
JJ
95252013-11-29 Jakub Jelinek <jakub@redhat.com>
9526
9527 PR c/59280
9528 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9529 goto invalid. If it is error_mark_node, don't issue further
9530 diagnostics.
9531
8b5e1202
SO
95322013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9533
9534 * c.opt (Wopenmp-simd): New.
9535
0a508bb6
JJ
95362013-11-22 Jakub Jelinek <jakub@redhat.com>
9537
9538 * c-ubsan.h (ubsan_instrument_return): New prototype.
9539 * c-ubsan.c (ubsan_instrument_return): New function.
9540
2fb9a547
AM
95412013-11-22 Andrew MacLeod <amacleod@redhat.com>
9542
9543 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9544 * c-gimplify.c: Likewise.
9545 * cilk.c: Likewise.
2fb9a547 9546
8400e75e
DM
95472013-11-22 David Malcolm <dmalcolm@redhat.com>
9548
9549 * c-common.c (unsafe_conversion_p): Remove use of
9550 EXPR_LOC_OR_HERE macro.
9551 (conversion_warning): Likewise.
9552 (warnings_for_convert_and_check): Likewise.
9553 (warn_for_collisions_1): Likewise.
9554 (shorten_compare): Likewise, and remove use of in_system_header
9555 macro, using the location from the former.
9556 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9557 (cb_def_pragma): Remove use of in_system_header macro.
9558 (lex_string): Likewise.
9559 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9560
eb1ce453
KZ
95612013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9562 Mike Stump <mikestump@comcast.net>
9563 Richard Sandiford <rdsandiford@googlemail.com>
9564
9565 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9566 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9567 tree_fits_shwi_p or tree_fits_uhwi_p.
9568 (dump_generic_ada_node): Likewise.
9569 * c-format.c (check_format_arg): Likewise.
9570 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9571
6b3b8c27
KZ
95722013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9573
9574 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9575
49b0aa18
JC
95762013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9577
9578 PR c/53001
9579 * c-common.c (unsafe_conversion_p): Make this function
9580 return an enumeration with more detail.
9581 (conversion_warning): Use the new return type of
9582 unsafe_conversion_p to separately warn either about conversions
9583 that lower floating point number precision or about the other
9584 kinds of conversions.
9585 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9586 (unsafe_conversion_p): switching return type to
9587 conversion_safety enumeration.
49b0aa18
JC
9588 * c.opt: Adding new warning -Wfloat-conversion and
9589 enabling it with -Wconversion.
9590
b826515a
BS
95912013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9592
8e745a17
JJ
9593 * c-opts.c: Include plugin.h.
9594 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9595
b9a55b13
MP
95962013-11-19 Marek Polacek <polacek@redhat.com>
9597
9598 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9599 call.
9600 (ubsan_instrument_shift): Likewise.
9601 (ubsan_instrument_vla): Likewise.
9602
7d362f6c
RS
96032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9604
9605 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9606 cast to unsigned type.
9607
386b1f1f
RS
96082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9609
9610 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9611 tree_low_cst.
9612 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9613 rather than tree_low_cst.
9614
ae7e9ddd
RS
96152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9616
9617 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9618 tree_to_uhwi throughout.
9619
9439e9a1
RS
96202013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9621
9622 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9623 tree_low_cst (..., 0) with tree_to_shwi throughout.
9624
cc269bb6
RS
96252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9626
9627 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9628 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9629
9541ffee
RS
96302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9631
9632 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9633 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9634
c02065fc
AH
96352013-11-15 Aldy Hernandez <aldyh@redhat.com>
9636
9637 * c-cilkplus.c: New file.
9638 * c-common.c (readonly_error): Add location argument.
9639 * c-common.h (readonly_error): Same.
9640 (c_finish_cilk_clauses): Protoize.
9641 (c_check_cilk_loop): Same.
9642 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9643 Do not fail on error_mark_node.
9644 Abstract increment canonicalization to here...
9645 (c_omp_for_incr_canonicalize_ptr): New.
9646 c-pragma.c (init_pragma): Register "simd" pragma.
9647 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9648 (enum pragma_cilk_clause): New.
9649
9cc65f15
RS
96502013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9651
9652 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9653 wchar_type and host_integerp checks.
9654
18f429e2
AM
96552013-11-14 Andrew MacLeod <amacleod@redhat.com>
9656
9657 * c-common.c: Likewise.
9658 * c-gimplify.c: Likewise.
9659 * cilk.c: Likewise.
9660
d8a2d370
DN
96612013-11-14 Diego Novillo <dnovillo@google.com>
9662
9663 * c-common.c: Include fold-const.h.
9664 Include stor-layout.h.
9665 Include calls.h.
9666 Include stringpool.h.
9667 Include attribs.h.
9668 Include varasm.h.
9669 Include trans-mem.h.
9670 * c-cppbuiltin.c: Include stor-layout.h.
9671 Include stringpool.h.
9672 * c-format.c: Include stringpool.h.
9673 * c-lex.c: Include stringpool.h.
9674 Include stor-layout.h.
9675 * c-pragma.c: Include stringpool.h.
9676 Include attribs.h.
9677 Include varasm.h.
9678 Include gcc-symtab.h.
9679 * c-pretty-print.c: Include stor-layout.h.
9680 Include attribs.h.
9681 * cilk.c: Include stringpool.h.
9682 Include calls.h.
9683
38b7bc7f
JM
96842013-11-13 Joseph Myers <joseph@codesourcery.com>
9685
9686 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9687 * c-common.c (c_common_reswords): Add __auto_type.
9688 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9689
45b0be94
AM
96902013-11-12 Andrew MacLeod <amacleod@redhat.com>
9691
18f429e2
AM
9692 * c-common.c: Include gimplify.h.
9693 * c-gimplify.c: Likewise.
9694 * cilk.c: Likewise.
9695 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9696 * c-ubsan.c: Don't include gimple.h.
45b0be94 9697
582d9b50
JM
96982013-11-12 Joseph Myers <joseph@codesourcery.com>
9699
9700 * c-common.c (c_common_reswords): Add _Thread_local.
9701
6b28e197
JM
97022013-11-09 Joseph Myers <joseph@codesourcery.com>
9703
9704 * c-common.c (atomic_size_supported_p): New function.
9705 (resolve_overloaded_atomic_exchange)
9706 (resolve_overloaded_atomic_compare_exchange)
9707 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9708 Use it instead of comparing size with a local list of sizes.
9709
267bac10
JM
97102013-11-07 Andrew MacLeod <amacleod@redhat.com>
9711 Joseph Myers <joseph@codesourcery.com>
9712
9713 * c-common.h (enum rid): Add RID_ATOMIC.
9714 * c-common.c (c_common_reswords): Add _Atomic.
9715 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9716 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9717 * c-format.c (check_format_types): Check for extra _Atomic
9718 qualifiers in format argument.
9719 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9720 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9721
5157b91e
TB
97222013-11-06 Tobias Burnus <burnus@net-b.de>
9723
9724 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9725
6dbe0958
JM
97262013-11-06 Joseph Myers <joseph@codesourcery.com>
9727
9728 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9729 standards modes.
9730 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9731 to mean lack of IEEE 754 support.
9732
e8ff5196
TB
97332013-11-05 Tobias Burnus <burnus@net-b.de>
9734
9735 * c.opt (-Wdate-time): New option
9736 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9737
254a0760
JM
97382013-11-05 Joseph Myers <joseph@codesourcery.com>
9739
9740 * c-cppbuiltin.c (cpp_iec_559_value): Test
9741 flag_excess_precision_cmdline not flag_excess_precision.
9742
6d7f7e0a
TB
97432013-11-05 Tobias Burnus <burnus@net-b.de>
9744
9745 * c.opt (fopenmp-simd): New option.
9746 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9747 (omp_pragmas): ... this new struct.
9748 (c_pp_lookup_pragma): Also walk omp_pragmas.
9749 (init_pragma): Init pragmas for -fopenmp-simd.
9750
55a7f02f
MP
97512013-11-04 Marek Polacek <polacek@redhat.com>
9752
9753 PR c++/58979
9754 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9755
9193fb05
JM
97562013-11-04 Joseph Myers <joseph@codesourcery.com>
9757
9758 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9759 New functions.
9760 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9761
94159ecf
EB
97622013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9763
9764 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9765 (dump_ada_specs): Adjust prototype of second callback.
9766 * c-ada-spec.c (cpp_check): New global variable.
9767 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9768 (print_generic_ada_decl): Likewise.
9769 (has_static_fields): Change return type to bool and add guard.
9770 (has_nontrivial_methods): New predicate.
9771 (is_tagged_type): Change return type to bool.
9772 (separate_class_package): Call has_nontrivial_methods.
9773 (pp_ada_tree_identifier): Minor tweaks.
9774 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9775 (dump_ada_array_domains): Likewise.
9776 (dump_ada_array_type): Likewise.
9777 (dump_template_types): Remove cpp_check parameter and do not pass it to
9778 dump_generic_ada_node.
9779 (dump_ada_template): Likewise.
9780 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9781 recursively.
9782 (print_ada_methods): Change return type to integer. Remove cpp_check
9783 parameter and do not pass it down.
9784 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9785 dump_generic_ada_node.
9786 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9787 accessing methods.
9788 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9789 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9790 value of print_ada_methods.
9791 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9792 Set cpp_check to it before invoking dump_ada_nodes.
9793 (dump_ada_specs): Likewise.
9794
b906f4ca
MP
97952013-11-03 Marek Polacek <polacek@redhat.com>
9796
9797 * c-ubsan.c: Don't include hash-table.h.
9798 (ubsan_instrument_vla): New function.
9799 * c-ubsan.h: Declare it.
9800
5e20cdc9
DM
98012013-10-31 David Malcolm <dmalcolm@redhat.com>
9802
9803 Automated part of renaming of symtab_node_base to symtab_node.
9804
9805 Patch autogenerated by rename_symtab.py from
9806 https://github.com/davidmalcolm/gcc-refactoring-scripts
9807 revision 58bb219cc090b2f4516a9297d868c245495ee622
9808
9809 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9810 symtab_node_base to symtab_node.
9811
7057e645
ESR
98122013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9813
8e745a17 9814 Implement C++14 digit separators.
7057e645
ESR
9815 * c-lex.c (interpret_float): Remove digit separators from scratch string
9816 before building real literal.
9817
193ea7bc
JJ
98182013-10-30 Jakub Jelinek <jakub@redhat.com>
9819
9820 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9821
939b37da
BI
98222013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9823
9824 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9825 fields.
9826 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9827 enabled.
9828 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9829 (insert_cilk_frame): New prototype.
9830 (cilk_init_builtins): Likewise.
9831 (gimplify_cilk_spawn): Likewise.
9832 (c_cilk_install_body_w_frame_cleanup): Likewise.
9833 (cilk_detect_spawn_and_unwrap): Likewise.
9834 (cilk_set_spawn_marker): Likewise.
9835 (build_cilk_sync): Likewise.
9836 (build_cilk_spawn): Likewise.
9837 * cilk.c: New file.
9838
67348ccc
DM
98392013-10-29 David Malcolm <dmalcolm@redhat.com>
9840
9841 Patch autogenerated by refactor_symtab.py from
9842 https://github.com/davidmalcolm/gcc-refactoring-scripts
9843 revision 58bb219cc090b2f4516a9297d868c245495ee622
9844
9845 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9846 to a true class hierarchy.
9847 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9848
d570872d
RS
98492013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9850
9851 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9852
98906124
JL
98532013-10-26 Jeff Law <law@redhat.com>
9854
adfac8df
JJ
9855 * c-common.c (c_define_builtins): Remove mudflap support.
9856 * c.opt: Ignore and warn for mudflap options.
98906124 9857
d73749df 98582013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9859
9860 PR other/33426
9861 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9862 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9863
3f04b1bb
JM
98642013-10-23 Jason Merrill <jason@redhat.com>
9865
9866 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9867
acf0174b
JJ
98682013-10-11 Jakub Jelinek <jakub@redhat.com>
9869
acd15a28
JJ
9870 * c-common.h (omp_clause_mask::operator !=): New method.
9871 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9872 instead of if (mask & something) tests everywhere.
9873
acf0174b
JJ
9874 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9875 201307 instead of 201107.
9876 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9877 (c_common_attribute_table): Add "omp declare target" and
9878 "omp declare simd" attributes.
9879 (handle_omp_declare_target_attribute,
9880 handle_omp_declare_simd_attribute): New functions.
9881 * c-omp.c: Include c-pragma.h.
9882 (c_finish_omp_taskgroup): New function.
9883 (c_finish_omp_atomic): Add swapped argument, if true,
9884 build the operation first with rhs, lhs arguments and use NOP_EXPR
9885 build_modify_expr.
9886 (c_finish_omp_for): Add code argument, pass it down to make_code.
9887 (c_omp_split_clauses): New function.
9888 (c_split_parallel_clauses): Removed.
9889 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9890 c_omp_declare_simd_clauses_to_decls): New functions.
9891 * c-common.h (omp_clause_mask): New type.
9892 (OMP_CLAUSE_MASK_1): Define.
9893 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9894 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9895 omp_clause_mask::operator |, omp_clause_mask::operator &,
9896 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9897 omp_clause_mask::operator ==): New methods.
9898 (enum c_omp_clause_split): New.
9899 (c_finish_omp_taskgroup): New prototype.
9900 (c_finish_omp_atomic): Add swapped argument.
9901 (c_finish_omp_for): Add code argument.
9902 (c_omp_split_clauses): New prototype.
9903 (c_split_parallel_clauses): Removed.
9904 (c_omp_declare_simd_clauses_to_numbers,
9905 c_omp_declare_simd_clauses_to_decls): New prototypes.
9906 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9907 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9908 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9909 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9910 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9911 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9912 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9913 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9914 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9915 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9916 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9917 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9918 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9919 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9920 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9921 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9922 PRAGMA_OMP_CLAUSE_UNIFORM.
9923
826cacfe
MG
99242013-10-09 Marc Glisse <marc.glisse@inria.fr>
9925
9926 PR tree-optimization/20318
9927 * c-common.c (handle_returns_nonnull_attribute): New function.
9928 (c_common_attribute_table): Add returns_nonnull.
9929
2284b034
MG
99302013-10-03 Marc Glisse <marc.glisse@inria.fr>
9931
9932 PR c++/19476
9933 * c.opt (fcheck-new): Move to common.opt.
9934
b56e9788
MP
99352013-09-25 Marek Polacek <polacek@redhat.com>
9936 Jakub Jelinek <jakub@redhat.com>
9937
9938 PR sanitizer/58413
9939 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9940 an expression if we can prove it is correct.
9941 (ubsan_instrument_division): Likewise. Remove unnecessary
9942 check.
9943
ce6923c5
MP
99442013-09-18 Marek Polacek <polacek@redhat.com>
9945
9946 PR sanitizer/58411
9947 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9948 Declare it.
9949 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9950
fb5610fb
IS
99512013-09-14 Iain Sandoe <iain@codesourcery.com>
9952
9953 PR target/48094
9954 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9955 fobjc-gc, freplace-objc-classes): Accept for LTO.
9956
88b0e79e
JC
99572013-09-13 Jacek Caban <jacek@codeweavers.com>
9958
9959 * c-target.def: New hook
9960
c9b0866a
PC
99612013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9962
9963 PR c++/43452
9964 * c.opt (Wdelete-incomplete): Add.
9965
0af94e6f
JR
99662013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9967
9968 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9969 (vector_types_compatible_elements_p): New function.
9970 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9971 declaration.
9972 (vector_types_compatible_elements_p): Declare.
9973
7c26172c
GDR
99742013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9975
9976 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9977 a virtual member function.
9978 (pp_simple_type_specifier): Remove.
9979 (pp_c_type_specifier): Likewise.
9980 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9981 Rename from pp_c_type_specifier. Adjust.
9982 (c_pretty_printer::c_pretty_printer): Do not assign to
9983 simple_type_specifier.
9984
20059c8b
GDR
99852013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9986
9987 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9988 member function.
9989 (c_pretty_printer::storage_class_specifier): Likewise.
9990 (c_pretty_printer::initializer): Likewise.
9991 (pp_declaration): Remove.
9992 (pp_declaration_specifiers): Likewise.
9993 (pp_abstract_declarator): Likewise.
9994 (pp_declarator): Likewise.
9995 (pp_type_id): Likewise.
9996 (pp_statement): Likewise.
9997 (pp_constant): Likewise.
9998 (pp_id_expression): Likewise.
9999 (pp_primary_expression): Likewise.
10000 (pp_unary_expression): Likewise.
10001 (pp_multiplicative_expression): Likewise.
10002 (pp_conditional_expression): Likewise.
10003 (pp_assignment_expression): Likewise.
10004 (pp_expression): Likewise.
10005 (pp_c_type_id): Likewise.
10006 (pp_c_storage_class_specifier): Likewise.
10007 * c-pretty-print.c (pp_c_type_cast): Tidy.
10008 (pp_c_pointer): Likewise.
10009 (pp_c_type_specifier): Likewise.
10010 (pp_c_parameter_type_list): Likewise.
10011 (pp_c_function_definition): Likewise.
10012 (pp_c_init_declarator): Likewise.
10013 (pp_c_initializer_list): Likewise.
10014 (pp_c_constructor_elts): Likewise.
10015 (c_pretty_printer::direct_abstract_declarator): Likewise.
10016 (c_pretty_printer::declaration_specifiers): Likewise.
10017 (c_pretty_printer::primary_expression): Likewise.
10018 (c_pretty_printer::postfix_expression): Likewise.
10019 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10020 (c_pretty_printer::storage_class_specifier): Rename from
10021 pp_c_storage_class_specifier.
10022 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10023 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10024 storage_class_specifier, initializer, offset_list, flags.
10025
de5a5fa1
MP
100262013-08-30 Marek Polacek <polacek@redhat.com>
10027
10028 * c-ubsan.c: New file.
10029 * c-ubsan.h: New file.
10030
8f0e4d72
GDR
100312013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10032
10033 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10034 member function.
10035 (c_pretty_printer::declaration_specifiers): Likewise.
10036 (c_pretty_printer::declarator): Likewise.
10037 (c_pretty_printer::abstract_declarator): Likewise.
10038 (c_pretty_printer::direct_abstract_declarator): Likewise.
10039 (c_pretty_printer::direct_declarator): Likewise.
10040 (c_pretty_printer::function_specifier): Likewise.
10041 (pp_declaration): Adjust.
10042 (pp_declaration_specifiers): Likewise.
10043 (pp_abstract_declarator): Likewise.
10044 (pp_direct_declarator): Likewise.
10045 (pp_function_specifier): Likewise.
10046 (pp_direct_abstract_declarator): Remove as unused.
10047 (pp_c_declaration): Remove.
10048 (pp_c_declaration_specifiers): Likewise.
10049 (pp_c_declarator): Likewise.
10050 (pp_c_direct_declarator): Likewise.
10051 (pp_c_function_specifier): Likewise.
10052 (pp_c_direct_abstract_declarator): Likewise.
10053 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10054 from pp_c_abstract_declarator. Adjust.
ab20d992 10055 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10056 pp_c_direct_abstract_declarator. Adjust.
10057 (c_pretty_printer::function_specifier): Rename from
10058 pp_c_function_specifier. Adjust.
10059 (c_pretty_printer::declaration_specifiers): Rename from
10060 pp_c_declaration_specifiers. Adjust.
10061 (c_pretty_printer::direct_declarator): Rename from
10062 pp_c_direct_declarator. Adjust.
10063 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10064 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10065 (c_pretty_printer::c_pretty_printer): Do not assign to
10066 declaration, declaration_specifiers, declarator,
10067 direct_declarator, direct_abstract_declarator, function_specifier.
10068
00d34d3a
GDR
100692013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10070
10071 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10072 virtual member function.
10073 (c_pretty_printer::multiplicative_expression): Likewise.
10074 (c_pretty_printer::conditional_expression): Likewise.
10075 (c_pretty_printer::assignment_expression): Likewise.
10076 (c_pretty_printer::expression): Likewise.
10077 (pp_unary_expression): Adjust.
10078 (pp_multiplicative_expression): Likewise.
10079 (pp_assignment_expression): Likewise.
10080 (pp_conditional_expression): Likewise.
10081 (pp_expression): Likewise.
10082 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10083 from pp_c_unary_expression. Adjust.
10084 (c_pretty_printer::multiplicative_expression): Rename from
10085 pp_c_multiplicative_expression. Adjust.
10086 (c_pretty_printer::conditional_expression): Rename from
10087 pp_c_conditional_expression. Adjust.
10088 (c_pretty_printer::assignment_expression): Rename from
10089 pp_c_assignment_expression. Adjust.
10090 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10091 (c_pretty_printer::c_pretty_printer): Do not assign to
10092 unary_expression, multiplicative_expression,
10093 conditional_expression, expression.
10094
fb22178f
GDR
100952013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10096
10097 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10098 virtual member function.
10099 (pp_postfix_expression): Adjust.
10100 (pp_c_postfix_expression): Remove.
10101 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10102 from pp_c_postfix_expression. Adjust.
10103 (c_pretty_printer::c_pretty_printer): Do not assign to
10104 postfix_expression.
10105
7ecc2600
GDR
101062013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10107
10108 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10109 virtua member function.
10110 (pp_primary_expression): Adjust.
10111 (pp_c_primary_expression): Remove.
10112 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10113 from pp_c_primary_expression. Adjust.
10114 (pp_c_initializer_list): Use pp_primary_expression.
10115 (c_pretty_printer::c_pretty_printer): Do not assign to
10116 primary_expression.
10117
0691175f
GDR
101182013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10119
10120 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10121 * c-pretty-print.c (M_): Remove.
10122 (c_pretty_printer::translate_string): Define.
10123 (pp_c_type_specifier): Use it.
10124 (pp_c_primary_expression): Likewise.
10125 (pp_c_expression): Likewise.
10126
66dfe4c4
GDR
101272013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10128
10129 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10130 virtual function.
10131 (pp_c_id_expression): Remove.
10132 (pp_id_expression): Adjust.
10133 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10134 pp_c_id_expression. Adjust.
10135 (pp_c_postfix_expression): Use pp_id_expression.
10136 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10137
ca43e9d5
GDR
101382013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10139
10140 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10141 member function.
10142 (pp_constant): Adjust.
10143 (pp_c_constant): Remove.
10144 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10145 pp_c_constant. Adjust.
10146 (pp_c_constant)
10147 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10148 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10149
da6ca2b5
GDR
101502013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10151
10152 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10153 (c_pretty_printer::c_pretty_printer): Declare.
10154 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10155 c_pretty_printer_init. Adjust.
10156 (print_c_tree): Do not call c_pretty_printer_init.
10157 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10158
65a372f4
AC
101592013-08-09 Arnaud Charlet <charlet@adacore.com>
10160
10161 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10162
fd9b0f32
PC
101632013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10164
10165 PR c++/58080
10166 * c-common.c (pointer_int_sum): Add bool parameter.
10167 * c-common.h (pointer_int_sum): Adjust declaration.
10168
e0aec1e9
GDR
101692013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10170
10171 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10172 c_pretty_printer variable.
10173
b066401f
GDR
101742013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10175
10176 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10177 (pp_base): Remove.
10178 (pp_c_base): Likewise. Adjust users.
10179 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10180 (pp_c_whitespace): Do not call pp_base.
10181 (pp_c_left_paren): Likewise.
10182 (pp_c_right_paren): Likewise.
10183 (pp_c_left_brace): Likewise.
10184 (pp_c_right_brace): Likewise.
10185 (pp_c_left_bracket): Likewise.
10186 (pp_c_right_bracket): Likewise.
10187 (pp_c_dot): Likewise.
10188 (pp_c_ampersand): Likewise.
10189 (pp_c_star): Likewise.
10190 (pp_c_arrow): Likewise.
10191 (pp_c_semicolon): Likewise.
10192 (pp_c_complement): Likewise.
10193 (pp_c_exclamation): Likewise.
10194 (pp_c_direct_declarator): Likewise.
10195 (pp_c_ws_string): Likewise.
10196 (pp_c_identifier): Likewise.
10197 (pp_c_statement): Likewise.
10198 (print_c_tree): Likewise.
10199
65e5a578
ESR
102002013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10201
10202 PR c++/58072
10203 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10204 provide useful error strings.
10205
137a1a27
GDR
102062013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10207
10208 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10209 printer functions instead of pp_string or operators and punctuators.
10210 (dump_generic_ada_node): Likewise.
10211 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10212 (pp_c_relational_expression): Likewise.
10213 (pp_c_logical_or_expression): Likewise.
10214
07838b13
GDR
102152013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10216
10217 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10218 functions instead of pp_character.
10219 (pp_ada_tree_identifier): Likewise.
10220 (dump_ada_double_name): Likewise.
10221 (dump_ada_function_declaration): Likewise.
10222 (dump_ada_array_domains): Likewise.
10223 (dump_template_types): Likewise.
10224 (dump_generic_ada_node): Likewise.
10225 (print_ada_declaration): Likewise.
10226 (print_ada_struct_decl): Likewise.
10227 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10228
433cc7b0
TT
102292013-07-23 Tom Tromey <tromey@redhat.com>
10230
10231 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10232 * c-common.c (c_common_reswords): Add _Generic.
10233
688010ba
OB
102342013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10235
10236 * c-common.c: Fix typos.
10237 * c-common.h: Likewise.
10238
2a99e5e6
LL
102392013-07-13 Lubos Lunak <l.lunak@suse.cz>
10240
10241 PR c++/55203
10242 * c-common.c (c_common_attribute_table): Add warn_unused.
10243 (handle_warn_unused_attribute): New.
10244
c26302d5
JJ
102452013-07-10 Jakub Jelinek <jakub@redhat.com>
10246
10247 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10248 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10249
dfeadaa0
PC
102502013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10251
10252 PR c++/57869
10253 * c.opt: Add Wconditionally-supported.
10254
6a2fa4b2
GS
102552013-07-08 Graham Stott <graham.stott@btinternet.com>
10256
adfac8df 10257 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10258 unused variables l_length and l_node.
10259
ecdbd01a 102602013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10261
10262 PR c/57821
10263 * c-common.c (complete_array_type): Delay folding first index
10264 like other indices. When folding, check for index overflow.
10265
bedc293e
MG
102662013-06-27 Marc Glisse <marc.glisse@inria.fr>
10267
10268 PR c++/57509
10269 * c-common.h (c_build_vec_perm_expr): New complain argument.
10270 * c-common.c (c_build_vec_perm_expr): Likewise.
10271 Use save_expr also in C++.
10272
604b2bfc
GDR
102732013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10274
10275 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10276 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10277 * c-opts.c (c_common_post_options): Likewise.
10278
dfeadaa0 102792013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10280
10281 * array-notation-common.c (length_mismatch_in_expr): Changed the
10282 parameter type's from a dynamic array to a vec_tree. Also removed
10283 the size parameters.
10284 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10285 the change above.
10286
2ce86d2e
BI
102872013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10288
10289 * c-common.h (struct cilkplus_an_parts): New structure.
10290 (struct cilkplus_an_loop_parts): Likewise.
10291 (cilkplus_extract_an_triplets): New prototype.
10292 (fix_sec_implicit_args): Likewise.
10293 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10294 (fix_sec_implicit_args): Likewise.
604b2bfc 10295
07a6825b
BI
102962013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10297
10298 * array-notation-common.c (find_inv_trees): Removed an unwanted
10299 typecasting.
10300 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10301 enum rid to enum tree_code.
10302
08346abd
JH
103032013-06-11 Jan Hubicka <jh@suse.cz>
10304
10305 * c-common.c (handle_alias_ifunc_attribute): Do not set
10306 DECL_EXTERNAL for weakref variables.
10307 * c-pragma.c (handle_pragma_weak): Make sure aliases
10308 are not declared as external.
10309
d60f1706
BI
103102013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10311
10312 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10313 function from c/c-array-notation.c.
10314 (is_cilkplus_reduce_builtin): Likewise.
10315 (find_rank): Likewise.
10316 (extract_array_notation_exprs): Likewise.
10317 (replace_array_notations): Likewise.
10318 (find_inv_trees): Likewise.
10319 (replace_inv_trees): Likewise.
10320 (contains_array_notation_expr): Likewise.
10321 (find_correct_array_notation_type): Likewise.
10322 * c-common.h (struct inv_list): Moved this struct from the file
10323 c/c-array-notation.c and added a new field called additional tcodes.
10324 (length_mismatch_in_expr_p): New prototype.
10325 (is_cilkplus_reduce_builtin): Likewise.
10326 (find_rank): Likewise.
10327 (extract_array_notation_exprs): Likewise.
10328 (replace_array_notation): Likewise.
10329 (find_inv_trees): Likewise.
10330 (replace_inv_trees): Likewise.
10331 (find_correct_array_notation_type): Likewise.
dfeadaa0 10332
36536d79
BI
103332013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10334
10335 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10336 function array_notation_init_builtins is called.
10337 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10338 * c-common.def (ARRAY_NOTATION_REF): New tree.
10339 * c-common.h (build_array_notation_expr): New function declaration.
10340 (build_array_notation_ref): Likewise.
10341 (extract_sec_implicit_index_arg): New extern declaration.
10342 (is_sec_implicit_index_fn): Likewise.
10343 (ARRAY_NOTATION_CHECK): New define.
10344 (ARRAY_NOTATION_ARRAY): Likewise.
10345 (ARRAY_NOTATION_START): Likewise.
10346 (ARRAY_NOTATION_LENGTH): Likewise.
10347 (ARRAY_NOTATION_STRIDE): Likewise.
10348 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10349 ARRAY_NOTATION_REF.
10350 (pp_c_expression): Likewise.
10351 * c.opt (flag_enable_cilkplus): New flag.
10352 * array-notation-common.c: New file.
10353
f7716d57
JJ
103542013-05-14 Jakub Jelinek <jakub@redhat.com>
10355
10356 PR c++/57274
10357 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10358
a5e0cd1d
MG
103592013-05-10 Marc Glisse <marc.glisse@inria.fr>
10360
10361 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10362 vectors.
10363
f6bc1c4a
HS
103642013-05-07 Han Shen <shenhan@google.com>
10365
10366 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10367
3f12f6e9
SKS
103682013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10369
10370 * c-common.c (check_user_alignment): Emit error for negative values.
10371
61949153
PC
103722013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10373
10374 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10375
e93e18e9
PC
103762013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10377
10378 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10379 __GXX_EXPERIMENTAL_CXX1Y__.
10380
44d90fe1 103812013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10382 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10383
10384 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10385 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10386 to simply use OPT_Wpointer_arith.
10387 (c_sizeof_or_alignof_type): Likewise.
10388
13f39b2e
PC
103892013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10390
10391 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10392
4b84d650
JJ
103932013-04-12 Jakub Jelinek <jakub@redhat.com>
10394
10395 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10396 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10397 specifiers.
10398
fb037b5d
SB
103992013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10400
10401 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10402
4e856798
PC
104032013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10404
10405 * c-common.c (pointer_int_sum): Remove dead code.
10406
4b1baac8
RS
104072013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10408
10409 PR middle-end/56524
10410 * c-common.c (handle_optimize_attribute): Don't call
10411 save_optabs_if_changed.
10412
0b50e654
JJ
104132013-03-05 Jakub Jelinek <jakub@redhat.com>
10414
10415 PR middle-end/56461
10416 * c-pch.c (pch_init): Free target_validity at the end.
10417
48c41403
JJ
104182013-03-04 Jakub Jelinek <jakub@redhat.com>
10419
10420 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10421
e664c61c
KS
104222013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10423 Jakub Jelinek <jakub@redhat.com>
10424
10425 PR sanitizer/56454
10426 * c-common.c (handle_no_sanitize_address_attribute): New function.
10427 (c_common_attribute_table): Add no_sanitize_address attribute.
10428 (handle_no_address_safety_analysis_attribute): Add
10429 no_sanitize_address attribute, not no_address_safety_analysis
10430 attribute.
10431
a475fd3d 104322013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10433
10434 PR target/52555
10435 * c-common.c (handle_optimize_attribute): Call
10436 save_optabs_if_changed.
10437
f6007d99
JJ
104382013-02-18 Jakub Jelinek <jakub@redhat.com>
10439 Steven Bosscher <steven@gcc.gnu.org>
10440
10441 PR pch/54117
10442 * c-opts.c (c_common_post_options): If debug info is enabled
10443 and non-dwarf*, refuse to load PCH files and when writing PCH
10444 file warn.
10445
cf35e2b1
JJ
104462013-02-05 Jakub Jelinek <jakub@redhat.com>
10447
10448 PR middle-end/56167
10449 * c-common.c (handle_error_attribute): Fix condition.
10450
32887460
JJ
104512013-01-30 Jakub Jelinek <jakub@redhat.com>
10452
10453 PR c++/55742
10454 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10455
5af057d8
JM
104562013-01-18 Jason Merrill <jason@redhat.com>
10457
10458 PR target/54908
10459 * c.opt (-fextern-tls-init): New.
10460 * c-opts.c (c_common_post_options): Handle it.
10461
cc83c823
JJ
104622013-01-09 Jakub Jelinek <jakub@redhat.com>
10463
10464 PR c/48418
10465 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10466 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10467 and is either negative or bigger or equal to type precision
10468 of the first operand.
10469
a859517f
MP
104702012-12-03 Marek Polacek <polacek@redhat.com>
10471
10472 PR c/55570
10473 * c-common.c (check_user_alignment): Swap order of tests,
10474 check TREE_CODE first.
10475
2d7aa578
ESR
104762012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10477
10478 PR c++/52654
10479 * c-common.h (overflow_type): New enum.
10480 (build_userdef_literal): Add overflow_type argument.
10481 (tree_userdef_literal): Add overflow_type.
10482 (USERDEF_LITERAL_OVERFLOW): New access macro.
10483 * c-common.c (build_userdef_literal): Add overflow_type
10484 argument.
10485 * c-lex.c (c_lex_with_flags): Add overflow_type to
10486 build_userdef_literal calls.
10487 (interpret_integer, interpret_float): Add overflow_type argument.
10488
cc3c4f62
RB
104892012-11-28 Richard Biener <rguenther@suse.de>
10490
10491 PR c/35634
10492 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10493 here and use a type with proper overflow behavior for types that would
10494 need to be promoted for the arithmetic.
10495
77bc5132
JJ
104962012-11-23 Jakub Jelinek <jakub@redhat.com>
10497
10498 PR sanitizer/55435
10499 * c-common.c (handle_no_address_safety_analysis_attribute): New
10500 function.
10501 (c_common_attribute_table): Add no_address_safety_analysis.
10502
5dc99c46
SB
105032012-11-16 Simon Baldwin <simonb@google.com>
10504
10505 * c.opt: Add f[no-]canonical-system-headers.
10506 * c-opts.c (c_common_handle_option): Handle
10507 OPT_fcanonical_system_headers.
10508
a4a0016d
ESR
105092012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10510
10511 PR c++/54413
10512 * c-opts.c (c_common_handle_option): Set new flags.
10513 * c.opt: Describe new flags.
10514
7dbb85a7
JM
105152012-11-09 Jason Merrill <jason@redhat.com>
10516
10517 * c.opt (Wabi-tag): New.
10518
ad7bac31
AK
105192012-11-09 Andi Kleen <ak@linux.intel.com>
10520
10521 PR 55139
10522 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10523 MEMMODEL_MASK
ad7bac31 10524
7332899a
MLI
105252012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10526
10527 PR c/53063
10528 * c.opt (Wformat): Make it Alias Wformat=1.
10529 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10530 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10531 LangEnabledBy.
10532 (Wformat=): RejectNegative. Use LangEnabledBy.
10533 (Wnonnull): Use LangEnabledBy.
10534 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10535 * c-format.c (set_Wformat): Delete.
10536 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10537 (maybe_read_dollar_number): Likewise.
10538 (avoid_dollar_number): Likewise.
10539 (finish_dollar_format_checking): Likewise.
10540 (check_format_info): Likewise.
10541 (check_format_info_main): Likewise.
10542 (check_format_types): Likewise.
10543 (format_type_warning): Likewise.
10544 * c-common.c (int): Likewise.
10545 (check_function_sentinel): Likewise.
8e745a17 10546 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10547
34a180a6
MLI
105482012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10549
10550 PR c/53063
10551 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10552 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10553 Use LangEnabledBy.
10554 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10555 common.opt.
10556 (Wvariadic-macros): Init(1).
10557 * c-opts.c (c_common_handle_option): Do not handle them
10558 explicitly.
10559 (c_common_post_options): Likewise.
10560 (sanitize_cpp_opts): warn_unused_macros is now
10561 cpp_warn_unused_macros.
10562 (push_command_line_include): Likewise.
10563 * c-common.c (warn_unknown_pragmas): Do not define.
10564 * c-common.h (warn_unknown_pragmas): Do not declare.
10565
3f46d6a5
MLI
105662012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10567
10568 PR c/51294
10569 * c-common.c (conversion_warning): Handle conditional expressions.
10570
880661a4
JW
105712012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10572
10573 PR c++/54930
10574 * c.opt (Wreturn_local_addr): Define new option.
10575
4514a96b
JM
105762012-10-25 Jason Merrill <jason@redhat.com>
10577
f14edc1a
JM
10578 * c.opt (Wvirtual-move-assign): New.
10579
4514a96b
JM
10580 * c.opt (Winherited-variadic-ctor): New.
10581
93100c6b
MG
105822012-10-25 Marc Glisse <marc.glisse@inria.fr>
10583
10584 PR c++/54427
10585 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10586
1efcb8c6
JM
105872012-10-23 Joseph Myers <joseph@codesourcery.com>
10588
10589 * c-common.h (pch_cpp_save_state): Declare.
10590 * c-target.def (c_preinclude): New hook.
10591 * c-opts.c (done_preinclude): New.
10592 (push_command_line_include): Handle default preincluded header.
10593 (cb_file_change): Call pch_cpp_save_state when calling
10594 push_command_line_include.
10595 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10596 (pch_cpp_save_state): New.
10597 (pch_init): Call pch_cpp_save_state conditionally, instead of
10598 calling cpp_save_state.
10599
4a0ae68e
MLI
106002012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10601
10602 PR c/53063
10603 PR c/40989
10604 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10605 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10606 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10607 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10608 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10609 * c-opts.c (c_common_handle_option): Remove explicit handling from
10610 here.
10611 (c_common_post_options): Likewise.
10612
67e4210b
EB
106132012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10614
10615 * c-ada-spec.c (LOCATION_COL): Delete.
10616 (compare_location): New function.
10617 (compare_node): Use it.
10618 (compare_comment): Likewise.
10619
65d4f2cd
MLI
106202012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10621
10622 PR c/53063
10623 PR c/40989
10624 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10625 * c-opts.c (c_common_handle_option): Do not set them here. Add
10626 comment.
10627 (c_common_post_options): Likewise.
10628
909881cb
EB
106292012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10630
10631 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10632 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10633 Remove POINTER_TYPE handling, add large unsigned handling and use
10634 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10635
3a785c97
JJ
106362012-10-12 Jakub Jelinek <jakub@redhat.com>
10637
10638 PR c/54381
10639 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10640 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10641 locs and array of 3 trees instead of just single loc and single
10642 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10643 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10644 For *cmp* builtins that take two sources strings report warnings
10645 about first and second source, not about destination and source.
10646
5e54f81d
MG
106472012-10-12 Marc Glisse <marc.glisse@inria.fr>
10648
10649 PR c++/53055
10650 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10651
f5b02f1e
EB
106522012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10653
10654 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10655 declaring something coming from another file.
10656
b46dbc6c
AC
106572012-10-10 Arnaud Charlet <charlet@adacore.com>
10658
f5b02f1e 10659 PR ada/54845
b46dbc6c
AC
10660 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10661
5d9de0d0
PC
106622012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10663
10664 PR c++/54194
10665 * c-common.c (warn_about_parentheses): Add location_t parameter;
10666 use EXPR_LOC_OR_LOC.
10667 * c-common.h: Update declaration.
10668
a212e43f
MG
106692012-10-09 Marc Glisse <marc.glisse@inria.fr>
10670
10671 PR c++/54427
10672 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10673 more operations. Make error messages optional.
10674 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10675 (scalar_to_vector): Declare.
10676
b1db7f91
JM
106772012-10-08 Jason Merrill <jason@redhat.com>
10678
10679 * c-common.c (c_common_reswords): Add thread_local.
10680
e28d52cf
DS
106812012-10-08 Dodji Seketeli <dodji@redhat.com>
10682
10683 PR c++/53528 C++11 attribute support
10684 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10685 new functions.
10686 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10687 static function.
10688 (handle_aligned_attribute): In choose strictest alignment
10689 among many. Use new check_cxx_fundamental_alignment_constraints.
10690 (handle_transparent_union_attribute): In c++11 attribute syntax,
10691 don't look through typedefs.
10692
3b78de56
AC
106932012-10-04 Arnaud Charlet <charlet@adacore.com>
10694
10695 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10696 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10697 out of dumpfile.h.
10698
6040bb5f
DC
106992012-09-25 Dehao Chen <dehao@google.com>
10700
10701 PR middle-end/54645
3b78de56 10702 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10703 map when read in the pch.
10704
3f8257db 107052012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10706
10707 * c-ada-spec.c: Style fixes.
10708
3f8257db 107092012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10710
10711 * c.opt (-fada-spec-parent): Define new command line switch.
10712 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10713 is specified, generate binding spec as a child of the specified unit.
10714
0ccb505d
PC
107152012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10716 Manuel López-Ibáñez <manu@gcc.gnu.org>
10717
10718 PR c++/53210
10719 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10720
c583af79
AC
107212012-08-23 Arnaud Charlet <charlet@adacore.com>
10722
10723 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10724 for pointers, and add missing Convention C pragma.
10725 (print_ada_struct_decl): Add missing aliased keyword.
10726 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10727
1a4049e7
JJ
107282012-08-17 Jakub Jelinek <jakub@redhat.com>
10729
10730 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10731 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10732 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10733 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10734 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10735
70b5e7dc
RG
107362012-08-10 Richard Guenther <rguenther@suse.de>
10737
10738 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10739
f8923f7e
SB
107402012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10741
10742 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10743 instead of separate pp_newline and pp_flush.
10744 (print_c_tree): Likewise.
10745
e45abe1f
RH
107462012-07-26 Richard Henderson <rth@redhat.com>
10747
10748 * c-common.c (handle_hot_attribute): Allow labels.
10749 (handle_cold_attribute): Likewise.
10750
332f1d24
JJ
107512012-07-20 Jakub Jelinek <jakub@redhat.com>
10752
10753 PR c++/28656
10754 * c-common.c (check_function_nonnull): Handle multiple nonnull
10755 attributes properly.
10756
7ee2468b
SB
107572012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10758
10759 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10760 * c-ada-spec.c: Likewise.
10761 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10762
ee7b28eb
SB
107632012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10764
10765 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10766 Remove code conditional on it.
10767
6bdf3519
SB
107682012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10769
10770 * c-gimplify.c: Do not include basic-block.h.
10771 * c-common.c: Do not include linfuncs.h.
10772
532aafad
SB
107732012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10774
10775 * c-common.h: Include tree.h.
10776
8d0d1915
JM
107772012-07-02 Jason Merrill <jason@redhat.com>
10778
10779 PR c++/53524
10780 * c-common.c (get_priority): Call default_conversion.
10781
fbc873ad
UB
107822012-07-01 Uros Bizjak <ubizjak@gmail.com>
10783
10784 * c-pch.c (c_common_write_pch): Remove unused variables.
10785
d4a10d0a
SB
107862012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10787
10788 * cppspec.c: Moved from gcc/ to here.
10789
6f3a2e23
KT
107902012-06-27 Kai Tietz <ktietz@redhat.com>
10791
10792 PR preprocessor/37215
10793 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10794
8ca92d04
SB
107952012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10796
10797 * c-common.h (c_common_print_pch_checksum): Remove.
10798 * c-pch.c: Do not include output.h.
10799 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10800 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10801 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10802 (struct c_pch_header): Remove.
10803 (get_ident): Update gpch version.
10804 (pch_init): Do not print executable_checksum to asm_out_file.
10805 Do not fail if there is no asm_out_file to read back from. Set
10806 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10807 (c_common_write_pch): Verify that nothing was written to asm_out_file
10808 since pch_init was called. Do not write a c_pch_header, and do not
10809 copy from asm_out_file to the PCH.
10810 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10811 the content of asm_out_file from the PCH.
10812 (c_common_print_pch_checksum): Remove.
10813 * c-opts.c (c_common_init): Print out executable_checksum directly.
10814
70f42967
SB
108152012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10816
10817 * c-target.def (objc_declare_unresolved_class_reference,
10818 objc_declare_class_definition): Add new hooks.
10819
a8781821
SB
108202012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10821
10822 * c-lex.c: Do not include output.h.
10823 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10824 Remove uses of ASM_OUTPUT_IDENT.
10825
9e1a8dd1
RR
108262012-06-15 Marc Glisse <marc.glisse@inria.fr>
10827
10828 PR c++/51033
10829 * c-common.h (c_build_vec_perm_expr): Move decl here.
10830 * c-common.c (c_build_vec_perm_expr): Move definition
10831 here.
10832
6f07a821
SB
108332012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10834
10835 * c.opt (fconserve-space): Turn into a no-op.
10836
9faeb493 108372012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10838
10839 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10840 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10841 both the start and end of the function.
10842
a4b7d13c
SB
108432012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10844
10845 * c-common.c: Do not include output.h.
10846 * c-pragma.c: Likewise.
10847
c265f413
SA
108482012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10849
10850 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10851 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10852 (lang_decl_name): Handle namespace decls.
10853
be7a421e
SB
108542012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10855
10856 * c-ada-spec.c: Do not include output.h.
10857 * c-semantics.c: Likewise.
10858
65de6659
JM
108592012-05-29 Joseph Myers <joseph@codesourcery.com>
10860
10861 * c-common.c: Fix typo.
10862
ca5f4331
MM
108632012-05-29 Michael Matz <matz@suse.de>
10864
10865 * c-common.h (c_expand_decl): Remove prototype.
10866
4f7f7aca
MLI
108672012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10868
10869 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10870 * c-opts.c (c_common_handle_option): Remove code handling
10871 warn_missing_braces.
10872
4a792f9b
PC
108732012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10874
10875 PR c++/25137
10876 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10877 -Wmissing_braces.
10878
650dc14a
DS
108792012-05-22 Dodji Seketeli <dodji@redhat.com>
10880
10881 PR c++/53322
10882 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10883
9b095bf1
MLI
108842012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10885
10886 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10887 * c-opts.c (c_common_handle_option): Do not handle explicitly
10888 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10889
0b2c4be5
DS
108902012-05-16 Dodji Seketeli <dodji@redhat.com>
10891
10892 PR preprocessor/7263
ab20d992 10893 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10894 to cpp_classify_number. For diagnostics, use the precise location
10895 instead of the global input_location.
10896
a1bde5af
PC
108972012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10898
d02924ef 10899 PR c++/11856
a1bde5af
PC
10900 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10901
d1ede5f4
BS
109022012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10903
a1bde5af 10904 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10905
f2bc201f
MLI
109062012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10907
10908 PR 53063
10909 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10910 Wreorder): Use LangEnabledBy.
10911 * c-opts.c (c_common_handle_option): Do not enable them
10912 explicitly. Call lang-specific generated functions.
10913 (c_common_post_options): Do not set them here.
10914
95744782
MLI
109152012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10916
10917 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10918 Wmissing-field-initializers,Wmissing-parameter-type,
10919 Wold-style-declaration,Woverride-init): Use EnabledBy.
10920 * c-opts.c (c_common_post_options): Do not set here explicitly.
10921
7d5a5747
MLI
109222012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10923
10924 PR 53063
10925 * c-opts.c (c_common_handle_option): Use handle_generated_option
10926 to enable sub-options.
10927
5a3c9cf2
PC
109282012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10929
10930 PR c++/53158
10931 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10932
3ac8781c
RG
109332012-05-10 Richard Guenther <rguenther@suse.de>
10934
10935 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10936 adjust commentary about TYPE_IS_SIZETYPE types.
10937
1e537948
MLI
109382012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10939
10940 PR c++/53261
10941 * c-common.c (warn_logical_operator): Check that argument of
10942 integer_zerop is not NULL.
10943
f2c4a785
MLI
109442012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10945
10946 PR c/43772
10947 * c-common.c (warn_logical_operator): Do not warn if either side
10948 is already true or false.
10949
50f305ca
MLI
109502012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10951
10952 PR c/51712
10953 * c-common.c (expr_original_type): New.
10954 (shorten_compare): Do not warn for enumeration types.
10955
0c3641b0
MLI
109562012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10957
10958 * c.opt (fpermissive): Add Var(flag_permissive).
10959
7edaa4d2
MG
109602012-04-30 Marc Glisse <marc.glisse@inria.fr>
10961
10962 PR c++/51033
10963 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10964 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10965
b9c8da34
DS
109662012-04-30 Dodji Seketeli <dodji@redhat.com>
10967
10968 Add -Wvarargs option
ab20d992 10969 * c.opt (Wvarargs): Define new option.
b9c8da34 10970
e6c69da0
MLI
109712012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10972
10973 * c-common.c (check_function_arguments): Replace
10974 Wmissing-format-attribute with Wsuggest-attribute=format.
10975
90137d8f
MLI
109762012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10977
10978 * c.opt (Wsuggest-attribute=format): New. Alias of
10979 Wmissing-format-attribute.
10980 * c-format.c (decode_format_type): Replace
10981 Wmissing-format-attribute with Wsuggest-attribute=format.
10982 (check_function_format): Likewise.
10983
9faeb493 109842012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10985
10986 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10987 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10988 * c.opt: Add Wliteral-suffix.
10989
c1771a20
MLI
109902012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10991
10992 PR c/44774
10993 * c.opt (Wpedantic): New.
10994 (pedantic): Alias Wpedantic.
10995 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10996 (c_common_post_options): Likewise.
10997 (sanitize_cpp_opts): Likewise.
10998 * c-lex.c (interpret_float): Likewise.
10999 * c-format.c (check_format_types): Likewise.
11000 * c-common.c (pointer_int_sum): Likewise.
11001 (c_sizeof_or_alignof_type): Likewise.
11002 (c_add_case_label): Likewise.
11003 (c_do_switch_warnings): Likewise.
11004 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11005
04b391c1
JM
110062012-04-15 Jason Merrill <jason@redhat.com>
11007
11008 PR c++/52818
11009 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11010 (C_STD_NAME): Distinguish between C++98 and C++11.
11011
ac868f29
EB
110122012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11013
11014 PR target/52624
11015 * c-common.h (uint16_type_node): Rename into...
11016 (c_uint16_type_node): ...this.
11017 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11018 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11019
fd4116f4
MLI
110202012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11021
11022 * c-common.c (warn_if_unused_value): Move definition to here.
11023 * c-common.h (warn_if_unused_value): Move declaration to here.
11024
573ac65e
WB
110252012-03-23 William Bader <williambader@hotmail.com>
11026
11027 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11028
552b8185
JM
110292012-03-20 Jason Merrill <jason@redhat.com>
11030
11031 * c-common.h (enum cxx_dialect): Add cxx1y.
11032 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11033 test.
11034 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11035 * c-opts.c (c_common_post_options): Likewise.
11036 (set_std_cxx1y): New.
11037 (c_common_handle_option): Call it.
11038 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11039
04398fa8
PC
110402012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11041
11042 PR c++/14710
11043 * c.opt ([Wuseless-cast]): Add.
11044
d2a12ae7
RG
110452012-03-16 Richard Guenther <rguenther@suse.de>
11046
11047 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11048
a12bf402
MLI
110492012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11050
11051 PR c++/44783
11052 * c.opt (ftemplate-backtrace-limit) Add.
11053
5c30094f
RO
110542012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11055
11056 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11057 handling.
11058 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11059 (init_pragma): Don't register extern_prefix.
11060
21fa2faf
RG
110612012-03-12 Richard Guenther <rguenther@suse.de>
11062
11063 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11064 (builtin_type_for_size): Likewise.
11065
e3793c6f
JJ
110662012-02-13 Jakub Jelinek <jakub@redhat.com>
11067
11068 PR c++/52215
11069 * c-common.c (sync_resolve_params): Don't decide whether to convert
11070 or not based on TYPE_SIZE comparison, convert whenever arg_type
11071 is unsigned INTEGER_TYPE.
11072
93286335
PC
110732012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11074
11075 PR c/52118
11076 * c.opt ([Wunused-local-typedefs]): Fix description.
11077
7a421706
MS
110782012-01-24 Mike Stump <mikestump@comcast.net>
11079
11080 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11081 exactly.
11082
ba9b1f11
RG
110832012-01-18 Richard Guenther <rguenther@suse.de>
11084
11085 * c-opts.c (c_common_post_options): Reset LTO flags if
11086 we are about to generate a PCH.
11087
465406be
PC
110882012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11089
11090 PR c++/51777
11091 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11092 use pp_unsigned_wide_integer.
11093
aee15221
RG
110942012-01-10 Richard Guenther <rguenther@suse.de>
11095
11096 PR middle-end/51806
11097 * c-opts.c (c_common_handle_option): Move -Werror handling
11098 to language independent code.
11099
5720c0dc
RG
111002012-01-05 Richard Guenther <rguenther@suse.de>
11101
11102 PR middle-end/51764
11103 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11104 from common.opt.
11105
73ac190a
PC
111062011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11107
11108 PR c++/51316
11109 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11110 of array types with an unknown bound.
11111
48b0b196
JM
111122011-12-20 Joseph Myers <joseph@codesourcery.com>
11113
11114 * c-common.c (flag_isoc99): Update comment to refer to C11.
11115 (flag_isoc1x): Change to flag_isoc11.
11116 * c-common.h (flag_isoc99): Update comment to refer to C11.
11117 (flag_isoc1x): Change to flag_isoc11.
11118 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11119 C11.
11120 * c-opts.c (set_std_c1x): Change to set_std_c11.
11121 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11122 Call set_std_c11.
11123 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11124 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11125 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11126 standard.
11127 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11128 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11129 (std=gnu1x): Make alias of std=gnu11.
11130
d58d6eb5
JM
111312011-12-19 Jason Merrill <jason@redhat.com>
11132
11133 PR c++/51228
11134 * c-common.c (handle_transparent_union_attribute): Check the first
11135 field if the type is complete.
11136
b3908fcc
JW
111372011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11138
11139 PR libstdc++/51365
11140 * c-common.c (RID_IS_FINAL): Add.
11141 * c-common.h (RID_IS_FINAL): Add.
11142
fea3ca91
IS
111432011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11144
11145 * c.opt (fgnu-runtime): Provide full description.
11146 (fnext-runtime): Likewise.
11147 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11148
62bad7cd
AM
111492011-11-28 Andrew MacLeod <amacleod@redhat.com>
11150
11151 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11152 predefines in one place. Add LOCK_FREE predefines.
11153 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11154 new func.
11155
c466c4ff
AM
111562011-11-24 Andrew MacLeod <amacleod@redhat.com>
11157
11158 PR c/51256
9faeb493 11159 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11160 conditions
9faeb493
UB
11161 (resolve_overloaded_atomic_exchange,
11162 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11163 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11164 error_mark_node for error conditions.
9faeb493 11165
a5952633
RG
111662011-11-08 Richard Guenther <rguenther@suse.de>
11167
11168 PR middle-end/51010
ab20d992 11169 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11170
0a35513e
AH
111712011-11-07 Richard Henderson <rth@redhat.com>
11172 Aldy Hernandez <aldyh@redhat.com>
11173 Torvald Riegel <triegel@redhat.com>
11174
11175 Merged from transactional-memory.
11176
11177 * c-common.c (handle_tm_wrap_attribute,
11178 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11179 (struct c_common_reswords): Added __transaction* keywords.
11180 (struct c_common_attribute_table): Added transaction* and tm_regparm
11181 attributes.
11182 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11183 masks.
11184 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11185 find_tm_attribute): Declare.
11186
6d87092d
JM
111872011-11-07 Jason Merrill <jason@redhat.com>
11188
11189 PR c++/35688
11190 * c-common.c, c-common.h: Revert yesterday's changes.
11191
8e7860a1
JM
111922011-11-06 Jason Merrill <jason@redhat.com>
11193
11194 PR c++/35688
11195 * c-common.c (decl_has_visibility_attr): Split out from...
11196 (c_determine_visibility): ...here.
11197 * c-common.h: Declare it.
11198
d19fa6b5
JM
111992011-11-06 Joseph Myers <joseph@codesourcery.com>
11200
11201 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11202 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11203 type.
11204 (check_user_alignment): New. Split out of
11205 handle_aligned_attribute. Disallow integer constants with
11206 noninteger types. Conditionally allow zero.
11207 (handle_aligned_attribute): Use check_user_alignment.
11208 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11209
86951993
AM
112102011-11-06 Andrew MacLeod <amacleod@redhat.com>
11211 Richard Henderson <rth@redhat.com>
11212
11213 Merged from cxx-mem-model.
11214
11215 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11216 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11217 parameters that are the same type size.
11218 (get_atomic_generic_size): New. Find size of generic
11219 atomic function parameters and do typechecking.
11220 (add_atomic_size_parameter): New. Insert size into parameter list.
11221 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11222 either __atomic_exchange_n or external library call.
9faeb493 11223 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11224 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11225 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11226 __atomic_load_n or an external library call.
11227 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11228 __atomic_store_n or an external library call.
11229 (resolve_overloaded_builtin): Handle new __atomic builtins.
11230
cf9e9959
EB
112312011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11232
11233 PR c++/50608
11234 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11235 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11236 <INDIRECT_REF>: Return the argument.
11237 <ARRAY_REF>: Remove special code for negative offset.
11238 Call fold_build_pointer_plus instead of size_binop.
11239 (fold_offsetof): Remove STOP_REF argument and adjust.
11240 * c-common.h (fold_offsetof_1): Declare.
11241 (fold_offsetof): Remove STOP_REF argument.
11242
25339f10
JM
112432011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11244
11245 PR c++/50810
11246 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11247 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11248 Wnarrowing for C++0x and C++98.
11249 * c.opt ([Wnarrowing]): Update.
11250
89401152
PC
112512011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11252
11253 PR c++/44277
11254 * c.opt: Add Wzero-as-null-pointer-constant.
11255
97e3ad20
JM
112562011-10-31 Jason Merrill <jason@redhat.com>
11257
15694fdd
JM
11258 * c.opt (-fdeduce-init-list): Off by default.
11259
97e3ad20
JM
11260 PR c++/50920
11261 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11262 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11263 and -Wc++11-compat.
11264 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11265
fb9120e3
RAV
112662011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11267
11268 PR c++/30066
11269 * c.opt (fvisibility-inlines-hidden): Description change.
11270
3ce4f9e4
ESR
112712011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11272
11273 Implement C++11 user-defined literals.
11274 * c-common.c (build_userdef_literal): New.
11275 * c-common.def: New tree code.
11276 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11277 * c-lex.c (interpret_float): Add suffix parm.
11278 (c_lex_with_flags): Build literal tokens.
11279
5f53c243
PC
112802011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11281
11282 PR c++/50841
11283 Revert:
11284 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11285
11286 PR c++/50810
11287 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11288 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11289 Wnarrowing for C++0x and C++98.
11290 * c.opt ([Wnarrowing]): Update.
11291
263734e1
PC
112922011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11293
11294 PR c++/50810
11295 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11296 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11297 Wnarrowing for C++0x and C++98.
11298 * c.opt ([Wnarrowing]): Update.
11299
d2e312d7
PC
113002011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11301
11302 PR c++/45385
11303 * c-common.c (conversion_warning): Remove code looking for
11304 artificial operands.
11305
d17687f6
DS
113062011-10-18 Dodji Seketeli <dodji@redhat.com>
11307
11308 PR bootstrap/50760
11309 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11310 !NO_IMPLICIT_EXTERN_C.
d17687f6 11311
fc8396e9
PC
113122011-10-17 Michael Spertus <mike_spertus@symantec.com>
11313
11314 * c-common.c (c_common_reswords): Add __bases,
11315 __direct_bases.
11316 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11317
113182011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11319
11320 PR c++/50757
11321 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11322
847e697a
TT
113232011-10-15 Tom Tromey <tromey@redhat.com>
11324 Dodji Seketeli <dodji@redhat.com>
11325
11326 * c.opt (fdebug-cpp): New option.
11327 * c-opts.c (c_common_handle_option): Handle the option.
11328 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11329 output stream in parameter. Factorized from ...
11330 (maybe_print_line): ... this. Dump location debug information when
11331 -fdebug-cpp is in effect.
11332 (print_line_1): New static function. Takes an output stream in
11333 parameter. Factorized from ...
11334 (print_line): ... here. Dump location information when -fdebug-cpp
11335 is in effect.
11336 (scan_translation_unit): Dump location information when
11337 -fdebug-cpp is in effect.
11338
92582b75
TT
113392011-10-15 Tom Tromey <tromey@redhat.com>
11340 Dodji Seketeli <dodji@redhat.com>
11341
11342 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11343 without argument.
11344 * c-opts.c (c_common_handle_option)<case
11345 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11346 cases. Handle -ftrack-macro-expansion with and without argument.
11347
46427374
TT
113482011-10-15 Tom Tromey <tromey@redhat.com>
11349 Dodji Seketeli <dodji@redhat.com>
11350
11351 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11352 (print_line, cb_define, do_line_change): Adjust to avoid touching
11353 the internals of struct line_map. Use the public API instead.
11354 * c-pch.c (c_common_read_pch): Likewise.
11355 * c-lex.c (fe_file_change): Likewise.
11356
fc8396e9
PC
113572011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11358
11359 PR c++/17212
11360 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11361
113622011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11363
11364 PR c++/33067
11365 * c-pretty-print.c (pp_c_floating_constant): Output
11366 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11367
e79983f4
MM
113682011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11369
11370 * c-common.c (def_builtin_1): Delete old interface with two
11371 parallel arrays to hold standard builtin declarations, and replace
11372 it with a function based interface that can support creating
11373 builtins on the fly in the future. Change all uses, and poison
11374 the old names. Make sure 0 is not a legitimate builtin index.
11375 * c-omp.c (c_finish_omp_barrier): Ditto.
11376 (c_finish_omp_taskwait): Ditto.
11377 (c_finish_omp_flush): Ditto.
11378
6637388f
TG
113792011-10-11 Tristan Gingold <gingold@adacore.com>
11380
11381 * c.opt: (fallow-parameterless-variadic-functions): New.
11382
3797cb21
DS
113832011-09-08 Dodji Seketeli <dodji@redhat.com>
11384
11385 PR c++/33255 - Support -Wunused-local-typedefs warning
11386 * c-common.h (struct c_language_function::local_typedefs): New
11387 field.
9faeb493
UB
11388 (record_locally_defined_typedef, maybe_record_typedef_use)
11389 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11390 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11391 (maybe_record_typedef_use)
11392 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11393 * c.opt: Declare new -Wunused-local-typedefs flag.
11394
693ddb1b
EB
113952011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11396
11397 PR middle-end/50266
11398 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11399 computations.
11400
830c740f
RG
114012011-09-05 Richard Guenther <rguenther@suse.de>
11402
11403 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11404 of integer_minus_one_node for empty array upper bounds.
11405
892a371f
DS
114062011-08-28 Dodji Seketeli <dodji@redhat.com>
11407
11408 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11409 it's the first time it's being called on this main TU.
11410
0e3fdb48
RB
114112011-08-24 Richard Guenther <rguenther@suse.de>
11412
11413 PR c/49396
11414 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11415
114162011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11417
11418 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11419 defined in cpp_init_builtins and c_cpp_builtins.
11420
d4a83c10
JM
114212011-08-19 Joseph Myers <joseph@codesourcery.com>
11422
11423 * c-common.c (c_common_reswords): Add __builtin_complex.
11424 * c-common.h (RID_BUILTIN_COMPLEX): New.
11425
bbceee64
JM
114262011-08-18 Joseph Myers <joseph@codesourcery.com>
11427
11428 * c-common.c (c_common_reswords): Add _Noreturn.
11429 (keyword_is_function_specifier): Handle RID_NORETURN.
11430 * c-common.h (RID_NORETURN): New.
11431
3f8257db 114322011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11433
11434 * c-common.c (unsafe_conversion_p): New function. Check if it is
11435 unsafe to convert an expression to the type.
11436 (conversion_warning): Adjust, use unsafe_conversion_p.
11437 * c-common.h (unsafe_conversion_p): New function declaration.
11438
20906c66
JJ
114392011-08-02 Jakub Jelinek <jakub@redhat.com>
11440
11441 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11442 (c_finish_omp_taskyield): New prototype.
11443 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11444 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11445 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11446 or RHS1 have side-effects, evaluate those too in the right spot,
11447 if it is a decl and LHS is also a decl, error out if they
11448 aren't the same.
11449 (c_finish_omp_taskyield): New function.
11450 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11451 * c-pragma.c (omp_pragmas): Add taskyield.
11452 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11453 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11454 PRAGMA_OMP_CLAUSE_MERGEABLE.
11455
770e5a2e
DS
114562011-07-25 Dodji Seketeli <dodji@redhat.com>
11457
11458 * c-common.h (set_underlying_type): Remove parm name from
11459 declaration.
11460
1baae426
RG
114612011-07-25 Romain Geissler <romain.geissler@gmail.com>
11462
11463 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11464
fcb21722
JM
114652011-07-22 Jason Merrill <jason@redhat.com>
11466
76f86d00
JM
11467 PR c++/49793
11468 * c.opt (Wnarrowing): New.
11469
3a636414
JM
11470 PR c++/30112
11471 * c-common.h: Declare c_linkage_bindings.
11472 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11473
fcb21722
JM
11474 PR c++/49813
11475 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11476 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11477 as flag_isoc99 for 'restrict'.
11478 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11479
02614448
ILT
114802011-07-21 Ian Lance Taylor <iant@google.com>
11481
11482 PR middle-end/49705
11483 * c-common.c (c_disable_warnings): New static function.
11484 (c_enable_warnings): New static function.
11485 (c_fully_fold_internal): Change local unused_p to bool. Call
11486 c_disable_warnings and c_enable_warnings rather than change
11487 c_inhibit_evaluation_warnings.
11488
34429675
JM
114892011-07-20 Jason Merrill <jason@redhat.com>
11490
11491 PR c++/6709 (DR 743)
11492 PR c++/42603 (DR 950)
11493 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11494 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11495 (CPP_DECLTYPE): New.
11496 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11497
5d49b6a7
RG
114982011-07-19 Richard Guenther <rguenther@suse.de>
11499
11500 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11501 * c-omp.c (c_finish_omp_for): Likewise.
11502
e84a58ff
EB
115032011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11504
11505 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11506 body on the next line.
11507
329af3c7
JM
115082011-07-08 Jason Merrill <jason@redhat.com>
11509
4063e61b
JM
11510 PR c++/45437
11511 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11512
329af3c7
JM
11513 PR c++/49673
11514 * c-common.c (c_apply_type_quals_to_decl): Don't check
11515 TYPE_NEEDS_CONSTRUCTING.
11516
1a072294
RG
115172011-07-06 Richard Guenther <rguenther@suse.de>
11518
11519 * c-common.c (c_common_nodes_and_builtins):
11520 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11521
fce5dddd
RG
115222011-07-05 Richard Guenther <rguenther@suse.de>
11523
11524 * c-common.c (c_common_nodes_and_builtins): Build all common
11525 tree nodes first.
11526
45d439ac
JJ
115272011-06-27 Jakub Jelinek <jakub@redhat.com>
11528
56300785
JJ
11529 * c-common.h (c_tree_chain_next): New static inline function.
11530
45d439ac
JJ
11531 * c-common.c (check_builtin_function_arguments): Handle
11532 BUILT_IN_ASSUME_ALIGNED.
11533
e0a8ecf2
AM
115342011-06-21 Andrew MacLeod <amacleod@redhat.com>
11535
11536 * c-common.c: Add sync_ or SYNC__ to builtin names.
11537 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11538
115392011-06-20 Pierre Vittet <piervit@pvittet.com>
11540
11541 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11542 handler.
11543 (gen_pragma_handler): New union.
11544 (internal_pragma_handler): New type.
11545 (c_register_pragma_with_data)
11546 (c_register_pragma_with_expansion_and_data): New functions.
11547
11548 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11549 (c_register_pragma, c_register_pragma_with_expansion)
11550 (c_invoke_pragma_handler): Changed to work with
11551 internal_pragma_handler.
11552 (c_register_pragma_with_data)
11553 (c_register_pragma_with_expansion_and_data): New functions.
11554
677f3fa8
JM
115552011-06-14 Joseph Myers <joseph@codesourcery.com>
11556
11557 * c-common.c: Include common/common-target.h.
11558 (handle_section_attribute): Use
11559 targetm_common.have_named_sections.
11560 * c-cppbuiltin.c: Include common/common-target.h.
11561 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11562
d7fc8c14
RG
115632011-06-10 Richard Guenther <rguenther@suse.de>
11564
11565 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11566 to print a IDENTIFIER_NODE.
11567
10e48e39
RO
115682011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11569 Joseph Myers <joseph@codesourcery.com>
11570
11571 * c.opt (fbuilding-libgcc): New option.
11572 * c-cppbuiltin.c (c_cpp_builtins): Define
11573 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11574
6976ae51
JM
115752011-06-07 Jason Merrill <jason@redhat.com>
11576
3ff60975
JM
11577 * c-common.c (max_tinst_depth): Lower default to 900.
11578
6976ae51
JM
11579 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11580
009db074
RG
115812011-06-07 Richard Guenther <rguenther@suse.de>
11582
11583 * c-common.c (c_common_nodes_and_builtins): Do not set
11584 size_type_node or call set_sizetype.
11585
b4592b92
DS
115862011-06-07 Dodji Seketeli <dodji@redhat.com>
11587
11588 PR debug/49130
11589 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11590 type when using pointer comparison to compare types.
b4592b92 11591
014ab419
JW
115922011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11593
11594 * c.opt: Add -Wdelete-non-virtual-dtor.
11595 * c-opts.c (c_common_handle_option): Include it in -Wall.
11596
4f60111f
NF
115972011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11598
11599 PR bootstrap/49190
11600
11601 Revert:
11602 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11603
11604 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11605 not tree_common.
11606
4cc4f2f4
JJ
116072011-05-27 Jakub Jelinek <jakub@redhat.com>
11608
11609 PR c++/49165
11610 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11611 C++ don't call c_common_truthvalue_conversion on void type arms.
11612
38e01f9e
NF
116132011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11614
11615 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11616 (stmt_list_stack): Define.
11617 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11618 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11619
92e948a8
NF
116202011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11621
11622 * c-common.c (warning_candidate_p): Check for BLOCKs.
11623
a2fc3e63
NF
116242011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11625
11626 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11627 not tree_common.
11628
0957c029
JJ
116292011-05-25 Jakub Jelinek <jakub@redhat.com>
11630
11631 * c-common.c (def_fn_type): Remove extra va_end.
11632
828fb3ba
JM
116332011-05-23 Jason Merrill <jason@redhat.com>
11634
11635 PR c++/48106
11636 * c-common.c (c_common_get_narrower): New.
11637 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11638
dde05067
NF
116392011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11640
11641 * c-common.h (check_function_arguments): Tweak prototype of
11642 check_function_arguments.
11643 * c-common.c (check_function_arguments): Likewise. Adjust
11644 calls to check_function_nonnull, check_function_format, and
11645 check_function_sentinel.
11646 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11647 separate attributes and typelist arguments. Use
11648 FOREACH_FUNCTION_ARGS to iterate over argument types.
11649
3c0d13bf
PC
116502011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11651
11652 * c-common.c (c_common_reswords): Reorder.
11653 * c-common.h (rid): Likewise.
11654
8242dd04
NF
116552011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11656
11657 * c-common.c (def_fn_type): Don't call build_function_type, call
11658 build_function_type_array or build_varargs_function_type_array
11659 instead.
11660 (c_common_nodes_and_builtins): Likewise.
11661
3d528853
NF
116622011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11663
11664 * c-common.c (c_add_case_label): Omit the loc argument to
11665 build_case_label.
11666 * c-common.h (build_case_label): Remove.
11667 * c-semantics.c (build_case_label): Remove.
11668
a04a722b
JM
116692011-05-05 Joseph Myers <joseph@codesourcery.com>
11670
11671 * c-objc.h (objc_start_method_definition): Update prototype.
11672 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11673
e19a18d4
NF
116742011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11675
11676 * c-common.c (check_main_parameter_types): Reindent. Don't use
11677 TYPE_ARG_TYPES directly.
11678 (handle_nonnull_attribute): Likewise.
11679 (sync_resolve_params): Likewise.
11680 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11681 to check_format_string.
11682 (handle_format_attribute): Likewise.
11683 (check_format_string): Take a function type to examine instead of
11684 a type list. Use a function_arg_iterator to step through argument
11685 types.
11686
c62c040f
RG
116872011-05-04 Richard Guenther <rguenther@suse.de>
11688
11689 * c-common.c (fix_string_type): Use size_int for index type bounds.
11690 (start_fname_decls): Do not pass NULL to build_int_cst.
11691 (c_init_attributes): Likewise.
11692 * c-lex.c (c_lex_with_flags): Likewise.
11693
c12ff9d8
JM
116942011-04-27 Jason Merrill <jason@redhat.com>
11695
11696 * c-common.c (make_tree_vector_from_list): New.
11697 * c-common.h: Declare it.
11698
304dfbe3
RG
116992011-04-26 Richard Guenther <rguenther@suse.de>
11700
11701 PR preprocessor/48248
11702 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11703 for output size with -P.
11704
3c0d13bf
PC
117052011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11706
11707 * c-common.c (struct c_common_resword): Add __underlying_type.
11708 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11709
04695783
JM
117102011-04-20 Jim Meyering <meyering@redhat.com>
11711
11712 * c-format.c (init_dollar_format_checking): Remove useless
11713 if-before-free.
11714
0dc33c3c
NP
117152011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11716
11717 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11718 (objc_detect_field_duplicates): New.
0dc33c3c 11719 * stub-objc.c: Likewise.
3c0d13bf 11720
c59633d9
NP
117212011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11722
11723 * stub-objc.c (objc_declare_protocols): Renamed to
11724 objc_declare_protocol.
11725 * c-objc.h: Likewise.
3c0d13bf 11726
32dabdaf
NP
117272011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11728
11729 * stub-objc.c (objc_declare_class): Updated argument name.
11730
81f653d6
NF
117312011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11732
11733 * c-common.h (c_common_init_ts): Declare.
11734 * c-common.c (c_common_init_ts): Define.
11735
eb345401
NP
117362011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11737
11738 * c-objc.h (objc_build_message_expr): Updated prototype.
11739 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11740
a358e188
MJ
117412011-04-12 Martin Jambor <mjambor@suse.cz>
11742
11743 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11744 of cgraph_node.
11745
e6313a78
RG
117462011-04-11 Richard Guenther <rguenther@suse.de>
11747
11748 * c-common.c (complete_array_type): Build a range type of
11749 proper type.
11750
dcf0c47e
NF
117512011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11752
11753 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11754 (handle_type_generic_attribute): Likewise.
11755
1ee44b26
JM
117562011-04-07 Jason Merrill <jason@redhat.com>
11757
11758 PR c++/48450
11759 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11760 conversion from C++0x scoped enum.
11761
acce4e77
JM
117622011-04-06 Joseph Myers <joseph@codesourcery.com>
11763
11764 * c-target-def.h: New file.
11765 * c-target.def: New file.
11766 * c-target.h: New file.
11767 * c-common.c (targetcm): Don't define here.
11768 * c-common.h (default_handle_c_option): Declare.
11769 * c-format.c: Include c-target.h instead of target.h.
11770 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11771 include tm.h.
11772 (default_handle_c_option): Move from targhooks.c.
11773
e2eefb55
JJ
117742011-03-29 Jakub Jelinek <jakub@redhat.com>
11775
11776 PR preprocessor/48248
11777 * c-ppoutput.c (print): Add src_file field.
11778 (init_pp_output): Initialize it.
11779 (maybe_print_line): Don't optimize by adding up to 8 newlines
11780 if map->to_file and print.src_file are different file.
11781 (print_line): Update print.src_file.
11782
ba78087b
KT
117832011-03-25 Kai Tietz <ktietz@redhat.com>
11784
11785 * c-ada-spec.c (compare_comment): Use filename_cmp
11786 instead of strcmp for filename.
11787
0edf1bb2
JL
117882011-03-25 Jeff Law <law@redhat.com>
11789
adfac8df 11790 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11791
c7dc8804
JM
117922011-03-25 Jason Merrill <jason@redhat.com>
11793
11794 * c.opt: Add -std=c++03.
11795
d1d879b1
EB
117962011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11797
11798 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11799
3f8257db 118002011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11801
11802 PR target/12171
5050afdf
KT
11803 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11804 Display allowed attributes for function pointer types.
11805 (pp_c_attributes_display): New function to display
11806 attributes having affects_type_identity flag set to true.
11807 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11808
62d784f7
KT
11809 * c-common.c (c_common_attribute_table):
11810 Add new element.
11811 (c_common_format_attribute_table): Likewise.
11812
82d37118
JM
118132011-03-18 Jason Merrill <jason@redhat.com>
11814
49a000c3
JM
11815 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11816 * c-common.h: Don't declare it here.
11817 * c-common.c: Or define it here.
11818 * c-opts.c (c_common_handle_option): Or set it here.
11819
82d37118
JM
11820 PR c++/35315
11821 * c-common.c (handle_transparent_union_attribute): Don't
11822 make a duplicate type in C++.
11823
17bc631c
JM
118242011-03-15 Jason Merrill <jason@redhat.com>
11825
11826 * c-common.c (max_constexpr_depth): New.
11827 * c-common.h: Declare it.
11828 * c-opts.c (c_common_handle_option): Set it.
11829 * c.opt (fconstexpr-depth): New option.
11830
1b9b91a6
JM
118312011-03-11 Jason Merrill <jason@redhat.com>
11832
f231b5ff
JM
11833 * c-common.c (attribute_takes_identifier_p): Add missing const.
11834
1b9b91a6
JM
11835 PR c++/46803
11836 * c-common.c (attribute_takes_identifier_p): Assume that an
11837 unknown attribute takes an identifier.
11838
a19e4d44
NF
118392011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11840
11841 PR c/47786
11842 * c-common.c (c_type_hash): Call list_length instead of iterating
11843 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11844
982d62f6
JJ
118452011-02-19 Jakub Jelinek <jakub@redhat.com>
11846
11847 PR c/47809
11848 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11849
0a256240
NP
118502011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11851
11852 * c.opt (fobjc-abi-version=) New.
11853 (fobjc-nilcheck): New.
11854
ba9e6dd5
NF
118552011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11856
11857 PR c++/46890
11858 * c-common.h (keyword_is_decl_specifier): Declare.
11859 * c-common.c (keyword_is_decl_specifier): Define.
11860 (keyword_is_function_specifier): New function.
11861
7273813a
JJ
118622011-01-26 Jakub Jelinek <jakub@redhat.com>
11863
11864 PR c/47473
11865 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11866 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11867 REAL_TYPE.
11868
908ef79b
AC
118692011-01-26 Arnaud Charlet <charlet@adacore.com>
11870
11871 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11872
237e9384
JJ
118732011-01-26 Jakub Jelinek <jakub@redhat.com>
11874
11875 PR pch/47430
11876 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11877 after init_c_lex if pch_file is set.
11878
47ea1edf
DK
118792011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11880
d4dba752 11881 PR c++/43601
47ea1edf
DK
11882 * c.opt (-fkeep-inline-dllexport): New switch.
11883
2aa9c6ae
RG
118842011-01-12 Richard Guenther <rguenther@suse.de>
11885
11886 PR middle-end/32511
11887 * c-common.c (handle_weak_attribute): Warn instead of error
11888 on declaring an inline function weak.
11889
7bd11157
TT
118902011-01-05 Tom Tromey <tromey@redhat.com>
11891
11892 * c-common.h (lvalue_error): Update.
11893 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11894 not error.
11895
0e66e494 118962010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11897
b4f588c4
NP
11898 PR objc/47075
11899 * c-objc.h (objc_finish_message_expr): Added argument to
11900 prototype.
11901
f4da8dce
NF
119022010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11903
11904 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11905 Use prototype_p.
11906
46270f14
NP
119072010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11908
11909 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11910 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11911
4816c593
NF
119122010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11913
11914 * c-common.h (readonly_error): Declare.
11915 * c-common.c (readonly_error): Define.
11916
7a6daeb0
NF
119172010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11918
11919 * c-common.h (invalid_indirection_error): Declare.
11920 * c-common.c (invalid_indirection_error): Define.
11921
892f6119
RG
119222010-12-03 Richard Guenther <rguenther@suse.de>
11923
11924 PR c/46745
11925 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11926 (pp_c_unary_expression): Likewise.
11927 (pp_c_expression): Likewise.
11928
6c39e757
NP
119292010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11930
11931 * c-common.h (objc_finish_function): New.
11932 (objc_non_volatilized_type): Removed.
11933 (objc_type_quals_match): Removed.
11934 * stub-objc.c (objc_finish_function): New.
11935 (objc_non_volatilized_type): Removed.
11936 (objc_type_quals_match): Removed.
9faeb493 11937
7c475d11
JM
119382010-11-30 Joseph Myers <joseph@codesourcery.com>
11939
11940 * c-common.h (parse_optimize_options): Declare.
11941 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11942 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11943
71f3e391
JM
119442010-11-29 Joseph Myers <joseph@codesourcery.com>
11945
11946 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11947 GET_ENVIRONMENT.
11948 * c-pch.c (O_BINARY): Don't define here.
11949 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11950
d5fabb58
JM
119512010-11-25 Joseph Myers <joseph@codesourcery.com>
11952
11953 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11954 targetm.except_unwind_info.
11955
299404a1
JM
119562010-11-23 Joseph Myers <joseph@codesourcery.com>
11957
11958 * c-opts.c (c_common_handle_option): Pass location to
11959 set_struct_debug_option.
11960
c98cd5bf
JM
119612010-11-23 Joseph Myers <joseph@codesourcery.com>
11962
11963 * c-common.c (visibility_options): Move from ../opts.c.
11964 * c-common.h (struct visibility_flags, visibility_options):
11965 Declare here.
11966 * c-opts.c (finish_options): Rename to c_finish_options.
11967 (c_common_init): Update call to finish_options.
11968
a9546771
NP
119692010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11970
11971 PR objc/34033
11972 * c-lex.c (lex_string): Check that each string in an Objective-C
11973 string concat sequence starts with either one or zero '@', and
11974 that there are no spurious '@' signs at the end.
11975
24a57808
JM
119762010-11-20 Joseph Myers <joseph@codesourcery.com>
11977
11978 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11979 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11980 HANDLE_PRAGMA_VISIBILITY.
11981 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11982 HANDLE_PRAGMA_VISIBILITY): Don't define.
11983 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11984
a9aa2c3a
NF
119852010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11986
11987 PR c++/16189
11988 PR c++/36888
11989 PR c++/45331
11990 * c-common.h (keyword_begins_type_specifier): Declare.
11991 (keyword_is_storage_class_specifier): Declare.
11992 (keyword_is_type_qualifier): Declare.
11993 * c-common.c (keyword_begins_type_specifier): New function.
11994 (keyword_is_storage_class_specifier): New function.
11995 (keyword_is_type_qualifier): Declare.
11996
5386338c
JM
119972010-11-19 Joseph Myers <joseph@codesourcery.com>
11998
11999 PR c/46547
12000 * c-common.c (in_late_binary_op): Define.
12001 (c_common_truthvalue_conversion): Check in_late_binary_op before
12002 calling c_save_expr.
12003 * c-common.h (in_late_binary_op): Declare.
12004
69ccdddb
JM
120052010-11-19 Joseph Myers <joseph@codesourcery.com>
12006
12007 * c-opts.c (c_common_handle_option): Update calls to
12008 set_struct_debug_option.
12009
6b192a09
NP
120102010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12011
12012 * c-common.h (objc_declare_protocols): Added additional argument.
12013 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12014
fb52b50a
NF
120152010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12016
12017 PR c/33193
12018 * c-common.h (build_real_imag_expr): Declare.
12019 * c-semantics.c (build_real_imag_expr): Define.
12020
b37421c6
JM
120212010-11-17 Joseph Myers <joseph@codesourcery.com>
12022
12023 * c-opts.c (c_common_parse_file): Take no arguments.
12024 * c-common.h (c_common_parse_file): Update prototype.
12025
07078664
JJ
120262010-11-16 Jakub Jelinek <jakub@redhat.com>
12027
12028 PR c++/46401
12029 * c-common.c (warning_candidate_p): Don't track non-const calls
12030 or STRING_CSTs.
12031
c6a13190
ILT
120322010-11-15 Ian Lance Taylor <iant@google.com>
12033
12034 * c-lex.c (init_c_lex): Set macro debug callbacks if
12035 flag_dump_go_spec is set.
12036
925e8657
NP
120372010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12038
12039 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12040 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12041
bb0a9581
NF
120422010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12043
12044 PR preprocessor/45038
12045 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12046 dialects.
12047
c5fa0890
JM
120482010-11-12 Joseph Myers <joseph@codesourcery.com>
12049
12050 * c-common.h (c_family_lang_mask): Declare.
12051 * c-opts.c (c_family_lang_mask): Make extern.
12052 * c-pragma.c (handle_pragma_diagnostic): Use
12053 control_warning_option.
12054
a4d8c676
JM
120552010-11-12 Joseph Myers <joseph@codesourcery.com>
12056
12057 * c-common.c (parse_optimize_options): Update call to
12058 decode_options.
12059 * c-common.h (c_common_handle_option): Update prototype.
12060 * c-opts.c (c_common_handle_option): Take location_t parameter and
12061 pass it to other functions.
12062
f954bd2c
JM
120632010-11-11 Joseph Myers <joseph@codesourcery.com>
12064
12065 * c-opts.c (warning_as_error_callback): Remove.
12066 (c_common_initialize_diagnostics): Don't call
12067 register_warning_as_error_callback.
12068 (c_common_handle_option): Handle -Werror=normalized= here.
12069
d8a07487
JM
120702010-11-10 Joseph Myers <joseph@codesourcery.com>
12071
12072 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12073 in diagnostic.
12074 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12075 letter.
12076 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12077 Remove trailing '.' from diagnostics.
12078 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12079
d5478783
JM
120802010-11-10 Joseph Myers <joseph@codesourcery.com>
12081
12082 * c-common.c (parse_optimize_options): Pass global_dc to
12083 decode_options.
12084 * c-opts.c (c_common_handle_option): Pass &global_options to
12085 set_Wstrict_aliasing.
12086 * c.opt (v): Don't mark Common or document here.
12087
91ebb981
IS
120882010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12089
12090 PR target/44981
12091 * c-format.c (format_type): New type gcc_objc_string_format_type.
12092 (valid_stringptr_type_p): New.
12093 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12094 (check_format_string): Pass expected type, use
91ebb981
IS
12095 valid_stringptr_type_p (), check that the format string types are
12096 consistent with the format specification.
12097 (decode_format_attr): Warn if NSString is used outside objective-c.
12098 (format_types_orig): Add NSString.
12099 (format_name): New.
12100 (format_flags): New.
12101 (check_format_arg): Handle format strings requiring an external parser.
12102 first_target_format_type: New variable.
12103 (handle_format_attribute): Set up first_target_format_type, pass the
12104 expected format arg string type to check_format_string().
ab20d992 12105 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12106 * stub-objc.c (objc_string_ref_type_p): New.
12107 (objc_check_format_arg): New.
12108
bede2adc
NP
121092010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12110
9faeb493 12111 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12112 * c-common.h (objc_build_class_component_ref): New.
12113 * stub-objc.c (objc_build_class_component_ref): New.
12114
9a179d01
NP
121152010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12116
12117 * c.opt (Wproperty-assign-default): New option.
12118
22d8d616
NP
121192010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12120
12121 Implemented -fobjc-std=objc1 flag.
12122 * c.opt (fobjc-std=objc1): New option.
12123
2debdb4f
NP
121242010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12125
12126 Implemented format and noreturn attributes for Objective-C methods.
12127 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12128 attribute for Objective-C methods.
12129
ec52b111
JM
121302010-10-31 Jason Merrill <jason@redhat.com>
12131
12132 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12133 EXPR_LOC_OR_HERE.
12134
46a88c12
NP
121352010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12136
12137 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12138 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12139 (objc_add_property_declaration): Removed arguments for copies and
12140 ivar.
12141 (objc_build_getter_call): Renamed to
12142 objc_maybe_build_component_ref.
12143 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12144 (objc_is_property_ref): New.
12145 * c-common.c (c_common_reswords): Removed copies and ivar.
12146 * stub-objc.c (objc_add_property_declaration): Removed arguments
12147 for copies and ivar.
12148 (objc_build_getter_call): Renamed to
12149 objc_maybe_build_component_ref.
12150 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12151 (objc_is_property_ref): New.
9faeb493 12152
1e4bf85b
AC
121532010-10-29 Arnaud Charlet <charlet@adacore.com>
12154 Matthew Gingell <gingell@adacore.com>
12155
12156 * c-ada-spec.c (separate_class_package): New function.
12157 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12158 name of their enclosing package.
12159 (print_ada_declaration): Use separate_class_package.
12160
81f0bab2
JM
121612010-10-27 Jason Merrill <jason@redhat.com>
12162
2b08f2c5
JM
12163 * c-common.c (c_common_reswords): Add __is_literal_type.
12164 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12165
81f0bab2
JM
12166 * c-common.c (check_case_value): Remove special C++ code.
12167
200290f2
NP
121682010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12169
12170 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12171 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12172 and RID_LAST_PATTR.
12173 (objc_add_property_declaration): Added additional arguments.
12174 (objc_property_attribute_kind): Removed.
12175 (objc_set_property_attr): Removed.
12176 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12177 copy and nonatomic.
12178 * stub-objc.c (objc_add_property_declaration): Added additional
12179 arguments.
12180 (objc_set_property_attr): Removed.
9faeb493 12181
f614132b
NP
121822010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12183
12184 * c-common.h (objc_add_property_variable): Renamed to
12185 objc_add_property_declaration. Added location argument.
12186 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12187
b8a18805
NP
121882010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12189
12190 * c-common.h (objc_maybe_printable_name): New.
12191 * stub-objc.c (objc_maybe_printable_name): New.
12192
3f8257db
JJ
121932010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12194 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12195
12196 * c-common.h (c_common_mark_addressable_vec): Declare.
12197 * c-common.c (c_common_mark_addressable_vec): New function.
12198
249a82c4
NP
121992010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12200
12201 * c-common.h (objc_set_method_type): Removed.
12202 (objc_add_method_declaration): Added boolean argument.
12203 (objc_start_method_definition): Same change.
12204 (objc_build_method_signature): Same change.
12205 * stub-objc.c (objc_set_method_type): Removed.
12206 (objc_add_method_declaration): Added boolean argument.
12207 (objc_start_method_definition): Same change.
12208 (objc_build_method_signature): Same change.
12209
977e30bc
NP
122102010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12211
12212 * c-common.h (finish_file): Removed.
12213 (objc_write_global_declarations): New.
12214 * c-opts.c (c_common_parse_file): Do not call finish_file.
12215 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12216
da57d1b9
NP
122172010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12218
12219 Implemented parsing @synthesize and @dynamic for
12220 Objective-C/Objective-C++.
12221 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12222 (objc_add_synthesize_declaration): New.
12223 (objc_add_dynamic_declaration): New.
12224 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12225 * stub-objc.c (objc_add_synthesize_declaration): New.
12226 (objc_add_dynamic_declaration): New.
9faeb493 12227
0069111f
MM
122282010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12229
12230 PR target/46041
12231 * c-cppbuiltin.c (mode_has_fma): Move function here from
12232 builtins.c. Don't use the fma optab, instead just use the
12233 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12234 using -save-temps.
12235
e426b47b
NP
122362010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12237
12238 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12239
3f8257db 12240 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12241
9faeb493 12242 Radar 4330422
e426b47b
NP
12243 * c-common.h (objc_non_volatilized_type): New declaration
12244 * stub-objc.c (objc_non_volatilized_type): New stub.
12245
90fbfdc3
NP
122462010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12247
e426b47b 12248 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12249
ab20d992 12250 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12251
9faeb493 12252 Radar 4133425
90fbfdc3 12253 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12254 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12255
c37d8c30
IS
122562010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12257
12258 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12259 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12260 (objc_ivar_visibility_kind): New enum.
12261 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12262 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12263 visibility enum.
12264
1b1562a5
MM
122652010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12266
12267 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12268 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12269 has the appropriate fma builtins.
12270 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12271
668ea4b1
IS
122722010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12273
1b1562a5 12274 merge from FSF apple 'trunk' branch.
3f8257db 12275 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12276
668ea4b1
IS
12277 Radars 4436866, 4505126, 4506903, 4517826
12278 * c-common.c (c_common_resword): Define @property and its attributes.
12279 * c-common.h: Define property attribute enum entries.
12280 (OBJC_IS_PATTR_KEYWORD): New.
12281 (objc_property_attribute_kind): New enum.
12282 Declare objc_set_property_attr (), objc_add_property_variable (),
12283 objc_build_getter_call () and objc_build_setter_call ().
12284 * stub-objc.c (objc_set_property_attr): New stub.
12285 (objc_add_property_variable): Likewise.
12286 (objc_build_getter_call): Likewise.
12287 (objc_build_setter_call) Likewise.
1b1562a5 12288
a1178b30
IS
122892010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12290
1b1562a5 12291 merge from FSF apple 'trunk' branch.
ab20d992 12292 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12293
12294 Radar 3803157 (method attributes)
12295 * c-common.c (handle_deprecated_attribute): Recognize
12296 objc methods as valid declarations.
12297 * c-common.h: Declare objc_method_decl ().
1b1562a5 12298 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12299
a75bfaa6
JM
123002010-10-08 Joseph Myers <joseph@codesourcery.com>
12301
12302 * c-common.c (parse_optimize_options): Call
12303 decode_cmdline_options_to_array_default_mask before
12304 decode_options. Update arguments to decode_options.
12305 * c-common.h (c_common_init_options_struct): Declare.
12306 * c-opts.c (c_common_init_options_struct): New. Split out from
12307 c_common_init_options.
12308
f05b9d93
NP
123092010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12310
12311 Implemented fast enumeration for Objective-C.
12312 * c-common.h (objc_finish_foreach_loop): New.
12313 * stub-objc.c (objc_finish_foreach_loop): New.
12314
1ebe4b4f
JM
123152010-10-05 Joseph Myers <joseph@codesourcery.com>
12316
12317 * c-common.h (struct diagnostic_context): Don't declare here.
12318 (c_common_initialize_diagnostics): Declare using
12319 diagnostic_context typedef.
12320 * c-opts.c (c_common_handle_option): Pass global_dc to
12321 handle_generated_option.
12322
d4d24ba4
JM
123232010-10-04 Joseph Myers <joseph@codesourcery.com>
12324
12325 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12326 handle_generated_option.
12327
478a1c5b
ILT
123282010-10-03 Ian Lance Taylor <iant@google.com>
12329
12330 * c.opt (-fplan9-extensions): New option.
12331
82a1c2fe
FXC
123322010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12333
12334 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12335 Remove.
12336 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12337 of duplicating code.
12338
92902b1b
IS
123392010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12340
12341 * c-common.c: Add two new entries for @optional
12342 and @required keywords.
12343
12344 merge from FSF 'apple/trunk' branch.
3f8257db 12345 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12346
12347 Radar 4386773
12348 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12349 objective-c keywords.
12350 (objc_set_method_opt): New declaration.
12351 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12352
46625112
JM
123532010-09-30 Joseph Myers <joseph@codesourcery.com>
12354
12355 * c-common.c (handle_optimize_attribute): Pass &global_options to
12356 cl_optimization_save and cl_optimization_restore.
12357 * c-opts.c (c_common_handle_option): Pass &global_options to
12358 handle_generated_option.
12359 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12360 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12361 &global_options to cl_optimization_restore.
12362
49b91f05
NP
123632010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12364
12365 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12366 Objective-C/Objective-C++ keywords.
12367
13ed556f 123682010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12369
9faeb493
UB
12370 Merge from 'apple/trunk' branch on FSF servers.
12371
3f8257db 12372 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12373
12374 Radar 4281748
12375 * c-common.h (objc_check_global_decl): New declaration.
12376 * stub-objc.c (objc_check_global_decl): New stub.
12377
f0036cca
JM
123782010-09-29 Joseph Myers <joseph@codesourcery.com>
12379
12380 * c.opt: Don't use VarExists.
12381
e3339d0f
JM
123822010-09-29 Joseph Myers <joseph@codesourcery.com>
12383
12384 * c-common.c (c_cpp_error): Update names of diagnostic_context
12385 members.
12386 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12387 cl_optimization members.
12388 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12389 sanitize_cpp_opts, finish_options): Update names of cpp_options
12390 members.
12391
1973201f
NP
123922010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12393
12394 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12395 (objc_is_reserved_word): Removed.
12396 * c-common.c: Updated comments.
12397 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12398 objc_is_reserved_word.
12399 * stub-objc.c (objc_is_reserved_word): Removed.
12400
f7e71da5
IS
124012010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12402
9faeb493 12403 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12404 include attributes.
12405 (objc_start_method_definition): Likewise.
12406 (objc_build_keyword_decl): Likewise.
12407 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12408 (objc_start_method_definition): Likewise.
12409 (objc_build_keyword_decl): Likewise.
12410
c165dca7
IS
124112010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12412
12413 * c-common.h (objc_start_class_interface): Adjust prototype.
12414 (objc_start_category_interface): Likewise.
12415 (objc_start_protocol): Likewise.
12416 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12417 (objc_start_class_interface): Likewise.
12418 (objc_start_category_interface): Likewise.
12419
7458026b
ILT
124202010-09-27 Ian Lance Taylor <iant@google.com>
12421
12422 * c-common.c (c_common_attribute_table): Add no_split_stack.
12423 (handle_no_split_stack_attribute): New static function.
12424
b581b85b
NP
124252010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12426
9faeb493 12427 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12428
3f8257db 12429 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12430
9faeb493 12431 Radar 4229905
b581b85b
NP
12432 * c-common.h (objc_have_common_type): New declaration.
12433 * stub-objc.c (objc_have_common_type): New stub.
12434
12435 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12436
12437 Radar 4154928
12438 * c-common.h (objc_common_type): New prototype.
9faeb493 12439 * stub-objc.c (objc_common_type): New stub.
b581b85b 12440
46a4da10
JH
124412010-09-24 Jan Hubicka <jh@suse.cz>
12442
12443 * c-common.c (handle_leaf_attribute): New function.
12444 (struct attribute_spec c_common_att): Add leaf.
12445
e200444e
JM
124462010-09-22 Joseph Myers <joseph@codesourcery.com>
12447
12448 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12449 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12450 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12451 -include-barrier, -include-directory, -include-directory=,
12452 -include-directory-after, -include-directory-after=,
12453 -include-prefix, -include-prefix=, -include-with-prefix,
12454 -include-with-prefix=, -include-with-prefix-after,
12455 -include-with-prefix-after=, -include-with-prefix-before,
12456 -include-with-prefix-before=, -no-integrated-cpp,
12457 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12458 -output=, -pedantic, -pedantic-errors, -preprocess,
12459 -print-missing-file-dependencies, -trace-includes, -traditional,
12460 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12461 -user-dependencies, -verbose, -write-dependencies,
12462 -write-user-dependencies, no-integrated-cpp, traditional): New.
12463
29a80ea6
NP
124642010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12465
12466 PR objc/23710
ac1fc2fc
NP
12467 * c-common.h (objc_start_method_definition): Return bool instead
12468 of void.
12469 * stub-objc.c (objc_start_method_definition): Return bool instead
12470 of void.
12471
124722010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12473
12474 PR objc/25965
12475 * c-common.h (objc_get_interface_ivars): New declaration.
12476 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12477
de621752
ILT
124782010-09-15 Ian Lance Taylor <iant@google.com>
12479
12480 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12481 messages. Remove period at end of warning message.
de621752 12482
ba885ec5
NS
124832010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12484
12485 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12486 (handle_alias_attribute): ... here.
12487 (handle_ifunc_attribute): New.
12488
c5ee1358
MM
124892010-09-06 Mark Mitchell <mark@codesourcery.com>
12490
12491 * c-common.h (do_warn_double_promotion): Declare.
12492 * c-common.c (do_warn_double_promotion): Define.
12493
0a0b3574
MM
124942010-09-05 Mark Mitchell <mark@codesourcery.com>
12495
12496 * c.opt (Wdouble-promotion): New.
12497
d1779886
JM
124982010-09-02 Joseph Myers <joseph@codesourcery.com>
12499
12500 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12501 fvtable-thunks, fxref): Mark no longer supported in help text.
12502
2d2bd949
JM
125032010-09-02 Joseph Myers <joseph@codesourcery.com>
12504
12505 * c.opt (Wimport, fall-virtual, falt-external-templates,
12506 fdefault-inline, fenum-int-equiv, fexternal-templates,
12507 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12508 fname-mangling-version-, fnew-abi, fnonnull-objects,
12509 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12510 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12511 applicable.
12512 (fhandle-exceptions): Mark with Alias and Warn.
12513 * c-opts.c (c_common_handle_option): Don't handle options marked
12514 as ignored.
12515
5de8299c
JM
125162010-09-02 Joseph Myers <joseph@codesourcery.com>
12517
12518 * c.opt (Wcomments, Werror-implicit-function-declaration,
12519 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12520 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12521 aliases.
12522 * c-common.c (option_codes): Use OPT_Wcomment instead of
12523 OPT_Wcomments.
12524 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12525 Don't handle options marked as aliases.
12526
0ceb0201
RG
125272010-08-25 Richard Guenther <rguenther@suse.de>
12528
12529 * c-common.c (c_common_get_alias_set): Remove special
12530 handling for pointers.
12531
ac47786e
NF
125322010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12533
12534 * c-common.c: Use FOR_EACH_VEC_ELT.
12535 * c-gimplify.c: Likewise.
12536 * c-pragma.c: Likewise.
12537
c878765b
JM
125382010-08-16 Joseph Myers <joseph@codesourcery.com>
12539
12540 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12541 RejectDriver.
12542 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12543 RejectDriver.
12544 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12545 instead of OPT_MDX and OPT_MMDX.
12546
603349bf
JM
125472010-08-16 Joseph Myers <joseph@codesourcery.com>
12548
12549 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12550
644fa7ac
JM
125512010-08-12 Joseph Myers <joseph@codesourcery.com>
12552
12553 * c.opt (MD, MMD): Change to MDX and MMDX.
12554 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12555
481e1176
JM
125562010-08-11 Joseph Myers <joseph@codesourcery.com>
12557
12558 * c-opts.c (c_common_handle_option): Call handle_generated_option
12559 instead of handle_option.
12560
ac8dc9f7
NF
125612010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12562
12563 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12564 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12565
4f8c876d
NF
125662010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12567
12568 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12569 (pending_redefine_extname): Change type to a VEC.
12570 (add_to_renaming_pragma_list): Update for new type of
12571 pending_redefine_extname.
ac8dc9f7 12572 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12573
3b0c690e
AC
125742010-08-04 Arnaud Charlet <charlet@adacore.com>
12575
12576 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12577 visited.
12578 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12579 decide whether a type has already been declared/seen.
12580 Do not go to the original type.
12581 (dump_nested_types): New parameter forward.
12582 Generate forward declaration if needed and mark type as visited.
12583 (print_ada_declaration): Call dump_nested_types if not already done.
12584 Mark types as visited.
12585
1890bccc
JM
125862010-08-03 Joseph Myers <joseph@codesourcery.com>
12587
12588 * c.opt (-print-pch-checksum): Remove option.
12589 * c-opts.c (c_common_handle_option): Don't handle
12590 OPT_print_pch_checksum.
12591
5f20c657
JM
125922010-07-27 Joseph Myers <joseph@codesourcery.com>
12593
12594 * c-common.h (c_common_handle_option): Update prototype and return
12595 value type.
12596 * c-opts.c (c_common_handle_option): Update prototype and return
12597 value type. Update calls to handle_option and
12598 enable_warning_as_error.
12599
f551f80c
JJ
126002010-07-27 Jakub Jelinek <jakub@redhat.com>
12601
12602 PR c/45079
12603 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12604
61ff2bdc
JM
126052010-07-27 Joseph Myers <joseph@codesourcery.com>
12606
12607 * c-common.h (c_common_missing_argument): Remove.
12608 * c-opts.c (c_common_missing_argument): Remove.
12609 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12610 idirafter, imacros, include, isysroot, isystem, iquote): Add
12611 MissingArgError.
12612 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12613
7a9bf9a4
JM
126142010-07-27 Joseph Myers <joseph@codesourcery.com>
12615
12616 * c-common.h (c_common_option_lang_mask,
12617 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12618 New.
12619 (c_common_init_options): Update prototype.
12620 * c-opts.c (c_common_option_lang_mask): New.
12621 (c_common_initialize_diagnostics): Split out of
12622 c_common_init_options.
12623 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12624 New.
12625 (c_common_init_options): Update prototype. Use decoded options in
12626 search for -lang-asm.
12627
910ad8de
NF
126282010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12629
12630 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12631 * c-format.c: Likewise.
12632
718f9c0f
MLI
126332010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12634
12635 * c-common.h: Include diagnostic-core.h. Error if already
12636 included.
12637 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12638
4d451982
MLI
126392010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12640
adfac8df 12641 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12642 Do not include expr.h
12643 (vector_mode_valid_p): Move here.
12644
119fe915
SB
126452010-06-21 DJ Delorie <dj@redhat.com>
12646
12647 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12648 allow these pragmas anywhere.
12649
126502010-06-14 Jakub Jelinek <jakub@redhat.com>
12651
12652 PR bootstrap/44509
12653 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12654 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12655 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12656 ggc_strdup instead of xstrdup.
12657
126582010-06-10 Jakub Jelinek <jakub@redhat.com>
12659
12660 * c-cppbuiltin.c: Include cpp-id-data.h.
12661 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12662 (lazy_hex_fp_value): New function.
12663 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12664
6662d794
MLI
126652010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12666
12667 * c-gimplify.c: Do not include tree-flow.h
12668
38f8b050
JR
126692010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12670
12671 PR other/44034
12672 * c-common.c: Rename targetm member:
12673 targetm.enum_va_list -> targetm.enum_va_list_p
12674
9589f23e
AS
126752010-06-28 Anatoly Sokolov <aesok@post.ru>
12676
12677 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12678
3b06d379
SB
126792010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12680
12681 * c-cppbuiltin.c: Do not include except.h.
12682
d166d4c3
AK
126832010-06-24 Andi Kleen <ak@linux.intel.com>
12684
9faeb493
UB
12685 * c-common.c (warn_for_omitted_condop): New.
12686 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12687
70cb8be6
JM
126882010-06-21 Joseph Myers <joseph@codesourcery.com>
12689
12690 * c.opt (lang-objc): Remove.
12691 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12692
a4c97feb
JR
126932010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12694
12695 * c-opts.c: Include "tm_p.h".
12696
6e2f1956
JM
126972010-06-20 Joseph Myers <joseph@codesourcery.com>
12698
12699 * c-common.c (parse_optimize_options): Update call to
12700 decode_options.
12701
bc87224e
NF
127022010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12703
12704 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12705 new type of types_used_by_cur_var_decl.
12706
b49cf425
JR
127072010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12708
12709 PR bootstrap/44512
12710 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12711 for C++ standard compliance.
12712
59f9c2ed
JM
127132010-06-16 Jason Merrill <jason@redhat.com>
12714
12715 * c.opt: Add -Wnoexcept.
12716
33766b66
RG
127172010-06-16 Richard Guenther <rguenther@suse.de>
12718
12719 PR c/44555
12720 * c-common.c (c_common_truthvalue_conversion): Remove
12721 premature and wrong optimization concering ADDR_EXPRs.
12722
eff7e30c
AC
127232010-06-15 Arnaud Charlet <charlet@adacore.com>
12724
12725 * c-ada-spec.c (dump_sloc): Remove column info.
12726 (is_simple_enum): New function.
12727 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12728 enum types when relevant.
12729
6312e84d
MLI
127302010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12731
9faeb493 12732 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12733 location.
12734
1cb42611
JM
127352010-06-10 Joseph Myers <joseph@codesourcery.com>
12736
12737 * c-opts.c (c_common_handle_option): Don't handle
12738 OPT_fshow_column.
12739
a9429e29
LB
127402010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12741
12742 * c-pragma.c (push_alignment): Use typed GC allocation.
12743 (handle_pragma_push_options): Likewise.
12744
12745 * c-common.c (parse_optimize_options): Likewise.
12746
12747 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12748 option.
12749
5498f011
JM
127502010-06-07 Joseph Myers <joseph@codesourcery.com>
12751
12752 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12753 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12754 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12755 flag_signed_bitfields, warn_strict_null_sentinel,
12756 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12757 flag_gen_declaration, flag_no_gnu_keywords,
12758 flag_implement_inlines, flag_implicit_templates,
12759 flag_implicit_inline_templates, flag_optional_diags,
12760 flag_elide_constructors, flag_default_inline, flag_rtti,
12761 flag_conserve_space, flag_access_control, flag_check_new,
12762 flag_new_for_scope, flag_weak, flag_working_directory,
12763 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12764 flag_enforce_eh_specs, flag_threadsafe_statics,
12765 flag_pretty_templates): Remove.
12766 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12767 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12768 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12769 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12770 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12771 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12772 flag_no_gnu_keywords, flag_implement_inlines,
12773 flag_implicit_templates, flag_implicit_inline_templates,
12774 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12775 flag_rtti, flag_conserve_space, flag_access_control,
12776 flag_check_new, flag_new_for_scope, flag_weak,
12777 flag_working_directory, flag_use_cxa_atexit,
12778 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12779 flag_threadsafe_statics, flag_pretty_templates,
12780 warn_strict_null_sentinel): Remove.
12781 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12782 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12783 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12784 fimplicit-inline-templates, fimplicit-templates,
12785 flax-vector-conversions, fms-extensions, fnil-receivers,
12786 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12787 frtti, fshort-double, fshort-enums, fshort-wchar,
12788 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12789 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12790 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12791 gen-decls, undef): Use Var.
12792 (fdefault-inline, foptional-diags): Document as doing nothing.
12793 * c-opts.c (c_common_handle_option): Remove cases for options now
12794 using Var. Mark ignored options as such.
12795
39dabefd
SB
127962010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12797
9faeb493 12798 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12799 * c-common.def: Likewise.
12800 * c-common.h: Likewise.
12801 * c-cppbuiltin.c: Likewise.
12802 * c-dump.c: Likewise.
12803 * c-format.c: Likewise.
12804 * c-format.h : Likewise.
12805 * c-gimplify.c: Likewise.
12806 * c-lex.c: Likewise.
12807 * c-omp.c: Likewise.
12808 * c.opt: Likewise.
12809 * c-opts.c: Likewise.
12810 * c-pch.c: Likewise.
12811 * c-ppoutput.c: Likewise.
12812 * c-pragma.c: Likewise.
12813 * c-pragma.h: Likewise.
12814 * c-pretty-print.c: Likewise.
12815 * c-pretty-print.h: Likewise.
12816 * c-semantics.c: Likewise.
12817 * stub-objc.c: Likewise.
12818
12819 * c-common.c: Include gt-c-family-c-common.h.
12820 * c-pragma.c: Include gt-c-family-c-pragma.h.
12821\f
877e3c2a 12822Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
12823
12824Copying and distribution of this file, with or without modification,
12825are permitted in any medium without royalty provided the copyright
12826notice and this notice are preserved.
This page took 4.673868 seconds and 5 git commands to generate.