]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Fortran: Delete unused decl in intrinsic.h
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
ae5c5406
GA
12021-10-21 Jakub Jelinek <jakub@redhat.com>
2
3 PR middle-end/64888
4 * c-omp.c (c_omp_predefined_variable): Return true also for
5 ubsan_create_data created artificial variables.
6
5d5885c9
GA
72021-10-14 Joseph Myers <joseph@codesourcery.com>
8
9 * c-format.c (printf_length_specs, scanf_length_specs)
10 (print_char_table, scan_char_table): Support DFP formats for C2X.
11 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
12 (T2X_D32, T2X_D64, T2X_D128): New macros.
13
142021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
15
16 * c-omp.c (c_omp_check_context_selector): Rename to
17 omp_check_context_selector and move to omp-general.c.
18 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
19 move to omp-general.c.
20
52055987
GA
212021-10-12 Joseph Myers <joseph@codesourcery.com>
22
23 * c-format.c (print_char_table): Add %b and %B formats.
24 (scan_char_table): Add %b format.
25 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
26 (T2X_UPD, T2X_UIM): New macros.
27
282021-10-12 Jakub Jelinek <jakub@redhat.com>
29
30 * c-omp.c (c_finish_omp_atomic): Use
31 clear_padding_type_may_have_padding_p.
32
ce6eec39
GA
332021-10-08 Martin Liska <mliska@suse.cz>
34
35 * c-opts.c (c_common_post_options): Use new macro
36 OPTION_SET_P.
37
50e20ee6
GA
382021-10-07 Martin Liska <mliska@suse.cz>
39
40 * c-common.c (parse_optimize_options): Make
41 save_opt_decoded_options a pointer type.
42
57c7ec62
GA
432021-10-06 Jakub Jelinek <jakub@redhat.com>
44
45 PR tree-optimization/102571
46 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
47 padding, but the non-padding bits are contiguous set of bytes
48 by adjusting the memcmp call arguments instead of emitting
49 __builtin_clear_padding and then comparing all the type's bytes.
50
512021-10-06 Jakub Jelinek <jakub@redhat.com>
52
53 PR c++/102612
54 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
55 __cpp_constexpr to 202110L rather than 201907L.
56
da9c5f78
GA
572021-10-04 Marek Polacek <polacek@redhat.com>
58
59 PR c++/97573
60 * c-common.h (do_warn_array_compare): Declare.
61 * c-warn.c (do_warn_array_compare): New.
62 * c.opt (Warray-compare): New option.
63
e3e07b89
GA
642021-10-02 Iain Sandoe <iain@sandoe.co.uk>
65
66 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
67 NULL, this is not needed.
68
9d116bcc
GA
692021-10-01 Martin Sebor <msebor@redhat.com>
70
71 PR c/102103
72 * c-common.c (decl_with_nonnull_addr_p): Handle members.
73 Check and perform warning suppression.
74 (c_common_truthvalue_conversion): Enhance warning suppression.
75
762021-10-01 Martin Liska <mliska@suse.cz>
77
78 PR target/102552
79 * c-common.c (parse_optimize_options): decoded_options[0] is
80 used for program name, so merged_decoded_options should also
81 respect that.
82
832021-10-01 Jakub Jelinek <jakub@redhat.com>
84 Richard Biener <rguenther@suse.de>
85
86 PR sanitizer/102515
87 * c-ubsan.c (ubsan_instrument_division): Check the right
88 flag_sanitize_recover bit, depending on which sanitization
89 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
90 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
91 and SANITIZE_DIVIDE is enabled, neither check is known
92 to be false and flag_sanitize_recover bits for those two
93 aren't the same, emit both __ubsan_handle_divrem_overflow
94 and __ubsan_handle_divrem_overflow_abort calls.
95
962021-10-01 Martin Liska <mliska@suse.cz>
97
98 * c-common.c (parse_optimize_options): Combine optimize
99 options with what was provided on the command line.
100
1012021-10-01 Jakub Jelinek <jakub@redhat.com>
102
103 * c-omp.c (c_omp_split_clauses): Also copy
104 OMP_CLAUSE_ORDER_REPRODUCIBLE.
105
cf966403
GA
1062021-09-27 Martin Liska <mliska@suse.cz>
107
108 * c-opts.c (c_common_init_options_struct): Set also
109 x_flag_default_complex_method.
110
e4777439
GA
1112021-09-22 Jakub Jelinek <jakub@redhat.com>
112
113 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
114
62498024
GA
1152021-09-20 Matthias Kretz <m.kretz@gsi.de>
116
117 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
118 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
119 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
120 __ROUNDING_MATH__ according to the new optimization flags.
121
cf74e7b5
GA
1222021-09-18 Jakub Jelinek <jakub@redhat.com>
123
124 * c-omp.c (c_omp_split_clauses): Split order clause also to
125 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
126
0a4cb439
GA
1272021-09-17 Jakub Jelinek <jakub@redhat.com>
128
129 * c-omp.c (c_finish_omp_atomic): Avoid creating
130 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
131 create_tmp_var and add a zero initializer to TARGET_EXPRs that
132 had NULL initializer. When omitting operands after v = x,
133 use type of v rather than type of x. Fix type of vtmp
134 TARGET_EXPR.
135
07985c47
GA
1362021-09-13 Jason Merrill <jason@redhat.com>
137
138 * c.opt: Add -Winterference-size.
139 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
140 and __GCC_CONSTRUCTIVE_SIZE.
141
a26206ec
GA
1422021-09-10 Jakub Jelinek <jakub@redhat.com>
143
144 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
145 * c-omp.c: Include gimple-fold.h.
146 (c_finish_omp_atomic): Add r and weak arguments. Add support for
147 OpenMP 5.1 atomics.
148
f84e2f0b
GA
1492021-09-09 qing zhao <qing.zhao@oracle.com>
150
151 * c-attribs.c (handle_uninitialized_attribute): New function.
152 (c_common_attribute_table): Add "uninitialized" attribute.
153
b6db7cd4
GA
1542021-09-08 liuhongt <hongtao.liu@intel.com>
155
156 * c-common.c (excess_precision_mode_join): Update below comments.
157 (c_ts18661_flt_eval_method): Set excess_precision_type to
158 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
159 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
160 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
161 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
162
b2748138
GA
1632021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
164
165 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
166
7b739540
GA
1672021-09-03 Eric Botcazou <ebotcazou@adacore.com>
168
169 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
170 and -gnatwu warning for the package specification.
171
e11c6046
GA
1722021-09-01 Iain Sandoe <iain@sandoe.co.uk>
173
174 * c-attribs.c (handle_unavailable_attribute): New.
175
1e2f030b
GA
1762021-08-30 Jason Merrill <jason@redhat.com>
177
178 * c.opt: Add -Wmissing-requires.
179
85d77ac4
GA
1802021-08-25 Lewis Hyatt <lhyatt@gmail.com>
181
182 PR other/93067
183 * c-opts.c (c_common_input_charset_cb): New function.
184 (c_common_post_options): Call new function
185 diagnostic_initialize_input_context().
186
7c9e1645
GA
1872021-08-20 Tobias Burnus <tobias@codesourcery.com>
188
189 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
190 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
191 "di" and "u", respecitively; fill with BADLEN to match
192 size of 'types'.
193 (get_init_dynamic_hwi): Split off from ...
194 (init_dynamic_diag_info): ... here. Call it.
195 (init_dynamic_gfc_info): Call it.
196
1972021-08-20 Jakub Jelinek <jakub@redhat.com>
198
199 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
200 * c-pragma.c (omp_pragmas): Add error directive.
201 * c-omp.c (omp_directives): Uncomment error directive entry.
202
6e529985
GA
2032021-08-18 Jakub Jelinek <jakub@redhat.com>
204
205 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
206 * c-pragma.c (omp_pragmas): Add nothing directive.
207 * c-omp.c (omp_directives): Uncomment nothing directive entry.
208
2d14d64b
GA
2092021-08-17 Jakub Jelinek <jakub@redhat.com>
210
211 PR c++/101539
212 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
213 * c-common.c (c_common_reswords): Add __is_layout_compatible.
214
2152021-08-17 Matt Jacobson <mhjacobson@me.com>
216
217 * c-opts.c (c_common_post_options): Default to
218 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
219
2202021-08-17 Jakub Jelinek <jakub@redhat.com>
221
222 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
223 * c-pragma.c (omp_pragmas): Add scope construct.
224 * c-omp.c (omp_directives): Uncomment scope directive entry.
225
9d1d9fc8
GA
2262021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
227
228 * c-cppbuiltin.c (c_cpp_builtins): Define
229 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
230
72be20e2
GA
2312021-08-12 Jakub Jelinek <jakub@redhat.com>
232
233 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
234 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
235 * c-pragma.c (omp_pragmas_simd): Add masked construct.
236 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
237 enumerator.
238 (c_finish_omp_masked): Declare.
239 * c-omp.c (c_finish_omp_masked): New function.
240 (c_omp_split_clauses): Handle combined masked constructs.
241
4d17ca1b
GA
2422021-07-30 Jakub Jelinek <jakub@redhat.com>
243
244 PR c++/101539
245 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
246 * c-common.c (c_common_reswords): Add
247 __is_pointer_interconvertible_base_of.
248
2492021-07-29 Richard Biener <rguenther@suse.de>
250
251 PR c/101512
252 * c-common.c (c_common_mark_addressable_vec): Look through
253 C_MAYBE_CONST_EXPR even if not at the toplevel.
254
af3f12e6
GA
2552021-07-27 Martin Sebor <msebor@redhat.com>
256
257 PR c/101585
258 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
259
ead235f6
GA
2602021-07-23 Jakub Jelinek <jakub@redhat.com>
261
262 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
263 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
264 and later.
265
2662021-07-23 Jakub Jelinek <jakub@redhat.com>
267
268 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
269 PRAGMA_OMP__LAST_ enumerators.
270
419c6c68
GA
2712021-07-21 Thomas Schwinge <thomas@codesourcery.com>
272 Joseph Myers <joseph@codesourcery.com>
273 Cesar Philippidis <cesar@codesourcery.com>
274
275 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
276
92d45509
GA
2772021-07-20 Martin Sebor <msebor@redhat.com>
278
279 * c-common.c (c_build_shufflevector): Adjust by-value argument to
280 by-const-reference.
281 * c-common.h (c_build_shufflevector): Same.
282
87277b6a
GA
2832021-07-16 Andrew Pinski <apinski@marvell.com>
284
285 PR c/101453
286 * c-common.c (parse_optimize_options): Use the correct
287 size for buffer.
288
d97d71a1
GA
2892021-07-15 Martin Sebor <msebor@redhat.com>
290
291 PR c/101289
292 PR c/97548
293 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
294
c4fee1c6
GA
2952021-07-14 Jason Merrill <jason@redhat.com>
296
297 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
298
6fba0eea
GA
2992021-07-06 Martin Sebor <msebor@redhat.com>
300
301 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
302 (gcc_cdiag_char_table): Same.
303 (gcc_cxxdiag_char_table): Same.
304
7a60a6e8
GA
3052021-07-02 Jakub Jelinek <jakub@redhat.com>
306
307 * c-common.h (enum c_omp_directive_kind): New enum.
308 (struct c_omp_directive): New type.
309 (c_omp_categorize_directive): Declare.
310 * c-omp.c (omp_directives): New variable.
311 (c_omp_categorize_directive): New function.
312
bea7c16a
GA
3132021-07-01 Eric Botcazou <ebotcazou@adacore.com>
314
315 * c-ada-spec.c (packed_layout): New global variable.
316 (dump_ada_declaration): Set it upon seeing a packed record type.
317 Do not put the "aliased" keyword if it is set.
318 (dump_ada_structure): Add Pack aspect if it is set and clear it.
319
3202021-07-01 Eric Botcazou <ebotcazou@adacore.com>
321
322 * c-ada-spec.c (check_name): Rename into...
323 (check_type_name_conflict): ...this. Minor tweak.
324 (dump_ada_function_declaration): Adjust to above renaming.
325 (dump_ada_array_domains): Fix oversight.
326 (dump_ada_declaration): Call check_type_name_conflict for variables.
327
90708f87
GA
3282021-06-25 Martin Sebor <msebor@redhat.com>
329
330 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
331 (c_common_truthvalue_conversion): Replace direct uses of
332 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
333 copy_no_warning.
334 (check_function_arguments_recurse): Same.
335 * c-gimplify.c (c_gimplify_expr): Same.
336 * c-warn.c (overflow_warning): Same.
337 (warn_logical_operator): Same.
338 (warn_if_unused_value): Same.
339 (do_warn_unused_parameter): Same.
340
9aa8327e
GA
3412021-06-24 Jakub Jelinek <jakub@redhat.com>
342
343 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
344 C_ORT_OMP_TARGET.
345 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
346 combined target constructs also add map (always, tofrom:) clause.
347
ede6c356
GA
3482021-06-15 Robin Dapp <rdapp@linux.ibm.com>
349
350 * c-attribs.c (common_handle_aligned_attribute): Remove short
351 circuit and dead code.
352
8dc48181
GA
3532021-06-14 Jonathan Wakely <jwakely@redhat.com>
354
355 PR c++/101052
356 * known-headers.cc (get_stdlib_header_for_name): Add known
357 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
358 exit, and getenv.
359
8b8c3912
GA
3602021-06-12 Jason Merrill <jason@redhat.com>
361
362 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
363
f16f65f8
GA
3642021-06-11 Jakub Jelinek <jakub@redhat.com>
365
366 PR c++/100974
367 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
368 -std=c++2b for P1938R3 consteval if support.
369
4f625f47
GA
3702021-06-09 Jason Merrill <jason@redhat.com>
371
372 PR c++/100879
373 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
374 warning.
375
438aac59
GA
3762021-06-07 Martin Liska <mliska@suse.cz>
377
378 * c-target.def: Split long lines and replace them
379 with '\n\'.
380
600f90cb
GA
3812021-06-04 Martin Sebor <msebor@redhat.com>
382
383 PR c/100783
384 * c-attribs.c (positional_argument): Bail on erroneous types.
385
3862021-06-04 Martin Sebor <msebor@redhat.com>
387
388 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
389 for element presence.
390
440c8a0a
GA
3912021-06-03 Eric Botcazou <ebotcazou@adacore.com>
392
393 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
394 (dump_ada_decl_name): Likewise.
395 (dump_anonymous_type_name): Remove parent parameter and adjust.
396 (dump_sloc): Minor tweak.
397 (dump_ada_array_type): Remove type parameter and adjust.
398 (dump_ada_enum_type): Remove parent parameter and adjust.
399 (dump_ada_node): Adjust calls to above functions.
400 (dumped_anonymous_types): New global variable.
401 (dump_nested_types_1): Rename into...
402 (dump_nested_types): ...this.
403 (dump_nested_type): Remove parent and dumped_types parameters.
404 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
405 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
406 (dump_ada_specs): Initialize and free dumped_anonymous_types.
407
4082021-06-03 Eric Botcazou <ebotcazou@adacore.com>
409
410 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
411 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
412
4132021-06-03 Eric Botcazou <ebotcazou@adacore.com>
414
415 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
416 (htable_t): New typedef.
417 (overloaded_names): Use it.
418 (add_name): New function.
419 (init_overloaded_names): Use add_name to populate the table and add
420 special cases for sigaction and stat.
421 (overloaded_name_p): Rename into...
422 (overloading_index): ...this. Do not initialize overloaded_names table
423 here. Return the index or zero.
424 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
425 but add an overloading suffix instead.
426 (dump_ada_specs): Initialize overloaded_names tables here.
427
b75978d1
GA
4282021-06-01 Martin Liska <mliska@suse.cz>
429
430 PR other/100759
431 * c-attribs.c (handle_optimize_attribute): Limit sanity check
432 to a situation where we are not in processing of an optimize
433 pragma.
434 * c-pragma.c (handle_pragma_pop_options): Restore target
435 options.
436
ee682192
GA
4372021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
438
439 PR testsuite/100749
440 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
441
4422021-05-31 Richard Biener <rguenther@suse.de>
443
444 PR c++/88601
445 * c-common.c: Include tree-vector-builder.h and
446 vec-perm-indices.h.
447 (c_common_reswords): Add __builtin_shufflevector.
448 (c_build_shufflevector): New funtion.
449 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
450 (c_build_shufflevector): Declare.
451
48166757
GA
4522021-05-28 Jakub Jelinek <jakub@redhat.com>
453
454 PR middle-end/99928
455 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
456 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
457
4582021-05-28 Tobias Burnus <tobias@codesourcery.com>
459
460 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
461
2bc6dace
GA
4622021-05-25 Martin Liska <mliska@suse.cz>
463
464 PR tree-optimization/92860
465 PR target/99592
466 * c-attribs.c (handle_optimize_attribute): Save target node
467 before calling parse_optimize_options and save it in case
468 it changes.
469 * c-pragma.c (handle_pragma_target): Similarly for pragma.
470 (handle_pragma_pop_options): Likewise here.
471
4722021-05-25 Martin Liska <mliska@suse.cz>
473
474 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
475
4762021-05-25 Jakub Jelinek <jakub@redhat.com>
477
478 PR middle-end/99928
479 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
480 combined with simd and not with taskloop or for.
481
2832d51b
GA
4822021-05-21 Jakub Jelinek <jakub@redhat.com>
483
484 PR middle-end/99928
485 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
486 on firstprivate clause copy going to target construct, and for
487 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
488
ea34e2ed
GA
4892021-05-20 Jonathan Wakely <jwakely@redhat.com>
490
491 * c.opt (Wc++11-extensions, Wc++14-extensions)
492 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
493 options.
494
4952021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
496
497 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
498
4992021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
500
501 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
502 * c-pch.c (struct c_pch_validity): Use type uint32_t.
503 (pch_init): Renamed member.
504 (c_common_valid_pch): Adjust access to debug_type_names.
505
65f32e5d
GA
5062021-05-19 Martin Sebor <msebor@redhat.com>
507
508 PR c/100619
509 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
510 bounds.
511
a8daf9a1
GA
5122021-05-18 Richard Biener <rguenther@suse.de>
513
514 PR c/100547
515 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
516 Reword existing nunit diagnostic.
517
a7ffc1ef
GA
5182021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
519
520 * c-common.c (braced_list_to_string): Return CTOR unchanged
521 if host and target character sizes don't match.
522
87a7d10c
GA
5232021-05-14 Martin Liska <mliska@suse.cz>
524
525 * c.opt: Add Warning keyword for 2 options.
526
f9af11c7
GA
5272021-05-13 Martin Liska <mliska@suse.cz>
528
529 PR middle-end/100504
530 * c-attribs.c (handle_target_clones_attribute): Expect a string
531 argument to target_clone argument.
532
037e3661
GA
5332021-05-11 Joseph Myers <joseph@codesourcery.com>
534
535 * c-lex.c (interpret_float): Handle digit separators for C2X.
536
aa891c56
GA
5372021-05-10 Martin Liska <mliska@suse.cz>
538
539 * c-ada-spec.c (print_destructor): Use startswith
540 function instead of strncmp.
541 (dump_ada_declaration): Likewise.
542 * c-common.c (disable_builtin_function): Likewise.
543 (def_builtin_1): Likewise.
544 * c-format.c (check_tokens): Likewise.
545 (check_plain): Likewise.
546 (convert_format_name_to_system_name): Likewise.
547
e4ff4ffb
GA
5482021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
549
550 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
551 complex divide
552
c0fa3f2f
GA
5532021-04-26 Thomas Schwinge <thomas@codesourcery.com>
554 Nathan Sidwell <nathan@codesourcery.com>
555 Tom de Vries <vries@codesourcery.com>
556 Julian Brown <julian@codesourcery.com>
557 Kwok Cheung Yeung <kcy@codesourcery.com>
558
559 * c.opt (Wopenacc-parallelism): New.
560
6e81e015
GA
5612021-04-19 Thomas Schwinge <thomas@codesourcery.com>
562
563 * c.opt (fopenacc-kernels=): Remove.
564
019a9220
GA
5652021-04-08 Jakub Jelinek <jakub@redhat.com>
566
567 * c-warn.c (do_warn_double_promotion): Fix comment typo,
568 occured -> occurred.
569 (check_alignment_of_packed_member): Fix a comment typo,
570 memeber -> member.
571 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
572 and onless -> unless.
573 (warn_parm_array_mismatch): Fix comment typos, declaratation
574 -> declaration and woud -> would. Fix up comment indentation.
575
5762021-04-08 Martin Sebor <msebor@redhat.com>
577
578 PR middle-end/99883
579 * c.opt (Wmismatched-new-delete): Correct spelling.
580
b1da9916
GA
5812021-04-05 Eric Botcazou <ebotcazou@adacore.com>
582
583 * c-ada-spec.c (is_simple_enum): Minor tweaks.
584 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
585 enumeral types use again the type name for the enumeration constants.
586 (dump_ada_node): Adjust call to dump_ada_enum_type.
587 (dump_nested_type): Likewise.
588
f1607029
GA
5892021-04-01 Jason Merrill <jason@redhat.com>
590
591 PR c++/98481
592 * c-opts.c (c_common_post_options): Bump latest_abi_version.
593
4493b1c1
GA
5942021-03-25 Jakub Jelinek <jakub@redhat.com>
595
596 PR c++/99565
597 * c-warn.c (do_warn_duplicated_branches): Pass also
598 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
599
6af7b307
GA
6002021-03-20 Jakub Jelinek <jakub@redhat.com>
601
602 PR debug/99230
603 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
604
ceae9533
GA
6052021-03-05 Eric Botcazou <ebotcazou@adacore.com>
606
607 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
608 after entering the separate class package, if any.
609
67f10d28
GA
6102021-03-04 Richard Biener <rguenther@suse.de>
611
612 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
613 Handle ERROR_MARK.
614
6152021-03-04 Jakub Jelinek <jakub@redhat.com>
616
617 PR c/99325
618 * c-ppoutput.c (print): Change src_line type from int to unsigned.
619 (token_streamer::stream) Likewise.
620 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
621 UNKNOWN_LOCATION.
622
f3641ac7
GA
6232021-03-03 Jakub Jelinek <jakub@redhat.com>
624
625 PR c/99324
626 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
627 instead of mark_addressable. Fix a comment typo -
628 neutrallly -> neutrally.
629
2c83c3fb
GA
6302021-02-28 Jakub Jelinek <jakub@redhat.com>
631
632 PR c/99304
633 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
634 message - refernced -> referenced. Remove superfluous space before
635 closing paren of function calls.
636
daa68844
GA
6372021-02-25 Nathan Sidwell <nathan@acm.org>
638
639 PR c++/99166
640 * c.opt (-flang-info-module-cmi): Renamed option.
641
50352c6c
GA
6422021-02-19 Nathan Sidwell <nathan@acm.org>
643
644 * c.opt (flang-info-module-read, flang-info-module-read=): New.
645
bf81237e
GA
6462021-02-18 H.J. Lu <hjl.tools@gmail.com>
647
648 PR target/99113
649 * c-attribs.c (c_common_attribute_table): Add the "retain"
650 attribute.
651 (handle_retain_attribute): New function.
652
0e804ce3
GA
6532021-02-16 Marek Polacek <polacek@redhat.com>
654
655 PR c++/99062
656 * c-attribs.c (handle_assume_aligned_attribute): Check that the
657 alignment argument is non-negative. Tweak a warning message.
658
fab095da
GA
6592021-02-12 Martin Sebor <msebor@redhat.com>
660
661 PR c/99055
662 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
663 print_generic_expr_to_str.
664
4b37c3ea
GA
6652021-02-10 Richard Biener <rguenther@suse.de>
666
667 * c-common.c (parse_optimize_options): Free decoded_options.
668
a19dd5e6
GA
6692021-02-04 emsr <3dw4rd@verizon.net>
670
671 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
672
9faaa807
GA
6732021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
674
675 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
676 * c-lex.c (interpret_integer): Set node type for size literal.
677
85d04a2e
GA
6782021-01-28 Jakub Jelinek <jakub@redhat.com>
679
680 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
681 draft from description.
682 (-std=c++2b): Fix a pasto, 2020 -> 2023.
683
e62bb7f0
GA
6842021-01-26 Paul Fee <paul.f.fee@gmail.com>
685
686 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
687 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
688 and -std=gnu++2b
689 * c-opts.c (set_std_cxx23): New.
690 (c_common_handle_option): Set options when -std=c++23 is enabled.
691 (c_common_post_options): Adjust comments.
692 (set_std_cxx20): Likewise.
693
161e4c08
GA
6942021-01-25 Martin Sebor <msebor@redhat.com>
695
696 PR c++/98646
697 * c-common.c (check_nonnull_arg): Adjust warning text.
698
4c9bcd5c
GA
6992021-01-17 Martin Sebor <msebor@redhat.com>
700
701 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
702 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
703
59cf67d1
GA
7042021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
705
706 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
707 Redefine PRAGMA_OACC_CLAUSE_DETACH.
708
2f7f0d32
GA
7092021-01-15 Jakub Jelinek <jakub@redhat.com>
710
711 PR tree-optimization/98597
712 * c-pretty-print.c: Include options.h.
713 (c_fold_indirect_ref_for_warn): New function.
714 (print_mem_ref): Use it. If it returns something that has compatible
715 type and is TBAA compatible with zero offset, print it and return,
716 otherwise print it using offsetof syntax or array ref syntax. Fix up
717 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
718 argument has pointer to array type. Print pointers using the standard
719 formatting.
720
6851dda2
GA
7212021-01-12 Martin Sebor <msebor@redhat.com>
722
723 PR c/98597
724 PR c/98592
725 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
726 has pointer type. Remove redundant code. Avoid calling
727 gimple_canonical_types_compatible_p.
728
7d187e4f
GA
7292021-01-07 Martin Sebor <msebor@redhat.com>
730
731 PR middle-end/98578
732 * c-pretty-print.c (print_mem_ref): Strip array from access type.
733 Avoid assuming acces type's size is constant. Correct condition
734 guarding the printing of a parenthesis.
735
942ae5be
GA
7362021-01-06 Martin Sebor <msebor@redhat.com>
737
738 PR c++/95768
739 * c-pretty-print.c (c_pretty_printer::primary_expression): For
740 SSA_NAMEs print VLA names and GIMPLE defining statements.
741 (print_mem_ref): New function.
742 (c_pretty_printer::unary_expression): Call it.
743
7442021-01-06 Richard Biener <rguenther@suse.de>
745
746 PR tree-optimization/95582
747 * c-attribs.c (c_common_attribute_table): Add entry for
748 signed_bool_precision.
749 (handle_signed_bool_precision_attribute): New.
750
8daa719b
GA
7512020-12-24 Iain Sandoe <iain@sandoe.co.uk>
752
753 * c.opt: Add -stdlib= option and enumerations for
754 libstdc++ and libc++.
755
eefe499f
GA
7562020-12-16 Martin Liska <mliska@suse.cz>
757
758 * c.opt: Remove usage of Report.
759
d52945ce
GA
7602020-12-14 Martin Sebor <msebor@redhat.com>
761
762 PR middle-end/98166
763 PR c++/57111
764 PR middle-end/98160
765 * c-attribs.c (maybe_add_noinline): New function.
766 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
767 Implicitly add attribute noinline to functions not declared inline
768 and warn on those.
769
ca2bd949
GA
7702020-12-09 Tobias Burnus <tobias@codesourcery.com>
771
772 * c-pragma.c (omp_pragmas): Add 'allocate'.
773 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
774
f6e8e279
GA
7752020-12-08 Jakub Jelinek <jakub@redhat.com>
776
777 PR c++/98187
778 * c-pragma.c (omp_pragmas): Remove "master".
779 (omp_pragmas_simd): Add "master".
780
bc8a7013
GA
7812020-12-07 Marek Polacek <polacek@redhat.com>
782
783 PR c++/98126
784 * c-common.c (verify_tree_lim_r): New function.
785 (verify_sequence_points): Use it. Use nullptr instead of 0.
786
b8dd0ef7
GA
7872020-12-03 Martin Sebor <msebor@redhat.com>
788
789 PR c++/90629
790 PR middle-end/94527
791 * c-attribs.c (handle_dealloc_attribute): New function.
792 (handle_malloc_attribute): Handle argument forms of attribute.
793 * c.opt (-Wmismatched-dealloc): New option.
794 (-Wmismatched-new-delete): New option.
795
7962020-12-03 Jakub Jelinek <jakub@redhat.com>
797
798 PR libstdc++/93121
799 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
800 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
801
e0f5e792
GA
8022020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
803
804 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
805 {__GNUC_EXECUTION_CHARSET_NAME} and
806 _WIDE_EXECUTION_CHARSET_NAME} macros.
807
8082020-12-01 Nathan Sidwell <nathan@acm.org>
809
810 * c-common.c (module, import, export): New internal tokens (with
811 trailing space).
812 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
813 them.
814 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
815 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
816
8172020-12-01 Nathan Sidwell <nathan@acm.org>
818
819 * c-opts.c (c_common_init_options): Ask for module dependencies.
820 (c_common_handle_option): Handle -Mmodules -Mno-modules.
821 * c-pch.c (c_common_valid_pch): ... does not play with C++
822 modules.
823 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
824 options.
825 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
826 (fmodule-only, fmodule-mapper, fmodule-lazy)
827 (fmodule-version-ignore, Winvalid-imported-macros)
828 (flang-info-include-translate, flang-info-include-translate-not):
829 New options
830
5fbf0ecb
GA
8312020-11-28 Eric Botcazou <ebotcazou@adacore.com>
832
833 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
834 (dump_ada_structure): Also deal with convention, unchecked union and
835 bit-field for nested types. In the latter case, print an Alignment
836 aspect along with the Pack aspect.
837
360258da
GA
8382020-11-25 Martin Sebor <msebor@redhat.com>
839
840 PR bootstrap/94982
841 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
842 -Wformat-diag.
843
1e2c9a27
GA
8442020-11-24 Martin Sebor <msebor@redhat.com>
845
846 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
847
8e6198d0
GA
8482020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
849
850 * c-attribs.c (handle_special_var_sec_attribute): New.
851 (handle_noinit_attribute): Remove.
852 (attr_noinit_exclusions): Rename to...
853 (attr_section_exclusions): ...this, and add "persistent" attribute
854 exclusion.
855 (c_common_attribute_table): Add "persistent" attribute.
856
7a97e2fc
GA
8572020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
858
859 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
860 Treat opaque types like other types.
861 (c_pretty_printer::direct_abstract_declarator): Opaque types are
862 supported types.
863
82e5048e
GA
8642020-11-20 Martin Sebor <msebor@redhat.com>
865
866 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
867 with fewer arguments.
868
8692020-11-20 Martin Sebor <msebor@redhat.com>
870
871 PR middle-end/97879
872 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
873 Error out on invalid modes.
874
8752020-11-20 Jakub Jelinek <jakub@redhat.com>
876
877 PR libstdc++/88101
878 * c-common.c (check_builtin_function_arguments): Handle
879 BUILT_IN_CLEAR_PADDING.
880
25bb75f8
GA
8812020-11-18 Nathan Sidwell <nathan@acm.org>
882
883 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
884
4dabb037
GA
8852020-11-17 Nathan Sidwell <nathan@acm.org>
886
887 * c-common.h (enum c_tree_index): Reorder to place lazy fields
888 after newly-added CTI_MODULE_HWM.
889
8902020-11-17 Joseph Myers <joseph@codesourcery.com>
891
892 * c-cppbuiltin.c (builtin_define_float_constants): Define
893 "*_IS_IEC_60559__" macros.
894
8952020-11-17 Nathan Sidwell <nathan@acm.org>
896
897 * c-lex.c: #include "langhooks.h".
898 (cb_undef): Maybe call preprocess_undef lang hook.
899 * c-opts.c (c_common_post_options): Maybe call preprocess_options
900 lang hook.
901 (push_command_line_include): Maybe call preprocess_main_file lang
902 hook.
903 (cb_file_change): Likewise.
904 * c-ppoutput.c: #include "langhooks.h.
905 (scan_translation_unit): Maybe call preprocess_token lang hook.
906 (class do_streamer): New, derive from token_streamer.
907 (directives_only_cb): Data pointer is do_streamer, call
908 preprocess_token lang hook.
909 (scan_translation_unit_directives_only): Use do_streamer.
910 (print_line_1): Move src_line recording to after string output.
911 (cb_undef): Maybe call preprocess_undef lang hook.
912
9132020-11-17 Nathan Sidwell <nathan@acm.org>
914
915 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
916 code duplicating that functionality.
917
9182020-11-17 Jakub Jelinek <jakub@redhat.com>
919
920 PR c/90628
921 * c-common.c (check_builtin_function_arguments)
922 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
923 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
924 for more builtins and argument positions.
925
29c5d9ce
GA
9262020-11-16 Iain Sandoe <iain@sandoe.co.uk>
927
928 PR objc/97854
929 * stub-objc.c: Include c-common.h to declare enum rid.
930
77f67db2
GA
9312020-11-13 Jakub Jelinek <jakub@redhat.com>
932
933 PR c++/63287
934 * c-cppbuiltin.c: Include configargs.h.
935 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
936 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
937 "single".
938
9392020-11-13 Gergö Barany <gergo@codesourcery.com>
940 Thomas Schwinge <thomas@codesourcery.com>
941
942 * c.opt (fopenacc-kernels): Add.
943
9442020-11-13 Jason Merrill <jason@redhat.com>
945
946 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
947
9482020-11-13 Piotr H. Dabrowski <phd@phd.re>
949
950 PR c++/91318
951 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
952
9532020-11-13 Martin Liska <mliska@suse.cz>
954
955 * c-attribs.c (build_attr_access_from_parms): Format properly.
956
9572020-11-13 Iain Sandoe <iain@sandoe.co.uk>
958
959 PR objc/90707
960 * c-common.c (c_common_reswords): null_unspecified, nullable,
961 nonnull, null_resettable: New keywords.
962 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
963 RID_NONNULL, RID_NULL_RESETTABLE: New.
964 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
965 ranges accepted for property attributes.
966 * c-attribs.c (handle_objc_nullability_attribute): New.
967 * c-objc.h (enum objc_property_attribute_group): Add
968 OBJC_PROPATTR_GROUP_NULLABLE.
969 (enum objc_property_attribute_kind):Add
970 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
971 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
972
9732020-11-13 Iain Sandoe <iain@sandoe.co.uk>
974
975 PR objc/77404
976 * c-attribs.c (handle_objc_root_class_attribute): New
977 * c-objc.h (objc_start_class_interface): Add a location
978 value for the position of the class name.
979 * c.opt: Add Wobjc-root-class.
980 * stub-objc.c (objc_start_class_interface): Add a location
981 value for the position of the class name.
982
a5a11525
GA
9832020-11-12 Joseph Myers <joseph@codesourcery.com>
984
985 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
986 Allow scope for C. Handle standard attributes for C. Do not
987 accept unscoped attributes if std_syntax and not handled as
988 standard attributes.
989 * c-common.h (c_common_has_attribute): Update prototype.
990
9912020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
992
993 PR pch/86674
994 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
995 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
996
0f5f9ed5
GA
9972020-11-11 Patrick Palka <ppalka@redhat.com>
998
999 PR c++/88115
1000 * c-opts.c (c_common_post_options): Update latest_abi_version.
1001
bb622641
GA
10022020-11-10 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c/97748
1005 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1006 to false.
1007 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1008 recursively and just return true instead of warning if it is true.
1009 Handle COMPLEX_EXPR.
1010
10112020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1012
1013 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1014 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1015 (c_omp_adjust_map_clauses): New function.
1016
2bee28dd
GA
10172020-11-09 Marek Polacek <polacek@redhat.com>
1018
1019 DR 1914
1020 * c-common.c (attribute_fallthrough_p): Tweak the warning
1021 message.
1022
10232020-11-09 Patrick Palka <ppalka@redhat.com>
1024
1025 * c-pragma.c (handle_pragma_diagnostic): Split the
1026 unknown-option -Wpragmas diagnostic into a warning and a
1027 subsequent note containing a spelling suggestion. Avoid
1028 computing the suggestion if -Wpragmas warnings are being
1029 suppressed.
1030
10312020-11-09 Patrick Palka <ppalka@redhat.com>
1032
1033 PR testsuite/97117
1034 * c-indentation.c (get_visual_column): Remove location_t
1035 parameter. Move the column-tracking diagnostic code from here
1036 to ...
1037 (should_warn_for_misleading_indentation): ... here, before the
1038 early exit for when the loci are not all distinct. Don't pass a
1039 location_t argument to get_visual_column.
1040 (assert_get_visual_column_succeeds): Don't pass a location_t
1041 argument to get_visual_column.
1042 (assert_get_visual_column_fails): Likewise.
1043
fb95de7a
GA
10442020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1045
1046 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1047 of keywords accepted in @property attribute contexts.
1048 * c-objc.h (enum objc_property_attribute_group): Add
1049 OBJC_PROPATTR_GROUP_CLASS.
1050 (enum objc_property_attribute_kind): Add
1051 OBJC_PROPERTY_ATTR_CLASS.
1052
2da7ee05
GA
10532020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1054
1055 * c-common.c (c_common_reswords): Add 'atomic' property
1056 attribute.
1057 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1058 property attributes.
1059
10602020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1061
1062 * c-attribs.c (handle_nsobject_attribute): New.
1063 * c.opt: Add WNSObject-attribute.
1064
44cab2d8
GA
10652020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1066
1067 * c-objc.h (enum objc_property_attribute_group): New
1068 (enum objc_property_attribute_kind): New.
1069 (OBJC_PROPATTR_GROUP_MASK): New.
1070 (struct property_attribute_info): Small class encapsulating
1071 parser output from property attributes.
1072 (objc_prop_attr_kind_for_rid): New
1073 (objc_add_property_declaration): Simplify interface.
1074 * stub-objc.c (enum rid): Dummy type.
1075 (objc_add_property_declaration): Simplify interface.
1076 (objc_prop_attr_kind_for_rid): New.
1077
10782020-11-06 Nathan Sidwell <nathan@acm.org>
1079
1080 * c-ada-spec.c (collect_ada_nodes): Rename
1081 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1082 (collect_ada_node): Likewise.
1083 (dump_forward_type): Likewise.
1084 * c-common.c (set_underlying_type): Rename
1085 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1086 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1087
10882020-11-06 Jakub Jelinek <jakub@redhat.com>
1089
1090 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1091
0cfd9109
GA
10922020-11-05 Marek Polacek <polacek@redhat.com>
1093
1094 PR c++/97675
1095 * c.opt (Wexceptions): New option.
1096
10972020-11-05 Marek Polacek <polacek@redhat.com>
1098
1099 PR c++/25814
1100 * c.opt (Wvexing-parse): New option.
1101
35c125cb
GA
11022020-11-04 Jakub Jelinek <jakub@redhat.com>
1103
1104 PR c++/97670
1105 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1106 underlying decl to clear in the allocate_head bitmap.
1107
11082020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1109
1110 * c-objc.h (objc_non_constant_expr_p): New.
1111 * stub-objc.c (objc_non_constant_expr_p): New.
1112
fd2325ea
GA
11132020-11-03 Nathan Sidwell <nathan@acm.org>
1114
1115 * c.opt (MQ,MT): Reword description to be make-agnostic.
1116
88ce3d5f
GA
11172020-11-02 Nathan Sidwell <nathan@acm.org>
1118
1119 * c-opts.c (c_common_post_options): Move var decl to its
1120 initialization point.
1121
11222020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1123
1124 * c-lex.c (c_lex_with_flags): When combining '@' with a
1125 keyword for Objective-C, combine the location ranges too.
1126
11272020-10-30 Qing Zhao <qing.zhao@oracle.com>
1128 H.J.Lu <hjl.tools@gmail.com>
1129
1130 * c-attribs.c (c_common_attribute_table): Add new attribute
1131 zero_call_used_regs.
1132 (handle_zero_call_used_regs_attribute): New function.
1133
e93aae4a
GA
11342020-10-28 Marek Polacek <polacek@redhat.com>
1135
1136 PR c++/97573
1137 * c-opts.c (c_common_post_options): In C++20, turn on
1138 -Wdeprecated-enum-enum-conversion and
1139 -Wdeprecated-enum-float-conversion.
1140 * c.opt (Wdeprecated-enum-enum-conversion,
1141 Wdeprecated-enum-float-conversion): New options.
1142 (Wenum-conversion): Allow for C++ too.
1143
11442020-10-28 Jakub Jelinek <jakub@redhat.com>
1145
1146 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1147 * c-omp.c: Include bitmap.h.
1148 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1149
f19e7c8d
GA
11502020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1151
1152 * c-common.c (__is_nothrow_assignable): New.
1153 (__is_nothrow_constructible): Likewise.
1154 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1155 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1156
efe71fcc
GA
11572020-10-23 Jan Hubicka <hubicka@ucw.cz>
1158
1159 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1160
11612020-10-23 Marek Polacek <polacek@redhat.com>
1162
1163 PR c++/91741
1164 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1165 (c_common_init_ts): Likewise.
1166 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1167 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1168 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1169 (maybe_warn_sizeof_array_div): New function.
1170 * c.opt (Wsizeof-array-div): New option.
1171
11722020-10-23 Martin Sebor <msebor@redhat.com>
1173
1174 PR c/97463
1175 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1176
56ddd5e2
GA
11772020-10-22 Martin Liska <mliska@suse.cz>
1178
1179 PR c/94722
1180 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1181 (handle_stack_protect_attribute): Add error message for a
1182 no_stack_protector function.
1183
11842020-10-22 Martin Liska <mliska@suse.cz>
1185
1186 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1187
11882020-10-22 Jan Hubicka <hubicka@ucw.cz>
1189
1190 * c-gimplify.c: Include tree-nested.h
1191 (c_genericize): Update for new nested function info.
1192
b2698c21
GA
11932020-10-14 Martin Sebor <msebor@redhat.com>
1194
1195 PR c/97413
1196 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1197 bounds in an extra list.
1198
7e9282ae
GA
11992020-10-05 Richard Biener <rguenther@suse.de>
1200 Jakub Jelinek <jakub@redhat.com>
1201
1202 PR c++/97197
1203 * c-pretty-print.c: Include langhooks.h.
1204 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1205 expression.
1206 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1207 unary_expression.
1208 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1209
660bfe61
GA
12102020-09-30 Martin Sebor <msebor@redhat.com>
1211
1212 PR middle-end/97189
1213 * c-attribs.c (append_access_attr): Use the function declaration
1214 location for a warning about an attribute access argument.
1215
93bca37c
GA
12162020-09-29 Marek Polacek <polacek@redhat.com>
1217
1218 PR c++/94695
1219 * c.opt (Wrange-loop-construct): New option.
1220
82b77dee
GA
12212020-09-23 Martin Sebor <msebor@redhat.com>
1222
1223 PR c/97131
1224 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1225
12262020-09-23 Marek Polacek <polacek@redhat.com>
1227
1228 PR c/97125
1229 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1230 after loops and other structured control constructs have been lowered.
1231
521d2711
GA
12322020-09-22 Jakub Jelinek <jakub@redhat.com>
1233
1234 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1235 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1236
44135373
GA
12372020-09-21 Marek Polacek <polacek@redhat.com>
1238
1239 * c.opt (Wctad-maybe-unsupported): New option.
1240
2fe5b7d1
GA
12412020-09-19 Martin Sebor <msebor@redhat.com>
1242
1243 PR c/50584
1244 * c-common.h (warn_parm_array_mismatch): Declare new function.
1245 (has_attribute): Move declaration of an existing function.
1246 (build_attr_access_from_parms): Declare new function.
1247 * c-warn.c (parm_array_as_string): Define new function.
1248 (plus_one): Define new function.
1249 (warn_parm_ptrarray_mismatch): Define new function.
1250 (warn_parm_array_mismatch): Define new function.
1251 (vla_bound_parm_decl): New function.
1252 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1253 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1254 qualifiers here...
1255 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1256 them in brackets here. Also print [static]. Strip extraneous
1257 expressions from VLA bounds.
1258
12592020-09-19 Martin Sebor <msebor@redhat.com>
1260
1261 PR c/50584
1262 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1263 (handle_argspec_attribute): New function.
1264 (get_argument, get_argument_type): New functions.
1265 (append_access_attrs): Add overload. Handle internal attribute
1266 representation in addition to external.
1267 (handle_access_attribute): Handle internal attribute representation
1268 in addition to external.
1269 (build_attr_access_from_parms): New function.
1270
12712020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1272
1273 * c-gimplify.c (genericize_c_loop): Rewrite to match
1274 c_finish_loop in c-typeck.c.
1275
12762020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1277
1278 * c-common.c (c_block_may_fallthrough): New, split from
1279 cxx_block_may_fallthrough in the cp front end.
1280 (c_common_init_ts): Move handling of loop and switch-related
1281 statements here from the cp front end.
1282 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1283 cp front end.
1284 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1285 * c-common.h (c_block_may_fallthru): Declare.
1286 (bc_state_t): Move here from cp front end.
1287 (save_bc_state, restore_bc_state): Declare.
1288 (c_genericize_control_stmt): Declare.
1289 (WHILE_COND, WHILE_BODY): Likewise.
1290 (DO_COND, DO_BODY): Likewise.
1291 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1292 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1293 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1294 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1295 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1296 * c-dump.c (dump_stmt): Copy from cp front end.
1297 (c_dump_tree): Move code to handle structured loop and switch
1298 tree nodes here from cp front end.
1299 * c-gimplify.c: Adjust includes.
1300 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1301 cp front end.
1302 (save_bc_state, restore_bc_state): New functions using old code
1303 from cp front end.
1304 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1305 (genericize_c_loop): Move from cp front end.
1306 (genericize_for_stmt, genericize_while_stmt): Likewise.
1307 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1308 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1309 (genericize_omp_for_stmt): Likewise.
1310 (c_genericize_control_stmt): New function using code split from
1311 cp front end.
1312 (c_genericize_control_r): New.
1313 (c_genericize): Call walk_tree with c_genericize_control_r.
1314 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1315 structured loop and switch tree nodes here from cp front end.
1316
2aad20c0
GA
13172020-09-17 Patrick Palka <ppalka@redhat.com>
1318
1319 PR c/80076
1320 * c-indentation.c (should_warn_for_misleading_indentation): Move
1321 declarations of local variables closer to their first use.
1322 Handle virtual token locations by resolving them to their
1323 respective macro expansion points. If all three tokens are
1324 produced from the same macro expansion, then instead use their
1325 loci within the macro definition.
1326
ecde1b0a
GA
13272020-09-16 Martin Sebor <msebor@redhat.com>
1328
1329 PR c/78666
1330 PR c/96126
1331 * c-attribs.c (validate_attr_args): New function.
1332 (validate_attr_arg): Same.
1333 (handle_section_attribute): Call it. Introduce a local variable.
1334 (handle_alloc_size_attribute): Same.
1335 (handle_alloc_align_attribute): Same.
1336
50a71cd0
GA
13372020-09-14 Jakub Jelinek <jakub@redhat.com>
1338
1339 * c-attribs.c (handle_optimize_attribute): Adjust
1340 cl_optimization_save, cl_optimization_restore and
1341 build_optimization_node callers.
1342 * c-pragma.c (handle_pragma_optimize): Adjust
1343 build_optimization_node caller.
1344 (handle_pragma_push_options): Adjust
1345 build_optimization_node and build_target_option_node callers.
1346 (handle_pragma_pop_options, handle_pragma_reset_options):
1347 Adjust cl_optimization_restore callers.
1348
8f7ea26a
GA
13492020-08-28 Martin Sebor <msebor@redhat.com>
1350
1351 * c.opt (Wstringop-overread): New option.
1352
a6493809
GA
13532020-08-11 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR c/96545
1356 * c-common.c (get_atomic_generic_size): Require that first argument's
1357 type points to a complete type and use tree_fits_uhwi_p instead of
1358 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1359
48cc2e46
GA
13602020-07-31 Martin Sebor <msebor@redhat.com>
1361
1362 PR c++/96003
1363 * c-common.c (check_function_arguments_recurse): Return early when
1364 no-warning bit is set.
1365
13662020-07-31 Richard Biener <rguenther@suse.de>
1367
1368 PR debug/96383
1369 * c-common.h (c_common_finalize_early_debug): Declare.
1370 * c-common.c: Include debug.h.
1371 (c_common_finalize_early_debug): finalize_early_debug langhook
1372 implementation generating debug for extern declarations.
1373
e71dab87
GA
13742020-07-27 Nathan Sidwell <nathan@acm.org>
1375
1376 * c-common.c (try_to_locate_new_include_insertion_point): Use
1377 strcmp, not pointer equality.
1378
ae2e0bc1
GA
13792020-07-25 Martin Sebor <msebor@redhat.com>
1380
1381 PR c++/96310
1382 * c-common.c (check_nonnull_arg): Print note only when warning was
1383 issued.
1384
3ea9abca
GA
13852020-07-22 Tobias Burnus <tobias@codesourcery.com>
1386
1387 * c-omp.c (c_finish_omp_critical): Check for no name but
1388 nonzero hint provided.
1389
0933f508
GA
13902020-07-20 Jason Merrill <jason@redhat.com>
1391
1392 * c-cppbuiltin.c (c_cpp_builtins): Update
1393 __cpp_nontype_template_args for C++20.
1394
13952020-07-20 Martin Sebor <msebor@redhat.com>
1396
1397 PR c/96249
1398 * c.opt: Remove stray text.
1399
8ca07a30
GA
14002020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1401
1402 PR other/86904
1403 * c-indentation.c (should_warn_for_misleading_indentation): Get
1404 global tabstop from the new source.
1405 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1406 is now a common option.
1407 * c.opt: Likewise.
1408
a82c4c4c 14092020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1410
1411 * c.opt (Wscalar-storage-order): Add explicit variable.
1412
f60ee68d
GA
14132020-07-07 Nathan Sidwell <nathan@acm.org>
1414
1415 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1416 cpp_read_main_file.
1417 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1418 maps. Force token position to line_table's highest line.
1419 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1420 (cb_define): Always increment source line.
1421
4077d74c
GA
14222020-07-06 Martin Sebor <msebor@redhat.com>
1423
1424 PR c++/95984
1425 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1426 to stub lambda objects with null this pointer.
1427 (check_nonnull_arg): Handle C++ nullptr.
1428
b5f24739
GA
14292020-07-02 Jason Merrill <jason@redhat.com>
1430 Jakub Jelinek <jakub@redhat.com>
1431
1432 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1433
46fbb6c6
GA
14342020-06-30 Jakub Jelinek <jakub@redhat.com>
1435
1436 PR c++/95963
1437 * c-common.c (check_function_arguments_recurse): Don't crash on
1438 calls to internal functions.
1439
69273534
GA
14402020-06-28 Martin Sebor <msebor@redhat.com>
1441
1442 PR c++/86568
1443 * c-common.c (struct nonnull_arg_ctx): Add members.
1444 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1445 C++ member functions specially. Consider the this pointer implicitly
1446 nonnull.
1447 (check_nonnull_arg): Use location of argument when available.
1448 (check_function_arguments): Use nonnull_arg_ctx as argument.
1449
9a33c41f
GA
14502020-06-27 Jakub Jelinek <jakub@redhat.com>
1451
1452 PR middle-end/95903
1453 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1454 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1455 smaller precision intop operands separately.
1456
c9c05f73
GA
14572020-06-26 Marek Polacek <polacek@redhat.com>
1458
1459 * c-opts.c (c_common_init_options): Default to gnu++17.
1460
aff95ee7
GA
14612020-06-17 Jonathan Wakely <jwakely@redhat.com>
1462
bd0a89dc 1463 PR c/95378
aff95ee7
GA
1464 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1465 pointer arguments.
1466
56638b9b
GA
14672020-06-16 Jakub Jelinek <jakub@redhat.com>
1468
1469 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1470 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1471 idx members.
1472 (c_omp_is_loop_iterator): New function.
1473 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1474 if outer loop iterator is present. Perform duplicate checking through
1475 hash_set in the function rather than expecting caller to do that.
1476 Pass NULL instead of d->ppset to walk_tree_1.
1477 (c_omp_check_nonrect_loop_iv): New function.
1478 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1479 non-rectangular loop forms, diagnose multiple associated loops with
1480 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1481 (c_omp_check_loop_iv_exprs): Likewise.
1482
ec6ffbb9
GA
14832020-06-10 Martin Liska <mliska@suse.cz>
1484
1485 PR tree-optimization/92860
1486 * c-attribs.c (handle_optimize_attribute):
1487 Save global options and compare it after parsing of function
1488 attribute.
1489 * c-pragma.c (opt_stack::saved_global_options): New field.
1490 (handle_pragma_push_options): Save global_options.
1491 (handle_pragma_pop_options): Compare them after pop.
1492
b952c2cf
GA
14932020-06-09 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/95580
1496 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1497 case when MEM_REF's first argument has type pointer to incomplete type.
1498
1a59f3db
GA
14992020-06-05 Jason Merrill <jason@redhat.com>
1500
1501 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1502 operand to POINTER_PLUS_EXPR.
1503
3add3425
GA
15042020-06-04 Martin Sebor <msebor@redhat.com>
1505
1506 PR middle-end/10138
1507 PR middle-end/95136
1508 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1509 (handle_access_attribute): Same.
1510
9a5b7438
GA
15112020-06-03 Mark Wielaard <mark@klomp.org>
1512
1513 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1514 New function.
1515 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1516 New function declaration.
1517
15182020-06-03 Mark Wielaard <mark@klomp.org>
1519
1520 * known-headers.cc (get_string_macro_hint): New function.
1521 (get_stdlib_header_for_name): Use get_string_macro_hint.
1522 (get_c_stdlib_header_for_string_macro_name): New function.
1523 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1524 New function declaration.
1525
15262020-06-03 Tobias Burnus <tobias@codesourcery.com>
1527
1528 * c-common.h (c_omp_predetermined_mapping): Declare.
1529 * c-omp.c (c_omp_predetermined_mapping): New.
1530
af114c38
MW
15312020-05-22 Mark Wielaard <mark@klomp.org>
1532
1533 * known-headers.cc (get_stdlib_header_for_name): Add a new
1534 stdlib_hint array for stdbool and stdint.
1535
45c50b6a
MW
15362020-05-22 Mark Wielaard <mark@klomp.org>
1537
1538 * known-headers.cc (get_stdlib_header_for_name): Return
1539 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1540 flag_isoc99.
1541
c22027a0
NS
15422020-05-20 Nathan Sidwell <nathan@acm.org>
1543
38a4db21
NS
1544 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1545
c22027a0
NS
1546 * c-common.c (try_to_locate_new_include_insertion_point): Use
1547 strcmp to compare filenames.
1548 * c-lex.c (init_c_lex): Move declaration to initialization.
1549 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1550 deferred count loop.
1551
29f0e90d
JM
15522020-05-15 Jason Merrill <jason@redhat.com>
1553
1554 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1555
b04445d4
JM
15562020-05-13 Jason Merrill <jason@redhat.com>
1557
1558 * c.opt (std=c++20): Make c++2a the alias.
1559 (std=gnu++20): Likewise.
1560 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1561 * c-opts.c: Adjust.
1562 * c-cppbuiltin.c: Adjust.
1563 * c-ubsan.c: Adjust.
1564 * c-warn.c: Adjust.
1565
11dd3be5
EB
15662020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1567
1568 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1569
b224c376
NS
15702020-05-08 Nathan Sidwell <nathan@acm.org>
1571
1572 Reimplement directives only processing.
1573 * c-ppoutput.c (token_streamer): Ne.
1574 (directives_only_cb): New. Swallow ...
1575 (print_lines_directives_only): ... this.
1576 (scan_translation_unit_directives_only): Reimplment using the
1577 published interface.
1578
f1d94677
MP
15792020-05-07 Marek Polacek <polacek@redhat.com>
1580
1581 * c-format.c (badwords): Add "nonstatic".
1582
9b95bb52
JJ
1583202-05-07 Jakub Jelinek <jakub@redhat.com>
1584
1585 PR c/94968
1586 * c-common.c (speculation_safe_value_resolve_params): Return false if
1587 error_operand_p (val2).
1588 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1589 Remove extraneous semicolon.
1590
530b4409 15912020-05-06 qing zhao <qing.zhao@oracle.com>
1592
1593 PR c/94230
1594 * c-indentation.c (get_visual_column): Add a hint to use the new
1595 -flarge-source-files option.
1596
b776bdca
SSF
15972020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1598
1599 * c-attribs.c (handle_vector_size_attribute): Add attribute
1600 nonnull for argument args in order to silence warning of
1601 uninitialized variable usage. Since this is local to the
1602 compilation unit and thus cannot be checked at call sides by the
1603 compiler, added an assert statement in order to verify this.
1604
6607bdd9
L
16052020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1606
1607 PR target/93492
1608 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1609 value to USHRT_MAX (65535).
1610
691eeb65
JJ
16112020-04-29 Jakub Jelinek <jakub@redhat.com>
1612
1613 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1614
26d76be7
JJ
16152020-04-27 Jakub Jelinek <jakub@redhat.com>
1616
1617 PR c/94755
1618 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1619 fncode == BUILT_IN_NONE before initialization of first_param.
1620
7291b2ed
MP
16212020-04-23 Marek Polacek <polacek@redhat.com>
1622
1623 PR c++/94733
1624 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1625 TREE_PURPOSE.
1626
58a29af8
PP
16272020-04-14 Patrick Palka <ppalka@redhat.com>
1628
1629 PR c++/85278
1630 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1631 ampersand if it's an rvalue reference type.
1632
09f04139
MS
16332020-04-13 Martin Sebor <msebor@redhat.com>
1634
1635 PR c/92326
1636 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1637 printing array bound for flexible array members.
1638
ee26baf4
IS
16392020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1640
1641 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1642 define, per n4861.
1643
75efe9cb
RB
16442020-04-02 Richard Biener <rguenther@suse.de>
1645
1646 PR c/94392
1647 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1648 for -O2 and C++11 or newer.
1649
75defde9
PP
16502020-03-28 Patrick Palka <ppalka@redhat.com>
1651
1652 * c.opt: Add -fconcepts-diagnostics-depth.
1653
52f24a9e
MS
16542020-03-27 Martin Sebor <msebor@redhat.com>
1655
1656 PR c++/94346
1657 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1658 to decl_attributes. Make handling of different kinds of entities
1659 more robust.
1660
ccacf77b
MS
16612020-03-27 Martin Sebor <msebor@redhat.com>
1662
1663 PR c++/94098
1664 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1665 here.
1666
ca6c7225
JJ
16672020-03-23 Jakub Jelinek <jakub@redhat.com>
1668
1669 PR c++/91993
1670 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1671 result being COMPOUND_EXPRs, skip to ultimate rhs.
1672
1aa22b19
RS
16732020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1674
1675 PR middle-end/94072
1676 * c-common.c (c_common_type_for_mode): Before using a registered
1677 built-in type, check that the vectorness of the type matches
1678 the vectorness of the mode.
1679
700d4cb0
JJ
16802020-03-17 Jakub Jelinek <jakub@redhat.com>
1681
1682 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1683 issue in a diagnostic message.
1684
b408e010
LH
16852020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1686
1687 * c.opt: Avoid redundancy in the help text.
1688
e78e50d5
MP
16892020-03-02 Marek Polacek <polacek@redhat.com>
1690
1691 PR c++/93958 - add missing -std=gnu++20.
1692 * c.opt: Add -std=gnu++20.
1693
649e1741
MS
16942020-03-01 Martin Sebor <msebor@redhat.com>
1695
1696 PR c++/92721
1697 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1698 (handle_access_attribute): Same.
1699
7b60f3ba
JJ
17002020-02-25 Jakub Jelinek <jakub@redhat.com>
1701
1702 PR c/93858
1703 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1704 "did you mean" hint in diagnostics.
1705
fb260504
JM
17062020-02-15 Jason Merrill <jason@redhat.com>
1707
1708 * c.opt: Add -std=c++20.
1709
1d757b09
EB
17102020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1711
1712 * c-ada-spec.c: Include bitmap.h.
1713 (dump_ada_double_name): Rename into...
1714 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1715 (dump_ada_array_type): Adjust to above renaming. Robustify.
1716 (dump_nested_types_1): New function copied from... Add dumped_types
1717 parameter and pass it down to dump_nested_type.
1718 (dump_nested_types): ...this. Remove parent parameter. Just call
1719 dump_nested_types_1 on an automatic bitmap.
1720 (dump_nested_type): Add dumped_types parameter.
1721 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1722 Adjust recursive calls and adjust to above renaming.
1723 (dump_ada_declaration): Adjust call to dump_nested_types.
1724 Tidy up and adjust to above renaming.
1725 (dump_ada_specs): Initialize and release bitmap obstack.
1726
0cc575e4
MS
17272020-02-10 Martin Sebor <msebor@redhat.com>
1728
1729 PR c/93640
1730 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1731
a59aa302
JJ
17322020-02-10 Jakub Jelinek <jakub@redhat.com>
1733
1734 PR other/93641
1735 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1736 Remove useless extra test.
1737
e464fc90
TB
17382020-02-03 Julian Brown <julian@codesourcery.com>
1739 Tobias Burnus <tobias@codesourcery.com>
1740
1741 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1742
e3b6c052
JM
17432020-01-29 Jason Merrill <jason@redhat.com>
1744
1745 PR c++/89357
1746 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1747
6d00f052
JM
17482020-01-23 Jason Merrill <jason@redhat.com>
1749
1750 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1751
8a990ffa
MS
17522020-01-23 Martin Sebor <msebor@redhat.com>
1753
1754 PR c/84919
1755 * c-common.c (check_function_arguments): Avoid overlap checking
1756 of sprintf functions.
1757
55b7df8b
JM
17582020-01-22 Jason Merrill <jason@redhat.com>
1759
1760 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1761 PR c++/40752
1762 * c-warn.c (conversion_warning): Check operands only after checking
1763 the whole expression. Don't check second operand of + for sign.
1764
c77074d0
JM
17652020-01-21 Jason Merrill <jason@redhat.com>
1766 Manuel López-Ibáñez <manu@gcc.gnu.org>
1767
1768 PR c++/40752 - useless -Wconversion with short +=.
1769 * c.opt (-Warith-conversion): New.
1770 * c-warn.c (conversion_warning): Recurse for operands of
1771 operators. Only warn about the whole expression with
1772 -Warith-conversion.
1773
731dbfc3
JM
17742020-01-21 Jason Merrill <jason@redhat.com>
1775
1776 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1777 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1778
ad1a3914
NS
17792020-01-20 Nathan Sidwell <nathan@acm.org>
1780
1781 PR preprocessor/80005
1782 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1783
49789fd0
IS
17842020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1785
1786 * c-common.c (co_await, co_yield, co_return): New.
1787 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1788 RID_CO_RETURN): New enumeration values.
1789 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1790 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1791 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1792 * c.opt (fcoroutines): New command-line switch.
1793
4bc1899b
DM
17942020-01-10 David Malcolm <dmalcolm@redhat.com>
1795
1796 * c-format.c (local_event_ptr_node): New.
1797 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1798 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1799 * c-format.h (T_EVENT_PTR): New define.
1800
f25e33fa
MS
18012020-01-10 Martin Sebor <msebor@redhat.com>
1802
1803 PR c/93132
1804 * c-attribs.c (append_access_attrs): Validate against the translated
1805 access string rather than the human-readable representation.
1806
8d9254fc
JJ
18072020-01-01 Jakub Jelinek <jakub@redhat.com>
1808
1809 Update copyright years.
1810
39292e25
EB
18112019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1812
1813 * c-ada-spec.h (decl_sloc): Delete.
1814 * c-ada-spec.c (decl_sloc): Make static.
1815
519d7496
JB
18162019-12-19 Julian Brown <julian@codesourcery.com>
1817
1818 * c-common.h (c_omp_map_clause_name): Add prototype.
1819 * c-omp.c (c_omp_map_clause_name): New function.
1820 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1821 PRAGMA_OACC_CLAUSE_DETACH.
1822
a6163563
JB
18232019-12-19 Julian Brown <julian@codesourcery.com>
1824 Maciej W. Rozycki <macro@codesourcery.com>
1825 Tobias Burnus <tobias@codesourcery.com>
1826 Thomas Schwinge <thomas@codesourcery.com>
1827
1828 * c-pragma.h (pragma_omp_clause): Add
1829 PRAGMA_OACC_CLAUSE_NO_CREATE.
1830
e8f1ade2
MS
18312019-12-17 Martin Sebor <msebor@redhat.com>
1832
1833 PR c++/61339
1834 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1835
368877a1
DM
18362019-12-11 David Malcolm <dmalcolm@redhat.com>
1837
1838 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1839 implementation.
1840 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1841
d68f5d45
DM
18422019-12-09 David Malcolm <dmalcolm@redhat.com>
1843
1844 * c-format.c (range_label_for_format_type_mismatch::get_text):
1845 Replace label_text ctor called with true with label_text::take.
1846
d3e28653
DM
18472019-12-09 David Malcolm <dmalcolm@redhat.com>
1848
1849 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1850 initial newline from expected outputs.
1851 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1852 call to diagnostic_show_locus.
1853
abd6d8cc
JJ
18542019-12-06 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1857 now.
1858
7906797e
MP
18592019-12-05 Marek Polacek <polacek@redhat.com>
1860 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1863 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1864
5c04da88
MP
18652019-12-05 Marek Polacek <polacek@redhat.com>
1866
1867 PR c++/92271 - make __is_same alias for __is_same_as.
1868 * c-common.c: Add __is_same, an alias for __is_same_as.
1869
43aae289
MP
18702019-12-03 Marek Polacek <polacek@redhat.com>
1871
1872 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1873 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1874 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1875
d7ddfbcb
JH
18762019-11-30 Jan Hubicka <hubicka@ucw.cz>
1877
1878 * c-attribs.c (handle_symver_attribute): New function
1879 (c_common_attributes): Add symver.
1880
65ef05d0
RS
18812019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1882
1883 * c-common.c (pointer_int_sum): Use verify_type_context to check
1884 whether the target allows pointer arithmetic for the types involved.
1885 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1886 to check whether the target allows sizeof and alignof operations
1887 for the types involved.
1888
1a291106
JM
18892019-11-27 Jason Merrill <jason@redhat.com>
1890
1891 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1892
05d6cb1a
JJ
18932019-11-26 Jakub Jelinek <jakub@redhat.com>
1894
1895 PR c++/61414
1896 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1897 ENUMERAL_TYPEs.
1898
5b8d9367
JM
18992019-11-25 Joseph Myers <joseph@codesourcery.com>
1900
1901 PR c/91985
1902 * c-common.c (c_common_type_for_mode): Handle decimal
1903 floating-point types being NULL_TREE.
1904 * c-format.c (get_format_for_type_1): Handle specified types being
1905 NULL_TREE.
1906 * c-lex.c (interpret_float): Give an error for decimal
1907 floating-point constants when decimal floating-point not
1908 supported.
1909
1fbf51cb
JJ
19102019-11-23 Jakub Jelinek <jakub@redhat.com>
1911
1912 PR middle-end/83859
1913 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1914 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1915 group warning with inform together.
1916 (handle_access_attribute): Formatting fix.
1917
761df906
JJ
19182019-11-22 Jakub Jelinek <jakub@redhat.com>
1919
bdaf8be1
JJ
1920 PR c/90677
1921 * c-common.h (identifier_global_tag): Declare.
1922 * c-format.c (get_pointer_to_named_type): Renamed to ...
1923 (get_named_type): ... this. Use identifier_global_tag instead of
1924 identifier_global_value, handle the return value being a TYPE_P.
1925 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1926 to call get_named_type instead. Formatting fixes.
1927
c2ecce6d 1928 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1929 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1930 and __cpp_generic_lambdas for -std=c++2a. Define
1931 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1932 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1933 __cpp_concepts for -std=c++2a.
1934
54aa6b58
MS
19352019-11-22 Martin Sebor <msebor@redhat.com>
1936
1937 PR middle-end/83859
1938 * c-attribs.c (handle_access_attribute): New function.
1939 (c_common_attribute_table): Add new attribute.
1940 (get_argument_type): New function.
1941 (append_access_attrs): New function.
1942 (get_nonnull_operand): Rename...
1943 (get_attribute_operand): ...to this.
1944 * c-common.c (get_nonnull_operand): Rename...
1945 (get_attribute_operand): ...to this.
1946
6c80b1b5
JM
19472019-11-21 Joseph Myers <joseph@codesourcery.com>
1948
1949 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1950 of warning.
1951
192961ff
JM
19522019-11-19 Joseph Myers <joseph@codesourcery.com>
1953
1954 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1955 warning for standard attributes mixed with fallthrough attributes.
1956
f8aea5e3
JM
19572019-11-15 Joseph Myers <joseph@codesourcery.com>
1958
1959 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1960 * c-common.h (handle_fallthrough_attribute): Declare.
1961
2cc94aa8
JM
19622019-11-15 Joseph Myers <joseph@codesourcery.com>
1963
1964 * c-attribs.c (handle_deprecated_attribute): Remove static.
1965 * c-common.h (handle_deprecated_attribute): Declare.
1966
7c5890cc
JM
19672019-11-14 Joseph Myers <joseph@codesourcery.com>
1968
1969 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1970 char for C.
1971
b2417b59
JJ
19722019-11-14 Jakub Jelinek <jakub@redhat.com>
1973
d0ec7c93
JJ
1974 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1975 valid vendors.
1976
b2417b59
JJ
1977 * c-omp.c (c_omp_check_context_selector): Handle name lists
1978 containing string literals. Don't diagnose atomic_default_mem_order
1979 with multiple props.
1980
00be2a5f
JM
19812019-11-13 Joseph Myers <joseph@codesourcery.com>
1982
1983 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1984 NORM_MAX constants. Update call to get_max_float.
1985 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1986 constants.
1987
2dbad62d
EB
19882019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1989
1990 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1991 (dump_forward_type): Do not generate a declaration for function types.
1992 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1993 of the component type if it is declared in another file.
1994
6ed76044
ML
19952019-11-12 Martin Liska <mliska@suse.cz>
1996
1997 * c-opts.c (c_common_post_options):
1998 Use SET_OPTION_IF_UNSET.
1999
62aee289
MR
20002019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2001 Frederik Harwath <frederik@codesourcery.com>
2002
2003 gcc/c-family/
2004 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2005 constant.
2006 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2007
f486280c
RS
20082019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2009
2010 * c-common.h (gnu_vector_type_p): New function.
2011 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2012 vectors to satisfy gnu_vector_type_p.
2013 (c_build_vec_convert): Likewise __builtin_convertvector.
2014 (convert_vector_to_array_for_subscript): Likewise when applying
2015 implicit vector to array conversion.
2016 (scalar_to_vector): Likewise when converting vector-scalar
2017 operations to vector-vector operations.
2018
017c6491
JM
20192019-11-08 Joseph Myers <joseph@codesourcery.com>
2020
2021 * c.opt (Wold-style-definition): Initialize to -1.
2022 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2023 to flag_isoc2x if not set explicitly.
2024
c01bd174
JM
20252019-11-07 Joseph Myers <joseph@codesourcery.com>
2026
2027 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2028
0df65305
JM
20292019-11-05 Jason Merrill <jason@redhat.com>
2030
2031 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2032 -fconcepts.
2033
e0c866dd
KK
20342019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2035
2036 * c-opts.c (c_common_post_options): Update
2037 latest_abi_version.
2038
f968ef9b
JJ
20392019-11-02 Jakub Jelinek <jakub@redhat.com>
2040
d0c464d2
JJ
2041 * c-common.h (c_omp_get_context_selector): Remove.
2042 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2043 and renamed to omp_get_context_selector.
2044
917dd789
JJ
2045 * c-omp.c (c_omp_mark_declare_variant): Use
2046 omp_context_selector_set_compare.
2047
f968ef9b
JJ
2048 PR c++/88335 - Implement P1073R3: Immediate functions
2049 * c-common.h (enum rid): Add RID_CONSTEVAL.
2050 * c-common.c (c_common_reswords): Add consteval.
2051
5f6705b7
JJ
20522019-11-01 Martin Sebor <msebor@redhat.com>
2053
2054 PR middle-end/91679
2055 PR middle-end/91647
2056 PR middle-end/91463
2057 PR middle-end/92312
2058 * c-pretty-print.c (direct_abstract_declarator): Print
2059 bound in zero-length arrays.
2060 * c.opt (-Wzero-length-bounds): New option.
2061
43f1814c
NS
20622019-10-30 Nathan Sidwell <nathan@acm.org>
2063
2064 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2065 macros.
2066
ad1539d5
MS
20672019-10-28 Martin Sebor <msebor@redhat.com>
2068
2069 PR c/66970
2070 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2071 even when only preprocessing.
2072 * c-common.h (names_builtin_p): Declare new function.
2073 * c-lex.c (init_c_lex): Set has_builtin.
2074 (c_common_has_builtin): Define a new function.
2075 * c-ppoutput.c (init_pp_output): Set has_builtin.
2076
135df52c
JJ
20772019-10-24 Jakub Jelinek <jakub@redhat.com>
2078
2079 * c-common.h (c_omp_context_selector_matches): Remove.
2080 * c-omp.c (c_omp_context_selector_matches): Remove.
2081 * c-attribs.c (c_common_attribute_table): Add
2082 "omp declare target {host,nohost,block}" attributes.
2083
8ad0c477
JM
20842019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2085
2086 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2087
56898e43
RS
20882019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2089
2090 * c-common.h (user_facing_original_type_p): Declare.
2091 * c-common.c: Include c-spellcheck.h.
2092 (user_facing_original_type_p): New function.
2093
20de9568
JJ
20942019-10-12 Jakub Jelinek <jakub@redhat.com>
2095
2096 * c-common.h (c_omp_mark_declare_variant,
2097 c_omp_context_selector_matches): Declare.
2098 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2099 and hsa-common.h.
2100 (c_omp_get_context_selector): Support second argument NULL.
2101 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2102 functions.
2103 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2104 attribute, add "omp declare variant base" and
2105 "omp declare variant variant" attributes.
2106
175a85b2
JM
21072019-10-11 Joseph Myers <joseph@codesourcery.com>
2108
2109 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2110 CppReason(CPP_W_C11_C2X_COMPAT).
2111
fe2bc27c
JM
21122019-10-11 Joseph Myers <joseph@codesourcery.com>
2113
2114 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2115 _Decimal64 and _Decimal128.
2116
27dfdc0f
JM
21172019-10-10 Joseph Myers <joseph@codesourcery.com>
2118
2119 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2120 types if DFP not supported.
2121
94e7f906
JJ
21222019-10-10 Jakub Jelinek <jakub@redhat.com>
2123
2124 * c-common.h (c_omp_check_context_selector,
2125 c_omp_get_context_selector): Declare.
2126 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2127 in diagnostic message.
2128 (c_omp_check_context_selector, c_omp_get_context_selector): New
2129 functions.
2130 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2131 attribute.
2132 (handle_omp_declare_variant_attribute): New function.
2133
a7160771
MS
21342019-10-09 Martin Sebor <msebor@redhat.com>
2135
2136 PR tree-optimization/90879
2137 * c.opt (-Wstring-compare): New option.
2138
cb57504a
JM
21392019-10-08 Andrew Sutton <asutton@lock3software.com>
2140 Jason Merrill <jason@redhat.com>
2141
2142 Update the concepts implementation to conform to the C++20
2143 specification, improve compile times, and generally clean up
2144 the implementation.
2145
2146 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2147 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2148 * c.opt: Add -Wconcepts-ts.
2149 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2150 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2151 (set_std_cxx2a): Enable concepts by default.
2152
fbb2a6dc
JM
21532019-10-08 Joseph Myers <joseph@codesourcery.com>
2154
2155 * c-opts.c (c_common_post_options): Set
2156 -fno-fp-int-builtin-inexact for C2X.
2157
8e007055
JJ
21582019-10-05 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR c++/91369 - Implement P0784R7: constexpr new
2161 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2162 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2163
843f104d
JM
21642019-10-04 Joseph Myers <joseph@codesourcery.com>
2165
2166 PR c/82752
2167 * c-format.c (C_STD_VER): Handle C2x.
2168 (C_STD_NAME): Likewise.
2169 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2170 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2171 modifier allowed and 'p' flag.
2172 * c-format.h (enum format_std_version): Add STD_C2X.
2173 (struct format_char_info): Mention 'p' in comment on flags2.
2174
e9c9a142
DM
21752019-10-01 David Malcolm <dmalcolm@redhat.com>
2176
2177 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2178 calling diagnostic_show_locus, rather than destroying it afterwards.
2179
7552c36a
JJ
21802019-10-01 Jakub Jelinek <jakub@redhat.com>
2181
2182 PR c++/91925
2183 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2184 with NULL DECL_FIELD_OFFSET.
2185
8209db25
RS
21862019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2187
2188 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2189 has a type name, use it in preference to the __vector syntax.
2190
9343bf99
RS
21912019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2192
2193 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2194 two spaces between a comma and "...".
2195
59bc434a
JJ
21962019-09-27 Jakub Jelinek <jakub@redhat.com>
2197
2198 PR c++/88203
2199 * c-common.h (c_omp_predefined_variable): Declare.
2200 * c-omp.c (c_omp_predefined_variable): New function.
2201 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2202 for predefined variables.
2203
c6447c20
RS
22042019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2205
2206 * c-common.h (build_function_call_vec): Take the original
2207 function decl as an optional final parameter.
2208 (check_builtin_function_arguments): Take the original function decl.
2209 * c-common.c (check_builtin_function_arguments): Likewise.
2210 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2211 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2212
c4438114
JM
22132019-09-15 Jason Merrill <jason@redhat.com>
2214
2215 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2216 fold_for_warn in "|| mask" warning.
2217
68a57628
ML
22182019-09-10 Martin Liska <mliska@suse.cz>
2219
2220 * c.opt: Use newly added WarnRemoved.
2221
f48ef52e
ML
22222019-09-09 Martin Liska <mliska@suse.cz>
2223
2224 * c.opt: Update comment of removed
2225 options that are preserved only for backward
2226 compatibility.
2227
67f6e649
ML
22282019-09-06 Martin Liska <mliska@suse.cz>
2229
2230 PR c++/91125
2231 * c-common.c: Remove definition of flag_use_repository.
2232 * c-common.h: Likewise.
2233 * c-opts.c (c_common_handle_option):
2234 Do not handle OPT_frepo option.
2235 * c.opt: Mark the option with Deprecated.
2236
db9d2274
MP
22372019-09-04 Marek Polacek <polacek@redhat.com>
2238
2239 * c.opt (fdeduce-init-list): Ignored.
2240
68e2c199
PK
22412019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2242
2243 PR c/78736
2244 * c.opt (Wenum-conversion): New option.
2245
7a4418a5
JL
22462019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2247
2248 * c-attribs.c (handle_section_attribute): Call the
2249 handle_generic_attribute target hook after performing target
2250 independent processing.
2251 (handle_noinit_attribute): Likewise.
2252
5f76ab15
ILT
22532019-09-03 Ian Lance Taylor <iant@golang.org>
2254
2255 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2256 when using -fgo-dump-spec.
2257
ae0d3f6a
ML
22582019-09-02 Martin Liska <mliska@suse.cz>
2259
2260 PR c++/91155
2261 * c-common.c (fname_as_string): Use cxx_printable_name for
2262 __PRETTY_FUNCTION__ same as was used before r265711.
2263
8a902edb
MP
22642019-08-28 Marek Polacek <polacek@redhat.com>
2265
2266 Implement P1152R4: Deprecating some uses of volatile.
2267 PR c++/91361
2268 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2269 default for C++2a, unless -Wno-deprecated.
2270 * c.opt (Wvolatile): New warning.
2271
4742dbe7
MP
22722019-08-28 Marek Polacek <polacek@redhat.com>
2273
2274 PR c++/91360 - Implement C++20 P1143R2: constinit.
2275 * c-common.c (c_common_reswords): Add constinit and __constinit.
2276 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2277 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2278 RID_LAST_CXX20.
2279 (D_CXX20): Define.
2280 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2281 * c-format.c (cxx_keywords): Add "constinit".
2282 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2283
6a074892
JJ
22842019-08-27 Jakub Jelinek <jakub@redhat.com>
2285
2286 PR c++/91415
2287 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2288 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2289 like COMPOUND_EXPR rather than normal expression.
2290
22f8849d
IS
22912019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2292
2293 PR pch/61250
2294 * c-lex.c (c_lex_with_flags): Don't call
2295 c_common_no_more_pch () from here.
2296
df375b03
JJ
22972019-08-23 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR middle-end/91283
2300 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2301 instead of flag_excess_precision_cmdline.
2302 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2303 * c-opts.c (c_common_post_options): Likewise.
2304
14b7950f
MS
23052019-08-22 Martin Sebor <msebor@redhat.com>
2306
2307 PR middle-end/91490
2308 * c-common.c (braced_list_to_string): Add argument and overload.
2309 Handle flexible length arrays and unions.
2310
8bb2ee59
EB
23112019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2312
2313 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2314 function declarations where arguments are missing. Rename variables.
2315
21c1e205
RB
23162019-08-15 Richard Biener <rguenther@suse.de>
2317
2318 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2319 enabled, define __SIZETYPE__.
2320
f0033821
CL
23212019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2322
2323 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2324 exclusion with "section" attribute.
2325 (attr_noinit_exclusions): New table.
2326 (handle_noinit_attribute): New function.
2327
4d732405
RS
23282019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2329
2330 PR middle-end/91421
2331 * c-common.c (resolve_overloaded_builtin): Use
2332 copy_decl_built_in_function.
2333
51ad8481
MS
23342019-08-13 Martin Sebor <msebor@redhat.com>
2335
2336 PR c/80619
2337 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2338 (asm_fprintf_length_spec): Same.
2339 * c-format.h (format_lengths): Add FMT_LEN_w.
2340
77eb117f
JJ
23412019-08-10 Jakub Jelinek <jakub@redhat.com>
2342
2343 * c-pragma.h (enum pragma_omp_clause): Add
2344 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2345
398e3feb
JJ
23462019-08-07 Jakub Jelinek <jakub@redhat.com>
2347
2348 * c-pragma.h (enum pragma_omp_clause): Add
2349 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2350 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2351 enumeration value.
2352
ab574db6
MP
23532019-08-05 Marek Polacek <polacek@redhat.com>
2354
2355 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2356 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2357 default for C++2a, unless -Wno-deprecated.
2358 * c.opt (Wcomma-subscript): New warning.
2359
554a530f
JJ
23602019-07-20 Jakub Jelinek <jakub@redhat.com>
2361
2362 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2363 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2364 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2365 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2366 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2367 constructs with the loop construct.
2368
1a888209
JJ
23692019-07-13 Jakub Jelinek <jakub@redhat.com>
2370
2371 PR c/91149
2372 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2373 OMP_CLAUSE_REDUCTION_TASK handling.
2374
1fdd6f04
JJ
23752019-07-12 Jakub Jelinek <jakub@redhat.com>
2376
2377 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2378 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2379
99b1c316
MS
23802019-07-09 Martin Sebor <msebor@redhat.com>
2381
2382 PR c++/61339
1fdd6f04 2383 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2384 and others to class.
2385 * c-pretty-print.h: Same.
2386
6c1dae73
MS
23872019-07-09 Martin Sebor <msebor@redhat.com>
2388
2389 PR c++/61339
2390 * c-format.c (check_argument_type): Change class-key from class to
2391 struct and vice versa to match convention and avoid -Wclass-is-pod
2392 and -Wstruct-no-pod.
2393 * c-pretty-print.h: Same.
2394
8ba6ea87
ML
23952019-07-03 Martin Liska <mliska@suse.cz>
2396
2397 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2398 dead assignemts.
2399
83eb9522
JJ
24002019-07-03 Jakub Jelinek <jakub@redhat.com>
2401
2402 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2403 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2404 with OMP_PARALLEL.
2405
1c6ffbab
QZ
24062019-07-02 qing zhao <qing.zhao@oracle.com>
2407
2408 PR preprocessor/90581
2409 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2410 * c.opt: Add new option -fmax-include-depth.
2411
7ffc7de5
JM
24122019-06-26 Jason Merrill <jason@redhat.com>
2413
2414 PR c++/55442 - memory-hog with highly recursive constexpr.
2415 * c.opt (fconstexpr-loop-limit): New.
2416
361af3e4
JJ
24172019-06-25 Jakub Jelinek <jakub@redhat.com>
2418
2419 PR sanitizer/90954
2420 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2421 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2422
ab20d992
JJ
24232019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2424
2425 * c-common.c (c_common_nodes_and_builtins): Define
2426 alternate "__intN__" name for "__intN" types.
2427
f4af4019
JH
24282019-06-24 Jan Hubicka <jh@suse.cz>
2429
2430 * c-common.c (braced_lists_to_strings): Check that
2431 type is array or integer prior checking string flag.
2432
da9e9b57
MB
24332019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2434
2435 PR c++/90875 - added -Wswitch-outside-range option
2436 * c.opt (Wswitch-outside-range): Added new option.
2437 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2438
3f3d6a6f
MP
24392019-06-21 Marek Polacek <polacek@redhat.com>
2440
2441 PR c++/90953 - ICE with -Wmissing-format-attribute.
2442 * c-common.c (check_function_arguments_recurse): Use
2443 get_attribute_name.
2444 (check_missing_format_attribute): Likewise.
2445
1bf32c11
MP
24462019-06-19 Marek Polacek <polacek@redhat.com>
2447
2448 PR c++/60364 - noreturn after first decl not diagnosed.
2449 * c-attribs.c (handle_noreturn_attribute): No longer static.
2450 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2451 Declare.
2452 * c-format.c (check_function_format): Use get_attribute_name.
2453
a04c0734
MS
24542019-06-19 Martin Sebor <msebor@redhat.com>
2455
2456 PR translation/90156
2457 * c-format.c (function_format_info::format_type): Adjust type.
2458 (function_format_info::is_raw): New member.
2459 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2460 (decode_format_attr): Adjust call to decode_format_type.
2461 Avoid a redundant call to convert_format_name_to_system_name.
2462 Avoid abbreviating the word "arguments" in a diagnostic.
2463 (format_warning_substr): New function.
2464 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2465 (finish_dollar_format_checking): Same.
2466 (check_format_info): Same.
2467 (struct baltoks_t): New.
2468 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2469 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2470 functions.
2471 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2472 maybe_diag_unbalanced_tokens.
2473 (handle_format_attribute): Spell out the word "arguments" in
2474 a diagnostic.
2475
d3786ebb
MB
24762019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2477
2478 PR c++/90449 - add -Winaccessible-base option.
2479 * c.opt (Winaccessible-base): New option.
2480
bf38f7e9
JJ
24812019-06-10 Jakub Jelinek <jakub@redhat.com>
2482
2483 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2484 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2485 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2486 combined/composite constructs where it is not allowed. Copy over
2487 OMP_CLAUSE_REDUCTION_INSCAN.
2488
0ecf545c
MS
24892019-06-05 Martin Sebor <msebor@redhat.com>
2490
2491 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2492 (handle_alias_ifunc_attribute): Same.
2493 (handle_copy_attribute): Same.
2494 (handle_weakref_attribute): Same.
2495 (handle_nonnull_attribute): Same.
2496 * c-warn.c (warn_for_sign_compare): Same.
2497 (warn_for_restrict): Same.
2498 * c.opt: Same.
2499
36b34127
MS
25002019-06-05 Martin Sebor <msebor@redhat.com>
2501
2502 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2503 * c.opt (-Wformat-diag): Remove a spurious period.
2504
357a352f
JJ
25052019-05-29 Jakub Jelinek <jakub@redhat.com>
2506
2507 PR c/90628
2508 * c-common.c (check_builtin_function_arguments)
2509 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2510 as last argument.
2511
2b8235ea
EB
25122019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2513
2514 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2515
6d86ddc4
ML
25162019-05-22 Martin Liska <mliska@suse.cz>
2517
2518 PR lto/90500
2519 * c-attribs.c (handle_copy_attribute): Do not copy
2520 target_clones attribute.
2521
419ba5b9
EB
25222019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2523
2524 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2525 * c-ada-spec.c (print_assignment_operator): New function.
2526 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2527 assignment operators declared as methods and filter out the others.
2528
e03436e7
TS
25292019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2530
2531 PR c/89433
2532 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2533 "omp declare target".
2534
a9c697b8
MS
25352019-05-16 Martin Sebor <msebor@redhat.com>
2536
ab20d992
JJ
2537 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2538 keywords, operators, and types in diagnostics.
2539 (handle_scalar_storage_order_attribute): Same.
2540 (handle_mode_attribute): Same.
2541 (handle_visibility_attribute): Same.
2542 (handle_assume_aligned_attribute): Same.
2543 (handle_no_split_stack_attribute): Same.
2544 * c-common.c (shorten_compare): Same.
2545 (c_common_truthvalue_conversion): Same.
2546 (cb_get_source_date_epoch): Same.
2547 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2548 in diagnostics.
2549 (interpret_float): Same.
2550 * c-omp.c (c_finish_omp_for): Same.
2551 * c-opts.c (c_common_post_options): Same.
2552 * c-pch.c (c_common_pch_pragma): Same.
2553 * c-pragma.c (pop_alignment): Same.
2554 (handle_pragma_pack): Same.
2555 (apply_pragma_weak): Same.
2556 (handle_pragma_weak): Same.
2557 (handle_pragma_scalar_storage_order): Same.
2558 (handle_pragma_redefine_extname): Same.
2559 (add_to_renaming_pragma_list): Same.
2560 (maybe_apply_renaming_pragma): Same.
2561 (push_visibility): Same.
2562 (handle_pragma_visibility): Same.
2563 (handle_pragma_optimize): Same.
2564 (handle_pragma_message): Same.
2565 * c-warn.c (warn_for_omitted_condop): Same.
2566 (lvalue_error): Same.
a9c697b8 2567
6b943512
RB
25682019-05-15 Richard Biener <rguenther@suse.de>
2569
2570 PR c/90474
2571 * c-common.c (c_common_mark_addressable_vec): Also mark
2572 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2573 c_mark_addressable.
ab20d992 2574
b744fc85
NS
25752019-05-06 Nathan Sidwell <nathan@acm.org>
2576
2577 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2578
598f50d7
NS
25792019-04-30 Nathan Sidwell <nathan@acm.org>
2580
2581 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2582
5bcc5a3b
ML
25832019-04-30 Martin Liska <mliska@suse.cz>
2584
2585 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2586 for unknown options.
2587
e78a87f7
RS
25882019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2589
2590 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2591 the pointer target rather than the pointer itself.
2592
c280b7ee
JJ
25932019-04-19 Jakub Jelinek <jakub@redhat.com>
2594
2595 PR c/89888
2596 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2597 arguments.
2598 (c_do_switch_warnings): Remove outside_range_p argument.
2599 * c-common.c (check_case_bounds): Removed.
2600 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2601 Don't call check_case_bounds. Fold low_value as well as high_value.
2602 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2603 Check for case labels outside of range of original type here and
2604 adjust them.
2605
8e8225e6
JJ
26062019-04-12 Jakub Jelinek <jakub@redhat.com>
2607
63b8a166
JJ
2608 PR translation/90041
2609 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2610 in the Warn diagnostics.
2611
8e8225e6
JJ
2612 PR c/89946
2613 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2614 function comment. Warn if arguments of the attribute are not positive
2615 integer constants.
2616
53a3f614
EB
26172019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2618
2619 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2620 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2621
22be5873
EB
26222019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2623
2624 * c-ada-spec.c (is_float128): New predicate extracted from...
2625 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2626 <REAL_TYPE>: ...here. Call it.
2627
34facf20
DM
26282019-04-05 David Malcolm <dmalcolm@redhat.com>
2629
2630 PR c/89985
2631 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2632 auto_diagnostic_group. Guard inform calls by result of
2633 warning_at call.
2634
05564120
MP
26352019-04-05 Marek Polacek <polacek@redhat.com>
2636
ab20d992 2637 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2638 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2639 of RHS.
2640
7a506c3c
JM
26412019-04-03 Jason Merrill <jason@redhat.com>
2642
2643 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2644 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2645
ddeae8c8
MS
26462019-04-01 Martin Sebor <msebor@redhat.com>
2647
2648 PR c/89685
2649 * c-attribs.c (handle_copy_attribute): Handle references and
2650 non-constant expressions.
2651
a15ffa22
JJ
26522019-03-22 Jakub Jelinek <jakub@redhat.com>
2653
2654 PR c++/87481
2655 * c.opt (-fconstexpr-ops-limit=): New option.
2656
36a3a7a3
JJ
26572019-03-21 Jakub Jelinek <jakub@redhat.com>
2658
2659 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2660 template param.
2661
bec1da64
MS
26622019-03-19 Martin Sebor <msebor@redhat.com>
2663
2664 PR tree-optimization/89688
2665 * c-common.c (braced_list_to_string): Make static.
2666 (braced_lists_to_strings): Define new function.
2667 * c-common.h (braced_list_to_string): Remove.
2668 (braced_lists_to_strings): Declare.
2669
1fe61adf
ML
26702019-03-12 Martin Liska <mliska@suse.cz>
2671
2672 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2673
93964ebd
ML
26742019-03-11 Martin Liska <mliska@suse.cz>
2675
2676 * c-opts.c (c_common_post_options): Wrap apostrophes
2677 in gcc internal format with %'.
2678
a3f9f006
ML
26792019-03-11 Martin Liska <mliska@suse.cz>
2680
2681 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2682 in a string format message and fix GNU coding style.
2683 * c-common.c (vector_types_convertible_p): Likewise.
2684 (c_build_vec_perm_expr): Likewise.
2685 * c-indentation.c (get_visual_column): Likewise.
2686 * c-opts.c (c_common_handle_option): Likewise.
2687 (c_common_post_options): Likewise.
2688 (sanitize_cpp_opts): Likewise.
2689 * c-pch.c (c_common_pch_pragma): Likewise.
2690 * c-pragma.c (handle_pragma_pack): Likewise.
2691
1db01ff9
JJ
26922019-03-08 Jakub Jelinek <jakub@redhat.com>
2693
2694 PR tree-optimization/89550
2695 * c-common.c (c_common_truthvalue_conversion): Only set
2696 TREE_NO_WARNING if warning_at returned true.
2697 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2698
ba790e6f
JJ
26992019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2700 Martin Sebor <msebor@gmail.com>
2701
2702 * c.opt (Wmissing-attributes): Clean up doc string.
2703
7da73ba7
JJ
27042019-02-25 Jakub Jelinek <jakub@redhat.com>
2705
2706 PR c/89495
2707 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2708 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2709 checking.
2710
921bb9d1
RB
27112019-02-22 Richard Biener <rguenther@suse.de>
2712
2713 * c-pch.c (no_checksum): Remove.
2714 (pch_init): Remove assertion that executable_checksum is not
2715 all zero.
2716 (c_common_valid_pch): Likewise.
2717
e2ebb05c
MS
27182019-02-18 Martin Sebor <msebor@redhat.com>
2719
2720 PR middle-end/89294
2721 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2722
3fe53000
DM
27232019-02-16 David Malcolm <dmalcolm@redhat.com>
2724
2725 PR c++/88680
2726 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2727 implementing -Wtype-limits.
2728
28a8cef1
MS
27292019-02-11 Martin Sebor <msebor@redhat.com>
2730
2731 PR c++/87996
2732 * c-common.c (invalid_array_size_error): New function.
2733 (valid_array_size_p): Call it. Handle size as well as type.
2734 * c-common.h (valid_constant_size_p): New function.
2735 (enum cst_size_error): New type.
2736
ec2be203
DM
27372019-01-31 David Malcolm <dmalcolm@redhat.com>
2738
2739 PR c/89122
2740 * known-headers.cc (get_stdlib_header_for_name): Add
2741 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2742
8936f047
JJ
27432019-01-31 Jakub Jelinek <jakub@redhat.com>
2744
2745 PR libstdc++/88170
2746 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2747 a C cast in pp_c_flag_gnu_v3 mode.
2748
6a335b96
JJ
27492019-01-29 Jakub Jelinek <jakub@redhat.com>
2750
2751 PR c/86125
2752 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2753 builtin_structptr_types types even for C.
2754
2a06eba5
BE
27552019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2756
2757 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2758 when rhs is of array type correctly. Fix handling of nested structures.
2759 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2760 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2761 type casts within nested compound expressions.
2762
18a23298
JJ
27632019-01-22 Jakub Jelinek <jakub@redhat.com>
2764
2765 PR middle-end/88968
2766 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2767 variable after using BIT_FIELD_REF.
2768
420183d9
L
27692019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2770
2771 PR c/51628
2772 PR c/88664
2773 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2774 Remove the boolean argument.
2775 * c-warn.c (check_address_of_packed_member): Renamed to ...
2776 (check_address_or_pointer_of_packed_member): This. Also
2777 warn pointer conversion.
2778 (check_and_warn_address_of_packed_member): Renamed to ...
2779 (check_and_warn_address_or_pointer_of_packed_member): This.
2780 Also warn pointer conversion.
2781 (warn_for_address_or_pointer_of_packed_member): Remove the
2782 boolean argument. Don't check pointer conversion here.
2783
99063eee
RS
27842019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2785
2786 PR inline-asm/52813
2787 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2788
a30d0196
JJ
27892019-01-14 Jakub Jelinek <jakub@redhat.com>
2790
2791 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2792 and __cpp_nontype_template_parameter_auto. Add a comment that
2793 __cpp_template_auto is deprecated.
2794
2d91f79d
TH
27952019-01-14 Tom Honermann <tom@honermann.net>
2796
2797 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2798 * c-common.c (c_common_reswords): Add char8_t.
2799 (fix_string_type): Use char8_t for the type of u8 string literals.
2800 (c_common_get_alias_set): char8_t doesn't alias.
2801 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2802 C++.
2803 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2804 (keyword_begins_type_specifier): Add RID_CHAR8.
2805 * c-common.h (rid): Add RID_CHAR8.
2806 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2807 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2808 Define char8_type_node and char8_array_type_node.
2809 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2810 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2811 (c_cpp_builtins): Predefine __cpp_char8_t.
2812 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2813 CPP_UTF8STRING.
2814 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2815 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2816 targeting C++2a.
2817 * c.opt: Add the -fchar8_t command line option.
2818
23db6ced
MS
28192019-01-14 Martin Sebor <msebor@redhat.com>
2820
2821 PR target/88638
2822 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2823 and issue errors if it fails.
2824 * c-common.h (valid_format_string_type_p): Declare.
2825 * c-format.c (valid_stringptr_type_p): Rename...
2826 (valid_format_string_type_p): ...to this and make extern.
2827 (handle_format_arg_attribute): Adjust to new name.
2828 (check_format_string): Same.
2829
234c3818
L
28302019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2831
2832 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2833 Replace "may may" with "may" in warning message.
2834
d8fcab68
JJ
28352019-01-07 Jakub Jelinek <jakub@redhat.com>
2836
2837 PR c++/85052
2838 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2839 (c_build_vec_convert): Declare.
2840 * c-common.c (c_build_vec_convert): New function.
2841
29d24852
MS
28422019-01-04 Martin Sebor <msebor@redhat.com>
2843
2844 PR c/88546
2845 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2846 Handle C++ empty throw specification and C11 _Noreturn.
2847 (has_attribute): Also handle C11 _Noreturn.
2848
9069a4c9
MS
28492019-01-04 Martin Sebor <msebor@redhat.com>
2850
2851 PR c/88363
2852 * c-attribs.c (positional_argument): Also accept enumerated types.
2853
a5544970
JJ
28542019-01-01 Jakub Jelinek <jakub@redhat.com>
2855
2856 Update copyright years.
2857
da77eace
L
28582018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2859
2860 PR c/51628
2861 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2862 * c-warn.c (check_alignment_of_packed_member): New function.
2863 (check_address_of_packed_member): Likewise.
2864 (check_and_warn_address_of_packed_member): Likewise.
2865 (warn_for_address_or_pointer_of_packed_member): Likewise.
2866 * c.opt: Add -Wno-address-of-packed-member.
2867
573767d4
DM
28682018-12-20 David Malcolm <dmalcolm@redhat.com>
2869
2870 PR c++/87504
2871 * c-warn.c (get_outermost_macro_expansion): New function.
2872 (spelled_the_same_p): Use it to unwind the macro expansions, and
2873 compare the outermost macro in each nested expansion, rather than
2874 the innermost.
2875
a14feb3c
DM
28762018-12-19 David Malcolm <dmalcolm@redhat.com>
2877
2878 PR c++/87504
2879 * c-common.h (warn_tautological_cmp): Convert 1st param from
2880 location_t to const op_location_t &.
2881 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2882 when testing for INTEGER_CST.
2883 (warn_tautological_bitwise_comparison): Convert 1st param from
2884 location_t to const op_location_t &; use it to build a
2885 binary_op_rich_location, and use this.
2886 (spelled_the_same_p): New function.
2887 (warn_tautological_cmp): Convert 1st param from location_t to
2888 const op_location_t &. Warn for macro expansions if
2889 spelled_the_same_p. Use binary_op_rich_location.
2890
dfd7fdca
DM
28912018-12-19 David Malcolm <dmalcolm@redhat.com>
2892
2893 PR c++/43064
2894 PR c++/43486
2895 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2896 (verify_tree): Handle location wrappers.
2897 (c_common_truthvalue_conversion): Strip any location wrapper.
2898 Handle CONST_DECL.
2899 (fold_offsetof): Strip any location wrapper.
2900 (complete_array_type): Likewise for initial_value.
2901 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2902 index before checking for INTEGER_CST.
2903 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2904 print parentheses around location wrappers.
2905 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2906 before checking for INTEGER_CST.
2907 (warn_tautological_bitwise_comparison): Call
2908 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2909 before checking for INTEGER_CST.
2910 (readonly_error): Strip any location wrapper.
2911 (warn_array_subscript_with_type_char): Strip location wrappers
2912 before checking for INTEGER_CST. Use the location of the index if
2913 available.
2914
5c8b3702
JM
29152018-12-06 Jason Merrill <jason@redhat.com>
2916
2917 PR c++/88136 - -Wdeprecated-copy false positives
2918 * c.opt (Wdeprecated-copy-dtor): New.
2919 (Wdeprecated-copy): Move to -Wextra.
2920
673670da
MS
29212018-11-29 Martin Sebor <msebor@redhat.com>
2922
2923 PR c/88172
2924 PR testsuite/88208
2925 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2926 alignments to values less than the target requires.
2927 (has_attribute): For attribute aligned consider both the attribute
2928 and the alignment bits.
2929 * c-common.c (c_init_attributes): Optionally issue a warning for
2930 zero alignment.
2931
04864ec8
MS
29322018-11-28 Martin Sebor <msebor@redhat.com>
2933
2934 PR c/88065
2935 PR c/87297
2936 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2937 or destination is an error.
2938
ace83db0
JJ
29392018-11-28 Jakub Jelinek <jakub@redhat.com>
2940
2941 PR c++/88215
2942 * c-ubsan.c: Include langhooks.h.
2943 (ubsan_instrument_division): Change gcc_assert that main variants
2944 of op0 and op1 types are equal to gcc_checking_assert that the
2945 main variants are compatible types.
2946
da193a27
EB
29472018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2948
2949 * c-ada-spec.c: Include stringpool.h.
2950 (has_static_fields): Return false for incomplete types.
2951 (is_tagged_type): Likewise.
2952 (has_nontrivial_methods): Likewise.
2953 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2954 (struct overloaded_name_hash): New structure.
2955 (struct overloaded_name_hasher): Likewise.
2956 (overloaded_names): New global variable.
2957 (init_overloaded_names): New static function.
2958 (overloaded_name_p): New predicate.
2959 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2960 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2961 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2962 Remove always-true condition and dump forward types.
2963 (dump_ada_specs): Delete overloaded_names.
2964
98f08eb8
MS
29652018-11-20 Martin Sebor <msebor@redhat.com>
2966
2967 * c-attribs.c (type_for_vector_size): New function.
2968 (type_valid_for_vector_size): Same.
2969 (handle_vector_size_attribute): Move code to the functions above
2970 and call them.
2971 (validate_attribute, has_attribute): New functions.
2972 * c-common.h (has_attribute): Declare.
2973 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2974 * c-common.c (c_common_resword): Same.
2975
2674fa47
JM
29762018-11-16 Jason Merrill <jason@redhat.com>
2977
2978 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2979 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2980
258b3854
JJ
29812018-11-16 Jakub Jelinek <jakub@redhat.com>
2982
2983 PR middle-end/87854
2984 * c-common.c (fix_string_type): Reject string literals larger than
2985 TYPE_MAX_VALUE (ssizetype) bytes.
2986
1d249509
MS
29872018-11-15 Martin Sebor <msebor@redhat.com>
2988
2989 PR c++/87541
2990 PR c++/87542
2991 * c-attribs.c (positional_argument): New function.
2992 (handle_alloc_size_attribute): Use it and simplify.
2993 (handle_alloc_align_attribute): Same.
2994 (handle_assume_aligned_attribute): Same.
2995 (handle_nonnull_attribute): Same.
2996 * c-common.c (check_function_arguments): Pass fntype to
2997 check_function_format.
2998 * c-common.h (check_function_format): Add an argument.
2999 (PosArgFlags, positional_argument): Declare new type and function.
3000 * c-format.c (decode_format_attr): Add arguments.
3001 (check_format_string, get_constant): Same.
3002 (convert_format_name_to_system_name): Adjust.
3003
478dd60d
DM
30042018-11-15 David Malcolm <dmalcolm@redhat.com>
3005
3006 PR other/19165
3007 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3008
8cca0163
JJ
30092018-11-14 Jakub Jelinek <jakub@redhat.com>
3010
8ee09943
JJ
3011 P1236R1 - Signed integers are two's complement
3012 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3013 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3014 with in-range second operand well defined for -std=c++2a.
3015
8cca0163
JJ
3016 PR other/88007
3017 * c-common.c (parse_optimize_options): Allocate option string from
3018 opts_obstack rather than as GC memory. Move the allocation after
3019 warning for invalid option.
3020
620e594b
DM
30212018-11-13 David Malcolm <dmalcolm@redhat.com>
3022
3023 * c-common.c (c_get_substring_location): Update for renaming of
3024 get_source_location_for_substring to get_location_within_string.
3025 * c-lex.c: Replace "source_location" with "location_t".
3026 * c-opts.c: Likewise.
3027 * c-ppoutput.c: Likewise.
3028
f9731de3
MS
30292018-11-13 Martin Sebor <msebor@redhat.com>
3030
3031 PR middle-end/81824
3032 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3033 (handle_tls_model_attribute): Improve diagnostics.
3034
e4bd6d5e
JM
30352018-11-12 Jason Merrill <jason@redhat.com>
3036
a6bb6b07
JM
3037 * c-cppbuiltin.c (c_cpp_builtins): Define
3038 __cpp_impl_destroying_delete.
3039
e4bd6d5e
JM
3040 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3041 __cpp_conditional_explicit.
3042
79a2c428
MS
30432018-11-09 Martin Sebor <msebor@redhat.com>
3044
3045 PR middle-end/81824
3046 * c-attribs.c (handle_copy_attribute): New function.
3047
4c7bd361
MS
30482018-11-09 Martin Sebor <msebor@redhat.com>
3049
3050 PR c/87795
3051 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3052
28567c40
JJ
30532018-11-08 Jakub Jelinek <jakub@redhat.com>
3054
3055 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3056 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3057 enum omp_memory_order MEMORY_ORDER.
3058 (c_finish_omp_flush): Add MO argument.
3059 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3060 (c_finish_omp_for): Add FINAL_P argument.
3061 * c-omp.c: Include memmodel.h.
3062 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3063 OMP_TASKGROUP_CLAUSES to it.
3064 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3065 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3066 instead of OMP_ATOMIC_SEQ_CST.
3067 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3068 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3069 __atomic_thread_fence call with the given value.
3070 (check_omp_for_incr_expr): Formatting fixes.
3071 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3072 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3073 is not constant expression 1 or -1. Transform NE_EXPR loops
3074 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3075 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3076 loops too.
3077 (c_omp_split_clauses): Add support for combined
3078 #pragma omp parallel master and
3079 #pragma omp {,parallel }master taskloop{, simd} constructs.
3080 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3081 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3082 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3083 (c_omp_predetermined_sharing): Don't return
3084 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3085 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3086 PRAGMA_OMP_REQUIRES.
3087 * c-pragma.h (enum pragma_kind): Likewise.
3088 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3089 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3090
204839e7
DM
30912018-11-08 David Malcolm <dmalcolm@redhat.com>
3092
3093 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3094
d8010ee4
DM
30952018-11-08 David Malcolm <dmalcolm@redhat.com>
3096
3097 * c-format.c (local_cgraph_node_ptr_node): New variable.
3098 (gcc_dump_printf_char_table): Add entry for %C.
3099 (get_pointer_to_named_type): New function, taken from the handling
3100 code for "gimple *" from...
3101 (init_dynamic_diag_info): ...here. Add handling for
3102 "cgraph_node *".
3103 * c-format.h (T_CGRAPH_NODE): New.
3104
4be5c72c
JM
31052018-10-19 Jason Merrill <jason@redhat.com>
3106
3107 * c-cppbuiltin.c (c_cpp_builtins): Add
3108 __cpp_nontype_template_parameter_class.
3109
f3f6029d
NS
31102018-10-31 Nathan Sidwell <nathan@acm.org>
3111
ab5324fb
NS
3112 * c-opts.c (c_finish_options): Force command line macro
3113 location. Refactor to avoid repeating main debug hook.
3114 (push_command_line_include): Clarify comment.
3115
f3f6029d
NS
3116 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3117
91e3ec29
MS
31182018-10-30 Martin Sebor <msebor@redhat.com>
3119
3120 PR middle-end/87041
3121 * c-format.c (check_format_types): Avoid diagnosing null pointer
3122 arguments to printf-family of functions.
3123
b5ff4f5c
MP
31242018-10-30 Marek Polacek <polacek@redhat.com>
3125
3126 Implement P0892R2, explicit(bool).
3127 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3128
7e2de6df
DM
31292018-10-29 David Malcolm <dmalcolm@redhat.com>
3130
3131 * name-hint.h (name_hint::take_deferred): New member function.
3132
b2bf438c
DM
31332018-10-29 David Malcolm <dmalcolm@redhat.com>
3134
3135 PR c++/56856
3136 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3137 argument.
3138 (check_function_restrict): Rename param "argarray" to
3139 "unfolded_argarray", and make a copy named "argarray", calling
3140 fold_for_warn on each argument.
3141 (check_function_arguments): Add note about responsibility for
3142 folding the arguments.
3143
9f936c86
JM
31442018-10-17 Joseph Myers <joseph@codesourcery.com>
3145
3146 * c-common.c (flag_isoc2x): New variable.
3147 * c-common.h (clk_c): Update comment to reference C2X.
3148 (flag_isoc99, flag_isoc11): Update comments to reference future
3149 standard versions in general.
3150 (flag_isoc2x): Declare.
3151 * c-opts.c (set_std_c2x): New function.
3152 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3153 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3154 flag_isoc2x to 0.
3155 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3156
7a8a92c4
JM
31572018-10-17 Joseph Myers <joseph@codesourcery.com>
3158
3159 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3160 (std=iso9899:2018): Document C17 as published in 2018.
3161
4dc003ff
CL
31622018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3163
3164 PR c++/87364
3165 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3166
79371671
WW
31672018-10-11 Will Wray <wjwray@gmail.com>
3168
3169 PR c++/87364
3170 * c-pretty-print.h (pp_c_type_cast): Prototype.
3171 (pp_c_integer_constant): Likewise.
3172 * c-pretty-print.c (pp_c_type_cast): No longer static.
3173 (pp_c_integer_constant): Likewise.
3174 (pp_c_enumeration_constant): Fix loop termination when finding
3175 name of constant. No longer returns a value. Call
3176 pp_c_integer_constant.
3177 (c_pretty_printer::constant): Update for changes to
3178 pp_c_enumeration_constant.
3179
46c62690
JJ
31802018-10-11 Jakub Jelinek <jakub@redhat.com>
3181
3182 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3183 for no_unique_address.
3184
c24300ba
DM
31852018-10-09 David Malcolm <dmalcolm@redhat.com>
3186
3187 * c-common.c (c_option_controlling_cpp_error): Rename to...
3188 (c_option_controlling_cpp_diagnostic): ...this, and convert
3189 "reason" from int to enum.
3190 (c_cpp_error): Rename to...
3191 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3192 * c-common.h (c_cpp_error): Rename to...
3193 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3194 * c-opts.c (c_common_init_options): Update for renaming.
3195
8656dafa
RS
31962018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3197
3198 PR c/87286
3199 * c-common.c (vector_types_compatible_elements_p): Use
3200 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3201
8cff0652
VK
32022018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3203
3204 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3205 to generate constructor destructor priority warning.
3206 * c.opt (-Wprio-ctor-dtor): New option.
3207
bedf03a2
JM
32082018-10-01 Jason Merrill <jason@redhat.com>
3209
3210 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3211
6cc430c1
EB
32122018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3213
3214 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3215 (dump_ada_node): Add const keyword.
3216
87677ac7
ML
32172018-09-25 Martin Liska <mliska@suse.cz>
3218
3219 * c-common.c (c_common_truthvalue_conversion):
3220 Remove Pascal from documentation.
3221
518196cb
EB
32222018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3223
3224 * c-ada-spec.c: Include diagnostic.h.
3225 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3226
a599af84
MP
32272018-09-19 Marek Polacek <polacek@redhat.com>
3228
3229 * c.opt (Wclass-conversion): New.
3230
9c4a4b3c
DM
32312018-09-17 David Malcolm <dmalcolm@redhat.com>
3232
3233 * c-format.c (range_label_for_format_type_mismatch::get_text):
3234 Update for new param.
3235
c896ecfe
DM
32362018-09-17 David Malcolm <dmalcolm@redhat.com>
3237
3238 * c-format.c (format_warning_at_char): Update for introduction of
3239 format_string_diagnostic_t.
3240 (format_type_warning): Likewise.
3241
80c6d1f4
MJ
32422018-09-17 Martin Jambor <mjambor@suse.cz>
3243
3244 PR c/63886
3245 * c.opt (Wabsolute-value): New.
3246
6d900107
BE
32472018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3248
3249 * c-common.c (complete_flexible_array_elts): New helper function.
3250 * c-common.h (complete_flexible_array_elts): Declare.
3251
b5764229
BE
32522018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3253
3254 * c-common.c (braced_list_to_string): Remove eval parameter.
3255 Add some more checks. Always create zero-terminated STRING_CST.
3256 * c-common.h (braced_list_to_string): Adjust prototype.
3257
85204e23
DM
32582018-08-27 David Malcolm <dmalcolm@redhat.com>
3259
3260 PR 87091
3261 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3262 to a tri-state.
3263 (maybe_suggest_missing_token_insertion): Likewise.
3264 (maybe_add_include_fixit): Add param "override_location". If set,
3265 and source-printing is enabled, then override the rich_location's
3266 primary location with that of the insertion point for the fix-it
3267 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3268 * c-common.h (extern void maybe_add_include_fixit): Add bool
3269 param.
3270 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3271 for conversion of show_caret_p to a tri-state.
3272 * c-warn.c (warn_for_restrict): Likewise.
3273 * known-headers.cc
3274 (suggest_missing_header::~suggest_missing_header): Update call to
3275 maybe_add_include_fixit to suggest overriding the location, as it
3276 is for a note.
3277
3d78e008
ML
32782018-08-27 Martin Liska <mliska@suse.cz>
3279
3280 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3281 fndecl_built_in_p and remove check for FUNCTION_DECL if
3282 possible.
3d78e008
ML
3283 (check_builtin_function_arguments): Likewise.
3284 (reject_gcc_builtin): Likewise.
3285 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3286
b5be6d0c
MP
32872018-08-26 Marek Polacek <polacek@redhat.com>
3288
3289 PR c++/87029, Implement -Wredundant-move.
3290 * c.opt (Wredundant-move): New option.
3291
79ca9c35
MP
32922018-08-21 Marek Polacek <polacek@redhat.com>
3293
3294 PR c++/86981, Implement -Wpessimizing-move.
3295 * c.opt (Wpessimizing-move): New option.
3296
097f82ec
DM
32972018-08-20 David Malcolm <dmalcolm@redhat.com>
3298
3299 PR other/84889
3300 * c-attribs.c (common_handle_aligned_attribute): Add
3301 auto_diagnostic_group instance.
3302 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3303 * c-opts.c (c_common_post_options): Likewise.
3304 * c-warn.c (warn_logical_not_parentheses): Likewise.
3305 (warn_duplicated_cond_add_or_warn): Likewise.
3306 (warn_for_multistatement_macros): Likewise.
3307
3fb558b1
NS
33082018-08-20 Nathan Sidwell <nathan@acm.org>
3309
3310 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3311 access.
3312
800c0e98
NS
33132018-08-17 Nathan Sidwell <nathan@acm.org>
3314
3315 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3316 field.
3317 (laxy_hex_fp_value_count): Make unsigned.
3318 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3319 manipulate the macro.
3320 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3321 cpp_define_lazily.
3322
6f795a92
DM
33232018-08-17 David Malcolm <dmalcolm@redhat.com>
3324
3325 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3326 (gcc_dump_printf_length_specs): New.
3327 (gcc_dump_printf_flag_pairs): New.
3328 (gcc_dump_printf_flag_specs): New.
3329 (gcc_dump_printf_char_table): New.
3330 (format_types_orig): Add entry for "gcc_dump_printf".
3331 (init_dynamic_diag_info): Set up length_char_specs and
3332 conversion_specs for gcc_dump_printf_format_type.
3333 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3334
c5d725c0
NS
33352018-08-17 Nathan Sidwell <nathan@acm.org>
3336
10f04917
NS
3337 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3338
c5d725c0
NS
3339 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3340 * c-cppbuiltin.c: Likewise.
3341
c0c12356
ML
33422018-08-17 Martin Liska <mliska@suse.cz>
3343
3344 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3345 Ignore/Deprecated flag. Warning is done automatically for
3346 Deprecated flags.
c0c12356 3347
10fcc142
DM
33482018-08-16 David Malcolm <dmalcolm@redhat.com>
3349
3350 PR c++/70693
3351 * c-common.c (selftest::c_family_tests): Call
3352 selftest::c_indentation_c_tests.
3353 * c-common.h (selftest::c_indentation_c_tests): New decl.
3354 * c-indentation.c: Include "selftest.h".
3355 (next_tab_stop): Add "tab_width" param, rather than accessing
3356 cpp_opts.
3357 (get_visual_column): Likewise. Clarify comment. Bulletproof
3358 against reading past the end of the line.
3359 (get_first_nws_vis_column): Add "tab_width" param.
3360 (detect_intervening_unindent): Likewise.
3361 (should_warn_for_misleading_indentation): Read tab width from
3362 cpp_opts and pass around.
3363 (selftest::test_next_tab_stop): New test.
3364 (selftest::assert_get_visual_column_succeeds): New function.
3365 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3366 (selftest::assert_get_visual_column_fails): New function.
3367 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3368 (selftest::test_get_visual_column): New test.
3369 (selftest::c_indentation_c_tests): New function.
3370
3f6677f4
NS
33712018-08-16 Nathan Sidwell <nathan@acm.org>
3372
3373 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3374 (store_ada_macro): Likewise.
3375 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3376 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3377
96e6ae57
DM
33782018-08-15 David Malcolm <dmalcolm@redhat.com>
3379
3380 * c-format.c: Include "selftest-diagnostic.h" and
3381 "gcc-rich-location.h".
3382 (format_warning_at_char): Pass NULL for new label params of
3383 format_warning_va.
3384 (class indirection_suffix): New class.
3385 (class range_label_for_format_type_mismatch): New class.
3386 (format_type_warning): Move logic for generating "*" suffix to
3387 class indirection_suffix. Create "fmt_label" and "param_label"
3388 to show their types, and pass them to the
3389 format_warning_at_substring calls.
3390 (selftest::test_type_mismatch_range_labels): New test.
3391 (selftest::c_format_c_tests): Call it.
3392
23aa9f7c
MS
33932018-08-13 Martin Sebor <msebor@redhat.com>
3394
3395 PR tree-optimization/71625
3396 * c-common.c (braced_list_to_string): New function.
3397 * c-common.h (braced_list_to_string): Declare it.
3398
f10a9135
NS
33992018-08-08 Nathan Sidwell <nathan@acm.org>
3400
3401 * c-common.c (try_to_locate_new_include_inertion_point): Use
3402 linemap_included_from_linemap.
3403 * c-lex.c (fe_file_change): Use linemap_included_from.
3404 * c-ppoutput.c (pp_file_change): Likewise.
3405
8a45b051
MS
34062018-08-01 Martin Sebor <msebor@redhat.com>
3407
3408 PR tree-optimization/86650
ab20d992 3409 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3410 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3411 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3412 * c-format.h (T89_G): Update to be "gimple *" rather than
3413 "gcall *".
3414 (local_gcall_ptr_node): Rename...
3415 (local_gimple_ptr_node): ...to this.
3416
e540ccc0
DM
34172018-07-31 David Malcolm <dmalcolm@redhat.com>
3418
3419 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3420 table entries for gcc_diag_char_table, and the 'Z' entry from
3421 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3422 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3423 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3424 adding missing "Z" for this table. Remove erroneous "G" and "K"
3425 entries.
3426 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3427 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3428 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3429
425fc685
RE
34302018-07-31 Richard Earnshaw <rearnsha@arm.com>
3431
3432 * c-common.c (speculation_safe_resolve_call): New function.
3433 (speculation_safe_resolve_params): New function.
3434 (speculation_safe_resolve_return): New function.
3435 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3436 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3437 __HAVE_SPECULATION_SAFE_VALUE.
3438
181463c2
DM
34392018-07-20 David Malcolm <dmalcolm@redhat.com>
3440
3441 * c-common.c (c_cpp_error): Remove redundant "line_table"
3442 parameter from call to rich_location::set_range.
3443 (maybe_suggest_missing_token_insertion): Likewise.
3444
0d7f9065
MS
34452018-07-20 Martin Sebor <msebor@redhat.com>
3446
3447 PR middle-end/82063
ab20d992 3448 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3449
00abf86c
MS
34502018-07-20 Martin Sebor <msebor@redhat.com>
3451
3452 PR middle-end/82063
3453 * c-common.h (c_common_handle_option): Change function argument
3454 to HOST_WIDE_INT.
3455 * c-opts.c (c_common_init_options): Same.
3456 (c_common_handle_option): Same. Remove special handling of
3457 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3458 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3459 options to take a HOST_WIDE_INT argument and accept a byte-size
3460 suffix. Initialize.
3461 (-Wvla-larger-than): Same.
3462 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3463 (-Wno-vla-larger-than): Same.
3464
9b452033
JJ
34652018-07-12 Jakub Jelinek <jakub@redhat.com>
3466
3467 * c-attribs.c (c_common_attribute_table): Add
3468 "omp declare target implicit" attribute.
3469
cd0762f3
RB
34702018-07-12 Richard Biener <rguenther@suse.de>
3471
3472 PR c/86453
3473 * c-attribs.c (handle_packed_attribute): Do not build a variant
3474 type with TYPE_PACKED, instead ignore the attribute if we may
3475 not apply to the original type.
3476
0b27c3ed
JJ
34772018-07-10 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c++/86443
3480 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3481 to contain TREE_LIST for both the original class iterator and the
3482 "last" helper var.
3483
e730a0ef
EB
34842018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3485
3486 * c-ada-spec.c (to_ada_name): Remove index parameter.
3487 (pp_ada_tree_identifier): Likewise.
3488 (dump_ada_macros): Adjust call to to_ada_name.
3489 (struct overloaded_name_hash): Delete.
3490 (struct overloaded_name_hasher): Likewise.
3491 (overloaded_names): Likewise.
3492 (compute_overloading_index): Likewise.
3493 (dump_ada_decl_name): Do not call compute_overloading_index and
3494 adjust calls to pp_ada_tree_identifier.
3495 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3496 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3497 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3498 (dump_ada_enum_type): Remove type and display_convention parameters.
3499 Adjust calls to pp_ada_tree_identifier.
3500 (dump_ada_node): Likewise and for dump_ada_structure.
3501 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3502 and tidy up.
3503 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3504 syntax.
3505 (print_constructor): Adjust call to pp_ada_tree_identifier.
3506 (print_destructor): Likewise.
3507 (dump_ada_declaration): Switch to aspect syntax.
3508 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3509 parameter with nested parameter.
3510 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3511 (dump_ada_specs): Do not delete overloaded_names table.
3512
8de583fc
PB
35132018-07-06 Peter Bergner <bergner@linux.ibm.com>
3514
3515 PR target/86324
e730a0ef 3516 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3517 target hook.
3518
09cff37b
NS
35192018-07-05 Nathan Sidwell <nathan@acm.org>
3520
3521 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3522 NO_IMPLICIT_EXTERN_C.
3523
98086b2b
ML
35242018-06-28 Martin Liska <mliska@suse.cz>
3525
3526 * cppspec.c: Include opt-suggestions.h.
3527
ab20d992
JJ
35282018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3529 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3530 Cesar Philippidis <cesar@codesourcery.com>
3531
3532 * c-pragma.h (enum pragma_omp_clause): Add
3533 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3534 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3535
f41b7612
JJ
35362018-06-20 Jakub Jelinek <jakub@redhat.com>
3537
3538 PR c++/86210
3539 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3540 comment.
3541
4252ccd7
MS
35422018-06-18 Martin Sebor <msebor@redhat.com>
3543
3544 PR middle-end/85602
3545 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3546 nonstring.
3547
e197e64e
KV
35482018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3549
3550 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3551
34a7a230
JM
35522018-06-13 Jason Merrill <jason@redhat.com>
3553
5cef3733
JM
3554 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3555 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3556 handling.
3557
34a7a230
JM
3558 PR c++/86094 - wrong code with defaulted move ctor.
3559 * c-opts.c (c_common_post_options): Bump the current ABI version to
3560 13. Set warn_abi_version and flag_abi_compat_version to the current
3561 version rather than 0. Fix defaulting flag_abi_compat_version from
3562 warn_abi_version.
3563
bb0f14ae
MS
35642018-06-12 Martin Sebor <msebor@redhat.com>
3565
3566 PR c/85931
3567 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3568 sizeof source and destination yields the same value.
3569
3713f2e2
ML
35702018-06-12 Martin Liska <mliska@suse.cz>
3571
3572 * c.opt: Make MPX-related options as Deprecated.
3573
4af78ef8
DM
35742018-06-08 David Malcolm <dmalcolm@redhat.com>
3575
3576 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3577 rather than 0.
3578
31db0fe0
ML
35792018-06-08 Martin Liska <mliska@suse.cz>
3580
3581 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3582 for MPX (macros, related functions, fields in cgraph_node, ...).
3583 (handle_bnd_legacy): Likewise.
3584 (handle_bnd_instrument): Likewise.
3585 * c.opt: Likewise.
3586
fe16acf2
JJ
35872018-06-06 Jakub Jelinek <jakub@redhat.com>
3588
3589 PR c++/86068
3590 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3591 __cpp_transactional_memory to 201500 instead of 210500.
3592
4dbdb49b
JM
35932018-06-06 Jason Merrill <jason@redhat.com>
3594
3595 PR c++/85710 - ICE with -Wmemset-elt-size.
3596 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3597
f8ad043f
JM
35982018-06-01 Jason Merrill <jason@redhat.com>
3599
3600 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3601 201703.
3602
abc24d93
EB
36032018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3604
3605 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3606 declaration for a typedef independently of whether the declaration of
3607 the subtype is generated.
3608
d258f4aa
MS
36092018-05-31 Martin Sebor <msebor@redhat.com>
3610
3611 PR c/82063
3612 * c.opt (-Wno-alloc-size-larger-than): New option.
3613
b67b9225
DP
36142018-04-22 David Pagan <dave.pagan@oracle.com>
3615
3616 PR c/55976
3617 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3618 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3619 differentiate between default (no option), -Wreturn-type, and
3620 -Wno-return-type.
3621
04eb9c55
JM
36222018-05-29 Jason Merrill <jason@redhat.com>
3623
3624 * c.opt (Winit-list-lifetime): New flag.
3625
b0c31bc6
BE
36262018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3627
3628 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3629 splay_tree_delete_pointers.
3630
44284983
JJ
36312018-05-26 Jakub Jelinek <jakub@redhat.com>
3632
3633 PR bootstrap/85921
3634 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3635 noinline variable to workaround broken kernel headers.
3636
b46b715d
JM
36372018-05-18 Jason Merrill <jason@redhat.com>
3638
3639 * c.opt (Wdeprecated-copy): New flag.
3640
40659769
ML
36412018-05-17 Martin Liska <mliska@suse.cz>
3642
3643 * c-warn.c (overflow_warning): Do not use
3644 space in between 'G_' and '('.
3645
403962ea
JM
36462018-05-09 Jason Merrill <jason@redhat.com>
3647
3648 * c-common.c (valid_array_size_p): Add complain parameter.
3649 * c-common.h: ...which defaults to true.
3650
1c9ee609
JJ
36512018-05-11 Jakub Jelinek <jakub@redhat.com>
3652
3653 PR c/85696
3654 * c-omp.c (c_omp_predetermined_sharing): Return
3655 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3656
19916065
ML
36572018-05-11 Martin Liska <mliska@suse.cz>
3658
92a285c1 3659 PR sanitizer/85556
19916065
ML
3660 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3661 TREE_LIST values.
3662
79e7b1fe
JJ
36632018-05-10 Jakub Jelinek <jakub@redhat.com>
3664
3665 PR c++/85662
3666 * c-common.h (fold_offsetof_1): Removed.
3667 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3668 CTX argument defaulted to ERROR_MARK.
3669 * c-common.c (fold_offsetof_1): Renamed to ...
3670 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3671 argument, convert the pointer constant to TYPE and use size_binop
3672 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3673 a pointer type. Adjust recursive calls.
3674
86c12f76
EB
36752018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3676
3677 PR c++/85400
3678 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3679
ee336e84
NS
36802018-05-07 Nathan Sidwell <nathan@acm.org>
3681
3682 * c.opt (ffor-scope): Remove functionality, issue warning.
3683
6c072e21
NS
36842018-05-03 Nathan Sidwell <nathan@acm.org>
3685
3686 * c.opt (ffriend-injection): Remove functionality, issue warning.
3687
2cc7d3a7
DM
36882018-05-01 David Malcolm <dmalcolm@redhat.com>
3689
3690 PR c/84258
3691 * c-format.c (struct format_check_results): Add field
3692 "number_non_char".
3693 (check_format_info): Initialize it, and warn if encountered.
3694 (check_format_arg): Distinguish between wide char and
3695 everything else when detecting arrays of non-char.
3696
7761dfbe
DM
36972018-04-30 David Malcolm <dmalcolm@redhat.com>
3698
3699 * c-format.c (get_corrected_substring): Update for
3700 location_get_source_line returning a char_span. Use a char_span
3701 when handling the prefix of the correction.
3702 * c-indentation.c (get_visual_column): Update for
3703 location_get_source_line returning a char_span.
3704 (get_first_nws_vis_column): Likewise.
3705
62e98ef1
DM
37062018-03-29 David Malcolm <dmalcolm@redhat.com>
3707
3708 PR c++/84269
3709 * known-headers.cc (get_stdlib_header_for_name): Add various names
3710 from <assert.h>, <string.h>, and <memory.h>; add more names from
3711 <stdio.h>.
3712
a7dea617
JJ
37132018-03-27 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR c++/85061
3716 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3717 get_base_address of the second operand is a VAR_P, rather than the
3718 operand itself, and use gcc_checking_assert instead of gcc_assert.
3719
889a3a30
MP
37202018-03-23 Marek Polacek <polacek@redhat.com>
3721
3722 PR c++/85045
3723 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3724 <case RDIV_EXPR>: Tweak condition.
3725
452154b9
EB
37262018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3727
3728 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3729
63ecb626
JJ
37302018-03-16 Jakub Jelinek <jakub@redhat.com>
3731
ce811fc4
JJ
3732 PR c/84909
3733 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3734 diagnostics.
3735
63ecb626
JJ
3736 PR c/84910
3737 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3738 diagnostics.
3739
a1295eec
RB
37402018-03-16 Richard Biener <rguenther@suse.de>
3741
3742 PR c/84873
3743 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3744 unshare the possibly folded expression.
3745
919674fb
RB
37462018-03-15 Richard Biener <rguenther@suse.de>
3747
3748 PR c/84873
3749 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3750
f99309b2
MS
37512018-03-13 Martin Sebor <msebor@redhat.com>
3752
3753 PR tree-optimization/84725
3754 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3755 with all three narrow character types, including their qualified forms.
3756
e9b9fa4c
MS
37572018-03-12 Martin Sebor <msebor@redhat.com>
3758
3759 PR tree-optimization/83456
ab20d992 3760 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3761 Restore checking of bounded built-in functions.
3762 (check_function_arguments): Also return the result
3763 of warn_for_restrict.
ab20d992
JJ
3764 * c-common.c (check_function_restrict): Return bool.
3765 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3766
0805d020
MP
37672018-03-02 Marek Polacek <polacek@redhat.com>
3768
3769 PR c++/84171
3770 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3771 is erroneous.
3772
ed2a2f08
TS
37732018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3774
3775 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3776 function".
3777
90abdde0
MP
37782018-03-01 Marek Polacek <polacek@redhat.com>
3779
3780 PR c++/84639
3781 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3782 alignment in computation.
3783
c6db43fa
EB
37842018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3785
3786 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3787 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3788
9e25c7ed
EB
37892018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3790
3791 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3792 (is_char_array): Take a type instead of a declaration.
3793 (dump_ada_array_type): Likewise.
3794 (is_simple_enum): Minor tweak.
3795 (dump_ada_enum_type): New function extracted from...
3796 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3797 <INTEGER_TYPE>: Remove unreachable code.
3798 <RECORD_TYPE>: Likewise. Minor tweaks.
3799 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3800 <ENUMERAL_TYPE>: New case.
3801 <RECORD_TYPE>: Factor out common code.
3802 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3803 Minor tweaks. Deal with enumeral types.
3804 (dump_ada_structure): Minor tweaks.
3805
09de3550
EB
38062018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3807
3808 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3809 address for incomplete structures.
3810 (dump_forward_type): Do not bail out for incomplete structures.
3811 (dump_ada_declaration): Do not special-case incomplete structures
3812 for subtypes. Dump them as null records for types.
3813
095d8d4b
EB
38142018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3815
3816 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3817 (is_char_array): Fix formatting.
3818 (dump_template_types): Likewise.
3819 (dump_generic_ada_node): Rename into...
3820 (dump_ada_node): ...this.
3821 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3822 incomplete structures and not for empty structures. Do not use it
3823 when forward declarations are needed.
3824 (dump_forward_type): New function.
3825 (dump_nested_types): Remove FORWARD parameter. Do not consider
3826 TREE_VISITED and do not generate a forward declaration. Only dump
3827 original nested types for nested declaration.
3828 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3829 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3830 <RECORD_TYPE>: Do not consider TREE_VISITED.
3831 (dump_ada_declaration): Use booleans and fix formatting throughout.
3832 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3833 Call dump_forward_type instead of dump_nested_types for a typedef.
3834 Remove superfluous check and adjust call to dump_nested_types.
3835 <POINTER_TYPE>: Call dump_forward_type and fall through.
3836 (dump_ada_struct_decl): Rename into...
3837 (dump_ada_structure): ...this. Do not special-case empty structures.
3838
d4cfd486
MS
38392018-02-27 Martin Sebor <msebor@redhat.com>
3840
3841 PR c++/83871
3842 * c.opt (-Wmissing-attributes): New option.
3843
b22dbd03
ML
38442018-02-21 Martin Liska <mliska@suse.cz>
3845
3846 * c.opt (Wcatch-value=): Add IntegerRange.
3847
883dfe2a
JM
38482018-02-15 Jason Merrill <jason@redhat.com>
3849
3850 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3851
0444aa9c
NS
38522018-02-09 Nathan Sidwell <nathan@acm.org>
3853
3854 PR c/84293
3855 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3856 arg.
3857 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3858 arg. Adjust.
3859
cea71f0a
MS
38602018-02-09 Martin Sebor <msebor@redhat.com>
3861
3862 PR lto/84212
3863 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3864 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3865 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3866 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3867 (-Wuninitialized): Same.
3868
8c8b7be5
EB
38692018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3870
3871 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3872 keyword for components.
3873
7c30b12a
PC
38742018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3875
3876 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3877
eece7fe5
JK
38782018-02-02 Julia Koval <julia.koval@intel.com>
3879
3880 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3881
7d07a93a
MP
38822018-01-29 Marek Polacek <polacek@redhat.com>
3883
3884 PR c/83966
3885 * c-format.c (check_function_format): Check current_function_decl.
3886
53723269
JJ
38872018-01-27 Jakub Jelinek <jakub@redhat.com>
3888
3889 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3890 argument.
3891 (LAZY_HEX_FP_VALUES_CNT): Define.
3892 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3893 values rather than just 12.
3894 (builtin_define_with_hex_fp_value): Likewise.
3895
7365279f
BK
38962018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3897
92a285c1
ML
3898 PR other/70268
3899 * c.opt (-fmacro-prefix-map): New option.
3900 * c-opts.c (c_common_handle_option): Handle it.
3901 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3902 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3903
bb9869d5
DM
39042018-01-17 David Malcolm <dmalcolm@redhat.com>
3905
3906 PR c++/83814
3907 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3908
68dc87c3
EB
39092018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3910
3911 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3912 Skip 'f' and 'F' characters if it is true.
3913 (store_ada_macro): Minor tweak.
3914 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3915 <CPP_WSTRING>: Likewise.
3916 <CPP_STRING>: Output '&' in the buffer if not the first string.
3917 <CPP_NUMBER>: Adjust calls to dump_number.
3918
9a004410
DM
39192018-01-10 David Malcolm <dmalcolm@redhat.com>
3920
3921 PR c++/43486
3922 * c-common.c: Include "selftest.h".
3923 (get_atomic_generic_size): Perform the test for integral type
3924 before the range test for any integer constant, fixing indentation
3925 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3926 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3927 (selftest::test_fold_for_warn): New function.
3928 (selftest::c_common_c_tests): New function.
3929 (selftest::c_family_tests): Call it, and
3930 selftest::c_pretty_print_c_tests.
3931 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3932 * c-format.c (check_format_arg): Convert VAR_P check to a
3933 fold_for_warn.
3934 * c-pretty-print.c: Include "selftest.h".
3935 (pp_c_cast_expression): Don't print casts for location wrappers.
3936 (selftest::assert_c_pretty_printer_output): New function.
3937 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3938 (selftest::test_location_wrappers): New function.
3939 (selftest::c_pretty_print_c_tests): New function.
3940 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3941
5c0caeb3
RS
39422018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3943 Alan Hayward <alan.hayward@arm.com>
3944 David Sherwood <david.sherwood@arm.com>
3945
3946 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3947
73a699ae
RS
39482018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3949 Alan Hayward <alan.hayward@arm.com>
3950 David Sherwood <david.sherwood@arm.com>
3951
3952 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3953 as polynomial.
3954
928686b1
RS
39552018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3956 Alan Hayward <alan.hayward@arm.com>
3957 David Sherwood <david.sherwood@arm.com>
3958
3959 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3960 (convert_vector_to_array_for_subscript): Handle polynomial
3961 TYPE_VECTOR_SUBPARTS.
3962 (c_common_type_for_mode): Check valid_vector_subparts_p.
3963 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3964 VECTOR_CST_NELTS.
3965
85ec4feb
JJ
39662018-01-03 Jakub Jelinek <jakub@redhat.com>
3967
3968 Update copyright years.
3969
170a8bd6 39702017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3971 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3972
3973 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3974 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3975
ab20d992 39762017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3977
3978 PR debug/83527
3979 PR debug/83419
3980 * c-semantics.c (only_debug_stmts_after_p): New.
3981 (pop_stmt_list): Clear side effects in debug-only stmt list.
3982 Check for single nondebug stmt followed by debug stmts only.
3983
c12d20d4
AO
39842017-12-21 Alexandre Oliva <aoliva@redhat.com>
3985
3986 PR debug/83419
3987 * c-semantics.c (pop_stmt_list): Propagate side effects from
3988 single nondebug stmt to container list.
3989
01512446
JJ
39902017-12-19 Jakub Jelinek <jakub@redhat.com>
3991
3992 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3993 conditions with typical order conditions.
3994
82cfbd01
MP
39952017-12-18 Marek Polacek <polacek@redhat.com>
3996
3997 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3998 not in effect.
3999
99da11ec
MS
40002017-12-17 Martin Sebor <msebor@redhat.com>
4001
4002 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4003 an error for attribute warn_if_not_aligned.
4004
cc8bea0a
MS
40052017-12-16 Martin Sebor <msebor@redhat.com>
4006
4007 PR tree-optimization/78918
4008 * c-common.c (check_function_restrict): Avoid checking built-ins.
4009 * c.opt (-Wrestrict): Include in -Wall.
4010
4849deb1
JJ
40112017-12-15 Jakub Jelinek <jakub@redhat.com>
4012
4013 * c-attribs.c (c_common_attribute_table,
4014 c_common_format_attribute_table): Swap affects_type_identity
4015 and handler fields, adjust comments.
4016
c65e18d3
BE
40172017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4018
4019 * c.opt (Wcast-function-type): New warning option.
4020 * c-lex.c (get_fileinfo): Avoid warning.
4021 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4022
2004617a
QZ
40232017-12-14 Qing Zhao <qing.zhao@oracle.com>
4024
7365279f 4025 PR middle_end/79538
2004617a
QZ
4026 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4027 Adjust the size of buf1 and buf2, add a new buf to avoid
4028 format-overflow warning.
4029
ab20d992 40302017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4031
4032 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4033 subsequent statement list.
4034
5d9ae53d
MS
40352017-12-07 Martin Sebor <msebor@redhat.com>
4036
4037 PR c/81544
4038 PR c/81566
4039 * c-attribs.c (attr_aligned_exclusions): New array.
4040 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4041 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4042 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4043 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4044 (attr_warn_unused_result_exclusions): Same.
4045 (handle_hot_attribute, handle_cold_attribute): Simplify.
4046 (handle_const_attribute): Warn on function returning void.
4047 (handle_pure_attribute): Same.
4048 (handle_aligned_attribute): Diagnose conflicting attribute
4049 specifications.
4050 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4051
c79144f8
DM
40522017-12-06 David Malcolm <dmalcolm@redhat.com>
4053
4054 PR c/83236
4055 * c-common.c (selftest::c_family_tests): Call
4056 selftest::c_spellcheck_cc_tests.
4057 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4058 * c-spellcheck.cc: Include "selftest.h".
4059 (name_reserved_for_implementation_p): New function.
4060 (should_suggest_as_macro_p): New function.
4061 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4062 should_suggest_as_macro_p and call it.
4063 (selftest::test_name_reserved_for_implementation_p): New function.
4064 (selftest::c_spellcheck_cc_tests): New function.
4065 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4066
613bc14f
DM
40672017-12-06 David Malcolm <dmalcolm@redhat.com>
4068
4069 * c-spellcheck.cc: New file, taken from macro-handling code in
4070 spellcheck-tree.c.
4071 * c-spellcheck.h: New file, taken from macro-handling code in
4072 spellcheck-tree.h.
4073
e76c7157
JJ
40742017-12-01 Jakub Jelinek <jakub@redhat.com>
4075
4076 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4077 attribute.
4078 (handle_simd_attribute): Don't check for "cilk simd function"
4079 attribute. Reindent, formatting changes.
4080
b0da4034
JK
40812017-11-30 Julia Koval <julia.koval@intel.com>
4082
4083 * c-common.h (inv_list): Remove.
4084
058f0b9e
JJ
40852017-11-28 Jakub Jelinek <jakub@redhat.com>
4086
4087 PR sanitizer/81275
4088 * c-common.c (c_switch_covers_all_cases_p_1,
4089 c_switch_covers_all_cases_p): New functions.
4090 * c-common.h (c_switch_covers_all_cases_p): Declare.
4091
5e9d6aa4 40922017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4093 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4094
4095 * array-notation-common.c: Delete.
4096 * c-cilkplus.c: Ditto.
4097 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4098 * c-common.def (ARRAY_NOTATION_REF): Remove.
4099 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4100 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4101 c_validate_cilk_plus_loop, cilkplus_an_parts,
4102 cilk_ignorable_spawn_rhs_op,
4103 cilk_recognize_spawn): Remove.
4104 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4105 * c-omp.c: Remove CILK_SIMD check.
4106 * c-pragma.c: Ditto.
4107 * c-pragma.h: Remove CILK related pragmas.
4108 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4109 ARRAY_NOTATION_REF condition.
4110 (c_pretty_printer::expression): Ditto.
4111 * c.opt (fcilkplus): Remove.
4112 * cilk.c: Delete.
4113
1af4ebf5
MG
41142017-11-21 Marc Glisse <marc.glisse@inria.fr>
4115
4116 * c-pretty-print.c (pp_c_additive_expression,
4117 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4118
d44ed508
JJ
41192017-11-21 Jakub Jelinek <jakub@redhat.com>
4120
7d2f0f9b
JJ
4121 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4122
d44ed508
JJ
4123 PR c++/83059
4124 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4125 instead of tree_to_uhwi, formatting fix.
4126
26edace6
DM
41272017-11-20 David Malcolm <dmalcolm@redhat.com>
4128
4129 PR c/81404
4130 * known-headers.cc: New file, based on material from c/c-decl.c.
4131 (suggest_missing_header): Copied as-is.
4132 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4133 heavily edited to add C++ support. Add some knowledge about
4134 <limits.h>, <stdint.h>, and <wchar.h>.
4135 * known-headers.h: Likewise.
4136
6c7a259b
DM
41372017-11-20 David Malcolm <dmalcolm@redhat.com>
4138
4139 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4140 (lookup_name_fuzzy): Likewise. Convert return type from
4141 const char * to name_hint. Add location_t param.
4142 * name-hint.h: New header.
4143
f9c59f7e
JJ
41442017-11-19 Jakub Jelinek <jakub@redhat.com>
4145
4146 PR c/66618
4147 PR c/69960
4148 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4149
1e39313a
JM
41502017-11-16 Joseph Myers <joseph@codesourcery.com>
4151
4152 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4153 expected publication date of C17.
4154 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4155
3ca0dc60
JM
41562017-11-15 Joseph Myers <joseph@codesourcery.com>
4157
4158 PR c/81156
4159 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4160 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4161
025d57f0
MS
41622017-11-10 Martin Sebor <msebor@redhat.com>
4163
4164 PR c/81117
4165 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4166 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4167 * c.opt (-Wstringop-truncation): New option.
4168
1b6fa695
ML
41692017-11-06 Martin Liska <mliska@suse.cz>
4170
4171 PR middle-end/82404
4172 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4173 FE.
4174 * c.opt: Set default value of warn_return_type.
4175
64a5912c
DM
41762017-10-31 David Malcolm <dmalcolm@redhat.com>
4177
4178 * c-common.c (binary_op_error): Update for renaming of
4179 error_at_rich_loc.
4180 (c_parse_error): Likewise.
4181 * c-warn.c (warn_logical_not_parentheses): Likewise for
4182 renaming of inform_at_rich_loc.
4183 (warn_for_restrict): Likewise for renaming of
4184 warning_at_rich_loc_n.
4185
c76dc9c3
JM
41862017-10-30 Joseph Myers <joseph@codesourcery.com>
4187
4188 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4189 * c-opts.c (set_std_c17): New function.
4190 (c_common_init_options): Use gnu17 as default C version.
4191 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4192
ee5fd23a
MM
41932017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4194
4195 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4196 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4197 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4198 __FP_FAST_FMA<N>X.
4199
d1047465
MP
42002017-10-23 Marek Polacek <polacek@redhat.com>
4201
4202 PR c/82681
4203 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4204
9e878cf1
EB
42052017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4206
4207 * c-common.c (check_builtin_function_arguments): Also check arguments
4208 of __builtin_alloca_with_align_and_max.
4209
89b6abbb
DM
42102017-10-17 David Malcolm <dmalcolm@redhat.com>
4211
4212 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4213 rather than NULL to format_warning_va.
4214 (check_format_types): Likewise when calling format_type_warning.
4215 Remove code to extract source_ranges and source_range * in favor
4216 of just a location_t.
4217 (format_type_warning): Convert source_range * param to a
4218 location_t.
4219
39382c09
JJ
42202017-10-13 Jakub Jelinek <jakub@redhat.com>
4221
4222 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4223 [LR]SHIFT_EXPR.
4224
62e1c678
DM
42252017-10-12 David Malcolm <dmalcolm@redhat.com>
4226
4227 * c-common.c (enum missing_token_insertion_kind): New enum.
4228 (get_missing_token_insertion_kind): New function.
4229 (maybe_suggest_missing_token_insertion): New function.
4230 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4231
b90c9338
NS
42322017-10-11 Nathan Sidwell <nathan@acm.org>
4233
4234 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4235 (c_common_handle_option): Update incpath_kind names.
4236
3a266bcd
ML
42372017-10-11 Martin Liska <mliska@suse.cz>
4238
4239 PR sanitizer/82490
4240 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4241 Wattributes warning.
4242
8e6cdc90
RS
42432017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4244
4245 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4246 operating on trees as wide_ints.
4247 * c-common.c (pointer_int_sum): Likewise.
4248 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4249 * c-warn.c (match_case_to_enum_1): Likewise.
4250 (c_do_switch_warnings): Likewise.
4251 (maybe_warn_shift_overflow): Likewise.
4252
802b38c9
JJ
42532017-10-10 Jakub Jelinek <jakub@redhat.com>
4254
4255 PR c/82437
4256 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4257 instead of wide_int::from.
4258
4e34b338
JJ
42592017-10-06 Jakub Jelinek <jakub@redhat.com>
4260
4261 PR c/82437
4262 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4263 using to_widest use wide_int with the larger of the two precisions.
4264
4bc4b2b4
BE
42652017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4266
4267 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4268 functions.
4269
a1488398
RS
42702017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4271
4272 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4273 when combining the original unconverted comparison operands.
4274
01c9fb68
JJ
42752017-09-29 Jakub Jelinek <jakub@redhat.com>
4276
4277 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4278 attribute.
4279
6e3e8419
EB
42802017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4281
4282 * c-ada-spec.c (to_ada_name): Add index parameter.
4283 (pp_ada_tree_identifier): Likewise.
4284 (dump_ada_macros): Adjust call to to_ada_name.
4285 (struct overloaded_name_hash): New type.
4286 (struct overloaded_name_hasher): Likewise.
4287 (overloaded_names): New hash table.
4288 (compute_overloading_index): New function.
4289 (dump_ada_decl_name): Call it and pass the result to
4290 pp_ada_tree_identifier.
4291 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4292 (dump_ada_function_declaration): Likewise.
4293 (dump_generic_ada_node): Likewise.
4294 (print_constructor): Likewise.
4295 (print_destructor): Likewise.
4296 (dump_ada_specs): Delete overloaded_names table.
4297
79310774
EB
42982017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4299
4300 * c-ada-spec.c (max_ada_macros): Move around.
4301 (store_ada_macro_index): Likewise.
4302 (source_file): Rename into...
4303 (macro_source_file): ...this.
4304 (count_ada_macro): Move around.
4305 (store_ada_macro): Likewise.
4306 (compare_macro): Likewise.
4307 (print_ada_macros): Merge in...
4308 (dump_ada_macros): ...this.
4309 (source_file_base): Rename into...
4310 (current_source_file): ...this.
4311 (print_comment): Move around.
4312 (dump_ada_nodes): Call dump_ada_declaration directly.
4313 (struct with): Change type of limited field to bool.
4314 (append_withs): Change type of limited_access parameter to bool.
4315 (pp_ada_tree_identifie): Likewise.
4316 (dump_ada_decl_nam): Likewise.
4317 (dump_generic_ada_node): Likewise. Do not print the return type.
4318 (to_ada_name): Change type of space_found parameter to bool.
4319 (dump_ada_function_declaration): Return void and change type of
4320 parameters to bool. Also print the return type for a function.
4321 (print_ada_methods): Rename into...
4322 (dump_ada_methods): ...this.
4323 (print_ada_declaration): Rename into ...
4324 (dump_ada_declaration): ...this. Do not print the return type.
4325 (print_ada_struct_decl): Rename into...
4326 (dump_ada_struct_decl): ...this.
4327
7d386d45
JJ
43282017-09-29 Jakub Jelinek <jakub@redhat.com>
4329
4330 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4331 rather than DECL_INITIAL.
4332 (common_handle_aligned_attribute): Likewise.
4333
ab20d992 43342017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4335
4336 * c.opt (gen-decls): Add RejectNegative.
4337
026a79f7
AS
43382017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4339 Jakub Jelinek <jakub@redhat.com>
4340
4341 Add support for -std=c++2a.
4342 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4343 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4344 * c-opts.c (set_std_cxx2a): New.
4345 (c_common_handle_option): Set options when -std=c++2a is enabled.
4346 (c_common_post_options): Adjust comments.
4347 (set_std_cxx14, set_std_cxx17): Likewise.
4348
4a8ca690
EB
43492017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4350
4351 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4352 message for non-uniform endianness and issue a warning in C++.
4353
7b936140
JJ
43542017-09-15 Jakub Jelinek <jakub@redhat.com>
4355
4356 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4357 (Wc++17-compat): Change from undocumented alias to option.
4358 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4359 change C++1z to C++17 in description.
4360 (std=c++1z, std=gnu++1z): Change from option to undocumented
4361 deprecated alias.
4362 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4363 Adjust description.
4364 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4365 * c-opts.c (set_std_cxx1z): Rename to ...
4366 (set_std_cxx17): ... this.
4367 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4368 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4369 caller.
7b936140
JJ
4370 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4371 comments.
4372
12263f13
L
43732017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4374
4375 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4376 function alignment if warn_if_not_aligned_p is true.
4377
6836632e
NS
43782017-09-12 Nathan Sidwell <nathan@acm.org>
4379
4380 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4381 resort_sorted_fields): Move to c/c-decl.c.
4382 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4383 (struct sorted_fields_type): Move to c/c-lang.h.
4384
019bf9ad
JW
43852017-09-09 Jonathan Wakely <jwakely@redhat.com>
4386
4387 PR c++/81852
4388 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4389
bc7fe952
MP
43902017-09-04 Marek Polacek <polacek@redhat.com>
4391
4392 PR c/81783
4393 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4394 (warn_tautological_cmp): Call it.
4395
ab20d992 43962017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4397
4398 * c-opts.c (c_common_finish): Write dependency information even if
4399 there are errors.
4400
d2e05fcb
JJ
44012017-09-01 Jakub Jelinek <jakub@redhat.com>
4402
4403 PR c/81887
4404 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4405 (omp_pragmas_simd): ... here.
4406 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4407 create new clauses list containing just simd clause.
4408
18e2a8b8
RS
44092017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4410 Alan Hayward <alan.hayward@arm.com>
4411 David Sherwood <david.sherwood@arm.com>
4412
4413 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4414 into scalar_mode_supported_p call.
4415 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4416
16d22000
RS
44172017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4418 Alan Hayward <alan.hayward@arm.com>
4419 David Sherwood <david.sherwood@arm.com>
4420
4421 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4422 for the mode iterator.
4423
b397965c
RS
44242017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4425 Alan Hayward <alan.hayward@arm.com>
4426 David Sherwood <david.sherwood@arm.com>
4427
4428 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4429 * c-common.c (c_build_vec_perm_expr): Likewise.
4430
357b7604
RS
44312017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4432 Alan Hayward <alan.hayward@arm.com>
4433 David Sherwood <david.sherwood@arm.com>
4434
4435 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4436
e05c94ba
RS
44372017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4438 Alan Hayward <alan.hayward@arm.com>
4439 David Sherwood <david.sherwood@arm.com>
4440
4441 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4442 before calling targetm.addr_space.valid_pointer_mode.
4443
5c20c4af
RS
44442017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4445 Alan Hayward <alan.hayward@arm.com>
4446 David Sherwood <david.sherwood@arm.com>
4447
4448 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4449
c94843d2 44502017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4451 Alan Hayward <alan.hayward@arm.com>
4452 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4453
4454 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4455 iterators.
4456 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4457
4e10a5a7
RS
44582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4459 Alan Hayward <alan.hayward@arm.com>
4460 David Sherwood <david.sherwood@arm.com>
4461
4462 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4463 case statements.
4464
130fcab0
ML
44652017-08-29 Martin Liska <mliska@suse.cz>
4466
4467 PR other/39851
4468 * c-common.c (parse_optimize_options): Add argument to function
4469 call.
4470 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4471
14e18d71
DM
44722017-08-24 David Malcolm <dmalcolm@redhat.com>
4473
4474 * c-lex.c (interpret_float): Use token location
4475 when building an EXCESS_PRECISION_EXPR.
4476
2f687306
DM
44772017-08-21 David Malcolm <dmalcolm@redhat.com>
4478
4479 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4480 it to check_function_format.
4481 * c-common.h (check_function_arguments): Add vec<location_t> *
4482 param.
4483 (check_function_format): Likewise.
4484 * c-format.c (struct format_check_context): Add field "arglocs".
4485 (check_function_format): Add param "arglocs"; pass it to
4486 check_format_info.
ab20d992 4487 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4488 new field of format_ctx.
4489 (check_format_arg): Pass format_ctx->arglocs to new param of
4490 check_format_info_main.
4491 (class argument_parser): New field "arglocs".
4492 (argument_parser::argument_parser): Add "arglocs_" param and use
4493 it to initialize new field.
4494 (argument_parser::check_argument_type): Pass new arglocs field to
4495 check_format_types.
4496 (check_format_info_main): Add param "arglocs", and use it when
4497 constructing arg_parser.
4498 (check_format_types): Add param "arglocs"; use it if non-NULL when
4499 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4500
00aa1fa2
L
45012017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4502
4503 PR c/53037
4504 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4505 (c_common_attribute_table): Add warn_if_not_aligned.
4506 (handle_aligned_attribute): Renamed to ...
4507 (common_handle_aligned_attribute): Remove argument, name, and add
4508 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4509 (handle_aligned_attribute): New.
4510 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4511
27be025d
MS
45122017-08-14 Martin Sebor <msebor@redhat.com>
4513
4514 PR c/81117
4515 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4516 (handle_nonstring_attribute): New function.
4517
da67acb9
MS
45182017-08-14 Martin Sebor <msebor@redhat.com>
4519
4520 PR c/81117
4521 * c-format.h (T89_G): New macro.
4522 * c-format.c (local_gcall_ptr_node): New variable.
4523 (init_dynamic_diag_info): Initialize it.
4524
a8b522b4
ML
45252017-08-11 Martin Liska <mliska@suse.cz>
4526
4527 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4528 TARGET_SUPPORTS_ALIASES.
4529
32129a17
DM
45302017-08-10 David Malcolm <dmalcolm@redhat.com>
4531
4532 * c-common.c (c_parse_error): Add rich_location * param, using it
4533 rather implicitly using input_location.
4534 * c-common.h (c_parse_error): Add rich_location * param.
4535
30af3a2b
MP
45362017-08-09 Marek Polacek <polacek@redhat.com>
4537
4538 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4539 (c_common_truthvalue_conversion): Likewise.
4540 * c-omp.c (c_finish_omp_atomic): Likewise.
4541 * c-common.h (build_binary_op): Update declaration.
4542
314e6352
ML
45432017-08-08 Martin Liska <mliska@suse.cz>
4544
4545 * c-ada-spec.c: Include header files.
4546 * c-ubsan.c: Likewise.
4547 * c-warn.c: Likewise.
4548
56b5041c
JJ
45492017-08-07 Jakub Jelinek <jakub@redhat.com>
4550
4551 PR c/69389
4552 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4553
db440138
EB
45542017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4555
4556 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4557 (print_ada_methods): Likewise.
4558 (print_ada_declaration): Likewise.
4559
577eec56
ML
45602017-08-07 Martin Liska <mliska@suse.cz>
4561
4562 * array-notation-common.c: Add new includes.
4563 * c-format.c( handle_format_attribute): Canonicalize a format
4564 function name.
4565 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4566 attribute.
4567 * c-pretty-print.c: Add new include.
4568
b854df3c
EB
45692017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4570
4571 * c-ada-spec.c (has_static_fields): Look only into variables.
4572 (print_constructor): Add TYPE parameter and use it for the name.
4573 (print_destructor): Likewise.
4574 (print_ada_declaration): Adjust to new constructor/destructor names.
4575 Adjust calls to print_constructor and print_destructor.
4576 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4577 Look only into variables in the final loop.
4578
9f2cb25e
EB
45792017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4580
4581 * c-ada-spec.c (has_static_fields): Look only into fields.
4582 (dump_generic_ada_node): Small tweak.
4583 (dump_nested_types): Look only into fields.
4584 (print_ada_declaration): Look only into methods. Small tweak.
4585 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4586
f4bcd9eb
EB
45872017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4588
4589 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4590 (dump_ada_function_declaration): Likewise.
4591 (dump_generic_ada_node): Likewise.
4592 (print_ada_declaration): Add support for const-qualified variables.
4593
f34ebeb2
ML
45942017-07-31 Martin Liska <mliska@suse.cz>
4595
4596 PR sanitize/81530
4597 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4598 Guard condition with flag_sanitize_p also with current_function_decl
4599 non-null equality.
4600 (ubsan_maybe_instrument_reference_or_call): Likewise.
4601
218e5d04
UB
46022017-07-30 Uros Bizjak <ubizjak@gmail.com>
4603
4604 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4605
942047f2
EB
46062017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4607
4608 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4609 for enumeral types.
4610 (print_ada_declaration): Add missing guard for record types.
4611
a40ff0ae
JJ
46122017-07-27 Jakub Jelinek <jakub@redhat.com>
4613
4614 PR c/45784
4615 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4616 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4617 new COMPOUND_EXPRs around the rhs of the comparison.
4618
06bd22f6
MP
46192017-07-27 Marek Polacek <polacek@redhat.com>
4620
4621 PR c/81417
4622 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4623 the types.
4624
036ea399
JJ
46252017-07-27 Jakub Jelinek <jakub@redhat.com>
4626
4627 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4628 (handle_noipa_attribute): New function.
4629
417ca011
TD
46302017-07-07 Torsten Duwe <duwe@suse.de>
4631
4632 * c-attribs.c (c_common_attribute_table): Add entry for
4633 "patchable_function_entry".
4634
5aaa8fb4
NS
46352017-07-20 Nathan Sidwell <nathan@acm.org>
4636
4637 Remove TYPE_METHODS.
4638 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4639 dump_ada_template, print_ada_methods,
4640 print_ada_declaration): Member fns are on TYPE_FIELDS.
4641
ff22eb12
NS
46422017-07-18 Nathan Sidwell <nathan@acm.org>
4643
4644 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4645
eea77d1f
DM
46462017-07-14 David Malcolm <dmalcolm@redhat.com>
4647
4648 * c-common.c (try_to_locate_new_include_insertion_point): New
4649 function.
4650 (per_file_includes_t): New typedef.
4651 (added_includes_t): New typedef.
4652 (added_includes): New variable.
4653 (maybe_add_include_fixit): New function.
4654 * c-common.h (maybe_add_include_fixit): New decl.
4655
281ac396
MS
46562017-07-10 Martin Sebor <msebor@redhat.com>
4657
4658 PR other/81345
4659 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4660
b6f43128
DM
46612017-07-06 David Malcolm <dmalcolm@redhat.com>
4662
4663 * c-common.c (selftest::c_family_tests): New.
4664 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4665 (selftest::c_family_tests): New decl.
4666
efbf55b0
MP
46672017-07-04 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/81231
4670 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4671 types.
4672
6c86bd88
MP
46732017-07-04 Marek Polacek <polacek@redhat.com>
4674
4675 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4676
17a7218b
ML
46772017-06-28 Martin Liska <mliska@suse.cz>
4678
4679 PR ipa/81128
4680 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4681 to a function declaration.
4682
63010089
ML
46832017-06-28 Martin Liska <mliska@suse.cz>
4684
4685 PR driver/79659
4686 * c.opt: Add IntegerRange to various options.
4687
3e2becc4
MP
46882017-06-26 Marek Polacek <polacek@redhat.com>
4689
4690 PR c/80116
4691 * c-common.h (warn_for_multistatement_macros): Declare.
4692 * c-warn.c: Include "c-family/c-indentation.h".
4693 (warn_for_multistatement_macros): New function.
4694 * c.opt (Wmultistatement-macros): New option.
4695 * c-indentation.c (guard_tinfo_to_string): No longer static.
4696 Change the parameter type to "enum rid". Handle RID_SWITCH.
4697 * c-indentation.h (guard_tinfo_to_string): Declare.
4698
2db9b7cd
MG
46992017-06-23 Marc Glisse <marc.glisse@inria.fr>
4700
4701 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4702
c3684b7b
MS
47032017-06-15 Martin Sebor <msebor@redhat.com>
4704
4705 PR c++/80560
4706 * c.opt (-Wclass-memaccess): New option.
4707
e72c4afd
BK
47082017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4709
4710 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4711
8a516588
MP
47122017-06-13 Marek Polacek <polacek@redhat.com>
4713
4714 PR objc/80949
4715 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4716 branches is null.
4717
45b2222a
ML
47182017-06-13 Martin Liska <mliska@suse.cz>
4719
4720 PR sanitize/78204
4721 * c-attribs.c (add_no_sanitize_value): New function.
4722 (handle_no_sanitize_attribute): Likewise.
4723 (handle_no_sanitize_address_attribute): Use the function.
4724 (handle_no_sanitize_thread_attribute): New function.
4725 (handle_no_address_safety_analysis_attribute): Use
4726 add_no_sanitize_value.
4727 (handle_no_sanitize_undefined_attribute): Likewise.
4728 * c-common.h: Declare new functions.
4729 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4730 (ubsan_instrument_shift): Likewise.
4731 (ubsan_instrument_bounds): Likewise.
4732 (ubsan_maybe_instrument_array_ref): Likewise.
4733 (ubsan_maybe_instrument_reference_or_call): Likewise.
4734
a01f151f
JM
47352017-06-11 Jason Merrill <jason@redhat.com>
4736
4737 * c-ada-spec.c, c-pragma.c: Use id_equal.
4738
3de4ac6d
MP
47392017-06-04 Marek Polacek <polacek@redhat.com>
4740
4741 PR c/80919
4742 * c-format.c (matching_type_p): Return false if any of the types
4743 requires structural equality.
4744
2474f48f
MS
47452017-06-02 Martin Sebor <msebor@redhat.com>
4746
4747 PR c/80892
4748 * c-warn.c (conversion_warning): Use -Wconversion for integer
4749 conversion and -Wfloat-conversion for floating one.
4750
40ffd95f
BE
47512017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4752
4753 * c.opt (Wsizeof-pointer-div): New warning option.
4754
3fa4634c
VR
47552017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4756
4757 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4758 (Wcatch-value=1): Enable by -Wall.
4759
f012c8ef
DM
47602017-05-30 David Malcolm <dmalcolm@redhat.com>
4761
4762 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4763 format_chars.
4764 * c.opt (fdiagnostics-show-template-tree): New option.
4765 (felide-type): New option.
4766
63dbcd13
VR
47672017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4768
4769 * c.opt (Wcatch-value=): New C++ warning flag.
4770
be136b5c
NS
47712017-05-24 Nathan Sidwell <nathan@acm.org>
4772
4773 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4774 const casts to avoid warning.
4775
3cd211af
MS
47762017-05-24 Martin Sebor <msebor@redhat.com>
4777
4778 PR c/80731
4779 * c-common.h (unsafe_conversion_p): Add a function argument.
4780 * c-common.c (unsafe_conversion_p): Same.
4781 Add type names and values to diagnostics.
4782 (scalar_to_vector): Adjust.
4783 * c-warn.c (constant_expression_error): Add a function argument.
4784 Add type names and values to diagnostics.
4785 (conversion_warning): Add a function argument.
4786 Add type names and values to diagnostics.
4787 (warnings_for_convert_and_check): Same.
4788
1ff7be5a
JM
47892017-05-19 Jason Merrill <jason@redhat.com>
4790
4791 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4792 enumerators.
4793
ff502317
BE
47942017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4795
4796 * c-format.c (locus): Move out of function scope,
4797 add GTY attribute.
4798
2a8a8d7b
NS
47992017-05-19 Nathan Sidwell <nathan@acm.org>
4800
4801 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4802 (c_common_parse_file): Remove class dump handling.
4803 (get_dump_info): Likewise.
4804
39aac208
RB
48052017-05-19 Richard Biener <rguenther@suse.de>
4806
4807 PR c++/80593
4808 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4809 to alias-set zero memory.
4810
6ecd2339
BE
48112017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4812
4813 * c-format.c (local_tree_type_node): Add GTY attribute.
4814
6574d78e
MP
48152017-05-18 Marek Polacek <polacek@redhat.com>
4816
4817 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4818 (c_common_fixed_point_type_for_size): Likewise.
4819 (c_common_type_for_mode): Likewise.
4820 (shorten_compare): Likewise.
4821 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4822 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4823
e3455240
MP
48242017-05-18 Marek Polacek <polacek@redhat.com>
4825
4826 * c-common.c (self_promoting_args_p): Change the return type to bool.
4827 Use false/true instead of 0/1.
4828 * c-common.h (self_promoting_args_p): Update.
4829
3fa8871b
MP
48302017-05-17 Marek Polacek <polacek@redhat.com>
4831
4832 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4833 * c-warn.c: Likewise.
4834
b42cc3ca
VV
48352017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4836
4837 Implement new C++ intrinsics __is_assignable and __is_constructible.
4838 * c-common.c (__is_assignable, __is_constructible): New.
4839 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4840
1a817418
ML
48412017-05-17 Martin Liska <mliska@suse.cz>
4842
4843 * c-common.h: Introduce dump_flags_t type and
4844 use it instead of int type.
4845 * c-gimplify.c (c_genericize): Likewise.
4846 * c-opts.c: Likewise.
4847
b2fa0a8b
MP
48482017-05-17 Marek Polacek <polacek@redhat.com>
4849
4850 * c-common.c (c_save_expr): Remove.
4851 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4852 * c-common.h (c_save_expr): Remove declaration.
4853
31c2d57d
VR
48542017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4855
4856 PR c/35441
4857 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4858 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4859 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4860 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4861 RDIV_EXPR.
4862 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4863
684f84de
MP
48642017-05-09 Marek Polacek <polacek@redhat.com>
4865
4866 PR c/80525
4867 * c-warn.c (unwrap_c_maybe_const): New.
4868 (warn_logical_operator): Call it.
4869
641da50a
NS
48702017-05-09 Nathan Sidwell <nathan@acm.org>
4871
4872 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4873 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4874
631238ac
MS
48752017-05-08 Martin Sebor <msebor@redhat.com>
4876
4877 PR translation/80280
4878 * c-format.h (struct format_flag_spec): Add new member.
4879 (T89_T): New macro.
4880 * c-format.c (local_tree_type_node): New global.
4881 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4882 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4883 (strfmon_flag_specs): Likewise.
4884 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4885 with distinct quoting properties.
4886 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4887 (flag_chars_t::validate): Add argument and handle bad quoting.
4888 (check_format_info_main): Handle quoting problems.
4889 (init_dynamic_diag_info): Simplify.
4890
49f0c04c
JM
48912017-05-08 Jason Merrill <jason@redhat.com>
4892
4893 * c-opts.c (c_common_post_options): Update defaults for
4894 flag_abi_version and flag_abi_compat_version.
4895
56d35585
DM
48962017-05-05 David Malcolm <dmalcolm@redhat.com>
4897
4898 * c-common.c (c_cpp_error): Replace report_diagnostic
4899 with diagnostic_report_diagnostic.
4900
0f2c4a8f
MS
49012017-05-04 Martin Sebor <msebor@redhat.com>
4902
4903 PR translation/80280
4904 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4905 (handle_weakref_attribute): Same.
4906
6fe63fb4
NS
49072017-05-03 Nathan Sidwell <nathan@acm.org>
4908
4909 Canonicalize canonical type hashing
4910 * c-common.c (complete_array_type): Use type_hash_canon.
4911
815d9cc6
XR
49122017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4913
92a285c1 4914 PR c++/80038
815d9cc6
XR
4915 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4916 prototype.
4917 (cilk_install_body_pedigree_operations): Likewise.
4918 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4919 detatched.
4920 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4921 (cilk_install_body_pedigree_operations): Likewise.
4922 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4923 unwrapping.
4924
f8a36447
JJ
49252017-04-27 Jakub Jelinek <jakub@redhat.com>
4926
4927 PR c++/80534
4928 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4929 flag on non-aggregate element types.
4930
7c145456
BE
49312017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4932
4933 * c-common.c (c_type_hasher, type_hash_table): Remove.
4934 (c_common_get_alias_set): Remove unreachable code.
4935 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4936
c3cbcd45
VR
49372017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4938
4939 * c.opt (Wextra-semi): New C++ warning flag.
4940
8a59d466
JJ
49412017-04-20 Jakub Jelinek <jakub@redhat.com>
4942
4943 PR middle-end/80423
4944 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4945
8487c9a5
JJ
49462017-04-18 Jakub Jelinek <jakub@redhat.com>
4947
4948 PR middle-end/79788
4949 PR middle-end/80375
4950 * c-common.c (c_common_type_for_mode): Don't handle
4951 widest_*_literal_type_node here.
4952 c_common_signed_or_unsigned_type): Likewise.
4953 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4954 to *intTI_type_node or *intDI_type_node depending on whether
4955 TImode is supported by the target or not.
4956
3ee0fb02
ML
49572017-04-10 Martin Liska <mliska@suse.cz>
4958
4959 PR sanitizer/80350
4960 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4961 doing an UBSAN check.
4962
5764ee3c
JW
49632017-04-03 Jonathan Wakely <jwakely@redhat.com>
4964
4965 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4966
6f3af356
JJ
49672017-03-31 Jakub Jelinek <jakub@redhat.com>
4968
4969 PR c++/79572
4970 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4971 tree *.
4972 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4973 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4974 REFERENCE_TYPE.
4975
f6a7a9d5
DM
49762017-03-31 David Malcolm <dmalcolm@redhat.com>
4977
4978 PR documentation/78732
4979 * c.opt (Wendif-labels): Fix description to refer to
4980 #else rather than #elif.
4981
af88f557
JJ
49822017-03-31 Jakub Jelinek <jakub@redhat.com>
4983
4984 PR libstdc++/80251
4985 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4986 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4987
a9e4a1a5
JJ
49882017-03-27 Jakub Jelinek <jakub@redhat.com>
4989
4990 PR middle-end/80162
4991 * c-common.c (c_common_mark_addressable_vec): Don't set
4992 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4993
3f01b620
MS
49942017-03-21 Martin Sebor <msebor@redhat.com>
4995
4996 PR c++/79548
4997 * c-common.c (set_underlying_type): Mark type used only when
4998 original del is declared unused.
4999
2f6f187a
DM
50002017-03-10 David Malcolm <dmalcolm@redhat.com>
5001
5002 PR translation/79848
5003 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5004 "%qs".
5005
a02fa805
DM
50062017-03-10 David Malcolm <dmalcolm@redhat.com>
5007
5008 PR c/79921
5009 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5010 from inform's message, so that xgettext can locate it.
5011
822a132c
MP
50122017-03-09 Marek Polacek <polacek@redhat.com>
5013
5014 PR c++/79962
5015 PR c++/79984
5016 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5017 conversion to the attribute list.
5018
bba81f1c
ML
50192017-03-09 Martin Liska <mliska@suse.cz>
5020
5021 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5022
108154ff
JM
50232017-03-03 Jason Merrill <jason@redhat.com>
5024
5025 * c.opt (Wnoexcept-type): New.
5026
eb0e7c34
RB
50272017-03-02 Richard Biener <rguenther@suse.de>
5028
5029 PR c/79756
5030 * c-common.c (c_common_mark_addressable_vec): Look through
5031 C_MAYBE_CONST_EXPR.
5032
9453ba0a
ML
50332017-02-28 Martin Liska <mliska@suse.cz>
5034
5035 * c.opt: Replace space with tabular for options of <number>
5036 type.
5037
6a825afe
ML
50382017-02-28 Martin Liska <mliska@suse.cz>
5039
5040 * c.opt: Fix --help=option -Q for options which are of
5041 an enum type.
5042
4227c9ad
JJ
50432017-02-24 Jakub Jelinek <jakub@redhat.com>
5044
5045 PR c++/79588
5046 * c-common.c (check_function_restrict): New function.
5047 (check_function_arguments): Add FNDECL argument. Call
5048 check_function_restrict if -Wrestrict.
5049 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5050 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5051 * c-common.h (check_function_arguments): Add FNDECL argument.
5052 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5053
59909673
EB
50542017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5055
5056 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5057 treatment of parameters with pointer-to-tagged type and tidy up.
5058 (print_ada_methods): Remove the special treatment of C++ static member
5059 functions.
5060
54dcd526
ML
50612017-02-22 Martin Liska <mliska@suse.cz>
5062
5063 * c.opt: Replace inequality signs with square brackets
5064 for -Wnornalized.
5065
00bc9de3
JJ
50662017-02-21 Jakub Jelinek <jakub@redhat.com>
5067
5068 PR c++/79641
5069 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5070 preserve quals.
5071
97fcf744
JM
50722017-02-17 Joseph Myers <joseph@codesourcery.com>
5073
5074 * c-cppbuiltin.c (builtin_define_float_constants): Define
5075 __DECIMAL_DIG__ to the value for long double.
5076
c7545f1c
MP
50772017-02-15 Marek Polacek <polacek@redhat.com>
5078
5079 PR c/79515
5080 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5081 conversion has occured.
5082
c2e84327
DM
50832017-01-24 David Malcolm <dmalcolm@redhat.com>
5084
5085 * c-common.c (c_common_reswords): Add "__RTL".
5086 * c-common.h (enum rid): Add RID_RTL.
5087
2ebd93e1
MP
50882017-01-20 Marek Polacek <polacek@redhat.com>
5089
5090 PR c/64279
5091 * c-common.h (do_warn_duplicated_branches_r): Declare.
5092 * c-gimplify.c (c_genericize): Walk the function tree calling
5093 do_warn_duplicated_branches_r.
5094 * c-warn.c (expr_from_macro_expansion_r): New.
5095 (do_warn_duplicated_branches): New.
5096 (do_warn_duplicated_branches_r): New.
5097 * c.opt (Wduplicated-branches): New option.
5098
0d80ab91
DM
50992017-01-17 David Malcolm <dmalcolm@redhat.com>
5100
5101 PR c++/71497
5102 * c-indentation.c (warn_for_misleading_indentation): Use the past
5103 subjunctive in the note.
5104
7f991c36
AH
51052017-01-17 Aldy Hernandez <aldyh@redhat.com>
5106
5107 PR c/79116
5108 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5109 start type to integer_type.
5110
1c70261c
JJ
51112017-01-16 Jakub Jelinek <jakub@redhat.com>
5112
5113 PR driver/49726
5114 * c.opt (gen-decls): Add Driver flag.
5115
1ddca3f3
PC
51162017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5117
5118 Revert:
5119 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5120
5121 PR c++/71737
5122 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5123
7d2f3f1d
PC
51242017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5125
5126 PR c++/71737
5127 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5128
bce6f760
MS
51292017-01-12 Martin Sebor <msebor@redhat.com>
5130
5131 (-Wformat-overflow): ...to this.
5132
bf5fbf46
MS
51332017-01-11 Martin Sebor <msebor@redhat.com>
5134
5135 PR c/78768
5136 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5137 Also enable for LTO.
5138
e363df3f
JM
51392017-01-10 Jason Merrill <jason@redhat.com>
5140
5141 Implement P0195R2, C++17 variadic using.
5142 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5143
bd2c6270
JJ
51442017-01-09 Jakub Jelinek <jakub@redhat.com>
5145
5146 PR translation/79019
5147 PR translation/79020
5148 * c.opt (Wnormalized=): Fix typo in description.
5149
efcc8d38
MS
51502017-01-08 Martin Sebor <msebor@redhat.com>
5151
5152 PR middle-end/77708
5153 * c.opt (-Wformat-truncation): New option.
5154
ab20d992 51552017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5156
5157 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5158 value to unsigned short to fit in 4 hex digits without
5159 warnings.
5160
4e89adf9
EB
51612017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5162
5163 * c.opt (fsso-struct): Add 'native' value.
5164
cd445b54
ML
51652017-01-05 Martin Liska <mliska@suse.cz>
5166
5167 PR pch/78970
5168 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5169 header.
5170
a9342885
MP
51712017-01-04 Marek Polacek <polacek@redhat.com>
5172
5173 PR c++/64767
5174 * c.opt (Wpointer-compare): New option.
5175
fc73e60c
JJ
51762017-01-04 Jakub Jelinek <jakub@redhat.com>
5177
5178 PR driver/78957
5179 * c.opt (fsso-struct=): Add RejectNegative.
5180
cbe34bb5
JJ
51812017-01-01 Jakub Jelinek <jakub@redhat.com>
5182
5183 Update copyright years.
5184
d4a6c0ea
ML
51852016-12-29 Martin Liska <mliska@suse.cz>
5186
5187 PR c/78933
5188 * c.opt (strong-eval-order): Add RejectNegative keyword.
5189
67a5ad7c
JM
51902016-12-22 Jason Merrill <jason@redhat.com>
5191
5192 Implement P0522R0, matching of template template arguments.
5193 * c-cppbuiltin.c (c_cpp_builtins): Define
5194 __cpp_template_template_args.
5195
0dba7960
JJ
51962016-12-21 Jakub Jelinek <jakub@redhat.com>
5197
5198 PR bootstrap/78817
5199 * c-common.c (struct nonnull_arg_ctx): New type.
5200 (check_function_nonnull): Return bool instead of void. Use
5201 nonnull_arg_ctx as context rather than just location_t.
5202 (check_nonnull_arg): Adjust for the new context type, set
5203 warned_p to true if a warning has been diagnosed.
5204 (check_function_arguments): Return bool instead of void.
5205 * c-common.h (check_function_arguments): Adjust prototype.
5206
31bfc9b9
JM
52072016-12-21 Jason Merrill <jason@redhat.com>
5208
5209 * c.opt (-fnew-ttp-matching): New flag.
5210 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5211
629b3d75
MJ
52122016-12-14 Martin Jambor <mjambor@suse.cz>
5213
5214 * c-omp.c: Include omp-general.h instead of omp-low.h.
5215 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5216 name.
5217
474da67e
MS
52182016-12-14 Martin Sebor <msebor@redhat.com>
5219
5220 PR c/17308
5221 * c-common.c (check_nonnull_arg): Disable when optimization
5222 is enabled.
5223
fe366b87
MP
52242016-12-12 Marek Polacek <polacek@redhat.com>
5225
5226 PR c++/78647
5227 * c-common.c (attribute_fallthrough_p): Return false for
5228 error_mark_node.
5229
8bd9f164
MS
52302016-12-08 Martin Sebor <msebor@redhat.com>
5231
5232 PR c/78284
5233 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5234
060162e0
MS
52352016-12-08 Martin Sebor <msebor@redhat.com>
5236
5237 PR c/78165
92a285c1
ML
5238 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5239 suffix.
060162e0 5240
ee92e7ba
MS
52412016-12-07 Martin Sebor <msebor@redhat.com>
5242
5243 PR c/53562
5244 PR middle-end/77784
5245 PR middle-end/78149
5246 PR middle-end/78138
5247 * c.opt (-Wstringop-overflow): New option.
5248
84b0769e
MO
52492016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5250
5251 * c-attribs.c (asan odr indicator): New attribute.
5252 (handle_asan_odr_indicator_attribute): New function.
5253
7fa6a965
PK
52542016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5255
5256 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5257 ptrdiff_type_node;
5258
56d8ffc1
JG
52592016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5260
5261 * c-common.c (excess_precision_mode_join): New.
5262 (c_ts18661_flt_eval_method): New.
5263 (c_c11_flt_eval_method): Likewise.
5264 (c_flt_eval_method): Likewise.
5265 * c-common.h (excess_precision_mode_join): New.
5266 (c_flt_eval_method): Likewise.
5267 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5268 (cpp_iec_559_value): Call it.
5269 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5270 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5271 __FLT_EVAL_METHOD_TS_18661_3__.
5272
04f0fcf7
JG
52732016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5274
5275 * c-opts.c (c_common_post_options): Add logic to handle the default
5276 case for -fpermitted-flt-eval-methods.
5277
fb2675cb
PB
52782016-11-23 Paolo Bonzini <bonzini@gnu.org>
5279
5280 * c.opt (Wexpansion-to-defined): New.
5281
ec1c5694
JJ
52822016-11-23 Jakub Jelinek <jakub@redhat.com>
5283
5284 PR target/78451
5285 * c-pragma.c (handle_pragma_target): Don't replace
5286 current_target_pragma, but chainon the new args to the current one.
5287
730c9e75
NS
52882016-11-22 Nathan Sidwell <nathan@acm.org>
5289
5290 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5291 indentation and formatting.
730c9e75 5292
89990732
MS
52932016-11-21 Martin Sebor <msebor@redhat.com>
5294
5295 * c.opt (-fprintf-return-value): Enable by default.
5296
48330c93
BE
52972016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5298
5299 PR c++/71973
5300 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5301 * c-common.c (c_common_nodes_and_builtins): Initialize
5302 const_tm_ptr_type_node.
5303
0d939c95
MP
53042016-11-16 Marek Polacek <polacek@redhat.com>
5305
5306 PR c/78285
5307 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5308
8e745a17
JJ
53092016-11-14 Jakub Jelinek <jakub@redhat.com>
5310
5311 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5312
1ee62b92 53132016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5314 Richard Biener <rguenther@suse.de>
5315
5316 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5317 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5318 * c.opt (fgimple): New option.
1ee62b92 5319
22b15758
UB
53202016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5321
5322 PR c/35503
5323 * c-common.h (warn_for_restrict): Declare.
5324 * c-warn.c: Include gcc-rich-location.h.
5325 (warn_for_restrict): New function.
5326 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5327 (gcc_cdiag_char_table): Likewise.
5328 (gcc_cxxdiag_char_table): Likewise.
5329 * c.opt (Wrestrict): New option.
5330
4be719cd
EB
53312016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5332
5333 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5334 for nested types only if the type is a record or union and dump SLOC.
5335
4a826ca6
JM
53362016-11-09 Jason Merrill <jason@redhat.com>
5337
5338 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5339
2e955d50
JJ
53402016-11-09 Jakub Jelinek <jakub@redhat.com>
5341
5342 * c-ubsan.c (ubsan_instrument_shift): Handle split
5343 -fsanitize=shift-base and -fsanitize=shift-exponent.
5344
51dc6603
JM
53452016-11-07 Jason Merrill <jason@redhat.com>
5346
5347 * c.opt (Wc++1z-compat): New.
5348 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5349
6dc4a604
ML
53502016-11-07 Martin Liska <mliska@suse.cz>
5351
5352 * c-warn.c (warn_for_unused_label): Save all labels used
5353 in goto or in &label.
5354
b302001e
JM
53552016-11-03 Jason Merrill <jason@redhat.com>
5356
5357 * c-cppbuiltin.c (c_cpp_builtins): Correct
5358 __cpp_inheriting_constructors.
5359
31f7f784
JM
53602016-11-01 Jason Merrill <jason@redhat.com>
5361
2bc78e3c
JM
5362 * c-cppbuiltin.c (c_cpp_builtins): Update
5363 __cpp_inheriting_constructors.
5364
31f7f784
JM
5365 * c.opt (-fnew-inheriting-ctors): New.
5366 * c-opts.c: Default to on for ABI 11+.
5367
dcb466ec
JJ
53682016-10-31 Jakub Jelinek <jakub@redhat.com>
5369
5370 PR c++/77948
5371 * c.opt (fext-numeric-literals): Add Var and Init.
5372 * c-opts.c (c_common_handle_option): Don't clear
5373 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5374 (c_common_post_options): Clear it here if not set
5375 explicitly.
5376
52e1b91e
AH
53772016-10-28 Aldy Hernandez <aldyh@redhat.com>
5378
5379 PR debug/77773
5380 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5381 if NULL.
5382
e16f1cc7
JJ
53832016-10-25 Jakub Jelinek <jakub@redhat.com>
5384
5385 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5386 * c-common.c (c_common_reswords): Add __builtin_launder.
5387
f8348061
BE
53882016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5389
5390 * c-common.c (c_common_truthvalue_conversion): Warn for
5391 multiplications in boolean context. Fix the quoting of '<<' and '<'
5392 in the shift warning.
5393
eff89e01
BE
53942016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5395
5396 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5397
24bc7bf4
JM
53982016-10-20 Jason Merrill <jason@redhat.com>
5399
5400 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5401
4c712374
BE
54022016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5403
5404 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5405 integer shift ops in boolean context.
5406
54072016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5408
5409 * c.opt (Walloca): New.
5410 (Walloca-larger-than=): New.
5411 (Wvla-larger-than=): New.
5412
8fa18c06
MP
54132016-10-17 Marek Polacek <polacek@redhat.com>
5414
5415 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5416 Return immediately when finding a match.
5417 (warn_tautological_cmp): Remove a boolean variable that is no longer
5418 needed.
5419
b12b1915
MP
54202016-10-17 Marek Polacek <polacek@redhat.com>
5421
5422 * c-attribs.c: New file.
5423 * c-common.c: Move attributes handling to c-attribs.c.
5424 (get_nonnull_operand): No longer static.
5425 * c-common.h: Move the declarations from c-attribs.c to its own section.
5426
2045acd9
JM
54272016-10-14 Jason Merrill <jason@redhat.com>
5428
5429 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5430 and __cpp_deduction_guides.
5431
14a2c9aa
JM
54322016-10-13 Jason Merrill <jason@redhat.com>
5433
5434 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5435
4d0cdd0c
TP
54362016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5437
5438 * c-cppbuiltin.c: Include memmodel.h.
5439 * c-opts.c: Likewise.
5440 * c-pragma.c: Likewise.
5441 * c-warn.c: Likewise.
5442
70f6d5e1
JJ
54432016-10-12 Jakub Jelinek <jakub@redhat.com>
5444
5445 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5446 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5447 * c-opts.c (sanitize_cpp_opts): Initialize
5448 cpp_opts->cpp_warn_implicit_fallthrough.
5449
78f61294
MP
54502016-10-11 Marek Polacek <polacek@redhat.com>
5451
5452 * c-common.c (warning_candidate_p): Change the return type to bool
5453 and return true/false instead of 1/0.
5454 (vector_mode_valid_p): Likewise.
5455
038b5cc0
MP
54562016-10-11 Marek Polacek <polacek@redhat.com>
5457
5458 * c-common.c (fold_for_warn): No longer static.
5459 (bool_promoted_to_int_p): Likewise.
5460 (c_common_get_narrower): Likewise.
5461 (constant_expression_warning): Move to c-warn.c.
5462 (constant_expression_error): Likewise.
5463 (overflow_warning): Likewise.
5464 (warn_logical_operator): Likewise.
5465 (find_array_ref_with_const_idx_r): Likewise.
5466 (warn_tautological_cmp): Likewise.
5467 (expr_has_boolean_operands_p): Likewise.
5468 (warn_logical_not_parentheses): Likewise.
5469 (warn_if_unused_value): Likewise.
5470 (strict_aliasing_warning): Likewise.
5471 (sizeof_pointer_memaccess_warning): Likewise.
5472 (check_main_parameter_types): Likewise.
5473 (conversion_warning): Likewise.
5474 (warnings_for_convert_and_check): Likewise.
5475 (match_case_to_enum_1): Likewise.
5476 (match_case_to_enum): Likewise.
5477 (c_do_switch_warnings): Likewise.
5478 (warn_for_omitted_condop): Likewise.
5479 (readonly_error): Likewise.
5480 (lvalue_error): Likewise.
5481 (invalid_indirection_error): Likewise.
5482 (warn_array_subscript_with_type_char): Likewise.
5483 (warn_about_parentheses): Likewise.
5484 (warn_for_unused_label): Likewise.
5485 (warn_for_div_by_zero): Likewise.
5486 (warn_for_memset): Likewise.
5487 (warn_for_sign_compare): Likewise.
5488 (do_warn_double_promotion): Likewise.
5489 (do_warn_unused_parameter): Likewise.
5490 (record_locally_defined_typedef): Likewise.
5491 (maybe_record_typedef_use): Likewise.
5492 (maybe_warn_unused_local_typedefs): Likewise.
5493 (maybe_warn_bool_compare): Likewise.
5494 (maybe_warn_shift_overflow): Likewise.
5495 (warn_duplicated_cond_add_or_warn): Likewise.
5496 (diagnose_mismatched_attributes): Likewise.
5497 * c-common.h: Move the declarations from c-warn.c to its own section.
5498 * c-warn.c: New file.
5499
627be19f
JM
55002016-10-08 Jason Merrill <jason@redhat.com>
5501
5502 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5503 into COND_EXPR in C++.
5504
7bad794a
JJ
55052016-10-08 Jakub Jelinek <jakub@redhat.com>
5506
5507 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5508 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5509 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5510
be845b04
JJ
55112016-10-07 Jakub Jelinek <jakub@redhat.com>
5512
5513 Implement LWG2296 helper intrinsic
5514 * c-common.h (enum rid): Add RID_ADDRESSOF.
5515 * c-common.c (c_common_reswords): Add __builtin_addressof.
5516
c09c4992
BE
55172016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5518
5519 PR c++/77700
5520 * c-common.c (c_common_truthvalue_conversion): Warn also for
5521 suspicious enum values in boolean context.
5522
342cfb3e
JJ
55232016-10-06 Jakub Jelinek <jakub@redhat.com>
5524
5525 Implement P0258R2 - helper for C++17
5526 std::has_unique_object_representations trait
5527 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5528 * c-common.c (c_common_reswords): Add
5529 __has_unique_object_representations.
5530
2e69f143
JJ
55312016-10-05 Jakub Jelinek <jakub@redhat.com>
5532
5533 PR sanitizer/66343
5534 * c-ubsan.c (ubsan_instrument_return): Don't call
5535 initialize_sanitizer_builtins here.
5536
700fff34
BE
55372016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5538
5539 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5540 conditional expression in boolean context when only one arm is
5541 non-boolean.
5542
9563bfcd
JJ
55432016-10-05 Jakub Jelinek <jakub@redhat.com>
5544
04a32443
JJ
5545 PR sanitizer/77823
5546 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5547 is not integral.
5548
9563bfcd
JJ
5549 * c-common.c (c_common_reswords): Update comment for C++11.
5550
f1644724
JM
55512016-10-04 Jason Merrill <jason@redhat.com>
5552
5553 * c-common.c (make_tree_vector_from_ctor): New.
5554 * c-common.h: Declare it.
5555
5a79befb
JJ
55562016-10-04 Jakub Jelinek <jakub@redhat.com>
5557
5558 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5559 __LIBGCC_JCR_SECTION_NAME__.
5560
1633d3b9
BE
55612016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5562
5563 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5564 left shift in boolean context.
5565
a2c6e7f2
JJ
55662016-09-29 Jakub Jelinek <jakub@redhat.com>
5567
5568 Implement P0001R1 - C++17 removal of register storage class specifier
5569 * c.opt (Wregister): New warning.
5570 * c-opts.c (c_common_post_options): Enable -Wregister by
5571 default for C++17.
5572
75304c87
JG
55732016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5574
5575 * c-opts.c (c_common_post_options): Remove special case for
5576 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5577 in C++.
5578
bbfac6da
JJ
55792016-09-27 Jakub Jelinek <jakub@redhat.com>
5580
6e39060a
JJ
5581 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5582 -std=c++1z.
5583
bbfac6da
JJ
5584 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5585
e73cf9a2
TP
55862016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5587
5588 * c-common.c: Include memmodel.h.
5589
c6147dc4
MP
55902016-09-26 Marek Polacek <polacek@redhat.com>
5591
5592 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5593
81fea426
MP
55942016-09-26 Marek Polacek <polacek@redhat.com>
5595
5596 PR c/7652
5597 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5598 (handle_fallthrough_attribute): New function.
5599 (attribute_fallthrough_p): New function.
5600 * c-common.h (attribute_fallthrough_p): Declare.
5601
9a2300e9
MP
56022016-09-24 Marek Polacek <polacek@redhat.com>
5603
5604 PR c/77490
5605 * c.opt (Wbool-operation): New.
5606
a09e9e35
BE
56072016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5608
5609 * c-common.c (c_common_truthvalue_conversion): Inhibit
5610 Wint-in-bool-context warning with from_macro_definition_at.
5611 Mention the expression will always evaluate to true.
5612
d43b4ccc
MS
56132016-09-21 Martin Sebor <msebor@redhat.com>
5614
5615 PR bootstrap/77676
5616 * c.opt (fprintf-return-value): Temporarily initialize to zero
5617 to unblock bootstrap failures.
5618
2e1c20b1
JJ
56192016-09-21 Jakub Jelinek <jakub@redhat.com>
5620
5621 PR c++/77651
5622 * c.opt (Waligned-new=): Add RejectNegative.
5623 (faligned-new=): Likewise. Spelling fix - change
5624 aligned_new_threshhold to aligned_new_threshold.
5625 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5626 to aligned_new_threshold.
5627
88d0c3f0
MS
56282016-09-20 Martin Sebor <msebor@redhat.com>
5629
5630 PR middle-end/49905
5631 * c.opt: Add -Wformat-length and -fprintf-return-value.
5632
144a96e4
BE
56332016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5634
5635 PR c++/77434
5636 * c.opt (Wint-in-bool-context): New warning.
5637 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5638 constants in boolean context.
5639
63012d9a
JM
56402016-09-19 Joseph Myers <joseph@codesourcery.com>
5641
5642 * c-common.c (max_align_t_align): Also consider alignment of
5643 float128_type_node.
5644
931388ce
JM
56452016-09-15 Jason Merrill <jason@redhat.com>
5646
5647 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5648 DECL_EXTERNAL.
5649
38711381
JM
56502016-09-14 Jason Merrill <jason@redhat.com>
5651
5652 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5653 limit FIELD_DECL, either.
5654
e51fbec3
MP
56552016-09-14 Marek Polacek <polacek@redhat.com>
5656
5657 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5658 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5659 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5660
254830ba
DM
56612016-09-13 David Malcolm <dmalcolm@redhat.com>
5662
5663 * c-common.c (warn_logical_not_parentheses): Replace
5664 rich_location::add_fixit_insert calls with add_fixit_insert_before
5665 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5666
42763690
JM
56672016-09-13 Jason Merrill <jason@redhat.com>
5668 Tom de Vries <tom@codesourcery.com>
5669
5670 PR c++/77427
5671 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5672
9453eee9
JM
56732016-09-13 Jason Merrill <jason@redhat.com>
5674
5675 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5676 limit types at all.
5677
e96809e3
JM
56782016-09-12 Jason Merrill <jason@redhat.com>
5679
5680 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5681 bit/byte confusion, allow large alignment for types.
5682
54dcdb88
BE
56832016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5684
5685 PR c++/77496
5686 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5687
d1463eb9
DM
56882016-09-12 David Malcolm <dmalcolm@redhat.com>
5689
5690 PR c/72858
5691 * c-format.c (argument_parser::check_argument_type): Add params
5692 "type_start" and "conversion_char". Use the former to generate
5693 offset_to_type_start and pass it and conversion_char to
5694 check_format_types.
5695 (check_format_info_main): Capture the start of the type
5696 information as "type_start", and pass it an format_char
5697 to arg_parser.check_argument_type.
5698 (check_format_types): Provide an example in the leading comment.
5699 Add params "offset_to_type_start" and "conversion_char"; pass
5700 them to format_type_warning calls.
5701 (test_get_modifier_for_format_len): Likewise.
5702 (matching_type_p): New function.
5703 (get_format_for_type): Add param "conversion_char" and move
5704 implementation into...
5705 (get_format_for_type_1): ...new function, called twice.
5706 Use new function matching_type_p rather than checking for
5707 TYPE_CANONICAL equality.
5708 (get_corrected_substring): New function.
5709 (format_type_warning): Provide an example in the leading comment.
5710 Add params "offset_to_type_start" and "conversion_char". Replace
5711 call to get_format_for_type with call to get_corrected_substring
5712 and move rejection of hints for widths/precisions there.
5713 (assert_format_for_type_streq): Add param "conversion_char".
5714 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5715 (test_get_format_for_type_printf): Add conversion chars to the
5716 tests, adding coverage for various combinations of integer
5717 vs double conversions, and for preserving octal and hexadecimal
5718 conversions.
5719 (test_get_format_for_type_scanf): Add conversion chars to the
5720 tests.
5721
5b28efbb
TV
57222016-09-10 Tom de Vries <tom@codesourcery.com>
5723
5724 PR C/71602
5725 * c-common.c (build_va_arg): Handle more strict
5726 targetm.canonical_va_list_type. Replace first argument type error with
5727 assert.
5728
3f0177e7
MS
57292016-09-09 Martin Sebor <msebor@redhat.com>
5730
5731 PR c/77520
5732 PR c/77521
5733 * c-format.c (argument_parser::find_format_char_info): Use %qc
5734 format directive unconditionally.
5735
af63ba4b
JM
57362016-09-09 Jason Merrill <jason@redhat.com>
5737
5738 Implement C++17 new of over-aligned types.
5739 * c.opt: Add -faligned-new and -Waligned-new.
5740 * c-common.c (max_align_t_align): Split out from...
5741 (cxx_fundamental_alignment_p): ...here.
5742 * c-common.h: Declare it.
5743 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5744
c65248cb
JM
57452016-09-09 Joseph Myers <joseph@codesourcery.com>
5746
5747 * c-cppbuiltin.c (builtin_define_type_width): New function.
5748 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5749 macros.
5750
e5106e27
DM
57512016-09-07 David Malcolm <dmalcolm@redhat.com>
5752
5753 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5754 a POINTER_TYPE.
5755 (substring_loc::get_location): Move to substring-locations.c,
5756 keeping implementation as...
5757 (c_get_substring_location): New function, from the above, reworked
5758 to use accessors rather than member lookup.
5759 * c-common.h (class substring_loc): Move to substring-locations.h,
5760 replacing with a forward decl.
5761 (c_get_substring_location): New decl.
5762 * c-format.c: Include "substring-locations.h".
5763 (format_warning_va): Move to substring-locations.c.
5764 (format_warning_at_substring): Likewise.
5765
ab20d992 57662016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5767
5768 PR c/77336
5769 * c-format.c (check_function_format): Avoid issuing warnings for
5770 functions unless they call format functions with non-constant
5771 format strings.
5772
b772a565
RB
57732016-09-06 Richard Biener <rguenther@suse.de>
5774
5775 PR c/77450
5776 * c-common.c (c_common_mark_addressable_vec): Handle
5777 COMPOUND_LITERAL_EXPR.
5778
25ff5dd3
MP
57792016-09-05 Marek Polacek <polacek@redhat.com>
5780
5781 PR c/77423
5782 * c-common.c (bool_promoted_to_int_p): New function.
5783 (expr_has_boolean_operands_p): New function.
5784 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5785 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5786
21234eb5
TV
57872016-09-04 Tom de Vries <tom@codesourcery.com>
5788
5789 revert:
5790 2016-08-29 Tom de Vries <tom@codesourcery.com>
5791
5792 * c-common.c (build_va_arg): Replace first argument type error
5793 with assert.
5794
9dc5773f
JJ
57952016-09-02 Jakub Jelinek <jakub@redhat.com>
5796
5797 PR c/65467
5798 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5799 (c_finish_omp_for): Reject _Atomic qualified iterators.
5800
58012016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5802
5803 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5804 size to guarantee it fits the output of the formatted function
5805 regardless of its arguments.
5806
295844f6
MP
58072016-09-01 Marek Polacek <polacek@redhat.com>
5808
5809 PR c/7652
5810 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5811 FALLTHRU comments.
5812
3d06b6f2
MP
58132016-08-29 Marek Polacek <polacek@redhat.com>
5814
5815 PR c/77292
5816 * c-common.c (warn_logical_not_parentheses): Don't warn for
5817 a comparison or a logical operator.
5818
34cedad5
TV
58192016-08-29 Tom de Vries <tom@codesourcery.com>
5820
5821 * c-common.c (build_va_arg): Fix type comparison assert.
5822
f162d717
TV
58232016-08-29 Tom de Vries <tom@codesourcery.com>
5824
5825 * c-common.c (build_va_arg): Replace first argument type error
5826 with assert.
5827
ba9bbd6f
TV
58282016-08-29 Tom de Vries <tom@codesourcery.com>
5829
5830 PR c/77398
5831 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5832 with error_mark_node as va_list instead of with illegal va_list.
5833
ebef225f
MP
58342016-08-25 Marek Polacek <polacek@redhat.com>
5835 David Malcolm <dmalcolm@redhat.com>
5836
5837 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5838 * c-common.h (warn_logical_not_parentheses): Update declaration.
5839
b00e6e75
MP
58402016-08-22 Marek Polacek <polacek@redhat.com>
5841
5842 PR c++/77321
5843 * c-common.c (warn_for_memset): Check type for null.
5844
6dc198e3
JM
58452016-08-22 Joseph Myers <joseph@codesourcery.com>
5846
14ec014e 5847 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5848 _FloatNx types for suffixes for built-in functions.
5849
c65699ef
JM
58502016-08-19 Joseph Myers <joseph@codesourcery.com>
5851
5852 PR c/32187
5853 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5854 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5855 (RID_FLOAT128X): New enum rid values.
5856 (CASE_RID_FLOATN_NX): New macro.
5857 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5858 keywords.
5859 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5860 corresponding complex types.
5861 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5862 _FloatNx and corresponding complex types.
5863 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5864 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5865 and _FloatNx types for the widest type for determining
5866 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5867 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5868 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5869 and _FloatNx types.
5870 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5871 constants.
5872 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5873 _FloatNx types.
5874
cc015f3a
DM
58752016-08-18 David Malcolm <dmalcolm@redhat.com>
5876
5877 * c-opts.c (c_diagnostic_finalizer): Update for change to
5878 diagnostic_show_locus.
5879
cb18fd07
DM
58802016-08-18 David Malcolm <dmalcolm@redhat.com>
5881
5882 * c-common.c: Include "spellcheck.h".
5883 (cb_get_suggestion): New function.
5884 * c-common.h (cb_get_suggestion): New decl.
5885 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5886 cb_get_suggestion.
5887
a76989dc
MP
58882016-08-18 Marek Polacek <polacek@redhat.com>
5889
5890 PR c/71514
5891 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5892 and pointer-to-VLA.
5893
65e736c0
DM
58942016-08-16 David Malcolm <dmalcolm@redhat.com>
5895
5896 PR c/72857
5897 * c-common.c (substring_loc::get_range): Rename to...
5898 (substring_loc::get_location): ...this, converting param from a
5899 source_range * to a location_t *. Call
5900 get_source_location_for_substring rather than
5901 get_source_range_for_substring, and pass in m_caret_idx.
5902 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5903 (substring_loc::get_range): Replace with...
5904 (substring_loc::get_location): ...this.
5905 (substring_loc::set_caret_index): New method.
5906 (substring_loc): Add field m_caret_idx.
5907 * c-format.c (format_warning_va): Update for above changes.
5908 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5909 clashing with type name.
5910 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5911 (check_argument_type): Likewise.
5912 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5913 Use a copy when emitting warnings, setting the caret index from TYPE.
5914
7e1dde14 59152016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5916 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5917
5918 * c-ada-spec.c (dump_number): New function.
5919 (handle_escape_character): Likewise.
5920 (print_ada_macros): Add handling of constant integers and strings.
5921
191816a3
MP
59222016-08-12 Marek Polacek <polacek@redhat.com>
5923
5924 PR c/7652
5925 * c-common.c (scalar_to_vector): Adjust fall through comment.
5926 * c-opts.c (c_common_handle_option): Likewise.
5927 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5928 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5929 fall through comment.
5930 * cilk.c (extract_free_variables): Add FALLTHRU.
5931
452df4a4
JM
59322016-08-10 Jason Merrill <jason@redhat.com>
5933
5934 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5935
f3365c12
JM
59362016-08-09 Jason Merrill <jason@redhat.com>
5937
5938 * c-common.c (c_common_attribute_table): vector_size affects type
5939 identity.
5940
f0bc3323
MP
59412016-08-09 Marek Polacek <polacek@redhat.com>
5942
5943 PR c/7652
5944 * c-ada-spec.c (dump_generic_ada_node): Add return.
5945
98e5a19a
JM
59462016-08-09 Jason Merrill <jason@redhat.com>
5947
5948 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5949 C++17 constexpr lambdas.
5950
895aa8e1
DM
59512016-08-08 David Malcolm <dmalcolm@redhat.com>
5952
5953 PR c/64955
5954 * c-common.h (selftest::c_format_c_tests): New declaration.
5955 (selftest::run_c_tests): New declaration.
5956 * c-format.c: Include "selftest.h.
5957 (format_warning_va): Add param "corrected_substring" and use
5958 it to add a replacement fix-it hint.
5959 (format_warning_at_substring): Likewise.
5960 (format_warning_at_char): Update for new param of
5961 format_warning_va.
5962 (argument_parser::check_argument_type): Pass "fki" to
5963 check_format_types.
5964 (check_format_types): Add param "fki" and pass it to
5965 format_type_warning.
5966 (deref_n_times): New function.
5967 (get_modifier_for_format_len): New function.
5968 (selftest::test_get_modifier_for_format_len): New function.
5969 (get_format_for_type): New function.
5970 (format_type_warning): Add param "fki" and use it to attempt
5971 to provide hints for argument types when calling
5972 format_warning_at_substring.
5973 (selftest::get_info): New function.
5974 (selftest::assert_format_for_type_streq): New function.
5975 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5976 (selftest::test_get_format_for_type_printf): New function.
5977 (selftest::test_get_format_for_type_scanf): New function.
5978 (selftest::c_format_c_tests): New function.
5979
e52ed3fe
DM
59802016-08-08 David Malcolm <dmalcolm@redhat.com>
5981
5982 PR c/52952
5983 * c-format.c: Include "diagnostic.h".
5984 (location_column_from_byte_offset): Delete.
5985 (location_from_offset): Delete.
5986 (format_warning_va): New function.
5987 (format_warning_at_substring): New function.
5988 (format_warning_at_char): New function.
5989 (check_format_arg): Capture location of format_tree and pass to
5990 check_format_info_main.
5991 (argument_parser): Add fields "start_of_this_format" and
5992 "format_string_cst".
5993 (flag_chars_t::validate): Add param "format_string_cst". Convert
5994 warning_at call using location_from_offset to call to
5995 format_warning_at_char.
5996 (argument_parser::argument_parser): Add param "format_string_cst_"
5997 and use use it to initialize field "format_string_cst".
5998 Initialize new field "start_of_this_format".
5999 (argument_parser::read_format_flags): Convert warning_at call
6000 using location_from_offset to a call to format_warning_at_char.
6001 (argument_parser::read_any_format_left_precision): Likewise.
6002 (argument_parser::read_any_format_precision): Likewise.
6003 (argument_parser::read_any_other_modifier): Likewise.
6004 (argument_parser::find_format_char_info): Likewise, in three places.
6005 (argument_parser::parse_any_scan_set): Likewise, in one place.
6006 (argument_parser::handle_conversions): Likewise, in two places.
6007 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6008 and use it to make a substring_loc. Pass the latter to
6009 check_format_types.
6010 (check_format_info_main): Add params "fmt_param_loc" and
6011 "format_string_cst". Convert warning_at calls using
6012 location_from_offset to calls to format_warning_at_char. Pass the
6013 new params to the arg_parser ctor. Pass "format_string_cst" to
6014 flag_chars.validate. Pass "fmt_param_loc" to
6015 arg_parser.check_argument_type.
6016 (check_format_types): Convert first param from a location_t
6017 to a const substring_loc & and rename to "fmt_loc". Attempt
6018 to extract the range of the relevant parameter and pass it
6019 to format_type_warning.
6020 (format_type_warning): Convert first param from a location_t
6021 to a const substring_loc & and rename to "fmt_loc". Add
6022 params "param_range" and "type". Replace calls to warning_at
6023 with calls to format_warning_at_substring.
6024
1c4d457e
DM
60252016-08-08 David Malcolm <dmalcolm@redhat.com>
6026
6027 * c-format.c (class flag_chars_t): New class.
6028 (struct length_modifier): New struct.
6029 (class argument_parser): New class.
6030 (flag_chars_t::flag_chars_t): New ctor.
6031 (flag_chars_t::has_char_p): New method.
6032 (flag_chars_t::add_char): New method.
6033 (flag_chars_t::validate): New method.
6034 (flag_chars_t::get_alloc_flag): New method.
6035 (flag_chars_t::assignment_suppression_p): New method.
6036 (argument_parser::argument_parser): New ctor.
6037 (argument_parser::read_any_dollar): New method.
6038 (argument_parser::read_format_flags): New method.
6039 (argument_parser::read_any_format_width): New method.
6040 (argument_parser::read_any_format_left_precision): New method.
6041 (argument_parser::read_any_format_precision): New method.
6042 (argument_parser::handle_alloc_chars): New method.
6043 (argument_parser::read_any_length_modifier): New method.
6044 (argument_parser::read_any_other_modifier): New method.
6045 (argument_parser::find_format_char_info): New method.
6046 (argument_parser::validate_flag_pairs): New method.
6047 (argument_parser::give_y2k_warnings): New method.
6048 (argument_parser::parse_any_scan_set): New method.
6049 (argument_parser::handle_conversions): New method.
6050 (argument_parser::check_argument_type): New method.
6051 (check_format_info_main): Introduce classes argument_parser
6052 and flag_chars_t, moving the code within the loop into methods
6053 of these classes. Make various locals "const".
6054
88fa5555
DM
60552016-08-05 David Malcolm <dmalcolm@redhat.com>
6056
6057 * c-common.c: Include "substring-locations.h".
6058 (get_cpp_ttype_from_string_type): New function.
6059 (g_string_concat_db): New global.
6060 (substring_loc::get_range): New method.
6061 * c-common.h (g_string_concat_db): New declaration.
6062 (class substring_loc): New class.
6063 * c-lex.c (lex_string): When concatenating strings, capture the
6064 locations of all tokens using a new obstack, and record the
6065 concatenation locations within g_string_concat_db.
6066 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6067 on the ggc-heap.
6068
78169471
MP
60692016-07-29 Marek Polacek <polacek@redhat.com>
6070
638fc14f
MP
6071 PR c/71926
6072 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6073 parentheses warning.
6074
78169471
MP
6075 PR c/71574
6076 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6077
1225d6b1
ML
60782016-07-28 Martin Liska <mliska@suse.cz>
6079
6080 PR gcov-profile/68025
6081 * c-common.c (handle_no_profile_instrument_function_attribute):
6082
ec1e2a40
BE
60832016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6084
6085 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6086 BITS_PER_UNIT_LOG.
6087
5ec2cd9f
JM
60882016-07-25 Jason Merrill <jason@redhat.com>
6089
6090 PR c++/65970
6091 * c.opt (fconstexpr-loop-limit): New.
6092
9dc5773f 60932016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6094
6095 PR c++/71675
6096 * c-common.c (resolve_overloaded_builtin): Avoid converting
6097 __atomic_compare_exchange_n return type to that of what its
6098 first argument points to.
6099
e3fe09c1
UB
61002016-07-22 Uros Bizjak <ubizjak@gmail.com>
6101
6102 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6103 ~(unsigned HOST_WIDE_INT) 0.
6104
bc91c436
ML
61052016-07-22 Martin Liska <mliska@suse.cz>
6106
6107 PR gcov-profile/69028
6108 PR gcov-profile/62047
6109 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6110 to the current_function_decl.
6111
451dcc66
JM
61122016-07-21 Jason Merrill <jason@redhat.com>
6113
6114 PR c++/65168
6115 * c-common.c (c_common_truthvalue_conversion): Check
6116 c_inhibit_evaluation_warnings for warning about address of
6117 reference.
6118
de6a69ee
DM
61192016-07-20 David Malcolm <dmalcolm@redhat.com>
6120
6121 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6122 const char *.
6123
d022c55a
JM
61242016-07-15 Jason Merrill <jason@redhat.com>
6125
6126 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6127
ddbbcb19
JJ
61282016-07-15 Jakub Jelinek <jakub@redhat.com>
6129
6130 PR c/71858
6131 * c-common.h (enum lookup_name_fuzzy_kind): Add
6132 FUZZY_LOOKUP_FUNCTION_NAME.
6133
d0cf395a
JM
61342016-07-08 Jason Merrill <jason@redhat.com>
6135
6136 P0145: Refining Expression Order for C++.
6137 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6138 * c-opts.c: Adjust.
6139
98d44e93
MT
61402016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6141
6142 PR c++/71214
6143 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6144
f9d8d994
TS
61452016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6146
6147 * c-pragma.h (enum pragma_kind): Rename
6148 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6149 users.
6150
4aa83879
RB
61512016-06-29 Richard Biener <rguenther@suse.de>
6152
6153 PR middle-end/71002
6154 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6155
a25bd9e6
JM
61562016-06-24 Jason Merrill <jason@redhat.com>
6157
6158 P0145R2: Refining Expression Order for C++.
6159 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6160 MODIFY_EXPR.
6161
a86451b9
JJ
61622016-06-24 Jakub Jelinek <jakub@redhat.com>
6163
6164 * c-common.c (check_builtin_function_arguments): Require last
6165 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6166 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6167 if the last argument is pointer to enumerated or boolean type.
6168
1a4f11c8
DM
61692016-06-22 David Malcolm <dmalcolm@redhat.com>
6170
6171 PR c/70339
6172 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6173 (lookup_name_fuzzy): New prototype.
6174
fe55692c
JDA
61752016-06-21 John David Anglin <danglin@gcc.gnu.org>
6176
6177 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6178
4eb24e01
JM
61792016-06-14 Jason Merrill <jason@redhat.com>
6180
6181 P0145R2: Refining Expression Order for C++.
6182 * c.opt (fargs-in-order): New.
6183 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6184
ef7cf206
JJ
61852016-06-13 Jakub Jelinek <jakub@redhat.com>
6186
0dda258b
JJ
6187 PR sanitizer/71498
6188 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6189 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6190
ef7cf206
JJ
6191 PR preprocessor/71183
6192 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6193 to cb_get_source_date_epoch.
6194
50b15873
JJ
61952016-06-10 Jakub Jelinek <jakub@redhat.com>
6196
6197 PR c/68657
6198 * c.opt (Wpsabi): Add Warning flag.
6199
4d926e34
MS
62002016-06-10 Martin Sebor <msebor@redhat.com>
6201
6202 PR c/71392
14ec014e 6203 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6204 the nonnull attribute in type-generic builtins.
6205
e01b4e16
MS
62062016-06-09 Martin Sebor <msebor@redhat.com>
6207
6208 PR c/70883
6209 * c-common.c (builtin_function_validate_nargs): Make text of error
6210 message consistent with others like it.
6211
44a845ca
MS
62122016-06-08 Martin Sebor <msebor@redhat.com>
6213 Jakub Jelinek <jakub@redhat.com>
6214
6215 PR c++/70507
6216 PR c/68120
6217 * c-common.c (check_builtin_function_arguments): Handle
6218 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6219
a80a7051
RB
62202016-06-08 Richard Biener <rguenther@suse.de>
6221
6222 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6223
bfd67b47
RB
62242016-06-07 Richard Biener <rguenther@suse.de>
6225
6226 PR c/61564
6227 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6228 options and warn about others.
6229
15c98b2e
ES
62302016-06-01 Eduard Sanou <dhole@openmailbox.org>
6231
6232 * c-common.c (get_source_date_epoch): Rename to
6233 cb_get_source_date_epoch.
6234 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6235 message when the parsing fails. Use error_at instead of fatal_error.
6236 * c-common.h (get_source_date_epoch): Rename to
6237 cb_get_source_date_epoch.
6238 * c-common.h (cb_get_source_date_epoch): Prototype.
6239 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6240 * c-common.h (c_omp_region_type): Remove trailing comma.
6241 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6242 * c-lex.c (c_lex_with_flags): Remove initialization of
6243 pfile->source_date_epoch.
6244
00631022
JJ
62452016-05-30 Jakub Jelinek <jakub@redhat.com>
6246
6247 PR c++/71349
6248 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6249 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6250 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6251 instead of C_OMP_CLAUSE_SPLIT_FOR.
6252
f17a223d
RB
62532016-05-24 Richard Biener <rguenther@suse.de>
6254
6255 PR middle-end/70434
6256 PR c/69504
6257 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6258 (convert_vector_to_array_for_subscript): ... this.
6259 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6260 VIEW_CONVERT_EXPR to an array type. Rename to ...
6261 (convert_vector_to_array_for_subscript): ... this.
6262
4f2e1536
MP
62632016-05-12 Marek Polacek <polacek@redhat.com>
6264
6265 PR c/70756
6266 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6267 size_in_bytes and pass LOC to it.
6268
d6e83a8d
MM
62692016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6270
6271 PR c/43651
6272 * c.opt (Wduplicate-decl-specifier): New option.
6273
5c3a10fb
MP
62742016-05-11 Marek Polacek <polacek@redhat.com>
6275
6276 PR c++/71024
6277 * c-common.c (diagnose_mismatched_attributes): New function.
6278 * c-common.h (diagnose_mismatched_attributes): Declare.
6279
deef7113
MP
62802016-05-04 Marek Polacek <polacek@redhat.com>
6281
6282 * c.opt (Wdangling-else): New option.
6283
79ce98bc
MP
62842016-05-03 Marek Polacek <polacek@redhat.com>
6285
6286 PR c/70859
6287 * c-common.c (builtin_function_validate_nargs): Add location
6288 parameter. Use it.
6289 (check_builtin_function_arguments): Add location and arguments
6290 parameters. Use them.
6291 * c-common.h (check_builtin_function_arguments): Update declaration.
6292
381cdae4
RB
62932016-05-03 Richard Biener <rguenther@suse.de>
6294
6295 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6296 allow call args to gimplify to SSA names.
6297
1d793c34
MP
62982016-05-03 Marek Polacek <polacek@redhat.com>
6299
6300 * c-common.h (enum c_omp_region_type): Remove stray comma.
6301
77886428
CP
63022016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6303
6304 * c-common.h (enum c_omp_region_type): Define.
6305
697e0b28
RS
63062016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6307
6308 * c-common.c (shorten_compare): Use wi::to_wide.
6309
e7ff0319
CP
63102016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6311
6312 PR middle-end/70626
6313 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6314 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6315 reduction clauses in acc parallel loops.
6316
2fff3db8
MP
63172016-04-29 Marek Polacek <polacek@redhat.com>
6318
6319 PR c/70852
6320 * c-common.c (warn_for_memset): Check domain before accessing it.
6321
509063eb
DV
63222016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6323
6324 PR/69089
6325 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6326 "aligned" attribute.
6327
b632761d
JM
63282016-04-28 Jason Merrill <jason@redhat.com>
6329
6330 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6331
174f6622
ES
63322016-04-28 Eduard Sanou <dhole@openmailbox.org>
6333 Matthias Klose <doko@debian.org>
6334
6335 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6336 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6337 handling.
6338 * c-common.h (get_source_date_epoch): Prototype.
6339 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6340
6bc2bb18
RB
63412015-04-27 Ryan Burn <contact@rnburn.com>
6342
6343 PR c++/69024
6344 PR c++/68997
6345 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6346 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6347 external linkage.
6348 (cilk_detect_and_unwrap): Corresponding changes.
6349 (extract_free_variables): Don't extract free variables from
6350 AGGR_INIT_EXPR slot.
6351 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6352 (cilk_recognize_spawn): Likewise.
6353
c1e1f433
BS
63542016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6355
6356 * c.opt (Wmemset-elt-size): New option.
6357 * c-common.c (warn_for_memset): New function.
6358 * c-common.h (warn_for_memset): Declare.
6359
d067e05f
JM
63602016-04-25 Jason Merrill <jason@redhat.com>
6361
6362 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6363 No longer static.
6364 * c-common.h: Declare it.
6365 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6366
9aa36ae5
JM
63672016-04-22 Jason Merrill <jason@redhat.com>
6368
6369 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6370
477d4906
IV
63712016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6372
6373 PR c++/69363
6374 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6375 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6376
fe37c7af
MM
63772016-04-18 Michael Matz <matz@suse.de>
6378
6379 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6380 and SET_DECL_ALIGN.
6381
23f2660f
EB
63822016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6383
6384 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6385 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6386 to incomplete types.
6387 (dump_nested_type): Remove redundant tests and tidy up.
6388 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6389 a type which is the typedef of an original type.
6390
1e77281b
MP
63912016-04-15 Marek Polacek <polacek@redhat.com>
6392
6393 PR c/70651
6394 * c-common.c (build_va_arg): Change two asserts into errors and return
6395 error_mark_node.
6396
b3a77f21
MP
63972016-04-13 Marek Polacek <polacek@redhat.com>
6398
6399 PR c++/70639
6400 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6401 for switch statements, too.
6402
322b8466
JM
64032016-03-28 Jason Merrill <jason@redhat.com>
6404
6405 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6406
fbdb6baf
MP
64072016-03-23 Marek Polacek <polacek@redhat.com>
6408
6409 PR c++/69884
6410 * c.opt (Wignored-attributes): New option.
6411
5c240f4d
DM
64122016-03-22 David Malcolm <dmalcolm@redhat.com>
6413
6414 PR c/69993
6415 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6416 diagnostic text, reversing the order of the warning and note so
6417 that they appear in source order.
6418
14ba7b28
MP
64192016-03-17 Marek Polacek <polacek@redhat.com>
6420
6421 PR c/69407
6422 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6423 operations.
6424
08a1cadc
JM
64252016-03-14 Jason Merrill <jason@redhat.com>
6426
2aaeea19
JM
6427 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6428
08a1cadc
JM
6429 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6430
c06d25bb
RB
64312016-03-09 Richard Biener <rguenther@suse.de>
6432
6433 PR c/70143
6434 * c-common.c (strict_aliasing_warning): Add back
6435 alias_sets_conflict_p check.
6436
80aac5c8
JM
64372016-03-08 Jason Merrill <jason@redhat.com>
6438
6439 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6440
64b23c13
DM
64412016-03-04 David Malcolm <dmalcolm@redhat.com>
6442
6443 PR c/68187
6444 * c-indentation.c (get_visual_column): Move code to determine next
6445 tab stop to...
6446 (next_tab_stop): ...this new function.
6447 (line_contains_hash_if): Delete function.
6448 (detect_preprocessor_logic): Delete function.
6449 (get_first_nws_vis_column): New function.
6450 (detect_intervening_unindent): New function.
6451 (should_warn_for_misleading_indentation): Replace call to
6452 detect_preprocessor_logic with a call to
6453 detect_intervening_unindent.
6454
729526f5
DM
64552016-03-04 David Malcolm <dmalcolm@redhat.com>
6456
6457 PR c/68187
6458 * c-indentation.c (should_warn_for_misleading_indentation): When
6459 suppressing warnings about cases where the guard and body are on
6460 the same column, only use the first non-whitespace column in place
6461 of the guard token column when dealing with "else" clauses.
6462 When rejecting aligned BODY and NEXT, loosen the requirement
6463 from equality with the first non-whitespace of guard to simply
6464 that they not be indented relative to it.
6465
e9a35493
RB
64662016-03-04 Richard Biener <rguenther@suse.de>
6467
6468 PR c++/70054
6469 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6470 instead of alias_sets_conflict_p.
6471
1be56bc5
MP
64722016-03-01 Marek Polacek <polacek@redhat.com>
6473
6474 PR c++/69795
6475 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6476 any DECL.
6477
35886f0b
MS
64782016-02-22 Martin Sebor <msebor@redhat.com>
6479
6480 PR middle-end/69780
6481 * c-common.c (check_builtin_function_arguments): Validate and
6482 reject invalid arguments to __builtin_alloca_with_align.
6483
4246c8da
MW
64842016-02-20 Mark Wielaard <mjw@redhat.com>
6485
6486 PR c/28901
6487 * c.opt (Wunused-const-variable): Turn into Alias for...
6488 (Wunused-const-variable=): New option.
6489
268be88c
BE
64902016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6491
6492 PR c++/69865
6493 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6494 here...
6495 (c_common_init_options): ...to here.
6496 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6497
871b3f47
JJ
64982016-02-19 Jakub Jelinek <jakub@redhat.com>
6499
6500 PR c++/69826
6501 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6502 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6503 flag_preprocess_only.
6504
bf14eba2
JJ
65052016-02-16 Jakub Jelinek <jakub@redhat.com>
6506
6507 PR c/69835
6508 * c.opt (Wnonnull-compare): Enable for -Wall.
6509
ba6b3795
JJ
65102016-02-15 Jakub Jelinek <jakub@redhat.com>
6511
6512 PR c++/69797
6513 * c-common.c (sync_resolve_size): Diagnose too few arguments
6514 even when params is non-NULL empty vector.
6515
a011cd92
BS
65162016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6517
6518 PR target/60410
6519 * c.opt (fshort-double): Remove.
6520
46cb9332
MS
65212016-02-05 Martin Sebor <msebor@redhat.com>
6522
6523 PR c++/69662
6524 * c.opt (Warning options): Update -Wplacement-new to take
6525 an optional argument.
6526
e1b81f2b
JJ
65272016-02-01 Jakub Jelinek <jakub@redhat.com>
6528
6529 PR preprocessor/69543
6530 PR c/69558
6531 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6532 instead of loc to control_warning_option.
6533
b6adbb9f
NS
65342016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6535
6536 * c.opt (fopenacc-dim=): New option.
6537
5d70666e
RB
65382016-01-27 Ryan Burn <contact@rnburn.com>
6539
6540 PR cilkplus/69267
6541 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6542 gimplify_arg. Removed superfluous post_p argument.
6543 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6544 superfluous post_p argument.
6545 * c-gimplify.c (c_gimplify_expr): Likewise.
6546
01e1dea3
DM
65472016-01-26 David Malcolm <dmalcolm@redhat.com>
6548
6549 PR other/69006
6550 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6551 pp_newline_and_flush with pp_flush.
6552
9f04a53e
MS
65532016-01-20 Martin Sebor <msebor@redhat.com>
6554
6555 PR c/69405
6556 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6557 an incompatible argument when the argument isn't a valid tree node.
6558
7f26f7df
JM
65592016-01-18 Jason Merrill <jason@redhat.com>
6560
6561 PR c++/68767
6562 * c-common.c (check_function_arguments_recurse): Fold the whole
6563 COND_EXPR, not just the condition.
6564
f62bf092
TV
65652016-01-18 Tom de Vries <tom@codesourcery.com>
6566
6567 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6568 classify as loop clause.
6569
e0a575ff
JJ
65702016-01-15 Jakub Jelinek <jakub@redhat.com>
6571
6572 PR bootstrap/68271
6573 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6574 C++ FE no longer has limit on number of pragmas.
6575
65762015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6577
6578 PR c++/69048
6579 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6580 to add missing cleanup point.
b6e3db06 6581
c7df95d8
DM
65822016-01-14 David Malcolm <dmalcolm@redhat.com>
6583
6584 PR c++/68819
6585 * c-indentation.c (get_visual_column): Add location_t param.
6586 Handle the column number being zero by effectively disabling the
6587 warning, with an "inform".
6588 (should_warn_for_misleading_indentation): Add location_t argument
6589 for all uses of get_visual_column.
6590
21efdd80
PP
65912016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6592
6593 PR c++/69029
6594 * c-indentation.c (should_warn_for_misleading_indentation):
6595 Don't warn about do-while statements.
6596
7a127fa7
MS
65972016-01-07 Martin Sebor <msebor@redhat.com>
6598
6599 PR c/68966
6600 * c-common.c (sync_resolve_size): Reject first argument when it's
6601 a pointer to _Bool.
6602
c589e975
DM
66032016-01-05 David Malcolm <dmalcolm@redhat.com>
6604
6605 PR c/69122
6606 * c-indentation.c (get_visual_column): Remove default argument.
6607 (should_warn_for_misleading_indentation): For the multiline case,
6608 update call to get_visual_column for next_stmt_exploc so that it
6609 captures the location of the first non-whitespace character in the
6610 relevant line. Don't issue warnings if there is non-whitespace
6611 before the next statement.
6612
818ab71a
JJ
66132016-01-04 Jakub Jelinek <jakub@redhat.com>
6614
6615 Update copyright years.
6616
745e411d
DM
66172015-12-21 David Malcolm <dmalcolm@redhat.com>
6618
6619 * c-common.c (binary_op_error): Convert first param from
6620 location_t to rich_location * and use it when emitting an error.
6621 * c-common.h (binary_op_error): Convert first param from
6622 location_t to rich_location *.
6623
de67c4c3
DM
66242015-12-16 David Malcolm <dmalcolm@redhat.com>
6625
6626 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6627 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6628
4a38b02b
IV
66292015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6630
6631 * c-common.c (c_common_attribute_table): Handle "omp declare target
6632 link" attribute.
6633
54d62f51
JJ
66342015-12-14 Jakub Jelinek <jakub@redhat.com>
6635
6636 PR c/68833
6637 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6638
8d4227c8
TB
66392014-12-12 Tobias Burnus <burnus@net-b.de>
6640
6641 PR fortran/68815
6642 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6643 specifiers (%d, %i,%u and %c).
6644
f6069ccc
DM
66452015-12-10 David Malcolm <dmalcolm@redhat.com>
6646
6647 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6648
63bbf46d
JJ
66492015-12-08 Jakub Jelinek <jakub@redhat.com>
6650
6651 PR c/48088
6652 PR c/68657
6653 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6654 * c-pragma.c (handle_pragma_diagnostic): Adjust
6655 control_warning_option caller.
6656
f79520bb
DM
66572015-12-07 David Malcolm <dmalcolm@redhat.com>
6658
6659 * c-common.c (c_cpp_error): Update for change to
6660 rich_location::set_range.
6661
b3d5bc62
JJ
66622015-12-04 Paolo Bonzini <bonzini@gnu.org>
6663
6664 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6665 shifting 1 out of the sign bit.
6666
66672015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6668
6669 * c-common.c (c_common_attribute_table[]): Update max arguments
6670 count for "simd" attribute.
6671 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6672
6eb4a537
JJ
66732015-12-03 Jakub Jelinek <jakub@redhat.com>
6674
6675 PR preprocessor/57580
6676 * c-ppoutput.c (print): Change printed field to bool.
6677 Move src_file last for smaller padding.
6678 (init_pp_output): Set print.printed to false instead of 0.
6679 (scan_translation_unit): Fix up formatting. Set print.printed
6680 to true after printing something other than newline.
6681 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6682 (maybe_print_line_1): Set print.printed to false instead of 0.
6683 (print_line_1): Likewise.
6684 (do_line_change): Set print.printed to true instead of 1.
6685 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6686 dump_macro): Set print.printed to false after printing newline.
6687
4250754e
JM
66882015-12-02 Jason Merrill <jason@redhat.com>
6689
f479b43d
JM
6690 * c-common.c (fold_for_warn): New.
6691 (warn_logical_operator, warn_tautological_cmp)
6692 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6693
4250754e
JM
6694 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6695 (c_fully_fold_internal, decl_constant_value_for_optimization):
6696 Move to c/c-fold.c.
6697 * c-common.h: Don't declare decl_constant_value_for_optimization.
6698
e9e32ee6
JM
66992015-12-02 Joseph Myers <joseph@codesourcery.com>
6700
6701 PR c/68162
6702 * c-common.h (c_build_qualified_type): Add extra default
6703 arguments.
6704
37d5ad46
JB
67052015-12-01 Julian Brown <julian@codesourcery.com>
6706 Cesar Philippidis <cesar@codesourcery.com>
6707 James Norris <James_Norris@mentor.com>
6708
6709 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6710 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6711 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6712
f07862c7
EB
67132015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6714
6715 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6716 (decl_sloc_common): Delete and move bulk of processing to...
6717 (decl_sloc): ...here.
6718 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6719 (dump_ada_double_name): Remove S parameter and compute the suffix.
6720 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6721 element type and deal with an anonymous one.
6722 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6723 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6724 and remove reference to QUAL_UNION_TYPE.
6725 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6726 (dump_nested_type): ...here. New function extracted from above.
6727 Generate a full declaration for anonymous element type of arrays.
6728 (print_ada_declaration): Really skip anonymous declarations. Remove
6729 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6730 Clean up processing of declarations of array types and objects.
6731 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6732 Remove obsolete code and tidy up.
6733
75c8aac3
JH
67342015-11-29 Jan Hubicka <hubicka@ucw.cz>
6735
6736 PR c/67581
6737 * c-common.c (handle_transparent_union_attribute): Update
6738 also type variants.
6739
b58d3df2
ML
67402015-11-27 Martin Liska <mliska@suse.cz>
6741
6742 PR c++/68312
6743 * array-notation-common.c (cilkplus_extract_an_triplets):
6744 Release vector of vectors.
6745 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6746
89a01fcf
EB
67472015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6748
6749 PR c++/68527
6750 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6751 (print_ada_struct_decl): Likewise.
6752
cc5c5226
IZ
67532015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6754
6755 PR c++/68001
6756 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6757 * cilk.c (recognize_spawn): Determine location in a more precise
6758 way.
6759
269adb9d
JM
67602015-11-19 Jason Merrill <jason@redhat.com>
6761
6762 * c-common.c (shorten_compare): But look through macros from
6763 system headers.
6764
d0eccfcd
JM
67652015-11-18 Jason Merrill <jason@redhat.com>
6766
6767 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6768 non-constant operand comes from a macro.
6769
3e44547c
JM
67702015-11-17 Jason Merrill <jason@redhat.com>
6771
6772 PR bootstrap/68346
6773 * c-common.c (warn_tautological_cmp): Fold before checking for
6774 constants.
6775
0f62c7a0
MP
67762015-11-16 Marek Polacek <polacek@redhat.com>
6777
6778 PR c++/68362
6779 * c-common.c (check_case_bounds): Fold low and high cases.
6780
a868811e
MP
67812015-11-16 Marek Polacek <polacek@redhat.com>
6782
6783 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6784 * c-common.c (c_common_get_alias_set): Likewise.
6785 (handle_visibility_attribute): Likewise.
6786
fff77217
KY
67872015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6788
6789 * c-common.c (handle_simd_attribute): New.
6790 (struct attribute_spec): Add entry for "simd".
6791 (handle_simd_attribute): New.
6792
269e63b7
KT
67932015-11-13 Kai Tietz <ktietz70@googlemail.com>
6794
6795 * c-lex.c (interpret_float): Use fold_convert.
6796
ebedc9a3
DM
67972015-11-13 David Malcolm <dmalcolm@redhat.com>
6798
6799 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6800 and store it on the result.
6801 * c-opts.c (c_common_init_options): Set
6802 global_dc->colorize_source_p.
6803
6e232ba4
JN
68042015-11-12 James Norris <jnorris@codesourcery.com>
6805 Joseph Myers <joseph@codesourcery.com>
6806
7365279f 6807 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6808 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6809 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6810 PRAGMA_OACC_CLAUSE_LINK.
6811
e78bede6
MP
68122015-11-11 Marek Polacek <polacek@redhat.com>
6813
6814 PR c/68107
6815 PR c++/68266
6816 * c-common.c (valid_array_size_p): New function.
6817 * c-common.h (valid_array_size_p): Declare.
6818
3f8257db 68192015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6820
6821 PR bootstrap/68271
6822 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6823
69f293c9
AM
68242015-11-11 Andrew MacLeod <amacleod@redhat.com>
6825
6826 * array-notation-common.c: Remove unused header files.
6827 * c-ada-spec.c: Likewise.
6828 * c-cilkplus.c: Likewise.
6829 * c-common.c: Likewise.
6830 * c-cppbuiltin.c: Likewise.
6831 * c-dump.c: Likewise.
6832 * c-format.c: Likewise.
6833 * c-gimplify.c: Likewise.
6834 * c-indentation.c: Likewise.
6835 * c-lex.c: Likewise.
6836 * c-omp.c: Likewise.
6837 * c-opts.c: Likewise.
6838 * c-pch.c: Likewise.
6839 * c-ppoutput.c: Likewise.
6840 * c-pragma.c: Likewise.
6841 * c-pretty-print.c: Likewise.
6842 * c-semantics.c: Likewise.
6843 * c-ubsan.c: Likewise.
6844 * cilk.c: Likewise.
6845 * stub-objc.c: Likewise.
6846
3a40d81d
NS
68472015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6848 Cesar Philippidis <cesar@codesourcery.com>
6849 James Norris <jnorris@codesourcery.com>
6850 Julian Brown <julian@codesourcery.com>
6851 Nathan Sidwell <nathan@codesourcery.com>
6852
6853 * c-pragma.c (oacc_pragmas): Add "routine".
6854 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6855
ee45a32d
EB
68562015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6857
6858 * c-common.c (c_common_attributes): Add scalar_storage_order.
6859 (handle_scalar_storage_order_attribute): New function.
6860 * c-pragma.c (global_sso): New variable.
6861 (maybe_apply_pragma_scalar_storage_order): New function.
6862 (handle_pragma_scalar_storage_order): Likewise.
6863 (init_pragma): Register scalar_storage_order.
6864 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6865 * c.opt (Wscalar-storage-order): New warning.
6866 (fsso-struct=): New option.
6867
eb11eb15
MS
68682015-11-08 Martin Sebor <msebor@redhat.com>
6869
6870 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6871
0aad0198
RS
68722015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6873
6874 * c-common.c: Don't undef DEF_BUILTIN.
6875
8a645150
DM
68762015-11-06 David Malcolm <dmalcolm@redhat.com>
6877
6878 * c-common.c (c_cpp_error): Convert parameter from location_t to
6879 rich_location *. Eliminate the "column_override" parameter and
6880 the call to diagnostic_override_column.
6881 Update the "done_lexing" clause to set range 0
6882 on the rich_location, rather than overwriting a location_t.
6883 * c-common.h (c_cpp_error): Convert parameter from location_t to
6884 rich_location *. Eliminate the "column_override" parameter.
6885
7a5e4956
CP
68862015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6887 Thomas Schwinge <thomas@codesourcery.com>
6888 James Norris <jnorris@codesourcery.com>
6889
6890 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6891 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6892 clauses with parallel and kernels and loops.
6893 * c-pragma.h (enum pragma_omp_clause): Add entries for
6894 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6895 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6896 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6897 INDEPENDENT,SEQ}.
6898 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6899
e2f5cc96
MS
69002015-11-05 Martin Sebor <msebor@redhat.com>
6901
6902 PR c++/67942
6903 * c.opt (-Wplacement-new): New option.
6904
e01d41e5
JJ
69052015-11-05 Jakub Jelinek <jakub@redhat.com>
6906
6907 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6908 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6909 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6910 save_expr or create_tmp_var* if TEST is true.
6911 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6912 Don't call add_stmt here.
6913 (struct c_omp_check_loop_iv_data): New type.
6914 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6915 c_omp_check_loop_iv_exprs): New functions.
6916 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6917 distribute.
6918 (c_omp_declare_simd_clauses_to_numbers): Change
6919 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6920 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6921 from numbers to PARM_DECLs.
6922
595278be
MM
69232015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6924
6925 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6926 flag_checking.
6927
3f8257db 69282015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6929
6930 PR c++-common/67882
b3d5bc62
JJ
6931 * c-common.h (fold_offsetof_1): Add argument.
6932 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6933 offsetof expressions that reference elements past the end of
6934 an array.
6935
4bf9e5a8
TS
69362015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6937 Chung-Lin Tang <cltang@codesourcery.com>
6938
6939 * c-pragma.c (oacc_pragmas): Add "atomic".
6940 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6941
3b1661a9
ES
69422015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6943
6944 * c-common.c (handle_target_clones_attribute): New.
6945 (c_common_attribute_table): Add handle_target_clones_attribute.
6946 (handle_always_inline_attribute): Add check on target_clones attribute.
6947 (handle_target_attribute): Ditto.
6948
2adfab87
AM
69492015-10-29 Andrew MacLeod <amacleod@redhat.com>
6950
6951 * array-notation-common.c: Reorder #include's and remove duplicates.
6952 * c-ada-spec.c: Likewise.
6953 * c-cilkplus.c: Likewise.
6954 * c-common.c: Likewise.
6955 * c-cppbuiltin.c: Likewise.
6956 * c-dump.c: Likewise.
6957 * c-format.c: Likewise.
6958 * c-gimplify.c: Likewise.
6959 * c-indentation.c: Likewise.
6960 * c-lex.c: Likewise.
6961 * c-omp.c: Likewise.
6962 * c-opts.c: Likewise.
6963 * c-pch.c: Likewise.
6964 * c-ppoutput.c: Likewise.
6965 * c-pragma.c: Likewise.
6966 * c-pretty-print.c: Likewise.
6967 * c-semantics.c: Likewise.
6968 * c-ubsan.c: Likewise.
6969 * cilk.c: Likewise.
6970 * stub-objc.c: Likewise.
6971
d90ec4f2
JM
69722015-10-28 Jason Merrill <jason@redhat.com>
6973
6974 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6975
88bae6f4
TS
69762015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6977 James Norris <jnorris@codesourcery.com>
6978 Cesar Philippidis <cesar@codesourcery.com>
6979
6980 PR c/64765
6981 PR c/64880
6982 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6983 * c-omp.c (c_oacc_split_loop_clauses): New function.
6984
b1726d6c
MS
69852015-10-21 Martin Sebor <msebor@redhat.com>
6986
6987 PR driver/68043
6988 * c.opt: End each sentence that describes an option with a period.
6989
fa60eeb9
MP
69902015-10-20 Marek Polacek <polacek@redhat.com>
6991
6992 * array-notation-common.c (is_cilkplus_vector_p): Define.
6993 * c-common.h (is_cilkplus_vector_p): Declare.
6994
95979049
MP
69952015-10-20 Marek Polacek <polacek@redhat.com>
6996
6997 * c.opt (std=gnu++11): Do not describe as experimental.
6998 (std=gnu++14): Likewise.
6999
2a9fb712
JM
70002015-10-19 Jason Merrill <jason@redhat.com>
7001
7002 * c-cppbuiltin.c (c_cpp_builtins): Define
7003 __cpp_nontype_template_args.
7004
13b380a3
JM
70052015-10-19 Jason Merrill <jason@redhat.com>
7006
7007 * c-cppbuiltin.c (c_cpp_builtins): Define
7008 __cpp_enumerator_attributes, __cpp_fold_expressions,
7009 __cpp_unicode_characters.
7010
d9a6bd32
JJ
70112015-10-13 Jakub Jelinek <jakub@redhat.com>
7012 Aldy Hernandez <aldyh@redhat.com>
7013
7014 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7015 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7016 (c_define_builtins): Likewise.
7017 * c-common.h (enum c_omp_clause_split): Add
7018 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7019 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7020 (c_finish_omp_for): Add ORIG_DECLV argument.
7021 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7022 201511 instead of 201307.
7023 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7024 OMP_CRITICAL_CLAUSES to it.
7025 (c_finish_omp_ordered): Add CLAUSES argument, set
7026 OMP_ORDERED_CLAUSES to it.
7027 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7028 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7029 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7030 constructs and new OpenMP 4.5 clauses. Clear
7031 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7032 verification code.
7033 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7034 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7035 (enum pragma_omp_clause): Add
7036 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7037 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7038
624d31fe
RS
70392015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7040
7041 * c-lex.c (interpret_float): Use real_equal instead of
7042 REAL_VALUES_EQUAL.
7043
b8fd7909
JM
70442015-10-04 Jason Merrill <jason@redhat.com>
7045
7046 Implement N4514, C++ Extensions for Transactional Memory.
7047 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7048 (c_common_attribute_table): Add transaction_safe_dynamic.
7049 transaction_safe now affects type identity.
7050 (handle_tm_attribute): Handle transaction_safe_dynamic.
7051 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7052 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7053 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7054 (D_TRANSMEM): New.
7055 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7056 * c-pretty-print.c (pp_c_attributes_display): Don't print
7057 transaction_safe in C++.
7058
12651878
MP
70592015-10-02 Marek Polacek <polacek@redhat.com>
7060
7061 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7062
3e3b8d63
MP
70632015-10-02 Marek Polacek <polacek@redhat.com>
7064
7065 PR c/64249
7066 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7067 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7068 * c.opt (Wduplicated-cond): New option.
7069
0d1a8f75
JM
70702015-10-01 Joseph Myers <joseph@codesourcery.com>
7071
7072 * c.opt (std=c11): Do not describe as experimental.
7073 (std=gnu11): Likewise.
7074 (std=iso9899:2011): Likewise.
7075
3e32ee19
NS
70762015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7077
7078 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7079 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7080
974348ee
MP
70812015-09-25 Marek Polacek <polacek@redhat.com>
7082
7083 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7084 (ubsan_instrument_shift): Likewise.
7085
15dbc1a6
MP
70862015-09-25 Marek Polacek <polacek@redhat.com>
7087
7088 PR sanitizer/64906
7089 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7090
6b95d7cc
PP
70912015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7092
7093 * c-indentation.c (should_warn_for_misleading_indentation):
7094 Compare next_stmt_vis_column with guard_line_first_nws instead
7095 of with guard_line_vis_column.
7096
c1822f9c
MLI
70972015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7098
7099 PR c/49654
7100 PR c/49655
7101 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7102 options and options not valid for the current language.
7103
d5398058
PP
71042015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7105
7106 * c-indentation.c (should_warn_for_misleading_indentation):
7107 Float out and consolidate the calls to get_visual_column that
7108 are passed guard_exploc as an argument. Compare
7109 next_stmt_vis_column with guard_line_first_nws instead of with
7110 body_line_first_nws.
7111
6b333269
NS
71122015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7113
7114 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7115 Wnamespaces): New C++ warnings.
7116
a75f1574
JM
71172015-09-22 Jason Merrill <jason@redhat.com>
7118
7119 * c-common.h (abi_compat_version_crosses): New.
7120 (warn_abi_version): Declare.
7121 * c-common.c: Define it.
7122 * c-opts.c (c_common_post_options): Handle it.
7123 flag_abi_compat_version defaults to 8.
7124
bdaaa8b7
VV
71252015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7126
7127 Complete the implementation of N4230, Nested namespace definition.
7128 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7129 __cpp_nested_namespace_definitions.
7130
eaa797e8
MLI
71312015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7132
7133 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7134
c4914de6
MLI
71352015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7136
7137 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7138 when warning.
7139 * c-pragma.h (pragma_lex): Add optional loc argument.
7140
fcb87c50
MM
71412015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7142
7143 * c-format.c (check_format_arg): Adjust to use common block size in all
7144 object pools.
7145
31bdd08a
DM
71462015-09-15 David Malcolm <dmalcolm@redhat.com>
7147
7148 * c-format.c (location_from_offset): Update for change in
7149 signature of location_get_source_line.
7150 * c-indentation.c (get_visual_column): Likewise.
7151 (line_contains_hash_if): Likewise.
7152
aa9f4b4c
MP
71532015-09-14 Marek Polacek <polacek@redhat.com>
7154
7155 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7156 setting various warnings.
7157
aa256c4a
MP
71582015-09-14 Marek Polacek <polacek@redhat.com>
7159
7160 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7161 a negative value.
7162
0f876f22
MW
71632015-09-11 Mark Wielaard <mjw@redhat.com>
7164
7165 PR c/28901
7166 * c.opt (Wunused-variable): Option from common.opt.
7167 (Wunused-const-variable): New option.
7168
273aa49e
PC
71692015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7170
7171 PR c++/53184
7172 * c.opt ([Wsubobject-linkage]): Add.
7173
1807ffc1
MS
71742015-09-03 Martin Sebor <msebor@redhat.com>
7175
7176 PR c/66516
7177 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7178 functions.
7179 * c-common.c (reject_gcc_builtin): Define.
7180
38942840
BI
71812015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7182
7183 PR middle-end/60586
7184 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7185 prototype.
7186 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7187 cilk_gimplify_call_params_in_spawned_fn.
7188 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7189 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7190 unwrapping.
7191
c316b5e4
MP
71922015-08-25 Marek Polacek <polacek@redhat.com>
7193
7194 PR middle-end/67330
7195 * c-common.c (handle_weak_attribute): Don't check whether the
7196 visibility can be changed here.
7197
584a7c46
MLI
71982015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7199
7200 * c-lex.c (c_lex_with_flags): Use explicit locations.
7201
a79683d5
TS
72022015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7203
7204 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7205 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7206
61717a45
FXC
72072015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7208
7209 PR middle-end/36757
7210 * c-common.c (check_builtin_function_arguments): Add check
7211 for BUILT_IN_SIGNBIT argument.
7212
329524f5
PC
72132015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7214
7215 PR c++/67160
7216 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7217 in c++1z mode.
7218
4ee55665
MP
72192015-08-17 Marek Polacek <polacek@redhat.com>
7220
7221 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7222 with whitespaces before qualifier names.
7223
b893e375
MP
72242015-08-12 Marek Polacek <polacek@redhat.com>
7225
7226 PR c++/55095
7227 * c-common.c (maybe_warn_shift_overflow): Properly handle
7228 left-shifting 1 into the sign bit.
7229
c2d89095
MLI
72302015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7231
7232 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7233
971e17ff
AS
72342015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7235 Braden Obrzut <admin@maniacsvault.net>
7236 Jason Merrill <jason@redhat.com>
7237
7238 Add C++ Concepts TS support.
7239 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7240 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7241 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7242 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7243 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7244 * c.opt (fconcepts): New.
7245
b3d5bc62
JJ
72462015-08-02 Martin Sebor <msebor@redhat.com>
7247
7248 * c.opt (-Wframe-address): New warning option.
7249
8ebca419
PP
72502015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7251
7252 * c-indentation.c (should_warn_for_misleading_indentation):
7253 Improve heuristics.
7254
1a1e101f
PP
72552015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7256
7257 * c-indentation.c (get_visual_column): Add parameter first_nws,
7258 use it. Update comment documenting the function.
7259 (is_first_nonwhitespace_on_line): Remove.
7260 (should_warn_for_misleading_indentation): Replace usage of
7261 of is_first_nonwhitespace_on_line with get_visual_column.
7262
992118a1
PP
72632015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7264
7265 * c-indentation.h (struct token_indent_info): Define.
7266 (get_token_indent_info): Define.
7267 (warn_for_misleading_information): Declare.
7268 * c-common.h (warn_for_misleading_information): Remove.
7269 * c-identation.c (warn_for_misleading_indentation):
7270 Change declaration to take three token_indent_infos. Adjust
7271 accordingly.
7272 * c-identation.c (should_warn_for_misleading_indentation):
7273 Likewise. Bail out early if the body is a compound statement.
7274 (guard_tinfo_to_string): Define.
7275
e8fa3817
JM
72762015-07-30 Jason Merrill <jason@redhat.com>
7277
7278 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7279 '*' for reference decay.
7280
173864e8
MP
72812015-07-30 Marek Polacek <polacek@redhat.com>
7282
7283 * c-common.c (warn_tautological_cmp): Bail for float types.
7284
f2afe6dd
MP
72852015-07-27 Marek Polacek <polacek@redhat.com>
7286
7287 PR bootstrap/67030
7288 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7289
05b28fd6
MP
72902015-07-27 Marek Polacek <polacek@redhat.com>
7291
7292 PR c++/66555
7293 PR c/54979
7294 * c-common.c (find_array_ref_with_const_idx_r): New function.
7295 (warn_tautological_cmp): New function.
7296 * c-common.h (warn_tautological_cmp): Declare.
7297 * c.opt (Wtautological-compare): New option.
7298
5a5062b8
MP
72992015-07-23 Marek Polacek <polacek@redhat.com>
7300
7301 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7302 (ubsan_instrument_shift): Likewise.
7303
dc891fe7
MP
73042015-07-23 Marek Polacek <polacek@redhat.com>
7305
7306 PR sanitizer/66908
7307 * c-ubsan.c: Include gimplify.h.
7308 (ubsan_instrument_division): Unshare OP0 and OP1.
7309 (ubsan_instrument_shift): Likewise.
7310
451b5e48
MP
73112015-07-20 Marek Polacek <polacek@redhat.com>
7312 Richard Sandiford <richard.sandiford@arm.com>
7313
7314 PR c++/55095
7315 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7316 Use EXPR_LOC_OR_LOC.
7317 (maybe_warn_shift_overflow): New function.
7318 * c-common.h (maybe_warn_shift_overflow): Declare.
7319 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7320 * c.opt (Wshift-overflow): New option.
7321
fb0b2914
ML
73222015-07-16 Martin Liska <mliska@suse.cz>
7323
7324 * c-format.c (static void check_format_info_main): Use
7325 object_allocator instead of pool_allocator.
7326 (check_format_arg): Likewise.
7327 (check_format_info_main): Likewise.
7328
903f5c23
AM
73292015-07-15 Andrew MacLeod <amacleod@redhat.com>
7330
7331 * c-opts.c: Remove multiline #include comment.
7332
026c3cfd
AH
73332015-07-12 Aldy Hernandez <aldyh@redhat.com>
7334
7335 * c-common.c: Fix double word typos.
7336
bb49ee66
EB
73372015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7338
7339 * c-ada-spec.h (cpp_operation): Revert latest change.
7340 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7341 constructors and destructors.
7342
1916bcb5
AM
73432015-07-09 Andrew MacLeod <amacleod@redhat.com>
7344
7345 * c-common.h: Adjust includes for flags.h changes.
7346 * stub-objc.c: Likewise.
026c3cfd 7347
a9dcd529
EB
73482015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7349
7350 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7351 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7352
b03b462f
JJ
73532015-07-08 Jakub Jelinek <jakub@redhat.com>
7354
7355 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7356 are to be removed, return NULL rather than original clauses list.
7357
c7131fb2
AM
73582015-07-07 Andrew MacLeod <amacleod@redhat.com>
7359
7360 * array-notation-common.c: Adjust includes.
7361 * c-ada-spec.c: Likewise.
7362 * c-cilkplus.c: Likewise.
7363 * c-common.h: Likewise.
7364 * c-cppbuiltin.c: Likewise.
7365 * c-dump.c: Likewise.
7366 * c-format.c: Likewise.
7367 * c-gimplify.c: Likewise.
7368 * c-indentation.c: Likewise.
7369 * c-lex.c: Likewise.
7370 * c-omp.c: Likewise.
7371 * c-opts.c: Likewise.
7372 * c-pch.c: Likewise.
7373 * c-ppoutput.c: Likewise.
7374 * c-pragma.c: Likewise.
7375 * c-pretty-print.c: Likewise.
7376 * c-semantics.c: Likewise.
7377 * c-ubsan.c: Likewise.
7378 * cilk.c: Likewise.
7379 * stub-objc.c: Likewise.
7380
2a7fb83f
EB
73812015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7382
7383 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7384 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7385
a03c9bf1
JM
73862015-07-01 Jason Merrill <jason@redhat.com>
7387
36a85135
JM
7388 * c-common.h (D_CXX11): Rename from D_CXX0X.
7389 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7390 * c-common.c: Adjust.
7391
e7fa68d5
JM
7392 * c-opts.c (c_common_post_options): Default to C++14.
7393
a03c9bf1
JM
7394 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7395
fe95b036
ESR
73962015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7397
7398 Implement N4197 - Adding u8 character literals
b3d5bc62 7399 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7400 CPP_CHAR.
b3d5bc62 7401 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7402 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7403 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7404 and CPP_UTF8CHAR tokens.
7405 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7406
da2e71c9
MLI
74072015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7408
7409 PR fortran/66605
7410 * c-common.c (do_warn_unused_parameter): Move here.
7411 * c-common.h (do_warn_unused_parameter): Declare.
7412
b155cfd9
MP
74132015-06-29 Marek Polacek <polacek@redhat.com>
7414
7415 PR c/66322
7416 * c-common.c (check_case_bounds): Add bool * parameter. Set
7417 OUTSIDE_RANGE_P.
7418 (c_add_case_label): Add bool * parameter. Pass it down to
7419 check_case_bounds.
7420 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7421 warning here.
7422 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7423 declarations.
7424
31521951
MP
74252015-06-27 Marek Polacek <polacek@redhat.com>
7426
7427 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7428 or VECTOR_INTEGER_TYPE_P throughout.
7429 * c-gimplify.c: Likewise.
7430
22d03525
MP
74312015-06-26 Marek Polacek <polacek@redhat.com>
7432
7433 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7434 * c-common.c (c_fully_fold_internal): Likewise.
7435 (c_alignof_expr): Likewise.
7436 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7437 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7438 * cilk.c (create_parm_list): Likewise.
22d03525 7439
af05e6e5
MP
74402015-06-26 Marek Polacek <polacek@redhat.com>
7441
7442 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7443
f0889939
AM
74442015-06-25 Andrew MacLeod <amacleod@redhat.com>
7445
7446 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7447 * c-gimplify.c: Likewise.
7448 * c-pragma.c: Likewise.
7449 * c-ubsan.c: Likewise.
7450 * cilk.c: Likewise.
7451
ca752f39
RS
74522015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7453
7454 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7455 ggc_hasher.
7456
16a16ec7
AM
74572015-06-25 Andrew MacLeod <amacleod@redhat.com>
7458
7459 * cilk.c: Move calls.h after tm.h in the include chain.
7460
0ae9bd27
MP
74612015-06-25 Marek Polacek <polacek@redhat.com>
7462
7463 * array-notation-common.c: Use VAR_P throughout.
7464 * c-ada-spec.c: Likewise.
7465 * c-common.c: Likewise.
7466 * c-format.c: Likewise.
7467 * c-gimplify.c: Likewise.
7468 * c-omp.c: Likewise.
7469 * c-pragma.c: Likewise.
7470 * c-pretty-print.c: Likewise.
7471 * cilk.c: Likewise.
7472
62f9079a
MP
74732015-06-25 Marek Polacek <polacek@redhat.com>
7474
7475 * cilk.c (extract_free_variables): Use is_global_var.
7476
0fa16060
RS
74772015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7478
7479 * c-common.c: Don't include target-def.h.
7480
a68ae2e1
MP
74812015-06-23 Marek Polacek <polacek@redhat.com>
7482
7483 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7484 when comparing INTEGER_CSTs.
7485
c6a2f2d9
PMR
74862015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7487
7488 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7489 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7490 (dump_ada_template): Skip partially specialized types.
7491
6b4db501
MM
74922015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7493
7494 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7495 swapping.
7496
abb226c9
AM
74972015-06-17 Andrew MacLeod <amacleod@redhat.com>
7498
7499 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7500 * c-ada-spec.c: Likewise.
7501 * c-cilkplus.c: Likewise.
7502 * c-common.c: Likewise.
7503 * c-common.h: Likewise.
7504 * c-cppbuiltin.c: Likewise.
7505 * c-dump.c: Likewise.
7506 * c-format.c: Likewise.
7507 * c-gimplify.c: Likewise.
7508 * c-indentation.c: Likewise.
7509 * c-lex.c: Likewise.
7510 * c-omp.c: Likewise.
7511 * c-opts.c: Likewise.
7512 * c-pch.c: Likewise.
7513 * c-ppoutput.c: Likewise.
7514 * c-pragma.c: Likewise.
7515 * c-pretty-print.c: Likewise.
7516 * c-semantics.c: Likewise.
7517 * c-ubsan.c: Likewise.
7518 * cilk.c: Likewise.
7519 * stub-objc.c: Likewise.
7520
076fecad
PP
75212015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7522
7523 PR c++/65168
7524 * c-common.c (c_common_truthvalue_conversion): Warn when
7525 converting an address of a reference to a truth value.
7526
13fdf2e2
AM
75272015-06-08 Andrew MacLeod <amacleod@redhat.com>
7528
7529 * array-notation-common.c : Adjust include files.
7530 * c-ada-spec.c : Likewise.
7531 * c-cilkplus.c : Likewise.
7532 * c-common.c : Likewise.
7533 * c-common.h : Likewise.
7534 * c-cppbuiltin.c : Likewise.
7535 * c-dump.c : Likewise.
7536 * c-format.c : Likewise.
7537 * c-gimplify.c : Likewise.
7538 * c-indentation.c : Likewise.
7539 * c-lex.c : Likewise.
7540 * c-omp.c : Likewise.
7541 * c-opts.c : Likewise.
7542 * c-pch.c : Likewise.
7543 * c-ppoutput.c : Likewise.
7544 * c-pragma.c : Likewise.
7545 * c-pretty-print.c : Likewise.
7546 * c-semantics.c : Likewise.
7547 * c-ubsan.c : Likewise.
7548 * cilk.c : Likewise.
7549 * stub-objc.c : Likewise.
7550
a1661b90
MP
75512015-06-08 Marek Polacek <polacek@redhat.com>
7552
7553 PR c/66415
7554 * c-format.c (location_from_offset): Return LOC if LINE is null.
7555
d7438551
AH
75562015-06-05 Aldy Hernandez <aldyh@redhat.com>
7557
7558 * c-common.h (c_parse_final_cleanups): New prototype.
7559 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7560
b3d5bc62
JJ
75612015-06-04 Sriraman Tallam <tmsriram@google.com>
7562
7563 * c-common.c (noplt): New attribute.
7564 (handle_noplt_attribute): New handler.
7565
ecb9f223
AM
75662015-06-04 Andrew MacLeod <amacleod@redhat.com>
7567
7568 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7569 * c-ada-spec.c: Likewise.
7570 * c-cilkplus.c: Likewise.
7571 * c-common.c: Likewise.
7572 * c-common.h: Likewise.
7573 * c-cppbuiltin.c: Likewise.
7574 * c-dump.c: Likewise.
7575 * c-format.c: Likewise.
7576 * c-gimplify.c: Likewise.
7577 * c-indentation.c: Likewise.
7578 * c-lex.c: Likewise.
7579 * c-omp.c: Likewise.
7580 * c-opts.c: Likewise.
7581 * c-pch.c: Likewise.
7582 * c-ppoutput.c: Likewise.
7583 * c-pragma.c: Likewise.
7584 * c-pretty-print.c: Likewise.
7585 * c-semantics.c: Likewise.
7586 * c-ubsan.c: Likewise.
7587 * cilk.c: Likewise.
7588 * stub-objc.c: Likewise.
7589
6ac48155
DM
75902015-06-02 David Malcolm <dmalcolm@redhat.com>
7591
7592 PR c/66220:
7593 * c-indentation.c (should_warn_for_misleading_indentation): Use
7594 expand_location rather than expand_location_to_spelling_point.
7595 Don't warn if the guarding statement is more indented than the
7596 next/body stmts.
7597
773ce42e
DM
75982015-06-02 David Malcolm <dmalcolm@redhat.com>
7599
7600 * c-indentation.c (warn_for_misleading_indentation): Bail out
7601 immediately if -Wmisleading-indentation isn't enabled.
7602
4fef8379
ML
76032015-06-01 Martin Liska <mliska@suse.cz>
7604
7605 * c-format.c (check_format_arg):Use new type-based pool allocator.
7606 (check_format_info_main) Likewise.
7607
1edfb384
EB
76082015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7609
7610 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7611 (has_nontrivial_methods): Likewise.
7612
9677ef52
MP
76132015-05-25 Marek Polacek <polacek@redhat.com>
7614
7615 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7616
fd5c817a
MP
76172015-05-22 Marek Polacek <polacek@redhat.com>
7618
7619 PR c/47043
7620 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7621
a2f45fe6 76222015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7623
7624 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7625 STACK_GROWS_DOWNWARD.
7626
a2f45fe6 76272015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7628
7629 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7630 STACK_GROWS_DOWNWARD rather than if it is defined.
7631
0fee2ac2 76322015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7633
0fee2ac2
MLI
7634 PR c/52952
7635 * c-format.c (location_column_from_byte_offset): New.
7636 (location_from_offset): New.
7637 (struct format_wanted_type): Add offset_loc field.
7638 (check_format_info): Move handling of location for extra arguments
7639 closer to the point of warning.
7640 (check_format_info_main): Pass the result of location_from_offset
7641 to warning_at.
7642 (format_type_warning): Pass the result of location_from_offset
7643 to warning_at.
7644
cf4ef6f7
MP
76452015-05-20 Marek Polacek <polacek@redhat.com>
7646
7647 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7648
3a65ee74
MP
76492015-05-20 Marek Polacek <polacek@redhat.com>
7650
7651 * c-ada-spec.c (dump_sloc): Use DECL_P.
7652
21b634ae
MP
76532015-05-20 Marek Polacek <polacek@redhat.com>
7654
7655 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7656 * c-common.c: Likewise.
7657
0e50b624
DM
76582015-05-19 David Malcolm <dmalcolm@redhat.com>
7659
7660 * c-common.h (fe_file_change): Strengthen param from
7661 const line_map * to const line_map_ordinary *.
7662 (pp_file_change): Likewise.
7663 * c-lex.c (fe_file_change): Likewise.
7664 (cb_define): Use linemap_check_ordinary when invoking
7665 SOURCE_LINE.
7666 (cb_undef): Likewise.
7667 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7668 invoking cb_file_change.
7669 (c_finish_options): Likewise.
7670 (push_command_line_include): Likewise.
7671 (cb_file_change): Strengthen param "new_map" from
7672 const line_map * to const line_map_ordinary *.
7673 * c-ppoutput.c (cb_define): Likewise for local "map".
7674 (pp_file_change): Likewise for param "map" and local "from".
7675
fab27f52
MM
76762015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7677
7678 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7679
2fe1d762
TV
76802015-05-18 Tom de Vries <tom@codesourcery.com>
7681
7682 * c-common.c (build_va_arg_1): New function.
7683 (build_va_arg): Add address operator to va_list operand if necessary.
7684
7a37fa90
MM
76852015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7686
7687 PR c/48956
7688 * c-common.c (int_safely_convertible_to_real_p): Define.
7689 (unsafe_conversion_p): Check conversions involving complex types.
7690 (conversion_warning): Add new warning message for conversions which
7691 discard imaginary component.
7692 * c-common.h: (enum conversion_safety): Add new enumerator for such
7693 conversions.
7694
3aa3c9fc
MP
76952015-05-14 Marek Polacek <polacek@redhat.com>
7696
7697 PR c/66066
7698 PR c/66127
7699 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7700 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7701 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7702 use it. If FOR_INT_CONST, require that all evaluated operands be
7703 INTEGER_CSTs.
7704
c3388e62
DM
77052015-05-12 David Malcolm <dmalcolm@redhat.com>
7706
7707 * c-common.h (warn_for_misleading_indentation): New prototype.
7708 * c-indentation.c: New file.
7709 * c.opt (Wmisleading-indentation): New option.
7710
c7b38fd5
TV
77112015-05-12 Tom de Vries <tom@codesourcery.com>
7712
7713 PR tree-optimization/66010
7714 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7715
381bf11e
JM
77162015-05-09 Jason Merrill <jason@redhat.com>
7717
edff0c06
JM
7718 * c-opts.c (c_common_post_options): Also clear
7719 cpp_opts->cpp_warn_cxx11_compat.
7720
129211bc
JM
7721 * c-common.h (enum cxx_dialect): Add cxx_unset.
7722 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7723 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7724
381bf11e
JM
7725 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7726 (std=gnu++0x): Mark as Undocumented.
7727 (std=gnu++1y): Add deprecated message.
7728
fe191308
JM
77292015-05-08 Jason Merrill <jason@redhat.com>
7730
765189ff
JM
7731 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7732 * c-opts.c: Adjust.
7733
fe191308
JM
7734 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7735
755e528f
MP
77362015-05-08 Marek Polacek <polacek@redhat.com>
7737
7738 PR c/64918
7739 * c.opt (Woverride-init-side-effects): New option.
7740
0173bd2a
MP
77412015-05-07 Marek Polacek <polacek@redhat.com>
7742
7743 PR c/65179
7744 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7745 negative value.
7746 * c.opt (Wshift-negative-value): New option.
7747 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7748 when -Wextra and C99/C++11 mode.
7749
e0f0d3b9
MP
77502015-05-07 Marek Polacek <polacek@redhat.com>
7751 Martin Uecker <uecker@eecs.berkeley.edu>
7752
7753 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7754 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7755
8243e2a9
JM
77562015-05-05 Jason Merrill <jason@redhat.com>
7757
7758 * c.opt (Wterminate): New.
7759
577cd070
MP
77602015-04-30 Marek Polacek <polacek@redhat.com>
7761
7762 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7763 require that the non-constant be of a boolean type.
7764
0373796b
JT
77652015-04-29 Josh Triplett <josh@joshtriplett.org>
7766
e0f0d3b9
MP
7767 * c-common.c (handle_section_attribute): Refactor to reduce
7768 nesting and distinguish between error cases.
0373796b 7769
716c0ba6
MP
77702015-04-29 Marek Polacek <polacek@redhat.com>
7771
7772 PR c/64610
7773 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7774 with 0/1.
7775
8848828b
JJ
77762015-04-29 Jakub Jelinek <jakub@redhat.com>
7777
7778 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7779 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7780 HOST_BITS_PER_WIDE_INT.
7781
ecd0e562
TV
77822015-04-28 Tom de Vries <tom@codesourcery.com>
7783
7784 PR tree-optimization/65887
7785 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7786
2a877204 77872015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7788 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7789
7790 * c-ada-spec.c (in_function): Delete.
7791 (dump_generic_ada_node): Do not change in_function and remove the
7792 redundant code dealing with it.
7793 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7794 (print_ada_methods): Output the static member functions in a nested
7795 package after the regular methods as well as associated renamings.
7796
4853031e
MP
77972015-04-24 Marek Polacek <polacek@redhat.com>
7798
7799 PR c/65830
7800 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7801 and OPT_Wshift_count_overflow.
7802
8c2b7f79
MP
7803 PR c/63357
7804 * c-common.c (warn_logical_operator): Warn if the operands have the
7805 same expressions.
7806
b8787813
MP
78072015-04-24 Marek Polacek <polacek@redhat.com>
7808
7809 PR c/61534
7810 * c-common.c (warn_logical_operator): Bail if either operand comes
7811 from a macro expansion.
7812
8fba1830
BRF
78132015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7814
7815 PR target/55143
7816 * c-common.c (c_default_pointer_mode): Add definition.
7817 * c-common.h (c_default_pointer_mode): Add declaration.
7818
17958621
JJ
78192015-03-11 Jakub Jelinek <jakub@redhat.com>
7820
7821 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7822 on record_builtin_type argument.
7823
7ccb1a11
JJ
78242015-03-10 Jakub Jelinek <jakub@redhat.com>
7825
7826 PR c/65120
7827 * c-common.c (warn_logical_not_parentheses): Don't warn for
7828 !x == 0 or !x != 0.
7829
04fd785e
MP
78302015-03-07 Marek Polacek <polacek@redhat.com>
7831
7832 PR sanitizer/65280
7833 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7834 before trying to figure out whether we have a flexible array member.
7835
a4e26206 78362015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7837 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7838
7839 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7840
0d2489f4
EB
78412015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7842
7843 PR ada/65319
7844 * c-ada-spec.c (print_destructor): Remove obsolete code.
7845
83ed54d7
EB
78462015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7847
7848 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7849 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7850 DECL_TEMPLATE_RESULT emulations.
7851 (dump_ada_template)): Add guard for TYPE_METHODS.
7852
7631f0e2
MP
78532015-02-27 Marek Polacek <polacek@redhat.com>
7854
7855 PR c/65040
7856 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7857
d1783ae5
KT
78582015-02-27 Kai Tietz <ktietz@redhat.com>
7859
7860 PR c/35330
7861 * c-pragma.c (handle_pragma_weak): Do not try to create
7862 weak/alias of declarations not being function, or variable
7863 declarations.
7864
56a9f6bc
TS
78652015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7866
7867 PR libgomp/64625
7868 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7869 Remove macros.
7870 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7871
3d5cb23d
MP
78722015-02-16 Marek Polacek <polacek@redhat.com>
7873
7874 PR c/65066
7875 * c-format.c (check_format_types): Handle null param.
7876
fa008882
MP
78772015-02-13 Marek Polacek <polacek@redhat.com>
7878
7879 PR c/65040
7880 * c-format.c (check_format_types): Don't warn about different
7881 signedness if the original value is in the range of WANTED_TYPE.
7882
785f21af
JM
78832015-02-12 Jason Merrill <jason@redhat.com>
7884
7885 PR c++/64956
7886 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7887 to the current highest version.
7888 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7889
4886ec8e
JJ
78902015-02-04 Jakub Jelinek <jakub@redhat.com>
7891
7892 PR c/64824
7893 PR c/64868
7894 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7895 instead of RDIV_EXPR. Use build_binary_op instead of
7896 build2_loc.
7897
40fecdd6
JM
78982015-01-30 Joseph Myers <joseph@codesourcery.com>
7899
7900 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7901 to pass input_location as first argument.
7902
a0c88d06
TV
79032015-01-23 Tom de Vries <tom@codesourcery.com>
7904
7905 PR libgomp/64672
7906 * c.opt (fopenacc): Mark as LTO option.
7907
1506ae0e
TV
79082015-01-23 Tom de Vries <tom@codesourcery.com>
7909
7910 PR libgomp/64707
7911 * c.opt (fopenmp): Mark as LTO option.
7912
31be63ab
JJ
79132015-01-21 Jakub Jelinek <jakub@redhat.com>
7914
7915 PR c/63307
b1726d6c 7916 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7917 (compare_decls): Fix up formatting.
7918
79192015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7920
7921 PR c/63307
7922 * cilk.c: Include vec.h.
7923 (struct cilk_decls): New structure.
7924 (wrapper_parm_cb): Split this function to...
7925 (fill_decls_vec): ...this...
7926 (create_parm_list): ...and this.
7927 (compare_decls): New function.
7928 (for_local_cb): Remove.
7929 (wrapper_local_cb): Ditto.
7930 (build_wrapper_type): For now first traverse and fill vector of
7931 declarations then sort it and then deal with sorted vector.
7932 (cilk_outline): Ditto.
7933 (declare_one_free_variable): Ditto.
7934
6875457f
JM
79352015-01-21 Jason Merrill <jason@redhat.com>
7936
7937 PR c++/64629
7938 * c-format.c (check_format_arg): Call decl_constant_value.
7939
185c9e56
ML
79402015-01-19 Martin Liska <mliska@suse.cz>
7941
7942 * c-common.c (handle_noicf_attribute): New function.
7943
41dbbb37
TS
79442015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7945 Bernd Schmidt <bernds@codesourcery.com>
7946 James Norris <jnorris@codesourcery.com>
7947 Cesar Philippidis <cesar@codesourcery.com>
7948 Ilmir Usmanov <i.usmanov@samsung.com>
7949 Jakub Jelinek <jakub@redhat.com>
7950
7951 * c.opt (fopenacc): New option.
7952 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7953 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7954 New macros.
7955 * c-common.h (c_finish_oacc_wait): New prototype.
7956 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7957 (c_finish_oacc_wait): New function.
7958 * c-pragma.c (oacc_pragmas): New variable.
7959 (c_pp_lookup_pragma, init_pragma): Handle it.
7960 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7961 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7962 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7963 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7964 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7965 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7966 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7967 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7968 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7969 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7970 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7971 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7972 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7973 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7974 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7975 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7976 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7977 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7978 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7979 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7980 PRAGMA_OACC_CLAUSE_WORKER.
7981
3f8257db 79822015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7983
7984 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7985 for the new option fstack-protector_explicit.
7986 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7987 (handle_stack_protect_attribute): New function.
7988
3f8257db 79892015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7990
7991 * c.opt: New option -Warray-bounds=.
7992
adfac8df
JJ
79932015-01-09 Michael Collison <michael.collison@linaro.org>
7994
7995 * array-notation-common.c: Include hash-set.h, machmode.h,
7996 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7997 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7998 * c-ada-spec.c: Ditto.
7999 * c-cilkplus.c: Ditto.
8000 * c-common.c: Include input.h due to flattening of tree.h.
8001 Define macro GCC_C_COMMON_C.
8002 * c-common.h: Flatten tree.h header files into c-common.h.
8003 Remove include of tree-core.h.
8004 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8005 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8006 fold-const.h, wide-int.h, and inchash.h due to
8007 flattening of tree.h.
8008 * c-dump.c: Ditto.
8009 * c-format.c: Flatten tree.h header files into c-common.h.
8010 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8011 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8012 fold-const.h, wide-int.h, and inchash.h due to
8013 flattening of tree.h.
8014 * c-dump.c: Include hash-set.h, machmode.h,
8015 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8016 fold-const.h, wide-int.h, and inchash.h due to
8017 flattening of tree.h.
8018 * c-format.c: Include hash-set.h, machmode.h,
8019 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8020 fold-const.h, wide-int.h, inchash.h and real.h due to
8021 flattening of tree.h.
8022 * c-gimplify.c: Include hash-set.h, machmode.h,
8023 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8024 fold-const.h, wide-int.h, and inchash.h due to
8025 flattening of tree.h.
8026 * cilk.c: Ditto.
8027 * c-lex.c: Ditto.
8028 * c-omp.c: Ditto.
8029 * c-opts.c: Ditto.
8030 * c-pch.c: Ditto.
8031 * c-ppoutput.c: Ditto.
8032 * c-pragma.c: Ditto.
8033 * c-pretty-print.c: Ditto.
8034 * c-semantics.c: Ditto.
8035 * c-ubsan.c: Ditto.
8036 * stub-objc.c: Ditto.
8037
f5481fc4
JM
80382015-01-08 Jason Merrill <jason@redhat.com>
8039
8040 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8041 do_ubsan_in_current_function.
8042 (ubsan_maybe_instrument_reference_or_call): Likewise.
8043 * c-ubsan.h: Declare it.
8044
de35aa66
MS
80452015-01-08 Mike Stump <mikestump@comcast.net>
8046
8047 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8048
4a9a42ab
MP
80492015-01-07 Marek Polacek <polacek@redhat.com>
8050
8051 PR c/64440
8052 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8053 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8054
2f42e5de
TS
80552015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8056
8057 PR c++/31397
8058 * c.opt (Wsuggest-override): New option.
8059
5624e564
JJ
80602015-01-05 Jakub Jelinek <jakub@redhat.com>
8061
8062 Update copyright years.
8063
5bd012f8
MP
80642015-01-05 Marek Polacek <polacek@redhat.com>
8065
8066 PR c/64423
8067 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8068 parameter. Use it.
8069 * c-common.h (warn_array_subscript_with_type_char): Update
8070 declaration.
8071
a7fa8d18
ESR
80722014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8073
8074 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8075 Control macro with flag_sized_deallocation.
8076
3f8257db 80772014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8078
8079 * c.opt (Wdiscarded-array-qualifiers): New option.
8080
1f8d3e84
JJ
80812014-12-19 Jakub Jelinek <jakub@redhat.com>
8082
8083 PR preprocessor/63831
8084 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8085 and __has_cpp_attribute here.
8086 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8087 c_common_has_attribute.
8088 * c-common.h (c_common_has_attribute): New prototype.
8089 * c-lex.c (init_c_lex): Set cb->has_attribute to
8090 c_common_has_attribute instead of cb_has_attribute.
8091 (get_token_no_padding): New function.
8092 (cb_has_attribute): Renamed to ...
8093 (c_common_has_attribute): ... this. No longer static. Use
8094 get_token_no_padding, require ()s, don't build TREE_LIST
8095 unnecessarily, fix up formatting, adjust diagnostics, call
8096 init_attributes.
8097
20b06add
JM
80982014-12-15 Jason Merrill <jason@redhat.com>
8099
8100 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8101 (-Wsized-deallocation): New.
8102 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8103 to on in C++14 and up.
8104
94a073b2
JM
81052014-12-11 Jason Merrill <jason@redhat.com>
8106
acaa5911
JM
8107 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8108
94a073b2
JM
8109 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8110 we aren't complaining about VLAs.
8111
7fb66c15
MP
81122014-12-06 Marek Polacek <polacek@redhat.com>
8113
8114 PR tree-optimization/64183
8115 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8116 shift-expression if it is integer_type_node. Use types_compatible_p.
8117
b731b390
JJ
81182014-11-29 Jakub Jelinek <jakub@redhat.com>
8119
8120 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8121 last argument from create_tmp_var_raw and create_tmp_var calls.
8122 * cilk.c (gimplify_cilk_spawn): Likewise.
8123 * c-omp.c (c_finish_omp_atomic): Likewise.
8124
6a4da643
MP
81252014-11-28 Marek Polacek <polacek@redhat.com>
8126
8127 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8128 instead of unsigned_type_node.
8129
541e35a6
MP
81302014-11-28 Marek Polacek <polacek@redhat.com>
8131
8132 PR c/63862
8133 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8134 to op1_utype.
8135 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8136 expression to unsigned_type_node.
8137
dcc97066
MW
81382014-11-20 Mark Wielaard <mjw@redhat.com>
8139
8140 PR debug/38757
8141 * c-opts.c (set_std_c89): Set lang_hooks.name.
8142 (set_std_c99): Likewise.
8143 (set_std_c11): Likewise.
8144 (set_std_cxx98): Likewise.
8145 (set_std_cxx11): Likewise.
8146 (set_std_cxx14): Likewise.
8147 (set_std_cxx1z): Likewise.
8148
aa7da51a
JJ
81492014-11-21 Jakub Jelinek <jakub@redhat.com>
8150
8151 PR target/63764
8152 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8153 return type to bool.
009a3480 8154 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8155 (convert_vector_to_pointer_for_subscript): Change return type to
8156 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8157 and copy it into a TARGET_EXPR and use that instead of *vecp
8158 directly.
8159
538dd0b7
DM
81602014-11-19 David Malcolm <dmalcolm@redhat.com>
8161
8162 Merger of git branch "gimple-classes-v2-option-3".
8163 * ChangeLog.gimple-classes: New.
8164 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8165 from being just a vec<gimple> to a vec<gbind *>.
8166
c39a5e99
JJ
81672014-11-18 Jakub Jelinek <jakub@redhat.com>
8168
8169 PR sanitizer/63813
8170 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8171 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8172 get_pointer_alignment for non-pointers. Use ptype, or if it is
8173 reference type, corresponding pointer type, as type of kind
8174 argument.
8175 (ubsan_maybe_instrument_reference,
8176 ubsan_maybe_instrument_member_call): Adjust callers.
8177
8537a4a9
MP
81782014-11-15 Marek Polacek <polacek@redhat.com>
8179
8180 PR middle-end/63884
8181 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8182 for NULL fndecl.
8183 (extract_array_notation_exprs): Return for NULL node.
8184
2079956a
JM
81852014-11-12 Joseph Myers <joseph@codesourcery.com>
8186
8187 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8188 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8189
1304953e
JJ
81902014-11-12 Jakub Jelinek <jakub@redhat.com>
8191
8192 PR c/59708
8193 * c-common.c (check_builtin_function_arguments): Handle
8194 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8195
e5e44252
AK
81962014-11-10 Andi Kleen <ak@linux.intel.com>
8197
8198 PR c/60804
8199 * c-common.h (check_no_cilk): Declare.
8200 * cilk.c (get_error_location): New function.
8201 (check_no_cilk): Dito.
8202
e64b984d
AK
82032014-11-10 Andi Kleen <ak@linux.intel.com>
8204
8205 * cilk.c (recognize_spawn): Use expression location
8206 for error message.
8207
13c21655
PC
82082014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8209
8210 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8211
42fd12b1
ESR
82122014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8213
8214 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8215 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8216 (__cpp_range_based_for, __cpp_initializer_lists,
8217 __cpp_delegating_constructors, __cpp_nsdmi,
8218 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8219 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8220 __has_cpp_attribute.
8221 * c-lex.c (cb_has_attribute): New callback CPP function;
8222 (init_c_lex): Set has_attribute callback.
8223
6f450181
RB
82242014-11-04 Richard Biener <rguenther@suse.de>
8225
8226 * c-common.c (shorten_compare): Do not shorten mixed
8227 DFP and non-DFP compares.
8228
26f0e1d6
ESR
82292014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8230
8231 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8232 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8233 Commentary and rearrangement of tests.
8234 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8235 Commentary and rearrangement of tests.
ab20d992 8236 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8237 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8238
ef4bddc2
RS
82392014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8240
8241 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8242 enum from machine_mode.
8243
c582198b
AM
82442014-10-28 Andrew MacLeod <amacleod@redhat.com>
8245
adfac8df
JJ
8246 * c-common.c: Adjust include files.
8247 * c-gimplify.c: Ditto.
8248 * cilk.c: Ditto.
8249 * c-pragma.c: Ditto.
8250 * c-ubsan.c: Ditto.
c582198b 8251
60393bbc
AM
82522014-10-27 Andrew MacLeod <amacleod@redhat.com>
8253
8254 * c-gimplify.c: Adjust include files.
8255
d723bb7c
MLI
82562014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8257
8258 PR c++/53061
8259 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8260 c_common_initialize_diagnostics.
8261 * c-common.h: Likewise.
8262
90f3520e
MP
82632014-10-24 Marek Polacek <polacek@redhat.com>
8264
8265 PR c/56980
8266 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8267 print "struct"/"union"/"enum" for typedefed names.
8268
59d7607a
MP
82692014-10-23 Marek Polacek <polacek@redhat.com>
8270
8271 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8272 in unsigned type.
8273
d95a2703
JJ
82742014-10-22 Jakub Jelinek <jakub@redhat.com>
8275 Yury Gribov <y.gribov@samsung.com>
8276
8277 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8278 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8279 instead of flag_sanitize_recover as bool flag.
8280
8e6ef852
KY
82812014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8282
8283 * cilk.c: Revert previous change.
8284
948cf550
IZ
82852014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8286
8287 PR c/63307
8288 * cilk.c: Include vec.h.
8289 (struct cilk_decls): New structure.
8290 (wrapper_parm_cb): Split this function to...
8291 (fill_decls_vec): ...this...
8292 (create_parm_list): ...and this.
8293 (compare_decls): New function.
8294 (for_local_cb): Remove.
8295 (wrapper_local_cb): Ditto.
8296 (build_wrapper_type): For now first traverse and fill vector of
8297 declarations then sort it and then deal with sorted vector.
8298 (cilk_outline): Ditto.
8299 (declare_one_free_variable): Ditto.
8300
92574c7c
MP
83012014-10-17 Marek Polacek <polacek@redhat.com>
8302
8303 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8304 * c.opt (Wimplicit-int): Initialize to -1.
8305
83685514
AM
83062014-10-16 Andrew MacLeod <amacleod@redhat.com>
8307
8308 * c-pragma.c: Adjust include files.
8309 * c-semantics.c: Likewise.
8310
5b8300ea
DD
83112014-10-16 DJ Delorie <dj@redhat.com>
8312
8313 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8314 multiples of bytes.
8315
5f83e90b
JM
83162014-10-14 Jason Merrill <jason@redhat.com>
8317
8318 PR c++/63455
8319 * c-common.h (CPP_PREPARSED_EXPR): New.
8320 (N_CP_TTYPES): Adjust.
8321
d73326ca
MP
83222014-10-15 Marek Polacek <polacek@redhat.com>
8323
8324 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8325
78a7c317
DD
83262014-10-14 DJ Delorie <dj@redhat.com>
8327
8328 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8329 types, not just __int128.
8330 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8331 types, not just __int128.
8332 (cpp_atomic_builtins): Round pointer sizes up.
8333 (type_suffix): Use type precision, not specific types.
8334 * c-common.c (c_common_reswords): Remove __int128 special case.
8335 (c_common_type_for_size): Check for all __intN types, not just
8336 __int128.
8337 (c_common_type_for_mode): Likewise.
8338 (c_common_signed_or_unsigned_type): Likewise.
8339 (c_build_bitfield_integer_type): Likewise.
8340 (c_common_nodes_and_builtins): Likewise.
8341 (keyword_begins_type_specifier): Likewise.
8342 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8343 __intN variants.
8344
2a22f99c
TS
83452014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8346
8347 * c-common.c: Use hash_table instead of hashtab.
8348
2a8ef767
ESR
83492014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8350
adfac8df 8351 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8352 C++11 section.
8353
3c9aabbd
MG
83542014-10-03 Marc Glisse <marc.glisse@inria.fr>
8355
8356 PR c++/54427
8357 PR c++/57198
8358 PR c++/58845
8359 * c-common.c (warn_logical_operator): Punt for vectors.
8360
a15f7cb8
ESR
83612014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8362
8363 Implement SD-6: SG10 Feature Test Recommendations
8364 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8365 macros and the __has_header macro.
8366
8d0cf15e
JM
83672014-09-30 Jason Merrill <jason@redhat.com>
8368
dd5d5481
JM
8369 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8370 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8371 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8372
b752325e
JM
8373 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8374 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8375
8d0cf15e
JM
8376 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8377 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8378
083e891e
MP
83792014-09-24 Marek Polacek <polacek@redhat.com>
8380
8381 PR c/61405
8382 PR c/53874
8383 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8384
7861b648
AK
83852014-09-23 Andi Kleen <ak@linux.intel.com>
8386
8387 * c-common.c (handle_no_reorder_attribute): New function.
8388 (c_common_attribute_table): Add no_reorder attribute.
8389
9a79452d
JM
83902014-09-22 Joseph Myers <joseph@codesourcery.com>
8391
8392 * c-cppbuiltin.c (c_cpp_builtins): Define
8393 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8394 modes.
8395
dd69f047
JM
83962014-09-18 Joseph Myers <joseph@codesourcery.com>
8397
8398 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8399 for supported floating-point modes.
8400
737a4826
MLI
84012014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8402
8403 * c.opt (Wpsabi): Use LangEnabledBy.
8404 * c-opts.c (c_common_handle_option): Do not handle here.
8405
8cc4b7a2
JM
84062014-09-12 Joseph Myers <joseph@codesourcery.com>
8407
8408 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8409 macros for floating-point modes.
8410
179b5a55
MG
84112014-09-11 Marc Glisse <marc.glisse@inria.fr>
8412
8413 PR target/58757
8414 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8415 __*_DENORM_MIN__ without denormals.
8416
570a11fe
JJ
84172014-09-10 Jakub Jelinek <jakub@redhat.com>
8418
8419 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8420 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8421 ubsan_create_data callers.
8422 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8423 index is constant or BIT_AND_EXPR with constant mask and is
8424 small enough for the bound.
8425 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8426 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8427
b559c810
MLI
84282014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8429
8430 * c.opt: Add CppReason to various flags.
8431 (Wdate-time): Re-sort.
8432 * c-common.c: Include c-common.h earlier.
8433 (struct reason_option_codes_t): Delete.
8434 (c_option_controlling_cpp_error): Prefix global type and struct
8435 with cpp_.
8436
1ef33fd4
MLI
84372014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8438
8439 * c.opt (Wnormalized): New.
8440 (Wnormalized=): Use Enum and Reject Negative.
8441 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8442
66bb34c0
JM
84432014-09-08 Joseph Myers <joseph@codesourcery.com>
8444
8445 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8446 digits of floating-point modes if -fbuilding-libgcc.
8447
53d68b9f
JM
84482014-09-05 Joseph Myers <joseph@codesourcery.com>
8449
8450 * c-cppbuiltin.c (c_cpp_builtins): Also define
8451 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8452 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8453 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8454 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8455 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8456 __LIBGCC_STACK_GROWS_DOWNWARD__,
8457 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8458 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8459 __LIBGCC_DWARF_FRAME_REGISTERS__,
8460 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8461 __LIBGCC_STACK_POINTER_REGNUM__ and
8462 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8463 (builtin_define_with_value): Handle backslash-escaping in string
8464 macro values.
8465
f65586dc
RB
84662014-09-05 Richard Biener <rguenther@suse.de>
8467
8468 PR middle-end/63148
8469 * c-format.c (check_format_arg): Properly handle
8470 effectively signed POINTER_PLUS_EXPR offset.
8471
2b71f4a4
MLI
84722014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8473
8474 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8475 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8476 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8477 and Init.
8478 * c-opts.c (c_common_handle_option): Do not handle here.
8479 (sanitize_cpp_opts): Likewise.
8480 * c-common.c (struct reason_option_codes_t): Handle
8481 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8482
d2e4feca
MP
84832014-09-03 Marek Polacek <polacek@redhat.com>
8484
8485 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8486
9a771876
JJ
84872014-09-02 Jakub Jelinek <jakub@redhat.com>
8488 Balaji V. Iyer <balaji.v.iyer@intel.com>
8489 Igor Zamyatin <igor.zamyatin@intel.com>
8490
8491 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8492 * c-common.c (c_common_reswords): Added _Cilk_for.
8493 * c-common.h (enum rid): Added RID_CILK_FOR.
8494 (cilk_for_number_of_iterations): Add declaration.
8495 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8496 CILK_FOR.
8497 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8498 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8499
81b5d104
MLI
85002014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8501
8502 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8503 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8504 Wundef): Use CPP, Var and Init.
8505 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8506
b753b37b
MLI
85072014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8508
8509 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8510 * c-opts.c (c_common_handle_option): Do not handle here.
8511
028aee17
JM
85122014-08-25 Jason Merrill <jason@redhat.com>
8513
8514 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8515 -std=c++14 and -std=gnu++14, rather than the reverse.
8516 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8517 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8518 * c-common.h (cxx_dialect): Remove cxx1y.
8519
e4276ba5
ESR
85202014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8521
8522 * c-common.h (enum cxx_dialect): Add cxx14.
8523 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8524 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8525 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8526
a545cacd
JM
85272014-08-22 Jason Merrill <jason@redhat.com>
8528
8529 * c.opt (std=gnu++17): Fix alias.
8530
59ea0364
MP
85312014-08-22 Marek Polacek <polacek@redhat.com>
8532
8533 PR c++/62199
8534 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8535 check for vector types. Drop LHS argument.
8536 * c-common.h (warn_logical_not_parentheses): Adjust.
8537
596e808c
MLI
85382014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8539
8540 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8541 (Wmultichar): Likewise.
8542 (Wdate-time): Use C-family languages instead of Common. Use CPP
8543 and Var.
8544 * c-opts.c (c_common_handle_option): Do not handle the above
8545 options here.
8546 (sanitize_cpp_opts): Likewise.
8547
18767f65
MLI
85482014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8549
8550 PR fortran/44054
8551 * c-opts.c: Include tree-diagnostics.h.
8552 (c_diagnostic_finalizer): New.
8553 (c_common_initialize_diagnostics): Use it.
8554
b4413594
MLI
85552014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8556
8557 PR preprocessor/51303
8558 * c-common.c (struct reason_option_codes_t option_codes):
8559 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8560
43f9a13c
MLI
85612014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8562
8563 PR c/60975
8564 PR c/53063
8565 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8566 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8567 (c_common_post_options): Call init_global_opts_from_cpp.
8568 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8569
04159acf
MP
85702014-08-19 Marek Polacek <polacek@redhat.com>
8571
8572 PR c++/62153
8573 * c-common.c (maybe_warn_bool_compare): New function.
8574 * c-common.h (maybe_warn_bool_compare): Declare.
8575 * c.opt (Wbool-compare): New option.
8576
35aff4fb
MP
85772014-08-19 Marek Polacek <polacek@redhat.com>
8578
8579 * c.opt (Wc99-c11-compat): New option.
8580
177cce46
MP
85812014-08-19 Marek Polacek <polacek@redhat.com>
8582
8583 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8584 to warn_c90_c99_compat.
8585 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8586 to -1.
8587
6ae9194f
MLI
85882014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8589 Steven Bosscher <steven@gcc.gnu.org>
8590
8591 PR c/52952
8592 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8593 format_check_results.
8594 (check_function_format): Use true and add comment for boolean
8595 argument.
8596 (finish_dollar_format_checking): Use explicit location when warning.
8597 (check_format_info): Likewise.
8598 (check_format_arg): Set extra_arg_loc and format_string_loc.
8599 (check_format_info_main): Use explicit location when warning.
8600 (check_format_types): Pass explicit location.
8601 (format_type_warning): Likewise.
8602
8e54f6d3
MLI
86032014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8604
8605 PR fortran/44054
8606 * c-format.c: Handle Fortran flags.
8607
cd4e76fc
IZ
86082014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8609
8610 PR other/61962
8611 * array-notation-common.c (find_rank): Added handling for other
8612 types of references.
8613
f3bede71
MP
86142014-08-10 Marek Polacek <polacek@redhat.com>
8615
8616 PR c/51849
8617 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8618 * c.opt (Wc90-c99-compat): Add option.
8619
9f25a338
TS
86202014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8621
8622 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8623
62e4eb35
MP
86242014-08-03 Marek Polacek <polacek@redhat.com>
8625
ab20d992 8626 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8627 (c_add_case_label): Pass loc to check_case_value.
8628
b787e7a2
TS
86292014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8630
8631 * cilk.c: Use hash_map instead of pointer_map.
8632
6e2830c3
TS
86332014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8634
8635 * c-gimplify.c: Use hash_set instead of pointer_set.
8636
a7ee52fb
IZ
86372014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8638
8639 PR middle-end/61455
8640 * array-notation-common.c (extract_array_notation_exprs): Handling
8641 of DECL_EXPR added.
8642
944fa280
JJ
86432014-08-01 Jakub Jelinek <jakub@redhat.com>
8644
8645 * c-common.h (min_align_of_type): Removed prototype.
8646 * c-common.c (min_align_of_type): Removed.
8647 * c-ubsan.h (ubsan_maybe_instrument_reference,
8648 ubsan_maybe_instrument_member_call): New prototypes.
8649 * c-ubsan.c: Include stor-layout.h and builtins.h.
8650 (ubsan_maybe_instrument_reference_or_call,
8651 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8652 functions.
8653
b4dfdc11
MG
86542014-07-31 Marc Glisse <marc.glisse@inria.fr>
8655
8656 PR c++/60517
8657 * c.opt (-Wreturn-local-addr): Move to common.opt.
8658
a41844e5
JM
86592014-07-30 Jason Merrill <jason@redhat.com>
8660
8661 PR c++/61659
8662 PR c++/61687
8663 Revert:
8664 * c.opt (-fuse-all-virtuals): New.
8665
976d5a22
TT
86662014-07-30 Tom Tromey <tromey@redhat.com>
8667
8668 PR c/59855
8669 * c.opt (Wdesignated-init): New option.
8670 * c-common.c (c_common_attribute_table): Add "designated_init".
8671 (handle_designated_init): New function.
8672
cdc94aca
MP
86732014-07-24 Marek Polacek <polacek@redhat.com>
8674
8675 PR c/57653
8676 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8677
f41373b6
DS
86782014-07-16 Dodji Seketeli <dodji@redhat.com>
8679
8680 PR preprocessor/60723 - missing system-ness marks for macro tokens
8681 * c-ppoutput.c (struct print::prev_was_system_token): New data
8682 member.
8683 (init_pp_output): Initialize it.
8684 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8685 (do_line_change): Return a flag saying if a line marker was
8686 emitted or not.
8687 (scan_translation_unit): Detect if the system-ness of the token we
8688 are about to emit is different from the one of the previously
8689 emitted token. If so, emit a line marker. Avoid emitting useless
8690 adjacent line markers. Avoid emitting line markers for tokens
8691 originating from the expansion of built-in macros.
8692 (scan_translation_unit_directives_only): Adjust.
8693
4d661eaa
MP
86942014-07-15 Marek Polacek <polacek@redhat.com>
8695
8696 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8697 TYPE_MAX_VALUE is NULL.
8698
b108f48f
JJ
86992014-07-14 Jakub Jelinek <jakub@redhat.com>
8700
8701 PR middle-end/61294
8702 * c.opt (Wmemset-transposed-args): New warning.
8703
c0221884
JM
87042014-07-10 Jason Merrill <jason@redhat.com>
8705
8706 PR c++/61659
8707 PR c++/61687
8708 * c.opt (-fuse-all-virtuals): New.
8709
63dfbb95
RB
87102014-07-09 Richard Biener <rguenther@suse.de>
8711
8712 PR c-family/61741
8713 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8714 using unsigned arithmetic if overflow does not wrap instead of
8715 if overflow is undefined.
8716
773ec47f
MP
87172014-07-06 Marek Polacek <polacek@redhat.com>
8718
8719 PR c/6940
8720 * c.opt (Wsizeof-array-argument): New option.
8721
00a7ba58
JJ
87222014-07-03 Jakub Jelinek <jakub@redhat.com>
8723
b1726d6c 8724 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8725 comments->count <= 1, as comments->entries might be NULL.
8726
52ec0ea3
MP
87272014-07-01 Marek Polacek <polacek@redhat.com>
8728
8729 * c.opt (Wint-conversion): New option.
8730
d5c3d343
MP
87312014-07-01 Marek Polacek <polacek@redhat.com>
8732
8733 PR c/58286
8734 * c.opt (Wincompatible-pointer-types): New option.
8735
6e7ceb17
PC
87362014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8737
8738 PR c++/51400
8739 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8740 Do not discard TYPE_QUALS of type.
8741
da73100b
JM
87422014-06-26 Jason Merrill <jason@redhat.com>
8743
8744 * c-common.h (enum cxx_dialect): Add cxx1z.
8745 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8746 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8747
08eedf75
TJ
87482014-06-26 Teresa Johnson <tejohnson@google.com>
8749
8750 * c-common.h (get_dump_info): Declare.
8751 * c-gimplify.c (c_genericize): Use saved dump files.
8752 * c-opts.c (c_common_parse_file): Begin and end dumps
8753 once around parsing invocation.
8754 (get_dump_info): New function.
8755
7b56b2f8
MP
87562014-06-23 Marek Polacek <polacek@redhat.com>
8757 Andrew MacLeod <amacleod@redhat.com>
8758
8759 PR c/61553
8760 * c-common.c (get_atomic_generic_size): Don't segfault if the
8761 type doesn't have a size.
8762
0e37a2f3
MP
87632014-06-20 Marek Polacek <polacek@redhat.com>
8764
8765 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8766 (ubsan_walk_array_refs_r): New function.
8767 (c_genericize): Instrument array bounds.
8768 * c-ubsan.c: Include "internal-fn.h".
8769 (ubsan_instrument_division): Mark instrumented arrays as having
8770 side effects. Adjust ubsan_type_descriptor call.
8771 (ubsan_instrument_shift): Likewise.
8772 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8773 (ubsan_instrument_bounds): New function.
8774 (ubsan_array_ref_instrumented_p): New function.
8775 (ubsan_maybe_instrument_array_ref): New function.
8776 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8777 (ubsan_array_ref_instrumented_p): Declare.
8778 (ubsan_maybe_instrument_array_ref): Declare.
8779
87802014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8781
8782 PR lto/61123
8783 * c.opt (fshort-enums): Add to LTO.
8784 * c.opt (fshort-wchar): Likewise.
8785
5c3d09f7
MP
87862014-06-16 Marek Polacek <polacek@redhat.com>
8787
8788 PR c/60439
8789 * c.opt (Wswitch-bool): Add Var.
8790
9cf32741
JJ
87912014-06-12 Jakub Jelinek <jakub@redhat.com>
8792
8793 PR middle-end/61486
8794 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8795 #pragma omp target teams or
8796 #pragma omp {,target }teams distribute simd.
8797
62984918
JM
87982014-06-12 Jason Merrill <jason@redhat.com>
8799
8800 * c.opt (Wabi=, fabi-compat-version): New.
8801 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8802 (c_common_post_options): Handle flag_abi_compat_version default.
8803 Disallow -fabi-compat-version=1.
8804 * c-common.h (abi_version_crosses): New.
8805
f961457f
JH
88062014-06-11 Jan Hubicka <hubicka@ucw.cz>
8807
adfac8df 8808 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8809 section names that are no longer trees.
8810
92d28cbb
JJ
88112014-06-10 Jakub Jelinek <jakub@redhat.com>
8812
8813 PR fortran/60928
8814 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8815 (omp_pragmas): ... back here.
8816
742938c9
MP
88172014-06-05 Marek Polacek <polacek@redhat.com>
8818
8819 PR c/49706
8820 * c-common.c (warn_logical_not_parentheses): New function.
8821 * c-common.h (warn_logical_not_parentheses): Declare.
8822 * c.opt (Wlogical-not-parentheses): New option.
8823
9d548dfb
MP
88242014-06-04 Marek Polacek <polacek@redhat.com>
8825
8826 PR c/30020
8827 * c-common.c (check_case_bounds): Add location parameter.
8828 Use it.
8829 (c_add_case_label): Pass loc to check_case_bounds.
8830
fedfecef
MP
88312014-06-03 Marek Polacek <polacek@redhat.com>
8832
8833 PR c/60439
8834 * c.opt (Wswitch-bool): New option.
8835
f6a7cffc
TS
88362014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8837
040d18b6
TS
8838 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8839 Remove prototypes.
8840 (record_types_used_by_current_var_decl): Move prototype to where
8841 it belongs.
8842
f6a7cffc
TS
8843 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8844 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8845 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8846
632f2871
RS
88472014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8848
8849 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8850 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8851 void_zero_node.
8852 * c-pretty-print.c (pp_c_void_constant): New function.
8853 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8854 (c_pretty_printer::expression): Handle VOID_CST.
8855 * cilk.c (extract_free_variables): Likewise.
8856 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8857 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8858
766090c2
TS
88592014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8860
8861 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8862 * c-pragma.c (push_alignment): Adjust.
8863 (handle_pragma_push_options): Likewise.
8864
661a0813
MP
88652014-05-09 Marek Polacek <polacek@redhat.com>
8866
8867 PR c/50459
8868 * c-common.c (check_user_alignment): Return -1 if alignment is error
8869 node.
8870 (handle_aligned_attribute): Don't call default_conversion on
8871 FUNCTION_DECLs.
8872 (handle_vector_size_attribute): Likewise.
8873 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8874 (handle_sentinel_attribute): Call default_conversion and allow even
8875 integral types as an argument.
8876
2793eeab
MP
88772014-05-08 Marek Polacek <polacek@redhat.com>
8878
8879 PR c/61053
8880 * c-common.c (min_align_of_type): New function factored out from...
8881 (c_sizeof_or_alignof_type): ...here.
8882 * c-common.h (min_align_of_type): Declare.
8883
f827930a
MP
88842014-05-08 Marek Polacek <polacek@redhat.com>
8885
8886 PR c/61077
8887 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8888 parameter type of main.
8889
ca49b74e
DD
88902014-05-07 DJ Delorie <dj@redhat.com>
8891
8892 * c-cppbuiltin.c (print_bits_of_hex): New.
8893 (builtin_define_type_minmax): Print values using hex so as not to
8894 require a pre-computed list of string values.
8895
1d60af08
KZ
88962014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8897 Mike Stump <mikestump@comcast.net>
8898 Richard Sandiford <rdsandiford@googlemail.com>
8899
8900 * c-ada-spec.c: Include wide-int.h.
8901 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8902 (dump_generic_ada_node): Use wide-int interfaces.
8903 * c-common.c: Include wide-int-print.h.
8904 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8905 (pointer_int_sum): Use wide-int interfaces.
8906 (c_common_nodes_and_builtins): Use make_int_cst.
8907 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8908 (handle_alloc_size_attribute): Use wide-int interfaces.
8909 (get_nonnull_operand): Likewise.
8910 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8911 * c-lex.c: Include wide-int.h.
8912 (narrowest_unsigned_type): Take a widest_int rather than two
8913 HOST_WIDE_INTs.
8914 (narrowest_signed_type): Likewise.
8915 (interpret_integer): Update accordingly. Use wide-int interfaces.
8916 (lex_charconst): Use wide-int interfaces.
8917 * c-pretty-print.c: Include wide-int.h.
8918 (pp_c_integer_constant): Use wide-int interfaces.
8919 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8920 INT_CST_LT_UNSIGNED.
8921
b15458be
RB
89222014-05-06 Richard Biener <rguenther@suse.de>
8923
8924 * c-opts.c (c_common_post_options): For -freestanding,
8925 -fno-hosted and -fno-builtin disable pattern recognition
8926 if not enabled explicitely.
8927
6577374e
MP
89282014-05-02 Marek Polacek <polacek@redhat.com>
8929
8930 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8931
d00887e8
MP
89322014-05-01 Marek Polacek <polacek@redhat.com>
8933
8934 PR c/43245
8935 * c.opt (Wdiscarded-qualifiers): Add.
8936
f8ed5150
MP
89372014-04-30 Marek Polacek <polacek@redhat.com>
8938
8939 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8940 INT_MIN / -1 sanitization only for integer types.
8941
45484dcf
MP
89422014-04-25 Marek Polacek <polacek@redhat.com>
8943
8944 PR c/18079
8945 * c-common.c (handle_noinline_attribute): Warn if the attribute
8946 conflicts with always_inline attribute.
8947 (handle_always_inline_attribute): Warn if the attribute conflicts
8948 with noinline attribute.
8949
38e514c0
MP
89502014-04-25 Marek Polacek <polacek@redhat.com>
8951
8952 PR c/60156
8953 * c-common.c (check_main_parameter_types): Warn about variadic main.
8954
44875f92
MS
89552014-04-24 Mike Stump <mikestump@comcast.net>
8956
8957 * c.opt (Wshadow-ivar): Default to on.
8958
dcaaa5a0
DP
89592014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8960
8961 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8962
c07d7c02
MP
89632014-04-23 Marek Polacek <polacek@redhat.com>
8964
8965 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8966
1c33c9b7
JJ
89672014-04-22 Jakub Jelinek <jakub@redhat.com>
8968
8969 PR sanitizer/60275
8970 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8971 if flag_sanitize_undefined_trap_on_error.
8972 (ubsan_instrument_division, ubsan_instrument_shift,
8973 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8974 if !flag_sanitize_recover.
8975
793c625f
MG
89762014-04-22 Marc Glisse <marc.glisse@inria.fr>
8977
8978 PR libstdc++/43622
8979 * c-common.c (registered_builtin_types): Make non-static.
8980 * c-common.h (registered_builtin_types): Declare.
8981
b0f1bf36 89822014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8983 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8984
8985 PR c/60819
8986 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8987 apply may-alias the scalar pointer type when applicable.
8988
3b07fa4a
IZ
89892014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8990
8991 PR middle-end/60467
8992 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8993 as possible argument for Cilk_spawn.
8994
cbbd2b1c
TB
89952014-04-11 Tobias Burnus <burnus@net-b.de>
8996
8997 PR c/60194
8998 * c.opt (Wformat-signedness): Add
8999 * c-format.c(check_format_types): Use it.
9000
6415bd5d
JM
90012014-04-11 Jason Merrill <jason@redhat.com>
9002
9003 PR c++/57926
9004 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9005 default_conversion for an array argument.
9006
6525783a
MP
90072014-04-08 Marek Polacek <polacek@redhat.com>
9008
9009 PR sanitizer/60745
9010 * c-ubsan.c: Include asan.h.
9011 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9012
880a467b
NS
90132014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9014
9015 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9016
7b59ff2d
MP
90172014-04-02 Marek Polacek <polacek@redhat.com>
9018
9019 * c-common.h (c_expand_expr): Remove declaration.
9020
8edbfaa6
JJ
90212014-03-28 Jakub Jelinek <jakub@redhat.com>
9022
9023 PR c++/60689
9024 * c-common.c (add_atomic_size_parameter): When creating new
9025 params vector, push the size argument first.
9026
07d72e1d
JJ
90272014-03-26 Jakub Jelinek <jakub@redhat.com>
9028
9029 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9030 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9031 ubsan_create_data callers.
9032
b35e0fa0
JJ
90332014-03-22 Jakub Jelinek <jakub@redhat.com>
9034
9035 PR debug/60603
9036 * c-opts.c (c_finish_options): Restore cb_file_change call to
9037 <built-in>.
9038
39a1ebb3
JJ
90392014-03-13 Jakub Jelinek <jakub@redhat.com>
9040
9041 PR middle-end/36282
9042 * c-pragma.c (apply_pragma_weak): Only look at
9043 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9044 DECL_ASSEMBLER_NAME_SET_P (decl).
9045 (maybe_apply_pending_pragma_weaks): Exit early if
9046 vec_safe_is_empty (pending_weaks) rather than only when
9047 !pending_weaks.
9048 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9049 set assembler name back to NULL afterwards.
9050
a07f6ed2
JM
90512014-03-11 Jason Merrill <jason@redhat.com>
9052
9053 * c.opt: Add -std=gnu++14.
9054
75b107f5
IB
90552014-03-11 Ian Bolton <ian.bolton@arm.com>
9056
9057 * c-opts.c (c_common_post_options): Don't override
9058 -ffp-contract=fast if unsafe-math-optimizations is on.
9059
f42c637e
PM
90602014-03-08 Paulo Matos <paulo@matos-sorge.com>
9061
22b15758 9062 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9063
70e24808
JM
90642014-03-07 Jason Merrill <jason@redhat.com>
9065
9066 * c.opt: Add -std=c++14.
9067
3af9c5e9
MP
90682014-03-06 Marek Polacek <polacek@redhat.com>
9069
9070 PR c/60197
9071 * cilk.c (contains_cilk_spawn_stmt): New function.
9072 (contains_cilk_spawn_stmt_walker): Likewise.
9073 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9074 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9075
b3bdf019
JJ
90762014-03-03 Jakub Jelinek <jakub@redhat.com>
9077
9078 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9079 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9080 even when flag_preprocess_only.
9081
ca7e759d
JM
90822014-02-26 Jason Merrill <jason@redhat.com>
9083
9084 PR c++/59231
9085 PR c++/11586
9086 * c-common.c (shorten_compare): Don't check
9087 c_inhibit_evaluation_warnings.
9088
28e41874
JJ
90892014-02-19 Jakub Jelinek <jakub@redhat.com>
9090
cca615af
JJ
9091 PR c/37743
9092 * c-common.c (c_common_nodes_and_builtins): When initializing
9093 c_uint{16,32,64}_type_node, also set corresponding
9094 uint{16,32,64}_type_node to the same value.
9095
28e41874
JJ
9096 PR c++/60267
9097 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9098 for PRAGMA_IVDEP if flag_preprocess_only.
9099
c2bf53a1
JJ
91002014-02-12 Jakub Jelinek <jakub@redhat.com>
9101
9102 PR c/60101
9103 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9104 if false, add ADD itself, rather than vice versa.
9105 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9106 copy. For SAVE_EXPR, only call merge_tlist once.
9107
8fcbce72
JJ
91082014-02-08 Jakub Jelinek <jakub@redhat.com>
9109
9110 PR middle-end/60092
9111 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9112 and tree_to_uhwi.
9113 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9114 functions.
9115 (c_common_attribute_table): Add alloc_align and assume_aligned
9116 attributes.
9117
0a756a3f
MP
91182014-02-06 Marek Polacek <polacek@redhat.com>
9119
9120 PR c/60087
9121 * c-common.c (warn_for_sign_compare): Call warning_at with location
9122 instead of warning.
9123
7ec4847a
MP
91242014-02-05 Marek Polacek <polacek@redhat.com>
9125
9126 PR c/53123
9127 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9128 statement.
9129
66f20604
MP
91302014-02-04 Marek Polacek <polacek@redhat.com>
9131
9132 PR c/60036
9133 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9134 SAVE_EXPR.
9135
5d77fb19
MG
91362014-02-03 Marc Glisse <marc.glisse@inria.fr>
9137
9138 PR c++/53017
9139 PR c++/59211
9140 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9141 handle_vector_size_attribute, handle_nonnull_attribute): Call
9142 default_conversion on the attribute argument.
9143 (handle_nonnull_attribute): Increment the argument number.
9144
81e5eca8
MP
91452014-01-31 Marek Polacek <polacek@redhat.com>
9146
9147 PR c/59963
9148 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9149 build_function_call_vec.
9150 (resolve_overloaded_builtin): Likewise.
9151 * c-common.h (build_function_call_vec): Adjust declaration.
9152
68fca595
MP
91532014-01-30 Marek Polacek <polacek@redhat.com>
9154
9155 PR c/59940
9156 * c-common.h (unsafe_conversion_p): Adjust declaration.
9157 (warnings_for_convert_and_check): Likewise.
9158 (convert_and_check): Likewise.
9159 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9160 expansion_point_location_if_in_system_header on it.
9161 (warnings_for_convert_and_check): Add location parameter. Call
9162 expansion_point_location_if_in_system_header on it. Use it.
9163 (convert_and_check): Add location parameter. Use it.
9164 (conversion_warning): Likewise.
9165 (c_add_case_label): Adjust convert_and_check calls.
9166 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9167
b72271b9
BI
91682014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9169
9170 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9171 flag_cilkplus.
9172 * c-pragma.c (init_pragma): Likewise.
9173 * c.opt: Likewise.
9174
393e8e8b
MP
91752014-01-23 Marek Polacek <polacek@redhat.com>
9176
9177 PR c/59846
9178 * c-common.c (shorten_compare): Add location_t parameter.
9179 * c-common.h (shorten_binary_op): Adjust declaration.
9180
f04dda30
MP
91812014-01-23 Marek Polacek <polacek@redhat.com>
9182
9183 PR c/58346
9184 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9185 * c-common.h: Declare it.
9186
621955cb
EB
91872014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9188
9189 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9190 * c-ada-spec.c (dump_ads): Likewise.
9191 (cpp_check): Likewise.
9192 (dump_ada_specs): Likewise.
9193
91942014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9195
9196 PR c++/49718
9197 * c-common.c (handle_no_instrument_function_attribute): Allow
9198 no_instrument_function attribute in class member
9199 definition/declaration.
9200
241f845a
JJ
92012014-01-15 Jakub Jelinek <jakub@redhat.com>
9202
9203 PR c/58943
9204 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9205 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9206 being COMPOUND_EXPR.
9207 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9208 operand a SAVE_EXPR and second MODIFY_EXPR.
9209
e83b8e2e
JJ
92102014-01-09 Jakub Jelinek <jakub@redhat.com>
9211
9212 PR target/58115
9213 * c-pch.c (c_common_write_pch): Call
9214 prepare_target_option_nodes_for_pch.
9215
23a5b65a
RS
92162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9217
9218 Update copyright years
9219
f9030485
RS
92202014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9221
9222 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9223 the copyright notice.
9224
f2aa696b
EB
92252013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9226
9227 * c-ada-spec.c (print_constructor): New function.
9228 (print_destructor): Retrieve the origin of the destructor.
9229 (print_ada_declaration): Revamp handling of constructors/destructors.
9230
3f8257db 92312013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9232 Bill Maddox <maddox@google.com>
9233 Jason Merrill <jason@redhat.com>
9234
9235 * c.opt: Add -fdeclone-ctor-dtor.
9236 * c-opts.c (c_common_post_options): Default to on iff -Os.
9237
41958c28
BI
92382013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9239
9240 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9241 attribute.
9242 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9243 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9244 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9245 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9246 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9247 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9248 PRAGMA_CILK_CLAUSE_UNIFORM.
9249
b1726d6c 9250
12893402
BI
92512013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9252
9253 * cilk.c (cilk_outline): Made this function non-static.
9254 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9255 (create_cilk_wrapper): Added a new parameter: a function pointer.
9256 (c_install_body_w_frame_cleanup): Remove
9257 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9258 * c-common.h (cilk_outline): New prototype.
9259 (gimplify_cilk_spawn): Removed two parameters.
9260 (cilk_install_body_with_frame_cleanup): New prototype.
9261 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9262 CILK_SPAWN_STMT case.
9263
085b42ed
BS
92642013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9265
2ce064c3
BS
9266 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9267
085b42ed
BS
9268 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9269 (int_array_type_node): Remove.
9270 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9271
9e36c9ed
MP
92722013-12-05 Marek Polacek <polacek@redhat.com>
9273
9274 PR c/52023
9275 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9276 [ADJUST_FIELD_ALIGN].
9277
296674db
JM
92782013-12-04 Joseph Myers <joseph@codesourcery.com>
9279
9280 PR c/52023
9281 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9282 and check field alignment if set.
9283 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9284 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9285
b1726d6c 92862013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9287 Marek Polacek <polacek@redhat.com>
9288
9289 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9290 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9291
d7947e19
L
92922013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9293
9294 PR c/59309
9295 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9296 arguments.
9297
fad7652e
JJ
92982013-11-29 Jakub Jelinek <jakub@redhat.com>
9299
9300 PR c/59280
9301 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9302 goto invalid. If it is error_mark_node, don't issue further
9303 diagnostics.
9304
8b5e1202
SO
93052013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9306
9307 * c.opt (Wopenmp-simd): New.
9308
0a508bb6
JJ
93092013-11-22 Jakub Jelinek <jakub@redhat.com>
9310
9311 * c-ubsan.h (ubsan_instrument_return): New prototype.
9312 * c-ubsan.c (ubsan_instrument_return): New function.
9313
2fb9a547
AM
93142013-11-22 Andrew MacLeod <amacleod@redhat.com>
9315
9316 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9317 * c-gimplify.c: Likewise.
9318 * cilk.c: Likewise.
2fb9a547 9319
8400e75e
DM
93202013-11-22 David Malcolm <dmalcolm@redhat.com>
9321
9322 * c-common.c (unsafe_conversion_p): Remove use of
9323 EXPR_LOC_OR_HERE macro.
9324 (conversion_warning): Likewise.
9325 (warnings_for_convert_and_check): Likewise.
9326 (warn_for_collisions_1): Likewise.
9327 (shorten_compare): Likewise, and remove use of in_system_header
9328 macro, using the location from the former.
9329 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9330 (cb_def_pragma): Remove use of in_system_header macro.
9331 (lex_string): Likewise.
9332 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9333
eb1ce453
KZ
93342013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9335 Mike Stump <mikestump@comcast.net>
9336 Richard Sandiford <rdsandiford@googlemail.com>
9337
9338 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9339 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9340 tree_fits_shwi_p or tree_fits_uhwi_p.
9341 (dump_generic_ada_node): Likewise.
9342 * c-format.c (check_format_arg): Likewise.
9343 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9344
6b3b8c27
KZ
93452013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9346
9347 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9348
49b0aa18
JC
93492013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9350
9351 PR c/53001
9352 * c-common.c (unsafe_conversion_p): Make this function
9353 return an enumeration with more detail.
9354 (conversion_warning): Use the new return type of
9355 unsafe_conversion_p to separately warn either about conversions
9356 that lower floating point number precision or about the other
9357 kinds of conversions.
9358 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9359 (unsafe_conversion_p): switching return type to
9360 conversion_safety enumeration.
49b0aa18
JC
9361 * c.opt: Adding new warning -Wfloat-conversion and
9362 enabling it with -Wconversion.
9363
b826515a
BS
93642013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9365
8e745a17
JJ
9366 * c-opts.c: Include plugin.h.
9367 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9368
b9a55b13
MP
93692013-11-19 Marek Polacek <polacek@redhat.com>
9370
9371 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9372 call.
9373 (ubsan_instrument_shift): Likewise.
9374 (ubsan_instrument_vla): Likewise.
9375
7d362f6c
RS
93762013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9377
9378 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9379 cast to unsigned type.
9380
386b1f1f
RS
93812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9382
9383 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9384 tree_low_cst.
9385 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9386 rather than tree_low_cst.
9387
ae7e9ddd
RS
93882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9389
9390 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9391 tree_to_uhwi throughout.
9392
9439e9a1
RS
93932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9394
9395 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9396 tree_low_cst (..., 0) with tree_to_shwi throughout.
9397
cc269bb6
RS
93982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9399
9400 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9401 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9402
9541ffee
RS
94032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9404
9405 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9406 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9407
c02065fc
AH
94082013-11-15 Aldy Hernandez <aldyh@redhat.com>
9409
9410 * c-cilkplus.c: New file.
9411 * c-common.c (readonly_error): Add location argument.
9412 * c-common.h (readonly_error): Same.
9413 (c_finish_cilk_clauses): Protoize.
9414 (c_check_cilk_loop): Same.
9415 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9416 Do not fail on error_mark_node.
9417 Abstract increment canonicalization to here...
9418 (c_omp_for_incr_canonicalize_ptr): New.
9419 c-pragma.c (init_pragma): Register "simd" pragma.
9420 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9421 (enum pragma_cilk_clause): New.
9422
9cc65f15
RS
94232013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9424
9425 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9426 wchar_type and host_integerp checks.
9427
18f429e2
AM
94282013-11-14 Andrew MacLeod <amacleod@redhat.com>
9429
9430 * c-common.c: Likewise.
9431 * c-gimplify.c: Likewise.
9432 * cilk.c: Likewise.
9433
d8a2d370
DN
94342013-11-14 Diego Novillo <dnovillo@google.com>
9435
9436 * c-common.c: Include fold-const.h.
9437 Include stor-layout.h.
9438 Include calls.h.
9439 Include stringpool.h.
9440 Include attribs.h.
9441 Include varasm.h.
9442 Include trans-mem.h.
9443 * c-cppbuiltin.c: Include stor-layout.h.
9444 Include stringpool.h.
9445 * c-format.c: Include stringpool.h.
9446 * c-lex.c: Include stringpool.h.
9447 Include stor-layout.h.
9448 * c-pragma.c: Include stringpool.h.
9449 Include attribs.h.
9450 Include varasm.h.
9451 Include gcc-symtab.h.
9452 * c-pretty-print.c: Include stor-layout.h.
9453 Include attribs.h.
9454 * cilk.c: Include stringpool.h.
9455 Include calls.h.
9456
38b7bc7f
JM
94572013-11-13 Joseph Myers <joseph@codesourcery.com>
9458
9459 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9460 * c-common.c (c_common_reswords): Add __auto_type.
9461 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9462
45b0be94
AM
94632013-11-12 Andrew MacLeod <amacleod@redhat.com>
9464
18f429e2
AM
9465 * c-common.c: Include gimplify.h.
9466 * c-gimplify.c: Likewise.
9467 * cilk.c: Likewise.
9468 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9469 * c-ubsan.c: Don't include gimple.h.
45b0be94 9470
582d9b50
JM
94712013-11-12 Joseph Myers <joseph@codesourcery.com>
9472
9473 * c-common.c (c_common_reswords): Add _Thread_local.
9474
6b28e197
JM
94752013-11-09 Joseph Myers <joseph@codesourcery.com>
9476
9477 * c-common.c (atomic_size_supported_p): New function.
9478 (resolve_overloaded_atomic_exchange)
9479 (resolve_overloaded_atomic_compare_exchange)
9480 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9481 Use it instead of comparing size with a local list of sizes.
9482
267bac10
JM
94832013-11-07 Andrew MacLeod <amacleod@redhat.com>
9484 Joseph Myers <joseph@codesourcery.com>
9485
9486 * c-common.h (enum rid): Add RID_ATOMIC.
9487 * c-common.c (c_common_reswords): Add _Atomic.
9488 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9489 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9490 * c-format.c (check_format_types): Check for extra _Atomic
9491 qualifiers in format argument.
9492 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9493 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9494
5157b91e
TB
94952013-11-06 Tobias Burnus <burnus@net-b.de>
9496
9497 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9498
6dbe0958
JM
94992013-11-06 Joseph Myers <joseph@codesourcery.com>
9500
9501 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9502 standards modes.
9503 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9504 to mean lack of IEEE 754 support.
9505
e8ff5196
TB
95062013-11-05 Tobias Burnus <burnus@net-b.de>
9507
9508 * c.opt (-Wdate-time): New option
9509 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9510
254a0760
JM
95112013-11-05 Joseph Myers <joseph@codesourcery.com>
9512
9513 * c-cppbuiltin.c (cpp_iec_559_value): Test
9514 flag_excess_precision_cmdline not flag_excess_precision.
9515
6d7f7e0a
TB
95162013-11-05 Tobias Burnus <burnus@net-b.de>
9517
9518 * c.opt (fopenmp-simd): New option.
9519 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9520 (omp_pragmas): ... this new struct.
9521 (c_pp_lookup_pragma): Also walk omp_pragmas.
9522 (init_pragma): Init pragmas for -fopenmp-simd.
9523
55a7f02f
MP
95242013-11-04 Marek Polacek <polacek@redhat.com>
9525
9526 PR c++/58979
9527 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9528
9193fb05
JM
95292013-11-04 Joseph Myers <joseph@codesourcery.com>
9530
9531 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9532 New functions.
9533 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9534
94159ecf
EB
95352013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9536
9537 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9538 (dump_ada_specs): Adjust prototype of second callback.
9539 * c-ada-spec.c (cpp_check): New global variable.
9540 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9541 (print_generic_ada_decl): Likewise.
9542 (has_static_fields): Change return type to bool and add guard.
9543 (has_nontrivial_methods): New predicate.
9544 (is_tagged_type): Change return type to bool.
9545 (separate_class_package): Call has_nontrivial_methods.
9546 (pp_ada_tree_identifier): Minor tweaks.
9547 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9548 (dump_ada_array_domains): Likewise.
9549 (dump_ada_array_type): Likewise.
9550 (dump_template_types): Remove cpp_check parameter and do not pass it to
9551 dump_generic_ada_node.
9552 (dump_ada_template): Likewise.
9553 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9554 recursively.
9555 (print_ada_methods): Change return type to integer. Remove cpp_check
9556 parameter and do not pass it down.
9557 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9558 dump_generic_ada_node.
9559 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9560 accessing methods.
9561 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9562 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9563 value of print_ada_methods.
9564 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9565 Set cpp_check to it before invoking dump_ada_nodes.
9566 (dump_ada_specs): Likewise.
9567
b906f4ca
MP
95682013-11-03 Marek Polacek <polacek@redhat.com>
9569
9570 * c-ubsan.c: Don't include hash-table.h.
9571 (ubsan_instrument_vla): New function.
9572 * c-ubsan.h: Declare it.
9573
5e20cdc9
DM
95742013-10-31 David Malcolm <dmalcolm@redhat.com>
9575
9576 Automated part of renaming of symtab_node_base to symtab_node.
9577
9578 Patch autogenerated by rename_symtab.py from
9579 https://github.com/davidmalcolm/gcc-refactoring-scripts
9580 revision 58bb219cc090b2f4516a9297d868c245495ee622
9581
9582 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9583 symtab_node_base to symtab_node.
9584
7057e645
ESR
95852013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9586
8e745a17 9587 Implement C++14 digit separators.
7057e645
ESR
9588 * c-lex.c (interpret_float): Remove digit separators from scratch string
9589 before building real literal.
9590
193ea7bc
JJ
95912013-10-30 Jakub Jelinek <jakub@redhat.com>
9592
9593 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9594
939b37da
BI
95952013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9596
9597 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9598 fields.
9599 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9600 enabled.
9601 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9602 (insert_cilk_frame): New prototype.
9603 (cilk_init_builtins): Likewise.
9604 (gimplify_cilk_spawn): Likewise.
9605 (c_cilk_install_body_w_frame_cleanup): Likewise.
9606 (cilk_detect_spawn_and_unwrap): Likewise.
9607 (cilk_set_spawn_marker): Likewise.
9608 (build_cilk_sync): Likewise.
9609 (build_cilk_spawn): Likewise.
9610 * cilk.c: New file.
9611
67348ccc
DM
96122013-10-29 David Malcolm <dmalcolm@redhat.com>
9613
9614 Patch autogenerated by refactor_symtab.py from
9615 https://github.com/davidmalcolm/gcc-refactoring-scripts
9616 revision 58bb219cc090b2f4516a9297d868c245495ee622
9617
9618 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9619 to a true class hierarchy.
9620 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9621
d570872d
RS
96222013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9623
9624 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9625
98906124
JL
96262013-10-26 Jeff Law <law@redhat.com>
9627
adfac8df
JJ
9628 * c-common.c (c_define_builtins): Remove mudflap support.
9629 * c.opt: Ignore and warn for mudflap options.
98906124 9630
d73749df 96312013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9632
9633 PR other/33426
9634 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9635 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9636
3f04b1bb
JM
96372013-10-23 Jason Merrill <jason@redhat.com>
9638
9639 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9640
acf0174b
JJ
96412013-10-11 Jakub Jelinek <jakub@redhat.com>
9642
acd15a28
JJ
9643 * c-common.h (omp_clause_mask::operator !=): New method.
9644 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9645 instead of if (mask & something) tests everywhere.
9646
acf0174b
JJ
9647 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9648 201307 instead of 201107.
9649 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9650 (c_common_attribute_table): Add "omp declare target" and
9651 "omp declare simd" attributes.
9652 (handle_omp_declare_target_attribute,
9653 handle_omp_declare_simd_attribute): New functions.
9654 * c-omp.c: Include c-pragma.h.
9655 (c_finish_omp_taskgroup): New function.
9656 (c_finish_omp_atomic): Add swapped argument, if true,
9657 build the operation first with rhs, lhs arguments and use NOP_EXPR
9658 build_modify_expr.
9659 (c_finish_omp_for): Add code argument, pass it down to make_code.
9660 (c_omp_split_clauses): New function.
9661 (c_split_parallel_clauses): Removed.
9662 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9663 c_omp_declare_simd_clauses_to_decls): New functions.
9664 * c-common.h (omp_clause_mask): New type.
9665 (OMP_CLAUSE_MASK_1): Define.
9666 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9667 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9668 omp_clause_mask::operator |, omp_clause_mask::operator &,
9669 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9670 omp_clause_mask::operator ==): New methods.
9671 (enum c_omp_clause_split): New.
9672 (c_finish_omp_taskgroup): New prototype.
9673 (c_finish_omp_atomic): Add swapped argument.
9674 (c_finish_omp_for): Add code argument.
9675 (c_omp_split_clauses): New prototype.
9676 (c_split_parallel_clauses): Removed.
9677 (c_omp_declare_simd_clauses_to_numbers,
9678 c_omp_declare_simd_clauses_to_decls): New prototypes.
9679 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9680 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9681 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9682 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9683 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9684 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9685 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9686 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9687 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9688 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9689 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9690 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9691 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9692 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9693 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9694 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9695 PRAGMA_OMP_CLAUSE_UNIFORM.
9696
826cacfe
MG
96972013-10-09 Marc Glisse <marc.glisse@inria.fr>
9698
9699 PR tree-optimization/20318
9700 * c-common.c (handle_returns_nonnull_attribute): New function.
9701 (c_common_attribute_table): Add returns_nonnull.
9702
2284b034
MG
97032013-10-03 Marc Glisse <marc.glisse@inria.fr>
9704
9705 PR c++/19476
9706 * c.opt (fcheck-new): Move to common.opt.
9707
b56e9788
MP
97082013-09-25 Marek Polacek <polacek@redhat.com>
9709 Jakub Jelinek <jakub@redhat.com>
9710
9711 PR sanitizer/58413
9712 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9713 an expression if we can prove it is correct.
9714 (ubsan_instrument_division): Likewise. Remove unnecessary
9715 check.
9716
ce6923c5
MP
97172013-09-18 Marek Polacek <polacek@redhat.com>
9718
9719 PR sanitizer/58411
9720 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9721 Declare it.
9722 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9723
fb5610fb
IS
97242013-09-14 Iain Sandoe <iain@codesourcery.com>
9725
9726 PR target/48094
9727 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9728 fobjc-gc, freplace-objc-classes): Accept for LTO.
9729
88b0e79e
JC
97302013-09-13 Jacek Caban <jacek@codeweavers.com>
9731
9732 * c-target.def: New hook
9733
c9b0866a
PC
97342013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9735
9736 PR c++/43452
9737 * c.opt (Wdelete-incomplete): Add.
9738
0af94e6f
JR
97392013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9740
9741 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9742 (vector_types_compatible_elements_p): New function.
9743 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9744 declaration.
9745 (vector_types_compatible_elements_p): Declare.
9746
7c26172c
GDR
97472013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9748
9749 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9750 a virtual member function.
9751 (pp_simple_type_specifier): Remove.
9752 (pp_c_type_specifier): Likewise.
9753 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9754 Rename from pp_c_type_specifier. Adjust.
9755 (c_pretty_printer::c_pretty_printer): Do not assign to
9756 simple_type_specifier.
9757
20059c8b
GDR
97582013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9759
9760 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9761 member function.
9762 (c_pretty_printer::storage_class_specifier): Likewise.
9763 (c_pretty_printer::initializer): Likewise.
9764 (pp_declaration): Remove.
9765 (pp_declaration_specifiers): Likewise.
9766 (pp_abstract_declarator): Likewise.
9767 (pp_declarator): Likewise.
9768 (pp_type_id): Likewise.
9769 (pp_statement): Likewise.
9770 (pp_constant): Likewise.
9771 (pp_id_expression): Likewise.
9772 (pp_primary_expression): Likewise.
9773 (pp_unary_expression): Likewise.
9774 (pp_multiplicative_expression): Likewise.
9775 (pp_conditional_expression): Likewise.
9776 (pp_assignment_expression): Likewise.
9777 (pp_expression): Likewise.
9778 (pp_c_type_id): Likewise.
9779 (pp_c_storage_class_specifier): Likewise.
9780 * c-pretty-print.c (pp_c_type_cast): Tidy.
9781 (pp_c_pointer): Likewise.
9782 (pp_c_type_specifier): Likewise.
9783 (pp_c_parameter_type_list): Likewise.
9784 (pp_c_function_definition): Likewise.
9785 (pp_c_init_declarator): Likewise.
9786 (pp_c_initializer_list): Likewise.
9787 (pp_c_constructor_elts): Likewise.
9788 (c_pretty_printer::direct_abstract_declarator): Likewise.
9789 (c_pretty_printer::declaration_specifiers): Likewise.
9790 (c_pretty_printer::primary_expression): Likewise.
9791 (c_pretty_printer::postfix_expression): Likewise.
9792 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9793 (c_pretty_printer::storage_class_specifier): Rename from
9794 pp_c_storage_class_specifier.
9795 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9796 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9797 storage_class_specifier, initializer, offset_list, flags.
9798
de5a5fa1
MP
97992013-08-30 Marek Polacek <polacek@redhat.com>
9800
9801 * c-ubsan.c: New file.
9802 * c-ubsan.h: New file.
9803
8f0e4d72
GDR
98042013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9805
9806 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9807 member function.
9808 (c_pretty_printer::declaration_specifiers): Likewise.
9809 (c_pretty_printer::declarator): Likewise.
9810 (c_pretty_printer::abstract_declarator): Likewise.
9811 (c_pretty_printer::direct_abstract_declarator): Likewise.
9812 (c_pretty_printer::direct_declarator): Likewise.
9813 (c_pretty_printer::function_specifier): Likewise.
9814 (pp_declaration): Adjust.
9815 (pp_declaration_specifiers): Likewise.
9816 (pp_abstract_declarator): Likewise.
9817 (pp_direct_declarator): Likewise.
9818 (pp_function_specifier): Likewise.
9819 (pp_direct_abstract_declarator): Remove as unused.
9820 (pp_c_declaration): Remove.
9821 (pp_c_declaration_specifiers): Likewise.
9822 (pp_c_declarator): Likewise.
9823 (pp_c_direct_declarator): Likewise.
9824 (pp_c_function_specifier): Likewise.
9825 (pp_c_direct_abstract_declarator): Likewise.
9826 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9827 from pp_c_abstract_declarator. Adjust.
ab20d992 9828 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9829 pp_c_direct_abstract_declarator. Adjust.
9830 (c_pretty_printer::function_specifier): Rename from
9831 pp_c_function_specifier. Adjust.
9832 (c_pretty_printer::declaration_specifiers): Rename from
9833 pp_c_declaration_specifiers. Adjust.
9834 (c_pretty_printer::direct_declarator): Rename from
9835 pp_c_direct_declarator. Adjust.
9836 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9837 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9838 (c_pretty_printer::c_pretty_printer): Do not assign to
9839 declaration, declaration_specifiers, declarator,
9840 direct_declarator, direct_abstract_declarator, function_specifier.
9841
00d34d3a
GDR
98422013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9843
9844 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9845 virtual member function.
9846 (c_pretty_printer::multiplicative_expression): Likewise.
9847 (c_pretty_printer::conditional_expression): Likewise.
9848 (c_pretty_printer::assignment_expression): Likewise.
9849 (c_pretty_printer::expression): Likewise.
9850 (pp_unary_expression): Adjust.
9851 (pp_multiplicative_expression): Likewise.
9852 (pp_assignment_expression): Likewise.
9853 (pp_conditional_expression): Likewise.
9854 (pp_expression): Likewise.
9855 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9856 from pp_c_unary_expression. Adjust.
9857 (c_pretty_printer::multiplicative_expression): Rename from
9858 pp_c_multiplicative_expression. Adjust.
9859 (c_pretty_printer::conditional_expression): Rename from
9860 pp_c_conditional_expression. Adjust.
9861 (c_pretty_printer::assignment_expression): Rename from
9862 pp_c_assignment_expression. Adjust.
9863 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9864 (c_pretty_printer::c_pretty_printer): Do not assign to
9865 unary_expression, multiplicative_expression,
9866 conditional_expression, expression.
9867
fb22178f
GDR
98682013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9869
9870 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9871 virtual member function.
9872 (pp_postfix_expression): Adjust.
9873 (pp_c_postfix_expression): Remove.
9874 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9875 from pp_c_postfix_expression. Adjust.
9876 (c_pretty_printer::c_pretty_printer): Do not assign to
9877 postfix_expression.
9878
7ecc2600
GDR
98792013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9880
9881 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9882 virtua member function.
9883 (pp_primary_expression): Adjust.
9884 (pp_c_primary_expression): Remove.
9885 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9886 from pp_c_primary_expression. Adjust.
9887 (pp_c_initializer_list): Use pp_primary_expression.
9888 (c_pretty_printer::c_pretty_printer): Do not assign to
9889 primary_expression.
9890
0691175f
GDR
98912013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9892
9893 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9894 * c-pretty-print.c (M_): Remove.
9895 (c_pretty_printer::translate_string): Define.
9896 (pp_c_type_specifier): Use it.
9897 (pp_c_primary_expression): Likewise.
9898 (pp_c_expression): Likewise.
9899
66dfe4c4
GDR
99002013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9901
9902 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9903 virtual function.
9904 (pp_c_id_expression): Remove.
9905 (pp_id_expression): Adjust.
9906 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9907 pp_c_id_expression. Adjust.
9908 (pp_c_postfix_expression): Use pp_id_expression.
9909 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9910
ca43e9d5
GDR
99112013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9912
9913 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9914 member function.
9915 (pp_constant): Adjust.
9916 (pp_c_constant): Remove.
9917 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9918 pp_c_constant. Adjust.
9919 (pp_c_constant)
9920 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9921 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9922
da6ca2b5
GDR
99232013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9924
9925 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9926 (c_pretty_printer::c_pretty_printer): Declare.
9927 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9928 c_pretty_printer_init. Adjust.
9929 (print_c_tree): Do not call c_pretty_printer_init.
9930 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9931
65a372f4
AC
99322013-08-09 Arnaud Charlet <charlet@adacore.com>
9933
9934 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9935
fd9b0f32
PC
99362013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9937
9938 PR c++/58080
9939 * c-common.c (pointer_int_sum): Add bool parameter.
9940 * c-common.h (pointer_int_sum): Adjust declaration.
9941
e0aec1e9
GDR
99422013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9943
9944 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9945 c_pretty_printer variable.
9946
b066401f
GDR
99472013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9948
9949 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9950 (pp_base): Remove.
9951 (pp_c_base): Likewise. Adjust users.
9952 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9953 (pp_c_whitespace): Do not call pp_base.
9954 (pp_c_left_paren): Likewise.
9955 (pp_c_right_paren): Likewise.
9956 (pp_c_left_brace): Likewise.
9957 (pp_c_right_brace): Likewise.
9958 (pp_c_left_bracket): Likewise.
9959 (pp_c_right_bracket): Likewise.
9960 (pp_c_dot): Likewise.
9961 (pp_c_ampersand): Likewise.
9962 (pp_c_star): Likewise.
9963 (pp_c_arrow): Likewise.
9964 (pp_c_semicolon): Likewise.
9965 (pp_c_complement): Likewise.
9966 (pp_c_exclamation): Likewise.
9967 (pp_c_direct_declarator): Likewise.
9968 (pp_c_ws_string): Likewise.
9969 (pp_c_identifier): Likewise.
9970 (pp_c_statement): Likewise.
9971 (print_c_tree): Likewise.
9972
65e5a578
ESR
99732013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9974
9975 PR c++/58072
9976 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9977 provide useful error strings.
9978
137a1a27
GDR
99792013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9980
9981 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9982 printer functions instead of pp_string or operators and punctuators.
9983 (dump_generic_ada_node): Likewise.
9984 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9985 (pp_c_relational_expression): Likewise.
9986 (pp_c_logical_or_expression): Likewise.
9987
07838b13
GDR
99882013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9989
9990 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9991 functions instead of pp_character.
9992 (pp_ada_tree_identifier): Likewise.
9993 (dump_ada_double_name): Likewise.
9994 (dump_ada_function_declaration): Likewise.
9995 (dump_ada_array_domains): Likewise.
9996 (dump_template_types): Likewise.
9997 (dump_generic_ada_node): Likewise.
9998 (print_ada_declaration): Likewise.
9999 (print_ada_struct_decl): Likewise.
10000 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10001
433cc7b0
TT
100022013-07-23 Tom Tromey <tromey@redhat.com>
10003
10004 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10005 * c-common.c (c_common_reswords): Add _Generic.
10006
688010ba
OB
100072013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10008
10009 * c-common.c: Fix typos.
10010 * c-common.h: Likewise.
10011
2a99e5e6
LL
100122013-07-13 Lubos Lunak <l.lunak@suse.cz>
10013
10014 PR c++/55203
10015 * c-common.c (c_common_attribute_table): Add warn_unused.
10016 (handle_warn_unused_attribute): New.
10017
c26302d5
JJ
100182013-07-10 Jakub Jelinek <jakub@redhat.com>
10019
10020 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10021 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10022
dfeadaa0
PC
100232013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10024
10025 PR c++/57869
10026 * c.opt: Add Wconditionally-supported.
10027
6a2fa4b2
GS
100282013-07-08 Graham Stott <graham.stott@btinternet.com>
10029
adfac8df 10030 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10031 unused variables l_length and l_node.
10032
ecdbd01a 100332013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10034
10035 PR c/57821
10036 * c-common.c (complete_array_type): Delay folding first index
10037 like other indices. When folding, check for index overflow.
10038
bedc293e
MG
100392013-06-27 Marc Glisse <marc.glisse@inria.fr>
10040
10041 PR c++/57509
10042 * c-common.h (c_build_vec_perm_expr): New complain argument.
10043 * c-common.c (c_build_vec_perm_expr): Likewise.
10044 Use save_expr also in C++.
10045
604b2bfc
GDR
100462013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10047
10048 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10049 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10050 * c-opts.c (c_common_post_options): Likewise.
10051
dfeadaa0 100522013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10053
10054 * array-notation-common.c (length_mismatch_in_expr): Changed the
10055 parameter type's from a dynamic array to a vec_tree. Also removed
10056 the size parameters.
10057 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10058 the change above.
10059
2ce86d2e
BI
100602013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10061
10062 * c-common.h (struct cilkplus_an_parts): New structure.
10063 (struct cilkplus_an_loop_parts): Likewise.
10064 (cilkplus_extract_an_triplets): New prototype.
10065 (fix_sec_implicit_args): Likewise.
10066 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10067 (fix_sec_implicit_args): Likewise.
604b2bfc 10068
07a6825b
BI
100692013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10070
10071 * array-notation-common.c (find_inv_trees): Removed an unwanted
10072 typecasting.
10073 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10074 enum rid to enum tree_code.
10075
08346abd
JH
100762013-06-11 Jan Hubicka <jh@suse.cz>
10077
10078 * c-common.c (handle_alias_ifunc_attribute): Do not set
10079 DECL_EXTERNAL for weakref variables.
10080 * c-pragma.c (handle_pragma_weak): Make sure aliases
10081 are not declared as external.
10082
d60f1706
BI
100832013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10084
10085 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10086 function from c/c-array-notation.c.
10087 (is_cilkplus_reduce_builtin): Likewise.
10088 (find_rank): Likewise.
10089 (extract_array_notation_exprs): Likewise.
10090 (replace_array_notations): Likewise.
10091 (find_inv_trees): Likewise.
10092 (replace_inv_trees): Likewise.
10093 (contains_array_notation_expr): Likewise.
10094 (find_correct_array_notation_type): Likewise.
10095 * c-common.h (struct inv_list): Moved this struct from the file
10096 c/c-array-notation.c and added a new field called additional tcodes.
10097 (length_mismatch_in_expr_p): New prototype.
10098 (is_cilkplus_reduce_builtin): Likewise.
10099 (find_rank): Likewise.
10100 (extract_array_notation_exprs): Likewise.
10101 (replace_array_notation): Likewise.
10102 (find_inv_trees): Likewise.
10103 (replace_inv_trees): Likewise.
10104 (find_correct_array_notation_type): Likewise.
dfeadaa0 10105
36536d79
BI
101062013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10107
10108 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10109 function array_notation_init_builtins is called.
10110 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10111 * c-common.def (ARRAY_NOTATION_REF): New tree.
10112 * c-common.h (build_array_notation_expr): New function declaration.
10113 (build_array_notation_ref): Likewise.
10114 (extract_sec_implicit_index_arg): New extern declaration.
10115 (is_sec_implicit_index_fn): Likewise.
10116 (ARRAY_NOTATION_CHECK): New define.
10117 (ARRAY_NOTATION_ARRAY): Likewise.
10118 (ARRAY_NOTATION_START): Likewise.
10119 (ARRAY_NOTATION_LENGTH): Likewise.
10120 (ARRAY_NOTATION_STRIDE): Likewise.
10121 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10122 ARRAY_NOTATION_REF.
10123 (pp_c_expression): Likewise.
10124 * c.opt (flag_enable_cilkplus): New flag.
10125 * array-notation-common.c: New file.
10126
f7716d57
JJ
101272013-05-14 Jakub Jelinek <jakub@redhat.com>
10128
10129 PR c++/57274
10130 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10131
a5e0cd1d
MG
101322013-05-10 Marc Glisse <marc.glisse@inria.fr>
10133
10134 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10135 vectors.
10136
f6bc1c4a
HS
101372013-05-07 Han Shen <shenhan@google.com>
10138
10139 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10140
3f12f6e9
SKS
101412013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10142
10143 * c-common.c (check_user_alignment): Emit error for negative values.
10144
61949153
PC
101452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10146
10147 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10148
e93e18e9
PC
101492013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10150
10151 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10152 __GXX_EXPERIMENTAL_CXX1Y__.
10153
44d90fe1 101542013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10155 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10156
10157 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10158 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10159 to simply use OPT_Wpointer_arith.
10160 (c_sizeof_or_alignof_type): Likewise.
10161
13f39b2e
PC
101622013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10163
10164 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10165
4b84d650
JJ
101662013-04-12 Jakub Jelinek <jakub@redhat.com>
10167
10168 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10169 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10170 specifiers.
10171
fb037b5d
SB
101722013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10173
10174 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10175
4e856798
PC
101762013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10177
10178 * c-common.c (pointer_int_sum): Remove dead code.
10179
4b1baac8
RS
101802013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10181
10182 PR middle-end/56524
10183 * c-common.c (handle_optimize_attribute): Don't call
10184 save_optabs_if_changed.
10185
0b50e654
JJ
101862013-03-05 Jakub Jelinek <jakub@redhat.com>
10187
10188 PR middle-end/56461
10189 * c-pch.c (pch_init): Free target_validity at the end.
10190
48c41403
JJ
101912013-03-04 Jakub Jelinek <jakub@redhat.com>
10192
10193 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10194
e664c61c
KS
101952013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10196 Jakub Jelinek <jakub@redhat.com>
10197
10198 PR sanitizer/56454
10199 * c-common.c (handle_no_sanitize_address_attribute): New function.
10200 (c_common_attribute_table): Add no_sanitize_address attribute.
10201 (handle_no_address_safety_analysis_attribute): Add
10202 no_sanitize_address attribute, not no_address_safety_analysis
10203 attribute.
10204
a475fd3d 102052013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10206
10207 PR target/52555
10208 * c-common.c (handle_optimize_attribute): Call
10209 save_optabs_if_changed.
10210
f6007d99
JJ
102112013-02-18 Jakub Jelinek <jakub@redhat.com>
10212 Steven Bosscher <steven@gcc.gnu.org>
10213
10214 PR pch/54117
10215 * c-opts.c (c_common_post_options): If debug info is enabled
10216 and non-dwarf*, refuse to load PCH files and when writing PCH
10217 file warn.
10218
cf35e2b1
JJ
102192013-02-05 Jakub Jelinek <jakub@redhat.com>
10220
10221 PR middle-end/56167
10222 * c-common.c (handle_error_attribute): Fix condition.
10223
32887460
JJ
102242013-01-30 Jakub Jelinek <jakub@redhat.com>
10225
10226 PR c++/55742
10227 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10228
5af057d8
JM
102292013-01-18 Jason Merrill <jason@redhat.com>
10230
10231 PR target/54908
10232 * c.opt (-fextern-tls-init): New.
10233 * c-opts.c (c_common_post_options): Handle it.
10234
cc83c823
JJ
102352013-01-09 Jakub Jelinek <jakub@redhat.com>
10236
10237 PR c/48418
10238 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10239 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10240 and is either negative or bigger or equal to type precision
10241 of the first operand.
10242
a859517f
MP
102432012-12-03 Marek Polacek <polacek@redhat.com>
10244
10245 PR c/55570
10246 * c-common.c (check_user_alignment): Swap order of tests,
10247 check TREE_CODE first.
10248
2d7aa578
ESR
102492012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10250
10251 PR c++/52654
10252 * c-common.h (overflow_type): New enum.
10253 (build_userdef_literal): Add overflow_type argument.
10254 (tree_userdef_literal): Add overflow_type.
10255 (USERDEF_LITERAL_OVERFLOW): New access macro.
10256 * c-common.c (build_userdef_literal): Add overflow_type
10257 argument.
10258 * c-lex.c (c_lex_with_flags): Add overflow_type to
10259 build_userdef_literal calls.
10260 (interpret_integer, interpret_float): Add overflow_type argument.
10261
cc3c4f62
RB
102622012-11-28 Richard Biener <rguenther@suse.de>
10263
10264 PR c/35634
10265 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10266 here and use a type with proper overflow behavior for types that would
10267 need to be promoted for the arithmetic.
10268
77bc5132
JJ
102692012-11-23 Jakub Jelinek <jakub@redhat.com>
10270
10271 PR sanitizer/55435
10272 * c-common.c (handle_no_address_safety_analysis_attribute): New
10273 function.
10274 (c_common_attribute_table): Add no_address_safety_analysis.
10275
5dc99c46
SB
102762012-11-16 Simon Baldwin <simonb@google.com>
10277
10278 * c.opt: Add f[no-]canonical-system-headers.
10279 * c-opts.c (c_common_handle_option): Handle
10280 OPT_fcanonical_system_headers.
10281
a4a0016d
ESR
102822012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10283
10284 PR c++/54413
10285 * c-opts.c (c_common_handle_option): Set new flags.
10286 * c.opt: Describe new flags.
10287
7dbb85a7
JM
102882012-11-09 Jason Merrill <jason@redhat.com>
10289
10290 * c.opt (Wabi-tag): New.
10291
ad7bac31
AK
102922012-11-09 Andi Kleen <ak@linux.intel.com>
10293
10294 PR 55139
10295 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10296 MEMMODEL_MASK
ad7bac31 10297
7332899a
MLI
102982012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10299
10300 PR c/53063
10301 * c.opt (Wformat): Make it Alias Wformat=1.
10302 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10303 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10304 LangEnabledBy.
10305 (Wformat=): RejectNegative. Use LangEnabledBy.
10306 (Wnonnull): Use LangEnabledBy.
10307 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10308 * c-format.c (set_Wformat): Delete.
10309 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10310 (maybe_read_dollar_number): Likewise.
10311 (avoid_dollar_number): Likewise.
10312 (finish_dollar_format_checking): Likewise.
10313 (check_format_info): Likewise.
10314 (check_format_info_main): Likewise.
10315 (check_format_types): Likewise.
10316 (format_type_warning): Likewise.
10317 * c-common.c (int): Likewise.
10318 (check_function_sentinel): Likewise.
8e745a17 10319 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10320
34a180a6
MLI
103212012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10322
10323 PR c/53063
10324 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10325 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10326 Use LangEnabledBy.
10327 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10328 common.opt.
10329 (Wvariadic-macros): Init(1).
10330 * c-opts.c (c_common_handle_option): Do not handle them
10331 explicitly.
10332 (c_common_post_options): Likewise.
10333 (sanitize_cpp_opts): warn_unused_macros is now
10334 cpp_warn_unused_macros.
10335 (push_command_line_include): Likewise.
10336 * c-common.c (warn_unknown_pragmas): Do not define.
10337 * c-common.h (warn_unknown_pragmas): Do not declare.
10338
3f46d6a5
MLI
103392012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10340
10341 PR c/51294
10342 * c-common.c (conversion_warning): Handle conditional expressions.
10343
880661a4
JW
103442012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10345
10346 PR c++/54930
10347 * c.opt (Wreturn_local_addr): Define new option.
10348
4514a96b
JM
103492012-10-25 Jason Merrill <jason@redhat.com>
10350
f14edc1a
JM
10351 * c.opt (Wvirtual-move-assign): New.
10352
4514a96b
JM
10353 * c.opt (Winherited-variadic-ctor): New.
10354
93100c6b
MG
103552012-10-25 Marc Glisse <marc.glisse@inria.fr>
10356
10357 PR c++/54427
10358 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10359
1efcb8c6
JM
103602012-10-23 Joseph Myers <joseph@codesourcery.com>
10361
10362 * c-common.h (pch_cpp_save_state): Declare.
10363 * c-target.def (c_preinclude): New hook.
10364 * c-opts.c (done_preinclude): New.
10365 (push_command_line_include): Handle default preincluded header.
10366 (cb_file_change): Call pch_cpp_save_state when calling
10367 push_command_line_include.
10368 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10369 (pch_cpp_save_state): New.
10370 (pch_init): Call pch_cpp_save_state conditionally, instead of
10371 calling cpp_save_state.
10372
4a0ae68e
MLI
103732012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10374
10375 PR c/53063
10376 PR c/40989
10377 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10378 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10379 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10380 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10381 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10382 * c-opts.c (c_common_handle_option): Remove explicit handling from
10383 here.
10384 (c_common_post_options): Likewise.
10385
67e4210b
EB
103862012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10387
10388 * c-ada-spec.c (LOCATION_COL): Delete.
10389 (compare_location): New function.
10390 (compare_node): Use it.
10391 (compare_comment): Likewise.
10392
65d4f2cd
MLI
103932012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10394
10395 PR c/53063
10396 PR c/40989
10397 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10398 * c-opts.c (c_common_handle_option): Do not set them here. Add
10399 comment.
10400 (c_common_post_options): Likewise.
10401
909881cb
EB
104022012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10403
10404 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10405 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10406 Remove POINTER_TYPE handling, add large unsigned handling and use
10407 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10408
3a785c97
JJ
104092012-10-12 Jakub Jelinek <jakub@redhat.com>
10410
10411 PR c/54381
10412 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10413 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10414 locs and array of 3 trees instead of just single loc and single
10415 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10416 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10417 For *cmp* builtins that take two sources strings report warnings
10418 about first and second source, not about destination and source.
10419
5e54f81d
MG
104202012-10-12 Marc Glisse <marc.glisse@inria.fr>
10421
10422 PR c++/53055
10423 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10424
f5b02f1e
EB
104252012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10426
10427 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10428 declaring something coming from another file.
10429
b46dbc6c
AC
104302012-10-10 Arnaud Charlet <charlet@adacore.com>
10431
f5b02f1e 10432 PR ada/54845
b46dbc6c
AC
10433 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10434
5d9de0d0
PC
104352012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10436
10437 PR c++/54194
10438 * c-common.c (warn_about_parentheses): Add location_t parameter;
10439 use EXPR_LOC_OR_LOC.
10440 * c-common.h: Update declaration.
10441
a212e43f
MG
104422012-10-09 Marc Glisse <marc.glisse@inria.fr>
10443
10444 PR c++/54427
10445 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10446 more operations. Make error messages optional.
10447 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10448 (scalar_to_vector): Declare.
10449
b1db7f91
JM
104502012-10-08 Jason Merrill <jason@redhat.com>
10451
10452 * c-common.c (c_common_reswords): Add thread_local.
10453
e28d52cf
DS
104542012-10-08 Dodji Seketeli <dodji@redhat.com>
10455
10456 PR c++/53528 C++11 attribute support
10457 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10458 new functions.
10459 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10460 static function.
10461 (handle_aligned_attribute): In choose strictest alignment
10462 among many. Use new check_cxx_fundamental_alignment_constraints.
10463 (handle_transparent_union_attribute): In c++11 attribute syntax,
10464 don't look through typedefs.
10465
3b78de56
AC
104662012-10-04 Arnaud Charlet <charlet@adacore.com>
10467
10468 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10469 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10470 out of dumpfile.h.
10471
6040bb5f
DC
104722012-09-25 Dehao Chen <dehao@google.com>
10473
10474 PR middle-end/54645
3b78de56 10475 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10476 map when read in the pch.
10477
3f8257db 104782012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10479
10480 * c-ada-spec.c: Style fixes.
10481
3f8257db 104822012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10483
10484 * c.opt (-fada-spec-parent): Define new command line switch.
10485 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10486 is specified, generate binding spec as a child of the specified unit.
10487
0ccb505d
PC
104882012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10489 Manuel López-Ibáñez <manu@gcc.gnu.org>
10490
10491 PR c++/53210
10492 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10493
c583af79
AC
104942012-08-23 Arnaud Charlet <charlet@adacore.com>
10495
10496 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10497 for pointers, and add missing Convention C pragma.
10498 (print_ada_struct_decl): Add missing aliased keyword.
10499 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10500
1a4049e7
JJ
105012012-08-17 Jakub Jelinek <jakub@redhat.com>
10502
10503 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10504 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10505 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10506 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10507 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10508
70b5e7dc
RG
105092012-08-10 Richard Guenther <rguenther@suse.de>
10510
10511 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10512
f8923f7e
SB
105132012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10514
10515 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10516 instead of separate pp_newline and pp_flush.
10517 (print_c_tree): Likewise.
10518
e45abe1f
RH
105192012-07-26 Richard Henderson <rth@redhat.com>
10520
10521 * c-common.c (handle_hot_attribute): Allow labels.
10522 (handle_cold_attribute): Likewise.
10523
332f1d24
JJ
105242012-07-20 Jakub Jelinek <jakub@redhat.com>
10525
10526 PR c++/28656
10527 * c-common.c (check_function_nonnull): Handle multiple nonnull
10528 attributes properly.
10529
7ee2468b
SB
105302012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10531
10532 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10533 * c-ada-spec.c: Likewise.
10534 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10535
ee7b28eb
SB
105362012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10537
10538 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10539 Remove code conditional on it.
10540
6bdf3519
SB
105412012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10542
10543 * c-gimplify.c: Do not include basic-block.h.
10544 * c-common.c: Do not include linfuncs.h.
10545
532aafad
SB
105462012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10547
10548 * c-common.h: Include tree.h.
10549
8d0d1915
JM
105502012-07-02 Jason Merrill <jason@redhat.com>
10551
10552 PR c++/53524
10553 * c-common.c (get_priority): Call default_conversion.
10554
fbc873ad
UB
105552012-07-01 Uros Bizjak <ubizjak@gmail.com>
10556
10557 * c-pch.c (c_common_write_pch): Remove unused variables.
10558
d4a10d0a
SB
105592012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10560
10561 * cppspec.c: Moved from gcc/ to here.
10562
6f3a2e23
KT
105632012-06-27 Kai Tietz <ktietz@redhat.com>
10564
10565 PR preprocessor/37215
10566 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10567
8ca92d04
SB
105682012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10569
10570 * c-common.h (c_common_print_pch_checksum): Remove.
10571 * c-pch.c: Do not include output.h.
10572 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10573 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10574 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10575 (struct c_pch_header): Remove.
10576 (get_ident): Update gpch version.
10577 (pch_init): Do not print executable_checksum to asm_out_file.
10578 Do not fail if there is no asm_out_file to read back from. Set
10579 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10580 (c_common_write_pch): Verify that nothing was written to asm_out_file
10581 since pch_init was called. Do not write a c_pch_header, and do not
10582 copy from asm_out_file to the PCH.
10583 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10584 the content of asm_out_file from the PCH.
10585 (c_common_print_pch_checksum): Remove.
10586 * c-opts.c (c_common_init): Print out executable_checksum directly.
10587
70f42967
SB
105882012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10589
10590 * c-target.def (objc_declare_unresolved_class_reference,
10591 objc_declare_class_definition): Add new hooks.
10592
a8781821
SB
105932012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10594
10595 * c-lex.c: Do not include output.h.
10596 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10597 Remove uses of ASM_OUTPUT_IDENT.
10598
9e1a8dd1
RR
105992012-06-15 Marc Glisse <marc.glisse@inria.fr>
10600
10601 PR c++/51033
10602 * c-common.h (c_build_vec_perm_expr): Move decl here.
10603 * c-common.c (c_build_vec_perm_expr): Move definition
10604 here.
10605
6f07a821
SB
106062012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10607
10608 * c.opt (fconserve-space): Turn into a no-op.
10609
9faeb493 106102012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10611
10612 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10613 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10614 both the start and end of the function.
10615
a4b7d13c
SB
106162012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10617
10618 * c-common.c: Do not include output.h.
10619 * c-pragma.c: Likewise.
10620
c265f413
SA
106212012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10622
10623 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10624 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10625 (lang_decl_name): Handle namespace decls.
10626
be7a421e
SB
106272012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10628
10629 * c-ada-spec.c: Do not include output.h.
10630 * c-semantics.c: Likewise.
10631
65de6659
JM
106322012-05-29 Joseph Myers <joseph@codesourcery.com>
10633
10634 * c-common.c: Fix typo.
10635
ca5f4331
MM
106362012-05-29 Michael Matz <matz@suse.de>
10637
10638 * c-common.h (c_expand_decl): Remove prototype.
10639
4f7f7aca
MLI
106402012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10641
10642 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10643 * c-opts.c (c_common_handle_option): Remove code handling
10644 warn_missing_braces.
10645
4a792f9b
PC
106462012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10647
10648 PR c++/25137
10649 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10650 -Wmissing_braces.
10651
650dc14a
DS
106522012-05-22 Dodji Seketeli <dodji@redhat.com>
10653
10654 PR c++/53322
10655 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10656
9b095bf1
MLI
106572012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10658
10659 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10660 * c-opts.c (c_common_handle_option): Do not handle explicitly
10661 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10662
0b2c4be5
DS
106632012-05-16 Dodji Seketeli <dodji@redhat.com>
10664
10665 PR preprocessor/7263
ab20d992 10666 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10667 to cpp_classify_number. For diagnostics, use the precise location
10668 instead of the global input_location.
10669
a1bde5af
PC
106702012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10671
d02924ef 10672 PR c++/11856
a1bde5af
PC
10673 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10674
d1ede5f4
BS
106752012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10676
a1bde5af 10677 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10678
f2bc201f
MLI
106792012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10680
10681 PR 53063
10682 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10683 Wreorder): Use LangEnabledBy.
10684 * c-opts.c (c_common_handle_option): Do not enable them
10685 explicitly. Call lang-specific generated functions.
10686 (c_common_post_options): Do not set them here.
10687
95744782
MLI
106882012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10689
10690 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10691 Wmissing-field-initializers,Wmissing-parameter-type,
10692 Wold-style-declaration,Woverride-init): Use EnabledBy.
10693 * c-opts.c (c_common_post_options): Do not set here explicitly.
10694
7d5a5747
MLI
106952012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10696
10697 PR 53063
10698 * c-opts.c (c_common_handle_option): Use handle_generated_option
10699 to enable sub-options.
10700
5a3c9cf2
PC
107012012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10702
10703 PR c++/53158
10704 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10705
3ac8781c
RG
107062012-05-10 Richard Guenther <rguenther@suse.de>
10707
10708 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10709 adjust commentary about TYPE_IS_SIZETYPE types.
10710
1e537948
MLI
107112012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10712
10713 PR c++/53261
10714 * c-common.c (warn_logical_operator): Check that argument of
10715 integer_zerop is not NULL.
10716
f2c4a785
MLI
107172012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10718
10719 PR c/43772
10720 * c-common.c (warn_logical_operator): Do not warn if either side
10721 is already true or false.
10722
50f305ca
MLI
107232012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10724
10725 PR c/51712
10726 * c-common.c (expr_original_type): New.
10727 (shorten_compare): Do not warn for enumeration types.
10728
0c3641b0
MLI
107292012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10730
10731 * c.opt (fpermissive): Add Var(flag_permissive).
10732
7edaa4d2
MG
107332012-04-30 Marc Glisse <marc.glisse@inria.fr>
10734
10735 PR c++/51033
10736 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10737 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10738
b9c8da34
DS
107392012-04-30 Dodji Seketeli <dodji@redhat.com>
10740
10741 Add -Wvarargs option
ab20d992 10742 * c.opt (Wvarargs): Define new option.
b9c8da34 10743
e6c69da0
MLI
107442012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10745
10746 * c-common.c (check_function_arguments): Replace
10747 Wmissing-format-attribute with Wsuggest-attribute=format.
10748
90137d8f
MLI
107492012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10750
10751 * c.opt (Wsuggest-attribute=format): New. Alias of
10752 Wmissing-format-attribute.
10753 * c-format.c (decode_format_type): Replace
10754 Wmissing-format-attribute with Wsuggest-attribute=format.
10755 (check_function_format): Likewise.
10756
9faeb493 107572012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10758
10759 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10760 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10761 * c.opt: Add Wliteral-suffix.
10762
c1771a20
MLI
107632012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10764
10765 PR c/44774
10766 * c.opt (Wpedantic): New.
10767 (pedantic): Alias Wpedantic.
10768 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10769 (c_common_post_options): Likewise.
10770 (sanitize_cpp_opts): Likewise.
10771 * c-lex.c (interpret_float): Likewise.
10772 * c-format.c (check_format_types): Likewise.
10773 * c-common.c (pointer_int_sum): Likewise.
10774 (c_sizeof_or_alignof_type): Likewise.
10775 (c_add_case_label): Likewise.
10776 (c_do_switch_warnings): Likewise.
10777 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10778
04b391c1
JM
107792012-04-15 Jason Merrill <jason@redhat.com>
10780
10781 PR c++/52818
10782 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10783 (C_STD_NAME): Distinguish between C++98 and C++11.
10784
ac868f29
EB
107852012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10786
10787 PR target/52624
10788 * c-common.h (uint16_type_node): Rename into...
10789 (c_uint16_type_node): ...this.
10790 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10791 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10792
fd4116f4
MLI
107932012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10794
10795 * c-common.c (warn_if_unused_value): Move definition to here.
10796 * c-common.h (warn_if_unused_value): Move declaration to here.
10797
573ac65e
WB
107982012-03-23 William Bader <williambader@hotmail.com>
10799
10800 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10801
552b8185
JM
108022012-03-20 Jason Merrill <jason@redhat.com>
10803
10804 * c-common.h (enum cxx_dialect): Add cxx1y.
10805 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10806 test.
10807 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10808 * c-opts.c (c_common_post_options): Likewise.
10809 (set_std_cxx1y): New.
10810 (c_common_handle_option): Call it.
10811 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10812
04398fa8
PC
108132012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10814
10815 PR c++/14710
10816 * c.opt ([Wuseless-cast]): Add.
10817
d2a12ae7
RG
108182012-03-16 Richard Guenther <rguenther@suse.de>
10819
10820 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10821
a12bf402
MLI
108222012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10823
10824 PR c++/44783
10825 * c.opt (ftemplate-backtrace-limit) Add.
10826
5c30094f
RO
108272012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10828
10829 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10830 handling.
10831 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10832 (init_pragma): Don't register extern_prefix.
10833
21fa2faf
RG
108342012-03-12 Richard Guenther <rguenther@suse.de>
10835
10836 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10837 (builtin_type_for_size): Likewise.
10838
e3793c6f
JJ
108392012-02-13 Jakub Jelinek <jakub@redhat.com>
10840
10841 PR c++/52215
10842 * c-common.c (sync_resolve_params): Don't decide whether to convert
10843 or not based on TYPE_SIZE comparison, convert whenever arg_type
10844 is unsigned INTEGER_TYPE.
10845
93286335
PC
108462012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10847
10848 PR c/52118
10849 * c.opt ([Wunused-local-typedefs]): Fix description.
10850
7a421706
MS
108512012-01-24 Mike Stump <mikestump@comcast.net>
10852
10853 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10854 exactly.
10855
ba9b1f11
RG
108562012-01-18 Richard Guenther <rguenther@suse.de>
10857
10858 * c-opts.c (c_common_post_options): Reset LTO flags if
10859 we are about to generate a PCH.
10860
465406be
PC
108612012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10862
10863 PR c++/51777
10864 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10865 use pp_unsigned_wide_integer.
10866
aee15221
RG
108672012-01-10 Richard Guenther <rguenther@suse.de>
10868
10869 PR middle-end/51806
10870 * c-opts.c (c_common_handle_option): Move -Werror handling
10871 to language independent code.
10872
5720c0dc
RG
108732012-01-05 Richard Guenther <rguenther@suse.de>
10874
10875 PR middle-end/51764
10876 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10877 from common.opt.
10878
73ac190a
PC
108792011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10880
10881 PR c++/51316
10882 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10883 of array types with an unknown bound.
10884
48b0b196
JM
108852011-12-20 Joseph Myers <joseph@codesourcery.com>
10886
10887 * c-common.c (flag_isoc99): Update comment to refer to C11.
10888 (flag_isoc1x): Change to flag_isoc11.
10889 * c-common.h (flag_isoc99): Update comment to refer to C11.
10890 (flag_isoc1x): Change to flag_isoc11.
10891 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10892 C11.
10893 * c-opts.c (set_std_c1x): Change to set_std_c11.
10894 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10895 Call set_std_c11.
10896 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10897 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10898 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10899 standard.
10900 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10901 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10902 (std=gnu1x): Make alias of std=gnu11.
10903
d58d6eb5
JM
109042011-12-19 Jason Merrill <jason@redhat.com>
10905
10906 PR c++/51228
10907 * c-common.c (handle_transparent_union_attribute): Check the first
10908 field if the type is complete.
10909
b3908fcc
JW
109102011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10911
10912 PR libstdc++/51365
10913 * c-common.c (RID_IS_FINAL): Add.
10914 * c-common.h (RID_IS_FINAL): Add.
10915
fea3ca91
IS
109162011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10917
10918 * c.opt (fgnu-runtime): Provide full description.
10919 (fnext-runtime): Likewise.
10920 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10921
62bad7cd
AM
109222011-11-28 Andrew MacLeod <amacleod@redhat.com>
10923
10924 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10925 predefines in one place. Add LOCK_FREE predefines.
10926 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10927 new func.
10928
c466c4ff
AM
109292011-11-24 Andrew MacLeod <amacleod@redhat.com>
10930
10931 PR c/51256
9faeb493 10932 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10933 conditions
9faeb493
UB
10934 (resolve_overloaded_atomic_exchange,
10935 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10936 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10937 error_mark_node for error conditions.
9faeb493 10938
a5952633
RG
109392011-11-08 Richard Guenther <rguenther@suse.de>
10940
10941 PR middle-end/51010
ab20d992 10942 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10943
0a35513e
AH
109442011-11-07 Richard Henderson <rth@redhat.com>
10945 Aldy Hernandez <aldyh@redhat.com>
10946 Torvald Riegel <triegel@redhat.com>
10947
10948 Merged from transactional-memory.
10949
10950 * c-common.c (handle_tm_wrap_attribute,
10951 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10952 (struct c_common_reswords): Added __transaction* keywords.
10953 (struct c_common_attribute_table): Added transaction* and tm_regparm
10954 attributes.
10955 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10956 masks.
10957 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10958 find_tm_attribute): Declare.
10959
6d87092d
JM
109602011-11-07 Jason Merrill <jason@redhat.com>
10961
10962 PR c++/35688
10963 * c-common.c, c-common.h: Revert yesterday's changes.
10964
8e7860a1
JM
109652011-11-06 Jason Merrill <jason@redhat.com>
10966
10967 PR c++/35688
10968 * c-common.c (decl_has_visibility_attr): Split out from...
10969 (c_determine_visibility): ...here.
10970 * c-common.h: Declare it.
10971
d19fa6b5
JM
109722011-11-06 Joseph Myers <joseph@codesourcery.com>
10973
10974 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10975 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10976 type.
10977 (check_user_alignment): New. Split out of
10978 handle_aligned_attribute. Disallow integer constants with
10979 noninteger types. Conditionally allow zero.
10980 (handle_aligned_attribute): Use check_user_alignment.
10981 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10982
86951993
AM
109832011-11-06 Andrew MacLeod <amacleod@redhat.com>
10984 Richard Henderson <rth@redhat.com>
10985
10986 Merged from cxx-mem-model.
10987
10988 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10989 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10990 parameters that are the same type size.
10991 (get_atomic_generic_size): New. Find size of generic
10992 atomic function parameters and do typechecking.
10993 (add_atomic_size_parameter): New. Insert size into parameter list.
10994 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10995 either __atomic_exchange_n or external library call.
9faeb493 10996 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10997 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10998 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10999 __atomic_load_n or an external library call.
11000 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11001 __atomic_store_n or an external library call.
11002 (resolve_overloaded_builtin): Handle new __atomic builtins.
11003
cf9e9959
EB
110042011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11005
11006 PR c++/50608
11007 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11008 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11009 <INDIRECT_REF>: Return the argument.
11010 <ARRAY_REF>: Remove special code for negative offset.
11011 Call fold_build_pointer_plus instead of size_binop.
11012 (fold_offsetof): Remove STOP_REF argument and adjust.
11013 * c-common.h (fold_offsetof_1): Declare.
11014 (fold_offsetof): Remove STOP_REF argument.
11015
25339f10
JM
110162011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11017
11018 PR c++/50810
11019 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11020 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11021 Wnarrowing for C++0x and C++98.
11022 * c.opt ([Wnarrowing]): Update.
11023
89401152
PC
110242011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11025
11026 PR c++/44277
11027 * c.opt: Add Wzero-as-null-pointer-constant.
11028
97e3ad20
JM
110292011-10-31 Jason Merrill <jason@redhat.com>
11030
15694fdd
JM
11031 * c.opt (-fdeduce-init-list): Off by default.
11032
97e3ad20
JM
11033 PR c++/50920
11034 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11035 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11036 and -Wc++11-compat.
11037 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11038
fb9120e3
RAV
110392011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11040
11041 PR c++/30066
11042 * c.opt (fvisibility-inlines-hidden): Description change.
11043
3ce4f9e4
ESR
110442011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11045
11046 Implement C++11 user-defined literals.
11047 * c-common.c (build_userdef_literal): New.
11048 * c-common.def: New tree code.
11049 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11050 * c-lex.c (interpret_float): Add suffix parm.
11051 (c_lex_with_flags): Build literal tokens.
11052
5f53c243
PC
110532011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11054
11055 PR c++/50841
11056 Revert:
11057 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11058
11059 PR c++/50810
11060 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11061 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11062 Wnarrowing for C++0x and C++98.
11063 * c.opt ([Wnarrowing]): Update.
11064
263734e1
PC
110652011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11066
11067 PR c++/50810
11068 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11069 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11070 Wnarrowing for C++0x and C++98.
11071 * c.opt ([Wnarrowing]): Update.
11072
d2e312d7
PC
110732011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11074
11075 PR c++/45385
11076 * c-common.c (conversion_warning): Remove code looking for
11077 artificial operands.
11078
d17687f6
DS
110792011-10-18 Dodji Seketeli <dodji@redhat.com>
11080
11081 PR bootstrap/50760
11082 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11083 !NO_IMPLICIT_EXTERN_C.
d17687f6 11084
fc8396e9
PC
110852011-10-17 Michael Spertus <mike_spertus@symantec.com>
11086
11087 * c-common.c (c_common_reswords): Add __bases,
11088 __direct_bases.
11089 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11090
110912011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11092
11093 PR c++/50757
11094 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11095
847e697a
TT
110962011-10-15 Tom Tromey <tromey@redhat.com>
11097 Dodji Seketeli <dodji@redhat.com>
11098
11099 * c.opt (fdebug-cpp): New option.
11100 * c-opts.c (c_common_handle_option): Handle the option.
11101 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11102 output stream in parameter. Factorized from ...
11103 (maybe_print_line): ... this. Dump location debug information when
11104 -fdebug-cpp is in effect.
11105 (print_line_1): New static function. Takes an output stream in
11106 parameter. Factorized from ...
11107 (print_line): ... here. Dump location information when -fdebug-cpp
11108 is in effect.
11109 (scan_translation_unit): Dump location information when
11110 -fdebug-cpp is in effect.
11111
92582b75
TT
111122011-10-15 Tom Tromey <tromey@redhat.com>
11113 Dodji Seketeli <dodji@redhat.com>
11114
11115 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11116 without argument.
11117 * c-opts.c (c_common_handle_option)<case
11118 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11119 cases. Handle -ftrack-macro-expansion with and without argument.
11120
46427374
TT
111212011-10-15 Tom Tromey <tromey@redhat.com>
11122 Dodji Seketeli <dodji@redhat.com>
11123
11124 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11125 (print_line, cb_define, do_line_change): Adjust to avoid touching
11126 the internals of struct line_map. Use the public API instead.
11127 * c-pch.c (c_common_read_pch): Likewise.
11128 * c-lex.c (fe_file_change): Likewise.
11129
fc8396e9
PC
111302011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11131
11132 PR c++/17212
11133 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11134
111352011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11136
11137 PR c++/33067
11138 * c-pretty-print.c (pp_c_floating_constant): Output
11139 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11140
e79983f4
MM
111412011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11142
11143 * c-common.c (def_builtin_1): Delete old interface with two
11144 parallel arrays to hold standard builtin declarations, and replace
11145 it with a function based interface that can support creating
11146 builtins on the fly in the future. Change all uses, and poison
11147 the old names. Make sure 0 is not a legitimate builtin index.
11148 * c-omp.c (c_finish_omp_barrier): Ditto.
11149 (c_finish_omp_taskwait): Ditto.
11150 (c_finish_omp_flush): Ditto.
11151
6637388f
TG
111522011-10-11 Tristan Gingold <gingold@adacore.com>
11153
11154 * c.opt: (fallow-parameterless-variadic-functions): New.
11155
3797cb21
DS
111562011-09-08 Dodji Seketeli <dodji@redhat.com>
11157
11158 PR c++/33255 - Support -Wunused-local-typedefs warning
11159 * c-common.h (struct c_language_function::local_typedefs): New
11160 field.
9faeb493
UB
11161 (record_locally_defined_typedef, maybe_record_typedef_use)
11162 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11163 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11164 (maybe_record_typedef_use)
11165 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11166 * c.opt: Declare new -Wunused-local-typedefs flag.
11167
693ddb1b
EB
111682011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11169
11170 PR middle-end/50266
11171 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11172 computations.
11173
830c740f
RG
111742011-09-05 Richard Guenther <rguenther@suse.de>
11175
11176 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11177 of integer_minus_one_node for empty array upper bounds.
11178
892a371f
DS
111792011-08-28 Dodji Seketeli <dodji@redhat.com>
11180
11181 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11182 it's the first time it's being called on this main TU.
11183
0e3fdb48
RB
111842011-08-24 Richard Guenther <rguenther@suse.de>
11185
11186 PR c/49396
11187 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11188
111892011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11190
11191 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11192 defined in cpp_init_builtins and c_cpp_builtins.
11193
d4a83c10
JM
111942011-08-19 Joseph Myers <joseph@codesourcery.com>
11195
11196 * c-common.c (c_common_reswords): Add __builtin_complex.
11197 * c-common.h (RID_BUILTIN_COMPLEX): New.
11198
bbceee64
JM
111992011-08-18 Joseph Myers <joseph@codesourcery.com>
11200
11201 * c-common.c (c_common_reswords): Add _Noreturn.
11202 (keyword_is_function_specifier): Handle RID_NORETURN.
11203 * c-common.h (RID_NORETURN): New.
11204
3f8257db 112052011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11206
11207 * c-common.c (unsafe_conversion_p): New function. Check if it is
11208 unsafe to convert an expression to the type.
11209 (conversion_warning): Adjust, use unsafe_conversion_p.
11210 * c-common.h (unsafe_conversion_p): New function declaration.
11211
20906c66
JJ
112122011-08-02 Jakub Jelinek <jakub@redhat.com>
11213
11214 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11215 (c_finish_omp_taskyield): New prototype.
11216 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11217 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11218 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11219 or RHS1 have side-effects, evaluate those too in the right spot,
11220 if it is a decl and LHS is also a decl, error out if they
11221 aren't the same.
11222 (c_finish_omp_taskyield): New function.
11223 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11224 * c-pragma.c (omp_pragmas): Add taskyield.
11225 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11226 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11227 PRAGMA_OMP_CLAUSE_MERGEABLE.
11228
770e5a2e
DS
112292011-07-25 Dodji Seketeli <dodji@redhat.com>
11230
11231 * c-common.h (set_underlying_type): Remove parm name from
11232 declaration.
11233
1baae426
RG
112342011-07-25 Romain Geissler <romain.geissler@gmail.com>
11235
11236 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11237
fcb21722
JM
112382011-07-22 Jason Merrill <jason@redhat.com>
11239
76f86d00
JM
11240 PR c++/49793
11241 * c.opt (Wnarrowing): New.
11242
3a636414
JM
11243 PR c++/30112
11244 * c-common.h: Declare c_linkage_bindings.
11245 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11246
fcb21722
JM
11247 PR c++/49813
11248 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11249 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11250 as flag_isoc99 for 'restrict'.
11251 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11252
02614448
ILT
112532011-07-21 Ian Lance Taylor <iant@google.com>
11254
11255 PR middle-end/49705
11256 * c-common.c (c_disable_warnings): New static function.
11257 (c_enable_warnings): New static function.
11258 (c_fully_fold_internal): Change local unused_p to bool. Call
11259 c_disable_warnings and c_enable_warnings rather than change
11260 c_inhibit_evaluation_warnings.
11261
34429675
JM
112622011-07-20 Jason Merrill <jason@redhat.com>
11263
11264 PR c++/6709 (DR 743)
11265 PR c++/42603 (DR 950)
11266 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11267 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11268 (CPP_DECLTYPE): New.
11269 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11270
5d49b6a7
RG
112712011-07-19 Richard Guenther <rguenther@suse.de>
11272
11273 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11274 * c-omp.c (c_finish_omp_for): Likewise.
11275
e84a58ff
EB
112762011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11277
11278 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11279 body on the next line.
11280
329af3c7
JM
112812011-07-08 Jason Merrill <jason@redhat.com>
11282
4063e61b
JM
11283 PR c++/45437
11284 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11285
329af3c7
JM
11286 PR c++/49673
11287 * c-common.c (c_apply_type_quals_to_decl): Don't check
11288 TYPE_NEEDS_CONSTRUCTING.
11289
1a072294
RG
112902011-07-06 Richard Guenther <rguenther@suse.de>
11291
11292 * c-common.c (c_common_nodes_and_builtins):
11293 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11294
fce5dddd
RG
112952011-07-05 Richard Guenther <rguenther@suse.de>
11296
11297 * c-common.c (c_common_nodes_and_builtins): Build all common
11298 tree nodes first.
11299
45d439ac
JJ
113002011-06-27 Jakub Jelinek <jakub@redhat.com>
11301
56300785
JJ
11302 * c-common.h (c_tree_chain_next): New static inline function.
11303
45d439ac
JJ
11304 * c-common.c (check_builtin_function_arguments): Handle
11305 BUILT_IN_ASSUME_ALIGNED.
11306
e0a8ecf2
AM
113072011-06-21 Andrew MacLeod <amacleod@redhat.com>
11308
11309 * c-common.c: Add sync_ or SYNC__ to builtin names.
11310 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11311
113122011-06-20 Pierre Vittet <piervit@pvittet.com>
11313
11314 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11315 handler.
11316 (gen_pragma_handler): New union.
11317 (internal_pragma_handler): New type.
11318 (c_register_pragma_with_data)
11319 (c_register_pragma_with_expansion_and_data): New functions.
11320
11321 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11322 (c_register_pragma, c_register_pragma_with_expansion)
11323 (c_invoke_pragma_handler): Changed to work with
11324 internal_pragma_handler.
11325 (c_register_pragma_with_data)
11326 (c_register_pragma_with_expansion_and_data): New functions.
11327
677f3fa8
JM
113282011-06-14 Joseph Myers <joseph@codesourcery.com>
11329
11330 * c-common.c: Include common/common-target.h.
11331 (handle_section_attribute): Use
11332 targetm_common.have_named_sections.
11333 * c-cppbuiltin.c: Include common/common-target.h.
11334 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11335
d7fc8c14
RG
113362011-06-10 Richard Guenther <rguenther@suse.de>
11337
11338 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11339 to print a IDENTIFIER_NODE.
11340
10e48e39
RO
113412011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11342 Joseph Myers <joseph@codesourcery.com>
11343
11344 * c.opt (fbuilding-libgcc): New option.
11345 * c-cppbuiltin.c (c_cpp_builtins): Define
11346 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11347
6976ae51
JM
113482011-06-07 Jason Merrill <jason@redhat.com>
11349
3ff60975
JM
11350 * c-common.c (max_tinst_depth): Lower default to 900.
11351
6976ae51
JM
11352 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11353
009db074
RG
113542011-06-07 Richard Guenther <rguenther@suse.de>
11355
11356 * c-common.c (c_common_nodes_and_builtins): Do not set
11357 size_type_node or call set_sizetype.
11358
b4592b92
DS
113592011-06-07 Dodji Seketeli <dodji@redhat.com>
11360
11361 PR debug/49130
11362 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11363 type when using pointer comparison to compare types.
b4592b92 11364
014ab419
JW
113652011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11366
11367 * c.opt: Add -Wdelete-non-virtual-dtor.
11368 * c-opts.c (c_common_handle_option): Include it in -Wall.
11369
4f60111f
NF
113702011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11371
11372 PR bootstrap/49190
11373
11374 Revert:
11375 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11376
11377 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11378 not tree_common.
11379
4cc4f2f4
JJ
113802011-05-27 Jakub Jelinek <jakub@redhat.com>
11381
11382 PR c++/49165
11383 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11384 C++ don't call c_common_truthvalue_conversion on void type arms.
11385
38e01f9e
NF
113862011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11387
11388 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11389 (stmt_list_stack): Define.
11390 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11391 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11392
92e948a8
NF
113932011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11394
11395 * c-common.c (warning_candidate_p): Check for BLOCKs.
11396
a2fc3e63
NF
113972011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11398
11399 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11400 not tree_common.
11401
0957c029
JJ
114022011-05-25 Jakub Jelinek <jakub@redhat.com>
11403
11404 * c-common.c (def_fn_type): Remove extra va_end.
11405
828fb3ba
JM
114062011-05-23 Jason Merrill <jason@redhat.com>
11407
11408 PR c++/48106
11409 * c-common.c (c_common_get_narrower): New.
11410 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11411
dde05067
NF
114122011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11413
11414 * c-common.h (check_function_arguments): Tweak prototype of
11415 check_function_arguments.
11416 * c-common.c (check_function_arguments): Likewise. Adjust
11417 calls to check_function_nonnull, check_function_format, and
11418 check_function_sentinel.
11419 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11420 separate attributes and typelist arguments. Use
11421 FOREACH_FUNCTION_ARGS to iterate over argument types.
11422
3c0d13bf
PC
114232011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11424
11425 * c-common.c (c_common_reswords): Reorder.
11426 * c-common.h (rid): Likewise.
11427
8242dd04
NF
114282011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11429
11430 * c-common.c (def_fn_type): Don't call build_function_type, call
11431 build_function_type_array or build_varargs_function_type_array
11432 instead.
11433 (c_common_nodes_and_builtins): Likewise.
11434
3d528853
NF
114352011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11436
11437 * c-common.c (c_add_case_label): Omit the loc argument to
11438 build_case_label.
11439 * c-common.h (build_case_label): Remove.
11440 * c-semantics.c (build_case_label): Remove.
11441
a04a722b
JM
114422011-05-05 Joseph Myers <joseph@codesourcery.com>
11443
11444 * c-objc.h (objc_start_method_definition): Update prototype.
11445 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11446
e19a18d4
NF
114472011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11448
11449 * c-common.c (check_main_parameter_types): Reindent. Don't use
11450 TYPE_ARG_TYPES directly.
11451 (handle_nonnull_attribute): Likewise.
11452 (sync_resolve_params): Likewise.
11453 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11454 to check_format_string.
11455 (handle_format_attribute): Likewise.
11456 (check_format_string): Take a function type to examine instead of
11457 a type list. Use a function_arg_iterator to step through argument
11458 types.
11459
c62c040f
RG
114602011-05-04 Richard Guenther <rguenther@suse.de>
11461
11462 * c-common.c (fix_string_type): Use size_int for index type bounds.
11463 (start_fname_decls): Do not pass NULL to build_int_cst.
11464 (c_init_attributes): Likewise.
11465 * c-lex.c (c_lex_with_flags): Likewise.
11466
c12ff9d8
JM
114672011-04-27 Jason Merrill <jason@redhat.com>
11468
11469 * c-common.c (make_tree_vector_from_list): New.
11470 * c-common.h: Declare it.
11471
304dfbe3
RG
114722011-04-26 Richard Guenther <rguenther@suse.de>
11473
11474 PR preprocessor/48248
11475 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11476 for output size with -P.
11477
3c0d13bf
PC
114782011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11479
11480 * c-common.c (struct c_common_resword): Add __underlying_type.
11481 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11482
04695783
JM
114832011-04-20 Jim Meyering <meyering@redhat.com>
11484
11485 * c-format.c (init_dollar_format_checking): Remove useless
11486 if-before-free.
11487
0dc33c3c
NP
114882011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11489
11490 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11491 (objc_detect_field_duplicates): New.
0dc33c3c 11492 * stub-objc.c: Likewise.
3c0d13bf 11493
c59633d9
NP
114942011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11495
11496 * stub-objc.c (objc_declare_protocols): Renamed to
11497 objc_declare_protocol.
11498 * c-objc.h: Likewise.
3c0d13bf 11499
32dabdaf
NP
115002011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11501
11502 * stub-objc.c (objc_declare_class): Updated argument name.
11503
81f653d6
NF
115042011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11505
11506 * c-common.h (c_common_init_ts): Declare.
11507 * c-common.c (c_common_init_ts): Define.
11508
eb345401
NP
115092011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11510
11511 * c-objc.h (objc_build_message_expr): Updated prototype.
11512 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11513
a358e188
MJ
115142011-04-12 Martin Jambor <mjambor@suse.cz>
11515
11516 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11517 of cgraph_node.
11518
e6313a78
RG
115192011-04-11 Richard Guenther <rguenther@suse.de>
11520
11521 * c-common.c (complete_array_type): Build a range type of
11522 proper type.
11523
dcf0c47e
NF
115242011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11525
11526 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11527 (handle_type_generic_attribute): Likewise.
11528
1ee44b26
JM
115292011-04-07 Jason Merrill <jason@redhat.com>
11530
11531 PR c++/48450
11532 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11533 conversion from C++0x scoped enum.
11534
acce4e77
JM
115352011-04-06 Joseph Myers <joseph@codesourcery.com>
11536
11537 * c-target-def.h: New file.
11538 * c-target.def: New file.
11539 * c-target.h: New file.
11540 * c-common.c (targetcm): Don't define here.
11541 * c-common.h (default_handle_c_option): Declare.
11542 * c-format.c: Include c-target.h instead of target.h.
11543 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11544 include tm.h.
11545 (default_handle_c_option): Move from targhooks.c.
11546
e2eefb55
JJ
115472011-03-29 Jakub Jelinek <jakub@redhat.com>
11548
11549 PR preprocessor/48248
11550 * c-ppoutput.c (print): Add src_file field.
11551 (init_pp_output): Initialize it.
11552 (maybe_print_line): Don't optimize by adding up to 8 newlines
11553 if map->to_file and print.src_file are different file.
11554 (print_line): Update print.src_file.
11555
ba78087b
KT
115562011-03-25 Kai Tietz <ktietz@redhat.com>
11557
11558 * c-ada-spec.c (compare_comment): Use filename_cmp
11559 instead of strcmp for filename.
11560
0edf1bb2
JL
115612011-03-25 Jeff Law <law@redhat.com>
11562
adfac8df 11563 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11564
c7dc8804
JM
115652011-03-25 Jason Merrill <jason@redhat.com>
11566
11567 * c.opt: Add -std=c++03.
11568
d1d879b1
EB
115692011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11570
11571 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11572
3f8257db 115732011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11574
11575 PR target/12171
5050afdf
KT
11576 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11577 Display allowed attributes for function pointer types.
11578 (pp_c_attributes_display): New function to display
11579 attributes having affects_type_identity flag set to true.
11580 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11581
62d784f7
KT
11582 * c-common.c (c_common_attribute_table):
11583 Add new element.
11584 (c_common_format_attribute_table): Likewise.
11585
82d37118
JM
115862011-03-18 Jason Merrill <jason@redhat.com>
11587
49a000c3
JM
11588 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11589 * c-common.h: Don't declare it here.
11590 * c-common.c: Or define it here.
11591 * c-opts.c (c_common_handle_option): Or set it here.
11592
82d37118
JM
11593 PR c++/35315
11594 * c-common.c (handle_transparent_union_attribute): Don't
11595 make a duplicate type in C++.
11596
17bc631c
JM
115972011-03-15 Jason Merrill <jason@redhat.com>
11598
11599 * c-common.c (max_constexpr_depth): New.
11600 * c-common.h: Declare it.
11601 * c-opts.c (c_common_handle_option): Set it.
11602 * c.opt (fconstexpr-depth): New option.
11603
1b9b91a6
JM
116042011-03-11 Jason Merrill <jason@redhat.com>
11605
f231b5ff
JM
11606 * c-common.c (attribute_takes_identifier_p): Add missing const.
11607
1b9b91a6
JM
11608 PR c++/46803
11609 * c-common.c (attribute_takes_identifier_p): Assume that an
11610 unknown attribute takes an identifier.
11611
a19e4d44
NF
116122011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11613
11614 PR c/47786
11615 * c-common.c (c_type_hash): Call list_length instead of iterating
11616 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11617
982d62f6
JJ
116182011-02-19 Jakub Jelinek <jakub@redhat.com>
11619
11620 PR c/47809
11621 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11622
0a256240
NP
116232011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11624
11625 * c.opt (fobjc-abi-version=) New.
11626 (fobjc-nilcheck): New.
11627
ba9e6dd5
NF
116282011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11629
11630 PR c++/46890
11631 * c-common.h (keyword_is_decl_specifier): Declare.
11632 * c-common.c (keyword_is_decl_specifier): Define.
11633 (keyword_is_function_specifier): New function.
11634
7273813a
JJ
116352011-01-26 Jakub Jelinek <jakub@redhat.com>
11636
11637 PR c/47473
11638 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11639 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11640 REAL_TYPE.
11641
908ef79b
AC
116422011-01-26 Arnaud Charlet <charlet@adacore.com>
11643
11644 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11645
237e9384
JJ
116462011-01-26 Jakub Jelinek <jakub@redhat.com>
11647
11648 PR pch/47430
11649 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11650 after init_c_lex if pch_file is set.
11651
47ea1edf
DK
116522011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11653
d4dba752 11654 PR c++/43601
47ea1edf
DK
11655 * c.opt (-fkeep-inline-dllexport): New switch.
11656
2aa9c6ae
RG
116572011-01-12 Richard Guenther <rguenther@suse.de>
11658
11659 PR middle-end/32511
11660 * c-common.c (handle_weak_attribute): Warn instead of error
11661 on declaring an inline function weak.
11662
7bd11157
TT
116632011-01-05 Tom Tromey <tromey@redhat.com>
11664
11665 * c-common.h (lvalue_error): Update.
11666 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11667 not error.
11668
0e66e494 116692010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11670
b4f588c4
NP
11671 PR objc/47075
11672 * c-objc.h (objc_finish_message_expr): Added argument to
11673 prototype.
11674
f4da8dce
NF
116752010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11676
11677 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11678 Use prototype_p.
11679
46270f14
NP
116802010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11681
11682 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11683 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11684
4816c593
NF
116852010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11686
11687 * c-common.h (readonly_error): Declare.
11688 * c-common.c (readonly_error): Define.
11689
7a6daeb0
NF
116902010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11691
11692 * c-common.h (invalid_indirection_error): Declare.
11693 * c-common.c (invalid_indirection_error): Define.
11694
892f6119
RG
116952010-12-03 Richard Guenther <rguenther@suse.de>
11696
11697 PR c/46745
11698 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11699 (pp_c_unary_expression): Likewise.
11700 (pp_c_expression): Likewise.
11701
6c39e757
NP
117022010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11703
11704 * c-common.h (objc_finish_function): New.
11705 (objc_non_volatilized_type): Removed.
11706 (objc_type_quals_match): Removed.
11707 * stub-objc.c (objc_finish_function): New.
11708 (objc_non_volatilized_type): Removed.
11709 (objc_type_quals_match): Removed.
9faeb493 11710
7c475d11
JM
117112010-11-30 Joseph Myers <joseph@codesourcery.com>
11712
11713 * c-common.h (parse_optimize_options): Declare.
11714 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11715 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11716
71f3e391
JM
117172010-11-29 Joseph Myers <joseph@codesourcery.com>
11718
11719 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11720 GET_ENVIRONMENT.
11721 * c-pch.c (O_BINARY): Don't define here.
11722 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11723
d5fabb58
JM
117242010-11-25 Joseph Myers <joseph@codesourcery.com>
11725
11726 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11727 targetm.except_unwind_info.
11728
299404a1
JM
117292010-11-23 Joseph Myers <joseph@codesourcery.com>
11730
11731 * c-opts.c (c_common_handle_option): Pass location to
11732 set_struct_debug_option.
11733
c98cd5bf
JM
117342010-11-23 Joseph Myers <joseph@codesourcery.com>
11735
11736 * c-common.c (visibility_options): Move from ../opts.c.
11737 * c-common.h (struct visibility_flags, visibility_options):
11738 Declare here.
11739 * c-opts.c (finish_options): Rename to c_finish_options.
11740 (c_common_init): Update call to finish_options.
11741
a9546771
NP
117422010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11743
11744 PR objc/34033
11745 * c-lex.c (lex_string): Check that each string in an Objective-C
11746 string concat sequence starts with either one or zero '@', and
11747 that there are no spurious '@' signs at the end.
11748
24a57808
JM
117492010-11-20 Joseph Myers <joseph@codesourcery.com>
11750
11751 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11752 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11753 HANDLE_PRAGMA_VISIBILITY.
11754 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11755 HANDLE_PRAGMA_VISIBILITY): Don't define.
11756 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11757
a9aa2c3a
NF
117582010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11759
11760 PR c++/16189
11761 PR c++/36888
11762 PR c++/45331
11763 * c-common.h (keyword_begins_type_specifier): Declare.
11764 (keyword_is_storage_class_specifier): Declare.
11765 (keyword_is_type_qualifier): Declare.
11766 * c-common.c (keyword_begins_type_specifier): New function.
11767 (keyword_is_storage_class_specifier): New function.
11768 (keyword_is_type_qualifier): Declare.
11769
5386338c
JM
117702010-11-19 Joseph Myers <joseph@codesourcery.com>
11771
11772 PR c/46547
11773 * c-common.c (in_late_binary_op): Define.
11774 (c_common_truthvalue_conversion): Check in_late_binary_op before
11775 calling c_save_expr.
11776 * c-common.h (in_late_binary_op): Declare.
11777
69ccdddb
JM
117782010-11-19 Joseph Myers <joseph@codesourcery.com>
11779
11780 * c-opts.c (c_common_handle_option): Update calls to
11781 set_struct_debug_option.
11782
6b192a09
NP
117832010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11784
11785 * c-common.h (objc_declare_protocols): Added additional argument.
11786 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11787
fb52b50a
NF
117882010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11789
11790 PR c/33193
11791 * c-common.h (build_real_imag_expr): Declare.
11792 * c-semantics.c (build_real_imag_expr): Define.
11793
b37421c6
JM
117942010-11-17 Joseph Myers <joseph@codesourcery.com>
11795
11796 * c-opts.c (c_common_parse_file): Take no arguments.
11797 * c-common.h (c_common_parse_file): Update prototype.
11798
07078664
JJ
117992010-11-16 Jakub Jelinek <jakub@redhat.com>
11800
11801 PR c++/46401
11802 * c-common.c (warning_candidate_p): Don't track non-const calls
11803 or STRING_CSTs.
11804
c6a13190
ILT
118052010-11-15 Ian Lance Taylor <iant@google.com>
11806
11807 * c-lex.c (init_c_lex): Set macro debug callbacks if
11808 flag_dump_go_spec is set.
11809
925e8657
NP
118102010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11811
11812 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11813 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11814
bb0a9581
NF
118152010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11816
11817 PR preprocessor/45038
11818 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11819 dialects.
11820
c5fa0890
JM
118212010-11-12 Joseph Myers <joseph@codesourcery.com>
11822
11823 * c-common.h (c_family_lang_mask): Declare.
11824 * c-opts.c (c_family_lang_mask): Make extern.
11825 * c-pragma.c (handle_pragma_diagnostic): Use
11826 control_warning_option.
11827
a4d8c676
JM
118282010-11-12 Joseph Myers <joseph@codesourcery.com>
11829
11830 * c-common.c (parse_optimize_options): Update call to
11831 decode_options.
11832 * c-common.h (c_common_handle_option): Update prototype.
11833 * c-opts.c (c_common_handle_option): Take location_t parameter and
11834 pass it to other functions.
11835
f954bd2c
JM
118362010-11-11 Joseph Myers <joseph@codesourcery.com>
11837
11838 * c-opts.c (warning_as_error_callback): Remove.
11839 (c_common_initialize_diagnostics): Don't call
11840 register_warning_as_error_callback.
11841 (c_common_handle_option): Handle -Werror=normalized= here.
11842
d8a07487
JM
118432010-11-10 Joseph Myers <joseph@codesourcery.com>
11844
11845 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11846 in diagnostic.
11847 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11848 letter.
11849 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11850 Remove trailing '.' from diagnostics.
11851 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11852
d5478783
JM
118532010-11-10 Joseph Myers <joseph@codesourcery.com>
11854
11855 * c-common.c (parse_optimize_options): Pass global_dc to
11856 decode_options.
11857 * c-opts.c (c_common_handle_option): Pass &global_options to
11858 set_Wstrict_aliasing.
11859 * c.opt (v): Don't mark Common or document here.
11860
91ebb981
IS
118612010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11862
11863 PR target/44981
11864 * c-format.c (format_type): New type gcc_objc_string_format_type.
11865 (valid_stringptr_type_p): New.
11866 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11867 (check_format_string): Pass expected type, use
91ebb981
IS
11868 valid_stringptr_type_p (), check that the format string types are
11869 consistent with the format specification.
11870 (decode_format_attr): Warn if NSString is used outside objective-c.
11871 (format_types_orig): Add NSString.
11872 (format_name): New.
11873 (format_flags): New.
11874 (check_format_arg): Handle format strings requiring an external parser.
11875 first_target_format_type: New variable.
11876 (handle_format_attribute): Set up first_target_format_type, pass the
11877 expected format arg string type to check_format_string().
ab20d992 11878 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11879 * stub-objc.c (objc_string_ref_type_p): New.
11880 (objc_check_format_arg): New.
11881
bede2adc
NP
118822010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11883
9faeb493 11884 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11885 * c-common.h (objc_build_class_component_ref): New.
11886 * stub-objc.c (objc_build_class_component_ref): New.
11887
9a179d01
NP
118882010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11889
11890 * c.opt (Wproperty-assign-default): New option.
11891
22d8d616
NP
118922010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11893
11894 Implemented -fobjc-std=objc1 flag.
11895 * c.opt (fobjc-std=objc1): New option.
11896
2debdb4f
NP
118972010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11898
11899 Implemented format and noreturn attributes for Objective-C methods.
11900 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11901 attribute for Objective-C methods.
11902
ec52b111
JM
119032010-10-31 Jason Merrill <jason@redhat.com>
11904
11905 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11906 EXPR_LOC_OR_HERE.
11907
46a88c12
NP
119082010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11909
11910 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11911 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11912 (objc_add_property_declaration): Removed arguments for copies and
11913 ivar.
11914 (objc_build_getter_call): Renamed to
11915 objc_maybe_build_component_ref.
11916 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11917 (objc_is_property_ref): New.
11918 * c-common.c (c_common_reswords): Removed copies and ivar.
11919 * stub-objc.c (objc_add_property_declaration): Removed arguments
11920 for copies and ivar.
11921 (objc_build_getter_call): Renamed to
11922 objc_maybe_build_component_ref.
11923 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11924 (objc_is_property_ref): New.
9faeb493 11925
1e4bf85b
AC
119262010-10-29 Arnaud Charlet <charlet@adacore.com>
11927 Matthew Gingell <gingell@adacore.com>
11928
11929 * c-ada-spec.c (separate_class_package): New function.
11930 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11931 name of their enclosing package.
11932 (print_ada_declaration): Use separate_class_package.
11933
81f0bab2
JM
119342010-10-27 Jason Merrill <jason@redhat.com>
11935
2b08f2c5
JM
11936 * c-common.c (c_common_reswords): Add __is_literal_type.
11937 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11938
81f0bab2
JM
11939 * c-common.c (check_case_value): Remove special C++ code.
11940
200290f2
NP
119412010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11942
11943 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11944 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11945 and RID_LAST_PATTR.
11946 (objc_add_property_declaration): Added additional arguments.
11947 (objc_property_attribute_kind): Removed.
11948 (objc_set_property_attr): Removed.
11949 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11950 copy and nonatomic.
11951 * stub-objc.c (objc_add_property_declaration): Added additional
11952 arguments.
11953 (objc_set_property_attr): Removed.
9faeb493 11954
f614132b
NP
119552010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11956
11957 * c-common.h (objc_add_property_variable): Renamed to
11958 objc_add_property_declaration. Added location argument.
11959 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11960
b8a18805
NP
119612010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11962
11963 * c-common.h (objc_maybe_printable_name): New.
11964 * stub-objc.c (objc_maybe_printable_name): New.
11965
3f8257db
JJ
119662010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11967 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11968
11969 * c-common.h (c_common_mark_addressable_vec): Declare.
11970 * c-common.c (c_common_mark_addressable_vec): New function.
11971
249a82c4
NP
119722010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11973
11974 * c-common.h (objc_set_method_type): Removed.
11975 (objc_add_method_declaration): Added boolean argument.
11976 (objc_start_method_definition): Same change.
11977 (objc_build_method_signature): Same change.
11978 * stub-objc.c (objc_set_method_type): Removed.
11979 (objc_add_method_declaration): Added boolean argument.
11980 (objc_start_method_definition): Same change.
11981 (objc_build_method_signature): Same change.
11982
977e30bc
NP
119832010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11984
11985 * c-common.h (finish_file): Removed.
11986 (objc_write_global_declarations): New.
11987 * c-opts.c (c_common_parse_file): Do not call finish_file.
11988 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11989
da57d1b9
NP
119902010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11991
11992 Implemented parsing @synthesize and @dynamic for
11993 Objective-C/Objective-C++.
11994 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11995 (objc_add_synthesize_declaration): New.
11996 (objc_add_dynamic_declaration): New.
11997 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11998 * stub-objc.c (objc_add_synthesize_declaration): New.
11999 (objc_add_dynamic_declaration): New.
9faeb493 12000
0069111f
MM
120012010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12002
12003 PR target/46041
12004 * c-cppbuiltin.c (mode_has_fma): Move function here from
12005 builtins.c. Don't use the fma optab, instead just use the
12006 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12007 using -save-temps.
12008
e426b47b
NP
120092010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12010
12011 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12012
3f8257db 12013 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12014
9faeb493 12015 Radar 4330422
e426b47b
NP
12016 * c-common.h (objc_non_volatilized_type): New declaration
12017 * stub-objc.c (objc_non_volatilized_type): New stub.
12018
90fbfdc3
NP
120192010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12020
e426b47b 12021 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12022
ab20d992 12023 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12024
9faeb493 12025 Radar 4133425
90fbfdc3 12026 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12027 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12028
c37d8c30
IS
120292010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12030
12031 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12032 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12033 (objc_ivar_visibility_kind): New enum.
12034 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12035 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12036 visibility enum.
12037
1b1562a5
MM
120382010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12039
12040 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12041 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12042 has the appropriate fma builtins.
12043 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12044
668ea4b1
IS
120452010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12046
1b1562a5 12047 merge from FSF apple 'trunk' branch.
3f8257db 12048 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12049
668ea4b1
IS
12050 Radars 4436866, 4505126, 4506903, 4517826
12051 * c-common.c (c_common_resword): Define @property and its attributes.
12052 * c-common.h: Define property attribute enum entries.
12053 (OBJC_IS_PATTR_KEYWORD): New.
12054 (objc_property_attribute_kind): New enum.
12055 Declare objc_set_property_attr (), objc_add_property_variable (),
12056 objc_build_getter_call () and objc_build_setter_call ().
12057 * stub-objc.c (objc_set_property_attr): New stub.
12058 (objc_add_property_variable): Likewise.
12059 (objc_build_getter_call): Likewise.
12060 (objc_build_setter_call) Likewise.
1b1562a5 12061
a1178b30
IS
120622010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12063
1b1562a5 12064 merge from FSF apple 'trunk' branch.
ab20d992 12065 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12066
12067 Radar 3803157 (method attributes)
12068 * c-common.c (handle_deprecated_attribute): Recognize
12069 objc methods as valid declarations.
12070 * c-common.h: Declare objc_method_decl ().
1b1562a5 12071 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12072
a75bfaa6
JM
120732010-10-08 Joseph Myers <joseph@codesourcery.com>
12074
12075 * c-common.c (parse_optimize_options): Call
12076 decode_cmdline_options_to_array_default_mask before
12077 decode_options. Update arguments to decode_options.
12078 * c-common.h (c_common_init_options_struct): Declare.
12079 * c-opts.c (c_common_init_options_struct): New. Split out from
12080 c_common_init_options.
12081
f05b9d93
NP
120822010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12083
12084 Implemented fast enumeration for Objective-C.
12085 * c-common.h (objc_finish_foreach_loop): New.
12086 * stub-objc.c (objc_finish_foreach_loop): New.
12087
1ebe4b4f
JM
120882010-10-05 Joseph Myers <joseph@codesourcery.com>
12089
12090 * c-common.h (struct diagnostic_context): Don't declare here.
12091 (c_common_initialize_diagnostics): Declare using
12092 diagnostic_context typedef.
12093 * c-opts.c (c_common_handle_option): Pass global_dc to
12094 handle_generated_option.
12095
d4d24ba4
JM
120962010-10-04 Joseph Myers <joseph@codesourcery.com>
12097
12098 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12099 handle_generated_option.
12100
478a1c5b
ILT
121012010-10-03 Ian Lance Taylor <iant@google.com>
12102
12103 * c.opt (-fplan9-extensions): New option.
12104
82a1c2fe
FXC
121052010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12106
12107 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12108 Remove.
12109 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12110 of duplicating code.
12111
92902b1b
IS
121122010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12113
12114 * c-common.c: Add two new entries for @optional
12115 and @required keywords.
12116
12117 merge from FSF 'apple/trunk' branch.
3f8257db 12118 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12119
12120 Radar 4386773
12121 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12122 objective-c keywords.
12123 (objc_set_method_opt): New declaration.
12124 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12125
46625112
JM
121262010-09-30 Joseph Myers <joseph@codesourcery.com>
12127
12128 * c-common.c (handle_optimize_attribute): Pass &global_options to
12129 cl_optimization_save and cl_optimization_restore.
12130 * c-opts.c (c_common_handle_option): Pass &global_options to
12131 handle_generated_option.
12132 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12133 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12134 &global_options to cl_optimization_restore.
12135
49b91f05
NP
121362010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12137
12138 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12139 Objective-C/Objective-C++ keywords.
12140
13ed556f 121412010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12142
9faeb493
UB
12143 Merge from 'apple/trunk' branch on FSF servers.
12144
3f8257db 12145 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12146
12147 Radar 4281748
12148 * c-common.h (objc_check_global_decl): New declaration.
12149 * stub-objc.c (objc_check_global_decl): New stub.
12150
f0036cca
JM
121512010-09-29 Joseph Myers <joseph@codesourcery.com>
12152
12153 * c.opt: Don't use VarExists.
12154
e3339d0f
JM
121552010-09-29 Joseph Myers <joseph@codesourcery.com>
12156
12157 * c-common.c (c_cpp_error): Update names of diagnostic_context
12158 members.
12159 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12160 cl_optimization members.
12161 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12162 sanitize_cpp_opts, finish_options): Update names of cpp_options
12163 members.
12164
1973201f
NP
121652010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12166
12167 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12168 (objc_is_reserved_word): Removed.
12169 * c-common.c: Updated comments.
12170 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12171 objc_is_reserved_word.
12172 * stub-objc.c (objc_is_reserved_word): Removed.
12173
f7e71da5
IS
121742010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12175
9faeb493 12176 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12177 include attributes.
12178 (objc_start_method_definition): Likewise.
12179 (objc_build_keyword_decl): Likewise.
12180 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12181 (objc_start_method_definition): Likewise.
12182 (objc_build_keyword_decl): Likewise.
12183
c165dca7
IS
121842010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12185
12186 * c-common.h (objc_start_class_interface): Adjust prototype.
12187 (objc_start_category_interface): Likewise.
12188 (objc_start_protocol): Likewise.
12189 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12190 (objc_start_class_interface): Likewise.
12191 (objc_start_category_interface): Likewise.
12192
7458026b
ILT
121932010-09-27 Ian Lance Taylor <iant@google.com>
12194
12195 * c-common.c (c_common_attribute_table): Add no_split_stack.
12196 (handle_no_split_stack_attribute): New static function.
12197
b581b85b
NP
121982010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12199
9faeb493 12200 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12201
3f8257db 12202 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12203
9faeb493 12204 Radar 4229905
b581b85b
NP
12205 * c-common.h (objc_have_common_type): New declaration.
12206 * stub-objc.c (objc_have_common_type): New stub.
12207
12208 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12209
12210 Radar 4154928
12211 * c-common.h (objc_common_type): New prototype.
9faeb493 12212 * stub-objc.c (objc_common_type): New stub.
b581b85b 12213
46a4da10
JH
122142010-09-24 Jan Hubicka <jh@suse.cz>
12215
12216 * c-common.c (handle_leaf_attribute): New function.
12217 (struct attribute_spec c_common_att): Add leaf.
12218
e200444e
JM
122192010-09-22 Joseph Myers <joseph@codesourcery.com>
12220
12221 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12222 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12223 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12224 -include-barrier, -include-directory, -include-directory=,
12225 -include-directory-after, -include-directory-after=,
12226 -include-prefix, -include-prefix=, -include-with-prefix,
12227 -include-with-prefix=, -include-with-prefix-after,
12228 -include-with-prefix-after=, -include-with-prefix-before,
12229 -include-with-prefix-before=, -no-integrated-cpp,
12230 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12231 -output=, -pedantic, -pedantic-errors, -preprocess,
12232 -print-missing-file-dependencies, -trace-includes, -traditional,
12233 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12234 -user-dependencies, -verbose, -write-dependencies,
12235 -write-user-dependencies, no-integrated-cpp, traditional): New.
12236
29a80ea6
NP
122372010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12238
12239 PR objc/23710
ac1fc2fc
NP
12240 * c-common.h (objc_start_method_definition): Return bool instead
12241 of void.
12242 * stub-objc.c (objc_start_method_definition): Return bool instead
12243 of void.
12244
122452010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12246
12247 PR objc/25965
12248 * c-common.h (objc_get_interface_ivars): New declaration.
12249 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12250
de621752
ILT
122512010-09-15 Ian Lance Taylor <iant@google.com>
12252
12253 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12254 messages. Remove period at end of warning message.
de621752 12255
ba885ec5
NS
122562010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12257
12258 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12259 (handle_alias_attribute): ... here.
12260 (handle_ifunc_attribute): New.
12261
c5ee1358
MM
122622010-09-06 Mark Mitchell <mark@codesourcery.com>
12263
12264 * c-common.h (do_warn_double_promotion): Declare.
12265 * c-common.c (do_warn_double_promotion): Define.
12266
0a0b3574
MM
122672010-09-05 Mark Mitchell <mark@codesourcery.com>
12268
12269 * c.opt (Wdouble-promotion): New.
12270
d1779886
JM
122712010-09-02 Joseph Myers <joseph@codesourcery.com>
12272
12273 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12274 fvtable-thunks, fxref): Mark no longer supported in help text.
12275
2d2bd949
JM
122762010-09-02 Joseph Myers <joseph@codesourcery.com>
12277
12278 * c.opt (Wimport, fall-virtual, falt-external-templates,
12279 fdefault-inline, fenum-int-equiv, fexternal-templates,
12280 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12281 fname-mangling-version-, fnew-abi, fnonnull-objects,
12282 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12283 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12284 applicable.
12285 (fhandle-exceptions): Mark with Alias and Warn.
12286 * c-opts.c (c_common_handle_option): Don't handle options marked
12287 as ignored.
12288
5de8299c
JM
122892010-09-02 Joseph Myers <joseph@codesourcery.com>
12290
12291 * c.opt (Wcomments, Werror-implicit-function-declaration,
12292 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12293 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12294 aliases.
12295 * c-common.c (option_codes): Use OPT_Wcomment instead of
12296 OPT_Wcomments.
12297 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12298 Don't handle options marked as aliases.
12299
0ceb0201
RG
123002010-08-25 Richard Guenther <rguenther@suse.de>
12301
12302 * c-common.c (c_common_get_alias_set): Remove special
12303 handling for pointers.
12304
ac47786e
NF
123052010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12306
12307 * c-common.c: Use FOR_EACH_VEC_ELT.
12308 * c-gimplify.c: Likewise.
12309 * c-pragma.c: Likewise.
12310
c878765b
JM
123112010-08-16 Joseph Myers <joseph@codesourcery.com>
12312
12313 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12314 RejectDriver.
12315 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12316 RejectDriver.
12317 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12318 instead of OPT_MDX and OPT_MMDX.
12319
603349bf
JM
123202010-08-16 Joseph Myers <joseph@codesourcery.com>
12321
12322 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12323
644fa7ac
JM
123242010-08-12 Joseph Myers <joseph@codesourcery.com>
12325
12326 * c.opt (MD, MMD): Change to MDX and MMDX.
12327 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12328
481e1176
JM
123292010-08-11 Joseph Myers <joseph@codesourcery.com>
12330
12331 * c-opts.c (c_common_handle_option): Call handle_generated_option
12332 instead of handle_option.
12333
ac8dc9f7
NF
123342010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12335
12336 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12337 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12338
4f8c876d
NF
123392010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12340
12341 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12342 (pending_redefine_extname): Change type to a VEC.
12343 (add_to_renaming_pragma_list): Update for new type of
12344 pending_redefine_extname.
ac8dc9f7 12345 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12346
3b0c690e
AC
123472010-08-04 Arnaud Charlet <charlet@adacore.com>
12348
12349 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12350 visited.
12351 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12352 decide whether a type has already been declared/seen.
12353 Do not go to the original type.
12354 (dump_nested_types): New parameter forward.
12355 Generate forward declaration if needed and mark type as visited.
12356 (print_ada_declaration): Call dump_nested_types if not already done.
12357 Mark types as visited.
12358
1890bccc
JM
123592010-08-03 Joseph Myers <joseph@codesourcery.com>
12360
12361 * c.opt (-print-pch-checksum): Remove option.
12362 * c-opts.c (c_common_handle_option): Don't handle
12363 OPT_print_pch_checksum.
12364
5f20c657
JM
123652010-07-27 Joseph Myers <joseph@codesourcery.com>
12366
12367 * c-common.h (c_common_handle_option): Update prototype and return
12368 value type.
12369 * c-opts.c (c_common_handle_option): Update prototype and return
12370 value type. Update calls to handle_option and
12371 enable_warning_as_error.
12372
f551f80c
JJ
123732010-07-27 Jakub Jelinek <jakub@redhat.com>
12374
12375 PR c/45079
12376 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12377
61ff2bdc
JM
123782010-07-27 Joseph Myers <joseph@codesourcery.com>
12379
12380 * c-common.h (c_common_missing_argument): Remove.
12381 * c-opts.c (c_common_missing_argument): Remove.
12382 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12383 idirafter, imacros, include, isysroot, isystem, iquote): Add
12384 MissingArgError.
12385 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12386
7a9bf9a4
JM
123872010-07-27 Joseph Myers <joseph@codesourcery.com>
12388
12389 * c-common.h (c_common_option_lang_mask,
12390 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12391 New.
12392 (c_common_init_options): Update prototype.
12393 * c-opts.c (c_common_option_lang_mask): New.
12394 (c_common_initialize_diagnostics): Split out of
12395 c_common_init_options.
12396 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12397 New.
12398 (c_common_init_options): Update prototype. Use decoded options in
12399 search for -lang-asm.
12400
910ad8de
NF
124012010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12402
12403 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12404 * c-format.c: Likewise.
12405
718f9c0f
MLI
124062010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12407
12408 * c-common.h: Include diagnostic-core.h. Error if already
12409 included.
12410 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12411
4d451982
MLI
124122010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12413
adfac8df 12414 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12415 Do not include expr.h
12416 (vector_mode_valid_p): Move here.
12417
119fe915
SB
124182010-06-21 DJ Delorie <dj@redhat.com>
12419
12420 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12421 allow these pragmas anywhere.
12422
124232010-06-14 Jakub Jelinek <jakub@redhat.com>
12424
12425 PR bootstrap/44509
12426 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12427 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12428 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12429 ggc_strdup instead of xstrdup.
12430
124312010-06-10 Jakub Jelinek <jakub@redhat.com>
12432
12433 * c-cppbuiltin.c: Include cpp-id-data.h.
12434 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12435 (lazy_hex_fp_value): New function.
12436 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12437
6662d794
MLI
124382010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12439
12440 * c-gimplify.c: Do not include tree-flow.h
12441
38f8b050
JR
124422010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12443
12444 PR other/44034
12445 * c-common.c: Rename targetm member:
12446 targetm.enum_va_list -> targetm.enum_va_list_p
12447
9589f23e
AS
124482010-06-28 Anatoly Sokolov <aesok@post.ru>
12449
12450 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12451
3b06d379
SB
124522010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12453
12454 * c-cppbuiltin.c: Do not include except.h.
12455
d166d4c3
AK
124562010-06-24 Andi Kleen <ak@linux.intel.com>
12457
9faeb493
UB
12458 * c-common.c (warn_for_omitted_condop): New.
12459 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12460
70cb8be6
JM
124612010-06-21 Joseph Myers <joseph@codesourcery.com>
12462
12463 * c.opt (lang-objc): Remove.
12464 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12465
a4c97feb
JR
124662010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12467
12468 * c-opts.c: Include "tm_p.h".
12469
6e2f1956
JM
124702010-06-20 Joseph Myers <joseph@codesourcery.com>
12471
12472 * c-common.c (parse_optimize_options): Update call to
12473 decode_options.
12474
bc87224e
NF
124752010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12476
12477 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12478 new type of types_used_by_cur_var_decl.
12479
b49cf425
JR
124802010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12481
12482 PR bootstrap/44512
12483 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12484 for C++ standard compliance.
12485
59f9c2ed
JM
124862010-06-16 Jason Merrill <jason@redhat.com>
12487
12488 * c.opt: Add -Wnoexcept.
12489
33766b66
RG
124902010-06-16 Richard Guenther <rguenther@suse.de>
12491
12492 PR c/44555
12493 * c-common.c (c_common_truthvalue_conversion): Remove
12494 premature and wrong optimization concering ADDR_EXPRs.
12495
eff7e30c
AC
124962010-06-15 Arnaud Charlet <charlet@adacore.com>
12497
12498 * c-ada-spec.c (dump_sloc): Remove column info.
12499 (is_simple_enum): New function.
12500 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12501 enum types when relevant.
12502
6312e84d
MLI
125032010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12504
9faeb493 12505 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12506 location.
12507
1cb42611
JM
125082010-06-10 Joseph Myers <joseph@codesourcery.com>
12509
12510 * c-opts.c (c_common_handle_option): Don't handle
12511 OPT_fshow_column.
12512
a9429e29
LB
125132010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12514
12515 * c-pragma.c (push_alignment): Use typed GC allocation.
12516 (handle_pragma_push_options): Likewise.
12517
12518 * c-common.c (parse_optimize_options): Likewise.
12519
12520 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12521 option.
12522
5498f011
JM
125232010-06-07 Joseph Myers <joseph@codesourcery.com>
12524
12525 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12526 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12527 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12528 flag_signed_bitfields, warn_strict_null_sentinel,
12529 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12530 flag_gen_declaration, flag_no_gnu_keywords,
12531 flag_implement_inlines, flag_implicit_templates,
12532 flag_implicit_inline_templates, flag_optional_diags,
12533 flag_elide_constructors, flag_default_inline, flag_rtti,
12534 flag_conserve_space, flag_access_control, flag_check_new,
12535 flag_new_for_scope, flag_weak, flag_working_directory,
12536 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12537 flag_enforce_eh_specs, flag_threadsafe_statics,
12538 flag_pretty_templates): Remove.
12539 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12540 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12541 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12542 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12543 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12544 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12545 flag_no_gnu_keywords, flag_implement_inlines,
12546 flag_implicit_templates, flag_implicit_inline_templates,
12547 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12548 flag_rtti, flag_conserve_space, flag_access_control,
12549 flag_check_new, flag_new_for_scope, flag_weak,
12550 flag_working_directory, flag_use_cxa_atexit,
12551 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12552 flag_threadsafe_statics, flag_pretty_templates,
12553 warn_strict_null_sentinel): Remove.
12554 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12555 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12556 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12557 fimplicit-inline-templates, fimplicit-templates,
12558 flax-vector-conversions, fms-extensions, fnil-receivers,
12559 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12560 frtti, fshort-double, fshort-enums, fshort-wchar,
12561 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12562 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12563 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12564 gen-decls, undef): Use Var.
12565 (fdefault-inline, foptional-diags): Document as doing nothing.
12566 * c-opts.c (c_common_handle_option): Remove cases for options now
12567 using Var. Mark ignored options as such.
12568
39dabefd
SB
125692010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12570
9faeb493 12571 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12572 * c-common.def: Likewise.
12573 * c-common.h: Likewise.
12574 * c-cppbuiltin.c: Likewise.
12575 * c-dump.c: Likewise.
12576 * c-format.c: Likewise.
12577 * c-format.h : Likewise.
12578 * c-gimplify.c: Likewise.
12579 * c-lex.c: Likewise.
12580 * c-omp.c: Likewise.
12581 * c.opt: Likewise.
12582 * c-opts.c: Likewise.
12583 * c-pch.c: Likewise.
12584 * c-ppoutput.c: Likewise.
12585 * c-pragma.c: Likewise.
12586 * c-pragma.h: Likewise.
12587 * c-pretty-print.c: Likewise.
12588 * c-pretty-print.h: Likewise.
12589 * c-semantics.c: Likewise.
12590 * stub-objc.c: Likewise.
12591
12592 * c-common.c: Include gt-c-family-c-common.h.
12593 * c-pragma.c: Include gt-c-family-c-pragma.h.
12594\f
c48514be 12595Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
12596
12597Copying and distribution of this file, with or without modification,
12598are permitted in any medium without royalty provided the copyright
12599notice and this notice are preserved.