]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
c-family: Implement -Warray-compare [PR97573]
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
e3e07b89
GA
12021-10-02 Iain Sandoe <iain@sandoe.co.uk>
2
3 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
4 NULL, this is not needed.
5
9d116bcc
GA
62021-10-01 Martin Sebor <msebor@redhat.com>
7
8 PR c/102103
9 * c-common.c (decl_with_nonnull_addr_p): Handle members.
10 Check and perform warning suppression.
11 (c_common_truthvalue_conversion): Enhance warning suppression.
12
132021-10-01 Martin Liska <mliska@suse.cz>
14
15 PR target/102552
16 * c-common.c (parse_optimize_options): decoded_options[0] is
17 used for program name, so merged_decoded_options should also
18 respect that.
19
202021-10-01 Jakub Jelinek <jakub@redhat.com>
21 Richard Biener <rguenther@suse.de>
22
23 PR sanitizer/102515
24 * c-ubsan.c (ubsan_instrument_division): Check the right
25 flag_sanitize_recover bit, depending on which sanitization
26 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
27 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
28 and SANITIZE_DIVIDE is enabled, neither check is known
29 to be false and flag_sanitize_recover bits for those two
30 aren't the same, emit both __ubsan_handle_divrem_overflow
31 and __ubsan_handle_divrem_overflow_abort calls.
32
332021-10-01 Martin Liska <mliska@suse.cz>
34
35 * c-common.c (parse_optimize_options): Combine optimize
36 options with what was provided on the command line.
37
382021-10-01 Jakub Jelinek <jakub@redhat.com>
39
40 * c-omp.c (c_omp_split_clauses): Also copy
41 OMP_CLAUSE_ORDER_REPRODUCIBLE.
42
cf966403
GA
432021-09-27 Martin Liska <mliska@suse.cz>
44
45 * c-opts.c (c_common_init_options_struct): Set also
46 x_flag_default_complex_method.
47
e4777439
GA
482021-09-22 Jakub Jelinek <jakub@redhat.com>
49
50 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
51
62498024
GA
522021-09-20 Matthias Kretz <m.kretz@gsi.de>
53
54 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
55 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
56 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
57 __ROUNDING_MATH__ according to the new optimization flags.
58
cf74e7b5
GA
592021-09-18 Jakub Jelinek <jakub@redhat.com>
60
61 * c-omp.c (c_omp_split_clauses): Split order clause also to
62 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
63
0a4cb439
GA
642021-09-17 Jakub Jelinek <jakub@redhat.com>
65
66 * c-omp.c (c_finish_omp_atomic): Avoid creating
67 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
68 create_tmp_var and add a zero initializer to TARGET_EXPRs that
69 had NULL initializer. When omitting operands after v = x,
70 use type of v rather than type of x. Fix type of vtmp
71 TARGET_EXPR.
72
07985c47
GA
732021-09-13 Jason Merrill <jason@redhat.com>
74
75 * c.opt: Add -Winterference-size.
76 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
77 and __GCC_CONSTRUCTIVE_SIZE.
78
a26206ec
GA
792021-09-10 Jakub Jelinek <jakub@redhat.com>
80
81 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
82 * c-omp.c: Include gimple-fold.h.
83 (c_finish_omp_atomic): Add r and weak arguments. Add support for
84 OpenMP 5.1 atomics.
85
f84e2f0b
GA
862021-09-09 qing zhao <qing.zhao@oracle.com>
87
88 * c-attribs.c (handle_uninitialized_attribute): New function.
89 (c_common_attribute_table): Add "uninitialized" attribute.
90
b6db7cd4
GA
912021-09-08 liuhongt <hongtao.liu@intel.com>
92
93 * c-common.c (excess_precision_mode_join): Update below comments.
94 (c_ts18661_flt_eval_method): Set excess_precision_type to
95 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
96 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
97 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
98 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
99
b2748138
GA
1002021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
101
102 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
103
7b739540
GA
1042021-09-03 Eric Botcazou <ebotcazou@adacore.com>
105
106 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
107 and -gnatwu warning for the package specification.
108
e11c6046
GA
1092021-09-01 Iain Sandoe <iain@sandoe.co.uk>
110
111 * c-attribs.c (handle_unavailable_attribute): New.
112
1e2f030b
GA
1132021-08-30 Jason Merrill <jason@redhat.com>
114
115 * c.opt: Add -Wmissing-requires.
116
85d77ac4
GA
1172021-08-25 Lewis Hyatt <lhyatt@gmail.com>
118
119 PR other/93067
120 * c-opts.c (c_common_input_charset_cb): New function.
121 (c_common_post_options): Call new function
122 diagnostic_initialize_input_context().
123
7c9e1645
GA
1242021-08-20 Tobias Burnus <tobias@codesourcery.com>
125
126 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
127 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
128 "di" and "u", respecitively; fill with BADLEN to match
129 size of 'types'.
130 (get_init_dynamic_hwi): Split off from ...
131 (init_dynamic_diag_info): ... here. Call it.
132 (init_dynamic_gfc_info): Call it.
133
1342021-08-20 Jakub Jelinek <jakub@redhat.com>
135
136 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
137 * c-pragma.c (omp_pragmas): Add error directive.
138 * c-omp.c (omp_directives): Uncomment error directive entry.
139
6e529985
GA
1402021-08-18 Jakub Jelinek <jakub@redhat.com>
141
142 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
143 * c-pragma.c (omp_pragmas): Add nothing directive.
144 * c-omp.c (omp_directives): Uncomment nothing directive entry.
145
2d14d64b
GA
1462021-08-17 Jakub Jelinek <jakub@redhat.com>
147
148 PR c++/101539
149 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
150 * c-common.c (c_common_reswords): Add __is_layout_compatible.
151
1522021-08-17 Matt Jacobson <mhjacobson@me.com>
153
154 * c-opts.c (c_common_post_options): Default to
155 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
156
1572021-08-17 Jakub Jelinek <jakub@redhat.com>
158
159 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
160 * c-pragma.c (omp_pragmas): Add scope construct.
161 * c-omp.c (omp_directives): Uncomment scope directive entry.
162
9d1d9fc8
GA
1632021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
164
165 * c-cppbuiltin.c (c_cpp_builtins): Define
166 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
167
72be20e2
GA
1682021-08-12 Jakub Jelinek <jakub@redhat.com>
169
170 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
171 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
172 * c-pragma.c (omp_pragmas_simd): Add masked construct.
173 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
174 enumerator.
175 (c_finish_omp_masked): Declare.
176 * c-omp.c (c_finish_omp_masked): New function.
177 (c_omp_split_clauses): Handle combined masked constructs.
178
4d17ca1b
GA
1792021-07-30 Jakub Jelinek <jakub@redhat.com>
180
181 PR c++/101539
182 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
183 * c-common.c (c_common_reswords): Add
184 __is_pointer_interconvertible_base_of.
185
1862021-07-29 Richard Biener <rguenther@suse.de>
187
188 PR c/101512
189 * c-common.c (c_common_mark_addressable_vec): Look through
190 C_MAYBE_CONST_EXPR even if not at the toplevel.
191
af3f12e6
GA
1922021-07-27 Martin Sebor <msebor@redhat.com>
193
194 PR c/101585
195 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
196
ead235f6
GA
1972021-07-23 Jakub Jelinek <jakub@redhat.com>
198
199 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
200 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
201 and later.
202
2032021-07-23 Jakub Jelinek <jakub@redhat.com>
204
205 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
206 PRAGMA_OMP__LAST_ enumerators.
207
419c6c68
GA
2082021-07-21 Thomas Schwinge <thomas@codesourcery.com>
209 Joseph Myers <joseph@codesourcery.com>
210 Cesar Philippidis <cesar@codesourcery.com>
211
212 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
213
92d45509
GA
2142021-07-20 Martin Sebor <msebor@redhat.com>
215
216 * c-common.c (c_build_shufflevector): Adjust by-value argument to
217 by-const-reference.
218 * c-common.h (c_build_shufflevector): Same.
219
87277b6a
GA
2202021-07-16 Andrew Pinski <apinski@marvell.com>
221
222 PR c/101453
223 * c-common.c (parse_optimize_options): Use the correct
224 size for buffer.
225
d97d71a1
GA
2262021-07-15 Martin Sebor <msebor@redhat.com>
227
228 PR c/101289
229 PR c/97548
230 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
231
c4fee1c6
GA
2322021-07-14 Jason Merrill <jason@redhat.com>
233
234 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
235
6fba0eea
GA
2362021-07-06 Martin Sebor <msebor@redhat.com>
237
238 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
239 (gcc_cdiag_char_table): Same.
240 (gcc_cxxdiag_char_table): Same.
241
7a60a6e8
GA
2422021-07-02 Jakub Jelinek <jakub@redhat.com>
243
244 * c-common.h (enum c_omp_directive_kind): New enum.
245 (struct c_omp_directive): New type.
246 (c_omp_categorize_directive): Declare.
247 * c-omp.c (omp_directives): New variable.
248 (c_omp_categorize_directive): New function.
249
bea7c16a
GA
2502021-07-01 Eric Botcazou <ebotcazou@adacore.com>
251
252 * c-ada-spec.c (packed_layout): New global variable.
253 (dump_ada_declaration): Set it upon seeing a packed record type.
254 Do not put the "aliased" keyword if it is set.
255 (dump_ada_structure): Add Pack aspect if it is set and clear it.
256
2572021-07-01 Eric Botcazou <ebotcazou@adacore.com>
258
259 * c-ada-spec.c (check_name): Rename into...
260 (check_type_name_conflict): ...this. Minor tweak.
261 (dump_ada_function_declaration): Adjust to above renaming.
262 (dump_ada_array_domains): Fix oversight.
263 (dump_ada_declaration): Call check_type_name_conflict for variables.
264
90708f87
GA
2652021-06-25 Martin Sebor <msebor@redhat.com>
266
267 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
268 (c_common_truthvalue_conversion): Replace direct uses of
269 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
270 copy_no_warning.
271 (check_function_arguments_recurse): Same.
272 * c-gimplify.c (c_gimplify_expr): Same.
273 * c-warn.c (overflow_warning): Same.
274 (warn_logical_operator): Same.
275 (warn_if_unused_value): Same.
276 (do_warn_unused_parameter): Same.
277
9aa8327e
GA
2782021-06-24 Jakub Jelinek <jakub@redhat.com>
279
280 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
281 C_ORT_OMP_TARGET.
282 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
283 combined target constructs also add map (always, tofrom:) clause.
284
ede6c356
GA
2852021-06-15 Robin Dapp <rdapp@linux.ibm.com>
286
287 * c-attribs.c (common_handle_aligned_attribute): Remove short
288 circuit and dead code.
289
8dc48181
GA
2902021-06-14 Jonathan Wakely <jwakely@redhat.com>
291
292 PR c++/101052
293 * known-headers.cc (get_stdlib_header_for_name): Add known
294 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
295 exit, and getenv.
296
8b8c3912
GA
2972021-06-12 Jason Merrill <jason@redhat.com>
298
299 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
300
f16f65f8
GA
3012021-06-11 Jakub Jelinek <jakub@redhat.com>
302
303 PR c++/100974
304 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
305 -std=c++2b for P1938R3 consteval if support.
306
4f625f47
GA
3072021-06-09 Jason Merrill <jason@redhat.com>
308
309 PR c++/100879
310 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
311 warning.
312
438aac59
GA
3132021-06-07 Martin Liska <mliska@suse.cz>
314
315 * c-target.def: Split long lines and replace them
316 with '\n\'.
317
600f90cb
GA
3182021-06-04 Martin Sebor <msebor@redhat.com>
319
320 PR c/100783
321 * c-attribs.c (positional_argument): Bail on erroneous types.
322
3232021-06-04 Martin Sebor <msebor@redhat.com>
324
325 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
326 for element presence.
327
440c8a0a
GA
3282021-06-03 Eric Botcazou <ebotcazou@adacore.com>
329
330 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
331 (dump_ada_decl_name): Likewise.
332 (dump_anonymous_type_name): Remove parent parameter and adjust.
333 (dump_sloc): Minor tweak.
334 (dump_ada_array_type): Remove type parameter and adjust.
335 (dump_ada_enum_type): Remove parent parameter and adjust.
336 (dump_ada_node): Adjust calls to above functions.
337 (dumped_anonymous_types): New global variable.
338 (dump_nested_types_1): Rename into...
339 (dump_nested_types): ...this.
340 (dump_nested_type): Remove parent and dumped_types parameters.
341 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
342 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
343 (dump_ada_specs): Initialize and free dumped_anonymous_types.
344
3452021-06-03 Eric Botcazou <ebotcazou@adacore.com>
346
347 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
348 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
349
3502021-06-03 Eric Botcazou <ebotcazou@adacore.com>
351
352 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
353 (htable_t): New typedef.
354 (overloaded_names): Use it.
355 (add_name): New function.
356 (init_overloaded_names): Use add_name to populate the table and add
357 special cases for sigaction and stat.
358 (overloaded_name_p): Rename into...
359 (overloading_index): ...this. Do not initialize overloaded_names table
360 here. Return the index or zero.
361 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
362 but add an overloading suffix instead.
363 (dump_ada_specs): Initialize overloaded_names tables here.
364
b75978d1
GA
3652021-06-01 Martin Liska <mliska@suse.cz>
366
367 PR other/100759
368 * c-attribs.c (handle_optimize_attribute): Limit sanity check
369 to a situation where we are not in processing of an optimize
370 pragma.
371 * c-pragma.c (handle_pragma_pop_options): Restore target
372 options.
373
ee682192
GA
3742021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
375
376 PR testsuite/100749
377 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
378
3792021-05-31 Richard Biener <rguenther@suse.de>
380
381 PR c++/88601
382 * c-common.c: Include tree-vector-builder.h and
383 vec-perm-indices.h.
384 (c_common_reswords): Add __builtin_shufflevector.
385 (c_build_shufflevector): New funtion.
386 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
387 (c_build_shufflevector): Declare.
388
48166757
GA
3892021-05-28 Jakub Jelinek <jakub@redhat.com>
390
391 PR middle-end/99928
392 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
393 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
394
3952021-05-28 Tobias Burnus <tobias@codesourcery.com>
396
397 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
398
2bc6dace
GA
3992021-05-25 Martin Liska <mliska@suse.cz>
400
401 PR tree-optimization/92860
402 PR target/99592
403 * c-attribs.c (handle_optimize_attribute): Save target node
404 before calling parse_optimize_options and save it in case
405 it changes.
406 * c-pragma.c (handle_pragma_target): Similarly for pragma.
407 (handle_pragma_pop_options): Likewise here.
408
4092021-05-25 Martin Liska <mliska@suse.cz>
410
411 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
412
4132021-05-25 Jakub Jelinek <jakub@redhat.com>
414
415 PR middle-end/99928
416 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
417 combined with simd and not with taskloop or for.
418
2832d51b
GA
4192021-05-21 Jakub Jelinek <jakub@redhat.com>
420
421 PR middle-end/99928
422 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
423 on firstprivate clause copy going to target construct, and for
424 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
425
ea34e2ed
GA
4262021-05-20 Jonathan Wakely <jwakely@redhat.com>
427
428 * c.opt (Wc++11-extensions, Wc++14-extensions)
429 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
430 options.
431
4322021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
433
434 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
435
4362021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
437
438 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
439 * c-pch.c (struct c_pch_validity): Use type uint32_t.
440 (pch_init): Renamed member.
441 (c_common_valid_pch): Adjust access to debug_type_names.
442
65f32e5d
GA
4432021-05-19 Martin Sebor <msebor@redhat.com>
444
445 PR c/100619
446 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
447 bounds.
448
a8daf9a1
GA
4492021-05-18 Richard Biener <rguenther@suse.de>
450
451 PR c/100547
452 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
453 Reword existing nunit diagnostic.
454
a7ffc1ef
GA
4552021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
456
457 * c-common.c (braced_list_to_string): Return CTOR unchanged
458 if host and target character sizes don't match.
459
87a7d10c
GA
4602021-05-14 Martin Liska <mliska@suse.cz>
461
462 * c.opt: Add Warning keyword for 2 options.
463
f9af11c7
GA
4642021-05-13 Martin Liska <mliska@suse.cz>
465
466 PR middle-end/100504
467 * c-attribs.c (handle_target_clones_attribute): Expect a string
468 argument to target_clone argument.
469
037e3661
GA
4702021-05-11 Joseph Myers <joseph@codesourcery.com>
471
472 * c-lex.c (interpret_float): Handle digit separators for C2X.
473
aa891c56
GA
4742021-05-10 Martin Liska <mliska@suse.cz>
475
476 * c-ada-spec.c (print_destructor): Use startswith
477 function instead of strncmp.
478 (dump_ada_declaration): Likewise.
479 * c-common.c (disable_builtin_function): Likewise.
480 (def_builtin_1): Likewise.
481 * c-format.c (check_tokens): Likewise.
482 (check_plain): Likewise.
483 (convert_format_name_to_system_name): Likewise.
484
e4ff4ffb
GA
4852021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
486
487 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
488 complex divide
489
c0fa3f2f
GA
4902021-04-26 Thomas Schwinge <thomas@codesourcery.com>
491 Nathan Sidwell <nathan@codesourcery.com>
492 Tom de Vries <vries@codesourcery.com>
493 Julian Brown <julian@codesourcery.com>
494 Kwok Cheung Yeung <kcy@codesourcery.com>
495
496 * c.opt (Wopenacc-parallelism): New.
497
6e81e015
GA
4982021-04-19 Thomas Schwinge <thomas@codesourcery.com>
499
500 * c.opt (fopenacc-kernels=): Remove.
501
019a9220
GA
5022021-04-08 Jakub Jelinek <jakub@redhat.com>
503
504 * c-warn.c (do_warn_double_promotion): Fix comment typo,
505 occured -> occurred.
506 (check_alignment_of_packed_member): Fix a comment typo,
507 memeber -> member.
508 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
509 and onless -> unless.
510 (warn_parm_array_mismatch): Fix comment typos, declaratation
511 -> declaration and woud -> would. Fix up comment indentation.
512
5132021-04-08 Martin Sebor <msebor@redhat.com>
514
515 PR middle-end/99883
516 * c.opt (Wmismatched-new-delete): Correct spelling.
517
b1da9916
GA
5182021-04-05 Eric Botcazou <ebotcazou@adacore.com>
519
520 * c-ada-spec.c (is_simple_enum): Minor tweaks.
521 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
522 enumeral types use again the type name for the enumeration constants.
523 (dump_ada_node): Adjust call to dump_ada_enum_type.
524 (dump_nested_type): Likewise.
525
f1607029
GA
5262021-04-01 Jason Merrill <jason@redhat.com>
527
528 PR c++/98481
529 * c-opts.c (c_common_post_options): Bump latest_abi_version.
530
4493b1c1
GA
5312021-03-25 Jakub Jelinek <jakub@redhat.com>
532
533 PR c++/99565
534 * c-warn.c (do_warn_duplicated_branches): Pass also
535 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
536
6af7b307
GA
5372021-03-20 Jakub Jelinek <jakub@redhat.com>
538
539 PR debug/99230
540 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
541
ceae9533
GA
5422021-03-05 Eric Botcazou <ebotcazou@adacore.com>
543
544 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
545 after entering the separate class package, if any.
546
67f10d28
GA
5472021-03-04 Richard Biener <rguenther@suse.de>
548
549 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
550 Handle ERROR_MARK.
551
5522021-03-04 Jakub Jelinek <jakub@redhat.com>
553
554 PR c/99325
555 * c-ppoutput.c (print): Change src_line type from int to unsigned.
556 (token_streamer::stream) Likewise.
557 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
558 UNKNOWN_LOCATION.
559
f3641ac7
GA
5602021-03-03 Jakub Jelinek <jakub@redhat.com>
561
562 PR c/99324
563 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
564 instead of mark_addressable. Fix a comment typo -
565 neutrallly -> neutrally.
566
2c83c3fb
GA
5672021-02-28 Jakub Jelinek <jakub@redhat.com>
568
569 PR c/99304
570 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
571 message - refernced -> referenced. Remove superfluous space before
572 closing paren of function calls.
573
daa68844
GA
5742021-02-25 Nathan Sidwell <nathan@acm.org>
575
576 PR c++/99166
577 * c.opt (-flang-info-module-cmi): Renamed option.
578
50352c6c
GA
5792021-02-19 Nathan Sidwell <nathan@acm.org>
580
581 * c.opt (flang-info-module-read, flang-info-module-read=): New.
582
bf81237e
GA
5832021-02-18 H.J. Lu <hjl.tools@gmail.com>
584
585 PR target/99113
586 * c-attribs.c (c_common_attribute_table): Add the "retain"
587 attribute.
588 (handle_retain_attribute): New function.
589
0e804ce3
GA
5902021-02-16 Marek Polacek <polacek@redhat.com>
591
592 PR c++/99062
593 * c-attribs.c (handle_assume_aligned_attribute): Check that the
594 alignment argument is non-negative. Tweak a warning message.
595
fab095da
GA
5962021-02-12 Martin Sebor <msebor@redhat.com>
597
598 PR c/99055
599 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
600 print_generic_expr_to_str.
601
4b37c3ea
GA
6022021-02-10 Richard Biener <rguenther@suse.de>
603
604 * c-common.c (parse_optimize_options): Free decoded_options.
605
a19dd5e6
GA
6062021-02-04 emsr <3dw4rd@verizon.net>
607
608 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
609
9faaa807
GA
6102021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
611
612 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
613 * c-lex.c (interpret_integer): Set node type for size literal.
614
85d04a2e
GA
6152021-01-28 Jakub Jelinek <jakub@redhat.com>
616
617 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
618 draft from description.
619 (-std=c++2b): Fix a pasto, 2020 -> 2023.
620
e62bb7f0
GA
6212021-01-26 Paul Fee <paul.f.fee@gmail.com>
622
623 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
624 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
625 and -std=gnu++2b
626 * c-opts.c (set_std_cxx23): New.
627 (c_common_handle_option): Set options when -std=c++23 is enabled.
628 (c_common_post_options): Adjust comments.
629 (set_std_cxx20): Likewise.
630
161e4c08
GA
6312021-01-25 Martin Sebor <msebor@redhat.com>
632
633 PR c++/98646
634 * c-common.c (check_nonnull_arg): Adjust warning text.
635
4c9bcd5c
GA
6362021-01-17 Martin Sebor <msebor@redhat.com>
637
638 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
639 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
640
59cf67d1
GA
6412021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
642
643 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
644 Redefine PRAGMA_OACC_CLAUSE_DETACH.
645
2f7f0d32
GA
6462021-01-15 Jakub Jelinek <jakub@redhat.com>
647
648 PR tree-optimization/98597
649 * c-pretty-print.c: Include options.h.
650 (c_fold_indirect_ref_for_warn): New function.
651 (print_mem_ref): Use it. If it returns something that has compatible
652 type and is TBAA compatible with zero offset, print it and return,
653 otherwise print it using offsetof syntax or array ref syntax. Fix up
654 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
655 argument has pointer to array type. Print pointers using the standard
656 formatting.
657
6851dda2
GA
6582021-01-12 Martin Sebor <msebor@redhat.com>
659
660 PR c/98597
661 PR c/98592
662 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
663 has pointer type. Remove redundant code. Avoid calling
664 gimple_canonical_types_compatible_p.
665
7d187e4f
GA
6662021-01-07 Martin Sebor <msebor@redhat.com>
667
668 PR middle-end/98578
669 * c-pretty-print.c (print_mem_ref): Strip array from access type.
670 Avoid assuming acces type's size is constant. Correct condition
671 guarding the printing of a parenthesis.
672
942ae5be
GA
6732021-01-06 Martin Sebor <msebor@redhat.com>
674
675 PR c++/95768
676 * c-pretty-print.c (c_pretty_printer::primary_expression): For
677 SSA_NAMEs print VLA names and GIMPLE defining statements.
678 (print_mem_ref): New function.
679 (c_pretty_printer::unary_expression): Call it.
680
6812021-01-06 Richard Biener <rguenther@suse.de>
682
683 PR tree-optimization/95582
684 * c-attribs.c (c_common_attribute_table): Add entry for
685 signed_bool_precision.
686 (handle_signed_bool_precision_attribute): New.
687
8daa719b
GA
6882020-12-24 Iain Sandoe <iain@sandoe.co.uk>
689
690 * c.opt: Add -stdlib= option and enumerations for
691 libstdc++ and libc++.
692
eefe499f
GA
6932020-12-16 Martin Liska <mliska@suse.cz>
694
695 * c.opt: Remove usage of Report.
696
d52945ce
GA
6972020-12-14 Martin Sebor <msebor@redhat.com>
698
699 PR middle-end/98166
700 PR c++/57111
701 PR middle-end/98160
702 * c-attribs.c (maybe_add_noinline): New function.
703 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
704 Implicitly add attribute noinline to functions not declared inline
705 and warn on those.
706
ca2bd949
GA
7072020-12-09 Tobias Burnus <tobias@codesourcery.com>
708
709 * c-pragma.c (omp_pragmas): Add 'allocate'.
710 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
711
f6e8e279
GA
7122020-12-08 Jakub Jelinek <jakub@redhat.com>
713
714 PR c++/98187
715 * c-pragma.c (omp_pragmas): Remove "master".
716 (omp_pragmas_simd): Add "master".
717
bc8a7013
GA
7182020-12-07 Marek Polacek <polacek@redhat.com>
719
720 PR c++/98126
721 * c-common.c (verify_tree_lim_r): New function.
722 (verify_sequence_points): Use it. Use nullptr instead of 0.
723
b8dd0ef7
GA
7242020-12-03 Martin Sebor <msebor@redhat.com>
725
726 PR c++/90629
727 PR middle-end/94527
728 * c-attribs.c (handle_dealloc_attribute): New function.
729 (handle_malloc_attribute): Handle argument forms of attribute.
730 * c.opt (-Wmismatched-dealloc): New option.
731 (-Wmismatched-new-delete): New option.
732
7332020-12-03 Jakub Jelinek <jakub@redhat.com>
734
735 PR libstdc++/93121
736 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
737 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
738
e0f5e792
GA
7392020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
740
741 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
742 {__GNUC_EXECUTION_CHARSET_NAME} and
743 _WIDE_EXECUTION_CHARSET_NAME} macros.
744
7452020-12-01 Nathan Sidwell <nathan@acm.org>
746
747 * c-common.c (module, import, export): New internal tokens (with
748 trailing space).
749 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
750 them.
751 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
752 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
753
7542020-12-01 Nathan Sidwell <nathan@acm.org>
755
756 * c-opts.c (c_common_init_options): Ask for module dependencies.
757 (c_common_handle_option): Handle -Mmodules -Mno-modules.
758 * c-pch.c (c_common_valid_pch): ... does not play with C++
759 modules.
760 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
761 options.
762 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
763 (fmodule-only, fmodule-mapper, fmodule-lazy)
764 (fmodule-version-ignore, Winvalid-imported-macros)
765 (flang-info-include-translate, flang-info-include-translate-not):
766 New options
767
5fbf0ecb
GA
7682020-11-28 Eric Botcazou <ebotcazou@adacore.com>
769
770 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
771 (dump_ada_structure): Also deal with convention, unchecked union and
772 bit-field for nested types. In the latter case, print an Alignment
773 aspect along with the Pack aspect.
774
360258da
GA
7752020-11-25 Martin Sebor <msebor@redhat.com>
776
777 PR bootstrap/94982
778 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
779 -Wformat-diag.
780
1e2c9a27
GA
7812020-11-24 Martin Sebor <msebor@redhat.com>
782
783 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
784
8e6198d0
GA
7852020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
786
787 * c-attribs.c (handle_special_var_sec_attribute): New.
788 (handle_noinit_attribute): Remove.
789 (attr_noinit_exclusions): Rename to...
790 (attr_section_exclusions): ...this, and add "persistent" attribute
791 exclusion.
792 (c_common_attribute_table): Add "persistent" attribute.
793
7a97e2fc
GA
7942020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
795
796 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
797 Treat opaque types like other types.
798 (c_pretty_printer::direct_abstract_declarator): Opaque types are
799 supported types.
800
82e5048e
GA
8012020-11-20 Martin Sebor <msebor@redhat.com>
802
803 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
804 with fewer arguments.
805
8062020-11-20 Martin Sebor <msebor@redhat.com>
807
808 PR middle-end/97879
809 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
810 Error out on invalid modes.
811
8122020-11-20 Jakub Jelinek <jakub@redhat.com>
813
814 PR libstdc++/88101
815 * c-common.c (check_builtin_function_arguments): Handle
816 BUILT_IN_CLEAR_PADDING.
817
25bb75f8
GA
8182020-11-18 Nathan Sidwell <nathan@acm.org>
819
820 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
821
4dabb037
GA
8222020-11-17 Nathan Sidwell <nathan@acm.org>
823
824 * c-common.h (enum c_tree_index): Reorder to place lazy fields
825 after newly-added CTI_MODULE_HWM.
826
8272020-11-17 Joseph Myers <joseph@codesourcery.com>
828
829 * c-cppbuiltin.c (builtin_define_float_constants): Define
830 "*_IS_IEC_60559__" macros.
831
8322020-11-17 Nathan Sidwell <nathan@acm.org>
833
834 * c-lex.c: #include "langhooks.h".
835 (cb_undef): Maybe call preprocess_undef lang hook.
836 * c-opts.c (c_common_post_options): Maybe call preprocess_options
837 lang hook.
838 (push_command_line_include): Maybe call preprocess_main_file lang
839 hook.
840 (cb_file_change): Likewise.
841 * c-ppoutput.c: #include "langhooks.h.
842 (scan_translation_unit): Maybe call preprocess_token lang hook.
843 (class do_streamer): New, derive from token_streamer.
844 (directives_only_cb): Data pointer is do_streamer, call
845 preprocess_token lang hook.
846 (scan_translation_unit_directives_only): Use do_streamer.
847 (print_line_1): Move src_line recording to after string output.
848 (cb_undef): Maybe call preprocess_undef lang hook.
849
8502020-11-17 Nathan Sidwell <nathan@acm.org>
851
852 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
853 code duplicating that functionality.
854
8552020-11-17 Jakub Jelinek <jakub@redhat.com>
856
857 PR c/90628
858 * c-common.c (check_builtin_function_arguments)
859 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
860 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
861 for more builtins and argument positions.
862
29c5d9ce
GA
8632020-11-16 Iain Sandoe <iain@sandoe.co.uk>
864
865 PR objc/97854
866 * stub-objc.c: Include c-common.h to declare enum rid.
867
77f67db2
GA
8682020-11-13 Jakub Jelinek <jakub@redhat.com>
869
870 PR c++/63287
871 * c-cppbuiltin.c: Include configargs.h.
872 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
873 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
874 "single".
875
8762020-11-13 Gergö Barany <gergo@codesourcery.com>
877 Thomas Schwinge <thomas@codesourcery.com>
878
879 * c.opt (fopenacc-kernels): Add.
880
8812020-11-13 Jason Merrill <jason@redhat.com>
882
883 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
884
8852020-11-13 Piotr H. Dabrowski <phd@phd.re>
886
887 PR c++/91318
888 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
889
8902020-11-13 Martin Liska <mliska@suse.cz>
891
892 * c-attribs.c (build_attr_access_from_parms): Format properly.
893
8942020-11-13 Iain Sandoe <iain@sandoe.co.uk>
895
896 PR objc/90707
897 * c-common.c (c_common_reswords): null_unspecified, nullable,
898 nonnull, null_resettable: New keywords.
899 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
900 RID_NONNULL, RID_NULL_RESETTABLE: New.
901 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
902 ranges accepted for property attributes.
903 * c-attribs.c (handle_objc_nullability_attribute): New.
904 * c-objc.h (enum objc_property_attribute_group): Add
905 OBJC_PROPATTR_GROUP_NULLABLE.
906 (enum objc_property_attribute_kind):Add
907 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
908 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
909
9102020-11-13 Iain Sandoe <iain@sandoe.co.uk>
911
912 PR objc/77404
913 * c-attribs.c (handle_objc_root_class_attribute): New
914 * c-objc.h (objc_start_class_interface): Add a location
915 value for the position of the class name.
916 * c.opt: Add Wobjc-root-class.
917 * stub-objc.c (objc_start_class_interface): Add a location
918 value for the position of the class name.
919
a5a11525
GA
9202020-11-12 Joseph Myers <joseph@codesourcery.com>
921
922 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
923 Allow scope for C. Handle standard attributes for C. Do not
924 accept unscoped attributes if std_syntax and not handled as
925 standard attributes.
926 * c-common.h (c_common_has_attribute): Update prototype.
927
9282020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
929
930 PR pch/86674
931 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
932 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
933
0f5f9ed5
GA
9342020-11-11 Patrick Palka <ppalka@redhat.com>
935
936 PR c++/88115
937 * c-opts.c (c_common_post_options): Update latest_abi_version.
938
bb622641
GA
9392020-11-10 Jakub Jelinek <jakub@redhat.com>
940
941 PR c/97748
942 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
943 to false.
944 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
945 recursively and just return true instead of warning if it is true.
946 Handle COMPLEX_EXPR.
947
9482020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
949
950 * c-common.h (c_omp_adjust_map_clauses): New declaration.
951 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
952 (c_omp_adjust_map_clauses): New function.
953
2bee28dd
GA
9542020-11-09 Marek Polacek <polacek@redhat.com>
955
956 DR 1914
957 * c-common.c (attribute_fallthrough_p): Tweak the warning
958 message.
959
9602020-11-09 Patrick Palka <ppalka@redhat.com>
961
962 * c-pragma.c (handle_pragma_diagnostic): Split the
963 unknown-option -Wpragmas diagnostic into a warning and a
964 subsequent note containing a spelling suggestion. Avoid
965 computing the suggestion if -Wpragmas warnings are being
966 suppressed.
967
9682020-11-09 Patrick Palka <ppalka@redhat.com>
969
970 PR testsuite/97117
971 * c-indentation.c (get_visual_column): Remove location_t
972 parameter. Move the column-tracking diagnostic code from here
973 to ...
974 (should_warn_for_misleading_indentation): ... here, before the
975 early exit for when the loci are not all distinct. Don't pass a
976 location_t argument to get_visual_column.
977 (assert_get_visual_column_succeeds): Don't pass a location_t
978 argument to get_visual_column.
979 (assert_get_visual_column_fails): Likewise.
980
fb95de7a
GA
9812020-11-08 Iain Sandoe <iain@sandoe.co.uk>
982
983 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
984 of keywords accepted in @property attribute contexts.
985 * c-objc.h (enum objc_property_attribute_group): Add
986 OBJC_PROPATTR_GROUP_CLASS.
987 (enum objc_property_attribute_kind): Add
988 OBJC_PROPERTY_ATTR_CLASS.
989
2da7ee05
GA
9902020-11-07 Iain Sandoe <iain@sandoe.co.uk>
991
992 * c-common.c (c_common_reswords): Add 'atomic' property
993 attribute.
994 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
995 property attributes.
996
9972020-11-07 Iain Sandoe <iain@sandoe.co.uk>
998
999 * c-attribs.c (handle_nsobject_attribute): New.
1000 * c.opt: Add WNSObject-attribute.
1001
44cab2d8
GA
10022020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1003
1004 * c-objc.h (enum objc_property_attribute_group): New
1005 (enum objc_property_attribute_kind): New.
1006 (OBJC_PROPATTR_GROUP_MASK): New.
1007 (struct property_attribute_info): Small class encapsulating
1008 parser output from property attributes.
1009 (objc_prop_attr_kind_for_rid): New
1010 (objc_add_property_declaration): Simplify interface.
1011 * stub-objc.c (enum rid): Dummy type.
1012 (objc_add_property_declaration): Simplify interface.
1013 (objc_prop_attr_kind_for_rid): New.
1014
10152020-11-06 Nathan Sidwell <nathan@acm.org>
1016
1017 * c-ada-spec.c (collect_ada_nodes): Rename
1018 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1019 (collect_ada_node): Likewise.
1020 (dump_forward_type): Likewise.
1021 * c-common.c (set_underlying_type): Rename
1022 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1023 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1024
10252020-11-06 Jakub Jelinek <jakub@redhat.com>
1026
1027 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1028
0cfd9109
GA
10292020-11-05 Marek Polacek <polacek@redhat.com>
1030
1031 PR c++/97675
1032 * c.opt (Wexceptions): New option.
1033
10342020-11-05 Marek Polacek <polacek@redhat.com>
1035
1036 PR c++/25814
1037 * c.opt (Wvexing-parse): New option.
1038
35c125cb
GA
10392020-11-04 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR c++/97670
1042 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1043 underlying decl to clear in the allocate_head bitmap.
1044
10452020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1046
1047 * c-objc.h (objc_non_constant_expr_p): New.
1048 * stub-objc.c (objc_non_constant_expr_p): New.
1049
fd2325ea
GA
10502020-11-03 Nathan Sidwell <nathan@acm.org>
1051
1052 * c.opt (MQ,MT): Reword description to be make-agnostic.
1053
88ce3d5f
GA
10542020-11-02 Nathan Sidwell <nathan@acm.org>
1055
1056 * c-opts.c (c_common_post_options): Move var decl to its
1057 initialization point.
1058
10592020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1060
1061 * c-lex.c (c_lex_with_flags): When combining '@' with a
1062 keyword for Objective-C, combine the location ranges too.
1063
10642020-10-30 Qing Zhao <qing.zhao@oracle.com>
1065 H.J.Lu <hjl.tools@gmail.com>
1066
1067 * c-attribs.c (c_common_attribute_table): Add new attribute
1068 zero_call_used_regs.
1069 (handle_zero_call_used_regs_attribute): New function.
1070
e93aae4a
GA
10712020-10-28 Marek Polacek <polacek@redhat.com>
1072
1073 PR c++/97573
1074 * c-opts.c (c_common_post_options): In C++20, turn on
1075 -Wdeprecated-enum-enum-conversion and
1076 -Wdeprecated-enum-float-conversion.
1077 * c.opt (Wdeprecated-enum-enum-conversion,
1078 Wdeprecated-enum-float-conversion): New options.
1079 (Wenum-conversion): Allow for C++ too.
1080
10812020-10-28 Jakub Jelinek <jakub@redhat.com>
1082
1083 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1084 * c-omp.c: Include bitmap.h.
1085 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1086
f19e7c8d
GA
10872020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1088
1089 * c-common.c (__is_nothrow_assignable): New.
1090 (__is_nothrow_constructible): Likewise.
1091 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1092 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1093
efe71fcc
GA
10942020-10-23 Jan Hubicka <hubicka@ucw.cz>
1095
1096 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1097
10982020-10-23 Marek Polacek <polacek@redhat.com>
1099
1100 PR c++/91741
1101 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1102 (c_common_init_ts): Likewise.
1103 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1104 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1105 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1106 (maybe_warn_sizeof_array_div): New function.
1107 * c.opt (Wsizeof-array-div): New option.
1108
11092020-10-23 Martin Sebor <msebor@redhat.com>
1110
1111 PR c/97463
1112 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1113
56ddd5e2
GA
11142020-10-22 Martin Liska <mliska@suse.cz>
1115
1116 PR c/94722
1117 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1118 (handle_stack_protect_attribute): Add error message for a
1119 no_stack_protector function.
1120
11212020-10-22 Martin Liska <mliska@suse.cz>
1122
1123 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1124
11252020-10-22 Jan Hubicka <hubicka@ucw.cz>
1126
1127 * c-gimplify.c: Include tree-nested.h
1128 (c_genericize): Update for new nested function info.
1129
b2698c21
GA
11302020-10-14 Martin Sebor <msebor@redhat.com>
1131
1132 PR c/97413
1133 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1134 bounds in an extra list.
1135
7e9282ae
GA
11362020-10-05 Richard Biener <rguenther@suse.de>
1137 Jakub Jelinek <jakub@redhat.com>
1138
1139 PR c++/97197
1140 * c-pretty-print.c: Include langhooks.h.
1141 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1142 expression.
1143 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1144 unary_expression.
1145 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1146
660bfe61
GA
11472020-09-30 Martin Sebor <msebor@redhat.com>
1148
1149 PR middle-end/97189
1150 * c-attribs.c (append_access_attr): Use the function declaration
1151 location for a warning about an attribute access argument.
1152
93bca37c
GA
11532020-09-29 Marek Polacek <polacek@redhat.com>
1154
1155 PR c++/94695
1156 * c.opt (Wrange-loop-construct): New option.
1157
82b77dee
GA
11582020-09-23 Martin Sebor <msebor@redhat.com>
1159
1160 PR c/97131
1161 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1162
11632020-09-23 Marek Polacek <polacek@redhat.com>
1164
1165 PR c/97125
1166 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1167 after loops and other structured control constructs have been lowered.
1168
521d2711
GA
11692020-09-22 Jakub Jelinek <jakub@redhat.com>
1170
1171 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1172 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1173
44135373
GA
11742020-09-21 Marek Polacek <polacek@redhat.com>
1175
1176 * c.opt (Wctad-maybe-unsupported): New option.
1177
2fe5b7d1
GA
11782020-09-19 Martin Sebor <msebor@redhat.com>
1179
1180 PR c/50584
1181 * c-common.h (warn_parm_array_mismatch): Declare new function.
1182 (has_attribute): Move declaration of an existing function.
1183 (build_attr_access_from_parms): Declare new function.
1184 * c-warn.c (parm_array_as_string): Define new function.
1185 (plus_one): Define new function.
1186 (warn_parm_ptrarray_mismatch): Define new function.
1187 (warn_parm_array_mismatch): Define new function.
1188 (vla_bound_parm_decl): New function.
1189 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1190 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1191 qualifiers here...
1192 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1193 them in brackets here. Also print [static]. Strip extraneous
1194 expressions from VLA bounds.
1195
11962020-09-19 Martin Sebor <msebor@redhat.com>
1197
1198 PR c/50584
1199 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1200 (handle_argspec_attribute): New function.
1201 (get_argument, get_argument_type): New functions.
1202 (append_access_attrs): Add overload. Handle internal attribute
1203 representation in addition to external.
1204 (handle_access_attribute): Handle internal attribute representation
1205 in addition to external.
1206 (build_attr_access_from_parms): New function.
1207
12082020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1209
1210 * c-gimplify.c (genericize_c_loop): Rewrite to match
1211 c_finish_loop in c-typeck.c.
1212
12132020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1214
1215 * c-common.c (c_block_may_fallthrough): New, split from
1216 cxx_block_may_fallthrough in the cp front end.
1217 (c_common_init_ts): Move handling of loop and switch-related
1218 statements here from the cp front end.
1219 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1220 cp front end.
1221 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1222 * c-common.h (c_block_may_fallthru): Declare.
1223 (bc_state_t): Move here from cp front end.
1224 (save_bc_state, restore_bc_state): Declare.
1225 (c_genericize_control_stmt): Declare.
1226 (WHILE_COND, WHILE_BODY): Likewise.
1227 (DO_COND, DO_BODY): Likewise.
1228 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1229 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1230 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1231 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1232 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1233 * c-dump.c (dump_stmt): Copy from cp front end.
1234 (c_dump_tree): Move code to handle structured loop and switch
1235 tree nodes here from cp front end.
1236 * c-gimplify.c: Adjust includes.
1237 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1238 cp front end.
1239 (save_bc_state, restore_bc_state): New functions using old code
1240 from cp front end.
1241 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1242 (genericize_c_loop): Move from cp front end.
1243 (genericize_for_stmt, genericize_while_stmt): Likewise.
1244 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1245 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1246 (genericize_omp_for_stmt): Likewise.
1247 (c_genericize_control_stmt): New function using code split from
1248 cp front end.
1249 (c_genericize_control_r): New.
1250 (c_genericize): Call walk_tree with c_genericize_control_r.
1251 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1252 structured loop and switch tree nodes here from cp front end.
1253
2aad20c0
GA
12542020-09-17 Patrick Palka <ppalka@redhat.com>
1255
1256 PR c/80076
1257 * c-indentation.c (should_warn_for_misleading_indentation): Move
1258 declarations of local variables closer to their first use.
1259 Handle virtual token locations by resolving them to their
1260 respective macro expansion points. If all three tokens are
1261 produced from the same macro expansion, then instead use their
1262 loci within the macro definition.
1263
ecde1b0a
GA
12642020-09-16 Martin Sebor <msebor@redhat.com>
1265
1266 PR c/78666
1267 PR c/96126
1268 * c-attribs.c (validate_attr_args): New function.
1269 (validate_attr_arg): Same.
1270 (handle_section_attribute): Call it. Introduce a local variable.
1271 (handle_alloc_size_attribute): Same.
1272 (handle_alloc_align_attribute): Same.
1273
50a71cd0
GA
12742020-09-14 Jakub Jelinek <jakub@redhat.com>
1275
1276 * c-attribs.c (handle_optimize_attribute): Adjust
1277 cl_optimization_save, cl_optimization_restore and
1278 build_optimization_node callers.
1279 * c-pragma.c (handle_pragma_optimize): Adjust
1280 build_optimization_node caller.
1281 (handle_pragma_push_options): Adjust
1282 build_optimization_node and build_target_option_node callers.
1283 (handle_pragma_pop_options, handle_pragma_reset_options):
1284 Adjust cl_optimization_restore callers.
1285
8f7ea26a
GA
12862020-08-28 Martin Sebor <msebor@redhat.com>
1287
1288 * c.opt (Wstringop-overread): New option.
1289
a6493809
GA
12902020-08-11 Jakub Jelinek <jakub@redhat.com>
1291
1292 PR c/96545
1293 * c-common.c (get_atomic_generic_size): Require that first argument's
1294 type points to a complete type and use tree_fits_uhwi_p instead of
1295 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1296
48cc2e46
GA
12972020-07-31 Martin Sebor <msebor@redhat.com>
1298
1299 PR c++/96003
1300 * c-common.c (check_function_arguments_recurse): Return early when
1301 no-warning bit is set.
1302
13032020-07-31 Richard Biener <rguenther@suse.de>
1304
1305 PR debug/96383
1306 * c-common.h (c_common_finalize_early_debug): Declare.
1307 * c-common.c: Include debug.h.
1308 (c_common_finalize_early_debug): finalize_early_debug langhook
1309 implementation generating debug for extern declarations.
1310
e71dab87
GA
13112020-07-27 Nathan Sidwell <nathan@acm.org>
1312
1313 * c-common.c (try_to_locate_new_include_insertion_point): Use
1314 strcmp, not pointer equality.
1315
ae2e0bc1
GA
13162020-07-25 Martin Sebor <msebor@redhat.com>
1317
1318 PR c++/96310
1319 * c-common.c (check_nonnull_arg): Print note only when warning was
1320 issued.
1321
3ea9abca
GA
13222020-07-22 Tobias Burnus <tobias@codesourcery.com>
1323
1324 * c-omp.c (c_finish_omp_critical): Check for no name but
1325 nonzero hint provided.
1326
0933f508
GA
13272020-07-20 Jason Merrill <jason@redhat.com>
1328
1329 * c-cppbuiltin.c (c_cpp_builtins): Update
1330 __cpp_nontype_template_args for C++20.
1331
13322020-07-20 Martin Sebor <msebor@redhat.com>
1333
1334 PR c/96249
1335 * c.opt: Remove stray text.
1336
8ca07a30
GA
13372020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1338
1339 PR other/86904
1340 * c-indentation.c (should_warn_for_misleading_indentation): Get
1341 global tabstop from the new source.
1342 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1343 is now a common option.
1344 * c.opt: Likewise.
1345
a82c4c4c 13462020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1347
1348 * c.opt (Wscalar-storage-order): Add explicit variable.
1349
f60ee68d
GA
13502020-07-07 Nathan Sidwell <nathan@acm.org>
1351
1352 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1353 cpp_read_main_file.
1354 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1355 maps. Force token position to line_table's highest line.
1356 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1357 (cb_define): Always increment source line.
1358
4077d74c
GA
13592020-07-06 Martin Sebor <msebor@redhat.com>
1360
1361 PR c++/95984
1362 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1363 to stub lambda objects with null this pointer.
1364 (check_nonnull_arg): Handle C++ nullptr.
1365
b5f24739
GA
13662020-07-02 Jason Merrill <jason@redhat.com>
1367 Jakub Jelinek <jakub@redhat.com>
1368
1369 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1370
46fbb6c6
GA
13712020-06-30 Jakub Jelinek <jakub@redhat.com>
1372
1373 PR c++/95963
1374 * c-common.c (check_function_arguments_recurse): Don't crash on
1375 calls to internal functions.
1376
69273534
GA
13772020-06-28 Martin Sebor <msebor@redhat.com>
1378
1379 PR c++/86568
1380 * c-common.c (struct nonnull_arg_ctx): Add members.
1381 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1382 C++ member functions specially. Consider the this pointer implicitly
1383 nonnull.
1384 (check_nonnull_arg): Use location of argument when available.
1385 (check_function_arguments): Use nonnull_arg_ctx as argument.
1386
9a33c41f
GA
13872020-06-27 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR middle-end/95903
1390 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1391 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1392 smaller precision intop operands separately.
1393
c9c05f73
GA
13942020-06-26 Marek Polacek <polacek@redhat.com>
1395
1396 * c-opts.c (c_common_init_options): Default to gnu++17.
1397
aff95ee7
GA
13982020-06-17 Jonathan Wakely <jwakely@redhat.com>
1399
bd0a89dc 1400 PR c/95378
aff95ee7
GA
1401 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1402 pointer arguments.
1403
56638b9b
GA
14042020-06-16 Jakub Jelinek <jakub@redhat.com>
1405
1406 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1407 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1408 idx members.
1409 (c_omp_is_loop_iterator): New function.
1410 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1411 if outer loop iterator is present. Perform duplicate checking through
1412 hash_set in the function rather than expecting caller to do that.
1413 Pass NULL instead of d->ppset to walk_tree_1.
1414 (c_omp_check_nonrect_loop_iv): New function.
1415 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1416 non-rectangular loop forms, diagnose multiple associated loops with
1417 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1418 (c_omp_check_loop_iv_exprs): Likewise.
1419
ec6ffbb9
GA
14202020-06-10 Martin Liska <mliska@suse.cz>
1421
1422 PR tree-optimization/92860
1423 * c-attribs.c (handle_optimize_attribute):
1424 Save global options and compare it after parsing of function
1425 attribute.
1426 * c-pragma.c (opt_stack::saved_global_options): New field.
1427 (handle_pragma_push_options): Save global_options.
1428 (handle_pragma_pop_options): Compare them after pop.
1429
b952c2cf
GA
14302020-06-09 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c/95580
1433 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1434 case when MEM_REF's first argument has type pointer to incomplete type.
1435
1a59f3db
GA
14362020-06-05 Jason Merrill <jason@redhat.com>
1437
1438 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1439 operand to POINTER_PLUS_EXPR.
1440
3add3425
GA
14412020-06-04 Martin Sebor <msebor@redhat.com>
1442
1443 PR middle-end/10138
1444 PR middle-end/95136
1445 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1446 (handle_access_attribute): Same.
1447
9a5b7438
GA
14482020-06-03 Mark Wielaard <mark@klomp.org>
1449
1450 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1451 New function.
1452 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1453 New function declaration.
1454
14552020-06-03 Mark Wielaard <mark@klomp.org>
1456
1457 * known-headers.cc (get_string_macro_hint): New function.
1458 (get_stdlib_header_for_name): Use get_string_macro_hint.
1459 (get_c_stdlib_header_for_string_macro_name): New function.
1460 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1461 New function declaration.
1462
14632020-06-03 Tobias Burnus <tobias@codesourcery.com>
1464
1465 * c-common.h (c_omp_predetermined_mapping): Declare.
1466 * c-omp.c (c_omp_predetermined_mapping): New.
1467
af114c38
MW
14682020-05-22 Mark Wielaard <mark@klomp.org>
1469
1470 * known-headers.cc (get_stdlib_header_for_name): Add a new
1471 stdlib_hint array for stdbool and stdint.
1472
45c50b6a
MW
14732020-05-22 Mark Wielaard <mark@klomp.org>
1474
1475 * known-headers.cc (get_stdlib_header_for_name): Return
1476 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1477 flag_isoc99.
1478
c22027a0
NS
14792020-05-20 Nathan Sidwell <nathan@acm.org>
1480
38a4db21
NS
1481 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1482
c22027a0
NS
1483 * c-common.c (try_to_locate_new_include_insertion_point): Use
1484 strcmp to compare filenames.
1485 * c-lex.c (init_c_lex): Move declaration to initialization.
1486 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1487 deferred count loop.
1488
29f0e90d
JM
14892020-05-15 Jason Merrill <jason@redhat.com>
1490
1491 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1492
b04445d4
JM
14932020-05-13 Jason Merrill <jason@redhat.com>
1494
1495 * c.opt (std=c++20): Make c++2a the alias.
1496 (std=gnu++20): Likewise.
1497 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1498 * c-opts.c: Adjust.
1499 * c-cppbuiltin.c: Adjust.
1500 * c-ubsan.c: Adjust.
1501 * c-warn.c: Adjust.
1502
11dd3be5
EB
15032020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1504
1505 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1506
b224c376
NS
15072020-05-08 Nathan Sidwell <nathan@acm.org>
1508
1509 Reimplement directives only processing.
1510 * c-ppoutput.c (token_streamer): Ne.
1511 (directives_only_cb): New. Swallow ...
1512 (print_lines_directives_only): ... this.
1513 (scan_translation_unit_directives_only): Reimplment using the
1514 published interface.
1515
f1d94677
MP
15162020-05-07 Marek Polacek <polacek@redhat.com>
1517
1518 * c-format.c (badwords): Add "nonstatic".
1519
9b95bb52
JJ
1520202-05-07 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c/94968
1523 * c-common.c (speculation_safe_value_resolve_params): Return false if
1524 error_operand_p (val2).
1525 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1526 Remove extraneous semicolon.
1527
530b4409 15282020-05-06 qing zhao <qing.zhao@oracle.com>
1529
1530 PR c/94230
1531 * c-indentation.c (get_visual_column): Add a hint to use the new
1532 -flarge-source-files option.
1533
b776bdca
SSF
15342020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1535
1536 * c-attribs.c (handle_vector_size_attribute): Add attribute
1537 nonnull for argument args in order to silence warning of
1538 uninitialized variable usage. Since this is local to the
1539 compilation unit and thus cannot be checked at call sides by the
1540 compiler, added an assert statement in order to verify this.
1541
6607bdd9
L
15422020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 PR target/93492
1545 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1546 value to USHRT_MAX (65535).
1547
691eeb65
JJ
15482020-04-29 Jakub Jelinek <jakub@redhat.com>
1549
1550 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1551
26d76be7
JJ
15522020-04-27 Jakub Jelinek <jakub@redhat.com>
1553
1554 PR c/94755
1555 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1556 fncode == BUILT_IN_NONE before initialization of first_param.
1557
7291b2ed
MP
15582020-04-23 Marek Polacek <polacek@redhat.com>
1559
1560 PR c++/94733
1561 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1562 TREE_PURPOSE.
1563
58a29af8
PP
15642020-04-14 Patrick Palka <ppalka@redhat.com>
1565
1566 PR c++/85278
1567 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1568 ampersand if it's an rvalue reference type.
1569
09f04139
MS
15702020-04-13 Martin Sebor <msebor@redhat.com>
1571
1572 PR c/92326
1573 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1574 printing array bound for flexible array members.
1575
ee26baf4
IS
15762020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1577
1578 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1579 define, per n4861.
1580
75efe9cb
RB
15812020-04-02 Richard Biener <rguenther@suse.de>
1582
1583 PR c/94392
1584 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1585 for -O2 and C++11 or newer.
1586
75defde9
PP
15872020-03-28 Patrick Palka <ppalka@redhat.com>
1588
1589 * c.opt: Add -fconcepts-diagnostics-depth.
1590
52f24a9e
MS
15912020-03-27 Martin Sebor <msebor@redhat.com>
1592
1593 PR c++/94346
1594 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1595 to decl_attributes. Make handling of different kinds of entities
1596 more robust.
1597
ccacf77b
MS
15982020-03-27 Martin Sebor <msebor@redhat.com>
1599
1600 PR c++/94098
1601 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1602 here.
1603
ca6c7225
JJ
16042020-03-23 Jakub Jelinek <jakub@redhat.com>
1605
1606 PR c++/91993
1607 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1608 result being COMPOUND_EXPRs, skip to ultimate rhs.
1609
1aa22b19
RS
16102020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1611
1612 PR middle-end/94072
1613 * c-common.c (c_common_type_for_mode): Before using a registered
1614 built-in type, check that the vectorness of the type matches
1615 the vectorness of the mode.
1616
700d4cb0
JJ
16172020-03-17 Jakub Jelinek <jakub@redhat.com>
1618
1619 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1620 issue in a diagnostic message.
1621
b408e010
LH
16222020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1623
1624 * c.opt: Avoid redundancy in the help text.
1625
e78e50d5
MP
16262020-03-02 Marek Polacek <polacek@redhat.com>
1627
1628 PR c++/93958 - add missing -std=gnu++20.
1629 * c.opt: Add -std=gnu++20.
1630
649e1741
MS
16312020-03-01 Martin Sebor <msebor@redhat.com>
1632
1633 PR c++/92721
1634 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1635 (handle_access_attribute): Same.
1636
7b60f3ba
JJ
16372020-02-25 Jakub Jelinek <jakub@redhat.com>
1638
1639 PR c/93858
1640 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1641 "did you mean" hint in diagnostics.
1642
fb260504
JM
16432020-02-15 Jason Merrill <jason@redhat.com>
1644
1645 * c.opt: Add -std=c++20.
1646
1d757b09
EB
16472020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1648
1649 * c-ada-spec.c: Include bitmap.h.
1650 (dump_ada_double_name): Rename into...
1651 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1652 (dump_ada_array_type): Adjust to above renaming. Robustify.
1653 (dump_nested_types_1): New function copied from... Add dumped_types
1654 parameter and pass it down to dump_nested_type.
1655 (dump_nested_types): ...this. Remove parent parameter. Just call
1656 dump_nested_types_1 on an automatic bitmap.
1657 (dump_nested_type): Add dumped_types parameter.
1658 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1659 Adjust recursive calls and adjust to above renaming.
1660 (dump_ada_declaration): Adjust call to dump_nested_types.
1661 Tidy up and adjust to above renaming.
1662 (dump_ada_specs): Initialize and release bitmap obstack.
1663
0cc575e4
MS
16642020-02-10 Martin Sebor <msebor@redhat.com>
1665
1666 PR c/93640
1667 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1668
a59aa302
JJ
16692020-02-10 Jakub Jelinek <jakub@redhat.com>
1670
1671 PR other/93641
1672 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1673 Remove useless extra test.
1674
e464fc90
TB
16752020-02-03 Julian Brown <julian@codesourcery.com>
1676 Tobias Burnus <tobias@codesourcery.com>
1677
1678 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1679
e3b6c052
JM
16802020-01-29 Jason Merrill <jason@redhat.com>
1681
1682 PR c++/89357
1683 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1684
6d00f052
JM
16852020-01-23 Jason Merrill <jason@redhat.com>
1686
1687 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1688
8a990ffa
MS
16892020-01-23 Martin Sebor <msebor@redhat.com>
1690
1691 PR c/84919
1692 * c-common.c (check_function_arguments): Avoid overlap checking
1693 of sprintf functions.
1694
55b7df8b
JM
16952020-01-22 Jason Merrill <jason@redhat.com>
1696
1697 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1698 PR c++/40752
1699 * c-warn.c (conversion_warning): Check operands only after checking
1700 the whole expression. Don't check second operand of + for sign.
1701
c77074d0
JM
17022020-01-21 Jason Merrill <jason@redhat.com>
1703 Manuel López-Ibáñez <manu@gcc.gnu.org>
1704
1705 PR c++/40752 - useless -Wconversion with short +=.
1706 * c.opt (-Warith-conversion): New.
1707 * c-warn.c (conversion_warning): Recurse for operands of
1708 operators. Only warn about the whole expression with
1709 -Warith-conversion.
1710
731dbfc3
JM
17112020-01-21 Jason Merrill <jason@redhat.com>
1712
1713 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1714 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1715
ad1a3914
NS
17162020-01-20 Nathan Sidwell <nathan@acm.org>
1717
1718 PR preprocessor/80005
1719 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1720
49789fd0
IS
17212020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1722
1723 * c-common.c (co_await, co_yield, co_return): New.
1724 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1725 RID_CO_RETURN): New enumeration values.
1726 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1727 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1728 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1729 * c.opt (fcoroutines): New command-line switch.
1730
4bc1899b
DM
17312020-01-10 David Malcolm <dmalcolm@redhat.com>
1732
1733 * c-format.c (local_event_ptr_node): New.
1734 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1735 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1736 * c-format.h (T_EVENT_PTR): New define.
1737
f25e33fa
MS
17382020-01-10 Martin Sebor <msebor@redhat.com>
1739
1740 PR c/93132
1741 * c-attribs.c (append_access_attrs): Validate against the translated
1742 access string rather than the human-readable representation.
1743
8d9254fc
JJ
17442020-01-01 Jakub Jelinek <jakub@redhat.com>
1745
1746 Update copyright years.
1747
39292e25
EB
17482019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1749
1750 * c-ada-spec.h (decl_sloc): Delete.
1751 * c-ada-spec.c (decl_sloc): Make static.
1752
519d7496
JB
17532019-12-19 Julian Brown <julian@codesourcery.com>
1754
1755 * c-common.h (c_omp_map_clause_name): Add prototype.
1756 * c-omp.c (c_omp_map_clause_name): New function.
1757 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1758 PRAGMA_OACC_CLAUSE_DETACH.
1759
a6163563
JB
17602019-12-19 Julian Brown <julian@codesourcery.com>
1761 Maciej W. Rozycki <macro@codesourcery.com>
1762 Tobias Burnus <tobias@codesourcery.com>
1763 Thomas Schwinge <thomas@codesourcery.com>
1764
1765 * c-pragma.h (pragma_omp_clause): Add
1766 PRAGMA_OACC_CLAUSE_NO_CREATE.
1767
e8f1ade2
MS
17682019-12-17 Martin Sebor <msebor@redhat.com>
1769
1770 PR c++/61339
1771 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1772
368877a1
DM
17732019-12-11 David Malcolm <dmalcolm@redhat.com>
1774
1775 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1776 implementation.
1777 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1778
d68f5d45
DM
17792019-12-09 David Malcolm <dmalcolm@redhat.com>
1780
1781 * c-format.c (range_label_for_format_type_mismatch::get_text):
1782 Replace label_text ctor called with true with label_text::take.
1783
d3e28653
DM
17842019-12-09 David Malcolm <dmalcolm@redhat.com>
1785
1786 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1787 initial newline from expected outputs.
1788 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1789 call to diagnostic_show_locus.
1790
abd6d8cc
JJ
17912019-12-06 Jakub Jelinek <jakub@redhat.com>
1792
1793 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1794 now.
1795
7906797e
MP
17962019-12-05 Marek Polacek <polacek@redhat.com>
1797 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1800 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1801
5c04da88
MP
18022019-12-05 Marek Polacek <polacek@redhat.com>
1803
1804 PR c++/92271 - make __is_same alias for __is_same_as.
1805 * c-common.c: Add __is_same, an alias for __is_same_as.
1806
43aae289
MP
18072019-12-03 Marek Polacek <polacek@redhat.com>
1808
1809 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1810 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1811 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1812
d7ddfbcb
JH
18132019-11-30 Jan Hubicka <hubicka@ucw.cz>
1814
1815 * c-attribs.c (handle_symver_attribute): New function
1816 (c_common_attributes): Add symver.
1817
65ef05d0
RS
18182019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1819
1820 * c-common.c (pointer_int_sum): Use verify_type_context to check
1821 whether the target allows pointer arithmetic for the types involved.
1822 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1823 to check whether the target allows sizeof and alignof operations
1824 for the types involved.
1825
1a291106
JM
18262019-11-27 Jason Merrill <jason@redhat.com>
1827
1828 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1829
05d6cb1a
JJ
18302019-11-26 Jakub Jelinek <jakub@redhat.com>
1831
1832 PR c++/61414
1833 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1834 ENUMERAL_TYPEs.
1835
5b8d9367
JM
18362019-11-25 Joseph Myers <joseph@codesourcery.com>
1837
1838 PR c/91985
1839 * c-common.c (c_common_type_for_mode): Handle decimal
1840 floating-point types being NULL_TREE.
1841 * c-format.c (get_format_for_type_1): Handle specified types being
1842 NULL_TREE.
1843 * c-lex.c (interpret_float): Give an error for decimal
1844 floating-point constants when decimal floating-point not
1845 supported.
1846
1fbf51cb
JJ
18472019-11-23 Jakub Jelinek <jakub@redhat.com>
1848
1849 PR middle-end/83859
1850 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1851 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1852 group warning with inform together.
1853 (handle_access_attribute): Formatting fix.
1854
761df906
JJ
18552019-11-22 Jakub Jelinek <jakub@redhat.com>
1856
bdaf8be1
JJ
1857 PR c/90677
1858 * c-common.h (identifier_global_tag): Declare.
1859 * c-format.c (get_pointer_to_named_type): Renamed to ...
1860 (get_named_type): ... this. Use identifier_global_tag instead of
1861 identifier_global_value, handle the return value being a TYPE_P.
1862 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1863 to call get_named_type instead. Formatting fixes.
1864
c2ecce6d 1865 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1866 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1867 and __cpp_generic_lambdas for -std=c++2a. Define
1868 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1869 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1870 __cpp_concepts for -std=c++2a.
1871
54aa6b58
MS
18722019-11-22 Martin Sebor <msebor@redhat.com>
1873
1874 PR middle-end/83859
1875 * c-attribs.c (handle_access_attribute): New function.
1876 (c_common_attribute_table): Add new attribute.
1877 (get_argument_type): New function.
1878 (append_access_attrs): New function.
1879 (get_nonnull_operand): Rename...
1880 (get_attribute_operand): ...to this.
1881 * c-common.c (get_nonnull_operand): Rename...
1882 (get_attribute_operand): ...to this.
1883
6c80b1b5
JM
18842019-11-21 Joseph Myers <joseph@codesourcery.com>
1885
1886 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1887 of warning.
1888
192961ff
JM
18892019-11-19 Joseph Myers <joseph@codesourcery.com>
1890
1891 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1892 warning for standard attributes mixed with fallthrough attributes.
1893
f8aea5e3
JM
18942019-11-15 Joseph Myers <joseph@codesourcery.com>
1895
1896 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1897 * c-common.h (handle_fallthrough_attribute): Declare.
1898
2cc94aa8
JM
18992019-11-15 Joseph Myers <joseph@codesourcery.com>
1900
1901 * c-attribs.c (handle_deprecated_attribute): Remove static.
1902 * c-common.h (handle_deprecated_attribute): Declare.
1903
7c5890cc
JM
19042019-11-14 Joseph Myers <joseph@codesourcery.com>
1905
1906 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1907 char for C.
1908
b2417b59
JJ
19092019-11-14 Jakub Jelinek <jakub@redhat.com>
1910
d0ec7c93
JJ
1911 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1912 valid vendors.
1913
b2417b59
JJ
1914 * c-omp.c (c_omp_check_context_selector): Handle name lists
1915 containing string literals. Don't diagnose atomic_default_mem_order
1916 with multiple props.
1917
00be2a5f
JM
19182019-11-13 Joseph Myers <joseph@codesourcery.com>
1919
1920 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1921 NORM_MAX constants. Update call to get_max_float.
1922 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1923 constants.
1924
2dbad62d
EB
19252019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1926
1927 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1928 (dump_forward_type): Do not generate a declaration for function types.
1929 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1930 of the component type if it is declared in another file.
1931
6ed76044
ML
19322019-11-12 Martin Liska <mliska@suse.cz>
1933
1934 * c-opts.c (c_common_post_options):
1935 Use SET_OPTION_IF_UNSET.
1936
62aee289
MR
19372019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1938 Frederik Harwath <frederik@codesourcery.com>
1939
1940 gcc/c-family/
1941 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1942 constant.
1943 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1944
f486280c
RS
19452019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1946
1947 * c-common.h (gnu_vector_type_p): New function.
1948 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1949 vectors to satisfy gnu_vector_type_p.
1950 (c_build_vec_convert): Likewise __builtin_convertvector.
1951 (convert_vector_to_array_for_subscript): Likewise when applying
1952 implicit vector to array conversion.
1953 (scalar_to_vector): Likewise when converting vector-scalar
1954 operations to vector-vector operations.
1955
017c6491
JM
19562019-11-08 Joseph Myers <joseph@codesourcery.com>
1957
1958 * c.opt (Wold-style-definition): Initialize to -1.
1959 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1960 to flag_isoc2x if not set explicitly.
1961
c01bd174
JM
19622019-11-07 Joseph Myers <joseph@codesourcery.com>
1963
1964 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1965
0df65305
JM
19662019-11-05 Jason Merrill <jason@redhat.com>
1967
1968 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1969 -fconcepts.
1970
e0c866dd
KK
19712019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1972
1973 * c-opts.c (c_common_post_options): Update
1974 latest_abi_version.
1975
f968ef9b
JJ
19762019-11-02 Jakub Jelinek <jakub@redhat.com>
1977
d0c464d2
JJ
1978 * c-common.h (c_omp_get_context_selector): Remove.
1979 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1980 and renamed to omp_get_context_selector.
1981
917dd789
JJ
1982 * c-omp.c (c_omp_mark_declare_variant): Use
1983 omp_context_selector_set_compare.
1984
f968ef9b
JJ
1985 PR c++/88335 - Implement P1073R3: Immediate functions
1986 * c-common.h (enum rid): Add RID_CONSTEVAL.
1987 * c-common.c (c_common_reswords): Add consteval.
1988
5f6705b7
JJ
19892019-11-01 Martin Sebor <msebor@redhat.com>
1990
1991 PR middle-end/91679
1992 PR middle-end/91647
1993 PR middle-end/91463
1994 PR middle-end/92312
1995 * c-pretty-print.c (direct_abstract_declarator): Print
1996 bound in zero-length arrays.
1997 * c.opt (-Wzero-length-bounds): New option.
1998
43f1814c
NS
19992019-10-30 Nathan Sidwell <nathan@acm.org>
2000
2001 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2002 macros.
2003
ad1539d5
MS
20042019-10-28 Martin Sebor <msebor@redhat.com>
2005
2006 PR c/66970
2007 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2008 even when only preprocessing.
2009 * c-common.h (names_builtin_p): Declare new function.
2010 * c-lex.c (init_c_lex): Set has_builtin.
2011 (c_common_has_builtin): Define a new function.
2012 * c-ppoutput.c (init_pp_output): Set has_builtin.
2013
135df52c
JJ
20142019-10-24 Jakub Jelinek <jakub@redhat.com>
2015
2016 * c-common.h (c_omp_context_selector_matches): Remove.
2017 * c-omp.c (c_omp_context_selector_matches): Remove.
2018 * c-attribs.c (c_common_attribute_table): Add
2019 "omp declare target {host,nohost,block}" attributes.
2020
8ad0c477
JM
20212019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2022
2023 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2024
56898e43
RS
20252019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2026
2027 * c-common.h (user_facing_original_type_p): Declare.
2028 * c-common.c: Include c-spellcheck.h.
2029 (user_facing_original_type_p): New function.
2030
20de9568
JJ
20312019-10-12 Jakub Jelinek <jakub@redhat.com>
2032
2033 * c-common.h (c_omp_mark_declare_variant,
2034 c_omp_context_selector_matches): Declare.
2035 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2036 and hsa-common.h.
2037 (c_omp_get_context_selector): Support second argument NULL.
2038 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2039 functions.
2040 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2041 attribute, add "omp declare variant base" and
2042 "omp declare variant variant" attributes.
2043
175a85b2
JM
20442019-10-11 Joseph Myers <joseph@codesourcery.com>
2045
2046 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2047 CppReason(CPP_W_C11_C2X_COMPAT).
2048
fe2bc27c
JM
20492019-10-11 Joseph Myers <joseph@codesourcery.com>
2050
2051 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2052 _Decimal64 and _Decimal128.
2053
27dfdc0f
JM
20542019-10-10 Joseph Myers <joseph@codesourcery.com>
2055
2056 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2057 types if DFP not supported.
2058
94e7f906
JJ
20592019-10-10 Jakub Jelinek <jakub@redhat.com>
2060
2061 * c-common.h (c_omp_check_context_selector,
2062 c_omp_get_context_selector): Declare.
2063 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2064 in diagnostic message.
2065 (c_omp_check_context_selector, c_omp_get_context_selector): New
2066 functions.
2067 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2068 attribute.
2069 (handle_omp_declare_variant_attribute): New function.
2070
a7160771
MS
20712019-10-09 Martin Sebor <msebor@redhat.com>
2072
2073 PR tree-optimization/90879
2074 * c.opt (-Wstring-compare): New option.
2075
cb57504a
JM
20762019-10-08 Andrew Sutton <asutton@lock3software.com>
2077 Jason Merrill <jason@redhat.com>
2078
2079 Update the concepts implementation to conform to the C++20
2080 specification, improve compile times, and generally clean up
2081 the implementation.
2082
2083 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2084 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2085 * c.opt: Add -Wconcepts-ts.
2086 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2087 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2088 (set_std_cxx2a): Enable concepts by default.
2089
fbb2a6dc
JM
20902019-10-08 Joseph Myers <joseph@codesourcery.com>
2091
2092 * c-opts.c (c_common_post_options): Set
2093 -fno-fp-int-builtin-inexact for C2X.
2094
8e007055
JJ
20952019-10-05 Jakub Jelinek <jakub@redhat.com>
2096
2097 PR c++/91369 - Implement P0784R7: constexpr new
2098 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2099 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2100
843f104d
JM
21012019-10-04 Joseph Myers <joseph@codesourcery.com>
2102
2103 PR c/82752
2104 * c-format.c (C_STD_VER): Handle C2x.
2105 (C_STD_NAME): Likewise.
2106 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2107 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2108 modifier allowed and 'p' flag.
2109 * c-format.h (enum format_std_version): Add STD_C2X.
2110 (struct format_char_info): Mention 'p' in comment on flags2.
2111
e9c9a142
DM
21122019-10-01 David Malcolm <dmalcolm@redhat.com>
2113
2114 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2115 calling diagnostic_show_locus, rather than destroying it afterwards.
2116
7552c36a
JJ
21172019-10-01 Jakub Jelinek <jakub@redhat.com>
2118
2119 PR c++/91925
2120 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2121 with NULL DECL_FIELD_OFFSET.
2122
8209db25
RS
21232019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2124
2125 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2126 has a type name, use it in preference to the __vector syntax.
2127
9343bf99
RS
21282019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2129
2130 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2131 two spaces between a comma and "...".
2132
59bc434a
JJ
21332019-09-27 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c++/88203
2136 * c-common.h (c_omp_predefined_variable): Declare.
2137 * c-omp.c (c_omp_predefined_variable): New function.
2138 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2139 for predefined variables.
2140
c6447c20
RS
21412019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2142
2143 * c-common.h (build_function_call_vec): Take the original
2144 function decl as an optional final parameter.
2145 (check_builtin_function_arguments): Take the original function decl.
2146 * c-common.c (check_builtin_function_arguments): Likewise.
2147 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2148 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2149
c4438114
JM
21502019-09-15 Jason Merrill <jason@redhat.com>
2151
2152 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2153 fold_for_warn in "|| mask" warning.
2154
68a57628
ML
21552019-09-10 Martin Liska <mliska@suse.cz>
2156
2157 * c.opt: Use newly added WarnRemoved.
2158
f48ef52e
ML
21592019-09-09 Martin Liska <mliska@suse.cz>
2160
2161 * c.opt: Update comment of removed
2162 options that are preserved only for backward
2163 compatibility.
2164
67f6e649
ML
21652019-09-06 Martin Liska <mliska@suse.cz>
2166
2167 PR c++/91125
2168 * c-common.c: Remove definition of flag_use_repository.
2169 * c-common.h: Likewise.
2170 * c-opts.c (c_common_handle_option):
2171 Do not handle OPT_frepo option.
2172 * c.opt: Mark the option with Deprecated.
2173
db9d2274
MP
21742019-09-04 Marek Polacek <polacek@redhat.com>
2175
2176 * c.opt (fdeduce-init-list): Ignored.
2177
68e2c199
PK
21782019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2179
2180 PR c/78736
2181 * c.opt (Wenum-conversion): New option.
2182
7a4418a5
JL
21832019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2184
2185 * c-attribs.c (handle_section_attribute): Call the
2186 handle_generic_attribute target hook after performing target
2187 independent processing.
2188 (handle_noinit_attribute): Likewise.
2189
5f76ab15
ILT
21902019-09-03 Ian Lance Taylor <iant@golang.org>
2191
2192 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2193 when using -fgo-dump-spec.
2194
ae0d3f6a
ML
21952019-09-02 Martin Liska <mliska@suse.cz>
2196
2197 PR c++/91155
2198 * c-common.c (fname_as_string): Use cxx_printable_name for
2199 __PRETTY_FUNCTION__ same as was used before r265711.
2200
8a902edb
MP
22012019-08-28 Marek Polacek <polacek@redhat.com>
2202
2203 Implement P1152R4: Deprecating some uses of volatile.
2204 PR c++/91361
2205 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2206 default for C++2a, unless -Wno-deprecated.
2207 * c.opt (Wvolatile): New warning.
2208
4742dbe7
MP
22092019-08-28 Marek Polacek <polacek@redhat.com>
2210
2211 PR c++/91360 - Implement C++20 P1143R2: constinit.
2212 * c-common.c (c_common_reswords): Add constinit and __constinit.
2213 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2214 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2215 RID_LAST_CXX20.
2216 (D_CXX20): Define.
2217 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2218 * c-format.c (cxx_keywords): Add "constinit".
2219 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2220
6a074892
JJ
22212019-08-27 Jakub Jelinek <jakub@redhat.com>
2222
2223 PR c++/91415
2224 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2225 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2226 like COMPOUND_EXPR rather than normal expression.
2227
22f8849d
IS
22282019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2229
2230 PR pch/61250
2231 * c-lex.c (c_lex_with_flags): Don't call
2232 c_common_no_more_pch () from here.
2233
df375b03
JJ
22342019-08-23 Jakub Jelinek <jakub@redhat.com>
2235
2236 PR middle-end/91283
2237 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2238 instead of flag_excess_precision_cmdline.
2239 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2240 * c-opts.c (c_common_post_options): Likewise.
2241
14b7950f
MS
22422019-08-22 Martin Sebor <msebor@redhat.com>
2243
2244 PR middle-end/91490
2245 * c-common.c (braced_list_to_string): Add argument and overload.
2246 Handle flexible length arrays and unions.
2247
8bb2ee59
EB
22482019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2249
2250 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2251 function declarations where arguments are missing. Rename variables.
2252
21c1e205
RB
22532019-08-15 Richard Biener <rguenther@suse.de>
2254
2255 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2256 enabled, define __SIZETYPE__.
2257
f0033821
CL
22582019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2259
2260 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2261 exclusion with "section" attribute.
2262 (attr_noinit_exclusions): New table.
2263 (handle_noinit_attribute): New function.
2264
4d732405
RS
22652019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2266
2267 PR middle-end/91421
2268 * c-common.c (resolve_overloaded_builtin): Use
2269 copy_decl_built_in_function.
2270
51ad8481
MS
22712019-08-13 Martin Sebor <msebor@redhat.com>
2272
2273 PR c/80619
2274 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2275 (asm_fprintf_length_spec): Same.
2276 * c-format.h (format_lengths): Add FMT_LEN_w.
2277
77eb117f
JJ
22782019-08-10 Jakub Jelinek <jakub@redhat.com>
2279
2280 * c-pragma.h (enum pragma_omp_clause): Add
2281 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2282
398e3feb
JJ
22832019-08-07 Jakub Jelinek <jakub@redhat.com>
2284
2285 * c-pragma.h (enum pragma_omp_clause): Add
2286 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2287 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2288 enumeration value.
2289
ab574db6
MP
22902019-08-05 Marek Polacek <polacek@redhat.com>
2291
2292 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2293 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2294 default for C++2a, unless -Wno-deprecated.
2295 * c.opt (Wcomma-subscript): New warning.
2296
554a530f
JJ
22972019-07-20 Jakub Jelinek <jakub@redhat.com>
2298
2299 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2300 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2301 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2302 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2303 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2304 constructs with the loop construct.
2305
1a888209
JJ
23062019-07-13 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR c/91149
2309 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2310 OMP_CLAUSE_REDUCTION_TASK handling.
2311
1fdd6f04
JJ
23122019-07-12 Jakub Jelinek <jakub@redhat.com>
2313
2314 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2315 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2316
99b1c316
MS
23172019-07-09 Martin Sebor <msebor@redhat.com>
2318
2319 PR c++/61339
1fdd6f04 2320 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2321 and others to class.
2322 * c-pretty-print.h: Same.
2323
6c1dae73
MS
23242019-07-09 Martin Sebor <msebor@redhat.com>
2325
2326 PR c++/61339
2327 * c-format.c (check_argument_type): Change class-key from class to
2328 struct and vice versa to match convention and avoid -Wclass-is-pod
2329 and -Wstruct-no-pod.
2330 * c-pretty-print.h: Same.
2331
8ba6ea87
ML
23322019-07-03 Martin Liska <mliska@suse.cz>
2333
2334 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2335 dead assignemts.
2336
83eb9522
JJ
23372019-07-03 Jakub Jelinek <jakub@redhat.com>
2338
2339 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2340 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2341 with OMP_PARALLEL.
2342
1c6ffbab
QZ
23432019-07-02 qing zhao <qing.zhao@oracle.com>
2344
2345 PR preprocessor/90581
2346 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2347 * c.opt: Add new option -fmax-include-depth.
2348
7ffc7de5
JM
23492019-06-26 Jason Merrill <jason@redhat.com>
2350
2351 PR c++/55442 - memory-hog with highly recursive constexpr.
2352 * c.opt (fconstexpr-loop-limit): New.
2353
361af3e4
JJ
23542019-06-25 Jakub Jelinek <jakub@redhat.com>
2355
2356 PR sanitizer/90954
2357 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2358 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2359
ab20d992
JJ
23602019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2361
2362 * c-common.c (c_common_nodes_and_builtins): Define
2363 alternate "__intN__" name for "__intN" types.
2364
f4af4019
JH
23652019-06-24 Jan Hubicka <jh@suse.cz>
2366
2367 * c-common.c (braced_lists_to_strings): Check that
2368 type is array or integer prior checking string flag.
2369
da9e9b57
MB
23702019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2371
2372 PR c++/90875 - added -Wswitch-outside-range option
2373 * c.opt (Wswitch-outside-range): Added new option.
2374 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2375
3f3d6a6f
MP
23762019-06-21 Marek Polacek <polacek@redhat.com>
2377
2378 PR c++/90953 - ICE with -Wmissing-format-attribute.
2379 * c-common.c (check_function_arguments_recurse): Use
2380 get_attribute_name.
2381 (check_missing_format_attribute): Likewise.
2382
1bf32c11
MP
23832019-06-19 Marek Polacek <polacek@redhat.com>
2384
2385 PR c++/60364 - noreturn after first decl not diagnosed.
2386 * c-attribs.c (handle_noreturn_attribute): No longer static.
2387 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2388 Declare.
2389 * c-format.c (check_function_format): Use get_attribute_name.
2390
a04c0734
MS
23912019-06-19 Martin Sebor <msebor@redhat.com>
2392
2393 PR translation/90156
2394 * c-format.c (function_format_info::format_type): Adjust type.
2395 (function_format_info::is_raw): New member.
2396 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2397 (decode_format_attr): Adjust call to decode_format_type.
2398 Avoid a redundant call to convert_format_name_to_system_name.
2399 Avoid abbreviating the word "arguments" in a diagnostic.
2400 (format_warning_substr): New function.
2401 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2402 (finish_dollar_format_checking): Same.
2403 (check_format_info): Same.
2404 (struct baltoks_t): New.
2405 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2406 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2407 functions.
2408 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2409 maybe_diag_unbalanced_tokens.
2410 (handle_format_attribute): Spell out the word "arguments" in
2411 a diagnostic.
2412
d3786ebb
MB
24132019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2414
2415 PR c++/90449 - add -Winaccessible-base option.
2416 * c.opt (Winaccessible-base): New option.
2417
bf38f7e9
JJ
24182019-06-10 Jakub Jelinek <jakub@redhat.com>
2419
2420 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2421 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2422 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2423 combined/composite constructs where it is not allowed. Copy over
2424 OMP_CLAUSE_REDUCTION_INSCAN.
2425
0ecf545c
MS
24262019-06-05 Martin Sebor <msebor@redhat.com>
2427
2428 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2429 (handle_alias_ifunc_attribute): Same.
2430 (handle_copy_attribute): Same.
2431 (handle_weakref_attribute): Same.
2432 (handle_nonnull_attribute): Same.
2433 * c-warn.c (warn_for_sign_compare): Same.
2434 (warn_for_restrict): Same.
2435 * c.opt: Same.
2436
36b34127
MS
24372019-06-05 Martin Sebor <msebor@redhat.com>
2438
2439 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2440 * c.opt (-Wformat-diag): Remove a spurious period.
2441
357a352f
JJ
24422019-05-29 Jakub Jelinek <jakub@redhat.com>
2443
2444 PR c/90628
2445 * c-common.c (check_builtin_function_arguments)
2446 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2447 as last argument.
2448
2b8235ea
EB
24492019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2450
2451 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2452
6d86ddc4
ML
24532019-05-22 Martin Liska <mliska@suse.cz>
2454
2455 PR lto/90500
2456 * c-attribs.c (handle_copy_attribute): Do not copy
2457 target_clones attribute.
2458
419ba5b9
EB
24592019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2460
2461 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2462 * c-ada-spec.c (print_assignment_operator): New function.
2463 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2464 assignment operators declared as methods and filter out the others.
2465
e03436e7
TS
24662019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2467
2468 PR c/89433
2469 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2470 "omp declare target".
2471
a9c697b8
MS
24722019-05-16 Martin Sebor <msebor@redhat.com>
2473
ab20d992
JJ
2474 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2475 keywords, operators, and types in diagnostics.
2476 (handle_scalar_storage_order_attribute): Same.
2477 (handle_mode_attribute): Same.
2478 (handle_visibility_attribute): Same.
2479 (handle_assume_aligned_attribute): Same.
2480 (handle_no_split_stack_attribute): Same.
2481 * c-common.c (shorten_compare): Same.
2482 (c_common_truthvalue_conversion): Same.
2483 (cb_get_source_date_epoch): Same.
2484 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2485 in diagnostics.
2486 (interpret_float): Same.
2487 * c-omp.c (c_finish_omp_for): Same.
2488 * c-opts.c (c_common_post_options): Same.
2489 * c-pch.c (c_common_pch_pragma): Same.
2490 * c-pragma.c (pop_alignment): Same.
2491 (handle_pragma_pack): Same.
2492 (apply_pragma_weak): Same.
2493 (handle_pragma_weak): Same.
2494 (handle_pragma_scalar_storage_order): Same.
2495 (handle_pragma_redefine_extname): Same.
2496 (add_to_renaming_pragma_list): Same.
2497 (maybe_apply_renaming_pragma): Same.
2498 (push_visibility): Same.
2499 (handle_pragma_visibility): Same.
2500 (handle_pragma_optimize): Same.
2501 (handle_pragma_message): Same.
2502 * c-warn.c (warn_for_omitted_condop): Same.
2503 (lvalue_error): Same.
a9c697b8 2504
6b943512
RB
25052019-05-15 Richard Biener <rguenther@suse.de>
2506
2507 PR c/90474
2508 * c-common.c (c_common_mark_addressable_vec): Also mark
2509 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2510 c_mark_addressable.
ab20d992 2511
b744fc85
NS
25122019-05-06 Nathan Sidwell <nathan@acm.org>
2513
2514 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2515
598f50d7
NS
25162019-04-30 Nathan Sidwell <nathan@acm.org>
2517
2518 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2519
5bcc5a3b
ML
25202019-04-30 Martin Liska <mliska@suse.cz>
2521
2522 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2523 for unknown options.
2524
e78a87f7
RS
25252019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2526
2527 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2528 the pointer target rather than the pointer itself.
2529
c280b7ee
JJ
25302019-04-19 Jakub Jelinek <jakub@redhat.com>
2531
2532 PR c/89888
2533 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2534 arguments.
2535 (c_do_switch_warnings): Remove outside_range_p argument.
2536 * c-common.c (check_case_bounds): Removed.
2537 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2538 Don't call check_case_bounds. Fold low_value as well as high_value.
2539 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2540 Check for case labels outside of range of original type here and
2541 adjust them.
2542
8e8225e6
JJ
25432019-04-12 Jakub Jelinek <jakub@redhat.com>
2544
63b8a166
JJ
2545 PR translation/90041
2546 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2547 in the Warn diagnostics.
2548
8e8225e6
JJ
2549 PR c/89946
2550 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2551 function comment. Warn if arguments of the attribute are not positive
2552 integer constants.
2553
53a3f614
EB
25542019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2555
2556 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2557 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2558
22be5873
EB
25592019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2560
2561 * c-ada-spec.c (is_float128): New predicate extracted from...
2562 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2563 <REAL_TYPE>: ...here. Call it.
2564
34facf20
DM
25652019-04-05 David Malcolm <dmalcolm@redhat.com>
2566
2567 PR c/89985
2568 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2569 auto_diagnostic_group. Guard inform calls by result of
2570 warning_at call.
2571
05564120
MP
25722019-04-05 Marek Polacek <polacek@redhat.com>
2573
ab20d992 2574 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2575 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2576 of RHS.
2577
7a506c3c
JM
25782019-04-03 Jason Merrill <jason@redhat.com>
2579
2580 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2581 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2582
ddeae8c8
MS
25832019-04-01 Martin Sebor <msebor@redhat.com>
2584
2585 PR c/89685
2586 * c-attribs.c (handle_copy_attribute): Handle references and
2587 non-constant expressions.
2588
a15ffa22
JJ
25892019-03-22 Jakub Jelinek <jakub@redhat.com>
2590
2591 PR c++/87481
2592 * c.opt (-fconstexpr-ops-limit=): New option.
2593
36a3a7a3
JJ
25942019-03-21 Jakub Jelinek <jakub@redhat.com>
2595
2596 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2597 template param.
2598
bec1da64
MS
25992019-03-19 Martin Sebor <msebor@redhat.com>
2600
2601 PR tree-optimization/89688
2602 * c-common.c (braced_list_to_string): Make static.
2603 (braced_lists_to_strings): Define new function.
2604 * c-common.h (braced_list_to_string): Remove.
2605 (braced_lists_to_strings): Declare.
2606
1fe61adf
ML
26072019-03-12 Martin Liska <mliska@suse.cz>
2608
2609 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2610
93964ebd
ML
26112019-03-11 Martin Liska <mliska@suse.cz>
2612
2613 * c-opts.c (c_common_post_options): Wrap apostrophes
2614 in gcc internal format with %'.
2615
a3f9f006
ML
26162019-03-11 Martin Liska <mliska@suse.cz>
2617
2618 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2619 in a string format message and fix GNU coding style.
2620 * c-common.c (vector_types_convertible_p): Likewise.
2621 (c_build_vec_perm_expr): Likewise.
2622 * c-indentation.c (get_visual_column): Likewise.
2623 * c-opts.c (c_common_handle_option): Likewise.
2624 (c_common_post_options): Likewise.
2625 (sanitize_cpp_opts): Likewise.
2626 * c-pch.c (c_common_pch_pragma): Likewise.
2627 * c-pragma.c (handle_pragma_pack): Likewise.
2628
1db01ff9
JJ
26292019-03-08 Jakub Jelinek <jakub@redhat.com>
2630
2631 PR tree-optimization/89550
2632 * c-common.c (c_common_truthvalue_conversion): Only set
2633 TREE_NO_WARNING if warning_at returned true.
2634 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2635
ba790e6f
JJ
26362019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2637 Martin Sebor <msebor@gmail.com>
2638
2639 * c.opt (Wmissing-attributes): Clean up doc string.
2640
7da73ba7
JJ
26412019-02-25 Jakub Jelinek <jakub@redhat.com>
2642
2643 PR c/89495
2644 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2645 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2646 checking.
2647
921bb9d1
RB
26482019-02-22 Richard Biener <rguenther@suse.de>
2649
2650 * c-pch.c (no_checksum): Remove.
2651 (pch_init): Remove assertion that executable_checksum is not
2652 all zero.
2653 (c_common_valid_pch): Likewise.
2654
e2ebb05c
MS
26552019-02-18 Martin Sebor <msebor@redhat.com>
2656
2657 PR middle-end/89294
2658 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2659
3fe53000
DM
26602019-02-16 David Malcolm <dmalcolm@redhat.com>
2661
2662 PR c++/88680
2663 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2664 implementing -Wtype-limits.
2665
28a8cef1
MS
26662019-02-11 Martin Sebor <msebor@redhat.com>
2667
2668 PR c++/87996
2669 * c-common.c (invalid_array_size_error): New function.
2670 (valid_array_size_p): Call it. Handle size as well as type.
2671 * c-common.h (valid_constant_size_p): New function.
2672 (enum cst_size_error): New type.
2673
ec2be203
DM
26742019-01-31 David Malcolm <dmalcolm@redhat.com>
2675
2676 PR c/89122
2677 * known-headers.cc (get_stdlib_header_for_name): Add
2678 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2679
8936f047
JJ
26802019-01-31 Jakub Jelinek <jakub@redhat.com>
2681
2682 PR libstdc++/88170
2683 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2684 a C cast in pp_c_flag_gnu_v3 mode.
2685
6a335b96
JJ
26862019-01-29 Jakub Jelinek <jakub@redhat.com>
2687
2688 PR c/86125
2689 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2690 builtin_structptr_types types even for C.
2691
2a06eba5
BE
26922019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2693
2694 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2695 when rhs is of array type correctly. Fix handling of nested structures.
2696 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2697 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2698 type casts within nested compound expressions.
2699
18a23298
JJ
27002019-01-22 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR middle-end/88968
2703 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2704 variable after using BIT_FIELD_REF.
2705
420183d9
L
27062019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2707
2708 PR c/51628
2709 PR c/88664
2710 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2711 Remove the boolean argument.
2712 * c-warn.c (check_address_of_packed_member): Renamed to ...
2713 (check_address_or_pointer_of_packed_member): This. Also
2714 warn pointer conversion.
2715 (check_and_warn_address_of_packed_member): Renamed to ...
2716 (check_and_warn_address_or_pointer_of_packed_member): This.
2717 Also warn pointer conversion.
2718 (warn_for_address_or_pointer_of_packed_member): Remove the
2719 boolean argument. Don't check pointer conversion here.
2720
99063eee
RS
27212019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2722
2723 PR inline-asm/52813
2724 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2725
a30d0196
JJ
27262019-01-14 Jakub Jelinek <jakub@redhat.com>
2727
2728 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2729 and __cpp_nontype_template_parameter_auto. Add a comment that
2730 __cpp_template_auto is deprecated.
2731
2d91f79d
TH
27322019-01-14 Tom Honermann <tom@honermann.net>
2733
2734 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2735 * c-common.c (c_common_reswords): Add char8_t.
2736 (fix_string_type): Use char8_t for the type of u8 string literals.
2737 (c_common_get_alias_set): char8_t doesn't alias.
2738 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2739 C++.
2740 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2741 (keyword_begins_type_specifier): Add RID_CHAR8.
2742 * c-common.h (rid): Add RID_CHAR8.
2743 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2744 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2745 Define char8_type_node and char8_array_type_node.
2746 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2747 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2748 (c_cpp_builtins): Predefine __cpp_char8_t.
2749 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2750 CPP_UTF8STRING.
2751 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2752 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2753 targeting C++2a.
2754 * c.opt: Add the -fchar8_t command line option.
2755
23db6ced
MS
27562019-01-14 Martin Sebor <msebor@redhat.com>
2757
2758 PR target/88638
2759 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2760 and issue errors if it fails.
2761 * c-common.h (valid_format_string_type_p): Declare.
2762 * c-format.c (valid_stringptr_type_p): Rename...
2763 (valid_format_string_type_p): ...to this and make extern.
2764 (handle_format_arg_attribute): Adjust to new name.
2765 (check_format_string): Same.
2766
234c3818
L
27672019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2768
2769 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2770 Replace "may may" with "may" in warning message.
2771
d8fcab68
JJ
27722019-01-07 Jakub Jelinek <jakub@redhat.com>
2773
2774 PR c++/85052
2775 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2776 (c_build_vec_convert): Declare.
2777 * c-common.c (c_build_vec_convert): New function.
2778
29d24852
MS
27792019-01-04 Martin Sebor <msebor@redhat.com>
2780
2781 PR c/88546
2782 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2783 Handle C++ empty throw specification and C11 _Noreturn.
2784 (has_attribute): Also handle C11 _Noreturn.
2785
9069a4c9
MS
27862019-01-04 Martin Sebor <msebor@redhat.com>
2787
2788 PR c/88363
2789 * c-attribs.c (positional_argument): Also accept enumerated types.
2790
a5544970
JJ
27912019-01-01 Jakub Jelinek <jakub@redhat.com>
2792
2793 Update copyright years.
2794
da77eace
L
27952018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2796
2797 PR c/51628
2798 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2799 * c-warn.c (check_alignment_of_packed_member): New function.
2800 (check_address_of_packed_member): Likewise.
2801 (check_and_warn_address_of_packed_member): Likewise.
2802 (warn_for_address_or_pointer_of_packed_member): Likewise.
2803 * c.opt: Add -Wno-address-of-packed-member.
2804
573767d4
DM
28052018-12-20 David Malcolm <dmalcolm@redhat.com>
2806
2807 PR c++/87504
2808 * c-warn.c (get_outermost_macro_expansion): New function.
2809 (spelled_the_same_p): Use it to unwind the macro expansions, and
2810 compare the outermost macro in each nested expansion, rather than
2811 the innermost.
2812
a14feb3c
DM
28132018-12-19 David Malcolm <dmalcolm@redhat.com>
2814
2815 PR c++/87504
2816 * c-common.h (warn_tautological_cmp): Convert 1st param from
2817 location_t to const op_location_t &.
2818 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2819 when testing for INTEGER_CST.
2820 (warn_tautological_bitwise_comparison): Convert 1st param from
2821 location_t to const op_location_t &; use it to build a
2822 binary_op_rich_location, and use this.
2823 (spelled_the_same_p): New function.
2824 (warn_tautological_cmp): Convert 1st param from location_t to
2825 const op_location_t &. Warn for macro expansions if
2826 spelled_the_same_p. Use binary_op_rich_location.
2827
dfd7fdca
DM
28282018-12-19 David Malcolm <dmalcolm@redhat.com>
2829
2830 PR c++/43064
2831 PR c++/43486
2832 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2833 (verify_tree): Handle location wrappers.
2834 (c_common_truthvalue_conversion): Strip any location wrapper.
2835 Handle CONST_DECL.
2836 (fold_offsetof): Strip any location wrapper.
2837 (complete_array_type): Likewise for initial_value.
2838 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2839 index before checking for INTEGER_CST.
2840 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2841 print parentheses around location wrappers.
2842 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2843 before checking for INTEGER_CST.
2844 (warn_tautological_bitwise_comparison): Call
2845 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2846 before checking for INTEGER_CST.
2847 (readonly_error): Strip any location wrapper.
2848 (warn_array_subscript_with_type_char): Strip location wrappers
2849 before checking for INTEGER_CST. Use the location of the index if
2850 available.
2851
5c8b3702
JM
28522018-12-06 Jason Merrill <jason@redhat.com>
2853
2854 PR c++/88136 - -Wdeprecated-copy false positives
2855 * c.opt (Wdeprecated-copy-dtor): New.
2856 (Wdeprecated-copy): Move to -Wextra.
2857
673670da
MS
28582018-11-29 Martin Sebor <msebor@redhat.com>
2859
2860 PR c/88172
2861 PR testsuite/88208
2862 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2863 alignments to values less than the target requires.
2864 (has_attribute): For attribute aligned consider both the attribute
2865 and the alignment bits.
2866 * c-common.c (c_init_attributes): Optionally issue a warning for
2867 zero alignment.
2868
04864ec8
MS
28692018-11-28 Martin Sebor <msebor@redhat.com>
2870
2871 PR c/88065
2872 PR c/87297
2873 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2874 or destination is an error.
2875
ace83db0
JJ
28762018-11-28 Jakub Jelinek <jakub@redhat.com>
2877
2878 PR c++/88215
2879 * c-ubsan.c: Include langhooks.h.
2880 (ubsan_instrument_division): Change gcc_assert that main variants
2881 of op0 and op1 types are equal to gcc_checking_assert that the
2882 main variants are compatible types.
2883
da193a27
EB
28842018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2885
2886 * c-ada-spec.c: Include stringpool.h.
2887 (has_static_fields): Return false for incomplete types.
2888 (is_tagged_type): Likewise.
2889 (has_nontrivial_methods): Likewise.
2890 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2891 (struct overloaded_name_hash): New structure.
2892 (struct overloaded_name_hasher): Likewise.
2893 (overloaded_names): New global variable.
2894 (init_overloaded_names): New static function.
2895 (overloaded_name_p): New predicate.
2896 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2897 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2898 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2899 Remove always-true condition and dump forward types.
2900 (dump_ada_specs): Delete overloaded_names.
2901
98f08eb8
MS
29022018-11-20 Martin Sebor <msebor@redhat.com>
2903
2904 * c-attribs.c (type_for_vector_size): New function.
2905 (type_valid_for_vector_size): Same.
2906 (handle_vector_size_attribute): Move code to the functions above
2907 and call them.
2908 (validate_attribute, has_attribute): New functions.
2909 * c-common.h (has_attribute): Declare.
2910 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2911 * c-common.c (c_common_resword): Same.
2912
2674fa47
JM
29132018-11-16 Jason Merrill <jason@redhat.com>
2914
2915 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2916 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2917
258b3854
JJ
29182018-11-16 Jakub Jelinek <jakub@redhat.com>
2919
2920 PR middle-end/87854
2921 * c-common.c (fix_string_type): Reject string literals larger than
2922 TYPE_MAX_VALUE (ssizetype) bytes.
2923
1d249509
MS
29242018-11-15 Martin Sebor <msebor@redhat.com>
2925
2926 PR c++/87541
2927 PR c++/87542
2928 * c-attribs.c (positional_argument): New function.
2929 (handle_alloc_size_attribute): Use it and simplify.
2930 (handle_alloc_align_attribute): Same.
2931 (handle_assume_aligned_attribute): Same.
2932 (handle_nonnull_attribute): Same.
2933 * c-common.c (check_function_arguments): Pass fntype to
2934 check_function_format.
2935 * c-common.h (check_function_format): Add an argument.
2936 (PosArgFlags, positional_argument): Declare new type and function.
2937 * c-format.c (decode_format_attr): Add arguments.
2938 (check_format_string, get_constant): Same.
2939 (convert_format_name_to_system_name): Adjust.
2940
478dd60d
DM
29412018-11-15 David Malcolm <dmalcolm@redhat.com>
2942
2943 PR other/19165
2944 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2945
8cca0163
JJ
29462018-11-14 Jakub Jelinek <jakub@redhat.com>
2947
8ee09943
JJ
2948 P1236R1 - Signed integers are two's complement
2949 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2950 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2951 with in-range second operand well defined for -std=c++2a.
2952
8cca0163
JJ
2953 PR other/88007
2954 * c-common.c (parse_optimize_options): Allocate option string from
2955 opts_obstack rather than as GC memory. Move the allocation after
2956 warning for invalid option.
2957
620e594b
DM
29582018-11-13 David Malcolm <dmalcolm@redhat.com>
2959
2960 * c-common.c (c_get_substring_location): Update for renaming of
2961 get_source_location_for_substring to get_location_within_string.
2962 * c-lex.c: Replace "source_location" with "location_t".
2963 * c-opts.c: Likewise.
2964 * c-ppoutput.c: Likewise.
2965
f9731de3
MS
29662018-11-13 Martin Sebor <msebor@redhat.com>
2967
2968 PR middle-end/81824
2969 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2970 (handle_tls_model_attribute): Improve diagnostics.
2971
e4bd6d5e
JM
29722018-11-12 Jason Merrill <jason@redhat.com>
2973
a6bb6b07
JM
2974 * c-cppbuiltin.c (c_cpp_builtins): Define
2975 __cpp_impl_destroying_delete.
2976
e4bd6d5e
JM
2977 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2978 __cpp_conditional_explicit.
2979
79a2c428
MS
29802018-11-09 Martin Sebor <msebor@redhat.com>
2981
2982 PR middle-end/81824
2983 * c-attribs.c (handle_copy_attribute): New function.
2984
4c7bd361
MS
29852018-11-09 Martin Sebor <msebor@redhat.com>
2986
2987 PR c/87795
2988 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2989
28567c40
JJ
29902018-11-08 Jakub Jelinek <jakub@redhat.com>
2991
2992 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2993 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2994 enum omp_memory_order MEMORY_ORDER.
2995 (c_finish_omp_flush): Add MO argument.
2996 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2997 (c_finish_omp_for): Add FINAL_P argument.
2998 * c-omp.c: Include memmodel.h.
2999 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3000 OMP_TASKGROUP_CLAUSES to it.
3001 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3002 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3003 instead of OMP_ATOMIC_SEQ_CST.
3004 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3005 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3006 __atomic_thread_fence call with the given value.
3007 (check_omp_for_incr_expr): Formatting fixes.
3008 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3009 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3010 is not constant expression 1 or -1. Transform NE_EXPR loops
3011 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3012 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3013 loops too.
3014 (c_omp_split_clauses): Add support for combined
3015 #pragma omp parallel master and
3016 #pragma omp {,parallel }master taskloop{, simd} constructs.
3017 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3018 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3019 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3020 (c_omp_predetermined_sharing): Don't return
3021 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3022 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3023 PRAGMA_OMP_REQUIRES.
3024 * c-pragma.h (enum pragma_kind): Likewise.
3025 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3026 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3027
204839e7
DM
30282018-11-08 David Malcolm <dmalcolm@redhat.com>
3029
3030 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3031
d8010ee4
DM
30322018-11-08 David Malcolm <dmalcolm@redhat.com>
3033
3034 * c-format.c (local_cgraph_node_ptr_node): New variable.
3035 (gcc_dump_printf_char_table): Add entry for %C.
3036 (get_pointer_to_named_type): New function, taken from the handling
3037 code for "gimple *" from...
3038 (init_dynamic_diag_info): ...here. Add handling for
3039 "cgraph_node *".
3040 * c-format.h (T_CGRAPH_NODE): New.
3041
4be5c72c
JM
30422018-10-19 Jason Merrill <jason@redhat.com>
3043
3044 * c-cppbuiltin.c (c_cpp_builtins): Add
3045 __cpp_nontype_template_parameter_class.
3046
f3f6029d
NS
30472018-10-31 Nathan Sidwell <nathan@acm.org>
3048
ab5324fb
NS
3049 * c-opts.c (c_finish_options): Force command line macro
3050 location. Refactor to avoid repeating main debug hook.
3051 (push_command_line_include): Clarify comment.
3052
f3f6029d
NS
3053 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3054
91e3ec29
MS
30552018-10-30 Martin Sebor <msebor@redhat.com>
3056
3057 PR middle-end/87041
3058 * c-format.c (check_format_types): Avoid diagnosing null pointer
3059 arguments to printf-family of functions.
3060
b5ff4f5c
MP
30612018-10-30 Marek Polacek <polacek@redhat.com>
3062
3063 Implement P0892R2, explicit(bool).
3064 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3065
7e2de6df
DM
30662018-10-29 David Malcolm <dmalcolm@redhat.com>
3067
3068 * name-hint.h (name_hint::take_deferred): New member function.
3069
b2bf438c
DM
30702018-10-29 David Malcolm <dmalcolm@redhat.com>
3071
3072 PR c++/56856
3073 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3074 argument.
3075 (check_function_restrict): Rename param "argarray" to
3076 "unfolded_argarray", and make a copy named "argarray", calling
3077 fold_for_warn on each argument.
3078 (check_function_arguments): Add note about responsibility for
3079 folding the arguments.
3080
9f936c86
JM
30812018-10-17 Joseph Myers <joseph@codesourcery.com>
3082
3083 * c-common.c (flag_isoc2x): New variable.
3084 * c-common.h (clk_c): Update comment to reference C2X.
3085 (flag_isoc99, flag_isoc11): Update comments to reference future
3086 standard versions in general.
3087 (flag_isoc2x): Declare.
3088 * c-opts.c (set_std_c2x): New function.
3089 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3090 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3091 flag_isoc2x to 0.
3092 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3093
7a8a92c4
JM
30942018-10-17 Joseph Myers <joseph@codesourcery.com>
3095
3096 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3097 (std=iso9899:2018): Document C17 as published in 2018.
3098
4dc003ff
CL
30992018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3100
3101 PR c++/87364
3102 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3103
79371671
WW
31042018-10-11 Will Wray <wjwray@gmail.com>
3105
3106 PR c++/87364
3107 * c-pretty-print.h (pp_c_type_cast): Prototype.
3108 (pp_c_integer_constant): Likewise.
3109 * c-pretty-print.c (pp_c_type_cast): No longer static.
3110 (pp_c_integer_constant): Likewise.
3111 (pp_c_enumeration_constant): Fix loop termination when finding
3112 name of constant. No longer returns a value. Call
3113 pp_c_integer_constant.
3114 (c_pretty_printer::constant): Update for changes to
3115 pp_c_enumeration_constant.
3116
46c62690
JJ
31172018-10-11 Jakub Jelinek <jakub@redhat.com>
3118
3119 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3120 for no_unique_address.
3121
c24300ba
DM
31222018-10-09 David Malcolm <dmalcolm@redhat.com>
3123
3124 * c-common.c (c_option_controlling_cpp_error): Rename to...
3125 (c_option_controlling_cpp_diagnostic): ...this, and convert
3126 "reason" from int to enum.
3127 (c_cpp_error): Rename to...
3128 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3129 * c-common.h (c_cpp_error): Rename to...
3130 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3131 * c-opts.c (c_common_init_options): Update for renaming.
3132
8656dafa
RS
31332018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3134
3135 PR c/87286
3136 * c-common.c (vector_types_compatible_elements_p): Use
3137 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3138
8cff0652
VK
31392018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3140
3141 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3142 to generate constructor destructor priority warning.
3143 * c.opt (-Wprio-ctor-dtor): New option.
3144
bedf03a2
JM
31452018-10-01 Jason Merrill <jason@redhat.com>
3146
3147 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3148
6cc430c1
EB
31492018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3150
3151 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3152 (dump_ada_node): Add const keyword.
3153
87677ac7
ML
31542018-09-25 Martin Liska <mliska@suse.cz>
3155
3156 * c-common.c (c_common_truthvalue_conversion):
3157 Remove Pascal from documentation.
3158
518196cb
EB
31592018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3160
3161 * c-ada-spec.c: Include diagnostic.h.
3162 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3163
a599af84
MP
31642018-09-19 Marek Polacek <polacek@redhat.com>
3165
3166 * c.opt (Wclass-conversion): New.
3167
9c4a4b3c
DM
31682018-09-17 David Malcolm <dmalcolm@redhat.com>
3169
3170 * c-format.c (range_label_for_format_type_mismatch::get_text):
3171 Update for new param.
3172
c896ecfe
DM
31732018-09-17 David Malcolm <dmalcolm@redhat.com>
3174
3175 * c-format.c (format_warning_at_char): Update for introduction of
3176 format_string_diagnostic_t.
3177 (format_type_warning): Likewise.
3178
80c6d1f4
MJ
31792018-09-17 Martin Jambor <mjambor@suse.cz>
3180
3181 PR c/63886
3182 * c.opt (Wabsolute-value): New.
3183
6d900107
BE
31842018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3185
3186 * c-common.c (complete_flexible_array_elts): New helper function.
3187 * c-common.h (complete_flexible_array_elts): Declare.
3188
b5764229
BE
31892018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3190
3191 * c-common.c (braced_list_to_string): Remove eval parameter.
3192 Add some more checks. Always create zero-terminated STRING_CST.
3193 * c-common.h (braced_list_to_string): Adjust prototype.
3194
85204e23
DM
31952018-08-27 David Malcolm <dmalcolm@redhat.com>
3196
3197 PR 87091
3198 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3199 to a tri-state.
3200 (maybe_suggest_missing_token_insertion): Likewise.
3201 (maybe_add_include_fixit): Add param "override_location". If set,
3202 and source-printing is enabled, then override the rich_location's
3203 primary location with that of the insertion point for the fix-it
3204 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3205 * c-common.h (extern void maybe_add_include_fixit): Add bool
3206 param.
3207 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3208 for conversion of show_caret_p to a tri-state.
3209 * c-warn.c (warn_for_restrict): Likewise.
3210 * known-headers.cc
3211 (suggest_missing_header::~suggest_missing_header): Update call to
3212 maybe_add_include_fixit to suggest overriding the location, as it
3213 is for a note.
3214
3d78e008
ML
32152018-08-27 Martin Liska <mliska@suse.cz>
3216
3217 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3218 fndecl_built_in_p and remove check for FUNCTION_DECL if
3219 possible.
3d78e008
ML
3220 (check_builtin_function_arguments): Likewise.
3221 (reject_gcc_builtin): Likewise.
3222 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3223
b5be6d0c
MP
32242018-08-26 Marek Polacek <polacek@redhat.com>
3225
3226 PR c++/87029, Implement -Wredundant-move.
3227 * c.opt (Wredundant-move): New option.
3228
79ca9c35
MP
32292018-08-21 Marek Polacek <polacek@redhat.com>
3230
3231 PR c++/86981, Implement -Wpessimizing-move.
3232 * c.opt (Wpessimizing-move): New option.
3233
097f82ec
DM
32342018-08-20 David Malcolm <dmalcolm@redhat.com>
3235
3236 PR other/84889
3237 * c-attribs.c (common_handle_aligned_attribute): Add
3238 auto_diagnostic_group instance.
3239 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3240 * c-opts.c (c_common_post_options): Likewise.
3241 * c-warn.c (warn_logical_not_parentheses): Likewise.
3242 (warn_duplicated_cond_add_or_warn): Likewise.
3243 (warn_for_multistatement_macros): Likewise.
3244
3fb558b1
NS
32452018-08-20 Nathan Sidwell <nathan@acm.org>
3246
3247 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3248 access.
3249
800c0e98
NS
32502018-08-17 Nathan Sidwell <nathan@acm.org>
3251
3252 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3253 field.
3254 (laxy_hex_fp_value_count): Make unsigned.
3255 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3256 manipulate the macro.
3257 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3258 cpp_define_lazily.
3259
6f795a92
DM
32602018-08-17 David Malcolm <dmalcolm@redhat.com>
3261
3262 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3263 (gcc_dump_printf_length_specs): New.
3264 (gcc_dump_printf_flag_pairs): New.
3265 (gcc_dump_printf_flag_specs): New.
3266 (gcc_dump_printf_char_table): New.
3267 (format_types_orig): Add entry for "gcc_dump_printf".
3268 (init_dynamic_diag_info): Set up length_char_specs and
3269 conversion_specs for gcc_dump_printf_format_type.
3270 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3271
c5d725c0
NS
32722018-08-17 Nathan Sidwell <nathan@acm.org>
3273
10f04917
NS
3274 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3275
c5d725c0
NS
3276 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3277 * c-cppbuiltin.c: Likewise.
3278
c0c12356
ML
32792018-08-17 Martin Liska <mliska@suse.cz>
3280
3281 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3282 Ignore/Deprecated flag. Warning is done automatically for
3283 Deprecated flags.
c0c12356 3284
10fcc142
DM
32852018-08-16 David Malcolm <dmalcolm@redhat.com>
3286
3287 PR c++/70693
3288 * c-common.c (selftest::c_family_tests): Call
3289 selftest::c_indentation_c_tests.
3290 * c-common.h (selftest::c_indentation_c_tests): New decl.
3291 * c-indentation.c: Include "selftest.h".
3292 (next_tab_stop): Add "tab_width" param, rather than accessing
3293 cpp_opts.
3294 (get_visual_column): Likewise. Clarify comment. Bulletproof
3295 against reading past the end of the line.
3296 (get_first_nws_vis_column): Add "tab_width" param.
3297 (detect_intervening_unindent): Likewise.
3298 (should_warn_for_misleading_indentation): Read tab width from
3299 cpp_opts and pass around.
3300 (selftest::test_next_tab_stop): New test.
3301 (selftest::assert_get_visual_column_succeeds): New function.
3302 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3303 (selftest::assert_get_visual_column_fails): New function.
3304 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3305 (selftest::test_get_visual_column): New test.
3306 (selftest::c_indentation_c_tests): New function.
3307
3f6677f4
NS
33082018-08-16 Nathan Sidwell <nathan@acm.org>
3309
3310 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3311 (store_ada_macro): Likewise.
3312 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3313 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3314
96e6ae57
DM
33152018-08-15 David Malcolm <dmalcolm@redhat.com>
3316
3317 * c-format.c: Include "selftest-diagnostic.h" and
3318 "gcc-rich-location.h".
3319 (format_warning_at_char): Pass NULL for new label params of
3320 format_warning_va.
3321 (class indirection_suffix): New class.
3322 (class range_label_for_format_type_mismatch): New class.
3323 (format_type_warning): Move logic for generating "*" suffix to
3324 class indirection_suffix. Create "fmt_label" and "param_label"
3325 to show their types, and pass them to the
3326 format_warning_at_substring calls.
3327 (selftest::test_type_mismatch_range_labels): New test.
3328 (selftest::c_format_c_tests): Call it.
3329
23aa9f7c
MS
33302018-08-13 Martin Sebor <msebor@redhat.com>
3331
3332 PR tree-optimization/71625
3333 * c-common.c (braced_list_to_string): New function.
3334 * c-common.h (braced_list_to_string): Declare it.
3335
f10a9135
NS
33362018-08-08 Nathan Sidwell <nathan@acm.org>
3337
3338 * c-common.c (try_to_locate_new_include_inertion_point): Use
3339 linemap_included_from_linemap.
3340 * c-lex.c (fe_file_change): Use linemap_included_from.
3341 * c-ppoutput.c (pp_file_change): Likewise.
3342
8a45b051
MS
33432018-08-01 Martin Sebor <msebor@redhat.com>
3344
3345 PR tree-optimization/86650
ab20d992 3346 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3347 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3348 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3349 * c-format.h (T89_G): Update to be "gimple *" rather than
3350 "gcall *".
3351 (local_gcall_ptr_node): Rename...
3352 (local_gimple_ptr_node): ...to this.
3353
e540ccc0
DM
33542018-07-31 David Malcolm <dmalcolm@redhat.com>
3355
3356 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3357 table entries for gcc_diag_char_table, and the 'Z' entry from
3358 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3359 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3360 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3361 adding missing "Z" for this table. Remove erroneous "G" and "K"
3362 entries.
3363 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3364 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3365 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3366
425fc685
RE
33672018-07-31 Richard Earnshaw <rearnsha@arm.com>
3368
3369 * c-common.c (speculation_safe_resolve_call): New function.
3370 (speculation_safe_resolve_params): New function.
3371 (speculation_safe_resolve_return): New function.
3372 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3373 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3374 __HAVE_SPECULATION_SAFE_VALUE.
3375
181463c2
DM
33762018-07-20 David Malcolm <dmalcolm@redhat.com>
3377
3378 * c-common.c (c_cpp_error): Remove redundant "line_table"
3379 parameter from call to rich_location::set_range.
3380 (maybe_suggest_missing_token_insertion): Likewise.
3381
0d7f9065
MS
33822018-07-20 Martin Sebor <msebor@redhat.com>
3383
3384 PR middle-end/82063
ab20d992 3385 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3386
00abf86c
MS
33872018-07-20 Martin Sebor <msebor@redhat.com>
3388
3389 PR middle-end/82063
3390 * c-common.h (c_common_handle_option): Change function argument
3391 to HOST_WIDE_INT.
3392 * c-opts.c (c_common_init_options): Same.
3393 (c_common_handle_option): Same. Remove special handling of
3394 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3395 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3396 options to take a HOST_WIDE_INT argument and accept a byte-size
3397 suffix. Initialize.
3398 (-Wvla-larger-than): Same.
3399 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3400 (-Wno-vla-larger-than): Same.
3401
9b452033
JJ
34022018-07-12 Jakub Jelinek <jakub@redhat.com>
3403
3404 * c-attribs.c (c_common_attribute_table): Add
3405 "omp declare target implicit" attribute.
3406
cd0762f3
RB
34072018-07-12 Richard Biener <rguenther@suse.de>
3408
3409 PR c/86453
3410 * c-attribs.c (handle_packed_attribute): Do not build a variant
3411 type with TYPE_PACKED, instead ignore the attribute if we may
3412 not apply to the original type.
3413
0b27c3ed
JJ
34142018-07-10 Jakub Jelinek <jakub@redhat.com>
3415
3416 PR c++/86443
3417 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3418 to contain TREE_LIST for both the original class iterator and the
3419 "last" helper var.
3420
e730a0ef
EB
34212018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3422
3423 * c-ada-spec.c (to_ada_name): Remove index parameter.
3424 (pp_ada_tree_identifier): Likewise.
3425 (dump_ada_macros): Adjust call to to_ada_name.
3426 (struct overloaded_name_hash): Delete.
3427 (struct overloaded_name_hasher): Likewise.
3428 (overloaded_names): Likewise.
3429 (compute_overloading_index): Likewise.
3430 (dump_ada_decl_name): Do not call compute_overloading_index and
3431 adjust calls to pp_ada_tree_identifier.
3432 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3433 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3434 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3435 (dump_ada_enum_type): Remove type and display_convention parameters.
3436 Adjust calls to pp_ada_tree_identifier.
3437 (dump_ada_node): Likewise and for dump_ada_structure.
3438 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3439 and tidy up.
3440 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3441 syntax.
3442 (print_constructor): Adjust call to pp_ada_tree_identifier.
3443 (print_destructor): Likewise.
3444 (dump_ada_declaration): Switch to aspect syntax.
3445 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3446 parameter with nested parameter.
3447 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3448 (dump_ada_specs): Do not delete overloaded_names table.
3449
8de583fc
PB
34502018-07-06 Peter Bergner <bergner@linux.ibm.com>
3451
3452 PR target/86324
e730a0ef 3453 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3454 target hook.
3455
09cff37b
NS
34562018-07-05 Nathan Sidwell <nathan@acm.org>
3457
3458 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3459 NO_IMPLICIT_EXTERN_C.
3460
98086b2b
ML
34612018-06-28 Martin Liska <mliska@suse.cz>
3462
3463 * cppspec.c: Include opt-suggestions.h.
3464
ab20d992
JJ
34652018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3466 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3467 Cesar Philippidis <cesar@codesourcery.com>
3468
3469 * c-pragma.h (enum pragma_omp_clause): Add
3470 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3471 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3472
f41b7612
JJ
34732018-06-20 Jakub Jelinek <jakub@redhat.com>
3474
3475 PR c++/86210
3476 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3477 comment.
3478
4252ccd7
MS
34792018-06-18 Martin Sebor <msebor@redhat.com>
3480
3481 PR middle-end/85602
3482 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3483 nonstring.
3484
e197e64e
KV
34852018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3486
3487 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3488
34a7a230
JM
34892018-06-13 Jason Merrill <jason@redhat.com>
3490
5cef3733
JM
3491 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3492 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3493 handling.
3494
34a7a230
JM
3495 PR c++/86094 - wrong code with defaulted move ctor.
3496 * c-opts.c (c_common_post_options): Bump the current ABI version to
3497 13. Set warn_abi_version and flag_abi_compat_version to the current
3498 version rather than 0. Fix defaulting flag_abi_compat_version from
3499 warn_abi_version.
3500
bb0f14ae
MS
35012018-06-12 Martin Sebor <msebor@redhat.com>
3502
3503 PR c/85931
3504 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3505 sizeof source and destination yields the same value.
3506
3713f2e2
ML
35072018-06-12 Martin Liska <mliska@suse.cz>
3508
3509 * c.opt: Make MPX-related options as Deprecated.
3510
4af78ef8
DM
35112018-06-08 David Malcolm <dmalcolm@redhat.com>
3512
3513 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3514 rather than 0.
3515
31db0fe0
ML
35162018-06-08 Martin Liska <mliska@suse.cz>
3517
3518 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3519 for MPX (macros, related functions, fields in cgraph_node, ...).
3520 (handle_bnd_legacy): Likewise.
3521 (handle_bnd_instrument): Likewise.
3522 * c.opt: Likewise.
3523
fe16acf2
JJ
35242018-06-06 Jakub Jelinek <jakub@redhat.com>
3525
3526 PR c++/86068
3527 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3528 __cpp_transactional_memory to 201500 instead of 210500.
3529
4dbdb49b
JM
35302018-06-06 Jason Merrill <jason@redhat.com>
3531
3532 PR c++/85710 - ICE with -Wmemset-elt-size.
3533 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3534
f8ad043f
JM
35352018-06-01 Jason Merrill <jason@redhat.com>
3536
3537 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3538 201703.
3539
abc24d93
EB
35402018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3541
3542 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3543 declaration for a typedef independently of whether the declaration of
3544 the subtype is generated.
3545
d258f4aa
MS
35462018-05-31 Martin Sebor <msebor@redhat.com>
3547
3548 PR c/82063
3549 * c.opt (-Wno-alloc-size-larger-than): New option.
3550
b67b9225
DP
35512018-04-22 David Pagan <dave.pagan@oracle.com>
3552
3553 PR c/55976
3554 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3555 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3556 differentiate between default (no option), -Wreturn-type, and
3557 -Wno-return-type.
3558
04eb9c55
JM
35592018-05-29 Jason Merrill <jason@redhat.com>
3560
3561 * c.opt (Winit-list-lifetime): New flag.
3562
b0c31bc6
BE
35632018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3564
3565 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3566 splay_tree_delete_pointers.
3567
44284983
JJ
35682018-05-26 Jakub Jelinek <jakub@redhat.com>
3569
3570 PR bootstrap/85921
3571 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3572 noinline variable to workaround broken kernel headers.
3573
b46b715d
JM
35742018-05-18 Jason Merrill <jason@redhat.com>
3575
3576 * c.opt (Wdeprecated-copy): New flag.
3577
40659769
ML
35782018-05-17 Martin Liska <mliska@suse.cz>
3579
3580 * c-warn.c (overflow_warning): Do not use
3581 space in between 'G_' and '('.
3582
403962ea
JM
35832018-05-09 Jason Merrill <jason@redhat.com>
3584
3585 * c-common.c (valid_array_size_p): Add complain parameter.
3586 * c-common.h: ...which defaults to true.
3587
1c9ee609
JJ
35882018-05-11 Jakub Jelinek <jakub@redhat.com>
3589
3590 PR c/85696
3591 * c-omp.c (c_omp_predetermined_sharing): Return
3592 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3593
19916065
ML
35942018-05-11 Martin Liska <mliska@suse.cz>
3595
92a285c1 3596 PR sanitizer/85556
19916065
ML
3597 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3598 TREE_LIST values.
3599
79e7b1fe
JJ
36002018-05-10 Jakub Jelinek <jakub@redhat.com>
3601
3602 PR c++/85662
3603 * c-common.h (fold_offsetof_1): Removed.
3604 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3605 CTX argument defaulted to ERROR_MARK.
3606 * c-common.c (fold_offsetof_1): Renamed to ...
3607 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3608 argument, convert the pointer constant to TYPE and use size_binop
3609 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3610 a pointer type. Adjust recursive calls.
3611
86c12f76
EB
36122018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3613
3614 PR c++/85400
3615 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3616
ee336e84
NS
36172018-05-07 Nathan Sidwell <nathan@acm.org>
3618
3619 * c.opt (ffor-scope): Remove functionality, issue warning.
3620
6c072e21
NS
36212018-05-03 Nathan Sidwell <nathan@acm.org>
3622
3623 * c.opt (ffriend-injection): Remove functionality, issue warning.
3624
2cc7d3a7
DM
36252018-05-01 David Malcolm <dmalcolm@redhat.com>
3626
3627 PR c/84258
3628 * c-format.c (struct format_check_results): Add field
3629 "number_non_char".
3630 (check_format_info): Initialize it, and warn if encountered.
3631 (check_format_arg): Distinguish between wide char and
3632 everything else when detecting arrays of non-char.
3633
7761dfbe
DM
36342018-04-30 David Malcolm <dmalcolm@redhat.com>
3635
3636 * c-format.c (get_corrected_substring): Update for
3637 location_get_source_line returning a char_span. Use a char_span
3638 when handling the prefix of the correction.
3639 * c-indentation.c (get_visual_column): Update for
3640 location_get_source_line returning a char_span.
3641 (get_first_nws_vis_column): Likewise.
3642
62e98ef1
DM
36432018-03-29 David Malcolm <dmalcolm@redhat.com>
3644
3645 PR c++/84269
3646 * known-headers.cc (get_stdlib_header_for_name): Add various names
3647 from <assert.h>, <string.h>, and <memory.h>; add more names from
3648 <stdio.h>.
3649
a7dea617
JJ
36502018-03-27 Jakub Jelinek <jakub@redhat.com>
3651
3652 PR c++/85061
3653 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3654 get_base_address of the second operand is a VAR_P, rather than the
3655 operand itself, and use gcc_checking_assert instead of gcc_assert.
3656
889a3a30
MP
36572018-03-23 Marek Polacek <polacek@redhat.com>
3658
3659 PR c++/85045
3660 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3661 <case RDIV_EXPR>: Tweak condition.
3662
452154b9
EB
36632018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3664
3665 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3666
63ecb626
JJ
36672018-03-16 Jakub Jelinek <jakub@redhat.com>
3668
ce811fc4
JJ
3669 PR c/84909
3670 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3671 diagnostics.
3672
63ecb626
JJ
3673 PR c/84910
3674 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3675 diagnostics.
3676
a1295eec
RB
36772018-03-16 Richard Biener <rguenther@suse.de>
3678
3679 PR c/84873
3680 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3681 unshare the possibly folded expression.
3682
919674fb
RB
36832018-03-15 Richard Biener <rguenther@suse.de>
3684
3685 PR c/84873
3686 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3687
f99309b2
MS
36882018-03-13 Martin Sebor <msebor@redhat.com>
3689
3690 PR tree-optimization/84725
3691 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3692 with all three narrow character types, including their qualified forms.
3693
e9b9fa4c
MS
36942018-03-12 Martin Sebor <msebor@redhat.com>
3695
3696 PR tree-optimization/83456
ab20d992 3697 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3698 Restore checking of bounded built-in functions.
3699 (check_function_arguments): Also return the result
3700 of warn_for_restrict.
ab20d992
JJ
3701 * c-common.c (check_function_restrict): Return bool.
3702 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3703
0805d020
MP
37042018-03-02 Marek Polacek <polacek@redhat.com>
3705
3706 PR c++/84171
3707 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3708 is erroneous.
3709
ed2a2f08
TS
37102018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3711
3712 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3713 function".
3714
90abdde0
MP
37152018-03-01 Marek Polacek <polacek@redhat.com>
3716
3717 PR c++/84639
3718 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3719 alignment in computation.
3720
c6db43fa
EB
37212018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3722
3723 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3724 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3725
9e25c7ed
EB
37262018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3727
3728 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3729 (is_char_array): Take a type instead of a declaration.
3730 (dump_ada_array_type): Likewise.
3731 (is_simple_enum): Minor tweak.
3732 (dump_ada_enum_type): New function extracted from...
3733 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3734 <INTEGER_TYPE>: Remove unreachable code.
3735 <RECORD_TYPE>: Likewise. Minor tweaks.
3736 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3737 <ENUMERAL_TYPE>: New case.
3738 <RECORD_TYPE>: Factor out common code.
3739 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3740 Minor tweaks. Deal with enumeral types.
3741 (dump_ada_structure): Minor tweaks.
3742
09de3550
EB
37432018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3744
3745 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3746 address for incomplete structures.
3747 (dump_forward_type): Do not bail out for incomplete structures.
3748 (dump_ada_declaration): Do not special-case incomplete structures
3749 for subtypes. Dump them as null records for types.
3750
095d8d4b
EB
37512018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3752
3753 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3754 (is_char_array): Fix formatting.
3755 (dump_template_types): Likewise.
3756 (dump_generic_ada_node): Rename into...
3757 (dump_ada_node): ...this.
3758 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3759 incomplete structures and not for empty structures. Do not use it
3760 when forward declarations are needed.
3761 (dump_forward_type): New function.
3762 (dump_nested_types): Remove FORWARD parameter. Do not consider
3763 TREE_VISITED and do not generate a forward declaration. Only dump
3764 original nested types for nested declaration.
3765 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3766 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3767 <RECORD_TYPE>: Do not consider TREE_VISITED.
3768 (dump_ada_declaration): Use booleans and fix formatting throughout.
3769 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3770 Call dump_forward_type instead of dump_nested_types for a typedef.
3771 Remove superfluous check and adjust call to dump_nested_types.
3772 <POINTER_TYPE>: Call dump_forward_type and fall through.
3773 (dump_ada_struct_decl): Rename into...
3774 (dump_ada_structure): ...this. Do not special-case empty structures.
3775
d4cfd486
MS
37762018-02-27 Martin Sebor <msebor@redhat.com>
3777
3778 PR c++/83871
3779 * c.opt (-Wmissing-attributes): New option.
3780
b22dbd03
ML
37812018-02-21 Martin Liska <mliska@suse.cz>
3782
3783 * c.opt (Wcatch-value=): Add IntegerRange.
3784
883dfe2a
JM
37852018-02-15 Jason Merrill <jason@redhat.com>
3786
3787 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3788
0444aa9c
NS
37892018-02-09 Nathan Sidwell <nathan@acm.org>
3790
3791 PR c/84293
3792 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3793 arg.
3794 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3795 arg. Adjust.
3796
cea71f0a
MS
37972018-02-09 Martin Sebor <msebor@redhat.com>
3798
3799 PR lto/84212
3800 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3801 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3802 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3803 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3804 (-Wuninitialized): Same.
3805
8c8b7be5
EB
38062018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3807
3808 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3809 keyword for components.
3810
7c30b12a
PC
38112018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3812
3813 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3814
eece7fe5
JK
38152018-02-02 Julia Koval <julia.koval@intel.com>
3816
3817 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3818
7d07a93a
MP
38192018-01-29 Marek Polacek <polacek@redhat.com>
3820
3821 PR c/83966
3822 * c-format.c (check_function_format): Check current_function_decl.
3823
53723269
JJ
38242018-01-27 Jakub Jelinek <jakub@redhat.com>
3825
3826 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3827 argument.
3828 (LAZY_HEX_FP_VALUES_CNT): Define.
3829 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3830 values rather than just 12.
3831 (builtin_define_with_hex_fp_value): Likewise.
3832
7365279f
BK
38332018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3834
92a285c1
ML
3835 PR other/70268
3836 * c.opt (-fmacro-prefix-map): New option.
3837 * c-opts.c (c_common_handle_option): Handle it.
3838 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3839 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3840
bb9869d5
DM
38412018-01-17 David Malcolm <dmalcolm@redhat.com>
3842
3843 PR c++/83814
3844 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3845
68dc87c3
EB
38462018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3847
3848 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3849 Skip 'f' and 'F' characters if it is true.
3850 (store_ada_macro): Minor tweak.
3851 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3852 <CPP_WSTRING>: Likewise.
3853 <CPP_STRING>: Output '&' in the buffer if not the first string.
3854 <CPP_NUMBER>: Adjust calls to dump_number.
3855
9a004410
DM
38562018-01-10 David Malcolm <dmalcolm@redhat.com>
3857
3858 PR c++/43486
3859 * c-common.c: Include "selftest.h".
3860 (get_atomic_generic_size): Perform the test for integral type
3861 before the range test for any integer constant, fixing indentation
3862 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3863 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3864 (selftest::test_fold_for_warn): New function.
3865 (selftest::c_common_c_tests): New function.
3866 (selftest::c_family_tests): Call it, and
3867 selftest::c_pretty_print_c_tests.
3868 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3869 * c-format.c (check_format_arg): Convert VAR_P check to a
3870 fold_for_warn.
3871 * c-pretty-print.c: Include "selftest.h".
3872 (pp_c_cast_expression): Don't print casts for location wrappers.
3873 (selftest::assert_c_pretty_printer_output): New function.
3874 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3875 (selftest::test_location_wrappers): New function.
3876 (selftest::c_pretty_print_c_tests): New function.
3877 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3878
5c0caeb3
RS
38792018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3880 Alan Hayward <alan.hayward@arm.com>
3881 David Sherwood <david.sherwood@arm.com>
3882
3883 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3884
73a699ae
RS
38852018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3886 Alan Hayward <alan.hayward@arm.com>
3887 David Sherwood <david.sherwood@arm.com>
3888
3889 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3890 as polynomial.
3891
928686b1
RS
38922018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3893 Alan Hayward <alan.hayward@arm.com>
3894 David Sherwood <david.sherwood@arm.com>
3895
3896 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3897 (convert_vector_to_array_for_subscript): Handle polynomial
3898 TYPE_VECTOR_SUBPARTS.
3899 (c_common_type_for_mode): Check valid_vector_subparts_p.
3900 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3901 VECTOR_CST_NELTS.
3902
85ec4feb
JJ
39032018-01-03 Jakub Jelinek <jakub@redhat.com>
3904
3905 Update copyright years.
3906
170a8bd6 39072017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3908 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3909
3910 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3911 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3912
ab20d992 39132017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3914
3915 PR debug/83527
3916 PR debug/83419
3917 * c-semantics.c (only_debug_stmts_after_p): New.
3918 (pop_stmt_list): Clear side effects in debug-only stmt list.
3919 Check for single nondebug stmt followed by debug stmts only.
3920
c12d20d4
AO
39212017-12-21 Alexandre Oliva <aoliva@redhat.com>
3922
3923 PR debug/83419
3924 * c-semantics.c (pop_stmt_list): Propagate side effects from
3925 single nondebug stmt to container list.
3926
01512446
JJ
39272017-12-19 Jakub Jelinek <jakub@redhat.com>
3928
3929 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3930 conditions with typical order conditions.
3931
82cfbd01
MP
39322017-12-18 Marek Polacek <polacek@redhat.com>
3933
3934 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3935 not in effect.
3936
99da11ec
MS
39372017-12-17 Martin Sebor <msebor@redhat.com>
3938
3939 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3940 an error for attribute warn_if_not_aligned.
3941
cc8bea0a
MS
39422017-12-16 Martin Sebor <msebor@redhat.com>
3943
3944 PR tree-optimization/78918
3945 * c-common.c (check_function_restrict): Avoid checking built-ins.
3946 * c.opt (-Wrestrict): Include in -Wall.
3947
4849deb1
JJ
39482017-12-15 Jakub Jelinek <jakub@redhat.com>
3949
3950 * c-attribs.c (c_common_attribute_table,
3951 c_common_format_attribute_table): Swap affects_type_identity
3952 and handler fields, adjust comments.
3953
c65e18d3
BE
39542017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3955
3956 * c.opt (Wcast-function-type): New warning option.
3957 * c-lex.c (get_fileinfo): Avoid warning.
3958 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3959
2004617a
QZ
39602017-12-14 Qing Zhao <qing.zhao@oracle.com>
3961
7365279f 3962 PR middle_end/79538
2004617a
QZ
3963 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3964 Adjust the size of buf1 and buf2, add a new buf to avoid
3965 format-overflow warning.
3966
ab20d992 39672017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3968
3969 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3970 subsequent statement list.
3971
5d9ae53d
MS
39722017-12-07 Martin Sebor <msebor@redhat.com>
3973
3974 PR c/81544
3975 PR c/81566
3976 * c-attribs.c (attr_aligned_exclusions): New array.
3977 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3978 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3979 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3980 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3981 (attr_warn_unused_result_exclusions): Same.
3982 (handle_hot_attribute, handle_cold_attribute): Simplify.
3983 (handle_const_attribute): Warn on function returning void.
3984 (handle_pure_attribute): Same.
3985 (handle_aligned_attribute): Diagnose conflicting attribute
3986 specifications.
3987 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3988
c79144f8
DM
39892017-12-06 David Malcolm <dmalcolm@redhat.com>
3990
3991 PR c/83236
3992 * c-common.c (selftest::c_family_tests): Call
3993 selftest::c_spellcheck_cc_tests.
3994 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3995 * c-spellcheck.cc: Include "selftest.h".
3996 (name_reserved_for_implementation_p): New function.
3997 (should_suggest_as_macro_p): New function.
3998 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3999 should_suggest_as_macro_p and call it.
4000 (selftest::test_name_reserved_for_implementation_p): New function.
4001 (selftest::c_spellcheck_cc_tests): New function.
4002 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4003
613bc14f
DM
40042017-12-06 David Malcolm <dmalcolm@redhat.com>
4005
4006 * c-spellcheck.cc: New file, taken from macro-handling code in
4007 spellcheck-tree.c.
4008 * c-spellcheck.h: New file, taken from macro-handling code in
4009 spellcheck-tree.h.
4010
e76c7157
JJ
40112017-12-01 Jakub Jelinek <jakub@redhat.com>
4012
4013 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4014 attribute.
4015 (handle_simd_attribute): Don't check for "cilk simd function"
4016 attribute. Reindent, formatting changes.
4017
b0da4034
JK
40182017-11-30 Julia Koval <julia.koval@intel.com>
4019
4020 * c-common.h (inv_list): Remove.
4021
058f0b9e
JJ
40222017-11-28 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR sanitizer/81275
4025 * c-common.c (c_switch_covers_all_cases_p_1,
4026 c_switch_covers_all_cases_p): New functions.
4027 * c-common.h (c_switch_covers_all_cases_p): Declare.
4028
5e9d6aa4 40292017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4030 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4031
4032 * array-notation-common.c: Delete.
4033 * c-cilkplus.c: Ditto.
4034 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4035 * c-common.def (ARRAY_NOTATION_REF): Remove.
4036 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4037 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4038 c_validate_cilk_plus_loop, cilkplus_an_parts,
4039 cilk_ignorable_spawn_rhs_op,
4040 cilk_recognize_spawn): Remove.
4041 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4042 * c-omp.c: Remove CILK_SIMD check.
4043 * c-pragma.c: Ditto.
4044 * c-pragma.h: Remove CILK related pragmas.
4045 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4046 ARRAY_NOTATION_REF condition.
4047 (c_pretty_printer::expression): Ditto.
4048 * c.opt (fcilkplus): Remove.
4049 * cilk.c: Delete.
4050
1af4ebf5
MG
40512017-11-21 Marc Glisse <marc.glisse@inria.fr>
4052
4053 * c-pretty-print.c (pp_c_additive_expression,
4054 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4055
d44ed508
JJ
40562017-11-21 Jakub Jelinek <jakub@redhat.com>
4057
7d2f0f9b
JJ
4058 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4059
d44ed508
JJ
4060 PR c++/83059
4061 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4062 instead of tree_to_uhwi, formatting fix.
4063
26edace6
DM
40642017-11-20 David Malcolm <dmalcolm@redhat.com>
4065
4066 PR c/81404
4067 * known-headers.cc: New file, based on material from c/c-decl.c.
4068 (suggest_missing_header): Copied as-is.
4069 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4070 heavily edited to add C++ support. Add some knowledge about
4071 <limits.h>, <stdint.h>, and <wchar.h>.
4072 * known-headers.h: Likewise.
4073
6c7a259b
DM
40742017-11-20 David Malcolm <dmalcolm@redhat.com>
4075
4076 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4077 (lookup_name_fuzzy): Likewise. Convert return type from
4078 const char * to name_hint. Add location_t param.
4079 * name-hint.h: New header.
4080
f9c59f7e
JJ
40812017-11-19 Jakub Jelinek <jakub@redhat.com>
4082
4083 PR c/66618
4084 PR c/69960
4085 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4086
1e39313a
JM
40872017-11-16 Joseph Myers <joseph@codesourcery.com>
4088
4089 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4090 expected publication date of C17.
4091 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4092
3ca0dc60
JM
40932017-11-15 Joseph Myers <joseph@codesourcery.com>
4094
4095 PR c/81156
4096 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4097 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4098
025d57f0
MS
40992017-11-10 Martin Sebor <msebor@redhat.com>
4100
4101 PR c/81117
4102 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4103 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4104 * c.opt (-Wstringop-truncation): New option.
4105
1b6fa695
ML
41062017-11-06 Martin Liska <mliska@suse.cz>
4107
4108 PR middle-end/82404
4109 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4110 FE.
4111 * c.opt: Set default value of warn_return_type.
4112
64a5912c
DM
41132017-10-31 David Malcolm <dmalcolm@redhat.com>
4114
4115 * c-common.c (binary_op_error): Update for renaming of
4116 error_at_rich_loc.
4117 (c_parse_error): Likewise.
4118 * c-warn.c (warn_logical_not_parentheses): Likewise for
4119 renaming of inform_at_rich_loc.
4120 (warn_for_restrict): Likewise for renaming of
4121 warning_at_rich_loc_n.
4122
c76dc9c3
JM
41232017-10-30 Joseph Myers <joseph@codesourcery.com>
4124
4125 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4126 * c-opts.c (set_std_c17): New function.
4127 (c_common_init_options): Use gnu17 as default C version.
4128 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4129
ee5fd23a
MM
41302017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4131
4132 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4133 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4134 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4135 __FP_FAST_FMA<N>X.
4136
d1047465
MP
41372017-10-23 Marek Polacek <polacek@redhat.com>
4138
4139 PR c/82681
4140 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4141
9e878cf1
EB
41422017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4143
4144 * c-common.c (check_builtin_function_arguments): Also check arguments
4145 of __builtin_alloca_with_align_and_max.
4146
89b6abbb
DM
41472017-10-17 David Malcolm <dmalcolm@redhat.com>
4148
4149 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4150 rather than NULL to format_warning_va.
4151 (check_format_types): Likewise when calling format_type_warning.
4152 Remove code to extract source_ranges and source_range * in favor
4153 of just a location_t.
4154 (format_type_warning): Convert source_range * param to a
4155 location_t.
4156
39382c09
JJ
41572017-10-13 Jakub Jelinek <jakub@redhat.com>
4158
4159 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4160 [LR]SHIFT_EXPR.
4161
62e1c678
DM
41622017-10-12 David Malcolm <dmalcolm@redhat.com>
4163
4164 * c-common.c (enum missing_token_insertion_kind): New enum.
4165 (get_missing_token_insertion_kind): New function.
4166 (maybe_suggest_missing_token_insertion): New function.
4167 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4168
b90c9338
NS
41692017-10-11 Nathan Sidwell <nathan@acm.org>
4170
4171 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4172 (c_common_handle_option): Update incpath_kind names.
4173
3a266bcd
ML
41742017-10-11 Martin Liska <mliska@suse.cz>
4175
4176 PR sanitizer/82490
4177 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4178 Wattributes warning.
4179
8e6cdc90
RS
41802017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4181
4182 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4183 operating on trees as wide_ints.
4184 * c-common.c (pointer_int_sum): Likewise.
4185 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4186 * c-warn.c (match_case_to_enum_1): Likewise.
4187 (c_do_switch_warnings): Likewise.
4188 (maybe_warn_shift_overflow): Likewise.
4189
802b38c9
JJ
41902017-10-10 Jakub Jelinek <jakub@redhat.com>
4191
4192 PR c/82437
4193 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4194 instead of wide_int::from.
4195
4e34b338
JJ
41962017-10-06 Jakub Jelinek <jakub@redhat.com>
4197
4198 PR c/82437
4199 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4200 using to_widest use wide_int with the larger of the two precisions.
4201
4bc4b2b4
BE
42022017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4203
4204 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4205 functions.
4206
a1488398
RS
42072017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4208
4209 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4210 when combining the original unconverted comparison operands.
4211
01c9fb68
JJ
42122017-09-29 Jakub Jelinek <jakub@redhat.com>
4213
4214 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4215 attribute.
4216
6e3e8419
EB
42172017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4218
4219 * c-ada-spec.c (to_ada_name): Add index parameter.
4220 (pp_ada_tree_identifier): Likewise.
4221 (dump_ada_macros): Adjust call to to_ada_name.
4222 (struct overloaded_name_hash): New type.
4223 (struct overloaded_name_hasher): Likewise.
4224 (overloaded_names): New hash table.
4225 (compute_overloading_index): New function.
4226 (dump_ada_decl_name): Call it and pass the result to
4227 pp_ada_tree_identifier.
4228 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4229 (dump_ada_function_declaration): Likewise.
4230 (dump_generic_ada_node): Likewise.
4231 (print_constructor): Likewise.
4232 (print_destructor): Likewise.
4233 (dump_ada_specs): Delete overloaded_names table.
4234
79310774
EB
42352017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4236
4237 * c-ada-spec.c (max_ada_macros): Move around.
4238 (store_ada_macro_index): Likewise.
4239 (source_file): Rename into...
4240 (macro_source_file): ...this.
4241 (count_ada_macro): Move around.
4242 (store_ada_macro): Likewise.
4243 (compare_macro): Likewise.
4244 (print_ada_macros): Merge in...
4245 (dump_ada_macros): ...this.
4246 (source_file_base): Rename into...
4247 (current_source_file): ...this.
4248 (print_comment): Move around.
4249 (dump_ada_nodes): Call dump_ada_declaration directly.
4250 (struct with): Change type of limited field to bool.
4251 (append_withs): Change type of limited_access parameter to bool.
4252 (pp_ada_tree_identifie): Likewise.
4253 (dump_ada_decl_nam): Likewise.
4254 (dump_generic_ada_node): Likewise. Do not print the return type.
4255 (to_ada_name): Change type of space_found parameter to bool.
4256 (dump_ada_function_declaration): Return void and change type of
4257 parameters to bool. Also print the return type for a function.
4258 (print_ada_methods): Rename into...
4259 (dump_ada_methods): ...this.
4260 (print_ada_declaration): Rename into ...
4261 (dump_ada_declaration): ...this. Do not print the return type.
4262 (print_ada_struct_decl): Rename into...
4263 (dump_ada_struct_decl): ...this.
4264
7d386d45
JJ
42652017-09-29 Jakub Jelinek <jakub@redhat.com>
4266
4267 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4268 rather than DECL_INITIAL.
4269 (common_handle_aligned_attribute): Likewise.
4270
ab20d992 42712017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4272
4273 * c.opt (gen-decls): Add RejectNegative.
4274
026a79f7
AS
42752017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4276 Jakub Jelinek <jakub@redhat.com>
4277
4278 Add support for -std=c++2a.
4279 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4280 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4281 * c-opts.c (set_std_cxx2a): New.
4282 (c_common_handle_option): Set options when -std=c++2a is enabled.
4283 (c_common_post_options): Adjust comments.
4284 (set_std_cxx14, set_std_cxx17): Likewise.
4285
4a8ca690
EB
42862017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4287
4288 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4289 message for non-uniform endianness and issue a warning in C++.
4290
7b936140
JJ
42912017-09-15 Jakub Jelinek <jakub@redhat.com>
4292
4293 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4294 (Wc++17-compat): Change from undocumented alias to option.
4295 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4296 change C++1z to C++17 in description.
4297 (std=c++1z, std=gnu++1z): Change from option to undocumented
4298 deprecated alias.
4299 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4300 Adjust description.
4301 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4302 * c-opts.c (set_std_cxx1z): Rename to ...
4303 (set_std_cxx17): ... this.
4304 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4305 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4306 caller.
7b936140
JJ
4307 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4308 comments.
4309
12263f13
L
43102017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4311
4312 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4313 function alignment if warn_if_not_aligned_p is true.
4314
6836632e
NS
43152017-09-12 Nathan Sidwell <nathan@acm.org>
4316
4317 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4318 resort_sorted_fields): Move to c/c-decl.c.
4319 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4320 (struct sorted_fields_type): Move to c/c-lang.h.
4321
019bf9ad
JW
43222017-09-09 Jonathan Wakely <jwakely@redhat.com>
4323
4324 PR c++/81852
4325 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4326
bc7fe952
MP
43272017-09-04 Marek Polacek <polacek@redhat.com>
4328
4329 PR c/81783
4330 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4331 (warn_tautological_cmp): Call it.
4332
ab20d992 43332017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4334
4335 * c-opts.c (c_common_finish): Write dependency information even if
4336 there are errors.
4337
d2e05fcb
JJ
43382017-09-01 Jakub Jelinek <jakub@redhat.com>
4339
4340 PR c/81887
4341 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4342 (omp_pragmas_simd): ... here.
4343 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4344 create new clauses list containing just simd clause.
4345
18e2a8b8
RS
43462017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4347 Alan Hayward <alan.hayward@arm.com>
4348 David Sherwood <david.sherwood@arm.com>
4349
4350 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4351 into scalar_mode_supported_p call.
4352 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4353
16d22000
RS
43542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4355 Alan Hayward <alan.hayward@arm.com>
4356 David Sherwood <david.sherwood@arm.com>
4357
4358 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4359 for the mode iterator.
4360
b397965c
RS
43612017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4362 Alan Hayward <alan.hayward@arm.com>
4363 David Sherwood <david.sherwood@arm.com>
4364
4365 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4366 * c-common.c (c_build_vec_perm_expr): Likewise.
4367
357b7604
RS
43682017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4369 Alan Hayward <alan.hayward@arm.com>
4370 David Sherwood <david.sherwood@arm.com>
4371
4372 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4373
e05c94ba
RS
43742017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4375 Alan Hayward <alan.hayward@arm.com>
4376 David Sherwood <david.sherwood@arm.com>
4377
4378 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4379 before calling targetm.addr_space.valid_pointer_mode.
4380
5c20c4af
RS
43812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4382 Alan Hayward <alan.hayward@arm.com>
4383 David Sherwood <david.sherwood@arm.com>
4384
4385 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4386
c94843d2 43872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4388 Alan Hayward <alan.hayward@arm.com>
4389 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4390
4391 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4392 iterators.
4393 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4394
4e10a5a7
RS
43952017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4396 Alan Hayward <alan.hayward@arm.com>
4397 David Sherwood <david.sherwood@arm.com>
4398
4399 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4400 case statements.
4401
130fcab0
ML
44022017-08-29 Martin Liska <mliska@suse.cz>
4403
4404 PR other/39851
4405 * c-common.c (parse_optimize_options): Add argument to function
4406 call.
4407 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4408
14e18d71
DM
44092017-08-24 David Malcolm <dmalcolm@redhat.com>
4410
4411 * c-lex.c (interpret_float): Use token location
4412 when building an EXCESS_PRECISION_EXPR.
4413
2f687306
DM
44142017-08-21 David Malcolm <dmalcolm@redhat.com>
4415
4416 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4417 it to check_function_format.
4418 * c-common.h (check_function_arguments): Add vec<location_t> *
4419 param.
4420 (check_function_format): Likewise.
4421 * c-format.c (struct format_check_context): Add field "arglocs".
4422 (check_function_format): Add param "arglocs"; pass it to
4423 check_format_info.
ab20d992 4424 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4425 new field of format_ctx.
4426 (check_format_arg): Pass format_ctx->arglocs to new param of
4427 check_format_info_main.
4428 (class argument_parser): New field "arglocs".
4429 (argument_parser::argument_parser): Add "arglocs_" param and use
4430 it to initialize new field.
4431 (argument_parser::check_argument_type): Pass new arglocs field to
4432 check_format_types.
4433 (check_format_info_main): Add param "arglocs", and use it when
4434 constructing arg_parser.
4435 (check_format_types): Add param "arglocs"; use it if non-NULL when
4436 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4437
00aa1fa2
L
44382017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4439
4440 PR c/53037
4441 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4442 (c_common_attribute_table): Add warn_if_not_aligned.
4443 (handle_aligned_attribute): Renamed to ...
4444 (common_handle_aligned_attribute): Remove argument, name, and add
4445 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4446 (handle_aligned_attribute): New.
4447 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4448
27be025d
MS
44492017-08-14 Martin Sebor <msebor@redhat.com>
4450
4451 PR c/81117
4452 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4453 (handle_nonstring_attribute): New function.
4454
da67acb9
MS
44552017-08-14 Martin Sebor <msebor@redhat.com>
4456
4457 PR c/81117
4458 * c-format.h (T89_G): New macro.
4459 * c-format.c (local_gcall_ptr_node): New variable.
4460 (init_dynamic_diag_info): Initialize it.
4461
a8b522b4
ML
44622017-08-11 Martin Liska <mliska@suse.cz>
4463
4464 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4465 TARGET_SUPPORTS_ALIASES.
4466
32129a17
DM
44672017-08-10 David Malcolm <dmalcolm@redhat.com>
4468
4469 * c-common.c (c_parse_error): Add rich_location * param, using it
4470 rather implicitly using input_location.
4471 * c-common.h (c_parse_error): Add rich_location * param.
4472
30af3a2b
MP
44732017-08-09 Marek Polacek <polacek@redhat.com>
4474
4475 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4476 (c_common_truthvalue_conversion): Likewise.
4477 * c-omp.c (c_finish_omp_atomic): Likewise.
4478 * c-common.h (build_binary_op): Update declaration.
4479
314e6352
ML
44802017-08-08 Martin Liska <mliska@suse.cz>
4481
4482 * c-ada-spec.c: Include header files.
4483 * c-ubsan.c: Likewise.
4484 * c-warn.c: Likewise.
4485
56b5041c
JJ
44862017-08-07 Jakub Jelinek <jakub@redhat.com>
4487
4488 PR c/69389
4489 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4490
db440138
EB
44912017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4492
4493 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4494 (print_ada_methods): Likewise.
4495 (print_ada_declaration): Likewise.
4496
577eec56
ML
44972017-08-07 Martin Liska <mliska@suse.cz>
4498
4499 * array-notation-common.c: Add new includes.
4500 * c-format.c( handle_format_attribute): Canonicalize a format
4501 function name.
4502 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4503 attribute.
4504 * c-pretty-print.c: Add new include.
4505
b854df3c
EB
45062017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4507
4508 * c-ada-spec.c (has_static_fields): Look only into variables.
4509 (print_constructor): Add TYPE parameter and use it for the name.
4510 (print_destructor): Likewise.
4511 (print_ada_declaration): Adjust to new constructor/destructor names.
4512 Adjust calls to print_constructor and print_destructor.
4513 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4514 Look only into variables in the final loop.
4515
9f2cb25e
EB
45162017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4517
4518 * c-ada-spec.c (has_static_fields): Look only into fields.
4519 (dump_generic_ada_node): Small tweak.
4520 (dump_nested_types): Look only into fields.
4521 (print_ada_declaration): Look only into methods. Small tweak.
4522 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4523
f4bcd9eb
EB
45242017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4525
4526 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4527 (dump_ada_function_declaration): Likewise.
4528 (dump_generic_ada_node): Likewise.
4529 (print_ada_declaration): Add support for const-qualified variables.
4530
f34ebeb2
ML
45312017-07-31 Martin Liska <mliska@suse.cz>
4532
4533 PR sanitize/81530
4534 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4535 Guard condition with flag_sanitize_p also with current_function_decl
4536 non-null equality.
4537 (ubsan_maybe_instrument_reference_or_call): Likewise.
4538
218e5d04
UB
45392017-07-30 Uros Bizjak <ubizjak@gmail.com>
4540
4541 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4542
942047f2
EB
45432017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4544
4545 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4546 for enumeral types.
4547 (print_ada_declaration): Add missing guard for record types.
4548
a40ff0ae
JJ
45492017-07-27 Jakub Jelinek <jakub@redhat.com>
4550
4551 PR c/45784
4552 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4553 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4554 new COMPOUND_EXPRs around the rhs of the comparison.
4555
06bd22f6
MP
45562017-07-27 Marek Polacek <polacek@redhat.com>
4557
4558 PR c/81417
4559 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4560 the types.
4561
036ea399
JJ
45622017-07-27 Jakub Jelinek <jakub@redhat.com>
4563
4564 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4565 (handle_noipa_attribute): New function.
4566
417ca011
TD
45672017-07-07 Torsten Duwe <duwe@suse.de>
4568
4569 * c-attribs.c (c_common_attribute_table): Add entry for
4570 "patchable_function_entry".
4571
5aaa8fb4
NS
45722017-07-20 Nathan Sidwell <nathan@acm.org>
4573
4574 Remove TYPE_METHODS.
4575 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4576 dump_ada_template, print_ada_methods,
4577 print_ada_declaration): Member fns are on TYPE_FIELDS.
4578
ff22eb12
NS
45792017-07-18 Nathan Sidwell <nathan@acm.org>
4580
4581 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4582
eea77d1f
DM
45832017-07-14 David Malcolm <dmalcolm@redhat.com>
4584
4585 * c-common.c (try_to_locate_new_include_insertion_point): New
4586 function.
4587 (per_file_includes_t): New typedef.
4588 (added_includes_t): New typedef.
4589 (added_includes): New variable.
4590 (maybe_add_include_fixit): New function.
4591 * c-common.h (maybe_add_include_fixit): New decl.
4592
281ac396
MS
45932017-07-10 Martin Sebor <msebor@redhat.com>
4594
4595 PR other/81345
4596 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4597
b6f43128
DM
45982017-07-06 David Malcolm <dmalcolm@redhat.com>
4599
4600 * c-common.c (selftest::c_family_tests): New.
4601 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4602 (selftest::c_family_tests): New decl.
4603
efbf55b0
MP
46042017-07-04 Marek Polacek <polacek@redhat.com>
4605
4606 PR c/81231
4607 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4608 types.
4609
6c86bd88
MP
46102017-07-04 Marek Polacek <polacek@redhat.com>
4611
4612 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4613
17a7218b
ML
46142017-06-28 Martin Liska <mliska@suse.cz>
4615
4616 PR ipa/81128
4617 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4618 to a function declaration.
4619
63010089
ML
46202017-06-28 Martin Liska <mliska@suse.cz>
4621
4622 PR driver/79659
4623 * c.opt: Add IntegerRange to various options.
4624
3e2becc4
MP
46252017-06-26 Marek Polacek <polacek@redhat.com>
4626
4627 PR c/80116
4628 * c-common.h (warn_for_multistatement_macros): Declare.
4629 * c-warn.c: Include "c-family/c-indentation.h".
4630 (warn_for_multistatement_macros): New function.
4631 * c.opt (Wmultistatement-macros): New option.
4632 * c-indentation.c (guard_tinfo_to_string): No longer static.
4633 Change the parameter type to "enum rid". Handle RID_SWITCH.
4634 * c-indentation.h (guard_tinfo_to_string): Declare.
4635
2db9b7cd
MG
46362017-06-23 Marc Glisse <marc.glisse@inria.fr>
4637
4638 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4639
c3684b7b
MS
46402017-06-15 Martin Sebor <msebor@redhat.com>
4641
4642 PR c++/80560
4643 * c.opt (-Wclass-memaccess): New option.
4644
e72c4afd
BK
46452017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4646
4647 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4648
8a516588
MP
46492017-06-13 Marek Polacek <polacek@redhat.com>
4650
4651 PR objc/80949
4652 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4653 branches is null.
4654
45b2222a
ML
46552017-06-13 Martin Liska <mliska@suse.cz>
4656
4657 PR sanitize/78204
4658 * c-attribs.c (add_no_sanitize_value): New function.
4659 (handle_no_sanitize_attribute): Likewise.
4660 (handle_no_sanitize_address_attribute): Use the function.
4661 (handle_no_sanitize_thread_attribute): New function.
4662 (handle_no_address_safety_analysis_attribute): Use
4663 add_no_sanitize_value.
4664 (handle_no_sanitize_undefined_attribute): Likewise.
4665 * c-common.h: Declare new functions.
4666 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4667 (ubsan_instrument_shift): Likewise.
4668 (ubsan_instrument_bounds): Likewise.
4669 (ubsan_maybe_instrument_array_ref): Likewise.
4670 (ubsan_maybe_instrument_reference_or_call): Likewise.
4671
a01f151f
JM
46722017-06-11 Jason Merrill <jason@redhat.com>
4673
4674 * c-ada-spec.c, c-pragma.c: Use id_equal.
4675
3de4ac6d
MP
46762017-06-04 Marek Polacek <polacek@redhat.com>
4677
4678 PR c/80919
4679 * c-format.c (matching_type_p): Return false if any of the types
4680 requires structural equality.
4681
2474f48f
MS
46822017-06-02 Martin Sebor <msebor@redhat.com>
4683
4684 PR c/80892
4685 * c-warn.c (conversion_warning): Use -Wconversion for integer
4686 conversion and -Wfloat-conversion for floating one.
4687
40ffd95f
BE
46882017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4689
4690 * c.opt (Wsizeof-pointer-div): New warning option.
4691
3fa4634c
VR
46922017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4693
4694 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4695 (Wcatch-value=1): Enable by -Wall.
4696
f012c8ef
DM
46972017-05-30 David Malcolm <dmalcolm@redhat.com>
4698
4699 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4700 format_chars.
4701 * c.opt (fdiagnostics-show-template-tree): New option.
4702 (felide-type): New option.
4703
63dbcd13
VR
47042017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4705
4706 * c.opt (Wcatch-value=): New C++ warning flag.
4707
be136b5c
NS
47082017-05-24 Nathan Sidwell <nathan@acm.org>
4709
4710 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4711 const casts to avoid warning.
4712
3cd211af
MS
47132017-05-24 Martin Sebor <msebor@redhat.com>
4714
4715 PR c/80731
4716 * c-common.h (unsafe_conversion_p): Add a function argument.
4717 * c-common.c (unsafe_conversion_p): Same.
4718 Add type names and values to diagnostics.
4719 (scalar_to_vector): Adjust.
4720 * c-warn.c (constant_expression_error): Add a function argument.
4721 Add type names and values to diagnostics.
4722 (conversion_warning): Add a function argument.
4723 Add type names and values to diagnostics.
4724 (warnings_for_convert_and_check): Same.
4725
1ff7be5a
JM
47262017-05-19 Jason Merrill <jason@redhat.com>
4727
4728 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4729 enumerators.
4730
ff502317
BE
47312017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4732
4733 * c-format.c (locus): Move out of function scope,
4734 add GTY attribute.
4735
2a8a8d7b
NS
47362017-05-19 Nathan Sidwell <nathan@acm.org>
4737
4738 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4739 (c_common_parse_file): Remove class dump handling.
4740 (get_dump_info): Likewise.
4741
39aac208
RB
47422017-05-19 Richard Biener <rguenther@suse.de>
4743
4744 PR c++/80593
4745 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4746 to alias-set zero memory.
4747
6ecd2339
BE
47482017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4749
4750 * c-format.c (local_tree_type_node): Add GTY attribute.
4751
6574d78e
MP
47522017-05-18 Marek Polacek <polacek@redhat.com>
4753
4754 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4755 (c_common_fixed_point_type_for_size): Likewise.
4756 (c_common_type_for_mode): Likewise.
4757 (shorten_compare): Likewise.
4758 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4759 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4760
e3455240
MP
47612017-05-18 Marek Polacek <polacek@redhat.com>
4762
4763 * c-common.c (self_promoting_args_p): Change the return type to bool.
4764 Use false/true instead of 0/1.
4765 * c-common.h (self_promoting_args_p): Update.
4766
3fa8871b
MP
47672017-05-17 Marek Polacek <polacek@redhat.com>
4768
4769 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4770 * c-warn.c: Likewise.
4771
b42cc3ca
VV
47722017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4773
4774 Implement new C++ intrinsics __is_assignable and __is_constructible.
4775 * c-common.c (__is_assignable, __is_constructible): New.
4776 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4777
1a817418
ML
47782017-05-17 Martin Liska <mliska@suse.cz>
4779
4780 * c-common.h: Introduce dump_flags_t type and
4781 use it instead of int type.
4782 * c-gimplify.c (c_genericize): Likewise.
4783 * c-opts.c: Likewise.
4784
b2fa0a8b
MP
47852017-05-17 Marek Polacek <polacek@redhat.com>
4786
4787 * c-common.c (c_save_expr): Remove.
4788 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4789 * c-common.h (c_save_expr): Remove declaration.
4790
31c2d57d
VR
47912017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4792
4793 PR c/35441
4794 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4795 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4796 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4797 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4798 RDIV_EXPR.
4799 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4800
684f84de
MP
48012017-05-09 Marek Polacek <polacek@redhat.com>
4802
4803 PR c/80525
4804 * c-warn.c (unwrap_c_maybe_const): New.
4805 (warn_logical_operator): Call it.
4806
641da50a
NS
48072017-05-09 Nathan Sidwell <nathan@acm.org>
4808
4809 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4810 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4811
631238ac
MS
48122017-05-08 Martin Sebor <msebor@redhat.com>
4813
4814 PR translation/80280
4815 * c-format.h (struct format_flag_spec): Add new member.
4816 (T89_T): New macro.
4817 * c-format.c (local_tree_type_node): New global.
4818 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4819 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4820 (strfmon_flag_specs): Likewise.
4821 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4822 with distinct quoting properties.
4823 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4824 (flag_chars_t::validate): Add argument and handle bad quoting.
4825 (check_format_info_main): Handle quoting problems.
4826 (init_dynamic_diag_info): Simplify.
4827
49f0c04c
JM
48282017-05-08 Jason Merrill <jason@redhat.com>
4829
4830 * c-opts.c (c_common_post_options): Update defaults for
4831 flag_abi_version and flag_abi_compat_version.
4832
56d35585
DM
48332017-05-05 David Malcolm <dmalcolm@redhat.com>
4834
4835 * c-common.c (c_cpp_error): Replace report_diagnostic
4836 with diagnostic_report_diagnostic.
4837
0f2c4a8f
MS
48382017-05-04 Martin Sebor <msebor@redhat.com>
4839
4840 PR translation/80280
4841 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4842 (handle_weakref_attribute): Same.
4843
6fe63fb4
NS
48442017-05-03 Nathan Sidwell <nathan@acm.org>
4845
4846 Canonicalize canonical type hashing
4847 * c-common.c (complete_array_type): Use type_hash_canon.
4848
815d9cc6
XR
48492017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4850
92a285c1 4851 PR c++/80038
815d9cc6
XR
4852 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4853 prototype.
4854 (cilk_install_body_pedigree_operations): Likewise.
4855 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4856 detatched.
4857 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4858 (cilk_install_body_pedigree_operations): Likewise.
4859 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4860 unwrapping.
4861
f8a36447
JJ
48622017-04-27 Jakub Jelinek <jakub@redhat.com>
4863
4864 PR c++/80534
4865 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4866 flag on non-aggregate element types.
4867
7c145456
BE
48682017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4869
4870 * c-common.c (c_type_hasher, type_hash_table): Remove.
4871 (c_common_get_alias_set): Remove unreachable code.
4872 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4873
c3cbcd45
VR
48742017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4875
4876 * c.opt (Wextra-semi): New C++ warning flag.
4877
8a59d466
JJ
48782017-04-20 Jakub Jelinek <jakub@redhat.com>
4879
4880 PR middle-end/80423
4881 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4882
8487c9a5
JJ
48832017-04-18 Jakub Jelinek <jakub@redhat.com>
4884
4885 PR middle-end/79788
4886 PR middle-end/80375
4887 * c-common.c (c_common_type_for_mode): Don't handle
4888 widest_*_literal_type_node here.
4889 c_common_signed_or_unsigned_type): Likewise.
4890 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4891 to *intTI_type_node or *intDI_type_node depending on whether
4892 TImode is supported by the target or not.
4893
3ee0fb02
ML
48942017-04-10 Martin Liska <mliska@suse.cz>
4895
4896 PR sanitizer/80350
4897 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4898 doing an UBSAN check.
4899
5764ee3c
JW
49002017-04-03 Jonathan Wakely <jwakely@redhat.com>
4901
4902 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4903
6f3af356
JJ
49042017-03-31 Jakub Jelinek <jakub@redhat.com>
4905
4906 PR c++/79572
4907 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4908 tree *.
4909 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4910 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4911 REFERENCE_TYPE.
4912
f6a7a9d5
DM
49132017-03-31 David Malcolm <dmalcolm@redhat.com>
4914
4915 PR documentation/78732
4916 * c.opt (Wendif-labels): Fix description to refer to
4917 #else rather than #elif.
4918
af88f557
JJ
49192017-03-31 Jakub Jelinek <jakub@redhat.com>
4920
4921 PR libstdc++/80251
4922 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4923 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4924
a9e4a1a5
JJ
49252017-03-27 Jakub Jelinek <jakub@redhat.com>
4926
4927 PR middle-end/80162
4928 * c-common.c (c_common_mark_addressable_vec): Don't set
4929 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4930
3f01b620
MS
49312017-03-21 Martin Sebor <msebor@redhat.com>
4932
4933 PR c++/79548
4934 * c-common.c (set_underlying_type): Mark type used only when
4935 original del is declared unused.
4936
2f6f187a
DM
49372017-03-10 David Malcolm <dmalcolm@redhat.com>
4938
4939 PR translation/79848
4940 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4941 "%qs".
4942
a02fa805
DM
49432017-03-10 David Malcolm <dmalcolm@redhat.com>
4944
4945 PR c/79921
4946 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4947 from inform's message, so that xgettext can locate it.
4948
822a132c
MP
49492017-03-09 Marek Polacek <polacek@redhat.com>
4950
4951 PR c++/79962
4952 PR c++/79984
4953 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4954 conversion to the attribute list.
4955
bba81f1c
ML
49562017-03-09 Martin Liska <mliska@suse.cz>
4957
4958 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4959
108154ff
JM
49602017-03-03 Jason Merrill <jason@redhat.com>
4961
4962 * c.opt (Wnoexcept-type): New.
4963
eb0e7c34
RB
49642017-03-02 Richard Biener <rguenther@suse.de>
4965
4966 PR c/79756
4967 * c-common.c (c_common_mark_addressable_vec): Look through
4968 C_MAYBE_CONST_EXPR.
4969
9453ba0a
ML
49702017-02-28 Martin Liska <mliska@suse.cz>
4971
4972 * c.opt: Replace space with tabular for options of <number>
4973 type.
4974
6a825afe
ML
49752017-02-28 Martin Liska <mliska@suse.cz>
4976
4977 * c.opt: Fix --help=option -Q for options which are of
4978 an enum type.
4979
4227c9ad
JJ
49802017-02-24 Jakub Jelinek <jakub@redhat.com>
4981
4982 PR c++/79588
4983 * c-common.c (check_function_restrict): New function.
4984 (check_function_arguments): Add FNDECL argument. Call
4985 check_function_restrict if -Wrestrict.
4986 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4987 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4988 * c-common.h (check_function_arguments): Add FNDECL argument.
4989 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4990
59909673
EB
49912017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4992
4993 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4994 treatment of parameters with pointer-to-tagged type and tidy up.
4995 (print_ada_methods): Remove the special treatment of C++ static member
4996 functions.
4997
54dcd526
ML
49982017-02-22 Martin Liska <mliska@suse.cz>
4999
5000 * c.opt: Replace inequality signs with square brackets
5001 for -Wnornalized.
5002
00bc9de3
JJ
50032017-02-21 Jakub Jelinek <jakub@redhat.com>
5004
5005 PR c++/79641
5006 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5007 preserve quals.
5008
97fcf744
JM
50092017-02-17 Joseph Myers <joseph@codesourcery.com>
5010
5011 * c-cppbuiltin.c (builtin_define_float_constants): Define
5012 __DECIMAL_DIG__ to the value for long double.
5013
c7545f1c
MP
50142017-02-15 Marek Polacek <polacek@redhat.com>
5015
5016 PR c/79515
5017 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5018 conversion has occured.
5019
c2e84327
DM
50202017-01-24 David Malcolm <dmalcolm@redhat.com>
5021
5022 * c-common.c (c_common_reswords): Add "__RTL".
5023 * c-common.h (enum rid): Add RID_RTL.
5024
2ebd93e1
MP
50252017-01-20 Marek Polacek <polacek@redhat.com>
5026
5027 PR c/64279
5028 * c-common.h (do_warn_duplicated_branches_r): Declare.
5029 * c-gimplify.c (c_genericize): Walk the function tree calling
5030 do_warn_duplicated_branches_r.
5031 * c-warn.c (expr_from_macro_expansion_r): New.
5032 (do_warn_duplicated_branches): New.
5033 (do_warn_duplicated_branches_r): New.
5034 * c.opt (Wduplicated-branches): New option.
5035
0d80ab91
DM
50362017-01-17 David Malcolm <dmalcolm@redhat.com>
5037
5038 PR c++/71497
5039 * c-indentation.c (warn_for_misleading_indentation): Use the past
5040 subjunctive in the note.
5041
7f991c36
AH
50422017-01-17 Aldy Hernandez <aldyh@redhat.com>
5043
5044 PR c/79116
5045 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5046 start type to integer_type.
5047
1c70261c
JJ
50482017-01-16 Jakub Jelinek <jakub@redhat.com>
5049
5050 PR driver/49726
5051 * c.opt (gen-decls): Add Driver flag.
5052
1ddca3f3
PC
50532017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5054
5055 Revert:
5056 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5057
5058 PR c++/71737
5059 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5060
7d2f3f1d
PC
50612017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5062
5063 PR c++/71737
5064 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5065
bce6f760
MS
50662017-01-12 Martin Sebor <msebor@redhat.com>
5067
5068 (-Wformat-overflow): ...to this.
5069
bf5fbf46
MS
50702017-01-11 Martin Sebor <msebor@redhat.com>
5071
5072 PR c/78768
5073 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5074 Also enable for LTO.
5075
e363df3f
JM
50762017-01-10 Jason Merrill <jason@redhat.com>
5077
5078 Implement P0195R2, C++17 variadic using.
5079 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5080
bd2c6270
JJ
50812017-01-09 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR translation/79019
5084 PR translation/79020
5085 * c.opt (Wnormalized=): Fix typo in description.
5086
efcc8d38
MS
50872017-01-08 Martin Sebor <msebor@redhat.com>
5088
5089 PR middle-end/77708
5090 * c.opt (-Wformat-truncation): New option.
5091
ab20d992 50922017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5093
5094 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5095 value to unsigned short to fit in 4 hex digits without
5096 warnings.
5097
4e89adf9
EB
50982017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5099
5100 * c.opt (fsso-struct): Add 'native' value.
5101
cd445b54
ML
51022017-01-05 Martin Liska <mliska@suse.cz>
5103
5104 PR pch/78970
5105 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5106 header.
5107
a9342885
MP
51082017-01-04 Marek Polacek <polacek@redhat.com>
5109
5110 PR c++/64767
5111 * c.opt (Wpointer-compare): New option.
5112
fc73e60c
JJ
51132017-01-04 Jakub Jelinek <jakub@redhat.com>
5114
5115 PR driver/78957
5116 * c.opt (fsso-struct=): Add RejectNegative.
5117
cbe34bb5
JJ
51182017-01-01 Jakub Jelinek <jakub@redhat.com>
5119
5120 Update copyright years.
5121
d4a6c0ea
ML
51222016-12-29 Martin Liska <mliska@suse.cz>
5123
5124 PR c/78933
5125 * c.opt (strong-eval-order): Add RejectNegative keyword.
5126
67a5ad7c
JM
51272016-12-22 Jason Merrill <jason@redhat.com>
5128
5129 Implement P0522R0, matching of template template arguments.
5130 * c-cppbuiltin.c (c_cpp_builtins): Define
5131 __cpp_template_template_args.
5132
0dba7960
JJ
51332016-12-21 Jakub Jelinek <jakub@redhat.com>
5134
5135 PR bootstrap/78817
5136 * c-common.c (struct nonnull_arg_ctx): New type.
5137 (check_function_nonnull): Return bool instead of void. Use
5138 nonnull_arg_ctx as context rather than just location_t.
5139 (check_nonnull_arg): Adjust for the new context type, set
5140 warned_p to true if a warning has been diagnosed.
5141 (check_function_arguments): Return bool instead of void.
5142 * c-common.h (check_function_arguments): Adjust prototype.
5143
31bfc9b9
JM
51442016-12-21 Jason Merrill <jason@redhat.com>
5145
5146 * c.opt (-fnew-ttp-matching): New flag.
5147 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5148
629b3d75
MJ
51492016-12-14 Martin Jambor <mjambor@suse.cz>
5150
5151 * c-omp.c: Include omp-general.h instead of omp-low.h.
5152 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5153 name.
5154
474da67e
MS
51552016-12-14 Martin Sebor <msebor@redhat.com>
5156
5157 PR c/17308
5158 * c-common.c (check_nonnull_arg): Disable when optimization
5159 is enabled.
5160
fe366b87
MP
51612016-12-12 Marek Polacek <polacek@redhat.com>
5162
5163 PR c++/78647
5164 * c-common.c (attribute_fallthrough_p): Return false for
5165 error_mark_node.
5166
8bd9f164
MS
51672016-12-08 Martin Sebor <msebor@redhat.com>
5168
5169 PR c/78284
5170 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5171
060162e0
MS
51722016-12-08 Martin Sebor <msebor@redhat.com>
5173
5174 PR c/78165
92a285c1
ML
5175 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5176 suffix.
060162e0 5177
ee92e7ba
MS
51782016-12-07 Martin Sebor <msebor@redhat.com>
5179
5180 PR c/53562
5181 PR middle-end/77784
5182 PR middle-end/78149
5183 PR middle-end/78138
5184 * c.opt (-Wstringop-overflow): New option.
5185
84b0769e
MO
51862016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5187
5188 * c-attribs.c (asan odr indicator): New attribute.
5189 (handle_asan_odr_indicator_attribute): New function.
5190
7fa6a965
PK
51912016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5192
5193 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5194 ptrdiff_type_node;
5195
56d8ffc1
JG
51962016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5197
5198 * c-common.c (excess_precision_mode_join): New.
5199 (c_ts18661_flt_eval_method): New.
5200 (c_c11_flt_eval_method): Likewise.
5201 (c_flt_eval_method): Likewise.
5202 * c-common.h (excess_precision_mode_join): New.
5203 (c_flt_eval_method): Likewise.
5204 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5205 (cpp_iec_559_value): Call it.
5206 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5207 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5208 __FLT_EVAL_METHOD_TS_18661_3__.
5209
04f0fcf7
JG
52102016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5211
5212 * c-opts.c (c_common_post_options): Add logic to handle the default
5213 case for -fpermitted-flt-eval-methods.
5214
fb2675cb
PB
52152016-11-23 Paolo Bonzini <bonzini@gnu.org>
5216
5217 * c.opt (Wexpansion-to-defined): New.
5218
ec1c5694
JJ
52192016-11-23 Jakub Jelinek <jakub@redhat.com>
5220
5221 PR target/78451
5222 * c-pragma.c (handle_pragma_target): Don't replace
5223 current_target_pragma, but chainon the new args to the current one.
5224
730c9e75
NS
52252016-11-22 Nathan Sidwell <nathan@acm.org>
5226
5227 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5228 indentation and formatting.
730c9e75 5229
89990732
MS
52302016-11-21 Martin Sebor <msebor@redhat.com>
5231
5232 * c.opt (-fprintf-return-value): Enable by default.
5233
48330c93
BE
52342016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5235
5236 PR c++/71973
5237 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5238 * c-common.c (c_common_nodes_and_builtins): Initialize
5239 const_tm_ptr_type_node.
5240
0d939c95
MP
52412016-11-16 Marek Polacek <polacek@redhat.com>
5242
5243 PR c/78285
5244 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5245
8e745a17
JJ
52462016-11-14 Jakub Jelinek <jakub@redhat.com>
5247
5248 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5249
1ee62b92 52502016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5251 Richard Biener <rguenther@suse.de>
5252
5253 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5254 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5255 * c.opt (fgimple): New option.
1ee62b92 5256
22b15758
UB
52572016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5258
5259 PR c/35503
5260 * c-common.h (warn_for_restrict): Declare.
5261 * c-warn.c: Include gcc-rich-location.h.
5262 (warn_for_restrict): New function.
5263 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5264 (gcc_cdiag_char_table): Likewise.
5265 (gcc_cxxdiag_char_table): Likewise.
5266 * c.opt (Wrestrict): New option.
5267
4be719cd
EB
52682016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5269
5270 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5271 for nested types only if the type is a record or union and dump SLOC.
5272
4a826ca6
JM
52732016-11-09 Jason Merrill <jason@redhat.com>
5274
5275 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5276
2e955d50
JJ
52772016-11-09 Jakub Jelinek <jakub@redhat.com>
5278
5279 * c-ubsan.c (ubsan_instrument_shift): Handle split
5280 -fsanitize=shift-base and -fsanitize=shift-exponent.
5281
51dc6603
JM
52822016-11-07 Jason Merrill <jason@redhat.com>
5283
5284 * c.opt (Wc++1z-compat): New.
5285 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5286
6dc4a604
ML
52872016-11-07 Martin Liska <mliska@suse.cz>
5288
5289 * c-warn.c (warn_for_unused_label): Save all labels used
5290 in goto or in &label.
5291
b302001e
JM
52922016-11-03 Jason Merrill <jason@redhat.com>
5293
5294 * c-cppbuiltin.c (c_cpp_builtins): Correct
5295 __cpp_inheriting_constructors.
5296
31f7f784
JM
52972016-11-01 Jason Merrill <jason@redhat.com>
5298
2bc78e3c
JM
5299 * c-cppbuiltin.c (c_cpp_builtins): Update
5300 __cpp_inheriting_constructors.
5301
31f7f784
JM
5302 * c.opt (-fnew-inheriting-ctors): New.
5303 * c-opts.c: Default to on for ABI 11+.
5304
dcb466ec
JJ
53052016-10-31 Jakub Jelinek <jakub@redhat.com>
5306
5307 PR c++/77948
5308 * c.opt (fext-numeric-literals): Add Var and Init.
5309 * c-opts.c (c_common_handle_option): Don't clear
5310 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5311 (c_common_post_options): Clear it here if not set
5312 explicitly.
5313
52e1b91e
AH
53142016-10-28 Aldy Hernandez <aldyh@redhat.com>
5315
5316 PR debug/77773
5317 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5318 if NULL.
5319
e16f1cc7
JJ
53202016-10-25 Jakub Jelinek <jakub@redhat.com>
5321
5322 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5323 * c-common.c (c_common_reswords): Add __builtin_launder.
5324
f8348061
BE
53252016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5326
5327 * c-common.c (c_common_truthvalue_conversion): Warn for
5328 multiplications in boolean context. Fix the quoting of '<<' and '<'
5329 in the shift warning.
5330
eff89e01
BE
53312016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5332
5333 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5334
24bc7bf4
JM
53352016-10-20 Jason Merrill <jason@redhat.com>
5336
5337 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5338
4c712374
BE
53392016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5340
5341 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5342 integer shift ops in boolean context.
5343
53442016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5345
5346 * c.opt (Walloca): New.
5347 (Walloca-larger-than=): New.
5348 (Wvla-larger-than=): New.
5349
8fa18c06
MP
53502016-10-17 Marek Polacek <polacek@redhat.com>
5351
5352 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5353 Return immediately when finding a match.
5354 (warn_tautological_cmp): Remove a boolean variable that is no longer
5355 needed.
5356
b12b1915
MP
53572016-10-17 Marek Polacek <polacek@redhat.com>
5358
5359 * c-attribs.c: New file.
5360 * c-common.c: Move attributes handling to c-attribs.c.
5361 (get_nonnull_operand): No longer static.
5362 * c-common.h: Move the declarations from c-attribs.c to its own section.
5363
2045acd9
JM
53642016-10-14 Jason Merrill <jason@redhat.com>
5365
5366 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5367 and __cpp_deduction_guides.
5368
14a2c9aa
JM
53692016-10-13 Jason Merrill <jason@redhat.com>
5370
5371 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5372
4d0cdd0c
TP
53732016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5374
5375 * c-cppbuiltin.c: Include memmodel.h.
5376 * c-opts.c: Likewise.
5377 * c-pragma.c: Likewise.
5378 * c-warn.c: Likewise.
5379
70f6d5e1
JJ
53802016-10-12 Jakub Jelinek <jakub@redhat.com>
5381
5382 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5383 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5384 * c-opts.c (sanitize_cpp_opts): Initialize
5385 cpp_opts->cpp_warn_implicit_fallthrough.
5386
78f61294
MP
53872016-10-11 Marek Polacek <polacek@redhat.com>
5388
5389 * c-common.c (warning_candidate_p): Change the return type to bool
5390 and return true/false instead of 1/0.
5391 (vector_mode_valid_p): Likewise.
5392
038b5cc0
MP
53932016-10-11 Marek Polacek <polacek@redhat.com>
5394
5395 * c-common.c (fold_for_warn): No longer static.
5396 (bool_promoted_to_int_p): Likewise.
5397 (c_common_get_narrower): Likewise.
5398 (constant_expression_warning): Move to c-warn.c.
5399 (constant_expression_error): Likewise.
5400 (overflow_warning): Likewise.
5401 (warn_logical_operator): Likewise.
5402 (find_array_ref_with_const_idx_r): Likewise.
5403 (warn_tautological_cmp): Likewise.
5404 (expr_has_boolean_operands_p): Likewise.
5405 (warn_logical_not_parentheses): Likewise.
5406 (warn_if_unused_value): Likewise.
5407 (strict_aliasing_warning): Likewise.
5408 (sizeof_pointer_memaccess_warning): Likewise.
5409 (check_main_parameter_types): Likewise.
5410 (conversion_warning): Likewise.
5411 (warnings_for_convert_and_check): Likewise.
5412 (match_case_to_enum_1): Likewise.
5413 (match_case_to_enum): Likewise.
5414 (c_do_switch_warnings): Likewise.
5415 (warn_for_omitted_condop): Likewise.
5416 (readonly_error): Likewise.
5417 (lvalue_error): Likewise.
5418 (invalid_indirection_error): Likewise.
5419 (warn_array_subscript_with_type_char): Likewise.
5420 (warn_about_parentheses): Likewise.
5421 (warn_for_unused_label): Likewise.
5422 (warn_for_div_by_zero): Likewise.
5423 (warn_for_memset): Likewise.
5424 (warn_for_sign_compare): Likewise.
5425 (do_warn_double_promotion): Likewise.
5426 (do_warn_unused_parameter): Likewise.
5427 (record_locally_defined_typedef): Likewise.
5428 (maybe_record_typedef_use): Likewise.
5429 (maybe_warn_unused_local_typedefs): Likewise.
5430 (maybe_warn_bool_compare): Likewise.
5431 (maybe_warn_shift_overflow): Likewise.
5432 (warn_duplicated_cond_add_or_warn): Likewise.
5433 (diagnose_mismatched_attributes): Likewise.
5434 * c-common.h: Move the declarations from c-warn.c to its own section.
5435 * c-warn.c: New file.
5436
627be19f
JM
54372016-10-08 Jason Merrill <jason@redhat.com>
5438
5439 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5440 into COND_EXPR in C++.
5441
7bad794a
JJ
54422016-10-08 Jakub Jelinek <jakub@redhat.com>
5443
5444 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5445 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5446 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5447
be845b04
JJ
54482016-10-07 Jakub Jelinek <jakub@redhat.com>
5449
5450 Implement LWG2296 helper intrinsic
5451 * c-common.h (enum rid): Add RID_ADDRESSOF.
5452 * c-common.c (c_common_reswords): Add __builtin_addressof.
5453
c09c4992
BE
54542016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5455
5456 PR c++/77700
5457 * c-common.c (c_common_truthvalue_conversion): Warn also for
5458 suspicious enum values in boolean context.
5459
342cfb3e
JJ
54602016-10-06 Jakub Jelinek <jakub@redhat.com>
5461
5462 Implement P0258R2 - helper for C++17
5463 std::has_unique_object_representations trait
5464 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5465 * c-common.c (c_common_reswords): Add
5466 __has_unique_object_representations.
5467
2e69f143
JJ
54682016-10-05 Jakub Jelinek <jakub@redhat.com>
5469
5470 PR sanitizer/66343
5471 * c-ubsan.c (ubsan_instrument_return): Don't call
5472 initialize_sanitizer_builtins here.
5473
700fff34
BE
54742016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5475
5476 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5477 conditional expression in boolean context when only one arm is
5478 non-boolean.
5479
9563bfcd
JJ
54802016-10-05 Jakub Jelinek <jakub@redhat.com>
5481
04a32443
JJ
5482 PR sanitizer/77823
5483 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5484 is not integral.
5485
9563bfcd
JJ
5486 * c-common.c (c_common_reswords): Update comment for C++11.
5487
f1644724
JM
54882016-10-04 Jason Merrill <jason@redhat.com>
5489
5490 * c-common.c (make_tree_vector_from_ctor): New.
5491 * c-common.h: Declare it.
5492
5a79befb
JJ
54932016-10-04 Jakub Jelinek <jakub@redhat.com>
5494
5495 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5496 __LIBGCC_JCR_SECTION_NAME__.
5497
1633d3b9
BE
54982016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5499
5500 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5501 left shift in boolean context.
5502
a2c6e7f2
JJ
55032016-09-29 Jakub Jelinek <jakub@redhat.com>
5504
5505 Implement P0001R1 - C++17 removal of register storage class specifier
5506 * c.opt (Wregister): New warning.
5507 * c-opts.c (c_common_post_options): Enable -Wregister by
5508 default for C++17.
5509
75304c87
JG
55102016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5511
5512 * c-opts.c (c_common_post_options): Remove special case for
5513 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5514 in C++.
5515
bbfac6da
JJ
55162016-09-27 Jakub Jelinek <jakub@redhat.com>
5517
6e39060a
JJ
5518 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5519 -std=c++1z.
5520
bbfac6da
JJ
5521 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5522
e73cf9a2
TP
55232016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5524
5525 * c-common.c: Include memmodel.h.
5526
c6147dc4
MP
55272016-09-26 Marek Polacek <polacek@redhat.com>
5528
5529 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5530
81fea426
MP
55312016-09-26 Marek Polacek <polacek@redhat.com>
5532
5533 PR c/7652
5534 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5535 (handle_fallthrough_attribute): New function.
5536 (attribute_fallthrough_p): New function.
5537 * c-common.h (attribute_fallthrough_p): Declare.
5538
9a2300e9
MP
55392016-09-24 Marek Polacek <polacek@redhat.com>
5540
5541 PR c/77490
5542 * c.opt (Wbool-operation): New.
5543
a09e9e35
BE
55442016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5545
5546 * c-common.c (c_common_truthvalue_conversion): Inhibit
5547 Wint-in-bool-context warning with from_macro_definition_at.
5548 Mention the expression will always evaluate to true.
5549
d43b4ccc
MS
55502016-09-21 Martin Sebor <msebor@redhat.com>
5551
5552 PR bootstrap/77676
5553 * c.opt (fprintf-return-value): Temporarily initialize to zero
5554 to unblock bootstrap failures.
5555
2e1c20b1
JJ
55562016-09-21 Jakub Jelinek <jakub@redhat.com>
5557
5558 PR c++/77651
5559 * c.opt (Waligned-new=): Add RejectNegative.
5560 (faligned-new=): Likewise. Spelling fix - change
5561 aligned_new_threshhold to aligned_new_threshold.
5562 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5563 to aligned_new_threshold.
5564
88d0c3f0
MS
55652016-09-20 Martin Sebor <msebor@redhat.com>
5566
5567 PR middle-end/49905
5568 * c.opt: Add -Wformat-length and -fprintf-return-value.
5569
144a96e4
BE
55702016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5571
5572 PR c++/77434
5573 * c.opt (Wint-in-bool-context): New warning.
5574 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5575 constants in boolean context.
5576
63012d9a
JM
55772016-09-19 Joseph Myers <joseph@codesourcery.com>
5578
5579 * c-common.c (max_align_t_align): Also consider alignment of
5580 float128_type_node.
5581
931388ce
JM
55822016-09-15 Jason Merrill <jason@redhat.com>
5583
5584 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5585 DECL_EXTERNAL.
5586
38711381
JM
55872016-09-14 Jason Merrill <jason@redhat.com>
5588
5589 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5590 limit FIELD_DECL, either.
5591
e51fbec3
MP
55922016-09-14 Marek Polacek <polacek@redhat.com>
5593
5594 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5595 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5596 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5597
254830ba
DM
55982016-09-13 David Malcolm <dmalcolm@redhat.com>
5599
5600 * c-common.c (warn_logical_not_parentheses): Replace
5601 rich_location::add_fixit_insert calls with add_fixit_insert_before
5602 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5603
42763690
JM
56042016-09-13 Jason Merrill <jason@redhat.com>
5605 Tom de Vries <tom@codesourcery.com>
5606
5607 PR c++/77427
5608 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5609
9453eee9
JM
56102016-09-13 Jason Merrill <jason@redhat.com>
5611
5612 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5613 limit types at all.
5614
e96809e3
JM
56152016-09-12 Jason Merrill <jason@redhat.com>
5616
5617 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5618 bit/byte confusion, allow large alignment for types.
5619
54dcdb88
BE
56202016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5621
5622 PR c++/77496
5623 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5624
d1463eb9
DM
56252016-09-12 David Malcolm <dmalcolm@redhat.com>
5626
5627 PR c/72858
5628 * c-format.c (argument_parser::check_argument_type): Add params
5629 "type_start" and "conversion_char". Use the former to generate
5630 offset_to_type_start and pass it and conversion_char to
5631 check_format_types.
5632 (check_format_info_main): Capture the start of the type
5633 information as "type_start", and pass it an format_char
5634 to arg_parser.check_argument_type.
5635 (check_format_types): Provide an example in the leading comment.
5636 Add params "offset_to_type_start" and "conversion_char"; pass
5637 them to format_type_warning calls.
5638 (test_get_modifier_for_format_len): Likewise.
5639 (matching_type_p): New function.
5640 (get_format_for_type): Add param "conversion_char" and move
5641 implementation into...
5642 (get_format_for_type_1): ...new function, called twice.
5643 Use new function matching_type_p rather than checking for
5644 TYPE_CANONICAL equality.
5645 (get_corrected_substring): New function.
5646 (format_type_warning): Provide an example in the leading comment.
5647 Add params "offset_to_type_start" and "conversion_char". Replace
5648 call to get_format_for_type with call to get_corrected_substring
5649 and move rejection of hints for widths/precisions there.
5650 (assert_format_for_type_streq): Add param "conversion_char".
5651 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5652 (test_get_format_for_type_printf): Add conversion chars to the
5653 tests, adding coverage for various combinations of integer
5654 vs double conversions, and for preserving octal and hexadecimal
5655 conversions.
5656 (test_get_format_for_type_scanf): Add conversion chars to the
5657 tests.
5658
5b28efbb
TV
56592016-09-10 Tom de Vries <tom@codesourcery.com>
5660
5661 PR C/71602
5662 * c-common.c (build_va_arg): Handle more strict
5663 targetm.canonical_va_list_type. Replace first argument type error with
5664 assert.
5665
3f0177e7
MS
56662016-09-09 Martin Sebor <msebor@redhat.com>
5667
5668 PR c/77520
5669 PR c/77521
5670 * c-format.c (argument_parser::find_format_char_info): Use %qc
5671 format directive unconditionally.
5672
af63ba4b
JM
56732016-09-09 Jason Merrill <jason@redhat.com>
5674
5675 Implement C++17 new of over-aligned types.
5676 * c.opt: Add -faligned-new and -Waligned-new.
5677 * c-common.c (max_align_t_align): Split out from...
5678 (cxx_fundamental_alignment_p): ...here.
5679 * c-common.h: Declare it.
5680 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5681
c65248cb
JM
56822016-09-09 Joseph Myers <joseph@codesourcery.com>
5683
5684 * c-cppbuiltin.c (builtin_define_type_width): New function.
5685 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5686 macros.
5687
e5106e27
DM
56882016-09-07 David Malcolm <dmalcolm@redhat.com>
5689
5690 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5691 a POINTER_TYPE.
5692 (substring_loc::get_location): Move to substring-locations.c,
5693 keeping implementation as...
5694 (c_get_substring_location): New function, from the above, reworked
5695 to use accessors rather than member lookup.
5696 * c-common.h (class substring_loc): Move to substring-locations.h,
5697 replacing with a forward decl.
5698 (c_get_substring_location): New decl.
5699 * c-format.c: Include "substring-locations.h".
5700 (format_warning_va): Move to substring-locations.c.
5701 (format_warning_at_substring): Likewise.
5702
ab20d992 57032016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5704
5705 PR c/77336
5706 * c-format.c (check_function_format): Avoid issuing warnings for
5707 functions unless they call format functions with non-constant
5708 format strings.
5709
b772a565
RB
57102016-09-06 Richard Biener <rguenther@suse.de>
5711
5712 PR c/77450
5713 * c-common.c (c_common_mark_addressable_vec): Handle
5714 COMPOUND_LITERAL_EXPR.
5715
25ff5dd3
MP
57162016-09-05 Marek Polacek <polacek@redhat.com>
5717
5718 PR c/77423
5719 * c-common.c (bool_promoted_to_int_p): New function.
5720 (expr_has_boolean_operands_p): New function.
5721 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5722 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5723
21234eb5
TV
57242016-09-04 Tom de Vries <tom@codesourcery.com>
5725
5726 revert:
5727 2016-08-29 Tom de Vries <tom@codesourcery.com>
5728
5729 * c-common.c (build_va_arg): Replace first argument type error
5730 with assert.
5731
9dc5773f
JJ
57322016-09-02 Jakub Jelinek <jakub@redhat.com>
5733
5734 PR c/65467
5735 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5736 (c_finish_omp_for): Reject _Atomic qualified iterators.
5737
57382016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5739
5740 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5741 size to guarantee it fits the output of the formatted function
5742 regardless of its arguments.
5743
295844f6
MP
57442016-09-01 Marek Polacek <polacek@redhat.com>
5745
5746 PR c/7652
5747 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5748 FALLTHRU comments.
5749
3d06b6f2
MP
57502016-08-29 Marek Polacek <polacek@redhat.com>
5751
5752 PR c/77292
5753 * c-common.c (warn_logical_not_parentheses): Don't warn for
5754 a comparison or a logical operator.
5755
34cedad5
TV
57562016-08-29 Tom de Vries <tom@codesourcery.com>
5757
5758 * c-common.c (build_va_arg): Fix type comparison assert.
5759
f162d717
TV
57602016-08-29 Tom de Vries <tom@codesourcery.com>
5761
5762 * c-common.c (build_va_arg): Replace first argument type error
5763 with assert.
5764
ba9bbd6f
TV
57652016-08-29 Tom de Vries <tom@codesourcery.com>
5766
5767 PR c/77398
5768 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5769 with error_mark_node as va_list instead of with illegal va_list.
5770
ebef225f
MP
57712016-08-25 Marek Polacek <polacek@redhat.com>
5772 David Malcolm <dmalcolm@redhat.com>
5773
5774 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5775 * c-common.h (warn_logical_not_parentheses): Update declaration.
5776
b00e6e75
MP
57772016-08-22 Marek Polacek <polacek@redhat.com>
5778
5779 PR c++/77321
5780 * c-common.c (warn_for_memset): Check type for null.
5781
6dc198e3
JM
57822016-08-22 Joseph Myers <joseph@codesourcery.com>
5783
14ec014e 5784 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5785 _FloatNx types for suffixes for built-in functions.
5786
c65699ef
JM
57872016-08-19 Joseph Myers <joseph@codesourcery.com>
5788
5789 PR c/32187
5790 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5791 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5792 (RID_FLOAT128X): New enum rid values.
5793 (CASE_RID_FLOATN_NX): New macro.
5794 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5795 keywords.
5796 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5797 corresponding complex types.
5798 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5799 _FloatNx and corresponding complex types.
5800 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5801 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5802 and _FloatNx types for the widest type for determining
5803 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5804 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5805 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5806 and _FloatNx types.
5807 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5808 constants.
5809 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5810 _FloatNx types.
5811
cc015f3a
DM
58122016-08-18 David Malcolm <dmalcolm@redhat.com>
5813
5814 * c-opts.c (c_diagnostic_finalizer): Update for change to
5815 diagnostic_show_locus.
5816
cb18fd07
DM
58172016-08-18 David Malcolm <dmalcolm@redhat.com>
5818
5819 * c-common.c: Include "spellcheck.h".
5820 (cb_get_suggestion): New function.
5821 * c-common.h (cb_get_suggestion): New decl.
5822 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5823 cb_get_suggestion.
5824
a76989dc
MP
58252016-08-18 Marek Polacek <polacek@redhat.com>
5826
5827 PR c/71514
5828 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5829 and pointer-to-VLA.
5830
65e736c0
DM
58312016-08-16 David Malcolm <dmalcolm@redhat.com>
5832
5833 PR c/72857
5834 * c-common.c (substring_loc::get_range): Rename to...
5835 (substring_loc::get_location): ...this, converting param from a
5836 source_range * to a location_t *. Call
5837 get_source_location_for_substring rather than
5838 get_source_range_for_substring, and pass in m_caret_idx.
5839 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5840 (substring_loc::get_range): Replace with...
5841 (substring_loc::get_location): ...this.
5842 (substring_loc::set_caret_index): New method.
5843 (substring_loc): Add field m_caret_idx.
5844 * c-format.c (format_warning_va): Update for above changes.
5845 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5846 clashing with type name.
5847 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5848 (check_argument_type): Likewise.
5849 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5850 Use a copy when emitting warnings, setting the caret index from TYPE.
5851
7e1dde14 58522016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5853 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5854
5855 * c-ada-spec.c (dump_number): New function.
5856 (handle_escape_character): Likewise.
5857 (print_ada_macros): Add handling of constant integers and strings.
5858
191816a3
MP
58592016-08-12 Marek Polacek <polacek@redhat.com>
5860
5861 PR c/7652
5862 * c-common.c (scalar_to_vector): Adjust fall through comment.
5863 * c-opts.c (c_common_handle_option): Likewise.
5864 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5865 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5866 fall through comment.
5867 * cilk.c (extract_free_variables): Add FALLTHRU.
5868
452df4a4
JM
58692016-08-10 Jason Merrill <jason@redhat.com>
5870
5871 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5872
f3365c12
JM
58732016-08-09 Jason Merrill <jason@redhat.com>
5874
5875 * c-common.c (c_common_attribute_table): vector_size affects type
5876 identity.
5877
f0bc3323
MP
58782016-08-09 Marek Polacek <polacek@redhat.com>
5879
5880 PR c/7652
5881 * c-ada-spec.c (dump_generic_ada_node): Add return.
5882
98e5a19a
JM
58832016-08-09 Jason Merrill <jason@redhat.com>
5884
5885 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5886 C++17 constexpr lambdas.
5887
895aa8e1
DM
58882016-08-08 David Malcolm <dmalcolm@redhat.com>
5889
5890 PR c/64955
5891 * c-common.h (selftest::c_format_c_tests): New declaration.
5892 (selftest::run_c_tests): New declaration.
5893 * c-format.c: Include "selftest.h.
5894 (format_warning_va): Add param "corrected_substring" and use
5895 it to add a replacement fix-it hint.
5896 (format_warning_at_substring): Likewise.
5897 (format_warning_at_char): Update for new param of
5898 format_warning_va.
5899 (argument_parser::check_argument_type): Pass "fki" to
5900 check_format_types.
5901 (check_format_types): Add param "fki" and pass it to
5902 format_type_warning.
5903 (deref_n_times): New function.
5904 (get_modifier_for_format_len): New function.
5905 (selftest::test_get_modifier_for_format_len): New function.
5906 (get_format_for_type): New function.
5907 (format_type_warning): Add param "fki" and use it to attempt
5908 to provide hints for argument types when calling
5909 format_warning_at_substring.
5910 (selftest::get_info): New function.
5911 (selftest::assert_format_for_type_streq): New function.
5912 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5913 (selftest::test_get_format_for_type_printf): New function.
5914 (selftest::test_get_format_for_type_scanf): New function.
5915 (selftest::c_format_c_tests): New function.
5916
e52ed3fe
DM
59172016-08-08 David Malcolm <dmalcolm@redhat.com>
5918
5919 PR c/52952
5920 * c-format.c: Include "diagnostic.h".
5921 (location_column_from_byte_offset): Delete.
5922 (location_from_offset): Delete.
5923 (format_warning_va): New function.
5924 (format_warning_at_substring): New function.
5925 (format_warning_at_char): New function.
5926 (check_format_arg): Capture location of format_tree and pass to
5927 check_format_info_main.
5928 (argument_parser): Add fields "start_of_this_format" and
5929 "format_string_cst".
5930 (flag_chars_t::validate): Add param "format_string_cst". Convert
5931 warning_at call using location_from_offset to call to
5932 format_warning_at_char.
5933 (argument_parser::argument_parser): Add param "format_string_cst_"
5934 and use use it to initialize field "format_string_cst".
5935 Initialize new field "start_of_this_format".
5936 (argument_parser::read_format_flags): Convert warning_at call
5937 using location_from_offset to a call to format_warning_at_char.
5938 (argument_parser::read_any_format_left_precision): Likewise.
5939 (argument_parser::read_any_format_precision): Likewise.
5940 (argument_parser::read_any_other_modifier): Likewise.
5941 (argument_parser::find_format_char_info): Likewise, in three places.
5942 (argument_parser::parse_any_scan_set): Likewise, in one place.
5943 (argument_parser::handle_conversions): Likewise, in two places.
5944 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5945 and use it to make a substring_loc. Pass the latter to
5946 check_format_types.
5947 (check_format_info_main): Add params "fmt_param_loc" and
5948 "format_string_cst". Convert warning_at calls using
5949 location_from_offset to calls to format_warning_at_char. Pass the
5950 new params to the arg_parser ctor. Pass "format_string_cst" to
5951 flag_chars.validate. Pass "fmt_param_loc" to
5952 arg_parser.check_argument_type.
5953 (check_format_types): Convert first param from a location_t
5954 to a const substring_loc & and rename to "fmt_loc". Attempt
5955 to extract the range of the relevant parameter and pass it
5956 to format_type_warning.
5957 (format_type_warning): Convert first param from a location_t
5958 to a const substring_loc & and rename to "fmt_loc". Add
5959 params "param_range" and "type". Replace calls to warning_at
5960 with calls to format_warning_at_substring.
5961
1c4d457e
DM
59622016-08-08 David Malcolm <dmalcolm@redhat.com>
5963
5964 * c-format.c (class flag_chars_t): New class.
5965 (struct length_modifier): New struct.
5966 (class argument_parser): New class.
5967 (flag_chars_t::flag_chars_t): New ctor.
5968 (flag_chars_t::has_char_p): New method.
5969 (flag_chars_t::add_char): New method.
5970 (flag_chars_t::validate): New method.
5971 (flag_chars_t::get_alloc_flag): New method.
5972 (flag_chars_t::assignment_suppression_p): New method.
5973 (argument_parser::argument_parser): New ctor.
5974 (argument_parser::read_any_dollar): New method.
5975 (argument_parser::read_format_flags): New method.
5976 (argument_parser::read_any_format_width): New method.
5977 (argument_parser::read_any_format_left_precision): New method.
5978 (argument_parser::read_any_format_precision): New method.
5979 (argument_parser::handle_alloc_chars): New method.
5980 (argument_parser::read_any_length_modifier): New method.
5981 (argument_parser::read_any_other_modifier): New method.
5982 (argument_parser::find_format_char_info): New method.
5983 (argument_parser::validate_flag_pairs): New method.
5984 (argument_parser::give_y2k_warnings): New method.
5985 (argument_parser::parse_any_scan_set): New method.
5986 (argument_parser::handle_conversions): New method.
5987 (argument_parser::check_argument_type): New method.
5988 (check_format_info_main): Introduce classes argument_parser
5989 and flag_chars_t, moving the code within the loop into methods
5990 of these classes. Make various locals "const".
5991
88fa5555
DM
59922016-08-05 David Malcolm <dmalcolm@redhat.com>
5993
5994 * c-common.c: Include "substring-locations.h".
5995 (get_cpp_ttype_from_string_type): New function.
5996 (g_string_concat_db): New global.
5997 (substring_loc::get_range): New method.
5998 * c-common.h (g_string_concat_db): New declaration.
5999 (class substring_loc): New class.
6000 * c-lex.c (lex_string): When concatenating strings, capture the
6001 locations of all tokens using a new obstack, and record the
6002 concatenation locations within g_string_concat_db.
6003 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6004 on the ggc-heap.
6005
78169471
MP
60062016-07-29 Marek Polacek <polacek@redhat.com>
6007
638fc14f
MP
6008 PR c/71926
6009 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6010 parentheses warning.
6011
78169471
MP
6012 PR c/71574
6013 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6014
1225d6b1
ML
60152016-07-28 Martin Liska <mliska@suse.cz>
6016
6017 PR gcov-profile/68025
6018 * c-common.c (handle_no_profile_instrument_function_attribute):
6019
ec1e2a40
BE
60202016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6021
6022 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6023 BITS_PER_UNIT_LOG.
6024
5ec2cd9f
JM
60252016-07-25 Jason Merrill <jason@redhat.com>
6026
6027 PR c++/65970
6028 * c.opt (fconstexpr-loop-limit): New.
6029
9dc5773f 60302016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6031
6032 PR c++/71675
6033 * c-common.c (resolve_overloaded_builtin): Avoid converting
6034 __atomic_compare_exchange_n return type to that of what its
6035 first argument points to.
6036
e3fe09c1
UB
60372016-07-22 Uros Bizjak <ubizjak@gmail.com>
6038
6039 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6040 ~(unsigned HOST_WIDE_INT) 0.
6041
bc91c436
ML
60422016-07-22 Martin Liska <mliska@suse.cz>
6043
6044 PR gcov-profile/69028
6045 PR gcov-profile/62047
6046 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6047 to the current_function_decl.
6048
451dcc66
JM
60492016-07-21 Jason Merrill <jason@redhat.com>
6050
6051 PR c++/65168
6052 * c-common.c (c_common_truthvalue_conversion): Check
6053 c_inhibit_evaluation_warnings for warning about address of
6054 reference.
6055
de6a69ee
DM
60562016-07-20 David Malcolm <dmalcolm@redhat.com>
6057
6058 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6059 const char *.
6060
d022c55a
JM
60612016-07-15 Jason Merrill <jason@redhat.com>
6062
6063 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6064
ddbbcb19
JJ
60652016-07-15 Jakub Jelinek <jakub@redhat.com>
6066
6067 PR c/71858
6068 * c-common.h (enum lookup_name_fuzzy_kind): Add
6069 FUZZY_LOOKUP_FUNCTION_NAME.
6070
d0cf395a
JM
60712016-07-08 Jason Merrill <jason@redhat.com>
6072
6073 P0145: Refining Expression Order for C++.
6074 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6075 * c-opts.c: Adjust.
6076
98d44e93
MT
60772016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6078
6079 PR c++/71214
6080 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6081
f9d8d994
TS
60822016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6083
6084 * c-pragma.h (enum pragma_kind): Rename
6085 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6086 users.
6087
4aa83879
RB
60882016-06-29 Richard Biener <rguenther@suse.de>
6089
6090 PR middle-end/71002
6091 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6092
a25bd9e6
JM
60932016-06-24 Jason Merrill <jason@redhat.com>
6094
6095 P0145R2: Refining Expression Order for C++.
6096 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6097 MODIFY_EXPR.
6098
a86451b9
JJ
60992016-06-24 Jakub Jelinek <jakub@redhat.com>
6100
6101 * c-common.c (check_builtin_function_arguments): Require last
6102 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6103 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6104 if the last argument is pointer to enumerated or boolean type.
6105
1a4f11c8
DM
61062016-06-22 David Malcolm <dmalcolm@redhat.com>
6107
6108 PR c/70339
6109 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6110 (lookup_name_fuzzy): New prototype.
6111
fe55692c
JDA
61122016-06-21 John David Anglin <danglin@gcc.gnu.org>
6113
6114 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6115
4eb24e01
JM
61162016-06-14 Jason Merrill <jason@redhat.com>
6117
6118 P0145R2: Refining Expression Order for C++.
6119 * c.opt (fargs-in-order): New.
6120 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6121
ef7cf206
JJ
61222016-06-13 Jakub Jelinek <jakub@redhat.com>
6123
0dda258b
JJ
6124 PR sanitizer/71498
6125 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6126 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6127
ef7cf206
JJ
6128 PR preprocessor/71183
6129 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6130 to cb_get_source_date_epoch.
6131
50b15873
JJ
61322016-06-10 Jakub Jelinek <jakub@redhat.com>
6133
6134 PR c/68657
6135 * c.opt (Wpsabi): Add Warning flag.
6136
4d926e34
MS
61372016-06-10 Martin Sebor <msebor@redhat.com>
6138
6139 PR c/71392
14ec014e 6140 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6141 the nonnull attribute in type-generic builtins.
6142
e01b4e16
MS
61432016-06-09 Martin Sebor <msebor@redhat.com>
6144
6145 PR c/70883
6146 * c-common.c (builtin_function_validate_nargs): Make text of error
6147 message consistent with others like it.
6148
44a845ca
MS
61492016-06-08 Martin Sebor <msebor@redhat.com>
6150 Jakub Jelinek <jakub@redhat.com>
6151
6152 PR c++/70507
6153 PR c/68120
6154 * c-common.c (check_builtin_function_arguments): Handle
6155 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6156
a80a7051
RB
61572016-06-08 Richard Biener <rguenther@suse.de>
6158
6159 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6160
bfd67b47
RB
61612016-06-07 Richard Biener <rguenther@suse.de>
6162
6163 PR c/61564
6164 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6165 options and warn about others.
6166
15c98b2e
ES
61672016-06-01 Eduard Sanou <dhole@openmailbox.org>
6168
6169 * c-common.c (get_source_date_epoch): Rename to
6170 cb_get_source_date_epoch.
6171 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6172 message when the parsing fails. Use error_at instead of fatal_error.
6173 * c-common.h (get_source_date_epoch): Rename to
6174 cb_get_source_date_epoch.
6175 * c-common.h (cb_get_source_date_epoch): Prototype.
6176 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6177 * c-common.h (c_omp_region_type): Remove trailing comma.
6178 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6179 * c-lex.c (c_lex_with_flags): Remove initialization of
6180 pfile->source_date_epoch.
6181
00631022
JJ
61822016-05-30 Jakub Jelinek <jakub@redhat.com>
6183
6184 PR c++/71349
6185 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6186 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6187 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6188 instead of C_OMP_CLAUSE_SPLIT_FOR.
6189
f17a223d
RB
61902016-05-24 Richard Biener <rguenther@suse.de>
6191
6192 PR middle-end/70434
6193 PR c/69504
6194 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6195 (convert_vector_to_array_for_subscript): ... this.
6196 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6197 VIEW_CONVERT_EXPR to an array type. Rename to ...
6198 (convert_vector_to_array_for_subscript): ... this.
6199
4f2e1536
MP
62002016-05-12 Marek Polacek <polacek@redhat.com>
6201
6202 PR c/70756
6203 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6204 size_in_bytes and pass LOC to it.
6205
d6e83a8d
MM
62062016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6207
6208 PR c/43651
6209 * c.opt (Wduplicate-decl-specifier): New option.
6210
5c3a10fb
MP
62112016-05-11 Marek Polacek <polacek@redhat.com>
6212
6213 PR c++/71024
6214 * c-common.c (diagnose_mismatched_attributes): New function.
6215 * c-common.h (diagnose_mismatched_attributes): Declare.
6216
deef7113
MP
62172016-05-04 Marek Polacek <polacek@redhat.com>
6218
6219 * c.opt (Wdangling-else): New option.
6220
79ce98bc
MP
62212016-05-03 Marek Polacek <polacek@redhat.com>
6222
6223 PR c/70859
6224 * c-common.c (builtin_function_validate_nargs): Add location
6225 parameter. Use it.
6226 (check_builtin_function_arguments): Add location and arguments
6227 parameters. Use them.
6228 * c-common.h (check_builtin_function_arguments): Update declaration.
6229
381cdae4
RB
62302016-05-03 Richard Biener <rguenther@suse.de>
6231
6232 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6233 allow call args to gimplify to SSA names.
6234
1d793c34
MP
62352016-05-03 Marek Polacek <polacek@redhat.com>
6236
6237 * c-common.h (enum c_omp_region_type): Remove stray comma.
6238
77886428
CP
62392016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6240
6241 * c-common.h (enum c_omp_region_type): Define.
6242
697e0b28
RS
62432016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6244
6245 * c-common.c (shorten_compare): Use wi::to_wide.
6246
e7ff0319
CP
62472016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6248
6249 PR middle-end/70626
6250 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6251 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6252 reduction clauses in acc parallel loops.
6253
2fff3db8
MP
62542016-04-29 Marek Polacek <polacek@redhat.com>
6255
6256 PR c/70852
6257 * c-common.c (warn_for_memset): Check domain before accessing it.
6258
509063eb
DV
62592016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6260
6261 PR/69089
6262 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6263 "aligned" attribute.
6264
b632761d
JM
62652016-04-28 Jason Merrill <jason@redhat.com>
6266
6267 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6268
174f6622
ES
62692016-04-28 Eduard Sanou <dhole@openmailbox.org>
6270 Matthias Klose <doko@debian.org>
6271
6272 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6273 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6274 handling.
6275 * c-common.h (get_source_date_epoch): Prototype.
6276 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6277
6bc2bb18
RB
62782015-04-27 Ryan Burn <contact@rnburn.com>
6279
6280 PR c++/69024
6281 PR c++/68997
6282 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6283 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6284 external linkage.
6285 (cilk_detect_and_unwrap): Corresponding changes.
6286 (extract_free_variables): Don't extract free variables from
6287 AGGR_INIT_EXPR slot.
6288 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6289 (cilk_recognize_spawn): Likewise.
6290
c1e1f433
BS
62912016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6292
6293 * c.opt (Wmemset-elt-size): New option.
6294 * c-common.c (warn_for_memset): New function.
6295 * c-common.h (warn_for_memset): Declare.
6296
d067e05f
JM
62972016-04-25 Jason Merrill <jason@redhat.com>
6298
6299 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6300 No longer static.
6301 * c-common.h: Declare it.
6302 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6303
9aa36ae5
JM
63042016-04-22 Jason Merrill <jason@redhat.com>
6305
6306 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6307
477d4906
IV
63082016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6309
6310 PR c++/69363
6311 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6312 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6313
fe37c7af
MM
63142016-04-18 Michael Matz <matz@suse.de>
6315
6316 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6317 and SET_DECL_ALIGN.
6318
23f2660f
EB
63192016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6320
6321 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6322 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6323 to incomplete types.
6324 (dump_nested_type): Remove redundant tests and tidy up.
6325 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6326 a type which is the typedef of an original type.
6327
1e77281b
MP
63282016-04-15 Marek Polacek <polacek@redhat.com>
6329
6330 PR c/70651
6331 * c-common.c (build_va_arg): Change two asserts into errors and return
6332 error_mark_node.
6333
b3a77f21
MP
63342016-04-13 Marek Polacek <polacek@redhat.com>
6335
6336 PR c++/70639
6337 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6338 for switch statements, too.
6339
322b8466
JM
63402016-03-28 Jason Merrill <jason@redhat.com>
6341
6342 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6343
fbdb6baf
MP
63442016-03-23 Marek Polacek <polacek@redhat.com>
6345
6346 PR c++/69884
6347 * c.opt (Wignored-attributes): New option.
6348
5c240f4d
DM
63492016-03-22 David Malcolm <dmalcolm@redhat.com>
6350
6351 PR c/69993
6352 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6353 diagnostic text, reversing the order of the warning and note so
6354 that they appear in source order.
6355
14ba7b28
MP
63562016-03-17 Marek Polacek <polacek@redhat.com>
6357
6358 PR c/69407
6359 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6360 operations.
6361
08a1cadc
JM
63622016-03-14 Jason Merrill <jason@redhat.com>
6363
2aaeea19
JM
6364 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6365
08a1cadc
JM
6366 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6367
c06d25bb
RB
63682016-03-09 Richard Biener <rguenther@suse.de>
6369
6370 PR c/70143
6371 * c-common.c (strict_aliasing_warning): Add back
6372 alias_sets_conflict_p check.
6373
80aac5c8
JM
63742016-03-08 Jason Merrill <jason@redhat.com>
6375
6376 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6377
64b23c13
DM
63782016-03-04 David Malcolm <dmalcolm@redhat.com>
6379
6380 PR c/68187
6381 * c-indentation.c (get_visual_column): Move code to determine next
6382 tab stop to...
6383 (next_tab_stop): ...this new function.
6384 (line_contains_hash_if): Delete function.
6385 (detect_preprocessor_logic): Delete function.
6386 (get_first_nws_vis_column): New function.
6387 (detect_intervening_unindent): New function.
6388 (should_warn_for_misleading_indentation): Replace call to
6389 detect_preprocessor_logic with a call to
6390 detect_intervening_unindent.
6391
729526f5
DM
63922016-03-04 David Malcolm <dmalcolm@redhat.com>
6393
6394 PR c/68187
6395 * c-indentation.c (should_warn_for_misleading_indentation): When
6396 suppressing warnings about cases where the guard and body are on
6397 the same column, only use the first non-whitespace column in place
6398 of the guard token column when dealing with "else" clauses.
6399 When rejecting aligned BODY and NEXT, loosen the requirement
6400 from equality with the first non-whitespace of guard to simply
6401 that they not be indented relative to it.
6402
e9a35493
RB
64032016-03-04 Richard Biener <rguenther@suse.de>
6404
6405 PR c++/70054
6406 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6407 instead of alias_sets_conflict_p.
6408
1be56bc5
MP
64092016-03-01 Marek Polacek <polacek@redhat.com>
6410
6411 PR c++/69795
6412 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6413 any DECL.
6414
35886f0b
MS
64152016-02-22 Martin Sebor <msebor@redhat.com>
6416
6417 PR middle-end/69780
6418 * c-common.c (check_builtin_function_arguments): Validate and
6419 reject invalid arguments to __builtin_alloca_with_align.
6420
4246c8da
MW
64212016-02-20 Mark Wielaard <mjw@redhat.com>
6422
6423 PR c/28901
6424 * c.opt (Wunused-const-variable): Turn into Alias for...
6425 (Wunused-const-variable=): New option.
6426
268be88c
BE
64272016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6428
6429 PR c++/69865
6430 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6431 here...
6432 (c_common_init_options): ...to here.
6433 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6434
871b3f47
JJ
64352016-02-19 Jakub Jelinek <jakub@redhat.com>
6436
6437 PR c++/69826
6438 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6439 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6440 flag_preprocess_only.
6441
bf14eba2
JJ
64422016-02-16 Jakub Jelinek <jakub@redhat.com>
6443
6444 PR c/69835
6445 * c.opt (Wnonnull-compare): Enable for -Wall.
6446
ba6b3795
JJ
64472016-02-15 Jakub Jelinek <jakub@redhat.com>
6448
6449 PR c++/69797
6450 * c-common.c (sync_resolve_size): Diagnose too few arguments
6451 even when params is non-NULL empty vector.
6452
a011cd92
BS
64532016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6454
6455 PR target/60410
6456 * c.opt (fshort-double): Remove.
6457
46cb9332
MS
64582016-02-05 Martin Sebor <msebor@redhat.com>
6459
6460 PR c++/69662
6461 * c.opt (Warning options): Update -Wplacement-new to take
6462 an optional argument.
6463
e1b81f2b
JJ
64642016-02-01 Jakub Jelinek <jakub@redhat.com>
6465
6466 PR preprocessor/69543
6467 PR c/69558
6468 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6469 instead of loc to control_warning_option.
6470
b6adbb9f
NS
64712016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6472
6473 * c.opt (fopenacc-dim=): New option.
6474
5d70666e
RB
64752016-01-27 Ryan Burn <contact@rnburn.com>
6476
6477 PR cilkplus/69267
6478 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6479 gimplify_arg. Removed superfluous post_p argument.
6480 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6481 superfluous post_p argument.
6482 * c-gimplify.c (c_gimplify_expr): Likewise.
6483
01e1dea3
DM
64842016-01-26 David Malcolm <dmalcolm@redhat.com>
6485
6486 PR other/69006
6487 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6488 pp_newline_and_flush with pp_flush.
6489
9f04a53e
MS
64902016-01-20 Martin Sebor <msebor@redhat.com>
6491
6492 PR c/69405
6493 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6494 an incompatible argument when the argument isn't a valid tree node.
6495
7f26f7df
JM
64962016-01-18 Jason Merrill <jason@redhat.com>
6497
6498 PR c++/68767
6499 * c-common.c (check_function_arguments_recurse): Fold the whole
6500 COND_EXPR, not just the condition.
6501
f62bf092
TV
65022016-01-18 Tom de Vries <tom@codesourcery.com>
6503
6504 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6505 classify as loop clause.
6506
e0a575ff
JJ
65072016-01-15 Jakub Jelinek <jakub@redhat.com>
6508
6509 PR bootstrap/68271
6510 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6511 C++ FE no longer has limit on number of pragmas.
6512
65132015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6514
6515 PR c++/69048
6516 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6517 to add missing cleanup point.
b6e3db06 6518
c7df95d8
DM
65192016-01-14 David Malcolm <dmalcolm@redhat.com>
6520
6521 PR c++/68819
6522 * c-indentation.c (get_visual_column): Add location_t param.
6523 Handle the column number being zero by effectively disabling the
6524 warning, with an "inform".
6525 (should_warn_for_misleading_indentation): Add location_t argument
6526 for all uses of get_visual_column.
6527
21efdd80
PP
65282016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6529
6530 PR c++/69029
6531 * c-indentation.c (should_warn_for_misleading_indentation):
6532 Don't warn about do-while statements.
6533
7a127fa7
MS
65342016-01-07 Martin Sebor <msebor@redhat.com>
6535
6536 PR c/68966
6537 * c-common.c (sync_resolve_size): Reject first argument when it's
6538 a pointer to _Bool.
6539
c589e975
DM
65402016-01-05 David Malcolm <dmalcolm@redhat.com>
6541
6542 PR c/69122
6543 * c-indentation.c (get_visual_column): Remove default argument.
6544 (should_warn_for_misleading_indentation): For the multiline case,
6545 update call to get_visual_column for next_stmt_exploc so that it
6546 captures the location of the first non-whitespace character in the
6547 relevant line. Don't issue warnings if there is non-whitespace
6548 before the next statement.
6549
818ab71a
JJ
65502016-01-04 Jakub Jelinek <jakub@redhat.com>
6551
6552 Update copyright years.
6553
745e411d
DM
65542015-12-21 David Malcolm <dmalcolm@redhat.com>
6555
6556 * c-common.c (binary_op_error): Convert first param from
6557 location_t to rich_location * and use it when emitting an error.
6558 * c-common.h (binary_op_error): Convert first param from
6559 location_t to rich_location *.
6560
de67c4c3
DM
65612015-12-16 David Malcolm <dmalcolm@redhat.com>
6562
6563 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6564 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6565
4a38b02b
IV
65662015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6567
6568 * c-common.c (c_common_attribute_table): Handle "omp declare target
6569 link" attribute.
6570
54d62f51
JJ
65712015-12-14 Jakub Jelinek <jakub@redhat.com>
6572
6573 PR c/68833
6574 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6575
8d4227c8
TB
65762014-12-12 Tobias Burnus <burnus@net-b.de>
6577
6578 PR fortran/68815
6579 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6580 specifiers (%d, %i,%u and %c).
6581
f6069ccc
DM
65822015-12-10 David Malcolm <dmalcolm@redhat.com>
6583
6584 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6585
63bbf46d
JJ
65862015-12-08 Jakub Jelinek <jakub@redhat.com>
6587
6588 PR c/48088
6589 PR c/68657
6590 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6591 * c-pragma.c (handle_pragma_diagnostic): Adjust
6592 control_warning_option caller.
6593
f79520bb
DM
65942015-12-07 David Malcolm <dmalcolm@redhat.com>
6595
6596 * c-common.c (c_cpp_error): Update for change to
6597 rich_location::set_range.
6598
b3d5bc62
JJ
65992015-12-04 Paolo Bonzini <bonzini@gnu.org>
6600
6601 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6602 shifting 1 out of the sign bit.
6603
66042015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6605
6606 * c-common.c (c_common_attribute_table[]): Update max arguments
6607 count for "simd" attribute.
6608 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6609
6eb4a537
JJ
66102015-12-03 Jakub Jelinek <jakub@redhat.com>
6611
6612 PR preprocessor/57580
6613 * c-ppoutput.c (print): Change printed field to bool.
6614 Move src_file last for smaller padding.
6615 (init_pp_output): Set print.printed to false instead of 0.
6616 (scan_translation_unit): Fix up formatting. Set print.printed
6617 to true after printing something other than newline.
6618 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6619 (maybe_print_line_1): Set print.printed to false instead of 0.
6620 (print_line_1): Likewise.
6621 (do_line_change): Set print.printed to true instead of 1.
6622 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6623 dump_macro): Set print.printed to false after printing newline.
6624
4250754e
JM
66252015-12-02 Jason Merrill <jason@redhat.com>
6626
f479b43d
JM
6627 * c-common.c (fold_for_warn): New.
6628 (warn_logical_operator, warn_tautological_cmp)
6629 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6630
4250754e
JM
6631 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6632 (c_fully_fold_internal, decl_constant_value_for_optimization):
6633 Move to c/c-fold.c.
6634 * c-common.h: Don't declare decl_constant_value_for_optimization.
6635
e9e32ee6
JM
66362015-12-02 Joseph Myers <joseph@codesourcery.com>
6637
6638 PR c/68162
6639 * c-common.h (c_build_qualified_type): Add extra default
6640 arguments.
6641
37d5ad46
JB
66422015-12-01 Julian Brown <julian@codesourcery.com>
6643 Cesar Philippidis <cesar@codesourcery.com>
6644 James Norris <James_Norris@mentor.com>
6645
6646 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6647 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6648 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6649
f07862c7
EB
66502015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6651
6652 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6653 (decl_sloc_common): Delete and move bulk of processing to...
6654 (decl_sloc): ...here.
6655 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6656 (dump_ada_double_name): Remove S parameter and compute the suffix.
6657 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6658 element type and deal with an anonymous one.
6659 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6660 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6661 and remove reference to QUAL_UNION_TYPE.
6662 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6663 (dump_nested_type): ...here. New function extracted from above.
6664 Generate a full declaration for anonymous element type of arrays.
6665 (print_ada_declaration): Really skip anonymous declarations. Remove
6666 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6667 Clean up processing of declarations of array types and objects.
6668 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6669 Remove obsolete code and tidy up.
6670
75c8aac3
JH
66712015-11-29 Jan Hubicka <hubicka@ucw.cz>
6672
6673 PR c/67581
6674 * c-common.c (handle_transparent_union_attribute): Update
6675 also type variants.
6676
b58d3df2
ML
66772015-11-27 Martin Liska <mliska@suse.cz>
6678
6679 PR c++/68312
6680 * array-notation-common.c (cilkplus_extract_an_triplets):
6681 Release vector of vectors.
6682 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6683
89a01fcf
EB
66842015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6685
6686 PR c++/68527
6687 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6688 (print_ada_struct_decl): Likewise.
6689
cc5c5226
IZ
66902015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6691
6692 PR c++/68001
6693 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6694 * cilk.c (recognize_spawn): Determine location in a more precise
6695 way.
6696
269adb9d
JM
66972015-11-19 Jason Merrill <jason@redhat.com>
6698
6699 * c-common.c (shorten_compare): But look through macros from
6700 system headers.
6701
d0eccfcd
JM
67022015-11-18 Jason Merrill <jason@redhat.com>
6703
6704 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6705 non-constant operand comes from a macro.
6706
3e44547c
JM
67072015-11-17 Jason Merrill <jason@redhat.com>
6708
6709 PR bootstrap/68346
6710 * c-common.c (warn_tautological_cmp): Fold before checking for
6711 constants.
6712
0f62c7a0
MP
67132015-11-16 Marek Polacek <polacek@redhat.com>
6714
6715 PR c++/68362
6716 * c-common.c (check_case_bounds): Fold low and high cases.
6717
a868811e
MP
67182015-11-16 Marek Polacek <polacek@redhat.com>
6719
6720 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6721 * c-common.c (c_common_get_alias_set): Likewise.
6722 (handle_visibility_attribute): Likewise.
6723
fff77217
KY
67242015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6725
6726 * c-common.c (handle_simd_attribute): New.
6727 (struct attribute_spec): Add entry for "simd".
6728 (handle_simd_attribute): New.
6729
269e63b7
KT
67302015-11-13 Kai Tietz <ktietz70@googlemail.com>
6731
6732 * c-lex.c (interpret_float): Use fold_convert.
6733
ebedc9a3
DM
67342015-11-13 David Malcolm <dmalcolm@redhat.com>
6735
6736 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6737 and store it on the result.
6738 * c-opts.c (c_common_init_options): Set
6739 global_dc->colorize_source_p.
6740
6e232ba4
JN
67412015-11-12 James Norris <jnorris@codesourcery.com>
6742 Joseph Myers <joseph@codesourcery.com>
6743
7365279f 6744 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6745 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6746 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6747 PRAGMA_OACC_CLAUSE_LINK.
6748
e78bede6
MP
67492015-11-11 Marek Polacek <polacek@redhat.com>
6750
6751 PR c/68107
6752 PR c++/68266
6753 * c-common.c (valid_array_size_p): New function.
6754 * c-common.h (valid_array_size_p): Declare.
6755
3f8257db 67562015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6757
6758 PR bootstrap/68271
6759 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6760
69f293c9
AM
67612015-11-11 Andrew MacLeod <amacleod@redhat.com>
6762
6763 * array-notation-common.c: Remove unused header files.
6764 * c-ada-spec.c: Likewise.
6765 * c-cilkplus.c: Likewise.
6766 * c-common.c: Likewise.
6767 * c-cppbuiltin.c: Likewise.
6768 * c-dump.c: Likewise.
6769 * c-format.c: Likewise.
6770 * c-gimplify.c: Likewise.
6771 * c-indentation.c: Likewise.
6772 * c-lex.c: Likewise.
6773 * c-omp.c: Likewise.
6774 * c-opts.c: Likewise.
6775 * c-pch.c: Likewise.
6776 * c-ppoutput.c: Likewise.
6777 * c-pragma.c: Likewise.
6778 * c-pretty-print.c: Likewise.
6779 * c-semantics.c: Likewise.
6780 * c-ubsan.c: Likewise.
6781 * cilk.c: Likewise.
6782 * stub-objc.c: Likewise.
6783
3a40d81d
NS
67842015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6785 Cesar Philippidis <cesar@codesourcery.com>
6786 James Norris <jnorris@codesourcery.com>
6787 Julian Brown <julian@codesourcery.com>
6788 Nathan Sidwell <nathan@codesourcery.com>
6789
6790 * c-pragma.c (oacc_pragmas): Add "routine".
6791 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6792
ee45a32d
EB
67932015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6794
6795 * c-common.c (c_common_attributes): Add scalar_storage_order.
6796 (handle_scalar_storage_order_attribute): New function.
6797 * c-pragma.c (global_sso): New variable.
6798 (maybe_apply_pragma_scalar_storage_order): New function.
6799 (handle_pragma_scalar_storage_order): Likewise.
6800 (init_pragma): Register scalar_storage_order.
6801 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6802 * c.opt (Wscalar-storage-order): New warning.
6803 (fsso-struct=): New option.
6804
eb11eb15
MS
68052015-11-08 Martin Sebor <msebor@redhat.com>
6806
6807 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6808
0aad0198
RS
68092015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6810
6811 * c-common.c: Don't undef DEF_BUILTIN.
6812
8a645150
DM
68132015-11-06 David Malcolm <dmalcolm@redhat.com>
6814
6815 * c-common.c (c_cpp_error): Convert parameter from location_t to
6816 rich_location *. Eliminate the "column_override" parameter and
6817 the call to diagnostic_override_column.
6818 Update the "done_lexing" clause to set range 0
6819 on the rich_location, rather than overwriting a location_t.
6820 * c-common.h (c_cpp_error): Convert parameter from location_t to
6821 rich_location *. Eliminate the "column_override" parameter.
6822
7a5e4956
CP
68232015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6824 Thomas Schwinge <thomas@codesourcery.com>
6825 James Norris <jnorris@codesourcery.com>
6826
6827 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6828 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6829 clauses with parallel and kernels and loops.
6830 * c-pragma.h (enum pragma_omp_clause): Add entries for
6831 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6832 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6833 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6834 INDEPENDENT,SEQ}.
6835 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6836
e2f5cc96
MS
68372015-11-05 Martin Sebor <msebor@redhat.com>
6838
6839 PR c++/67942
6840 * c.opt (-Wplacement-new): New option.
6841
e01d41e5
JJ
68422015-11-05 Jakub Jelinek <jakub@redhat.com>
6843
6844 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6845 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6846 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6847 save_expr or create_tmp_var* if TEST is true.
6848 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6849 Don't call add_stmt here.
6850 (struct c_omp_check_loop_iv_data): New type.
6851 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6852 c_omp_check_loop_iv_exprs): New functions.
6853 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6854 distribute.
6855 (c_omp_declare_simd_clauses_to_numbers): Change
6856 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6857 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6858 from numbers to PARM_DECLs.
6859
595278be
MM
68602015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6861
6862 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6863 flag_checking.
6864
3f8257db 68652015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6866
6867 PR c++-common/67882
b3d5bc62
JJ
6868 * c-common.h (fold_offsetof_1): Add argument.
6869 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6870 offsetof expressions that reference elements past the end of
6871 an array.
6872
4bf9e5a8
TS
68732015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6874 Chung-Lin Tang <cltang@codesourcery.com>
6875
6876 * c-pragma.c (oacc_pragmas): Add "atomic".
6877 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6878
3b1661a9
ES
68792015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6880
6881 * c-common.c (handle_target_clones_attribute): New.
6882 (c_common_attribute_table): Add handle_target_clones_attribute.
6883 (handle_always_inline_attribute): Add check on target_clones attribute.
6884 (handle_target_attribute): Ditto.
6885
2adfab87
AM
68862015-10-29 Andrew MacLeod <amacleod@redhat.com>
6887
6888 * array-notation-common.c: Reorder #include's and remove duplicates.
6889 * c-ada-spec.c: Likewise.
6890 * c-cilkplus.c: Likewise.
6891 * c-common.c: Likewise.
6892 * c-cppbuiltin.c: Likewise.
6893 * c-dump.c: Likewise.
6894 * c-format.c: Likewise.
6895 * c-gimplify.c: Likewise.
6896 * c-indentation.c: Likewise.
6897 * c-lex.c: Likewise.
6898 * c-omp.c: Likewise.
6899 * c-opts.c: Likewise.
6900 * c-pch.c: Likewise.
6901 * c-ppoutput.c: Likewise.
6902 * c-pragma.c: Likewise.
6903 * c-pretty-print.c: Likewise.
6904 * c-semantics.c: Likewise.
6905 * c-ubsan.c: Likewise.
6906 * cilk.c: Likewise.
6907 * stub-objc.c: Likewise.
6908
d90ec4f2
JM
69092015-10-28 Jason Merrill <jason@redhat.com>
6910
6911 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6912
88bae6f4
TS
69132015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6914 James Norris <jnorris@codesourcery.com>
6915 Cesar Philippidis <cesar@codesourcery.com>
6916
6917 PR c/64765
6918 PR c/64880
6919 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6920 * c-omp.c (c_oacc_split_loop_clauses): New function.
6921
b1726d6c
MS
69222015-10-21 Martin Sebor <msebor@redhat.com>
6923
6924 PR driver/68043
6925 * c.opt: End each sentence that describes an option with a period.
6926
fa60eeb9
MP
69272015-10-20 Marek Polacek <polacek@redhat.com>
6928
6929 * array-notation-common.c (is_cilkplus_vector_p): Define.
6930 * c-common.h (is_cilkplus_vector_p): Declare.
6931
95979049
MP
69322015-10-20 Marek Polacek <polacek@redhat.com>
6933
6934 * c.opt (std=gnu++11): Do not describe as experimental.
6935 (std=gnu++14): Likewise.
6936
2a9fb712
JM
69372015-10-19 Jason Merrill <jason@redhat.com>
6938
6939 * c-cppbuiltin.c (c_cpp_builtins): Define
6940 __cpp_nontype_template_args.
6941
13b380a3
JM
69422015-10-19 Jason Merrill <jason@redhat.com>
6943
6944 * c-cppbuiltin.c (c_cpp_builtins): Define
6945 __cpp_enumerator_attributes, __cpp_fold_expressions,
6946 __cpp_unicode_characters.
6947
d9a6bd32
JJ
69482015-10-13 Jakub Jelinek <jakub@redhat.com>
6949 Aldy Hernandez <aldyh@redhat.com>
6950
6951 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6952 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6953 (c_define_builtins): Likewise.
6954 * c-common.h (enum c_omp_clause_split): Add
6955 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6956 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6957 (c_finish_omp_for): Add ORIG_DECLV argument.
6958 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6959 201511 instead of 201307.
6960 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6961 OMP_CRITICAL_CLAUSES to it.
6962 (c_finish_omp_ordered): Add CLAUSES argument, set
6963 OMP_ORDERED_CLAUSES to it.
6964 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6965 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6966 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6967 constructs and new OpenMP 4.5 clauses. Clear
6968 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6969 verification code.
6970 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6971 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6972 (enum pragma_omp_clause): Add
6973 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6974 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6975
624d31fe
RS
69762015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6977
6978 * c-lex.c (interpret_float): Use real_equal instead of
6979 REAL_VALUES_EQUAL.
6980
b8fd7909
JM
69812015-10-04 Jason Merrill <jason@redhat.com>
6982
6983 Implement N4514, C++ Extensions for Transactional Memory.
6984 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6985 (c_common_attribute_table): Add transaction_safe_dynamic.
6986 transaction_safe now affects type identity.
6987 (handle_tm_attribute): Handle transaction_safe_dynamic.
6988 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6989 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6990 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6991 (D_TRANSMEM): New.
6992 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6993 * c-pretty-print.c (pp_c_attributes_display): Don't print
6994 transaction_safe in C++.
6995
12651878
MP
69962015-10-02 Marek Polacek <polacek@redhat.com>
6997
6998 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6999
3e3b8d63
MP
70002015-10-02 Marek Polacek <polacek@redhat.com>
7001
7002 PR c/64249
7003 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7004 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7005 * c.opt (Wduplicated-cond): New option.
7006
0d1a8f75
JM
70072015-10-01 Joseph Myers <joseph@codesourcery.com>
7008
7009 * c.opt (std=c11): Do not describe as experimental.
7010 (std=gnu11): Likewise.
7011 (std=iso9899:2011): Likewise.
7012
3e32ee19
NS
70132015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7014
7015 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7016 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7017
974348ee
MP
70182015-09-25 Marek Polacek <polacek@redhat.com>
7019
7020 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7021 (ubsan_instrument_shift): Likewise.
7022
15dbc1a6
MP
70232015-09-25 Marek Polacek <polacek@redhat.com>
7024
7025 PR sanitizer/64906
7026 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7027
6b95d7cc
PP
70282015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7029
7030 * c-indentation.c (should_warn_for_misleading_indentation):
7031 Compare next_stmt_vis_column with guard_line_first_nws instead
7032 of with guard_line_vis_column.
7033
c1822f9c
MLI
70342015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7035
7036 PR c/49654
7037 PR c/49655
7038 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7039 options and options not valid for the current language.
7040
d5398058
PP
70412015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7042
7043 * c-indentation.c (should_warn_for_misleading_indentation):
7044 Float out and consolidate the calls to get_visual_column that
7045 are passed guard_exploc as an argument. Compare
7046 next_stmt_vis_column with guard_line_first_nws instead of with
7047 body_line_first_nws.
7048
6b333269
NS
70492015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7050
7051 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7052 Wnamespaces): New C++ warnings.
7053
a75f1574
JM
70542015-09-22 Jason Merrill <jason@redhat.com>
7055
7056 * c-common.h (abi_compat_version_crosses): New.
7057 (warn_abi_version): Declare.
7058 * c-common.c: Define it.
7059 * c-opts.c (c_common_post_options): Handle it.
7060 flag_abi_compat_version defaults to 8.
7061
bdaaa8b7
VV
70622015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7063
7064 Complete the implementation of N4230, Nested namespace definition.
7065 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7066 __cpp_nested_namespace_definitions.
7067
eaa797e8
MLI
70682015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7069
7070 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7071
c4914de6
MLI
70722015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7073
7074 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7075 when warning.
7076 * c-pragma.h (pragma_lex): Add optional loc argument.
7077
fcb87c50
MM
70782015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7079
7080 * c-format.c (check_format_arg): Adjust to use common block size in all
7081 object pools.
7082
31bdd08a
DM
70832015-09-15 David Malcolm <dmalcolm@redhat.com>
7084
7085 * c-format.c (location_from_offset): Update for change in
7086 signature of location_get_source_line.
7087 * c-indentation.c (get_visual_column): Likewise.
7088 (line_contains_hash_if): Likewise.
7089
aa9f4b4c
MP
70902015-09-14 Marek Polacek <polacek@redhat.com>
7091
7092 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7093 setting various warnings.
7094
aa256c4a
MP
70952015-09-14 Marek Polacek <polacek@redhat.com>
7096
7097 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7098 a negative value.
7099
0f876f22
MW
71002015-09-11 Mark Wielaard <mjw@redhat.com>
7101
7102 PR c/28901
7103 * c.opt (Wunused-variable): Option from common.opt.
7104 (Wunused-const-variable): New option.
7105
273aa49e
PC
71062015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7107
7108 PR c++/53184
7109 * c.opt ([Wsubobject-linkage]): Add.
7110
1807ffc1
MS
71112015-09-03 Martin Sebor <msebor@redhat.com>
7112
7113 PR c/66516
7114 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7115 functions.
7116 * c-common.c (reject_gcc_builtin): Define.
7117
38942840
BI
71182015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7119
7120 PR middle-end/60586
7121 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7122 prototype.
7123 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7124 cilk_gimplify_call_params_in_spawned_fn.
7125 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7126 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7127 unwrapping.
7128
c316b5e4
MP
71292015-08-25 Marek Polacek <polacek@redhat.com>
7130
7131 PR middle-end/67330
7132 * c-common.c (handle_weak_attribute): Don't check whether the
7133 visibility can be changed here.
7134
584a7c46
MLI
71352015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7136
7137 * c-lex.c (c_lex_with_flags): Use explicit locations.
7138
a79683d5
TS
71392015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7140
7141 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7142 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7143
61717a45
FXC
71442015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7145
7146 PR middle-end/36757
7147 * c-common.c (check_builtin_function_arguments): Add check
7148 for BUILT_IN_SIGNBIT argument.
7149
329524f5
PC
71502015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7151
7152 PR c++/67160
7153 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7154 in c++1z mode.
7155
4ee55665
MP
71562015-08-17 Marek Polacek <polacek@redhat.com>
7157
7158 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7159 with whitespaces before qualifier names.
7160
b893e375
MP
71612015-08-12 Marek Polacek <polacek@redhat.com>
7162
7163 PR c++/55095
7164 * c-common.c (maybe_warn_shift_overflow): Properly handle
7165 left-shifting 1 into the sign bit.
7166
c2d89095
MLI
71672015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7168
7169 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7170
971e17ff
AS
71712015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7172 Braden Obrzut <admin@maniacsvault.net>
7173 Jason Merrill <jason@redhat.com>
7174
7175 Add C++ Concepts TS support.
7176 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7177 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7178 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7179 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7180 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7181 * c.opt (fconcepts): New.
7182
b3d5bc62
JJ
71832015-08-02 Martin Sebor <msebor@redhat.com>
7184
7185 * c.opt (-Wframe-address): New warning option.
7186
8ebca419
PP
71872015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7188
7189 * c-indentation.c (should_warn_for_misleading_indentation):
7190 Improve heuristics.
7191
1a1e101f
PP
71922015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7193
7194 * c-indentation.c (get_visual_column): Add parameter first_nws,
7195 use it. Update comment documenting the function.
7196 (is_first_nonwhitespace_on_line): Remove.
7197 (should_warn_for_misleading_indentation): Replace usage of
7198 of is_first_nonwhitespace_on_line with get_visual_column.
7199
992118a1
PP
72002015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7201
7202 * c-indentation.h (struct token_indent_info): Define.
7203 (get_token_indent_info): Define.
7204 (warn_for_misleading_information): Declare.
7205 * c-common.h (warn_for_misleading_information): Remove.
7206 * c-identation.c (warn_for_misleading_indentation):
7207 Change declaration to take three token_indent_infos. Adjust
7208 accordingly.
7209 * c-identation.c (should_warn_for_misleading_indentation):
7210 Likewise. Bail out early if the body is a compound statement.
7211 (guard_tinfo_to_string): Define.
7212
e8fa3817
JM
72132015-07-30 Jason Merrill <jason@redhat.com>
7214
7215 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7216 '*' for reference decay.
7217
173864e8
MP
72182015-07-30 Marek Polacek <polacek@redhat.com>
7219
7220 * c-common.c (warn_tautological_cmp): Bail for float types.
7221
f2afe6dd
MP
72222015-07-27 Marek Polacek <polacek@redhat.com>
7223
7224 PR bootstrap/67030
7225 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7226
05b28fd6
MP
72272015-07-27 Marek Polacek <polacek@redhat.com>
7228
7229 PR c++/66555
7230 PR c/54979
7231 * c-common.c (find_array_ref_with_const_idx_r): New function.
7232 (warn_tautological_cmp): New function.
7233 * c-common.h (warn_tautological_cmp): Declare.
7234 * c.opt (Wtautological-compare): New option.
7235
5a5062b8
MP
72362015-07-23 Marek Polacek <polacek@redhat.com>
7237
7238 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7239 (ubsan_instrument_shift): Likewise.
7240
dc891fe7
MP
72412015-07-23 Marek Polacek <polacek@redhat.com>
7242
7243 PR sanitizer/66908
7244 * c-ubsan.c: Include gimplify.h.
7245 (ubsan_instrument_division): Unshare OP0 and OP1.
7246 (ubsan_instrument_shift): Likewise.
7247
451b5e48
MP
72482015-07-20 Marek Polacek <polacek@redhat.com>
7249 Richard Sandiford <richard.sandiford@arm.com>
7250
7251 PR c++/55095
7252 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7253 Use EXPR_LOC_OR_LOC.
7254 (maybe_warn_shift_overflow): New function.
7255 * c-common.h (maybe_warn_shift_overflow): Declare.
7256 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7257 * c.opt (Wshift-overflow): New option.
7258
fb0b2914
ML
72592015-07-16 Martin Liska <mliska@suse.cz>
7260
7261 * c-format.c (static void check_format_info_main): Use
7262 object_allocator instead of pool_allocator.
7263 (check_format_arg): Likewise.
7264 (check_format_info_main): Likewise.
7265
903f5c23
AM
72662015-07-15 Andrew MacLeod <amacleod@redhat.com>
7267
7268 * c-opts.c: Remove multiline #include comment.
7269
026c3cfd
AH
72702015-07-12 Aldy Hernandez <aldyh@redhat.com>
7271
7272 * c-common.c: Fix double word typos.
7273
bb49ee66
EB
72742015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7275
7276 * c-ada-spec.h (cpp_operation): Revert latest change.
7277 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7278 constructors and destructors.
7279
1916bcb5
AM
72802015-07-09 Andrew MacLeod <amacleod@redhat.com>
7281
7282 * c-common.h: Adjust includes for flags.h changes.
7283 * stub-objc.c: Likewise.
026c3cfd 7284
a9dcd529
EB
72852015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7286
7287 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7288 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7289
b03b462f
JJ
72902015-07-08 Jakub Jelinek <jakub@redhat.com>
7291
7292 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7293 are to be removed, return NULL rather than original clauses list.
7294
c7131fb2
AM
72952015-07-07 Andrew MacLeod <amacleod@redhat.com>
7296
7297 * array-notation-common.c: Adjust includes.
7298 * c-ada-spec.c: Likewise.
7299 * c-cilkplus.c: Likewise.
7300 * c-common.h: Likewise.
7301 * c-cppbuiltin.c: Likewise.
7302 * c-dump.c: Likewise.
7303 * c-format.c: Likewise.
7304 * c-gimplify.c: Likewise.
7305 * c-indentation.c: Likewise.
7306 * c-lex.c: Likewise.
7307 * c-omp.c: Likewise.
7308 * c-opts.c: Likewise.
7309 * c-pch.c: Likewise.
7310 * c-ppoutput.c: Likewise.
7311 * c-pragma.c: Likewise.
7312 * c-pretty-print.c: Likewise.
7313 * c-semantics.c: Likewise.
7314 * c-ubsan.c: Likewise.
7315 * cilk.c: Likewise.
7316 * stub-objc.c: Likewise.
7317
2a7fb83f
EB
73182015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7319
7320 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7321 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7322
a03c9bf1
JM
73232015-07-01 Jason Merrill <jason@redhat.com>
7324
36a85135
JM
7325 * c-common.h (D_CXX11): Rename from D_CXX0X.
7326 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7327 * c-common.c: Adjust.
7328
e7fa68d5
JM
7329 * c-opts.c (c_common_post_options): Default to C++14.
7330
a03c9bf1
JM
7331 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7332
fe95b036
ESR
73332015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7334
7335 Implement N4197 - Adding u8 character literals
b3d5bc62 7336 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7337 CPP_CHAR.
b3d5bc62 7338 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7339 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7340 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7341 and CPP_UTF8CHAR tokens.
7342 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7343
da2e71c9
MLI
73442015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7345
7346 PR fortran/66605
7347 * c-common.c (do_warn_unused_parameter): Move here.
7348 * c-common.h (do_warn_unused_parameter): Declare.
7349
b155cfd9
MP
73502015-06-29 Marek Polacek <polacek@redhat.com>
7351
7352 PR c/66322
7353 * c-common.c (check_case_bounds): Add bool * parameter. Set
7354 OUTSIDE_RANGE_P.
7355 (c_add_case_label): Add bool * parameter. Pass it down to
7356 check_case_bounds.
7357 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7358 warning here.
7359 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7360 declarations.
7361
31521951
MP
73622015-06-27 Marek Polacek <polacek@redhat.com>
7363
7364 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7365 or VECTOR_INTEGER_TYPE_P throughout.
7366 * c-gimplify.c: Likewise.
7367
22d03525
MP
73682015-06-26 Marek Polacek <polacek@redhat.com>
7369
7370 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7371 * c-common.c (c_fully_fold_internal): Likewise.
7372 (c_alignof_expr): Likewise.
7373 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7374 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7375 * cilk.c (create_parm_list): Likewise.
22d03525 7376
af05e6e5
MP
73772015-06-26 Marek Polacek <polacek@redhat.com>
7378
7379 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7380
f0889939
AM
73812015-06-25 Andrew MacLeod <amacleod@redhat.com>
7382
7383 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7384 * c-gimplify.c: Likewise.
7385 * c-pragma.c: Likewise.
7386 * c-ubsan.c: Likewise.
7387 * cilk.c: Likewise.
7388
ca752f39
RS
73892015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7390
7391 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7392 ggc_hasher.
7393
16a16ec7
AM
73942015-06-25 Andrew MacLeod <amacleod@redhat.com>
7395
7396 * cilk.c: Move calls.h after tm.h in the include chain.
7397
0ae9bd27
MP
73982015-06-25 Marek Polacek <polacek@redhat.com>
7399
7400 * array-notation-common.c: Use VAR_P throughout.
7401 * c-ada-spec.c: Likewise.
7402 * c-common.c: Likewise.
7403 * c-format.c: Likewise.
7404 * c-gimplify.c: Likewise.
7405 * c-omp.c: Likewise.
7406 * c-pragma.c: Likewise.
7407 * c-pretty-print.c: Likewise.
7408 * cilk.c: Likewise.
7409
62f9079a
MP
74102015-06-25 Marek Polacek <polacek@redhat.com>
7411
7412 * cilk.c (extract_free_variables): Use is_global_var.
7413
0fa16060
RS
74142015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7415
7416 * c-common.c: Don't include target-def.h.
7417
a68ae2e1
MP
74182015-06-23 Marek Polacek <polacek@redhat.com>
7419
7420 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7421 when comparing INTEGER_CSTs.
7422
c6a2f2d9
PMR
74232015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7424
7425 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7426 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7427 (dump_ada_template): Skip partially specialized types.
7428
6b4db501
MM
74292015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7430
7431 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7432 swapping.
7433
abb226c9
AM
74342015-06-17 Andrew MacLeod <amacleod@redhat.com>
7435
7436 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7437 * c-ada-spec.c: Likewise.
7438 * c-cilkplus.c: Likewise.
7439 * c-common.c: Likewise.
7440 * c-common.h: Likewise.
7441 * c-cppbuiltin.c: Likewise.
7442 * c-dump.c: Likewise.
7443 * c-format.c: Likewise.
7444 * c-gimplify.c: Likewise.
7445 * c-indentation.c: Likewise.
7446 * c-lex.c: Likewise.
7447 * c-omp.c: Likewise.
7448 * c-opts.c: Likewise.
7449 * c-pch.c: Likewise.
7450 * c-ppoutput.c: Likewise.
7451 * c-pragma.c: Likewise.
7452 * c-pretty-print.c: Likewise.
7453 * c-semantics.c: Likewise.
7454 * c-ubsan.c: Likewise.
7455 * cilk.c: Likewise.
7456 * stub-objc.c: Likewise.
7457
076fecad
PP
74582015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7459
7460 PR c++/65168
7461 * c-common.c (c_common_truthvalue_conversion): Warn when
7462 converting an address of a reference to a truth value.
7463
13fdf2e2
AM
74642015-06-08 Andrew MacLeod <amacleod@redhat.com>
7465
7466 * array-notation-common.c : Adjust include files.
7467 * c-ada-spec.c : Likewise.
7468 * c-cilkplus.c : Likewise.
7469 * c-common.c : Likewise.
7470 * c-common.h : Likewise.
7471 * c-cppbuiltin.c : Likewise.
7472 * c-dump.c : Likewise.
7473 * c-format.c : Likewise.
7474 * c-gimplify.c : Likewise.
7475 * c-indentation.c : Likewise.
7476 * c-lex.c : Likewise.
7477 * c-omp.c : Likewise.
7478 * c-opts.c : Likewise.
7479 * c-pch.c : Likewise.
7480 * c-ppoutput.c : Likewise.
7481 * c-pragma.c : Likewise.
7482 * c-pretty-print.c : Likewise.
7483 * c-semantics.c : Likewise.
7484 * c-ubsan.c : Likewise.
7485 * cilk.c : Likewise.
7486 * stub-objc.c : Likewise.
7487
a1661b90
MP
74882015-06-08 Marek Polacek <polacek@redhat.com>
7489
7490 PR c/66415
7491 * c-format.c (location_from_offset): Return LOC if LINE is null.
7492
d7438551
AH
74932015-06-05 Aldy Hernandez <aldyh@redhat.com>
7494
7495 * c-common.h (c_parse_final_cleanups): New prototype.
7496 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7497
b3d5bc62
JJ
74982015-06-04 Sriraman Tallam <tmsriram@google.com>
7499
7500 * c-common.c (noplt): New attribute.
7501 (handle_noplt_attribute): New handler.
7502
ecb9f223
AM
75032015-06-04 Andrew MacLeod <amacleod@redhat.com>
7504
7505 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7506 * c-ada-spec.c: Likewise.
7507 * c-cilkplus.c: Likewise.
7508 * c-common.c: Likewise.
7509 * c-common.h: Likewise.
7510 * c-cppbuiltin.c: Likewise.
7511 * c-dump.c: Likewise.
7512 * c-format.c: Likewise.
7513 * c-gimplify.c: Likewise.
7514 * c-indentation.c: Likewise.
7515 * c-lex.c: Likewise.
7516 * c-omp.c: Likewise.
7517 * c-opts.c: Likewise.
7518 * c-pch.c: Likewise.
7519 * c-ppoutput.c: Likewise.
7520 * c-pragma.c: Likewise.
7521 * c-pretty-print.c: Likewise.
7522 * c-semantics.c: Likewise.
7523 * c-ubsan.c: Likewise.
7524 * cilk.c: Likewise.
7525 * stub-objc.c: Likewise.
7526
6ac48155
DM
75272015-06-02 David Malcolm <dmalcolm@redhat.com>
7528
7529 PR c/66220:
7530 * c-indentation.c (should_warn_for_misleading_indentation): Use
7531 expand_location rather than expand_location_to_spelling_point.
7532 Don't warn if the guarding statement is more indented than the
7533 next/body stmts.
7534
773ce42e
DM
75352015-06-02 David Malcolm <dmalcolm@redhat.com>
7536
7537 * c-indentation.c (warn_for_misleading_indentation): Bail out
7538 immediately if -Wmisleading-indentation isn't enabled.
7539
4fef8379
ML
75402015-06-01 Martin Liska <mliska@suse.cz>
7541
7542 * c-format.c (check_format_arg):Use new type-based pool allocator.
7543 (check_format_info_main) Likewise.
7544
1edfb384
EB
75452015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7546
7547 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7548 (has_nontrivial_methods): Likewise.
7549
9677ef52
MP
75502015-05-25 Marek Polacek <polacek@redhat.com>
7551
7552 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7553
fd5c817a
MP
75542015-05-22 Marek Polacek <polacek@redhat.com>
7555
7556 PR c/47043
7557 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7558
a2f45fe6 75592015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7560
7561 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7562 STACK_GROWS_DOWNWARD.
7563
a2f45fe6 75642015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7565
7566 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7567 STACK_GROWS_DOWNWARD rather than if it is defined.
7568
0fee2ac2 75692015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7570
0fee2ac2
MLI
7571 PR c/52952
7572 * c-format.c (location_column_from_byte_offset): New.
7573 (location_from_offset): New.
7574 (struct format_wanted_type): Add offset_loc field.
7575 (check_format_info): Move handling of location for extra arguments
7576 closer to the point of warning.
7577 (check_format_info_main): Pass the result of location_from_offset
7578 to warning_at.
7579 (format_type_warning): Pass the result of location_from_offset
7580 to warning_at.
7581
cf4ef6f7
MP
75822015-05-20 Marek Polacek <polacek@redhat.com>
7583
7584 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7585
3a65ee74
MP
75862015-05-20 Marek Polacek <polacek@redhat.com>
7587
7588 * c-ada-spec.c (dump_sloc): Use DECL_P.
7589
21b634ae
MP
75902015-05-20 Marek Polacek <polacek@redhat.com>
7591
7592 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7593 * c-common.c: Likewise.
7594
0e50b624
DM
75952015-05-19 David Malcolm <dmalcolm@redhat.com>
7596
7597 * c-common.h (fe_file_change): Strengthen param from
7598 const line_map * to const line_map_ordinary *.
7599 (pp_file_change): Likewise.
7600 * c-lex.c (fe_file_change): Likewise.
7601 (cb_define): Use linemap_check_ordinary when invoking
7602 SOURCE_LINE.
7603 (cb_undef): Likewise.
7604 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7605 invoking cb_file_change.
7606 (c_finish_options): Likewise.
7607 (push_command_line_include): Likewise.
7608 (cb_file_change): Strengthen param "new_map" from
7609 const line_map * to const line_map_ordinary *.
7610 * c-ppoutput.c (cb_define): Likewise for local "map".
7611 (pp_file_change): Likewise for param "map" and local "from".
7612
fab27f52
MM
76132015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7614
7615 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7616
2fe1d762
TV
76172015-05-18 Tom de Vries <tom@codesourcery.com>
7618
7619 * c-common.c (build_va_arg_1): New function.
7620 (build_va_arg): Add address operator to va_list operand if necessary.
7621
7a37fa90
MM
76222015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7623
7624 PR c/48956
7625 * c-common.c (int_safely_convertible_to_real_p): Define.
7626 (unsafe_conversion_p): Check conversions involving complex types.
7627 (conversion_warning): Add new warning message for conversions which
7628 discard imaginary component.
7629 * c-common.h: (enum conversion_safety): Add new enumerator for such
7630 conversions.
7631
3aa3c9fc
MP
76322015-05-14 Marek Polacek <polacek@redhat.com>
7633
7634 PR c/66066
7635 PR c/66127
7636 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7637 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7638 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7639 use it. If FOR_INT_CONST, require that all evaluated operands be
7640 INTEGER_CSTs.
7641
c3388e62
DM
76422015-05-12 David Malcolm <dmalcolm@redhat.com>
7643
7644 * c-common.h (warn_for_misleading_indentation): New prototype.
7645 * c-indentation.c: New file.
7646 * c.opt (Wmisleading-indentation): New option.
7647
c7b38fd5
TV
76482015-05-12 Tom de Vries <tom@codesourcery.com>
7649
7650 PR tree-optimization/66010
7651 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7652
381bf11e
JM
76532015-05-09 Jason Merrill <jason@redhat.com>
7654
edff0c06
JM
7655 * c-opts.c (c_common_post_options): Also clear
7656 cpp_opts->cpp_warn_cxx11_compat.
7657
129211bc
JM
7658 * c-common.h (enum cxx_dialect): Add cxx_unset.
7659 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7660 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7661
381bf11e
JM
7662 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7663 (std=gnu++0x): Mark as Undocumented.
7664 (std=gnu++1y): Add deprecated message.
7665
fe191308
JM
76662015-05-08 Jason Merrill <jason@redhat.com>
7667
765189ff
JM
7668 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7669 * c-opts.c: Adjust.
7670
fe191308
JM
7671 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7672
755e528f
MP
76732015-05-08 Marek Polacek <polacek@redhat.com>
7674
7675 PR c/64918
7676 * c.opt (Woverride-init-side-effects): New option.
7677
0173bd2a
MP
76782015-05-07 Marek Polacek <polacek@redhat.com>
7679
7680 PR c/65179
7681 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7682 negative value.
7683 * c.opt (Wshift-negative-value): New option.
7684 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7685 when -Wextra and C99/C++11 mode.
7686
e0f0d3b9
MP
76872015-05-07 Marek Polacek <polacek@redhat.com>
7688 Martin Uecker <uecker@eecs.berkeley.edu>
7689
7690 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7691 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7692
8243e2a9
JM
76932015-05-05 Jason Merrill <jason@redhat.com>
7694
7695 * c.opt (Wterminate): New.
7696
577cd070
MP
76972015-04-30 Marek Polacek <polacek@redhat.com>
7698
7699 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7700 require that the non-constant be of a boolean type.
7701
0373796b
JT
77022015-04-29 Josh Triplett <josh@joshtriplett.org>
7703
e0f0d3b9
MP
7704 * c-common.c (handle_section_attribute): Refactor to reduce
7705 nesting and distinguish between error cases.
0373796b 7706
716c0ba6
MP
77072015-04-29 Marek Polacek <polacek@redhat.com>
7708
7709 PR c/64610
7710 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7711 with 0/1.
7712
8848828b
JJ
77132015-04-29 Jakub Jelinek <jakub@redhat.com>
7714
7715 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7716 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7717 HOST_BITS_PER_WIDE_INT.
7718
ecd0e562
TV
77192015-04-28 Tom de Vries <tom@codesourcery.com>
7720
7721 PR tree-optimization/65887
7722 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7723
2a877204 77242015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7725 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7726
7727 * c-ada-spec.c (in_function): Delete.
7728 (dump_generic_ada_node): Do not change in_function and remove the
7729 redundant code dealing with it.
7730 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7731 (print_ada_methods): Output the static member functions in a nested
7732 package after the regular methods as well as associated renamings.
7733
4853031e
MP
77342015-04-24 Marek Polacek <polacek@redhat.com>
7735
7736 PR c/65830
7737 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7738 and OPT_Wshift_count_overflow.
7739
8c2b7f79
MP
7740 PR c/63357
7741 * c-common.c (warn_logical_operator): Warn if the operands have the
7742 same expressions.
7743
b8787813
MP
77442015-04-24 Marek Polacek <polacek@redhat.com>
7745
7746 PR c/61534
7747 * c-common.c (warn_logical_operator): Bail if either operand comes
7748 from a macro expansion.
7749
8fba1830
BRF
77502015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7751
7752 PR target/55143
7753 * c-common.c (c_default_pointer_mode): Add definition.
7754 * c-common.h (c_default_pointer_mode): Add declaration.
7755
17958621
JJ
77562015-03-11 Jakub Jelinek <jakub@redhat.com>
7757
7758 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7759 on record_builtin_type argument.
7760
7ccb1a11
JJ
77612015-03-10 Jakub Jelinek <jakub@redhat.com>
7762
7763 PR c/65120
7764 * c-common.c (warn_logical_not_parentheses): Don't warn for
7765 !x == 0 or !x != 0.
7766
04fd785e
MP
77672015-03-07 Marek Polacek <polacek@redhat.com>
7768
7769 PR sanitizer/65280
7770 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7771 before trying to figure out whether we have a flexible array member.
7772
a4e26206 77732015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7774 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7775
7776 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7777
0d2489f4
EB
77782015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7779
7780 PR ada/65319
7781 * c-ada-spec.c (print_destructor): Remove obsolete code.
7782
83ed54d7
EB
77832015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7784
7785 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7786 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7787 DECL_TEMPLATE_RESULT emulations.
7788 (dump_ada_template)): Add guard for TYPE_METHODS.
7789
7631f0e2
MP
77902015-02-27 Marek Polacek <polacek@redhat.com>
7791
7792 PR c/65040
7793 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7794
d1783ae5
KT
77952015-02-27 Kai Tietz <ktietz@redhat.com>
7796
7797 PR c/35330
7798 * c-pragma.c (handle_pragma_weak): Do not try to create
7799 weak/alias of declarations not being function, or variable
7800 declarations.
7801
56a9f6bc
TS
78022015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7803
7804 PR libgomp/64625
7805 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7806 Remove macros.
7807 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7808
3d5cb23d
MP
78092015-02-16 Marek Polacek <polacek@redhat.com>
7810
7811 PR c/65066
7812 * c-format.c (check_format_types): Handle null param.
7813
fa008882
MP
78142015-02-13 Marek Polacek <polacek@redhat.com>
7815
7816 PR c/65040
7817 * c-format.c (check_format_types): Don't warn about different
7818 signedness if the original value is in the range of WANTED_TYPE.
7819
785f21af
JM
78202015-02-12 Jason Merrill <jason@redhat.com>
7821
7822 PR c++/64956
7823 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7824 to the current highest version.
7825 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7826
4886ec8e
JJ
78272015-02-04 Jakub Jelinek <jakub@redhat.com>
7828
7829 PR c/64824
7830 PR c/64868
7831 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7832 instead of RDIV_EXPR. Use build_binary_op instead of
7833 build2_loc.
7834
40fecdd6
JM
78352015-01-30 Joseph Myers <joseph@codesourcery.com>
7836
7837 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7838 to pass input_location as first argument.
7839
a0c88d06
TV
78402015-01-23 Tom de Vries <tom@codesourcery.com>
7841
7842 PR libgomp/64672
7843 * c.opt (fopenacc): Mark as LTO option.
7844
1506ae0e
TV
78452015-01-23 Tom de Vries <tom@codesourcery.com>
7846
7847 PR libgomp/64707
7848 * c.opt (fopenmp): Mark as LTO option.
7849
31be63ab
JJ
78502015-01-21 Jakub Jelinek <jakub@redhat.com>
7851
7852 PR c/63307
b1726d6c 7853 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7854 (compare_decls): Fix up formatting.
7855
78562015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7857
7858 PR c/63307
7859 * cilk.c: Include vec.h.
7860 (struct cilk_decls): New structure.
7861 (wrapper_parm_cb): Split this function to...
7862 (fill_decls_vec): ...this...
7863 (create_parm_list): ...and this.
7864 (compare_decls): New function.
7865 (for_local_cb): Remove.
7866 (wrapper_local_cb): Ditto.
7867 (build_wrapper_type): For now first traverse and fill vector of
7868 declarations then sort it and then deal with sorted vector.
7869 (cilk_outline): Ditto.
7870 (declare_one_free_variable): Ditto.
7871
6875457f
JM
78722015-01-21 Jason Merrill <jason@redhat.com>
7873
7874 PR c++/64629
7875 * c-format.c (check_format_arg): Call decl_constant_value.
7876
185c9e56
ML
78772015-01-19 Martin Liska <mliska@suse.cz>
7878
7879 * c-common.c (handle_noicf_attribute): New function.
7880
41dbbb37
TS
78812015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7882 Bernd Schmidt <bernds@codesourcery.com>
7883 James Norris <jnorris@codesourcery.com>
7884 Cesar Philippidis <cesar@codesourcery.com>
7885 Ilmir Usmanov <i.usmanov@samsung.com>
7886 Jakub Jelinek <jakub@redhat.com>
7887
7888 * c.opt (fopenacc): New option.
7889 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7890 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7891 New macros.
7892 * c-common.h (c_finish_oacc_wait): New prototype.
7893 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7894 (c_finish_oacc_wait): New function.
7895 * c-pragma.c (oacc_pragmas): New variable.
7896 (c_pp_lookup_pragma, init_pragma): Handle it.
7897 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7898 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7899 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7900 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7901 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7902 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7903 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7904 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7905 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7906 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7907 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7908 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7909 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7910 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7911 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7912 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7913 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7914 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7915 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7916 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7917 PRAGMA_OACC_CLAUSE_WORKER.
7918
3f8257db 79192015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7920
7921 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7922 for the new option fstack-protector_explicit.
7923 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7924 (handle_stack_protect_attribute): New function.
7925
3f8257db 79262015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7927
7928 * c.opt: New option -Warray-bounds=.
7929
adfac8df
JJ
79302015-01-09 Michael Collison <michael.collison@linaro.org>
7931
7932 * array-notation-common.c: Include hash-set.h, machmode.h,
7933 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7934 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7935 * c-ada-spec.c: Ditto.
7936 * c-cilkplus.c: Ditto.
7937 * c-common.c: Include input.h due to flattening of tree.h.
7938 Define macro GCC_C_COMMON_C.
7939 * c-common.h: Flatten tree.h header files into c-common.h.
7940 Remove include of tree-core.h.
7941 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7942 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7943 fold-const.h, wide-int.h, and inchash.h due to
7944 flattening of tree.h.
7945 * c-dump.c: Ditto.
7946 * c-format.c: Flatten tree.h header files into c-common.h.
7947 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7948 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7949 fold-const.h, wide-int.h, and inchash.h due to
7950 flattening of tree.h.
7951 * c-dump.c: Include hash-set.h, machmode.h,
7952 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7953 fold-const.h, wide-int.h, and inchash.h due to
7954 flattening of tree.h.
7955 * c-format.c: Include hash-set.h, machmode.h,
7956 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7957 fold-const.h, wide-int.h, inchash.h and real.h due to
7958 flattening of tree.h.
7959 * c-gimplify.c: Include hash-set.h, machmode.h,
7960 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7961 fold-const.h, wide-int.h, and inchash.h due to
7962 flattening of tree.h.
7963 * cilk.c: Ditto.
7964 * c-lex.c: Ditto.
7965 * c-omp.c: Ditto.
7966 * c-opts.c: Ditto.
7967 * c-pch.c: Ditto.
7968 * c-ppoutput.c: Ditto.
7969 * c-pragma.c: Ditto.
7970 * c-pretty-print.c: Ditto.
7971 * c-semantics.c: Ditto.
7972 * c-ubsan.c: Ditto.
7973 * stub-objc.c: Ditto.
7974
f5481fc4
JM
79752015-01-08 Jason Merrill <jason@redhat.com>
7976
7977 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7978 do_ubsan_in_current_function.
7979 (ubsan_maybe_instrument_reference_or_call): Likewise.
7980 * c-ubsan.h: Declare it.
7981
de35aa66
MS
79822015-01-08 Mike Stump <mikestump@comcast.net>
7983
7984 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7985
4a9a42ab
MP
79862015-01-07 Marek Polacek <polacek@redhat.com>
7987
7988 PR c/64440
7989 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7990 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7991
2f42e5de
TS
79922015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7993
7994 PR c++/31397
7995 * c.opt (Wsuggest-override): New option.
7996
5624e564
JJ
79972015-01-05 Jakub Jelinek <jakub@redhat.com>
7998
7999 Update copyright years.
8000
5bd012f8
MP
80012015-01-05 Marek Polacek <polacek@redhat.com>
8002
8003 PR c/64423
8004 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8005 parameter. Use it.
8006 * c-common.h (warn_array_subscript_with_type_char): Update
8007 declaration.
8008
a7fa8d18
ESR
80092014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8010
8011 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8012 Control macro with flag_sized_deallocation.
8013
3f8257db 80142014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8015
8016 * c.opt (Wdiscarded-array-qualifiers): New option.
8017
1f8d3e84
JJ
80182014-12-19 Jakub Jelinek <jakub@redhat.com>
8019
8020 PR preprocessor/63831
8021 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8022 and __has_cpp_attribute here.
8023 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8024 c_common_has_attribute.
8025 * c-common.h (c_common_has_attribute): New prototype.
8026 * c-lex.c (init_c_lex): Set cb->has_attribute to
8027 c_common_has_attribute instead of cb_has_attribute.
8028 (get_token_no_padding): New function.
8029 (cb_has_attribute): Renamed to ...
8030 (c_common_has_attribute): ... this. No longer static. Use
8031 get_token_no_padding, require ()s, don't build TREE_LIST
8032 unnecessarily, fix up formatting, adjust diagnostics, call
8033 init_attributes.
8034
20b06add
JM
80352014-12-15 Jason Merrill <jason@redhat.com>
8036
8037 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8038 (-Wsized-deallocation): New.
8039 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8040 to on in C++14 and up.
8041
94a073b2
JM
80422014-12-11 Jason Merrill <jason@redhat.com>
8043
acaa5911
JM
8044 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8045
94a073b2
JM
8046 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8047 we aren't complaining about VLAs.
8048
7fb66c15
MP
80492014-12-06 Marek Polacek <polacek@redhat.com>
8050
8051 PR tree-optimization/64183
8052 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8053 shift-expression if it is integer_type_node. Use types_compatible_p.
8054
b731b390
JJ
80552014-11-29 Jakub Jelinek <jakub@redhat.com>
8056
8057 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8058 last argument from create_tmp_var_raw and create_tmp_var calls.
8059 * cilk.c (gimplify_cilk_spawn): Likewise.
8060 * c-omp.c (c_finish_omp_atomic): Likewise.
8061
6a4da643
MP
80622014-11-28 Marek Polacek <polacek@redhat.com>
8063
8064 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8065 instead of unsigned_type_node.
8066
541e35a6
MP
80672014-11-28 Marek Polacek <polacek@redhat.com>
8068
8069 PR c/63862
8070 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8071 to op1_utype.
8072 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8073 expression to unsigned_type_node.
8074
dcc97066
MW
80752014-11-20 Mark Wielaard <mjw@redhat.com>
8076
8077 PR debug/38757
8078 * c-opts.c (set_std_c89): Set lang_hooks.name.
8079 (set_std_c99): Likewise.
8080 (set_std_c11): Likewise.
8081 (set_std_cxx98): Likewise.
8082 (set_std_cxx11): Likewise.
8083 (set_std_cxx14): Likewise.
8084 (set_std_cxx1z): Likewise.
8085
aa7da51a
JJ
80862014-11-21 Jakub Jelinek <jakub@redhat.com>
8087
8088 PR target/63764
8089 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8090 return type to bool.
009a3480 8091 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8092 (convert_vector_to_pointer_for_subscript): Change return type to
8093 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8094 and copy it into a TARGET_EXPR and use that instead of *vecp
8095 directly.
8096
538dd0b7
DM
80972014-11-19 David Malcolm <dmalcolm@redhat.com>
8098
8099 Merger of git branch "gimple-classes-v2-option-3".
8100 * ChangeLog.gimple-classes: New.
8101 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8102 from being just a vec<gimple> to a vec<gbind *>.
8103
c39a5e99
JJ
81042014-11-18 Jakub Jelinek <jakub@redhat.com>
8105
8106 PR sanitizer/63813
8107 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8108 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8109 get_pointer_alignment for non-pointers. Use ptype, or if it is
8110 reference type, corresponding pointer type, as type of kind
8111 argument.
8112 (ubsan_maybe_instrument_reference,
8113 ubsan_maybe_instrument_member_call): Adjust callers.
8114
8537a4a9
MP
81152014-11-15 Marek Polacek <polacek@redhat.com>
8116
8117 PR middle-end/63884
8118 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8119 for NULL fndecl.
8120 (extract_array_notation_exprs): Return for NULL node.
8121
2079956a
JM
81222014-11-12 Joseph Myers <joseph@codesourcery.com>
8123
8124 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8125 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8126
1304953e
JJ
81272014-11-12 Jakub Jelinek <jakub@redhat.com>
8128
8129 PR c/59708
8130 * c-common.c (check_builtin_function_arguments): Handle
8131 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8132
e5e44252
AK
81332014-11-10 Andi Kleen <ak@linux.intel.com>
8134
8135 PR c/60804
8136 * c-common.h (check_no_cilk): Declare.
8137 * cilk.c (get_error_location): New function.
8138 (check_no_cilk): Dito.
8139
e64b984d
AK
81402014-11-10 Andi Kleen <ak@linux.intel.com>
8141
8142 * cilk.c (recognize_spawn): Use expression location
8143 for error message.
8144
13c21655
PC
81452014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8146
8147 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8148
42fd12b1
ESR
81492014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8150
8151 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8152 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8153 (__cpp_range_based_for, __cpp_initializer_lists,
8154 __cpp_delegating_constructors, __cpp_nsdmi,
8155 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8156 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8157 __has_cpp_attribute.
8158 * c-lex.c (cb_has_attribute): New callback CPP function;
8159 (init_c_lex): Set has_attribute callback.
8160
6f450181
RB
81612014-11-04 Richard Biener <rguenther@suse.de>
8162
8163 * c-common.c (shorten_compare): Do not shorten mixed
8164 DFP and non-DFP compares.
8165
26f0e1d6
ESR
81662014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8167
8168 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8169 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8170 Commentary and rearrangement of tests.
8171 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8172 Commentary and rearrangement of tests.
ab20d992 8173 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8174 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8175
ef4bddc2
RS
81762014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8177
8178 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8179 enum from machine_mode.
8180
c582198b
AM
81812014-10-28 Andrew MacLeod <amacleod@redhat.com>
8182
adfac8df
JJ
8183 * c-common.c: Adjust include files.
8184 * c-gimplify.c: Ditto.
8185 * cilk.c: Ditto.
8186 * c-pragma.c: Ditto.
8187 * c-ubsan.c: Ditto.
c582198b 8188
60393bbc
AM
81892014-10-27 Andrew MacLeod <amacleod@redhat.com>
8190
8191 * c-gimplify.c: Adjust include files.
8192
d723bb7c
MLI
81932014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8194
8195 PR c++/53061
8196 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8197 c_common_initialize_diagnostics.
8198 * c-common.h: Likewise.
8199
90f3520e
MP
82002014-10-24 Marek Polacek <polacek@redhat.com>
8201
8202 PR c/56980
8203 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8204 print "struct"/"union"/"enum" for typedefed names.
8205
59d7607a
MP
82062014-10-23 Marek Polacek <polacek@redhat.com>
8207
8208 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8209 in unsigned type.
8210
d95a2703
JJ
82112014-10-22 Jakub Jelinek <jakub@redhat.com>
8212 Yury Gribov <y.gribov@samsung.com>
8213
8214 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8215 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8216 instead of flag_sanitize_recover as bool flag.
8217
8e6ef852
KY
82182014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8219
8220 * cilk.c: Revert previous change.
8221
948cf550
IZ
82222014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8223
8224 PR c/63307
8225 * cilk.c: Include vec.h.
8226 (struct cilk_decls): New structure.
8227 (wrapper_parm_cb): Split this function to...
8228 (fill_decls_vec): ...this...
8229 (create_parm_list): ...and this.
8230 (compare_decls): New function.
8231 (for_local_cb): Remove.
8232 (wrapper_local_cb): Ditto.
8233 (build_wrapper_type): For now first traverse and fill vector of
8234 declarations then sort it and then deal with sorted vector.
8235 (cilk_outline): Ditto.
8236 (declare_one_free_variable): Ditto.
8237
92574c7c
MP
82382014-10-17 Marek Polacek <polacek@redhat.com>
8239
8240 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8241 * c.opt (Wimplicit-int): Initialize to -1.
8242
83685514
AM
82432014-10-16 Andrew MacLeod <amacleod@redhat.com>
8244
8245 * c-pragma.c: Adjust include files.
8246 * c-semantics.c: Likewise.
8247
5b8300ea
DD
82482014-10-16 DJ Delorie <dj@redhat.com>
8249
8250 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8251 multiples of bytes.
8252
5f83e90b
JM
82532014-10-14 Jason Merrill <jason@redhat.com>
8254
8255 PR c++/63455
8256 * c-common.h (CPP_PREPARSED_EXPR): New.
8257 (N_CP_TTYPES): Adjust.
8258
d73326ca
MP
82592014-10-15 Marek Polacek <polacek@redhat.com>
8260
8261 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8262
78a7c317
DD
82632014-10-14 DJ Delorie <dj@redhat.com>
8264
8265 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8266 types, not just __int128.
8267 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8268 types, not just __int128.
8269 (cpp_atomic_builtins): Round pointer sizes up.
8270 (type_suffix): Use type precision, not specific types.
8271 * c-common.c (c_common_reswords): Remove __int128 special case.
8272 (c_common_type_for_size): Check for all __intN types, not just
8273 __int128.
8274 (c_common_type_for_mode): Likewise.
8275 (c_common_signed_or_unsigned_type): Likewise.
8276 (c_build_bitfield_integer_type): Likewise.
8277 (c_common_nodes_and_builtins): Likewise.
8278 (keyword_begins_type_specifier): Likewise.
8279 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8280 __intN variants.
8281
2a22f99c
TS
82822014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8283
8284 * c-common.c: Use hash_table instead of hashtab.
8285
2a8ef767
ESR
82862014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8287
adfac8df 8288 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8289 C++11 section.
8290
3c9aabbd
MG
82912014-10-03 Marc Glisse <marc.glisse@inria.fr>
8292
8293 PR c++/54427
8294 PR c++/57198
8295 PR c++/58845
8296 * c-common.c (warn_logical_operator): Punt for vectors.
8297
a15f7cb8
ESR
82982014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8299
8300 Implement SD-6: SG10 Feature Test Recommendations
8301 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8302 macros and the __has_header macro.
8303
8d0cf15e
JM
83042014-09-30 Jason Merrill <jason@redhat.com>
8305
dd5d5481
JM
8306 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8307 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8308 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8309
b752325e
JM
8310 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8311 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8312
8d0cf15e
JM
8313 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8314 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8315
083e891e
MP
83162014-09-24 Marek Polacek <polacek@redhat.com>
8317
8318 PR c/61405
8319 PR c/53874
8320 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8321
7861b648
AK
83222014-09-23 Andi Kleen <ak@linux.intel.com>
8323
8324 * c-common.c (handle_no_reorder_attribute): New function.
8325 (c_common_attribute_table): Add no_reorder attribute.
8326
9a79452d
JM
83272014-09-22 Joseph Myers <joseph@codesourcery.com>
8328
8329 * c-cppbuiltin.c (c_cpp_builtins): Define
8330 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8331 modes.
8332
dd69f047
JM
83332014-09-18 Joseph Myers <joseph@codesourcery.com>
8334
8335 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8336 for supported floating-point modes.
8337
737a4826
MLI
83382014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8339
8340 * c.opt (Wpsabi): Use LangEnabledBy.
8341 * c-opts.c (c_common_handle_option): Do not handle here.
8342
8cc4b7a2
JM
83432014-09-12 Joseph Myers <joseph@codesourcery.com>
8344
8345 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8346 macros for floating-point modes.
8347
179b5a55
MG
83482014-09-11 Marc Glisse <marc.glisse@inria.fr>
8349
8350 PR target/58757
8351 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8352 __*_DENORM_MIN__ without denormals.
8353
570a11fe
JJ
83542014-09-10 Jakub Jelinek <jakub@redhat.com>
8355
8356 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8357 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8358 ubsan_create_data callers.
8359 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8360 index is constant or BIT_AND_EXPR with constant mask and is
8361 small enough for the bound.
8362 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8363 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8364
b559c810
MLI
83652014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8366
8367 * c.opt: Add CppReason to various flags.
8368 (Wdate-time): Re-sort.
8369 * c-common.c: Include c-common.h earlier.
8370 (struct reason_option_codes_t): Delete.
8371 (c_option_controlling_cpp_error): Prefix global type and struct
8372 with cpp_.
8373
1ef33fd4
MLI
83742014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8375
8376 * c.opt (Wnormalized): New.
8377 (Wnormalized=): Use Enum and Reject Negative.
8378 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8379
66bb34c0
JM
83802014-09-08 Joseph Myers <joseph@codesourcery.com>
8381
8382 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8383 digits of floating-point modes if -fbuilding-libgcc.
8384
53d68b9f
JM
83852014-09-05 Joseph Myers <joseph@codesourcery.com>
8386
8387 * c-cppbuiltin.c (c_cpp_builtins): Also define
8388 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8389 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8390 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8391 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8392 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8393 __LIBGCC_STACK_GROWS_DOWNWARD__,
8394 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8395 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8396 __LIBGCC_DWARF_FRAME_REGISTERS__,
8397 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8398 __LIBGCC_STACK_POINTER_REGNUM__ and
8399 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8400 (builtin_define_with_value): Handle backslash-escaping in string
8401 macro values.
8402
f65586dc
RB
84032014-09-05 Richard Biener <rguenther@suse.de>
8404
8405 PR middle-end/63148
8406 * c-format.c (check_format_arg): Properly handle
8407 effectively signed POINTER_PLUS_EXPR offset.
8408
2b71f4a4
MLI
84092014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8410
8411 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8412 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8413 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8414 and Init.
8415 * c-opts.c (c_common_handle_option): Do not handle here.
8416 (sanitize_cpp_opts): Likewise.
8417 * c-common.c (struct reason_option_codes_t): Handle
8418 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8419
d2e4feca
MP
84202014-09-03 Marek Polacek <polacek@redhat.com>
8421
8422 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8423
9a771876
JJ
84242014-09-02 Jakub Jelinek <jakub@redhat.com>
8425 Balaji V. Iyer <balaji.v.iyer@intel.com>
8426 Igor Zamyatin <igor.zamyatin@intel.com>
8427
8428 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8429 * c-common.c (c_common_reswords): Added _Cilk_for.
8430 * c-common.h (enum rid): Added RID_CILK_FOR.
8431 (cilk_for_number_of_iterations): Add declaration.
8432 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8433 CILK_FOR.
8434 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8435 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8436
81b5d104
MLI
84372014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8438
8439 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8440 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8441 Wundef): Use CPP, Var and Init.
8442 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8443
b753b37b
MLI
84442014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8445
8446 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8447 * c-opts.c (c_common_handle_option): Do not handle here.
8448
028aee17
JM
84492014-08-25 Jason Merrill <jason@redhat.com>
8450
8451 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8452 -std=c++14 and -std=gnu++14, rather than the reverse.
8453 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8454 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8455 * c-common.h (cxx_dialect): Remove cxx1y.
8456
e4276ba5
ESR
84572014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8458
8459 * c-common.h (enum cxx_dialect): Add cxx14.
8460 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8461 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8462 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8463
a545cacd
JM
84642014-08-22 Jason Merrill <jason@redhat.com>
8465
8466 * c.opt (std=gnu++17): Fix alias.
8467
59ea0364
MP
84682014-08-22 Marek Polacek <polacek@redhat.com>
8469
8470 PR c++/62199
8471 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8472 check for vector types. Drop LHS argument.
8473 * c-common.h (warn_logical_not_parentheses): Adjust.
8474
596e808c
MLI
84752014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8476
8477 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8478 (Wmultichar): Likewise.
8479 (Wdate-time): Use C-family languages instead of Common. Use CPP
8480 and Var.
8481 * c-opts.c (c_common_handle_option): Do not handle the above
8482 options here.
8483 (sanitize_cpp_opts): Likewise.
8484
18767f65
MLI
84852014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8486
8487 PR fortran/44054
8488 * c-opts.c: Include tree-diagnostics.h.
8489 (c_diagnostic_finalizer): New.
8490 (c_common_initialize_diagnostics): Use it.
8491
b4413594
MLI
84922014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8493
8494 PR preprocessor/51303
8495 * c-common.c (struct reason_option_codes_t option_codes):
8496 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8497
43f9a13c
MLI
84982014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8499
8500 PR c/60975
8501 PR c/53063
8502 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8503 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8504 (c_common_post_options): Call init_global_opts_from_cpp.
8505 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8506
04159acf
MP
85072014-08-19 Marek Polacek <polacek@redhat.com>
8508
8509 PR c++/62153
8510 * c-common.c (maybe_warn_bool_compare): New function.
8511 * c-common.h (maybe_warn_bool_compare): Declare.
8512 * c.opt (Wbool-compare): New option.
8513
35aff4fb
MP
85142014-08-19 Marek Polacek <polacek@redhat.com>
8515
8516 * c.opt (Wc99-c11-compat): New option.
8517
177cce46
MP
85182014-08-19 Marek Polacek <polacek@redhat.com>
8519
8520 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8521 to warn_c90_c99_compat.
8522 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8523 to -1.
8524
6ae9194f
MLI
85252014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8526 Steven Bosscher <steven@gcc.gnu.org>
8527
8528 PR c/52952
8529 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8530 format_check_results.
8531 (check_function_format): Use true and add comment for boolean
8532 argument.
8533 (finish_dollar_format_checking): Use explicit location when warning.
8534 (check_format_info): Likewise.
8535 (check_format_arg): Set extra_arg_loc and format_string_loc.
8536 (check_format_info_main): Use explicit location when warning.
8537 (check_format_types): Pass explicit location.
8538 (format_type_warning): Likewise.
8539
8e54f6d3
MLI
85402014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8541
8542 PR fortran/44054
8543 * c-format.c: Handle Fortran flags.
8544
cd4e76fc
IZ
85452014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8546
8547 PR other/61962
8548 * array-notation-common.c (find_rank): Added handling for other
8549 types of references.
8550
f3bede71
MP
85512014-08-10 Marek Polacek <polacek@redhat.com>
8552
8553 PR c/51849
8554 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8555 * c.opt (Wc90-c99-compat): Add option.
8556
9f25a338
TS
85572014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8558
8559 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8560
62e4eb35
MP
85612014-08-03 Marek Polacek <polacek@redhat.com>
8562
ab20d992 8563 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8564 (c_add_case_label): Pass loc to check_case_value.
8565
b787e7a2
TS
85662014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8567
8568 * cilk.c: Use hash_map instead of pointer_map.
8569
6e2830c3
TS
85702014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8571
8572 * c-gimplify.c: Use hash_set instead of pointer_set.
8573
a7ee52fb
IZ
85742014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8575
8576 PR middle-end/61455
8577 * array-notation-common.c (extract_array_notation_exprs): Handling
8578 of DECL_EXPR added.
8579
944fa280
JJ
85802014-08-01 Jakub Jelinek <jakub@redhat.com>
8581
8582 * c-common.h (min_align_of_type): Removed prototype.
8583 * c-common.c (min_align_of_type): Removed.
8584 * c-ubsan.h (ubsan_maybe_instrument_reference,
8585 ubsan_maybe_instrument_member_call): New prototypes.
8586 * c-ubsan.c: Include stor-layout.h and builtins.h.
8587 (ubsan_maybe_instrument_reference_or_call,
8588 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8589 functions.
8590
b4dfdc11
MG
85912014-07-31 Marc Glisse <marc.glisse@inria.fr>
8592
8593 PR c++/60517
8594 * c.opt (-Wreturn-local-addr): Move to common.opt.
8595
a41844e5
JM
85962014-07-30 Jason Merrill <jason@redhat.com>
8597
8598 PR c++/61659
8599 PR c++/61687
8600 Revert:
8601 * c.opt (-fuse-all-virtuals): New.
8602
976d5a22
TT
86032014-07-30 Tom Tromey <tromey@redhat.com>
8604
8605 PR c/59855
8606 * c.opt (Wdesignated-init): New option.
8607 * c-common.c (c_common_attribute_table): Add "designated_init".
8608 (handle_designated_init): New function.
8609
cdc94aca
MP
86102014-07-24 Marek Polacek <polacek@redhat.com>
8611
8612 PR c/57653
8613 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8614
f41373b6
DS
86152014-07-16 Dodji Seketeli <dodji@redhat.com>
8616
8617 PR preprocessor/60723 - missing system-ness marks for macro tokens
8618 * c-ppoutput.c (struct print::prev_was_system_token): New data
8619 member.
8620 (init_pp_output): Initialize it.
8621 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8622 (do_line_change): Return a flag saying if a line marker was
8623 emitted or not.
8624 (scan_translation_unit): Detect if the system-ness of the token we
8625 are about to emit is different from the one of the previously
8626 emitted token. If so, emit a line marker. Avoid emitting useless
8627 adjacent line markers. Avoid emitting line markers for tokens
8628 originating from the expansion of built-in macros.
8629 (scan_translation_unit_directives_only): Adjust.
8630
4d661eaa
MP
86312014-07-15 Marek Polacek <polacek@redhat.com>
8632
8633 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8634 TYPE_MAX_VALUE is NULL.
8635
b108f48f
JJ
86362014-07-14 Jakub Jelinek <jakub@redhat.com>
8637
8638 PR middle-end/61294
8639 * c.opt (Wmemset-transposed-args): New warning.
8640
c0221884
JM
86412014-07-10 Jason Merrill <jason@redhat.com>
8642
8643 PR c++/61659
8644 PR c++/61687
8645 * c.opt (-fuse-all-virtuals): New.
8646
63dfbb95
RB
86472014-07-09 Richard Biener <rguenther@suse.de>
8648
8649 PR c-family/61741
8650 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8651 using unsigned arithmetic if overflow does not wrap instead of
8652 if overflow is undefined.
8653
773ec47f
MP
86542014-07-06 Marek Polacek <polacek@redhat.com>
8655
8656 PR c/6940
8657 * c.opt (Wsizeof-array-argument): New option.
8658
00a7ba58
JJ
86592014-07-03 Jakub Jelinek <jakub@redhat.com>
8660
b1726d6c 8661 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8662 comments->count <= 1, as comments->entries might be NULL.
8663
52ec0ea3
MP
86642014-07-01 Marek Polacek <polacek@redhat.com>
8665
8666 * c.opt (Wint-conversion): New option.
8667
d5c3d343
MP
86682014-07-01 Marek Polacek <polacek@redhat.com>
8669
8670 PR c/58286
8671 * c.opt (Wincompatible-pointer-types): New option.
8672
6e7ceb17
PC
86732014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8674
8675 PR c++/51400
8676 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8677 Do not discard TYPE_QUALS of type.
8678
da73100b
JM
86792014-06-26 Jason Merrill <jason@redhat.com>
8680
8681 * c-common.h (enum cxx_dialect): Add cxx1z.
8682 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8683 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8684
08eedf75
TJ
86852014-06-26 Teresa Johnson <tejohnson@google.com>
8686
8687 * c-common.h (get_dump_info): Declare.
8688 * c-gimplify.c (c_genericize): Use saved dump files.
8689 * c-opts.c (c_common_parse_file): Begin and end dumps
8690 once around parsing invocation.
8691 (get_dump_info): New function.
8692
7b56b2f8
MP
86932014-06-23 Marek Polacek <polacek@redhat.com>
8694 Andrew MacLeod <amacleod@redhat.com>
8695
8696 PR c/61553
8697 * c-common.c (get_atomic_generic_size): Don't segfault if the
8698 type doesn't have a size.
8699
0e37a2f3
MP
87002014-06-20 Marek Polacek <polacek@redhat.com>
8701
8702 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8703 (ubsan_walk_array_refs_r): New function.
8704 (c_genericize): Instrument array bounds.
8705 * c-ubsan.c: Include "internal-fn.h".
8706 (ubsan_instrument_division): Mark instrumented arrays as having
8707 side effects. Adjust ubsan_type_descriptor call.
8708 (ubsan_instrument_shift): Likewise.
8709 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8710 (ubsan_instrument_bounds): New function.
8711 (ubsan_array_ref_instrumented_p): New function.
8712 (ubsan_maybe_instrument_array_ref): New function.
8713 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8714 (ubsan_array_ref_instrumented_p): Declare.
8715 (ubsan_maybe_instrument_array_ref): Declare.
8716
87172014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8718
8719 PR lto/61123
8720 * c.opt (fshort-enums): Add to LTO.
8721 * c.opt (fshort-wchar): Likewise.
8722
5c3d09f7
MP
87232014-06-16 Marek Polacek <polacek@redhat.com>
8724
8725 PR c/60439
8726 * c.opt (Wswitch-bool): Add Var.
8727
9cf32741
JJ
87282014-06-12 Jakub Jelinek <jakub@redhat.com>
8729
8730 PR middle-end/61486
8731 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8732 #pragma omp target teams or
8733 #pragma omp {,target }teams distribute simd.
8734
62984918
JM
87352014-06-12 Jason Merrill <jason@redhat.com>
8736
8737 * c.opt (Wabi=, fabi-compat-version): New.
8738 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8739 (c_common_post_options): Handle flag_abi_compat_version default.
8740 Disallow -fabi-compat-version=1.
8741 * c-common.h (abi_version_crosses): New.
8742
f961457f
JH
87432014-06-11 Jan Hubicka <hubicka@ucw.cz>
8744
adfac8df 8745 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8746 section names that are no longer trees.
8747
92d28cbb
JJ
87482014-06-10 Jakub Jelinek <jakub@redhat.com>
8749
8750 PR fortran/60928
8751 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8752 (omp_pragmas): ... back here.
8753
742938c9
MP
87542014-06-05 Marek Polacek <polacek@redhat.com>
8755
8756 PR c/49706
8757 * c-common.c (warn_logical_not_parentheses): New function.
8758 * c-common.h (warn_logical_not_parentheses): Declare.
8759 * c.opt (Wlogical-not-parentheses): New option.
8760
9d548dfb
MP
87612014-06-04 Marek Polacek <polacek@redhat.com>
8762
8763 PR c/30020
8764 * c-common.c (check_case_bounds): Add location parameter.
8765 Use it.
8766 (c_add_case_label): Pass loc to check_case_bounds.
8767
fedfecef
MP
87682014-06-03 Marek Polacek <polacek@redhat.com>
8769
8770 PR c/60439
8771 * c.opt (Wswitch-bool): New option.
8772
f6a7cffc
TS
87732014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8774
040d18b6
TS
8775 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8776 Remove prototypes.
8777 (record_types_used_by_current_var_decl): Move prototype to where
8778 it belongs.
8779
f6a7cffc
TS
8780 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8781 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8782 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8783
632f2871
RS
87842014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8785
8786 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8787 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8788 void_zero_node.
8789 * c-pretty-print.c (pp_c_void_constant): New function.
8790 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8791 (c_pretty_printer::expression): Handle VOID_CST.
8792 * cilk.c (extract_free_variables): Likewise.
8793 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8794 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8795
766090c2
TS
87962014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8797
8798 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8799 * c-pragma.c (push_alignment): Adjust.
8800 (handle_pragma_push_options): Likewise.
8801
661a0813
MP
88022014-05-09 Marek Polacek <polacek@redhat.com>
8803
8804 PR c/50459
8805 * c-common.c (check_user_alignment): Return -1 if alignment is error
8806 node.
8807 (handle_aligned_attribute): Don't call default_conversion on
8808 FUNCTION_DECLs.
8809 (handle_vector_size_attribute): Likewise.
8810 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8811 (handle_sentinel_attribute): Call default_conversion and allow even
8812 integral types as an argument.
8813
2793eeab
MP
88142014-05-08 Marek Polacek <polacek@redhat.com>
8815
8816 PR c/61053
8817 * c-common.c (min_align_of_type): New function factored out from...
8818 (c_sizeof_or_alignof_type): ...here.
8819 * c-common.h (min_align_of_type): Declare.
8820
f827930a
MP
88212014-05-08 Marek Polacek <polacek@redhat.com>
8822
8823 PR c/61077
8824 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8825 parameter type of main.
8826
ca49b74e
DD
88272014-05-07 DJ Delorie <dj@redhat.com>
8828
8829 * c-cppbuiltin.c (print_bits_of_hex): New.
8830 (builtin_define_type_minmax): Print values using hex so as not to
8831 require a pre-computed list of string values.
8832
1d60af08
KZ
88332014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8834 Mike Stump <mikestump@comcast.net>
8835 Richard Sandiford <rdsandiford@googlemail.com>
8836
8837 * c-ada-spec.c: Include wide-int.h.
8838 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8839 (dump_generic_ada_node): Use wide-int interfaces.
8840 * c-common.c: Include wide-int-print.h.
8841 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8842 (pointer_int_sum): Use wide-int interfaces.
8843 (c_common_nodes_and_builtins): Use make_int_cst.
8844 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8845 (handle_alloc_size_attribute): Use wide-int interfaces.
8846 (get_nonnull_operand): Likewise.
8847 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8848 * c-lex.c: Include wide-int.h.
8849 (narrowest_unsigned_type): Take a widest_int rather than two
8850 HOST_WIDE_INTs.
8851 (narrowest_signed_type): Likewise.
8852 (interpret_integer): Update accordingly. Use wide-int interfaces.
8853 (lex_charconst): Use wide-int interfaces.
8854 * c-pretty-print.c: Include wide-int.h.
8855 (pp_c_integer_constant): Use wide-int interfaces.
8856 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8857 INT_CST_LT_UNSIGNED.
8858
b15458be
RB
88592014-05-06 Richard Biener <rguenther@suse.de>
8860
8861 * c-opts.c (c_common_post_options): For -freestanding,
8862 -fno-hosted and -fno-builtin disable pattern recognition
8863 if not enabled explicitely.
8864
6577374e
MP
88652014-05-02 Marek Polacek <polacek@redhat.com>
8866
8867 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8868
d00887e8
MP
88692014-05-01 Marek Polacek <polacek@redhat.com>
8870
8871 PR c/43245
8872 * c.opt (Wdiscarded-qualifiers): Add.
8873
f8ed5150
MP
88742014-04-30 Marek Polacek <polacek@redhat.com>
8875
8876 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8877 INT_MIN / -1 sanitization only for integer types.
8878
45484dcf
MP
88792014-04-25 Marek Polacek <polacek@redhat.com>
8880
8881 PR c/18079
8882 * c-common.c (handle_noinline_attribute): Warn if the attribute
8883 conflicts with always_inline attribute.
8884 (handle_always_inline_attribute): Warn if the attribute conflicts
8885 with noinline attribute.
8886
38e514c0
MP
88872014-04-25 Marek Polacek <polacek@redhat.com>
8888
8889 PR c/60156
8890 * c-common.c (check_main_parameter_types): Warn about variadic main.
8891
44875f92
MS
88922014-04-24 Mike Stump <mikestump@comcast.net>
8893
8894 * c.opt (Wshadow-ivar): Default to on.
8895
dcaaa5a0
DP
88962014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8897
8898 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8899
c07d7c02
MP
89002014-04-23 Marek Polacek <polacek@redhat.com>
8901
8902 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8903
1c33c9b7
JJ
89042014-04-22 Jakub Jelinek <jakub@redhat.com>
8905
8906 PR sanitizer/60275
8907 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8908 if flag_sanitize_undefined_trap_on_error.
8909 (ubsan_instrument_division, ubsan_instrument_shift,
8910 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8911 if !flag_sanitize_recover.
8912
793c625f
MG
89132014-04-22 Marc Glisse <marc.glisse@inria.fr>
8914
8915 PR libstdc++/43622
8916 * c-common.c (registered_builtin_types): Make non-static.
8917 * c-common.h (registered_builtin_types): Declare.
8918
b0f1bf36 89192014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8920 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8921
8922 PR c/60819
8923 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8924 apply may-alias the scalar pointer type when applicable.
8925
3b07fa4a
IZ
89262014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8927
8928 PR middle-end/60467
8929 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8930 as possible argument for Cilk_spawn.
8931
cbbd2b1c
TB
89322014-04-11 Tobias Burnus <burnus@net-b.de>
8933
8934 PR c/60194
8935 * c.opt (Wformat-signedness): Add
8936 * c-format.c(check_format_types): Use it.
8937
6415bd5d
JM
89382014-04-11 Jason Merrill <jason@redhat.com>
8939
8940 PR c++/57926
8941 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8942 default_conversion for an array argument.
8943
6525783a
MP
89442014-04-08 Marek Polacek <polacek@redhat.com>
8945
8946 PR sanitizer/60745
8947 * c-ubsan.c: Include asan.h.
8948 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8949
880a467b
NS
89502014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8951
8952 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8953
7b59ff2d
MP
89542014-04-02 Marek Polacek <polacek@redhat.com>
8955
8956 * c-common.h (c_expand_expr): Remove declaration.
8957
8edbfaa6
JJ
89582014-03-28 Jakub Jelinek <jakub@redhat.com>
8959
8960 PR c++/60689
8961 * c-common.c (add_atomic_size_parameter): When creating new
8962 params vector, push the size argument first.
8963
07d72e1d
JJ
89642014-03-26 Jakub Jelinek <jakub@redhat.com>
8965
8966 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8967 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8968 ubsan_create_data callers.
8969
b35e0fa0
JJ
89702014-03-22 Jakub Jelinek <jakub@redhat.com>
8971
8972 PR debug/60603
8973 * c-opts.c (c_finish_options): Restore cb_file_change call to
8974 <built-in>.
8975
39a1ebb3
JJ
89762014-03-13 Jakub Jelinek <jakub@redhat.com>
8977
8978 PR middle-end/36282
8979 * c-pragma.c (apply_pragma_weak): Only look at
8980 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8981 DECL_ASSEMBLER_NAME_SET_P (decl).
8982 (maybe_apply_pending_pragma_weaks): Exit early if
8983 vec_safe_is_empty (pending_weaks) rather than only when
8984 !pending_weaks.
8985 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8986 set assembler name back to NULL afterwards.
8987
a07f6ed2
JM
89882014-03-11 Jason Merrill <jason@redhat.com>
8989
8990 * c.opt: Add -std=gnu++14.
8991
75b107f5
IB
89922014-03-11 Ian Bolton <ian.bolton@arm.com>
8993
8994 * c-opts.c (c_common_post_options): Don't override
8995 -ffp-contract=fast if unsafe-math-optimizations is on.
8996
f42c637e
PM
89972014-03-08 Paulo Matos <paulo@matos-sorge.com>
8998
22b15758 8999 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9000
70e24808
JM
90012014-03-07 Jason Merrill <jason@redhat.com>
9002
9003 * c.opt: Add -std=c++14.
9004
3af9c5e9
MP
90052014-03-06 Marek Polacek <polacek@redhat.com>
9006
9007 PR c/60197
9008 * cilk.c (contains_cilk_spawn_stmt): New function.
9009 (contains_cilk_spawn_stmt_walker): Likewise.
9010 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9011 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9012
b3bdf019
JJ
90132014-03-03 Jakub Jelinek <jakub@redhat.com>
9014
9015 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9016 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9017 even when flag_preprocess_only.
9018
ca7e759d
JM
90192014-02-26 Jason Merrill <jason@redhat.com>
9020
9021 PR c++/59231
9022 PR c++/11586
9023 * c-common.c (shorten_compare): Don't check
9024 c_inhibit_evaluation_warnings.
9025
28e41874
JJ
90262014-02-19 Jakub Jelinek <jakub@redhat.com>
9027
cca615af
JJ
9028 PR c/37743
9029 * c-common.c (c_common_nodes_and_builtins): When initializing
9030 c_uint{16,32,64}_type_node, also set corresponding
9031 uint{16,32,64}_type_node to the same value.
9032
28e41874
JJ
9033 PR c++/60267
9034 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9035 for PRAGMA_IVDEP if flag_preprocess_only.
9036
c2bf53a1
JJ
90372014-02-12 Jakub Jelinek <jakub@redhat.com>
9038
9039 PR c/60101
9040 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9041 if false, add ADD itself, rather than vice versa.
9042 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9043 copy. For SAVE_EXPR, only call merge_tlist once.
9044
8fcbce72
JJ
90452014-02-08 Jakub Jelinek <jakub@redhat.com>
9046
9047 PR middle-end/60092
9048 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9049 and tree_to_uhwi.
9050 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9051 functions.
9052 (c_common_attribute_table): Add alloc_align and assume_aligned
9053 attributes.
9054
0a756a3f
MP
90552014-02-06 Marek Polacek <polacek@redhat.com>
9056
9057 PR c/60087
9058 * c-common.c (warn_for_sign_compare): Call warning_at with location
9059 instead of warning.
9060
7ec4847a
MP
90612014-02-05 Marek Polacek <polacek@redhat.com>
9062
9063 PR c/53123
9064 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9065 statement.
9066
66f20604
MP
90672014-02-04 Marek Polacek <polacek@redhat.com>
9068
9069 PR c/60036
9070 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9071 SAVE_EXPR.
9072
5d77fb19
MG
90732014-02-03 Marc Glisse <marc.glisse@inria.fr>
9074
9075 PR c++/53017
9076 PR c++/59211
9077 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9078 handle_vector_size_attribute, handle_nonnull_attribute): Call
9079 default_conversion on the attribute argument.
9080 (handle_nonnull_attribute): Increment the argument number.
9081
81e5eca8
MP
90822014-01-31 Marek Polacek <polacek@redhat.com>
9083
9084 PR c/59963
9085 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9086 build_function_call_vec.
9087 (resolve_overloaded_builtin): Likewise.
9088 * c-common.h (build_function_call_vec): Adjust declaration.
9089
68fca595
MP
90902014-01-30 Marek Polacek <polacek@redhat.com>
9091
9092 PR c/59940
9093 * c-common.h (unsafe_conversion_p): Adjust declaration.
9094 (warnings_for_convert_and_check): Likewise.
9095 (convert_and_check): Likewise.
9096 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9097 expansion_point_location_if_in_system_header on it.
9098 (warnings_for_convert_and_check): Add location parameter. Call
9099 expansion_point_location_if_in_system_header on it. Use it.
9100 (convert_and_check): Add location parameter. Use it.
9101 (conversion_warning): Likewise.
9102 (c_add_case_label): Adjust convert_and_check calls.
9103 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9104
b72271b9
BI
91052014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9106
9107 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9108 flag_cilkplus.
9109 * c-pragma.c (init_pragma): Likewise.
9110 * c.opt: Likewise.
9111
393e8e8b
MP
91122014-01-23 Marek Polacek <polacek@redhat.com>
9113
9114 PR c/59846
9115 * c-common.c (shorten_compare): Add location_t parameter.
9116 * c-common.h (shorten_binary_op): Adjust declaration.
9117
f04dda30
MP
91182014-01-23 Marek Polacek <polacek@redhat.com>
9119
9120 PR c/58346
9121 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9122 * c-common.h: Declare it.
9123
621955cb
EB
91242014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9125
9126 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9127 * c-ada-spec.c (dump_ads): Likewise.
9128 (cpp_check): Likewise.
9129 (dump_ada_specs): Likewise.
9130
91312014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9132
9133 PR c++/49718
9134 * c-common.c (handle_no_instrument_function_attribute): Allow
9135 no_instrument_function attribute in class member
9136 definition/declaration.
9137
241f845a
JJ
91382014-01-15 Jakub Jelinek <jakub@redhat.com>
9139
9140 PR c/58943
9141 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9142 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9143 being COMPOUND_EXPR.
9144 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9145 operand a SAVE_EXPR and second MODIFY_EXPR.
9146
e83b8e2e
JJ
91472014-01-09 Jakub Jelinek <jakub@redhat.com>
9148
9149 PR target/58115
9150 * c-pch.c (c_common_write_pch): Call
9151 prepare_target_option_nodes_for_pch.
9152
23a5b65a
RS
91532014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9154
9155 Update copyright years
9156
f9030485
RS
91572014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9158
9159 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9160 the copyright notice.
9161
f2aa696b
EB
91622013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9163
9164 * c-ada-spec.c (print_constructor): New function.
9165 (print_destructor): Retrieve the origin of the destructor.
9166 (print_ada_declaration): Revamp handling of constructors/destructors.
9167
3f8257db 91682013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9169 Bill Maddox <maddox@google.com>
9170 Jason Merrill <jason@redhat.com>
9171
9172 * c.opt: Add -fdeclone-ctor-dtor.
9173 * c-opts.c (c_common_post_options): Default to on iff -Os.
9174
41958c28
BI
91752013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9176
9177 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9178 attribute.
9179 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9180 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9181 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9182 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9183 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9184 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9185 PRAGMA_CILK_CLAUSE_UNIFORM.
9186
b1726d6c 9187
12893402
BI
91882013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9189
9190 * cilk.c (cilk_outline): Made this function non-static.
9191 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9192 (create_cilk_wrapper): Added a new parameter: a function pointer.
9193 (c_install_body_w_frame_cleanup): Remove
9194 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9195 * c-common.h (cilk_outline): New prototype.
9196 (gimplify_cilk_spawn): Removed two parameters.
9197 (cilk_install_body_with_frame_cleanup): New prototype.
9198 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9199 CILK_SPAWN_STMT case.
9200
085b42ed
BS
92012013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9202
2ce064c3
BS
9203 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9204
085b42ed
BS
9205 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9206 (int_array_type_node): Remove.
9207 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9208
9e36c9ed
MP
92092013-12-05 Marek Polacek <polacek@redhat.com>
9210
9211 PR c/52023
9212 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9213 [ADJUST_FIELD_ALIGN].
9214
296674db
JM
92152013-12-04 Joseph Myers <joseph@codesourcery.com>
9216
9217 PR c/52023
9218 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9219 and check field alignment if set.
9220 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9221 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9222
b1726d6c 92232013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9224 Marek Polacek <polacek@redhat.com>
9225
9226 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9227 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9228
d7947e19
L
92292013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9230
9231 PR c/59309
9232 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9233 arguments.
9234
fad7652e
JJ
92352013-11-29 Jakub Jelinek <jakub@redhat.com>
9236
9237 PR c/59280
9238 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9239 goto invalid. If it is error_mark_node, don't issue further
9240 diagnostics.
9241
8b5e1202
SO
92422013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9243
9244 * c.opt (Wopenmp-simd): New.
9245
0a508bb6
JJ
92462013-11-22 Jakub Jelinek <jakub@redhat.com>
9247
9248 * c-ubsan.h (ubsan_instrument_return): New prototype.
9249 * c-ubsan.c (ubsan_instrument_return): New function.
9250
2fb9a547
AM
92512013-11-22 Andrew MacLeod <amacleod@redhat.com>
9252
9253 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9254 * c-gimplify.c: Likewise.
9255 * cilk.c: Likewise.
2fb9a547 9256
8400e75e
DM
92572013-11-22 David Malcolm <dmalcolm@redhat.com>
9258
9259 * c-common.c (unsafe_conversion_p): Remove use of
9260 EXPR_LOC_OR_HERE macro.
9261 (conversion_warning): Likewise.
9262 (warnings_for_convert_and_check): Likewise.
9263 (warn_for_collisions_1): Likewise.
9264 (shorten_compare): Likewise, and remove use of in_system_header
9265 macro, using the location from the former.
9266 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9267 (cb_def_pragma): Remove use of in_system_header macro.
9268 (lex_string): Likewise.
9269 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9270
eb1ce453
KZ
92712013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9272 Mike Stump <mikestump@comcast.net>
9273 Richard Sandiford <rdsandiford@googlemail.com>
9274
9275 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9276 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9277 tree_fits_shwi_p or tree_fits_uhwi_p.
9278 (dump_generic_ada_node): Likewise.
9279 * c-format.c (check_format_arg): Likewise.
9280 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9281
6b3b8c27
KZ
92822013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9283
9284 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9285
49b0aa18
JC
92862013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9287
9288 PR c/53001
9289 * c-common.c (unsafe_conversion_p): Make this function
9290 return an enumeration with more detail.
9291 (conversion_warning): Use the new return type of
9292 unsafe_conversion_p to separately warn either about conversions
9293 that lower floating point number precision or about the other
9294 kinds of conversions.
9295 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9296 (unsafe_conversion_p): switching return type to
9297 conversion_safety enumeration.
49b0aa18
JC
9298 * c.opt: Adding new warning -Wfloat-conversion and
9299 enabling it with -Wconversion.
9300
b826515a
BS
93012013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9302
8e745a17
JJ
9303 * c-opts.c: Include plugin.h.
9304 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9305
b9a55b13
MP
93062013-11-19 Marek Polacek <polacek@redhat.com>
9307
9308 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9309 call.
9310 (ubsan_instrument_shift): Likewise.
9311 (ubsan_instrument_vla): Likewise.
9312
7d362f6c
RS
93132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9314
9315 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9316 cast to unsigned type.
9317
386b1f1f
RS
93182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9319
9320 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9321 tree_low_cst.
9322 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9323 rather than tree_low_cst.
9324
ae7e9ddd
RS
93252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9326
9327 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9328 tree_to_uhwi throughout.
9329
9439e9a1
RS
93302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9331
9332 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9333 tree_low_cst (..., 0) with tree_to_shwi throughout.
9334
cc269bb6
RS
93352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9336
9337 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9338 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9339
9541ffee
RS
93402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9341
9342 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9343 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9344
c02065fc
AH
93452013-11-15 Aldy Hernandez <aldyh@redhat.com>
9346
9347 * c-cilkplus.c: New file.
9348 * c-common.c (readonly_error): Add location argument.
9349 * c-common.h (readonly_error): Same.
9350 (c_finish_cilk_clauses): Protoize.
9351 (c_check_cilk_loop): Same.
9352 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9353 Do not fail on error_mark_node.
9354 Abstract increment canonicalization to here...
9355 (c_omp_for_incr_canonicalize_ptr): New.
9356 c-pragma.c (init_pragma): Register "simd" pragma.
9357 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9358 (enum pragma_cilk_clause): New.
9359
9cc65f15
RS
93602013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9361
9362 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9363 wchar_type and host_integerp checks.
9364
18f429e2
AM
93652013-11-14 Andrew MacLeod <amacleod@redhat.com>
9366
9367 * c-common.c: Likewise.
9368 * c-gimplify.c: Likewise.
9369 * cilk.c: Likewise.
9370
d8a2d370
DN
93712013-11-14 Diego Novillo <dnovillo@google.com>
9372
9373 * c-common.c: Include fold-const.h.
9374 Include stor-layout.h.
9375 Include calls.h.
9376 Include stringpool.h.
9377 Include attribs.h.
9378 Include varasm.h.
9379 Include trans-mem.h.
9380 * c-cppbuiltin.c: Include stor-layout.h.
9381 Include stringpool.h.
9382 * c-format.c: Include stringpool.h.
9383 * c-lex.c: Include stringpool.h.
9384 Include stor-layout.h.
9385 * c-pragma.c: Include stringpool.h.
9386 Include attribs.h.
9387 Include varasm.h.
9388 Include gcc-symtab.h.
9389 * c-pretty-print.c: Include stor-layout.h.
9390 Include attribs.h.
9391 * cilk.c: Include stringpool.h.
9392 Include calls.h.
9393
38b7bc7f
JM
93942013-11-13 Joseph Myers <joseph@codesourcery.com>
9395
9396 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9397 * c-common.c (c_common_reswords): Add __auto_type.
9398 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9399
45b0be94
AM
94002013-11-12 Andrew MacLeod <amacleod@redhat.com>
9401
18f429e2
AM
9402 * c-common.c: Include gimplify.h.
9403 * c-gimplify.c: Likewise.
9404 * cilk.c: Likewise.
9405 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9406 * c-ubsan.c: Don't include gimple.h.
45b0be94 9407
582d9b50
JM
94082013-11-12 Joseph Myers <joseph@codesourcery.com>
9409
9410 * c-common.c (c_common_reswords): Add _Thread_local.
9411
6b28e197
JM
94122013-11-09 Joseph Myers <joseph@codesourcery.com>
9413
9414 * c-common.c (atomic_size_supported_p): New function.
9415 (resolve_overloaded_atomic_exchange)
9416 (resolve_overloaded_atomic_compare_exchange)
9417 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9418 Use it instead of comparing size with a local list of sizes.
9419
267bac10
JM
94202013-11-07 Andrew MacLeod <amacleod@redhat.com>
9421 Joseph Myers <joseph@codesourcery.com>
9422
9423 * c-common.h (enum rid): Add RID_ATOMIC.
9424 * c-common.c (c_common_reswords): Add _Atomic.
9425 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9426 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9427 * c-format.c (check_format_types): Check for extra _Atomic
9428 qualifiers in format argument.
9429 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9430 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9431
5157b91e
TB
94322013-11-06 Tobias Burnus <burnus@net-b.de>
9433
9434 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9435
6dbe0958
JM
94362013-11-06 Joseph Myers <joseph@codesourcery.com>
9437
9438 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9439 standards modes.
9440 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9441 to mean lack of IEEE 754 support.
9442
e8ff5196
TB
94432013-11-05 Tobias Burnus <burnus@net-b.de>
9444
9445 * c.opt (-Wdate-time): New option
9446 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9447
254a0760
JM
94482013-11-05 Joseph Myers <joseph@codesourcery.com>
9449
9450 * c-cppbuiltin.c (cpp_iec_559_value): Test
9451 flag_excess_precision_cmdline not flag_excess_precision.
9452
6d7f7e0a
TB
94532013-11-05 Tobias Burnus <burnus@net-b.de>
9454
9455 * c.opt (fopenmp-simd): New option.
9456 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9457 (omp_pragmas): ... this new struct.
9458 (c_pp_lookup_pragma): Also walk omp_pragmas.
9459 (init_pragma): Init pragmas for -fopenmp-simd.
9460
55a7f02f
MP
94612013-11-04 Marek Polacek <polacek@redhat.com>
9462
9463 PR c++/58979
9464 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9465
9193fb05
JM
94662013-11-04 Joseph Myers <joseph@codesourcery.com>
9467
9468 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9469 New functions.
9470 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9471
94159ecf
EB
94722013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9473
9474 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9475 (dump_ada_specs): Adjust prototype of second callback.
9476 * c-ada-spec.c (cpp_check): New global variable.
9477 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9478 (print_generic_ada_decl): Likewise.
9479 (has_static_fields): Change return type to bool and add guard.
9480 (has_nontrivial_methods): New predicate.
9481 (is_tagged_type): Change return type to bool.
9482 (separate_class_package): Call has_nontrivial_methods.
9483 (pp_ada_tree_identifier): Minor tweaks.
9484 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9485 (dump_ada_array_domains): Likewise.
9486 (dump_ada_array_type): Likewise.
9487 (dump_template_types): Remove cpp_check parameter and do not pass it to
9488 dump_generic_ada_node.
9489 (dump_ada_template): Likewise.
9490 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9491 recursively.
9492 (print_ada_methods): Change return type to integer. Remove cpp_check
9493 parameter and do not pass it down.
9494 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9495 dump_generic_ada_node.
9496 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9497 accessing methods.
9498 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9499 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9500 value of print_ada_methods.
9501 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9502 Set cpp_check to it before invoking dump_ada_nodes.
9503 (dump_ada_specs): Likewise.
9504
b906f4ca
MP
95052013-11-03 Marek Polacek <polacek@redhat.com>
9506
9507 * c-ubsan.c: Don't include hash-table.h.
9508 (ubsan_instrument_vla): New function.
9509 * c-ubsan.h: Declare it.
9510
5e20cdc9
DM
95112013-10-31 David Malcolm <dmalcolm@redhat.com>
9512
9513 Automated part of renaming of symtab_node_base to symtab_node.
9514
9515 Patch autogenerated by rename_symtab.py from
9516 https://github.com/davidmalcolm/gcc-refactoring-scripts
9517 revision 58bb219cc090b2f4516a9297d868c245495ee622
9518
9519 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9520 symtab_node_base to symtab_node.
9521
7057e645
ESR
95222013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9523
8e745a17 9524 Implement C++14 digit separators.
7057e645
ESR
9525 * c-lex.c (interpret_float): Remove digit separators from scratch string
9526 before building real literal.
9527
193ea7bc
JJ
95282013-10-30 Jakub Jelinek <jakub@redhat.com>
9529
9530 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9531
939b37da
BI
95322013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9533
9534 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9535 fields.
9536 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9537 enabled.
9538 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9539 (insert_cilk_frame): New prototype.
9540 (cilk_init_builtins): Likewise.
9541 (gimplify_cilk_spawn): Likewise.
9542 (c_cilk_install_body_w_frame_cleanup): Likewise.
9543 (cilk_detect_spawn_and_unwrap): Likewise.
9544 (cilk_set_spawn_marker): Likewise.
9545 (build_cilk_sync): Likewise.
9546 (build_cilk_spawn): Likewise.
9547 * cilk.c: New file.
9548
67348ccc
DM
95492013-10-29 David Malcolm <dmalcolm@redhat.com>
9550
9551 Patch autogenerated by refactor_symtab.py from
9552 https://github.com/davidmalcolm/gcc-refactoring-scripts
9553 revision 58bb219cc090b2f4516a9297d868c245495ee622
9554
9555 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9556 to a true class hierarchy.
9557 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9558
d570872d
RS
95592013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9560
9561 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9562
98906124
JL
95632013-10-26 Jeff Law <law@redhat.com>
9564
adfac8df
JJ
9565 * c-common.c (c_define_builtins): Remove mudflap support.
9566 * c.opt: Ignore and warn for mudflap options.
98906124 9567
d73749df 95682013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9569
9570 PR other/33426
9571 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9572 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9573
3f04b1bb
JM
95742013-10-23 Jason Merrill <jason@redhat.com>
9575
9576 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9577
acf0174b
JJ
95782013-10-11 Jakub Jelinek <jakub@redhat.com>
9579
acd15a28
JJ
9580 * c-common.h (omp_clause_mask::operator !=): New method.
9581 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9582 instead of if (mask & something) tests everywhere.
9583
acf0174b
JJ
9584 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9585 201307 instead of 201107.
9586 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9587 (c_common_attribute_table): Add "omp declare target" and
9588 "omp declare simd" attributes.
9589 (handle_omp_declare_target_attribute,
9590 handle_omp_declare_simd_attribute): New functions.
9591 * c-omp.c: Include c-pragma.h.
9592 (c_finish_omp_taskgroup): New function.
9593 (c_finish_omp_atomic): Add swapped argument, if true,
9594 build the operation first with rhs, lhs arguments and use NOP_EXPR
9595 build_modify_expr.
9596 (c_finish_omp_for): Add code argument, pass it down to make_code.
9597 (c_omp_split_clauses): New function.
9598 (c_split_parallel_clauses): Removed.
9599 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9600 c_omp_declare_simd_clauses_to_decls): New functions.
9601 * c-common.h (omp_clause_mask): New type.
9602 (OMP_CLAUSE_MASK_1): Define.
9603 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9604 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9605 omp_clause_mask::operator |, omp_clause_mask::operator &,
9606 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9607 omp_clause_mask::operator ==): New methods.
9608 (enum c_omp_clause_split): New.
9609 (c_finish_omp_taskgroup): New prototype.
9610 (c_finish_omp_atomic): Add swapped argument.
9611 (c_finish_omp_for): Add code argument.
9612 (c_omp_split_clauses): New prototype.
9613 (c_split_parallel_clauses): Removed.
9614 (c_omp_declare_simd_clauses_to_numbers,
9615 c_omp_declare_simd_clauses_to_decls): New prototypes.
9616 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9617 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9618 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9619 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9620 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9621 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9622 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9623 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9624 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9625 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9626 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9627 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9628 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9629 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9630 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9631 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9632 PRAGMA_OMP_CLAUSE_UNIFORM.
9633
826cacfe
MG
96342013-10-09 Marc Glisse <marc.glisse@inria.fr>
9635
9636 PR tree-optimization/20318
9637 * c-common.c (handle_returns_nonnull_attribute): New function.
9638 (c_common_attribute_table): Add returns_nonnull.
9639
2284b034
MG
96402013-10-03 Marc Glisse <marc.glisse@inria.fr>
9641
9642 PR c++/19476
9643 * c.opt (fcheck-new): Move to common.opt.
9644
b56e9788
MP
96452013-09-25 Marek Polacek <polacek@redhat.com>
9646 Jakub Jelinek <jakub@redhat.com>
9647
9648 PR sanitizer/58413
9649 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9650 an expression if we can prove it is correct.
9651 (ubsan_instrument_division): Likewise. Remove unnecessary
9652 check.
9653
ce6923c5
MP
96542013-09-18 Marek Polacek <polacek@redhat.com>
9655
9656 PR sanitizer/58411
9657 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9658 Declare it.
9659 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9660
fb5610fb
IS
96612013-09-14 Iain Sandoe <iain@codesourcery.com>
9662
9663 PR target/48094
9664 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9665 fobjc-gc, freplace-objc-classes): Accept for LTO.
9666
88b0e79e
JC
96672013-09-13 Jacek Caban <jacek@codeweavers.com>
9668
9669 * c-target.def: New hook
9670
c9b0866a
PC
96712013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9672
9673 PR c++/43452
9674 * c.opt (Wdelete-incomplete): Add.
9675
0af94e6f
JR
96762013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9677
9678 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9679 (vector_types_compatible_elements_p): New function.
9680 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9681 declaration.
9682 (vector_types_compatible_elements_p): Declare.
9683
7c26172c
GDR
96842013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9685
9686 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9687 a virtual member function.
9688 (pp_simple_type_specifier): Remove.
9689 (pp_c_type_specifier): Likewise.
9690 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9691 Rename from pp_c_type_specifier. Adjust.
9692 (c_pretty_printer::c_pretty_printer): Do not assign to
9693 simple_type_specifier.
9694
20059c8b
GDR
96952013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9696
9697 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9698 member function.
9699 (c_pretty_printer::storage_class_specifier): Likewise.
9700 (c_pretty_printer::initializer): Likewise.
9701 (pp_declaration): Remove.
9702 (pp_declaration_specifiers): Likewise.
9703 (pp_abstract_declarator): Likewise.
9704 (pp_declarator): Likewise.
9705 (pp_type_id): Likewise.
9706 (pp_statement): Likewise.
9707 (pp_constant): Likewise.
9708 (pp_id_expression): Likewise.
9709 (pp_primary_expression): Likewise.
9710 (pp_unary_expression): Likewise.
9711 (pp_multiplicative_expression): Likewise.
9712 (pp_conditional_expression): Likewise.
9713 (pp_assignment_expression): Likewise.
9714 (pp_expression): Likewise.
9715 (pp_c_type_id): Likewise.
9716 (pp_c_storage_class_specifier): Likewise.
9717 * c-pretty-print.c (pp_c_type_cast): Tidy.
9718 (pp_c_pointer): Likewise.
9719 (pp_c_type_specifier): Likewise.
9720 (pp_c_parameter_type_list): Likewise.
9721 (pp_c_function_definition): Likewise.
9722 (pp_c_init_declarator): Likewise.
9723 (pp_c_initializer_list): Likewise.
9724 (pp_c_constructor_elts): Likewise.
9725 (c_pretty_printer::direct_abstract_declarator): Likewise.
9726 (c_pretty_printer::declaration_specifiers): Likewise.
9727 (c_pretty_printer::primary_expression): Likewise.
9728 (c_pretty_printer::postfix_expression): Likewise.
9729 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9730 (c_pretty_printer::storage_class_specifier): Rename from
9731 pp_c_storage_class_specifier.
9732 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9733 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9734 storage_class_specifier, initializer, offset_list, flags.
9735
de5a5fa1
MP
97362013-08-30 Marek Polacek <polacek@redhat.com>
9737
9738 * c-ubsan.c: New file.
9739 * c-ubsan.h: New file.
9740
8f0e4d72
GDR
97412013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9742
9743 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9744 member function.
9745 (c_pretty_printer::declaration_specifiers): Likewise.
9746 (c_pretty_printer::declarator): Likewise.
9747 (c_pretty_printer::abstract_declarator): Likewise.
9748 (c_pretty_printer::direct_abstract_declarator): Likewise.
9749 (c_pretty_printer::direct_declarator): Likewise.
9750 (c_pretty_printer::function_specifier): Likewise.
9751 (pp_declaration): Adjust.
9752 (pp_declaration_specifiers): Likewise.
9753 (pp_abstract_declarator): Likewise.
9754 (pp_direct_declarator): Likewise.
9755 (pp_function_specifier): Likewise.
9756 (pp_direct_abstract_declarator): Remove as unused.
9757 (pp_c_declaration): Remove.
9758 (pp_c_declaration_specifiers): Likewise.
9759 (pp_c_declarator): Likewise.
9760 (pp_c_direct_declarator): Likewise.
9761 (pp_c_function_specifier): Likewise.
9762 (pp_c_direct_abstract_declarator): Likewise.
9763 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9764 from pp_c_abstract_declarator. Adjust.
ab20d992 9765 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9766 pp_c_direct_abstract_declarator. Adjust.
9767 (c_pretty_printer::function_specifier): Rename from
9768 pp_c_function_specifier. Adjust.
9769 (c_pretty_printer::declaration_specifiers): Rename from
9770 pp_c_declaration_specifiers. Adjust.
9771 (c_pretty_printer::direct_declarator): Rename from
9772 pp_c_direct_declarator. Adjust.
9773 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9774 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9775 (c_pretty_printer::c_pretty_printer): Do not assign to
9776 declaration, declaration_specifiers, declarator,
9777 direct_declarator, direct_abstract_declarator, function_specifier.
9778
00d34d3a
GDR
97792013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9780
9781 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9782 virtual member function.
9783 (c_pretty_printer::multiplicative_expression): Likewise.
9784 (c_pretty_printer::conditional_expression): Likewise.
9785 (c_pretty_printer::assignment_expression): Likewise.
9786 (c_pretty_printer::expression): Likewise.
9787 (pp_unary_expression): Adjust.
9788 (pp_multiplicative_expression): Likewise.
9789 (pp_assignment_expression): Likewise.
9790 (pp_conditional_expression): Likewise.
9791 (pp_expression): Likewise.
9792 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9793 from pp_c_unary_expression. Adjust.
9794 (c_pretty_printer::multiplicative_expression): Rename from
9795 pp_c_multiplicative_expression. Adjust.
9796 (c_pretty_printer::conditional_expression): Rename from
9797 pp_c_conditional_expression. Adjust.
9798 (c_pretty_printer::assignment_expression): Rename from
9799 pp_c_assignment_expression. Adjust.
9800 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9801 (c_pretty_printer::c_pretty_printer): Do not assign to
9802 unary_expression, multiplicative_expression,
9803 conditional_expression, expression.
9804
fb22178f
GDR
98052013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9806
9807 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9808 virtual member function.
9809 (pp_postfix_expression): Adjust.
9810 (pp_c_postfix_expression): Remove.
9811 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9812 from pp_c_postfix_expression. Adjust.
9813 (c_pretty_printer::c_pretty_printer): Do not assign to
9814 postfix_expression.
9815
7ecc2600
GDR
98162013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9817
9818 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9819 virtua member function.
9820 (pp_primary_expression): Adjust.
9821 (pp_c_primary_expression): Remove.
9822 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9823 from pp_c_primary_expression. Adjust.
9824 (pp_c_initializer_list): Use pp_primary_expression.
9825 (c_pretty_printer::c_pretty_printer): Do not assign to
9826 primary_expression.
9827
0691175f
GDR
98282013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9829
9830 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9831 * c-pretty-print.c (M_): Remove.
9832 (c_pretty_printer::translate_string): Define.
9833 (pp_c_type_specifier): Use it.
9834 (pp_c_primary_expression): Likewise.
9835 (pp_c_expression): Likewise.
9836
66dfe4c4
GDR
98372013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9838
9839 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9840 virtual function.
9841 (pp_c_id_expression): Remove.
9842 (pp_id_expression): Adjust.
9843 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9844 pp_c_id_expression. Adjust.
9845 (pp_c_postfix_expression): Use pp_id_expression.
9846 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9847
ca43e9d5
GDR
98482013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9849
9850 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9851 member function.
9852 (pp_constant): Adjust.
9853 (pp_c_constant): Remove.
9854 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9855 pp_c_constant. Adjust.
9856 (pp_c_constant)
9857 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9858 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9859
da6ca2b5
GDR
98602013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9861
9862 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9863 (c_pretty_printer::c_pretty_printer): Declare.
9864 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9865 c_pretty_printer_init. Adjust.
9866 (print_c_tree): Do not call c_pretty_printer_init.
9867 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9868
65a372f4
AC
98692013-08-09 Arnaud Charlet <charlet@adacore.com>
9870
9871 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9872
fd9b0f32
PC
98732013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9874
9875 PR c++/58080
9876 * c-common.c (pointer_int_sum): Add bool parameter.
9877 * c-common.h (pointer_int_sum): Adjust declaration.
9878
e0aec1e9
GDR
98792013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9880
9881 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9882 c_pretty_printer variable.
9883
b066401f
GDR
98842013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9885
9886 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9887 (pp_base): Remove.
9888 (pp_c_base): Likewise. Adjust users.
9889 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9890 (pp_c_whitespace): Do not call pp_base.
9891 (pp_c_left_paren): Likewise.
9892 (pp_c_right_paren): Likewise.
9893 (pp_c_left_brace): Likewise.
9894 (pp_c_right_brace): Likewise.
9895 (pp_c_left_bracket): Likewise.
9896 (pp_c_right_bracket): Likewise.
9897 (pp_c_dot): Likewise.
9898 (pp_c_ampersand): Likewise.
9899 (pp_c_star): Likewise.
9900 (pp_c_arrow): Likewise.
9901 (pp_c_semicolon): Likewise.
9902 (pp_c_complement): Likewise.
9903 (pp_c_exclamation): Likewise.
9904 (pp_c_direct_declarator): Likewise.
9905 (pp_c_ws_string): Likewise.
9906 (pp_c_identifier): Likewise.
9907 (pp_c_statement): Likewise.
9908 (print_c_tree): Likewise.
9909
65e5a578
ESR
99102013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9911
9912 PR c++/58072
9913 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9914 provide useful error strings.
9915
137a1a27
GDR
99162013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9917
9918 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9919 printer functions instead of pp_string or operators and punctuators.
9920 (dump_generic_ada_node): Likewise.
9921 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9922 (pp_c_relational_expression): Likewise.
9923 (pp_c_logical_or_expression): Likewise.
9924
07838b13
GDR
99252013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9926
9927 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9928 functions instead of pp_character.
9929 (pp_ada_tree_identifier): Likewise.
9930 (dump_ada_double_name): Likewise.
9931 (dump_ada_function_declaration): Likewise.
9932 (dump_ada_array_domains): Likewise.
9933 (dump_template_types): Likewise.
9934 (dump_generic_ada_node): Likewise.
9935 (print_ada_declaration): Likewise.
9936 (print_ada_struct_decl): Likewise.
9937 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9938
433cc7b0
TT
99392013-07-23 Tom Tromey <tromey@redhat.com>
9940
9941 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9942 * c-common.c (c_common_reswords): Add _Generic.
9943
688010ba
OB
99442013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9945
9946 * c-common.c: Fix typos.
9947 * c-common.h: Likewise.
9948
2a99e5e6
LL
99492013-07-13 Lubos Lunak <l.lunak@suse.cz>
9950
9951 PR c++/55203
9952 * c-common.c (c_common_attribute_table): Add warn_unused.
9953 (handle_warn_unused_attribute): New.
9954
c26302d5
JJ
99552013-07-10 Jakub Jelinek <jakub@redhat.com>
9956
9957 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9958 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9959
dfeadaa0
PC
99602013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9961
9962 PR c++/57869
9963 * c.opt: Add Wconditionally-supported.
9964
6a2fa4b2
GS
99652013-07-08 Graham Stott <graham.stott@btinternet.com>
9966
adfac8df 9967 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9968 unused variables l_length and l_node.
9969
ecdbd01a 99702013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9971
9972 PR c/57821
9973 * c-common.c (complete_array_type): Delay folding first index
9974 like other indices. When folding, check for index overflow.
9975
bedc293e
MG
99762013-06-27 Marc Glisse <marc.glisse@inria.fr>
9977
9978 PR c++/57509
9979 * c-common.h (c_build_vec_perm_expr): New complain argument.
9980 * c-common.c (c_build_vec_perm_expr): Likewise.
9981 Use save_expr also in C++.
9982
604b2bfc
GDR
99832013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9984
9985 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9986 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9987 * c-opts.c (c_common_post_options): Likewise.
9988
dfeadaa0 99892013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9990
9991 * array-notation-common.c (length_mismatch_in_expr): Changed the
9992 parameter type's from a dynamic array to a vec_tree. Also removed
9993 the size parameters.
9994 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9995 the change above.
9996
2ce86d2e
BI
99972013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9998
9999 * c-common.h (struct cilkplus_an_parts): New structure.
10000 (struct cilkplus_an_loop_parts): Likewise.
10001 (cilkplus_extract_an_triplets): New prototype.
10002 (fix_sec_implicit_args): Likewise.
10003 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10004 (fix_sec_implicit_args): Likewise.
604b2bfc 10005
07a6825b
BI
100062013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10007
10008 * array-notation-common.c (find_inv_trees): Removed an unwanted
10009 typecasting.
10010 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10011 enum rid to enum tree_code.
10012
08346abd
JH
100132013-06-11 Jan Hubicka <jh@suse.cz>
10014
10015 * c-common.c (handle_alias_ifunc_attribute): Do not set
10016 DECL_EXTERNAL for weakref variables.
10017 * c-pragma.c (handle_pragma_weak): Make sure aliases
10018 are not declared as external.
10019
d60f1706
BI
100202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10021
10022 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10023 function from c/c-array-notation.c.
10024 (is_cilkplus_reduce_builtin): Likewise.
10025 (find_rank): Likewise.
10026 (extract_array_notation_exprs): Likewise.
10027 (replace_array_notations): Likewise.
10028 (find_inv_trees): Likewise.
10029 (replace_inv_trees): Likewise.
10030 (contains_array_notation_expr): Likewise.
10031 (find_correct_array_notation_type): Likewise.
10032 * c-common.h (struct inv_list): Moved this struct from the file
10033 c/c-array-notation.c and added a new field called additional tcodes.
10034 (length_mismatch_in_expr_p): New prototype.
10035 (is_cilkplus_reduce_builtin): Likewise.
10036 (find_rank): Likewise.
10037 (extract_array_notation_exprs): Likewise.
10038 (replace_array_notation): Likewise.
10039 (find_inv_trees): Likewise.
10040 (replace_inv_trees): Likewise.
10041 (find_correct_array_notation_type): Likewise.
dfeadaa0 10042
36536d79
BI
100432013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10044
10045 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10046 function array_notation_init_builtins is called.
10047 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10048 * c-common.def (ARRAY_NOTATION_REF): New tree.
10049 * c-common.h (build_array_notation_expr): New function declaration.
10050 (build_array_notation_ref): Likewise.
10051 (extract_sec_implicit_index_arg): New extern declaration.
10052 (is_sec_implicit_index_fn): Likewise.
10053 (ARRAY_NOTATION_CHECK): New define.
10054 (ARRAY_NOTATION_ARRAY): Likewise.
10055 (ARRAY_NOTATION_START): Likewise.
10056 (ARRAY_NOTATION_LENGTH): Likewise.
10057 (ARRAY_NOTATION_STRIDE): Likewise.
10058 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10059 ARRAY_NOTATION_REF.
10060 (pp_c_expression): Likewise.
10061 * c.opt (flag_enable_cilkplus): New flag.
10062 * array-notation-common.c: New file.
10063
f7716d57
JJ
100642013-05-14 Jakub Jelinek <jakub@redhat.com>
10065
10066 PR c++/57274
10067 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10068
a5e0cd1d
MG
100692013-05-10 Marc Glisse <marc.glisse@inria.fr>
10070
10071 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10072 vectors.
10073
f6bc1c4a
HS
100742013-05-07 Han Shen <shenhan@google.com>
10075
10076 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10077
3f12f6e9
SKS
100782013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10079
10080 * c-common.c (check_user_alignment): Emit error for negative values.
10081
61949153
PC
100822013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10083
10084 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10085
e93e18e9
PC
100862013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10087
10088 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10089 __GXX_EXPERIMENTAL_CXX1Y__.
10090
44d90fe1 100912013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10092 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10093
10094 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10095 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10096 to simply use OPT_Wpointer_arith.
10097 (c_sizeof_or_alignof_type): Likewise.
10098
13f39b2e
PC
100992013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10100
10101 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10102
4b84d650
JJ
101032013-04-12 Jakub Jelinek <jakub@redhat.com>
10104
10105 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10106 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10107 specifiers.
10108
fb037b5d
SB
101092013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10110
10111 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10112
4e856798
PC
101132013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10114
10115 * c-common.c (pointer_int_sum): Remove dead code.
10116
4b1baac8
RS
101172013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10118
10119 PR middle-end/56524
10120 * c-common.c (handle_optimize_attribute): Don't call
10121 save_optabs_if_changed.
10122
0b50e654
JJ
101232013-03-05 Jakub Jelinek <jakub@redhat.com>
10124
10125 PR middle-end/56461
10126 * c-pch.c (pch_init): Free target_validity at the end.
10127
48c41403
JJ
101282013-03-04 Jakub Jelinek <jakub@redhat.com>
10129
10130 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10131
e664c61c
KS
101322013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10133 Jakub Jelinek <jakub@redhat.com>
10134
10135 PR sanitizer/56454
10136 * c-common.c (handle_no_sanitize_address_attribute): New function.
10137 (c_common_attribute_table): Add no_sanitize_address attribute.
10138 (handle_no_address_safety_analysis_attribute): Add
10139 no_sanitize_address attribute, not no_address_safety_analysis
10140 attribute.
10141
a475fd3d 101422013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10143
10144 PR target/52555
10145 * c-common.c (handle_optimize_attribute): Call
10146 save_optabs_if_changed.
10147
f6007d99
JJ
101482013-02-18 Jakub Jelinek <jakub@redhat.com>
10149 Steven Bosscher <steven@gcc.gnu.org>
10150
10151 PR pch/54117
10152 * c-opts.c (c_common_post_options): If debug info is enabled
10153 and non-dwarf*, refuse to load PCH files and when writing PCH
10154 file warn.
10155
cf35e2b1
JJ
101562013-02-05 Jakub Jelinek <jakub@redhat.com>
10157
10158 PR middle-end/56167
10159 * c-common.c (handle_error_attribute): Fix condition.
10160
32887460
JJ
101612013-01-30 Jakub Jelinek <jakub@redhat.com>
10162
10163 PR c++/55742
10164 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10165
5af057d8
JM
101662013-01-18 Jason Merrill <jason@redhat.com>
10167
10168 PR target/54908
10169 * c.opt (-fextern-tls-init): New.
10170 * c-opts.c (c_common_post_options): Handle it.
10171
cc83c823
JJ
101722013-01-09 Jakub Jelinek <jakub@redhat.com>
10173
10174 PR c/48418
10175 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10176 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10177 and is either negative or bigger or equal to type precision
10178 of the first operand.
10179
a859517f
MP
101802012-12-03 Marek Polacek <polacek@redhat.com>
10181
10182 PR c/55570
10183 * c-common.c (check_user_alignment): Swap order of tests,
10184 check TREE_CODE first.
10185
2d7aa578
ESR
101862012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10187
10188 PR c++/52654
10189 * c-common.h (overflow_type): New enum.
10190 (build_userdef_literal): Add overflow_type argument.
10191 (tree_userdef_literal): Add overflow_type.
10192 (USERDEF_LITERAL_OVERFLOW): New access macro.
10193 * c-common.c (build_userdef_literal): Add overflow_type
10194 argument.
10195 * c-lex.c (c_lex_with_flags): Add overflow_type to
10196 build_userdef_literal calls.
10197 (interpret_integer, interpret_float): Add overflow_type argument.
10198
cc3c4f62
RB
101992012-11-28 Richard Biener <rguenther@suse.de>
10200
10201 PR c/35634
10202 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10203 here and use a type with proper overflow behavior for types that would
10204 need to be promoted for the arithmetic.
10205
77bc5132
JJ
102062012-11-23 Jakub Jelinek <jakub@redhat.com>
10207
10208 PR sanitizer/55435
10209 * c-common.c (handle_no_address_safety_analysis_attribute): New
10210 function.
10211 (c_common_attribute_table): Add no_address_safety_analysis.
10212
5dc99c46
SB
102132012-11-16 Simon Baldwin <simonb@google.com>
10214
10215 * c.opt: Add f[no-]canonical-system-headers.
10216 * c-opts.c (c_common_handle_option): Handle
10217 OPT_fcanonical_system_headers.
10218
a4a0016d
ESR
102192012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10220
10221 PR c++/54413
10222 * c-opts.c (c_common_handle_option): Set new flags.
10223 * c.opt: Describe new flags.
10224
7dbb85a7
JM
102252012-11-09 Jason Merrill <jason@redhat.com>
10226
10227 * c.opt (Wabi-tag): New.
10228
ad7bac31
AK
102292012-11-09 Andi Kleen <ak@linux.intel.com>
10230
10231 PR 55139
10232 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10233 MEMMODEL_MASK
ad7bac31 10234
7332899a
MLI
102352012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10236
10237 PR c/53063
10238 * c.opt (Wformat): Make it Alias Wformat=1.
10239 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10240 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10241 LangEnabledBy.
10242 (Wformat=): RejectNegative. Use LangEnabledBy.
10243 (Wnonnull): Use LangEnabledBy.
10244 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10245 * c-format.c (set_Wformat): Delete.
10246 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10247 (maybe_read_dollar_number): Likewise.
10248 (avoid_dollar_number): Likewise.
10249 (finish_dollar_format_checking): Likewise.
10250 (check_format_info): Likewise.
10251 (check_format_info_main): Likewise.
10252 (check_format_types): Likewise.
10253 (format_type_warning): Likewise.
10254 * c-common.c (int): Likewise.
10255 (check_function_sentinel): Likewise.
8e745a17 10256 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10257
34a180a6
MLI
102582012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10259
10260 PR c/53063
10261 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10262 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10263 Use LangEnabledBy.
10264 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10265 common.opt.
10266 (Wvariadic-macros): Init(1).
10267 * c-opts.c (c_common_handle_option): Do not handle them
10268 explicitly.
10269 (c_common_post_options): Likewise.
10270 (sanitize_cpp_opts): warn_unused_macros is now
10271 cpp_warn_unused_macros.
10272 (push_command_line_include): Likewise.
10273 * c-common.c (warn_unknown_pragmas): Do not define.
10274 * c-common.h (warn_unknown_pragmas): Do not declare.
10275
3f46d6a5
MLI
102762012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10277
10278 PR c/51294
10279 * c-common.c (conversion_warning): Handle conditional expressions.
10280
880661a4
JW
102812012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10282
10283 PR c++/54930
10284 * c.opt (Wreturn_local_addr): Define new option.
10285
4514a96b
JM
102862012-10-25 Jason Merrill <jason@redhat.com>
10287
f14edc1a
JM
10288 * c.opt (Wvirtual-move-assign): New.
10289
4514a96b
JM
10290 * c.opt (Winherited-variadic-ctor): New.
10291
93100c6b
MG
102922012-10-25 Marc Glisse <marc.glisse@inria.fr>
10293
10294 PR c++/54427
10295 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10296
1efcb8c6
JM
102972012-10-23 Joseph Myers <joseph@codesourcery.com>
10298
10299 * c-common.h (pch_cpp_save_state): Declare.
10300 * c-target.def (c_preinclude): New hook.
10301 * c-opts.c (done_preinclude): New.
10302 (push_command_line_include): Handle default preincluded header.
10303 (cb_file_change): Call pch_cpp_save_state when calling
10304 push_command_line_include.
10305 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10306 (pch_cpp_save_state): New.
10307 (pch_init): Call pch_cpp_save_state conditionally, instead of
10308 calling cpp_save_state.
10309
4a0ae68e
MLI
103102012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10311
10312 PR c/53063
10313 PR c/40989
10314 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10315 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10316 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10317 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10318 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10319 * c-opts.c (c_common_handle_option): Remove explicit handling from
10320 here.
10321 (c_common_post_options): Likewise.
10322
67e4210b
EB
103232012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10324
10325 * c-ada-spec.c (LOCATION_COL): Delete.
10326 (compare_location): New function.
10327 (compare_node): Use it.
10328 (compare_comment): Likewise.
10329
65d4f2cd
MLI
103302012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10331
10332 PR c/53063
10333 PR c/40989
10334 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10335 * c-opts.c (c_common_handle_option): Do not set them here. Add
10336 comment.
10337 (c_common_post_options): Likewise.
10338
909881cb
EB
103392012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10340
10341 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10342 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10343 Remove POINTER_TYPE handling, add large unsigned handling and use
10344 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10345
3a785c97
JJ
103462012-10-12 Jakub Jelinek <jakub@redhat.com>
10347
10348 PR c/54381
10349 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10350 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10351 locs and array of 3 trees instead of just single loc and single
10352 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10353 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10354 For *cmp* builtins that take two sources strings report warnings
10355 about first and second source, not about destination and source.
10356
5e54f81d
MG
103572012-10-12 Marc Glisse <marc.glisse@inria.fr>
10358
10359 PR c++/53055
10360 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10361
f5b02f1e
EB
103622012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10363
10364 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10365 declaring something coming from another file.
10366
b46dbc6c
AC
103672012-10-10 Arnaud Charlet <charlet@adacore.com>
10368
f5b02f1e 10369 PR ada/54845
b46dbc6c
AC
10370 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10371
5d9de0d0
PC
103722012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10373
10374 PR c++/54194
10375 * c-common.c (warn_about_parentheses): Add location_t parameter;
10376 use EXPR_LOC_OR_LOC.
10377 * c-common.h: Update declaration.
10378
a212e43f
MG
103792012-10-09 Marc Glisse <marc.glisse@inria.fr>
10380
10381 PR c++/54427
10382 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10383 more operations. Make error messages optional.
10384 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10385 (scalar_to_vector): Declare.
10386
b1db7f91
JM
103872012-10-08 Jason Merrill <jason@redhat.com>
10388
10389 * c-common.c (c_common_reswords): Add thread_local.
10390
e28d52cf
DS
103912012-10-08 Dodji Seketeli <dodji@redhat.com>
10392
10393 PR c++/53528 C++11 attribute support
10394 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10395 new functions.
10396 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10397 static function.
10398 (handle_aligned_attribute): In choose strictest alignment
10399 among many. Use new check_cxx_fundamental_alignment_constraints.
10400 (handle_transparent_union_attribute): In c++11 attribute syntax,
10401 don't look through typedefs.
10402
3b78de56
AC
104032012-10-04 Arnaud Charlet <charlet@adacore.com>
10404
10405 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10406 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10407 out of dumpfile.h.
10408
6040bb5f
DC
104092012-09-25 Dehao Chen <dehao@google.com>
10410
10411 PR middle-end/54645
3b78de56 10412 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10413 map when read in the pch.
10414
3f8257db 104152012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10416
10417 * c-ada-spec.c: Style fixes.
10418
3f8257db 104192012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10420
10421 * c.opt (-fada-spec-parent): Define new command line switch.
10422 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10423 is specified, generate binding spec as a child of the specified unit.
10424
0ccb505d
PC
104252012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10426 Manuel López-Ibáñez <manu@gcc.gnu.org>
10427
10428 PR c++/53210
10429 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10430
c583af79
AC
104312012-08-23 Arnaud Charlet <charlet@adacore.com>
10432
10433 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10434 for pointers, and add missing Convention C pragma.
10435 (print_ada_struct_decl): Add missing aliased keyword.
10436 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10437
1a4049e7
JJ
104382012-08-17 Jakub Jelinek <jakub@redhat.com>
10439
10440 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10441 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10442 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10443 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10444 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10445
70b5e7dc
RG
104462012-08-10 Richard Guenther <rguenther@suse.de>
10447
10448 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10449
f8923f7e
SB
104502012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10451
10452 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10453 instead of separate pp_newline and pp_flush.
10454 (print_c_tree): Likewise.
10455
e45abe1f
RH
104562012-07-26 Richard Henderson <rth@redhat.com>
10457
10458 * c-common.c (handle_hot_attribute): Allow labels.
10459 (handle_cold_attribute): Likewise.
10460
332f1d24
JJ
104612012-07-20 Jakub Jelinek <jakub@redhat.com>
10462
10463 PR c++/28656
10464 * c-common.c (check_function_nonnull): Handle multiple nonnull
10465 attributes properly.
10466
7ee2468b
SB
104672012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10468
10469 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10470 * c-ada-spec.c: Likewise.
10471 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10472
ee7b28eb
SB
104732012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10474
10475 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10476 Remove code conditional on it.
10477
6bdf3519
SB
104782012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10479
10480 * c-gimplify.c: Do not include basic-block.h.
10481 * c-common.c: Do not include linfuncs.h.
10482
532aafad
SB
104832012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10484
10485 * c-common.h: Include tree.h.
10486
8d0d1915
JM
104872012-07-02 Jason Merrill <jason@redhat.com>
10488
10489 PR c++/53524
10490 * c-common.c (get_priority): Call default_conversion.
10491
fbc873ad
UB
104922012-07-01 Uros Bizjak <ubizjak@gmail.com>
10493
10494 * c-pch.c (c_common_write_pch): Remove unused variables.
10495
d4a10d0a
SB
104962012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10497
10498 * cppspec.c: Moved from gcc/ to here.
10499
6f3a2e23
KT
105002012-06-27 Kai Tietz <ktietz@redhat.com>
10501
10502 PR preprocessor/37215
10503 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10504
8ca92d04
SB
105052012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10506
10507 * c-common.h (c_common_print_pch_checksum): Remove.
10508 * c-pch.c: Do not include output.h.
10509 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10510 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10511 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10512 (struct c_pch_header): Remove.
10513 (get_ident): Update gpch version.
10514 (pch_init): Do not print executable_checksum to asm_out_file.
10515 Do not fail if there is no asm_out_file to read back from. Set
10516 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10517 (c_common_write_pch): Verify that nothing was written to asm_out_file
10518 since pch_init was called. Do not write a c_pch_header, and do not
10519 copy from asm_out_file to the PCH.
10520 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10521 the content of asm_out_file from the PCH.
10522 (c_common_print_pch_checksum): Remove.
10523 * c-opts.c (c_common_init): Print out executable_checksum directly.
10524
70f42967
SB
105252012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10526
10527 * c-target.def (objc_declare_unresolved_class_reference,
10528 objc_declare_class_definition): Add new hooks.
10529
a8781821
SB
105302012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10531
10532 * c-lex.c: Do not include output.h.
10533 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10534 Remove uses of ASM_OUTPUT_IDENT.
10535
9e1a8dd1
RR
105362012-06-15 Marc Glisse <marc.glisse@inria.fr>
10537
10538 PR c++/51033
10539 * c-common.h (c_build_vec_perm_expr): Move decl here.
10540 * c-common.c (c_build_vec_perm_expr): Move definition
10541 here.
10542
6f07a821
SB
105432012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10544
10545 * c.opt (fconserve-space): Turn into a no-op.
10546
9faeb493 105472012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10548
10549 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10550 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10551 both the start and end of the function.
10552
a4b7d13c
SB
105532012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10554
10555 * c-common.c: Do not include output.h.
10556 * c-pragma.c: Likewise.
10557
c265f413
SA
105582012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10559
10560 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10561 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10562 (lang_decl_name): Handle namespace decls.
10563
be7a421e
SB
105642012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10565
10566 * c-ada-spec.c: Do not include output.h.
10567 * c-semantics.c: Likewise.
10568
65de6659
JM
105692012-05-29 Joseph Myers <joseph@codesourcery.com>
10570
10571 * c-common.c: Fix typo.
10572
ca5f4331
MM
105732012-05-29 Michael Matz <matz@suse.de>
10574
10575 * c-common.h (c_expand_decl): Remove prototype.
10576
4f7f7aca
MLI
105772012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10578
10579 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10580 * c-opts.c (c_common_handle_option): Remove code handling
10581 warn_missing_braces.
10582
4a792f9b
PC
105832012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10584
10585 PR c++/25137
10586 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10587 -Wmissing_braces.
10588
650dc14a
DS
105892012-05-22 Dodji Seketeli <dodji@redhat.com>
10590
10591 PR c++/53322
10592 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10593
9b095bf1
MLI
105942012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10595
10596 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10597 * c-opts.c (c_common_handle_option): Do not handle explicitly
10598 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10599
0b2c4be5
DS
106002012-05-16 Dodji Seketeli <dodji@redhat.com>
10601
10602 PR preprocessor/7263
ab20d992 10603 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10604 to cpp_classify_number. For diagnostics, use the precise location
10605 instead of the global input_location.
10606
a1bde5af
PC
106072012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10608
d02924ef 10609 PR c++/11856
a1bde5af
PC
10610 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10611
d1ede5f4
BS
106122012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10613
a1bde5af 10614 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10615
f2bc201f
MLI
106162012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10617
10618 PR 53063
10619 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10620 Wreorder): Use LangEnabledBy.
10621 * c-opts.c (c_common_handle_option): Do not enable them
10622 explicitly. Call lang-specific generated functions.
10623 (c_common_post_options): Do not set them here.
10624
95744782
MLI
106252012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10626
10627 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10628 Wmissing-field-initializers,Wmissing-parameter-type,
10629 Wold-style-declaration,Woverride-init): Use EnabledBy.
10630 * c-opts.c (c_common_post_options): Do not set here explicitly.
10631
7d5a5747
MLI
106322012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10633
10634 PR 53063
10635 * c-opts.c (c_common_handle_option): Use handle_generated_option
10636 to enable sub-options.
10637
5a3c9cf2
PC
106382012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10639
10640 PR c++/53158
10641 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10642
3ac8781c
RG
106432012-05-10 Richard Guenther <rguenther@suse.de>
10644
10645 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10646 adjust commentary about TYPE_IS_SIZETYPE types.
10647
1e537948
MLI
106482012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10649
10650 PR c++/53261
10651 * c-common.c (warn_logical_operator): Check that argument of
10652 integer_zerop is not NULL.
10653
f2c4a785
MLI
106542012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10655
10656 PR c/43772
10657 * c-common.c (warn_logical_operator): Do not warn if either side
10658 is already true or false.
10659
50f305ca
MLI
106602012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10661
10662 PR c/51712
10663 * c-common.c (expr_original_type): New.
10664 (shorten_compare): Do not warn for enumeration types.
10665
0c3641b0
MLI
106662012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10667
10668 * c.opt (fpermissive): Add Var(flag_permissive).
10669
7edaa4d2
MG
106702012-04-30 Marc Glisse <marc.glisse@inria.fr>
10671
10672 PR c++/51033
10673 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10674 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10675
b9c8da34
DS
106762012-04-30 Dodji Seketeli <dodji@redhat.com>
10677
10678 Add -Wvarargs option
ab20d992 10679 * c.opt (Wvarargs): Define new option.
b9c8da34 10680
e6c69da0
MLI
106812012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10682
10683 * c-common.c (check_function_arguments): Replace
10684 Wmissing-format-attribute with Wsuggest-attribute=format.
10685
90137d8f
MLI
106862012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10687
10688 * c.opt (Wsuggest-attribute=format): New. Alias of
10689 Wmissing-format-attribute.
10690 * c-format.c (decode_format_type): Replace
10691 Wmissing-format-attribute with Wsuggest-attribute=format.
10692 (check_function_format): Likewise.
10693
9faeb493 106942012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10695
10696 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10697 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10698 * c.opt: Add Wliteral-suffix.
10699
c1771a20
MLI
107002012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10701
10702 PR c/44774
10703 * c.opt (Wpedantic): New.
10704 (pedantic): Alias Wpedantic.
10705 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10706 (c_common_post_options): Likewise.
10707 (sanitize_cpp_opts): Likewise.
10708 * c-lex.c (interpret_float): Likewise.
10709 * c-format.c (check_format_types): Likewise.
10710 * c-common.c (pointer_int_sum): Likewise.
10711 (c_sizeof_or_alignof_type): Likewise.
10712 (c_add_case_label): Likewise.
10713 (c_do_switch_warnings): Likewise.
10714 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10715
04b391c1
JM
107162012-04-15 Jason Merrill <jason@redhat.com>
10717
10718 PR c++/52818
10719 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10720 (C_STD_NAME): Distinguish between C++98 and C++11.
10721
ac868f29
EB
107222012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10723
10724 PR target/52624
10725 * c-common.h (uint16_type_node): Rename into...
10726 (c_uint16_type_node): ...this.
10727 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10728 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10729
fd4116f4
MLI
107302012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10731
10732 * c-common.c (warn_if_unused_value): Move definition to here.
10733 * c-common.h (warn_if_unused_value): Move declaration to here.
10734
573ac65e
WB
107352012-03-23 William Bader <williambader@hotmail.com>
10736
10737 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10738
552b8185
JM
107392012-03-20 Jason Merrill <jason@redhat.com>
10740
10741 * c-common.h (enum cxx_dialect): Add cxx1y.
10742 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10743 test.
10744 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10745 * c-opts.c (c_common_post_options): Likewise.
10746 (set_std_cxx1y): New.
10747 (c_common_handle_option): Call it.
10748 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10749
04398fa8
PC
107502012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10751
10752 PR c++/14710
10753 * c.opt ([Wuseless-cast]): Add.
10754
d2a12ae7
RG
107552012-03-16 Richard Guenther <rguenther@suse.de>
10756
10757 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10758
a12bf402
MLI
107592012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10760
10761 PR c++/44783
10762 * c.opt (ftemplate-backtrace-limit) Add.
10763
5c30094f
RO
107642012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10765
10766 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10767 handling.
10768 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10769 (init_pragma): Don't register extern_prefix.
10770
21fa2faf
RG
107712012-03-12 Richard Guenther <rguenther@suse.de>
10772
10773 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10774 (builtin_type_for_size): Likewise.
10775
e3793c6f
JJ
107762012-02-13 Jakub Jelinek <jakub@redhat.com>
10777
10778 PR c++/52215
10779 * c-common.c (sync_resolve_params): Don't decide whether to convert
10780 or not based on TYPE_SIZE comparison, convert whenever arg_type
10781 is unsigned INTEGER_TYPE.
10782
93286335
PC
107832012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10784
10785 PR c/52118
10786 * c.opt ([Wunused-local-typedefs]): Fix description.
10787
7a421706
MS
107882012-01-24 Mike Stump <mikestump@comcast.net>
10789
10790 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10791 exactly.
10792
ba9b1f11
RG
107932012-01-18 Richard Guenther <rguenther@suse.de>
10794
10795 * c-opts.c (c_common_post_options): Reset LTO flags if
10796 we are about to generate a PCH.
10797
465406be
PC
107982012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10799
10800 PR c++/51777
10801 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10802 use pp_unsigned_wide_integer.
10803
aee15221
RG
108042012-01-10 Richard Guenther <rguenther@suse.de>
10805
10806 PR middle-end/51806
10807 * c-opts.c (c_common_handle_option): Move -Werror handling
10808 to language independent code.
10809
5720c0dc
RG
108102012-01-05 Richard Guenther <rguenther@suse.de>
10811
10812 PR middle-end/51764
10813 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10814 from common.opt.
10815
73ac190a
PC
108162011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10817
10818 PR c++/51316
10819 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10820 of array types with an unknown bound.
10821
48b0b196
JM
108222011-12-20 Joseph Myers <joseph@codesourcery.com>
10823
10824 * c-common.c (flag_isoc99): Update comment to refer to C11.
10825 (flag_isoc1x): Change to flag_isoc11.
10826 * c-common.h (flag_isoc99): Update comment to refer to C11.
10827 (flag_isoc1x): Change to flag_isoc11.
10828 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10829 C11.
10830 * c-opts.c (set_std_c1x): Change to set_std_c11.
10831 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10832 Call set_std_c11.
10833 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10834 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10835 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10836 standard.
10837 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10838 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10839 (std=gnu1x): Make alias of std=gnu11.
10840
d58d6eb5
JM
108412011-12-19 Jason Merrill <jason@redhat.com>
10842
10843 PR c++/51228
10844 * c-common.c (handle_transparent_union_attribute): Check the first
10845 field if the type is complete.
10846
b3908fcc
JW
108472011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10848
10849 PR libstdc++/51365
10850 * c-common.c (RID_IS_FINAL): Add.
10851 * c-common.h (RID_IS_FINAL): Add.
10852
fea3ca91
IS
108532011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10854
10855 * c.opt (fgnu-runtime): Provide full description.
10856 (fnext-runtime): Likewise.
10857 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10858
62bad7cd
AM
108592011-11-28 Andrew MacLeod <amacleod@redhat.com>
10860
10861 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10862 predefines in one place. Add LOCK_FREE predefines.
10863 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10864 new func.
10865
c466c4ff
AM
108662011-11-24 Andrew MacLeod <amacleod@redhat.com>
10867
10868 PR c/51256
9faeb493 10869 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10870 conditions
9faeb493
UB
10871 (resolve_overloaded_atomic_exchange,
10872 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10873 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10874 error_mark_node for error conditions.
9faeb493 10875
a5952633
RG
108762011-11-08 Richard Guenther <rguenther@suse.de>
10877
10878 PR middle-end/51010
ab20d992 10879 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10880
0a35513e
AH
108812011-11-07 Richard Henderson <rth@redhat.com>
10882 Aldy Hernandez <aldyh@redhat.com>
10883 Torvald Riegel <triegel@redhat.com>
10884
10885 Merged from transactional-memory.
10886
10887 * c-common.c (handle_tm_wrap_attribute,
10888 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10889 (struct c_common_reswords): Added __transaction* keywords.
10890 (struct c_common_attribute_table): Added transaction* and tm_regparm
10891 attributes.
10892 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10893 masks.
10894 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10895 find_tm_attribute): Declare.
10896
6d87092d
JM
108972011-11-07 Jason Merrill <jason@redhat.com>
10898
10899 PR c++/35688
10900 * c-common.c, c-common.h: Revert yesterday's changes.
10901
8e7860a1
JM
109022011-11-06 Jason Merrill <jason@redhat.com>
10903
10904 PR c++/35688
10905 * c-common.c (decl_has_visibility_attr): Split out from...
10906 (c_determine_visibility): ...here.
10907 * c-common.h: Declare it.
10908
d19fa6b5
JM
109092011-11-06 Joseph Myers <joseph@codesourcery.com>
10910
10911 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10912 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10913 type.
10914 (check_user_alignment): New. Split out of
10915 handle_aligned_attribute. Disallow integer constants with
10916 noninteger types. Conditionally allow zero.
10917 (handle_aligned_attribute): Use check_user_alignment.
10918 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10919
86951993
AM
109202011-11-06 Andrew MacLeod <amacleod@redhat.com>
10921 Richard Henderson <rth@redhat.com>
10922
10923 Merged from cxx-mem-model.
10924
10925 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10926 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10927 parameters that are the same type size.
10928 (get_atomic_generic_size): New. Find size of generic
10929 atomic function parameters and do typechecking.
10930 (add_atomic_size_parameter): New. Insert size into parameter list.
10931 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10932 either __atomic_exchange_n or external library call.
9faeb493 10933 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10934 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10935 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10936 __atomic_load_n or an external library call.
10937 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10938 __atomic_store_n or an external library call.
10939 (resolve_overloaded_builtin): Handle new __atomic builtins.
10940
cf9e9959
EB
109412011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10942
10943 PR c++/50608
10944 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10945 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10946 <INDIRECT_REF>: Return the argument.
10947 <ARRAY_REF>: Remove special code for negative offset.
10948 Call fold_build_pointer_plus instead of size_binop.
10949 (fold_offsetof): Remove STOP_REF argument and adjust.
10950 * c-common.h (fold_offsetof_1): Declare.
10951 (fold_offsetof): Remove STOP_REF argument.
10952
25339f10
JM
109532011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10954
10955 PR c++/50810
10956 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10957 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10958 Wnarrowing for C++0x and C++98.
10959 * c.opt ([Wnarrowing]): Update.
10960
89401152
PC
109612011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10962
10963 PR c++/44277
10964 * c.opt: Add Wzero-as-null-pointer-constant.
10965
97e3ad20
JM
109662011-10-31 Jason Merrill <jason@redhat.com>
10967
15694fdd
JM
10968 * c.opt (-fdeduce-init-list): Off by default.
10969
97e3ad20
JM
10970 PR c++/50920
10971 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10972 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10973 and -Wc++11-compat.
10974 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10975
fb9120e3
RAV
109762011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10977
10978 PR c++/30066
10979 * c.opt (fvisibility-inlines-hidden): Description change.
10980
3ce4f9e4
ESR
109812011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10982
10983 Implement C++11 user-defined literals.
10984 * c-common.c (build_userdef_literal): New.
10985 * c-common.def: New tree code.
10986 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10987 * c-lex.c (interpret_float): Add suffix parm.
10988 (c_lex_with_flags): Build literal tokens.
10989
5f53c243
PC
109902011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10991
10992 PR c++/50841
10993 Revert:
10994 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10995
10996 PR c++/50810
10997 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10998 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10999 Wnarrowing for C++0x and C++98.
11000 * c.opt ([Wnarrowing]): Update.
11001
263734e1
PC
110022011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11003
11004 PR c++/50810
11005 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11006 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11007 Wnarrowing for C++0x and C++98.
11008 * c.opt ([Wnarrowing]): Update.
11009
d2e312d7
PC
110102011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11011
11012 PR c++/45385
11013 * c-common.c (conversion_warning): Remove code looking for
11014 artificial operands.
11015
d17687f6
DS
110162011-10-18 Dodji Seketeli <dodji@redhat.com>
11017
11018 PR bootstrap/50760
11019 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11020 !NO_IMPLICIT_EXTERN_C.
d17687f6 11021
fc8396e9
PC
110222011-10-17 Michael Spertus <mike_spertus@symantec.com>
11023
11024 * c-common.c (c_common_reswords): Add __bases,
11025 __direct_bases.
11026 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11027
110282011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11029
11030 PR c++/50757
11031 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11032
847e697a
TT
110332011-10-15 Tom Tromey <tromey@redhat.com>
11034 Dodji Seketeli <dodji@redhat.com>
11035
11036 * c.opt (fdebug-cpp): New option.
11037 * c-opts.c (c_common_handle_option): Handle the option.
11038 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11039 output stream in parameter. Factorized from ...
11040 (maybe_print_line): ... this. Dump location debug information when
11041 -fdebug-cpp is in effect.
11042 (print_line_1): New static function. Takes an output stream in
11043 parameter. Factorized from ...
11044 (print_line): ... here. Dump location information when -fdebug-cpp
11045 is in effect.
11046 (scan_translation_unit): Dump location information when
11047 -fdebug-cpp is in effect.
11048
92582b75
TT
110492011-10-15 Tom Tromey <tromey@redhat.com>
11050 Dodji Seketeli <dodji@redhat.com>
11051
11052 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11053 without argument.
11054 * c-opts.c (c_common_handle_option)<case
11055 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11056 cases. Handle -ftrack-macro-expansion with and without argument.
11057
46427374
TT
110582011-10-15 Tom Tromey <tromey@redhat.com>
11059 Dodji Seketeli <dodji@redhat.com>
11060
11061 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11062 (print_line, cb_define, do_line_change): Adjust to avoid touching
11063 the internals of struct line_map. Use the public API instead.
11064 * c-pch.c (c_common_read_pch): Likewise.
11065 * c-lex.c (fe_file_change): Likewise.
11066
fc8396e9
PC
110672011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11068
11069 PR c++/17212
11070 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11071
110722011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11073
11074 PR c++/33067
11075 * c-pretty-print.c (pp_c_floating_constant): Output
11076 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11077
e79983f4
MM
110782011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11079
11080 * c-common.c (def_builtin_1): Delete old interface with two
11081 parallel arrays to hold standard builtin declarations, and replace
11082 it with a function based interface that can support creating
11083 builtins on the fly in the future. Change all uses, and poison
11084 the old names. Make sure 0 is not a legitimate builtin index.
11085 * c-omp.c (c_finish_omp_barrier): Ditto.
11086 (c_finish_omp_taskwait): Ditto.
11087 (c_finish_omp_flush): Ditto.
11088
6637388f
TG
110892011-10-11 Tristan Gingold <gingold@adacore.com>
11090
11091 * c.opt: (fallow-parameterless-variadic-functions): New.
11092
3797cb21
DS
110932011-09-08 Dodji Seketeli <dodji@redhat.com>
11094
11095 PR c++/33255 - Support -Wunused-local-typedefs warning
11096 * c-common.h (struct c_language_function::local_typedefs): New
11097 field.
9faeb493
UB
11098 (record_locally_defined_typedef, maybe_record_typedef_use)
11099 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11100 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11101 (maybe_record_typedef_use)
11102 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11103 * c.opt: Declare new -Wunused-local-typedefs flag.
11104
693ddb1b
EB
111052011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11106
11107 PR middle-end/50266
11108 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11109 computations.
11110
830c740f
RG
111112011-09-05 Richard Guenther <rguenther@suse.de>
11112
11113 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11114 of integer_minus_one_node for empty array upper bounds.
11115
892a371f
DS
111162011-08-28 Dodji Seketeli <dodji@redhat.com>
11117
11118 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11119 it's the first time it's being called on this main TU.
11120
0e3fdb48
RB
111212011-08-24 Richard Guenther <rguenther@suse.de>
11122
11123 PR c/49396
11124 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11125
111262011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11127
11128 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11129 defined in cpp_init_builtins and c_cpp_builtins.
11130
d4a83c10
JM
111312011-08-19 Joseph Myers <joseph@codesourcery.com>
11132
11133 * c-common.c (c_common_reswords): Add __builtin_complex.
11134 * c-common.h (RID_BUILTIN_COMPLEX): New.
11135
bbceee64
JM
111362011-08-18 Joseph Myers <joseph@codesourcery.com>
11137
11138 * c-common.c (c_common_reswords): Add _Noreturn.
11139 (keyword_is_function_specifier): Handle RID_NORETURN.
11140 * c-common.h (RID_NORETURN): New.
11141
3f8257db 111422011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11143
11144 * c-common.c (unsafe_conversion_p): New function. Check if it is
11145 unsafe to convert an expression to the type.
11146 (conversion_warning): Adjust, use unsafe_conversion_p.
11147 * c-common.h (unsafe_conversion_p): New function declaration.
11148
20906c66
JJ
111492011-08-02 Jakub Jelinek <jakub@redhat.com>
11150
11151 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11152 (c_finish_omp_taskyield): New prototype.
11153 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11154 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11155 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11156 or RHS1 have side-effects, evaluate those too in the right spot,
11157 if it is a decl and LHS is also a decl, error out if they
11158 aren't the same.
11159 (c_finish_omp_taskyield): New function.
11160 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11161 * c-pragma.c (omp_pragmas): Add taskyield.
11162 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11163 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11164 PRAGMA_OMP_CLAUSE_MERGEABLE.
11165
770e5a2e
DS
111662011-07-25 Dodji Seketeli <dodji@redhat.com>
11167
11168 * c-common.h (set_underlying_type): Remove parm name from
11169 declaration.
11170
1baae426
RG
111712011-07-25 Romain Geissler <romain.geissler@gmail.com>
11172
11173 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11174
fcb21722
JM
111752011-07-22 Jason Merrill <jason@redhat.com>
11176
76f86d00
JM
11177 PR c++/49793
11178 * c.opt (Wnarrowing): New.
11179
3a636414
JM
11180 PR c++/30112
11181 * c-common.h: Declare c_linkage_bindings.
11182 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11183
fcb21722
JM
11184 PR c++/49813
11185 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11186 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11187 as flag_isoc99 for 'restrict'.
11188 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11189
02614448
ILT
111902011-07-21 Ian Lance Taylor <iant@google.com>
11191
11192 PR middle-end/49705
11193 * c-common.c (c_disable_warnings): New static function.
11194 (c_enable_warnings): New static function.
11195 (c_fully_fold_internal): Change local unused_p to bool. Call
11196 c_disable_warnings and c_enable_warnings rather than change
11197 c_inhibit_evaluation_warnings.
11198
34429675
JM
111992011-07-20 Jason Merrill <jason@redhat.com>
11200
11201 PR c++/6709 (DR 743)
11202 PR c++/42603 (DR 950)
11203 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11204 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11205 (CPP_DECLTYPE): New.
11206 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11207
5d49b6a7
RG
112082011-07-19 Richard Guenther <rguenther@suse.de>
11209
11210 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11211 * c-omp.c (c_finish_omp_for): Likewise.
11212
e84a58ff
EB
112132011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11214
11215 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11216 body on the next line.
11217
329af3c7
JM
112182011-07-08 Jason Merrill <jason@redhat.com>
11219
4063e61b
JM
11220 PR c++/45437
11221 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11222
329af3c7
JM
11223 PR c++/49673
11224 * c-common.c (c_apply_type_quals_to_decl): Don't check
11225 TYPE_NEEDS_CONSTRUCTING.
11226
1a072294
RG
112272011-07-06 Richard Guenther <rguenther@suse.de>
11228
11229 * c-common.c (c_common_nodes_and_builtins):
11230 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11231
fce5dddd
RG
112322011-07-05 Richard Guenther <rguenther@suse.de>
11233
11234 * c-common.c (c_common_nodes_and_builtins): Build all common
11235 tree nodes first.
11236
45d439ac
JJ
112372011-06-27 Jakub Jelinek <jakub@redhat.com>
11238
56300785
JJ
11239 * c-common.h (c_tree_chain_next): New static inline function.
11240
45d439ac
JJ
11241 * c-common.c (check_builtin_function_arguments): Handle
11242 BUILT_IN_ASSUME_ALIGNED.
11243
e0a8ecf2
AM
112442011-06-21 Andrew MacLeod <amacleod@redhat.com>
11245
11246 * c-common.c: Add sync_ or SYNC__ to builtin names.
11247 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11248
112492011-06-20 Pierre Vittet <piervit@pvittet.com>
11250
11251 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11252 handler.
11253 (gen_pragma_handler): New union.
11254 (internal_pragma_handler): New type.
11255 (c_register_pragma_with_data)
11256 (c_register_pragma_with_expansion_and_data): New functions.
11257
11258 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11259 (c_register_pragma, c_register_pragma_with_expansion)
11260 (c_invoke_pragma_handler): Changed to work with
11261 internal_pragma_handler.
11262 (c_register_pragma_with_data)
11263 (c_register_pragma_with_expansion_and_data): New functions.
11264
677f3fa8
JM
112652011-06-14 Joseph Myers <joseph@codesourcery.com>
11266
11267 * c-common.c: Include common/common-target.h.
11268 (handle_section_attribute): Use
11269 targetm_common.have_named_sections.
11270 * c-cppbuiltin.c: Include common/common-target.h.
11271 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11272
d7fc8c14
RG
112732011-06-10 Richard Guenther <rguenther@suse.de>
11274
11275 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11276 to print a IDENTIFIER_NODE.
11277
10e48e39
RO
112782011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11279 Joseph Myers <joseph@codesourcery.com>
11280
11281 * c.opt (fbuilding-libgcc): New option.
11282 * c-cppbuiltin.c (c_cpp_builtins): Define
11283 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11284
6976ae51
JM
112852011-06-07 Jason Merrill <jason@redhat.com>
11286
3ff60975
JM
11287 * c-common.c (max_tinst_depth): Lower default to 900.
11288
6976ae51
JM
11289 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11290
009db074
RG
112912011-06-07 Richard Guenther <rguenther@suse.de>
11292
11293 * c-common.c (c_common_nodes_and_builtins): Do not set
11294 size_type_node or call set_sizetype.
11295
b4592b92
DS
112962011-06-07 Dodji Seketeli <dodji@redhat.com>
11297
11298 PR debug/49130
11299 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11300 type when using pointer comparison to compare types.
b4592b92 11301
014ab419
JW
113022011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11303
11304 * c.opt: Add -Wdelete-non-virtual-dtor.
11305 * c-opts.c (c_common_handle_option): Include it in -Wall.
11306
4f60111f
NF
113072011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11308
11309 PR bootstrap/49190
11310
11311 Revert:
11312 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11313
11314 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11315 not tree_common.
11316
4cc4f2f4
JJ
113172011-05-27 Jakub Jelinek <jakub@redhat.com>
11318
11319 PR c++/49165
11320 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11321 C++ don't call c_common_truthvalue_conversion on void type arms.
11322
38e01f9e
NF
113232011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11324
11325 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11326 (stmt_list_stack): Define.
11327 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11328 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11329
92e948a8
NF
113302011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11331
11332 * c-common.c (warning_candidate_p): Check for BLOCKs.
11333
a2fc3e63
NF
113342011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11335
11336 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11337 not tree_common.
11338
0957c029
JJ
113392011-05-25 Jakub Jelinek <jakub@redhat.com>
11340
11341 * c-common.c (def_fn_type): Remove extra va_end.
11342
828fb3ba
JM
113432011-05-23 Jason Merrill <jason@redhat.com>
11344
11345 PR c++/48106
11346 * c-common.c (c_common_get_narrower): New.
11347 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11348
dde05067
NF
113492011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11350
11351 * c-common.h (check_function_arguments): Tweak prototype of
11352 check_function_arguments.
11353 * c-common.c (check_function_arguments): Likewise. Adjust
11354 calls to check_function_nonnull, check_function_format, and
11355 check_function_sentinel.
11356 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11357 separate attributes and typelist arguments. Use
11358 FOREACH_FUNCTION_ARGS to iterate over argument types.
11359
3c0d13bf
PC
113602011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11361
11362 * c-common.c (c_common_reswords): Reorder.
11363 * c-common.h (rid): Likewise.
11364
8242dd04
NF
113652011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11366
11367 * c-common.c (def_fn_type): Don't call build_function_type, call
11368 build_function_type_array or build_varargs_function_type_array
11369 instead.
11370 (c_common_nodes_and_builtins): Likewise.
11371
3d528853
NF
113722011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11373
11374 * c-common.c (c_add_case_label): Omit the loc argument to
11375 build_case_label.
11376 * c-common.h (build_case_label): Remove.
11377 * c-semantics.c (build_case_label): Remove.
11378
a04a722b
JM
113792011-05-05 Joseph Myers <joseph@codesourcery.com>
11380
11381 * c-objc.h (objc_start_method_definition): Update prototype.
11382 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11383
e19a18d4
NF
113842011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11385
11386 * c-common.c (check_main_parameter_types): Reindent. Don't use
11387 TYPE_ARG_TYPES directly.
11388 (handle_nonnull_attribute): Likewise.
11389 (sync_resolve_params): Likewise.
11390 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11391 to check_format_string.
11392 (handle_format_attribute): Likewise.
11393 (check_format_string): Take a function type to examine instead of
11394 a type list. Use a function_arg_iterator to step through argument
11395 types.
11396
c62c040f
RG
113972011-05-04 Richard Guenther <rguenther@suse.de>
11398
11399 * c-common.c (fix_string_type): Use size_int for index type bounds.
11400 (start_fname_decls): Do not pass NULL to build_int_cst.
11401 (c_init_attributes): Likewise.
11402 * c-lex.c (c_lex_with_flags): Likewise.
11403
c12ff9d8
JM
114042011-04-27 Jason Merrill <jason@redhat.com>
11405
11406 * c-common.c (make_tree_vector_from_list): New.
11407 * c-common.h: Declare it.
11408
304dfbe3
RG
114092011-04-26 Richard Guenther <rguenther@suse.de>
11410
11411 PR preprocessor/48248
11412 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11413 for output size with -P.
11414
3c0d13bf
PC
114152011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11416
11417 * c-common.c (struct c_common_resword): Add __underlying_type.
11418 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11419
04695783
JM
114202011-04-20 Jim Meyering <meyering@redhat.com>
11421
11422 * c-format.c (init_dollar_format_checking): Remove useless
11423 if-before-free.
11424
0dc33c3c
NP
114252011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11426
11427 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11428 (objc_detect_field_duplicates): New.
0dc33c3c 11429 * stub-objc.c: Likewise.
3c0d13bf 11430
c59633d9
NP
114312011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11432
11433 * stub-objc.c (objc_declare_protocols): Renamed to
11434 objc_declare_protocol.
11435 * c-objc.h: Likewise.
3c0d13bf 11436
32dabdaf
NP
114372011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11438
11439 * stub-objc.c (objc_declare_class): Updated argument name.
11440
81f653d6
NF
114412011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11442
11443 * c-common.h (c_common_init_ts): Declare.
11444 * c-common.c (c_common_init_ts): Define.
11445
eb345401
NP
114462011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11447
11448 * c-objc.h (objc_build_message_expr): Updated prototype.
11449 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11450
a358e188
MJ
114512011-04-12 Martin Jambor <mjambor@suse.cz>
11452
11453 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11454 of cgraph_node.
11455
e6313a78
RG
114562011-04-11 Richard Guenther <rguenther@suse.de>
11457
11458 * c-common.c (complete_array_type): Build a range type of
11459 proper type.
11460
dcf0c47e
NF
114612011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11462
11463 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11464 (handle_type_generic_attribute): Likewise.
11465
1ee44b26
JM
114662011-04-07 Jason Merrill <jason@redhat.com>
11467
11468 PR c++/48450
11469 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11470 conversion from C++0x scoped enum.
11471
acce4e77
JM
114722011-04-06 Joseph Myers <joseph@codesourcery.com>
11473
11474 * c-target-def.h: New file.
11475 * c-target.def: New file.
11476 * c-target.h: New file.
11477 * c-common.c (targetcm): Don't define here.
11478 * c-common.h (default_handle_c_option): Declare.
11479 * c-format.c: Include c-target.h instead of target.h.
11480 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11481 include tm.h.
11482 (default_handle_c_option): Move from targhooks.c.
11483
e2eefb55
JJ
114842011-03-29 Jakub Jelinek <jakub@redhat.com>
11485
11486 PR preprocessor/48248
11487 * c-ppoutput.c (print): Add src_file field.
11488 (init_pp_output): Initialize it.
11489 (maybe_print_line): Don't optimize by adding up to 8 newlines
11490 if map->to_file and print.src_file are different file.
11491 (print_line): Update print.src_file.
11492
ba78087b
KT
114932011-03-25 Kai Tietz <ktietz@redhat.com>
11494
11495 * c-ada-spec.c (compare_comment): Use filename_cmp
11496 instead of strcmp for filename.
11497
0edf1bb2
JL
114982011-03-25 Jeff Law <law@redhat.com>
11499
adfac8df 11500 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11501
c7dc8804
JM
115022011-03-25 Jason Merrill <jason@redhat.com>
11503
11504 * c.opt: Add -std=c++03.
11505
d1d879b1
EB
115062011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11507
11508 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11509
3f8257db 115102011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11511
11512 PR target/12171
5050afdf
KT
11513 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11514 Display allowed attributes for function pointer types.
11515 (pp_c_attributes_display): New function to display
11516 attributes having affects_type_identity flag set to true.
11517 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11518
62d784f7
KT
11519 * c-common.c (c_common_attribute_table):
11520 Add new element.
11521 (c_common_format_attribute_table): Likewise.
11522
82d37118
JM
115232011-03-18 Jason Merrill <jason@redhat.com>
11524
49a000c3
JM
11525 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11526 * c-common.h: Don't declare it here.
11527 * c-common.c: Or define it here.
11528 * c-opts.c (c_common_handle_option): Or set it here.
11529
82d37118
JM
11530 PR c++/35315
11531 * c-common.c (handle_transparent_union_attribute): Don't
11532 make a duplicate type in C++.
11533
17bc631c
JM
115342011-03-15 Jason Merrill <jason@redhat.com>
11535
11536 * c-common.c (max_constexpr_depth): New.
11537 * c-common.h: Declare it.
11538 * c-opts.c (c_common_handle_option): Set it.
11539 * c.opt (fconstexpr-depth): New option.
11540
1b9b91a6
JM
115412011-03-11 Jason Merrill <jason@redhat.com>
11542
f231b5ff
JM
11543 * c-common.c (attribute_takes_identifier_p): Add missing const.
11544
1b9b91a6
JM
11545 PR c++/46803
11546 * c-common.c (attribute_takes_identifier_p): Assume that an
11547 unknown attribute takes an identifier.
11548
a19e4d44
NF
115492011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11550
11551 PR c/47786
11552 * c-common.c (c_type_hash): Call list_length instead of iterating
11553 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11554
982d62f6
JJ
115552011-02-19 Jakub Jelinek <jakub@redhat.com>
11556
11557 PR c/47809
11558 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11559
0a256240
NP
115602011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11561
11562 * c.opt (fobjc-abi-version=) New.
11563 (fobjc-nilcheck): New.
11564
ba9e6dd5
NF
115652011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11566
11567 PR c++/46890
11568 * c-common.h (keyword_is_decl_specifier): Declare.
11569 * c-common.c (keyword_is_decl_specifier): Define.
11570 (keyword_is_function_specifier): New function.
11571
7273813a
JJ
115722011-01-26 Jakub Jelinek <jakub@redhat.com>
11573
11574 PR c/47473
11575 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11576 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11577 REAL_TYPE.
11578
908ef79b
AC
115792011-01-26 Arnaud Charlet <charlet@adacore.com>
11580
11581 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11582
237e9384
JJ
115832011-01-26 Jakub Jelinek <jakub@redhat.com>
11584
11585 PR pch/47430
11586 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11587 after init_c_lex if pch_file is set.
11588
47ea1edf
DK
115892011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11590
d4dba752 11591 PR c++/43601
47ea1edf
DK
11592 * c.opt (-fkeep-inline-dllexport): New switch.
11593
2aa9c6ae
RG
115942011-01-12 Richard Guenther <rguenther@suse.de>
11595
11596 PR middle-end/32511
11597 * c-common.c (handle_weak_attribute): Warn instead of error
11598 on declaring an inline function weak.
11599
7bd11157
TT
116002011-01-05 Tom Tromey <tromey@redhat.com>
11601
11602 * c-common.h (lvalue_error): Update.
11603 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11604 not error.
11605
0e66e494 116062010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11607
b4f588c4
NP
11608 PR objc/47075
11609 * c-objc.h (objc_finish_message_expr): Added argument to
11610 prototype.
11611
f4da8dce
NF
116122010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11613
11614 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11615 Use prototype_p.
11616
46270f14
NP
116172010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11618
11619 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11620 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11621
4816c593
NF
116222010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11623
11624 * c-common.h (readonly_error): Declare.
11625 * c-common.c (readonly_error): Define.
11626
7a6daeb0
NF
116272010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11628
11629 * c-common.h (invalid_indirection_error): Declare.
11630 * c-common.c (invalid_indirection_error): Define.
11631
892f6119
RG
116322010-12-03 Richard Guenther <rguenther@suse.de>
11633
11634 PR c/46745
11635 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11636 (pp_c_unary_expression): Likewise.
11637 (pp_c_expression): Likewise.
11638
6c39e757
NP
116392010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11640
11641 * c-common.h (objc_finish_function): New.
11642 (objc_non_volatilized_type): Removed.
11643 (objc_type_quals_match): Removed.
11644 * stub-objc.c (objc_finish_function): New.
11645 (objc_non_volatilized_type): Removed.
11646 (objc_type_quals_match): Removed.
9faeb493 11647
7c475d11
JM
116482010-11-30 Joseph Myers <joseph@codesourcery.com>
11649
11650 * c-common.h (parse_optimize_options): Declare.
11651 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11652 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11653
71f3e391
JM
116542010-11-29 Joseph Myers <joseph@codesourcery.com>
11655
11656 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11657 GET_ENVIRONMENT.
11658 * c-pch.c (O_BINARY): Don't define here.
11659 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11660
d5fabb58
JM
116612010-11-25 Joseph Myers <joseph@codesourcery.com>
11662
11663 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11664 targetm.except_unwind_info.
11665
299404a1
JM
116662010-11-23 Joseph Myers <joseph@codesourcery.com>
11667
11668 * c-opts.c (c_common_handle_option): Pass location to
11669 set_struct_debug_option.
11670
c98cd5bf
JM
116712010-11-23 Joseph Myers <joseph@codesourcery.com>
11672
11673 * c-common.c (visibility_options): Move from ../opts.c.
11674 * c-common.h (struct visibility_flags, visibility_options):
11675 Declare here.
11676 * c-opts.c (finish_options): Rename to c_finish_options.
11677 (c_common_init): Update call to finish_options.
11678
a9546771
NP
116792010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11680
11681 PR objc/34033
11682 * c-lex.c (lex_string): Check that each string in an Objective-C
11683 string concat sequence starts with either one or zero '@', and
11684 that there are no spurious '@' signs at the end.
11685
24a57808
JM
116862010-11-20 Joseph Myers <joseph@codesourcery.com>
11687
11688 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11689 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11690 HANDLE_PRAGMA_VISIBILITY.
11691 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11692 HANDLE_PRAGMA_VISIBILITY): Don't define.
11693 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11694
a9aa2c3a
NF
116952010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11696
11697 PR c++/16189
11698 PR c++/36888
11699 PR c++/45331
11700 * c-common.h (keyword_begins_type_specifier): Declare.
11701 (keyword_is_storage_class_specifier): Declare.
11702 (keyword_is_type_qualifier): Declare.
11703 * c-common.c (keyword_begins_type_specifier): New function.
11704 (keyword_is_storage_class_specifier): New function.
11705 (keyword_is_type_qualifier): Declare.
11706
5386338c
JM
117072010-11-19 Joseph Myers <joseph@codesourcery.com>
11708
11709 PR c/46547
11710 * c-common.c (in_late_binary_op): Define.
11711 (c_common_truthvalue_conversion): Check in_late_binary_op before
11712 calling c_save_expr.
11713 * c-common.h (in_late_binary_op): Declare.
11714
69ccdddb
JM
117152010-11-19 Joseph Myers <joseph@codesourcery.com>
11716
11717 * c-opts.c (c_common_handle_option): Update calls to
11718 set_struct_debug_option.
11719
6b192a09
NP
117202010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11721
11722 * c-common.h (objc_declare_protocols): Added additional argument.
11723 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11724
fb52b50a
NF
117252010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11726
11727 PR c/33193
11728 * c-common.h (build_real_imag_expr): Declare.
11729 * c-semantics.c (build_real_imag_expr): Define.
11730
b37421c6
JM
117312010-11-17 Joseph Myers <joseph@codesourcery.com>
11732
11733 * c-opts.c (c_common_parse_file): Take no arguments.
11734 * c-common.h (c_common_parse_file): Update prototype.
11735
07078664
JJ
117362010-11-16 Jakub Jelinek <jakub@redhat.com>
11737
11738 PR c++/46401
11739 * c-common.c (warning_candidate_p): Don't track non-const calls
11740 or STRING_CSTs.
11741
c6a13190
ILT
117422010-11-15 Ian Lance Taylor <iant@google.com>
11743
11744 * c-lex.c (init_c_lex): Set macro debug callbacks if
11745 flag_dump_go_spec is set.
11746
925e8657
NP
117472010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11748
11749 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11750 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11751
bb0a9581
NF
117522010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11753
11754 PR preprocessor/45038
11755 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11756 dialects.
11757
c5fa0890
JM
117582010-11-12 Joseph Myers <joseph@codesourcery.com>
11759
11760 * c-common.h (c_family_lang_mask): Declare.
11761 * c-opts.c (c_family_lang_mask): Make extern.
11762 * c-pragma.c (handle_pragma_diagnostic): Use
11763 control_warning_option.
11764
a4d8c676
JM
117652010-11-12 Joseph Myers <joseph@codesourcery.com>
11766
11767 * c-common.c (parse_optimize_options): Update call to
11768 decode_options.
11769 * c-common.h (c_common_handle_option): Update prototype.
11770 * c-opts.c (c_common_handle_option): Take location_t parameter and
11771 pass it to other functions.
11772
f954bd2c
JM
117732010-11-11 Joseph Myers <joseph@codesourcery.com>
11774
11775 * c-opts.c (warning_as_error_callback): Remove.
11776 (c_common_initialize_diagnostics): Don't call
11777 register_warning_as_error_callback.
11778 (c_common_handle_option): Handle -Werror=normalized= here.
11779
d8a07487
JM
117802010-11-10 Joseph Myers <joseph@codesourcery.com>
11781
11782 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11783 in diagnostic.
11784 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11785 letter.
11786 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11787 Remove trailing '.' from diagnostics.
11788 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11789
d5478783
JM
117902010-11-10 Joseph Myers <joseph@codesourcery.com>
11791
11792 * c-common.c (parse_optimize_options): Pass global_dc to
11793 decode_options.
11794 * c-opts.c (c_common_handle_option): Pass &global_options to
11795 set_Wstrict_aliasing.
11796 * c.opt (v): Don't mark Common or document here.
11797
91ebb981
IS
117982010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11799
11800 PR target/44981
11801 * c-format.c (format_type): New type gcc_objc_string_format_type.
11802 (valid_stringptr_type_p): New.
11803 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11804 (check_format_string): Pass expected type, use
91ebb981
IS
11805 valid_stringptr_type_p (), check that the format string types are
11806 consistent with the format specification.
11807 (decode_format_attr): Warn if NSString is used outside objective-c.
11808 (format_types_orig): Add NSString.
11809 (format_name): New.
11810 (format_flags): New.
11811 (check_format_arg): Handle format strings requiring an external parser.
11812 first_target_format_type: New variable.
11813 (handle_format_attribute): Set up first_target_format_type, pass the
11814 expected format arg string type to check_format_string().
ab20d992 11815 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11816 * stub-objc.c (objc_string_ref_type_p): New.
11817 (objc_check_format_arg): New.
11818
bede2adc
NP
118192010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11820
9faeb493 11821 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11822 * c-common.h (objc_build_class_component_ref): New.
11823 * stub-objc.c (objc_build_class_component_ref): New.
11824
9a179d01
NP
118252010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11826
11827 * c.opt (Wproperty-assign-default): New option.
11828
22d8d616
NP
118292010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11830
11831 Implemented -fobjc-std=objc1 flag.
11832 * c.opt (fobjc-std=objc1): New option.
11833
2debdb4f
NP
118342010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11835
11836 Implemented format and noreturn attributes for Objective-C methods.
11837 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11838 attribute for Objective-C methods.
11839
ec52b111
JM
118402010-10-31 Jason Merrill <jason@redhat.com>
11841
11842 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11843 EXPR_LOC_OR_HERE.
11844
46a88c12
NP
118452010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11846
11847 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11848 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11849 (objc_add_property_declaration): Removed arguments for copies and
11850 ivar.
11851 (objc_build_getter_call): Renamed to
11852 objc_maybe_build_component_ref.
11853 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11854 (objc_is_property_ref): New.
11855 * c-common.c (c_common_reswords): Removed copies and ivar.
11856 * stub-objc.c (objc_add_property_declaration): Removed arguments
11857 for copies and ivar.
11858 (objc_build_getter_call): Renamed to
11859 objc_maybe_build_component_ref.
11860 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11861 (objc_is_property_ref): New.
9faeb493 11862
1e4bf85b
AC
118632010-10-29 Arnaud Charlet <charlet@adacore.com>
11864 Matthew Gingell <gingell@adacore.com>
11865
11866 * c-ada-spec.c (separate_class_package): New function.
11867 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11868 name of their enclosing package.
11869 (print_ada_declaration): Use separate_class_package.
11870
81f0bab2
JM
118712010-10-27 Jason Merrill <jason@redhat.com>
11872
2b08f2c5
JM
11873 * c-common.c (c_common_reswords): Add __is_literal_type.
11874 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11875
81f0bab2
JM
11876 * c-common.c (check_case_value): Remove special C++ code.
11877
200290f2
NP
118782010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11879
11880 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11881 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11882 and RID_LAST_PATTR.
11883 (objc_add_property_declaration): Added additional arguments.
11884 (objc_property_attribute_kind): Removed.
11885 (objc_set_property_attr): Removed.
11886 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11887 copy and nonatomic.
11888 * stub-objc.c (objc_add_property_declaration): Added additional
11889 arguments.
11890 (objc_set_property_attr): Removed.
9faeb493 11891
f614132b
NP
118922010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11893
11894 * c-common.h (objc_add_property_variable): Renamed to
11895 objc_add_property_declaration. Added location argument.
11896 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11897
b8a18805
NP
118982010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11899
11900 * c-common.h (objc_maybe_printable_name): New.
11901 * stub-objc.c (objc_maybe_printable_name): New.
11902
3f8257db
JJ
119032010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11904 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11905
11906 * c-common.h (c_common_mark_addressable_vec): Declare.
11907 * c-common.c (c_common_mark_addressable_vec): New function.
11908
249a82c4
NP
119092010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11910
11911 * c-common.h (objc_set_method_type): Removed.
11912 (objc_add_method_declaration): Added boolean argument.
11913 (objc_start_method_definition): Same change.
11914 (objc_build_method_signature): Same change.
11915 * stub-objc.c (objc_set_method_type): Removed.
11916 (objc_add_method_declaration): Added boolean argument.
11917 (objc_start_method_definition): Same change.
11918 (objc_build_method_signature): Same change.
11919
977e30bc
NP
119202010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11921
11922 * c-common.h (finish_file): Removed.
11923 (objc_write_global_declarations): New.
11924 * c-opts.c (c_common_parse_file): Do not call finish_file.
11925 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11926
da57d1b9
NP
119272010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11928
11929 Implemented parsing @synthesize and @dynamic for
11930 Objective-C/Objective-C++.
11931 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11932 (objc_add_synthesize_declaration): New.
11933 (objc_add_dynamic_declaration): New.
11934 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11935 * stub-objc.c (objc_add_synthesize_declaration): New.
11936 (objc_add_dynamic_declaration): New.
9faeb493 11937
0069111f
MM
119382010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11939
11940 PR target/46041
11941 * c-cppbuiltin.c (mode_has_fma): Move function here from
11942 builtins.c. Don't use the fma optab, instead just use the
11943 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11944 using -save-temps.
11945
e426b47b
NP
119462010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11947
11948 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11949
3f8257db 11950 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11951
9faeb493 11952 Radar 4330422
e426b47b
NP
11953 * c-common.h (objc_non_volatilized_type): New declaration
11954 * stub-objc.c (objc_non_volatilized_type): New stub.
11955
90fbfdc3
NP
119562010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11957
e426b47b 11958 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11959
ab20d992 11960 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11961
9faeb493 11962 Radar 4133425
90fbfdc3 11963 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11964 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11965
c37d8c30
IS
119662010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11967
11968 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11969 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11970 (objc_ivar_visibility_kind): New enum.
11971 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11972 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11973 visibility enum.
11974
1b1562a5
MM
119752010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11976
11977 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11978 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11979 has the appropriate fma builtins.
11980 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11981
668ea4b1
IS
119822010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11983
1b1562a5 11984 merge from FSF apple 'trunk' branch.
3f8257db 11985 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11986
668ea4b1
IS
11987 Radars 4436866, 4505126, 4506903, 4517826
11988 * c-common.c (c_common_resword): Define @property and its attributes.
11989 * c-common.h: Define property attribute enum entries.
11990 (OBJC_IS_PATTR_KEYWORD): New.
11991 (objc_property_attribute_kind): New enum.
11992 Declare objc_set_property_attr (), objc_add_property_variable (),
11993 objc_build_getter_call () and objc_build_setter_call ().
11994 * stub-objc.c (objc_set_property_attr): New stub.
11995 (objc_add_property_variable): Likewise.
11996 (objc_build_getter_call): Likewise.
11997 (objc_build_setter_call) Likewise.
1b1562a5 11998
a1178b30
IS
119992010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12000
1b1562a5 12001 merge from FSF apple 'trunk' branch.
ab20d992 12002 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12003
12004 Radar 3803157 (method attributes)
12005 * c-common.c (handle_deprecated_attribute): Recognize
12006 objc methods as valid declarations.
12007 * c-common.h: Declare objc_method_decl ().
1b1562a5 12008 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12009
a75bfaa6
JM
120102010-10-08 Joseph Myers <joseph@codesourcery.com>
12011
12012 * c-common.c (parse_optimize_options): Call
12013 decode_cmdline_options_to_array_default_mask before
12014 decode_options. Update arguments to decode_options.
12015 * c-common.h (c_common_init_options_struct): Declare.
12016 * c-opts.c (c_common_init_options_struct): New. Split out from
12017 c_common_init_options.
12018
f05b9d93
NP
120192010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12020
12021 Implemented fast enumeration for Objective-C.
12022 * c-common.h (objc_finish_foreach_loop): New.
12023 * stub-objc.c (objc_finish_foreach_loop): New.
12024
1ebe4b4f
JM
120252010-10-05 Joseph Myers <joseph@codesourcery.com>
12026
12027 * c-common.h (struct diagnostic_context): Don't declare here.
12028 (c_common_initialize_diagnostics): Declare using
12029 diagnostic_context typedef.
12030 * c-opts.c (c_common_handle_option): Pass global_dc to
12031 handle_generated_option.
12032
d4d24ba4
JM
120332010-10-04 Joseph Myers <joseph@codesourcery.com>
12034
12035 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12036 handle_generated_option.
12037
478a1c5b
ILT
120382010-10-03 Ian Lance Taylor <iant@google.com>
12039
12040 * c.opt (-fplan9-extensions): New option.
12041
82a1c2fe
FXC
120422010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12043
12044 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12045 Remove.
12046 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12047 of duplicating code.
12048
92902b1b
IS
120492010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12050
12051 * c-common.c: Add two new entries for @optional
12052 and @required keywords.
12053
12054 merge from FSF 'apple/trunk' branch.
3f8257db 12055 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12056
12057 Radar 4386773
12058 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12059 objective-c keywords.
12060 (objc_set_method_opt): New declaration.
12061 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12062
46625112
JM
120632010-09-30 Joseph Myers <joseph@codesourcery.com>
12064
12065 * c-common.c (handle_optimize_attribute): Pass &global_options to
12066 cl_optimization_save and cl_optimization_restore.
12067 * c-opts.c (c_common_handle_option): Pass &global_options to
12068 handle_generated_option.
12069 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12070 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12071 &global_options to cl_optimization_restore.
12072
49b91f05
NP
120732010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12074
12075 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12076 Objective-C/Objective-C++ keywords.
12077
13ed556f 120782010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12079
9faeb493
UB
12080 Merge from 'apple/trunk' branch on FSF servers.
12081
3f8257db 12082 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12083
12084 Radar 4281748
12085 * c-common.h (objc_check_global_decl): New declaration.
12086 * stub-objc.c (objc_check_global_decl): New stub.
12087
f0036cca
JM
120882010-09-29 Joseph Myers <joseph@codesourcery.com>
12089
12090 * c.opt: Don't use VarExists.
12091
e3339d0f
JM
120922010-09-29 Joseph Myers <joseph@codesourcery.com>
12093
12094 * c-common.c (c_cpp_error): Update names of diagnostic_context
12095 members.
12096 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12097 cl_optimization members.
12098 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12099 sanitize_cpp_opts, finish_options): Update names of cpp_options
12100 members.
12101
1973201f
NP
121022010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12103
12104 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12105 (objc_is_reserved_word): Removed.
12106 * c-common.c: Updated comments.
12107 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12108 objc_is_reserved_word.
12109 * stub-objc.c (objc_is_reserved_word): Removed.
12110
f7e71da5
IS
121112010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12112
9faeb493 12113 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12114 include attributes.
12115 (objc_start_method_definition): Likewise.
12116 (objc_build_keyword_decl): Likewise.
12117 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12118 (objc_start_method_definition): Likewise.
12119 (objc_build_keyword_decl): Likewise.
12120
c165dca7
IS
121212010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12122
12123 * c-common.h (objc_start_class_interface): Adjust prototype.
12124 (objc_start_category_interface): Likewise.
12125 (objc_start_protocol): Likewise.
12126 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12127 (objc_start_class_interface): Likewise.
12128 (objc_start_category_interface): Likewise.
12129
7458026b
ILT
121302010-09-27 Ian Lance Taylor <iant@google.com>
12131
12132 * c-common.c (c_common_attribute_table): Add no_split_stack.
12133 (handle_no_split_stack_attribute): New static function.
12134
b581b85b
NP
121352010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12136
9faeb493 12137 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12138
3f8257db 12139 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12140
9faeb493 12141 Radar 4229905
b581b85b
NP
12142 * c-common.h (objc_have_common_type): New declaration.
12143 * stub-objc.c (objc_have_common_type): New stub.
12144
12145 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12146
12147 Radar 4154928
12148 * c-common.h (objc_common_type): New prototype.
9faeb493 12149 * stub-objc.c (objc_common_type): New stub.
b581b85b 12150
46a4da10
JH
121512010-09-24 Jan Hubicka <jh@suse.cz>
12152
12153 * c-common.c (handle_leaf_attribute): New function.
12154 (struct attribute_spec c_common_att): Add leaf.
12155
e200444e
JM
121562010-09-22 Joseph Myers <joseph@codesourcery.com>
12157
12158 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12159 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12160 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12161 -include-barrier, -include-directory, -include-directory=,
12162 -include-directory-after, -include-directory-after=,
12163 -include-prefix, -include-prefix=, -include-with-prefix,
12164 -include-with-prefix=, -include-with-prefix-after,
12165 -include-with-prefix-after=, -include-with-prefix-before,
12166 -include-with-prefix-before=, -no-integrated-cpp,
12167 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12168 -output=, -pedantic, -pedantic-errors, -preprocess,
12169 -print-missing-file-dependencies, -trace-includes, -traditional,
12170 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12171 -user-dependencies, -verbose, -write-dependencies,
12172 -write-user-dependencies, no-integrated-cpp, traditional): New.
12173
29a80ea6
NP
121742010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12175
12176 PR objc/23710
ac1fc2fc
NP
12177 * c-common.h (objc_start_method_definition): Return bool instead
12178 of void.
12179 * stub-objc.c (objc_start_method_definition): Return bool instead
12180 of void.
12181
121822010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12183
12184 PR objc/25965
12185 * c-common.h (objc_get_interface_ivars): New declaration.
12186 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12187
de621752
ILT
121882010-09-15 Ian Lance Taylor <iant@google.com>
12189
12190 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12191 messages. Remove period at end of warning message.
de621752 12192
ba885ec5
NS
121932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12194
12195 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12196 (handle_alias_attribute): ... here.
12197 (handle_ifunc_attribute): New.
12198
c5ee1358
MM
121992010-09-06 Mark Mitchell <mark@codesourcery.com>
12200
12201 * c-common.h (do_warn_double_promotion): Declare.
12202 * c-common.c (do_warn_double_promotion): Define.
12203
0a0b3574
MM
122042010-09-05 Mark Mitchell <mark@codesourcery.com>
12205
12206 * c.opt (Wdouble-promotion): New.
12207
d1779886
JM
122082010-09-02 Joseph Myers <joseph@codesourcery.com>
12209
12210 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12211 fvtable-thunks, fxref): Mark no longer supported in help text.
12212
2d2bd949
JM
122132010-09-02 Joseph Myers <joseph@codesourcery.com>
12214
12215 * c.opt (Wimport, fall-virtual, falt-external-templates,
12216 fdefault-inline, fenum-int-equiv, fexternal-templates,
12217 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12218 fname-mangling-version-, fnew-abi, fnonnull-objects,
12219 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12220 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12221 applicable.
12222 (fhandle-exceptions): Mark with Alias and Warn.
12223 * c-opts.c (c_common_handle_option): Don't handle options marked
12224 as ignored.
12225
5de8299c
JM
122262010-09-02 Joseph Myers <joseph@codesourcery.com>
12227
12228 * c.opt (Wcomments, Werror-implicit-function-declaration,
12229 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12230 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12231 aliases.
12232 * c-common.c (option_codes): Use OPT_Wcomment instead of
12233 OPT_Wcomments.
12234 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12235 Don't handle options marked as aliases.
12236
0ceb0201
RG
122372010-08-25 Richard Guenther <rguenther@suse.de>
12238
12239 * c-common.c (c_common_get_alias_set): Remove special
12240 handling for pointers.
12241
ac47786e
NF
122422010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12243
12244 * c-common.c: Use FOR_EACH_VEC_ELT.
12245 * c-gimplify.c: Likewise.
12246 * c-pragma.c: Likewise.
12247
c878765b
JM
122482010-08-16 Joseph Myers <joseph@codesourcery.com>
12249
12250 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12251 RejectDriver.
12252 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12253 RejectDriver.
12254 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12255 instead of OPT_MDX and OPT_MMDX.
12256
603349bf
JM
122572010-08-16 Joseph Myers <joseph@codesourcery.com>
12258
12259 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12260
644fa7ac
JM
122612010-08-12 Joseph Myers <joseph@codesourcery.com>
12262
12263 * c.opt (MD, MMD): Change to MDX and MMDX.
12264 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12265
481e1176
JM
122662010-08-11 Joseph Myers <joseph@codesourcery.com>
12267
12268 * c-opts.c (c_common_handle_option): Call handle_generated_option
12269 instead of handle_option.
12270
ac8dc9f7
NF
122712010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12272
12273 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12274 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12275
4f8c876d
NF
122762010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12277
12278 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12279 (pending_redefine_extname): Change type to a VEC.
12280 (add_to_renaming_pragma_list): Update for new type of
12281 pending_redefine_extname.
ac8dc9f7 12282 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12283
3b0c690e
AC
122842010-08-04 Arnaud Charlet <charlet@adacore.com>
12285
12286 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12287 visited.
12288 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12289 decide whether a type has already been declared/seen.
12290 Do not go to the original type.
12291 (dump_nested_types): New parameter forward.
12292 Generate forward declaration if needed and mark type as visited.
12293 (print_ada_declaration): Call dump_nested_types if not already done.
12294 Mark types as visited.
12295
1890bccc
JM
122962010-08-03 Joseph Myers <joseph@codesourcery.com>
12297
12298 * c.opt (-print-pch-checksum): Remove option.
12299 * c-opts.c (c_common_handle_option): Don't handle
12300 OPT_print_pch_checksum.
12301
5f20c657
JM
123022010-07-27 Joseph Myers <joseph@codesourcery.com>
12303
12304 * c-common.h (c_common_handle_option): Update prototype and return
12305 value type.
12306 * c-opts.c (c_common_handle_option): Update prototype and return
12307 value type. Update calls to handle_option and
12308 enable_warning_as_error.
12309
f551f80c
JJ
123102010-07-27 Jakub Jelinek <jakub@redhat.com>
12311
12312 PR c/45079
12313 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12314
61ff2bdc
JM
123152010-07-27 Joseph Myers <joseph@codesourcery.com>
12316
12317 * c-common.h (c_common_missing_argument): Remove.
12318 * c-opts.c (c_common_missing_argument): Remove.
12319 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12320 idirafter, imacros, include, isysroot, isystem, iquote): Add
12321 MissingArgError.
12322 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12323
7a9bf9a4
JM
123242010-07-27 Joseph Myers <joseph@codesourcery.com>
12325
12326 * c-common.h (c_common_option_lang_mask,
12327 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12328 New.
12329 (c_common_init_options): Update prototype.
12330 * c-opts.c (c_common_option_lang_mask): New.
12331 (c_common_initialize_diagnostics): Split out of
12332 c_common_init_options.
12333 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12334 New.
12335 (c_common_init_options): Update prototype. Use decoded options in
12336 search for -lang-asm.
12337
910ad8de
NF
123382010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12339
12340 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12341 * c-format.c: Likewise.
12342
718f9c0f
MLI
123432010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12344
12345 * c-common.h: Include diagnostic-core.h. Error if already
12346 included.
12347 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12348
4d451982
MLI
123492010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12350
adfac8df 12351 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12352 Do not include expr.h
12353 (vector_mode_valid_p): Move here.
12354
119fe915
SB
123552010-06-21 DJ Delorie <dj@redhat.com>
12356
12357 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12358 allow these pragmas anywhere.
12359
123602010-06-14 Jakub Jelinek <jakub@redhat.com>
12361
12362 PR bootstrap/44509
12363 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12364 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12365 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12366 ggc_strdup instead of xstrdup.
12367
123682010-06-10 Jakub Jelinek <jakub@redhat.com>
12369
12370 * c-cppbuiltin.c: Include cpp-id-data.h.
12371 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12372 (lazy_hex_fp_value): New function.
12373 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12374
6662d794
MLI
123752010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12376
12377 * c-gimplify.c: Do not include tree-flow.h
12378
38f8b050
JR
123792010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12380
12381 PR other/44034
12382 * c-common.c: Rename targetm member:
12383 targetm.enum_va_list -> targetm.enum_va_list_p
12384
9589f23e
AS
123852010-06-28 Anatoly Sokolov <aesok@post.ru>
12386
12387 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12388
3b06d379
SB
123892010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12390
12391 * c-cppbuiltin.c: Do not include except.h.
12392
d166d4c3
AK
123932010-06-24 Andi Kleen <ak@linux.intel.com>
12394
9faeb493
UB
12395 * c-common.c (warn_for_omitted_condop): New.
12396 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12397
70cb8be6
JM
123982010-06-21 Joseph Myers <joseph@codesourcery.com>
12399
12400 * c.opt (lang-objc): Remove.
12401 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12402
a4c97feb
JR
124032010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12404
12405 * c-opts.c: Include "tm_p.h".
12406
6e2f1956
JM
124072010-06-20 Joseph Myers <joseph@codesourcery.com>
12408
12409 * c-common.c (parse_optimize_options): Update call to
12410 decode_options.
12411
bc87224e
NF
124122010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12413
12414 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12415 new type of types_used_by_cur_var_decl.
12416
b49cf425
JR
124172010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12418
12419 PR bootstrap/44512
12420 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12421 for C++ standard compliance.
12422
59f9c2ed
JM
124232010-06-16 Jason Merrill <jason@redhat.com>
12424
12425 * c.opt: Add -Wnoexcept.
12426
33766b66
RG
124272010-06-16 Richard Guenther <rguenther@suse.de>
12428
12429 PR c/44555
12430 * c-common.c (c_common_truthvalue_conversion): Remove
12431 premature and wrong optimization concering ADDR_EXPRs.
12432
eff7e30c
AC
124332010-06-15 Arnaud Charlet <charlet@adacore.com>
12434
12435 * c-ada-spec.c (dump_sloc): Remove column info.
12436 (is_simple_enum): New function.
12437 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12438 enum types when relevant.
12439
6312e84d
MLI
124402010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12441
9faeb493 12442 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12443 location.
12444
1cb42611
JM
124452010-06-10 Joseph Myers <joseph@codesourcery.com>
12446
12447 * c-opts.c (c_common_handle_option): Don't handle
12448 OPT_fshow_column.
12449
a9429e29
LB
124502010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12451
12452 * c-pragma.c (push_alignment): Use typed GC allocation.
12453 (handle_pragma_push_options): Likewise.
12454
12455 * c-common.c (parse_optimize_options): Likewise.
12456
12457 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12458 option.
12459
5498f011
JM
124602010-06-07 Joseph Myers <joseph@codesourcery.com>
12461
12462 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12463 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12464 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12465 flag_signed_bitfields, warn_strict_null_sentinel,
12466 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12467 flag_gen_declaration, flag_no_gnu_keywords,
12468 flag_implement_inlines, flag_implicit_templates,
12469 flag_implicit_inline_templates, flag_optional_diags,
12470 flag_elide_constructors, flag_default_inline, flag_rtti,
12471 flag_conserve_space, flag_access_control, flag_check_new,
12472 flag_new_for_scope, flag_weak, flag_working_directory,
12473 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12474 flag_enforce_eh_specs, flag_threadsafe_statics,
12475 flag_pretty_templates): Remove.
12476 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12477 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12478 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12479 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12480 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12481 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12482 flag_no_gnu_keywords, flag_implement_inlines,
12483 flag_implicit_templates, flag_implicit_inline_templates,
12484 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12485 flag_rtti, flag_conserve_space, flag_access_control,
12486 flag_check_new, flag_new_for_scope, flag_weak,
12487 flag_working_directory, flag_use_cxa_atexit,
12488 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12489 flag_threadsafe_statics, flag_pretty_templates,
12490 warn_strict_null_sentinel): Remove.
12491 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12492 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12493 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12494 fimplicit-inline-templates, fimplicit-templates,
12495 flax-vector-conversions, fms-extensions, fnil-receivers,
12496 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12497 frtti, fshort-double, fshort-enums, fshort-wchar,
12498 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12499 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12500 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12501 gen-decls, undef): Use Var.
12502 (fdefault-inline, foptional-diags): Document as doing nothing.
12503 * c-opts.c (c_common_handle_option): Remove cases for options now
12504 using Var. Mark ignored options as such.
12505
39dabefd
SB
125062010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12507
9faeb493 12508 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12509 * c-common.def: Likewise.
12510 * c-common.h: Likewise.
12511 * c-cppbuiltin.c: Likewise.
12512 * c-dump.c: Likewise.
12513 * c-format.c: Likewise.
12514 * c-format.h : Likewise.
12515 * c-gimplify.c: Likewise.
12516 * c-lex.c: Likewise.
12517 * c-omp.c: Likewise.
12518 * c.opt: Likewise.
12519 * c-opts.c: Likewise.
12520 * c-pch.c: Likewise.
12521 * c-ppoutput.c: Likewise.
12522 * c-pragma.c: Likewise.
12523 * c-pragma.h: Likewise.
12524 * c-pretty-print.c: Likewise.
12525 * c-pretty-print.h: Likewise.
12526 * c-semantics.c: Likewise.
12527 * stub-objc.c: Likewise.
12528
12529 * c-common.c: Include gt-c-family-c-common.h.
12530 * c-pragma.c: Include gt-c-family-c-pragma.h.
12531\f
c48514be 12532Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
12533
12534Copying and distribution of this file, with or without modification,
12535are permitted in any medium without royalty provided the copyright
12536notice and this notice are preserved.