]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
50e20ee6
GA
12021-10-07 Martin Liska <mliska@suse.cz>
2
3 * c-common.c (parse_optimize_options): Make
4 save_opt_decoded_options a pointer type.
5
57c7ec62
GA
62021-10-06 Jakub Jelinek <jakub@redhat.com>
7
8 PR tree-optimization/102571
9 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
10 padding, but the non-padding bits are contiguous set of bytes
11 by adjusting the memcmp call arguments instead of emitting
12 __builtin_clear_padding and then comparing all the type's bytes.
13
142021-10-06 Jakub Jelinek <jakub@redhat.com>
15
16 PR c++/102612
17 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
18 __cpp_constexpr to 202110L rather than 201907L.
19
da9c5f78
GA
202021-10-04 Marek Polacek <polacek@redhat.com>
21
22 PR c++/97573
23 * c-common.h (do_warn_array_compare): Declare.
24 * c-warn.c (do_warn_array_compare): New.
25 * c.opt (Warray-compare): New option.
26
e3e07b89
GA
272021-10-02 Iain Sandoe <iain@sandoe.co.uk>
28
29 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
30 NULL, this is not needed.
31
9d116bcc
GA
322021-10-01 Martin Sebor <msebor@redhat.com>
33
34 PR c/102103
35 * c-common.c (decl_with_nonnull_addr_p): Handle members.
36 Check and perform warning suppression.
37 (c_common_truthvalue_conversion): Enhance warning suppression.
38
392021-10-01 Martin Liska <mliska@suse.cz>
40
41 PR target/102552
42 * c-common.c (parse_optimize_options): decoded_options[0] is
43 used for program name, so merged_decoded_options should also
44 respect that.
45
462021-10-01 Jakub Jelinek <jakub@redhat.com>
47 Richard Biener <rguenther@suse.de>
48
49 PR sanitizer/102515
50 * c-ubsan.c (ubsan_instrument_division): Check the right
51 flag_sanitize_recover bit, depending on which sanitization
52 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
53 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
54 and SANITIZE_DIVIDE is enabled, neither check is known
55 to be false and flag_sanitize_recover bits for those two
56 aren't the same, emit both __ubsan_handle_divrem_overflow
57 and __ubsan_handle_divrem_overflow_abort calls.
58
592021-10-01 Martin Liska <mliska@suse.cz>
60
61 * c-common.c (parse_optimize_options): Combine optimize
62 options with what was provided on the command line.
63
642021-10-01 Jakub Jelinek <jakub@redhat.com>
65
66 * c-omp.c (c_omp_split_clauses): Also copy
67 OMP_CLAUSE_ORDER_REPRODUCIBLE.
68
cf966403
GA
692021-09-27 Martin Liska <mliska@suse.cz>
70
71 * c-opts.c (c_common_init_options_struct): Set also
72 x_flag_default_complex_method.
73
e4777439
GA
742021-09-22 Jakub Jelinek <jakub@redhat.com>
75
76 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
77
62498024
GA
782021-09-20 Matthias Kretz <m.kretz@gsi.de>
79
80 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
81 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
82 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
83 __ROUNDING_MATH__ according to the new optimization flags.
84
cf74e7b5
GA
852021-09-18 Jakub Jelinek <jakub@redhat.com>
86
87 * c-omp.c (c_omp_split_clauses): Split order clause also to
88 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
89
0a4cb439
GA
902021-09-17 Jakub Jelinek <jakub@redhat.com>
91
92 * c-omp.c (c_finish_omp_atomic): Avoid creating
93 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
94 create_tmp_var and add a zero initializer to TARGET_EXPRs that
95 had NULL initializer. When omitting operands after v = x,
96 use type of v rather than type of x. Fix type of vtmp
97 TARGET_EXPR.
98
07985c47
GA
992021-09-13 Jason Merrill <jason@redhat.com>
100
101 * c.opt: Add -Winterference-size.
102 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
103 and __GCC_CONSTRUCTIVE_SIZE.
104
a26206ec
GA
1052021-09-10 Jakub Jelinek <jakub@redhat.com>
106
107 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
108 * c-omp.c: Include gimple-fold.h.
109 (c_finish_omp_atomic): Add r and weak arguments. Add support for
110 OpenMP 5.1 atomics.
111
f84e2f0b
GA
1122021-09-09 qing zhao <qing.zhao@oracle.com>
113
114 * c-attribs.c (handle_uninitialized_attribute): New function.
115 (c_common_attribute_table): Add "uninitialized" attribute.
116
b6db7cd4
GA
1172021-09-08 liuhongt <hongtao.liu@intel.com>
118
119 * c-common.c (excess_precision_mode_join): Update below comments.
120 (c_ts18661_flt_eval_method): Set excess_precision_type to
121 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
122 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
123 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
124 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
125
b2748138
GA
1262021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
127
128 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
129
7b739540
GA
1302021-09-03 Eric Botcazou <ebotcazou@adacore.com>
131
132 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
133 and -gnatwu warning for the package specification.
134
e11c6046
GA
1352021-09-01 Iain Sandoe <iain@sandoe.co.uk>
136
137 * c-attribs.c (handle_unavailable_attribute): New.
138
1e2f030b
GA
1392021-08-30 Jason Merrill <jason@redhat.com>
140
141 * c.opt: Add -Wmissing-requires.
142
85d77ac4
GA
1432021-08-25 Lewis Hyatt <lhyatt@gmail.com>
144
145 PR other/93067
146 * c-opts.c (c_common_input_charset_cb): New function.
147 (c_common_post_options): Call new function
148 diagnostic_initialize_input_context().
149
7c9e1645
GA
1502021-08-20 Tobias Burnus <tobias@codesourcery.com>
151
152 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
153 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
154 "di" and "u", respecitively; fill with BADLEN to match
155 size of 'types'.
156 (get_init_dynamic_hwi): Split off from ...
157 (init_dynamic_diag_info): ... here. Call it.
158 (init_dynamic_gfc_info): Call it.
159
1602021-08-20 Jakub Jelinek <jakub@redhat.com>
161
162 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
163 * c-pragma.c (omp_pragmas): Add error directive.
164 * c-omp.c (omp_directives): Uncomment error directive entry.
165
6e529985
GA
1662021-08-18 Jakub Jelinek <jakub@redhat.com>
167
168 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
169 * c-pragma.c (omp_pragmas): Add nothing directive.
170 * c-omp.c (omp_directives): Uncomment nothing directive entry.
171
2d14d64b
GA
1722021-08-17 Jakub Jelinek <jakub@redhat.com>
173
174 PR c++/101539
175 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
176 * c-common.c (c_common_reswords): Add __is_layout_compatible.
177
1782021-08-17 Matt Jacobson <mhjacobson@me.com>
179
180 * c-opts.c (c_common_post_options): Default to
181 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
182
1832021-08-17 Jakub Jelinek <jakub@redhat.com>
184
185 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
186 * c-pragma.c (omp_pragmas): Add scope construct.
187 * c-omp.c (omp_directives): Uncomment scope directive entry.
188
9d1d9fc8
GA
1892021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
190
191 * c-cppbuiltin.c (c_cpp_builtins): Define
192 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
193
72be20e2
GA
1942021-08-12 Jakub Jelinek <jakub@redhat.com>
195
196 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
197 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
198 * c-pragma.c (omp_pragmas_simd): Add masked construct.
199 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
200 enumerator.
201 (c_finish_omp_masked): Declare.
202 * c-omp.c (c_finish_omp_masked): New function.
203 (c_omp_split_clauses): Handle combined masked constructs.
204
4d17ca1b
GA
2052021-07-30 Jakub Jelinek <jakub@redhat.com>
206
207 PR c++/101539
208 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
209 * c-common.c (c_common_reswords): Add
210 __is_pointer_interconvertible_base_of.
211
2122021-07-29 Richard Biener <rguenther@suse.de>
213
214 PR c/101512
215 * c-common.c (c_common_mark_addressable_vec): Look through
216 C_MAYBE_CONST_EXPR even if not at the toplevel.
217
af3f12e6
GA
2182021-07-27 Martin Sebor <msebor@redhat.com>
219
220 PR c/101585
221 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
222
ead235f6
GA
2232021-07-23 Jakub Jelinek <jakub@redhat.com>
224
225 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
226 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
227 and later.
228
2292021-07-23 Jakub Jelinek <jakub@redhat.com>
230
231 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
232 PRAGMA_OMP__LAST_ enumerators.
233
419c6c68
GA
2342021-07-21 Thomas Schwinge <thomas@codesourcery.com>
235 Joseph Myers <joseph@codesourcery.com>
236 Cesar Philippidis <cesar@codesourcery.com>
237
238 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
239
92d45509
GA
2402021-07-20 Martin Sebor <msebor@redhat.com>
241
242 * c-common.c (c_build_shufflevector): Adjust by-value argument to
243 by-const-reference.
244 * c-common.h (c_build_shufflevector): Same.
245
87277b6a
GA
2462021-07-16 Andrew Pinski <apinski@marvell.com>
247
248 PR c/101453
249 * c-common.c (parse_optimize_options): Use the correct
250 size for buffer.
251
d97d71a1
GA
2522021-07-15 Martin Sebor <msebor@redhat.com>
253
254 PR c/101289
255 PR c/97548
256 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
257
c4fee1c6
GA
2582021-07-14 Jason Merrill <jason@redhat.com>
259
260 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
261
6fba0eea
GA
2622021-07-06 Martin Sebor <msebor@redhat.com>
263
264 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
265 (gcc_cdiag_char_table): Same.
266 (gcc_cxxdiag_char_table): Same.
267
7a60a6e8
GA
2682021-07-02 Jakub Jelinek <jakub@redhat.com>
269
270 * c-common.h (enum c_omp_directive_kind): New enum.
271 (struct c_omp_directive): New type.
272 (c_omp_categorize_directive): Declare.
273 * c-omp.c (omp_directives): New variable.
274 (c_omp_categorize_directive): New function.
275
bea7c16a
GA
2762021-07-01 Eric Botcazou <ebotcazou@adacore.com>
277
278 * c-ada-spec.c (packed_layout): New global variable.
279 (dump_ada_declaration): Set it upon seeing a packed record type.
280 Do not put the "aliased" keyword if it is set.
281 (dump_ada_structure): Add Pack aspect if it is set and clear it.
282
2832021-07-01 Eric Botcazou <ebotcazou@adacore.com>
284
285 * c-ada-spec.c (check_name): Rename into...
286 (check_type_name_conflict): ...this. Minor tweak.
287 (dump_ada_function_declaration): Adjust to above renaming.
288 (dump_ada_array_domains): Fix oversight.
289 (dump_ada_declaration): Call check_type_name_conflict for variables.
290
90708f87
GA
2912021-06-25 Martin Sebor <msebor@redhat.com>
292
293 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
294 (c_common_truthvalue_conversion): Replace direct uses of
295 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
296 copy_no_warning.
297 (check_function_arguments_recurse): Same.
298 * c-gimplify.c (c_gimplify_expr): Same.
299 * c-warn.c (overflow_warning): Same.
300 (warn_logical_operator): Same.
301 (warn_if_unused_value): Same.
302 (do_warn_unused_parameter): Same.
303
9aa8327e
GA
3042021-06-24 Jakub Jelinek <jakub@redhat.com>
305
306 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
307 C_ORT_OMP_TARGET.
308 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
309 combined target constructs also add map (always, tofrom:) clause.
310
ede6c356
GA
3112021-06-15 Robin Dapp <rdapp@linux.ibm.com>
312
313 * c-attribs.c (common_handle_aligned_attribute): Remove short
314 circuit and dead code.
315
8dc48181
GA
3162021-06-14 Jonathan Wakely <jwakely@redhat.com>
317
318 PR c++/101052
319 * known-headers.cc (get_stdlib_header_for_name): Add known
320 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
321 exit, and getenv.
322
8b8c3912
GA
3232021-06-12 Jason Merrill <jason@redhat.com>
324
325 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
326
f16f65f8
GA
3272021-06-11 Jakub Jelinek <jakub@redhat.com>
328
329 PR c++/100974
330 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
331 -std=c++2b for P1938R3 consteval if support.
332
4f625f47
GA
3332021-06-09 Jason Merrill <jason@redhat.com>
334
335 PR c++/100879
336 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
337 warning.
338
438aac59
GA
3392021-06-07 Martin Liska <mliska@suse.cz>
340
341 * c-target.def: Split long lines and replace them
342 with '\n\'.
343
600f90cb
GA
3442021-06-04 Martin Sebor <msebor@redhat.com>
345
346 PR c/100783
347 * c-attribs.c (positional_argument): Bail on erroneous types.
348
3492021-06-04 Martin Sebor <msebor@redhat.com>
350
351 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
352 for element presence.
353
440c8a0a
GA
3542021-06-03 Eric Botcazou <ebotcazou@adacore.com>
355
356 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
357 (dump_ada_decl_name): Likewise.
358 (dump_anonymous_type_name): Remove parent parameter and adjust.
359 (dump_sloc): Minor tweak.
360 (dump_ada_array_type): Remove type parameter and adjust.
361 (dump_ada_enum_type): Remove parent parameter and adjust.
362 (dump_ada_node): Adjust calls to above functions.
363 (dumped_anonymous_types): New global variable.
364 (dump_nested_types_1): Rename into...
365 (dump_nested_types): ...this.
366 (dump_nested_type): Remove parent and dumped_types parameters.
367 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
368 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
369 (dump_ada_specs): Initialize and free dumped_anonymous_types.
370
3712021-06-03 Eric Botcazou <ebotcazou@adacore.com>
372
373 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
374 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
375
3762021-06-03 Eric Botcazou <ebotcazou@adacore.com>
377
378 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
379 (htable_t): New typedef.
380 (overloaded_names): Use it.
381 (add_name): New function.
382 (init_overloaded_names): Use add_name to populate the table and add
383 special cases for sigaction and stat.
384 (overloaded_name_p): Rename into...
385 (overloading_index): ...this. Do not initialize overloaded_names table
386 here. Return the index or zero.
387 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
388 but add an overloading suffix instead.
389 (dump_ada_specs): Initialize overloaded_names tables here.
390
b75978d1
GA
3912021-06-01 Martin Liska <mliska@suse.cz>
392
393 PR other/100759
394 * c-attribs.c (handle_optimize_attribute): Limit sanity check
395 to a situation where we are not in processing of an optimize
396 pragma.
397 * c-pragma.c (handle_pragma_pop_options): Restore target
398 options.
399
ee682192
GA
4002021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
401
402 PR testsuite/100749
403 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
404
4052021-05-31 Richard Biener <rguenther@suse.de>
406
407 PR c++/88601
408 * c-common.c: Include tree-vector-builder.h and
409 vec-perm-indices.h.
410 (c_common_reswords): Add __builtin_shufflevector.
411 (c_build_shufflevector): New funtion.
412 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
413 (c_build_shufflevector): Declare.
414
48166757
GA
4152021-05-28 Jakub Jelinek <jakub@redhat.com>
416
417 PR middle-end/99928
418 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
419 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
420
4212021-05-28 Tobias Burnus <tobias@codesourcery.com>
422
423 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
424
2bc6dace
GA
4252021-05-25 Martin Liska <mliska@suse.cz>
426
427 PR tree-optimization/92860
428 PR target/99592
429 * c-attribs.c (handle_optimize_attribute): Save target node
430 before calling parse_optimize_options and save it in case
431 it changes.
432 * c-pragma.c (handle_pragma_target): Similarly for pragma.
433 (handle_pragma_pop_options): Likewise here.
434
4352021-05-25 Martin Liska <mliska@suse.cz>
436
437 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
438
4392021-05-25 Jakub Jelinek <jakub@redhat.com>
440
441 PR middle-end/99928
442 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
443 combined with simd and not with taskloop or for.
444
2832d51b
GA
4452021-05-21 Jakub Jelinek <jakub@redhat.com>
446
447 PR middle-end/99928
448 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
449 on firstprivate clause copy going to target construct, and for
450 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
451
ea34e2ed
GA
4522021-05-20 Jonathan Wakely <jwakely@redhat.com>
453
454 * c.opt (Wc++11-extensions, Wc++14-extensions)
455 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
456 options.
457
4582021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
459
460 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
461
4622021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
463
464 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
465 * c-pch.c (struct c_pch_validity): Use type uint32_t.
466 (pch_init): Renamed member.
467 (c_common_valid_pch): Adjust access to debug_type_names.
468
65f32e5d
GA
4692021-05-19 Martin Sebor <msebor@redhat.com>
470
471 PR c/100619
472 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
473 bounds.
474
a8daf9a1
GA
4752021-05-18 Richard Biener <rguenther@suse.de>
476
477 PR c/100547
478 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
479 Reword existing nunit diagnostic.
480
a7ffc1ef
GA
4812021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
482
483 * c-common.c (braced_list_to_string): Return CTOR unchanged
484 if host and target character sizes don't match.
485
87a7d10c
GA
4862021-05-14 Martin Liska <mliska@suse.cz>
487
488 * c.opt: Add Warning keyword for 2 options.
489
f9af11c7
GA
4902021-05-13 Martin Liska <mliska@suse.cz>
491
492 PR middle-end/100504
493 * c-attribs.c (handle_target_clones_attribute): Expect a string
494 argument to target_clone argument.
495
037e3661
GA
4962021-05-11 Joseph Myers <joseph@codesourcery.com>
497
498 * c-lex.c (interpret_float): Handle digit separators for C2X.
499
aa891c56
GA
5002021-05-10 Martin Liska <mliska@suse.cz>
501
502 * c-ada-spec.c (print_destructor): Use startswith
503 function instead of strncmp.
504 (dump_ada_declaration): Likewise.
505 * c-common.c (disable_builtin_function): Likewise.
506 (def_builtin_1): Likewise.
507 * c-format.c (check_tokens): Likewise.
508 (check_plain): Likewise.
509 (convert_format_name_to_system_name): Likewise.
510
e4ff4ffb
GA
5112021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
512
513 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
514 complex divide
515
c0fa3f2f
GA
5162021-04-26 Thomas Schwinge <thomas@codesourcery.com>
517 Nathan Sidwell <nathan@codesourcery.com>
518 Tom de Vries <vries@codesourcery.com>
519 Julian Brown <julian@codesourcery.com>
520 Kwok Cheung Yeung <kcy@codesourcery.com>
521
522 * c.opt (Wopenacc-parallelism): New.
523
6e81e015
GA
5242021-04-19 Thomas Schwinge <thomas@codesourcery.com>
525
526 * c.opt (fopenacc-kernels=): Remove.
527
019a9220
GA
5282021-04-08 Jakub Jelinek <jakub@redhat.com>
529
530 * c-warn.c (do_warn_double_promotion): Fix comment typo,
531 occured -> occurred.
532 (check_alignment_of_packed_member): Fix a comment typo,
533 memeber -> member.
534 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
535 and onless -> unless.
536 (warn_parm_array_mismatch): Fix comment typos, declaratation
537 -> declaration and woud -> would. Fix up comment indentation.
538
5392021-04-08 Martin Sebor <msebor@redhat.com>
540
541 PR middle-end/99883
542 * c.opt (Wmismatched-new-delete): Correct spelling.
543
b1da9916
GA
5442021-04-05 Eric Botcazou <ebotcazou@adacore.com>
545
546 * c-ada-spec.c (is_simple_enum): Minor tweaks.
547 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
548 enumeral types use again the type name for the enumeration constants.
549 (dump_ada_node): Adjust call to dump_ada_enum_type.
550 (dump_nested_type): Likewise.
551
f1607029
GA
5522021-04-01 Jason Merrill <jason@redhat.com>
553
554 PR c++/98481
555 * c-opts.c (c_common_post_options): Bump latest_abi_version.
556
4493b1c1
GA
5572021-03-25 Jakub Jelinek <jakub@redhat.com>
558
559 PR c++/99565
560 * c-warn.c (do_warn_duplicated_branches): Pass also
561 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
562
6af7b307
GA
5632021-03-20 Jakub Jelinek <jakub@redhat.com>
564
565 PR debug/99230
566 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
567
ceae9533
GA
5682021-03-05 Eric Botcazou <ebotcazou@adacore.com>
569
570 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
571 after entering the separate class package, if any.
572
67f10d28
GA
5732021-03-04 Richard Biener <rguenther@suse.de>
574
575 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
576 Handle ERROR_MARK.
577
5782021-03-04 Jakub Jelinek <jakub@redhat.com>
579
580 PR c/99325
581 * c-ppoutput.c (print): Change src_line type from int to unsigned.
582 (token_streamer::stream) Likewise.
583 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
584 UNKNOWN_LOCATION.
585
f3641ac7
GA
5862021-03-03 Jakub Jelinek <jakub@redhat.com>
587
588 PR c/99324
589 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
590 instead of mark_addressable. Fix a comment typo -
591 neutrallly -> neutrally.
592
2c83c3fb
GA
5932021-02-28 Jakub Jelinek <jakub@redhat.com>
594
595 PR c/99304
596 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
597 message - refernced -> referenced. Remove superfluous space before
598 closing paren of function calls.
599
daa68844
GA
6002021-02-25 Nathan Sidwell <nathan@acm.org>
601
602 PR c++/99166
603 * c.opt (-flang-info-module-cmi): Renamed option.
604
50352c6c
GA
6052021-02-19 Nathan Sidwell <nathan@acm.org>
606
607 * c.opt (flang-info-module-read, flang-info-module-read=): New.
608
bf81237e
GA
6092021-02-18 H.J. Lu <hjl.tools@gmail.com>
610
611 PR target/99113
612 * c-attribs.c (c_common_attribute_table): Add the "retain"
613 attribute.
614 (handle_retain_attribute): New function.
615
0e804ce3
GA
6162021-02-16 Marek Polacek <polacek@redhat.com>
617
618 PR c++/99062
619 * c-attribs.c (handle_assume_aligned_attribute): Check that the
620 alignment argument is non-negative. Tweak a warning message.
621
fab095da
GA
6222021-02-12 Martin Sebor <msebor@redhat.com>
623
624 PR c/99055
625 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
626 print_generic_expr_to_str.
627
4b37c3ea
GA
6282021-02-10 Richard Biener <rguenther@suse.de>
629
630 * c-common.c (parse_optimize_options): Free decoded_options.
631
a19dd5e6
GA
6322021-02-04 emsr <3dw4rd@verizon.net>
633
634 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
635
9faaa807
GA
6362021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
637
638 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
639 * c-lex.c (interpret_integer): Set node type for size literal.
640
85d04a2e
GA
6412021-01-28 Jakub Jelinek <jakub@redhat.com>
642
643 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
644 draft from description.
645 (-std=c++2b): Fix a pasto, 2020 -> 2023.
646
e62bb7f0
GA
6472021-01-26 Paul Fee <paul.f.fee@gmail.com>
648
649 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
650 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
651 and -std=gnu++2b
652 * c-opts.c (set_std_cxx23): New.
653 (c_common_handle_option): Set options when -std=c++23 is enabled.
654 (c_common_post_options): Adjust comments.
655 (set_std_cxx20): Likewise.
656
161e4c08
GA
6572021-01-25 Martin Sebor <msebor@redhat.com>
658
659 PR c++/98646
660 * c-common.c (check_nonnull_arg): Adjust warning text.
661
4c9bcd5c
GA
6622021-01-17 Martin Sebor <msebor@redhat.com>
663
664 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
665 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
666
59cf67d1
GA
6672021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
668
669 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
670 Redefine PRAGMA_OACC_CLAUSE_DETACH.
671
2f7f0d32
GA
6722021-01-15 Jakub Jelinek <jakub@redhat.com>
673
674 PR tree-optimization/98597
675 * c-pretty-print.c: Include options.h.
676 (c_fold_indirect_ref_for_warn): New function.
677 (print_mem_ref): Use it. If it returns something that has compatible
678 type and is TBAA compatible with zero offset, print it and return,
679 otherwise print it using offsetof syntax or array ref syntax. Fix up
680 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
681 argument has pointer to array type. Print pointers using the standard
682 formatting.
683
6851dda2
GA
6842021-01-12 Martin Sebor <msebor@redhat.com>
685
686 PR c/98597
687 PR c/98592
688 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
689 has pointer type. Remove redundant code. Avoid calling
690 gimple_canonical_types_compatible_p.
691
7d187e4f
GA
6922021-01-07 Martin Sebor <msebor@redhat.com>
693
694 PR middle-end/98578
695 * c-pretty-print.c (print_mem_ref): Strip array from access type.
696 Avoid assuming acces type's size is constant. Correct condition
697 guarding the printing of a parenthesis.
698
942ae5be
GA
6992021-01-06 Martin Sebor <msebor@redhat.com>
700
701 PR c++/95768
702 * c-pretty-print.c (c_pretty_printer::primary_expression): For
703 SSA_NAMEs print VLA names and GIMPLE defining statements.
704 (print_mem_ref): New function.
705 (c_pretty_printer::unary_expression): Call it.
706
7072021-01-06 Richard Biener <rguenther@suse.de>
708
709 PR tree-optimization/95582
710 * c-attribs.c (c_common_attribute_table): Add entry for
711 signed_bool_precision.
712 (handle_signed_bool_precision_attribute): New.
713
8daa719b
GA
7142020-12-24 Iain Sandoe <iain@sandoe.co.uk>
715
716 * c.opt: Add -stdlib= option and enumerations for
717 libstdc++ and libc++.
718
eefe499f
GA
7192020-12-16 Martin Liska <mliska@suse.cz>
720
721 * c.opt: Remove usage of Report.
722
d52945ce
GA
7232020-12-14 Martin Sebor <msebor@redhat.com>
724
725 PR middle-end/98166
726 PR c++/57111
727 PR middle-end/98160
728 * c-attribs.c (maybe_add_noinline): New function.
729 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
730 Implicitly add attribute noinline to functions not declared inline
731 and warn on those.
732
ca2bd949
GA
7332020-12-09 Tobias Burnus <tobias@codesourcery.com>
734
735 * c-pragma.c (omp_pragmas): Add 'allocate'.
736 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
737
f6e8e279
GA
7382020-12-08 Jakub Jelinek <jakub@redhat.com>
739
740 PR c++/98187
741 * c-pragma.c (omp_pragmas): Remove "master".
742 (omp_pragmas_simd): Add "master".
743
bc8a7013
GA
7442020-12-07 Marek Polacek <polacek@redhat.com>
745
746 PR c++/98126
747 * c-common.c (verify_tree_lim_r): New function.
748 (verify_sequence_points): Use it. Use nullptr instead of 0.
749
b8dd0ef7
GA
7502020-12-03 Martin Sebor <msebor@redhat.com>
751
752 PR c++/90629
753 PR middle-end/94527
754 * c-attribs.c (handle_dealloc_attribute): New function.
755 (handle_malloc_attribute): Handle argument forms of attribute.
756 * c.opt (-Wmismatched-dealloc): New option.
757 (-Wmismatched-new-delete): New option.
758
7592020-12-03 Jakub Jelinek <jakub@redhat.com>
760
761 PR libstdc++/93121
762 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
763 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
764
e0f5e792
GA
7652020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
766
767 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
768 {__GNUC_EXECUTION_CHARSET_NAME} and
769 _WIDE_EXECUTION_CHARSET_NAME} macros.
770
7712020-12-01 Nathan Sidwell <nathan@acm.org>
772
773 * c-common.c (module, import, export): New internal tokens (with
774 trailing space).
775 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
776 them.
777 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
778 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
779
7802020-12-01 Nathan Sidwell <nathan@acm.org>
781
782 * c-opts.c (c_common_init_options): Ask for module dependencies.
783 (c_common_handle_option): Handle -Mmodules -Mno-modules.
784 * c-pch.c (c_common_valid_pch): ... does not play with C++
785 modules.
786 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
787 options.
788 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
789 (fmodule-only, fmodule-mapper, fmodule-lazy)
790 (fmodule-version-ignore, Winvalid-imported-macros)
791 (flang-info-include-translate, flang-info-include-translate-not):
792 New options
793
5fbf0ecb
GA
7942020-11-28 Eric Botcazou <ebotcazou@adacore.com>
795
796 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
797 (dump_ada_structure): Also deal with convention, unchecked union and
798 bit-field for nested types. In the latter case, print an Alignment
799 aspect along with the Pack aspect.
800
360258da
GA
8012020-11-25 Martin Sebor <msebor@redhat.com>
802
803 PR bootstrap/94982
804 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
805 -Wformat-diag.
806
1e2c9a27
GA
8072020-11-24 Martin Sebor <msebor@redhat.com>
808
809 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
810
8e6198d0
GA
8112020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
812
813 * c-attribs.c (handle_special_var_sec_attribute): New.
814 (handle_noinit_attribute): Remove.
815 (attr_noinit_exclusions): Rename to...
816 (attr_section_exclusions): ...this, and add "persistent" attribute
817 exclusion.
818 (c_common_attribute_table): Add "persistent" attribute.
819
7a97e2fc
GA
8202020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
821
822 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
823 Treat opaque types like other types.
824 (c_pretty_printer::direct_abstract_declarator): Opaque types are
825 supported types.
826
82e5048e
GA
8272020-11-20 Martin Sebor <msebor@redhat.com>
828
829 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
830 with fewer arguments.
831
8322020-11-20 Martin Sebor <msebor@redhat.com>
833
834 PR middle-end/97879
835 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
836 Error out on invalid modes.
837
8382020-11-20 Jakub Jelinek <jakub@redhat.com>
839
840 PR libstdc++/88101
841 * c-common.c (check_builtin_function_arguments): Handle
842 BUILT_IN_CLEAR_PADDING.
843
25bb75f8
GA
8442020-11-18 Nathan Sidwell <nathan@acm.org>
845
846 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
847
4dabb037
GA
8482020-11-17 Nathan Sidwell <nathan@acm.org>
849
850 * c-common.h (enum c_tree_index): Reorder to place lazy fields
851 after newly-added CTI_MODULE_HWM.
852
8532020-11-17 Joseph Myers <joseph@codesourcery.com>
854
855 * c-cppbuiltin.c (builtin_define_float_constants): Define
856 "*_IS_IEC_60559__" macros.
857
8582020-11-17 Nathan Sidwell <nathan@acm.org>
859
860 * c-lex.c: #include "langhooks.h".
861 (cb_undef): Maybe call preprocess_undef lang hook.
862 * c-opts.c (c_common_post_options): Maybe call preprocess_options
863 lang hook.
864 (push_command_line_include): Maybe call preprocess_main_file lang
865 hook.
866 (cb_file_change): Likewise.
867 * c-ppoutput.c: #include "langhooks.h.
868 (scan_translation_unit): Maybe call preprocess_token lang hook.
869 (class do_streamer): New, derive from token_streamer.
870 (directives_only_cb): Data pointer is do_streamer, call
871 preprocess_token lang hook.
872 (scan_translation_unit_directives_only): Use do_streamer.
873 (print_line_1): Move src_line recording to after string output.
874 (cb_undef): Maybe call preprocess_undef lang hook.
875
8762020-11-17 Nathan Sidwell <nathan@acm.org>
877
878 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
879 code duplicating that functionality.
880
8812020-11-17 Jakub Jelinek <jakub@redhat.com>
882
883 PR c/90628
884 * c-common.c (check_builtin_function_arguments)
885 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
886 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
887 for more builtins and argument positions.
888
29c5d9ce
GA
8892020-11-16 Iain Sandoe <iain@sandoe.co.uk>
890
891 PR objc/97854
892 * stub-objc.c: Include c-common.h to declare enum rid.
893
77f67db2
GA
8942020-11-13 Jakub Jelinek <jakub@redhat.com>
895
896 PR c++/63287
897 * c-cppbuiltin.c: Include configargs.h.
898 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
899 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
900 "single".
901
9022020-11-13 Gergö Barany <gergo@codesourcery.com>
903 Thomas Schwinge <thomas@codesourcery.com>
904
905 * c.opt (fopenacc-kernels): Add.
906
9072020-11-13 Jason Merrill <jason@redhat.com>
908
909 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
910
9112020-11-13 Piotr H. Dabrowski <phd@phd.re>
912
913 PR c++/91318
914 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
915
9162020-11-13 Martin Liska <mliska@suse.cz>
917
918 * c-attribs.c (build_attr_access_from_parms): Format properly.
919
9202020-11-13 Iain Sandoe <iain@sandoe.co.uk>
921
922 PR objc/90707
923 * c-common.c (c_common_reswords): null_unspecified, nullable,
924 nonnull, null_resettable: New keywords.
925 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
926 RID_NONNULL, RID_NULL_RESETTABLE: New.
927 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
928 ranges accepted for property attributes.
929 * c-attribs.c (handle_objc_nullability_attribute): New.
930 * c-objc.h (enum objc_property_attribute_group): Add
931 OBJC_PROPATTR_GROUP_NULLABLE.
932 (enum objc_property_attribute_kind):Add
933 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
934 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
935
9362020-11-13 Iain Sandoe <iain@sandoe.co.uk>
937
938 PR objc/77404
939 * c-attribs.c (handle_objc_root_class_attribute): New
940 * c-objc.h (objc_start_class_interface): Add a location
941 value for the position of the class name.
942 * c.opt: Add Wobjc-root-class.
943 * stub-objc.c (objc_start_class_interface): Add a location
944 value for the position of the class name.
945
a5a11525
GA
9462020-11-12 Joseph Myers <joseph@codesourcery.com>
947
948 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
949 Allow scope for C. Handle standard attributes for C. Do not
950 accept unscoped attributes if std_syntax and not handled as
951 standard attributes.
952 * c-common.h (c_common_has_attribute): Update prototype.
953
9542020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
955
956 PR pch/86674
957 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
958 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
959
0f5f9ed5
GA
9602020-11-11 Patrick Palka <ppalka@redhat.com>
961
962 PR c++/88115
963 * c-opts.c (c_common_post_options): Update latest_abi_version.
964
bb622641
GA
9652020-11-10 Jakub Jelinek <jakub@redhat.com>
966
967 PR c/97748
968 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
969 to false.
970 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
971 recursively and just return true instead of warning if it is true.
972 Handle COMPLEX_EXPR.
973
9742020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
975
976 * c-common.h (c_omp_adjust_map_clauses): New declaration.
977 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
978 (c_omp_adjust_map_clauses): New function.
979
2bee28dd
GA
9802020-11-09 Marek Polacek <polacek@redhat.com>
981
982 DR 1914
983 * c-common.c (attribute_fallthrough_p): Tweak the warning
984 message.
985
9862020-11-09 Patrick Palka <ppalka@redhat.com>
987
988 * c-pragma.c (handle_pragma_diagnostic): Split the
989 unknown-option -Wpragmas diagnostic into a warning and a
990 subsequent note containing a spelling suggestion. Avoid
991 computing the suggestion if -Wpragmas warnings are being
992 suppressed.
993
9942020-11-09 Patrick Palka <ppalka@redhat.com>
995
996 PR testsuite/97117
997 * c-indentation.c (get_visual_column): Remove location_t
998 parameter. Move the column-tracking diagnostic code from here
999 to ...
1000 (should_warn_for_misleading_indentation): ... here, before the
1001 early exit for when the loci are not all distinct. Don't pass a
1002 location_t argument to get_visual_column.
1003 (assert_get_visual_column_succeeds): Don't pass a location_t
1004 argument to get_visual_column.
1005 (assert_get_visual_column_fails): Likewise.
1006
fb95de7a
GA
10072020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1008
1009 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1010 of keywords accepted in @property attribute contexts.
1011 * c-objc.h (enum objc_property_attribute_group): Add
1012 OBJC_PROPATTR_GROUP_CLASS.
1013 (enum objc_property_attribute_kind): Add
1014 OBJC_PROPERTY_ATTR_CLASS.
1015
2da7ee05
GA
10162020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1017
1018 * c-common.c (c_common_reswords): Add 'atomic' property
1019 attribute.
1020 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1021 property attributes.
1022
10232020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1024
1025 * c-attribs.c (handle_nsobject_attribute): New.
1026 * c.opt: Add WNSObject-attribute.
1027
44cab2d8
GA
10282020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1029
1030 * c-objc.h (enum objc_property_attribute_group): New
1031 (enum objc_property_attribute_kind): New.
1032 (OBJC_PROPATTR_GROUP_MASK): New.
1033 (struct property_attribute_info): Small class encapsulating
1034 parser output from property attributes.
1035 (objc_prop_attr_kind_for_rid): New
1036 (objc_add_property_declaration): Simplify interface.
1037 * stub-objc.c (enum rid): Dummy type.
1038 (objc_add_property_declaration): Simplify interface.
1039 (objc_prop_attr_kind_for_rid): New.
1040
10412020-11-06 Nathan Sidwell <nathan@acm.org>
1042
1043 * c-ada-spec.c (collect_ada_nodes): Rename
1044 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1045 (collect_ada_node): Likewise.
1046 (dump_forward_type): Likewise.
1047 * c-common.c (set_underlying_type): Rename
1048 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1049 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1050
10512020-11-06 Jakub Jelinek <jakub@redhat.com>
1052
1053 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1054
0cfd9109
GA
10552020-11-05 Marek Polacek <polacek@redhat.com>
1056
1057 PR c++/97675
1058 * c.opt (Wexceptions): New option.
1059
10602020-11-05 Marek Polacek <polacek@redhat.com>
1061
1062 PR c++/25814
1063 * c.opt (Wvexing-parse): New option.
1064
35c125cb
GA
10652020-11-04 Jakub Jelinek <jakub@redhat.com>
1066
1067 PR c++/97670
1068 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1069 underlying decl to clear in the allocate_head bitmap.
1070
10712020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1072
1073 * c-objc.h (objc_non_constant_expr_p): New.
1074 * stub-objc.c (objc_non_constant_expr_p): New.
1075
fd2325ea
GA
10762020-11-03 Nathan Sidwell <nathan@acm.org>
1077
1078 * c.opt (MQ,MT): Reword description to be make-agnostic.
1079
88ce3d5f
GA
10802020-11-02 Nathan Sidwell <nathan@acm.org>
1081
1082 * c-opts.c (c_common_post_options): Move var decl to its
1083 initialization point.
1084
10852020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1086
1087 * c-lex.c (c_lex_with_flags): When combining '@' with a
1088 keyword for Objective-C, combine the location ranges too.
1089
10902020-10-30 Qing Zhao <qing.zhao@oracle.com>
1091 H.J.Lu <hjl.tools@gmail.com>
1092
1093 * c-attribs.c (c_common_attribute_table): Add new attribute
1094 zero_call_used_regs.
1095 (handle_zero_call_used_regs_attribute): New function.
1096
e93aae4a
GA
10972020-10-28 Marek Polacek <polacek@redhat.com>
1098
1099 PR c++/97573
1100 * c-opts.c (c_common_post_options): In C++20, turn on
1101 -Wdeprecated-enum-enum-conversion and
1102 -Wdeprecated-enum-float-conversion.
1103 * c.opt (Wdeprecated-enum-enum-conversion,
1104 Wdeprecated-enum-float-conversion): New options.
1105 (Wenum-conversion): Allow for C++ too.
1106
11072020-10-28 Jakub Jelinek <jakub@redhat.com>
1108
1109 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1110 * c-omp.c: Include bitmap.h.
1111 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1112
f19e7c8d
GA
11132020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1114
1115 * c-common.c (__is_nothrow_assignable): New.
1116 (__is_nothrow_constructible): Likewise.
1117 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1118 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1119
efe71fcc
GA
11202020-10-23 Jan Hubicka <hubicka@ucw.cz>
1121
1122 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1123
11242020-10-23 Marek Polacek <polacek@redhat.com>
1125
1126 PR c++/91741
1127 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1128 (c_common_init_ts): Likewise.
1129 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1130 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1131 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1132 (maybe_warn_sizeof_array_div): New function.
1133 * c.opt (Wsizeof-array-div): New option.
1134
11352020-10-23 Martin Sebor <msebor@redhat.com>
1136
1137 PR c/97463
1138 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1139
56ddd5e2
GA
11402020-10-22 Martin Liska <mliska@suse.cz>
1141
1142 PR c/94722
1143 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1144 (handle_stack_protect_attribute): Add error message for a
1145 no_stack_protector function.
1146
11472020-10-22 Martin Liska <mliska@suse.cz>
1148
1149 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1150
11512020-10-22 Jan Hubicka <hubicka@ucw.cz>
1152
1153 * c-gimplify.c: Include tree-nested.h
1154 (c_genericize): Update for new nested function info.
1155
b2698c21
GA
11562020-10-14 Martin Sebor <msebor@redhat.com>
1157
1158 PR c/97413
1159 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1160 bounds in an extra list.
1161
7e9282ae
GA
11622020-10-05 Richard Biener <rguenther@suse.de>
1163 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c++/97197
1166 * c-pretty-print.c: Include langhooks.h.
1167 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1168 expression.
1169 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1170 unary_expression.
1171 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1172
660bfe61
GA
11732020-09-30 Martin Sebor <msebor@redhat.com>
1174
1175 PR middle-end/97189
1176 * c-attribs.c (append_access_attr): Use the function declaration
1177 location for a warning about an attribute access argument.
1178
93bca37c
GA
11792020-09-29 Marek Polacek <polacek@redhat.com>
1180
1181 PR c++/94695
1182 * c.opt (Wrange-loop-construct): New option.
1183
82b77dee
GA
11842020-09-23 Martin Sebor <msebor@redhat.com>
1185
1186 PR c/97131
1187 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1188
11892020-09-23 Marek Polacek <polacek@redhat.com>
1190
1191 PR c/97125
1192 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1193 after loops and other structured control constructs have been lowered.
1194
521d2711
GA
11952020-09-22 Jakub Jelinek <jakub@redhat.com>
1196
1197 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1198 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1199
44135373
GA
12002020-09-21 Marek Polacek <polacek@redhat.com>
1201
1202 * c.opt (Wctad-maybe-unsupported): New option.
1203
2fe5b7d1
GA
12042020-09-19 Martin Sebor <msebor@redhat.com>
1205
1206 PR c/50584
1207 * c-common.h (warn_parm_array_mismatch): Declare new function.
1208 (has_attribute): Move declaration of an existing function.
1209 (build_attr_access_from_parms): Declare new function.
1210 * c-warn.c (parm_array_as_string): Define new function.
1211 (plus_one): Define new function.
1212 (warn_parm_ptrarray_mismatch): Define new function.
1213 (warn_parm_array_mismatch): Define new function.
1214 (vla_bound_parm_decl): New function.
1215 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1216 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1217 qualifiers here...
1218 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1219 them in brackets here. Also print [static]. Strip extraneous
1220 expressions from VLA bounds.
1221
12222020-09-19 Martin Sebor <msebor@redhat.com>
1223
1224 PR c/50584
1225 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1226 (handle_argspec_attribute): New function.
1227 (get_argument, get_argument_type): New functions.
1228 (append_access_attrs): Add overload. Handle internal attribute
1229 representation in addition to external.
1230 (handle_access_attribute): Handle internal attribute representation
1231 in addition to external.
1232 (build_attr_access_from_parms): New function.
1233
12342020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1235
1236 * c-gimplify.c (genericize_c_loop): Rewrite to match
1237 c_finish_loop in c-typeck.c.
1238
12392020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1240
1241 * c-common.c (c_block_may_fallthrough): New, split from
1242 cxx_block_may_fallthrough in the cp front end.
1243 (c_common_init_ts): Move handling of loop and switch-related
1244 statements here from the cp front end.
1245 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1246 cp front end.
1247 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1248 * c-common.h (c_block_may_fallthru): Declare.
1249 (bc_state_t): Move here from cp front end.
1250 (save_bc_state, restore_bc_state): Declare.
1251 (c_genericize_control_stmt): Declare.
1252 (WHILE_COND, WHILE_BODY): Likewise.
1253 (DO_COND, DO_BODY): Likewise.
1254 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1255 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1256 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1257 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1258 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1259 * c-dump.c (dump_stmt): Copy from cp front end.
1260 (c_dump_tree): Move code to handle structured loop and switch
1261 tree nodes here from cp front end.
1262 * c-gimplify.c: Adjust includes.
1263 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1264 cp front end.
1265 (save_bc_state, restore_bc_state): New functions using old code
1266 from cp front end.
1267 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1268 (genericize_c_loop): Move from cp front end.
1269 (genericize_for_stmt, genericize_while_stmt): Likewise.
1270 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1271 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1272 (genericize_omp_for_stmt): Likewise.
1273 (c_genericize_control_stmt): New function using code split from
1274 cp front end.
1275 (c_genericize_control_r): New.
1276 (c_genericize): Call walk_tree with c_genericize_control_r.
1277 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1278 structured loop and switch tree nodes here from cp front end.
1279
2aad20c0
GA
12802020-09-17 Patrick Palka <ppalka@redhat.com>
1281
1282 PR c/80076
1283 * c-indentation.c (should_warn_for_misleading_indentation): Move
1284 declarations of local variables closer to their first use.
1285 Handle virtual token locations by resolving them to their
1286 respective macro expansion points. If all three tokens are
1287 produced from the same macro expansion, then instead use their
1288 loci within the macro definition.
1289
ecde1b0a
GA
12902020-09-16 Martin Sebor <msebor@redhat.com>
1291
1292 PR c/78666
1293 PR c/96126
1294 * c-attribs.c (validate_attr_args): New function.
1295 (validate_attr_arg): Same.
1296 (handle_section_attribute): Call it. Introduce a local variable.
1297 (handle_alloc_size_attribute): Same.
1298 (handle_alloc_align_attribute): Same.
1299
50a71cd0
GA
13002020-09-14 Jakub Jelinek <jakub@redhat.com>
1301
1302 * c-attribs.c (handle_optimize_attribute): Adjust
1303 cl_optimization_save, cl_optimization_restore and
1304 build_optimization_node callers.
1305 * c-pragma.c (handle_pragma_optimize): Adjust
1306 build_optimization_node caller.
1307 (handle_pragma_push_options): Adjust
1308 build_optimization_node and build_target_option_node callers.
1309 (handle_pragma_pop_options, handle_pragma_reset_options):
1310 Adjust cl_optimization_restore callers.
1311
8f7ea26a
GA
13122020-08-28 Martin Sebor <msebor@redhat.com>
1313
1314 * c.opt (Wstringop-overread): New option.
1315
a6493809
GA
13162020-08-11 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c/96545
1319 * c-common.c (get_atomic_generic_size): Require that first argument's
1320 type points to a complete type and use tree_fits_uhwi_p instead of
1321 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1322
48cc2e46
GA
13232020-07-31 Martin Sebor <msebor@redhat.com>
1324
1325 PR c++/96003
1326 * c-common.c (check_function_arguments_recurse): Return early when
1327 no-warning bit is set.
1328
13292020-07-31 Richard Biener <rguenther@suse.de>
1330
1331 PR debug/96383
1332 * c-common.h (c_common_finalize_early_debug): Declare.
1333 * c-common.c: Include debug.h.
1334 (c_common_finalize_early_debug): finalize_early_debug langhook
1335 implementation generating debug for extern declarations.
1336
e71dab87
GA
13372020-07-27 Nathan Sidwell <nathan@acm.org>
1338
1339 * c-common.c (try_to_locate_new_include_insertion_point): Use
1340 strcmp, not pointer equality.
1341
ae2e0bc1
GA
13422020-07-25 Martin Sebor <msebor@redhat.com>
1343
1344 PR c++/96310
1345 * c-common.c (check_nonnull_arg): Print note only when warning was
1346 issued.
1347
3ea9abca
GA
13482020-07-22 Tobias Burnus <tobias@codesourcery.com>
1349
1350 * c-omp.c (c_finish_omp_critical): Check for no name but
1351 nonzero hint provided.
1352
0933f508
GA
13532020-07-20 Jason Merrill <jason@redhat.com>
1354
1355 * c-cppbuiltin.c (c_cpp_builtins): Update
1356 __cpp_nontype_template_args for C++20.
1357
13582020-07-20 Martin Sebor <msebor@redhat.com>
1359
1360 PR c/96249
1361 * c.opt: Remove stray text.
1362
8ca07a30
GA
13632020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1364
1365 PR other/86904
1366 * c-indentation.c (should_warn_for_misleading_indentation): Get
1367 global tabstop from the new source.
1368 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1369 is now a common option.
1370 * c.opt: Likewise.
1371
a82c4c4c 13722020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1373
1374 * c.opt (Wscalar-storage-order): Add explicit variable.
1375
f60ee68d
GA
13762020-07-07 Nathan Sidwell <nathan@acm.org>
1377
1378 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1379 cpp_read_main_file.
1380 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1381 maps. Force token position to line_table's highest line.
1382 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1383 (cb_define): Always increment source line.
1384
4077d74c
GA
13852020-07-06 Martin Sebor <msebor@redhat.com>
1386
1387 PR c++/95984
1388 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1389 to stub lambda objects with null this pointer.
1390 (check_nonnull_arg): Handle C++ nullptr.
1391
b5f24739
GA
13922020-07-02 Jason Merrill <jason@redhat.com>
1393 Jakub Jelinek <jakub@redhat.com>
1394
1395 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1396
46fbb6c6
GA
13972020-06-30 Jakub Jelinek <jakub@redhat.com>
1398
1399 PR c++/95963
1400 * c-common.c (check_function_arguments_recurse): Don't crash on
1401 calls to internal functions.
1402
69273534
GA
14032020-06-28 Martin Sebor <msebor@redhat.com>
1404
1405 PR c++/86568
1406 * c-common.c (struct nonnull_arg_ctx): Add members.
1407 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1408 C++ member functions specially. Consider the this pointer implicitly
1409 nonnull.
1410 (check_nonnull_arg): Use location of argument when available.
1411 (check_function_arguments): Use nonnull_arg_ctx as argument.
1412
9a33c41f
GA
14132020-06-27 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR middle-end/95903
1416 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1417 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1418 smaller precision intop operands separately.
1419
c9c05f73
GA
14202020-06-26 Marek Polacek <polacek@redhat.com>
1421
1422 * c-opts.c (c_common_init_options): Default to gnu++17.
1423
aff95ee7
GA
14242020-06-17 Jonathan Wakely <jwakely@redhat.com>
1425
bd0a89dc 1426 PR c/95378
aff95ee7
GA
1427 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1428 pointer arguments.
1429
56638b9b
GA
14302020-06-16 Jakub Jelinek <jakub@redhat.com>
1431
1432 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1433 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1434 idx members.
1435 (c_omp_is_loop_iterator): New function.
1436 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1437 if outer loop iterator is present. Perform duplicate checking through
1438 hash_set in the function rather than expecting caller to do that.
1439 Pass NULL instead of d->ppset to walk_tree_1.
1440 (c_omp_check_nonrect_loop_iv): New function.
1441 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1442 non-rectangular loop forms, diagnose multiple associated loops with
1443 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1444 (c_omp_check_loop_iv_exprs): Likewise.
1445
ec6ffbb9
GA
14462020-06-10 Martin Liska <mliska@suse.cz>
1447
1448 PR tree-optimization/92860
1449 * c-attribs.c (handle_optimize_attribute):
1450 Save global options and compare it after parsing of function
1451 attribute.
1452 * c-pragma.c (opt_stack::saved_global_options): New field.
1453 (handle_pragma_push_options): Save global_options.
1454 (handle_pragma_pop_options): Compare them after pop.
1455
b952c2cf
GA
14562020-06-09 Jakub Jelinek <jakub@redhat.com>
1457
1458 PR c/95580
1459 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1460 case when MEM_REF's first argument has type pointer to incomplete type.
1461
1a59f3db
GA
14622020-06-05 Jason Merrill <jason@redhat.com>
1463
1464 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1465 operand to POINTER_PLUS_EXPR.
1466
3add3425
GA
14672020-06-04 Martin Sebor <msebor@redhat.com>
1468
1469 PR middle-end/10138
1470 PR middle-end/95136
1471 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1472 (handle_access_attribute): Same.
1473
9a5b7438
GA
14742020-06-03 Mark Wielaard <mark@klomp.org>
1475
1476 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1477 New function.
1478 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1479 New function declaration.
1480
14812020-06-03 Mark Wielaard <mark@klomp.org>
1482
1483 * known-headers.cc (get_string_macro_hint): New function.
1484 (get_stdlib_header_for_name): Use get_string_macro_hint.
1485 (get_c_stdlib_header_for_string_macro_name): New function.
1486 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1487 New function declaration.
1488
14892020-06-03 Tobias Burnus <tobias@codesourcery.com>
1490
1491 * c-common.h (c_omp_predetermined_mapping): Declare.
1492 * c-omp.c (c_omp_predetermined_mapping): New.
1493
af114c38
MW
14942020-05-22 Mark Wielaard <mark@klomp.org>
1495
1496 * known-headers.cc (get_stdlib_header_for_name): Add a new
1497 stdlib_hint array for stdbool and stdint.
1498
45c50b6a
MW
14992020-05-22 Mark Wielaard <mark@klomp.org>
1500
1501 * known-headers.cc (get_stdlib_header_for_name): Return
1502 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1503 flag_isoc99.
1504
c22027a0
NS
15052020-05-20 Nathan Sidwell <nathan@acm.org>
1506
38a4db21
NS
1507 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1508
c22027a0
NS
1509 * c-common.c (try_to_locate_new_include_insertion_point): Use
1510 strcmp to compare filenames.
1511 * c-lex.c (init_c_lex): Move declaration to initialization.
1512 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1513 deferred count loop.
1514
29f0e90d
JM
15152020-05-15 Jason Merrill <jason@redhat.com>
1516
1517 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1518
b04445d4
JM
15192020-05-13 Jason Merrill <jason@redhat.com>
1520
1521 * c.opt (std=c++20): Make c++2a the alias.
1522 (std=gnu++20): Likewise.
1523 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1524 * c-opts.c: Adjust.
1525 * c-cppbuiltin.c: Adjust.
1526 * c-ubsan.c: Adjust.
1527 * c-warn.c: Adjust.
1528
11dd3be5
EB
15292020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1530
1531 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1532
b224c376
NS
15332020-05-08 Nathan Sidwell <nathan@acm.org>
1534
1535 Reimplement directives only processing.
1536 * c-ppoutput.c (token_streamer): Ne.
1537 (directives_only_cb): New. Swallow ...
1538 (print_lines_directives_only): ... this.
1539 (scan_translation_unit_directives_only): Reimplment using the
1540 published interface.
1541
f1d94677
MP
15422020-05-07 Marek Polacek <polacek@redhat.com>
1543
1544 * c-format.c (badwords): Add "nonstatic".
1545
9b95bb52
JJ
1546202-05-07 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR c/94968
1549 * c-common.c (speculation_safe_value_resolve_params): Return false if
1550 error_operand_p (val2).
1551 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1552 Remove extraneous semicolon.
1553
530b4409 15542020-05-06 qing zhao <qing.zhao@oracle.com>
1555
1556 PR c/94230
1557 * c-indentation.c (get_visual_column): Add a hint to use the new
1558 -flarge-source-files option.
1559
b776bdca
SSF
15602020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1561
1562 * c-attribs.c (handle_vector_size_attribute): Add attribute
1563 nonnull for argument args in order to silence warning of
1564 uninitialized variable usage. Since this is local to the
1565 compilation unit and thus cannot be checked at call sides by the
1566 compiler, added an assert statement in order to verify this.
1567
6607bdd9
L
15682020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1569
1570 PR target/93492
1571 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1572 value to USHRT_MAX (65535).
1573
691eeb65
JJ
15742020-04-29 Jakub Jelinek <jakub@redhat.com>
1575
1576 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1577
26d76be7
JJ
15782020-04-27 Jakub Jelinek <jakub@redhat.com>
1579
1580 PR c/94755
1581 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1582 fncode == BUILT_IN_NONE before initialization of first_param.
1583
7291b2ed
MP
15842020-04-23 Marek Polacek <polacek@redhat.com>
1585
1586 PR c++/94733
1587 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1588 TREE_PURPOSE.
1589
58a29af8
PP
15902020-04-14 Patrick Palka <ppalka@redhat.com>
1591
1592 PR c++/85278
1593 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1594 ampersand if it's an rvalue reference type.
1595
09f04139
MS
15962020-04-13 Martin Sebor <msebor@redhat.com>
1597
1598 PR c/92326
1599 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1600 printing array bound for flexible array members.
1601
ee26baf4
IS
16022020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1603
1604 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1605 define, per n4861.
1606
75efe9cb
RB
16072020-04-02 Richard Biener <rguenther@suse.de>
1608
1609 PR c/94392
1610 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1611 for -O2 and C++11 or newer.
1612
75defde9
PP
16132020-03-28 Patrick Palka <ppalka@redhat.com>
1614
1615 * c.opt: Add -fconcepts-diagnostics-depth.
1616
52f24a9e
MS
16172020-03-27 Martin Sebor <msebor@redhat.com>
1618
1619 PR c++/94346
1620 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1621 to decl_attributes. Make handling of different kinds of entities
1622 more robust.
1623
ccacf77b
MS
16242020-03-27 Martin Sebor <msebor@redhat.com>
1625
1626 PR c++/94098
1627 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1628 here.
1629
ca6c7225
JJ
16302020-03-23 Jakub Jelinek <jakub@redhat.com>
1631
1632 PR c++/91993
1633 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1634 result being COMPOUND_EXPRs, skip to ultimate rhs.
1635
1aa22b19
RS
16362020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1637
1638 PR middle-end/94072
1639 * c-common.c (c_common_type_for_mode): Before using a registered
1640 built-in type, check that the vectorness of the type matches
1641 the vectorness of the mode.
1642
700d4cb0
JJ
16432020-03-17 Jakub Jelinek <jakub@redhat.com>
1644
1645 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1646 issue in a diagnostic message.
1647
b408e010
LH
16482020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1649
1650 * c.opt: Avoid redundancy in the help text.
1651
e78e50d5
MP
16522020-03-02 Marek Polacek <polacek@redhat.com>
1653
1654 PR c++/93958 - add missing -std=gnu++20.
1655 * c.opt: Add -std=gnu++20.
1656
649e1741
MS
16572020-03-01 Martin Sebor <msebor@redhat.com>
1658
1659 PR c++/92721
1660 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1661 (handle_access_attribute): Same.
1662
7b60f3ba
JJ
16632020-02-25 Jakub Jelinek <jakub@redhat.com>
1664
1665 PR c/93858
1666 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1667 "did you mean" hint in diagnostics.
1668
fb260504
JM
16692020-02-15 Jason Merrill <jason@redhat.com>
1670
1671 * c.opt: Add -std=c++20.
1672
1d757b09
EB
16732020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1674
1675 * c-ada-spec.c: Include bitmap.h.
1676 (dump_ada_double_name): Rename into...
1677 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1678 (dump_ada_array_type): Adjust to above renaming. Robustify.
1679 (dump_nested_types_1): New function copied from... Add dumped_types
1680 parameter and pass it down to dump_nested_type.
1681 (dump_nested_types): ...this. Remove parent parameter. Just call
1682 dump_nested_types_1 on an automatic bitmap.
1683 (dump_nested_type): Add dumped_types parameter.
1684 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1685 Adjust recursive calls and adjust to above renaming.
1686 (dump_ada_declaration): Adjust call to dump_nested_types.
1687 Tidy up and adjust to above renaming.
1688 (dump_ada_specs): Initialize and release bitmap obstack.
1689
0cc575e4
MS
16902020-02-10 Martin Sebor <msebor@redhat.com>
1691
1692 PR c/93640
1693 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1694
a59aa302
JJ
16952020-02-10 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR other/93641
1698 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1699 Remove useless extra test.
1700
e464fc90
TB
17012020-02-03 Julian Brown <julian@codesourcery.com>
1702 Tobias Burnus <tobias@codesourcery.com>
1703
1704 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1705
e3b6c052
JM
17062020-01-29 Jason Merrill <jason@redhat.com>
1707
1708 PR c++/89357
1709 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1710
6d00f052
JM
17112020-01-23 Jason Merrill <jason@redhat.com>
1712
1713 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1714
8a990ffa
MS
17152020-01-23 Martin Sebor <msebor@redhat.com>
1716
1717 PR c/84919
1718 * c-common.c (check_function_arguments): Avoid overlap checking
1719 of sprintf functions.
1720
55b7df8b
JM
17212020-01-22 Jason Merrill <jason@redhat.com>
1722
1723 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1724 PR c++/40752
1725 * c-warn.c (conversion_warning): Check operands only after checking
1726 the whole expression. Don't check second operand of + for sign.
1727
c77074d0
JM
17282020-01-21 Jason Merrill <jason@redhat.com>
1729 Manuel López-Ibáñez <manu@gcc.gnu.org>
1730
1731 PR c++/40752 - useless -Wconversion with short +=.
1732 * c.opt (-Warith-conversion): New.
1733 * c-warn.c (conversion_warning): Recurse for operands of
1734 operators. Only warn about the whole expression with
1735 -Warith-conversion.
1736
731dbfc3
JM
17372020-01-21 Jason Merrill <jason@redhat.com>
1738
1739 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1740 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1741
ad1a3914
NS
17422020-01-20 Nathan Sidwell <nathan@acm.org>
1743
1744 PR preprocessor/80005
1745 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1746
49789fd0
IS
17472020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1748
1749 * c-common.c (co_await, co_yield, co_return): New.
1750 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1751 RID_CO_RETURN): New enumeration values.
1752 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1753 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1754 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1755 * c.opt (fcoroutines): New command-line switch.
1756
4bc1899b
DM
17572020-01-10 David Malcolm <dmalcolm@redhat.com>
1758
1759 * c-format.c (local_event_ptr_node): New.
1760 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1761 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1762 * c-format.h (T_EVENT_PTR): New define.
1763
f25e33fa
MS
17642020-01-10 Martin Sebor <msebor@redhat.com>
1765
1766 PR c/93132
1767 * c-attribs.c (append_access_attrs): Validate against the translated
1768 access string rather than the human-readable representation.
1769
8d9254fc
JJ
17702020-01-01 Jakub Jelinek <jakub@redhat.com>
1771
1772 Update copyright years.
1773
39292e25
EB
17742019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1775
1776 * c-ada-spec.h (decl_sloc): Delete.
1777 * c-ada-spec.c (decl_sloc): Make static.
1778
519d7496
JB
17792019-12-19 Julian Brown <julian@codesourcery.com>
1780
1781 * c-common.h (c_omp_map_clause_name): Add prototype.
1782 * c-omp.c (c_omp_map_clause_name): New function.
1783 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1784 PRAGMA_OACC_CLAUSE_DETACH.
1785
a6163563
JB
17862019-12-19 Julian Brown <julian@codesourcery.com>
1787 Maciej W. Rozycki <macro@codesourcery.com>
1788 Tobias Burnus <tobias@codesourcery.com>
1789 Thomas Schwinge <thomas@codesourcery.com>
1790
1791 * c-pragma.h (pragma_omp_clause): Add
1792 PRAGMA_OACC_CLAUSE_NO_CREATE.
1793
e8f1ade2
MS
17942019-12-17 Martin Sebor <msebor@redhat.com>
1795
1796 PR c++/61339
1797 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1798
368877a1
DM
17992019-12-11 David Malcolm <dmalcolm@redhat.com>
1800
1801 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1802 implementation.
1803 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1804
d68f5d45
DM
18052019-12-09 David Malcolm <dmalcolm@redhat.com>
1806
1807 * c-format.c (range_label_for_format_type_mismatch::get_text):
1808 Replace label_text ctor called with true with label_text::take.
1809
d3e28653
DM
18102019-12-09 David Malcolm <dmalcolm@redhat.com>
1811
1812 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1813 initial newline from expected outputs.
1814 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1815 call to diagnostic_show_locus.
1816
abd6d8cc
JJ
18172019-12-06 Jakub Jelinek <jakub@redhat.com>
1818
1819 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1820 now.
1821
7906797e
MP
18222019-12-05 Marek Polacek <polacek@redhat.com>
1823 Jakub Jelinek <jakub@redhat.com>
1824
1825 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1826 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1827
5c04da88
MP
18282019-12-05 Marek Polacek <polacek@redhat.com>
1829
1830 PR c++/92271 - make __is_same alias for __is_same_as.
1831 * c-common.c: Add __is_same, an alias for __is_same_as.
1832
43aae289
MP
18332019-12-03 Marek Polacek <polacek@redhat.com>
1834
1835 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1836 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1837 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1838
d7ddfbcb
JH
18392019-11-30 Jan Hubicka <hubicka@ucw.cz>
1840
1841 * c-attribs.c (handle_symver_attribute): New function
1842 (c_common_attributes): Add symver.
1843
65ef05d0
RS
18442019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1845
1846 * c-common.c (pointer_int_sum): Use verify_type_context to check
1847 whether the target allows pointer arithmetic for the types involved.
1848 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1849 to check whether the target allows sizeof and alignof operations
1850 for the types involved.
1851
1a291106
JM
18522019-11-27 Jason Merrill <jason@redhat.com>
1853
1854 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1855
05d6cb1a
JJ
18562019-11-26 Jakub Jelinek <jakub@redhat.com>
1857
1858 PR c++/61414
1859 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1860 ENUMERAL_TYPEs.
1861
5b8d9367
JM
18622019-11-25 Joseph Myers <joseph@codesourcery.com>
1863
1864 PR c/91985
1865 * c-common.c (c_common_type_for_mode): Handle decimal
1866 floating-point types being NULL_TREE.
1867 * c-format.c (get_format_for_type_1): Handle specified types being
1868 NULL_TREE.
1869 * c-lex.c (interpret_float): Give an error for decimal
1870 floating-point constants when decimal floating-point not
1871 supported.
1872
1fbf51cb
JJ
18732019-11-23 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR middle-end/83859
1876 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1877 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1878 group warning with inform together.
1879 (handle_access_attribute): Formatting fix.
1880
761df906
JJ
18812019-11-22 Jakub Jelinek <jakub@redhat.com>
1882
bdaf8be1
JJ
1883 PR c/90677
1884 * c-common.h (identifier_global_tag): Declare.
1885 * c-format.c (get_pointer_to_named_type): Renamed to ...
1886 (get_named_type): ... this. Use identifier_global_tag instead of
1887 identifier_global_value, handle the return value being a TYPE_P.
1888 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1889 to call get_named_type instead. Formatting fixes.
1890
c2ecce6d 1891 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1892 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1893 and __cpp_generic_lambdas for -std=c++2a. Define
1894 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1895 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1896 __cpp_concepts for -std=c++2a.
1897
54aa6b58
MS
18982019-11-22 Martin Sebor <msebor@redhat.com>
1899
1900 PR middle-end/83859
1901 * c-attribs.c (handle_access_attribute): New function.
1902 (c_common_attribute_table): Add new attribute.
1903 (get_argument_type): New function.
1904 (append_access_attrs): New function.
1905 (get_nonnull_operand): Rename...
1906 (get_attribute_operand): ...to this.
1907 * c-common.c (get_nonnull_operand): Rename...
1908 (get_attribute_operand): ...to this.
1909
6c80b1b5
JM
19102019-11-21 Joseph Myers <joseph@codesourcery.com>
1911
1912 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1913 of warning.
1914
192961ff
JM
19152019-11-19 Joseph Myers <joseph@codesourcery.com>
1916
1917 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1918 warning for standard attributes mixed with fallthrough attributes.
1919
f8aea5e3
JM
19202019-11-15 Joseph Myers <joseph@codesourcery.com>
1921
1922 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1923 * c-common.h (handle_fallthrough_attribute): Declare.
1924
2cc94aa8
JM
19252019-11-15 Joseph Myers <joseph@codesourcery.com>
1926
1927 * c-attribs.c (handle_deprecated_attribute): Remove static.
1928 * c-common.h (handle_deprecated_attribute): Declare.
1929
7c5890cc
JM
19302019-11-14 Joseph Myers <joseph@codesourcery.com>
1931
1932 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1933 char for C.
1934
b2417b59
JJ
19352019-11-14 Jakub Jelinek <jakub@redhat.com>
1936
d0ec7c93
JJ
1937 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1938 valid vendors.
1939
b2417b59
JJ
1940 * c-omp.c (c_omp_check_context_selector): Handle name lists
1941 containing string literals. Don't diagnose atomic_default_mem_order
1942 with multiple props.
1943
00be2a5f
JM
19442019-11-13 Joseph Myers <joseph@codesourcery.com>
1945
1946 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1947 NORM_MAX constants. Update call to get_max_float.
1948 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1949 constants.
1950
2dbad62d
EB
19512019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1952
1953 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1954 (dump_forward_type): Do not generate a declaration for function types.
1955 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1956 of the component type if it is declared in another file.
1957
6ed76044
ML
19582019-11-12 Martin Liska <mliska@suse.cz>
1959
1960 * c-opts.c (c_common_post_options):
1961 Use SET_OPTION_IF_UNSET.
1962
62aee289
MR
19632019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1964 Frederik Harwath <frederik@codesourcery.com>
1965
1966 gcc/c-family/
1967 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1968 constant.
1969 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1970
f486280c
RS
19712019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1972
1973 * c-common.h (gnu_vector_type_p): New function.
1974 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1975 vectors to satisfy gnu_vector_type_p.
1976 (c_build_vec_convert): Likewise __builtin_convertvector.
1977 (convert_vector_to_array_for_subscript): Likewise when applying
1978 implicit vector to array conversion.
1979 (scalar_to_vector): Likewise when converting vector-scalar
1980 operations to vector-vector operations.
1981
017c6491
JM
19822019-11-08 Joseph Myers <joseph@codesourcery.com>
1983
1984 * c.opt (Wold-style-definition): Initialize to -1.
1985 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1986 to flag_isoc2x if not set explicitly.
1987
c01bd174
JM
19882019-11-07 Joseph Myers <joseph@codesourcery.com>
1989
1990 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1991
0df65305
JM
19922019-11-05 Jason Merrill <jason@redhat.com>
1993
1994 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1995 -fconcepts.
1996
e0c866dd
KK
19972019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1998
1999 * c-opts.c (c_common_post_options): Update
2000 latest_abi_version.
2001
f968ef9b
JJ
20022019-11-02 Jakub Jelinek <jakub@redhat.com>
2003
d0c464d2
JJ
2004 * c-common.h (c_omp_get_context_selector): Remove.
2005 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2006 and renamed to omp_get_context_selector.
2007
917dd789
JJ
2008 * c-omp.c (c_omp_mark_declare_variant): Use
2009 omp_context_selector_set_compare.
2010
f968ef9b
JJ
2011 PR c++/88335 - Implement P1073R3: Immediate functions
2012 * c-common.h (enum rid): Add RID_CONSTEVAL.
2013 * c-common.c (c_common_reswords): Add consteval.
2014
5f6705b7
JJ
20152019-11-01 Martin Sebor <msebor@redhat.com>
2016
2017 PR middle-end/91679
2018 PR middle-end/91647
2019 PR middle-end/91463
2020 PR middle-end/92312
2021 * c-pretty-print.c (direct_abstract_declarator): Print
2022 bound in zero-length arrays.
2023 * c.opt (-Wzero-length-bounds): New option.
2024
43f1814c
NS
20252019-10-30 Nathan Sidwell <nathan@acm.org>
2026
2027 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2028 macros.
2029
ad1539d5
MS
20302019-10-28 Martin Sebor <msebor@redhat.com>
2031
2032 PR c/66970
2033 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2034 even when only preprocessing.
2035 * c-common.h (names_builtin_p): Declare new function.
2036 * c-lex.c (init_c_lex): Set has_builtin.
2037 (c_common_has_builtin): Define a new function.
2038 * c-ppoutput.c (init_pp_output): Set has_builtin.
2039
135df52c
JJ
20402019-10-24 Jakub Jelinek <jakub@redhat.com>
2041
2042 * c-common.h (c_omp_context_selector_matches): Remove.
2043 * c-omp.c (c_omp_context_selector_matches): Remove.
2044 * c-attribs.c (c_common_attribute_table): Add
2045 "omp declare target {host,nohost,block}" attributes.
2046
8ad0c477
JM
20472019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2048
2049 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2050
56898e43
RS
20512019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2052
2053 * c-common.h (user_facing_original_type_p): Declare.
2054 * c-common.c: Include c-spellcheck.h.
2055 (user_facing_original_type_p): New function.
2056
20de9568
JJ
20572019-10-12 Jakub Jelinek <jakub@redhat.com>
2058
2059 * c-common.h (c_omp_mark_declare_variant,
2060 c_omp_context_selector_matches): Declare.
2061 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2062 and hsa-common.h.
2063 (c_omp_get_context_selector): Support second argument NULL.
2064 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2065 functions.
2066 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2067 attribute, add "omp declare variant base" and
2068 "omp declare variant variant" attributes.
2069
175a85b2
JM
20702019-10-11 Joseph Myers <joseph@codesourcery.com>
2071
2072 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2073 CppReason(CPP_W_C11_C2X_COMPAT).
2074
fe2bc27c
JM
20752019-10-11 Joseph Myers <joseph@codesourcery.com>
2076
2077 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2078 _Decimal64 and _Decimal128.
2079
27dfdc0f
JM
20802019-10-10 Joseph Myers <joseph@codesourcery.com>
2081
2082 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2083 types if DFP not supported.
2084
94e7f906
JJ
20852019-10-10 Jakub Jelinek <jakub@redhat.com>
2086
2087 * c-common.h (c_omp_check_context_selector,
2088 c_omp_get_context_selector): Declare.
2089 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2090 in diagnostic message.
2091 (c_omp_check_context_selector, c_omp_get_context_selector): New
2092 functions.
2093 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2094 attribute.
2095 (handle_omp_declare_variant_attribute): New function.
2096
a7160771
MS
20972019-10-09 Martin Sebor <msebor@redhat.com>
2098
2099 PR tree-optimization/90879
2100 * c.opt (-Wstring-compare): New option.
2101
cb57504a
JM
21022019-10-08 Andrew Sutton <asutton@lock3software.com>
2103 Jason Merrill <jason@redhat.com>
2104
2105 Update the concepts implementation to conform to the C++20
2106 specification, improve compile times, and generally clean up
2107 the implementation.
2108
2109 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2110 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2111 * c.opt: Add -Wconcepts-ts.
2112 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2113 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2114 (set_std_cxx2a): Enable concepts by default.
2115
fbb2a6dc
JM
21162019-10-08 Joseph Myers <joseph@codesourcery.com>
2117
2118 * c-opts.c (c_common_post_options): Set
2119 -fno-fp-int-builtin-inexact for C2X.
2120
8e007055
JJ
21212019-10-05 Jakub Jelinek <jakub@redhat.com>
2122
2123 PR c++/91369 - Implement P0784R7: constexpr new
2124 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2125 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2126
843f104d
JM
21272019-10-04 Joseph Myers <joseph@codesourcery.com>
2128
2129 PR c/82752
2130 * c-format.c (C_STD_VER): Handle C2x.
2131 (C_STD_NAME): Likewise.
2132 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2133 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2134 modifier allowed and 'p' flag.
2135 * c-format.h (enum format_std_version): Add STD_C2X.
2136 (struct format_char_info): Mention 'p' in comment on flags2.
2137
e9c9a142
DM
21382019-10-01 David Malcolm <dmalcolm@redhat.com>
2139
2140 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2141 calling diagnostic_show_locus, rather than destroying it afterwards.
2142
7552c36a
JJ
21432019-10-01 Jakub Jelinek <jakub@redhat.com>
2144
2145 PR c++/91925
2146 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2147 with NULL DECL_FIELD_OFFSET.
2148
8209db25
RS
21492019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2150
2151 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2152 has a type name, use it in preference to the __vector syntax.
2153
9343bf99
RS
21542019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2155
2156 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2157 two spaces between a comma and "...".
2158
59bc434a
JJ
21592019-09-27 Jakub Jelinek <jakub@redhat.com>
2160
2161 PR c++/88203
2162 * c-common.h (c_omp_predefined_variable): Declare.
2163 * c-omp.c (c_omp_predefined_variable): New function.
2164 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2165 for predefined variables.
2166
c6447c20
RS
21672019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2168
2169 * c-common.h (build_function_call_vec): Take the original
2170 function decl as an optional final parameter.
2171 (check_builtin_function_arguments): Take the original function decl.
2172 * c-common.c (check_builtin_function_arguments): Likewise.
2173 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2174 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2175
c4438114
JM
21762019-09-15 Jason Merrill <jason@redhat.com>
2177
2178 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2179 fold_for_warn in "|| mask" warning.
2180
68a57628
ML
21812019-09-10 Martin Liska <mliska@suse.cz>
2182
2183 * c.opt: Use newly added WarnRemoved.
2184
f48ef52e
ML
21852019-09-09 Martin Liska <mliska@suse.cz>
2186
2187 * c.opt: Update comment of removed
2188 options that are preserved only for backward
2189 compatibility.
2190
67f6e649
ML
21912019-09-06 Martin Liska <mliska@suse.cz>
2192
2193 PR c++/91125
2194 * c-common.c: Remove definition of flag_use_repository.
2195 * c-common.h: Likewise.
2196 * c-opts.c (c_common_handle_option):
2197 Do not handle OPT_frepo option.
2198 * c.opt: Mark the option with Deprecated.
2199
db9d2274
MP
22002019-09-04 Marek Polacek <polacek@redhat.com>
2201
2202 * c.opt (fdeduce-init-list): Ignored.
2203
68e2c199
PK
22042019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2205
2206 PR c/78736
2207 * c.opt (Wenum-conversion): New option.
2208
7a4418a5
JL
22092019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2210
2211 * c-attribs.c (handle_section_attribute): Call the
2212 handle_generic_attribute target hook after performing target
2213 independent processing.
2214 (handle_noinit_attribute): Likewise.
2215
5f76ab15
ILT
22162019-09-03 Ian Lance Taylor <iant@golang.org>
2217
2218 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2219 when using -fgo-dump-spec.
2220
ae0d3f6a
ML
22212019-09-02 Martin Liska <mliska@suse.cz>
2222
2223 PR c++/91155
2224 * c-common.c (fname_as_string): Use cxx_printable_name for
2225 __PRETTY_FUNCTION__ same as was used before r265711.
2226
8a902edb
MP
22272019-08-28 Marek Polacek <polacek@redhat.com>
2228
2229 Implement P1152R4: Deprecating some uses of volatile.
2230 PR c++/91361
2231 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2232 default for C++2a, unless -Wno-deprecated.
2233 * c.opt (Wvolatile): New warning.
2234
4742dbe7
MP
22352019-08-28 Marek Polacek <polacek@redhat.com>
2236
2237 PR c++/91360 - Implement C++20 P1143R2: constinit.
2238 * c-common.c (c_common_reswords): Add constinit and __constinit.
2239 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2240 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2241 RID_LAST_CXX20.
2242 (D_CXX20): Define.
2243 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2244 * c-format.c (cxx_keywords): Add "constinit".
2245 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2246
6a074892
JJ
22472019-08-27 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR c++/91415
2250 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2251 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2252 like COMPOUND_EXPR rather than normal expression.
2253
22f8849d
IS
22542019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2255
2256 PR pch/61250
2257 * c-lex.c (c_lex_with_flags): Don't call
2258 c_common_no_more_pch () from here.
2259
df375b03
JJ
22602019-08-23 Jakub Jelinek <jakub@redhat.com>
2261
2262 PR middle-end/91283
2263 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2264 instead of flag_excess_precision_cmdline.
2265 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2266 * c-opts.c (c_common_post_options): Likewise.
2267
14b7950f
MS
22682019-08-22 Martin Sebor <msebor@redhat.com>
2269
2270 PR middle-end/91490
2271 * c-common.c (braced_list_to_string): Add argument and overload.
2272 Handle flexible length arrays and unions.
2273
8bb2ee59
EB
22742019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2275
2276 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2277 function declarations where arguments are missing. Rename variables.
2278
21c1e205
RB
22792019-08-15 Richard Biener <rguenther@suse.de>
2280
2281 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2282 enabled, define __SIZETYPE__.
2283
f0033821
CL
22842019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2285
2286 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2287 exclusion with "section" attribute.
2288 (attr_noinit_exclusions): New table.
2289 (handle_noinit_attribute): New function.
2290
4d732405
RS
22912019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2292
2293 PR middle-end/91421
2294 * c-common.c (resolve_overloaded_builtin): Use
2295 copy_decl_built_in_function.
2296
51ad8481
MS
22972019-08-13 Martin Sebor <msebor@redhat.com>
2298
2299 PR c/80619
2300 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2301 (asm_fprintf_length_spec): Same.
2302 * c-format.h (format_lengths): Add FMT_LEN_w.
2303
77eb117f
JJ
23042019-08-10 Jakub Jelinek <jakub@redhat.com>
2305
2306 * c-pragma.h (enum pragma_omp_clause): Add
2307 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2308
398e3feb
JJ
23092019-08-07 Jakub Jelinek <jakub@redhat.com>
2310
2311 * c-pragma.h (enum pragma_omp_clause): Add
2312 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2313 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2314 enumeration value.
2315
ab574db6
MP
23162019-08-05 Marek Polacek <polacek@redhat.com>
2317
2318 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2319 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2320 default for C++2a, unless -Wno-deprecated.
2321 * c.opt (Wcomma-subscript): New warning.
2322
554a530f
JJ
23232019-07-20 Jakub Jelinek <jakub@redhat.com>
2324
2325 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2326 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2327 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2328 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2329 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2330 constructs with the loop construct.
2331
1a888209
JJ
23322019-07-13 Jakub Jelinek <jakub@redhat.com>
2333
2334 PR c/91149
2335 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2336 OMP_CLAUSE_REDUCTION_TASK handling.
2337
1fdd6f04
JJ
23382019-07-12 Jakub Jelinek <jakub@redhat.com>
2339
2340 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2341 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2342
99b1c316
MS
23432019-07-09 Martin Sebor <msebor@redhat.com>
2344
2345 PR c++/61339
1fdd6f04 2346 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2347 and others to class.
2348 * c-pretty-print.h: Same.
2349
6c1dae73
MS
23502019-07-09 Martin Sebor <msebor@redhat.com>
2351
2352 PR c++/61339
2353 * c-format.c (check_argument_type): Change class-key from class to
2354 struct and vice versa to match convention and avoid -Wclass-is-pod
2355 and -Wstruct-no-pod.
2356 * c-pretty-print.h: Same.
2357
8ba6ea87
ML
23582019-07-03 Martin Liska <mliska@suse.cz>
2359
2360 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2361 dead assignemts.
2362
83eb9522
JJ
23632019-07-03 Jakub Jelinek <jakub@redhat.com>
2364
2365 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2366 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2367 with OMP_PARALLEL.
2368
1c6ffbab
QZ
23692019-07-02 qing zhao <qing.zhao@oracle.com>
2370
2371 PR preprocessor/90581
2372 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2373 * c.opt: Add new option -fmax-include-depth.
2374
7ffc7de5
JM
23752019-06-26 Jason Merrill <jason@redhat.com>
2376
2377 PR c++/55442 - memory-hog with highly recursive constexpr.
2378 * c.opt (fconstexpr-loop-limit): New.
2379
361af3e4
JJ
23802019-06-25 Jakub Jelinek <jakub@redhat.com>
2381
2382 PR sanitizer/90954
2383 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2384 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2385
ab20d992
JJ
23862019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2387
2388 * c-common.c (c_common_nodes_and_builtins): Define
2389 alternate "__intN__" name for "__intN" types.
2390
f4af4019
JH
23912019-06-24 Jan Hubicka <jh@suse.cz>
2392
2393 * c-common.c (braced_lists_to_strings): Check that
2394 type is array or integer prior checking string flag.
2395
da9e9b57
MB
23962019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2397
2398 PR c++/90875 - added -Wswitch-outside-range option
2399 * c.opt (Wswitch-outside-range): Added new option.
2400 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2401
3f3d6a6f
MP
24022019-06-21 Marek Polacek <polacek@redhat.com>
2403
2404 PR c++/90953 - ICE with -Wmissing-format-attribute.
2405 * c-common.c (check_function_arguments_recurse): Use
2406 get_attribute_name.
2407 (check_missing_format_attribute): Likewise.
2408
1bf32c11
MP
24092019-06-19 Marek Polacek <polacek@redhat.com>
2410
2411 PR c++/60364 - noreturn after first decl not diagnosed.
2412 * c-attribs.c (handle_noreturn_attribute): No longer static.
2413 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2414 Declare.
2415 * c-format.c (check_function_format): Use get_attribute_name.
2416
a04c0734
MS
24172019-06-19 Martin Sebor <msebor@redhat.com>
2418
2419 PR translation/90156
2420 * c-format.c (function_format_info::format_type): Adjust type.
2421 (function_format_info::is_raw): New member.
2422 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2423 (decode_format_attr): Adjust call to decode_format_type.
2424 Avoid a redundant call to convert_format_name_to_system_name.
2425 Avoid abbreviating the word "arguments" in a diagnostic.
2426 (format_warning_substr): New function.
2427 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2428 (finish_dollar_format_checking): Same.
2429 (check_format_info): Same.
2430 (struct baltoks_t): New.
2431 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2432 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2433 functions.
2434 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2435 maybe_diag_unbalanced_tokens.
2436 (handle_format_attribute): Spell out the word "arguments" in
2437 a diagnostic.
2438
d3786ebb
MB
24392019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2440
2441 PR c++/90449 - add -Winaccessible-base option.
2442 * c.opt (Winaccessible-base): New option.
2443
bf38f7e9
JJ
24442019-06-10 Jakub Jelinek <jakub@redhat.com>
2445
2446 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2447 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2448 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2449 combined/composite constructs where it is not allowed. Copy over
2450 OMP_CLAUSE_REDUCTION_INSCAN.
2451
0ecf545c
MS
24522019-06-05 Martin Sebor <msebor@redhat.com>
2453
2454 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2455 (handle_alias_ifunc_attribute): Same.
2456 (handle_copy_attribute): Same.
2457 (handle_weakref_attribute): Same.
2458 (handle_nonnull_attribute): Same.
2459 * c-warn.c (warn_for_sign_compare): Same.
2460 (warn_for_restrict): Same.
2461 * c.opt: Same.
2462
36b34127
MS
24632019-06-05 Martin Sebor <msebor@redhat.com>
2464
2465 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2466 * c.opt (-Wformat-diag): Remove a spurious period.
2467
357a352f
JJ
24682019-05-29 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR c/90628
2471 * c-common.c (check_builtin_function_arguments)
2472 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2473 as last argument.
2474
2b8235ea
EB
24752019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2476
2477 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2478
6d86ddc4
ML
24792019-05-22 Martin Liska <mliska@suse.cz>
2480
2481 PR lto/90500
2482 * c-attribs.c (handle_copy_attribute): Do not copy
2483 target_clones attribute.
2484
419ba5b9
EB
24852019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2486
2487 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2488 * c-ada-spec.c (print_assignment_operator): New function.
2489 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2490 assignment operators declared as methods and filter out the others.
2491
e03436e7
TS
24922019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2493
2494 PR c/89433
2495 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2496 "omp declare target".
2497
a9c697b8
MS
24982019-05-16 Martin Sebor <msebor@redhat.com>
2499
ab20d992
JJ
2500 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2501 keywords, operators, and types in diagnostics.
2502 (handle_scalar_storage_order_attribute): Same.
2503 (handle_mode_attribute): Same.
2504 (handle_visibility_attribute): Same.
2505 (handle_assume_aligned_attribute): Same.
2506 (handle_no_split_stack_attribute): Same.
2507 * c-common.c (shorten_compare): Same.
2508 (c_common_truthvalue_conversion): Same.
2509 (cb_get_source_date_epoch): Same.
2510 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2511 in diagnostics.
2512 (interpret_float): Same.
2513 * c-omp.c (c_finish_omp_for): Same.
2514 * c-opts.c (c_common_post_options): Same.
2515 * c-pch.c (c_common_pch_pragma): Same.
2516 * c-pragma.c (pop_alignment): Same.
2517 (handle_pragma_pack): Same.
2518 (apply_pragma_weak): Same.
2519 (handle_pragma_weak): Same.
2520 (handle_pragma_scalar_storage_order): Same.
2521 (handle_pragma_redefine_extname): Same.
2522 (add_to_renaming_pragma_list): Same.
2523 (maybe_apply_renaming_pragma): Same.
2524 (push_visibility): Same.
2525 (handle_pragma_visibility): Same.
2526 (handle_pragma_optimize): Same.
2527 (handle_pragma_message): Same.
2528 * c-warn.c (warn_for_omitted_condop): Same.
2529 (lvalue_error): Same.
a9c697b8 2530
6b943512
RB
25312019-05-15 Richard Biener <rguenther@suse.de>
2532
2533 PR c/90474
2534 * c-common.c (c_common_mark_addressable_vec): Also mark
2535 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2536 c_mark_addressable.
ab20d992 2537
b744fc85
NS
25382019-05-06 Nathan Sidwell <nathan@acm.org>
2539
2540 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2541
598f50d7
NS
25422019-04-30 Nathan Sidwell <nathan@acm.org>
2543
2544 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2545
5bcc5a3b
ML
25462019-04-30 Martin Liska <mliska@suse.cz>
2547
2548 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2549 for unknown options.
2550
e78a87f7
RS
25512019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2552
2553 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2554 the pointer target rather than the pointer itself.
2555
c280b7ee
JJ
25562019-04-19 Jakub Jelinek <jakub@redhat.com>
2557
2558 PR c/89888
2559 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2560 arguments.
2561 (c_do_switch_warnings): Remove outside_range_p argument.
2562 * c-common.c (check_case_bounds): Removed.
2563 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2564 Don't call check_case_bounds. Fold low_value as well as high_value.
2565 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2566 Check for case labels outside of range of original type here and
2567 adjust them.
2568
8e8225e6
JJ
25692019-04-12 Jakub Jelinek <jakub@redhat.com>
2570
63b8a166
JJ
2571 PR translation/90041
2572 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2573 in the Warn diagnostics.
2574
8e8225e6
JJ
2575 PR c/89946
2576 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2577 function comment. Warn if arguments of the attribute are not positive
2578 integer constants.
2579
53a3f614
EB
25802019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2581
2582 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2583 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2584
22be5873
EB
25852019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2586
2587 * c-ada-spec.c (is_float128): New predicate extracted from...
2588 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2589 <REAL_TYPE>: ...here. Call it.
2590
34facf20
DM
25912019-04-05 David Malcolm <dmalcolm@redhat.com>
2592
2593 PR c/89985
2594 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2595 auto_diagnostic_group. Guard inform calls by result of
2596 warning_at call.
2597
05564120
MP
25982019-04-05 Marek Polacek <polacek@redhat.com>
2599
ab20d992 2600 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2601 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2602 of RHS.
2603
7a506c3c
JM
26042019-04-03 Jason Merrill <jason@redhat.com>
2605
2606 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2607 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2608
ddeae8c8
MS
26092019-04-01 Martin Sebor <msebor@redhat.com>
2610
2611 PR c/89685
2612 * c-attribs.c (handle_copy_attribute): Handle references and
2613 non-constant expressions.
2614
a15ffa22
JJ
26152019-03-22 Jakub Jelinek <jakub@redhat.com>
2616
2617 PR c++/87481
2618 * c.opt (-fconstexpr-ops-limit=): New option.
2619
36a3a7a3
JJ
26202019-03-21 Jakub Jelinek <jakub@redhat.com>
2621
2622 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2623 template param.
2624
bec1da64
MS
26252019-03-19 Martin Sebor <msebor@redhat.com>
2626
2627 PR tree-optimization/89688
2628 * c-common.c (braced_list_to_string): Make static.
2629 (braced_lists_to_strings): Define new function.
2630 * c-common.h (braced_list_to_string): Remove.
2631 (braced_lists_to_strings): Declare.
2632
1fe61adf
ML
26332019-03-12 Martin Liska <mliska@suse.cz>
2634
2635 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2636
93964ebd
ML
26372019-03-11 Martin Liska <mliska@suse.cz>
2638
2639 * c-opts.c (c_common_post_options): Wrap apostrophes
2640 in gcc internal format with %'.
2641
a3f9f006
ML
26422019-03-11 Martin Liska <mliska@suse.cz>
2643
2644 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2645 in a string format message and fix GNU coding style.
2646 * c-common.c (vector_types_convertible_p): Likewise.
2647 (c_build_vec_perm_expr): Likewise.
2648 * c-indentation.c (get_visual_column): Likewise.
2649 * c-opts.c (c_common_handle_option): Likewise.
2650 (c_common_post_options): Likewise.
2651 (sanitize_cpp_opts): Likewise.
2652 * c-pch.c (c_common_pch_pragma): Likewise.
2653 * c-pragma.c (handle_pragma_pack): Likewise.
2654
1db01ff9
JJ
26552019-03-08 Jakub Jelinek <jakub@redhat.com>
2656
2657 PR tree-optimization/89550
2658 * c-common.c (c_common_truthvalue_conversion): Only set
2659 TREE_NO_WARNING if warning_at returned true.
2660 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2661
ba790e6f
JJ
26622019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2663 Martin Sebor <msebor@gmail.com>
2664
2665 * c.opt (Wmissing-attributes): Clean up doc string.
2666
7da73ba7
JJ
26672019-02-25 Jakub Jelinek <jakub@redhat.com>
2668
2669 PR c/89495
2670 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2671 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2672 checking.
2673
921bb9d1
RB
26742019-02-22 Richard Biener <rguenther@suse.de>
2675
2676 * c-pch.c (no_checksum): Remove.
2677 (pch_init): Remove assertion that executable_checksum is not
2678 all zero.
2679 (c_common_valid_pch): Likewise.
2680
e2ebb05c
MS
26812019-02-18 Martin Sebor <msebor@redhat.com>
2682
2683 PR middle-end/89294
2684 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2685
3fe53000
DM
26862019-02-16 David Malcolm <dmalcolm@redhat.com>
2687
2688 PR c++/88680
2689 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2690 implementing -Wtype-limits.
2691
28a8cef1
MS
26922019-02-11 Martin Sebor <msebor@redhat.com>
2693
2694 PR c++/87996
2695 * c-common.c (invalid_array_size_error): New function.
2696 (valid_array_size_p): Call it. Handle size as well as type.
2697 * c-common.h (valid_constant_size_p): New function.
2698 (enum cst_size_error): New type.
2699
ec2be203
DM
27002019-01-31 David Malcolm <dmalcolm@redhat.com>
2701
2702 PR c/89122
2703 * known-headers.cc (get_stdlib_header_for_name): Add
2704 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2705
8936f047
JJ
27062019-01-31 Jakub Jelinek <jakub@redhat.com>
2707
2708 PR libstdc++/88170
2709 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2710 a C cast in pp_c_flag_gnu_v3 mode.
2711
6a335b96
JJ
27122019-01-29 Jakub Jelinek <jakub@redhat.com>
2713
2714 PR c/86125
2715 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2716 builtin_structptr_types types even for C.
2717
2a06eba5
BE
27182019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2719
2720 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2721 when rhs is of array type correctly. Fix handling of nested structures.
2722 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2723 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2724 type casts within nested compound expressions.
2725
18a23298
JJ
27262019-01-22 Jakub Jelinek <jakub@redhat.com>
2727
2728 PR middle-end/88968
2729 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2730 variable after using BIT_FIELD_REF.
2731
420183d9
L
27322019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2733
2734 PR c/51628
2735 PR c/88664
2736 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2737 Remove the boolean argument.
2738 * c-warn.c (check_address_of_packed_member): Renamed to ...
2739 (check_address_or_pointer_of_packed_member): This. Also
2740 warn pointer conversion.
2741 (check_and_warn_address_of_packed_member): Renamed to ...
2742 (check_and_warn_address_or_pointer_of_packed_member): This.
2743 Also warn pointer conversion.
2744 (warn_for_address_or_pointer_of_packed_member): Remove the
2745 boolean argument. Don't check pointer conversion here.
2746
99063eee
RS
27472019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2748
2749 PR inline-asm/52813
2750 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2751
a30d0196
JJ
27522019-01-14 Jakub Jelinek <jakub@redhat.com>
2753
2754 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2755 and __cpp_nontype_template_parameter_auto. Add a comment that
2756 __cpp_template_auto is deprecated.
2757
2d91f79d
TH
27582019-01-14 Tom Honermann <tom@honermann.net>
2759
2760 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2761 * c-common.c (c_common_reswords): Add char8_t.
2762 (fix_string_type): Use char8_t for the type of u8 string literals.
2763 (c_common_get_alias_set): char8_t doesn't alias.
2764 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2765 C++.
2766 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2767 (keyword_begins_type_specifier): Add RID_CHAR8.
2768 * c-common.h (rid): Add RID_CHAR8.
2769 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2770 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2771 Define char8_type_node and char8_array_type_node.
2772 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2773 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2774 (c_cpp_builtins): Predefine __cpp_char8_t.
2775 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2776 CPP_UTF8STRING.
2777 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2778 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2779 targeting C++2a.
2780 * c.opt: Add the -fchar8_t command line option.
2781
23db6ced
MS
27822019-01-14 Martin Sebor <msebor@redhat.com>
2783
2784 PR target/88638
2785 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2786 and issue errors if it fails.
2787 * c-common.h (valid_format_string_type_p): Declare.
2788 * c-format.c (valid_stringptr_type_p): Rename...
2789 (valid_format_string_type_p): ...to this and make extern.
2790 (handle_format_arg_attribute): Adjust to new name.
2791 (check_format_string): Same.
2792
234c3818
L
27932019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2794
2795 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2796 Replace "may may" with "may" in warning message.
2797
d8fcab68
JJ
27982019-01-07 Jakub Jelinek <jakub@redhat.com>
2799
2800 PR c++/85052
2801 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2802 (c_build_vec_convert): Declare.
2803 * c-common.c (c_build_vec_convert): New function.
2804
29d24852
MS
28052019-01-04 Martin Sebor <msebor@redhat.com>
2806
2807 PR c/88546
2808 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2809 Handle C++ empty throw specification and C11 _Noreturn.
2810 (has_attribute): Also handle C11 _Noreturn.
2811
9069a4c9
MS
28122019-01-04 Martin Sebor <msebor@redhat.com>
2813
2814 PR c/88363
2815 * c-attribs.c (positional_argument): Also accept enumerated types.
2816
a5544970
JJ
28172019-01-01 Jakub Jelinek <jakub@redhat.com>
2818
2819 Update copyright years.
2820
da77eace
L
28212018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2822
2823 PR c/51628
2824 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2825 * c-warn.c (check_alignment_of_packed_member): New function.
2826 (check_address_of_packed_member): Likewise.
2827 (check_and_warn_address_of_packed_member): Likewise.
2828 (warn_for_address_or_pointer_of_packed_member): Likewise.
2829 * c.opt: Add -Wno-address-of-packed-member.
2830
573767d4
DM
28312018-12-20 David Malcolm <dmalcolm@redhat.com>
2832
2833 PR c++/87504
2834 * c-warn.c (get_outermost_macro_expansion): New function.
2835 (spelled_the_same_p): Use it to unwind the macro expansions, and
2836 compare the outermost macro in each nested expansion, rather than
2837 the innermost.
2838
a14feb3c
DM
28392018-12-19 David Malcolm <dmalcolm@redhat.com>
2840
2841 PR c++/87504
2842 * c-common.h (warn_tautological_cmp): Convert 1st param from
2843 location_t to const op_location_t &.
2844 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2845 when testing for INTEGER_CST.
2846 (warn_tautological_bitwise_comparison): Convert 1st param from
2847 location_t to const op_location_t &; use it to build a
2848 binary_op_rich_location, and use this.
2849 (spelled_the_same_p): New function.
2850 (warn_tautological_cmp): Convert 1st param from location_t to
2851 const op_location_t &. Warn for macro expansions if
2852 spelled_the_same_p. Use binary_op_rich_location.
2853
dfd7fdca
DM
28542018-12-19 David Malcolm <dmalcolm@redhat.com>
2855
2856 PR c++/43064
2857 PR c++/43486
2858 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2859 (verify_tree): Handle location wrappers.
2860 (c_common_truthvalue_conversion): Strip any location wrapper.
2861 Handle CONST_DECL.
2862 (fold_offsetof): Strip any location wrapper.
2863 (complete_array_type): Likewise for initial_value.
2864 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2865 index before checking for INTEGER_CST.
2866 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2867 print parentheses around location wrappers.
2868 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2869 before checking for INTEGER_CST.
2870 (warn_tautological_bitwise_comparison): Call
2871 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2872 before checking for INTEGER_CST.
2873 (readonly_error): Strip any location wrapper.
2874 (warn_array_subscript_with_type_char): Strip location wrappers
2875 before checking for INTEGER_CST. Use the location of the index if
2876 available.
2877
5c8b3702
JM
28782018-12-06 Jason Merrill <jason@redhat.com>
2879
2880 PR c++/88136 - -Wdeprecated-copy false positives
2881 * c.opt (Wdeprecated-copy-dtor): New.
2882 (Wdeprecated-copy): Move to -Wextra.
2883
673670da
MS
28842018-11-29 Martin Sebor <msebor@redhat.com>
2885
2886 PR c/88172
2887 PR testsuite/88208
2888 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2889 alignments to values less than the target requires.
2890 (has_attribute): For attribute aligned consider both the attribute
2891 and the alignment bits.
2892 * c-common.c (c_init_attributes): Optionally issue a warning for
2893 zero alignment.
2894
04864ec8
MS
28952018-11-28 Martin Sebor <msebor@redhat.com>
2896
2897 PR c/88065
2898 PR c/87297
2899 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2900 or destination is an error.
2901
ace83db0
JJ
29022018-11-28 Jakub Jelinek <jakub@redhat.com>
2903
2904 PR c++/88215
2905 * c-ubsan.c: Include langhooks.h.
2906 (ubsan_instrument_division): Change gcc_assert that main variants
2907 of op0 and op1 types are equal to gcc_checking_assert that the
2908 main variants are compatible types.
2909
da193a27
EB
29102018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2911
2912 * c-ada-spec.c: Include stringpool.h.
2913 (has_static_fields): Return false for incomplete types.
2914 (is_tagged_type): Likewise.
2915 (has_nontrivial_methods): Likewise.
2916 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2917 (struct overloaded_name_hash): New structure.
2918 (struct overloaded_name_hasher): Likewise.
2919 (overloaded_names): New global variable.
2920 (init_overloaded_names): New static function.
2921 (overloaded_name_p): New predicate.
2922 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2923 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2924 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2925 Remove always-true condition and dump forward types.
2926 (dump_ada_specs): Delete overloaded_names.
2927
98f08eb8
MS
29282018-11-20 Martin Sebor <msebor@redhat.com>
2929
2930 * c-attribs.c (type_for_vector_size): New function.
2931 (type_valid_for_vector_size): Same.
2932 (handle_vector_size_attribute): Move code to the functions above
2933 and call them.
2934 (validate_attribute, has_attribute): New functions.
2935 * c-common.h (has_attribute): Declare.
2936 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2937 * c-common.c (c_common_resword): Same.
2938
2674fa47
JM
29392018-11-16 Jason Merrill <jason@redhat.com>
2940
2941 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2942 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2943
258b3854
JJ
29442018-11-16 Jakub Jelinek <jakub@redhat.com>
2945
2946 PR middle-end/87854
2947 * c-common.c (fix_string_type): Reject string literals larger than
2948 TYPE_MAX_VALUE (ssizetype) bytes.
2949
1d249509
MS
29502018-11-15 Martin Sebor <msebor@redhat.com>
2951
2952 PR c++/87541
2953 PR c++/87542
2954 * c-attribs.c (positional_argument): New function.
2955 (handle_alloc_size_attribute): Use it and simplify.
2956 (handle_alloc_align_attribute): Same.
2957 (handle_assume_aligned_attribute): Same.
2958 (handle_nonnull_attribute): Same.
2959 * c-common.c (check_function_arguments): Pass fntype to
2960 check_function_format.
2961 * c-common.h (check_function_format): Add an argument.
2962 (PosArgFlags, positional_argument): Declare new type and function.
2963 * c-format.c (decode_format_attr): Add arguments.
2964 (check_format_string, get_constant): Same.
2965 (convert_format_name_to_system_name): Adjust.
2966
478dd60d
DM
29672018-11-15 David Malcolm <dmalcolm@redhat.com>
2968
2969 PR other/19165
2970 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2971
8cca0163
JJ
29722018-11-14 Jakub Jelinek <jakub@redhat.com>
2973
8ee09943
JJ
2974 P1236R1 - Signed integers are two's complement
2975 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2976 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2977 with in-range second operand well defined for -std=c++2a.
2978
8cca0163
JJ
2979 PR other/88007
2980 * c-common.c (parse_optimize_options): Allocate option string from
2981 opts_obstack rather than as GC memory. Move the allocation after
2982 warning for invalid option.
2983
620e594b
DM
29842018-11-13 David Malcolm <dmalcolm@redhat.com>
2985
2986 * c-common.c (c_get_substring_location): Update for renaming of
2987 get_source_location_for_substring to get_location_within_string.
2988 * c-lex.c: Replace "source_location" with "location_t".
2989 * c-opts.c: Likewise.
2990 * c-ppoutput.c: Likewise.
2991
f9731de3
MS
29922018-11-13 Martin Sebor <msebor@redhat.com>
2993
2994 PR middle-end/81824
2995 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2996 (handle_tls_model_attribute): Improve diagnostics.
2997
e4bd6d5e
JM
29982018-11-12 Jason Merrill <jason@redhat.com>
2999
a6bb6b07
JM
3000 * c-cppbuiltin.c (c_cpp_builtins): Define
3001 __cpp_impl_destroying_delete.
3002
e4bd6d5e
JM
3003 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3004 __cpp_conditional_explicit.
3005
79a2c428
MS
30062018-11-09 Martin Sebor <msebor@redhat.com>
3007
3008 PR middle-end/81824
3009 * c-attribs.c (handle_copy_attribute): New function.
3010
4c7bd361
MS
30112018-11-09 Martin Sebor <msebor@redhat.com>
3012
3013 PR c/87795
3014 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3015
28567c40
JJ
30162018-11-08 Jakub Jelinek <jakub@redhat.com>
3017
3018 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3019 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3020 enum omp_memory_order MEMORY_ORDER.
3021 (c_finish_omp_flush): Add MO argument.
3022 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3023 (c_finish_omp_for): Add FINAL_P argument.
3024 * c-omp.c: Include memmodel.h.
3025 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3026 OMP_TASKGROUP_CLAUSES to it.
3027 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3028 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3029 instead of OMP_ATOMIC_SEQ_CST.
3030 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3031 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3032 __atomic_thread_fence call with the given value.
3033 (check_omp_for_incr_expr): Formatting fixes.
3034 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3035 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3036 is not constant expression 1 or -1. Transform NE_EXPR loops
3037 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3038 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3039 loops too.
3040 (c_omp_split_clauses): Add support for combined
3041 #pragma omp parallel master and
3042 #pragma omp {,parallel }master taskloop{, simd} constructs.
3043 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3044 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3045 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3046 (c_omp_predetermined_sharing): Don't return
3047 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3048 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3049 PRAGMA_OMP_REQUIRES.
3050 * c-pragma.h (enum pragma_kind): Likewise.
3051 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3052 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3053
204839e7
DM
30542018-11-08 David Malcolm <dmalcolm@redhat.com>
3055
3056 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3057
d8010ee4
DM
30582018-11-08 David Malcolm <dmalcolm@redhat.com>
3059
3060 * c-format.c (local_cgraph_node_ptr_node): New variable.
3061 (gcc_dump_printf_char_table): Add entry for %C.
3062 (get_pointer_to_named_type): New function, taken from the handling
3063 code for "gimple *" from...
3064 (init_dynamic_diag_info): ...here. Add handling for
3065 "cgraph_node *".
3066 * c-format.h (T_CGRAPH_NODE): New.
3067
4be5c72c
JM
30682018-10-19 Jason Merrill <jason@redhat.com>
3069
3070 * c-cppbuiltin.c (c_cpp_builtins): Add
3071 __cpp_nontype_template_parameter_class.
3072
f3f6029d
NS
30732018-10-31 Nathan Sidwell <nathan@acm.org>
3074
ab5324fb
NS
3075 * c-opts.c (c_finish_options): Force command line macro
3076 location. Refactor to avoid repeating main debug hook.
3077 (push_command_line_include): Clarify comment.
3078
f3f6029d
NS
3079 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3080
91e3ec29
MS
30812018-10-30 Martin Sebor <msebor@redhat.com>
3082
3083 PR middle-end/87041
3084 * c-format.c (check_format_types): Avoid diagnosing null pointer
3085 arguments to printf-family of functions.
3086
b5ff4f5c
MP
30872018-10-30 Marek Polacek <polacek@redhat.com>
3088
3089 Implement P0892R2, explicit(bool).
3090 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3091
7e2de6df
DM
30922018-10-29 David Malcolm <dmalcolm@redhat.com>
3093
3094 * name-hint.h (name_hint::take_deferred): New member function.
3095
b2bf438c
DM
30962018-10-29 David Malcolm <dmalcolm@redhat.com>
3097
3098 PR c++/56856
3099 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3100 argument.
3101 (check_function_restrict): Rename param "argarray" to
3102 "unfolded_argarray", and make a copy named "argarray", calling
3103 fold_for_warn on each argument.
3104 (check_function_arguments): Add note about responsibility for
3105 folding the arguments.
3106
9f936c86
JM
31072018-10-17 Joseph Myers <joseph@codesourcery.com>
3108
3109 * c-common.c (flag_isoc2x): New variable.
3110 * c-common.h (clk_c): Update comment to reference C2X.
3111 (flag_isoc99, flag_isoc11): Update comments to reference future
3112 standard versions in general.
3113 (flag_isoc2x): Declare.
3114 * c-opts.c (set_std_c2x): New function.
3115 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3116 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3117 flag_isoc2x to 0.
3118 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3119
7a8a92c4
JM
31202018-10-17 Joseph Myers <joseph@codesourcery.com>
3121
3122 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3123 (std=iso9899:2018): Document C17 as published in 2018.
3124
4dc003ff
CL
31252018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3126
3127 PR c++/87364
3128 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3129
79371671
WW
31302018-10-11 Will Wray <wjwray@gmail.com>
3131
3132 PR c++/87364
3133 * c-pretty-print.h (pp_c_type_cast): Prototype.
3134 (pp_c_integer_constant): Likewise.
3135 * c-pretty-print.c (pp_c_type_cast): No longer static.
3136 (pp_c_integer_constant): Likewise.
3137 (pp_c_enumeration_constant): Fix loop termination when finding
3138 name of constant. No longer returns a value. Call
3139 pp_c_integer_constant.
3140 (c_pretty_printer::constant): Update for changes to
3141 pp_c_enumeration_constant.
3142
46c62690
JJ
31432018-10-11 Jakub Jelinek <jakub@redhat.com>
3144
3145 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3146 for no_unique_address.
3147
c24300ba
DM
31482018-10-09 David Malcolm <dmalcolm@redhat.com>
3149
3150 * c-common.c (c_option_controlling_cpp_error): Rename to...
3151 (c_option_controlling_cpp_diagnostic): ...this, and convert
3152 "reason" from int to enum.
3153 (c_cpp_error): Rename to...
3154 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3155 * c-common.h (c_cpp_error): Rename to...
3156 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3157 * c-opts.c (c_common_init_options): Update for renaming.
3158
8656dafa
RS
31592018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3160
3161 PR c/87286
3162 * c-common.c (vector_types_compatible_elements_p): Use
3163 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3164
8cff0652
VK
31652018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3166
3167 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3168 to generate constructor destructor priority warning.
3169 * c.opt (-Wprio-ctor-dtor): New option.
3170
bedf03a2
JM
31712018-10-01 Jason Merrill <jason@redhat.com>
3172
3173 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3174
6cc430c1
EB
31752018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3176
3177 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3178 (dump_ada_node): Add const keyword.
3179
87677ac7
ML
31802018-09-25 Martin Liska <mliska@suse.cz>
3181
3182 * c-common.c (c_common_truthvalue_conversion):
3183 Remove Pascal from documentation.
3184
518196cb
EB
31852018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3186
3187 * c-ada-spec.c: Include diagnostic.h.
3188 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3189
a599af84
MP
31902018-09-19 Marek Polacek <polacek@redhat.com>
3191
3192 * c.opt (Wclass-conversion): New.
3193
9c4a4b3c
DM
31942018-09-17 David Malcolm <dmalcolm@redhat.com>
3195
3196 * c-format.c (range_label_for_format_type_mismatch::get_text):
3197 Update for new param.
3198
c896ecfe
DM
31992018-09-17 David Malcolm <dmalcolm@redhat.com>
3200
3201 * c-format.c (format_warning_at_char): Update for introduction of
3202 format_string_diagnostic_t.
3203 (format_type_warning): Likewise.
3204
80c6d1f4
MJ
32052018-09-17 Martin Jambor <mjambor@suse.cz>
3206
3207 PR c/63886
3208 * c.opt (Wabsolute-value): New.
3209
6d900107
BE
32102018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3211
3212 * c-common.c (complete_flexible_array_elts): New helper function.
3213 * c-common.h (complete_flexible_array_elts): Declare.
3214
b5764229
BE
32152018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3216
3217 * c-common.c (braced_list_to_string): Remove eval parameter.
3218 Add some more checks. Always create zero-terminated STRING_CST.
3219 * c-common.h (braced_list_to_string): Adjust prototype.
3220
85204e23
DM
32212018-08-27 David Malcolm <dmalcolm@redhat.com>
3222
3223 PR 87091
3224 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3225 to a tri-state.
3226 (maybe_suggest_missing_token_insertion): Likewise.
3227 (maybe_add_include_fixit): Add param "override_location". If set,
3228 and source-printing is enabled, then override the rich_location's
3229 primary location with that of the insertion point for the fix-it
3230 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3231 * c-common.h (extern void maybe_add_include_fixit): Add bool
3232 param.
3233 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3234 for conversion of show_caret_p to a tri-state.
3235 * c-warn.c (warn_for_restrict): Likewise.
3236 * known-headers.cc
3237 (suggest_missing_header::~suggest_missing_header): Update call to
3238 maybe_add_include_fixit to suggest overriding the location, as it
3239 is for a note.
3240
3d78e008
ML
32412018-08-27 Martin Liska <mliska@suse.cz>
3242
3243 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3244 fndecl_built_in_p and remove check for FUNCTION_DECL if
3245 possible.
3d78e008
ML
3246 (check_builtin_function_arguments): Likewise.
3247 (reject_gcc_builtin): Likewise.
3248 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3249
b5be6d0c
MP
32502018-08-26 Marek Polacek <polacek@redhat.com>
3251
3252 PR c++/87029, Implement -Wredundant-move.
3253 * c.opt (Wredundant-move): New option.
3254
79ca9c35
MP
32552018-08-21 Marek Polacek <polacek@redhat.com>
3256
3257 PR c++/86981, Implement -Wpessimizing-move.
3258 * c.opt (Wpessimizing-move): New option.
3259
097f82ec
DM
32602018-08-20 David Malcolm <dmalcolm@redhat.com>
3261
3262 PR other/84889
3263 * c-attribs.c (common_handle_aligned_attribute): Add
3264 auto_diagnostic_group instance.
3265 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3266 * c-opts.c (c_common_post_options): Likewise.
3267 * c-warn.c (warn_logical_not_parentheses): Likewise.
3268 (warn_duplicated_cond_add_or_warn): Likewise.
3269 (warn_for_multistatement_macros): Likewise.
3270
3fb558b1
NS
32712018-08-20 Nathan Sidwell <nathan@acm.org>
3272
3273 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3274 access.
3275
800c0e98
NS
32762018-08-17 Nathan Sidwell <nathan@acm.org>
3277
3278 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3279 field.
3280 (laxy_hex_fp_value_count): Make unsigned.
3281 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3282 manipulate the macro.
3283 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3284 cpp_define_lazily.
3285
6f795a92
DM
32862018-08-17 David Malcolm <dmalcolm@redhat.com>
3287
3288 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3289 (gcc_dump_printf_length_specs): New.
3290 (gcc_dump_printf_flag_pairs): New.
3291 (gcc_dump_printf_flag_specs): New.
3292 (gcc_dump_printf_char_table): New.
3293 (format_types_orig): Add entry for "gcc_dump_printf".
3294 (init_dynamic_diag_info): Set up length_char_specs and
3295 conversion_specs for gcc_dump_printf_format_type.
3296 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3297
c5d725c0
NS
32982018-08-17 Nathan Sidwell <nathan@acm.org>
3299
10f04917
NS
3300 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3301
c5d725c0
NS
3302 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3303 * c-cppbuiltin.c: Likewise.
3304
c0c12356
ML
33052018-08-17 Martin Liska <mliska@suse.cz>
3306
3307 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3308 Ignore/Deprecated flag. Warning is done automatically for
3309 Deprecated flags.
c0c12356 3310
10fcc142
DM
33112018-08-16 David Malcolm <dmalcolm@redhat.com>
3312
3313 PR c++/70693
3314 * c-common.c (selftest::c_family_tests): Call
3315 selftest::c_indentation_c_tests.
3316 * c-common.h (selftest::c_indentation_c_tests): New decl.
3317 * c-indentation.c: Include "selftest.h".
3318 (next_tab_stop): Add "tab_width" param, rather than accessing
3319 cpp_opts.
3320 (get_visual_column): Likewise. Clarify comment. Bulletproof
3321 against reading past the end of the line.
3322 (get_first_nws_vis_column): Add "tab_width" param.
3323 (detect_intervening_unindent): Likewise.
3324 (should_warn_for_misleading_indentation): Read tab width from
3325 cpp_opts and pass around.
3326 (selftest::test_next_tab_stop): New test.
3327 (selftest::assert_get_visual_column_succeeds): New function.
3328 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3329 (selftest::assert_get_visual_column_fails): New function.
3330 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3331 (selftest::test_get_visual_column): New test.
3332 (selftest::c_indentation_c_tests): New function.
3333
3f6677f4
NS
33342018-08-16 Nathan Sidwell <nathan@acm.org>
3335
3336 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3337 (store_ada_macro): Likewise.
3338 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3339 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3340
96e6ae57
DM
33412018-08-15 David Malcolm <dmalcolm@redhat.com>
3342
3343 * c-format.c: Include "selftest-diagnostic.h" and
3344 "gcc-rich-location.h".
3345 (format_warning_at_char): Pass NULL for new label params of
3346 format_warning_va.
3347 (class indirection_suffix): New class.
3348 (class range_label_for_format_type_mismatch): New class.
3349 (format_type_warning): Move logic for generating "*" suffix to
3350 class indirection_suffix. Create "fmt_label" and "param_label"
3351 to show their types, and pass them to the
3352 format_warning_at_substring calls.
3353 (selftest::test_type_mismatch_range_labels): New test.
3354 (selftest::c_format_c_tests): Call it.
3355
23aa9f7c
MS
33562018-08-13 Martin Sebor <msebor@redhat.com>
3357
3358 PR tree-optimization/71625
3359 * c-common.c (braced_list_to_string): New function.
3360 * c-common.h (braced_list_to_string): Declare it.
3361
f10a9135
NS
33622018-08-08 Nathan Sidwell <nathan@acm.org>
3363
3364 * c-common.c (try_to_locate_new_include_inertion_point): Use
3365 linemap_included_from_linemap.
3366 * c-lex.c (fe_file_change): Use linemap_included_from.
3367 * c-ppoutput.c (pp_file_change): Likewise.
3368
8a45b051
MS
33692018-08-01 Martin Sebor <msebor@redhat.com>
3370
3371 PR tree-optimization/86650
ab20d992 3372 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3373 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3374 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3375 * c-format.h (T89_G): Update to be "gimple *" rather than
3376 "gcall *".
3377 (local_gcall_ptr_node): Rename...
3378 (local_gimple_ptr_node): ...to this.
3379
e540ccc0
DM
33802018-07-31 David Malcolm <dmalcolm@redhat.com>
3381
3382 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3383 table entries for gcc_diag_char_table, and the 'Z' entry from
3384 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3385 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3386 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3387 adding missing "Z" for this table. Remove erroneous "G" and "K"
3388 entries.
3389 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3390 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3391 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3392
425fc685
RE
33932018-07-31 Richard Earnshaw <rearnsha@arm.com>
3394
3395 * c-common.c (speculation_safe_resolve_call): New function.
3396 (speculation_safe_resolve_params): New function.
3397 (speculation_safe_resolve_return): New function.
3398 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3399 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3400 __HAVE_SPECULATION_SAFE_VALUE.
3401
181463c2
DM
34022018-07-20 David Malcolm <dmalcolm@redhat.com>
3403
3404 * c-common.c (c_cpp_error): Remove redundant "line_table"
3405 parameter from call to rich_location::set_range.
3406 (maybe_suggest_missing_token_insertion): Likewise.
3407
0d7f9065
MS
34082018-07-20 Martin Sebor <msebor@redhat.com>
3409
3410 PR middle-end/82063
ab20d992 3411 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3412
00abf86c
MS
34132018-07-20 Martin Sebor <msebor@redhat.com>
3414
3415 PR middle-end/82063
3416 * c-common.h (c_common_handle_option): Change function argument
3417 to HOST_WIDE_INT.
3418 * c-opts.c (c_common_init_options): Same.
3419 (c_common_handle_option): Same. Remove special handling of
3420 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3421 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3422 options to take a HOST_WIDE_INT argument and accept a byte-size
3423 suffix. Initialize.
3424 (-Wvla-larger-than): Same.
3425 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3426 (-Wno-vla-larger-than): Same.
3427
9b452033
JJ
34282018-07-12 Jakub Jelinek <jakub@redhat.com>
3429
3430 * c-attribs.c (c_common_attribute_table): Add
3431 "omp declare target implicit" attribute.
3432
cd0762f3
RB
34332018-07-12 Richard Biener <rguenther@suse.de>
3434
3435 PR c/86453
3436 * c-attribs.c (handle_packed_attribute): Do not build a variant
3437 type with TYPE_PACKED, instead ignore the attribute if we may
3438 not apply to the original type.
3439
0b27c3ed
JJ
34402018-07-10 Jakub Jelinek <jakub@redhat.com>
3441
3442 PR c++/86443
3443 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3444 to contain TREE_LIST for both the original class iterator and the
3445 "last" helper var.
3446
e730a0ef
EB
34472018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3448
3449 * c-ada-spec.c (to_ada_name): Remove index parameter.
3450 (pp_ada_tree_identifier): Likewise.
3451 (dump_ada_macros): Adjust call to to_ada_name.
3452 (struct overloaded_name_hash): Delete.
3453 (struct overloaded_name_hasher): Likewise.
3454 (overloaded_names): Likewise.
3455 (compute_overloading_index): Likewise.
3456 (dump_ada_decl_name): Do not call compute_overloading_index and
3457 adjust calls to pp_ada_tree_identifier.
3458 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3459 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3460 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3461 (dump_ada_enum_type): Remove type and display_convention parameters.
3462 Adjust calls to pp_ada_tree_identifier.
3463 (dump_ada_node): Likewise and for dump_ada_structure.
3464 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3465 and tidy up.
3466 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3467 syntax.
3468 (print_constructor): Adjust call to pp_ada_tree_identifier.
3469 (print_destructor): Likewise.
3470 (dump_ada_declaration): Switch to aspect syntax.
3471 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3472 parameter with nested parameter.
3473 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3474 (dump_ada_specs): Do not delete overloaded_names table.
3475
8de583fc
PB
34762018-07-06 Peter Bergner <bergner@linux.ibm.com>
3477
3478 PR target/86324
e730a0ef 3479 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3480 target hook.
3481
09cff37b
NS
34822018-07-05 Nathan Sidwell <nathan@acm.org>
3483
3484 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3485 NO_IMPLICIT_EXTERN_C.
3486
98086b2b
ML
34872018-06-28 Martin Liska <mliska@suse.cz>
3488
3489 * cppspec.c: Include opt-suggestions.h.
3490
ab20d992
JJ
34912018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3492 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3493 Cesar Philippidis <cesar@codesourcery.com>
3494
3495 * c-pragma.h (enum pragma_omp_clause): Add
3496 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3497 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3498
f41b7612
JJ
34992018-06-20 Jakub Jelinek <jakub@redhat.com>
3500
3501 PR c++/86210
3502 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3503 comment.
3504
4252ccd7
MS
35052018-06-18 Martin Sebor <msebor@redhat.com>
3506
3507 PR middle-end/85602
3508 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3509 nonstring.
3510
e197e64e
KV
35112018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3512
3513 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3514
34a7a230
JM
35152018-06-13 Jason Merrill <jason@redhat.com>
3516
5cef3733
JM
3517 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3518 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3519 handling.
3520
34a7a230
JM
3521 PR c++/86094 - wrong code with defaulted move ctor.
3522 * c-opts.c (c_common_post_options): Bump the current ABI version to
3523 13. Set warn_abi_version and flag_abi_compat_version to the current
3524 version rather than 0. Fix defaulting flag_abi_compat_version from
3525 warn_abi_version.
3526
bb0f14ae
MS
35272018-06-12 Martin Sebor <msebor@redhat.com>
3528
3529 PR c/85931
3530 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3531 sizeof source and destination yields the same value.
3532
3713f2e2
ML
35332018-06-12 Martin Liska <mliska@suse.cz>
3534
3535 * c.opt: Make MPX-related options as Deprecated.
3536
4af78ef8
DM
35372018-06-08 David Malcolm <dmalcolm@redhat.com>
3538
3539 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3540 rather than 0.
3541
31db0fe0
ML
35422018-06-08 Martin Liska <mliska@suse.cz>
3543
3544 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3545 for MPX (macros, related functions, fields in cgraph_node, ...).
3546 (handle_bnd_legacy): Likewise.
3547 (handle_bnd_instrument): Likewise.
3548 * c.opt: Likewise.
3549
fe16acf2
JJ
35502018-06-06 Jakub Jelinek <jakub@redhat.com>
3551
3552 PR c++/86068
3553 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3554 __cpp_transactional_memory to 201500 instead of 210500.
3555
4dbdb49b
JM
35562018-06-06 Jason Merrill <jason@redhat.com>
3557
3558 PR c++/85710 - ICE with -Wmemset-elt-size.
3559 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3560
f8ad043f
JM
35612018-06-01 Jason Merrill <jason@redhat.com>
3562
3563 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3564 201703.
3565
abc24d93
EB
35662018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3567
3568 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3569 declaration for a typedef independently of whether the declaration of
3570 the subtype is generated.
3571
d258f4aa
MS
35722018-05-31 Martin Sebor <msebor@redhat.com>
3573
3574 PR c/82063
3575 * c.opt (-Wno-alloc-size-larger-than): New option.
3576
b67b9225
DP
35772018-04-22 David Pagan <dave.pagan@oracle.com>
3578
3579 PR c/55976
3580 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3581 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3582 differentiate between default (no option), -Wreturn-type, and
3583 -Wno-return-type.
3584
04eb9c55
JM
35852018-05-29 Jason Merrill <jason@redhat.com>
3586
3587 * c.opt (Winit-list-lifetime): New flag.
3588
b0c31bc6
BE
35892018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3590
3591 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3592 splay_tree_delete_pointers.
3593
44284983
JJ
35942018-05-26 Jakub Jelinek <jakub@redhat.com>
3595
3596 PR bootstrap/85921
3597 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3598 noinline variable to workaround broken kernel headers.
3599
b46b715d
JM
36002018-05-18 Jason Merrill <jason@redhat.com>
3601
3602 * c.opt (Wdeprecated-copy): New flag.
3603
40659769
ML
36042018-05-17 Martin Liska <mliska@suse.cz>
3605
3606 * c-warn.c (overflow_warning): Do not use
3607 space in between 'G_' and '('.
3608
403962ea
JM
36092018-05-09 Jason Merrill <jason@redhat.com>
3610
3611 * c-common.c (valid_array_size_p): Add complain parameter.
3612 * c-common.h: ...which defaults to true.
3613
1c9ee609
JJ
36142018-05-11 Jakub Jelinek <jakub@redhat.com>
3615
3616 PR c/85696
3617 * c-omp.c (c_omp_predetermined_sharing): Return
3618 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3619
19916065
ML
36202018-05-11 Martin Liska <mliska@suse.cz>
3621
92a285c1 3622 PR sanitizer/85556
19916065
ML
3623 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3624 TREE_LIST values.
3625
79e7b1fe
JJ
36262018-05-10 Jakub Jelinek <jakub@redhat.com>
3627
3628 PR c++/85662
3629 * c-common.h (fold_offsetof_1): Removed.
3630 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3631 CTX argument defaulted to ERROR_MARK.
3632 * c-common.c (fold_offsetof_1): Renamed to ...
3633 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3634 argument, convert the pointer constant to TYPE and use size_binop
3635 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3636 a pointer type. Adjust recursive calls.
3637
86c12f76
EB
36382018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3639
3640 PR c++/85400
3641 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3642
ee336e84
NS
36432018-05-07 Nathan Sidwell <nathan@acm.org>
3644
3645 * c.opt (ffor-scope): Remove functionality, issue warning.
3646
6c072e21
NS
36472018-05-03 Nathan Sidwell <nathan@acm.org>
3648
3649 * c.opt (ffriend-injection): Remove functionality, issue warning.
3650
2cc7d3a7
DM
36512018-05-01 David Malcolm <dmalcolm@redhat.com>
3652
3653 PR c/84258
3654 * c-format.c (struct format_check_results): Add field
3655 "number_non_char".
3656 (check_format_info): Initialize it, and warn if encountered.
3657 (check_format_arg): Distinguish between wide char and
3658 everything else when detecting arrays of non-char.
3659
7761dfbe
DM
36602018-04-30 David Malcolm <dmalcolm@redhat.com>
3661
3662 * c-format.c (get_corrected_substring): Update for
3663 location_get_source_line returning a char_span. Use a char_span
3664 when handling the prefix of the correction.
3665 * c-indentation.c (get_visual_column): Update for
3666 location_get_source_line returning a char_span.
3667 (get_first_nws_vis_column): Likewise.
3668
62e98ef1
DM
36692018-03-29 David Malcolm <dmalcolm@redhat.com>
3670
3671 PR c++/84269
3672 * known-headers.cc (get_stdlib_header_for_name): Add various names
3673 from <assert.h>, <string.h>, and <memory.h>; add more names from
3674 <stdio.h>.
3675
a7dea617
JJ
36762018-03-27 Jakub Jelinek <jakub@redhat.com>
3677
3678 PR c++/85061
3679 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3680 get_base_address of the second operand is a VAR_P, rather than the
3681 operand itself, and use gcc_checking_assert instead of gcc_assert.
3682
889a3a30
MP
36832018-03-23 Marek Polacek <polacek@redhat.com>
3684
3685 PR c++/85045
3686 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3687 <case RDIV_EXPR>: Tweak condition.
3688
452154b9
EB
36892018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3690
3691 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3692
63ecb626
JJ
36932018-03-16 Jakub Jelinek <jakub@redhat.com>
3694
ce811fc4
JJ
3695 PR c/84909
3696 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3697 diagnostics.
3698
63ecb626
JJ
3699 PR c/84910
3700 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3701 diagnostics.
3702
a1295eec
RB
37032018-03-16 Richard Biener <rguenther@suse.de>
3704
3705 PR c/84873
3706 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3707 unshare the possibly folded expression.
3708
919674fb
RB
37092018-03-15 Richard Biener <rguenther@suse.de>
3710
3711 PR c/84873
3712 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3713
f99309b2
MS
37142018-03-13 Martin Sebor <msebor@redhat.com>
3715
3716 PR tree-optimization/84725
3717 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3718 with all three narrow character types, including their qualified forms.
3719
e9b9fa4c
MS
37202018-03-12 Martin Sebor <msebor@redhat.com>
3721
3722 PR tree-optimization/83456
ab20d992 3723 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3724 Restore checking of bounded built-in functions.
3725 (check_function_arguments): Also return the result
3726 of warn_for_restrict.
ab20d992
JJ
3727 * c-common.c (check_function_restrict): Return bool.
3728 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3729
0805d020
MP
37302018-03-02 Marek Polacek <polacek@redhat.com>
3731
3732 PR c++/84171
3733 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3734 is erroneous.
3735
ed2a2f08
TS
37362018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3737
3738 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3739 function".
3740
90abdde0
MP
37412018-03-01 Marek Polacek <polacek@redhat.com>
3742
3743 PR c++/84639
3744 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3745 alignment in computation.
3746
c6db43fa
EB
37472018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3748
3749 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3750 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3751
9e25c7ed
EB
37522018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3753
3754 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3755 (is_char_array): Take a type instead of a declaration.
3756 (dump_ada_array_type): Likewise.
3757 (is_simple_enum): Minor tweak.
3758 (dump_ada_enum_type): New function extracted from...
3759 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3760 <INTEGER_TYPE>: Remove unreachable code.
3761 <RECORD_TYPE>: Likewise. Minor tweaks.
3762 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3763 <ENUMERAL_TYPE>: New case.
3764 <RECORD_TYPE>: Factor out common code.
3765 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3766 Minor tweaks. Deal with enumeral types.
3767 (dump_ada_structure): Minor tweaks.
3768
09de3550
EB
37692018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3770
3771 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3772 address for incomplete structures.
3773 (dump_forward_type): Do not bail out for incomplete structures.
3774 (dump_ada_declaration): Do not special-case incomplete structures
3775 for subtypes. Dump them as null records for types.
3776
095d8d4b
EB
37772018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3778
3779 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3780 (is_char_array): Fix formatting.
3781 (dump_template_types): Likewise.
3782 (dump_generic_ada_node): Rename into...
3783 (dump_ada_node): ...this.
3784 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3785 incomplete structures and not for empty structures. Do not use it
3786 when forward declarations are needed.
3787 (dump_forward_type): New function.
3788 (dump_nested_types): Remove FORWARD parameter. Do not consider
3789 TREE_VISITED and do not generate a forward declaration. Only dump
3790 original nested types for nested declaration.
3791 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3792 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3793 <RECORD_TYPE>: Do not consider TREE_VISITED.
3794 (dump_ada_declaration): Use booleans and fix formatting throughout.
3795 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3796 Call dump_forward_type instead of dump_nested_types for a typedef.
3797 Remove superfluous check and adjust call to dump_nested_types.
3798 <POINTER_TYPE>: Call dump_forward_type and fall through.
3799 (dump_ada_struct_decl): Rename into...
3800 (dump_ada_structure): ...this. Do not special-case empty structures.
3801
d4cfd486
MS
38022018-02-27 Martin Sebor <msebor@redhat.com>
3803
3804 PR c++/83871
3805 * c.opt (-Wmissing-attributes): New option.
3806
b22dbd03
ML
38072018-02-21 Martin Liska <mliska@suse.cz>
3808
3809 * c.opt (Wcatch-value=): Add IntegerRange.
3810
883dfe2a
JM
38112018-02-15 Jason Merrill <jason@redhat.com>
3812
3813 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3814
0444aa9c
NS
38152018-02-09 Nathan Sidwell <nathan@acm.org>
3816
3817 PR c/84293
3818 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3819 arg.
3820 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3821 arg. Adjust.
3822
cea71f0a
MS
38232018-02-09 Martin Sebor <msebor@redhat.com>
3824
3825 PR lto/84212
3826 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3827 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3828 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3829 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3830 (-Wuninitialized): Same.
3831
8c8b7be5
EB
38322018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3833
3834 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3835 keyword for components.
3836
7c30b12a
PC
38372018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3838
3839 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3840
eece7fe5
JK
38412018-02-02 Julia Koval <julia.koval@intel.com>
3842
3843 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3844
7d07a93a
MP
38452018-01-29 Marek Polacek <polacek@redhat.com>
3846
3847 PR c/83966
3848 * c-format.c (check_function_format): Check current_function_decl.
3849
53723269
JJ
38502018-01-27 Jakub Jelinek <jakub@redhat.com>
3851
3852 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3853 argument.
3854 (LAZY_HEX_FP_VALUES_CNT): Define.
3855 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3856 values rather than just 12.
3857 (builtin_define_with_hex_fp_value): Likewise.
3858
7365279f
BK
38592018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3860
92a285c1
ML
3861 PR other/70268
3862 * c.opt (-fmacro-prefix-map): New option.
3863 * c-opts.c (c_common_handle_option): Handle it.
3864 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3865 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3866
bb9869d5
DM
38672018-01-17 David Malcolm <dmalcolm@redhat.com>
3868
3869 PR c++/83814
3870 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3871
68dc87c3
EB
38722018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3873
3874 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3875 Skip 'f' and 'F' characters if it is true.
3876 (store_ada_macro): Minor tweak.
3877 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3878 <CPP_WSTRING>: Likewise.
3879 <CPP_STRING>: Output '&' in the buffer if not the first string.
3880 <CPP_NUMBER>: Adjust calls to dump_number.
3881
9a004410
DM
38822018-01-10 David Malcolm <dmalcolm@redhat.com>
3883
3884 PR c++/43486
3885 * c-common.c: Include "selftest.h".
3886 (get_atomic_generic_size): Perform the test for integral type
3887 before the range test for any integer constant, fixing indentation
3888 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3889 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3890 (selftest::test_fold_for_warn): New function.
3891 (selftest::c_common_c_tests): New function.
3892 (selftest::c_family_tests): Call it, and
3893 selftest::c_pretty_print_c_tests.
3894 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3895 * c-format.c (check_format_arg): Convert VAR_P check to a
3896 fold_for_warn.
3897 * c-pretty-print.c: Include "selftest.h".
3898 (pp_c_cast_expression): Don't print casts for location wrappers.
3899 (selftest::assert_c_pretty_printer_output): New function.
3900 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3901 (selftest::test_location_wrappers): New function.
3902 (selftest::c_pretty_print_c_tests): New function.
3903 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3904
5c0caeb3
RS
39052018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3906 Alan Hayward <alan.hayward@arm.com>
3907 David Sherwood <david.sherwood@arm.com>
3908
3909 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3910
73a699ae
RS
39112018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3912 Alan Hayward <alan.hayward@arm.com>
3913 David Sherwood <david.sherwood@arm.com>
3914
3915 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3916 as polynomial.
3917
928686b1
RS
39182018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3919 Alan Hayward <alan.hayward@arm.com>
3920 David Sherwood <david.sherwood@arm.com>
3921
3922 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3923 (convert_vector_to_array_for_subscript): Handle polynomial
3924 TYPE_VECTOR_SUBPARTS.
3925 (c_common_type_for_mode): Check valid_vector_subparts_p.
3926 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3927 VECTOR_CST_NELTS.
3928
85ec4feb
JJ
39292018-01-03 Jakub Jelinek <jakub@redhat.com>
3930
3931 Update copyright years.
3932
170a8bd6 39332017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3934 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3935
3936 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3937 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3938
ab20d992 39392017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3940
3941 PR debug/83527
3942 PR debug/83419
3943 * c-semantics.c (only_debug_stmts_after_p): New.
3944 (pop_stmt_list): Clear side effects in debug-only stmt list.
3945 Check for single nondebug stmt followed by debug stmts only.
3946
c12d20d4
AO
39472017-12-21 Alexandre Oliva <aoliva@redhat.com>
3948
3949 PR debug/83419
3950 * c-semantics.c (pop_stmt_list): Propagate side effects from
3951 single nondebug stmt to container list.
3952
01512446
JJ
39532017-12-19 Jakub Jelinek <jakub@redhat.com>
3954
3955 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3956 conditions with typical order conditions.
3957
82cfbd01
MP
39582017-12-18 Marek Polacek <polacek@redhat.com>
3959
3960 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3961 not in effect.
3962
99da11ec
MS
39632017-12-17 Martin Sebor <msebor@redhat.com>
3964
3965 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3966 an error for attribute warn_if_not_aligned.
3967
cc8bea0a
MS
39682017-12-16 Martin Sebor <msebor@redhat.com>
3969
3970 PR tree-optimization/78918
3971 * c-common.c (check_function_restrict): Avoid checking built-ins.
3972 * c.opt (-Wrestrict): Include in -Wall.
3973
4849deb1
JJ
39742017-12-15 Jakub Jelinek <jakub@redhat.com>
3975
3976 * c-attribs.c (c_common_attribute_table,
3977 c_common_format_attribute_table): Swap affects_type_identity
3978 and handler fields, adjust comments.
3979
c65e18d3
BE
39802017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3981
3982 * c.opt (Wcast-function-type): New warning option.
3983 * c-lex.c (get_fileinfo): Avoid warning.
3984 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3985
2004617a
QZ
39862017-12-14 Qing Zhao <qing.zhao@oracle.com>
3987
7365279f 3988 PR middle_end/79538
2004617a
QZ
3989 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3990 Adjust the size of buf1 and buf2, add a new buf to avoid
3991 format-overflow warning.
3992
ab20d992 39932017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3994
3995 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3996 subsequent statement list.
3997
5d9ae53d
MS
39982017-12-07 Martin Sebor <msebor@redhat.com>
3999
4000 PR c/81544
4001 PR c/81566
4002 * c-attribs.c (attr_aligned_exclusions): New array.
4003 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4004 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4005 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4006 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4007 (attr_warn_unused_result_exclusions): Same.
4008 (handle_hot_attribute, handle_cold_attribute): Simplify.
4009 (handle_const_attribute): Warn on function returning void.
4010 (handle_pure_attribute): Same.
4011 (handle_aligned_attribute): Diagnose conflicting attribute
4012 specifications.
4013 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4014
c79144f8
DM
40152017-12-06 David Malcolm <dmalcolm@redhat.com>
4016
4017 PR c/83236
4018 * c-common.c (selftest::c_family_tests): Call
4019 selftest::c_spellcheck_cc_tests.
4020 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4021 * c-spellcheck.cc: Include "selftest.h".
4022 (name_reserved_for_implementation_p): New function.
4023 (should_suggest_as_macro_p): New function.
4024 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4025 should_suggest_as_macro_p and call it.
4026 (selftest::test_name_reserved_for_implementation_p): New function.
4027 (selftest::c_spellcheck_cc_tests): New function.
4028 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4029
613bc14f
DM
40302017-12-06 David Malcolm <dmalcolm@redhat.com>
4031
4032 * c-spellcheck.cc: New file, taken from macro-handling code in
4033 spellcheck-tree.c.
4034 * c-spellcheck.h: New file, taken from macro-handling code in
4035 spellcheck-tree.h.
4036
e76c7157
JJ
40372017-12-01 Jakub Jelinek <jakub@redhat.com>
4038
4039 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4040 attribute.
4041 (handle_simd_attribute): Don't check for "cilk simd function"
4042 attribute. Reindent, formatting changes.
4043
b0da4034
JK
40442017-11-30 Julia Koval <julia.koval@intel.com>
4045
4046 * c-common.h (inv_list): Remove.
4047
058f0b9e
JJ
40482017-11-28 Jakub Jelinek <jakub@redhat.com>
4049
4050 PR sanitizer/81275
4051 * c-common.c (c_switch_covers_all_cases_p_1,
4052 c_switch_covers_all_cases_p): New functions.
4053 * c-common.h (c_switch_covers_all_cases_p): Declare.
4054
5e9d6aa4 40552017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4056 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4057
4058 * array-notation-common.c: Delete.
4059 * c-cilkplus.c: Ditto.
4060 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4061 * c-common.def (ARRAY_NOTATION_REF): Remove.
4062 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4063 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4064 c_validate_cilk_plus_loop, cilkplus_an_parts,
4065 cilk_ignorable_spawn_rhs_op,
4066 cilk_recognize_spawn): Remove.
4067 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4068 * c-omp.c: Remove CILK_SIMD check.
4069 * c-pragma.c: Ditto.
4070 * c-pragma.h: Remove CILK related pragmas.
4071 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4072 ARRAY_NOTATION_REF condition.
4073 (c_pretty_printer::expression): Ditto.
4074 * c.opt (fcilkplus): Remove.
4075 * cilk.c: Delete.
4076
1af4ebf5
MG
40772017-11-21 Marc Glisse <marc.glisse@inria.fr>
4078
4079 * c-pretty-print.c (pp_c_additive_expression,
4080 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4081
d44ed508
JJ
40822017-11-21 Jakub Jelinek <jakub@redhat.com>
4083
7d2f0f9b
JJ
4084 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4085
d44ed508
JJ
4086 PR c++/83059
4087 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4088 instead of tree_to_uhwi, formatting fix.
4089
26edace6
DM
40902017-11-20 David Malcolm <dmalcolm@redhat.com>
4091
4092 PR c/81404
4093 * known-headers.cc: New file, based on material from c/c-decl.c.
4094 (suggest_missing_header): Copied as-is.
4095 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4096 heavily edited to add C++ support. Add some knowledge about
4097 <limits.h>, <stdint.h>, and <wchar.h>.
4098 * known-headers.h: Likewise.
4099
6c7a259b
DM
41002017-11-20 David Malcolm <dmalcolm@redhat.com>
4101
4102 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4103 (lookup_name_fuzzy): Likewise. Convert return type from
4104 const char * to name_hint. Add location_t param.
4105 * name-hint.h: New header.
4106
f9c59f7e
JJ
41072017-11-19 Jakub Jelinek <jakub@redhat.com>
4108
4109 PR c/66618
4110 PR c/69960
4111 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4112
1e39313a
JM
41132017-11-16 Joseph Myers <joseph@codesourcery.com>
4114
4115 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4116 expected publication date of C17.
4117 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4118
3ca0dc60
JM
41192017-11-15 Joseph Myers <joseph@codesourcery.com>
4120
4121 PR c/81156
4122 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4123 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4124
025d57f0
MS
41252017-11-10 Martin Sebor <msebor@redhat.com>
4126
4127 PR c/81117
4128 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4129 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4130 * c.opt (-Wstringop-truncation): New option.
4131
1b6fa695
ML
41322017-11-06 Martin Liska <mliska@suse.cz>
4133
4134 PR middle-end/82404
4135 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4136 FE.
4137 * c.opt: Set default value of warn_return_type.
4138
64a5912c
DM
41392017-10-31 David Malcolm <dmalcolm@redhat.com>
4140
4141 * c-common.c (binary_op_error): Update for renaming of
4142 error_at_rich_loc.
4143 (c_parse_error): Likewise.
4144 * c-warn.c (warn_logical_not_parentheses): Likewise for
4145 renaming of inform_at_rich_loc.
4146 (warn_for_restrict): Likewise for renaming of
4147 warning_at_rich_loc_n.
4148
c76dc9c3
JM
41492017-10-30 Joseph Myers <joseph@codesourcery.com>
4150
4151 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4152 * c-opts.c (set_std_c17): New function.
4153 (c_common_init_options): Use gnu17 as default C version.
4154 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4155
ee5fd23a
MM
41562017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4157
4158 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4159 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4160 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4161 __FP_FAST_FMA<N>X.
4162
d1047465
MP
41632017-10-23 Marek Polacek <polacek@redhat.com>
4164
4165 PR c/82681
4166 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4167
9e878cf1
EB
41682017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4169
4170 * c-common.c (check_builtin_function_arguments): Also check arguments
4171 of __builtin_alloca_with_align_and_max.
4172
89b6abbb
DM
41732017-10-17 David Malcolm <dmalcolm@redhat.com>
4174
4175 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4176 rather than NULL to format_warning_va.
4177 (check_format_types): Likewise when calling format_type_warning.
4178 Remove code to extract source_ranges and source_range * in favor
4179 of just a location_t.
4180 (format_type_warning): Convert source_range * param to a
4181 location_t.
4182
39382c09
JJ
41832017-10-13 Jakub Jelinek <jakub@redhat.com>
4184
4185 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4186 [LR]SHIFT_EXPR.
4187
62e1c678
DM
41882017-10-12 David Malcolm <dmalcolm@redhat.com>
4189
4190 * c-common.c (enum missing_token_insertion_kind): New enum.
4191 (get_missing_token_insertion_kind): New function.
4192 (maybe_suggest_missing_token_insertion): New function.
4193 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4194
b90c9338
NS
41952017-10-11 Nathan Sidwell <nathan@acm.org>
4196
4197 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4198 (c_common_handle_option): Update incpath_kind names.
4199
3a266bcd
ML
42002017-10-11 Martin Liska <mliska@suse.cz>
4201
4202 PR sanitizer/82490
4203 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4204 Wattributes warning.
4205
8e6cdc90
RS
42062017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4207
4208 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4209 operating on trees as wide_ints.
4210 * c-common.c (pointer_int_sum): Likewise.
4211 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4212 * c-warn.c (match_case_to_enum_1): Likewise.
4213 (c_do_switch_warnings): Likewise.
4214 (maybe_warn_shift_overflow): Likewise.
4215
802b38c9
JJ
42162017-10-10 Jakub Jelinek <jakub@redhat.com>
4217
4218 PR c/82437
4219 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4220 instead of wide_int::from.
4221
4e34b338
JJ
42222017-10-06 Jakub Jelinek <jakub@redhat.com>
4223
4224 PR c/82437
4225 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4226 using to_widest use wide_int with the larger of the two precisions.
4227
4bc4b2b4
BE
42282017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4229
4230 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4231 functions.
4232
a1488398
RS
42332017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4234
4235 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4236 when combining the original unconverted comparison operands.
4237
01c9fb68
JJ
42382017-09-29 Jakub Jelinek <jakub@redhat.com>
4239
4240 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4241 attribute.
4242
6e3e8419
EB
42432017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4244
4245 * c-ada-spec.c (to_ada_name): Add index parameter.
4246 (pp_ada_tree_identifier): Likewise.
4247 (dump_ada_macros): Adjust call to to_ada_name.
4248 (struct overloaded_name_hash): New type.
4249 (struct overloaded_name_hasher): Likewise.
4250 (overloaded_names): New hash table.
4251 (compute_overloading_index): New function.
4252 (dump_ada_decl_name): Call it and pass the result to
4253 pp_ada_tree_identifier.
4254 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4255 (dump_ada_function_declaration): Likewise.
4256 (dump_generic_ada_node): Likewise.
4257 (print_constructor): Likewise.
4258 (print_destructor): Likewise.
4259 (dump_ada_specs): Delete overloaded_names table.
4260
79310774
EB
42612017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4262
4263 * c-ada-spec.c (max_ada_macros): Move around.
4264 (store_ada_macro_index): Likewise.
4265 (source_file): Rename into...
4266 (macro_source_file): ...this.
4267 (count_ada_macro): Move around.
4268 (store_ada_macro): Likewise.
4269 (compare_macro): Likewise.
4270 (print_ada_macros): Merge in...
4271 (dump_ada_macros): ...this.
4272 (source_file_base): Rename into...
4273 (current_source_file): ...this.
4274 (print_comment): Move around.
4275 (dump_ada_nodes): Call dump_ada_declaration directly.
4276 (struct with): Change type of limited field to bool.
4277 (append_withs): Change type of limited_access parameter to bool.
4278 (pp_ada_tree_identifie): Likewise.
4279 (dump_ada_decl_nam): Likewise.
4280 (dump_generic_ada_node): Likewise. Do not print the return type.
4281 (to_ada_name): Change type of space_found parameter to bool.
4282 (dump_ada_function_declaration): Return void and change type of
4283 parameters to bool. Also print the return type for a function.
4284 (print_ada_methods): Rename into...
4285 (dump_ada_methods): ...this.
4286 (print_ada_declaration): Rename into ...
4287 (dump_ada_declaration): ...this. Do not print the return type.
4288 (print_ada_struct_decl): Rename into...
4289 (dump_ada_struct_decl): ...this.
4290
7d386d45
JJ
42912017-09-29 Jakub Jelinek <jakub@redhat.com>
4292
4293 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4294 rather than DECL_INITIAL.
4295 (common_handle_aligned_attribute): Likewise.
4296
ab20d992 42972017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4298
4299 * c.opt (gen-decls): Add RejectNegative.
4300
026a79f7
AS
43012017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4302 Jakub Jelinek <jakub@redhat.com>
4303
4304 Add support for -std=c++2a.
4305 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4306 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4307 * c-opts.c (set_std_cxx2a): New.
4308 (c_common_handle_option): Set options when -std=c++2a is enabled.
4309 (c_common_post_options): Adjust comments.
4310 (set_std_cxx14, set_std_cxx17): Likewise.
4311
4a8ca690
EB
43122017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4313
4314 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4315 message for non-uniform endianness and issue a warning in C++.
4316
7b936140
JJ
43172017-09-15 Jakub Jelinek <jakub@redhat.com>
4318
4319 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4320 (Wc++17-compat): Change from undocumented alias to option.
4321 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4322 change C++1z to C++17 in description.
4323 (std=c++1z, std=gnu++1z): Change from option to undocumented
4324 deprecated alias.
4325 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4326 Adjust description.
4327 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4328 * c-opts.c (set_std_cxx1z): Rename to ...
4329 (set_std_cxx17): ... this.
4330 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4331 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4332 caller.
7b936140
JJ
4333 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4334 comments.
4335
12263f13
L
43362017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4337
4338 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4339 function alignment if warn_if_not_aligned_p is true.
4340
6836632e
NS
43412017-09-12 Nathan Sidwell <nathan@acm.org>
4342
4343 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4344 resort_sorted_fields): Move to c/c-decl.c.
4345 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4346 (struct sorted_fields_type): Move to c/c-lang.h.
4347
019bf9ad
JW
43482017-09-09 Jonathan Wakely <jwakely@redhat.com>
4349
4350 PR c++/81852
4351 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4352
bc7fe952
MP
43532017-09-04 Marek Polacek <polacek@redhat.com>
4354
4355 PR c/81783
4356 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4357 (warn_tautological_cmp): Call it.
4358
ab20d992 43592017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4360
4361 * c-opts.c (c_common_finish): Write dependency information even if
4362 there are errors.
4363
d2e05fcb
JJ
43642017-09-01 Jakub Jelinek <jakub@redhat.com>
4365
4366 PR c/81887
4367 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4368 (omp_pragmas_simd): ... here.
4369 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4370 create new clauses list containing just simd clause.
4371
18e2a8b8
RS
43722017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4373 Alan Hayward <alan.hayward@arm.com>
4374 David Sherwood <david.sherwood@arm.com>
4375
4376 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4377 into scalar_mode_supported_p call.
4378 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4379
16d22000
RS
43802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4381 Alan Hayward <alan.hayward@arm.com>
4382 David Sherwood <david.sherwood@arm.com>
4383
4384 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4385 for the mode iterator.
4386
b397965c
RS
43872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4388 Alan Hayward <alan.hayward@arm.com>
4389 David Sherwood <david.sherwood@arm.com>
4390
4391 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4392 * c-common.c (c_build_vec_perm_expr): Likewise.
4393
357b7604
RS
43942017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4395 Alan Hayward <alan.hayward@arm.com>
4396 David Sherwood <david.sherwood@arm.com>
4397
4398 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4399
e05c94ba
RS
44002017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4401 Alan Hayward <alan.hayward@arm.com>
4402 David Sherwood <david.sherwood@arm.com>
4403
4404 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4405 before calling targetm.addr_space.valid_pointer_mode.
4406
5c20c4af
RS
44072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4408 Alan Hayward <alan.hayward@arm.com>
4409 David Sherwood <david.sherwood@arm.com>
4410
4411 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4412
c94843d2 44132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4414 Alan Hayward <alan.hayward@arm.com>
4415 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4416
4417 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4418 iterators.
4419 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4420
4e10a5a7
RS
44212017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4422 Alan Hayward <alan.hayward@arm.com>
4423 David Sherwood <david.sherwood@arm.com>
4424
4425 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4426 case statements.
4427
130fcab0
ML
44282017-08-29 Martin Liska <mliska@suse.cz>
4429
4430 PR other/39851
4431 * c-common.c (parse_optimize_options): Add argument to function
4432 call.
4433 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4434
14e18d71
DM
44352017-08-24 David Malcolm <dmalcolm@redhat.com>
4436
4437 * c-lex.c (interpret_float): Use token location
4438 when building an EXCESS_PRECISION_EXPR.
4439
2f687306
DM
44402017-08-21 David Malcolm <dmalcolm@redhat.com>
4441
4442 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4443 it to check_function_format.
4444 * c-common.h (check_function_arguments): Add vec<location_t> *
4445 param.
4446 (check_function_format): Likewise.
4447 * c-format.c (struct format_check_context): Add field "arglocs".
4448 (check_function_format): Add param "arglocs"; pass it to
4449 check_format_info.
ab20d992 4450 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4451 new field of format_ctx.
4452 (check_format_arg): Pass format_ctx->arglocs to new param of
4453 check_format_info_main.
4454 (class argument_parser): New field "arglocs".
4455 (argument_parser::argument_parser): Add "arglocs_" param and use
4456 it to initialize new field.
4457 (argument_parser::check_argument_type): Pass new arglocs field to
4458 check_format_types.
4459 (check_format_info_main): Add param "arglocs", and use it when
4460 constructing arg_parser.
4461 (check_format_types): Add param "arglocs"; use it if non-NULL when
4462 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4463
00aa1fa2
L
44642017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4465
4466 PR c/53037
4467 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4468 (c_common_attribute_table): Add warn_if_not_aligned.
4469 (handle_aligned_attribute): Renamed to ...
4470 (common_handle_aligned_attribute): Remove argument, name, and add
4471 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4472 (handle_aligned_attribute): New.
4473 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4474
27be025d
MS
44752017-08-14 Martin Sebor <msebor@redhat.com>
4476
4477 PR c/81117
4478 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4479 (handle_nonstring_attribute): New function.
4480
da67acb9
MS
44812017-08-14 Martin Sebor <msebor@redhat.com>
4482
4483 PR c/81117
4484 * c-format.h (T89_G): New macro.
4485 * c-format.c (local_gcall_ptr_node): New variable.
4486 (init_dynamic_diag_info): Initialize it.
4487
a8b522b4
ML
44882017-08-11 Martin Liska <mliska@suse.cz>
4489
4490 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4491 TARGET_SUPPORTS_ALIASES.
4492
32129a17
DM
44932017-08-10 David Malcolm <dmalcolm@redhat.com>
4494
4495 * c-common.c (c_parse_error): Add rich_location * param, using it
4496 rather implicitly using input_location.
4497 * c-common.h (c_parse_error): Add rich_location * param.
4498
30af3a2b
MP
44992017-08-09 Marek Polacek <polacek@redhat.com>
4500
4501 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4502 (c_common_truthvalue_conversion): Likewise.
4503 * c-omp.c (c_finish_omp_atomic): Likewise.
4504 * c-common.h (build_binary_op): Update declaration.
4505
314e6352
ML
45062017-08-08 Martin Liska <mliska@suse.cz>
4507
4508 * c-ada-spec.c: Include header files.
4509 * c-ubsan.c: Likewise.
4510 * c-warn.c: Likewise.
4511
56b5041c
JJ
45122017-08-07 Jakub Jelinek <jakub@redhat.com>
4513
4514 PR c/69389
4515 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4516
db440138
EB
45172017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4518
4519 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4520 (print_ada_methods): Likewise.
4521 (print_ada_declaration): Likewise.
4522
577eec56
ML
45232017-08-07 Martin Liska <mliska@suse.cz>
4524
4525 * array-notation-common.c: Add new includes.
4526 * c-format.c( handle_format_attribute): Canonicalize a format
4527 function name.
4528 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4529 attribute.
4530 * c-pretty-print.c: Add new include.
4531
b854df3c
EB
45322017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4533
4534 * c-ada-spec.c (has_static_fields): Look only into variables.
4535 (print_constructor): Add TYPE parameter and use it for the name.
4536 (print_destructor): Likewise.
4537 (print_ada_declaration): Adjust to new constructor/destructor names.
4538 Adjust calls to print_constructor and print_destructor.
4539 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4540 Look only into variables in the final loop.
4541
9f2cb25e
EB
45422017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4543
4544 * c-ada-spec.c (has_static_fields): Look only into fields.
4545 (dump_generic_ada_node): Small tweak.
4546 (dump_nested_types): Look only into fields.
4547 (print_ada_declaration): Look only into methods. Small tweak.
4548 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4549
f4bcd9eb
EB
45502017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4551
4552 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4553 (dump_ada_function_declaration): Likewise.
4554 (dump_generic_ada_node): Likewise.
4555 (print_ada_declaration): Add support for const-qualified variables.
4556
f34ebeb2
ML
45572017-07-31 Martin Liska <mliska@suse.cz>
4558
4559 PR sanitize/81530
4560 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4561 Guard condition with flag_sanitize_p also with current_function_decl
4562 non-null equality.
4563 (ubsan_maybe_instrument_reference_or_call): Likewise.
4564
218e5d04
UB
45652017-07-30 Uros Bizjak <ubizjak@gmail.com>
4566
4567 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4568
942047f2
EB
45692017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4570
4571 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4572 for enumeral types.
4573 (print_ada_declaration): Add missing guard for record types.
4574
a40ff0ae
JJ
45752017-07-27 Jakub Jelinek <jakub@redhat.com>
4576
4577 PR c/45784
4578 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4579 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4580 new COMPOUND_EXPRs around the rhs of the comparison.
4581
06bd22f6
MP
45822017-07-27 Marek Polacek <polacek@redhat.com>
4583
4584 PR c/81417
4585 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4586 the types.
4587
036ea399
JJ
45882017-07-27 Jakub Jelinek <jakub@redhat.com>
4589
4590 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4591 (handle_noipa_attribute): New function.
4592
417ca011
TD
45932017-07-07 Torsten Duwe <duwe@suse.de>
4594
4595 * c-attribs.c (c_common_attribute_table): Add entry for
4596 "patchable_function_entry".
4597
5aaa8fb4
NS
45982017-07-20 Nathan Sidwell <nathan@acm.org>
4599
4600 Remove TYPE_METHODS.
4601 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4602 dump_ada_template, print_ada_methods,
4603 print_ada_declaration): Member fns are on TYPE_FIELDS.
4604
ff22eb12
NS
46052017-07-18 Nathan Sidwell <nathan@acm.org>
4606
4607 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4608
eea77d1f
DM
46092017-07-14 David Malcolm <dmalcolm@redhat.com>
4610
4611 * c-common.c (try_to_locate_new_include_insertion_point): New
4612 function.
4613 (per_file_includes_t): New typedef.
4614 (added_includes_t): New typedef.
4615 (added_includes): New variable.
4616 (maybe_add_include_fixit): New function.
4617 * c-common.h (maybe_add_include_fixit): New decl.
4618
281ac396
MS
46192017-07-10 Martin Sebor <msebor@redhat.com>
4620
4621 PR other/81345
4622 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4623
b6f43128
DM
46242017-07-06 David Malcolm <dmalcolm@redhat.com>
4625
4626 * c-common.c (selftest::c_family_tests): New.
4627 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4628 (selftest::c_family_tests): New decl.
4629
efbf55b0
MP
46302017-07-04 Marek Polacek <polacek@redhat.com>
4631
4632 PR c/81231
4633 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4634 types.
4635
6c86bd88
MP
46362017-07-04 Marek Polacek <polacek@redhat.com>
4637
4638 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4639
17a7218b
ML
46402017-06-28 Martin Liska <mliska@suse.cz>
4641
4642 PR ipa/81128
4643 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4644 to a function declaration.
4645
63010089
ML
46462017-06-28 Martin Liska <mliska@suse.cz>
4647
4648 PR driver/79659
4649 * c.opt: Add IntegerRange to various options.
4650
3e2becc4
MP
46512017-06-26 Marek Polacek <polacek@redhat.com>
4652
4653 PR c/80116
4654 * c-common.h (warn_for_multistatement_macros): Declare.
4655 * c-warn.c: Include "c-family/c-indentation.h".
4656 (warn_for_multistatement_macros): New function.
4657 * c.opt (Wmultistatement-macros): New option.
4658 * c-indentation.c (guard_tinfo_to_string): No longer static.
4659 Change the parameter type to "enum rid". Handle RID_SWITCH.
4660 * c-indentation.h (guard_tinfo_to_string): Declare.
4661
2db9b7cd
MG
46622017-06-23 Marc Glisse <marc.glisse@inria.fr>
4663
4664 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4665
c3684b7b
MS
46662017-06-15 Martin Sebor <msebor@redhat.com>
4667
4668 PR c++/80560
4669 * c.opt (-Wclass-memaccess): New option.
4670
e72c4afd
BK
46712017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4672
4673 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4674
8a516588
MP
46752017-06-13 Marek Polacek <polacek@redhat.com>
4676
4677 PR objc/80949
4678 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4679 branches is null.
4680
45b2222a
ML
46812017-06-13 Martin Liska <mliska@suse.cz>
4682
4683 PR sanitize/78204
4684 * c-attribs.c (add_no_sanitize_value): New function.
4685 (handle_no_sanitize_attribute): Likewise.
4686 (handle_no_sanitize_address_attribute): Use the function.
4687 (handle_no_sanitize_thread_attribute): New function.
4688 (handle_no_address_safety_analysis_attribute): Use
4689 add_no_sanitize_value.
4690 (handle_no_sanitize_undefined_attribute): Likewise.
4691 * c-common.h: Declare new functions.
4692 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4693 (ubsan_instrument_shift): Likewise.
4694 (ubsan_instrument_bounds): Likewise.
4695 (ubsan_maybe_instrument_array_ref): Likewise.
4696 (ubsan_maybe_instrument_reference_or_call): Likewise.
4697
a01f151f
JM
46982017-06-11 Jason Merrill <jason@redhat.com>
4699
4700 * c-ada-spec.c, c-pragma.c: Use id_equal.
4701
3de4ac6d
MP
47022017-06-04 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/80919
4705 * c-format.c (matching_type_p): Return false if any of the types
4706 requires structural equality.
4707
2474f48f
MS
47082017-06-02 Martin Sebor <msebor@redhat.com>
4709
4710 PR c/80892
4711 * c-warn.c (conversion_warning): Use -Wconversion for integer
4712 conversion and -Wfloat-conversion for floating one.
4713
40ffd95f
BE
47142017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4715
4716 * c.opt (Wsizeof-pointer-div): New warning option.
4717
3fa4634c
VR
47182017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4719
4720 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4721 (Wcatch-value=1): Enable by -Wall.
4722
f012c8ef
DM
47232017-05-30 David Malcolm <dmalcolm@redhat.com>
4724
4725 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4726 format_chars.
4727 * c.opt (fdiagnostics-show-template-tree): New option.
4728 (felide-type): New option.
4729
63dbcd13
VR
47302017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4731
4732 * c.opt (Wcatch-value=): New C++ warning flag.
4733
be136b5c
NS
47342017-05-24 Nathan Sidwell <nathan@acm.org>
4735
4736 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4737 const casts to avoid warning.
4738
3cd211af
MS
47392017-05-24 Martin Sebor <msebor@redhat.com>
4740
4741 PR c/80731
4742 * c-common.h (unsafe_conversion_p): Add a function argument.
4743 * c-common.c (unsafe_conversion_p): Same.
4744 Add type names and values to diagnostics.
4745 (scalar_to_vector): Adjust.
4746 * c-warn.c (constant_expression_error): Add a function argument.
4747 Add type names and values to diagnostics.
4748 (conversion_warning): Add a function argument.
4749 Add type names and values to diagnostics.
4750 (warnings_for_convert_and_check): Same.
4751
1ff7be5a
JM
47522017-05-19 Jason Merrill <jason@redhat.com>
4753
4754 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4755 enumerators.
4756
ff502317
BE
47572017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4758
4759 * c-format.c (locus): Move out of function scope,
4760 add GTY attribute.
4761
2a8a8d7b
NS
47622017-05-19 Nathan Sidwell <nathan@acm.org>
4763
4764 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4765 (c_common_parse_file): Remove class dump handling.
4766 (get_dump_info): Likewise.
4767
39aac208
RB
47682017-05-19 Richard Biener <rguenther@suse.de>
4769
4770 PR c++/80593
4771 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4772 to alias-set zero memory.
4773
6ecd2339
BE
47742017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4775
4776 * c-format.c (local_tree_type_node): Add GTY attribute.
4777
6574d78e
MP
47782017-05-18 Marek Polacek <polacek@redhat.com>
4779
4780 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4781 (c_common_fixed_point_type_for_size): Likewise.
4782 (c_common_type_for_mode): Likewise.
4783 (shorten_compare): Likewise.
4784 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4785 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4786
e3455240
MP
47872017-05-18 Marek Polacek <polacek@redhat.com>
4788
4789 * c-common.c (self_promoting_args_p): Change the return type to bool.
4790 Use false/true instead of 0/1.
4791 * c-common.h (self_promoting_args_p): Update.
4792
3fa8871b
MP
47932017-05-17 Marek Polacek <polacek@redhat.com>
4794
4795 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4796 * c-warn.c: Likewise.
4797
b42cc3ca
VV
47982017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4799
4800 Implement new C++ intrinsics __is_assignable and __is_constructible.
4801 * c-common.c (__is_assignable, __is_constructible): New.
4802 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4803
1a817418
ML
48042017-05-17 Martin Liska <mliska@suse.cz>
4805
4806 * c-common.h: Introduce dump_flags_t type and
4807 use it instead of int type.
4808 * c-gimplify.c (c_genericize): Likewise.
4809 * c-opts.c: Likewise.
4810
b2fa0a8b
MP
48112017-05-17 Marek Polacek <polacek@redhat.com>
4812
4813 * c-common.c (c_save_expr): Remove.
4814 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4815 * c-common.h (c_save_expr): Remove declaration.
4816
31c2d57d
VR
48172017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4818
4819 PR c/35441
4820 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4821 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4822 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4823 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4824 RDIV_EXPR.
4825 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4826
684f84de
MP
48272017-05-09 Marek Polacek <polacek@redhat.com>
4828
4829 PR c/80525
4830 * c-warn.c (unwrap_c_maybe_const): New.
4831 (warn_logical_operator): Call it.
4832
641da50a
NS
48332017-05-09 Nathan Sidwell <nathan@acm.org>
4834
4835 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4836 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4837
631238ac
MS
48382017-05-08 Martin Sebor <msebor@redhat.com>
4839
4840 PR translation/80280
4841 * c-format.h (struct format_flag_spec): Add new member.
4842 (T89_T): New macro.
4843 * c-format.c (local_tree_type_node): New global.
4844 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4845 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4846 (strfmon_flag_specs): Likewise.
4847 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4848 with distinct quoting properties.
4849 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4850 (flag_chars_t::validate): Add argument and handle bad quoting.
4851 (check_format_info_main): Handle quoting problems.
4852 (init_dynamic_diag_info): Simplify.
4853
49f0c04c
JM
48542017-05-08 Jason Merrill <jason@redhat.com>
4855
4856 * c-opts.c (c_common_post_options): Update defaults for
4857 flag_abi_version and flag_abi_compat_version.
4858
56d35585
DM
48592017-05-05 David Malcolm <dmalcolm@redhat.com>
4860
4861 * c-common.c (c_cpp_error): Replace report_diagnostic
4862 with diagnostic_report_diagnostic.
4863
0f2c4a8f
MS
48642017-05-04 Martin Sebor <msebor@redhat.com>
4865
4866 PR translation/80280
4867 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4868 (handle_weakref_attribute): Same.
4869
6fe63fb4
NS
48702017-05-03 Nathan Sidwell <nathan@acm.org>
4871
4872 Canonicalize canonical type hashing
4873 * c-common.c (complete_array_type): Use type_hash_canon.
4874
815d9cc6
XR
48752017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4876
92a285c1 4877 PR c++/80038
815d9cc6
XR
4878 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4879 prototype.
4880 (cilk_install_body_pedigree_operations): Likewise.
4881 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4882 detatched.
4883 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4884 (cilk_install_body_pedigree_operations): Likewise.
4885 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4886 unwrapping.
4887
f8a36447
JJ
48882017-04-27 Jakub Jelinek <jakub@redhat.com>
4889
4890 PR c++/80534
4891 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4892 flag on non-aggregate element types.
4893
7c145456
BE
48942017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4895
4896 * c-common.c (c_type_hasher, type_hash_table): Remove.
4897 (c_common_get_alias_set): Remove unreachable code.
4898 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4899
c3cbcd45
VR
49002017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4901
4902 * c.opt (Wextra-semi): New C++ warning flag.
4903
8a59d466
JJ
49042017-04-20 Jakub Jelinek <jakub@redhat.com>
4905
4906 PR middle-end/80423
4907 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4908
8487c9a5
JJ
49092017-04-18 Jakub Jelinek <jakub@redhat.com>
4910
4911 PR middle-end/79788
4912 PR middle-end/80375
4913 * c-common.c (c_common_type_for_mode): Don't handle
4914 widest_*_literal_type_node here.
4915 c_common_signed_or_unsigned_type): Likewise.
4916 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4917 to *intTI_type_node or *intDI_type_node depending on whether
4918 TImode is supported by the target or not.
4919
3ee0fb02
ML
49202017-04-10 Martin Liska <mliska@suse.cz>
4921
4922 PR sanitizer/80350
4923 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4924 doing an UBSAN check.
4925
5764ee3c
JW
49262017-04-03 Jonathan Wakely <jwakely@redhat.com>
4927
4928 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4929
6f3af356
JJ
49302017-03-31 Jakub Jelinek <jakub@redhat.com>
4931
4932 PR c++/79572
4933 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4934 tree *.
4935 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4936 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4937 REFERENCE_TYPE.
4938
f6a7a9d5
DM
49392017-03-31 David Malcolm <dmalcolm@redhat.com>
4940
4941 PR documentation/78732
4942 * c.opt (Wendif-labels): Fix description to refer to
4943 #else rather than #elif.
4944
af88f557
JJ
49452017-03-31 Jakub Jelinek <jakub@redhat.com>
4946
4947 PR libstdc++/80251
4948 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4949 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4950
a9e4a1a5
JJ
49512017-03-27 Jakub Jelinek <jakub@redhat.com>
4952
4953 PR middle-end/80162
4954 * c-common.c (c_common_mark_addressable_vec): Don't set
4955 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4956
3f01b620
MS
49572017-03-21 Martin Sebor <msebor@redhat.com>
4958
4959 PR c++/79548
4960 * c-common.c (set_underlying_type): Mark type used only when
4961 original del is declared unused.
4962
2f6f187a
DM
49632017-03-10 David Malcolm <dmalcolm@redhat.com>
4964
4965 PR translation/79848
4966 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4967 "%qs".
4968
a02fa805
DM
49692017-03-10 David Malcolm <dmalcolm@redhat.com>
4970
4971 PR c/79921
4972 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4973 from inform's message, so that xgettext can locate it.
4974
822a132c
MP
49752017-03-09 Marek Polacek <polacek@redhat.com>
4976
4977 PR c++/79962
4978 PR c++/79984
4979 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4980 conversion to the attribute list.
4981
bba81f1c
ML
49822017-03-09 Martin Liska <mliska@suse.cz>
4983
4984 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4985
108154ff
JM
49862017-03-03 Jason Merrill <jason@redhat.com>
4987
4988 * c.opt (Wnoexcept-type): New.
4989
eb0e7c34
RB
49902017-03-02 Richard Biener <rguenther@suse.de>
4991
4992 PR c/79756
4993 * c-common.c (c_common_mark_addressable_vec): Look through
4994 C_MAYBE_CONST_EXPR.
4995
9453ba0a
ML
49962017-02-28 Martin Liska <mliska@suse.cz>
4997
4998 * c.opt: Replace space with tabular for options of <number>
4999 type.
5000
6a825afe
ML
50012017-02-28 Martin Liska <mliska@suse.cz>
5002
5003 * c.opt: Fix --help=option -Q for options which are of
5004 an enum type.
5005
4227c9ad
JJ
50062017-02-24 Jakub Jelinek <jakub@redhat.com>
5007
5008 PR c++/79588
5009 * c-common.c (check_function_restrict): New function.
5010 (check_function_arguments): Add FNDECL argument. Call
5011 check_function_restrict if -Wrestrict.
5012 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5013 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5014 * c-common.h (check_function_arguments): Add FNDECL argument.
5015 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5016
59909673
EB
50172017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5018
5019 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5020 treatment of parameters with pointer-to-tagged type and tidy up.
5021 (print_ada_methods): Remove the special treatment of C++ static member
5022 functions.
5023
54dcd526
ML
50242017-02-22 Martin Liska <mliska@suse.cz>
5025
5026 * c.opt: Replace inequality signs with square brackets
5027 for -Wnornalized.
5028
00bc9de3
JJ
50292017-02-21 Jakub Jelinek <jakub@redhat.com>
5030
5031 PR c++/79641
5032 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5033 preserve quals.
5034
97fcf744
JM
50352017-02-17 Joseph Myers <joseph@codesourcery.com>
5036
5037 * c-cppbuiltin.c (builtin_define_float_constants): Define
5038 __DECIMAL_DIG__ to the value for long double.
5039
c7545f1c
MP
50402017-02-15 Marek Polacek <polacek@redhat.com>
5041
5042 PR c/79515
5043 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5044 conversion has occured.
5045
c2e84327
DM
50462017-01-24 David Malcolm <dmalcolm@redhat.com>
5047
5048 * c-common.c (c_common_reswords): Add "__RTL".
5049 * c-common.h (enum rid): Add RID_RTL.
5050
2ebd93e1
MP
50512017-01-20 Marek Polacek <polacek@redhat.com>
5052
5053 PR c/64279
5054 * c-common.h (do_warn_duplicated_branches_r): Declare.
5055 * c-gimplify.c (c_genericize): Walk the function tree calling
5056 do_warn_duplicated_branches_r.
5057 * c-warn.c (expr_from_macro_expansion_r): New.
5058 (do_warn_duplicated_branches): New.
5059 (do_warn_duplicated_branches_r): New.
5060 * c.opt (Wduplicated-branches): New option.
5061
0d80ab91
DM
50622017-01-17 David Malcolm <dmalcolm@redhat.com>
5063
5064 PR c++/71497
5065 * c-indentation.c (warn_for_misleading_indentation): Use the past
5066 subjunctive in the note.
5067
7f991c36
AH
50682017-01-17 Aldy Hernandez <aldyh@redhat.com>
5069
5070 PR c/79116
5071 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5072 start type to integer_type.
5073
1c70261c
JJ
50742017-01-16 Jakub Jelinek <jakub@redhat.com>
5075
5076 PR driver/49726
5077 * c.opt (gen-decls): Add Driver flag.
5078
1ddca3f3
PC
50792017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5080
5081 Revert:
5082 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5083
5084 PR c++/71737
5085 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5086
7d2f3f1d
PC
50872017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5088
5089 PR c++/71737
5090 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5091
bce6f760
MS
50922017-01-12 Martin Sebor <msebor@redhat.com>
5093
5094 (-Wformat-overflow): ...to this.
5095
bf5fbf46
MS
50962017-01-11 Martin Sebor <msebor@redhat.com>
5097
5098 PR c/78768
5099 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5100 Also enable for LTO.
5101
e363df3f
JM
51022017-01-10 Jason Merrill <jason@redhat.com>
5103
5104 Implement P0195R2, C++17 variadic using.
5105 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5106
bd2c6270
JJ
51072017-01-09 Jakub Jelinek <jakub@redhat.com>
5108
5109 PR translation/79019
5110 PR translation/79020
5111 * c.opt (Wnormalized=): Fix typo in description.
5112
efcc8d38
MS
51132017-01-08 Martin Sebor <msebor@redhat.com>
5114
5115 PR middle-end/77708
5116 * c.opt (-Wformat-truncation): New option.
5117
ab20d992 51182017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
5119
5120 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5121 value to unsigned short to fit in 4 hex digits without
5122 warnings.
5123
4e89adf9
EB
51242017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5125
5126 * c.opt (fsso-struct): Add 'native' value.
5127
cd445b54
ML
51282017-01-05 Martin Liska <mliska@suse.cz>
5129
5130 PR pch/78970
5131 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5132 header.
5133
a9342885
MP
51342017-01-04 Marek Polacek <polacek@redhat.com>
5135
5136 PR c++/64767
5137 * c.opt (Wpointer-compare): New option.
5138
fc73e60c
JJ
51392017-01-04 Jakub Jelinek <jakub@redhat.com>
5140
5141 PR driver/78957
5142 * c.opt (fsso-struct=): Add RejectNegative.
5143
cbe34bb5
JJ
51442017-01-01 Jakub Jelinek <jakub@redhat.com>
5145
5146 Update copyright years.
5147
d4a6c0ea
ML
51482016-12-29 Martin Liska <mliska@suse.cz>
5149
5150 PR c/78933
5151 * c.opt (strong-eval-order): Add RejectNegative keyword.
5152
67a5ad7c
JM
51532016-12-22 Jason Merrill <jason@redhat.com>
5154
5155 Implement P0522R0, matching of template template arguments.
5156 * c-cppbuiltin.c (c_cpp_builtins): Define
5157 __cpp_template_template_args.
5158
0dba7960
JJ
51592016-12-21 Jakub Jelinek <jakub@redhat.com>
5160
5161 PR bootstrap/78817
5162 * c-common.c (struct nonnull_arg_ctx): New type.
5163 (check_function_nonnull): Return bool instead of void. Use
5164 nonnull_arg_ctx as context rather than just location_t.
5165 (check_nonnull_arg): Adjust for the new context type, set
5166 warned_p to true if a warning has been diagnosed.
5167 (check_function_arguments): Return bool instead of void.
5168 * c-common.h (check_function_arguments): Adjust prototype.
5169
31bfc9b9
JM
51702016-12-21 Jason Merrill <jason@redhat.com>
5171
5172 * c.opt (-fnew-ttp-matching): New flag.
5173 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5174
629b3d75
MJ
51752016-12-14 Martin Jambor <mjambor@suse.cz>
5176
5177 * c-omp.c: Include omp-general.h instead of omp-low.h.
5178 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5179 name.
5180
474da67e
MS
51812016-12-14 Martin Sebor <msebor@redhat.com>
5182
5183 PR c/17308
5184 * c-common.c (check_nonnull_arg): Disable when optimization
5185 is enabled.
5186
fe366b87
MP
51872016-12-12 Marek Polacek <polacek@redhat.com>
5188
5189 PR c++/78647
5190 * c-common.c (attribute_fallthrough_p): Return false for
5191 error_mark_node.
5192
8bd9f164
MS
51932016-12-08 Martin Sebor <msebor@redhat.com>
5194
5195 PR c/78284
5196 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5197
060162e0
MS
51982016-12-08 Martin Sebor <msebor@redhat.com>
5199
5200 PR c/78165
92a285c1
ML
5201 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5202 suffix.
060162e0 5203
ee92e7ba
MS
52042016-12-07 Martin Sebor <msebor@redhat.com>
5205
5206 PR c/53562
5207 PR middle-end/77784
5208 PR middle-end/78149
5209 PR middle-end/78138
5210 * c.opt (-Wstringop-overflow): New option.
5211
84b0769e
MO
52122016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5213
5214 * c-attribs.c (asan odr indicator): New attribute.
5215 (handle_asan_odr_indicator_attribute): New function.
5216
7fa6a965
PK
52172016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5218
5219 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5220 ptrdiff_type_node;
5221
56d8ffc1
JG
52222016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5223
5224 * c-common.c (excess_precision_mode_join): New.
5225 (c_ts18661_flt_eval_method): New.
5226 (c_c11_flt_eval_method): Likewise.
5227 (c_flt_eval_method): Likewise.
5228 * c-common.h (excess_precision_mode_join): New.
5229 (c_flt_eval_method): Likewise.
5230 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5231 (cpp_iec_559_value): Call it.
5232 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5233 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5234 __FLT_EVAL_METHOD_TS_18661_3__.
5235
04f0fcf7
JG
52362016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5237
5238 * c-opts.c (c_common_post_options): Add logic to handle the default
5239 case for -fpermitted-flt-eval-methods.
5240
fb2675cb
PB
52412016-11-23 Paolo Bonzini <bonzini@gnu.org>
5242
5243 * c.opt (Wexpansion-to-defined): New.
5244
ec1c5694
JJ
52452016-11-23 Jakub Jelinek <jakub@redhat.com>
5246
5247 PR target/78451
5248 * c-pragma.c (handle_pragma_target): Don't replace
5249 current_target_pragma, but chainon the new args to the current one.
5250
730c9e75
NS
52512016-11-22 Nathan Sidwell <nathan@acm.org>
5252
5253 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5254 indentation and formatting.
730c9e75 5255
89990732
MS
52562016-11-21 Martin Sebor <msebor@redhat.com>
5257
5258 * c.opt (-fprintf-return-value): Enable by default.
5259
48330c93
BE
52602016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5261
5262 PR c++/71973
5263 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5264 * c-common.c (c_common_nodes_and_builtins): Initialize
5265 const_tm_ptr_type_node.
5266
0d939c95
MP
52672016-11-16 Marek Polacek <polacek@redhat.com>
5268
5269 PR c/78285
5270 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5271
8e745a17
JJ
52722016-11-14 Jakub Jelinek <jakub@redhat.com>
5273
5274 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5275
1ee62b92 52762016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5277 Richard Biener <rguenther@suse.de>
5278
5279 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5280 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5281 * c.opt (fgimple): New option.
1ee62b92 5282
22b15758
UB
52832016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5284
5285 PR c/35503
5286 * c-common.h (warn_for_restrict): Declare.
5287 * c-warn.c: Include gcc-rich-location.h.
5288 (warn_for_restrict): New function.
5289 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5290 (gcc_cdiag_char_table): Likewise.
5291 (gcc_cxxdiag_char_table): Likewise.
5292 * c.opt (Wrestrict): New option.
5293
4be719cd
EB
52942016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5295
5296 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5297 for nested types only if the type is a record or union and dump SLOC.
5298
4a826ca6
JM
52992016-11-09 Jason Merrill <jason@redhat.com>
5300
5301 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5302
2e955d50
JJ
53032016-11-09 Jakub Jelinek <jakub@redhat.com>
5304
5305 * c-ubsan.c (ubsan_instrument_shift): Handle split
5306 -fsanitize=shift-base and -fsanitize=shift-exponent.
5307
51dc6603
JM
53082016-11-07 Jason Merrill <jason@redhat.com>
5309
5310 * c.opt (Wc++1z-compat): New.
5311 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5312
6dc4a604
ML
53132016-11-07 Martin Liska <mliska@suse.cz>
5314
5315 * c-warn.c (warn_for_unused_label): Save all labels used
5316 in goto or in &label.
5317
b302001e
JM
53182016-11-03 Jason Merrill <jason@redhat.com>
5319
5320 * c-cppbuiltin.c (c_cpp_builtins): Correct
5321 __cpp_inheriting_constructors.
5322
31f7f784
JM
53232016-11-01 Jason Merrill <jason@redhat.com>
5324
2bc78e3c
JM
5325 * c-cppbuiltin.c (c_cpp_builtins): Update
5326 __cpp_inheriting_constructors.
5327
31f7f784
JM
5328 * c.opt (-fnew-inheriting-ctors): New.
5329 * c-opts.c: Default to on for ABI 11+.
5330
dcb466ec
JJ
53312016-10-31 Jakub Jelinek <jakub@redhat.com>
5332
5333 PR c++/77948
5334 * c.opt (fext-numeric-literals): Add Var and Init.
5335 * c-opts.c (c_common_handle_option): Don't clear
5336 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5337 (c_common_post_options): Clear it here if not set
5338 explicitly.
5339
52e1b91e
AH
53402016-10-28 Aldy Hernandez <aldyh@redhat.com>
5341
5342 PR debug/77773
5343 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5344 if NULL.
5345
e16f1cc7
JJ
53462016-10-25 Jakub Jelinek <jakub@redhat.com>
5347
5348 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5349 * c-common.c (c_common_reswords): Add __builtin_launder.
5350
f8348061
BE
53512016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5352
5353 * c-common.c (c_common_truthvalue_conversion): Warn for
5354 multiplications in boolean context. Fix the quoting of '<<' and '<'
5355 in the shift warning.
5356
eff89e01
BE
53572016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5358
5359 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5360
24bc7bf4
JM
53612016-10-20 Jason Merrill <jason@redhat.com>
5362
5363 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5364
4c712374
BE
53652016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5366
5367 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5368 integer shift ops in boolean context.
5369
53702016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5371
5372 * c.opt (Walloca): New.
5373 (Walloca-larger-than=): New.
5374 (Wvla-larger-than=): New.
5375
8fa18c06
MP
53762016-10-17 Marek Polacek <polacek@redhat.com>
5377
5378 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5379 Return immediately when finding a match.
5380 (warn_tautological_cmp): Remove a boolean variable that is no longer
5381 needed.
5382
b12b1915
MP
53832016-10-17 Marek Polacek <polacek@redhat.com>
5384
5385 * c-attribs.c: New file.
5386 * c-common.c: Move attributes handling to c-attribs.c.
5387 (get_nonnull_operand): No longer static.
5388 * c-common.h: Move the declarations from c-attribs.c to its own section.
5389
2045acd9
JM
53902016-10-14 Jason Merrill <jason@redhat.com>
5391
5392 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5393 and __cpp_deduction_guides.
5394
14a2c9aa
JM
53952016-10-13 Jason Merrill <jason@redhat.com>
5396
5397 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5398
4d0cdd0c
TP
53992016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5400
5401 * c-cppbuiltin.c: Include memmodel.h.
5402 * c-opts.c: Likewise.
5403 * c-pragma.c: Likewise.
5404 * c-warn.c: Likewise.
5405
70f6d5e1
JJ
54062016-10-12 Jakub Jelinek <jakub@redhat.com>
5407
5408 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5409 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5410 * c-opts.c (sanitize_cpp_opts): Initialize
5411 cpp_opts->cpp_warn_implicit_fallthrough.
5412
78f61294
MP
54132016-10-11 Marek Polacek <polacek@redhat.com>
5414
5415 * c-common.c (warning_candidate_p): Change the return type to bool
5416 and return true/false instead of 1/0.
5417 (vector_mode_valid_p): Likewise.
5418
038b5cc0
MP
54192016-10-11 Marek Polacek <polacek@redhat.com>
5420
5421 * c-common.c (fold_for_warn): No longer static.
5422 (bool_promoted_to_int_p): Likewise.
5423 (c_common_get_narrower): Likewise.
5424 (constant_expression_warning): Move to c-warn.c.
5425 (constant_expression_error): Likewise.
5426 (overflow_warning): Likewise.
5427 (warn_logical_operator): Likewise.
5428 (find_array_ref_with_const_idx_r): Likewise.
5429 (warn_tautological_cmp): Likewise.
5430 (expr_has_boolean_operands_p): Likewise.
5431 (warn_logical_not_parentheses): Likewise.
5432 (warn_if_unused_value): Likewise.
5433 (strict_aliasing_warning): Likewise.
5434 (sizeof_pointer_memaccess_warning): Likewise.
5435 (check_main_parameter_types): Likewise.
5436 (conversion_warning): Likewise.
5437 (warnings_for_convert_and_check): Likewise.
5438 (match_case_to_enum_1): Likewise.
5439 (match_case_to_enum): Likewise.
5440 (c_do_switch_warnings): Likewise.
5441 (warn_for_omitted_condop): Likewise.
5442 (readonly_error): Likewise.
5443 (lvalue_error): Likewise.
5444 (invalid_indirection_error): Likewise.
5445 (warn_array_subscript_with_type_char): Likewise.
5446 (warn_about_parentheses): Likewise.
5447 (warn_for_unused_label): Likewise.
5448 (warn_for_div_by_zero): Likewise.
5449 (warn_for_memset): Likewise.
5450 (warn_for_sign_compare): Likewise.
5451 (do_warn_double_promotion): Likewise.
5452 (do_warn_unused_parameter): Likewise.
5453 (record_locally_defined_typedef): Likewise.
5454 (maybe_record_typedef_use): Likewise.
5455 (maybe_warn_unused_local_typedefs): Likewise.
5456 (maybe_warn_bool_compare): Likewise.
5457 (maybe_warn_shift_overflow): Likewise.
5458 (warn_duplicated_cond_add_or_warn): Likewise.
5459 (diagnose_mismatched_attributes): Likewise.
5460 * c-common.h: Move the declarations from c-warn.c to its own section.
5461 * c-warn.c: New file.
5462
627be19f
JM
54632016-10-08 Jason Merrill <jason@redhat.com>
5464
5465 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5466 into COND_EXPR in C++.
5467
7bad794a
JJ
54682016-10-08 Jakub Jelinek <jakub@redhat.com>
5469
5470 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5471 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5472 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5473
be845b04
JJ
54742016-10-07 Jakub Jelinek <jakub@redhat.com>
5475
5476 Implement LWG2296 helper intrinsic
5477 * c-common.h (enum rid): Add RID_ADDRESSOF.
5478 * c-common.c (c_common_reswords): Add __builtin_addressof.
5479
c09c4992
BE
54802016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5481
5482 PR c++/77700
5483 * c-common.c (c_common_truthvalue_conversion): Warn also for
5484 suspicious enum values in boolean context.
5485
342cfb3e
JJ
54862016-10-06 Jakub Jelinek <jakub@redhat.com>
5487
5488 Implement P0258R2 - helper for C++17
5489 std::has_unique_object_representations trait
5490 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5491 * c-common.c (c_common_reswords): Add
5492 __has_unique_object_representations.
5493
2e69f143
JJ
54942016-10-05 Jakub Jelinek <jakub@redhat.com>
5495
5496 PR sanitizer/66343
5497 * c-ubsan.c (ubsan_instrument_return): Don't call
5498 initialize_sanitizer_builtins here.
5499
700fff34
BE
55002016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5501
5502 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5503 conditional expression in boolean context when only one arm is
5504 non-boolean.
5505
9563bfcd
JJ
55062016-10-05 Jakub Jelinek <jakub@redhat.com>
5507
04a32443
JJ
5508 PR sanitizer/77823
5509 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5510 is not integral.
5511
9563bfcd
JJ
5512 * c-common.c (c_common_reswords): Update comment for C++11.
5513
f1644724
JM
55142016-10-04 Jason Merrill <jason@redhat.com>
5515
5516 * c-common.c (make_tree_vector_from_ctor): New.
5517 * c-common.h: Declare it.
5518
5a79befb
JJ
55192016-10-04 Jakub Jelinek <jakub@redhat.com>
5520
5521 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5522 __LIBGCC_JCR_SECTION_NAME__.
5523
1633d3b9
BE
55242016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5525
5526 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5527 left shift in boolean context.
5528
a2c6e7f2
JJ
55292016-09-29 Jakub Jelinek <jakub@redhat.com>
5530
5531 Implement P0001R1 - C++17 removal of register storage class specifier
5532 * c.opt (Wregister): New warning.
5533 * c-opts.c (c_common_post_options): Enable -Wregister by
5534 default for C++17.
5535
75304c87
JG
55362016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5537
5538 * c-opts.c (c_common_post_options): Remove special case for
5539 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5540 in C++.
5541
bbfac6da
JJ
55422016-09-27 Jakub Jelinek <jakub@redhat.com>
5543
6e39060a
JJ
5544 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5545 -std=c++1z.
5546
bbfac6da
JJ
5547 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5548
e73cf9a2
TP
55492016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5550
5551 * c-common.c: Include memmodel.h.
5552
c6147dc4
MP
55532016-09-26 Marek Polacek <polacek@redhat.com>
5554
5555 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5556
81fea426
MP
55572016-09-26 Marek Polacek <polacek@redhat.com>
5558
5559 PR c/7652
5560 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5561 (handle_fallthrough_attribute): New function.
5562 (attribute_fallthrough_p): New function.
5563 * c-common.h (attribute_fallthrough_p): Declare.
5564
9a2300e9
MP
55652016-09-24 Marek Polacek <polacek@redhat.com>
5566
5567 PR c/77490
5568 * c.opt (Wbool-operation): New.
5569
a09e9e35
BE
55702016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5571
5572 * c-common.c (c_common_truthvalue_conversion): Inhibit
5573 Wint-in-bool-context warning with from_macro_definition_at.
5574 Mention the expression will always evaluate to true.
5575
d43b4ccc
MS
55762016-09-21 Martin Sebor <msebor@redhat.com>
5577
5578 PR bootstrap/77676
5579 * c.opt (fprintf-return-value): Temporarily initialize to zero
5580 to unblock bootstrap failures.
5581
2e1c20b1
JJ
55822016-09-21 Jakub Jelinek <jakub@redhat.com>
5583
5584 PR c++/77651
5585 * c.opt (Waligned-new=): Add RejectNegative.
5586 (faligned-new=): Likewise. Spelling fix - change
5587 aligned_new_threshhold to aligned_new_threshold.
5588 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5589 to aligned_new_threshold.
5590
88d0c3f0
MS
55912016-09-20 Martin Sebor <msebor@redhat.com>
5592
5593 PR middle-end/49905
5594 * c.opt: Add -Wformat-length and -fprintf-return-value.
5595
144a96e4
BE
55962016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5597
5598 PR c++/77434
5599 * c.opt (Wint-in-bool-context): New warning.
5600 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5601 constants in boolean context.
5602
63012d9a
JM
56032016-09-19 Joseph Myers <joseph@codesourcery.com>
5604
5605 * c-common.c (max_align_t_align): Also consider alignment of
5606 float128_type_node.
5607
931388ce
JM
56082016-09-15 Jason Merrill <jason@redhat.com>
5609
5610 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5611 DECL_EXTERNAL.
5612
38711381
JM
56132016-09-14 Jason Merrill <jason@redhat.com>
5614
5615 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5616 limit FIELD_DECL, either.
5617
e51fbec3
MP
56182016-09-14 Marek Polacek <polacek@redhat.com>
5619
5620 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5621 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5622 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5623
254830ba
DM
56242016-09-13 David Malcolm <dmalcolm@redhat.com>
5625
5626 * c-common.c (warn_logical_not_parentheses): Replace
5627 rich_location::add_fixit_insert calls with add_fixit_insert_before
5628 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5629
42763690
JM
56302016-09-13 Jason Merrill <jason@redhat.com>
5631 Tom de Vries <tom@codesourcery.com>
5632
5633 PR c++/77427
5634 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5635
9453eee9
JM
56362016-09-13 Jason Merrill <jason@redhat.com>
5637
5638 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5639 limit types at all.
5640
e96809e3
JM
56412016-09-12 Jason Merrill <jason@redhat.com>
5642
5643 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5644 bit/byte confusion, allow large alignment for types.
5645
54dcdb88
BE
56462016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5647
5648 PR c++/77496
5649 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5650
d1463eb9
DM
56512016-09-12 David Malcolm <dmalcolm@redhat.com>
5652
5653 PR c/72858
5654 * c-format.c (argument_parser::check_argument_type): Add params
5655 "type_start" and "conversion_char". Use the former to generate
5656 offset_to_type_start and pass it and conversion_char to
5657 check_format_types.
5658 (check_format_info_main): Capture the start of the type
5659 information as "type_start", and pass it an format_char
5660 to arg_parser.check_argument_type.
5661 (check_format_types): Provide an example in the leading comment.
5662 Add params "offset_to_type_start" and "conversion_char"; pass
5663 them to format_type_warning calls.
5664 (test_get_modifier_for_format_len): Likewise.
5665 (matching_type_p): New function.
5666 (get_format_for_type): Add param "conversion_char" and move
5667 implementation into...
5668 (get_format_for_type_1): ...new function, called twice.
5669 Use new function matching_type_p rather than checking for
5670 TYPE_CANONICAL equality.
5671 (get_corrected_substring): New function.
5672 (format_type_warning): Provide an example in the leading comment.
5673 Add params "offset_to_type_start" and "conversion_char". Replace
5674 call to get_format_for_type with call to get_corrected_substring
5675 and move rejection of hints for widths/precisions there.
5676 (assert_format_for_type_streq): Add param "conversion_char".
5677 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5678 (test_get_format_for_type_printf): Add conversion chars to the
5679 tests, adding coverage for various combinations of integer
5680 vs double conversions, and for preserving octal and hexadecimal
5681 conversions.
5682 (test_get_format_for_type_scanf): Add conversion chars to the
5683 tests.
5684
5b28efbb
TV
56852016-09-10 Tom de Vries <tom@codesourcery.com>
5686
5687 PR C/71602
5688 * c-common.c (build_va_arg): Handle more strict
5689 targetm.canonical_va_list_type. Replace first argument type error with
5690 assert.
5691
3f0177e7
MS
56922016-09-09 Martin Sebor <msebor@redhat.com>
5693
5694 PR c/77520
5695 PR c/77521
5696 * c-format.c (argument_parser::find_format_char_info): Use %qc
5697 format directive unconditionally.
5698
af63ba4b
JM
56992016-09-09 Jason Merrill <jason@redhat.com>
5700
5701 Implement C++17 new of over-aligned types.
5702 * c.opt: Add -faligned-new and -Waligned-new.
5703 * c-common.c (max_align_t_align): Split out from...
5704 (cxx_fundamental_alignment_p): ...here.
5705 * c-common.h: Declare it.
5706 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5707
c65248cb
JM
57082016-09-09 Joseph Myers <joseph@codesourcery.com>
5709
5710 * c-cppbuiltin.c (builtin_define_type_width): New function.
5711 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5712 macros.
5713
e5106e27
DM
57142016-09-07 David Malcolm <dmalcolm@redhat.com>
5715
5716 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5717 a POINTER_TYPE.
5718 (substring_loc::get_location): Move to substring-locations.c,
5719 keeping implementation as...
5720 (c_get_substring_location): New function, from the above, reworked
5721 to use accessors rather than member lookup.
5722 * c-common.h (class substring_loc): Move to substring-locations.h,
5723 replacing with a forward decl.
5724 (c_get_substring_location): New decl.
5725 * c-format.c: Include "substring-locations.h".
5726 (format_warning_va): Move to substring-locations.c.
5727 (format_warning_at_substring): Likewise.
5728
ab20d992 57292016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5730
5731 PR c/77336
5732 * c-format.c (check_function_format): Avoid issuing warnings for
5733 functions unless they call format functions with non-constant
5734 format strings.
5735
b772a565
RB
57362016-09-06 Richard Biener <rguenther@suse.de>
5737
5738 PR c/77450
5739 * c-common.c (c_common_mark_addressable_vec): Handle
5740 COMPOUND_LITERAL_EXPR.
5741
25ff5dd3
MP
57422016-09-05 Marek Polacek <polacek@redhat.com>
5743
5744 PR c/77423
5745 * c-common.c (bool_promoted_to_int_p): New function.
5746 (expr_has_boolean_operands_p): New function.
5747 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5748 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5749
21234eb5
TV
57502016-09-04 Tom de Vries <tom@codesourcery.com>
5751
5752 revert:
5753 2016-08-29 Tom de Vries <tom@codesourcery.com>
5754
5755 * c-common.c (build_va_arg): Replace first argument type error
5756 with assert.
5757
9dc5773f
JJ
57582016-09-02 Jakub Jelinek <jakub@redhat.com>
5759
5760 PR c/65467
5761 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5762 (c_finish_omp_for): Reject _Atomic qualified iterators.
5763
57642016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5765
5766 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5767 size to guarantee it fits the output of the formatted function
5768 regardless of its arguments.
5769
295844f6
MP
57702016-09-01 Marek Polacek <polacek@redhat.com>
5771
5772 PR c/7652
5773 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5774 FALLTHRU comments.
5775
3d06b6f2
MP
57762016-08-29 Marek Polacek <polacek@redhat.com>
5777
5778 PR c/77292
5779 * c-common.c (warn_logical_not_parentheses): Don't warn for
5780 a comparison or a logical operator.
5781
34cedad5
TV
57822016-08-29 Tom de Vries <tom@codesourcery.com>
5783
5784 * c-common.c (build_va_arg): Fix type comparison assert.
5785
f162d717
TV
57862016-08-29 Tom de Vries <tom@codesourcery.com>
5787
5788 * c-common.c (build_va_arg): Replace first argument type error
5789 with assert.
5790
ba9bbd6f
TV
57912016-08-29 Tom de Vries <tom@codesourcery.com>
5792
5793 PR c/77398
5794 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5795 with error_mark_node as va_list instead of with illegal va_list.
5796
ebef225f
MP
57972016-08-25 Marek Polacek <polacek@redhat.com>
5798 David Malcolm <dmalcolm@redhat.com>
5799
5800 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5801 * c-common.h (warn_logical_not_parentheses): Update declaration.
5802
b00e6e75
MP
58032016-08-22 Marek Polacek <polacek@redhat.com>
5804
5805 PR c++/77321
5806 * c-common.c (warn_for_memset): Check type for null.
5807
6dc198e3
JM
58082016-08-22 Joseph Myers <joseph@codesourcery.com>
5809
14ec014e 5810 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5811 _FloatNx types for suffixes for built-in functions.
5812
c65699ef
JM
58132016-08-19 Joseph Myers <joseph@codesourcery.com>
5814
5815 PR c/32187
5816 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5817 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5818 (RID_FLOAT128X): New enum rid values.
5819 (CASE_RID_FLOATN_NX): New macro.
5820 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5821 keywords.
5822 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5823 corresponding complex types.
5824 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5825 _FloatNx and corresponding complex types.
5826 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5827 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5828 and _FloatNx types for the widest type for determining
5829 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5830 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5831 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5832 and _FloatNx types.
5833 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5834 constants.
5835 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5836 _FloatNx types.
5837
cc015f3a
DM
58382016-08-18 David Malcolm <dmalcolm@redhat.com>
5839
5840 * c-opts.c (c_diagnostic_finalizer): Update for change to
5841 diagnostic_show_locus.
5842
cb18fd07
DM
58432016-08-18 David Malcolm <dmalcolm@redhat.com>
5844
5845 * c-common.c: Include "spellcheck.h".
5846 (cb_get_suggestion): New function.
5847 * c-common.h (cb_get_suggestion): New decl.
5848 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5849 cb_get_suggestion.
5850
a76989dc
MP
58512016-08-18 Marek Polacek <polacek@redhat.com>
5852
5853 PR c/71514
5854 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5855 and pointer-to-VLA.
5856
65e736c0
DM
58572016-08-16 David Malcolm <dmalcolm@redhat.com>
5858
5859 PR c/72857
5860 * c-common.c (substring_loc::get_range): Rename to...
5861 (substring_loc::get_location): ...this, converting param from a
5862 source_range * to a location_t *. Call
5863 get_source_location_for_substring rather than
5864 get_source_range_for_substring, and pass in m_caret_idx.
5865 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5866 (substring_loc::get_range): Replace with...
5867 (substring_loc::get_location): ...this.
5868 (substring_loc::set_caret_index): New method.
5869 (substring_loc): Add field m_caret_idx.
5870 * c-format.c (format_warning_va): Update for above changes.
5871 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5872 clashing with type name.
5873 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5874 (check_argument_type): Likewise.
5875 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5876 Use a copy when emitting warnings, setting the caret index from TYPE.
5877
7e1dde14 58782016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5879 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5880
5881 * c-ada-spec.c (dump_number): New function.
5882 (handle_escape_character): Likewise.
5883 (print_ada_macros): Add handling of constant integers and strings.
5884
191816a3
MP
58852016-08-12 Marek Polacek <polacek@redhat.com>
5886
5887 PR c/7652
5888 * c-common.c (scalar_to_vector): Adjust fall through comment.
5889 * c-opts.c (c_common_handle_option): Likewise.
5890 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5891 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5892 fall through comment.
5893 * cilk.c (extract_free_variables): Add FALLTHRU.
5894
452df4a4
JM
58952016-08-10 Jason Merrill <jason@redhat.com>
5896
5897 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5898
f3365c12
JM
58992016-08-09 Jason Merrill <jason@redhat.com>
5900
5901 * c-common.c (c_common_attribute_table): vector_size affects type
5902 identity.
5903
f0bc3323
MP
59042016-08-09 Marek Polacek <polacek@redhat.com>
5905
5906 PR c/7652
5907 * c-ada-spec.c (dump_generic_ada_node): Add return.
5908
98e5a19a
JM
59092016-08-09 Jason Merrill <jason@redhat.com>
5910
5911 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5912 C++17 constexpr lambdas.
5913
895aa8e1
DM
59142016-08-08 David Malcolm <dmalcolm@redhat.com>
5915
5916 PR c/64955
5917 * c-common.h (selftest::c_format_c_tests): New declaration.
5918 (selftest::run_c_tests): New declaration.
5919 * c-format.c: Include "selftest.h.
5920 (format_warning_va): Add param "corrected_substring" and use
5921 it to add a replacement fix-it hint.
5922 (format_warning_at_substring): Likewise.
5923 (format_warning_at_char): Update for new param of
5924 format_warning_va.
5925 (argument_parser::check_argument_type): Pass "fki" to
5926 check_format_types.
5927 (check_format_types): Add param "fki" and pass it to
5928 format_type_warning.
5929 (deref_n_times): New function.
5930 (get_modifier_for_format_len): New function.
5931 (selftest::test_get_modifier_for_format_len): New function.
5932 (get_format_for_type): New function.
5933 (format_type_warning): Add param "fki" and use it to attempt
5934 to provide hints for argument types when calling
5935 format_warning_at_substring.
5936 (selftest::get_info): New function.
5937 (selftest::assert_format_for_type_streq): New function.
5938 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5939 (selftest::test_get_format_for_type_printf): New function.
5940 (selftest::test_get_format_for_type_scanf): New function.
5941 (selftest::c_format_c_tests): New function.
5942
e52ed3fe
DM
59432016-08-08 David Malcolm <dmalcolm@redhat.com>
5944
5945 PR c/52952
5946 * c-format.c: Include "diagnostic.h".
5947 (location_column_from_byte_offset): Delete.
5948 (location_from_offset): Delete.
5949 (format_warning_va): New function.
5950 (format_warning_at_substring): New function.
5951 (format_warning_at_char): New function.
5952 (check_format_arg): Capture location of format_tree and pass to
5953 check_format_info_main.
5954 (argument_parser): Add fields "start_of_this_format" and
5955 "format_string_cst".
5956 (flag_chars_t::validate): Add param "format_string_cst". Convert
5957 warning_at call using location_from_offset to call to
5958 format_warning_at_char.
5959 (argument_parser::argument_parser): Add param "format_string_cst_"
5960 and use use it to initialize field "format_string_cst".
5961 Initialize new field "start_of_this_format".
5962 (argument_parser::read_format_flags): Convert warning_at call
5963 using location_from_offset to a call to format_warning_at_char.
5964 (argument_parser::read_any_format_left_precision): Likewise.
5965 (argument_parser::read_any_format_precision): Likewise.
5966 (argument_parser::read_any_other_modifier): Likewise.
5967 (argument_parser::find_format_char_info): Likewise, in three places.
5968 (argument_parser::parse_any_scan_set): Likewise, in one place.
5969 (argument_parser::handle_conversions): Likewise, in two places.
5970 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5971 and use it to make a substring_loc. Pass the latter to
5972 check_format_types.
5973 (check_format_info_main): Add params "fmt_param_loc" and
5974 "format_string_cst". Convert warning_at calls using
5975 location_from_offset to calls to format_warning_at_char. Pass the
5976 new params to the arg_parser ctor. Pass "format_string_cst" to
5977 flag_chars.validate. Pass "fmt_param_loc" to
5978 arg_parser.check_argument_type.
5979 (check_format_types): Convert first param from a location_t
5980 to a const substring_loc & and rename to "fmt_loc". Attempt
5981 to extract the range of the relevant parameter and pass it
5982 to format_type_warning.
5983 (format_type_warning): Convert first param from a location_t
5984 to a const substring_loc & and rename to "fmt_loc". Add
5985 params "param_range" and "type". Replace calls to warning_at
5986 with calls to format_warning_at_substring.
5987
1c4d457e
DM
59882016-08-08 David Malcolm <dmalcolm@redhat.com>
5989
5990 * c-format.c (class flag_chars_t): New class.
5991 (struct length_modifier): New struct.
5992 (class argument_parser): New class.
5993 (flag_chars_t::flag_chars_t): New ctor.
5994 (flag_chars_t::has_char_p): New method.
5995 (flag_chars_t::add_char): New method.
5996 (flag_chars_t::validate): New method.
5997 (flag_chars_t::get_alloc_flag): New method.
5998 (flag_chars_t::assignment_suppression_p): New method.
5999 (argument_parser::argument_parser): New ctor.
6000 (argument_parser::read_any_dollar): New method.
6001 (argument_parser::read_format_flags): New method.
6002 (argument_parser::read_any_format_width): New method.
6003 (argument_parser::read_any_format_left_precision): New method.
6004 (argument_parser::read_any_format_precision): New method.
6005 (argument_parser::handle_alloc_chars): New method.
6006 (argument_parser::read_any_length_modifier): New method.
6007 (argument_parser::read_any_other_modifier): New method.
6008 (argument_parser::find_format_char_info): New method.
6009 (argument_parser::validate_flag_pairs): New method.
6010 (argument_parser::give_y2k_warnings): New method.
6011 (argument_parser::parse_any_scan_set): New method.
6012 (argument_parser::handle_conversions): New method.
6013 (argument_parser::check_argument_type): New method.
6014 (check_format_info_main): Introduce classes argument_parser
6015 and flag_chars_t, moving the code within the loop into methods
6016 of these classes. Make various locals "const".
6017
88fa5555
DM
60182016-08-05 David Malcolm <dmalcolm@redhat.com>
6019
6020 * c-common.c: Include "substring-locations.h".
6021 (get_cpp_ttype_from_string_type): New function.
6022 (g_string_concat_db): New global.
6023 (substring_loc::get_range): New method.
6024 * c-common.h (g_string_concat_db): New declaration.
6025 (class substring_loc): New class.
6026 * c-lex.c (lex_string): When concatenating strings, capture the
6027 locations of all tokens using a new obstack, and record the
6028 concatenation locations within g_string_concat_db.
6029 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6030 on the ggc-heap.
6031
78169471
MP
60322016-07-29 Marek Polacek <polacek@redhat.com>
6033
638fc14f
MP
6034 PR c/71926
6035 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6036 parentheses warning.
6037
78169471
MP
6038 PR c/71574
6039 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6040
1225d6b1
ML
60412016-07-28 Martin Liska <mliska@suse.cz>
6042
6043 PR gcov-profile/68025
6044 * c-common.c (handle_no_profile_instrument_function_attribute):
6045
ec1e2a40
BE
60462016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6047
6048 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6049 BITS_PER_UNIT_LOG.
6050
5ec2cd9f
JM
60512016-07-25 Jason Merrill <jason@redhat.com>
6052
6053 PR c++/65970
6054 * c.opt (fconstexpr-loop-limit): New.
6055
9dc5773f 60562016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6057
6058 PR c++/71675
6059 * c-common.c (resolve_overloaded_builtin): Avoid converting
6060 __atomic_compare_exchange_n return type to that of what its
6061 first argument points to.
6062
e3fe09c1
UB
60632016-07-22 Uros Bizjak <ubizjak@gmail.com>
6064
6065 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6066 ~(unsigned HOST_WIDE_INT) 0.
6067
bc91c436
ML
60682016-07-22 Martin Liska <mliska@suse.cz>
6069
6070 PR gcov-profile/69028
6071 PR gcov-profile/62047
6072 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6073 to the current_function_decl.
6074
451dcc66
JM
60752016-07-21 Jason Merrill <jason@redhat.com>
6076
6077 PR c++/65168
6078 * c-common.c (c_common_truthvalue_conversion): Check
6079 c_inhibit_evaluation_warnings for warning about address of
6080 reference.
6081
de6a69ee
DM
60822016-07-20 David Malcolm <dmalcolm@redhat.com>
6083
6084 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6085 const char *.
6086
d022c55a
JM
60872016-07-15 Jason Merrill <jason@redhat.com>
6088
6089 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6090
ddbbcb19
JJ
60912016-07-15 Jakub Jelinek <jakub@redhat.com>
6092
6093 PR c/71858
6094 * c-common.h (enum lookup_name_fuzzy_kind): Add
6095 FUZZY_LOOKUP_FUNCTION_NAME.
6096
d0cf395a
JM
60972016-07-08 Jason Merrill <jason@redhat.com>
6098
6099 P0145: Refining Expression Order for C++.
6100 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6101 * c-opts.c: Adjust.
6102
98d44e93
MT
61032016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6104
6105 PR c++/71214
6106 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6107
f9d8d994
TS
61082016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6109
6110 * c-pragma.h (enum pragma_kind): Rename
6111 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6112 users.
6113
4aa83879
RB
61142016-06-29 Richard Biener <rguenther@suse.de>
6115
6116 PR middle-end/71002
6117 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6118
a25bd9e6
JM
61192016-06-24 Jason Merrill <jason@redhat.com>
6120
6121 P0145R2: Refining Expression Order for C++.
6122 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6123 MODIFY_EXPR.
6124
a86451b9
JJ
61252016-06-24 Jakub Jelinek <jakub@redhat.com>
6126
6127 * c-common.c (check_builtin_function_arguments): Require last
6128 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6129 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6130 if the last argument is pointer to enumerated or boolean type.
6131
1a4f11c8
DM
61322016-06-22 David Malcolm <dmalcolm@redhat.com>
6133
6134 PR c/70339
6135 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6136 (lookup_name_fuzzy): New prototype.
6137
fe55692c
JDA
61382016-06-21 John David Anglin <danglin@gcc.gnu.org>
6139
6140 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6141
4eb24e01
JM
61422016-06-14 Jason Merrill <jason@redhat.com>
6143
6144 P0145R2: Refining Expression Order for C++.
6145 * c.opt (fargs-in-order): New.
6146 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6147
ef7cf206
JJ
61482016-06-13 Jakub Jelinek <jakub@redhat.com>
6149
0dda258b
JJ
6150 PR sanitizer/71498
6151 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6152 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6153
ef7cf206
JJ
6154 PR preprocessor/71183
6155 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6156 to cb_get_source_date_epoch.
6157
50b15873
JJ
61582016-06-10 Jakub Jelinek <jakub@redhat.com>
6159
6160 PR c/68657
6161 * c.opt (Wpsabi): Add Warning flag.
6162
4d926e34
MS
61632016-06-10 Martin Sebor <msebor@redhat.com>
6164
6165 PR c/71392
14ec014e 6166 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
6167 the nonnull attribute in type-generic builtins.
6168
e01b4e16
MS
61692016-06-09 Martin Sebor <msebor@redhat.com>
6170
6171 PR c/70883
6172 * c-common.c (builtin_function_validate_nargs): Make text of error
6173 message consistent with others like it.
6174
44a845ca
MS
61752016-06-08 Martin Sebor <msebor@redhat.com>
6176 Jakub Jelinek <jakub@redhat.com>
6177
6178 PR c++/70507
6179 PR c/68120
6180 * c-common.c (check_builtin_function_arguments): Handle
6181 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6182
a80a7051
RB
61832016-06-08 Richard Biener <rguenther@suse.de>
6184
6185 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6186
bfd67b47
RB
61872016-06-07 Richard Biener <rguenther@suse.de>
6188
6189 PR c/61564
6190 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6191 options and warn about others.
6192
15c98b2e
ES
61932016-06-01 Eduard Sanou <dhole@openmailbox.org>
6194
6195 * c-common.c (get_source_date_epoch): Rename to
6196 cb_get_source_date_epoch.
6197 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6198 message when the parsing fails. Use error_at instead of fatal_error.
6199 * c-common.h (get_source_date_epoch): Rename to
6200 cb_get_source_date_epoch.
6201 * c-common.h (cb_get_source_date_epoch): Prototype.
6202 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6203 * c-common.h (c_omp_region_type): Remove trailing comma.
6204 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6205 * c-lex.c (c_lex_with_flags): Remove initialization of
6206 pfile->source_date_epoch.
6207
00631022
JJ
62082016-05-30 Jakub Jelinek <jakub@redhat.com>
6209
6210 PR c++/71349
6211 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6212 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6213 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6214 instead of C_OMP_CLAUSE_SPLIT_FOR.
6215
f17a223d
RB
62162016-05-24 Richard Biener <rguenther@suse.de>
6217
6218 PR middle-end/70434
6219 PR c/69504
6220 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6221 (convert_vector_to_array_for_subscript): ... this.
6222 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6223 VIEW_CONVERT_EXPR to an array type. Rename to ...
6224 (convert_vector_to_array_for_subscript): ... this.
6225
4f2e1536
MP
62262016-05-12 Marek Polacek <polacek@redhat.com>
6227
6228 PR c/70756
6229 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6230 size_in_bytes and pass LOC to it.
6231
d6e83a8d
MM
62322016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6233
6234 PR c/43651
6235 * c.opt (Wduplicate-decl-specifier): New option.
6236
5c3a10fb
MP
62372016-05-11 Marek Polacek <polacek@redhat.com>
6238
6239 PR c++/71024
6240 * c-common.c (diagnose_mismatched_attributes): New function.
6241 * c-common.h (diagnose_mismatched_attributes): Declare.
6242
deef7113
MP
62432016-05-04 Marek Polacek <polacek@redhat.com>
6244
6245 * c.opt (Wdangling-else): New option.
6246
79ce98bc
MP
62472016-05-03 Marek Polacek <polacek@redhat.com>
6248
6249 PR c/70859
6250 * c-common.c (builtin_function_validate_nargs): Add location
6251 parameter. Use it.
6252 (check_builtin_function_arguments): Add location and arguments
6253 parameters. Use them.
6254 * c-common.h (check_builtin_function_arguments): Update declaration.
6255
381cdae4
RB
62562016-05-03 Richard Biener <rguenther@suse.de>
6257
6258 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6259 allow call args to gimplify to SSA names.
6260
1d793c34
MP
62612016-05-03 Marek Polacek <polacek@redhat.com>
6262
6263 * c-common.h (enum c_omp_region_type): Remove stray comma.
6264
77886428
CP
62652016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6266
6267 * c-common.h (enum c_omp_region_type): Define.
6268
697e0b28
RS
62692016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6270
6271 * c-common.c (shorten_compare): Use wi::to_wide.
6272
e7ff0319
CP
62732016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6274
6275 PR middle-end/70626
6276 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6277 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6278 reduction clauses in acc parallel loops.
6279
2fff3db8
MP
62802016-04-29 Marek Polacek <polacek@redhat.com>
6281
6282 PR c/70852
6283 * c-common.c (warn_for_memset): Check domain before accessing it.
6284
509063eb
DV
62852016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6286
6287 PR/69089
6288 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6289 "aligned" attribute.
6290
b632761d
JM
62912016-04-28 Jason Merrill <jason@redhat.com>
6292
6293 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6294
174f6622
ES
62952016-04-28 Eduard Sanou <dhole@openmailbox.org>
6296 Matthias Klose <doko@debian.org>
6297
6298 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6299 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6300 handling.
6301 * c-common.h (get_source_date_epoch): Prototype.
6302 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6303
6bc2bb18
RB
63042015-04-27 Ryan Burn <contact@rnburn.com>
6305
6306 PR c++/69024
6307 PR c++/68997
6308 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6309 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6310 external linkage.
6311 (cilk_detect_and_unwrap): Corresponding changes.
6312 (extract_free_variables): Don't extract free variables from
6313 AGGR_INIT_EXPR slot.
6314 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6315 (cilk_recognize_spawn): Likewise.
6316
c1e1f433
BS
63172016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6318
6319 * c.opt (Wmemset-elt-size): New option.
6320 * c-common.c (warn_for_memset): New function.
6321 * c-common.h (warn_for_memset): Declare.
6322
d067e05f
JM
63232016-04-25 Jason Merrill <jason@redhat.com>
6324
6325 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6326 No longer static.
6327 * c-common.h: Declare it.
6328 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6329
9aa36ae5
JM
63302016-04-22 Jason Merrill <jason@redhat.com>
6331
6332 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6333
477d4906
IV
63342016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6335
6336 PR c++/69363
6337 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6338 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6339
fe37c7af
MM
63402016-04-18 Michael Matz <matz@suse.de>
6341
6342 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6343 and SET_DECL_ALIGN.
6344
23f2660f
EB
63452016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6346
6347 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6348 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6349 to incomplete types.
6350 (dump_nested_type): Remove redundant tests and tidy up.
6351 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6352 a type which is the typedef of an original type.
6353
1e77281b
MP
63542016-04-15 Marek Polacek <polacek@redhat.com>
6355
6356 PR c/70651
6357 * c-common.c (build_va_arg): Change two asserts into errors and return
6358 error_mark_node.
6359
b3a77f21
MP
63602016-04-13 Marek Polacek <polacek@redhat.com>
6361
6362 PR c++/70639
6363 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6364 for switch statements, too.
6365
322b8466
JM
63662016-03-28 Jason Merrill <jason@redhat.com>
6367
6368 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6369
fbdb6baf
MP
63702016-03-23 Marek Polacek <polacek@redhat.com>
6371
6372 PR c++/69884
6373 * c.opt (Wignored-attributes): New option.
6374
5c240f4d
DM
63752016-03-22 David Malcolm <dmalcolm@redhat.com>
6376
6377 PR c/69993
6378 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6379 diagnostic text, reversing the order of the warning and note so
6380 that they appear in source order.
6381
14ba7b28
MP
63822016-03-17 Marek Polacek <polacek@redhat.com>
6383
6384 PR c/69407
6385 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6386 operations.
6387
08a1cadc
JM
63882016-03-14 Jason Merrill <jason@redhat.com>
6389
2aaeea19
JM
6390 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6391
08a1cadc
JM
6392 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6393
c06d25bb
RB
63942016-03-09 Richard Biener <rguenther@suse.de>
6395
6396 PR c/70143
6397 * c-common.c (strict_aliasing_warning): Add back
6398 alias_sets_conflict_p check.
6399
80aac5c8
JM
64002016-03-08 Jason Merrill <jason@redhat.com>
6401
6402 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6403
64b23c13
DM
64042016-03-04 David Malcolm <dmalcolm@redhat.com>
6405
6406 PR c/68187
6407 * c-indentation.c (get_visual_column): Move code to determine next
6408 tab stop to...
6409 (next_tab_stop): ...this new function.
6410 (line_contains_hash_if): Delete function.
6411 (detect_preprocessor_logic): Delete function.
6412 (get_first_nws_vis_column): New function.
6413 (detect_intervening_unindent): New function.
6414 (should_warn_for_misleading_indentation): Replace call to
6415 detect_preprocessor_logic with a call to
6416 detect_intervening_unindent.
6417
729526f5
DM
64182016-03-04 David Malcolm <dmalcolm@redhat.com>
6419
6420 PR c/68187
6421 * c-indentation.c (should_warn_for_misleading_indentation): When
6422 suppressing warnings about cases where the guard and body are on
6423 the same column, only use the first non-whitespace column in place
6424 of the guard token column when dealing with "else" clauses.
6425 When rejecting aligned BODY and NEXT, loosen the requirement
6426 from equality with the first non-whitespace of guard to simply
6427 that they not be indented relative to it.
6428
e9a35493
RB
64292016-03-04 Richard Biener <rguenther@suse.de>
6430
6431 PR c++/70054
6432 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6433 instead of alias_sets_conflict_p.
6434
1be56bc5
MP
64352016-03-01 Marek Polacek <polacek@redhat.com>
6436
6437 PR c++/69795
6438 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6439 any DECL.
6440
35886f0b
MS
64412016-02-22 Martin Sebor <msebor@redhat.com>
6442
6443 PR middle-end/69780
6444 * c-common.c (check_builtin_function_arguments): Validate and
6445 reject invalid arguments to __builtin_alloca_with_align.
6446
4246c8da
MW
64472016-02-20 Mark Wielaard <mjw@redhat.com>
6448
6449 PR c/28901
6450 * c.opt (Wunused-const-variable): Turn into Alias for...
6451 (Wunused-const-variable=): New option.
6452
268be88c
BE
64532016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6454
6455 PR c++/69865
6456 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6457 here...
6458 (c_common_init_options): ...to here.
6459 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6460
871b3f47
JJ
64612016-02-19 Jakub Jelinek <jakub@redhat.com>
6462
6463 PR c++/69826
6464 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6465 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6466 flag_preprocess_only.
6467
bf14eba2
JJ
64682016-02-16 Jakub Jelinek <jakub@redhat.com>
6469
6470 PR c/69835
6471 * c.opt (Wnonnull-compare): Enable for -Wall.
6472
ba6b3795
JJ
64732016-02-15 Jakub Jelinek <jakub@redhat.com>
6474
6475 PR c++/69797
6476 * c-common.c (sync_resolve_size): Diagnose too few arguments
6477 even when params is non-NULL empty vector.
6478
a011cd92
BS
64792016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6480
6481 PR target/60410
6482 * c.opt (fshort-double): Remove.
6483
46cb9332
MS
64842016-02-05 Martin Sebor <msebor@redhat.com>
6485
6486 PR c++/69662
6487 * c.opt (Warning options): Update -Wplacement-new to take
6488 an optional argument.
6489
e1b81f2b
JJ
64902016-02-01 Jakub Jelinek <jakub@redhat.com>
6491
6492 PR preprocessor/69543
6493 PR c/69558
6494 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6495 instead of loc to control_warning_option.
6496
b6adbb9f
NS
64972016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6498
6499 * c.opt (fopenacc-dim=): New option.
6500
5d70666e
RB
65012016-01-27 Ryan Burn <contact@rnburn.com>
6502
6503 PR cilkplus/69267
6504 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6505 gimplify_arg. Removed superfluous post_p argument.
6506 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6507 superfluous post_p argument.
6508 * c-gimplify.c (c_gimplify_expr): Likewise.
6509
01e1dea3
DM
65102016-01-26 David Malcolm <dmalcolm@redhat.com>
6511
6512 PR other/69006
6513 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6514 pp_newline_and_flush with pp_flush.
6515
9f04a53e
MS
65162016-01-20 Martin Sebor <msebor@redhat.com>
6517
6518 PR c/69405
6519 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6520 an incompatible argument when the argument isn't a valid tree node.
6521
7f26f7df
JM
65222016-01-18 Jason Merrill <jason@redhat.com>
6523
6524 PR c++/68767
6525 * c-common.c (check_function_arguments_recurse): Fold the whole
6526 COND_EXPR, not just the condition.
6527
f62bf092
TV
65282016-01-18 Tom de Vries <tom@codesourcery.com>
6529
6530 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6531 classify as loop clause.
6532
e0a575ff
JJ
65332016-01-15 Jakub Jelinek <jakub@redhat.com>
6534
6535 PR bootstrap/68271
6536 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6537 C++ FE no longer has limit on number of pragmas.
6538
65392015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6540
6541 PR c++/69048
6542 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6543 to add missing cleanup point.
b6e3db06 6544
c7df95d8
DM
65452016-01-14 David Malcolm <dmalcolm@redhat.com>
6546
6547 PR c++/68819
6548 * c-indentation.c (get_visual_column): Add location_t param.
6549 Handle the column number being zero by effectively disabling the
6550 warning, with an "inform".
6551 (should_warn_for_misleading_indentation): Add location_t argument
6552 for all uses of get_visual_column.
6553
21efdd80
PP
65542016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6555
6556 PR c++/69029
6557 * c-indentation.c (should_warn_for_misleading_indentation):
6558 Don't warn about do-while statements.
6559
7a127fa7
MS
65602016-01-07 Martin Sebor <msebor@redhat.com>
6561
6562 PR c/68966
6563 * c-common.c (sync_resolve_size): Reject first argument when it's
6564 a pointer to _Bool.
6565
c589e975
DM
65662016-01-05 David Malcolm <dmalcolm@redhat.com>
6567
6568 PR c/69122
6569 * c-indentation.c (get_visual_column): Remove default argument.
6570 (should_warn_for_misleading_indentation): For the multiline case,
6571 update call to get_visual_column for next_stmt_exploc so that it
6572 captures the location of the first non-whitespace character in the
6573 relevant line. Don't issue warnings if there is non-whitespace
6574 before the next statement.
6575
818ab71a
JJ
65762016-01-04 Jakub Jelinek <jakub@redhat.com>
6577
6578 Update copyright years.
6579
745e411d
DM
65802015-12-21 David Malcolm <dmalcolm@redhat.com>
6581
6582 * c-common.c (binary_op_error): Convert first param from
6583 location_t to rich_location * and use it when emitting an error.
6584 * c-common.h (binary_op_error): Convert first param from
6585 location_t to rich_location *.
6586
de67c4c3
DM
65872015-12-16 David Malcolm <dmalcolm@redhat.com>
6588
6589 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6590 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6591
4a38b02b
IV
65922015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6593
6594 * c-common.c (c_common_attribute_table): Handle "omp declare target
6595 link" attribute.
6596
54d62f51
JJ
65972015-12-14 Jakub Jelinek <jakub@redhat.com>
6598
6599 PR c/68833
6600 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6601
8d4227c8
TB
66022014-12-12 Tobias Burnus <burnus@net-b.de>
6603
6604 PR fortran/68815
6605 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6606 specifiers (%d, %i,%u and %c).
6607
f6069ccc
DM
66082015-12-10 David Malcolm <dmalcolm@redhat.com>
6609
6610 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6611
63bbf46d
JJ
66122015-12-08 Jakub Jelinek <jakub@redhat.com>
6613
6614 PR c/48088
6615 PR c/68657
6616 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6617 * c-pragma.c (handle_pragma_diagnostic): Adjust
6618 control_warning_option caller.
6619
f79520bb
DM
66202015-12-07 David Malcolm <dmalcolm@redhat.com>
6621
6622 * c-common.c (c_cpp_error): Update for change to
6623 rich_location::set_range.
6624
b3d5bc62
JJ
66252015-12-04 Paolo Bonzini <bonzini@gnu.org>
6626
6627 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6628 shifting 1 out of the sign bit.
6629
66302015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6631
6632 * c-common.c (c_common_attribute_table[]): Update max arguments
6633 count for "simd" attribute.
6634 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6635
6eb4a537
JJ
66362015-12-03 Jakub Jelinek <jakub@redhat.com>
6637
6638 PR preprocessor/57580
6639 * c-ppoutput.c (print): Change printed field to bool.
6640 Move src_file last for smaller padding.
6641 (init_pp_output): Set print.printed to false instead of 0.
6642 (scan_translation_unit): Fix up formatting. Set print.printed
6643 to true after printing something other than newline.
6644 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6645 (maybe_print_line_1): Set print.printed to false instead of 0.
6646 (print_line_1): Likewise.
6647 (do_line_change): Set print.printed to true instead of 1.
6648 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6649 dump_macro): Set print.printed to false after printing newline.
6650
4250754e
JM
66512015-12-02 Jason Merrill <jason@redhat.com>
6652
f479b43d
JM
6653 * c-common.c (fold_for_warn): New.
6654 (warn_logical_operator, warn_tautological_cmp)
6655 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6656
4250754e
JM
6657 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6658 (c_fully_fold_internal, decl_constant_value_for_optimization):
6659 Move to c/c-fold.c.
6660 * c-common.h: Don't declare decl_constant_value_for_optimization.
6661
e9e32ee6
JM
66622015-12-02 Joseph Myers <joseph@codesourcery.com>
6663
6664 PR c/68162
6665 * c-common.h (c_build_qualified_type): Add extra default
6666 arguments.
6667
37d5ad46
JB
66682015-12-01 Julian Brown <julian@codesourcery.com>
6669 Cesar Philippidis <cesar@codesourcery.com>
6670 James Norris <James_Norris@mentor.com>
6671
6672 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6673 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6674 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6675
f07862c7
EB
66762015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6677
6678 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6679 (decl_sloc_common): Delete and move bulk of processing to...
6680 (decl_sloc): ...here.
6681 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6682 (dump_ada_double_name): Remove S parameter and compute the suffix.
6683 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6684 element type and deal with an anonymous one.
6685 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6686 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6687 and remove reference to QUAL_UNION_TYPE.
6688 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6689 (dump_nested_type): ...here. New function extracted from above.
6690 Generate a full declaration for anonymous element type of arrays.
6691 (print_ada_declaration): Really skip anonymous declarations. Remove
6692 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6693 Clean up processing of declarations of array types and objects.
6694 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6695 Remove obsolete code and tidy up.
6696
75c8aac3
JH
66972015-11-29 Jan Hubicka <hubicka@ucw.cz>
6698
6699 PR c/67581
6700 * c-common.c (handle_transparent_union_attribute): Update
6701 also type variants.
6702
b58d3df2
ML
67032015-11-27 Martin Liska <mliska@suse.cz>
6704
6705 PR c++/68312
6706 * array-notation-common.c (cilkplus_extract_an_triplets):
6707 Release vector of vectors.
6708 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6709
89a01fcf
EB
67102015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6711
6712 PR c++/68527
6713 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6714 (print_ada_struct_decl): Likewise.
6715
cc5c5226
IZ
67162015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6717
6718 PR c++/68001
6719 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6720 * cilk.c (recognize_spawn): Determine location in a more precise
6721 way.
6722
269adb9d
JM
67232015-11-19 Jason Merrill <jason@redhat.com>
6724
6725 * c-common.c (shorten_compare): But look through macros from
6726 system headers.
6727
d0eccfcd
JM
67282015-11-18 Jason Merrill <jason@redhat.com>
6729
6730 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6731 non-constant operand comes from a macro.
6732
3e44547c
JM
67332015-11-17 Jason Merrill <jason@redhat.com>
6734
6735 PR bootstrap/68346
6736 * c-common.c (warn_tautological_cmp): Fold before checking for
6737 constants.
6738
0f62c7a0
MP
67392015-11-16 Marek Polacek <polacek@redhat.com>
6740
6741 PR c++/68362
6742 * c-common.c (check_case_bounds): Fold low and high cases.
6743
a868811e
MP
67442015-11-16 Marek Polacek <polacek@redhat.com>
6745
6746 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6747 * c-common.c (c_common_get_alias_set): Likewise.
6748 (handle_visibility_attribute): Likewise.
6749
fff77217
KY
67502015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6751
6752 * c-common.c (handle_simd_attribute): New.
6753 (struct attribute_spec): Add entry for "simd".
6754 (handle_simd_attribute): New.
6755
269e63b7
KT
67562015-11-13 Kai Tietz <ktietz70@googlemail.com>
6757
6758 * c-lex.c (interpret_float): Use fold_convert.
6759
ebedc9a3
DM
67602015-11-13 David Malcolm <dmalcolm@redhat.com>
6761
6762 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6763 and store it on the result.
6764 * c-opts.c (c_common_init_options): Set
6765 global_dc->colorize_source_p.
6766
6e232ba4
JN
67672015-11-12 James Norris <jnorris@codesourcery.com>
6768 Joseph Myers <joseph@codesourcery.com>
6769
7365279f 6770 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6771 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6772 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6773 PRAGMA_OACC_CLAUSE_LINK.
6774
e78bede6
MP
67752015-11-11 Marek Polacek <polacek@redhat.com>
6776
6777 PR c/68107
6778 PR c++/68266
6779 * c-common.c (valid_array_size_p): New function.
6780 * c-common.h (valid_array_size_p): Declare.
6781
3f8257db 67822015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6783
6784 PR bootstrap/68271
6785 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6786
69f293c9
AM
67872015-11-11 Andrew MacLeod <amacleod@redhat.com>
6788
6789 * array-notation-common.c: Remove unused header files.
6790 * c-ada-spec.c: Likewise.
6791 * c-cilkplus.c: Likewise.
6792 * c-common.c: Likewise.
6793 * c-cppbuiltin.c: Likewise.
6794 * c-dump.c: Likewise.
6795 * c-format.c: Likewise.
6796 * c-gimplify.c: Likewise.
6797 * c-indentation.c: Likewise.
6798 * c-lex.c: Likewise.
6799 * c-omp.c: Likewise.
6800 * c-opts.c: Likewise.
6801 * c-pch.c: Likewise.
6802 * c-ppoutput.c: Likewise.
6803 * c-pragma.c: Likewise.
6804 * c-pretty-print.c: Likewise.
6805 * c-semantics.c: Likewise.
6806 * c-ubsan.c: Likewise.
6807 * cilk.c: Likewise.
6808 * stub-objc.c: Likewise.
6809
3a40d81d
NS
68102015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6811 Cesar Philippidis <cesar@codesourcery.com>
6812 James Norris <jnorris@codesourcery.com>
6813 Julian Brown <julian@codesourcery.com>
6814 Nathan Sidwell <nathan@codesourcery.com>
6815
6816 * c-pragma.c (oacc_pragmas): Add "routine".
6817 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6818
ee45a32d
EB
68192015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6820
6821 * c-common.c (c_common_attributes): Add scalar_storage_order.
6822 (handle_scalar_storage_order_attribute): New function.
6823 * c-pragma.c (global_sso): New variable.
6824 (maybe_apply_pragma_scalar_storage_order): New function.
6825 (handle_pragma_scalar_storage_order): Likewise.
6826 (init_pragma): Register scalar_storage_order.
6827 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6828 * c.opt (Wscalar-storage-order): New warning.
6829 (fsso-struct=): New option.
6830
eb11eb15
MS
68312015-11-08 Martin Sebor <msebor@redhat.com>
6832
6833 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6834
0aad0198
RS
68352015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6836
6837 * c-common.c: Don't undef DEF_BUILTIN.
6838
8a645150
DM
68392015-11-06 David Malcolm <dmalcolm@redhat.com>
6840
6841 * c-common.c (c_cpp_error): Convert parameter from location_t to
6842 rich_location *. Eliminate the "column_override" parameter and
6843 the call to diagnostic_override_column.
6844 Update the "done_lexing" clause to set range 0
6845 on the rich_location, rather than overwriting a location_t.
6846 * c-common.h (c_cpp_error): Convert parameter from location_t to
6847 rich_location *. Eliminate the "column_override" parameter.
6848
7a5e4956
CP
68492015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6850 Thomas Schwinge <thomas@codesourcery.com>
6851 James Norris <jnorris@codesourcery.com>
6852
6853 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6854 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6855 clauses with parallel and kernels and loops.
6856 * c-pragma.h (enum pragma_omp_clause): Add entries for
6857 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6858 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6859 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6860 INDEPENDENT,SEQ}.
6861 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6862
e2f5cc96
MS
68632015-11-05 Martin Sebor <msebor@redhat.com>
6864
6865 PR c++/67942
6866 * c.opt (-Wplacement-new): New option.
6867
e01d41e5
JJ
68682015-11-05 Jakub Jelinek <jakub@redhat.com>
6869
6870 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6871 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6872 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6873 save_expr or create_tmp_var* if TEST is true.
6874 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6875 Don't call add_stmt here.
6876 (struct c_omp_check_loop_iv_data): New type.
6877 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6878 c_omp_check_loop_iv_exprs): New functions.
6879 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6880 distribute.
6881 (c_omp_declare_simd_clauses_to_numbers): Change
6882 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6883 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6884 from numbers to PARM_DECLs.
6885
595278be
MM
68862015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6887
6888 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6889 flag_checking.
6890
3f8257db 68912015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6892
6893 PR c++-common/67882
b3d5bc62
JJ
6894 * c-common.h (fold_offsetof_1): Add argument.
6895 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6896 offsetof expressions that reference elements past the end of
6897 an array.
6898
4bf9e5a8
TS
68992015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6900 Chung-Lin Tang <cltang@codesourcery.com>
6901
6902 * c-pragma.c (oacc_pragmas): Add "atomic".
6903 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6904
3b1661a9
ES
69052015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6906
6907 * c-common.c (handle_target_clones_attribute): New.
6908 (c_common_attribute_table): Add handle_target_clones_attribute.
6909 (handle_always_inline_attribute): Add check on target_clones attribute.
6910 (handle_target_attribute): Ditto.
6911
2adfab87
AM
69122015-10-29 Andrew MacLeod <amacleod@redhat.com>
6913
6914 * array-notation-common.c: Reorder #include's and remove duplicates.
6915 * c-ada-spec.c: Likewise.
6916 * c-cilkplus.c: Likewise.
6917 * c-common.c: Likewise.
6918 * c-cppbuiltin.c: Likewise.
6919 * c-dump.c: Likewise.
6920 * c-format.c: Likewise.
6921 * c-gimplify.c: Likewise.
6922 * c-indentation.c: Likewise.
6923 * c-lex.c: Likewise.
6924 * c-omp.c: Likewise.
6925 * c-opts.c: Likewise.
6926 * c-pch.c: Likewise.
6927 * c-ppoutput.c: Likewise.
6928 * c-pragma.c: Likewise.
6929 * c-pretty-print.c: Likewise.
6930 * c-semantics.c: Likewise.
6931 * c-ubsan.c: Likewise.
6932 * cilk.c: Likewise.
6933 * stub-objc.c: Likewise.
6934
d90ec4f2
JM
69352015-10-28 Jason Merrill <jason@redhat.com>
6936
6937 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6938
88bae6f4
TS
69392015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6940 James Norris <jnorris@codesourcery.com>
6941 Cesar Philippidis <cesar@codesourcery.com>
6942
6943 PR c/64765
6944 PR c/64880
6945 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6946 * c-omp.c (c_oacc_split_loop_clauses): New function.
6947
b1726d6c
MS
69482015-10-21 Martin Sebor <msebor@redhat.com>
6949
6950 PR driver/68043
6951 * c.opt: End each sentence that describes an option with a period.
6952
fa60eeb9
MP
69532015-10-20 Marek Polacek <polacek@redhat.com>
6954
6955 * array-notation-common.c (is_cilkplus_vector_p): Define.
6956 * c-common.h (is_cilkplus_vector_p): Declare.
6957
95979049
MP
69582015-10-20 Marek Polacek <polacek@redhat.com>
6959
6960 * c.opt (std=gnu++11): Do not describe as experimental.
6961 (std=gnu++14): Likewise.
6962
2a9fb712
JM
69632015-10-19 Jason Merrill <jason@redhat.com>
6964
6965 * c-cppbuiltin.c (c_cpp_builtins): Define
6966 __cpp_nontype_template_args.
6967
13b380a3
JM
69682015-10-19 Jason Merrill <jason@redhat.com>
6969
6970 * c-cppbuiltin.c (c_cpp_builtins): Define
6971 __cpp_enumerator_attributes, __cpp_fold_expressions,
6972 __cpp_unicode_characters.
6973
d9a6bd32
JJ
69742015-10-13 Jakub Jelinek <jakub@redhat.com>
6975 Aldy Hernandez <aldyh@redhat.com>
6976
6977 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6978 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6979 (c_define_builtins): Likewise.
6980 * c-common.h (enum c_omp_clause_split): Add
6981 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6982 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6983 (c_finish_omp_for): Add ORIG_DECLV argument.
6984 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6985 201511 instead of 201307.
6986 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6987 OMP_CRITICAL_CLAUSES to it.
6988 (c_finish_omp_ordered): Add CLAUSES argument, set
6989 OMP_ORDERED_CLAUSES to it.
6990 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6991 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6992 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6993 constructs and new OpenMP 4.5 clauses. Clear
6994 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6995 verification code.
6996 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6997 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6998 (enum pragma_omp_clause): Add
6999 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7000 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7001
624d31fe
RS
70022015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7003
7004 * c-lex.c (interpret_float): Use real_equal instead of
7005 REAL_VALUES_EQUAL.
7006
b8fd7909
JM
70072015-10-04 Jason Merrill <jason@redhat.com>
7008
7009 Implement N4514, C++ Extensions for Transactional Memory.
7010 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7011 (c_common_attribute_table): Add transaction_safe_dynamic.
7012 transaction_safe now affects type identity.
7013 (handle_tm_attribute): Handle transaction_safe_dynamic.
7014 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7015 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7016 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7017 (D_TRANSMEM): New.
7018 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7019 * c-pretty-print.c (pp_c_attributes_display): Don't print
7020 transaction_safe in C++.
7021
12651878
MP
70222015-10-02 Marek Polacek <polacek@redhat.com>
7023
7024 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7025
3e3b8d63
MP
70262015-10-02 Marek Polacek <polacek@redhat.com>
7027
7028 PR c/64249
7029 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7030 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7031 * c.opt (Wduplicated-cond): New option.
7032
0d1a8f75
JM
70332015-10-01 Joseph Myers <joseph@codesourcery.com>
7034
7035 * c.opt (std=c11): Do not describe as experimental.
7036 (std=gnu11): Likewise.
7037 (std=iso9899:2011): Likewise.
7038
3e32ee19
NS
70392015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7040
7041 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7042 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7043
974348ee
MP
70442015-09-25 Marek Polacek <polacek@redhat.com>
7045
7046 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7047 (ubsan_instrument_shift): Likewise.
7048
15dbc1a6
MP
70492015-09-25 Marek Polacek <polacek@redhat.com>
7050
7051 PR sanitizer/64906
7052 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7053
6b95d7cc
PP
70542015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7055
7056 * c-indentation.c (should_warn_for_misleading_indentation):
7057 Compare next_stmt_vis_column with guard_line_first_nws instead
7058 of with guard_line_vis_column.
7059
c1822f9c
MLI
70602015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7061
7062 PR c/49654
7063 PR c/49655
7064 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7065 options and options not valid for the current language.
7066
d5398058
PP
70672015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7068
7069 * c-indentation.c (should_warn_for_misleading_indentation):
7070 Float out and consolidate the calls to get_visual_column that
7071 are passed guard_exploc as an argument. Compare
7072 next_stmt_vis_column with guard_line_first_nws instead of with
7073 body_line_first_nws.
7074
6b333269
NS
70752015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7076
7077 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7078 Wnamespaces): New C++ warnings.
7079
a75f1574
JM
70802015-09-22 Jason Merrill <jason@redhat.com>
7081
7082 * c-common.h (abi_compat_version_crosses): New.
7083 (warn_abi_version): Declare.
7084 * c-common.c: Define it.
7085 * c-opts.c (c_common_post_options): Handle it.
7086 flag_abi_compat_version defaults to 8.
7087
bdaaa8b7
VV
70882015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7089
7090 Complete the implementation of N4230, Nested namespace definition.
7091 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7092 __cpp_nested_namespace_definitions.
7093
eaa797e8
MLI
70942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7095
7096 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7097
c4914de6
MLI
70982015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7099
7100 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7101 when warning.
7102 * c-pragma.h (pragma_lex): Add optional loc argument.
7103
fcb87c50
MM
71042015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7105
7106 * c-format.c (check_format_arg): Adjust to use common block size in all
7107 object pools.
7108
31bdd08a
DM
71092015-09-15 David Malcolm <dmalcolm@redhat.com>
7110
7111 * c-format.c (location_from_offset): Update for change in
7112 signature of location_get_source_line.
7113 * c-indentation.c (get_visual_column): Likewise.
7114 (line_contains_hash_if): Likewise.
7115
aa9f4b4c
MP
71162015-09-14 Marek Polacek <polacek@redhat.com>
7117
7118 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7119 setting various warnings.
7120
aa256c4a
MP
71212015-09-14 Marek Polacek <polacek@redhat.com>
7122
7123 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7124 a negative value.
7125
0f876f22
MW
71262015-09-11 Mark Wielaard <mjw@redhat.com>
7127
7128 PR c/28901
7129 * c.opt (Wunused-variable): Option from common.opt.
7130 (Wunused-const-variable): New option.
7131
273aa49e
PC
71322015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7133
7134 PR c++/53184
7135 * c.opt ([Wsubobject-linkage]): Add.
7136
1807ffc1
MS
71372015-09-03 Martin Sebor <msebor@redhat.com>
7138
7139 PR c/66516
7140 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7141 functions.
7142 * c-common.c (reject_gcc_builtin): Define.
7143
38942840
BI
71442015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7145
7146 PR middle-end/60586
7147 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7148 prototype.
7149 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7150 cilk_gimplify_call_params_in_spawned_fn.
7151 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7152 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7153 unwrapping.
7154
c316b5e4
MP
71552015-08-25 Marek Polacek <polacek@redhat.com>
7156
7157 PR middle-end/67330
7158 * c-common.c (handle_weak_attribute): Don't check whether the
7159 visibility can be changed here.
7160
584a7c46
MLI
71612015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7162
7163 * c-lex.c (c_lex_with_flags): Use explicit locations.
7164
a79683d5
TS
71652015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7166
7167 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7168 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7169
61717a45
FXC
71702015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7171
7172 PR middle-end/36757
7173 * c-common.c (check_builtin_function_arguments): Add check
7174 for BUILT_IN_SIGNBIT argument.
7175
329524f5
PC
71762015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7177
7178 PR c++/67160
7179 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7180 in c++1z mode.
7181
4ee55665
MP
71822015-08-17 Marek Polacek <polacek@redhat.com>
7183
7184 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7185 with whitespaces before qualifier names.
7186
b893e375
MP
71872015-08-12 Marek Polacek <polacek@redhat.com>
7188
7189 PR c++/55095
7190 * c-common.c (maybe_warn_shift_overflow): Properly handle
7191 left-shifting 1 into the sign bit.
7192
c2d89095
MLI
71932015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7194
7195 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7196
971e17ff
AS
71972015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7198 Braden Obrzut <admin@maniacsvault.net>
7199 Jason Merrill <jason@redhat.com>
7200
7201 Add C++ Concepts TS support.
7202 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7203 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7204 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7205 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7206 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7207 * c.opt (fconcepts): New.
7208
b3d5bc62
JJ
72092015-08-02 Martin Sebor <msebor@redhat.com>
7210
7211 * c.opt (-Wframe-address): New warning option.
7212
8ebca419
PP
72132015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7214
7215 * c-indentation.c (should_warn_for_misleading_indentation):
7216 Improve heuristics.
7217
1a1e101f
PP
72182015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7219
7220 * c-indentation.c (get_visual_column): Add parameter first_nws,
7221 use it. Update comment documenting the function.
7222 (is_first_nonwhitespace_on_line): Remove.
7223 (should_warn_for_misleading_indentation): Replace usage of
7224 of is_first_nonwhitespace_on_line with get_visual_column.
7225
992118a1
PP
72262015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7227
7228 * c-indentation.h (struct token_indent_info): Define.
7229 (get_token_indent_info): Define.
7230 (warn_for_misleading_information): Declare.
7231 * c-common.h (warn_for_misleading_information): Remove.
7232 * c-identation.c (warn_for_misleading_indentation):
7233 Change declaration to take three token_indent_infos. Adjust
7234 accordingly.
7235 * c-identation.c (should_warn_for_misleading_indentation):
7236 Likewise. Bail out early if the body is a compound statement.
7237 (guard_tinfo_to_string): Define.
7238
e8fa3817
JM
72392015-07-30 Jason Merrill <jason@redhat.com>
7240
7241 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7242 '*' for reference decay.
7243
173864e8
MP
72442015-07-30 Marek Polacek <polacek@redhat.com>
7245
7246 * c-common.c (warn_tautological_cmp): Bail for float types.
7247
f2afe6dd
MP
72482015-07-27 Marek Polacek <polacek@redhat.com>
7249
7250 PR bootstrap/67030
7251 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7252
05b28fd6
MP
72532015-07-27 Marek Polacek <polacek@redhat.com>
7254
7255 PR c++/66555
7256 PR c/54979
7257 * c-common.c (find_array_ref_with_const_idx_r): New function.
7258 (warn_tautological_cmp): New function.
7259 * c-common.h (warn_tautological_cmp): Declare.
7260 * c.opt (Wtautological-compare): New option.
7261
5a5062b8
MP
72622015-07-23 Marek Polacek <polacek@redhat.com>
7263
7264 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7265 (ubsan_instrument_shift): Likewise.
7266
dc891fe7
MP
72672015-07-23 Marek Polacek <polacek@redhat.com>
7268
7269 PR sanitizer/66908
7270 * c-ubsan.c: Include gimplify.h.
7271 (ubsan_instrument_division): Unshare OP0 and OP1.
7272 (ubsan_instrument_shift): Likewise.
7273
451b5e48
MP
72742015-07-20 Marek Polacek <polacek@redhat.com>
7275 Richard Sandiford <richard.sandiford@arm.com>
7276
7277 PR c++/55095
7278 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7279 Use EXPR_LOC_OR_LOC.
7280 (maybe_warn_shift_overflow): New function.
7281 * c-common.h (maybe_warn_shift_overflow): Declare.
7282 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7283 * c.opt (Wshift-overflow): New option.
7284
fb0b2914
ML
72852015-07-16 Martin Liska <mliska@suse.cz>
7286
7287 * c-format.c (static void check_format_info_main): Use
7288 object_allocator instead of pool_allocator.
7289 (check_format_arg): Likewise.
7290 (check_format_info_main): Likewise.
7291
903f5c23
AM
72922015-07-15 Andrew MacLeod <amacleod@redhat.com>
7293
7294 * c-opts.c: Remove multiline #include comment.
7295
026c3cfd
AH
72962015-07-12 Aldy Hernandez <aldyh@redhat.com>
7297
7298 * c-common.c: Fix double word typos.
7299
bb49ee66
EB
73002015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7301
7302 * c-ada-spec.h (cpp_operation): Revert latest change.
7303 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7304 constructors and destructors.
7305
1916bcb5
AM
73062015-07-09 Andrew MacLeod <amacleod@redhat.com>
7307
7308 * c-common.h: Adjust includes for flags.h changes.
7309 * stub-objc.c: Likewise.
026c3cfd 7310
a9dcd529
EB
73112015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7312
7313 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7314 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7315
b03b462f
JJ
73162015-07-08 Jakub Jelinek <jakub@redhat.com>
7317
7318 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7319 are to be removed, return NULL rather than original clauses list.
7320
c7131fb2
AM
73212015-07-07 Andrew MacLeod <amacleod@redhat.com>
7322
7323 * array-notation-common.c: Adjust includes.
7324 * c-ada-spec.c: Likewise.
7325 * c-cilkplus.c: Likewise.
7326 * c-common.h: Likewise.
7327 * c-cppbuiltin.c: Likewise.
7328 * c-dump.c: Likewise.
7329 * c-format.c: Likewise.
7330 * c-gimplify.c: Likewise.
7331 * c-indentation.c: Likewise.
7332 * c-lex.c: Likewise.
7333 * c-omp.c: Likewise.
7334 * c-opts.c: Likewise.
7335 * c-pch.c: Likewise.
7336 * c-ppoutput.c: Likewise.
7337 * c-pragma.c: Likewise.
7338 * c-pretty-print.c: Likewise.
7339 * c-semantics.c: Likewise.
7340 * c-ubsan.c: Likewise.
7341 * cilk.c: Likewise.
7342 * stub-objc.c: Likewise.
7343
2a7fb83f
EB
73442015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7345
7346 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7347 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7348
a03c9bf1
JM
73492015-07-01 Jason Merrill <jason@redhat.com>
7350
36a85135
JM
7351 * c-common.h (D_CXX11): Rename from D_CXX0X.
7352 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7353 * c-common.c: Adjust.
7354
e7fa68d5
JM
7355 * c-opts.c (c_common_post_options): Default to C++14.
7356
a03c9bf1
JM
7357 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7358
fe95b036
ESR
73592015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7360
7361 Implement N4197 - Adding u8 character literals
b3d5bc62 7362 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7363 CPP_CHAR.
b3d5bc62 7364 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7365 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7366 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7367 and CPP_UTF8CHAR tokens.
7368 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7369
da2e71c9
MLI
73702015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7371
7372 PR fortran/66605
7373 * c-common.c (do_warn_unused_parameter): Move here.
7374 * c-common.h (do_warn_unused_parameter): Declare.
7375
b155cfd9
MP
73762015-06-29 Marek Polacek <polacek@redhat.com>
7377
7378 PR c/66322
7379 * c-common.c (check_case_bounds): Add bool * parameter. Set
7380 OUTSIDE_RANGE_P.
7381 (c_add_case_label): Add bool * parameter. Pass it down to
7382 check_case_bounds.
7383 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7384 warning here.
7385 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7386 declarations.
7387
31521951
MP
73882015-06-27 Marek Polacek <polacek@redhat.com>
7389
7390 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7391 or VECTOR_INTEGER_TYPE_P throughout.
7392 * c-gimplify.c: Likewise.
7393
22d03525
MP
73942015-06-26 Marek Polacek <polacek@redhat.com>
7395
7396 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7397 * c-common.c (c_fully_fold_internal): Likewise.
7398 (c_alignof_expr): Likewise.
7399 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7400 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7401 * cilk.c (create_parm_list): Likewise.
22d03525 7402
af05e6e5
MP
74032015-06-26 Marek Polacek <polacek@redhat.com>
7404
7405 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7406
f0889939
AM
74072015-06-25 Andrew MacLeod <amacleod@redhat.com>
7408
7409 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7410 * c-gimplify.c: Likewise.
7411 * c-pragma.c: Likewise.
7412 * c-ubsan.c: Likewise.
7413 * cilk.c: Likewise.
7414
ca752f39
RS
74152015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7416
7417 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7418 ggc_hasher.
7419
16a16ec7
AM
74202015-06-25 Andrew MacLeod <amacleod@redhat.com>
7421
7422 * cilk.c: Move calls.h after tm.h in the include chain.
7423
0ae9bd27
MP
74242015-06-25 Marek Polacek <polacek@redhat.com>
7425
7426 * array-notation-common.c: Use VAR_P throughout.
7427 * c-ada-spec.c: Likewise.
7428 * c-common.c: Likewise.
7429 * c-format.c: Likewise.
7430 * c-gimplify.c: Likewise.
7431 * c-omp.c: Likewise.
7432 * c-pragma.c: Likewise.
7433 * c-pretty-print.c: Likewise.
7434 * cilk.c: Likewise.
7435
62f9079a
MP
74362015-06-25 Marek Polacek <polacek@redhat.com>
7437
7438 * cilk.c (extract_free_variables): Use is_global_var.
7439
0fa16060
RS
74402015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7441
7442 * c-common.c: Don't include target-def.h.
7443
a68ae2e1
MP
74442015-06-23 Marek Polacek <polacek@redhat.com>
7445
7446 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7447 when comparing INTEGER_CSTs.
7448
c6a2f2d9
PMR
74492015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7450
7451 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7452 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7453 (dump_ada_template): Skip partially specialized types.
7454
6b4db501
MM
74552015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7456
7457 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7458 swapping.
7459
abb226c9
AM
74602015-06-17 Andrew MacLeod <amacleod@redhat.com>
7461
7462 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7463 * c-ada-spec.c: Likewise.
7464 * c-cilkplus.c: Likewise.
7465 * c-common.c: Likewise.
7466 * c-common.h: Likewise.
7467 * c-cppbuiltin.c: Likewise.
7468 * c-dump.c: Likewise.
7469 * c-format.c: Likewise.
7470 * c-gimplify.c: Likewise.
7471 * c-indentation.c: Likewise.
7472 * c-lex.c: Likewise.
7473 * c-omp.c: Likewise.
7474 * c-opts.c: Likewise.
7475 * c-pch.c: Likewise.
7476 * c-ppoutput.c: Likewise.
7477 * c-pragma.c: Likewise.
7478 * c-pretty-print.c: Likewise.
7479 * c-semantics.c: Likewise.
7480 * c-ubsan.c: Likewise.
7481 * cilk.c: Likewise.
7482 * stub-objc.c: Likewise.
7483
076fecad
PP
74842015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7485
7486 PR c++/65168
7487 * c-common.c (c_common_truthvalue_conversion): Warn when
7488 converting an address of a reference to a truth value.
7489
13fdf2e2
AM
74902015-06-08 Andrew MacLeod <amacleod@redhat.com>
7491
7492 * array-notation-common.c : Adjust include files.
7493 * c-ada-spec.c : Likewise.
7494 * c-cilkplus.c : Likewise.
7495 * c-common.c : Likewise.
7496 * c-common.h : Likewise.
7497 * c-cppbuiltin.c : Likewise.
7498 * c-dump.c : Likewise.
7499 * c-format.c : Likewise.
7500 * c-gimplify.c : Likewise.
7501 * c-indentation.c : Likewise.
7502 * c-lex.c : Likewise.
7503 * c-omp.c : Likewise.
7504 * c-opts.c : Likewise.
7505 * c-pch.c : Likewise.
7506 * c-ppoutput.c : Likewise.
7507 * c-pragma.c : Likewise.
7508 * c-pretty-print.c : Likewise.
7509 * c-semantics.c : Likewise.
7510 * c-ubsan.c : Likewise.
7511 * cilk.c : Likewise.
7512 * stub-objc.c : Likewise.
7513
a1661b90
MP
75142015-06-08 Marek Polacek <polacek@redhat.com>
7515
7516 PR c/66415
7517 * c-format.c (location_from_offset): Return LOC if LINE is null.
7518
d7438551
AH
75192015-06-05 Aldy Hernandez <aldyh@redhat.com>
7520
7521 * c-common.h (c_parse_final_cleanups): New prototype.
7522 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7523
b3d5bc62
JJ
75242015-06-04 Sriraman Tallam <tmsriram@google.com>
7525
7526 * c-common.c (noplt): New attribute.
7527 (handle_noplt_attribute): New handler.
7528
ecb9f223
AM
75292015-06-04 Andrew MacLeod <amacleod@redhat.com>
7530
7531 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7532 * c-ada-spec.c: Likewise.
7533 * c-cilkplus.c: Likewise.
7534 * c-common.c: Likewise.
7535 * c-common.h: Likewise.
7536 * c-cppbuiltin.c: Likewise.
7537 * c-dump.c: Likewise.
7538 * c-format.c: Likewise.
7539 * c-gimplify.c: Likewise.
7540 * c-indentation.c: Likewise.
7541 * c-lex.c: Likewise.
7542 * c-omp.c: Likewise.
7543 * c-opts.c: Likewise.
7544 * c-pch.c: Likewise.
7545 * c-ppoutput.c: Likewise.
7546 * c-pragma.c: Likewise.
7547 * c-pretty-print.c: Likewise.
7548 * c-semantics.c: Likewise.
7549 * c-ubsan.c: Likewise.
7550 * cilk.c: Likewise.
7551 * stub-objc.c: Likewise.
7552
6ac48155
DM
75532015-06-02 David Malcolm <dmalcolm@redhat.com>
7554
7555 PR c/66220:
7556 * c-indentation.c (should_warn_for_misleading_indentation): Use
7557 expand_location rather than expand_location_to_spelling_point.
7558 Don't warn if the guarding statement is more indented than the
7559 next/body stmts.
7560
773ce42e
DM
75612015-06-02 David Malcolm <dmalcolm@redhat.com>
7562
7563 * c-indentation.c (warn_for_misleading_indentation): Bail out
7564 immediately if -Wmisleading-indentation isn't enabled.
7565
4fef8379
ML
75662015-06-01 Martin Liska <mliska@suse.cz>
7567
7568 * c-format.c (check_format_arg):Use new type-based pool allocator.
7569 (check_format_info_main) Likewise.
7570
1edfb384
EB
75712015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7572
7573 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7574 (has_nontrivial_methods): Likewise.
7575
9677ef52
MP
75762015-05-25 Marek Polacek <polacek@redhat.com>
7577
7578 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7579
fd5c817a
MP
75802015-05-22 Marek Polacek <polacek@redhat.com>
7581
7582 PR c/47043
7583 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7584
a2f45fe6 75852015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7586
7587 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7588 STACK_GROWS_DOWNWARD.
7589
a2f45fe6 75902015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7591
7592 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7593 STACK_GROWS_DOWNWARD rather than if it is defined.
7594
0fee2ac2 75952015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7596
0fee2ac2
MLI
7597 PR c/52952
7598 * c-format.c (location_column_from_byte_offset): New.
7599 (location_from_offset): New.
7600 (struct format_wanted_type): Add offset_loc field.
7601 (check_format_info): Move handling of location for extra arguments
7602 closer to the point of warning.
7603 (check_format_info_main): Pass the result of location_from_offset
7604 to warning_at.
7605 (format_type_warning): Pass the result of location_from_offset
7606 to warning_at.
7607
cf4ef6f7
MP
76082015-05-20 Marek Polacek <polacek@redhat.com>
7609
7610 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7611
3a65ee74
MP
76122015-05-20 Marek Polacek <polacek@redhat.com>
7613
7614 * c-ada-spec.c (dump_sloc): Use DECL_P.
7615
21b634ae
MP
76162015-05-20 Marek Polacek <polacek@redhat.com>
7617
7618 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7619 * c-common.c: Likewise.
7620
0e50b624
DM
76212015-05-19 David Malcolm <dmalcolm@redhat.com>
7622
7623 * c-common.h (fe_file_change): Strengthen param from
7624 const line_map * to const line_map_ordinary *.
7625 (pp_file_change): Likewise.
7626 * c-lex.c (fe_file_change): Likewise.
7627 (cb_define): Use linemap_check_ordinary when invoking
7628 SOURCE_LINE.
7629 (cb_undef): Likewise.
7630 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7631 invoking cb_file_change.
7632 (c_finish_options): Likewise.
7633 (push_command_line_include): Likewise.
7634 (cb_file_change): Strengthen param "new_map" from
7635 const line_map * to const line_map_ordinary *.
7636 * c-ppoutput.c (cb_define): Likewise for local "map".
7637 (pp_file_change): Likewise for param "map" and local "from".
7638
fab27f52
MM
76392015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7640
7641 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7642
2fe1d762
TV
76432015-05-18 Tom de Vries <tom@codesourcery.com>
7644
7645 * c-common.c (build_va_arg_1): New function.
7646 (build_va_arg): Add address operator to va_list operand if necessary.
7647
7a37fa90
MM
76482015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7649
7650 PR c/48956
7651 * c-common.c (int_safely_convertible_to_real_p): Define.
7652 (unsafe_conversion_p): Check conversions involving complex types.
7653 (conversion_warning): Add new warning message for conversions which
7654 discard imaginary component.
7655 * c-common.h: (enum conversion_safety): Add new enumerator for such
7656 conversions.
7657
3aa3c9fc
MP
76582015-05-14 Marek Polacek <polacek@redhat.com>
7659
7660 PR c/66066
7661 PR c/66127
7662 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7663 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7664 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7665 use it. If FOR_INT_CONST, require that all evaluated operands be
7666 INTEGER_CSTs.
7667
c3388e62
DM
76682015-05-12 David Malcolm <dmalcolm@redhat.com>
7669
7670 * c-common.h (warn_for_misleading_indentation): New prototype.
7671 * c-indentation.c: New file.
7672 * c.opt (Wmisleading-indentation): New option.
7673
c7b38fd5
TV
76742015-05-12 Tom de Vries <tom@codesourcery.com>
7675
7676 PR tree-optimization/66010
7677 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7678
381bf11e
JM
76792015-05-09 Jason Merrill <jason@redhat.com>
7680
edff0c06
JM
7681 * c-opts.c (c_common_post_options): Also clear
7682 cpp_opts->cpp_warn_cxx11_compat.
7683
129211bc
JM
7684 * c-common.h (enum cxx_dialect): Add cxx_unset.
7685 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7686 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7687
381bf11e
JM
7688 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7689 (std=gnu++0x): Mark as Undocumented.
7690 (std=gnu++1y): Add deprecated message.
7691
fe191308
JM
76922015-05-08 Jason Merrill <jason@redhat.com>
7693
765189ff
JM
7694 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7695 * c-opts.c: Adjust.
7696
fe191308
JM
7697 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7698
755e528f
MP
76992015-05-08 Marek Polacek <polacek@redhat.com>
7700
7701 PR c/64918
7702 * c.opt (Woverride-init-side-effects): New option.
7703
0173bd2a
MP
77042015-05-07 Marek Polacek <polacek@redhat.com>
7705
7706 PR c/65179
7707 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7708 negative value.
7709 * c.opt (Wshift-negative-value): New option.
7710 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7711 when -Wextra and C99/C++11 mode.
7712
e0f0d3b9
MP
77132015-05-07 Marek Polacek <polacek@redhat.com>
7714 Martin Uecker <uecker@eecs.berkeley.edu>
7715
7716 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7717 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7718
8243e2a9
JM
77192015-05-05 Jason Merrill <jason@redhat.com>
7720
7721 * c.opt (Wterminate): New.
7722
577cd070
MP
77232015-04-30 Marek Polacek <polacek@redhat.com>
7724
7725 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7726 require that the non-constant be of a boolean type.
7727
0373796b
JT
77282015-04-29 Josh Triplett <josh@joshtriplett.org>
7729
e0f0d3b9
MP
7730 * c-common.c (handle_section_attribute): Refactor to reduce
7731 nesting and distinguish between error cases.
0373796b 7732
716c0ba6
MP
77332015-04-29 Marek Polacek <polacek@redhat.com>
7734
7735 PR c/64610
7736 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7737 with 0/1.
7738
8848828b
JJ
77392015-04-29 Jakub Jelinek <jakub@redhat.com>
7740
7741 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7742 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7743 HOST_BITS_PER_WIDE_INT.
7744
ecd0e562
TV
77452015-04-28 Tom de Vries <tom@codesourcery.com>
7746
7747 PR tree-optimization/65887
7748 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7749
2a877204 77502015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7751 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7752
7753 * c-ada-spec.c (in_function): Delete.
7754 (dump_generic_ada_node): Do not change in_function and remove the
7755 redundant code dealing with it.
7756 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7757 (print_ada_methods): Output the static member functions in a nested
7758 package after the regular methods as well as associated renamings.
7759
4853031e
MP
77602015-04-24 Marek Polacek <polacek@redhat.com>
7761
7762 PR c/65830
7763 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7764 and OPT_Wshift_count_overflow.
7765
8c2b7f79
MP
7766 PR c/63357
7767 * c-common.c (warn_logical_operator): Warn if the operands have the
7768 same expressions.
7769
b8787813
MP
77702015-04-24 Marek Polacek <polacek@redhat.com>
7771
7772 PR c/61534
7773 * c-common.c (warn_logical_operator): Bail if either operand comes
7774 from a macro expansion.
7775
8fba1830
BRF
77762015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7777
7778 PR target/55143
7779 * c-common.c (c_default_pointer_mode): Add definition.
7780 * c-common.h (c_default_pointer_mode): Add declaration.
7781
17958621
JJ
77822015-03-11 Jakub Jelinek <jakub@redhat.com>
7783
7784 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7785 on record_builtin_type argument.
7786
7ccb1a11
JJ
77872015-03-10 Jakub Jelinek <jakub@redhat.com>
7788
7789 PR c/65120
7790 * c-common.c (warn_logical_not_parentheses): Don't warn for
7791 !x == 0 or !x != 0.
7792
04fd785e
MP
77932015-03-07 Marek Polacek <polacek@redhat.com>
7794
7795 PR sanitizer/65280
7796 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7797 before trying to figure out whether we have a flexible array member.
7798
a4e26206 77992015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7800 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7801
7802 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7803
0d2489f4
EB
78042015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7805
7806 PR ada/65319
7807 * c-ada-spec.c (print_destructor): Remove obsolete code.
7808
83ed54d7
EB
78092015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7810
7811 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7812 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7813 DECL_TEMPLATE_RESULT emulations.
7814 (dump_ada_template)): Add guard for TYPE_METHODS.
7815
7631f0e2
MP
78162015-02-27 Marek Polacek <polacek@redhat.com>
7817
7818 PR c/65040
7819 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7820
d1783ae5
KT
78212015-02-27 Kai Tietz <ktietz@redhat.com>
7822
7823 PR c/35330
7824 * c-pragma.c (handle_pragma_weak): Do not try to create
7825 weak/alias of declarations not being function, or variable
7826 declarations.
7827
56a9f6bc
TS
78282015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7829
7830 PR libgomp/64625
7831 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7832 Remove macros.
7833 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7834
3d5cb23d
MP
78352015-02-16 Marek Polacek <polacek@redhat.com>
7836
7837 PR c/65066
7838 * c-format.c (check_format_types): Handle null param.
7839
fa008882
MP
78402015-02-13 Marek Polacek <polacek@redhat.com>
7841
7842 PR c/65040
7843 * c-format.c (check_format_types): Don't warn about different
7844 signedness if the original value is in the range of WANTED_TYPE.
7845
785f21af
JM
78462015-02-12 Jason Merrill <jason@redhat.com>
7847
7848 PR c++/64956
7849 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7850 to the current highest version.
7851 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7852
4886ec8e
JJ
78532015-02-04 Jakub Jelinek <jakub@redhat.com>
7854
7855 PR c/64824
7856 PR c/64868
7857 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7858 instead of RDIV_EXPR. Use build_binary_op instead of
7859 build2_loc.
7860
40fecdd6
JM
78612015-01-30 Joseph Myers <joseph@codesourcery.com>
7862
7863 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7864 to pass input_location as first argument.
7865
a0c88d06
TV
78662015-01-23 Tom de Vries <tom@codesourcery.com>
7867
7868 PR libgomp/64672
7869 * c.opt (fopenacc): Mark as LTO option.
7870
1506ae0e
TV
78712015-01-23 Tom de Vries <tom@codesourcery.com>
7872
7873 PR libgomp/64707
7874 * c.opt (fopenmp): Mark as LTO option.
7875
31be63ab
JJ
78762015-01-21 Jakub Jelinek <jakub@redhat.com>
7877
7878 PR c/63307
b1726d6c 7879 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7880 (compare_decls): Fix up formatting.
7881
78822015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7883
7884 PR c/63307
7885 * cilk.c: Include vec.h.
7886 (struct cilk_decls): New structure.
7887 (wrapper_parm_cb): Split this function to...
7888 (fill_decls_vec): ...this...
7889 (create_parm_list): ...and this.
7890 (compare_decls): New function.
7891 (for_local_cb): Remove.
7892 (wrapper_local_cb): Ditto.
7893 (build_wrapper_type): For now first traverse and fill vector of
7894 declarations then sort it and then deal with sorted vector.
7895 (cilk_outline): Ditto.
7896 (declare_one_free_variable): Ditto.
7897
6875457f
JM
78982015-01-21 Jason Merrill <jason@redhat.com>
7899
7900 PR c++/64629
7901 * c-format.c (check_format_arg): Call decl_constant_value.
7902
185c9e56
ML
79032015-01-19 Martin Liska <mliska@suse.cz>
7904
7905 * c-common.c (handle_noicf_attribute): New function.
7906
41dbbb37
TS
79072015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7908 Bernd Schmidt <bernds@codesourcery.com>
7909 James Norris <jnorris@codesourcery.com>
7910 Cesar Philippidis <cesar@codesourcery.com>
7911 Ilmir Usmanov <i.usmanov@samsung.com>
7912 Jakub Jelinek <jakub@redhat.com>
7913
7914 * c.opt (fopenacc): New option.
7915 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7916 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7917 New macros.
7918 * c-common.h (c_finish_oacc_wait): New prototype.
7919 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7920 (c_finish_oacc_wait): New function.
7921 * c-pragma.c (oacc_pragmas): New variable.
7922 (c_pp_lookup_pragma, init_pragma): Handle it.
7923 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7924 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7925 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7926 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7927 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7928 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7929 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7930 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7931 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7932 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7933 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7934 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7935 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7936 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7937 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7938 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7939 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7940 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7941 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7942 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7943 PRAGMA_OACC_CLAUSE_WORKER.
7944
3f8257db 79452015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7946
7947 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7948 for the new option fstack-protector_explicit.
7949 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7950 (handle_stack_protect_attribute): New function.
7951
3f8257db 79522015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7953
7954 * c.opt: New option -Warray-bounds=.
7955
adfac8df
JJ
79562015-01-09 Michael Collison <michael.collison@linaro.org>
7957
7958 * array-notation-common.c: Include hash-set.h, machmode.h,
7959 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7960 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7961 * c-ada-spec.c: Ditto.
7962 * c-cilkplus.c: Ditto.
7963 * c-common.c: Include input.h due to flattening of tree.h.
7964 Define macro GCC_C_COMMON_C.
7965 * c-common.h: Flatten tree.h header files into c-common.h.
7966 Remove include of tree-core.h.
7967 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7968 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7969 fold-const.h, wide-int.h, and inchash.h due to
7970 flattening of tree.h.
7971 * c-dump.c: Ditto.
7972 * c-format.c: Flatten tree.h header files into c-common.h.
7973 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7974 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7975 fold-const.h, wide-int.h, and inchash.h due to
7976 flattening of tree.h.
7977 * c-dump.c: Include hash-set.h, machmode.h,
7978 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7979 fold-const.h, wide-int.h, and inchash.h due to
7980 flattening of tree.h.
7981 * c-format.c: Include hash-set.h, machmode.h,
7982 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7983 fold-const.h, wide-int.h, inchash.h and real.h due to
7984 flattening of tree.h.
7985 * c-gimplify.c: Include hash-set.h, machmode.h,
7986 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7987 fold-const.h, wide-int.h, and inchash.h due to
7988 flattening of tree.h.
7989 * cilk.c: Ditto.
7990 * c-lex.c: Ditto.
7991 * c-omp.c: Ditto.
7992 * c-opts.c: Ditto.
7993 * c-pch.c: Ditto.
7994 * c-ppoutput.c: Ditto.
7995 * c-pragma.c: Ditto.
7996 * c-pretty-print.c: Ditto.
7997 * c-semantics.c: Ditto.
7998 * c-ubsan.c: Ditto.
7999 * stub-objc.c: Ditto.
8000
f5481fc4
JM
80012015-01-08 Jason Merrill <jason@redhat.com>
8002
8003 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8004 do_ubsan_in_current_function.
8005 (ubsan_maybe_instrument_reference_or_call): Likewise.
8006 * c-ubsan.h: Declare it.
8007
de35aa66
MS
80082015-01-08 Mike Stump <mikestump@comcast.net>
8009
8010 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8011
4a9a42ab
MP
80122015-01-07 Marek Polacek <polacek@redhat.com>
8013
8014 PR c/64440
8015 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8016 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8017
2f42e5de
TS
80182015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8019
8020 PR c++/31397
8021 * c.opt (Wsuggest-override): New option.
8022
5624e564
JJ
80232015-01-05 Jakub Jelinek <jakub@redhat.com>
8024
8025 Update copyright years.
8026
5bd012f8
MP
80272015-01-05 Marek Polacek <polacek@redhat.com>
8028
8029 PR c/64423
8030 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8031 parameter. Use it.
8032 * c-common.h (warn_array_subscript_with_type_char): Update
8033 declaration.
8034
a7fa8d18
ESR
80352014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8036
8037 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8038 Control macro with flag_sized_deallocation.
8039
3f8257db 80402014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8041
8042 * c.opt (Wdiscarded-array-qualifiers): New option.
8043
1f8d3e84
JJ
80442014-12-19 Jakub Jelinek <jakub@redhat.com>
8045
8046 PR preprocessor/63831
8047 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8048 and __has_cpp_attribute here.
8049 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8050 c_common_has_attribute.
8051 * c-common.h (c_common_has_attribute): New prototype.
8052 * c-lex.c (init_c_lex): Set cb->has_attribute to
8053 c_common_has_attribute instead of cb_has_attribute.
8054 (get_token_no_padding): New function.
8055 (cb_has_attribute): Renamed to ...
8056 (c_common_has_attribute): ... this. No longer static. Use
8057 get_token_no_padding, require ()s, don't build TREE_LIST
8058 unnecessarily, fix up formatting, adjust diagnostics, call
8059 init_attributes.
8060
20b06add
JM
80612014-12-15 Jason Merrill <jason@redhat.com>
8062
8063 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8064 (-Wsized-deallocation): New.
8065 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8066 to on in C++14 and up.
8067
94a073b2
JM
80682014-12-11 Jason Merrill <jason@redhat.com>
8069
acaa5911
JM
8070 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8071
94a073b2
JM
8072 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8073 we aren't complaining about VLAs.
8074
7fb66c15
MP
80752014-12-06 Marek Polacek <polacek@redhat.com>
8076
8077 PR tree-optimization/64183
8078 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8079 shift-expression if it is integer_type_node. Use types_compatible_p.
8080
b731b390
JJ
80812014-11-29 Jakub Jelinek <jakub@redhat.com>
8082
8083 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8084 last argument from create_tmp_var_raw and create_tmp_var calls.
8085 * cilk.c (gimplify_cilk_spawn): Likewise.
8086 * c-omp.c (c_finish_omp_atomic): Likewise.
8087
6a4da643
MP
80882014-11-28 Marek Polacek <polacek@redhat.com>
8089
8090 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8091 instead of unsigned_type_node.
8092
541e35a6
MP
80932014-11-28 Marek Polacek <polacek@redhat.com>
8094
8095 PR c/63862
8096 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8097 to op1_utype.
8098 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8099 expression to unsigned_type_node.
8100
dcc97066
MW
81012014-11-20 Mark Wielaard <mjw@redhat.com>
8102
8103 PR debug/38757
8104 * c-opts.c (set_std_c89): Set lang_hooks.name.
8105 (set_std_c99): Likewise.
8106 (set_std_c11): Likewise.
8107 (set_std_cxx98): Likewise.
8108 (set_std_cxx11): Likewise.
8109 (set_std_cxx14): Likewise.
8110 (set_std_cxx1z): Likewise.
8111
aa7da51a
JJ
81122014-11-21 Jakub Jelinek <jakub@redhat.com>
8113
8114 PR target/63764
8115 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8116 return type to bool.
009a3480 8117 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
8118 (convert_vector_to_pointer_for_subscript): Change return type to
8119 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8120 and copy it into a TARGET_EXPR and use that instead of *vecp
8121 directly.
8122
538dd0b7
DM
81232014-11-19 David Malcolm <dmalcolm@redhat.com>
8124
8125 Merger of git branch "gimple-classes-v2-option-3".
8126 * ChangeLog.gimple-classes: New.
8127 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8128 from being just a vec<gimple> to a vec<gbind *>.
8129
c39a5e99
JJ
81302014-11-18 Jakub Jelinek <jakub@redhat.com>
8131
8132 PR sanitizer/63813
8133 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8134 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8135 get_pointer_alignment for non-pointers. Use ptype, or if it is
8136 reference type, corresponding pointer type, as type of kind
8137 argument.
8138 (ubsan_maybe_instrument_reference,
8139 ubsan_maybe_instrument_member_call): Adjust callers.
8140
8537a4a9
MP
81412014-11-15 Marek Polacek <polacek@redhat.com>
8142
8143 PR middle-end/63884
8144 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8145 for NULL fndecl.
8146 (extract_array_notation_exprs): Return for NULL node.
8147
2079956a
JM
81482014-11-12 Joseph Myers <joseph@codesourcery.com>
8149
8150 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8151 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8152
1304953e
JJ
81532014-11-12 Jakub Jelinek <jakub@redhat.com>
8154
8155 PR c/59708
8156 * c-common.c (check_builtin_function_arguments): Handle
8157 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8158
e5e44252
AK
81592014-11-10 Andi Kleen <ak@linux.intel.com>
8160
8161 PR c/60804
8162 * c-common.h (check_no_cilk): Declare.
8163 * cilk.c (get_error_location): New function.
8164 (check_no_cilk): Dito.
8165
e64b984d
AK
81662014-11-10 Andi Kleen <ak@linux.intel.com>
8167
8168 * cilk.c (recognize_spawn): Use expression location
8169 for error message.
8170
13c21655
PC
81712014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8172
8173 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8174
42fd12b1
ESR
81752014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8176
8177 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8178 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8179 (__cpp_range_based_for, __cpp_initializer_lists,
8180 __cpp_delegating_constructors, __cpp_nsdmi,
8181 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8182 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8183 __has_cpp_attribute.
8184 * c-lex.c (cb_has_attribute): New callback CPP function;
8185 (init_c_lex): Set has_attribute callback.
8186
6f450181
RB
81872014-11-04 Richard Biener <rguenther@suse.de>
8188
8189 * c-common.c (shorten_compare): Do not shorten mixed
8190 DFP and non-DFP compares.
8191
26f0e1d6
ESR
81922014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8193
8194 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8195 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8196 Commentary and rearrangement of tests.
8197 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8198 Commentary and rearrangement of tests.
ab20d992 8199 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
8200 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8201
ef4bddc2
RS
82022014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8203
8204 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8205 enum from machine_mode.
8206
c582198b
AM
82072014-10-28 Andrew MacLeod <amacleod@redhat.com>
8208
adfac8df
JJ
8209 * c-common.c: Adjust include files.
8210 * c-gimplify.c: Ditto.
8211 * cilk.c: Ditto.
8212 * c-pragma.c: Ditto.
8213 * c-ubsan.c: Ditto.
c582198b 8214
60393bbc
AM
82152014-10-27 Andrew MacLeod <amacleod@redhat.com>
8216
8217 * c-gimplify.c: Adjust include files.
8218
d723bb7c
MLI
82192014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8220
8221 PR c++/53061
8222 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8223 c_common_initialize_diagnostics.
8224 * c-common.h: Likewise.
8225
90f3520e
MP
82262014-10-24 Marek Polacek <polacek@redhat.com>
8227
8228 PR c/56980
8229 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8230 print "struct"/"union"/"enum" for typedefed names.
8231
59d7607a
MP
82322014-10-23 Marek Polacek <polacek@redhat.com>
8233
8234 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8235 in unsigned type.
8236
d95a2703
JJ
82372014-10-22 Jakub Jelinek <jakub@redhat.com>
8238 Yury Gribov <y.gribov@samsung.com>
8239
8240 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8241 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8242 instead of flag_sanitize_recover as bool flag.
8243
8e6ef852
KY
82442014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8245
8246 * cilk.c: Revert previous change.
8247
948cf550
IZ
82482014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8249
8250 PR c/63307
8251 * cilk.c: Include vec.h.
8252 (struct cilk_decls): New structure.
8253 (wrapper_parm_cb): Split this function to...
8254 (fill_decls_vec): ...this...
8255 (create_parm_list): ...and this.
8256 (compare_decls): New function.
8257 (for_local_cb): Remove.
8258 (wrapper_local_cb): Ditto.
8259 (build_wrapper_type): For now first traverse and fill vector of
8260 declarations then sort it and then deal with sorted vector.
8261 (cilk_outline): Ditto.
8262 (declare_one_free_variable): Ditto.
8263
92574c7c
MP
82642014-10-17 Marek Polacek <polacek@redhat.com>
8265
8266 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8267 * c.opt (Wimplicit-int): Initialize to -1.
8268
83685514
AM
82692014-10-16 Andrew MacLeod <amacleod@redhat.com>
8270
8271 * c-pragma.c: Adjust include files.
8272 * c-semantics.c: Likewise.
8273
5b8300ea
DD
82742014-10-16 DJ Delorie <dj@redhat.com>
8275
8276 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8277 multiples of bytes.
8278
5f83e90b
JM
82792014-10-14 Jason Merrill <jason@redhat.com>
8280
8281 PR c++/63455
8282 * c-common.h (CPP_PREPARSED_EXPR): New.
8283 (N_CP_TTYPES): Adjust.
8284
d73326ca
MP
82852014-10-15 Marek Polacek <polacek@redhat.com>
8286
8287 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8288
78a7c317
DD
82892014-10-14 DJ Delorie <dj@redhat.com>
8290
8291 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8292 types, not just __int128.
8293 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8294 types, not just __int128.
8295 (cpp_atomic_builtins): Round pointer sizes up.
8296 (type_suffix): Use type precision, not specific types.
8297 * c-common.c (c_common_reswords): Remove __int128 special case.
8298 (c_common_type_for_size): Check for all __intN types, not just
8299 __int128.
8300 (c_common_type_for_mode): Likewise.
8301 (c_common_signed_or_unsigned_type): Likewise.
8302 (c_build_bitfield_integer_type): Likewise.
8303 (c_common_nodes_and_builtins): Likewise.
8304 (keyword_begins_type_specifier): Likewise.
8305 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8306 __intN variants.
8307
2a22f99c
TS
83082014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8309
8310 * c-common.c: Use hash_table instead of hashtab.
8311
2a8ef767
ESR
83122014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8313
adfac8df 8314 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8315 C++11 section.
8316
3c9aabbd
MG
83172014-10-03 Marc Glisse <marc.glisse@inria.fr>
8318
8319 PR c++/54427
8320 PR c++/57198
8321 PR c++/58845
8322 * c-common.c (warn_logical_operator): Punt for vectors.
8323
a15f7cb8
ESR
83242014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8325
8326 Implement SD-6: SG10 Feature Test Recommendations
8327 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8328 macros and the __has_header macro.
8329
8d0cf15e
JM
83302014-09-30 Jason Merrill <jason@redhat.com>
8331
dd5d5481
JM
8332 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8333 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8334 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8335
b752325e
JM
8336 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8337 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8338
8d0cf15e
JM
8339 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8340 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8341
083e891e
MP
83422014-09-24 Marek Polacek <polacek@redhat.com>
8343
8344 PR c/61405
8345 PR c/53874
8346 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8347
7861b648
AK
83482014-09-23 Andi Kleen <ak@linux.intel.com>
8349
8350 * c-common.c (handle_no_reorder_attribute): New function.
8351 (c_common_attribute_table): Add no_reorder attribute.
8352
9a79452d
JM
83532014-09-22 Joseph Myers <joseph@codesourcery.com>
8354
8355 * c-cppbuiltin.c (c_cpp_builtins): Define
8356 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8357 modes.
8358
dd69f047
JM
83592014-09-18 Joseph Myers <joseph@codesourcery.com>
8360
8361 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8362 for supported floating-point modes.
8363
737a4826
MLI
83642014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8365
8366 * c.opt (Wpsabi): Use LangEnabledBy.
8367 * c-opts.c (c_common_handle_option): Do not handle here.
8368
8cc4b7a2
JM
83692014-09-12 Joseph Myers <joseph@codesourcery.com>
8370
8371 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8372 macros for floating-point modes.
8373
179b5a55
MG
83742014-09-11 Marc Glisse <marc.glisse@inria.fr>
8375
8376 PR target/58757
8377 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8378 __*_DENORM_MIN__ without denormals.
8379
570a11fe
JJ
83802014-09-10 Jakub Jelinek <jakub@redhat.com>
8381
8382 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8383 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8384 ubsan_create_data callers.
8385 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8386 index is constant or BIT_AND_EXPR with constant mask and is
8387 small enough for the bound.
8388 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8389 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8390
b559c810
MLI
83912014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8392
8393 * c.opt: Add CppReason to various flags.
8394 (Wdate-time): Re-sort.
8395 * c-common.c: Include c-common.h earlier.
8396 (struct reason_option_codes_t): Delete.
8397 (c_option_controlling_cpp_error): Prefix global type and struct
8398 with cpp_.
8399
1ef33fd4
MLI
84002014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8401
8402 * c.opt (Wnormalized): New.
8403 (Wnormalized=): Use Enum and Reject Negative.
8404 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8405
66bb34c0
JM
84062014-09-08 Joseph Myers <joseph@codesourcery.com>
8407
8408 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8409 digits of floating-point modes if -fbuilding-libgcc.
8410
53d68b9f
JM
84112014-09-05 Joseph Myers <joseph@codesourcery.com>
8412
8413 * c-cppbuiltin.c (c_cpp_builtins): Also define
8414 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8415 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8416 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8417 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8418 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8419 __LIBGCC_STACK_GROWS_DOWNWARD__,
8420 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8421 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8422 __LIBGCC_DWARF_FRAME_REGISTERS__,
8423 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8424 __LIBGCC_STACK_POINTER_REGNUM__ and
8425 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8426 (builtin_define_with_value): Handle backslash-escaping in string
8427 macro values.
8428
f65586dc
RB
84292014-09-05 Richard Biener <rguenther@suse.de>
8430
8431 PR middle-end/63148
8432 * c-format.c (check_format_arg): Properly handle
8433 effectively signed POINTER_PLUS_EXPR offset.
8434
2b71f4a4
MLI
84352014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8436
8437 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8438 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8439 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8440 and Init.
8441 * c-opts.c (c_common_handle_option): Do not handle here.
8442 (sanitize_cpp_opts): Likewise.
8443 * c-common.c (struct reason_option_codes_t): Handle
8444 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8445
d2e4feca
MP
84462014-09-03 Marek Polacek <polacek@redhat.com>
8447
8448 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8449
9a771876
JJ
84502014-09-02 Jakub Jelinek <jakub@redhat.com>
8451 Balaji V. Iyer <balaji.v.iyer@intel.com>
8452 Igor Zamyatin <igor.zamyatin@intel.com>
8453
8454 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8455 * c-common.c (c_common_reswords): Added _Cilk_for.
8456 * c-common.h (enum rid): Added RID_CILK_FOR.
8457 (cilk_for_number_of_iterations): Add declaration.
8458 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8459 CILK_FOR.
8460 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8461 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8462
81b5d104
MLI
84632014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8464
8465 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8466 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8467 Wundef): Use CPP, Var and Init.
8468 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8469
b753b37b
MLI
84702014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8471
8472 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8473 * c-opts.c (c_common_handle_option): Do not handle here.
8474
028aee17
JM
84752014-08-25 Jason Merrill <jason@redhat.com>
8476
8477 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8478 -std=c++14 and -std=gnu++14, rather than the reverse.
8479 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8480 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8481 * c-common.h (cxx_dialect): Remove cxx1y.
8482
e4276ba5
ESR
84832014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8484
8485 * c-common.h (enum cxx_dialect): Add cxx14.
8486 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8487 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8488 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8489
a545cacd
JM
84902014-08-22 Jason Merrill <jason@redhat.com>
8491
8492 * c.opt (std=gnu++17): Fix alias.
8493
59ea0364
MP
84942014-08-22 Marek Polacek <polacek@redhat.com>
8495
8496 PR c++/62199
8497 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8498 check for vector types. Drop LHS argument.
8499 * c-common.h (warn_logical_not_parentheses): Adjust.
8500
596e808c
MLI
85012014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8502
8503 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8504 (Wmultichar): Likewise.
8505 (Wdate-time): Use C-family languages instead of Common. Use CPP
8506 and Var.
8507 * c-opts.c (c_common_handle_option): Do not handle the above
8508 options here.
8509 (sanitize_cpp_opts): Likewise.
8510
18767f65
MLI
85112014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8512
8513 PR fortran/44054
8514 * c-opts.c: Include tree-diagnostics.h.
8515 (c_diagnostic_finalizer): New.
8516 (c_common_initialize_diagnostics): Use it.
8517
b4413594
MLI
85182014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8519
8520 PR preprocessor/51303
8521 * c-common.c (struct reason_option_codes_t option_codes):
8522 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8523
43f9a13c
MLI
85242014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8525
8526 PR c/60975
8527 PR c/53063
8528 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8529 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8530 (c_common_post_options): Call init_global_opts_from_cpp.
8531 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8532
04159acf
MP
85332014-08-19 Marek Polacek <polacek@redhat.com>
8534
8535 PR c++/62153
8536 * c-common.c (maybe_warn_bool_compare): New function.
8537 * c-common.h (maybe_warn_bool_compare): Declare.
8538 * c.opt (Wbool-compare): New option.
8539
35aff4fb
MP
85402014-08-19 Marek Polacek <polacek@redhat.com>
8541
8542 * c.opt (Wc99-c11-compat): New option.
8543
177cce46
MP
85442014-08-19 Marek Polacek <polacek@redhat.com>
8545
8546 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8547 to warn_c90_c99_compat.
8548 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8549 to -1.
8550
6ae9194f
MLI
85512014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8552 Steven Bosscher <steven@gcc.gnu.org>
8553
8554 PR c/52952
8555 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8556 format_check_results.
8557 (check_function_format): Use true and add comment for boolean
8558 argument.
8559 (finish_dollar_format_checking): Use explicit location when warning.
8560 (check_format_info): Likewise.
8561 (check_format_arg): Set extra_arg_loc and format_string_loc.
8562 (check_format_info_main): Use explicit location when warning.
8563 (check_format_types): Pass explicit location.
8564 (format_type_warning): Likewise.
8565
8e54f6d3
MLI
85662014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8567
8568 PR fortran/44054
8569 * c-format.c: Handle Fortran flags.
8570
cd4e76fc
IZ
85712014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8572
8573 PR other/61962
8574 * array-notation-common.c (find_rank): Added handling for other
8575 types of references.
8576
f3bede71
MP
85772014-08-10 Marek Polacek <polacek@redhat.com>
8578
8579 PR c/51849
8580 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8581 * c.opt (Wc90-c99-compat): Add option.
8582
9f25a338
TS
85832014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8584
8585 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8586
62e4eb35
MP
85872014-08-03 Marek Polacek <polacek@redhat.com>
8588
ab20d992 8589 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8590 (c_add_case_label): Pass loc to check_case_value.
8591
b787e7a2
TS
85922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8593
8594 * cilk.c: Use hash_map instead of pointer_map.
8595
6e2830c3
TS
85962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8597
8598 * c-gimplify.c: Use hash_set instead of pointer_set.
8599
a7ee52fb
IZ
86002014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8601
8602 PR middle-end/61455
8603 * array-notation-common.c (extract_array_notation_exprs): Handling
8604 of DECL_EXPR added.
8605
944fa280
JJ
86062014-08-01 Jakub Jelinek <jakub@redhat.com>
8607
8608 * c-common.h (min_align_of_type): Removed prototype.
8609 * c-common.c (min_align_of_type): Removed.
8610 * c-ubsan.h (ubsan_maybe_instrument_reference,
8611 ubsan_maybe_instrument_member_call): New prototypes.
8612 * c-ubsan.c: Include stor-layout.h and builtins.h.
8613 (ubsan_maybe_instrument_reference_or_call,
8614 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8615 functions.
8616
b4dfdc11
MG
86172014-07-31 Marc Glisse <marc.glisse@inria.fr>
8618
8619 PR c++/60517
8620 * c.opt (-Wreturn-local-addr): Move to common.opt.
8621
a41844e5
JM
86222014-07-30 Jason Merrill <jason@redhat.com>
8623
8624 PR c++/61659
8625 PR c++/61687
8626 Revert:
8627 * c.opt (-fuse-all-virtuals): New.
8628
976d5a22
TT
86292014-07-30 Tom Tromey <tromey@redhat.com>
8630
8631 PR c/59855
8632 * c.opt (Wdesignated-init): New option.
8633 * c-common.c (c_common_attribute_table): Add "designated_init".
8634 (handle_designated_init): New function.
8635
cdc94aca
MP
86362014-07-24 Marek Polacek <polacek@redhat.com>
8637
8638 PR c/57653
8639 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8640
f41373b6
DS
86412014-07-16 Dodji Seketeli <dodji@redhat.com>
8642
8643 PR preprocessor/60723 - missing system-ness marks for macro tokens
8644 * c-ppoutput.c (struct print::prev_was_system_token): New data
8645 member.
8646 (init_pp_output): Initialize it.
8647 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8648 (do_line_change): Return a flag saying if a line marker was
8649 emitted or not.
8650 (scan_translation_unit): Detect if the system-ness of the token we
8651 are about to emit is different from the one of the previously
8652 emitted token. If so, emit a line marker. Avoid emitting useless
8653 adjacent line markers. Avoid emitting line markers for tokens
8654 originating from the expansion of built-in macros.
8655 (scan_translation_unit_directives_only): Adjust.
8656
4d661eaa
MP
86572014-07-15 Marek Polacek <polacek@redhat.com>
8658
8659 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8660 TYPE_MAX_VALUE is NULL.
8661
b108f48f
JJ
86622014-07-14 Jakub Jelinek <jakub@redhat.com>
8663
8664 PR middle-end/61294
8665 * c.opt (Wmemset-transposed-args): New warning.
8666
c0221884
JM
86672014-07-10 Jason Merrill <jason@redhat.com>
8668
8669 PR c++/61659
8670 PR c++/61687
8671 * c.opt (-fuse-all-virtuals): New.
8672
63dfbb95
RB
86732014-07-09 Richard Biener <rguenther@suse.de>
8674
8675 PR c-family/61741
8676 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8677 using unsigned arithmetic if overflow does not wrap instead of
8678 if overflow is undefined.
8679
773ec47f
MP
86802014-07-06 Marek Polacek <polacek@redhat.com>
8681
8682 PR c/6940
8683 * c.opt (Wsizeof-array-argument): New option.
8684
00a7ba58
JJ
86852014-07-03 Jakub Jelinek <jakub@redhat.com>
8686
b1726d6c 8687 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8688 comments->count <= 1, as comments->entries might be NULL.
8689
52ec0ea3
MP
86902014-07-01 Marek Polacek <polacek@redhat.com>
8691
8692 * c.opt (Wint-conversion): New option.
8693
d5c3d343
MP
86942014-07-01 Marek Polacek <polacek@redhat.com>
8695
8696 PR c/58286
8697 * c.opt (Wincompatible-pointer-types): New option.
8698
6e7ceb17
PC
86992014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8700
8701 PR c++/51400
8702 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8703 Do not discard TYPE_QUALS of type.
8704
da73100b
JM
87052014-06-26 Jason Merrill <jason@redhat.com>
8706
8707 * c-common.h (enum cxx_dialect): Add cxx1z.
8708 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8709 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8710
08eedf75
TJ
87112014-06-26 Teresa Johnson <tejohnson@google.com>
8712
8713 * c-common.h (get_dump_info): Declare.
8714 * c-gimplify.c (c_genericize): Use saved dump files.
8715 * c-opts.c (c_common_parse_file): Begin and end dumps
8716 once around parsing invocation.
8717 (get_dump_info): New function.
8718
7b56b2f8
MP
87192014-06-23 Marek Polacek <polacek@redhat.com>
8720 Andrew MacLeod <amacleod@redhat.com>
8721
8722 PR c/61553
8723 * c-common.c (get_atomic_generic_size): Don't segfault if the
8724 type doesn't have a size.
8725
0e37a2f3
MP
87262014-06-20 Marek Polacek <polacek@redhat.com>
8727
8728 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8729 (ubsan_walk_array_refs_r): New function.
8730 (c_genericize): Instrument array bounds.
8731 * c-ubsan.c: Include "internal-fn.h".
8732 (ubsan_instrument_division): Mark instrumented arrays as having
8733 side effects. Adjust ubsan_type_descriptor call.
8734 (ubsan_instrument_shift): Likewise.
8735 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8736 (ubsan_instrument_bounds): New function.
8737 (ubsan_array_ref_instrumented_p): New function.
8738 (ubsan_maybe_instrument_array_ref): New function.
8739 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8740 (ubsan_array_ref_instrumented_p): Declare.
8741 (ubsan_maybe_instrument_array_ref): Declare.
8742
87432014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8744
8745 PR lto/61123
8746 * c.opt (fshort-enums): Add to LTO.
8747 * c.opt (fshort-wchar): Likewise.
8748
5c3d09f7
MP
87492014-06-16 Marek Polacek <polacek@redhat.com>
8750
8751 PR c/60439
8752 * c.opt (Wswitch-bool): Add Var.
8753
9cf32741
JJ
87542014-06-12 Jakub Jelinek <jakub@redhat.com>
8755
8756 PR middle-end/61486
8757 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8758 #pragma omp target teams or
8759 #pragma omp {,target }teams distribute simd.
8760
62984918
JM
87612014-06-12 Jason Merrill <jason@redhat.com>
8762
8763 * c.opt (Wabi=, fabi-compat-version): New.
8764 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8765 (c_common_post_options): Handle flag_abi_compat_version default.
8766 Disallow -fabi-compat-version=1.
8767 * c-common.h (abi_version_crosses): New.
8768
f961457f
JH
87692014-06-11 Jan Hubicka <hubicka@ucw.cz>
8770
adfac8df 8771 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8772 section names that are no longer trees.
8773
92d28cbb
JJ
87742014-06-10 Jakub Jelinek <jakub@redhat.com>
8775
8776 PR fortran/60928
8777 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8778 (omp_pragmas): ... back here.
8779
742938c9
MP
87802014-06-05 Marek Polacek <polacek@redhat.com>
8781
8782 PR c/49706
8783 * c-common.c (warn_logical_not_parentheses): New function.
8784 * c-common.h (warn_logical_not_parentheses): Declare.
8785 * c.opt (Wlogical-not-parentheses): New option.
8786
9d548dfb
MP
87872014-06-04 Marek Polacek <polacek@redhat.com>
8788
8789 PR c/30020
8790 * c-common.c (check_case_bounds): Add location parameter.
8791 Use it.
8792 (c_add_case_label): Pass loc to check_case_bounds.
8793
fedfecef
MP
87942014-06-03 Marek Polacek <polacek@redhat.com>
8795
8796 PR c/60439
8797 * c.opt (Wswitch-bool): New option.
8798
f6a7cffc
TS
87992014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8800
040d18b6
TS
8801 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8802 Remove prototypes.
8803 (record_types_used_by_current_var_decl): Move prototype to where
8804 it belongs.
8805
f6a7cffc
TS
8806 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8807 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8808 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8809
632f2871
RS
88102014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8811
8812 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8813 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8814 void_zero_node.
8815 * c-pretty-print.c (pp_c_void_constant): New function.
8816 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8817 (c_pretty_printer::expression): Handle VOID_CST.
8818 * cilk.c (extract_free_variables): Likewise.
8819 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8820 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8821
766090c2
TS
88222014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8823
8824 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8825 * c-pragma.c (push_alignment): Adjust.
8826 (handle_pragma_push_options): Likewise.
8827
661a0813
MP
88282014-05-09 Marek Polacek <polacek@redhat.com>
8829
8830 PR c/50459
8831 * c-common.c (check_user_alignment): Return -1 if alignment is error
8832 node.
8833 (handle_aligned_attribute): Don't call default_conversion on
8834 FUNCTION_DECLs.
8835 (handle_vector_size_attribute): Likewise.
8836 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8837 (handle_sentinel_attribute): Call default_conversion and allow even
8838 integral types as an argument.
8839
2793eeab
MP
88402014-05-08 Marek Polacek <polacek@redhat.com>
8841
8842 PR c/61053
8843 * c-common.c (min_align_of_type): New function factored out from...
8844 (c_sizeof_or_alignof_type): ...here.
8845 * c-common.h (min_align_of_type): Declare.
8846
f827930a
MP
88472014-05-08 Marek Polacek <polacek@redhat.com>
8848
8849 PR c/61077
8850 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8851 parameter type of main.
8852
ca49b74e
DD
88532014-05-07 DJ Delorie <dj@redhat.com>
8854
8855 * c-cppbuiltin.c (print_bits_of_hex): New.
8856 (builtin_define_type_minmax): Print values using hex so as not to
8857 require a pre-computed list of string values.
8858
1d60af08
KZ
88592014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8860 Mike Stump <mikestump@comcast.net>
8861 Richard Sandiford <rdsandiford@googlemail.com>
8862
8863 * c-ada-spec.c: Include wide-int.h.
8864 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8865 (dump_generic_ada_node): Use wide-int interfaces.
8866 * c-common.c: Include wide-int-print.h.
8867 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8868 (pointer_int_sum): Use wide-int interfaces.
8869 (c_common_nodes_and_builtins): Use make_int_cst.
8870 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8871 (handle_alloc_size_attribute): Use wide-int interfaces.
8872 (get_nonnull_operand): Likewise.
8873 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8874 * c-lex.c: Include wide-int.h.
8875 (narrowest_unsigned_type): Take a widest_int rather than two
8876 HOST_WIDE_INTs.
8877 (narrowest_signed_type): Likewise.
8878 (interpret_integer): Update accordingly. Use wide-int interfaces.
8879 (lex_charconst): Use wide-int interfaces.
8880 * c-pretty-print.c: Include wide-int.h.
8881 (pp_c_integer_constant): Use wide-int interfaces.
8882 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8883 INT_CST_LT_UNSIGNED.
8884
b15458be
RB
88852014-05-06 Richard Biener <rguenther@suse.de>
8886
8887 * c-opts.c (c_common_post_options): For -freestanding,
8888 -fno-hosted and -fno-builtin disable pattern recognition
8889 if not enabled explicitely.
8890
6577374e
MP
88912014-05-02 Marek Polacek <polacek@redhat.com>
8892
8893 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8894
d00887e8
MP
88952014-05-01 Marek Polacek <polacek@redhat.com>
8896
8897 PR c/43245
8898 * c.opt (Wdiscarded-qualifiers): Add.
8899
f8ed5150
MP
89002014-04-30 Marek Polacek <polacek@redhat.com>
8901
8902 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8903 INT_MIN / -1 sanitization only for integer types.
8904
45484dcf
MP
89052014-04-25 Marek Polacek <polacek@redhat.com>
8906
8907 PR c/18079
8908 * c-common.c (handle_noinline_attribute): Warn if the attribute
8909 conflicts with always_inline attribute.
8910 (handle_always_inline_attribute): Warn if the attribute conflicts
8911 with noinline attribute.
8912
38e514c0
MP
89132014-04-25 Marek Polacek <polacek@redhat.com>
8914
8915 PR c/60156
8916 * c-common.c (check_main_parameter_types): Warn about variadic main.
8917
44875f92
MS
89182014-04-24 Mike Stump <mikestump@comcast.net>
8919
8920 * c.opt (Wshadow-ivar): Default to on.
8921
dcaaa5a0
DP
89222014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8923
8924 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8925
c07d7c02
MP
89262014-04-23 Marek Polacek <polacek@redhat.com>
8927
8928 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8929
1c33c9b7
JJ
89302014-04-22 Jakub Jelinek <jakub@redhat.com>
8931
8932 PR sanitizer/60275
8933 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8934 if flag_sanitize_undefined_trap_on_error.
8935 (ubsan_instrument_division, ubsan_instrument_shift,
8936 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8937 if !flag_sanitize_recover.
8938
793c625f
MG
89392014-04-22 Marc Glisse <marc.glisse@inria.fr>
8940
8941 PR libstdc++/43622
8942 * c-common.c (registered_builtin_types): Make non-static.
8943 * c-common.h (registered_builtin_types): Declare.
8944
b0f1bf36 89452014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8946 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8947
8948 PR c/60819
8949 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8950 apply may-alias the scalar pointer type when applicable.
8951
3b07fa4a
IZ
89522014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8953
8954 PR middle-end/60467
8955 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8956 as possible argument for Cilk_spawn.
8957
cbbd2b1c
TB
89582014-04-11 Tobias Burnus <burnus@net-b.de>
8959
8960 PR c/60194
8961 * c.opt (Wformat-signedness): Add
8962 * c-format.c(check_format_types): Use it.
8963
6415bd5d
JM
89642014-04-11 Jason Merrill <jason@redhat.com>
8965
8966 PR c++/57926
8967 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8968 default_conversion for an array argument.
8969
6525783a
MP
89702014-04-08 Marek Polacek <polacek@redhat.com>
8971
8972 PR sanitizer/60745
8973 * c-ubsan.c: Include asan.h.
8974 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8975
880a467b
NS
89762014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8977
8978 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8979
7b59ff2d
MP
89802014-04-02 Marek Polacek <polacek@redhat.com>
8981
8982 * c-common.h (c_expand_expr): Remove declaration.
8983
8edbfaa6
JJ
89842014-03-28 Jakub Jelinek <jakub@redhat.com>
8985
8986 PR c++/60689
8987 * c-common.c (add_atomic_size_parameter): When creating new
8988 params vector, push the size argument first.
8989
07d72e1d
JJ
89902014-03-26 Jakub Jelinek <jakub@redhat.com>
8991
8992 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8993 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8994 ubsan_create_data callers.
8995
b35e0fa0
JJ
89962014-03-22 Jakub Jelinek <jakub@redhat.com>
8997
8998 PR debug/60603
8999 * c-opts.c (c_finish_options): Restore cb_file_change call to
9000 <built-in>.
9001
39a1ebb3
JJ
90022014-03-13 Jakub Jelinek <jakub@redhat.com>
9003
9004 PR middle-end/36282
9005 * c-pragma.c (apply_pragma_weak): Only look at
9006 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9007 DECL_ASSEMBLER_NAME_SET_P (decl).
9008 (maybe_apply_pending_pragma_weaks): Exit early if
9009 vec_safe_is_empty (pending_weaks) rather than only when
9010 !pending_weaks.
9011 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9012 set assembler name back to NULL afterwards.
9013
a07f6ed2
JM
90142014-03-11 Jason Merrill <jason@redhat.com>
9015
9016 * c.opt: Add -std=gnu++14.
9017
75b107f5
IB
90182014-03-11 Ian Bolton <ian.bolton@arm.com>
9019
9020 * c-opts.c (c_common_post_options): Don't override
9021 -ffp-contract=fast if unsafe-math-optimizations is on.
9022
f42c637e
PM
90232014-03-08 Paulo Matos <paulo@matos-sorge.com>
9024
22b15758 9025 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9026
70e24808
JM
90272014-03-07 Jason Merrill <jason@redhat.com>
9028
9029 * c.opt: Add -std=c++14.
9030
3af9c5e9
MP
90312014-03-06 Marek Polacek <polacek@redhat.com>
9032
9033 PR c/60197
9034 * cilk.c (contains_cilk_spawn_stmt): New function.
9035 (contains_cilk_spawn_stmt_walker): Likewise.
9036 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9037 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9038
b3bdf019
JJ
90392014-03-03 Jakub Jelinek <jakub@redhat.com>
9040
9041 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9042 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9043 even when flag_preprocess_only.
9044
ca7e759d
JM
90452014-02-26 Jason Merrill <jason@redhat.com>
9046
9047 PR c++/59231
9048 PR c++/11586
9049 * c-common.c (shorten_compare): Don't check
9050 c_inhibit_evaluation_warnings.
9051
28e41874
JJ
90522014-02-19 Jakub Jelinek <jakub@redhat.com>
9053
cca615af
JJ
9054 PR c/37743
9055 * c-common.c (c_common_nodes_and_builtins): When initializing
9056 c_uint{16,32,64}_type_node, also set corresponding
9057 uint{16,32,64}_type_node to the same value.
9058
28e41874
JJ
9059 PR c++/60267
9060 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9061 for PRAGMA_IVDEP if flag_preprocess_only.
9062
c2bf53a1
JJ
90632014-02-12 Jakub Jelinek <jakub@redhat.com>
9064
9065 PR c/60101
9066 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9067 if false, add ADD itself, rather than vice versa.
9068 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9069 copy. For SAVE_EXPR, only call merge_tlist once.
9070
8fcbce72
JJ
90712014-02-08 Jakub Jelinek <jakub@redhat.com>
9072
9073 PR middle-end/60092
9074 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9075 and tree_to_uhwi.
9076 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9077 functions.
9078 (c_common_attribute_table): Add alloc_align and assume_aligned
9079 attributes.
9080
0a756a3f
MP
90812014-02-06 Marek Polacek <polacek@redhat.com>
9082
9083 PR c/60087
9084 * c-common.c (warn_for_sign_compare): Call warning_at with location
9085 instead of warning.
9086
7ec4847a
MP
90872014-02-05 Marek Polacek <polacek@redhat.com>
9088
9089 PR c/53123
9090 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9091 statement.
9092
66f20604
MP
90932014-02-04 Marek Polacek <polacek@redhat.com>
9094
9095 PR c/60036
9096 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9097 SAVE_EXPR.
9098
5d77fb19
MG
90992014-02-03 Marc Glisse <marc.glisse@inria.fr>
9100
9101 PR c++/53017
9102 PR c++/59211
9103 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9104 handle_vector_size_attribute, handle_nonnull_attribute): Call
9105 default_conversion on the attribute argument.
9106 (handle_nonnull_attribute): Increment the argument number.
9107
81e5eca8
MP
91082014-01-31 Marek Polacek <polacek@redhat.com>
9109
9110 PR c/59963
9111 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9112 build_function_call_vec.
9113 (resolve_overloaded_builtin): Likewise.
9114 * c-common.h (build_function_call_vec): Adjust declaration.
9115
68fca595
MP
91162014-01-30 Marek Polacek <polacek@redhat.com>
9117
9118 PR c/59940
9119 * c-common.h (unsafe_conversion_p): Adjust declaration.
9120 (warnings_for_convert_and_check): Likewise.
9121 (convert_and_check): Likewise.
9122 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9123 expansion_point_location_if_in_system_header on it.
9124 (warnings_for_convert_and_check): Add location parameter. Call
9125 expansion_point_location_if_in_system_header on it. Use it.
9126 (convert_and_check): Add location parameter. Use it.
9127 (conversion_warning): Likewise.
9128 (c_add_case_label): Adjust convert_and_check calls.
9129 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9130
b72271b9
BI
91312014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9132
9133 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9134 flag_cilkplus.
9135 * c-pragma.c (init_pragma): Likewise.
9136 * c.opt: Likewise.
9137
393e8e8b
MP
91382014-01-23 Marek Polacek <polacek@redhat.com>
9139
9140 PR c/59846
9141 * c-common.c (shorten_compare): Add location_t parameter.
9142 * c-common.h (shorten_binary_op): Adjust declaration.
9143
f04dda30
MP
91442014-01-23 Marek Polacek <polacek@redhat.com>
9145
9146 PR c/58346
9147 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9148 * c-common.h: Declare it.
9149
621955cb
EB
91502014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9151
9152 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9153 * c-ada-spec.c (dump_ads): Likewise.
9154 (cpp_check): Likewise.
9155 (dump_ada_specs): Likewise.
9156
91572014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
9158
9159 PR c++/49718
9160 * c-common.c (handle_no_instrument_function_attribute): Allow
9161 no_instrument_function attribute in class member
9162 definition/declaration.
9163
241f845a
JJ
91642014-01-15 Jakub Jelinek <jakub@redhat.com>
9165
9166 PR c/58943
9167 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9168 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9169 being COMPOUND_EXPR.
9170 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9171 operand a SAVE_EXPR and second MODIFY_EXPR.
9172
e83b8e2e
JJ
91732014-01-09 Jakub Jelinek <jakub@redhat.com>
9174
9175 PR target/58115
9176 * c-pch.c (c_common_write_pch): Call
9177 prepare_target_option_nodes_for_pch.
9178
23a5b65a
RS
91792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9180
9181 Update copyright years
9182
f9030485
RS
91832014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9184
9185 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9186 the copyright notice.
9187
f2aa696b
EB
91882013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9189
9190 * c-ada-spec.c (print_constructor): New function.
9191 (print_destructor): Retrieve the origin of the destructor.
9192 (print_ada_declaration): Revamp handling of constructors/destructors.
9193
3f8257db 91942013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
9195 Bill Maddox <maddox@google.com>
9196 Jason Merrill <jason@redhat.com>
9197
9198 * c.opt: Add -fdeclone-ctor-dtor.
9199 * c-opts.c (c_common_post_options): Default to on iff -Os.
9200
41958c28
BI
92012013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9202
9203 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9204 attribute.
9205 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 9206 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
9207 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9208 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9209 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9210 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9211 PRAGMA_CILK_CLAUSE_UNIFORM.
9212
b1726d6c 9213
12893402
BI
92142013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9215
9216 * cilk.c (cilk_outline): Made this function non-static.
9217 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9218 (create_cilk_wrapper): Added a new parameter: a function pointer.
9219 (c_install_body_w_frame_cleanup): Remove
9220 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9221 * c-common.h (cilk_outline): New prototype.
9222 (gimplify_cilk_spawn): Removed two parameters.
9223 (cilk_install_body_with_frame_cleanup): New prototype.
9224 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9225 CILK_SPAWN_STMT case.
9226
085b42ed
BS
92272013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9228
2ce064c3
BS
9229 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9230
085b42ed
BS
9231 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9232 (int_array_type_node): Remove.
9233 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9234
9e36c9ed
MP
92352013-12-05 Marek Polacek <polacek@redhat.com>
9236
9237 PR c/52023
9238 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9239 [ADJUST_FIELD_ALIGN].
9240
296674db
JM
92412013-12-04 Joseph Myers <joseph@codesourcery.com>
9242
9243 PR c/52023
9244 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9245 and check field alignment if set.
9246 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9247 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9248
b1726d6c 92492013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9250 Marek Polacek <polacek@redhat.com>
9251
9252 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9253 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9254
d7947e19
L
92552013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9256
9257 PR c/59309
9258 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9259 arguments.
9260
fad7652e
JJ
92612013-11-29 Jakub Jelinek <jakub@redhat.com>
9262
9263 PR c/59280
9264 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9265 goto invalid. If it is error_mark_node, don't issue further
9266 diagnostics.
9267
8b5e1202
SO
92682013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9269
9270 * c.opt (Wopenmp-simd): New.
9271
0a508bb6
JJ
92722013-11-22 Jakub Jelinek <jakub@redhat.com>
9273
9274 * c-ubsan.h (ubsan_instrument_return): New prototype.
9275 * c-ubsan.c (ubsan_instrument_return): New function.
9276
2fb9a547
AM
92772013-11-22 Andrew MacLeod <amacleod@redhat.com>
9278
9279 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9280 * c-gimplify.c: Likewise.
9281 * cilk.c: Likewise.
2fb9a547 9282
8400e75e
DM
92832013-11-22 David Malcolm <dmalcolm@redhat.com>
9284
9285 * c-common.c (unsafe_conversion_p): Remove use of
9286 EXPR_LOC_OR_HERE macro.
9287 (conversion_warning): Likewise.
9288 (warnings_for_convert_and_check): Likewise.
9289 (warn_for_collisions_1): Likewise.
9290 (shorten_compare): Likewise, and remove use of in_system_header
9291 macro, using the location from the former.
9292 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9293 (cb_def_pragma): Remove use of in_system_header macro.
9294 (lex_string): Likewise.
9295 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9296
eb1ce453
KZ
92972013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9298 Mike Stump <mikestump@comcast.net>
9299 Richard Sandiford <rdsandiford@googlemail.com>
9300
9301 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9302 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9303 tree_fits_shwi_p or tree_fits_uhwi_p.
9304 (dump_generic_ada_node): Likewise.
9305 * c-format.c (check_format_arg): Likewise.
9306 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9307
6b3b8c27
KZ
93082013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9309
9310 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9311
49b0aa18
JC
93122013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9313
9314 PR c/53001
9315 * c-common.c (unsafe_conversion_p): Make this function
9316 return an enumeration with more detail.
9317 (conversion_warning): Use the new return type of
9318 unsafe_conversion_p to separately warn either about conversions
9319 that lower floating point number precision or about the other
9320 kinds of conversions.
9321 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9322 (unsafe_conversion_p): switching return type to
9323 conversion_safety enumeration.
49b0aa18
JC
9324 * c.opt: Adding new warning -Wfloat-conversion and
9325 enabling it with -Wconversion.
9326
b826515a
BS
93272013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9328
8e745a17
JJ
9329 * c-opts.c: Include plugin.h.
9330 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9331
b9a55b13
MP
93322013-11-19 Marek Polacek <polacek@redhat.com>
9333
9334 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9335 call.
9336 (ubsan_instrument_shift): Likewise.
9337 (ubsan_instrument_vla): Likewise.
9338
7d362f6c
RS
93392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9340
9341 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9342 cast to unsigned type.
9343
386b1f1f
RS
93442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9345
9346 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9347 tree_low_cst.
9348 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9349 rather than tree_low_cst.
9350
ae7e9ddd
RS
93512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9352
9353 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9354 tree_to_uhwi throughout.
9355
9439e9a1
RS
93562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9357
9358 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9359 tree_low_cst (..., 0) with tree_to_shwi throughout.
9360
cc269bb6
RS
93612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9362
9363 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9364 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9365
9541ffee
RS
93662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9367
9368 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9369 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9370
c02065fc
AH
93712013-11-15 Aldy Hernandez <aldyh@redhat.com>
9372
9373 * c-cilkplus.c: New file.
9374 * c-common.c (readonly_error): Add location argument.
9375 * c-common.h (readonly_error): Same.
9376 (c_finish_cilk_clauses): Protoize.
9377 (c_check_cilk_loop): Same.
9378 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9379 Do not fail on error_mark_node.
9380 Abstract increment canonicalization to here...
9381 (c_omp_for_incr_canonicalize_ptr): New.
9382 c-pragma.c (init_pragma): Register "simd" pragma.
9383 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9384 (enum pragma_cilk_clause): New.
9385
9cc65f15
RS
93862013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9387
9388 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9389 wchar_type and host_integerp checks.
9390
18f429e2
AM
93912013-11-14 Andrew MacLeod <amacleod@redhat.com>
9392
9393 * c-common.c: Likewise.
9394 * c-gimplify.c: Likewise.
9395 * cilk.c: Likewise.
9396
d8a2d370
DN
93972013-11-14 Diego Novillo <dnovillo@google.com>
9398
9399 * c-common.c: Include fold-const.h.
9400 Include stor-layout.h.
9401 Include calls.h.
9402 Include stringpool.h.
9403 Include attribs.h.
9404 Include varasm.h.
9405 Include trans-mem.h.
9406 * c-cppbuiltin.c: Include stor-layout.h.
9407 Include stringpool.h.
9408 * c-format.c: Include stringpool.h.
9409 * c-lex.c: Include stringpool.h.
9410 Include stor-layout.h.
9411 * c-pragma.c: Include stringpool.h.
9412 Include attribs.h.
9413 Include varasm.h.
9414 Include gcc-symtab.h.
9415 * c-pretty-print.c: Include stor-layout.h.
9416 Include attribs.h.
9417 * cilk.c: Include stringpool.h.
9418 Include calls.h.
9419
38b7bc7f
JM
94202013-11-13 Joseph Myers <joseph@codesourcery.com>
9421
9422 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9423 * c-common.c (c_common_reswords): Add __auto_type.
9424 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9425
45b0be94
AM
94262013-11-12 Andrew MacLeod <amacleod@redhat.com>
9427
18f429e2
AM
9428 * c-common.c: Include gimplify.h.
9429 * c-gimplify.c: Likewise.
9430 * cilk.c: Likewise.
9431 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9432 * c-ubsan.c: Don't include gimple.h.
45b0be94 9433
582d9b50
JM
94342013-11-12 Joseph Myers <joseph@codesourcery.com>
9435
9436 * c-common.c (c_common_reswords): Add _Thread_local.
9437
6b28e197
JM
94382013-11-09 Joseph Myers <joseph@codesourcery.com>
9439
9440 * c-common.c (atomic_size_supported_p): New function.
9441 (resolve_overloaded_atomic_exchange)
9442 (resolve_overloaded_atomic_compare_exchange)
9443 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9444 Use it instead of comparing size with a local list of sizes.
9445
267bac10
JM
94462013-11-07 Andrew MacLeod <amacleod@redhat.com>
9447 Joseph Myers <joseph@codesourcery.com>
9448
9449 * c-common.h (enum rid): Add RID_ATOMIC.
9450 * c-common.c (c_common_reswords): Add _Atomic.
9451 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9452 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9453 * c-format.c (check_format_types): Check for extra _Atomic
9454 qualifiers in format argument.
9455 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9456 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9457
5157b91e
TB
94582013-11-06 Tobias Burnus <burnus@net-b.de>
9459
9460 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9461
6dbe0958
JM
94622013-11-06 Joseph Myers <joseph@codesourcery.com>
9463
9464 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9465 standards modes.
9466 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9467 to mean lack of IEEE 754 support.
9468
e8ff5196
TB
94692013-11-05 Tobias Burnus <burnus@net-b.de>
9470
9471 * c.opt (-Wdate-time): New option
9472 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9473
254a0760
JM
94742013-11-05 Joseph Myers <joseph@codesourcery.com>
9475
9476 * c-cppbuiltin.c (cpp_iec_559_value): Test
9477 flag_excess_precision_cmdline not flag_excess_precision.
9478
6d7f7e0a
TB
94792013-11-05 Tobias Burnus <burnus@net-b.de>
9480
9481 * c.opt (fopenmp-simd): New option.
9482 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9483 (omp_pragmas): ... this new struct.
9484 (c_pp_lookup_pragma): Also walk omp_pragmas.
9485 (init_pragma): Init pragmas for -fopenmp-simd.
9486
55a7f02f
MP
94872013-11-04 Marek Polacek <polacek@redhat.com>
9488
9489 PR c++/58979
9490 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9491
9193fb05
JM
94922013-11-04 Joseph Myers <joseph@codesourcery.com>
9493
9494 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9495 New functions.
9496 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9497
94159ecf
EB
94982013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9499
9500 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9501 (dump_ada_specs): Adjust prototype of second callback.
9502 * c-ada-spec.c (cpp_check): New global variable.
9503 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9504 (print_generic_ada_decl): Likewise.
9505 (has_static_fields): Change return type to bool and add guard.
9506 (has_nontrivial_methods): New predicate.
9507 (is_tagged_type): Change return type to bool.
9508 (separate_class_package): Call has_nontrivial_methods.
9509 (pp_ada_tree_identifier): Minor tweaks.
9510 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9511 (dump_ada_array_domains): Likewise.
9512 (dump_ada_array_type): Likewise.
9513 (dump_template_types): Remove cpp_check parameter and do not pass it to
9514 dump_generic_ada_node.
9515 (dump_ada_template): Likewise.
9516 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9517 recursively.
9518 (print_ada_methods): Change return type to integer. Remove cpp_check
9519 parameter and do not pass it down.
9520 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9521 dump_generic_ada_node.
9522 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9523 accessing methods.
9524 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9525 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9526 value of print_ada_methods.
9527 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9528 Set cpp_check to it before invoking dump_ada_nodes.
9529 (dump_ada_specs): Likewise.
9530
b906f4ca
MP
95312013-11-03 Marek Polacek <polacek@redhat.com>
9532
9533 * c-ubsan.c: Don't include hash-table.h.
9534 (ubsan_instrument_vla): New function.
9535 * c-ubsan.h: Declare it.
9536
5e20cdc9
DM
95372013-10-31 David Malcolm <dmalcolm@redhat.com>
9538
9539 Automated part of renaming of symtab_node_base to symtab_node.
9540
9541 Patch autogenerated by rename_symtab.py from
9542 https://github.com/davidmalcolm/gcc-refactoring-scripts
9543 revision 58bb219cc090b2f4516a9297d868c245495ee622
9544
9545 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9546 symtab_node_base to symtab_node.
9547
7057e645
ESR
95482013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9549
8e745a17 9550 Implement C++14 digit separators.
7057e645
ESR
9551 * c-lex.c (interpret_float): Remove digit separators from scratch string
9552 before building real literal.
9553
193ea7bc
JJ
95542013-10-30 Jakub Jelinek <jakub@redhat.com>
9555
9556 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9557
939b37da
BI
95582013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9559
9560 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9561 fields.
9562 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9563 enabled.
9564 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9565 (insert_cilk_frame): New prototype.
9566 (cilk_init_builtins): Likewise.
9567 (gimplify_cilk_spawn): Likewise.
9568 (c_cilk_install_body_w_frame_cleanup): Likewise.
9569 (cilk_detect_spawn_and_unwrap): Likewise.
9570 (cilk_set_spawn_marker): Likewise.
9571 (build_cilk_sync): Likewise.
9572 (build_cilk_spawn): Likewise.
9573 * cilk.c: New file.
9574
67348ccc
DM
95752013-10-29 David Malcolm <dmalcolm@redhat.com>
9576
9577 Patch autogenerated by refactor_symtab.py from
9578 https://github.com/davidmalcolm/gcc-refactoring-scripts
9579 revision 58bb219cc090b2f4516a9297d868c245495ee622
9580
9581 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9582 to a true class hierarchy.
9583 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9584
d570872d
RS
95852013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9586
9587 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9588
98906124
JL
95892013-10-26 Jeff Law <law@redhat.com>
9590
adfac8df
JJ
9591 * c-common.c (c_define_builtins): Remove mudflap support.
9592 * c.opt: Ignore and warn for mudflap options.
98906124 9593
d73749df 95942013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9595
9596 PR other/33426
9597 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9598 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9599
3f04b1bb
JM
96002013-10-23 Jason Merrill <jason@redhat.com>
9601
9602 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9603
acf0174b
JJ
96042013-10-11 Jakub Jelinek <jakub@redhat.com>
9605
acd15a28
JJ
9606 * c-common.h (omp_clause_mask::operator !=): New method.
9607 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9608 instead of if (mask & something) tests everywhere.
9609
acf0174b
JJ
9610 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9611 201307 instead of 201107.
9612 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9613 (c_common_attribute_table): Add "omp declare target" and
9614 "omp declare simd" attributes.
9615 (handle_omp_declare_target_attribute,
9616 handle_omp_declare_simd_attribute): New functions.
9617 * c-omp.c: Include c-pragma.h.
9618 (c_finish_omp_taskgroup): New function.
9619 (c_finish_omp_atomic): Add swapped argument, if true,
9620 build the operation first with rhs, lhs arguments and use NOP_EXPR
9621 build_modify_expr.
9622 (c_finish_omp_for): Add code argument, pass it down to make_code.
9623 (c_omp_split_clauses): New function.
9624 (c_split_parallel_clauses): Removed.
9625 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9626 c_omp_declare_simd_clauses_to_decls): New functions.
9627 * c-common.h (omp_clause_mask): New type.
9628 (OMP_CLAUSE_MASK_1): Define.
9629 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9630 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9631 omp_clause_mask::operator |, omp_clause_mask::operator &,
9632 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9633 omp_clause_mask::operator ==): New methods.
9634 (enum c_omp_clause_split): New.
9635 (c_finish_omp_taskgroup): New prototype.
9636 (c_finish_omp_atomic): Add swapped argument.
9637 (c_finish_omp_for): Add code argument.
9638 (c_omp_split_clauses): New prototype.
9639 (c_split_parallel_clauses): Removed.
9640 (c_omp_declare_simd_clauses_to_numbers,
9641 c_omp_declare_simd_clauses_to_decls): New prototypes.
9642 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9643 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9644 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9645 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9646 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9647 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9648 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9649 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9650 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9651 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9652 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9653 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9654 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9655 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9656 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9657 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9658 PRAGMA_OMP_CLAUSE_UNIFORM.
9659
826cacfe
MG
96602013-10-09 Marc Glisse <marc.glisse@inria.fr>
9661
9662 PR tree-optimization/20318
9663 * c-common.c (handle_returns_nonnull_attribute): New function.
9664 (c_common_attribute_table): Add returns_nonnull.
9665
2284b034
MG
96662013-10-03 Marc Glisse <marc.glisse@inria.fr>
9667
9668 PR c++/19476
9669 * c.opt (fcheck-new): Move to common.opt.
9670
b56e9788
MP
96712013-09-25 Marek Polacek <polacek@redhat.com>
9672 Jakub Jelinek <jakub@redhat.com>
9673
9674 PR sanitizer/58413
9675 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9676 an expression if we can prove it is correct.
9677 (ubsan_instrument_division): Likewise. Remove unnecessary
9678 check.
9679
ce6923c5
MP
96802013-09-18 Marek Polacek <polacek@redhat.com>
9681
9682 PR sanitizer/58411
9683 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9684 Declare it.
9685 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9686
fb5610fb
IS
96872013-09-14 Iain Sandoe <iain@codesourcery.com>
9688
9689 PR target/48094
9690 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9691 fobjc-gc, freplace-objc-classes): Accept for LTO.
9692
88b0e79e
JC
96932013-09-13 Jacek Caban <jacek@codeweavers.com>
9694
9695 * c-target.def: New hook
9696
c9b0866a
PC
96972013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9698
9699 PR c++/43452
9700 * c.opt (Wdelete-incomplete): Add.
9701
0af94e6f
JR
97022013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9703
9704 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9705 (vector_types_compatible_elements_p): New function.
9706 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9707 declaration.
9708 (vector_types_compatible_elements_p): Declare.
9709
7c26172c
GDR
97102013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9711
9712 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9713 a virtual member function.
9714 (pp_simple_type_specifier): Remove.
9715 (pp_c_type_specifier): Likewise.
9716 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9717 Rename from pp_c_type_specifier. Adjust.
9718 (c_pretty_printer::c_pretty_printer): Do not assign to
9719 simple_type_specifier.
9720
20059c8b
GDR
97212013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9722
9723 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9724 member function.
9725 (c_pretty_printer::storage_class_specifier): Likewise.
9726 (c_pretty_printer::initializer): Likewise.
9727 (pp_declaration): Remove.
9728 (pp_declaration_specifiers): Likewise.
9729 (pp_abstract_declarator): Likewise.
9730 (pp_declarator): Likewise.
9731 (pp_type_id): Likewise.
9732 (pp_statement): Likewise.
9733 (pp_constant): Likewise.
9734 (pp_id_expression): Likewise.
9735 (pp_primary_expression): Likewise.
9736 (pp_unary_expression): Likewise.
9737 (pp_multiplicative_expression): Likewise.
9738 (pp_conditional_expression): Likewise.
9739 (pp_assignment_expression): Likewise.
9740 (pp_expression): Likewise.
9741 (pp_c_type_id): Likewise.
9742 (pp_c_storage_class_specifier): Likewise.
9743 * c-pretty-print.c (pp_c_type_cast): Tidy.
9744 (pp_c_pointer): Likewise.
9745 (pp_c_type_specifier): Likewise.
9746 (pp_c_parameter_type_list): Likewise.
9747 (pp_c_function_definition): Likewise.
9748 (pp_c_init_declarator): Likewise.
9749 (pp_c_initializer_list): Likewise.
9750 (pp_c_constructor_elts): Likewise.
9751 (c_pretty_printer::direct_abstract_declarator): Likewise.
9752 (c_pretty_printer::declaration_specifiers): Likewise.
9753 (c_pretty_printer::primary_expression): Likewise.
9754 (c_pretty_printer::postfix_expression): Likewise.
9755 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9756 (c_pretty_printer::storage_class_specifier): Rename from
9757 pp_c_storage_class_specifier.
9758 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9759 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9760 storage_class_specifier, initializer, offset_list, flags.
9761
de5a5fa1
MP
97622013-08-30 Marek Polacek <polacek@redhat.com>
9763
9764 * c-ubsan.c: New file.
9765 * c-ubsan.h: New file.
9766
8f0e4d72
GDR
97672013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9768
9769 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9770 member function.
9771 (c_pretty_printer::declaration_specifiers): Likewise.
9772 (c_pretty_printer::declarator): Likewise.
9773 (c_pretty_printer::abstract_declarator): Likewise.
9774 (c_pretty_printer::direct_abstract_declarator): Likewise.
9775 (c_pretty_printer::direct_declarator): Likewise.
9776 (c_pretty_printer::function_specifier): Likewise.
9777 (pp_declaration): Adjust.
9778 (pp_declaration_specifiers): Likewise.
9779 (pp_abstract_declarator): Likewise.
9780 (pp_direct_declarator): Likewise.
9781 (pp_function_specifier): Likewise.
9782 (pp_direct_abstract_declarator): Remove as unused.
9783 (pp_c_declaration): Remove.
9784 (pp_c_declaration_specifiers): Likewise.
9785 (pp_c_declarator): Likewise.
9786 (pp_c_direct_declarator): Likewise.
9787 (pp_c_function_specifier): Likewise.
9788 (pp_c_direct_abstract_declarator): Likewise.
9789 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9790 from pp_c_abstract_declarator. Adjust.
ab20d992 9791 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9792 pp_c_direct_abstract_declarator. Adjust.
9793 (c_pretty_printer::function_specifier): Rename from
9794 pp_c_function_specifier. Adjust.
9795 (c_pretty_printer::declaration_specifiers): Rename from
9796 pp_c_declaration_specifiers. Adjust.
9797 (c_pretty_printer::direct_declarator): Rename from
9798 pp_c_direct_declarator. Adjust.
9799 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9800 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9801 (c_pretty_printer::c_pretty_printer): Do not assign to
9802 declaration, declaration_specifiers, declarator,
9803 direct_declarator, direct_abstract_declarator, function_specifier.
9804
00d34d3a
GDR
98052013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9806
9807 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9808 virtual member function.
9809 (c_pretty_printer::multiplicative_expression): Likewise.
9810 (c_pretty_printer::conditional_expression): Likewise.
9811 (c_pretty_printer::assignment_expression): Likewise.
9812 (c_pretty_printer::expression): Likewise.
9813 (pp_unary_expression): Adjust.
9814 (pp_multiplicative_expression): Likewise.
9815 (pp_assignment_expression): Likewise.
9816 (pp_conditional_expression): Likewise.
9817 (pp_expression): Likewise.
9818 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9819 from pp_c_unary_expression. Adjust.
9820 (c_pretty_printer::multiplicative_expression): Rename from
9821 pp_c_multiplicative_expression. Adjust.
9822 (c_pretty_printer::conditional_expression): Rename from
9823 pp_c_conditional_expression. Adjust.
9824 (c_pretty_printer::assignment_expression): Rename from
9825 pp_c_assignment_expression. Adjust.
9826 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9827 (c_pretty_printer::c_pretty_printer): Do not assign to
9828 unary_expression, multiplicative_expression,
9829 conditional_expression, expression.
9830
fb22178f
GDR
98312013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9832
9833 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9834 virtual member function.
9835 (pp_postfix_expression): Adjust.
9836 (pp_c_postfix_expression): Remove.
9837 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9838 from pp_c_postfix_expression. Adjust.
9839 (c_pretty_printer::c_pretty_printer): Do not assign to
9840 postfix_expression.
9841
7ecc2600
GDR
98422013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9843
9844 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9845 virtua member function.
9846 (pp_primary_expression): Adjust.
9847 (pp_c_primary_expression): Remove.
9848 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9849 from pp_c_primary_expression. Adjust.
9850 (pp_c_initializer_list): Use pp_primary_expression.
9851 (c_pretty_printer::c_pretty_printer): Do not assign to
9852 primary_expression.
9853
0691175f
GDR
98542013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9855
9856 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9857 * c-pretty-print.c (M_): Remove.
9858 (c_pretty_printer::translate_string): Define.
9859 (pp_c_type_specifier): Use it.
9860 (pp_c_primary_expression): Likewise.
9861 (pp_c_expression): Likewise.
9862
66dfe4c4
GDR
98632013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9864
9865 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9866 virtual function.
9867 (pp_c_id_expression): Remove.
9868 (pp_id_expression): Adjust.
9869 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9870 pp_c_id_expression. Adjust.
9871 (pp_c_postfix_expression): Use pp_id_expression.
9872 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9873
ca43e9d5
GDR
98742013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9875
9876 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9877 member function.
9878 (pp_constant): Adjust.
9879 (pp_c_constant): Remove.
9880 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9881 pp_c_constant. Adjust.
9882 (pp_c_constant)
9883 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9884 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9885
da6ca2b5
GDR
98862013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9887
9888 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9889 (c_pretty_printer::c_pretty_printer): Declare.
9890 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9891 c_pretty_printer_init. Adjust.
9892 (print_c_tree): Do not call c_pretty_printer_init.
9893 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9894
65a372f4
AC
98952013-08-09 Arnaud Charlet <charlet@adacore.com>
9896
9897 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9898
fd9b0f32
PC
98992013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9900
9901 PR c++/58080
9902 * c-common.c (pointer_int_sum): Add bool parameter.
9903 * c-common.h (pointer_int_sum): Adjust declaration.
9904
e0aec1e9
GDR
99052013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9906
9907 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9908 c_pretty_printer variable.
9909
b066401f
GDR
99102013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9911
9912 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9913 (pp_base): Remove.
9914 (pp_c_base): Likewise. Adjust users.
9915 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9916 (pp_c_whitespace): Do not call pp_base.
9917 (pp_c_left_paren): Likewise.
9918 (pp_c_right_paren): Likewise.
9919 (pp_c_left_brace): Likewise.
9920 (pp_c_right_brace): Likewise.
9921 (pp_c_left_bracket): Likewise.
9922 (pp_c_right_bracket): Likewise.
9923 (pp_c_dot): Likewise.
9924 (pp_c_ampersand): Likewise.
9925 (pp_c_star): Likewise.
9926 (pp_c_arrow): Likewise.
9927 (pp_c_semicolon): Likewise.
9928 (pp_c_complement): Likewise.
9929 (pp_c_exclamation): Likewise.
9930 (pp_c_direct_declarator): Likewise.
9931 (pp_c_ws_string): Likewise.
9932 (pp_c_identifier): Likewise.
9933 (pp_c_statement): Likewise.
9934 (print_c_tree): Likewise.
9935
65e5a578
ESR
99362013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9937
9938 PR c++/58072
9939 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9940 provide useful error strings.
9941
137a1a27
GDR
99422013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9943
9944 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9945 printer functions instead of pp_string or operators and punctuators.
9946 (dump_generic_ada_node): Likewise.
9947 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9948 (pp_c_relational_expression): Likewise.
9949 (pp_c_logical_or_expression): Likewise.
9950
07838b13
GDR
99512013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9952
9953 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9954 functions instead of pp_character.
9955 (pp_ada_tree_identifier): Likewise.
9956 (dump_ada_double_name): Likewise.
9957 (dump_ada_function_declaration): Likewise.
9958 (dump_ada_array_domains): Likewise.
9959 (dump_template_types): Likewise.
9960 (dump_generic_ada_node): Likewise.
9961 (print_ada_declaration): Likewise.
9962 (print_ada_struct_decl): Likewise.
9963 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9964
433cc7b0
TT
99652013-07-23 Tom Tromey <tromey@redhat.com>
9966
9967 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9968 * c-common.c (c_common_reswords): Add _Generic.
9969
688010ba
OB
99702013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9971
9972 * c-common.c: Fix typos.
9973 * c-common.h: Likewise.
9974
2a99e5e6
LL
99752013-07-13 Lubos Lunak <l.lunak@suse.cz>
9976
9977 PR c++/55203
9978 * c-common.c (c_common_attribute_table): Add warn_unused.
9979 (handle_warn_unused_attribute): New.
9980
c26302d5
JJ
99812013-07-10 Jakub Jelinek <jakub@redhat.com>
9982
9983 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9984 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9985
dfeadaa0
PC
99862013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9987
9988 PR c++/57869
9989 * c.opt: Add Wconditionally-supported.
9990
6a2fa4b2
GS
99912013-07-08 Graham Stott <graham.stott@btinternet.com>
9992
adfac8df 9993 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9994 unused variables l_length and l_node.
9995
ecdbd01a 99962013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9997
9998 PR c/57821
9999 * c-common.c (complete_array_type): Delay folding first index
10000 like other indices. When folding, check for index overflow.
10001
bedc293e
MG
100022013-06-27 Marc Glisse <marc.glisse@inria.fr>
10003
10004 PR c++/57509
10005 * c-common.h (c_build_vec_perm_expr): New complain argument.
10006 * c-common.c (c_build_vec_perm_expr): Likewise.
10007 Use save_expr also in C++.
10008
604b2bfc
GDR
100092013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10010
10011 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10012 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10013 * c-opts.c (c_common_post_options): Likewise.
10014
dfeadaa0 100152013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10016
10017 * array-notation-common.c (length_mismatch_in_expr): Changed the
10018 parameter type's from a dynamic array to a vec_tree. Also removed
10019 the size parameters.
10020 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10021 the change above.
10022
2ce86d2e
BI
100232013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10024
10025 * c-common.h (struct cilkplus_an_parts): New structure.
10026 (struct cilkplus_an_loop_parts): Likewise.
10027 (cilkplus_extract_an_triplets): New prototype.
10028 (fix_sec_implicit_args): Likewise.
10029 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10030 (fix_sec_implicit_args): Likewise.
604b2bfc 10031
07a6825b
BI
100322013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10033
10034 * array-notation-common.c (find_inv_trees): Removed an unwanted
10035 typecasting.
10036 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10037 enum rid to enum tree_code.
10038
08346abd
JH
100392013-06-11 Jan Hubicka <jh@suse.cz>
10040
10041 * c-common.c (handle_alias_ifunc_attribute): Do not set
10042 DECL_EXTERNAL for weakref variables.
10043 * c-pragma.c (handle_pragma_weak): Make sure aliases
10044 are not declared as external.
10045
d60f1706
BI
100462013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10047
10048 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10049 function from c/c-array-notation.c.
10050 (is_cilkplus_reduce_builtin): Likewise.
10051 (find_rank): Likewise.
10052 (extract_array_notation_exprs): Likewise.
10053 (replace_array_notations): Likewise.
10054 (find_inv_trees): Likewise.
10055 (replace_inv_trees): Likewise.
10056 (contains_array_notation_expr): Likewise.
10057 (find_correct_array_notation_type): Likewise.
10058 * c-common.h (struct inv_list): Moved this struct from the file
10059 c/c-array-notation.c and added a new field called additional tcodes.
10060 (length_mismatch_in_expr_p): New prototype.
10061 (is_cilkplus_reduce_builtin): Likewise.
10062 (find_rank): Likewise.
10063 (extract_array_notation_exprs): Likewise.
10064 (replace_array_notation): Likewise.
10065 (find_inv_trees): Likewise.
10066 (replace_inv_trees): Likewise.
10067 (find_correct_array_notation_type): Likewise.
dfeadaa0 10068
36536d79
BI
100692013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10070
10071 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10072 function array_notation_init_builtins is called.
10073 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10074 * c-common.def (ARRAY_NOTATION_REF): New tree.
10075 * c-common.h (build_array_notation_expr): New function declaration.
10076 (build_array_notation_ref): Likewise.
10077 (extract_sec_implicit_index_arg): New extern declaration.
10078 (is_sec_implicit_index_fn): Likewise.
10079 (ARRAY_NOTATION_CHECK): New define.
10080 (ARRAY_NOTATION_ARRAY): Likewise.
10081 (ARRAY_NOTATION_START): Likewise.
10082 (ARRAY_NOTATION_LENGTH): Likewise.
10083 (ARRAY_NOTATION_STRIDE): Likewise.
10084 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10085 ARRAY_NOTATION_REF.
10086 (pp_c_expression): Likewise.
10087 * c.opt (flag_enable_cilkplus): New flag.
10088 * array-notation-common.c: New file.
10089
f7716d57
JJ
100902013-05-14 Jakub Jelinek <jakub@redhat.com>
10091
10092 PR c++/57274
10093 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10094
a5e0cd1d
MG
100952013-05-10 Marc Glisse <marc.glisse@inria.fr>
10096
10097 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10098 vectors.
10099
f6bc1c4a
HS
101002013-05-07 Han Shen <shenhan@google.com>
10101
10102 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10103
3f12f6e9
SKS
101042013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10105
10106 * c-common.c (check_user_alignment): Emit error for negative values.
10107
61949153
PC
101082013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10109
10110 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10111
e93e18e9
PC
101122013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10113
10114 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10115 __GXX_EXPERIMENTAL_CXX1Y__.
10116
44d90fe1 101172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 10118 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
10119
10120 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10121 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10122 to simply use OPT_Wpointer_arith.
10123 (c_sizeof_or_alignof_type): Likewise.
10124
13f39b2e
PC
101252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10126
10127 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10128
4b84d650
JJ
101292013-04-12 Jakub Jelinek <jakub@redhat.com>
10130
10131 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10132 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10133 specifiers.
10134
fb037b5d
SB
101352013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10136
10137 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10138
4e856798
PC
101392013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10140
10141 * c-common.c (pointer_int_sum): Remove dead code.
10142
4b1baac8
RS
101432013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10144
10145 PR middle-end/56524
10146 * c-common.c (handle_optimize_attribute): Don't call
10147 save_optabs_if_changed.
10148
0b50e654
JJ
101492013-03-05 Jakub Jelinek <jakub@redhat.com>
10150
10151 PR middle-end/56461
10152 * c-pch.c (pch_init): Free target_validity at the end.
10153
48c41403
JJ
101542013-03-04 Jakub Jelinek <jakub@redhat.com>
10155
10156 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10157
e664c61c
KS
101582013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10159 Jakub Jelinek <jakub@redhat.com>
10160
10161 PR sanitizer/56454
10162 * c-common.c (handle_no_sanitize_address_attribute): New function.
10163 (c_common_attribute_table): Add no_sanitize_address attribute.
10164 (handle_no_address_safety_analysis_attribute): Add
10165 no_sanitize_address attribute, not no_address_safety_analysis
10166 attribute.
10167
a475fd3d 101682013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
10169
10170 PR target/52555
10171 * c-common.c (handle_optimize_attribute): Call
10172 save_optabs_if_changed.
10173
f6007d99
JJ
101742013-02-18 Jakub Jelinek <jakub@redhat.com>
10175 Steven Bosscher <steven@gcc.gnu.org>
10176
10177 PR pch/54117
10178 * c-opts.c (c_common_post_options): If debug info is enabled
10179 and non-dwarf*, refuse to load PCH files and when writing PCH
10180 file warn.
10181
cf35e2b1
JJ
101822013-02-05 Jakub Jelinek <jakub@redhat.com>
10183
10184 PR middle-end/56167
10185 * c-common.c (handle_error_attribute): Fix condition.
10186
32887460
JJ
101872013-01-30 Jakub Jelinek <jakub@redhat.com>
10188
10189 PR c++/55742
10190 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10191
5af057d8
JM
101922013-01-18 Jason Merrill <jason@redhat.com>
10193
10194 PR target/54908
10195 * c.opt (-fextern-tls-init): New.
10196 * c-opts.c (c_common_post_options): Handle it.
10197
cc83c823
JJ
101982013-01-09 Jakub Jelinek <jakub@redhat.com>
10199
10200 PR c/48418
10201 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10202 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10203 and is either negative or bigger or equal to type precision
10204 of the first operand.
10205
a859517f
MP
102062012-12-03 Marek Polacek <polacek@redhat.com>
10207
10208 PR c/55570
10209 * c-common.c (check_user_alignment): Swap order of tests,
10210 check TREE_CODE first.
10211
2d7aa578
ESR
102122012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10213
10214 PR c++/52654
10215 * c-common.h (overflow_type): New enum.
10216 (build_userdef_literal): Add overflow_type argument.
10217 (tree_userdef_literal): Add overflow_type.
10218 (USERDEF_LITERAL_OVERFLOW): New access macro.
10219 * c-common.c (build_userdef_literal): Add overflow_type
10220 argument.
10221 * c-lex.c (c_lex_with_flags): Add overflow_type to
10222 build_userdef_literal calls.
10223 (interpret_integer, interpret_float): Add overflow_type argument.
10224
cc3c4f62
RB
102252012-11-28 Richard Biener <rguenther@suse.de>
10226
10227 PR c/35634
10228 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10229 here and use a type with proper overflow behavior for types that would
10230 need to be promoted for the arithmetic.
10231
77bc5132
JJ
102322012-11-23 Jakub Jelinek <jakub@redhat.com>
10233
10234 PR sanitizer/55435
10235 * c-common.c (handle_no_address_safety_analysis_attribute): New
10236 function.
10237 (c_common_attribute_table): Add no_address_safety_analysis.
10238
5dc99c46
SB
102392012-11-16 Simon Baldwin <simonb@google.com>
10240
10241 * c.opt: Add f[no-]canonical-system-headers.
10242 * c-opts.c (c_common_handle_option): Handle
10243 OPT_fcanonical_system_headers.
10244
a4a0016d
ESR
102452012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10246
10247 PR c++/54413
10248 * c-opts.c (c_common_handle_option): Set new flags.
10249 * c.opt: Describe new flags.
10250
7dbb85a7
JM
102512012-11-09 Jason Merrill <jason@redhat.com>
10252
10253 * c.opt (Wabi-tag): New.
10254
ad7bac31
AK
102552012-11-09 Andi Kleen <ak@linux.intel.com>
10256
10257 PR 55139
10258 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10259 MEMMODEL_MASK
ad7bac31 10260
7332899a
MLI
102612012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10262
10263 PR c/53063
10264 * c.opt (Wformat): Make it Alias Wformat=1.
10265 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10266 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10267 LangEnabledBy.
10268 (Wformat=): RejectNegative. Use LangEnabledBy.
10269 (Wnonnull): Use LangEnabledBy.
10270 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10271 * c-format.c (set_Wformat): Delete.
10272 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10273 (maybe_read_dollar_number): Likewise.
10274 (avoid_dollar_number): Likewise.
10275 (finish_dollar_format_checking): Likewise.
10276 (check_format_info): Likewise.
10277 (check_format_info_main): Likewise.
10278 (check_format_types): Likewise.
10279 (format_type_warning): Likewise.
10280 * c-common.c (int): Likewise.
10281 (check_function_sentinel): Likewise.
8e745a17 10282 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10283
34a180a6
MLI
102842012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10285
10286 PR c/53063
10287 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10288 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10289 Use LangEnabledBy.
10290 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10291 common.opt.
10292 (Wvariadic-macros): Init(1).
10293 * c-opts.c (c_common_handle_option): Do not handle them
10294 explicitly.
10295 (c_common_post_options): Likewise.
10296 (sanitize_cpp_opts): warn_unused_macros is now
10297 cpp_warn_unused_macros.
10298 (push_command_line_include): Likewise.
10299 * c-common.c (warn_unknown_pragmas): Do not define.
10300 * c-common.h (warn_unknown_pragmas): Do not declare.
10301
3f46d6a5
MLI
103022012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10303
10304 PR c/51294
10305 * c-common.c (conversion_warning): Handle conditional expressions.
10306
880661a4
JW
103072012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10308
10309 PR c++/54930
10310 * c.opt (Wreturn_local_addr): Define new option.
10311
4514a96b
JM
103122012-10-25 Jason Merrill <jason@redhat.com>
10313
f14edc1a
JM
10314 * c.opt (Wvirtual-move-assign): New.
10315
4514a96b
JM
10316 * c.opt (Winherited-variadic-ctor): New.
10317
93100c6b
MG
103182012-10-25 Marc Glisse <marc.glisse@inria.fr>
10319
10320 PR c++/54427
10321 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10322
1efcb8c6
JM
103232012-10-23 Joseph Myers <joseph@codesourcery.com>
10324
10325 * c-common.h (pch_cpp_save_state): Declare.
10326 * c-target.def (c_preinclude): New hook.
10327 * c-opts.c (done_preinclude): New.
10328 (push_command_line_include): Handle default preincluded header.
10329 (cb_file_change): Call pch_cpp_save_state when calling
10330 push_command_line_include.
10331 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10332 (pch_cpp_save_state): New.
10333 (pch_init): Call pch_cpp_save_state conditionally, instead of
10334 calling cpp_save_state.
10335
4a0ae68e
MLI
103362012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10337
10338 PR c/53063
10339 PR c/40989
10340 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10341 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10342 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10343 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10344 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10345 * c-opts.c (c_common_handle_option): Remove explicit handling from
10346 here.
10347 (c_common_post_options): Likewise.
10348
67e4210b
EB
103492012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10350
10351 * c-ada-spec.c (LOCATION_COL): Delete.
10352 (compare_location): New function.
10353 (compare_node): Use it.
10354 (compare_comment): Likewise.
10355
65d4f2cd
MLI
103562012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10357
10358 PR c/53063
10359 PR c/40989
10360 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10361 * c-opts.c (c_common_handle_option): Do not set them here. Add
10362 comment.
10363 (c_common_post_options): Likewise.
10364
909881cb
EB
103652012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10366
10367 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10368 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10369 Remove POINTER_TYPE handling, add large unsigned handling and use
10370 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10371
3a785c97
JJ
103722012-10-12 Jakub Jelinek <jakub@redhat.com>
10373
10374 PR c/54381
10375 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10376 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10377 locs and array of 3 trees instead of just single loc and single
10378 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10379 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10380 For *cmp* builtins that take two sources strings report warnings
10381 about first and second source, not about destination and source.
10382
5e54f81d
MG
103832012-10-12 Marc Glisse <marc.glisse@inria.fr>
10384
10385 PR c++/53055
10386 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10387
f5b02f1e
EB
103882012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10389
10390 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10391 declaring something coming from another file.
10392
b46dbc6c
AC
103932012-10-10 Arnaud Charlet <charlet@adacore.com>
10394
f5b02f1e 10395 PR ada/54845
b46dbc6c
AC
10396 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10397
5d9de0d0
PC
103982012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10399
10400 PR c++/54194
10401 * c-common.c (warn_about_parentheses): Add location_t parameter;
10402 use EXPR_LOC_OR_LOC.
10403 * c-common.h: Update declaration.
10404
a212e43f
MG
104052012-10-09 Marc Glisse <marc.glisse@inria.fr>
10406
10407 PR c++/54427
10408 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10409 more operations. Make error messages optional.
10410 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10411 (scalar_to_vector): Declare.
10412
b1db7f91
JM
104132012-10-08 Jason Merrill <jason@redhat.com>
10414
10415 * c-common.c (c_common_reswords): Add thread_local.
10416
e28d52cf
DS
104172012-10-08 Dodji Seketeli <dodji@redhat.com>
10418
10419 PR c++/53528 C++11 attribute support
10420 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10421 new functions.
10422 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10423 static function.
10424 (handle_aligned_attribute): In choose strictest alignment
10425 among many. Use new check_cxx_fundamental_alignment_constraints.
10426 (handle_transparent_union_attribute): In c++11 attribute syntax,
10427 don't look through typedefs.
10428
3b78de56
AC
104292012-10-04 Arnaud Charlet <charlet@adacore.com>
10430
10431 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10432 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10433 out of dumpfile.h.
10434
6040bb5f
DC
104352012-09-25 Dehao Chen <dehao@google.com>
10436
10437 PR middle-end/54645
3b78de56 10438 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10439 map when read in the pch.
10440
3f8257db 104412012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10442
10443 * c-ada-spec.c: Style fixes.
10444
3f8257db 104452012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10446
10447 * c.opt (-fada-spec-parent): Define new command line switch.
10448 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10449 is specified, generate binding spec as a child of the specified unit.
10450
0ccb505d
PC
104512012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10452 Manuel López-Ibáñez <manu@gcc.gnu.org>
10453
10454 PR c++/53210
10455 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10456
c583af79
AC
104572012-08-23 Arnaud Charlet <charlet@adacore.com>
10458
10459 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10460 for pointers, and add missing Convention C pragma.
10461 (print_ada_struct_decl): Add missing aliased keyword.
10462 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10463
1a4049e7
JJ
104642012-08-17 Jakub Jelinek <jakub@redhat.com>
10465
10466 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10467 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10468 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10469 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10470 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10471
70b5e7dc
RG
104722012-08-10 Richard Guenther <rguenther@suse.de>
10473
10474 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10475
f8923f7e
SB
104762012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10477
10478 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10479 instead of separate pp_newline and pp_flush.
10480 (print_c_tree): Likewise.
10481
e45abe1f
RH
104822012-07-26 Richard Henderson <rth@redhat.com>
10483
10484 * c-common.c (handle_hot_attribute): Allow labels.
10485 (handle_cold_attribute): Likewise.
10486
332f1d24
JJ
104872012-07-20 Jakub Jelinek <jakub@redhat.com>
10488
10489 PR c++/28656
10490 * c-common.c (check_function_nonnull): Handle multiple nonnull
10491 attributes properly.
10492
7ee2468b
SB
104932012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10494
10495 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10496 * c-ada-spec.c: Likewise.
10497 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10498
ee7b28eb
SB
104992012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10500
10501 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10502 Remove code conditional on it.
10503
6bdf3519
SB
105042012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10505
10506 * c-gimplify.c: Do not include basic-block.h.
10507 * c-common.c: Do not include linfuncs.h.
10508
532aafad
SB
105092012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10510
10511 * c-common.h: Include tree.h.
10512
8d0d1915
JM
105132012-07-02 Jason Merrill <jason@redhat.com>
10514
10515 PR c++/53524
10516 * c-common.c (get_priority): Call default_conversion.
10517
fbc873ad
UB
105182012-07-01 Uros Bizjak <ubizjak@gmail.com>
10519
10520 * c-pch.c (c_common_write_pch): Remove unused variables.
10521
d4a10d0a
SB
105222012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10523
10524 * cppspec.c: Moved from gcc/ to here.
10525
6f3a2e23
KT
105262012-06-27 Kai Tietz <ktietz@redhat.com>
10527
10528 PR preprocessor/37215
10529 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10530
8ca92d04
SB
105312012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10532
10533 * c-common.h (c_common_print_pch_checksum): Remove.
10534 * c-pch.c: Do not include output.h.
10535 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10536 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10537 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10538 (struct c_pch_header): Remove.
10539 (get_ident): Update gpch version.
10540 (pch_init): Do not print executable_checksum to asm_out_file.
10541 Do not fail if there is no asm_out_file to read back from. Set
10542 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10543 (c_common_write_pch): Verify that nothing was written to asm_out_file
10544 since pch_init was called. Do not write a c_pch_header, and do not
10545 copy from asm_out_file to the PCH.
10546 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10547 the content of asm_out_file from the PCH.
10548 (c_common_print_pch_checksum): Remove.
10549 * c-opts.c (c_common_init): Print out executable_checksum directly.
10550
70f42967
SB
105512012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10552
10553 * c-target.def (objc_declare_unresolved_class_reference,
10554 objc_declare_class_definition): Add new hooks.
10555
a8781821
SB
105562012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10557
10558 * c-lex.c: Do not include output.h.
10559 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10560 Remove uses of ASM_OUTPUT_IDENT.
10561
9e1a8dd1
RR
105622012-06-15 Marc Glisse <marc.glisse@inria.fr>
10563
10564 PR c++/51033
10565 * c-common.h (c_build_vec_perm_expr): Move decl here.
10566 * c-common.c (c_build_vec_perm_expr): Move definition
10567 here.
10568
6f07a821
SB
105692012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10570
10571 * c.opt (fconserve-space): Turn into a no-op.
10572
9faeb493 105732012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10574
10575 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10576 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10577 both the start and end of the function.
10578
a4b7d13c
SB
105792012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10580
10581 * c-common.c: Do not include output.h.
10582 * c-pragma.c: Likewise.
10583
c265f413
SA
105842012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10585
10586 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10587 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10588 (lang_decl_name): Handle namespace decls.
10589
be7a421e
SB
105902012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10591
10592 * c-ada-spec.c: Do not include output.h.
10593 * c-semantics.c: Likewise.
10594
65de6659
JM
105952012-05-29 Joseph Myers <joseph@codesourcery.com>
10596
10597 * c-common.c: Fix typo.
10598
ca5f4331
MM
105992012-05-29 Michael Matz <matz@suse.de>
10600
10601 * c-common.h (c_expand_decl): Remove prototype.
10602
4f7f7aca
MLI
106032012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10604
10605 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10606 * c-opts.c (c_common_handle_option): Remove code handling
10607 warn_missing_braces.
10608
4a792f9b
PC
106092012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10610
10611 PR c++/25137
10612 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10613 -Wmissing_braces.
10614
650dc14a
DS
106152012-05-22 Dodji Seketeli <dodji@redhat.com>
10616
10617 PR c++/53322
10618 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10619
9b095bf1
MLI
106202012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10621
10622 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10623 * c-opts.c (c_common_handle_option): Do not handle explicitly
10624 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10625
0b2c4be5
DS
106262012-05-16 Dodji Seketeli <dodji@redhat.com>
10627
10628 PR preprocessor/7263
ab20d992 10629 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10630 to cpp_classify_number. For diagnostics, use the precise location
10631 instead of the global input_location.
10632
a1bde5af
PC
106332012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10634
d02924ef 10635 PR c++/11856
a1bde5af
PC
10636 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10637
d1ede5f4
BS
106382012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10639
a1bde5af 10640 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10641
f2bc201f
MLI
106422012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10643
10644 PR 53063
10645 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10646 Wreorder): Use LangEnabledBy.
10647 * c-opts.c (c_common_handle_option): Do not enable them
10648 explicitly. Call lang-specific generated functions.
10649 (c_common_post_options): Do not set them here.
10650
95744782
MLI
106512012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10652
10653 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10654 Wmissing-field-initializers,Wmissing-parameter-type,
10655 Wold-style-declaration,Woverride-init): Use EnabledBy.
10656 * c-opts.c (c_common_post_options): Do not set here explicitly.
10657
7d5a5747
MLI
106582012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10659
10660 PR 53063
10661 * c-opts.c (c_common_handle_option): Use handle_generated_option
10662 to enable sub-options.
10663
5a3c9cf2
PC
106642012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10665
10666 PR c++/53158
10667 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10668
3ac8781c
RG
106692012-05-10 Richard Guenther <rguenther@suse.de>
10670
10671 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10672 adjust commentary about TYPE_IS_SIZETYPE types.
10673
1e537948
MLI
106742012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10675
10676 PR c++/53261
10677 * c-common.c (warn_logical_operator): Check that argument of
10678 integer_zerop is not NULL.
10679
f2c4a785
MLI
106802012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10681
10682 PR c/43772
10683 * c-common.c (warn_logical_operator): Do not warn if either side
10684 is already true or false.
10685
50f305ca
MLI
106862012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10687
10688 PR c/51712
10689 * c-common.c (expr_original_type): New.
10690 (shorten_compare): Do not warn for enumeration types.
10691
0c3641b0
MLI
106922012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10693
10694 * c.opt (fpermissive): Add Var(flag_permissive).
10695
7edaa4d2
MG
106962012-04-30 Marc Glisse <marc.glisse@inria.fr>
10697
10698 PR c++/51033
10699 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10700 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10701
b9c8da34
DS
107022012-04-30 Dodji Seketeli <dodji@redhat.com>
10703
10704 Add -Wvarargs option
ab20d992 10705 * c.opt (Wvarargs): Define new option.
b9c8da34 10706
e6c69da0
MLI
107072012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10708
10709 * c-common.c (check_function_arguments): Replace
10710 Wmissing-format-attribute with Wsuggest-attribute=format.
10711
90137d8f
MLI
107122012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10713
10714 * c.opt (Wsuggest-attribute=format): New. Alias of
10715 Wmissing-format-attribute.
10716 * c-format.c (decode_format_type): Replace
10717 Wmissing-format-attribute with Wsuggest-attribute=format.
10718 (check_function_format): Likewise.
10719
9faeb493 107202012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10721
10722 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10723 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10724 * c.opt: Add Wliteral-suffix.
10725
c1771a20
MLI
107262012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10727
10728 PR c/44774
10729 * c.opt (Wpedantic): New.
10730 (pedantic): Alias Wpedantic.
10731 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10732 (c_common_post_options): Likewise.
10733 (sanitize_cpp_opts): Likewise.
10734 * c-lex.c (interpret_float): Likewise.
10735 * c-format.c (check_format_types): Likewise.
10736 * c-common.c (pointer_int_sum): Likewise.
10737 (c_sizeof_or_alignof_type): Likewise.
10738 (c_add_case_label): Likewise.
10739 (c_do_switch_warnings): Likewise.
10740 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10741
04b391c1
JM
107422012-04-15 Jason Merrill <jason@redhat.com>
10743
10744 PR c++/52818
10745 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10746 (C_STD_NAME): Distinguish between C++98 and C++11.
10747
ac868f29
EB
107482012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10749
10750 PR target/52624
10751 * c-common.h (uint16_type_node): Rename into...
10752 (c_uint16_type_node): ...this.
10753 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10754 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10755
fd4116f4
MLI
107562012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10757
10758 * c-common.c (warn_if_unused_value): Move definition to here.
10759 * c-common.h (warn_if_unused_value): Move declaration to here.
10760
573ac65e
WB
107612012-03-23 William Bader <williambader@hotmail.com>
10762
10763 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10764
552b8185
JM
107652012-03-20 Jason Merrill <jason@redhat.com>
10766
10767 * c-common.h (enum cxx_dialect): Add cxx1y.
10768 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10769 test.
10770 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10771 * c-opts.c (c_common_post_options): Likewise.
10772 (set_std_cxx1y): New.
10773 (c_common_handle_option): Call it.
10774 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10775
04398fa8
PC
107762012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10777
10778 PR c++/14710
10779 * c.opt ([Wuseless-cast]): Add.
10780
d2a12ae7
RG
107812012-03-16 Richard Guenther <rguenther@suse.de>
10782
10783 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10784
a12bf402
MLI
107852012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10786
10787 PR c++/44783
10788 * c.opt (ftemplate-backtrace-limit) Add.
10789
5c30094f
RO
107902012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10791
10792 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10793 handling.
10794 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10795 (init_pragma): Don't register extern_prefix.
10796
21fa2faf
RG
107972012-03-12 Richard Guenther <rguenther@suse.de>
10798
10799 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10800 (builtin_type_for_size): Likewise.
10801
e3793c6f
JJ
108022012-02-13 Jakub Jelinek <jakub@redhat.com>
10803
10804 PR c++/52215
10805 * c-common.c (sync_resolve_params): Don't decide whether to convert
10806 or not based on TYPE_SIZE comparison, convert whenever arg_type
10807 is unsigned INTEGER_TYPE.
10808
93286335
PC
108092012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10810
10811 PR c/52118
10812 * c.opt ([Wunused-local-typedefs]): Fix description.
10813
7a421706
MS
108142012-01-24 Mike Stump <mikestump@comcast.net>
10815
10816 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10817 exactly.
10818
ba9b1f11
RG
108192012-01-18 Richard Guenther <rguenther@suse.de>
10820
10821 * c-opts.c (c_common_post_options): Reset LTO flags if
10822 we are about to generate a PCH.
10823
465406be
PC
108242012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10825
10826 PR c++/51777
10827 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10828 use pp_unsigned_wide_integer.
10829
aee15221
RG
108302012-01-10 Richard Guenther <rguenther@suse.de>
10831
10832 PR middle-end/51806
10833 * c-opts.c (c_common_handle_option): Move -Werror handling
10834 to language independent code.
10835
5720c0dc
RG
108362012-01-05 Richard Guenther <rguenther@suse.de>
10837
10838 PR middle-end/51764
10839 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10840 from common.opt.
10841
73ac190a
PC
108422011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10843
10844 PR c++/51316
10845 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10846 of array types with an unknown bound.
10847
48b0b196
JM
108482011-12-20 Joseph Myers <joseph@codesourcery.com>
10849
10850 * c-common.c (flag_isoc99): Update comment to refer to C11.
10851 (flag_isoc1x): Change to flag_isoc11.
10852 * c-common.h (flag_isoc99): Update comment to refer to C11.
10853 (flag_isoc1x): Change to flag_isoc11.
10854 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10855 C11.
10856 * c-opts.c (set_std_c1x): Change to set_std_c11.
10857 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10858 Call set_std_c11.
10859 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10860 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10861 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10862 standard.
10863 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10864 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10865 (std=gnu1x): Make alias of std=gnu11.
10866
d58d6eb5
JM
108672011-12-19 Jason Merrill <jason@redhat.com>
10868
10869 PR c++/51228
10870 * c-common.c (handle_transparent_union_attribute): Check the first
10871 field if the type is complete.
10872
b3908fcc
JW
108732011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10874
10875 PR libstdc++/51365
10876 * c-common.c (RID_IS_FINAL): Add.
10877 * c-common.h (RID_IS_FINAL): Add.
10878
fea3ca91
IS
108792011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10880
10881 * c.opt (fgnu-runtime): Provide full description.
10882 (fnext-runtime): Likewise.
10883 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10884
62bad7cd
AM
108852011-11-28 Andrew MacLeod <amacleod@redhat.com>
10886
10887 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10888 predefines in one place. Add LOCK_FREE predefines.
10889 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10890 new func.
10891
c466c4ff
AM
108922011-11-24 Andrew MacLeod <amacleod@redhat.com>
10893
10894 PR c/51256
9faeb493 10895 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10896 conditions
9faeb493
UB
10897 (resolve_overloaded_atomic_exchange,
10898 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10899 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10900 error_mark_node for error conditions.
9faeb493 10901
a5952633
RG
109022011-11-08 Richard Guenther <rguenther@suse.de>
10903
10904 PR middle-end/51010
ab20d992 10905 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10906
0a35513e
AH
109072011-11-07 Richard Henderson <rth@redhat.com>
10908 Aldy Hernandez <aldyh@redhat.com>
10909 Torvald Riegel <triegel@redhat.com>
10910
10911 Merged from transactional-memory.
10912
10913 * c-common.c (handle_tm_wrap_attribute,
10914 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10915 (struct c_common_reswords): Added __transaction* keywords.
10916 (struct c_common_attribute_table): Added transaction* and tm_regparm
10917 attributes.
10918 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10919 masks.
10920 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10921 find_tm_attribute): Declare.
10922
6d87092d
JM
109232011-11-07 Jason Merrill <jason@redhat.com>
10924
10925 PR c++/35688
10926 * c-common.c, c-common.h: Revert yesterday's changes.
10927
8e7860a1
JM
109282011-11-06 Jason Merrill <jason@redhat.com>
10929
10930 PR c++/35688
10931 * c-common.c (decl_has_visibility_attr): Split out from...
10932 (c_determine_visibility): ...here.
10933 * c-common.h: Declare it.
10934
d19fa6b5
JM
109352011-11-06 Joseph Myers <joseph@codesourcery.com>
10936
10937 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10938 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10939 type.
10940 (check_user_alignment): New. Split out of
10941 handle_aligned_attribute. Disallow integer constants with
10942 noninteger types. Conditionally allow zero.
10943 (handle_aligned_attribute): Use check_user_alignment.
10944 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10945
86951993
AM
109462011-11-06 Andrew MacLeod <amacleod@redhat.com>
10947 Richard Henderson <rth@redhat.com>
10948
10949 Merged from cxx-mem-model.
10950
10951 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10952 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10953 parameters that are the same type size.
10954 (get_atomic_generic_size): New. Find size of generic
10955 atomic function parameters and do typechecking.
10956 (add_atomic_size_parameter): New. Insert size into parameter list.
10957 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10958 either __atomic_exchange_n or external library call.
9faeb493 10959 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10960 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10961 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10962 __atomic_load_n or an external library call.
10963 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10964 __atomic_store_n or an external library call.
10965 (resolve_overloaded_builtin): Handle new __atomic builtins.
10966
cf9e9959
EB
109672011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10968
10969 PR c++/50608
10970 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10971 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10972 <INDIRECT_REF>: Return the argument.
10973 <ARRAY_REF>: Remove special code for negative offset.
10974 Call fold_build_pointer_plus instead of size_binop.
10975 (fold_offsetof): Remove STOP_REF argument and adjust.
10976 * c-common.h (fold_offsetof_1): Declare.
10977 (fold_offsetof): Remove STOP_REF argument.
10978
25339f10
JM
109792011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10980
10981 PR c++/50810
10982 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10983 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10984 Wnarrowing for C++0x and C++98.
10985 * c.opt ([Wnarrowing]): Update.
10986
89401152
PC
109872011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10988
10989 PR c++/44277
10990 * c.opt: Add Wzero-as-null-pointer-constant.
10991
97e3ad20
JM
109922011-10-31 Jason Merrill <jason@redhat.com>
10993
15694fdd
JM
10994 * c.opt (-fdeduce-init-list): Off by default.
10995
97e3ad20
JM
10996 PR c++/50920
10997 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10998 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10999 and -Wc++11-compat.
11000 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11001
fb9120e3
RAV
110022011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11003
11004 PR c++/30066
11005 * c.opt (fvisibility-inlines-hidden): Description change.
11006
3ce4f9e4
ESR
110072011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11008
11009 Implement C++11 user-defined literals.
11010 * c-common.c (build_userdef_literal): New.
11011 * c-common.def: New tree code.
11012 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11013 * c-lex.c (interpret_float): Add suffix parm.
11014 (c_lex_with_flags): Build literal tokens.
11015
5f53c243
PC
110162011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11017
11018 PR c++/50841
11019 Revert:
11020 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11021
11022 PR c++/50810
11023 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11024 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11025 Wnarrowing for C++0x and C++98.
11026 * c.opt ([Wnarrowing]): Update.
11027
263734e1
PC
110282011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11029
11030 PR c++/50810
11031 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11032 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11033 Wnarrowing for C++0x and C++98.
11034 * c.opt ([Wnarrowing]): Update.
11035
d2e312d7
PC
110362011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11037
11038 PR c++/45385
11039 * c-common.c (conversion_warning): Remove code looking for
11040 artificial operands.
11041
d17687f6
DS
110422011-10-18 Dodji Seketeli <dodji@redhat.com>
11043
11044 PR bootstrap/50760
11045 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11046 !NO_IMPLICIT_EXTERN_C.
d17687f6 11047
fc8396e9
PC
110482011-10-17 Michael Spertus <mike_spertus@symantec.com>
11049
11050 * c-common.c (c_common_reswords): Add __bases,
11051 __direct_bases.
11052 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11053
110542011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11055
11056 PR c++/50757
11057 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11058
847e697a
TT
110592011-10-15 Tom Tromey <tromey@redhat.com>
11060 Dodji Seketeli <dodji@redhat.com>
11061
11062 * c.opt (fdebug-cpp): New option.
11063 * c-opts.c (c_common_handle_option): Handle the option.
11064 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11065 output stream in parameter. Factorized from ...
11066 (maybe_print_line): ... this. Dump location debug information when
11067 -fdebug-cpp is in effect.
11068 (print_line_1): New static function. Takes an output stream in
11069 parameter. Factorized from ...
11070 (print_line): ... here. Dump location information when -fdebug-cpp
11071 is in effect.
11072 (scan_translation_unit): Dump location information when
11073 -fdebug-cpp is in effect.
11074
92582b75
TT
110752011-10-15 Tom Tromey <tromey@redhat.com>
11076 Dodji Seketeli <dodji@redhat.com>
11077
11078 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11079 without argument.
11080 * c-opts.c (c_common_handle_option)<case
11081 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11082 cases. Handle -ftrack-macro-expansion with and without argument.
11083
46427374
TT
110842011-10-15 Tom Tromey <tromey@redhat.com>
11085 Dodji Seketeli <dodji@redhat.com>
11086
11087 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11088 (print_line, cb_define, do_line_change): Adjust to avoid touching
11089 the internals of struct line_map. Use the public API instead.
11090 * c-pch.c (c_common_read_pch): Likewise.
11091 * c-lex.c (fe_file_change): Likewise.
11092
fc8396e9
PC
110932011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11094
11095 PR c++/17212
11096 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11097
110982011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11099
11100 PR c++/33067
11101 * c-pretty-print.c (pp_c_floating_constant): Output
11102 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11103
e79983f4
MM
111042011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11105
11106 * c-common.c (def_builtin_1): Delete old interface with two
11107 parallel arrays to hold standard builtin declarations, and replace
11108 it with a function based interface that can support creating
11109 builtins on the fly in the future. Change all uses, and poison
11110 the old names. Make sure 0 is not a legitimate builtin index.
11111 * c-omp.c (c_finish_omp_barrier): Ditto.
11112 (c_finish_omp_taskwait): Ditto.
11113 (c_finish_omp_flush): Ditto.
11114
6637388f
TG
111152011-10-11 Tristan Gingold <gingold@adacore.com>
11116
11117 * c.opt: (fallow-parameterless-variadic-functions): New.
11118
3797cb21
DS
111192011-09-08 Dodji Seketeli <dodji@redhat.com>
11120
11121 PR c++/33255 - Support -Wunused-local-typedefs warning
11122 * c-common.h (struct c_language_function::local_typedefs): New
11123 field.
9faeb493
UB
11124 (record_locally_defined_typedef, maybe_record_typedef_use)
11125 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 11126 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
11127 (maybe_record_typedef_use)
11128 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
11129 * c.opt: Declare new -Wunused-local-typedefs flag.
11130
693ddb1b
EB
111312011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11132
11133 PR middle-end/50266
11134 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11135 computations.
11136
830c740f
RG
111372011-09-05 Richard Guenther <rguenther@suse.de>
11138
11139 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11140 of integer_minus_one_node for empty array upper bounds.
11141
892a371f
DS
111422011-08-28 Dodji Seketeli <dodji@redhat.com>
11143
11144 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11145 it's the first time it's being called on this main TU.
11146
0e3fdb48
RB
111472011-08-24 Richard Guenther <rguenther@suse.de>
11148
11149 PR c/49396
11150 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11151
111522011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
11153
11154 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11155 defined in cpp_init_builtins and c_cpp_builtins.
11156
d4a83c10
JM
111572011-08-19 Joseph Myers <joseph@codesourcery.com>
11158
11159 * c-common.c (c_common_reswords): Add __builtin_complex.
11160 * c-common.h (RID_BUILTIN_COMPLEX): New.
11161
bbceee64
JM
111622011-08-18 Joseph Myers <joseph@codesourcery.com>
11163
11164 * c-common.c (c_common_reswords): Add _Noreturn.
11165 (keyword_is_function_specifier): Handle RID_NORETURN.
11166 * c-common.h (RID_NORETURN): New.
11167
3f8257db 111682011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
11169
11170 * c-common.c (unsafe_conversion_p): New function. Check if it is
11171 unsafe to convert an expression to the type.
11172 (conversion_warning): Adjust, use unsafe_conversion_p.
11173 * c-common.h (unsafe_conversion_p): New function declaration.
11174
20906c66
JJ
111752011-08-02 Jakub Jelinek <jakub@redhat.com>
11176
11177 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11178 (c_finish_omp_taskyield): New prototype.
11179 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11180 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11181 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11182 or RHS1 have side-effects, evaluate those too in the right spot,
11183 if it is a decl and LHS is also a decl, error out if they
11184 aren't the same.
11185 (c_finish_omp_taskyield): New function.
11186 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11187 * c-pragma.c (omp_pragmas): Add taskyield.
11188 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11189 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11190 PRAGMA_OMP_CLAUSE_MERGEABLE.
11191
770e5a2e
DS
111922011-07-25 Dodji Seketeli <dodji@redhat.com>
11193
11194 * c-common.h (set_underlying_type): Remove parm name from
11195 declaration.
11196
1baae426
RG
111972011-07-25 Romain Geissler <romain.geissler@gmail.com>
11198
11199 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 11200
fcb21722
JM
112012011-07-22 Jason Merrill <jason@redhat.com>
11202
76f86d00
JM
11203 PR c++/49793
11204 * c.opt (Wnarrowing): New.
11205
3a636414
JM
11206 PR c++/30112
11207 * c-common.h: Declare c_linkage_bindings.
11208 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11209
fcb21722
JM
11210 PR c++/49813
11211 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11212 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11213 as flag_isoc99 for 'restrict'.
11214 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11215
02614448
ILT
112162011-07-21 Ian Lance Taylor <iant@google.com>
11217
11218 PR middle-end/49705
11219 * c-common.c (c_disable_warnings): New static function.
11220 (c_enable_warnings): New static function.
11221 (c_fully_fold_internal): Change local unused_p to bool. Call
11222 c_disable_warnings and c_enable_warnings rather than change
11223 c_inhibit_evaluation_warnings.
11224
34429675
JM
112252011-07-20 Jason Merrill <jason@redhat.com>
11226
11227 PR c++/6709 (DR 743)
11228 PR c++/42603 (DR 950)
11229 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11230 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11231 (CPP_DECLTYPE): New.
11232 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11233
5d49b6a7
RG
112342011-07-19 Richard Guenther <rguenther@suse.de>
11235
11236 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11237 * c-omp.c (c_finish_omp_for): Likewise.
11238
e84a58ff
EB
112392011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11240
11241 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11242 body on the next line.
11243
329af3c7
JM
112442011-07-08 Jason Merrill <jason@redhat.com>
11245
4063e61b
JM
11246 PR c++/45437
11247 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11248
329af3c7
JM
11249 PR c++/49673
11250 * c-common.c (c_apply_type_quals_to_decl): Don't check
11251 TYPE_NEEDS_CONSTRUCTING.
11252
1a072294
RG
112532011-07-06 Richard Guenther <rguenther@suse.de>
11254
11255 * c-common.c (c_common_nodes_and_builtins):
11256 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11257
fce5dddd
RG
112582011-07-05 Richard Guenther <rguenther@suse.de>
11259
11260 * c-common.c (c_common_nodes_and_builtins): Build all common
11261 tree nodes first.
11262
45d439ac
JJ
112632011-06-27 Jakub Jelinek <jakub@redhat.com>
11264
56300785
JJ
11265 * c-common.h (c_tree_chain_next): New static inline function.
11266
45d439ac
JJ
11267 * c-common.c (check_builtin_function_arguments): Handle
11268 BUILT_IN_ASSUME_ALIGNED.
11269
e0a8ecf2
AM
112702011-06-21 Andrew MacLeod <amacleod@redhat.com>
11271
11272 * c-common.c: Add sync_ or SYNC__ to builtin names.
11273 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11274
112752011-06-20 Pierre Vittet <piervit@pvittet.com>
11276
11277 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11278 handler.
11279 (gen_pragma_handler): New union.
11280 (internal_pragma_handler): New type.
11281 (c_register_pragma_with_data)
11282 (c_register_pragma_with_expansion_and_data): New functions.
11283
11284 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11285 (c_register_pragma, c_register_pragma_with_expansion)
11286 (c_invoke_pragma_handler): Changed to work with
11287 internal_pragma_handler.
11288 (c_register_pragma_with_data)
11289 (c_register_pragma_with_expansion_and_data): New functions.
11290
677f3fa8
JM
112912011-06-14 Joseph Myers <joseph@codesourcery.com>
11292
11293 * c-common.c: Include common/common-target.h.
11294 (handle_section_attribute): Use
11295 targetm_common.have_named_sections.
11296 * c-cppbuiltin.c: Include common/common-target.h.
11297 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11298
d7fc8c14
RG
112992011-06-10 Richard Guenther <rguenther@suse.de>
11300
11301 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11302 to print a IDENTIFIER_NODE.
11303
10e48e39
RO
113042011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11305 Joseph Myers <joseph@codesourcery.com>
11306
11307 * c.opt (fbuilding-libgcc): New option.
11308 * c-cppbuiltin.c (c_cpp_builtins): Define
11309 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11310
6976ae51
JM
113112011-06-07 Jason Merrill <jason@redhat.com>
11312
3ff60975
JM
11313 * c-common.c (max_tinst_depth): Lower default to 900.
11314
6976ae51
JM
11315 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11316
009db074
RG
113172011-06-07 Richard Guenther <rguenther@suse.de>
11318
11319 * c-common.c (c_common_nodes_and_builtins): Do not set
11320 size_type_node or call set_sizetype.
11321
b4592b92
DS
113222011-06-07 Dodji Seketeli <dodji@redhat.com>
11323
11324 PR debug/49130
11325 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11326 type when using pointer comparison to compare types.
b4592b92 11327
014ab419
JW
113282011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11329
11330 * c.opt: Add -Wdelete-non-virtual-dtor.
11331 * c-opts.c (c_common_handle_option): Include it in -Wall.
11332
4f60111f
NF
113332011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11334
11335 PR bootstrap/49190
11336
11337 Revert:
11338 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11339
11340 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11341 not tree_common.
11342
4cc4f2f4
JJ
113432011-05-27 Jakub Jelinek <jakub@redhat.com>
11344
11345 PR c++/49165
11346 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11347 C++ don't call c_common_truthvalue_conversion on void type arms.
11348
38e01f9e
NF
113492011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11350
11351 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11352 (stmt_list_stack): Define.
11353 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11354 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11355
92e948a8
NF
113562011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11357
11358 * c-common.c (warning_candidate_p): Check for BLOCKs.
11359
a2fc3e63
NF
113602011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11361
11362 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11363 not tree_common.
11364
0957c029
JJ
113652011-05-25 Jakub Jelinek <jakub@redhat.com>
11366
11367 * c-common.c (def_fn_type): Remove extra va_end.
11368
828fb3ba
JM
113692011-05-23 Jason Merrill <jason@redhat.com>
11370
11371 PR c++/48106
11372 * c-common.c (c_common_get_narrower): New.
11373 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11374
dde05067
NF
113752011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11376
11377 * c-common.h (check_function_arguments): Tweak prototype of
11378 check_function_arguments.
11379 * c-common.c (check_function_arguments): Likewise. Adjust
11380 calls to check_function_nonnull, check_function_format, and
11381 check_function_sentinel.
11382 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11383 separate attributes and typelist arguments. Use
11384 FOREACH_FUNCTION_ARGS to iterate over argument types.
11385
3c0d13bf
PC
113862011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11387
11388 * c-common.c (c_common_reswords): Reorder.
11389 * c-common.h (rid): Likewise.
11390
8242dd04
NF
113912011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11392
11393 * c-common.c (def_fn_type): Don't call build_function_type, call
11394 build_function_type_array or build_varargs_function_type_array
11395 instead.
11396 (c_common_nodes_and_builtins): Likewise.
11397
3d528853
NF
113982011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11399
11400 * c-common.c (c_add_case_label): Omit the loc argument to
11401 build_case_label.
11402 * c-common.h (build_case_label): Remove.
11403 * c-semantics.c (build_case_label): Remove.
11404
a04a722b
JM
114052011-05-05 Joseph Myers <joseph@codesourcery.com>
11406
11407 * c-objc.h (objc_start_method_definition): Update prototype.
11408 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11409
e19a18d4
NF
114102011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11411
11412 * c-common.c (check_main_parameter_types): Reindent. Don't use
11413 TYPE_ARG_TYPES directly.
11414 (handle_nonnull_attribute): Likewise.
11415 (sync_resolve_params): Likewise.
11416 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11417 to check_format_string.
11418 (handle_format_attribute): Likewise.
11419 (check_format_string): Take a function type to examine instead of
11420 a type list. Use a function_arg_iterator to step through argument
11421 types.
11422
c62c040f
RG
114232011-05-04 Richard Guenther <rguenther@suse.de>
11424
11425 * c-common.c (fix_string_type): Use size_int for index type bounds.
11426 (start_fname_decls): Do not pass NULL to build_int_cst.
11427 (c_init_attributes): Likewise.
11428 * c-lex.c (c_lex_with_flags): Likewise.
11429
c12ff9d8
JM
114302011-04-27 Jason Merrill <jason@redhat.com>
11431
11432 * c-common.c (make_tree_vector_from_list): New.
11433 * c-common.h: Declare it.
11434
304dfbe3
RG
114352011-04-26 Richard Guenther <rguenther@suse.de>
11436
11437 PR preprocessor/48248
11438 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11439 for output size with -P.
11440
3c0d13bf
PC
114412011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11442
11443 * c-common.c (struct c_common_resword): Add __underlying_type.
11444 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11445
04695783
JM
114462011-04-20 Jim Meyering <meyering@redhat.com>
11447
11448 * c-format.c (init_dollar_format_checking): Remove useless
11449 if-before-free.
11450
0dc33c3c
NP
114512011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11452
11453 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11454 (objc_detect_field_duplicates): New.
0dc33c3c 11455 * stub-objc.c: Likewise.
3c0d13bf 11456
c59633d9
NP
114572011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11458
11459 * stub-objc.c (objc_declare_protocols): Renamed to
11460 objc_declare_protocol.
11461 * c-objc.h: Likewise.
3c0d13bf 11462
32dabdaf
NP
114632011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11464
11465 * stub-objc.c (objc_declare_class): Updated argument name.
11466
81f653d6
NF
114672011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11468
11469 * c-common.h (c_common_init_ts): Declare.
11470 * c-common.c (c_common_init_ts): Define.
11471
eb345401
NP
114722011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11473
11474 * c-objc.h (objc_build_message_expr): Updated prototype.
11475 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11476
a358e188
MJ
114772011-04-12 Martin Jambor <mjambor@suse.cz>
11478
11479 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11480 of cgraph_node.
11481
e6313a78
RG
114822011-04-11 Richard Guenther <rguenther@suse.de>
11483
11484 * c-common.c (complete_array_type): Build a range type of
11485 proper type.
11486
dcf0c47e
NF
114872011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11488
11489 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11490 (handle_type_generic_attribute): Likewise.
11491
1ee44b26
JM
114922011-04-07 Jason Merrill <jason@redhat.com>
11493
11494 PR c++/48450
11495 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11496 conversion from C++0x scoped enum.
11497
acce4e77
JM
114982011-04-06 Joseph Myers <joseph@codesourcery.com>
11499
11500 * c-target-def.h: New file.
11501 * c-target.def: New file.
11502 * c-target.h: New file.
11503 * c-common.c (targetcm): Don't define here.
11504 * c-common.h (default_handle_c_option): Declare.
11505 * c-format.c: Include c-target.h instead of target.h.
11506 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11507 include tm.h.
11508 (default_handle_c_option): Move from targhooks.c.
11509
e2eefb55
JJ
115102011-03-29 Jakub Jelinek <jakub@redhat.com>
11511
11512 PR preprocessor/48248
11513 * c-ppoutput.c (print): Add src_file field.
11514 (init_pp_output): Initialize it.
11515 (maybe_print_line): Don't optimize by adding up to 8 newlines
11516 if map->to_file and print.src_file are different file.
11517 (print_line): Update print.src_file.
11518
ba78087b
KT
115192011-03-25 Kai Tietz <ktietz@redhat.com>
11520
11521 * c-ada-spec.c (compare_comment): Use filename_cmp
11522 instead of strcmp for filename.
11523
0edf1bb2
JL
115242011-03-25 Jeff Law <law@redhat.com>
11525
adfac8df 11526 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11527
c7dc8804
JM
115282011-03-25 Jason Merrill <jason@redhat.com>
11529
11530 * c.opt: Add -std=c++03.
11531
d1d879b1
EB
115322011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11533
11534 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11535
3f8257db 115362011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11537
11538 PR target/12171
5050afdf
KT
11539 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11540 Display allowed attributes for function pointer types.
11541 (pp_c_attributes_display): New function to display
11542 attributes having affects_type_identity flag set to true.
11543 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11544
62d784f7
KT
11545 * c-common.c (c_common_attribute_table):
11546 Add new element.
11547 (c_common_format_attribute_table): Likewise.
11548
82d37118
JM
115492011-03-18 Jason Merrill <jason@redhat.com>
11550
49a000c3
JM
11551 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11552 * c-common.h: Don't declare it here.
11553 * c-common.c: Or define it here.
11554 * c-opts.c (c_common_handle_option): Or set it here.
11555
82d37118
JM
11556 PR c++/35315
11557 * c-common.c (handle_transparent_union_attribute): Don't
11558 make a duplicate type in C++.
11559
17bc631c
JM
115602011-03-15 Jason Merrill <jason@redhat.com>
11561
11562 * c-common.c (max_constexpr_depth): New.
11563 * c-common.h: Declare it.
11564 * c-opts.c (c_common_handle_option): Set it.
11565 * c.opt (fconstexpr-depth): New option.
11566
1b9b91a6
JM
115672011-03-11 Jason Merrill <jason@redhat.com>
11568
f231b5ff
JM
11569 * c-common.c (attribute_takes_identifier_p): Add missing const.
11570
1b9b91a6
JM
11571 PR c++/46803
11572 * c-common.c (attribute_takes_identifier_p): Assume that an
11573 unknown attribute takes an identifier.
11574
a19e4d44
NF
115752011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11576
11577 PR c/47786
11578 * c-common.c (c_type_hash): Call list_length instead of iterating
11579 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11580
982d62f6
JJ
115812011-02-19 Jakub Jelinek <jakub@redhat.com>
11582
11583 PR c/47809
11584 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11585
0a256240
NP
115862011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11587
11588 * c.opt (fobjc-abi-version=) New.
11589 (fobjc-nilcheck): New.
11590
ba9e6dd5
NF
115912011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11592
11593 PR c++/46890
11594 * c-common.h (keyword_is_decl_specifier): Declare.
11595 * c-common.c (keyword_is_decl_specifier): Define.
11596 (keyword_is_function_specifier): New function.
11597
7273813a
JJ
115982011-01-26 Jakub Jelinek <jakub@redhat.com>
11599
11600 PR c/47473
11601 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11602 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11603 REAL_TYPE.
11604
908ef79b
AC
116052011-01-26 Arnaud Charlet <charlet@adacore.com>
11606
11607 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11608
237e9384
JJ
116092011-01-26 Jakub Jelinek <jakub@redhat.com>
11610
11611 PR pch/47430
11612 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11613 after init_c_lex if pch_file is set.
11614
47ea1edf
DK
116152011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11616
d4dba752 11617 PR c++/43601
47ea1edf
DK
11618 * c.opt (-fkeep-inline-dllexport): New switch.
11619
2aa9c6ae
RG
116202011-01-12 Richard Guenther <rguenther@suse.de>
11621
11622 PR middle-end/32511
11623 * c-common.c (handle_weak_attribute): Warn instead of error
11624 on declaring an inline function weak.
11625
7bd11157
TT
116262011-01-05 Tom Tromey <tromey@redhat.com>
11627
11628 * c-common.h (lvalue_error): Update.
11629 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11630 not error.
11631
0e66e494 116322010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11633
b4f588c4
NP
11634 PR objc/47075
11635 * c-objc.h (objc_finish_message_expr): Added argument to
11636 prototype.
11637
f4da8dce
NF
116382010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11639
11640 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11641 Use prototype_p.
11642
46270f14
NP
116432010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11644
11645 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11646 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11647
4816c593
NF
116482010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11649
11650 * c-common.h (readonly_error): Declare.
11651 * c-common.c (readonly_error): Define.
11652
7a6daeb0
NF
116532010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11654
11655 * c-common.h (invalid_indirection_error): Declare.
11656 * c-common.c (invalid_indirection_error): Define.
11657
892f6119
RG
116582010-12-03 Richard Guenther <rguenther@suse.de>
11659
11660 PR c/46745
11661 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11662 (pp_c_unary_expression): Likewise.
11663 (pp_c_expression): Likewise.
11664
6c39e757
NP
116652010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11666
11667 * c-common.h (objc_finish_function): New.
11668 (objc_non_volatilized_type): Removed.
11669 (objc_type_quals_match): Removed.
11670 * stub-objc.c (objc_finish_function): New.
11671 (objc_non_volatilized_type): Removed.
11672 (objc_type_quals_match): Removed.
9faeb493 11673
7c475d11
JM
116742010-11-30 Joseph Myers <joseph@codesourcery.com>
11675
11676 * c-common.h (parse_optimize_options): Declare.
11677 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11678 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11679
71f3e391
JM
116802010-11-29 Joseph Myers <joseph@codesourcery.com>
11681
11682 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11683 GET_ENVIRONMENT.
11684 * c-pch.c (O_BINARY): Don't define here.
11685 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11686
d5fabb58
JM
116872010-11-25 Joseph Myers <joseph@codesourcery.com>
11688
11689 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11690 targetm.except_unwind_info.
11691
299404a1
JM
116922010-11-23 Joseph Myers <joseph@codesourcery.com>
11693
11694 * c-opts.c (c_common_handle_option): Pass location to
11695 set_struct_debug_option.
11696
c98cd5bf
JM
116972010-11-23 Joseph Myers <joseph@codesourcery.com>
11698
11699 * c-common.c (visibility_options): Move from ../opts.c.
11700 * c-common.h (struct visibility_flags, visibility_options):
11701 Declare here.
11702 * c-opts.c (finish_options): Rename to c_finish_options.
11703 (c_common_init): Update call to finish_options.
11704
a9546771
NP
117052010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11706
11707 PR objc/34033
11708 * c-lex.c (lex_string): Check that each string in an Objective-C
11709 string concat sequence starts with either one or zero '@', and
11710 that there are no spurious '@' signs at the end.
11711
24a57808
JM
117122010-11-20 Joseph Myers <joseph@codesourcery.com>
11713
11714 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11715 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11716 HANDLE_PRAGMA_VISIBILITY.
11717 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11718 HANDLE_PRAGMA_VISIBILITY): Don't define.
11719 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11720
a9aa2c3a
NF
117212010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11722
11723 PR c++/16189
11724 PR c++/36888
11725 PR c++/45331
11726 * c-common.h (keyword_begins_type_specifier): Declare.
11727 (keyword_is_storage_class_specifier): Declare.
11728 (keyword_is_type_qualifier): Declare.
11729 * c-common.c (keyword_begins_type_specifier): New function.
11730 (keyword_is_storage_class_specifier): New function.
11731 (keyword_is_type_qualifier): Declare.
11732
5386338c
JM
117332010-11-19 Joseph Myers <joseph@codesourcery.com>
11734
11735 PR c/46547
11736 * c-common.c (in_late_binary_op): Define.
11737 (c_common_truthvalue_conversion): Check in_late_binary_op before
11738 calling c_save_expr.
11739 * c-common.h (in_late_binary_op): Declare.
11740
69ccdddb
JM
117412010-11-19 Joseph Myers <joseph@codesourcery.com>
11742
11743 * c-opts.c (c_common_handle_option): Update calls to
11744 set_struct_debug_option.
11745
6b192a09
NP
117462010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11747
11748 * c-common.h (objc_declare_protocols): Added additional argument.
11749 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11750
fb52b50a
NF
117512010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11752
11753 PR c/33193
11754 * c-common.h (build_real_imag_expr): Declare.
11755 * c-semantics.c (build_real_imag_expr): Define.
11756
b37421c6
JM
117572010-11-17 Joseph Myers <joseph@codesourcery.com>
11758
11759 * c-opts.c (c_common_parse_file): Take no arguments.
11760 * c-common.h (c_common_parse_file): Update prototype.
11761
07078664
JJ
117622010-11-16 Jakub Jelinek <jakub@redhat.com>
11763
11764 PR c++/46401
11765 * c-common.c (warning_candidate_p): Don't track non-const calls
11766 or STRING_CSTs.
11767
c6a13190
ILT
117682010-11-15 Ian Lance Taylor <iant@google.com>
11769
11770 * c-lex.c (init_c_lex): Set macro debug callbacks if
11771 flag_dump_go_spec is set.
11772
925e8657
NP
117732010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11774
11775 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11776 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11777
bb0a9581
NF
117782010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11779
11780 PR preprocessor/45038
11781 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11782 dialects.
11783
c5fa0890
JM
117842010-11-12 Joseph Myers <joseph@codesourcery.com>
11785
11786 * c-common.h (c_family_lang_mask): Declare.
11787 * c-opts.c (c_family_lang_mask): Make extern.
11788 * c-pragma.c (handle_pragma_diagnostic): Use
11789 control_warning_option.
11790
a4d8c676
JM
117912010-11-12 Joseph Myers <joseph@codesourcery.com>
11792
11793 * c-common.c (parse_optimize_options): Update call to
11794 decode_options.
11795 * c-common.h (c_common_handle_option): Update prototype.
11796 * c-opts.c (c_common_handle_option): Take location_t parameter and
11797 pass it to other functions.
11798
f954bd2c
JM
117992010-11-11 Joseph Myers <joseph@codesourcery.com>
11800
11801 * c-opts.c (warning_as_error_callback): Remove.
11802 (c_common_initialize_diagnostics): Don't call
11803 register_warning_as_error_callback.
11804 (c_common_handle_option): Handle -Werror=normalized= here.
11805
d8a07487
JM
118062010-11-10 Joseph Myers <joseph@codesourcery.com>
11807
11808 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11809 in diagnostic.
11810 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11811 letter.
11812 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11813 Remove trailing '.' from diagnostics.
11814 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11815
d5478783
JM
118162010-11-10 Joseph Myers <joseph@codesourcery.com>
11817
11818 * c-common.c (parse_optimize_options): Pass global_dc to
11819 decode_options.
11820 * c-opts.c (c_common_handle_option): Pass &global_options to
11821 set_Wstrict_aliasing.
11822 * c.opt (v): Don't mark Common or document here.
11823
91ebb981
IS
118242010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11825
11826 PR target/44981
11827 * c-format.c (format_type): New type gcc_objc_string_format_type.
11828 (valid_stringptr_type_p): New.
11829 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11830 (check_format_string): Pass expected type, use
91ebb981
IS
11831 valid_stringptr_type_p (), check that the format string types are
11832 consistent with the format specification.
11833 (decode_format_attr): Warn if NSString is used outside objective-c.
11834 (format_types_orig): Add NSString.
11835 (format_name): New.
11836 (format_flags): New.
11837 (check_format_arg): Handle format strings requiring an external parser.
11838 first_target_format_type: New variable.
11839 (handle_format_attribute): Set up first_target_format_type, pass the
11840 expected format arg string type to check_format_string().
ab20d992 11841 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11842 * stub-objc.c (objc_string_ref_type_p): New.
11843 (objc_check_format_arg): New.
11844
bede2adc
NP
118452010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11846
9faeb493 11847 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11848 * c-common.h (objc_build_class_component_ref): New.
11849 * stub-objc.c (objc_build_class_component_ref): New.
11850
9a179d01
NP
118512010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11852
11853 * c.opt (Wproperty-assign-default): New option.
11854
22d8d616
NP
118552010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11856
11857 Implemented -fobjc-std=objc1 flag.
11858 * c.opt (fobjc-std=objc1): New option.
11859
2debdb4f
NP
118602010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11861
11862 Implemented format and noreturn attributes for Objective-C methods.
11863 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11864 attribute for Objective-C methods.
11865
ec52b111
JM
118662010-10-31 Jason Merrill <jason@redhat.com>
11867
11868 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11869 EXPR_LOC_OR_HERE.
11870
46a88c12
NP
118712010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11872
11873 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11874 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11875 (objc_add_property_declaration): Removed arguments for copies and
11876 ivar.
11877 (objc_build_getter_call): Renamed to
11878 objc_maybe_build_component_ref.
11879 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11880 (objc_is_property_ref): New.
11881 * c-common.c (c_common_reswords): Removed copies and ivar.
11882 * stub-objc.c (objc_add_property_declaration): Removed arguments
11883 for copies and ivar.
11884 (objc_build_getter_call): Renamed to
11885 objc_maybe_build_component_ref.
11886 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11887 (objc_is_property_ref): New.
9faeb493 11888
1e4bf85b
AC
118892010-10-29 Arnaud Charlet <charlet@adacore.com>
11890 Matthew Gingell <gingell@adacore.com>
11891
11892 * c-ada-spec.c (separate_class_package): New function.
11893 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11894 name of their enclosing package.
11895 (print_ada_declaration): Use separate_class_package.
11896
81f0bab2
JM
118972010-10-27 Jason Merrill <jason@redhat.com>
11898
2b08f2c5
JM
11899 * c-common.c (c_common_reswords): Add __is_literal_type.
11900 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11901
81f0bab2
JM
11902 * c-common.c (check_case_value): Remove special C++ code.
11903
200290f2
NP
119042010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11905
11906 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11907 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11908 and RID_LAST_PATTR.
11909 (objc_add_property_declaration): Added additional arguments.
11910 (objc_property_attribute_kind): Removed.
11911 (objc_set_property_attr): Removed.
11912 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11913 copy and nonatomic.
11914 * stub-objc.c (objc_add_property_declaration): Added additional
11915 arguments.
11916 (objc_set_property_attr): Removed.
9faeb493 11917
f614132b
NP
119182010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11919
11920 * c-common.h (objc_add_property_variable): Renamed to
11921 objc_add_property_declaration. Added location argument.
11922 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11923
b8a18805
NP
119242010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11925
11926 * c-common.h (objc_maybe_printable_name): New.
11927 * stub-objc.c (objc_maybe_printable_name): New.
11928
3f8257db
JJ
119292010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11930 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11931
11932 * c-common.h (c_common_mark_addressable_vec): Declare.
11933 * c-common.c (c_common_mark_addressable_vec): New function.
11934
249a82c4
NP
119352010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11936
11937 * c-common.h (objc_set_method_type): Removed.
11938 (objc_add_method_declaration): Added boolean argument.
11939 (objc_start_method_definition): Same change.
11940 (objc_build_method_signature): Same change.
11941 * stub-objc.c (objc_set_method_type): Removed.
11942 (objc_add_method_declaration): Added boolean argument.
11943 (objc_start_method_definition): Same change.
11944 (objc_build_method_signature): Same change.
11945
977e30bc
NP
119462010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11947
11948 * c-common.h (finish_file): Removed.
11949 (objc_write_global_declarations): New.
11950 * c-opts.c (c_common_parse_file): Do not call finish_file.
11951 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11952
da57d1b9
NP
119532010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11954
11955 Implemented parsing @synthesize and @dynamic for
11956 Objective-C/Objective-C++.
11957 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11958 (objc_add_synthesize_declaration): New.
11959 (objc_add_dynamic_declaration): New.
11960 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11961 * stub-objc.c (objc_add_synthesize_declaration): New.
11962 (objc_add_dynamic_declaration): New.
9faeb493 11963
0069111f
MM
119642010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11965
11966 PR target/46041
11967 * c-cppbuiltin.c (mode_has_fma): Move function here from
11968 builtins.c. Don't use the fma optab, instead just use the
11969 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11970 using -save-temps.
11971
e426b47b
NP
119722010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11973
11974 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11975
3f8257db 11976 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11977
9faeb493 11978 Radar 4330422
e426b47b
NP
11979 * c-common.h (objc_non_volatilized_type): New declaration
11980 * stub-objc.c (objc_non_volatilized_type): New stub.
11981
90fbfdc3
NP
119822010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11983
e426b47b 11984 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11985
ab20d992 11986 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11987
9faeb493 11988 Radar 4133425
90fbfdc3 11989 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11990 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11991
c37d8c30
IS
119922010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11993
11994 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11995 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11996 (objc_ivar_visibility_kind): New enum.
11997 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11998 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11999 visibility enum.
12000
1b1562a5
MM
120012010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12002
12003 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12004 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12005 has the appropriate fma builtins.
12006 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12007
668ea4b1
IS
120082010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12009
1b1562a5 12010 merge from FSF apple 'trunk' branch.
3f8257db 12011 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12012
668ea4b1
IS
12013 Radars 4436866, 4505126, 4506903, 4517826
12014 * c-common.c (c_common_resword): Define @property and its attributes.
12015 * c-common.h: Define property attribute enum entries.
12016 (OBJC_IS_PATTR_KEYWORD): New.
12017 (objc_property_attribute_kind): New enum.
12018 Declare objc_set_property_attr (), objc_add_property_variable (),
12019 objc_build_getter_call () and objc_build_setter_call ().
12020 * stub-objc.c (objc_set_property_attr): New stub.
12021 (objc_add_property_variable): Likewise.
12022 (objc_build_getter_call): Likewise.
12023 (objc_build_setter_call) Likewise.
1b1562a5 12024
a1178b30
IS
120252010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12026
1b1562a5 12027 merge from FSF apple 'trunk' branch.
ab20d992 12028 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12029
12030 Radar 3803157 (method attributes)
12031 * c-common.c (handle_deprecated_attribute): Recognize
12032 objc methods as valid declarations.
12033 * c-common.h: Declare objc_method_decl ().
1b1562a5 12034 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12035
a75bfaa6
JM
120362010-10-08 Joseph Myers <joseph@codesourcery.com>
12037
12038 * c-common.c (parse_optimize_options): Call
12039 decode_cmdline_options_to_array_default_mask before
12040 decode_options. Update arguments to decode_options.
12041 * c-common.h (c_common_init_options_struct): Declare.
12042 * c-opts.c (c_common_init_options_struct): New. Split out from
12043 c_common_init_options.
12044
f05b9d93
NP
120452010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12046
12047 Implemented fast enumeration for Objective-C.
12048 * c-common.h (objc_finish_foreach_loop): New.
12049 * stub-objc.c (objc_finish_foreach_loop): New.
12050
1ebe4b4f
JM
120512010-10-05 Joseph Myers <joseph@codesourcery.com>
12052
12053 * c-common.h (struct diagnostic_context): Don't declare here.
12054 (c_common_initialize_diagnostics): Declare using
12055 diagnostic_context typedef.
12056 * c-opts.c (c_common_handle_option): Pass global_dc to
12057 handle_generated_option.
12058
d4d24ba4
JM
120592010-10-04 Joseph Myers <joseph@codesourcery.com>
12060
12061 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12062 handle_generated_option.
12063
478a1c5b
ILT
120642010-10-03 Ian Lance Taylor <iant@google.com>
12065
12066 * c.opt (-fplan9-extensions): New option.
12067
82a1c2fe
FXC
120682010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12069
12070 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12071 Remove.
12072 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12073 of duplicating code.
12074
92902b1b
IS
120752010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12076
12077 * c-common.c: Add two new entries for @optional
12078 and @required keywords.
12079
12080 merge from FSF 'apple/trunk' branch.
3f8257db 12081 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12082
12083 Radar 4386773
12084 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12085 objective-c keywords.
12086 (objc_set_method_opt): New declaration.
12087 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12088
46625112
JM
120892010-09-30 Joseph Myers <joseph@codesourcery.com>
12090
12091 * c-common.c (handle_optimize_attribute): Pass &global_options to
12092 cl_optimization_save and cl_optimization_restore.
12093 * c-opts.c (c_common_handle_option): Pass &global_options to
12094 handle_generated_option.
12095 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12096 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12097 &global_options to cl_optimization_restore.
12098
49b91f05
NP
120992010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12100
12101 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12102 Objective-C/Objective-C++ keywords.
12103
13ed556f 121042010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 12105
9faeb493
UB
12106 Merge from 'apple/trunk' branch on FSF servers.
12107
3f8257db 12108 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
12109
12110 Radar 4281748
12111 * c-common.h (objc_check_global_decl): New declaration.
12112 * stub-objc.c (objc_check_global_decl): New stub.
12113
f0036cca
JM
121142010-09-29 Joseph Myers <joseph@codesourcery.com>
12115
12116 * c.opt: Don't use VarExists.
12117
e3339d0f
JM
121182010-09-29 Joseph Myers <joseph@codesourcery.com>
12119
12120 * c-common.c (c_cpp_error): Update names of diagnostic_context
12121 members.
12122 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12123 cl_optimization members.
12124 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12125 sanitize_cpp_opts, finish_options): Update names of cpp_options
12126 members.
12127
1973201f
NP
121282010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12129
12130 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12131 (objc_is_reserved_word): Removed.
12132 * c-common.c: Updated comments.
12133 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12134 objc_is_reserved_word.
12135 * stub-objc.c (objc_is_reserved_word): Removed.
12136
f7e71da5
IS
121372010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12138
9faeb493 12139 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
12140 include attributes.
12141 (objc_start_method_definition): Likewise.
12142 (objc_build_keyword_decl): Likewise.
12143 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12144 (objc_start_method_definition): Likewise.
12145 (objc_build_keyword_decl): Likewise.
12146
c165dca7
IS
121472010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12148
12149 * c-common.h (objc_start_class_interface): Adjust prototype.
12150 (objc_start_category_interface): Likewise.
12151 (objc_start_protocol): Likewise.
12152 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12153 (objc_start_class_interface): Likewise.
12154 (objc_start_category_interface): Likewise.
12155
7458026b
ILT
121562010-09-27 Ian Lance Taylor <iant@google.com>
12157
12158 * c-common.c (c_common_attribute_table): Add no_split_stack.
12159 (handle_no_split_stack_attribute): New static function.
12160
b581b85b
NP
121612010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12162
9faeb493 12163 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 12164
3f8257db 12165 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 12166
9faeb493 12167 Radar 4229905
b581b85b
NP
12168 * c-common.h (objc_have_common_type): New declaration.
12169 * stub-objc.c (objc_have_common_type): New stub.
12170
12171 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12172
12173 Radar 4154928
12174 * c-common.h (objc_common_type): New prototype.
9faeb493 12175 * stub-objc.c (objc_common_type): New stub.
b581b85b 12176
46a4da10
JH
121772010-09-24 Jan Hubicka <jh@suse.cz>
12178
12179 * c-common.c (handle_leaf_attribute): New function.
12180 (struct attribute_spec c_common_att): Add leaf.
12181
e200444e
JM
121822010-09-22 Joseph Myers <joseph@codesourcery.com>
12183
12184 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12185 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12186 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12187 -include-barrier, -include-directory, -include-directory=,
12188 -include-directory-after, -include-directory-after=,
12189 -include-prefix, -include-prefix=, -include-with-prefix,
12190 -include-with-prefix=, -include-with-prefix-after,
12191 -include-with-prefix-after=, -include-with-prefix-before,
12192 -include-with-prefix-before=, -no-integrated-cpp,
12193 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12194 -output=, -pedantic, -pedantic-errors, -preprocess,
12195 -print-missing-file-dependencies, -trace-includes, -traditional,
12196 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12197 -user-dependencies, -verbose, -write-dependencies,
12198 -write-user-dependencies, no-integrated-cpp, traditional): New.
12199
29a80ea6
NP
122002010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12201
12202 PR objc/23710
ac1fc2fc
NP
12203 * c-common.h (objc_start_method_definition): Return bool instead
12204 of void.
12205 * stub-objc.c (objc_start_method_definition): Return bool instead
12206 of void.
12207
122082010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12209
12210 PR objc/25965
12211 * c-common.h (objc_get_interface_ivars): New declaration.
12212 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 12213
de621752
ILT
122142010-09-15 Ian Lance Taylor <iant@google.com>
12215
12216 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 12217 messages. Remove period at end of warning message.
de621752 12218
ba885ec5
NS
122192010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12220
12221 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12222 (handle_alias_attribute): ... here.
12223 (handle_ifunc_attribute): New.
12224
c5ee1358
MM
122252010-09-06 Mark Mitchell <mark@codesourcery.com>
12226
12227 * c-common.h (do_warn_double_promotion): Declare.
12228 * c-common.c (do_warn_double_promotion): Define.
12229
0a0b3574
MM
122302010-09-05 Mark Mitchell <mark@codesourcery.com>
12231
12232 * c.opt (Wdouble-promotion): New.
12233
d1779886
JM
122342010-09-02 Joseph Myers <joseph@codesourcery.com>
12235
12236 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12237 fvtable-thunks, fxref): Mark no longer supported in help text.
12238
2d2bd949
JM
122392010-09-02 Joseph Myers <joseph@codesourcery.com>
12240
12241 * c.opt (Wimport, fall-virtual, falt-external-templates,
12242 fdefault-inline, fenum-int-equiv, fexternal-templates,
12243 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12244 fname-mangling-version-, fnew-abi, fnonnull-objects,
12245 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12246 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12247 applicable.
12248 (fhandle-exceptions): Mark with Alias and Warn.
12249 * c-opts.c (c_common_handle_option): Don't handle options marked
12250 as ignored.
12251
5de8299c
JM
122522010-09-02 Joseph Myers <joseph@codesourcery.com>
12253
12254 * c.opt (Wcomments, Werror-implicit-function-declaration,
12255 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12256 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12257 aliases.
12258 * c-common.c (option_codes): Use OPT_Wcomment instead of
12259 OPT_Wcomments.
12260 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12261 Don't handle options marked as aliases.
12262
0ceb0201
RG
122632010-08-25 Richard Guenther <rguenther@suse.de>
12264
12265 * c-common.c (c_common_get_alias_set): Remove special
12266 handling for pointers.
12267
ac47786e
NF
122682010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12269
12270 * c-common.c: Use FOR_EACH_VEC_ELT.
12271 * c-gimplify.c: Likewise.
12272 * c-pragma.c: Likewise.
12273
c878765b
JM
122742010-08-16 Joseph Myers <joseph@codesourcery.com>
12275
12276 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12277 RejectDriver.
12278 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12279 RejectDriver.
12280 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12281 instead of OPT_MDX and OPT_MMDX.
12282
603349bf
JM
122832010-08-16 Joseph Myers <joseph@codesourcery.com>
12284
12285 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12286
644fa7ac
JM
122872010-08-12 Joseph Myers <joseph@codesourcery.com>
12288
12289 * c.opt (MD, MMD): Change to MDX and MMDX.
12290 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12291
481e1176
JM
122922010-08-11 Joseph Myers <joseph@codesourcery.com>
12293
12294 * c-opts.c (c_common_handle_option): Call handle_generated_option
12295 instead of handle_option.
12296
ac8dc9f7
NF
122972010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12298
12299 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12300 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12301
4f8c876d
NF
123022010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12303
12304 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12305 (pending_redefine_extname): Change type to a VEC.
12306 (add_to_renaming_pragma_list): Update for new type of
12307 pending_redefine_extname.
ac8dc9f7 12308 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12309
3b0c690e
AC
123102010-08-04 Arnaud Charlet <charlet@adacore.com>
12311
12312 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12313 visited.
12314 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12315 decide whether a type has already been declared/seen.
12316 Do not go to the original type.
12317 (dump_nested_types): New parameter forward.
12318 Generate forward declaration if needed and mark type as visited.
12319 (print_ada_declaration): Call dump_nested_types if not already done.
12320 Mark types as visited.
12321
1890bccc
JM
123222010-08-03 Joseph Myers <joseph@codesourcery.com>
12323
12324 * c.opt (-print-pch-checksum): Remove option.
12325 * c-opts.c (c_common_handle_option): Don't handle
12326 OPT_print_pch_checksum.
12327
5f20c657
JM
123282010-07-27 Joseph Myers <joseph@codesourcery.com>
12329
12330 * c-common.h (c_common_handle_option): Update prototype and return
12331 value type.
12332 * c-opts.c (c_common_handle_option): Update prototype and return
12333 value type. Update calls to handle_option and
12334 enable_warning_as_error.
12335
f551f80c
JJ
123362010-07-27 Jakub Jelinek <jakub@redhat.com>
12337
12338 PR c/45079
12339 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12340
61ff2bdc
JM
123412010-07-27 Joseph Myers <joseph@codesourcery.com>
12342
12343 * c-common.h (c_common_missing_argument): Remove.
12344 * c-opts.c (c_common_missing_argument): Remove.
12345 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12346 idirafter, imacros, include, isysroot, isystem, iquote): Add
12347 MissingArgError.
12348 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12349
7a9bf9a4
JM
123502010-07-27 Joseph Myers <joseph@codesourcery.com>
12351
12352 * c-common.h (c_common_option_lang_mask,
12353 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12354 New.
12355 (c_common_init_options): Update prototype.
12356 * c-opts.c (c_common_option_lang_mask): New.
12357 (c_common_initialize_diagnostics): Split out of
12358 c_common_init_options.
12359 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12360 New.
12361 (c_common_init_options): Update prototype. Use decoded options in
12362 search for -lang-asm.
12363
910ad8de
NF
123642010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12365
12366 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12367 * c-format.c: Likewise.
12368
718f9c0f
MLI
123692010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12370
12371 * c-common.h: Include diagnostic-core.h. Error if already
12372 included.
12373 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12374
4d451982
MLI
123752010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12376
adfac8df 12377 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12378 Do not include expr.h
12379 (vector_mode_valid_p): Move here.
12380
119fe915
SB
123812010-06-21 DJ Delorie <dj@redhat.com>
12382
12383 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12384 allow these pragmas anywhere.
12385
123862010-06-14 Jakub Jelinek <jakub@redhat.com>
12387
12388 PR bootstrap/44509
12389 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12390 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12391 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12392 ggc_strdup instead of xstrdup.
12393
123942010-06-10 Jakub Jelinek <jakub@redhat.com>
12395
12396 * c-cppbuiltin.c: Include cpp-id-data.h.
12397 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12398 (lazy_hex_fp_value): New function.
12399 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12400
6662d794
MLI
124012010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12402
12403 * c-gimplify.c: Do not include tree-flow.h
12404
38f8b050
JR
124052010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12406
12407 PR other/44034
12408 * c-common.c: Rename targetm member:
12409 targetm.enum_va_list -> targetm.enum_va_list_p
12410
9589f23e
AS
124112010-06-28 Anatoly Sokolov <aesok@post.ru>
12412
12413 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12414
3b06d379
SB
124152010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12416
12417 * c-cppbuiltin.c: Do not include except.h.
12418
d166d4c3
AK
124192010-06-24 Andi Kleen <ak@linux.intel.com>
12420
9faeb493
UB
12421 * c-common.c (warn_for_omitted_condop): New.
12422 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12423
70cb8be6
JM
124242010-06-21 Joseph Myers <joseph@codesourcery.com>
12425
12426 * c.opt (lang-objc): Remove.
12427 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12428
a4c97feb
JR
124292010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12430
12431 * c-opts.c: Include "tm_p.h".
12432
6e2f1956
JM
124332010-06-20 Joseph Myers <joseph@codesourcery.com>
12434
12435 * c-common.c (parse_optimize_options): Update call to
12436 decode_options.
12437
bc87224e
NF
124382010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12439
12440 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12441 new type of types_used_by_cur_var_decl.
12442
b49cf425
JR
124432010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12444
12445 PR bootstrap/44512
12446 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12447 for C++ standard compliance.
12448
59f9c2ed
JM
124492010-06-16 Jason Merrill <jason@redhat.com>
12450
12451 * c.opt: Add -Wnoexcept.
12452
33766b66
RG
124532010-06-16 Richard Guenther <rguenther@suse.de>
12454
12455 PR c/44555
12456 * c-common.c (c_common_truthvalue_conversion): Remove
12457 premature and wrong optimization concering ADDR_EXPRs.
12458
eff7e30c
AC
124592010-06-15 Arnaud Charlet <charlet@adacore.com>
12460
12461 * c-ada-spec.c (dump_sloc): Remove column info.
12462 (is_simple_enum): New function.
12463 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12464 enum types when relevant.
12465
6312e84d
MLI
124662010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12467
9faeb493 12468 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12469 location.
12470
1cb42611
JM
124712010-06-10 Joseph Myers <joseph@codesourcery.com>
12472
12473 * c-opts.c (c_common_handle_option): Don't handle
12474 OPT_fshow_column.
12475
a9429e29
LB
124762010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12477
12478 * c-pragma.c (push_alignment): Use typed GC allocation.
12479 (handle_pragma_push_options): Likewise.
12480
12481 * c-common.c (parse_optimize_options): Likewise.
12482
12483 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12484 option.
12485
5498f011
JM
124862010-06-07 Joseph Myers <joseph@codesourcery.com>
12487
12488 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12489 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12490 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12491 flag_signed_bitfields, warn_strict_null_sentinel,
12492 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12493 flag_gen_declaration, flag_no_gnu_keywords,
12494 flag_implement_inlines, flag_implicit_templates,
12495 flag_implicit_inline_templates, flag_optional_diags,
12496 flag_elide_constructors, flag_default_inline, flag_rtti,
12497 flag_conserve_space, flag_access_control, flag_check_new,
12498 flag_new_for_scope, flag_weak, flag_working_directory,
12499 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12500 flag_enforce_eh_specs, flag_threadsafe_statics,
12501 flag_pretty_templates): Remove.
12502 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12503 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12504 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12505 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12506 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12507 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12508 flag_no_gnu_keywords, flag_implement_inlines,
12509 flag_implicit_templates, flag_implicit_inline_templates,
12510 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12511 flag_rtti, flag_conserve_space, flag_access_control,
12512 flag_check_new, flag_new_for_scope, flag_weak,
12513 flag_working_directory, flag_use_cxa_atexit,
12514 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12515 flag_threadsafe_statics, flag_pretty_templates,
12516 warn_strict_null_sentinel): Remove.
12517 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12518 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12519 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12520 fimplicit-inline-templates, fimplicit-templates,
12521 flax-vector-conversions, fms-extensions, fnil-receivers,
12522 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12523 frtti, fshort-double, fshort-enums, fshort-wchar,
12524 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12525 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12526 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12527 gen-decls, undef): Use Var.
12528 (fdefault-inline, foptional-diags): Document as doing nothing.
12529 * c-opts.c (c_common_handle_option): Remove cases for options now
12530 using Var. Mark ignored options as such.
12531
39dabefd
SB
125322010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12533
9faeb493 12534 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12535 * c-common.def: Likewise.
12536 * c-common.h: Likewise.
12537 * c-cppbuiltin.c: Likewise.
12538 * c-dump.c: Likewise.
12539 * c-format.c: Likewise.
12540 * c-format.h : Likewise.
12541 * c-gimplify.c: Likewise.
12542 * c-lex.c: Likewise.
12543 * c-omp.c: Likewise.
12544 * c.opt: Likewise.
12545 * c-opts.c: Likewise.
12546 * c-pch.c: Likewise.
12547 * c-ppoutput.c: Likewise.
12548 * c-pragma.c: Likewise.
12549 * c-pragma.h: Likewise.
12550 * c-pretty-print.c: Likewise.
12551 * c-pretty-print.h: Likewise.
12552 * c-semantics.c: Likewise.
12553 * stub-objc.c: Likewise.
12554
12555 * c-common.c: Include gt-c-family-c-common.h.
12556 * c-pragma.c: Include gt-c-family-c-pragma.h.
12557\f
c48514be 12558Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
12559
12560Copying and distribution of this file, with or without modification,
12561are permitted in any medium without royalty provided the copyright
12562notice and this notice are preserved.