]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
1 2021-12-03 Jakub Jelinek <jakub@redhat.com>
2
3 PR pch/71934
4 * c-pch.c (struct c_pch_validity): Remove pch_init member.
5 (pch_init): Don't initialize v.pch_init.
6 (c_common_valid_pch): Don't warn and punt if .text addresses change.
7
8 2021-12-01 Jason Merrill <jason@redhat.com>
9
10 PR c++/103310
11 * c.opt: Add -fconstexpr-fp-except.
12
13 2021-11-29 Richard Biener <rguenther@suse.de>
14
15 * c-format.c (check_format_string): Remove spurious
16 gcc_unreachable.
17
18 2021-11-29 Richard Biener <rguenther@suse.de>
19
20 * c-opts.c (c_common_post_options): Remove unreachable return.
21 * c-pragma.c (handle_pragma_target): Likewise.
22 (handle_pragma_optimize): Likewise.
23
24 2021-11-25 Jakub Jelinek <jakub@redhat.com>
25
26 PR c++/102611
27 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
28 default for C++23 regardless of warn_deprecated.
29 * c-cppbuiltin.c (c_cpp_builtins): Predefine
30 __cpp_multidimensional_subscript=202110L for C++23.
31
32 2021-11-23 Martin Sebor <msebor@redhat.com>
33
34 PR middle-end/88232
35 * c.opt: Add -Winfinite-recursion.
36
37 2021-11-19 Martin Sebor <msebor@redhat.com>
38
39 PR c++/33925
40 PR c/102867
41 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
42 and improve handling tof defined symbols.
43
44 2021-11-19 Martin Liska <mliska@suse.cz>
45
46 Revert:
47 2021-11-18 Martin Liska <mliska@suse.cz>
48
49 * c-gimplify.c (genericize_c_loop): Use option directly.
50
51 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
52
53 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
54 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
55
56 2021-11-18 Martin Liska <mliska@suse.cz>
57
58 * c-gimplify.c (genericize_c_loop): Use option directly.
59
60 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
61
62 PR c/91038
63 PR c/29970
64 * c-common.c (pointer_int_sum): Make sure pointer expressions
65 are evaluated first when the size expression depends on for
66 variably-modified types.
67
68 2021-11-17 Marek Polacek <polacek@redhat.com>
69
70 PR preprocessor/103026
71 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
72
73 2021-11-16 Jason Merrill <jason@redhat.com>
74
75 * c-common.c (release_tree_vector): Only cache vecs smaller than
76 16 elements.
77
78 2021-11-15 Jason Merrill <jason@redhat.com>
79
80 * c.opt: Add -fimplicit-constexpr.
81 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
82 * c-opts.c (c_common_post_options): Disable below C++14.
83
84 2021-11-15 Jakub Jelinek <jakub@redhat.com>
85
86 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
87 Duplicate to both OMP_TARGET and OMP_TEAMS.
88
89 2021-11-10 Marek Polacek <polacek@redhat.com>
90
91 PR c++/101940
92 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
93 ignored_attributes.
94
95 2021-11-09 David Malcolm <dmalcolm@redhat.com>
96
97 * c-pragma.c (GCC_BAD_AT): New macro.
98 (GCC_BAD2_AT): New macro.
99 (handle_pragma_pack): Use the location of the pertinent token when
100 issuing diagnostics about invalid constants/actions, and trailing
101 junk.
102 (handle_pragma_target): Likewise for non-string "GCC option".
103 (handle_pragma_message): Likewise for trailing junk.
104
105 2021-11-03 Joseph Myers <joseph@codesourcery.com>
106
107 PR c/103031
108 * c-common.c (convert_and_check): Add argument init_const. Call
109 convert_init if init_const.
110 * c-common.h (convert_and_check): Update prototype.
111 (convert_init): New prototype.
112
113 2021-11-01 David Malcolm <dmalcolm@redhat.com>
114
115 * c-lex.c (c_lex_with_flags): When complaining about non-printable
116 CPP_OTHER tokens, set the "escape on output" flag.
117
118 2021-10-27 Jakub Jelinek <jakub@redhat.com>
119
120 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
121 POINTER_PLUS_EXPR.
122 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
123 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
124
125 2021-10-27 Jakub Jelinek <jakub@redhat.com>
126
127 PR c++/102854
128 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
129 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
130 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
131 conversions temporarily clear the 3rd bit from d->kind while walking
132 subtrees.
133 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
134 if possibly non-rectangular.
135
136 2021-10-21 Jakub Jelinek <jakub@redhat.com>
137
138 PR middle-end/64888
139 * c-omp.c (c_omp_predefined_variable): Return true also for
140 ubsan_create_data created artificial variables.
141
142 2021-10-14 Joseph Myers <joseph@codesourcery.com>
143
144 * c-format.c (printf_length_specs, scanf_length_specs)
145 (print_char_table, scan_char_table): Support DFP formats for C2X.
146 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
147 (T2X_D32, T2X_D64, T2X_D128): New macros.
148
149 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
150
151 * c-omp.c (c_omp_check_context_selector): Rename to
152 omp_check_context_selector and move to omp-general.c.
153 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
154 move to omp-general.c.
155
156 2021-10-12 Joseph Myers <joseph@codesourcery.com>
157
158 * c-format.c (print_char_table): Add %b and %B formats.
159 (scan_char_table): Add %b format.
160 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
161 (T2X_UPD, T2X_UIM): New macros.
162
163 2021-10-12 Jakub Jelinek <jakub@redhat.com>
164
165 * c-omp.c (c_finish_omp_atomic): Use
166 clear_padding_type_may_have_padding_p.
167
168 2021-10-08 Martin Liska <mliska@suse.cz>
169
170 * c-opts.c (c_common_post_options): Use new macro
171 OPTION_SET_P.
172
173 2021-10-07 Martin Liska <mliska@suse.cz>
174
175 * c-common.c (parse_optimize_options): Make
176 save_opt_decoded_options a pointer type.
177
178 2021-10-06 Jakub Jelinek <jakub@redhat.com>
179
180 PR tree-optimization/102571
181 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
182 padding, but the non-padding bits are contiguous set of bytes
183 by adjusting the memcmp call arguments instead of emitting
184 __builtin_clear_padding and then comparing all the type's bytes.
185
186 2021-10-06 Jakub Jelinek <jakub@redhat.com>
187
188 PR c++/102612
189 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
190 __cpp_constexpr to 202110L rather than 201907L.
191
192 2021-10-04 Marek Polacek <polacek@redhat.com>
193
194 PR c++/97573
195 * c-common.h (do_warn_array_compare): Declare.
196 * c-warn.c (do_warn_array_compare): New.
197 * c.opt (Warray-compare): New option.
198
199 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
200
201 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
202 NULL, this is not needed.
203
204 2021-10-01 Martin Sebor <msebor@redhat.com>
205
206 PR c/102103
207 * c-common.c (decl_with_nonnull_addr_p): Handle members.
208 Check and perform warning suppression.
209 (c_common_truthvalue_conversion): Enhance warning suppression.
210
211 2021-10-01 Martin Liska <mliska@suse.cz>
212
213 PR target/102552
214 * c-common.c (parse_optimize_options): decoded_options[0] is
215 used for program name, so merged_decoded_options should also
216 respect that.
217
218 2021-10-01 Jakub Jelinek <jakub@redhat.com>
219 Richard Biener <rguenther@suse.de>
220
221 PR sanitizer/102515
222 * c-ubsan.c (ubsan_instrument_division): Check the right
223 flag_sanitize_recover bit, depending on which sanitization
224 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
225 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
226 and SANITIZE_DIVIDE is enabled, neither check is known
227 to be false and flag_sanitize_recover bits for those two
228 aren't the same, emit both __ubsan_handle_divrem_overflow
229 and __ubsan_handle_divrem_overflow_abort calls.
230
231 2021-10-01 Martin Liska <mliska@suse.cz>
232
233 * c-common.c (parse_optimize_options): Combine optimize
234 options with what was provided on the command line.
235
236 2021-10-01 Jakub Jelinek <jakub@redhat.com>
237
238 * c-omp.c (c_omp_split_clauses): Also copy
239 OMP_CLAUSE_ORDER_REPRODUCIBLE.
240
241 2021-09-27 Martin Liska <mliska@suse.cz>
242
243 * c-opts.c (c_common_init_options_struct): Set also
244 x_flag_default_complex_method.
245
246 2021-09-22 Jakub Jelinek <jakub@redhat.com>
247
248 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
249
250 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
251
252 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
253 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
254 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
255 __ROUNDING_MATH__ according to the new optimization flags.
256
257 2021-09-18 Jakub Jelinek <jakub@redhat.com>
258
259 * c-omp.c (c_omp_split_clauses): Split order clause also to
260 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
261
262 2021-09-17 Jakub Jelinek <jakub@redhat.com>
263
264 * c-omp.c (c_finish_omp_atomic): Avoid creating
265 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
266 create_tmp_var and add a zero initializer to TARGET_EXPRs that
267 had NULL initializer. When omitting operands after v = x,
268 use type of v rather than type of x. Fix type of vtmp
269 TARGET_EXPR.
270
271 2021-09-13 Jason Merrill <jason@redhat.com>
272
273 * c.opt: Add -Winterference-size.
274 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
275 and __GCC_CONSTRUCTIVE_SIZE.
276
277 2021-09-10 Jakub Jelinek <jakub@redhat.com>
278
279 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
280 * c-omp.c: Include gimple-fold.h.
281 (c_finish_omp_atomic): Add r and weak arguments. Add support for
282 OpenMP 5.1 atomics.
283
284 2021-09-09 qing zhao <qing.zhao@oracle.com>
285
286 * c-attribs.c (handle_uninitialized_attribute): New function.
287 (c_common_attribute_table): Add "uninitialized" attribute.
288
289 2021-09-08 liuhongt <hongtao.liu@intel.com>
290
291 * c-common.c (excess_precision_mode_join): Update below comments.
292 (c_ts18661_flt_eval_method): Set excess_precision_type to
293 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
294 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
295 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
296 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
297
298 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
299
300 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
301
302 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
303
304 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
305 and -gnatwu warning for the package specification.
306
307 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
308
309 * c-attribs.c (handle_unavailable_attribute): New.
310
311 2021-08-30 Jason Merrill <jason@redhat.com>
312
313 * c.opt: Add -Wmissing-requires.
314
315 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
316
317 PR other/93067
318 * c-opts.c (c_common_input_charset_cb): New function.
319 (c_common_post_options): Call new function
320 diagnostic_initialize_input_context().
321
322 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
323
324 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
325 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
326 "di" and "u", respecitively; fill with BADLEN to match
327 size of 'types'.
328 (get_init_dynamic_hwi): Split off from ...
329 (init_dynamic_diag_info): ... here. Call it.
330 (init_dynamic_gfc_info): Call it.
331
332 2021-08-20 Jakub Jelinek <jakub@redhat.com>
333
334 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
335 * c-pragma.c (omp_pragmas): Add error directive.
336 * c-omp.c (omp_directives): Uncomment error directive entry.
337
338 2021-08-18 Jakub Jelinek <jakub@redhat.com>
339
340 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
341 * c-pragma.c (omp_pragmas): Add nothing directive.
342 * c-omp.c (omp_directives): Uncomment nothing directive entry.
343
344 2021-08-17 Jakub Jelinek <jakub@redhat.com>
345
346 PR c++/101539
347 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
348 * c-common.c (c_common_reswords): Add __is_layout_compatible.
349
350 2021-08-17 Matt Jacobson <mhjacobson@me.com>
351
352 * c-opts.c (c_common_post_options): Default to
353 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
354
355 2021-08-17 Jakub Jelinek <jakub@redhat.com>
356
357 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
358 * c-pragma.c (omp_pragmas): Add scope construct.
359 * c-omp.c (omp_directives): Uncomment scope directive entry.
360
361 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
362
363 * c-cppbuiltin.c (c_cpp_builtins): Define
364 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
365
366 2021-08-12 Jakub Jelinek <jakub@redhat.com>
367
368 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
369 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
370 * c-pragma.c (omp_pragmas_simd): Add masked construct.
371 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
372 enumerator.
373 (c_finish_omp_masked): Declare.
374 * c-omp.c (c_finish_omp_masked): New function.
375 (c_omp_split_clauses): Handle combined masked constructs.
376
377 2021-07-30 Jakub Jelinek <jakub@redhat.com>
378
379 PR c++/101539
380 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
381 * c-common.c (c_common_reswords): Add
382 __is_pointer_interconvertible_base_of.
383
384 2021-07-29 Richard Biener <rguenther@suse.de>
385
386 PR c/101512
387 * c-common.c (c_common_mark_addressable_vec): Look through
388 C_MAYBE_CONST_EXPR even if not at the toplevel.
389
390 2021-07-27 Martin Sebor <msebor@redhat.com>
391
392 PR c/101585
393 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
394
395 2021-07-23 Jakub Jelinek <jakub@redhat.com>
396
397 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
398 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
399 and later.
400
401 2021-07-23 Jakub Jelinek <jakub@redhat.com>
402
403 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
404 PRAGMA_OMP__LAST_ enumerators.
405
406 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
407 Joseph Myers <joseph@codesourcery.com>
408 Cesar Philippidis <cesar@codesourcery.com>
409
410 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
411
412 2021-07-20 Martin Sebor <msebor@redhat.com>
413
414 * c-common.c (c_build_shufflevector): Adjust by-value argument to
415 by-const-reference.
416 * c-common.h (c_build_shufflevector): Same.
417
418 2021-07-16 Andrew Pinski <apinski@marvell.com>
419
420 PR c/101453
421 * c-common.c (parse_optimize_options): Use the correct
422 size for buffer.
423
424 2021-07-15 Martin Sebor <msebor@redhat.com>
425
426 PR c/101289
427 PR c/97548
428 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
429
430 2021-07-14 Jason Merrill <jason@redhat.com>
431
432 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
433
434 2021-07-06 Martin Sebor <msebor@redhat.com>
435
436 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
437 (gcc_cdiag_char_table): Same.
438 (gcc_cxxdiag_char_table): Same.
439
440 2021-07-02 Jakub Jelinek <jakub@redhat.com>
441
442 * c-common.h (enum c_omp_directive_kind): New enum.
443 (struct c_omp_directive): New type.
444 (c_omp_categorize_directive): Declare.
445 * c-omp.c (omp_directives): New variable.
446 (c_omp_categorize_directive): New function.
447
448 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
449
450 * c-ada-spec.c (packed_layout): New global variable.
451 (dump_ada_declaration): Set it upon seeing a packed record type.
452 Do not put the "aliased" keyword if it is set.
453 (dump_ada_structure): Add Pack aspect if it is set and clear it.
454
455 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
456
457 * c-ada-spec.c (check_name): Rename into...
458 (check_type_name_conflict): ...this. Minor tweak.
459 (dump_ada_function_declaration): Adjust to above renaming.
460 (dump_ada_array_domains): Fix oversight.
461 (dump_ada_declaration): Call check_type_name_conflict for variables.
462
463 2021-06-25 Martin Sebor <msebor@redhat.com>
464
465 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
466 (c_common_truthvalue_conversion): Replace direct uses of
467 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
468 copy_no_warning.
469 (check_function_arguments_recurse): Same.
470 * c-gimplify.c (c_gimplify_expr): Same.
471 * c-warn.c (overflow_warning): Same.
472 (warn_logical_operator): Same.
473 (warn_if_unused_value): Same.
474 (do_warn_unused_parameter): Same.
475
476 2021-06-24 Jakub Jelinek <jakub@redhat.com>
477
478 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
479 C_ORT_OMP_TARGET.
480 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
481 combined target constructs also add map (always, tofrom:) clause.
482
483 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
484
485 * c-attribs.c (common_handle_aligned_attribute): Remove short
486 circuit and dead code.
487
488 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
489
490 PR c++/101052
491 * known-headers.cc (get_stdlib_header_for_name): Add known
492 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
493 exit, and getenv.
494
495 2021-06-12 Jason Merrill <jason@redhat.com>
496
497 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
498
499 2021-06-11 Jakub Jelinek <jakub@redhat.com>
500
501 PR c++/100974
502 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
503 -std=c++2b for P1938R3 consteval if support.
504
505 2021-06-09 Jason Merrill <jason@redhat.com>
506
507 PR c++/100879
508 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
509 warning.
510
511 2021-06-07 Martin Liska <mliska@suse.cz>
512
513 * c-target.def: Split long lines and replace them
514 with '\n\'.
515
516 2021-06-04 Martin Sebor <msebor@redhat.com>
517
518 PR c/100783
519 * c-attribs.c (positional_argument): Bail on erroneous types.
520
521 2021-06-04 Martin Sebor <msebor@redhat.com>
522
523 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
524 for element presence.
525
526 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
527
528 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
529 (dump_ada_decl_name): Likewise.
530 (dump_anonymous_type_name): Remove parent parameter and adjust.
531 (dump_sloc): Minor tweak.
532 (dump_ada_array_type): Remove type parameter and adjust.
533 (dump_ada_enum_type): Remove parent parameter and adjust.
534 (dump_ada_node): Adjust calls to above functions.
535 (dumped_anonymous_types): New global variable.
536 (dump_nested_types_1): Rename into...
537 (dump_nested_types): ...this.
538 (dump_nested_type): Remove parent and dumped_types parameters.
539 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
540 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
541 (dump_ada_specs): Initialize and free dumped_anonymous_types.
542
543 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
544
545 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
546 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
547
548 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
549
550 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
551 (htable_t): New typedef.
552 (overloaded_names): Use it.
553 (add_name): New function.
554 (init_overloaded_names): Use add_name to populate the table and add
555 special cases for sigaction and stat.
556 (overloaded_name_p): Rename into...
557 (overloading_index): ...this. Do not initialize overloaded_names table
558 here. Return the index or zero.
559 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
560 but add an overloading suffix instead.
561 (dump_ada_specs): Initialize overloaded_names tables here.
562
563 2021-06-01 Martin Liska <mliska@suse.cz>
564
565 PR other/100759
566 * c-attribs.c (handle_optimize_attribute): Limit sanity check
567 to a situation where we are not in processing of an optimize
568 pragma.
569 * c-pragma.c (handle_pragma_pop_options): Restore target
570 options.
571
572 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
573
574 PR testsuite/100749
575 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
576
577 2021-05-31 Richard Biener <rguenther@suse.de>
578
579 PR c++/88601
580 * c-common.c: Include tree-vector-builder.h and
581 vec-perm-indices.h.
582 (c_common_reswords): Add __builtin_shufflevector.
583 (c_build_shufflevector): New funtion.
584 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
585 (c_build_shufflevector): Declare.
586
587 2021-05-28 Jakub Jelinek <jakub@redhat.com>
588
589 PR middle-end/99928
590 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
591 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
592
593 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
594
595 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
596
597 2021-05-25 Martin Liska <mliska@suse.cz>
598
599 PR tree-optimization/92860
600 PR target/99592
601 * c-attribs.c (handle_optimize_attribute): Save target node
602 before calling parse_optimize_options and save it in case
603 it changes.
604 * c-pragma.c (handle_pragma_target): Similarly for pragma.
605 (handle_pragma_pop_options): Likewise here.
606
607 2021-05-25 Martin Liska <mliska@suse.cz>
608
609 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
610
611 2021-05-25 Jakub Jelinek <jakub@redhat.com>
612
613 PR middle-end/99928
614 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
615 combined with simd and not with taskloop or for.
616
617 2021-05-21 Jakub Jelinek <jakub@redhat.com>
618
619 PR middle-end/99928
620 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
621 on firstprivate clause copy going to target construct, and for
622 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
623
624 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
625
626 * c.opt (Wc++11-extensions, Wc++14-extensions)
627 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
628 options.
629
630 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
631
632 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
633
634 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
635
636 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
637 * c-pch.c (struct c_pch_validity): Use type uint32_t.
638 (pch_init): Renamed member.
639 (c_common_valid_pch): Adjust access to debug_type_names.
640
641 2021-05-19 Martin Sebor <msebor@redhat.com>
642
643 PR c/100619
644 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
645 bounds.
646
647 2021-05-18 Richard Biener <rguenther@suse.de>
648
649 PR c/100547
650 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
651 Reword existing nunit diagnostic.
652
653 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
654
655 * c-common.c (braced_list_to_string): Return CTOR unchanged
656 if host and target character sizes don't match.
657
658 2021-05-14 Martin Liska <mliska@suse.cz>
659
660 * c.opt: Add Warning keyword for 2 options.
661
662 2021-05-13 Martin Liska <mliska@suse.cz>
663
664 PR middle-end/100504
665 * c-attribs.c (handle_target_clones_attribute): Expect a string
666 argument to target_clone argument.
667
668 2021-05-11 Joseph Myers <joseph@codesourcery.com>
669
670 * c-lex.c (interpret_float): Handle digit separators for C2X.
671
672 2021-05-10 Martin Liska <mliska@suse.cz>
673
674 * c-ada-spec.c (print_destructor): Use startswith
675 function instead of strncmp.
676 (dump_ada_declaration): Likewise.
677 * c-common.c (disable_builtin_function): Likewise.
678 (def_builtin_1): Likewise.
679 * c-format.c (check_tokens): Likewise.
680 (check_plain): Likewise.
681 (convert_format_name_to_system_name): Likewise.
682
683 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
684
685 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
686 complex divide
687
688 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
689 Nathan Sidwell <nathan@codesourcery.com>
690 Tom de Vries <vries@codesourcery.com>
691 Julian Brown <julian@codesourcery.com>
692 Kwok Cheung Yeung <kcy@codesourcery.com>
693
694 * c.opt (Wopenacc-parallelism): New.
695
696 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
697
698 * c.opt (fopenacc-kernels=): Remove.
699
700 2021-04-08 Jakub Jelinek <jakub@redhat.com>
701
702 * c-warn.c (do_warn_double_promotion): Fix comment typo,
703 occured -> occurred.
704 (check_alignment_of_packed_member): Fix a comment typo,
705 memeber -> member.
706 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
707 and onless -> unless.
708 (warn_parm_array_mismatch): Fix comment typos, declaratation
709 -> declaration and woud -> would. Fix up comment indentation.
710
711 2021-04-08 Martin Sebor <msebor@redhat.com>
712
713 PR middle-end/99883
714 * c.opt (Wmismatched-new-delete): Correct spelling.
715
716 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
717
718 * c-ada-spec.c (is_simple_enum): Minor tweaks.
719 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
720 enumeral types use again the type name for the enumeration constants.
721 (dump_ada_node): Adjust call to dump_ada_enum_type.
722 (dump_nested_type): Likewise.
723
724 2021-04-01 Jason Merrill <jason@redhat.com>
725
726 PR c++/98481
727 * c-opts.c (c_common_post_options): Bump latest_abi_version.
728
729 2021-03-25 Jakub Jelinek <jakub@redhat.com>
730
731 PR c++/99565
732 * c-warn.c (do_warn_duplicated_branches): Pass also
733 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
734
735 2021-03-20 Jakub Jelinek <jakub@redhat.com>
736
737 PR debug/99230
738 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
739
740 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
741
742 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
743 after entering the separate class package, if any.
744
745 2021-03-04 Richard Biener <rguenther@suse.de>
746
747 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
748 Handle ERROR_MARK.
749
750 2021-03-04 Jakub Jelinek <jakub@redhat.com>
751
752 PR c/99325
753 * c-ppoutput.c (print): Change src_line type from int to unsigned.
754 (token_streamer::stream) Likewise.
755 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
756 UNKNOWN_LOCATION.
757
758 2021-03-03 Jakub Jelinek <jakub@redhat.com>
759
760 PR c/99324
761 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
762 instead of mark_addressable. Fix a comment typo -
763 neutrallly -> neutrally.
764
765 2021-02-28 Jakub Jelinek <jakub@redhat.com>
766
767 PR c/99304
768 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
769 message - refernced -> referenced. Remove superfluous space before
770 closing paren of function calls.
771
772 2021-02-25 Nathan Sidwell <nathan@acm.org>
773
774 PR c++/99166
775 * c.opt (-flang-info-module-cmi): Renamed option.
776
777 2021-02-19 Nathan Sidwell <nathan@acm.org>
778
779 * c.opt (flang-info-module-read, flang-info-module-read=): New.
780
781 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
782
783 PR target/99113
784 * c-attribs.c (c_common_attribute_table): Add the "retain"
785 attribute.
786 (handle_retain_attribute): New function.
787
788 2021-02-16 Marek Polacek <polacek@redhat.com>
789
790 PR c++/99062
791 * c-attribs.c (handle_assume_aligned_attribute): Check that the
792 alignment argument is non-negative. Tweak a warning message.
793
794 2021-02-12 Martin Sebor <msebor@redhat.com>
795
796 PR c/99055
797 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
798 print_generic_expr_to_str.
799
800 2021-02-10 Richard Biener <rguenther@suse.de>
801
802 * c-common.c (parse_optimize_options): Free decoded_options.
803
804 2021-02-04 emsr <3dw4rd@verizon.net>
805
806 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
807
808 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
809
810 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
811 * c-lex.c (interpret_integer): Set node type for size literal.
812
813 2021-01-28 Jakub Jelinek <jakub@redhat.com>
814
815 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
816 draft from description.
817 (-std=c++2b): Fix a pasto, 2020 -> 2023.
818
819 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
820
821 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
822 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
823 and -std=gnu++2b
824 * c-opts.c (set_std_cxx23): New.
825 (c_common_handle_option): Set options when -std=c++23 is enabled.
826 (c_common_post_options): Adjust comments.
827 (set_std_cxx20): Likewise.
828
829 2021-01-25 Martin Sebor <msebor@redhat.com>
830
831 PR c++/98646
832 * c-common.c (check_nonnull_arg): Adjust warning text.
833
834 2021-01-17 Martin Sebor <msebor@redhat.com>
835
836 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
837 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
838
839 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
840
841 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
842 Redefine PRAGMA_OACC_CLAUSE_DETACH.
843
844 2021-01-15 Jakub Jelinek <jakub@redhat.com>
845
846 PR tree-optimization/98597
847 * c-pretty-print.c: Include options.h.
848 (c_fold_indirect_ref_for_warn): New function.
849 (print_mem_ref): Use it. If it returns something that has compatible
850 type and is TBAA compatible with zero offset, print it and return,
851 otherwise print it using offsetof syntax or array ref syntax. Fix up
852 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
853 argument has pointer to array type. Print pointers using the standard
854 formatting.
855
856 2021-01-12 Martin Sebor <msebor@redhat.com>
857
858 PR c/98597
859 PR c/98592
860 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
861 has pointer type. Remove redundant code. Avoid calling
862 gimple_canonical_types_compatible_p.
863
864 2021-01-07 Martin Sebor <msebor@redhat.com>
865
866 PR middle-end/98578
867 * c-pretty-print.c (print_mem_ref): Strip array from access type.
868 Avoid assuming acces type's size is constant. Correct condition
869 guarding the printing of a parenthesis.
870
871 2021-01-06 Martin Sebor <msebor@redhat.com>
872
873 PR c++/95768
874 * c-pretty-print.c (c_pretty_printer::primary_expression): For
875 SSA_NAMEs print VLA names and GIMPLE defining statements.
876 (print_mem_ref): New function.
877 (c_pretty_printer::unary_expression): Call it.
878
879 2021-01-06 Richard Biener <rguenther@suse.de>
880
881 PR tree-optimization/95582
882 * c-attribs.c (c_common_attribute_table): Add entry for
883 signed_bool_precision.
884 (handle_signed_bool_precision_attribute): New.
885
886 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
887
888 * c.opt: Add -stdlib= option and enumerations for
889 libstdc++ and libc++.
890
891 2020-12-16 Martin Liska <mliska@suse.cz>
892
893 * c.opt: Remove usage of Report.
894
895 2020-12-14 Martin Sebor <msebor@redhat.com>
896
897 PR middle-end/98166
898 PR c++/57111
899 PR middle-end/98160
900 * c-attribs.c (maybe_add_noinline): New function.
901 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
902 Implicitly add attribute noinline to functions not declared inline
903 and warn on those.
904
905 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
906
907 * c-pragma.c (omp_pragmas): Add 'allocate'.
908 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
909
910 2020-12-08 Jakub Jelinek <jakub@redhat.com>
911
912 PR c++/98187
913 * c-pragma.c (omp_pragmas): Remove "master".
914 (omp_pragmas_simd): Add "master".
915
916 2020-12-07 Marek Polacek <polacek@redhat.com>
917
918 PR c++/98126
919 * c-common.c (verify_tree_lim_r): New function.
920 (verify_sequence_points): Use it. Use nullptr instead of 0.
921
922 2020-12-03 Martin Sebor <msebor@redhat.com>
923
924 PR c++/90629
925 PR middle-end/94527
926 * c-attribs.c (handle_dealloc_attribute): New function.
927 (handle_malloc_attribute): Handle argument forms of attribute.
928 * c.opt (-Wmismatched-dealloc): New option.
929 (-Wmismatched-new-delete): New option.
930
931 2020-12-03 Jakub Jelinek <jakub@redhat.com>
932
933 PR libstdc++/93121
934 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
935 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
936
937 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
938
939 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
940 {__GNUC_EXECUTION_CHARSET_NAME} and
941 _WIDE_EXECUTION_CHARSET_NAME} macros.
942
943 2020-12-01 Nathan Sidwell <nathan@acm.org>
944
945 * c-common.c (module, import, export): New internal tokens (with
946 trailing space).
947 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
948 them.
949 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
950 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
951
952 2020-12-01 Nathan Sidwell <nathan@acm.org>
953
954 * c-opts.c (c_common_init_options): Ask for module dependencies.
955 (c_common_handle_option): Handle -Mmodules -Mno-modules.
956 * c-pch.c (c_common_valid_pch): ... does not play with C++
957 modules.
958 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
959 options.
960 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
961 (fmodule-only, fmodule-mapper, fmodule-lazy)
962 (fmodule-version-ignore, Winvalid-imported-macros)
963 (flang-info-include-translate, flang-info-include-translate-not):
964 New options
965
966 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
967
968 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
969 (dump_ada_structure): Also deal with convention, unchecked union and
970 bit-field for nested types. In the latter case, print an Alignment
971 aspect along with the Pack aspect.
972
973 2020-11-25 Martin Sebor <msebor@redhat.com>
974
975 PR bootstrap/94982
976 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
977 -Wformat-diag.
978
979 2020-11-24 Martin Sebor <msebor@redhat.com>
980
981 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
982
983 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
984
985 * c-attribs.c (handle_special_var_sec_attribute): New.
986 (handle_noinit_attribute): Remove.
987 (attr_noinit_exclusions): Rename to...
988 (attr_section_exclusions): ...this, and add "persistent" attribute
989 exclusion.
990 (c_common_attribute_table): Add "persistent" attribute.
991
992 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
993
994 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
995 Treat opaque types like other types.
996 (c_pretty_printer::direct_abstract_declarator): Opaque types are
997 supported types.
998
999 2020-11-20 Martin Sebor <msebor@redhat.com>
1000
1001 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1002 with fewer arguments.
1003
1004 2020-11-20 Martin Sebor <msebor@redhat.com>
1005
1006 PR middle-end/97879
1007 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1008 Error out on invalid modes.
1009
1010 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1011
1012 PR libstdc++/88101
1013 * c-common.c (check_builtin_function_arguments): Handle
1014 BUILT_IN_CLEAR_PADDING.
1015
1016 2020-11-18 Nathan Sidwell <nathan@acm.org>
1017
1018 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1019
1020 2020-11-17 Nathan Sidwell <nathan@acm.org>
1021
1022 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1023 after newly-added CTI_MODULE_HWM.
1024
1025 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1026
1027 * c-cppbuiltin.c (builtin_define_float_constants): Define
1028 "*_IS_IEC_60559__" macros.
1029
1030 2020-11-17 Nathan Sidwell <nathan@acm.org>
1031
1032 * c-lex.c: #include "langhooks.h".
1033 (cb_undef): Maybe call preprocess_undef lang hook.
1034 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1035 lang hook.
1036 (push_command_line_include): Maybe call preprocess_main_file lang
1037 hook.
1038 (cb_file_change): Likewise.
1039 * c-ppoutput.c: #include "langhooks.h.
1040 (scan_translation_unit): Maybe call preprocess_token lang hook.
1041 (class do_streamer): New, derive from token_streamer.
1042 (directives_only_cb): Data pointer is do_streamer, call
1043 preprocess_token lang hook.
1044 (scan_translation_unit_directives_only): Use do_streamer.
1045 (print_line_1): Move src_line recording to after string output.
1046 (cb_undef): Maybe call preprocess_undef lang hook.
1047
1048 2020-11-17 Nathan Sidwell <nathan@acm.org>
1049
1050 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1051 code duplicating that functionality.
1052
1053 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1054
1055 PR c/90628
1056 * c-common.c (check_builtin_function_arguments)
1057 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1058 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1059 for more builtins and argument positions.
1060
1061 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1062
1063 PR objc/97854
1064 * stub-objc.c: Include c-common.h to declare enum rid.
1065
1066 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR c++/63287
1069 * c-cppbuiltin.c: Include configargs.h.
1070 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1071 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1072 "single".
1073
1074 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1075 Thomas Schwinge <thomas@codesourcery.com>
1076
1077 * c.opt (fopenacc-kernels): Add.
1078
1079 2020-11-13 Jason Merrill <jason@redhat.com>
1080
1081 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1082
1083 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1084
1085 PR c++/91318
1086 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1087
1088 2020-11-13 Martin Liska <mliska@suse.cz>
1089
1090 * c-attribs.c (build_attr_access_from_parms): Format properly.
1091
1092 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1093
1094 PR objc/90707
1095 * c-common.c (c_common_reswords): null_unspecified, nullable,
1096 nonnull, null_resettable: New keywords.
1097 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1098 RID_NONNULL, RID_NULL_RESETTABLE: New.
1099 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1100 ranges accepted for property attributes.
1101 * c-attribs.c (handle_objc_nullability_attribute): New.
1102 * c-objc.h (enum objc_property_attribute_group): Add
1103 OBJC_PROPATTR_GROUP_NULLABLE.
1104 (enum objc_property_attribute_kind):Add
1105 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1106 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1107
1108 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1109
1110 PR objc/77404
1111 * c-attribs.c (handle_objc_root_class_attribute): New
1112 * c-objc.h (objc_start_class_interface): Add a location
1113 value for the position of the class name.
1114 * c.opt: Add Wobjc-root-class.
1115 * stub-objc.c (objc_start_class_interface): Add a location
1116 value for the position of the class name.
1117
1118 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1119
1120 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1121 Allow scope for C. Handle standard attributes for C. Do not
1122 accept unscoped attributes if std_syntax and not handled as
1123 standard attributes.
1124 * c-common.h (c_common_has_attribute): Update prototype.
1125
1126 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1127
1128 PR pch/86674
1129 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1130 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1131
1132 2020-11-11 Patrick Palka <ppalka@redhat.com>
1133
1134 PR c++/88115
1135 * c-opts.c (c_common_post_options): Update latest_abi_version.
1136
1137 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1138
1139 PR c/97748
1140 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1141 to false.
1142 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1143 recursively and just return true instead of warning if it is true.
1144 Handle COMPLEX_EXPR.
1145
1146 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1147
1148 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1149 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1150 (c_omp_adjust_map_clauses): New function.
1151
1152 2020-11-09 Marek Polacek <polacek@redhat.com>
1153
1154 DR 1914
1155 * c-common.c (attribute_fallthrough_p): Tweak the warning
1156 message.
1157
1158 2020-11-09 Patrick Palka <ppalka@redhat.com>
1159
1160 * c-pragma.c (handle_pragma_diagnostic): Split the
1161 unknown-option -Wpragmas diagnostic into a warning and a
1162 subsequent note containing a spelling suggestion. Avoid
1163 computing the suggestion if -Wpragmas warnings are being
1164 suppressed.
1165
1166 2020-11-09 Patrick Palka <ppalka@redhat.com>
1167
1168 PR testsuite/97117
1169 * c-indentation.c (get_visual_column): Remove location_t
1170 parameter. Move the column-tracking diagnostic code from here
1171 to ...
1172 (should_warn_for_misleading_indentation): ... here, before the
1173 early exit for when the loci are not all distinct. Don't pass a
1174 location_t argument to get_visual_column.
1175 (assert_get_visual_column_succeeds): Don't pass a location_t
1176 argument to get_visual_column.
1177 (assert_get_visual_column_fails): Likewise.
1178
1179 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1180
1181 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1182 of keywords accepted in @property attribute contexts.
1183 * c-objc.h (enum objc_property_attribute_group): Add
1184 OBJC_PROPATTR_GROUP_CLASS.
1185 (enum objc_property_attribute_kind): Add
1186 OBJC_PROPERTY_ATTR_CLASS.
1187
1188 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1189
1190 * c-common.c (c_common_reswords): Add 'atomic' property
1191 attribute.
1192 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1193 property attributes.
1194
1195 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1196
1197 * c-attribs.c (handle_nsobject_attribute): New.
1198 * c.opt: Add WNSObject-attribute.
1199
1200 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1201
1202 * c-objc.h (enum objc_property_attribute_group): New
1203 (enum objc_property_attribute_kind): New.
1204 (OBJC_PROPATTR_GROUP_MASK): New.
1205 (struct property_attribute_info): Small class encapsulating
1206 parser output from property attributes.
1207 (objc_prop_attr_kind_for_rid): New
1208 (objc_add_property_declaration): Simplify interface.
1209 * stub-objc.c (enum rid): Dummy type.
1210 (objc_add_property_declaration): Simplify interface.
1211 (objc_prop_attr_kind_for_rid): New.
1212
1213 2020-11-06 Nathan Sidwell <nathan@acm.org>
1214
1215 * c-ada-spec.c (collect_ada_nodes): Rename
1216 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1217 (collect_ada_node): Likewise.
1218 (dump_forward_type): Likewise.
1219 * c-common.c (set_underlying_type): Rename
1220 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1221 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1222
1223 2020-11-06 Jakub Jelinek <jakub@redhat.com>
1224
1225 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1226
1227 2020-11-05 Marek Polacek <polacek@redhat.com>
1228
1229 PR c++/97675
1230 * c.opt (Wexceptions): New option.
1231
1232 2020-11-05 Marek Polacek <polacek@redhat.com>
1233
1234 PR c++/25814
1235 * c.opt (Wvexing-parse): New option.
1236
1237 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1238
1239 PR c++/97670
1240 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1241 underlying decl to clear in the allocate_head bitmap.
1242
1243 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1244
1245 * c-objc.h (objc_non_constant_expr_p): New.
1246 * stub-objc.c (objc_non_constant_expr_p): New.
1247
1248 2020-11-03 Nathan Sidwell <nathan@acm.org>
1249
1250 * c.opt (MQ,MT): Reword description to be make-agnostic.
1251
1252 2020-11-02 Nathan Sidwell <nathan@acm.org>
1253
1254 * c-opts.c (c_common_post_options): Move var decl to its
1255 initialization point.
1256
1257 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1258
1259 * c-lex.c (c_lex_with_flags): When combining '@' with a
1260 keyword for Objective-C, combine the location ranges too.
1261
1262 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
1263 H.J.Lu <hjl.tools@gmail.com>
1264
1265 * c-attribs.c (c_common_attribute_table): Add new attribute
1266 zero_call_used_regs.
1267 (handle_zero_call_used_regs_attribute): New function.
1268
1269 2020-10-28 Marek Polacek <polacek@redhat.com>
1270
1271 PR c++/97573
1272 * c-opts.c (c_common_post_options): In C++20, turn on
1273 -Wdeprecated-enum-enum-conversion and
1274 -Wdeprecated-enum-float-conversion.
1275 * c.opt (Wdeprecated-enum-enum-conversion,
1276 Wdeprecated-enum-float-conversion): New options.
1277 (Wenum-conversion): Allow for C++ too.
1278
1279 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1280
1281 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1282 * c-omp.c: Include bitmap.h.
1283 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1284
1285 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1286
1287 * c-common.c (__is_nothrow_assignable): New.
1288 (__is_nothrow_constructible): Likewise.
1289 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1290 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1291
1292 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
1293
1294 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1295
1296 2020-10-23 Marek Polacek <polacek@redhat.com>
1297
1298 PR c++/91741
1299 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1300 (c_common_init_ts): Likewise.
1301 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1302 * c-common.h (maybe_warn_sizeof_array_div): Declare.
1303 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1304 (maybe_warn_sizeof_array_div): New function.
1305 * c.opt (Wsizeof-array-div): New option.
1306
1307 2020-10-23 Martin Sebor <msebor@redhat.com>
1308
1309 PR c/97463
1310 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1311
1312 2020-10-22 Martin Liska <mliska@suse.cz>
1313
1314 PR c/94722
1315 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1316 (handle_stack_protect_attribute): Add error message for a
1317 no_stack_protector function.
1318
1319 2020-10-22 Martin Liska <mliska@suse.cz>
1320
1321 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1322
1323 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
1324
1325 * c-gimplify.c: Include tree-nested.h
1326 (c_genericize): Update for new nested function info.
1327
1328 2020-10-14 Martin Sebor <msebor@redhat.com>
1329
1330 PR c/97413
1331 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1332 bounds in an extra list.
1333
1334 2020-10-05 Richard Biener <rguenther@suse.de>
1335 Jakub Jelinek <jakub@redhat.com>
1336
1337 PR c++/97197
1338 * c-pretty-print.c: Include langhooks.h.
1339 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1340 expression.
1341 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1342 unary_expression.
1343 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1344
1345 2020-09-30 Martin Sebor <msebor@redhat.com>
1346
1347 PR middle-end/97189
1348 * c-attribs.c (append_access_attr): Use the function declaration
1349 location for a warning about an attribute access argument.
1350
1351 2020-09-29 Marek Polacek <polacek@redhat.com>
1352
1353 PR c++/94695
1354 * c.opt (Wrange-loop-construct): New option.
1355
1356 2020-09-23 Martin Sebor <msebor@redhat.com>
1357
1358 PR c/97131
1359 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1360
1361 2020-09-23 Marek Polacek <polacek@redhat.com>
1362
1363 PR c/97125
1364 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1365 after loops and other structured control constructs have been lowered.
1366
1367 2020-09-22 Jakub Jelinek <jakub@redhat.com>
1368
1369 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1370 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1371
1372 2020-09-21 Marek Polacek <polacek@redhat.com>
1373
1374 * c.opt (Wctad-maybe-unsupported): New option.
1375
1376 2020-09-19 Martin Sebor <msebor@redhat.com>
1377
1378 PR c/50584
1379 * c-common.h (warn_parm_array_mismatch): Declare new function.
1380 (has_attribute): Move declaration of an existing function.
1381 (build_attr_access_from_parms): Declare new function.
1382 * c-warn.c (parm_array_as_string): Define new function.
1383 (plus_one): Define new function.
1384 (warn_parm_ptrarray_mismatch): Define new function.
1385 (warn_parm_array_mismatch): Define new function.
1386 (vla_bound_parm_decl): New function.
1387 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1388 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1389 qualifiers here...
1390 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1391 them in brackets here. Also print [static]. Strip extraneous
1392 expressions from VLA bounds.
1393
1394 2020-09-19 Martin Sebor <msebor@redhat.com>
1395
1396 PR c/50584
1397 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1398 (handle_argspec_attribute): New function.
1399 (get_argument, get_argument_type): New functions.
1400 (append_access_attrs): Add overload. Handle internal attribute
1401 representation in addition to external.
1402 (handle_access_attribute): Handle internal attribute representation
1403 in addition to external.
1404 (build_attr_access_from_parms): New function.
1405
1406 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1407
1408 * c-gimplify.c (genericize_c_loop): Rewrite to match
1409 c_finish_loop in c-typeck.c.
1410
1411 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1412
1413 * c-common.c (c_block_may_fallthrough): New, split from
1414 cxx_block_may_fallthrough in the cp front end.
1415 (c_common_init_ts): Move handling of loop and switch-related
1416 statements here from the cp front end.
1417 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1418 cp front end.
1419 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1420 * c-common.h (c_block_may_fallthru): Declare.
1421 (bc_state_t): Move here from cp front end.
1422 (save_bc_state, restore_bc_state): Declare.
1423 (c_genericize_control_stmt): Declare.
1424 (WHILE_COND, WHILE_BODY): Likewise.
1425 (DO_COND, DO_BODY): Likewise.
1426 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1427 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1428 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1429 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1430 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1431 * c-dump.c (dump_stmt): Copy from cp front end.
1432 (c_dump_tree): Move code to handle structured loop and switch
1433 tree nodes here from cp front end.
1434 * c-gimplify.c: Adjust includes.
1435 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1436 cp front end.
1437 (save_bc_state, restore_bc_state): New functions using old code
1438 from cp front end.
1439 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1440 (genericize_c_loop): Move from cp front end.
1441 (genericize_for_stmt, genericize_while_stmt): Likewise.
1442 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1443 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1444 (genericize_omp_for_stmt): Likewise.
1445 (c_genericize_control_stmt): New function using code split from
1446 cp front end.
1447 (c_genericize_control_r): New.
1448 (c_genericize): Call walk_tree with c_genericize_control_r.
1449 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1450 structured loop and switch tree nodes here from cp front end.
1451
1452 2020-09-17 Patrick Palka <ppalka@redhat.com>
1453
1454 PR c/80076
1455 * c-indentation.c (should_warn_for_misleading_indentation): Move
1456 declarations of local variables closer to their first use.
1457 Handle virtual token locations by resolving them to their
1458 respective macro expansion points. If all three tokens are
1459 produced from the same macro expansion, then instead use their
1460 loci within the macro definition.
1461
1462 2020-09-16 Martin Sebor <msebor@redhat.com>
1463
1464 PR c/78666
1465 PR c/96126
1466 * c-attribs.c (validate_attr_args): New function.
1467 (validate_attr_arg): Same.
1468 (handle_section_attribute): Call it. Introduce a local variable.
1469 (handle_alloc_size_attribute): Same.
1470 (handle_alloc_align_attribute): Same.
1471
1472 2020-09-14 Jakub Jelinek <jakub@redhat.com>
1473
1474 * c-attribs.c (handle_optimize_attribute): Adjust
1475 cl_optimization_save, cl_optimization_restore and
1476 build_optimization_node callers.
1477 * c-pragma.c (handle_pragma_optimize): Adjust
1478 build_optimization_node caller.
1479 (handle_pragma_push_options): Adjust
1480 build_optimization_node and build_target_option_node callers.
1481 (handle_pragma_pop_options, handle_pragma_reset_options):
1482 Adjust cl_optimization_restore callers.
1483
1484 2020-08-28 Martin Sebor <msebor@redhat.com>
1485
1486 * c.opt (Wstringop-overread): New option.
1487
1488 2020-08-11 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR c/96545
1491 * c-common.c (get_atomic_generic_size): Require that first argument's
1492 type points to a complete type and use tree_fits_uhwi_p instead of
1493 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1494
1495 2020-07-31 Martin Sebor <msebor@redhat.com>
1496
1497 PR c++/96003
1498 * c-common.c (check_function_arguments_recurse): Return early when
1499 no-warning bit is set.
1500
1501 2020-07-31 Richard Biener <rguenther@suse.de>
1502
1503 PR debug/96383
1504 * c-common.h (c_common_finalize_early_debug): Declare.
1505 * c-common.c: Include debug.h.
1506 (c_common_finalize_early_debug): finalize_early_debug langhook
1507 implementation generating debug for extern declarations.
1508
1509 2020-07-27 Nathan Sidwell <nathan@acm.org>
1510
1511 * c-common.c (try_to_locate_new_include_insertion_point): Use
1512 strcmp, not pointer equality.
1513
1514 2020-07-25 Martin Sebor <msebor@redhat.com>
1515
1516 PR c++/96310
1517 * c-common.c (check_nonnull_arg): Print note only when warning was
1518 issued.
1519
1520 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1521
1522 * c-omp.c (c_finish_omp_critical): Check for no name but
1523 nonzero hint provided.
1524
1525 2020-07-20 Jason Merrill <jason@redhat.com>
1526
1527 * c-cppbuiltin.c (c_cpp_builtins): Update
1528 __cpp_nontype_template_args for C++20.
1529
1530 2020-07-20 Martin Sebor <msebor@redhat.com>
1531
1532 PR c/96249
1533 * c.opt: Remove stray text.
1534
1535 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1536
1537 PR other/86904
1538 * c-indentation.c (should_warn_for_misleading_indentation): Get
1539 global tabstop from the new source.
1540 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1541 is now a common option.
1542 * c.opt: Likewise.
1543
1544 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1545
1546 * c.opt (Wscalar-storage-order): Add explicit variable.
1547
1548 2020-07-07 Nathan Sidwell <nathan@acm.org>
1549
1550 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1551 cpp_read_main_file.
1552 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1553 maps. Force token position to line_table's highest line.
1554 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1555 (cb_define): Always increment source line.
1556
1557 2020-07-06 Martin Sebor <msebor@redhat.com>
1558
1559 PR c++/95984
1560 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1561 to stub lambda objects with null this pointer.
1562 (check_nonnull_arg): Handle C++ nullptr.
1563
1564 2020-07-02 Jason Merrill <jason@redhat.com>
1565 Jakub Jelinek <jakub@redhat.com>
1566
1567 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1568
1569 2020-06-30 Jakub Jelinek <jakub@redhat.com>
1570
1571 PR c++/95963
1572 * c-common.c (check_function_arguments_recurse): Don't crash on
1573 calls to internal functions.
1574
1575 2020-06-28 Martin Sebor <msebor@redhat.com>
1576
1577 PR c++/86568
1578 * c-common.c (struct nonnull_arg_ctx): Add members.
1579 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1580 C++ member functions specially. Consider the this pointer implicitly
1581 nonnull.
1582 (check_nonnull_arg): Use location of argument when available.
1583 (check_function_arguments): Use nonnull_arg_ctx as argument.
1584
1585 2020-06-27 Jakub Jelinek <jakub@redhat.com>
1586
1587 PR middle-end/95903
1588 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1589 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1590 smaller precision intop operands separately.
1591
1592 2020-06-26 Marek Polacek <polacek@redhat.com>
1593
1594 * c-opts.c (c_common_init_options): Default to gnu++17.
1595
1596 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
1597
1598 PR c/95378
1599 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1600 pointer arguments.
1601
1602 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1603
1604 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1605 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1606 idx members.
1607 (c_omp_is_loop_iterator): New function.
1608 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1609 if outer loop iterator is present. Perform duplicate checking through
1610 hash_set in the function rather than expecting caller to do that.
1611 Pass NULL instead of d->ppset to walk_tree_1.
1612 (c_omp_check_nonrect_loop_iv): New function.
1613 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1614 non-rectangular loop forms, diagnose multiple associated loops with
1615 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1616 (c_omp_check_loop_iv_exprs): Likewise.
1617
1618 2020-06-10 Martin Liska <mliska@suse.cz>
1619
1620 PR tree-optimization/92860
1621 * c-attribs.c (handle_optimize_attribute):
1622 Save global options and compare it after parsing of function
1623 attribute.
1624 * c-pragma.c (opt_stack::saved_global_options): New field.
1625 (handle_pragma_push_options): Save global_options.
1626 (handle_pragma_pop_options): Compare them after pop.
1627
1628 2020-06-09 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR c/95580
1631 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1632 case when MEM_REF's first argument has type pointer to incomplete type.
1633
1634 2020-06-05 Jason Merrill <jason@redhat.com>
1635
1636 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1637 operand to POINTER_PLUS_EXPR.
1638
1639 2020-06-04 Martin Sebor <msebor@redhat.com>
1640
1641 PR middle-end/10138
1642 PR middle-end/95136
1643 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1644 (handle_access_attribute): Same.
1645
1646 2020-06-03 Mark Wielaard <mark@klomp.org>
1647
1648 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1649 New function.
1650 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1651 New function declaration.
1652
1653 2020-06-03 Mark Wielaard <mark@klomp.org>
1654
1655 * known-headers.cc (get_string_macro_hint): New function.
1656 (get_stdlib_header_for_name): Use get_string_macro_hint.
1657 (get_c_stdlib_header_for_string_macro_name): New function.
1658 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1659 New function declaration.
1660
1661 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1662
1663 * c-common.h (c_omp_predetermined_mapping): Declare.
1664 * c-omp.c (c_omp_predetermined_mapping): New.
1665
1666 2020-05-22 Mark Wielaard <mark@klomp.org>
1667
1668 * known-headers.cc (get_stdlib_header_for_name): Add a new
1669 stdlib_hint array for stdbool and stdint.
1670
1671 2020-05-22 Mark Wielaard <mark@klomp.org>
1672
1673 * known-headers.cc (get_stdlib_header_for_name): Return
1674 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1675 flag_isoc99.
1676
1677 2020-05-20 Nathan Sidwell <nathan@acm.org>
1678
1679 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1680
1681 * c-common.c (try_to_locate_new_include_insertion_point): Use
1682 strcmp to compare filenames.
1683 * c-lex.c (init_c_lex): Move declaration to initialization.
1684 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1685 deferred count loop.
1686
1687 2020-05-15 Jason Merrill <jason@redhat.com>
1688
1689 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1690
1691 2020-05-13 Jason Merrill <jason@redhat.com>
1692
1693 * c.opt (std=c++20): Make c++2a the alias.
1694 (std=gnu++20): Likewise.
1695 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1696 * c-opts.c: Adjust.
1697 * c-cppbuiltin.c: Adjust.
1698 * c-ubsan.c: Adjust.
1699 * c-warn.c: Adjust.
1700
1701 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1702
1703 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1704
1705 2020-05-08 Nathan Sidwell <nathan@acm.org>
1706
1707 Reimplement directives only processing.
1708 * c-ppoutput.c (token_streamer): Ne.
1709 (directives_only_cb): New. Swallow ...
1710 (print_lines_directives_only): ... this.
1711 (scan_translation_unit_directives_only): Reimplment using the
1712 published interface.
1713
1714 2020-05-07 Marek Polacek <polacek@redhat.com>
1715
1716 * c-format.c (badwords): Add "nonstatic".
1717
1718 202-05-07 Jakub Jelinek <jakub@redhat.com>
1719
1720 PR c/94968
1721 * c-common.c (speculation_safe_value_resolve_params): Return false if
1722 error_operand_p (val2).
1723 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1724 Remove extraneous semicolon.
1725
1726 2020-05-06 qing zhao <qing.zhao@oracle.com>
1727
1728 PR c/94230
1729 * c-indentation.c (get_visual_column): Add a hint to use the new
1730 -flarge-source-files option.
1731
1732 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1733
1734 * c-attribs.c (handle_vector_size_attribute): Add attribute
1735 nonnull for argument args in order to silence warning of
1736 uninitialized variable usage. Since this is local to the
1737 compilation unit and thus cannot be checked at call sides by the
1738 compiler, added an assert statement in order to verify this.
1739
1740 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1741
1742 PR target/93492
1743 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1744 value to USHRT_MAX (65535).
1745
1746 2020-04-29 Jakub Jelinek <jakub@redhat.com>
1747
1748 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1749
1750 2020-04-27 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR c/94755
1753 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1754 fncode == BUILT_IN_NONE before initialization of first_param.
1755
1756 2020-04-23 Marek Polacek <polacek@redhat.com>
1757
1758 PR c++/94733
1759 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1760 TREE_PURPOSE.
1761
1762 2020-04-14 Patrick Palka <ppalka@redhat.com>
1763
1764 PR c++/85278
1765 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1766 ampersand if it's an rvalue reference type.
1767
1768 2020-04-13 Martin Sebor <msebor@redhat.com>
1769
1770 PR c/92326
1771 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1772 printing array bound for flexible array members.
1773
1774 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1775
1776 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1777 define, per n4861.
1778
1779 2020-04-02 Richard Biener <rguenther@suse.de>
1780
1781 PR c/94392
1782 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1783 for -O2 and C++11 or newer.
1784
1785 2020-03-28 Patrick Palka <ppalka@redhat.com>
1786
1787 * c.opt: Add -fconcepts-diagnostics-depth.
1788
1789 2020-03-27 Martin Sebor <msebor@redhat.com>
1790
1791 PR c++/94346
1792 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1793 to decl_attributes. Make handling of different kinds of entities
1794 more robust.
1795
1796 2020-03-27 Martin Sebor <msebor@redhat.com>
1797
1798 PR c++/94098
1799 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1800 here.
1801
1802 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1803
1804 PR c++/91993
1805 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1806 result being COMPOUND_EXPRs, skip to ultimate rhs.
1807
1808 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1809
1810 PR middle-end/94072
1811 * c-common.c (c_common_type_for_mode): Before using a registered
1812 built-in type, check that the vectorness of the type matches
1813 the vectorness of the mode.
1814
1815 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1816
1817 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1818 issue in a diagnostic message.
1819
1820 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1821
1822 * c.opt: Avoid redundancy in the help text.
1823
1824 2020-03-02 Marek Polacek <polacek@redhat.com>
1825
1826 PR c++/93958 - add missing -std=gnu++20.
1827 * c.opt: Add -std=gnu++20.
1828
1829 2020-03-01 Martin Sebor <msebor@redhat.com>
1830
1831 PR c++/92721
1832 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1833 (handle_access_attribute): Same.
1834
1835 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR c/93858
1838 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1839 "did you mean" hint in diagnostics.
1840
1841 2020-02-15 Jason Merrill <jason@redhat.com>
1842
1843 * c.opt: Add -std=c++20.
1844
1845 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1846
1847 * c-ada-spec.c: Include bitmap.h.
1848 (dump_ada_double_name): Rename into...
1849 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1850 (dump_ada_array_type): Adjust to above renaming. Robustify.
1851 (dump_nested_types_1): New function copied from... Add dumped_types
1852 parameter and pass it down to dump_nested_type.
1853 (dump_nested_types): ...this. Remove parent parameter. Just call
1854 dump_nested_types_1 on an automatic bitmap.
1855 (dump_nested_type): Add dumped_types parameter.
1856 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1857 Adjust recursive calls and adjust to above renaming.
1858 (dump_ada_declaration): Adjust call to dump_nested_types.
1859 Tidy up and adjust to above renaming.
1860 (dump_ada_specs): Initialize and release bitmap obstack.
1861
1862 2020-02-10 Martin Sebor <msebor@redhat.com>
1863
1864 PR c/93640
1865 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1866
1867 2020-02-10 Jakub Jelinek <jakub@redhat.com>
1868
1869 PR other/93641
1870 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1871 Remove useless extra test.
1872
1873 2020-02-03 Julian Brown <julian@codesourcery.com>
1874 Tobias Burnus <tobias@codesourcery.com>
1875
1876 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1877
1878 2020-01-29 Jason Merrill <jason@redhat.com>
1879
1880 PR c++/89357
1881 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1882
1883 2020-01-23 Jason Merrill <jason@redhat.com>
1884
1885 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1886
1887 2020-01-23 Martin Sebor <msebor@redhat.com>
1888
1889 PR c/84919
1890 * c-common.c (check_function_arguments): Avoid overlap checking
1891 of sprintf functions.
1892
1893 2020-01-22 Jason Merrill <jason@redhat.com>
1894
1895 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1896 PR c++/40752
1897 * c-warn.c (conversion_warning): Check operands only after checking
1898 the whole expression. Don't check second operand of + for sign.
1899
1900 2020-01-21 Jason Merrill <jason@redhat.com>
1901 Manuel López-Ibáñez <manu@gcc.gnu.org>
1902
1903 PR c++/40752 - useless -Wconversion with short +=.
1904 * c.opt (-Warith-conversion): New.
1905 * c-warn.c (conversion_warning): Recurse for operands of
1906 operators. Only warn about the whole expression with
1907 -Warith-conversion.
1908
1909 2020-01-21 Jason Merrill <jason@redhat.com>
1910
1911 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1912 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1913
1914 2020-01-20 Nathan Sidwell <nathan@acm.org>
1915
1916 PR preprocessor/80005
1917 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1918
1919 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1920
1921 * c-common.c (co_await, co_yield, co_return): New.
1922 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1923 RID_CO_RETURN): New enumeration values.
1924 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1925 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1926 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1927 * c.opt (fcoroutines): New command-line switch.
1928
1929 2020-01-10 David Malcolm <dmalcolm@redhat.com>
1930
1931 * c-format.c (local_event_ptr_node): New.
1932 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1933 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1934 * c-format.h (T_EVENT_PTR): New define.
1935
1936 2020-01-10 Martin Sebor <msebor@redhat.com>
1937
1938 PR c/93132
1939 * c-attribs.c (append_access_attrs): Validate against the translated
1940 access string rather than the human-readable representation.
1941
1942 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1943
1944 Update copyright years.
1945
1946 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1947
1948 * c-ada-spec.h (decl_sloc): Delete.
1949 * c-ada-spec.c (decl_sloc): Make static.
1950
1951 2019-12-19 Julian Brown <julian@codesourcery.com>
1952
1953 * c-common.h (c_omp_map_clause_name): Add prototype.
1954 * c-omp.c (c_omp_map_clause_name): New function.
1955 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1956 PRAGMA_OACC_CLAUSE_DETACH.
1957
1958 2019-12-19 Julian Brown <julian@codesourcery.com>
1959 Maciej W. Rozycki <macro@codesourcery.com>
1960 Tobias Burnus <tobias@codesourcery.com>
1961 Thomas Schwinge <thomas@codesourcery.com>
1962
1963 * c-pragma.h (pragma_omp_clause): Add
1964 PRAGMA_OACC_CLAUSE_NO_CREATE.
1965
1966 2019-12-17 Martin Sebor <msebor@redhat.com>
1967
1968 PR c++/61339
1969 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1970
1971 2019-12-11 David Malcolm <dmalcolm@redhat.com>
1972
1973 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1974 implementation.
1975 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1976
1977 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1978
1979 * c-format.c (range_label_for_format_type_mismatch::get_text):
1980 Replace label_text ctor called with true with label_text::take.
1981
1982 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1983
1984 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1985 initial newline from expected outputs.
1986 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1987 call to diagnostic_show_locus.
1988
1989 2019-12-06 Jakub Jelinek <jakub@redhat.com>
1990
1991 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1992 now.
1993
1994 2019-12-05 Marek Polacek <polacek@redhat.com>
1995 Jakub Jelinek <jakub@redhat.com>
1996
1997 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1998 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1999
2000 2019-12-05 Marek Polacek <polacek@redhat.com>
2001
2002 PR c++/92271 - make __is_same alias for __is_same_as.
2003 * c-common.c: Add __is_same, an alias for __is_same_as.
2004
2005 2019-12-03 Marek Polacek <polacek@redhat.com>
2006
2007 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2008 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2009 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2010
2011 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2012
2013 * c-attribs.c (handle_symver_attribute): New function
2014 (c_common_attributes): Add symver.
2015
2016 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2017
2018 * c-common.c (pointer_int_sum): Use verify_type_context to check
2019 whether the target allows pointer arithmetic for the types involved.
2020 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2021 to check whether the target allows sizeof and alignof operations
2022 for the types involved.
2023
2024 2019-11-27 Jason Merrill <jason@redhat.com>
2025
2026 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2027
2028 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2029
2030 PR c++/61414
2031 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2032 ENUMERAL_TYPEs.
2033
2034 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2035
2036 PR c/91985
2037 * c-common.c (c_common_type_for_mode): Handle decimal
2038 floating-point types being NULL_TREE.
2039 * c-format.c (get_format_for_type_1): Handle specified types being
2040 NULL_TREE.
2041 * c-lex.c (interpret_float): Give an error for decimal
2042 floating-point constants when decimal floating-point not
2043 supported.
2044
2045 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2046
2047 PR middle-end/83859
2048 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2049 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2050 group warning with inform together.
2051 (handle_access_attribute): Formatting fix.
2052
2053 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2054
2055 PR c/90677
2056 * c-common.h (identifier_global_tag): Declare.
2057 * c-format.c (get_pointer_to_named_type): Renamed to ...
2058 (get_named_type): ... this. Use identifier_global_tag instead of
2059 identifier_global_value, handle the return value being a TYPE_P.
2060 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2061 to call get_named_type instead. Formatting fixes.
2062
2063 Implement P1902R1, Missing feature-test macros 2017-2019.
2064 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2065 and __cpp_generic_lambdas for -std=c++2a. Define
2066 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2067 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2068 __cpp_concepts for -std=c++2a.
2069
2070 2019-11-22 Martin Sebor <msebor@redhat.com>
2071
2072 PR middle-end/83859
2073 * c-attribs.c (handle_access_attribute): New function.
2074 (c_common_attribute_table): Add new attribute.
2075 (get_argument_type): New function.
2076 (append_access_attrs): New function.
2077 (get_nonnull_operand): Rename...
2078 (get_attribute_operand): ...to this.
2079 * c-common.c (get_nonnull_operand): Rename...
2080 (get_attribute_operand): ...to this.
2081
2082 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2083
2084 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2085 of warning.
2086
2087 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2088
2089 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2090 warning for standard attributes mixed with fallthrough attributes.
2091
2092 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2093
2094 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2095 * c-common.h (handle_fallthrough_attribute): Declare.
2096
2097 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2098
2099 * c-attribs.c (handle_deprecated_attribute): Remove static.
2100 * c-common.h (handle_deprecated_attribute): Declare.
2101
2102 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2103
2104 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2105 char for C.
2106
2107 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2108
2109 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2110 valid vendors.
2111
2112 * c-omp.c (c_omp_check_context_selector): Handle name lists
2113 containing string literals. Don't diagnose atomic_default_mem_order
2114 with multiple props.
2115
2116 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2117
2118 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2119 NORM_MAX constants. Update call to get_max_float.
2120 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2121 constants.
2122
2123 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2124
2125 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2126 (dump_forward_type): Do not generate a declaration for function types.
2127 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2128 of the component type if it is declared in another file.
2129
2130 2019-11-12 Martin Liska <mliska@suse.cz>
2131
2132 * c-opts.c (c_common_post_options):
2133 Use SET_OPTION_IF_UNSET.
2134
2135 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2136 Frederik Harwath <frederik@codesourcery.com>
2137
2138 gcc/c-family/
2139 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2140 constant.
2141 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2142
2143 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2144
2145 * c-common.h (gnu_vector_type_p): New function.
2146 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2147 vectors to satisfy gnu_vector_type_p.
2148 (c_build_vec_convert): Likewise __builtin_convertvector.
2149 (convert_vector_to_array_for_subscript): Likewise when applying
2150 implicit vector to array conversion.
2151 (scalar_to_vector): Likewise when converting vector-scalar
2152 operations to vector-vector operations.
2153
2154 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2155
2156 * c.opt (Wold-style-definition): Initialize to -1.
2157 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2158 to flag_isoc2x if not set explicitly.
2159
2160 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2161
2162 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2163
2164 2019-11-05 Jason Merrill <jason@redhat.com>
2165
2166 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2167 -fconcepts.
2168
2169 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2170
2171 * c-opts.c (c_common_post_options): Update
2172 latest_abi_version.
2173
2174 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2175
2176 * c-common.h (c_omp_get_context_selector): Remove.
2177 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2178 and renamed to omp_get_context_selector.
2179
2180 * c-omp.c (c_omp_mark_declare_variant): Use
2181 omp_context_selector_set_compare.
2182
2183 PR c++/88335 - Implement P1073R3: Immediate functions
2184 * c-common.h (enum rid): Add RID_CONSTEVAL.
2185 * c-common.c (c_common_reswords): Add consteval.
2186
2187 2019-11-01 Martin Sebor <msebor@redhat.com>
2188
2189 PR middle-end/91679
2190 PR middle-end/91647
2191 PR middle-end/91463
2192 PR middle-end/92312
2193 * c-pretty-print.c (direct_abstract_declarator): Print
2194 bound in zero-length arrays.
2195 * c.opt (-Wzero-length-bounds): New option.
2196
2197 2019-10-30 Nathan Sidwell <nathan@acm.org>
2198
2199 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2200 macros.
2201
2202 2019-10-28 Martin Sebor <msebor@redhat.com>
2203
2204 PR c/66970
2205 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2206 even when only preprocessing.
2207 * c-common.h (names_builtin_p): Declare new function.
2208 * c-lex.c (init_c_lex): Set has_builtin.
2209 (c_common_has_builtin): Define a new function.
2210 * c-ppoutput.c (init_pp_output): Set has_builtin.
2211
2212 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2213
2214 * c-common.h (c_omp_context_selector_matches): Remove.
2215 * c-omp.c (c_omp_context_selector_matches): Remove.
2216 * c-attribs.c (c_common_attribute_table): Add
2217 "omp declare target {host,nohost,block}" attributes.
2218
2219 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2220
2221 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2222
2223 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2224
2225 * c-common.h (user_facing_original_type_p): Declare.
2226 * c-common.c: Include c-spellcheck.h.
2227 (user_facing_original_type_p): New function.
2228
2229 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2230
2231 * c-common.h (c_omp_mark_declare_variant,
2232 c_omp_context_selector_matches): Declare.
2233 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2234 and hsa-common.h.
2235 (c_omp_get_context_selector): Support second argument NULL.
2236 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2237 functions.
2238 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2239 attribute, add "omp declare variant base" and
2240 "omp declare variant variant" attributes.
2241
2242 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2243
2244 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2245 CppReason(CPP_W_C11_C2X_COMPAT).
2246
2247 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2248
2249 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2250 _Decimal64 and _Decimal128.
2251
2252 2019-10-10 Joseph Myers <joseph@codesourcery.com>
2253
2254 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2255 types if DFP not supported.
2256
2257 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2258
2259 * c-common.h (c_omp_check_context_selector,
2260 c_omp_get_context_selector): Declare.
2261 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2262 in diagnostic message.
2263 (c_omp_check_context_selector, c_omp_get_context_selector): New
2264 functions.
2265 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2266 attribute.
2267 (handle_omp_declare_variant_attribute): New function.
2268
2269 2019-10-09 Martin Sebor <msebor@redhat.com>
2270
2271 PR tree-optimization/90879
2272 * c.opt (-Wstring-compare): New option.
2273
2274 2019-10-08 Andrew Sutton <asutton@lock3software.com>
2275 Jason Merrill <jason@redhat.com>
2276
2277 Update the concepts implementation to conform to the C++20
2278 specification, improve compile times, and generally clean up
2279 the implementation.
2280
2281 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2282 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2283 * c.opt: Add -Wconcepts-ts.
2284 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2285 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2286 (set_std_cxx2a): Enable concepts by default.
2287
2288 2019-10-08 Joseph Myers <joseph@codesourcery.com>
2289
2290 * c-opts.c (c_common_post_options): Set
2291 -fno-fp-int-builtin-inexact for C2X.
2292
2293 2019-10-05 Jakub Jelinek <jakub@redhat.com>
2294
2295 PR c++/91369 - Implement P0784R7: constexpr new
2296 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2297 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2298
2299 2019-10-04 Joseph Myers <joseph@codesourcery.com>
2300
2301 PR c/82752
2302 * c-format.c (C_STD_VER): Handle C2x.
2303 (C_STD_NAME): Likewise.
2304 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2305 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2306 modifier allowed and 'p' flag.
2307 * c-format.h (enum format_std_version): Add STD_C2X.
2308 (struct format_char_info): Mention 'p' in comment on flags2.
2309
2310 2019-10-01 David Malcolm <dmalcolm@redhat.com>
2311
2312 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2313 calling diagnostic_show_locus, rather than destroying it afterwards.
2314
2315 2019-10-01 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR c++/91925
2318 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2319 with NULL DECL_FIELD_OFFSET.
2320
2321 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2322
2323 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2324 has a type name, use it in preference to the __vector syntax.
2325
2326 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2327
2328 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2329 two spaces between a comma and "...".
2330
2331 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2332
2333 PR c++/88203
2334 * c-common.h (c_omp_predefined_variable): Declare.
2335 * c-omp.c (c_omp_predefined_variable): New function.
2336 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2337 for predefined variables.
2338
2339 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2340
2341 * c-common.h (build_function_call_vec): Take the original
2342 function decl as an optional final parameter.
2343 (check_builtin_function_arguments): Take the original function decl.
2344 * c-common.c (check_builtin_function_arguments): Likewise.
2345 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2346 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2347
2348 2019-09-15 Jason Merrill <jason@redhat.com>
2349
2350 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2351 fold_for_warn in "|| mask" warning.
2352
2353 2019-09-10 Martin Liska <mliska@suse.cz>
2354
2355 * c.opt: Use newly added WarnRemoved.
2356
2357 2019-09-09 Martin Liska <mliska@suse.cz>
2358
2359 * c.opt: Update comment of removed
2360 options that are preserved only for backward
2361 compatibility.
2362
2363 2019-09-06 Martin Liska <mliska@suse.cz>
2364
2365 PR c++/91125
2366 * c-common.c: Remove definition of flag_use_repository.
2367 * c-common.h: Likewise.
2368 * c-opts.c (c_common_handle_option):
2369 Do not handle OPT_frepo option.
2370 * c.opt: Mark the option with Deprecated.
2371
2372 2019-09-04 Marek Polacek <polacek@redhat.com>
2373
2374 * c.opt (fdeduce-init-list): Ignored.
2375
2376 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2377
2378 PR c/78736
2379 * c.opt (Wenum-conversion): New option.
2380
2381 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2382
2383 * c-attribs.c (handle_section_attribute): Call the
2384 handle_generic_attribute target hook after performing target
2385 independent processing.
2386 (handle_noinit_attribute): Likewise.
2387
2388 2019-09-03 Ian Lance Taylor <iant@golang.org>
2389
2390 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2391 when using -fgo-dump-spec.
2392
2393 2019-09-02 Martin Liska <mliska@suse.cz>
2394
2395 PR c++/91155
2396 * c-common.c (fname_as_string): Use cxx_printable_name for
2397 __PRETTY_FUNCTION__ same as was used before r265711.
2398
2399 2019-08-28 Marek Polacek <polacek@redhat.com>
2400
2401 Implement P1152R4: Deprecating some uses of volatile.
2402 PR c++/91361
2403 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2404 default for C++2a, unless -Wno-deprecated.
2405 * c.opt (Wvolatile): New warning.
2406
2407 2019-08-28 Marek Polacek <polacek@redhat.com>
2408
2409 PR c++/91360 - Implement C++20 P1143R2: constinit.
2410 * c-common.c (c_common_reswords): Add constinit and __constinit.
2411 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2412 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2413 RID_LAST_CXX20.
2414 (D_CXX20): Define.
2415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2416 * c-format.c (cxx_keywords): Add "constinit".
2417 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2418
2419 2019-08-27 Jakub Jelinek <jakub@redhat.com>
2420
2421 PR c++/91415
2422 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2423 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2424 like COMPOUND_EXPR rather than normal expression.
2425
2426 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2427
2428 PR pch/61250
2429 * c-lex.c (c_lex_with_flags): Don't call
2430 c_common_no_more_pch () from here.
2431
2432 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2433
2434 PR middle-end/91283
2435 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2436 instead of flag_excess_precision_cmdline.
2437 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2438 * c-opts.c (c_common_post_options): Likewise.
2439
2440 2019-08-22 Martin Sebor <msebor@redhat.com>
2441
2442 PR middle-end/91490
2443 * c-common.c (braced_list_to_string): Add argument and overload.
2444 Handle flexible length arrays and unions.
2445
2446 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2447
2448 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2449 function declarations where arguments are missing. Rename variables.
2450
2451 2019-08-15 Richard Biener <rguenther@suse.de>
2452
2453 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2454 enabled, define __SIZETYPE__.
2455
2456 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2457
2458 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2459 exclusion with "section" attribute.
2460 (attr_noinit_exclusions): New table.
2461 (handle_noinit_attribute): New function.
2462
2463 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2464
2465 PR middle-end/91421
2466 * c-common.c (resolve_overloaded_builtin): Use
2467 copy_decl_built_in_function.
2468
2469 2019-08-13 Martin Sebor <msebor@redhat.com>
2470
2471 PR c/80619
2472 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2473 (asm_fprintf_length_spec): Same.
2474 * c-format.h (format_lengths): Add FMT_LEN_w.
2475
2476 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2477
2478 * c-pragma.h (enum pragma_omp_clause): Add
2479 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2480
2481 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2482
2483 * c-pragma.h (enum pragma_omp_clause): Add
2484 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2485 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2486 enumeration value.
2487
2488 2019-08-05 Marek Polacek <polacek@redhat.com>
2489
2490 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2491 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2492 default for C++2a, unless -Wno-deprecated.
2493 * c.opt (Wcomma-subscript): New warning.
2494
2495 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2496
2497 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2498 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2499 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2500 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2501 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2502 constructs with the loop construct.
2503
2504 2019-07-13 Jakub Jelinek <jakub@redhat.com>
2505
2506 PR c/91149
2507 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2508 OMP_CLAUSE_REDUCTION_TASK handling.
2509
2510 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2511
2512 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2513 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2514
2515 2019-07-09 Martin Sebor <msebor@redhat.com>
2516
2517 PR c++/61339
2518 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2519 and others to class.
2520 * c-pretty-print.h: Same.
2521
2522 2019-07-09 Martin Sebor <msebor@redhat.com>
2523
2524 PR c++/61339
2525 * c-format.c (check_argument_type): Change class-key from class to
2526 struct and vice versa to match convention and avoid -Wclass-is-pod
2527 and -Wstruct-no-pod.
2528 * c-pretty-print.h: Same.
2529
2530 2019-07-03 Martin Liska <mliska@suse.cz>
2531
2532 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2533 dead assignemts.
2534
2535 2019-07-03 Jakub Jelinek <jakub@redhat.com>
2536
2537 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2538 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2539 with OMP_PARALLEL.
2540
2541 2019-07-02 qing zhao <qing.zhao@oracle.com>
2542
2543 PR preprocessor/90581
2544 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2545 * c.opt: Add new option -fmax-include-depth.
2546
2547 2019-06-26 Jason Merrill <jason@redhat.com>
2548
2549 PR c++/55442 - memory-hog with highly recursive constexpr.
2550 * c.opt (fconstexpr-loop-limit): New.
2551
2552 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2553
2554 PR sanitizer/90954
2555 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2556 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2557
2558 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2559
2560 * c-common.c (c_common_nodes_and_builtins): Define
2561 alternate "__intN__" name for "__intN" types.
2562
2563 2019-06-24 Jan Hubicka <jh@suse.cz>
2564
2565 * c-common.c (braced_lists_to_strings): Check that
2566 type is array or integer prior checking string flag.
2567
2568 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2569
2570 PR c++/90875 - added -Wswitch-outside-range option
2571 * c.opt (Wswitch-outside-range): Added new option.
2572 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2573
2574 2019-06-21 Marek Polacek <polacek@redhat.com>
2575
2576 PR c++/90953 - ICE with -Wmissing-format-attribute.
2577 * c-common.c (check_function_arguments_recurse): Use
2578 get_attribute_name.
2579 (check_missing_format_attribute): Likewise.
2580
2581 2019-06-19 Marek Polacek <polacek@redhat.com>
2582
2583 PR c++/60364 - noreturn after first decl not diagnosed.
2584 * c-attribs.c (handle_noreturn_attribute): No longer static.
2585 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2586 Declare.
2587 * c-format.c (check_function_format): Use get_attribute_name.
2588
2589 2019-06-19 Martin Sebor <msebor@redhat.com>
2590
2591 PR translation/90156
2592 * c-format.c (function_format_info::format_type): Adjust type.
2593 (function_format_info::is_raw): New member.
2594 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2595 (decode_format_attr): Adjust call to decode_format_type.
2596 Avoid a redundant call to convert_format_name_to_system_name.
2597 Avoid abbreviating the word "arguments" in a diagnostic.
2598 (format_warning_substr): New function.
2599 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2600 (finish_dollar_format_checking): Same.
2601 (check_format_info): Same.
2602 (struct baltoks_t): New.
2603 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2604 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2605 functions.
2606 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2607 maybe_diag_unbalanced_tokens.
2608 (handle_format_attribute): Spell out the word "arguments" in
2609 a diagnostic.
2610
2611 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2612
2613 PR c++/90449 - add -Winaccessible-base option.
2614 * c.opt (Winaccessible-base): New option.
2615
2616 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2617
2618 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2619 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2620 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2621 combined/composite constructs where it is not allowed. Copy over
2622 OMP_CLAUSE_REDUCTION_INSCAN.
2623
2624 2019-06-05 Martin Sebor <msebor@redhat.com>
2625
2626 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2627 (handle_alias_ifunc_attribute): Same.
2628 (handle_copy_attribute): Same.
2629 (handle_weakref_attribute): Same.
2630 (handle_nonnull_attribute): Same.
2631 * c-warn.c (warn_for_sign_compare): Same.
2632 (warn_for_restrict): Same.
2633 * c.opt: Same.
2634
2635 2019-06-05 Martin Sebor <msebor@redhat.com>
2636
2637 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2638 * c.opt (-Wformat-diag): Remove a spurious period.
2639
2640 2019-05-29 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR c/90628
2643 * c-common.c (check_builtin_function_arguments)
2644 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2645 as last argument.
2646
2647 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2648
2649 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2650
2651 2019-05-22 Martin Liska <mliska@suse.cz>
2652
2653 PR lto/90500
2654 * c-attribs.c (handle_copy_attribute): Do not copy
2655 target_clones attribute.
2656
2657 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2658
2659 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2660 * c-ada-spec.c (print_assignment_operator): New function.
2661 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2662 assignment operators declared as methods and filter out the others.
2663
2664 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2665
2666 PR c/89433
2667 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2668 "omp declare target".
2669
2670 2019-05-16 Martin Sebor <msebor@redhat.com>
2671
2672 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2673 keywords, operators, and types in diagnostics.
2674 (handle_scalar_storage_order_attribute): Same.
2675 (handle_mode_attribute): Same.
2676 (handle_visibility_attribute): Same.
2677 (handle_assume_aligned_attribute): Same.
2678 (handle_no_split_stack_attribute): Same.
2679 * c-common.c (shorten_compare): Same.
2680 (c_common_truthvalue_conversion): Same.
2681 (cb_get_source_date_epoch): Same.
2682 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2683 in diagnostics.
2684 (interpret_float): Same.
2685 * c-omp.c (c_finish_omp_for): Same.
2686 * c-opts.c (c_common_post_options): Same.
2687 * c-pch.c (c_common_pch_pragma): Same.
2688 * c-pragma.c (pop_alignment): Same.
2689 (handle_pragma_pack): Same.
2690 (apply_pragma_weak): Same.
2691 (handle_pragma_weak): Same.
2692 (handle_pragma_scalar_storage_order): Same.
2693 (handle_pragma_redefine_extname): Same.
2694 (add_to_renaming_pragma_list): Same.
2695 (maybe_apply_renaming_pragma): Same.
2696 (push_visibility): Same.
2697 (handle_pragma_visibility): Same.
2698 (handle_pragma_optimize): Same.
2699 (handle_pragma_message): Same.
2700 * c-warn.c (warn_for_omitted_condop): Same.
2701 (lvalue_error): Same.
2702
2703 2019-05-15 Richard Biener <rguenther@suse.de>
2704
2705 PR c/90474
2706 * c-common.c (c_common_mark_addressable_vec): Also mark
2707 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2708 c_mark_addressable.
2709
2710 2019-05-06 Nathan Sidwell <nathan@acm.org>
2711
2712 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2713
2714 2019-04-30 Nathan Sidwell <nathan@acm.org>
2715
2716 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2717
2718 2019-04-30 Martin Liska <mliska@suse.cz>
2719
2720 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2721 for unknown options.
2722
2723 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2724
2725 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2726 the pointer target rather than the pointer itself.
2727
2728 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2729
2730 PR c/89888
2731 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2732 arguments.
2733 (c_do_switch_warnings): Remove outside_range_p argument.
2734 * c-common.c (check_case_bounds): Removed.
2735 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2736 Don't call check_case_bounds. Fold low_value as well as high_value.
2737 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2738 Check for case labels outside of range of original type here and
2739 adjust them.
2740
2741 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2742
2743 PR translation/90041
2744 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2745 in the Warn diagnostics.
2746
2747 PR c/89946
2748 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2749 function comment. Warn if arguments of the attribute are not positive
2750 integer constants.
2751
2752 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2753
2754 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2755 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2756
2757 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2758
2759 * c-ada-spec.c (is_float128): New predicate extracted from...
2760 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2761 <REAL_TYPE>: ...here. Call it.
2762
2763 2019-04-05 David Malcolm <dmalcolm@redhat.com>
2764
2765 PR c/89985
2766 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2767 auto_diagnostic_group. Guard inform calls by result of
2768 warning_at call.
2769
2770 2019-04-05 Marek Polacek <polacek@redhat.com>
2771
2772 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
2773 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2774 of RHS.
2775
2776 2019-04-03 Jason Merrill <jason@redhat.com>
2777
2778 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2779 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2780
2781 2019-04-01 Martin Sebor <msebor@redhat.com>
2782
2783 PR c/89685
2784 * c-attribs.c (handle_copy_attribute): Handle references and
2785 non-constant expressions.
2786
2787 2019-03-22 Jakub Jelinek <jakub@redhat.com>
2788
2789 PR c++/87481
2790 * c.opt (-fconstexpr-ops-limit=): New option.
2791
2792 2019-03-21 Jakub Jelinek <jakub@redhat.com>
2793
2794 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2795 template param.
2796
2797 2019-03-19 Martin Sebor <msebor@redhat.com>
2798
2799 PR tree-optimization/89688
2800 * c-common.c (braced_list_to_string): Make static.
2801 (braced_lists_to_strings): Define new function.
2802 * c-common.h (braced_list_to_string): Remove.
2803 (braced_lists_to_strings): Declare.
2804
2805 2019-03-12 Martin Liska <mliska@suse.cz>
2806
2807 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2808
2809 2019-03-11 Martin Liska <mliska@suse.cz>
2810
2811 * c-opts.c (c_common_post_options): Wrap apostrophes
2812 in gcc internal format with %'.
2813
2814 2019-03-11 Martin Liska <mliska@suse.cz>
2815
2816 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2817 in a string format message and fix GNU coding style.
2818 * c-common.c (vector_types_convertible_p): Likewise.
2819 (c_build_vec_perm_expr): Likewise.
2820 * c-indentation.c (get_visual_column): Likewise.
2821 * c-opts.c (c_common_handle_option): Likewise.
2822 (c_common_post_options): Likewise.
2823 (sanitize_cpp_opts): Likewise.
2824 * c-pch.c (c_common_pch_pragma): Likewise.
2825 * c-pragma.c (handle_pragma_pack): Likewise.
2826
2827 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2828
2829 PR tree-optimization/89550
2830 * c-common.c (c_common_truthvalue_conversion): Only set
2831 TREE_NO_WARNING if warning_at returned true.
2832 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2833
2834 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2835 Martin Sebor <msebor@gmail.com>
2836
2837 * c.opt (Wmissing-attributes): Clean up doc string.
2838
2839 2019-02-25 Jakub Jelinek <jakub@redhat.com>
2840
2841 PR c/89495
2842 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2843 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2844 checking.
2845
2846 2019-02-22 Richard Biener <rguenther@suse.de>
2847
2848 * c-pch.c (no_checksum): Remove.
2849 (pch_init): Remove assertion that executable_checksum is not
2850 all zero.
2851 (c_common_valid_pch): Likewise.
2852
2853 2019-02-18 Martin Sebor <msebor@redhat.com>
2854
2855 PR middle-end/89294
2856 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2857
2858 2019-02-16 David Malcolm <dmalcolm@redhat.com>
2859
2860 PR c++/88680
2861 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2862 implementing -Wtype-limits.
2863
2864 2019-02-11 Martin Sebor <msebor@redhat.com>
2865
2866 PR c++/87996
2867 * c-common.c (invalid_array_size_error): New function.
2868 (valid_array_size_p): Call it. Handle size as well as type.
2869 * c-common.h (valid_constant_size_p): New function.
2870 (enum cst_size_error): New type.
2871
2872 2019-01-31 David Malcolm <dmalcolm@redhat.com>
2873
2874 PR c/89122
2875 * known-headers.cc (get_stdlib_header_for_name): Add
2876 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2877
2878 2019-01-31 Jakub Jelinek <jakub@redhat.com>
2879
2880 PR libstdc++/88170
2881 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2882 a C cast in pp_c_flag_gnu_v3 mode.
2883
2884 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2885
2886 PR c/86125
2887 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2888 builtin_structptr_types types even for C.
2889
2890 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2891
2892 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2893 when rhs is of array type correctly. Fix handling of nested structures.
2894 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2895 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2896 type casts within nested compound expressions.
2897
2898 2019-01-22 Jakub Jelinek <jakub@redhat.com>
2899
2900 PR middle-end/88968
2901 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2902 variable after using BIT_FIELD_REF.
2903
2904 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2905
2906 PR c/51628
2907 PR c/88664
2908 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2909 Remove the boolean argument.
2910 * c-warn.c (check_address_of_packed_member): Renamed to ...
2911 (check_address_or_pointer_of_packed_member): This. Also
2912 warn pointer conversion.
2913 (check_and_warn_address_of_packed_member): Renamed to ...
2914 (check_and_warn_address_or_pointer_of_packed_member): This.
2915 Also warn pointer conversion.
2916 (warn_for_address_or_pointer_of_packed_member): Remove the
2917 boolean argument. Don't check pointer conversion here.
2918
2919 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2920
2921 PR inline-asm/52813
2922 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2923
2924 2019-01-14 Jakub Jelinek <jakub@redhat.com>
2925
2926 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2927 and __cpp_nontype_template_parameter_auto. Add a comment that
2928 __cpp_template_auto is deprecated.
2929
2930 2019-01-14 Tom Honermann <tom@honermann.net>
2931
2932 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2933 * c-common.c (c_common_reswords): Add char8_t.
2934 (fix_string_type): Use char8_t for the type of u8 string literals.
2935 (c_common_get_alias_set): char8_t doesn't alias.
2936 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2937 C++.
2938 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2939 (keyword_begins_type_specifier): Add RID_CHAR8.
2940 * c-common.h (rid): Add RID_CHAR8.
2941 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2942 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2943 Define char8_type_node and char8_array_type_node.
2944 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2945 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2946 (c_cpp_builtins): Predefine __cpp_char8_t.
2947 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2948 CPP_UTF8STRING.
2949 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2950 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2951 targeting C++2a.
2952 * c.opt: Add the -fchar8_t command line option.
2953
2954 2019-01-14 Martin Sebor <msebor@redhat.com>
2955
2956 PR target/88638
2957 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2958 and issue errors if it fails.
2959 * c-common.h (valid_format_string_type_p): Declare.
2960 * c-format.c (valid_stringptr_type_p): Rename...
2961 (valid_format_string_type_p): ...to this and make extern.
2962 (handle_format_arg_attribute): Adjust to new name.
2963 (check_format_string): Same.
2964
2965 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2966
2967 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2968 Replace "may may" with "may" in warning message.
2969
2970 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2971
2972 PR c++/85052
2973 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2974 (c_build_vec_convert): Declare.
2975 * c-common.c (c_build_vec_convert): New function.
2976
2977 2019-01-04 Martin Sebor <msebor@redhat.com>
2978
2979 PR c/88546
2980 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2981 Handle C++ empty throw specification and C11 _Noreturn.
2982 (has_attribute): Also handle C11 _Noreturn.
2983
2984 2019-01-04 Martin Sebor <msebor@redhat.com>
2985
2986 PR c/88363
2987 * c-attribs.c (positional_argument): Also accept enumerated types.
2988
2989 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2990
2991 Update copyright years.
2992
2993 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2994
2995 PR c/51628
2996 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2997 * c-warn.c (check_alignment_of_packed_member): New function.
2998 (check_address_of_packed_member): Likewise.
2999 (check_and_warn_address_of_packed_member): Likewise.
3000 (warn_for_address_or_pointer_of_packed_member): Likewise.
3001 * c.opt: Add -Wno-address-of-packed-member.
3002
3003 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3004
3005 PR c++/87504
3006 * c-warn.c (get_outermost_macro_expansion): New function.
3007 (spelled_the_same_p): Use it to unwind the macro expansions, and
3008 compare the outermost macro in each nested expansion, rather than
3009 the innermost.
3010
3011 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3012
3013 PR c++/87504
3014 * c-common.h (warn_tautological_cmp): Convert 1st param from
3015 location_t to const op_location_t &.
3016 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3017 when testing for INTEGER_CST.
3018 (warn_tautological_bitwise_comparison): Convert 1st param from
3019 location_t to const op_location_t &; use it to build a
3020 binary_op_rich_location, and use this.
3021 (spelled_the_same_p): New function.
3022 (warn_tautological_cmp): Convert 1st param from location_t to
3023 const op_location_t &. Warn for macro expansions if
3024 spelled_the_same_p. Use binary_op_rich_location.
3025
3026 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3027
3028 PR c++/43064
3029 PR c++/43486
3030 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3031 (verify_tree): Handle location wrappers.
3032 (c_common_truthvalue_conversion): Strip any location wrapper.
3033 Handle CONST_DECL.
3034 (fold_offsetof): Strip any location wrapper.
3035 (complete_array_type): Likewise for initial_value.
3036 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3037 index before checking for INTEGER_CST.
3038 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3039 print parentheses around location wrappers.
3040 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3041 before checking for INTEGER_CST.
3042 (warn_tautological_bitwise_comparison): Call
3043 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3044 before checking for INTEGER_CST.
3045 (readonly_error): Strip any location wrapper.
3046 (warn_array_subscript_with_type_char): Strip location wrappers
3047 before checking for INTEGER_CST. Use the location of the index if
3048 available.
3049
3050 2018-12-06 Jason Merrill <jason@redhat.com>
3051
3052 PR c++/88136 - -Wdeprecated-copy false positives
3053 * c.opt (Wdeprecated-copy-dtor): New.
3054 (Wdeprecated-copy): Move to -Wextra.
3055
3056 2018-11-29 Martin Sebor <msebor@redhat.com>
3057
3058 PR c/88172
3059 PR testsuite/88208
3060 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3061 alignments to values less than the target requires.
3062 (has_attribute): For attribute aligned consider both the attribute
3063 and the alignment bits.
3064 * c-common.c (c_init_attributes): Optionally issue a warning for
3065 zero alignment.
3066
3067 2018-11-28 Martin Sebor <msebor@redhat.com>
3068
3069 PR c/88065
3070 PR c/87297
3071 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3072 or destination is an error.
3073
3074 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3075
3076 PR c++/88215
3077 * c-ubsan.c: Include langhooks.h.
3078 (ubsan_instrument_division): Change gcc_assert that main variants
3079 of op0 and op1 types are equal to gcc_checking_assert that the
3080 main variants are compatible types.
3081
3082 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3083
3084 * c-ada-spec.c: Include stringpool.h.
3085 (has_static_fields): Return false for incomplete types.
3086 (is_tagged_type): Likewise.
3087 (has_nontrivial_methods): Likewise.
3088 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3089 (struct overloaded_name_hash): New structure.
3090 (struct overloaded_name_hasher): Likewise.
3091 (overloaded_names): New global variable.
3092 (init_overloaded_names): New static function.
3093 (overloaded_name_p): New predicate.
3094 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3095 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3096 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3097 Remove always-true condition and dump forward types.
3098 (dump_ada_specs): Delete overloaded_names.
3099
3100 2018-11-20 Martin Sebor <msebor@redhat.com>
3101
3102 * c-attribs.c (type_for_vector_size): New function.
3103 (type_valid_for_vector_size): Same.
3104 (handle_vector_size_attribute): Move code to the functions above
3105 and call them.
3106 (validate_attribute, has_attribute): New functions.
3107 * c-common.h (has_attribute): Declare.
3108 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3109 * c-common.c (c_common_resword): Same.
3110
3111 2018-11-16 Jason Merrill <jason@redhat.com>
3112
3113 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3114 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3115
3116 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3117
3118 PR middle-end/87854
3119 * c-common.c (fix_string_type): Reject string literals larger than
3120 TYPE_MAX_VALUE (ssizetype) bytes.
3121
3122 2018-11-15 Martin Sebor <msebor@redhat.com>
3123
3124 PR c++/87541
3125 PR c++/87542
3126 * c-attribs.c (positional_argument): New function.
3127 (handle_alloc_size_attribute): Use it and simplify.
3128 (handle_alloc_align_attribute): Same.
3129 (handle_assume_aligned_attribute): Same.
3130 (handle_nonnull_attribute): Same.
3131 * c-common.c (check_function_arguments): Pass fntype to
3132 check_function_format.
3133 * c-common.h (check_function_format): Add an argument.
3134 (PosArgFlags, positional_argument): Declare new type and function.
3135 * c-format.c (decode_format_attr): Add arguments.
3136 (check_format_string, get_constant): Same.
3137 (convert_format_name_to_system_name): Adjust.
3138
3139 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3140
3141 PR other/19165
3142 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3143
3144 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3145
3146 P1236R1 - Signed integers are two's complement
3147 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3148 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3149 with in-range second operand well defined for -std=c++2a.
3150
3151 PR other/88007
3152 * c-common.c (parse_optimize_options): Allocate option string from
3153 opts_obstack rather than as GC memory. Move the allocation after
3154 warning for invalid option.
3155
3156 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3157
3158 * c-common.c (c_get_substring_location): Update for renaming of
3159 get_source_location_for_substring to get_location_within_string.
3160 * c-lex.c: Replace "source_location" with "location_t".
3161 * c-opts.c: Likewise.
3162 * c-ppoutput.c: Likewise.
3163
3164 2018-11-13 Martin Sebor <msebor@redhat.com>
3165
3166 PR middle-end/81824
3167 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3168 (handle_tls_model_attribute): Improve diagnostics.
3169
3170 2018-11-12 Jason Merrill <jason@redhat.com>
3171
3172 * c-cppbuiltin.c (c_cpp_builtins): Define
3173 __cpp_impl_destroying_delete.
3174
3175 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3176 __cpp_conditional_explicit.
3177
3178 2018-11-09 Martin Sebor <msebor@redhat.com>
3179
3180 PR middle-end/81824
3181 * c-attribs.c (handle_copy_attribute): New function.
3182
3183 2018-11-09 Martin Sebor <msebor@redhat.com>
3184
3185 PR c/87795
3186 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3187
3188 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3189
3190 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3191 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3192 enum omp_memory_order MEMORY_ORDER.
3193 (c_finish_omp_flush): Add MO argument.
3194 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3195 (c_finish_omp_for): Add FINAL_P argument.
3196 * c-omp.c: Include memmodel.h.
3197 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3198 OMP_TASKGROUP_CLAUSES to it.
3199 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3200 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3201 instead of OMP_ATOMIC_SEQ_CST.
3202 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3203 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3204 __atomic_thread_fence call with the given value.
3205 (check_omp_for_incr_expr): Formatting fixes.
3206 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3207 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3208 is not constant expression 1 or -1. Transform NE_EXPR loops
3209 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3210 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3211 loops too.
3212 (c_omp_split_clauses): Add support for combined
3213 #pragma omp parallel master and
3214 #pragma omp {,parallel }master taskloop{, simd} constructs.
3215 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3216 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3217 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3218 (c_omp_predetermined_sharing): Don't return
3219 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3220 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3221 PRAGMA_OMP_REQUIRES.
3222 * c-pragma.h (enum pragma_kind): Likewise.
3223 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3224 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3225
3226 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3227
3228 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3229
3230 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3231
3232 * c-format.c (local_cgraph_node_ptr_node): New variable.
3233 (gcc_dump_printf_char_table): Add entry for %C.
3234 (get_pointer_to_named_type): New function, taken from the handling
3235 code for "gimple *" from...
3236 (init_dynamic_diag_info): ...here. Add handling for
3237 "cgraph_node *".
3238 * c-format.h (T_CGRAPH_NODE): New.
3239
3240 2018-10-19 Jason Merrill <jason@redhat.com>
3241
3242 * c-cppbuiltin.c (c_cpp_builtins): Add
3243 __cpp_nontype_template_parameter_class.
3244
3245 2018-10-31 Nathan Sidwell <nathan@acm.org>
3246
3247 * c-opts.c (c_finish_options): Force command line macro
3248 location. Refactor to avoid repeating main debug hook.
3249 (push_command_line_include): Clarify comment.
3250
3251 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3252
3253 2018-10-30 Martin Sebor <msebor@redhat.com>
3254
3255 PR middle-end/87041
3256 * c-format.c (check_format_types): Avoid diagnosing null pointer
3257 arguments to printf-family of functions.
3258
3259 2018-10-30 Marek Polacek <polacek@redhat.com>
3260
3261 Implement P0892R2, explicit(bool).
3262 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3263
3264 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3265
3266 * name-hint.h (name_hint::take_deferred): New member function.
3267
3268 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3269
3270 PR c++/56856
3271 * c-common.c (check_function_sentinel): Call fold_for_warn on the
3272 argument.
3273 (check_function_restrict): Rename param "argarray" to
3274 "unfolded_argarray", and make a copy named "argarray", calling
3275 fold_for_warn on each argument.
3276 (check_function_arguments): Add note about responsibility for
3277 folding the arguments.
3278
3279 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3280
3281 * c-common.c (flag_isoc2x): New variable.
3282 * c-common.h (clk_c): Update comment to reference C2X.
3283 (flag_isoc99, flag_isoc11): Update comments to reference future
3284 standard versions in general.
3285 (flag_isoc2x): Declare.
3286 * c-opts.c (set_std_c2x): New function.
3287 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3288 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3289 flag_isoc2x to 0.
3290 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3291
3292 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3293
3294 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3295 (std=iso9899:2018): Document C17 as published in 2018.
3296
3297 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
3298
3299 PR c++/87364
3300 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3301
3302 2018-10-11 Will Wray <wjwray@gmail.com>
3303
3304 PR c++/87364
3305 * c-pretty-print.h (pp_c_type_cast): Prototype.
3306 (pp_c_integer_constant): Likewise.
3307 * c-pretty-print.c (pp_c_type_cast): No longer static.
3308 (pp_c_integer_constant): Likewise.
3309 (pp_c_enumeration_constant): Fix loop termination when finding
3310 name of constant. No longer returns a value. Call
3311 pp_c_integer_constant.
3312 (c_pretty_printer::constant): Update for changes to
3313 pp_c_enumeration_constant.
3314
3315 2018-10-11 Jakub Jelinek <jakub@redhat.com>
3316
3317 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3318 for no_unique_address.
3319
3320 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3321
3322 * c-common.c (c_option_controlling_cpp_error): Rename to...
3323 (c_option_controlling_cpp_diagnostic): ...this, and convert
3324 "reason" from int to enum.
3325 (c_cpp_error): Rename to...
3326 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3327 * c-common.h (c_cpp_error): Rename to...
3328 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3329 * c-opts.c (c_common_init_options): Update for renaming.
3330
3331 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3332
3333 PR c/87286
3334 * c-common.c (vector_types_compatible_elements_p): Use
3335 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3336
3337 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3338
3339 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3340 to generate constructor destructor priority warning.
3341 * c.opt (-Wprio-ctor-dtor): New option.
3342
3343 2018-10-01 Jason Merrill <jason@redhat.com>
3344
3345 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3346
3347 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3348
3349 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3350 (dump_ada_node): Add const keyword.
3351
3352 2018-09-25 Martin Liska <mliska@suse.cz>
3353
3354 * c-common.c (c_common_truthvalue_conversion):
3355 Remove Pascal from documentation.
3356
3357 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3358
3359 * c-ada-spec.c: Include diagnostic.h.
3360 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3361
3362 2018-09-19 Marek Polacek <polacek@redhat.com>
3363
3364 * c.opt (Wclass-conversion): New.
3365
3366 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3367
3368 * c-format.c (range_label_for_format_type_mismatch::get_text):
3369 Update for new param.
3370
3371 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3372
3373 * c-format.c (format_warning_at_char): Update for introduction of
3374 format_string_diagnostic_t.
3375 (format_type_warning): Likewise.
3376
3377 2018-09-17 Martin Jambor <mjambor@suse.cz>
3378
3379 PR c/63886
3380 * c.opt (Wabsolute-value): New.
3381
3382 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3383
3384 * c-common.c (complete_flexible_array_elts): New helper function.
3385 * c-common.h (complete_flexible_array_elts): Declare.
3386
3387 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3388
3389 * c-common.c (braced_list_to_string): Remove eval parameter.
3390 Add some more checks. Always create zero-terminated STRING_CST.
3391 * c-common.h (braced_list_to_string): Adjust prototype.
3392
3393 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3394
3395 PR 87091
3396 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3397 to a tri-state.
3398 (maybe_suggest_missing_token_insertion): Likewise.
3399 (maybe_add_include_fixit): Add param "override_location". If set,
3400 and source-printing is enabled, then override the rich_location's
3401 primary location with that of the insertion point for the fix-it
3402 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3403 * c-common.h (extern void maybe_add_include_fixit): Add bool
3404 param.
3405 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3406 for conversion of show_caret_p to a tri-state.
3407 * c-warn.c (warn_for_restrict): Likewise.
3408 * known-headers.cc
3409 (suggest_missing_header::~suggest_missing_header): Update call to
3410 maybe_add_include_fixit to suggest overriding the location, as it
3411 is for a note.
3412
3413 2018-08-27 Martin Liska <mliska@suse.cz>
3414
3415 * c-common.c (check_function_restrict): Use new function
3416 fndecl_built_in_p and remove check for FUNCTION_DECL if
3417 possible.
3418 (check_builtin_function_arguments): Likewise.
3419 (reject_gcc_builtin): Likewise.
3420 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3421
3422 2018-08-26 Marek Polacek <polacek@redhat.com>
3423
3424 PR c++/87029, Implement -Wredundant-move.
3425 * c.opt (Wredundant-move): New option.
3426
3427 2018-08-21 Marek Polacek <polacek@redhat.com>
3428
3429 PR c++/86981, Implement -Wpessimizing-move.
3430 * c.opt (Wpessimizing-move): New option.
3431
3432 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3433
3434 PR other/84889
3435 * c-attribs.c (common_handle_aligned_attribute): Add
3436 auto_diagnostic_group instance.
3437 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3438 * c-opts.c (c_common_post_options): Likewise.
3439 * c-warn.c (warn_logical_not_parentheses): Likewise.
3440 (warn_duplicated_cond_add_or_warn): Likewise.
3441 (warn_for_multistatement_macros): Likewise.
3442
3443 2018-08-20 Nathan Sidwell <nathan@acm.org>
3444
3445 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3446 access.
3447
3448 2018-08-17 Nathan Sidwell <nathan@acm.org>
3449
3450 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3451 field.
3452 (laxy_hex_fp_value_count): Make unsigned.
3453 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3454 manipulate the macro.
3455 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3456 cpp_define_lazily.
3457
3458 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3459
3460 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3461 (gcc_dump_printf_length_specs): New.
3462 (gcc_dump_printf_flag_pairs): New.
3463 (gcc_dump_printf_flag_specs): New.
3464 (gcc_dump_printf_char_table): New.
3465 (format_types_orig): Add entry for "gcc_dump_printf".
3466 (init_dynamic_diag_info): Set up length_char_specs and
3467 conversion_specs for gcc_dump_printf_format_type.
3468 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3469
3470 2018-08-17 Nathan Sidwell <nathan@acm.org>
3471
3472 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3473
3474 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3475 * c-cppbuiltin.c: Likewise.
3476
3477 2018-08-17 Martin Liska <mliska@suse.cz>
3478
3479 * c.opt: Remove Warn, Init and Report for options with
3480 Ignore/Deprecated flag. Warning is done automatically for
3481 Deprecated flags.
3482
3483 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3484
3485 PR c++/70693
3486 * c-common.c (selftest::c_family_tests): Call
3487 selftest::c_indentation_c_tests.
3488 * c-common.h (selftest::c_indentation_c_tests): New decl.
3489 * c-indentation.c: Include "selftest.h".
3490 (next_tab_stop): Add "tab_width" param, rather than accessing
3491 cpp_opts.
3492 (get_visual_column): Likewise. Clarify comment. Bulletproof
3493 against reading past the end of the line.
3494 (get_first_nws_vis_column): Add "tab_width" param.
3495 (detect_intervening_unindent): Likewise.
3496 (should_warn_for_misleading_indentation): Read tab width from
3497 cpp_opts and pass around.
3498 (selftest::test_next_tab_stop): New test.
3499 (selftest::assert_get_visual_column_succeeds): New function.
3500 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3501 (selftest::assert_get_visual_column_fails): New function.
3502 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3503 (selftest::test_get_visual_column): New test.
3504 (selftest::c_indentation_c_tests): New function.
3505
3506 2018-08-16 Nathan Sidwell <nathan@acm.org>
3507
3508 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3509 (store_ada_macro): Likewise.
3510 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3511 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3512
3513 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3514
3515 * c-format.c: Include "selftest-diagnostic.h" and
3516 "gcc-rich-location.h".
3517 (format_warning_at_char): Pass NULL for new label params of
3518 format_warning_va.
3519 (class indirection_suffix): New class.
3520 (class range_label_for_format_type_mismatch): New class.
3521 (format_type_warning): Move logic for generating "*" suffix to
3522 class indirection_suffix. Create "fmt_label" and "param_label"
3523 to show their types, and pass them to the
3524 format_warning_at_substring calls.
3525 (selftest::test_type_mismatch_range_labels): New test.
3526 (selftest::c_format_c_tests): Call it.
3527
3528 2018-08-13 Martin Sebor <msebor@redhat.com>
3529
3530 PR tree-optimization/71625
3531 * c-common.c (braced_list_to_string): New function.
3532 * c-common.h (braced_list_to_string): Declare it.
3533
3534 2018-08-08 Nathan Sidwell <nathan@acm.org>
3535
3536 * c-common.c (try_to_locate_new_include_inertion_point): Use
3537 linemap_included_from_linemap.
3538 * c-lex.c (fe_file_change): Use linemap_included_from.
3539 * c-ppoutput.c (pp_file_change): Likewise.
3540
3541 2018-08-01 Martin Sebor <msebor@redhat.com>
3542
3543 PR tree-optimization/86650
3544 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3545 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3546 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3547 * c-format.h (T89_G): Update to be "gimple *" rather than
3548 "gcall *".
3549 (local_gcall_ptr_node): Rename...
3550 (local_gimple_ptr_node): ...to this.
3551
3552 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3553
3554 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3555 table entries for gcc_diag_char_table, and the 'Z' entry from
3556 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3557 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3558 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3559 adding missing "Z" for this table. Remove erroneous "G" and "K"
3560 entries.
3561 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3562 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3563 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3564
3565 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3566
3567 * c-common.c (speculation_safe_resolve_call): New function.
3568 (speculation_safe_resolve_params): New function.
3569 (speculation_safe_resolve_return): New function.
3570 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3571 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3572 __HAVE_SPECULATION_SAFE_VALUE.
3573
3574 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3575
3576 * c-common.c (c_cpp_error): Remove redundant "line_table"
3577 parameter from call to rich_location::set_range.
3578 (maybe_suggest_missing_token_insertion): Likewise.
3579
3580 2018-07-20 Martin Sebor <msebor@redhat.com>
3581
3582 PR middle-end/82063
3583 * c.opt (-Warray-bounds): Remove redundant -Wall.
3584
3585 2018-07-20 Martin Sebor <msebor@redhat.com>
3586
3587 PR middle-end/82063
3588 * c-common.h (c_common_handle_option): Change function argument
3589 to HOST_WIDE_INT.
3590 * c-opts.c (c_common_init_options): Same.
3591 (c_common_handle_option): Same. Remove special handling of
3592 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3593 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3594 options to take a HOST_WIDE_INT argument and accept a byte-size
3595 suffix. Initialize.
3596 (-Wvla-larger-than): Same.
3597 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3598 (-Wno-vla-larger-than): Same.
3599
3600 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3601
3602 * c-attribs.c (c_common_attribute_table): Add
3603 "omp declare target implicit" attribute.
3604
3605 2018-07-12 Richard Biener <rguenther@suse.de>
3606
3607 PR c/86453
3608 * c-attribs.c (handle_packed_attribute): Do not build a variant
3609 type with TYPE_PACKED, instead ignore the attribute if we may
3610 not apply to the original type.
3611
3612 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3613
3614 PR c++/86443
3615 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3616 to contain TREE_LIST for both the original class iterator and the
3617 "last" helper var.
3618
3619 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3620
3621 * c-ada-spec.c (to_ada_name): Remove index parameter.
3622 (pp_ada_tree_identifier): Likewise.
3623 (dump_ada_macros): Adjust call to to_ada_name.
3624 (struct overloaded_name_hash): Delete.
3625 (struct overloaded_name_hasher): Likewise.
3626 (overloaded_names): Likewise.
3627 (compute_overloading_index): Likewise.
3628 (dump_ada_decl_name): Do not call compute_overloading_index and
3629 adjust calls to pp_ada_tree_identifier.
3630 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3631 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3632 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3633 (dump_ada_enum_type): Remove type and display_convention parameters.
3634 Adjust calls to pp_ada_tree_identifier.
3635 (dump_ada_node): Likewise and for dump_ada_structure.
3636 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3637 and tidy up.
3638 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3639 syntax.
3640 (print_constructor): Adjust call to pp_ada_tree_identifier.
3641 (print_destructor): Likewise.
3642 (dump_ada_declaration): Switch to aspect syntax.
3643 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3644 parameter with nested parameter.
3645 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3646 (dump_ada_specs): Do not delete overloaded_names table.
3647
3648 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3649
3650 PR target/86324
3651 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
3652 target hook.
3653
3654 2018-07-05 Nathan Sidwell <nathan@acm.org>
3655
3656 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3657 NO_IMPLICIT_EXTERN_C.
3658
3659 2018-06-28 Martin Liska <mliska@suse.cz>
3660
3661 * cppspec.c: Include opt-suggestions.h.
3662
3663 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3664 Thomas Schwinge <thomas@codesourcery.com>
3665 Cesar Philippidis <cesar@codesourcery.com>
3666
3667 * c-pragma.h (enum pragma_omp_clause): Add
3668 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3669 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3670
3671 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3672
3673 PR c++/86210
3674 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3675 comment.
3676
3677 2018-06-18 Martin Sebor <msebor@redhat.com>
3678
3679 PR middle-end/85602
3680 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3681 nonstring.
3682
3683 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3684
3685 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3686
3687 2018-06-13 Jason Merrill <jason@redhat.com>
3688
3689 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3690 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3691 handling.
3692
3693 PR c++/86094 - wrong code with defaulted move ctor.
3694 * c-opts.c (c_common_post_options): Bump the current ABI version to
3695 13. Set warn_abi_version and flag_abi_compat_version to the current
3696 version rather than 0. Fix defaulting flag_abi_compat_version from
3697 warn_abi_version.
3698
3699 2018-06-12 Martin Sebor <msebor@redhat.com>
3700
3701 PR c/85931
3702 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3703 sizeof source and destination yields the same value.
3704
3705 2018-06-12 Martin Liska <mliska@suse.cz>
3706
3707 * c.opt: Make MPX-related options as Deprecated.
3708
3709 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3710
3711 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3712 rather than 0.
3713
3714 2018-06-08 Martin Liska <mliska@suse.cz>
3715
3716 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3717 for MPX (macros, related functions, fields in cgraph_node, ...).
3718 (handle_bnd_legacy): Likewise.
3719 (handle_bnd_instrument): Likewise.
3720 * c.opt: Likewise.
3721
3722 2018-06-06 Jakub Jelinek <jakub@redhat.com>
3723
3724 PR c++/86068
3725 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3726 __cpp_transactional_memory to 201500 instead of 210500.
3727
3728 2018-06-06 Jason Merrill <jason@redhat.com>
3729
3730 PR c++/85710 - ICE with -Wmemset-elt-size.
3731 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3732
3733 2018-06-01 Jason Merrill <jason@redhat.com>
3734
3735 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3736 201703.
3737
3738 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3739
3740 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3741 declaration for a typedef independently of whether the declaration of
3742 the subtype is generated.
3743
3744 2018-05-31 Martin Sebor <msebor@redhat.com>
3745
3746 PR c/82063
3747 * c.opt (-Wno-alloc-size-larger-than): New option.
3748
3749 2018-04-22 David Pagan <dave.pagan@oracle.com>
3750
3751 PR c/55976
3752 * c-opts.c (c_common_post_options): Set default for warn_return_type
3753 for C++/C++ with ObjC extensions only. For C, makes it possible to
3754 differentiate between default (no option), -Wreturn-type, and
3755 -Wno-return-type.
3756
3757 2018-05-29 Jason Merrill <jason@redhat.com>
3758
3759 * c.opt (Winit-list-lifetime): New flag.
3760
3761 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3762
3763 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3764 splay_tree_delete_pointers.
3765
3766 2018-05-26 Jakub Jelinek <jakub@redhat.com>
3767
3768 PR bootstrap/85921
3769 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3770 noinline variable to workaround broken kernel headers.
3771
3772 2018-05-18 Jason Merrill <jason@redhat.com>
3773
3774 * c.opt (Wdeprecated-copy): New flag.
3775
3776 2018-05-17 Martin Liska <mliska@suse.cz>
3777
3778 * c-warn.c (overflow_warning): Do not use
3779 space in between 'G_' and '('.
3780
3781 2018-05-09 Jason Merrill <jason@redhat.com>
3782
3783 * c-common.c (valid_array_size_p): Add complain parameter.
3784 * c-common.h: ...which defaults to true.
3785
3786 2018-05-11 Jakub Jelinek <jakub@redhat.com>
3787
3788 PR c/85696
3789 * c-omp.c (c_omp_predetermined_sharing): Return
3790 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3791
3792 2018-05-11 Martin Liska <mliska@suse.cz>
3793
3794 PR sanitizer/85556
3795 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3796 TREE_LIST values.
3797
3798 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3799
3800 PR c++/85662
3801 * c-common.h (fold_offsetof_1): Removed.
3802 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3803 CTX argument defaulted to ERROR_MARK.
3804 * c-common.c (fold_offsetof_1): Renamed to ...
3805 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3806 argument, convert the pointer constant to TYPE and use size_binop
3807 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3808 a pointer type. Adjust recursive calls.
3809
3810 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3811
3812 PR c++/85400
3813 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3814
3815 2018-05-07 Nathan Sidwell <nathan@acm.org>
3816
3817 * c.opt (ffor-scope): Remove functionality, issue warning.
3818
3819 2018-05-03 Nathan Sidwell <nathan@acm.org>
3820
3821 * c.opt (ffriend-injection): Remove functionality, issue warning.
3822
3823 2018-05-01 David Malcolm <dmalcolm@redhat.com>
3824
3825 PR c/84258
3826 * c-format.c (struct format_check_results): Add field
3827 "number_non_char".
3828 (check_format_info): Initialize it, and warn if encountered.
3829 (check_format_arg): Distinguish between wide char and
3830 everything else when detecting arrays of non-char.
3831
3832 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3833
3834 * c-format.c (get_corrected_substring): Update for
3835 location_get_source_line returning a char_span. Use a char_span
3836 when handling the prefix of the correction.
3837 * c-indentation.c (get_visual_column): Update for
3838 location_get_source_line returning a char_span.
3839 (get_first_nws_vis_column): Likewise.
3840
3841 2018-03-29 David Malcolm <dmalcolm@redhat.com>
3842
3843 PR c++/84269
3844 * known-headers.cc (get_stdlib_header_for_name): Add various names
3845 from <assert.h>, <string.h>, and <memory.h>; add more names from
3846 <stdio.h>.
3847
3848 2018-03-27 Jakub Jelinek <jakub@redhat.com>
3849
3850 PR c++/85061
3851 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3852 get_base_address of the second operand is a VAR_P, rather than the
3853 operand itself, and use gcc_checking_assert instead of gcc_assert.
3854
3855 2018-03-23 Marek Polacek <polacek@redhat.com>
3856
3857 PR c++/85045
3858 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3859 <case RDIV_EXPR>: Tweak condition.
3860
3861 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3862
3863 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3864
3865 2018-03-16 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR c/84909
3868 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3869 diagnostics.
3870
3871 PR c/84910
3872 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3873 diagnostics.
3874
3875 2018-03-16 Richard Biener <rguenther@suse.de>
3876
3877 PR c/84873
3878 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3879 unshare the possibly folded expression.
3880
3881 2018-03-15 Richard Biener <rguenther@suse.de>
3882
3883 PR c/84873
3884 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3885
3886 2018-03-13 Martin Sebor <msebor@redhat.com>
3887
3888 PR tree-optimization/84725
3889 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3890 with all three narrow character types, including their qualified forms.
3891
3892 2018-03-12 Martin Sebor <msebor@redhat.com>
3893
3894 PR tree-optimization/83456
3895 * c-common.c (check_function_restrict): Return bool.
3896 Restore checking of bounded built-in functions.
3897 (check_function_arguments): Also return the result
3898 of warn_for_restrict.
3899 * c-common.c (check_function_restrict): Return bool.
3900 * c-warn.c (warn_for_restrict): Return bool.
3901
3902 2018-03-02 Marek Polacek <polacek@redhat.com>
3903
3904 PR c++/84171
3905 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3906 is erroneous.
3907
3908 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3909
3910 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3911 function".
3912
3913 2018-03-01 Marek Polacek <polacek@redhat.com>
3914
3915 PR c++/84639
3916 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3917 alignment in computation.
3918
3919 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3920
3921 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3922 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3923
3924 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3925
3926 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3927 (is_char_array): Take a type instead of a declaration.
3928 (dump_ada_array_type): Likewise.
3929 (is_simple_enum): Minor tweak.
3930 (dump_ada_enum_type): New function extracted from...
3931 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3932 <INTEGER_TYPE>: Remove unreachable code.
3933 <RECORD_TYPE>: Likewise. Minor tweaks.
3934 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3935 <ENUMERAL_TYPE>: New case.
3936 <RECORD_TYPE>: Factor out common code.
3937 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3938 Minor tweaks. Deal with enumeral types.
3939 (dump_ada_structure): Minor tweaks.
3940
3941 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3942
3943 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3944 address for incomplete structures.
3945 (dump_forward_type): Do not bail out for incomplete structures.
3946 (dump_ada_declaration): Do not special-case incomplete structures
3947 for subtypes. Dump them as null records for types.
3948
3949 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3950
3951 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3952 (is_char_array): Fix formatting.
3953 (dump_template_types): Likewise.
3954 (dump_generic_ada_node): Rename into...
3955 (dump_ada_node): ...this.
3956 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3957 incomplete structures and not for empty structures. Do not use it
3958 when forward declarations are needed.
3959 (dump_forward_type): New function.
3960 (dump_nested_types): Remove FORWARD parameter. Do not consider
3961 TREE_VISITED and do not generate a forward declaration. Only dump
3962 original nested types for nested declaration.
3963 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3964 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3965 <RECORD_TYPE>: Do not consider TREE_VISITED.
3966 (dump_ada_declaration): Use booleans and fix formatting throughout.
3967 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3968 Call dump_forward_type instead of dump_nested_types for a typedef.
3969 Remove superfluous check and adjust call to dump_nested_types.
3970 <POINTER_TYPE>: Call dump_forward_type and fall through.
3971 (dump_ada_struct_decl): Rename into...
3972 (dump_ada_structure): ...this. Do not special-case empty structures.
3973
3974 2018-02-27 Martin Sebor <msebor@redhat.com>
3975
3976 PR c++/83871
3977 * c.opt (-Wmissing-attributes): New option.
3978
3979 2018-02-21 Martin Liska <mliska@suse.cz>
3980
3981 * c.opt (Wcatch-value=): Add IntegerRange.
3982
3983 2018-02-15 Jason Merrill <jason@redhat.com>
3984
3985 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3986
3987 2018-02-09 Nathan Sidwell <nathan@acm.org>
3988
3989 PR c/84293
3990 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3991 arg.
3992 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3993 arg. Adjust.
3994
3995 2018-02-09 Martin Sebor <msebor@redhat.com>
3996
3997 PR lto/84212
3998 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3999 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4000 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4001 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4002 (-Wuninitialized): Same.
4003
4004 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4005
4006 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4007 keyword for components.
4008
4009 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4010
4011 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4012
4013 2018-02-02 Julia Koval <julia.koval@intel.com>
4014
4015 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4016
4017 2018-01-29 Marek Polacek <polacek@redhat.com>
4018
4019 PR c/83966
4020 * c-format.c (check_function_format): Check current_function_decl.
4021
4022 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4023
4024 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4025 argument.
4026 (LAZY_HEX_FP_VALUES_CNT): Define.
4027 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4028 values rather than just 12.
4029 (builtin_define_with_hex_fp_value): Likewise.
4030
4031 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4032
4033 PR other/70268
4034 * c.opt (-fmacro-prefix-map): New option.
4035 * c-opts.c (c_common_handle_option): Handle it.
4036 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4037 * c-ppoutput.c (init_pp_output): Likewise.
4038
4039 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4040
4041 PR c++/83814
4042 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4043
4044 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4045
4046 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4047 Skip 'f' and 'F' characters if it is true.
4048 (store_ada_macro): Minor tweak.
4049 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4050 <CPP_WSTRING>: Likewise.
4051 <CPP_STRING>: Output '&' in the buffer if not the first string.
4052 <CPP_NUMBER>: Adjust calls to dump_number.
4053
4054 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4055
4056 PR c++/43486
4057 * c-common.c: Include "selftest.h".
4058 (get_atomic_generic_size): Perform the test for integral type
4059 before the range test for any integer constant, fixing indentation
4060 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4061 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4062 (selftest::test_fold_for_warn): New function.
4063 (selftest::c_common_c_tests): New function.
4064 (selftest::c_family_tests): Call it, and
4065 selftest::c_pretty_print_c_tests.
4066 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4067 * c-format.c (check_format_arg): Convert VAR_P check to a
4068 fold_for_warn.
4069 * c-pretty-print.c: Include "selftest.h".
4070 (pp_c_cast_expression): Don't print casts for location wrappers.
4071 (selftest::assert_c_pretty_printer_output): New function.
4072 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4073 (selftest::test_location_wrappers): New function.
4074 (selftest::c_pretty_print_c_tests): New function.
4075 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4076
4077 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4078 Alan Hayward <alan.hayward@arm.com>
4079 David Sherwood <david.sherwood@arm.com>
4080
4081 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4082
4083 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4084 Alan Hayward <alan.hayward@arm.com>
4085 David Sherwood <david.sherwood@arm.com>
4086
4087 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4088 as polynomial.
4089
4090 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4091 Alan Hayward <alan.hayward@arm.com>
4092 David Sherwood <david.sherwood@arm.com>
4093
4094 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4095 (convert_vector_to_array_for_subscript): Handle polynomial
4096 TYPE_VECTOR_SUBPARTS.
4097 (c_common_type_for_mode): Check valid_vector_subparts_p.
4098 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4099 VECTOR_CST_NELTS.
4100
4101 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4102
4103 Update copyright years.
4104
4105 2017-12-22 Mike Stump <mikestump@comcast.net>
4106 Eric Botcazou <ebotcazou@adacore.com>
4107
4108 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4109 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4110
4111 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4112
4113 PR debug/83527
4114 PR debug/83419
4115 * c-semantics.c (only_debug_stmts_after_p): New.
4116 (pop_stmt_list): Clear side effects in debug-only stmt list.
4117 Check for single nondebug stmt followed by debug stmts only.
4118
4119 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4120
4121 PR debug/83419
4122 * c-semantics.c (pop_stmt_list): Propagate side effects from
4123 single nondebug stmt to container list.
4124
4125 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4126
4127 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4128 conditions with typical order conditions.
4129
4130 2017-12-18 Marek Polacek <polacek@redhat.com>
4131
4132 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4133 not in effect.
4134
4135 2017-12-17 Martin Sebor <msebor@redhat.com>
4136
4137 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4138 an error for attribute warn_if_not_aligned.
4139
4140 2017-12-16 Martin Sebor <msebor@redhat.com>
4141
4142 PR tree-optimization/78918
4143 * c-common.c (check_function_restrict): Avoid checking built-ins.
4144 * c.opt (-Wrestrict): Include in -Wall.
4145
4146 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4147
4148 * c-attribs.c (c_common_attribute_table,
4149 c_common_format_attribute_table): Swap affects_type_identity
4150 and handler fields, adjust comments.
4151
4152 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4153
4154 * c.opt (Wcast-function-type): New warning option.
4155 * c-lex.c (get_fileinfo): Avoid warning.
4156 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4157
4158 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4159
4160 PR middle_end/79538
4161 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4162 Adjust the size of buf1 and buf2, add a new buf to avoid
4163 format-overflow warning.
4164
4165 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4166
4167 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4168 subsequent statement list.
4169
4170 2017-12-07 Martin Sebor <msebor@redhat.com>
4171
4172 PR c/81544
4173 PR c/81566
4174 * c-attribs.c (attr_aligned_exclusions): New array.
4175 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4176 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4177 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4178 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4179 (attr_warn_unused_result_exclusions): Same.
4180 (handle_hot_attribute, handle_cold_attribute): Simplify.
4181 (handle_const_attribute): Warn on function returning void.
4182 (handle_pure_attribute): Same.
4183 (handle_aligned_attribute): Diagnose conflicting attribute
4184 specifications.
4185 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4186
4187 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4188
4189 PR c/83236
4190 * c-common.c (selftest::c_family_tests): Call
4191 selftest::c_spellcheck_cc_tests.
4192 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4193 * c-spellcheck.cc: Include "selftest.h".
4194 (name_reserved_for_implementation_p): New function.
4195 (should_suggest_as_macro_p): New function.
4196 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4197 should_suggest_as_macro_p and call it.
4198 (selftest::test_name_reserved_for_implementation_p): New function.
4199 (selftest::c_spellcheck_cc_tests): New function.
4200 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4201
4202 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4203
4204 * c-spellcheck.cc: New file, taken from macro-handling code in
4205 spellcheck-tree.c.
4206 * c-spellcheck.h: New file, taken from macro-handling code in
4207 spellcheck-tree.h.
4208
4209 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4210
4211 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4212 attribute.
4213 (handle_simd_attribute): Don't check for "cilk simd function"
4214 attribute. Reindent, formatting changes.
4215
4216 2017-11-30 Julia Koval <julia.koval@intel.com>
4217
4218 * c-common.h (inv_list): Remove.
4219
4220 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4221
4222 PR sanitizer/81275
4223 * c-common.c (c_switch_covers_all_cases_p_1,
4224 c_switch_covers_all_cases_p): New functions.
4225 * c-common.h (c_switch_covers_all_cases_p): Declare.
4226
4227 2017-11-28 Julia Koval <julia.koval@intel.com>
4228 Sebastian Peryt <sebastian.peryt@intel.com>
4229
4230 * array-notation-common.c: Delete.
4231 * c-cilkplus.c: Ditto.
4232 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4233 * c-common.def (ARRAY_NOTATION_REF): Remove.
4234 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4235 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4236 c_validate_cilk_plus_loop, cilkplus_an_parts,
4237 cilk_ignorable_spawn_rhs_op,
4238 cilk_recognize_spawn): Remove.
4239 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4240 * c-omp.c: Remove CILK_SIMD check.
4241 * c-pragma.c: Ditto.
4242 * c-pragma.h: Remove CILK related pragmas.
4243 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4244 ARRAY_NOTATION_REF condition.
4245 (c_pretty_printer::expression): Ditto.
4246 * c.opt (fcilkplus): Remove.
4247 * cilk.c: Delete.
4248
4249 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4250
4251 * c-pretty-print.c (pp_c_additive_expression,
4252 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4253
4254 2017-11-21 Jakub Jelinek <jakub@redhat.com>
4255
4256 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4257
4258 PR c++/83059
4259 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4260 instead of tree_to_uhwi, formatting fix.
4261
4262 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4263
4264 PR c/81404
4265 * known-headers.cc: New file, based on material from c/c-decl.c.
4266 (suggest_missing_header): Copied as-is.
4267 (get_stdlib_header_for_name): New, based on get_c_name_hint but
4268 heavily edited to add C++ support. Add some knowledge about
4269 <limits.h>, <stdint.h>, and <wchar.h>.
4270 * known-headers.h: Likewise.
4271
4272 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4273
4274 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4275 (lookup_name_fuzzy): Likewise. Convert return type from
4276 const char * to name_hint. Add location_t param.
4277 * name-hint.h: New header.
4278
4279 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4280
4281 PR c/66618
4282 PR c/69960
4283 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4284
4285 2017-11-16 Joseph Myers <joseph@codesourcery.com>
4286
4287 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4288 expected publication date of C17.
4289 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4290
4291 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4292
4293 PR c/81156
4294 * c-common.c (c_common_reswords): Add __builtin_tgmath.
4295 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4296
4297 2017-11-10 Martin Sebor <msebor@redhat.com>
4298
4299 PR c/81117
4300 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4301 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4302 * c.opt (-Wstringop-truncation): New option.
4303
4304 2017-11-06 Martin Liska <mliska@suse.cz>
4305
4306 PR middle-end/82404
4307 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4308 FE.
4309 * c.opt: Set default value of warn_return_type.
4310
4311 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4312
4313 * c-common.c (binary_op_error): Update for renaming of
4314 error_at_rich_loc.
4315 (c_parse_error): Likewise.
4316 * c-warn.c (warn_logical_not_parentheses): Likewise for
4317 renaming of inform_at_rich_loc.
4318 (warn_for_restrict): Likewise for renaming of
4319 warning_at_rich_loc_n.
4320
4321 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4322
4323 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4324 * c-opts.c (set_std_c17): New function.
4325 (c_common_init_options): Use gnu17 as default C version.
4326 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4327
4328 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4329
4330 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4331 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4332 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4333 __FP_FAST_FMA<N>X.
4334
4335 2017-10-23 Marek Polacek <polacek@redhat.com>
4336
4337 PR c/82681
4338 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4339
4340 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4341
4342 * c-common.c (check_builtin_function_arguments): Also check arguments
4343 of __builtin_alloca_with_align_and_max.
4344
4345 2017-10-17 David Malcolm <dmalcolm@redhat.com>
4346
4347 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4348 rather than NULL to format_warning_va.
4349 (check_format_types): Likewise when calling format_type_warning.
4350 Remove code to extract source_ranges and source_range * in favor
4351 of just a location_t.
4352 (format_type_warning): Convert source_range * param to a
4353 location_t.
4354
4355 2017-10-13 Jakub Jelinek <jakub@redhat.com>
4356
4357 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4358 [LR]SHIFT_EXPR.
4359
4360 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4361
4362 * c-common.c (enum missing_token_insertion_kind): New enum.
4363 (get_missing_token_insertion_kind): New function.
4364 (maybe_suggest_missing_token_insertion): New function.
4365 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4366
4367 2017-10-11 Nathan Sidwell <nathan@acm.org>
4368
4369 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4370 (c_common_handle_option): Update incpath_kind names.
4371
4372 2017-10-11 Martin Liska <mliska@suse.cz>
4373
4374 PR sanitizer/82490
4375 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4376 Wattributes warning.
4377
4378 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4379
4380 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4381 operating on trees as wide_ints.
4382 * c-common.c (pointer_int_sum): Likewise.
4383 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4384 * c-warn.c (match_case_to_enum_1): Likewise.
4385 (c_do_switch_warnings): Likewise.
4386 (maybe_warn_shift_overflow): Likewise.
4387
4388 2017-10-10 Jakub Jelinek <jakub@redhat.com>
4389
4390 PR c/82437
4391 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4392 instead of wide_int::from.
4393
4394 2017-10-06 Jakub Jelinek <jakub@redhat.com>
4395
4396 PR c/82437
4397 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4398 using to_widest use wide_int with the larger of the two precisions.
4399
4400 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4401
4402 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4403 functions.
4404
4405 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4406
4407 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4408 when combining the original unconverted comparison operands.
4409
4410 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4411
4412 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4413 attribute.
4414
4415 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4416
4417 * c-ada-spec.c (to_ada_name): Add index parameter.
4418 (pp_ada_tree_identifier): Likewise.
4419 (dump_ada_macros): Adjust call to to_ada_name.
4420 (struct overloaded_name_hash): New type.
4421 (struct overloaded_name_hasher): Likewise.
4422 (overloaded_names): New hash table.
4423 (compute_overloading_index): New function.
4424 (dump_ada_decl_name): Call it and pass the result to
4425 pp_ada_tree_identifier.
4426 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4427 (dump_ada_function_declaration): Likewise.
4428 (dump_generic_ada_node): Likewise.
4429 (print_constructor): Likewise.
4430 (print_destructor): Likewise.
4431 (dump_ada_specs): Delete overloaded_names table.
4432
4433 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4434
4435 * c-ada-spec.c (max_ada_macros): Move around.
4436 (store_ada_macro_index): Likewise.
4437 (source_file): Rename into...
4438 (macro_source_file): ...this.
4439 (count_ada_macro): Move around.
4440 (store_ada_macro): Likewise.
4441 (compare_macro): Likewise.
4442 (print_ada_macros): Merge in...
4443 (dump_ada_macros): ...this.
4444 (source_file_base): Rename into...
4445 (current_source_file): ...this.
4446 (print_comment): Move around.
4447 (dump_ada_nodes): Call dump_ada_declaration directly.
4448 (struct with): Change type of limited field to bool.
4449 (append_withs): Change type of limited_access parameter to bool.
4450 (pp_ada_tree_identifie): Likewise.
4451 (dump_ada_decl_nam): Likewise.
4452 (dump_generic_ada_node): Likewise. Do not print the return type.
4453 (to_ada_name): Change type of space_found parameter to bool.
4454 (dump_ada_function_declaration): Return void and change type of
4455 parameters to bool. Also print the return type for a function.
4456 (print_ada_methods): Rename into...
4457 (dump_ada_methods): ...this.
4458 (print_ada_declaration): Rename into ...
4459 (dump_ada_declaration): ...this. Do not print the return type.
4460 (print_ada_struct_decl): Rename into...
4461 (dump_ada_struct_decl): ...this.
4462
4463 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4464
4465 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4466 rather than DECL_INITIAL.
4467 (common_handle_aligned_attribute): Likewise.
4468
4469 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
4470
4471 * c.opt (gen-decls): Add RejectNegative.
4472
4473 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4474 Jakub Jelinek <jakub@redhat.com>
4475
4476 Add support for -std=c++2a.
4477 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4478 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4479 * c-opts.c (set_std_cxx2a): New.
4480 (c_common_handle_option): Set options when -std=c++2a is enabled.
4481 (c_common_post_options): Adjust comments.
4482 (set_std_cxx14, set_std_cxx17): Likewise.
4483
4484 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4485
4486 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4487 message for non-uniform endianness and issue a warning in C++.
4488
4489 2017-09-15 Jakub Jelinek <jakub@redhat.com>
4490
4491 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4492 (Wc++17-compat): Change from undocumented alias to option.
4493 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4494 change C++1z to C++17 in description.
4495 (std=c++1z, std=gnu++1z): Change from option to undocumented
4496 deprecated alias.
4497 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4498 Adjust description.
4499 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4500 * c-opts.c (set_std_cxx1z): Rename to ...
4501 (set_std_cxx17): ... this.
4502 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4503 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
4504 caller.
4505 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4506 comments.
4507
4508 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4509
4510 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4511 function alignment if warn_if_not_aligned_p is true.
4512
4513 2017-09-12 Nathan Sidwell <nathan@acm.org>
4514
4515 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4516 resort_sorted_fields): Move to c/c-decl.c.
4517 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4518 (struct sorted_fields_type): Move to c/c-lang.h.
4519
4520 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
4521
4522 PR c++/81852
4523 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4524
4525 2017-09-04 Marek Polacek <polacek@redhat.com>
4526
4527 PR c/81783
4528 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4529 (warn_tautological_cmp): Call it.
4530
4531 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
4532
4533 * c-opts.c (c_common_finish): Write dependency information even if
4534 there are errors.
4535
4536 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4537
4538 PR c/81887
4539 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4540 (omp_pragmas_simd): ... here.
4541 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4542 create new clauses list containing just simd clause.
4543
4544 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4545 Alan Hayward <alan.hayward@arm.com>
4546 David Sherwood <david.sherwood@arm.com>
4547
4548 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4549 into scalar_mode_supported_p call.
4550 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4551
4552 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4553 Alan Hayward <alan.hayward@arm.com>
4554 David Sherwood <david.sherwood@arm.com>
4555
4556 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4557 for the mode iterator.
4558
4559 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4560 Alan Hayward <alan.hayward@arm.com>
4561 David Sherwood <david.sherwood@arm.com>
4562
4563 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4564 * c-common.c (c_build_vec_perm_expr): Likewise.
4565
4566 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4567 Alan Hayward <alan.hayward@arm.com>
4568 David Sherwood <david.sherwood@arm.com>
4569
4570 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4571
4572 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4573 Alan Hayward <alan.hayward@arm.com>
4574 David Sherwood <david.sherwood@arm.com>
4575
4576 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4577 before calling targetm.addr_space.valid_pointer_mode.
4578
4579 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4580 Alan Hayward <alan.hayward@arm.com>
4581 David Sherwood <david.sherwood@arm.com>
4582
4583 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4584
4585 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4586 Alan Hayward <alan.hayward@arm.com>
4587 David Sherwood <david.sherwood@arm.com>
4588
4589 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4590 iterators.
4591 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4592
4593 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4594 Alan Hayward <alan.hayward@arm.com>
4595 David Sherwood <david.sherwood@arm.com>
4596
4597 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4598 case statements.
4599
4600 2017-08-29 Martin Liska <mliska@suse.cz>
4601
4602 PR other/39851
4603 * c-common.c (parse_optimize_options): Add argument to function
4604 call.
4605 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4606
4607 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4608
4609 * c-lex.c (interpret_float): Use token location
4610 when building an EXCESS_PRECISION_EXPR.
4611
4612 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4613
4614 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4615 it to check_function_format.
4616 * c-common.h (check_function_arguments): Add vec<location_t> *
4617 param.
4618 (check_function_format): Likewise.
4619 * c-format.c (struct format_check_context): Add field "arglocs".
4620 (check_function_format): Add param "arglocs"; pass it to
4621 check_format_info.
4622 (check_format_info): Add param "arglocs"; use it to initialize
4623 new field of format_ctx.
4624 (check_format_arg): Pass format_ctx->arglocs to new param of
4625 check_format_info_main.
4626 (class argument_parser): New field "arglocs".
4627 (argument_parser::argument_parser): Add "arglocs_" param and use
4628 it to initialize new field.
4629 (argument_parser::check_argument_type): Pass new arglocs field to
4630 check_format_types.
4631 (check_format_info_main): Add param "arglocs", and use it when
4632 constructing arg_parser.
4633 (check_format_types): Add param "arglocs"; use it if non-NULL when
4634 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4635
4636 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4637
4638 PR c/53037
4639 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4640 (c_common_attribute_table): Add warn_if_not_aligned.
4641 (handle_aligned_attribute): Renamed to ...
4642 (common_handle_aligned_attribute): Remove argument, name, and add
4643 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4644 (handle_aligned_attribute): New.
4645 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4646
4647 2017-08-14 Martin Sebor <msebor@redhat.com>
4648
4649 PR c/81117
4650 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4651 (handle_nonstring_attribute): New function.
4652
4653 2017-08-14 Martin Sebor <msebor@redhat.com>
4654
4655 PR c/81117
4656 * c-format.h (T89_G): New macro.
4657 * c-format.c (local_gcall_ptr_node): New variable.
4658 (init_dynamic_diag_info): Initialize it.
4659
4660 2017-08-11 Martin Liska <mliska@suse.cz>
4661
4662 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4663 TARGET_SUPPORTS_ALIASES.
4664
4665 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4666
4667 * c-common.c (c_parse_error): Add rich_location * param, using it
4668 rather implicitly using input_location.
4669 * c-common.h (c_parse_error): Add rich_location * param.
4670
4671 2017-08-09 Marek Polacek <polacek@redhat.com>
4672
4673 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4674 (c_common_truthvalue_conversion): Likewise.
4675 * c-omp.c (c_finish_omp_atomic): Likewise.
4676 * c-common.h (build_binary_op): Update declaration.
4677
4678 2017-08-08 Martin Liska <mliska@suse.cz>
4679
4680 * c-ada-spec.c: Include header files.
4681 * c-ubsan.c: Likewise.
4682 * c-warn.c: Likewise.
4683
4684 2017-08-07 Jakub Jelinek <jakub@redhat.com>
4685
4686 PR c/69389
4687 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4688
4689 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4690
4691 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4692 (print_ada_methods): Likewise.
4693 (print_ada_declaration): Likewise.
4694
4695 2017-08-07 Martin Liska <mliska@suse.cz>
4696
4697 * array-notation-common.c: Add new includes.
4698 * c-format.c( handle_format_attribute): Canonicalize a format
4699 function name.
4700 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4701 attribute.
4702 * c-pretty-print.c: Add new include.
4703
4704 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4705
4706 * c-ada-spec.c (has_static_fields): Look only into variables.
4707 (print_constructor): Add TYPE parameter and use it for the name.
4708 (print_destructor): Likewise.
4709 (print_ada_declaration): Adjust to new constructor/destructor names.
4710 Adjust calls to print_constructor and print_destructor.
4711 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4712 Look only into variables in the final loop.
4713
4714 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4715
4716 * c-ada-spec.c (has_static_fields): Look only into fields.
4717 (dump_generic_ada_node): Small tweak.
4718 (dump_nested_types): Look only into fields.
4719 (print_ada_declaration): Look only into methods. Small tweak.
4720 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4721
4722 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4723
4724 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4725 (dump_ada_function_declaration): Likewise.
4726 (dump_generic_ada_node): Likewise.
4727 (print_ada_declaration): Add support for const-qualified variables.
4728
4729 2017-07-31 Martin Liska <mliska@suse.cz>
4730
4731 PR sanitize/81530
4732 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4733 Guard condition with flag_sanitize_p also with current_function_decl
4734 non-null equality.
4735 (ubsan_maybe_instrument_reference_or_call): Likewise.
4736
4737 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
4738
4739 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4740
4741 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4742
4743 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4744 for enumeral types.
4745 (print_ada_declaration): Add missing guard for record types.
4746
4747 2017-07-27 Jakub Jelinek <jakub@redhat.com>
4748
4749 PR c/45784
4750 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4751 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4752 new COMPOUND_EXPRs around the rhs of the comparison.
4753
4754 2017-07-27 Marek Polacek <polacek@redhat.com>
4755
4756 PR c/81417
4757 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4758 the types.
4759
4760 2017-07-27 Jakub Jelinek <jakub@redhat.com>
4761
4762 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4763 (handle_noipa_attribute): New function.
4764
4765 2017-07-07 Torsten Duwe <duwe@suse.de>
4766
4767 * c-attribs.c (c_common_attribute_table): Add entry for
4768 "patchable_function_entry".
4769
4770 2017-07-20 Nathan Sidwell <nathan@acm.org>
4771
4772 Remove TYPE_METHODS.
4773 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4774 dump_ada_template, print_ada_methods,
4775 print_ada_declaration): Member fns are on TYPE_FIELDS.
4776
4777 2017-07-18 Nathan Sidwell <nathan@acm.org>
4778
4779 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4780
4781 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4782
4783 * c-common.c (try_to_locate_new_include_insertion_point): New
4784 function.
4785 (per_file_includes_t): New typedef.
4786 (added_includes_t): New typedef.
4787 (added_includes): New variable.
4788 (maybe_add_include_fixit): New function.
4789 * c-common.h (maybe_add_include_fixit): New decl.
4790
4791 2017-07-10 Martin Sebor <msebor@redhat.com>
4792
4793 PR other/81345
4794 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4795
4796 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4797
4798 * c-common.c (selftest::c_family_tests): New.
4799 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4800 (selftest::c_family_tests): New decl.
4801
4802 2017-07-04 Marek Polacek <polacek@redhat.com>
4803
4804 PR c/81231
4805 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4806 types.
4807
4808 2017-07-04 Marek Polacek <polacek@redhat.com>
4809
4810 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4811
4812 2017-06-28 Martin Liska <mliska@suse.cz>
4813
4814 PR ipa/81128
4815 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4816 to a function declaration.
4817
4818 2017-06-28 Martin Liska <mliska@suse.cz>
4819
4820 PR driver/79659
4821 * c.opt: Add IntegerRange to various options.
4822
4823 2017-06-26 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/80116
4826 * c-common.h (warn_for_multistatement_macros): Declare.
4827 * c-warn.c: Include "c-family/c-indentation.h".
4828 (warn_for_multistatement_macros): New function.
4829 * c.opt (Wmultistatement-macros): New option.
4830 * c-indentation.c (guard_tinfo_to_string): No longer static.
4831 Change the parameter type to "enum rid". Handle RID_SWITCH.
4832 * c-indentation.h (guard_tinfo_to_string): Declare.
4833
4834 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
4835
4836 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4837
4838 2017-06-15 Martin Sebor <msebor@redhat.com>
4839
4840 PR c++/80560
4841 * c.opt (-Wclass-memaccess): New option.
4842
4843 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4844
4845 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4846
4847 2017-06-13 Marek Polacek <polacek@redhat.com>
4848
4849 PR objc/80949
4850 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4851 branches is null.
4852
4853 2017-06-13 Martin Liska <mliska@suse.cz>
4854
4855 PR sanitize/78204
4856 * c-attribs.c (add_no_sanitize_value): New function.
4857 (handle_no_sanitize_attribute): Likewise.
4858 (handle_no_sanitize_address_attribute): Use the function.
4859 (handle_no_sanitize_thread_attribute): New function.
4860 (handle_no_address_safety_analysis_attribute): Use
4861 add_no_sanitize_value.
4862 (handle_no_sanitize_undefined_attribute): Likewise.
4863 * c-common.h: Declare new functions.
4864 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4865 (ubsan_instrument_shift): Likewise.
4866 (ubsan_instrument_bounds): Likewise.
4867 (ubsan_maybe_instrument_array_ref): Likewise.
4868 (ubsan_maybe_instrument_reference_or_call): Likewise.
4869
4870 2017-06-11 Jason Merrill <jason@redhat.com>
4871
4872 * c-ada-spec.c, c-pragma.c: Use id_equal.
4873
4874 2017-06-04 Marek Polacek <polacek@redhat.com>
4875
4876 PR c/80919
4877 * c-format.c (matching_type_p): Return false if any of the types
4878 requires structural equality.
4879
4880 2017-06-02 Martin Sebor <msebor@redhat.com>
4881
4882 PR c/80892
4883 * c-warn.c (conversion_warning): Use -Wconversion for integer
4884 conversion and -Wfloat-conversion for floating one.
4885
4886 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4887
4888 * c.opt (Wsizeof-pointer-div): New warning option.
4889
4890 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4891
4892 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4893 (Wcatch-value=1): Enable by -Wall.
4894
4895 2017-05-30 David Malcolm <dmalcolm@redhat.com>
4896
4897 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4898 format_chars.
4899 * c.opt (fdiagnostics-show-template-tree): New option.
4900 (felide-type): New option.
4901
4902 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4903
4904 * c.opt (Wcatch-value=): New C++ warning flag.
4905
4906 2017-05-24 Nathan Sidwell <nathan@acm.org>
4907
4908 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4909 const casts to avoid warning.
4910
4911 2017-05-24 Martin Sebor <msebor@redhat.com>
4912
4913 PR c/80731
4914 * c-common.h (unsafe_conversion_p): Add a function argument.
4915 * c-common.c (unsafe_conversion_p): Same.
4916 Add type names and values to diagnostics.
4917 (scalar_to_vector): Adjust.
4918 * c-warn.c (constant_expression_error): Add a function argument.
4919 Add type names and values to diagnostics.
4920 (conversion_warning): Add a function argument.
4921 Add type names and values to diagnostics.
4922 (warnings_for_convert_and_check): Same.
4923
4924 2017-05-19 Jason Merrill <jason@redhat.com>
4925
4926 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4927 enumerators.
4928
4929 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4930
4931 * c-format.c (locus): Move out of function scope,
4932 add GTY attribute.
4933
4934 2017-05-19 Nathan Sidwell <nathan@acm.org>
4935
4936 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4937 (c_common_parse_file): Remove class dump handling.
4938 (get_dump_info): Likewise.
4939
4940 2017-05-19 Richard Biener <rguenther@suse.de>
4941
4942 PR c++/80593
4943 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4944 to alias-set zero memory.
4945
4946 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4947
4948 * c-format.c (local_tree_type_node): Add GTY attribute.
4949
4950 2017-05-18 Marek Polacek <polacek@redhat.com>
4951
4952 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4953 (c_common_fixed_point_type_for_size): Likewise.
4954 (c_common_type_for_mode): Likewise.
4955 (shorten_compare): Likewise.
4956 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4957 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4958
4959 2017-05-18 Marek Polacek <polacek@redhat.com>
4960
4961 * c-common.c (self_promoting_args_p): Change the return type to bool.
4962 Use false/true instead of 0/1.
4963 * c-common.h (self_promoting_args_p): Update.
4964
4965 2017-05-17 Marek Polacek <polacek@redhat.com>
4966
4967 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4968 * c-warn.c: Likewise.
4969
4970 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4971
4972 Implement new C++ intrinsics __is_assignable and __is_constructible.
4973 * c-common.c (__is_assignable, __is_constructible): New.
4974 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4975
4976 2017-05-17 Martin Liska <mliska@suse.cz>
4977
4978 * c-common.h: Introduce dump_flags_t type and
4979 use it instead of int type.
4980 * c-gimplify.c (c_genericize): Likewise.
4981 * c-opts.c: Likewise.
4982
4983 2017-05-17 Marek Polacek <polacek@redhat.com>
4984
4985 * c-common.c (c_save_expr): Remove.
4986 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4987 * c-common.h (c_save_expr): Remove declaration.
4988
4989 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4990
4991 PR c/35441
4992 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4993 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4994 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4995 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4996 RDIV_EXPR.
4997 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4998
4999 2017-05-09 Marek Polacek <polacek@redhat.com>
5000
5001 PR c/80525
5002 * c-warn.c (unwrap_c_maybe_const): New.
5003 (warn_logical_operator): Call it.
5004
5005 2017-05-09 Nathan Sidwell <nathan@acm.org>
5006
5007 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5008 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5009
5010 2017-05-08 Martin Sebor <msebor@redhat.com>
5011
5012 PR translation/80280
5013 * c-format.h (struct format_flag_spec): Add new member.
5014 (T89_T): New macro.
5015 * c-format.c (local_tree_type_node): New global.
5016 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5017 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5018 (strfmon_flag_specs): Likewise.
5019 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5020 with distinct quoting properties.
5021 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5022 (flag_chars_t::validate): Add argument and handle bad quoting.
5023 (check_format_info_main): Handle quoting problems.
5024 (init_dynamic_diag_info): Simplify.
5025
5026 2017-05-08 Jason Merrill <jason@redhat.com>
5027
5028 * c-opts.c (c_common_post_options): Update defaults for
5029 flag_abi_version and flag_abi_compat_version.
5030
5031 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5032
5033 * c-common.c (c_cpp_error): Replace report_diagnostic
5034 with diagnostic_report_diagnostic.
5035
5036 2017-05-04 Martin Sebor <msebor@redhat.com>
5037
5038 PR translation/80280
5039 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5040 (handle_weakref_attribute): Same.
5041
5042 2017-05-03 Nathan Sidwell <nathan@acm.org>
5043
5044 Canonicalize canonical type hashing
5045 * c-common.c (complete_array_type): Use type_hash_canon.
5046
5047 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5048
5049 PR c++/80038
5050 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5051 prototype.
5052 (cilk_install_body_pedigree_operations): Likewise.
5053 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5054 detatched.
5055 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5056 (cilk_install_body_pedigree_operations): Likewise.
5057 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5058 unwrapping.
5059
5060 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5061
5062 PR c++/80534
5063 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5064 flag on non-aggregate element types.
5065
5066 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5067
5068 * c-common.c (c_type_hasher, type_hash_table): Remove.
5069 (c_common_get_alias_set): Remove unreachable code.
5070 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5071
5072 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5073
5074 * c.opt (Wextra-semi): New C++ warning flag.
5075
5076 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5077
5078 PR middle-end/80423
5079 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5080
5081 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR middle-end/79788
5084 PR middle-end/80375
5085 * c-common.c (c_common_type_for_mode): Don't handle
5086 widest_*_literal_type_node here.
5087 c_common_signed_or_unsigned_type): Likewise.
5088 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5089 to *intTI_type_node or *intDI_type_node depending on whether
5090 TImode is supported by the target or not.
5091
5092 2017-04-10 Martin Liska <mliska@suse.cz>
5093
5094 PR sanitizer/80350
5095 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5096 doing an UBSAN check.
5097
5098 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5099
5100 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5101
5102 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5103
5104 PR c++/79572
5105 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5106 tree *.
5107 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5108 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5109 REFERENCE_TYPE.
5110
5111 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5112
5113 PR documentation/78732
5114 * c.opt (Wendif-labels): Fix description to refer to
5115 #else rather than #elif.
5116
5117 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5118
5119 PR libstdc++/80251
5120 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5121 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5122
5123 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5124
5125 PR middle-end/80162
5126 * c-common.c (c_common_mark_addressable_vec): Don't set
5127 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5128
5129 2017-03-21 Martin Sebor <msebor@redhat.com>
5130
5131 PR c++/79548
5132 * c-common.c (set_underlying_type): Mark type used only when
5133 original del is declared unused.
5134
5135 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5136
5137 PR translation/79848
5138 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5139 "%qs".
5140
5141 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5142
5143 PR c/79921
5144 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5145 from inform's message, so that xgettext can locate it.
5146
5147 2017-03-09 Marek Polacek <polacek@redhat.com>
5148
5149 PR c++/79962
5150 PR c++/79984
5151 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5152 conversion to the attribute list.
5153
5154 2017-03-09 Martin Liska <mliska@suse.cz>
5155
5156 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5157
5158 2017-03-03 Jason Merrill <jason@redhat.com>
5159
5160 * c.opt (Wnoexcept-type): New.
5161
5162 2017-03-02 Richard Biener <rguenther@suse.de>
5163
5164 PR c/79756
5165 * c-common.c (c_common_mark_addressable_vec): Look through
5166 C_MAYBE_CONST_EXPR.
5167
5168 2017-02-28 Martin Liska <mliska@suse.cz>
5169
5170 * c.opt: Replace space with tabular for options of <number>
5171 type.
5172
5173 2017-02-28 Martin Liska <mliska@suse.cz>
5174
5175 * c.opt: Fix --help=option -Q for options which are of
5176 an enum type.
5177
5178 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5179
5180 PR c++/79588
5181 * c-common.c (check_function_restrict): New function.
5182 (check_function_arguments): Add FNDECL argument. Call
5183 check_function_restrict if -Wrestrict.
5184 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5185 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5186 * c-common.h (check_function_arguments): Add FNDECL argument.
5187 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5188
5189 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5190
5191 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5192 treatment of parameters with pointer-to-tagged type and tidy up.
5193 (print_ada_methods): Remove the special treatment of C++ static member
5194 functions.
5195
5196 2017-02-22 Martin Liska <mliska@suse.cz>
5197
5198 * c.opt: Replace inequality signs with square brackets
5199 for -Wnornalized.
5200
5201 2017-02-21 Jakub Jelinek <jakub@redhat.com>
5202
5203 PR c++/79641
5204 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5205 preserve quals.
5206
5207 2017-02-17 Joseph Myers <joseph@codesourcery.com>
5208
5209 * c-cppbuiltin.c (builtin_define_float_constants): Define
5210 __DECIMAL_DIG__ to the value for long double.
5211
5212 2017-02-15 Marek Polacek <polacek@redhat.com>
5213
5214 PR c/79515
5215 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5216 conversion has occured.
5217
5218 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5219
5220 * c-common.c (c_common_reswords): Add "__RTL".
5221 * c-common.h (enum rid): Add RID_RTL.
5222
5223 2017-01-20 Marek Polacek <polacek@redhat.com>
5224
5225 PR c/64279
5226 * c-common.h (do_warn_duplicated_branches_r): Declare.
5227 * c-gimplify.c (c_genericize): Walk the function tree calling
5228 do_warn_duplicated_branches_r.
5229 * c-warn.c (expr_from_macro_expansion_r): New.
5230 (do_warn_duplicated_branches): New.
5231 (do_warn_duplicated_branches_r): New.
5232 * c.opt (Wduplicated-branches): New option.
5233
5234 2017-01-17 David Malcolm <dmalcolm@redhat.com>
5235
5236 PR c++/71497
5237 * c-indentation.c (warn_for_misleading_indentation): Use the past
5238 subjunctive in the note.
5239
5240 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
5241
5242 PR c/79116
5243 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5244 start type to integer_type.
5245
5246 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5247
5248 PR driver/49726
5249 * c.opt (gen-decls): Add Driver flag.
5250
5251 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5252
5253 Revert:
5254 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5255
5256 PR c++/71737
5257 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5258
5259 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5260
5261 PR c++/71737
5262 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5263
5264 2017-01-12 Martin Sebor <msebor@redhat.com>
5265
5266 (-Wformat-overflow): ...to this.
5267
5268 2017-01-11 Martin Sebor <msebor@redhat.com>
5269
5270 PR c/78768
5271 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5272 Also enable for LTO.
5273
5274 2017-01-10 Jason Merrill <jason@redhat.com>
5275
5276 Implement P0195R2, C++17 variadic using.
5277 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5278
5279 2017-01-09 Jakub Jelinek <jakub@redhat.com>
5280
5281 PR translation/79019
5282 PR translation/79020
5283 * c.opt (Wnormalized=): Fix typo in description.
5284
5285 2017-01-08 Martin Sebor <msebor@redhat.com>
5286
5287 PR middle-end/77708
5288 * c.opt (-Wformat-truncation): New option.
5289
5290 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
5291
5292 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5293 value to unsigned short to fit in 4 hex digits without
5294 warnings.
5295
5296 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
5297
5298 * c.opt (fsso-struct): Add 'native' value.
5299
5300 2017-01-05 Martin Liska <mliska@suse.cz>
5301
5302 PR pch/78970
5303 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5304 header.
5305
5306 2017-01-04 Marek Polacek <polacek@redhat.com>
5307
5308 PR c++/64767
5309 * c.opt (Wpointer-compare): New option.
5310
5311 2017-01-04 Jakub Jelinek <jakub@redhat.com>
5312
5313 PR driver/78957
5314 * c.opt (fsso-struct=): Add RejectNegative.
5315
5316 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5317
5318 Update copyright years.
5319
5320 2016-12-29 Martin Liska <mliska@suse.cz>
5321
5322 PR c/78933
5323 * c.opt (strong-eval-order): Add RejectNegative keyword.
5324
5325 2016-12-22 Jason Merrill <jason@redhat.com>
5326
5327 Implement P0522R0, matching of template template arguments.
5328 * c-cppbuiltin.c (c_cpp_builtins): Define
5329 __cpp_template_template_args.
5330
5331 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5332
5333 PR bootstrap/78817
5334 * c-common.c (struct nonnull_arg_ctx): New type.
5335 (check_function_nonnull): Return bool instead of void. Use
5336 nonnull_arg_ctx as context rather than just location_t.
5337 (check_nonnull_arg): Adjust for the new context type, set
5338 warned_p to true if a warning has been diagnosed.
5339 (check_function_arguments): Return bool instead of void.
5340 * c-common.h (check_function_arguments): Adjust prototype.
5341
5342 2016-12-21 Jason Merrill <jason@redhat.com>
5343
5344 * c.opt (-fnew-ttp-matching): New flag.
5345 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5346
5347 2016-12-14 Martin Jambor <mjambor@suse.cz>
5348
5349 * c-omp.c: Include omp-general.h instead of omp-low.h.
5350 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5351 name.
5352
5353 2016-12-14 Martin Sebor <msebor@redhat.com>
5354
5355 PR c/17308
5356 * c-common.c (check_nonnull_arg): Disable when optimization
5357 is enabled.
5358
5359 2016-12-12 Marek Polacek <polacek@redhat.com>
5360
5361 PR c++/78647
5362 * c-common.c (attribute_fallthrough_p): Return false for
5363 error_mark_node.
5364
5365 2016-12-08 Martin Sebor <msebor@redhat.com>
5366
5367 PR c/78284
5368 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5369
5370 2016-12-08 Martin Sebor <msebor@redhat.com>
5371
5372 PR c/78165
5373 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5374 suffix.
5375
5376 2016-12-07 Martin Sebor <msebor@redhat.com>
5377
5378 PR c/53562
5379 PR middle-end/77784
5380 PR middle-end/78149
5381 PR middle-end/78138
5382 * c.opt (-Wstringop-overflow): New option.
5383
5384 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5385
5386 * c-attribs.c (asan odr indicator): New attribute.
5387 (handle_asan_odr_indicator_attribute): New function.
5388
5389 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5390
5391 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5392 ptrdiff_type_node;
5393
5394 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5395
5396 * c-common.c (excess_precision_mode_join): New.
5397 (c_ts18661_flt_eval_method): New.
5398 (c_c11_flt_eval_method): Likewise.
5399 (c_flt_eval_method): Likewise.
5400 * c-common.h (excess_precision_mode_join): New.
5401 (c_flt_eval_method): Likewise.
5402 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5403 (cpp_iec_559_value): Call it.
5404 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5405 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5406 __FLT_EVAL_METHOD_TS_18661_3__.
5407
5408 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5409
5410 * c-opts.c (c_common_post_options): Add logic to handle the default
5411 case for -fpermitted-flt-eval-methods.
5412
5413 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
5414
5415 * c.opt (Wexpansion-to-defined): New.
5416
5417 2016-11-23 Jakub Jelinek <jakub@redhat.com>
5418
5419 PR target/78451
5420 * c-pragma.c (handle_pragma_target): Don't replace
5421 current_target_pragma, but chainon the new args to the current one.
5422
5423 2016-11-22 Nathan Sidwell <nathan@acm.org>
5424
5425 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5426 indentation and formatting.
5427
5428 2016-11-21 Martin Sebor <msebor@redhat.com>
5429
5430 * c.opt (-fprintf-return-value): Enable by default.
5431
5432 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5433
5434 PR c++/71973
5435 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5436 * c-common.c (c_common_nodes_and_builtins): Initialize
5437 const_tm_ptr_type_node.
5438
5439 2016-11-16 Marek Polacek <polacek@redhat.com>
5440
5441 PR c/78285
5442 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5443
5444 2016-11-14 Jakub Jelinek <jakub@redhat.com>
5445
5446 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5447
5448 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5449 Richard Biener <rguenther@suse.de>
5450
5451 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5452 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5453 * c.opt (fgimple): New option.
5454
5455 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5456
5457 PR c/35503
5458 * c-common.h (warn_for_restrict): Declare.
5459 * c-warn.c: Include gcc-rich-location.h.
5460 (warn_for_restrict): New function.
5461 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5462 (gcc_cdiag_char_table): Likewise.
5463 (gcc_cxxdiag_char_table): Likewise.
5464 * c.opt (Wrestrict): New option.
5465
5466 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5467
5468 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5469 for nested types only if the type is a record or union and dump SLOC.
5470
5471 2016-11-09 Jason Merrill <jason@redhat.com>
5472
5473 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5474
5475 2016-11-09 Jakub Jelinek <jakub@redhat.com>
5476
5477 * c-ubsan.c (ubsan_instrument_shift): Handle split
5478 -fsanitize=shift-base and -fsanitize=shift-exponent.
5479
5480 2016-11-07 Jason Merrill <jason@redhat.com>
5481
5482 * c.opt (Wc++1z-compat): New.
5483 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5484
5485 2016-11-07 Martin Liska <mliska@suse.cz>
5486
5487 * c-warn.c (warn_for_unused_label): Save all labels used
5488 in goto or in &label.
5489
5490 2016-11-03 Jason Merrill <jason@redhat.com>
5491
5492 * c-cppbuiltin.c (c_cpp_builtins): Correct
5493 __cpp_inheriting_constructors.
5494
5495 2016-11-01 Jason Merrill <jason@redhat.com>
5496
5497 * c-cppbuiltin.c (c_cpp_builtins): Update
5498 __cpp_inheriting_constructors.
5499
5500 * c.opt (-fnew-inheriting-ctors): New.
5501 * c-opts.c: Default to on for ABI 11+.
5502
5503 2016-10-31 Jakub Jelinek <jakub@redhat.com>
5504
5505 PR c++/77948
5506 * c.opt (fext-numeric-literals): Add Var and Init.
5507 * c-opts.c (c_common_handle_option): Don't clear
5508 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5509 (c_common_post_options): Clear it here if not set
5510 explicitly.
5511
5512 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
5513
5514 PR debug/77773
5515 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5516 if NULL.
5517
5518 2016-10-25 Jakub Jelinek <jakub@redhat.com>
5519
5520 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5521 * c-common.c (c_common_reswords): Add __builtin_launder.
5522
5523 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5524
5525 * c-common.c (c_common_truthvalue_conversion): Warn for
5526 multiplications in boolean context. Fix the quoting of '<<' and '<'
5527 in the shift warning.
5528
5529 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5530
5531 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5532
5533 2016-10-20 Jason Merrill <jason@redhat.com>
5534
5535 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5536
5537 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5538
5539 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5540 integer shift ops in boolean context.
5541
5542 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
5543
5544 * c.opt (Walloca): New.
5545 (Walloca-larger-than=): New.
5546 (Wvla-larger-than=): New.
5547
5548 2016-10-17 Marek Polacek <polacek@redhat.com>
5549
5550 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5551 Return immediately when finding a match.
5552 (warn_tautological_cmp): Remove a boolean variable that is no longer
5553 needed.
5554
5555 2016-10-17 Marek Polacek <polacek@redhat.com>
5556
5557 * c-attribs.c: New file.
5558 * c-common.c: Move attributes handling to c-attribs.c.
5559 (get_nonnull_operand): No longer static.
5560 * c-common.h: Move the declarations from c-attribs.c to its own section.
5561
5562 2016-10-14 Jason Merrill <jason@redhat.com>
5563
5564 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5565 and __cpp_deduction_guides.
5566
5567 2016-10-13 Jason Merrill <jason@redhat.com>
5568
5569 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5570
5571 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5572
5573 * c-cppbuiltin.c: Include memmodel.h.
5574 * c-opts.c: Likewise.
5575 * c-pragma.c: Likewise.
5576 * c-warn.c: Likewise.
5577
5578 2016-10-12 Jakub Jelinek <jakub@redhat.com>
5579
5580 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5581 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5582 * c-opts.c (sanitize_cpp_opts): Initialize
5583 cpp_opts->cpp_warn_implicit_fallthrough.
5584
5585 2016-10-11 Marek Polacek <polacek@redhat.com>
5586
5587 * c-common.c (warning_candidate_p): Change the return type to bool
5588 and return true/false instead of 1/0.
5589 (vector_mode_valid_p): Likewise.
5590
5591 2016-10-11 Marek Polacek <polacek@redhat.com>
5592
5593 * c-common.c (fold_for_warn): No longer static.
5594 (bool_promoted_to_int_p): Likewise.
5595 (c_common_get_narrower): Likewise.
5596 (constant_expression_warning): Move to c-warn.c.
5597 (constant_expression_error): Likewise.
5598 (overflow_warning): Likewise.
5599 (warn_logical_operator): Likewise.
5600 (find_array_ref_with_const_idx_r): Likewise.
5601 (warn_tautological_cmp): Likewise.
5602 (expr_has_boolean_operands_p): Likewise.
5603 (warn_logical_not_parentheses): Likewise.
5604 (warn_if_unused_value): Likewise.
5605 (strict_aliasing_warning): Likewise.
5606 (sizeof_pointer_memaccess_warning): Likewise.
5607 (check_main_parameter_types): Likewise.
5608 (conversion_warning): Likewise.
5609 (warnings_for_convert_and_check): Likewise.
5610 (match_case_to_enum_1): Likewise.
5611 (match_case_to_enum): Likewise.
5612 (c_do_switch_warnings): Likewise.
5613 (warn_for_omitted_condop): Likewise.
5614 (readonly_error): Likewise.
5615 (lvalue_error): Likewise.
5616 (invalid_indirection_error): Likewise.
5617 (warn_array_subscript_with_type_char): Likewise.
5618 (warn_about_parentheses): Likewise.
5619 (warn_for_unused_label): Likewise.
5620 (warn_for_div_by_zero): Likewise.
5621 (warn_for_memset): Likewise.
5622 (warn_for_sign_compare): Likewise.
5623 (do_warn_double_promotion): Likewise.
5624 (do_warn_unused_parameter): Likewise.
5625 (record_locally_defined_typedef): Likewise.
5626 (maybe_record_typedef_use): Likewise.
5627 (maybe_warn_unused_local_typedefs): Likewise.
5628 (maybe_warn_bool_compare): Likewise.
5629 (maybe_warn_shift_overflow): Likewise.
5630 (warn_duplicated_cond_add_or_warn): Likewise.
5631 (diagnose_mismatched_attributes): Likewise.
5632 * c-common.h: Move the declarations from c-warn.c to its own section.
5633 * c-warn.c: New file.
5634
5635 2016-10-08 Jason Merrill <jason@redhat.com>
5636
5637 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5638 into COND_EXPR in C++.
5639
5640 2016-10-08 Jakub Jelinek <jakub@redhat.com>
5641
5642 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5643 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5644 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5645
5646 2016-10-07 Jakub Jelinek <jakub@redhat.com>
5647
5648 Implement LWG2296 helper intrinsic
5649 * c-common.h (enum rid): Add RID_ADDRESSOF.
5650 * c-common.c (c_common_reswords): Add __builtin_addressof.
5651
5652 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5653
5654 PR c++/77700
5655 * c-common.c (c_common_truthvalue_conversion): Warn also for
5656 suspicious enum values in boolean context.
5657
5658 2016-10-06 Jakub Jelinek <jakub@redhat.com>
5659
5660 Implement P0258R2 - helper for C++17
5661 std::has_unique_object_representations trait
5662 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5663 * c-common.c (c_common_reswords): Add
5664 __has_unique_object_representations.
5665
5666 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5667
5668 PR sanitizer/66343
5669 * c-ubsan.c (ubsan_instrument_return): Don't call
5670 initialize_sanitizer_builtins here.
5671
5672 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5673
5674 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5675 conditional expression in boolean context when only one arm is
5676 non-boolean.
5677
5678 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5679
5680 PR sanitizer/77823
5681 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5682 is not integral.
5683
5684 * c-common.c (c_common_reswords): Update comment for C++11.
5685
5686 2016-10-04 Jason Merrill <jason@redhat.com>
5687
5688 * c-common.c (make_tree_vector_from_ctor): New.
5689 * c-common.h: Declare it.
5690
5691 2016-10-04 Jakub Jelinek <jakub@redhat.com>
5692
5693 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5694 __LIBGCC_JCR_SECTION_NAME__.
5695
5696 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5697
5698 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5699 left shift in boolean context.
5700
5701 2016-09-29 Jakub Jelinek <jakub@redhat.com>
5702
5703 Implement P0001R1 - C++17 removal of register storage class specifier
5704 * c.opt (Wregister): New warning.
5705 * c-opts.c (c_common_post_options): Enable -Wregister by
5706 default for C++17.
5707
5708 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5709
5710 * c-opts.c (c_common_post_options): Remove special case for
5711 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5712 in C++.
5713
5714 2016-09-27 Jakub Jelinek <jakub@redhat.com>
5715
5716 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5717 -std=c++1z.
5718
5719 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5720
5721 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5722
5723 * c-common.c: Include memmodel.h.
5724
5725 2016-09-26 Marek Polacek <polacek@redhat.com>
5726
5727 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5728
5729 2016-09-26 Marek Polacek <polacek@redhat.com>
5730
5731 PR c/7652
5732 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5733 (handle_fallthrough_attribute): New function.
5734 (attribute_fallthrough_p): New function.
5735 * c-common.h (attribute_fallthrough_p): Declare.
5736
5737 2016-09-24 Marek Polacek <polacek@redhat.com>
5738
5739 PR c/77490
5740 * c.opt (Wbool-operation): New.
5741
5742 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5743
5744 * c-common.c (c_common_truthvalue_conversion): Inhibit
5745 Wint-in-bool-context warning with from_macro_definition_at.
5746 Mention the expression will always evaluate to true.
5747
5748 2016-09-21 Martin Sebor <msebor@redhat.com>
5749
5750 PR bootstrap/77676
5751 * c.opt (fprintf-return-value): Temporarily initialize to zero
5752 to unblock bootstrap failures.
5753
5754 2016-09-21 Jakub Jelinek <jakub@redhat.com>
5755
5756 PR c++/77651
5757 * c.opt (Waligned-new=): Add RejectNegative.
5758 (faligned-new=): Likewise. Spelling fix - change
5759 aligned_new_threshhold to aligned_new_threshold.
5760 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5761 to aligned_new_threshold.
5762
5763 2016-09-20 Martin Sebor <msebor@redhat.com>
5764
5765 PR middle-end/49905
5766 * c.opt: Add -Wformat-length and -fprintf-return-value.
5767
5768 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5769
5770 PR c++/77434
5771 * c.opt (Wint-in-bool-context): New warning.
5772 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5773 constants in boolean context.
5774
5775 2016-09-19 Joseph Myers <joseph@codesourcery.com>
5776
5777 * c-common.c (max_align_t_align): Also consider alignment of
5778 float128_type_node.
5779
5780 2016-09-15 Jason Merrill <jason@redhat.com>
5781
5782 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5783 DECL_EXTERNAL.
5784
5785 2016-09-14 Jason Merrill <jason@redhat.com>
5786
5787 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5788 limit FIELD_DECL, either.
5789
5790 2016-09-14 Marek Polacek <polacek@redhat.com>
5791
5792 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5793 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5794 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5795
5796 2016-09-13 David Malcolm <dmalcolm@redhat.com>
5797
5798 * c-common.c (warn_logical_not_parentheses): Replace
5799 rich_location::add_fixit_insert calls with add_fixit_insert_before
5800 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5801
5802 2016-09-13 Jason Merrill <jason@redhat.com>
5803 Tom de Vries <tom@codesourcery.com>
5804
5805 PR c++/77427
5806 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5807
5808 2016-09-13 Jason Merrill <jason@redhat.com>
5809
5810 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5811 limit types at all.
5812
5813 2016-09-12 Jason Merrill <jason@redhat.com>
5814
5815 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5816 bit/byte confusion, allow large alignment for types.
5817
5818 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5819
5820 PR c++/77496
5821 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5822
5823 2016-09-12 David Malcolm <dmalcolm@redhat.com>
5824
5825 PR c/72858
5826 * c-format.c (argument_parser::check_argument_type): Add params
5827 "type_start" and "conversion_char". Use the former to generate
5828 offset_to_type_start and pass it and conversion_char to
5829 check_format_types.
5830 (check_format_info_main): Capture the start of the type
5831 information as "type_start", and pass it an format_char
5832 to arg_parser.check_argument_type.
5833 (check_format_types): Provide an example in the leading comment.
5834 Add params "offset_to_type_start" and "conversion_char"; pass
5835 them to format_type_warning calls.
5836 (test_get_modifier_for_format_len): Likewise.
5837 (matching_type_p): New function.
5838 (get_format_for_type): Add param "conversion_char" and move
5839 implementation into...
5840 (get_format_for_type_1): ...new function, called twice.
5841 Use new function matching_type_p rather than checking for
5842 TYPE_CANONICAL equality.
5843 (get_corrected_substring): New function.
5844 (format_type_warning): Provide an example in the leading comment.
5845 Add params "offset_to_type_start" and "conversion_char". Replace
5846 call to get_format_for_type with call to get_corrected_substring
5847 and move rejection of hints for widths/precisions there.
5848 (assert_format_for_type_streq): Add param "conversion_char".
5849 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5850 (test_get_format_for_type_printf): Add conversion chars to the
5851 tests, adding coverage for various combinations of integer
5852 vs double conversions, and for preserving octal and hexadecimal
5853 conversions.
5854 (test_get_format_for_type_scanf): Add conversion chars to the
5855 tests.
5856
5857 2016-09-10 Tom de Vries <tom@codesourcery.com>
5858
5859 PR C/71602
5860 * c-common.c (build_va_arg): Handle more strict
5861 targetm.canonical_va_list_type. Replace first argument type error with
5862 assert.
5863
5864 2016-09-09 Martin Sebor <msebor@redhat.com>
5865
5866 PR c/77520
5867 PR c/77521
5868 * c-format.c (argument_parser::find_format_char_info): Use %qc
5869 format directive unconditionally.
5870
5871 2016-09-09 Jason Merrill <jason@redhat.com>
5872
5873 Implement C++17 new of over-aligned types.
5874 * c.opt: Add -faligned-new and -Waligned-new.
5875 * c-common.c (max_align_t_align): Split out from...
5876 (cxx_fundamental_alignment_p): ...here.
5877 * c-common.h: Declare it.
5878 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5879
5880 2016-09-09 Joseph Myers <joseph@codesourcery.com>
5881
5882 * c-cppbuiltin.c (builtin_define_type_width): New function.
5883 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5884 macros.
5885
5886 2016-09-07 David Malcolm <dmalcolm@redhat.com>
5887
5888 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5889 a POINTER_TYPE.
5890 (substring_loc::get_location): Move to substring-locations.c,
5891 keeping implementation as...
5892 (c_get_substring_location): New function, from the above, reworked
5893 to use accessors rather than member lookup.
5894 * c-common.h (class substring_loc): Move to substring-locations.h,
5895 replacing with a forward decl.
5896 (c_get_substring_location): New decl.
5897 * c-format.c: Include "substring-locations.h".
5898 (format_warning_va): Move to substring-locations.c.
5899 (format_warning_at_substring): Likewise.
5900
5901 2016-09-06 Martin Sebor <msebor@redhat.com>
5902
5903 PR c/77336
5904 * c-format.c (check_function_format): Avoid issuing warnings for
5905 functions unless they call format functions with non-constant
5906 format strings.
5907
5908 2016-09-06 Richard Biener <rguenther@suse.de>
5909
5910 PR c/77450
5911 * c-common.c (c_common_mark_addressable_vec): Handle
5912 COMPOUND_LITERAL_EXPR.
5913
5914 2016-09-05 Marek Polacek <polacek@redhat.com>
5915
5916 PR c/77423
5917 * c-common.c (bool_promoted_to_int_p): New function.
5918 (expr_has_boolean_operands_p): New function.
5919 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5920 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5921
5922 2016-09-04 Tom de Vries <tom@codesourcery.com>
5923
5924 revert:
5925 2016-08-29 Tom de Vries <tom@codesourcery.com>
5926
5927 * c-common.c (build_va_arg): Replace first argument type error
5928 with assert.
5929
5930 2016-09-02 Jakub Jelinek <jakub@redhat.com>
5931
5932 PR c/65467
5933 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5934 (c_finish_omp_for): Reject _Atomic qualified iterators.
5935
5936 2016-09-01 Martin Sebor <msebor@redhat.com>
5937
5938 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5939 size to guarantee it fits the output of the formatted function
5940 regardless of its arguments.
5941
5942 2016-09-01 Marek Polacek <polacek@redhat.com>
5943
5944 PR c/7652
5945 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5946 FALLTHRU comments.
5947
5948 2016-08-29 Marek Polacek <polacek@redhat.com>
5949
5950 PR c/77292
5951 * c-common.c (warn_logical_not_parentheses): Don't warn for
5952 a comparison or a logical operator.
5953
5954 2016-08-29 Tom de Vries <tom@codesourcery.com>
5955
5956 * c-common.c (build_va_arg): Fix type comparison assert.
5957
5958 2016-08-29 Tom de Vries <tom@codesourcery.com>
5959
5960 * c-common.c (build_va_arg): Replace first argument type error
5961 with assert.
5962
5963 2016-08-29 Tom de Vries <tom@codesourcery.com>
5964
5965 PR c/77398
5966 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5967 with error_mark_node as va_list instead of with illegal va_list.
5968
5969 2016-08-25 Marek Polacek <polacek@redhat.com>
5970 David Malcolm <dmalcolm@redhat.com>
5971
5972 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5973 * c-common.h (warn_logical_not_parentheses): Update declaration.
5974
5975 2016-08-22 Marek Polacek <polacek@redhat.com>
5976
5977 PR c++/77321
5978 * c-common.c (warn_for_memset): Check type for null.
5979
5980 2016-08-22 Joseph Myers <joseph@codesourcery.com>
5981
5982 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
5983 _FloatNx types for suffixes for built-in functions.
5984
5985 2016-08-19 Joseph Myers <joseph@codesourcery.com>
5986
5987 PR c/32187
5988 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5989 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5990 (RID_FLOAT128X): New enum rid values.
5991 (CASE_RID_FLOATN_NX): New macro.
5992 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5993 keywords.
5994 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5995 corresponding complex types.
5996 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5997 _FloatNx and corresponding complex types.
5998 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5999 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6000 and _FloatNx types for the widest type for determining
6001 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6002 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6003 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6004 and _FloatNx types.
6005 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6006 constants.
6007 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6008 _FloatNx types.
6009
6010 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6011
6012 * c-opts.c (c_diagnostic_finalizer): Update for change to
6013 diagnostic_show_locus.
6014
6015 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6016
6017 * c-common.c: Include "spellcheck.h".
6018 (cb_get_suggestion): New function.
6019 * c-common.h (cb_get_suggestion): New decl.
6020 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6021 cb_get_suggestion.
6022
6023 2016-08-18 Marek Polacek <polacek@redhat.com>
6024
6025 PR c/71514
6026 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6027 and pointer-to-VLA.
6028
6029 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6030
6031 PR c/72857
6032 * c-common.c (substring_loc::get_range): Rename to...
6033 (substring_loc::get_location): ...this, converting param from a
6034 source_range * to a location_t *. Call
6035 get_source_location_for_substring rather than
6036 get_source_range_for_substring, and pass in m_caret_idx.
6037 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6038 (substring_loc::get_range): Replace with...
6039 (substring_loc::get_location): ...this.
6040 (substring_loc::set_caret_index): New method.
6041 (substring_loc): Add field m_caret_idx.
6042 * c-format.c (format_warning_va): Update for above changes.
6043 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6044 clashing with type name.
6045 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6046 (check_argument_type): Likewise.
6047 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6048 Use a copy when emitting warnings, setting the caret index from TYPE.
6049
6050 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6051 Arnaud Charlet <charlet@adacore.com>
6052
6053 * c-ada-spec.c (dump_number): New function.
6054 (handle_escape_character): Likewise.
6055 (print_ada_macros): Add handling of constant integers and strings.
6056
6057 2016-08-12 Marek Polacek <polacek@redhat.com>
6058
6059 PR c/7652
6060 * c-common.c (scalar_to_vector): Adjust fall through comment.
6061 * c-opts.c (c_common_handle_option): Likewise.
6062 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6063 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6064 fall through comment.
6065 * cilk.c (extract_free_variables): Add FALLTHRU.
6066
6067 2016-08-10 Jason Merrill <jason@redhat.com>
6068
6069 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6070
6071 2016-08-09 Jason Merrill <jason@redhat.com>
6072
6073 * c-common.c (c_common_attribute_table): vector_size affects type
6074 identity.
6075
6076 2016-08-09 Marek Polacek <polacek@redhat.com>
6077
6078 PR c/7652
6079 * c-ada-spec.c (dump_generic_ada_node): Add return.
6080
6081 2016-08-09 Jason Merrill <jason@redhat.com>
6082
6083 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6084 C++17 constexpr lambdas.
6085
6086 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6087
6088 PR c/64955
6089 * c-common.h (selftest::c_format_c_tests): New declaration.
6090 (selftest::run_c_tests): New declaration.
6091 * c-format.c: Include "selftest.h.
6092 (format_warning_va): Add param "corrected_substring" and use
6093 it to add a replacement fix-it hint.
6094 (format_warning_at_substring): Likewise.
6095 (format_warning_at_char): Update for new param of
6096 format_warning_va.
6097 (argument_parser::check_argument_type): Pass "fki" to
6098 check_format_types.
6099 (check_format_types): Add param "fki" and pass it to
6100 format_type_warning.
6101 (deref_n_times): New function.
6102 (get_modifier_for_format_len): New function.
6103 (selftest::test_get_modifier_for_format_len): New function.
6104 (get_format_for_type): New function.
6105 (format_type_warning): Add param "fki" and use it to attempt
6106 to provide hints for argument types when calling
6107 format_warning_at_substring.
6108 (selftest::get_info): New function.
6109 (selftest::assert_format_for_type_streq): New function.
6110 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6111 (selftest::test_get_format_for_type_printf): New function.
6112 (selftest::test_get_format_for_type_scanf): New function.
6113 (selftest::c_format_c_tests): New function.
6114
6115 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6116
6117 PR c/52952
6118 * c-format.c: Include "diagnostic.h".
6119 (location_column_from_byte_offset): Delete.
6120 (location_from_offset): Delete.
6121 (format_warning_va): New function.
6122 (format_warning_at_substring): New function.
6123 (format_warning_at_char): New function.
6124 (check_format_arg): Capture location of format_tree and pass to
6125 check_format_info_main.
6126 (argument_parser): Add fields "start_of_this_format" and
6127 "format_string_cst".
6128 (flag_chars_t::validate): Add param "format_string_cst". Convert
6129 warning_at call using location_from_offset to call to
6130 format_warning_at_char.
6131 (argument_parser::argument_parser): Add param "format_string_cst_"
6132 and use use it to initialize field "format_string_cst".
6133 Initialize new field "start_of_this_format".
6134 (argument_parser::read_format_flags): Convert warning_at call
6135 using location_from_offset to a call to format_warning_at_char.
6136 (argument_parser::read_any_format_left_precision): Likewise.
6137 (argument_parser::read_any_format_precision): Likewise.
6138 (argument_parser::read_any_other_modifier): Likewise.
6139 (argument_parser::find_format_char_info): Likewise, in three places.
6140 (argument_parser::parse_any_scan_set): Likewise, in one place.
6141 (argument_parser::handle_conversions): Likewise, in two places.
6142 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6143 and use it to make a substring_loc. Pass the latter to
6144 check_format_types.
6145 (check_format_info_main): Add params "fmt_param_loc" and
6146 "format_string_cst". Convert warning_at calls using
6147 location_from_offset to calls to format_warning_at_char. Pass the
6148 new params to the arg_parser ctor. Pass "format_string_cst" to
6149 flag_chars.validate. Pass "fmt_param_loc" to
6150 arg_parser.check_argument_type.
6151 (check_format_types): Convert first param from a location_t
6152 to a const substring_loc & and rename to "fmt_loc". Attempt
6153 to extract the range of the relevant parameter and pass it
6154 to format_type_warning.
6155 (format_type_warning): Convert first param from a location_t
6156 to a const substring_loc & and rename to "fmt_loc". Add
6157 params "param_range" and "type". Replace calls to warning_at
6158 with calls to format_warning_at_substring.
6159
6160 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6161
6162 * c-format.c (class flag_chars_t): New class.
6163 (struct length_modifier): New struct.
6164 (class argument_parser): New class.
6165 (flag_chars_t::flag_chars_t): New ctor.
6166 (flag_chars_t::has_char_p): New method.
6167 (flag_chars_t::add_char): New method.
6168 (flag_chars_t::validate): New method.
6169 (flag_chars_t::get_alloc_flag): New method.
6170 (flag_chars_t::assignment_suppression_p): New method.
6171 (argument_parser::argument_parser): New ctor.
6172 (argument_parser::read_any_dollar): New method.
6173 (argument_parser::read_format_flags): New method.
6174 (argument_parser::read_any_format_width): New method.
6175 (argument_parser::read_any_format_left_precision): New method.
6176 (argument_parser::read_any_format_precision): New method.
6177 (argument_parser::handle_alloc_chars): New method.
6178 (argument_parser::read_any_length_modifier): New method.
6179 (argument_parser::read_any_other_modifier): New method.
6180 (argument_parser::find_format_char_info): New method.
6181 (argument_parser::validate_flag_pairs): New method.
6182 (argument_parser::give_y2k_warnings): New method.
6183 (argument_parser::parse_any_scan_set): New method.
6184 (argument_parser::handle_conversions): New method.
6185 (argument_parser::check_argument_type): New method.
6186 (check_format_info_main): Introduce classes argument_parser
6187 and flag_chars_t, moving the code within the loop into methods
6188 of these classes. Make various locals "const".
6189
6190 2016-08-05 David Malcolm <dmalcolm@redhat.com>
6191
6192 * c-common.c: Include "substring-locations.h".
6193 (get_cpp_ttype_from_string_type): New function.
6194 (g_string_concat_db): New global.
6195 (substring_loc::get_range): New method.
6196 * c-common.h (g_string_concat_db): New declaration.
6197 (class substring_loc): New class.
6198 * c-lex.c (lex_string): When concatenating strings, capture the
6199 locations of all tokens using a new obstack, and record the
6200 concatenation locations within g_string_concat_db.
6201 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6202 on the ggc-heap.
6203
6204 2016-07-29 Marek Polacek <polacek@redhat.com>
6205
6206 PR c/71926
6207 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6208 parentheses warning.
6209
6210 PR c/71574
6211 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6212
6213 2016-07-28 Martin Liska <mliska@suse.cz>
6214
6215 PR gcov-profile/68025
6216 * c-common.c (handle_no_profile_instrument_function_attribute):
6217
6218 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6219
6220 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6221 BITS_PER_UNIT_LOG.
6222
6223 2016-07-25 Jason Merrill <jason@redhat.com>
6224
6225 PR c++/65970
6226 * c.opt (fconstexpr-loop-limit): New.
6227
6228 2016-07-22 Martin Sebor <msebor@redhat.com>
6229
6230 PR c++/71675
6231 * c-common.c (resolve_overloaded_builtin): Avoid converting
6232 __atomic_compare_exchange_n return type to that of what its
6233 first argument points to.
6234
6235 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6236
6237 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6238 ~(unsigned HOST_WIDE_INT) 0.
6239
6240 2016-07-22 Martin Liska <mliska@suse.cz>
6241
6242 PR gcov-profile/69028
6243 PR gcov-profile/62047
6244 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6245 to the current_function_decl.
6246
6247 2016-07-21 Jason Merrill <jason@redhat.com>
6248
6249 PR c++/65168
6250 * c-common.c (c_common_truthvalue_conversion): Check
6251 c_inhibit_evaluation_warnings for warning about address of
6252 reference.
6253
6254 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6255
6256 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6257 const char *.
6258
6259 2016-07-15 Jason Merrill <jason@redhat.com>
6260
6261 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6262
6263 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6264
6265 PR c/71858
6266 * c-common.h (enum lookup_name_fuzzy_kind): Add
6267 FUZZY_LOOKUP_FUNCTION_NAME.
6268
6269 2016-07-08 Jason Merrill <jason@redhat.com>
6270
6271 P0145: Refining Expression Order for C++.
6272 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6273 * c-opts.c: Adjust.
6274
6275 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
6276
6277 PR c++/71214
6278 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6279
6280 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6281
6282 * c-pragma.h (enum pragma_kind): Rename
6283 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
6284 users.
6285
6286 2016-06-29 Richard Biener <rguenther@suse.de>
6287
6288 PR middle-end/71002
6289 * c-common.c (c_common_get_alias_set): Remove union type punning case.
6290
6291 2016-06-24 Jason Merrill <jason@redhat.com>
6292
6293 P0145R2: Refining Expression Order for C++.
6294 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6295 MODIFY_EXPR.
6296
6297 2016-06-24 Jakub Jelinek <jakub@redhat.com>
6298
6299 * c-common.c (check_builtin_function_arguments): Require last
6300 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6301 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6302 if the last argument is pointer to enumerated or boolean type.
6303
6304 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6305
6306 PR c/70339
6307 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6308 (lookup_name_fuzzy): New prototype.
6309
6310 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
6311
6312 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6313
6314 2016-06-14 Jason Merrill <jason@redhat.com>
6315
6316 P0145R2: Refining Expression Order for C++.
6317 * c.opt (fargs-in-order): New.
6318 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6319
6320 2016-06-13 Jakub Jelinek <jakub@redhat.com>
6321
6322 PR sanitizer/71498
6323 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6324 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6325
6326 PR preprocessor/71183
6327 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6328 to cb_get_source_date_epoch.
6329
6330 2016-06-10 Jakub Jelinek <jakub@redhat.com>
6331
6332 PR c/68657
6333 * c.opt (Wpsabi): Add Warning flag.
6334
6335 2016-06-10 Martin Sebor <msebor@redhat.com>
6336
6337 PR c/71392
6338 * c-common.c (handle_nonnull_attribute): Accept
6339 the nonnull attribute in type-generic builtins.
6340
6341 2016-06-09 Martin Sebor <msebor@redhat.com>
6342
6343 PR c/70883
6344 * c-common.c (builtin_function_validate_nargs): Make text of error
6345 message consistent with others like it.
6346
6347 2016-06-08 Martin Sebor <msebor@redhat.com>
6348 Jakub Jelinek <jakub@redhat.com>
6349
6350 PR c++/70507
6351 PR c/68120
6352 * c-common.c (check_builtin_function_arguments): Handle
6353 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6354
6355 2016-06-08 Richard Biener <rguenther@suse.de>
6356
6357 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6358
6359 2016-06-07 Richard Biener <rguenther@suse.de>
6360
6361 PR c/61564
6362 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6363 options and warn about others.
6364
6365 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
6366
6367 * c-common.c (get_source_date_epoch): Rename to
6368 cb_get_source_date_epoch.
6369 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6370 message when the parsing fails. Use error_at instead of fatal_error.
6371 * c-common.h (get_source_date_epoch): Rename to
6372 cb_get_source_date_epoch.
6373 * c-common.h (cb_get_source_date_epoch): Prototype.
6374 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6375 * c-common.h (c_omp_region_type): Remove trailing comma.
6376 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6377 * c-lex.c (c_lex_with_flags): Remove initialization of
6378 pfile->source_date_epoch.
6379
6380 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6381
6382 PR c++/71349
6383 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6384 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6385 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6386 instead of C_OMP_CLAUSE_SPLIT_FOR.
6387
6388 2016-05-24 Richard Biener <rguenther@suse.de>
6389
6390 PR middle-end/70434
6391 PR c/69504
6392 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6393 (convert_vector_to_array_for_subscript): ... this.
6394 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6395 VIEW_CONVERT_EXPR to an array type. Rename to ...
6396 (convert_vector_to_array_for_subscript): ... this.
6397
6398 2016-05-12 Marek Polacek <polacek@redhat.com>
6399
6400 PR c/70756
6401 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6402 size_in_bytes and pass LOC to it.
6403
6404 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6405
6406 PR c/43651
6407 * c.opt (Wduplicate-decl-specifier): New option.
6408
6409 2016-05-11 Marek Polacek <polacek@redhat.com>
6410
6411 PR c++/71024
6412 * c-common.c (diagnose_mismatched_attributes): New function.
6413 * c-common.h (diagnose_mismatched_attributes): Declare.
6414
6415 2016-05-04 Marek Polacek <polacek@redhat.com>
6416
6417 * c.opt (Wdangling-else): New option.
6418
6419 2016-05-03 Marek Polacek <polacek@redhat.com>
6420
6421 PR c/70859
6422 * c-common.c (builtin_function_validate_nargs): Add location
6423 parameter. Use it.
6424 (check_builtin_function_arguments): Add location and arguments
6425 parameters. Use them.
6426 * c-common.h (check_builtin_function_arguments): Update declaration.
6427
6428 2016-05-03 Richard Biener <rguenther@suse.de>
6429
6430 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6431 allow call args to gimplify to SSA names.
6432
6433 2016-05-03 Marek Polacek <polacek@redhat.com>
6434
6435 * c-common.h (enum c_omp_region_type): Remove stray comma.
6436
6437 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6438
6439 * c-common.h (enum c_omp_region_type): Define.
6440
6441 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6442
6443 * c-common.c (shorten_compare): Use wi::to_wide.
6444
6445 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6446
6447 PR middle-end/70626
6448 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6449 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6450 reduction clauses in acc parallel loops.
6451
6452 2016-04-29 Marek Polacek <polacek@redhat.com>
6453
6454 PR c/70852
6455 * c-common.c (warn_for_memset): Check domain before accessing it.
6456
6457 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6458
6459 PR/69089
6460 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6461 "aligned" attribute.
6462
6463 2016-04-28 Jason Merrill <jason@redhat.com>
6464
6465 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6466
6467 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
6468 Matthias Klose <doko@debian.org>
6469
6470 * c-common.c (get_source_date_epoch): New function, gets the environment
6471 variable SOURCE_DATE_EPOCH and parses it as long long with error
6472 handling.
6473 * c-common.h (get_source_date_epoch): Prototype.
6474 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6475
6476 2015-04-27 Ryan Burn <contact@rnburn.com>
6477
6478 PR c++/69024
6479 PR c++/68997
6480 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6481 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6482 external linkage.
6483 (cilk_detect_and_unwrap): Corresponding changes.
6484 (extract_free_variables): Don't extract free variables from
6485 AGGR_INIT_EXPR slot.
6486 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6487 (cilk_recognize_spawn): Likewise.
6488
6489 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6490
6491 * c.opt (Wmemset-elt-size): New option.
6492 * c-common.c (warn_for_memset): New function.
6493 * c-common.h (warn_for_memset): Declare.
6494
6495 2016-04-25 Jason Merrill <jason@redhat.com>
6496
6497 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6498 No longer static.
6499 * c-common.h: Declare it.
6500 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6501
6502 2016-04-22 Jason Merrill <jason@redhat.com>
6503
6504 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6505
6506 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6507
6508 PR c++/69363
6509 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6510 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6511
6512 2016-04-18 Michael Matz <matz@suse.de>
6513
6514 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6515 and SET_DECL_ALIGN.
6516
6517 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6518
6519 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6520 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6521 to incomplete types.
6522 (dump_nested_type): Remove redundant tests and tidy up.
6523 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6524 a type which is the typedef of an original type.
6525
6526 2016-04-15 Marek Polacek <polacek@redhat.com>
6527
6528 PR c/70651
6529 * c-common.c (build_va_arg): Change two asserts into errors and return
6530 error_mark_node.
6531
6532 2016-04-13 Marek Polacek <polacek@redhat.com>
6533
6534 PR c++/70639
6535 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6536 for switch statements, too.
6537
6538 2016-03-28 Jason Merrill <jason@redhat.com>
6539
6540 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6541
6542 2016-03-23 Marek Polacek <polacek@redhat.com>
6543
6544 PR c++/69884
6545 * c.opt (Wignored-attributes): New option.
6546
6547 2016-03-22 David Malcolm <dmalcolm@redhat.com>
6548
6549 PR c/69993
6550 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6551 diagnostic text, reversing the order of the warning and note so
6552 that they appear in source order.
6553
6554 2016-03-17 Marek Polacek <polacek@redhat.com>
6555
6556 PR c/69407
6557 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6558 operations.
6559
6560 2016-03-14 Jason Merrill <jason@redhat.com>
6561
6562 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6563
6564 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6565
6566 2016-03-09 Richard Biener <rguenther@suse.de>
6567
6568 PR c/70143
6569 * c-common.c (strict_aliasing_warning): Add back
6570 alias_sets_conflict_p check.
6571
6572 2016-03-08 Jason Merrill <jason@redhat.com>
6573
6574 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6575
6576 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6577
6578 PR c/68187
6579 * c-indentation.c (get_visual_column): Move code to determine next
6580 tab stop to...
6581 (next_tab_stop): ...this new function.
6582 (line_contains_hash_if): Delete function.
6583 (detect_preprocessor_logic): Delete function.
6584 (get_first_nws_vis_column): New function.
6585 (detect_intervening_unindent): New function.
6586 (should_warn_for_misleading_indentation): Replace call to
6587 detect_preprocessor_logic with a call to
6588 detect_intervening_unindent.
6589
6590 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6591
6592 PR c/68187
6593 * c-indentation.c (should_warn_for_misleading_indentation): When
6594 suppressing warnings about cases where the guard and body are on
6595 the same column, only use the first non-whitespace column in place
6596 of the guard token column when dealing with "else" clauses.
6597 When rejecting aligned BODY and NEXT, loosen the requirement
6598 from equality with the first non-whitespace of guard to simply
6599 that they not be indented relative to it.
6600
6601 2016-03-04 Richard Biener <rguenther@suse.de>
6602
6603 PR c++/70054
6604 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6605 instead of alias_sets_conflict_p.
6606
6607 2016-03-01 Marek Polacek <polacek@redhat.com>
6608
6609 PR c++/69795
6610 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6611 any DECL.
6612
6613 2016-02-22 Martin Sebor <msebor@redhat.com>
6614
6615 PR middle-end/69780
6616 * c-common.c (check_builtin_function_arguments): Validate and
6617 reject invalid arguments to __builtin_alloca_with_align.
6618
6619 2016-02-20 Mark Wielaard <mjw@redhat.com>
6620
6621 PR c/28901
6622 * c.opt (Wunused-const-variable): Turn into Alias for...
6623 (Wunused-const-variable=): New option.
6624
6625 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6626
6627 PR c++/69865
6628 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6629 here...
6630 (c_common_init_options): ...to here.
6631 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6632
6633 2016-02-19 Jakub Jelinek <jakub@redhat.com>
6634
6635 PR c++/69826
6636 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6637 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6638 flag_preprocess_only.
6639
6640 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6641
6642 PR c/69835
6643 * c.opt (Wnonnull-compare): Enable for -Wall.
6644
6645 2016-02-15 Jakub Jelinek <jakub@redhat.com>
6646
6647 PR c++/69797
6648 * c-common.c (sync_resolve_size): Diagnose too few arguments
6649 even when params is non-NULL empty vector.
6650
6651 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6652
6653 PR target/60410
6654 * c.opt (fshort-double): Remove.
6655
6656 2016-02-05 Martin Sebor <msebor@redhat.com>
6657
6658 PR c++/69662
6659 * c.opt (Warning options): Update -Wplacement-new to take
6660 an optional argument.
6661
6662 2016-02-01 Jakub Jelinek <jakub@redhat.com>
6663
6664 PR preprocessor/69543
6665 PR c/69558
6666 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6667 instead of loc to control_warning_option.
6668
6669 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6670
6671 * c.opt (fopenacc-dim=): New option.
6672
6673 2016-01-27 Ryan Burn <contact@rnburn.com>
6674
6675 PR cilkplus/69267
6676 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6677 gimplify_arg. Removed superfluous post_p argument.
6678 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6679 superfluous post_p argument.
6680 * c-gimplify.c (c_gimplify_expr): Likewise.
6681
6682 2016-01-26 David Malcolm <dmalcolm@redhat.com>
6683
6684 PR other/69006
6685 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6686 pp_newline_and_flush with pp_flush.
6687
6688 2016-01-20 Martin Sebor <msebor@redhat.com>
6689
6690 PR c/69405
6691 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6692 an incompatible argument when the argument isn't a valid tree node.
6693
6694 2016-01-18 Jason Merrill <jason@redhat.com>
6695
6696 PR c++/68767
6697 * c-common.c (check_function_arguments_recurse): Fold the whole
6698 COND_EXPR, not just the condition.
6699
6700 2016-01-18 Tom de Vries <tom@codesourcery.com>
6701
6702 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6703 classify as loop clause.
6704
6705 2016-01-15 Jakub Jelinek <jakub@redhat.com>
6706
6707 PR bootstrap/68271
6708 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6709 C++ FE no longer has limit on number of pragmas.
6710
6711 2015-01-14 Ryan Burn <contact@rnburn.com>
6712
6713 PR c++/69048
6714 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
6715 to add missing cleanup point.
6716
6717 2016-01-14 David Malcolm <dmalcolm@redhat.com>
6718
6719 PR c++/68819
6720 * c-indentation.c (get_visual_column): Add location_t param.
6721 Handle the column number being zero by effectively disabling the
6722 warning, with an "inform".
6723 (should_warn_for_misleading_indentation): Add location_t argument
6724 for all uses of get_visual_column.
6725
6726 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6727
6728 PR c++/69029
6729 * c-indentation.c (should_warn_for_misleading_indentation):
6730 Don't warn about do-while statements.
6731
6732 2016-01-07 Martin Sebor <msebor@redhat.com>
6733
6734 PR c/68966
6735 * c-common.c (sync_resolve_size): Reject first argument when it's
6736 a pointer to _Bool.
6737
6738 2016-01-05 David Malcolm <dmalcolm@redhat.com>
6739
6740 PR c/69122
6741 * c-indentation.c (get_visual_column): Remove default argument.
6742 (should_warn_for_misleading_indentation): For the multiline case,
6743 update call to get_visual_column for next_stmt_exploc so that it
6744 captures the location of the first non-whitespace character in the
6745 relevant line. Don't issue warnings if there is non-whitespace
6746 before the next statement.
6747
6748 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6749
6750 Update copyright years.
6751
6752 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6753
6754 * c-common.c (binary_op_error): Convert first param from
6755 location_t to rich_location * and use it when emitting an error.
6756 * c-common.h (binary_op_error): Convert first param from
6757 location_t to rich_location *.
6758
6759 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6760
6761 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6762 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6763
6764 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6765
6766 * c-common.c (c_common_attribute_table): Handle "omp declare target
6767 link" attribute.
6768
6769 2015-12-14 Jakub Jelinek <jakub@redhat.com>
6770
6771 PR c/68833
6772 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6773
6774 2014-12-12 Tobias Burnus <burnus@net-b.de>
6775
6776 PR fortran/68815
6777 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6778 specifiers (%d, %i,%u and %c).
6779
6780 2015-12-10 David Malcolm <dmalcolm@redhat.com>
6781
6782 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6783
6784 2015-12-08 Jakub Jelinek <jakub@redhat.com>
6785
6786 PR c/48088
6787 PR c/68657
6788 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6789 * c-pragma.c (handle_pragma_diagnostic): Adjust
6790 control_warning_option caller.
6791
6792 2015-12-07 David Malcolm <dmalcolm@redhat.com>
6793
6794 * c-common.c (c_cpp_error): Update for change to
6795 rich_location::set_range.
6796
6797 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
6798
6799 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6800 shifting 1 out of the sign bit.
6801
6802 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6803
6804 * c-common.c (c_common_attribute_table[]): Update max arguments
6805 count for "simd" attribute.
6806 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6807
6808 2015-12-03 Jakub Jelinek <jakub@redhat.com>
6809
6810 PR preprocessor/57580
6811 * c-ppoutput.c (print): Change printed field to bool.
6812 Move src_file last for smaller padding.
6813 (init_pp_output): Set print.printed to false instead of 0.
6814 (scan_translation_unit): Fix up formatting. Set print.printed
6815 to true after printing something other than newline.
6816 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6817 (maybe_print_line_1): Set print.printed to false instead of 0.
6818 (print_line_1): Likewise.
6819 (do_line_change): Set print.printed to true instead of 1.
6820 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6821 dump_macro): Set print.printed to false after printing newline.
6822
6823 2015-12-02 Jason Merrill <jason@redhat.com>
6824
6825 * c-common.c (fold_for_warn): New.
6826 (warn_logical_operator, warn_tautological_cmp)
6827 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6828
6829 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6830 (c_fully_fold_internal, decl_constant_value_for_optimization):
6831 Move to c/c-fold.c.
6832 * c-common.h: Don't declare decl_constant_value_for_optimization.
6833
6834 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6835
6836 PR c/68162
6837 * c-common.h (c_build_qualified_type): Add extra default
6838 arguments.
6839
6840 2015-12-01 Julian Brown <julian@codesourcery.com>
6841 Cesar Philippidis <cesar@codesourcery.com>
6842 James Norris <James_Norris@mentor.com>
6843
6844 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6845 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6846 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6847
6848 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6849
6850 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6851 (decl_sloc_common): Delete and move bulk of processing to...
6852 (decl_sloc): ...here.
6853 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6854 (dump_ada_double_name): Remove S parameter and compute the suffix.
6855 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6856 element type and deal with an anonymous one.
6857 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6858 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6859 and remove reference to QUAL_UNION_TYPE.
6860 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6861 (dump_nested_type): ...here. New function extracted from above.
6862 Generate a full declaration for anonymous element type of arrays.
6863 (print_ada_declaration): Really skip anonymous declarations. Remove
6864 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6865 Clean up processing of declarations of array types and objects.
6866 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6867 Remove obsolete code and tidy up.
6868
6869 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6870
6871 PR c/67581
6872 * c-common.c (handle_transparent_union_attribute): Update
6873 also type variants.
6874
6875 2015-11-27 Martin Liska <mliska@suse.cz>
6876
6877 PR c++/68312
6878 * array-notation-common.c (cilkplus_extract_an_triplets):
6879 Release vector of vectors.
6880 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6881
6882 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6883
6884 PR c++/68527
6885 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6886 (print_ada_struct_decl): Likewise.
6887
6888 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6889
6890 PR c++/68001
6891 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6892 * cilk.c (recognize_spawn): Determine location in a more precise
6893 way.
6894
6895 2015-11-19 Jason Merrill <jason@redhat.com>
6896
6897 * c-common.c (shorten_compare): But look through macros from
6898 system headers.
6899
6900 2015-11-18 Jason Merrill <jason@redhat.com>
6901
6902 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6903 non-constant operand comes from a macro.
6904
6905 2015-11-17 Jason Merrill <jason@redhat.com>
6906
6907 PR bootstrap/68346
6908 * c-common.c (warn_tautological_cmp): Fold before checking for
6909 constants.
6910
6911 2015-11-16 Marek Polacek <polacek@redhat.com>
6912
6913 PR c++/68362
6914 * c-common.c (check_case_bounds): Fold low and high cases.
6915
6916 2015-11-16 Marek Polacek <polacek@redhat.com>
6917
6918 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6919 * c-common.c (c_common_get_alias_set): Likewise.
6920 (handle_visibility_attribute): Likewise.
6921
6922 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6923
6924 * c-common.c (handle_simd_attribute): New.
6925 (struct attribute_spec): Add entry for "simd".
6926 (handle_simd_attribute): New.
6927
6928 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
6929
6930 * c-lex.c (interpret_float): Use fold_convert.
6931
6932 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6933
6934 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6935 and store it on the result.
6936 * c-opts.c (c_common_init_options): Set
6937 global_dc->colorize_source_p.
6938
6939 2015-11-12 James Norris <jnorris@codesourcery.com>
6940 Joseph Myers <joseph@codesourcery.com>
6941
6942 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6943 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6944 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6945 PRAGMA_OACC_CLAUSE_LINK.
6946
6947 2015-11-11 Marek Polacek <polacek@redhat.com>
6948
6949 PR c/68107
6950 PR c++/68266
6951 * c-common.c (valid_array_size_p): New function.
6952 * c-common.h (valid_array_size_p): Declare.
6953
6954 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
6955
6956 PR bootstrap/68271
6957 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6958
6959 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
6960
6961 * array-notation-common.c: Remove unused header files.
6962 * c-ada-spec.c: Likewise.
6963 * c-cilkplus.c: Likewise.
6964 * c-common.c: Likewise.
6965 * c-cppbuiltin.c: Likewise.
6966 * c-dump.c: Likewise.
6967 * c-format.c: Likewise.
6968 * c-gimplify.c: Likewise.
6969 * c-indentation.c: Likewise.
6970 * c-lex.c: Likewise.
6971 * c-omp.c: Likewise.
6972 * c-opts.c: Likewise.
6973 * c-pch.c: Likewise.
6974 * c-ppoutput.c: Likewise.
6975 * c-pragma.c: Likewise.
6976 * c-pretty-print.c: Likewise.
6977 * c-semantics.c: Likewise.
6978 * c-ubsan.c: Likewise.
6979 * cilk.c: Likewise.
6980 * stub-objc.c: Likewise.
6981
6982 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6983 Cesar Philippidis <cesar@codesourcery.com>
6984 James Norris <jnorris@codesourcery.com>
6985 Julian Brown <julian@codesourcery.com>
6986 Nathan Sidwell <nathan@codesourcery.com>
6987
6988 * c-pragma.c (oacc_pragmas): Add "routine".
6989 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6990
6991 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6992
6993 * c-common.c (c_common_attributes): Add scalar_storage_order.
6994 (handle_scalar_storage_order_attribute): New function.
6995 * c-pragma.c (global_sso): New variable.
6996 (maybe_apply_pragma_scalar_storage_order): New function.
6997 (handle_pragma_scalar_storage_order): Likewise.
6998 (init_pragma): Register scalar_storage_order.
6999 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7000 * c.opt (Wscalar-storage-order): New warning.
7001 (fsso-struct=): New option.
7002
7003 2015-11-08 Martin Sebor <msebor@redhat.com>
7004
7005 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7006
7007 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7008
7009 * c-common.c: Don't undef DEF_BUILTIN.
7010
7011 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7012
7013 * c-common.c (c_cpp_error): Convert parameter from location_t to
7014 rich_location *. Eliminate the "column_override" parameter and
7015 the call to diagnostic_override_column.
7016 Update the "done_lexing" clause to set range 0
7017 on the rich_location, rather than overwriting a location_t.
7018 * c-common.h (c_cpp_error): Convert parameter from location_t to
7019 rich_location *. Eliminate the "column_override" parameter.
7020
7021 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7022 Thomas Schwinge <thomas@codesourcery.com>
7023 James Norris <jnorris@codesourcery.com>
7024
7025 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7026 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7027 clauses with parallel and kernels and loops.
7028 * c-pragma.h (enum pragma_omp_clause): Add entries for
7029 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7030 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7031 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7032 INDEPENDENT,SEQ}.
7033 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7034
7035 2015-11-05 Martin Sebor <msebor@redhat.com>
7036
7037 PR c++/67942
7038 * c.opt (-Wplacement-new): New option.
7039
7040 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7041
7042 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7043 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7044 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7045 save_expr or create_tmp_var* if TEST is true.
7046 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7047 Don't call add_stmt here.
7048 (struct c_omp_check_loop_iv_data): New type.
7049 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7050 c_omp_check_loop_iv_exprs): New functions.
7051 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7052 distribute.
7053 (c_omp_declare_simd_clauses_to_numbers): Change
7054 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7055 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7056 from numbers to PARM_DECLs.
7057
7058 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7059
7060 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7061 flag_checking.
7062
7063 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7064
7065 PR c++-common/67882
7066 * c-common.h (fold_offsetof_1): Add argument.
7067 * c-common.c (fold_offsetof_1): Diagnose more invalid
7068 offsetof expressions that reference elements past the end of
7069 an array.
7070
7071 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7072 Chung-Lin Tang <cltang@codesourcery.com>
7073
7074 * c-pragma.c (oacc_pragmas): Add "atomic".
7075 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7076
7077 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7078
7079 * c-common.c (handle_target_clones_attribute): New.
7080 (c_common_attribute_table): Add handle_target_clones_attribute.
7081 (handle_always_inline_attribute): Add check on target_clones attribute.
7082 (handle_target_attribute): Ditto.
7083
7084 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7085
7086 * array-notation-common.c: Reorder #include's and remove duplicates.
7087 * c-ada-spec.c: Likewise.
7088 * c-cilkplus.c: Likewise.
7089 * c-common.c: Likewise.
7090 * c-cppbuiltin.c: Likewise.
7091 * c-dump.c: Likewise.
7092 * c-format.c: Likewise.
7093 * c-gimplify.c: Likewise.
7094 * c-indentation.c: Likewise.
7095 * c-lex.c: Likewise.
7096 * c-omp.c: Likewise.
7097 * c-opts.c: Likewise.
7098 * c-pch.c: Likewise.
7099 * c-ppoutput.c: Likewise.
7100 * c-pragma.c: Likewise.
7101 * c-pretty-print.c: Likewise.
7102 * c-semantics.c: Likewise.
7103 * c-ubsan.c: Likewise.
7104 * cilk.c: Likewise.
7105 * stub-objc.c: Likewise.
7106
7107 2015-10-28 Jason Merrill <jason@redhat.com>
7108
7109 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7110
7111 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7112 James Norris <jnorris@codesourcery.com>
7113 Cesar Philippidis <cesar@codesourcery.com>
7114
7115 PR c/64765
7116 PR c/64880
7117 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7118 * c-omp.c (c_oacc_split_loop_clauses): New function.
7119
7120 2015-10-21 Martin Sebor <msebor@redhat.com>
7121
7122 PR driver/68043
7123 * c.opt: End each sentence that describes an option with a period.
7124
7125 2015-10-20 Marek Polacek <polacek@redhat.com>
7126
7127 * array-notation-common.c (is_cilkplus_vector_p): Define.
7128 * c-common.h (is_cilkplus_vector_p): Declare.
7129
7130 2015-10-20 Marek Polacek <polacek@redhat.com>
7131
7132 * c.opt (std=gnu++11): Do not describe as experimental.
7133 (std=gnu++14): Likewise.
7134
7135 2015-10-19 Jason Merrill <jason@redhat.com>
7136
7137 * c-cppbuiltin.c (c_cpp_builtins): Define
7138 __cpp_nontype_template_args.
7139
7140 2015-10-19 Jason Merrill <jason@redhat.com>
7141
7142 * c-cppbuiltin.c (c_cpp_builtins): Define
7143 __cpp_enumerator_attributes, __cpp_fold_expressions,
7144 __cpp_unicode_characters.
7145
7146 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7147 Aldy Hernandez <aldyh@redhat.com>
7148
7149 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7150 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7151 (c_define_builtins): Likewise.
7152 * c-common.h (enum c_omp_clause_split): Add
7153 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7154 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7155 (c_finish_omp_for): Add ORIG_DECLV argument.
7156 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7157 201511 instead of 201307.
7158 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7159 OMP_CRITICAL_CLAUSES to it.
7160 (c_finish_omp_ordered): Add CLAUSES argument, set
7161 OMP_ORDERED_CLAUSES to it.
7162 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7163 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7164 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7165 constructs and new OpenMP 4.5 clauses. Clear
7166 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7167 verification code.
7168 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7169 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7170 (enum pragma_omp_clause): Add
7171 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7172 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7173
7174 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7175
7176 * c-lex.c (interpret_float): Use real_equal instead of
7177 REAL_VALUES_EQUAL.
7178
7179 2015-10-04 Jason Merrill <jason@redhat.com>
7180
7181 Implement N4514, C++ Extensions for Transactional Memory.
7182 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7183 (c_common_attribute_table): Add transaction_safe_dynamic.
7184 transaction_safe now affects type identity.
7185 (handle_tm_attribute): Handle transaction_safe_dynamic.
7186 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7187 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7188 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7189 (D_TRANSMEM): New.
7190 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7191 * c-pretty-print.c (pp_c_attributes_display): Don't print
7192 transaction_safe in C++.
7193
7194 2015-10-02 Marek Polacek <polacek@redhat.com>
7195
7196 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7197
7198 2015-10-02 Marek Polacek <polacek@redhat.com>
7199
7200 PR c/64249
7201 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7202 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7203 * c.opt (Wduplicated-cond): New option.
7204
7205 2015-10-01 Joseph Myers <joseph@codesourcery.com>
7206
7207 * c.opt (std=c11): Do not describe as experimental.
7208 (std=gnu11): Likewise.
7209 (std=iso9899:2011): Likewise.
7210
7211 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7212
7213 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7214 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7215
7216 2015-09-25 Marek Polacek <polacek@redhat.com>
7217
7218 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7219 (ubsan_instrument_shift): Likewise.
7220
7221 2015-09-25 Marek Polacek <polacek@redhat.com>
7222
7223 PR sanitizer/64906
7224 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7225
7226 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7227
7228 * c-indentation.c (should_warn_for_misleading_indentation):
7229 Compare next_stmt_vis_column with guard_line_first_nws instead
7230 of with guard_line_vis_column.
7231
7232 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7233
7234 PR c/49654
7235 PR c/49655
7236 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7237 options and options not valid for the current language.
7238
7239 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7240
7241 * c-indentation.c (should_warn_for_misleading_indentation):
7242 Float out and consolidate the calls to get_visual_column that
7243 are passed guard_exploc as an argument. Compare
7244 next_stmt_vis_column with guard_line_first_nws instead of with
7245 body_line_first_nws.
7246
7247 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7248
7249 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7250 Wnamespaces): New C++ warnings.
7251
7252 2015-09-22 Jason Merrill <jason@redhat.com>
7253
7254 * c-common.h (abi_compat_version_crosses): New.
7255 (warn_abi_version): Declare.
7256 * c-common.c: Define it.
7257 * c-opts.c (c_common_post_options): Handle it.
7258 flag_abi_compat_version defaults to 8.
7259
7260 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7261
7262 Complete the implementation of N4230, Nested namespace definition.
7263 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7264 __cpp_nested_namespace_definitions.
7265
7266 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7267
7268 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7269
7270 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7271
7272 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7273 when warning.
7274 * c-pragma.h (pragma_lex): Add optional loc argument.
7275
7276 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
7277
7278 * c-format.c (check_format_arg): Adjust to use common block size in all
7279 object pools.
7280
7281 2015-09-15 David Malcolm <dmalcolm@redhat.com>
7282
7283 * c-format.c (location_from_offset): Update for change in
7284 signature of location_get_source_line.
7285 * c-indentation.c (get_visual_column): Likewise.
7286 (line_contains_hash_if): Likewise.
7287
7288 2015-09-14 Marek Polacek <polacek@redhat.com>
7289
7290 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7291 setting various warnings.
7292
7293 2015-09-14 Marek Polacek <polacek@redhat.com>
7294
7295 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7296 a negative value.
7297
7298 2015-09-11 Mark Wielaard <mjw@redhat.com>
7299
7300 PR c/28901
7301 * c.opt (Wunused-variable): Option from common.opt.
7302 (Wunused-const-variable): New option.
7303
7304 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7305
7306 PR c++/53184
7307 * c.opt ([Wsubobject-linkage]): Add.
7308
7309 2015-09-03 Martin Sebor <msebor@redhat.com>
7310
7311 PR c/66516
7312 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7313 functions.
7314 * c-common.c (reject_gcc_builtin): Define.
7315
7316 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7317
7318 PR middle-end/60586
7319 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7320 prototype.
7321 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7322 cilk_gimplify_call_params_in_spawned_fn.
7323 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7324 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7325 unwrapping.
7326
7327 2015-08-25 Marek Polacek <polacek@redhat.com>
7328
7329 PR middle-end/67330
7330 * c-common.c (handle_weak_attribute): Don't check whether the
7331 visibility can be changed here.
7332
7333 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7334
7335 * c-lex.c (c_lex_with_flags): Use explicit locations.
7336
7337 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7338
7339 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7340 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7341
7342 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7343
7344 PR middle-end/36757
7345 * c-common.c (check_builtin_function_arguments): Add check
7346 for BUILT_IN_SIGNBIT argument.
7347
7348 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7349
7350 PR c++/67160
7351 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7352 in c++1z mode.
7353
7354 2015-08-17 Marek Polacek <polacek@redhat.com>
7355
7356 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7357 with whitespaces before qualifier names.
7358
7359 2015-08-12 Marek Polacek <polacek@redhat.com>
7360
7361 PR c++/55095
7362 * c-common.c (maybe_warn_shift_overflow): Properly handle
7363 left-shifting 1 into the sign bit.
7364
7365 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7366
7367 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7368
7369 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7370 Braden Obrzut <admin@maniacsvault.net>
7371 Jason Merrill <jason@redhat.com>
7372
7373 Add C++ Concepts TS support.
7374 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7375 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7376 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7377 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7378 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7379 * c.opt (fconcepts): New.
7380
7381 2015-08-02 Martin Sebor <msebor@redhat.com>
7382
7383 * c.opt (-Wframe-address): New warning option.
7384
7385 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7386
7387 * c-indentation.c (should_warn_for_misleading_indentation):
7388 Improve heuristics.
7389
7390 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7391
7392 * c-indentation.c (get_visual_column): Add parameter first_nws,
7393 use it. Update comment documenting the function.
7394 (is_first_nonwhitespace_on_line): Remove.
7395 (should_warn_for_misleading_indentation): Replace usage of
7396 of is_first_nonwhitespace_on_line with get_visual_column.
7397
7398 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7399
7400 * c-indentation.h (struct token_indent_info): Define.
7401 (get_token_indent_info): Define.
7402 (warn_for_misleading_information): Declare.
7403 * c-common.h (warn_for_misleading_information): Remove.
7404 * c-identation.c (warn_for_misleading_indentation):
7405 Change declaration to take three token_indent_infos. Adjust
7406 accordingly.
7407 * c-identation.c (should_warn_for_misleading_indentation):
7408 Likewise. Bail out early if the body is a compound statement.
7409 (guard_tinfo_to_string): Define.
7410
7411 2015-07-30 Jason Merrill <jason@redhat.com>
7412
7413 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7414 '*' for reference decay.
7415
7416 2015-07-30 Marek Polacek <polacek@redhat.com>
7417
7418 * c-common.c (warn_tautological_cmp): Bail for float types.
7419
7420 2015-07-27 Marek Polacek <polacek@redhat.com>
7421
7422 PR bootstrap/67030
7423 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7424
7425 2015-07-27 Marek Polacek <polacek@redhat.com>
7426
7427 PR c++/66555
7428 PR c/54979
7429 * c-common.c (find_array_ref_with_const_idx_r): New function.
7430 (warn_tautological_cmp): New function.
7431 * c-common.h (warn_tautological_cmp): Declare.
7432 * c.opt (Wtautological-compare): New option.
7433
7434 2015-07-23 Marek Polacek <polacek@redhat.com>
7435
7436 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7437 (ubsan_instrument_shift): Likewise.
7438
7439 2015-07-23 Marek Polacek <polacek@redhat.com>
7440
7441 PR sanitizer/66908
7442 * c-ubsan.c: Include gimplify.h.
7443 (ubsan_instrument_division): Unshare OP0 and OP1.
7444 (ubsan_instrument_shift): Likewise.
7445
7446 2015-07-20 Marek Polacek <polacek@redhat.com>
7447 Richard Sandiford <richard.sandiford@arm.com>
7448
7449 PR c++/55095
7450 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7451 Use EXPR_LOC_OR_LOC.
7452 (maybe_warn_shift_overflow): New function.
7453 * c-common.h (maybe_warn_shift_overflow): Declare.
7454 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7455 * c.opt (Wshift-overflow): New option.
7456
7457 2015-07-16 Martin Liska <mliska@suse.cz>
7458
7459 * c-format.c (static void check_format_info_main): Use
7460 object_allocator instead of pool_allocator.
7461 (check_format_arg): Likewise.
7462 (check_format_info_main): Likewise.
7463
7464 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
7465
7466 * c-opts.c: Remove multiline #include comment.
7467
7468 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
7469
7470 * c-common.c: Fix double word typos.
7471
7472 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7473
7474 * c-ada-spec.h (cpp_operation): Revert latest change.
7475 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7476 constructors and destructors.
7477
7478 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7479
7480 * c-common.h: Adjust includes for flags.h changes.
7481 * stub-objc.c: Likewise.
7482
7483 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7484
7485 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7486 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7487
7488 2015-07-08 Jakub Jelinek <jakub@redhat.com>
7489
7490 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7491 are to be removed, return NULL rather than original clauses list.
7492
7493 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7494
7495 * array-notation-common.c: Adjust includes.
7496 * c-ada-spec.c: Likewise.
7497 * c-cilkplus.c: Likewise.
7498 * c-common.h: Likewise.
7499 * c-cppbuiltin.c: Likewise.
7500 * c-dump.c: Likewise.
7501 * c-format.c: Likewise.
7502 * c-gimplify.c: Likewise.
7503 * c-indentation.c: Likewise.
7504 * c-lex.c: Likewise.
7505 * c-omp.c: Likewise.
7506 * c-opts.c: Likewise.
7507 * c-pch.c: Likewise.
7508 * c-ppoutput.c: Likewise.
7509 * c-pragma.c: Likewise.
7510 * c-pretty-print.c: Likewise.
7511 * c-semantics.c: Likewise.
7512 * c-ubsan.c: Likewise.
7513 * cilk.c: Likewise.
7514 * stub-objc.c: Likewise.
7515
7516 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7517
7518 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7519 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7520
7521 2015-07-01 Jason Merrill <jason@redhat.com>
7522
7523 * c-common.h (D_CXX11): Rename from D_CXX0X.
7524 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7525 * c-common.c: Adjust.
7526
7527 * c-opts.c (c_common_post_options): Default to C++14.
7528
7529 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7530
7531 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7532
7533 Implement N4197 - Adding u8 character literals
7534 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7535 CPP_CHAR.
7536 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7537 CPP_UTF8CHAR_USERDEF tokens.
7538 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7539 and CPP_UTF8CHAR tokens.
7540 (lex_charconst): Treat CPP_UTF8CHAR token.
7541
7542 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7543
7544 PR fortran/66605
7545 * c-common.c (do_warn_unused_parameter): Move here.
7546 * c-common.h (do_warn_unused_parameter): Declare.
7547
7548 2015-06-29 Marek Polacek <polacek@redhat.com>
7549
7550 PR c/66322
7551 * c-common.c (check_case_bounds): Add bool * parameter. Set
7552 OUTSIDE_RANGE_P.
7553 (c_add_case_label): Add bool * parameter. Pass it down to
7554 check_case_bounds.
7555 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7556 warning here.
7557 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7558 declarations.
7559
7560 2015-06-27 Marek Polacek <polacek@redhat.com>
7561
7562 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7563 or VECTOR_INTEGER_TYPE_P throughout.
7564 * c-gimplify.c: Likewise.
7565
7566 2015-06-26 Marek Polacek <polacek@redhat.com>
7567
7568 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7569 * c-common.c (c_fully_fold_internal): Likewise.
7570 (c_alignof_expr): Likewise.
7571 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7572 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
7573 * cilk.c (create_parm_list): Likewise.
7574
7575 2015-06-26 Marek Polacek <polacek@redhat.com>
7576
7577 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7578
7579 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7580
7581 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7582 * c-gimplify.c: Likewise.
7583 * c-pragma.c: Likewise.
7584 * c-ubsan.c: Likewise.
7585 * cilk.c: Likewise.
7586
7587 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7588
7589 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7590 ggc_hasher.
7591
7592 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7593
7594 * cilk.c: Move calls.h after tm.h in the include chain.
7595
7596 2015-06-25 Marek Polacek <polacek@redhat.com>
7597
7598 * array-notation-common.c: Use VAR_P throughout.
7599 * c-ada-spec.c: Likewise.
7600 * c-common.c: Likewise.
7601 * c-format.c: Likewise.
7602 * c-gimplify.c: Likewise.
7603 * c-omp.c: Likewise.
7604 * c-pragma.c: Likewise.
7605 * c-pretty-print.c: Likewise.
7606 * cilk.c: Likewise.
7607
7608 2015-06-25 Marek Polacek <polacek@redhat.com>
7609
7610 * cilk.c (extract_free_variables): Use is_global_var.
7611
7612 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7613
7614 * c-common.c: Don't include target-def.h.
7615
7616 2015-06-23 Marek Polacek <polacek@redhat.com>
7617
7618 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7619 when comparing INTEGER_CSTs.
7620
7621 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7622
7623 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7624 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7625 (dump_ada_template): Skip partially specialized types.
7626
7627 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7628
7629 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7630 swapping.
7631
7632 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7633
7634 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7635 * c-ada-spec.c: Likewise.
7636 * c-cilkplus.c: Likewise.
7637 * c-common.c: Likewise.
7638 * c-common.h: Likewise.
7639 * c-cppbuiltin.c: Likewise.
7640 * c-dump.c: Likewise.
7641 * c-format.c: Likewise.
7642 * c-gimplify.c: Likewise.
7643 * c-indentation.c: Likewise.
7644 * c-lex.c: Likewise.
7645 * c-omp.c: Likewise.
7646 * c-opts.c: Likewise.
7647 * c-pch.c: Likewise.
7648 * c-ppoutput.c: Likewise.
7649 * c-pragma.c: Likewise.
7650 * c-pretty-print.c: Likewise.
7651 * c-semantics.c: Likewise.
7652 * c-ubsan.c: Likewise.
7653 * cilk.c: Likewise.
7654 * stub-objc.c: Likewise.
7655
7656 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7657
7658 PR c++/65168
7659 * c-common.c (c_common_truthvalue_conversion): Warn when
7660 converting an address of a reference to a truth value.
7661
7662 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7663
7664 * array-notation-common.c : Adjust include files.
7665 * c-ada-spec.c : Likewise.
7666 * c-cilkplus.c : Likewise.
7667 * c-common.c : Likewise.
7668 * c-common.h : Likewise.
7669 * c-cppbuiltin.c : Likewise.
7670 * c-dump.c : Likewise.
7671 * c-format.c : Likewise.
7672 * c-gimplify.c : Likewise.
7673 * c-indentation.c : Likewise.
7674 * c-lex.c : Likewise.
7675 * c-omp.c : Likewise.
7676 * c-opts.c : Likewise.
7677 * c-pch.c : Likewise.
7678 * c-ppoutput.c : Likewise.
7679 * c-pragma.c : Likewise.
7680 * c-pretty-print.c : Likewise.
7681 * c-semantics.c : Likewise.
7682 * c-ubsan.c : Likewise.
7683 * cilk.c : Likewise.
7684 * stub-objc.c : Likewise.
7685
7686 2015-06-08 Marek Polacek <polacek@redhat.com>
7687
7688 PR c/66415
7689 * c-format.c (location_from_offset): Return LOC if LINE is null.
7690
7691 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7692
7693 * c-common.h (c_parse_final_cleanups): New prototype.
7694 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7695
7696 2015-06-04 Sriraman Tallam <tmsriram@google.com>
7697
7698 * c-common.c (noplt): New attribute.
7699 (handle_noplt_attribute): New handler.
7700
7701 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7702
7703 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7704 * c-ada-spec.c: Likewise.
7705 * c-cilkplus.c: Likewise.
7706 * c-common.c: Likewise.
7707 * c-common.h: Likewise.
7708 * c-cppbuiltin.c: Likewise.
7709 * c-dump.c: Likewise.
7710 * c-format.c: Likewise.
7711 * c-gimplify.c: Likewise.
7712 * c-indentation.c: Likewise.
7713 * c-lex.c: Likewise.
7714 * c-omp.c: Likewise.
7715 * c-opts.c: Likewise.
7716 * c-pch.c: Likewise.
7717 * c-ppoutput.c: Likewise.
7718 * c-pragma.c: Likewise.
7719 * c-pretty-print.c: Likewise.
7720 * c-semantics.c: Likewise.
7721 * c-ubsan.c: Likewise.
7722 * cilk.c: Likewise.
7723 * stub-objc.c: Likewise.
7724
7725 2015-06-02 David Malcolm <dmalcolm@redhat.com>
7726
7727 PR c/66220:
7728 * c-indentation.c (should_warn_for_misleading_indentation): Use
7729 expand_location rather than expand_location_to_spelling_point.
7730 Don't warn if the guarding statement is more indented than the
7731 next/body stmts.
7732
7733 2015-06-02 David Malcolm <dmalcolm@redhat.com>
7734
7735 * c-indentation.c (warn_for_misleading_indentation): Bail out
7736 immediately if -Wmisleading-indentation isn't enabled.
7737
7738 2015-06-01 Martin Liska <mliska@suse.cz>
7739
7740 * c-format.c (check_format_arg):Use new type-based pool allocator.
7741 (check_format_info_main) Likewise.
7742
7743 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7744
7745 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7746 (has_nontrivial_methods): Likewise.
7747
7748 2015-05-25 Marek Polacek <polacek@redhat.com>
7749
7750 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7751
7752 2015-05-22 Marek Polacek <polacek@redhat.com>
7753
7754 PR c/47043
7755 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7756
7757 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7758
7759 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7760 STACK_GROWS_DOWNWARD.
7761
7762 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7763
7764 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7765 STACK_GROWS_DOWNWARD rather than if it is defined.
7766
7767 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7768
7769 PR c/52952
7770 * c-format.c (location_column_from_byte_offset): New.
7771 (location_from_offset): New.
7772 (struct format_wanted_type): Add offset_loc field.
7773 (check_format_info): Move handling of location for extra arguments
7774 closer to the point of warning.
7775 (check_format_info_main): Pass the result of location_from_offset
7776 to warning_at.
7777 (format_type_warning): Pass the result of location_from_offset
7778 to warning_at.
7779
7780 2015-05-20 Marek Polacek <polacek@redhat.com>
7781
7782 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7783
7784 2015-05-20 Marek Polacek <polacek@redhat.com>
7785
7786 * c-ada-spec.c (dump_sloc): Use DECL_P.
7787
7788 2015-05-20 Marek Polacek <polacek@redhat.com>
7789
7790 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7791 * c-common.c: Likewise.
7792
7793 2015-05-19 David Malcolm <dmalcolm@redhat.com>
7794
7795 * c-common.h (fe_file_change): Strengthen param from
7796 const line_map * to const line_map_ordinary *.
7797 (pp_file_change): Likewise.
7798 * c-lex.c (fe_file_change): Likewise.
7799 (cb_define): Use linemap_check_ordinary when invoking
7800 SOURCE_LINE.
7801 (cb_undef): Likewise.
7802 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7803 invoking cb_file_change.
7804 (c_finish_options): Likewise.
7805 (push_command_line_include): Likewise.
7806 (cb_file_change): Strengthen param "new_map" from
7807 const line_map * to const line_map_ordinary *.
7808 * c-ppoutput.c (cb_define): Likewise for local "map".
7809 (pp_file_change): Likewise for param "map" and local "from".
7810
7811 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7812
7813 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7814
7815 2015-05-18 Tom de Vries <tom@codesourcery.com>
7816
7817 * c-common.c (build_va_arg_1): New function.
7818 (build_va_arg): Add address operator to va_list operand if necessary.
7819
7820 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7821
7822 PR c/48956
7823 * c-common.c (int_safely_convertible_to_real_p): Define.
7824 (unsafe_conversion_p): Check conversions involving complex types.
7825 (conversion_warning): Add new warning message for conversions which
7826 discard imaginary component.
7827 * c-common.h: (enum conversion_safety): Add new enumerator for such
7828 conversions.
7829
7830 2015-05-14 Marek Polacek <polacek@redhat.com>
7831
7832 PR c/66066
7833 PR c/66127
7834 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7835 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7836 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7837 use it. If FOR_INT_CONST, require that all evaluated operands be
7838 INTEGER_CSTs.
7839
7840 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7841
7842 * c-common.h (warn_for_misleading_indentation): New prototype.
7843 * c-indentation.c: New file.
7844 * c.opt (Wmisleading-indentation): New option.
7845
7846 2015-05-12 Tom de Vries <tom@codesourcery.com>
7847
7848 PR tree-optimization/66010
7849 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7850
7851 2015-05-09 Jason Merrill <jason@redhat.com>
7852
7853 * c-opts.c (c_common_post_options): Also clear
7854 cpp_opts->cpp_warn_cxx11_compat.
7855
7856 * c-common.h (enum cxx_dialect): Add cxx_unset.
7857 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7858 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7859
7860 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7861 (std=gnu++0x): Mark as Undocumented.
7862 (std=gnu++1y): Add deprecated message.
7863
7864 2015-05-08 Jason Merrill <jason@redhat.com>
7865
7866 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7867 * c-opts.c: Adjust.
7868
7869 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7870
7871 2015-05-08 Marek Polacek <polacek@redhat.com>
7872
7873 PR c/64918
7874 * c.opt (Woverride-init-side-effects): New option.
7875
7876 2015-05-07 Marek Polacek <polacek@redhat.com>
7877
7878 PR c/65179
7879 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7880 negative value.
7881 * c.opt (Wshift-negative-value): New option.
7882 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7883 when -Wextra and C99/C++11 mode.
7884
7885 2015-05-07 Marek Polacek <polacek@redhat.com>
7886 Martin Uecker <uecker@eecs.berkeley.edu>
7887
7888 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7889 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7890
7891 2015-05-05 Jason Merrill <jason@redhat.com>
7892
7893 * c.opt (Wterminate): New.
7894
7895 2015-04-30 Marek Polacek <polacek@redhat.com>
7896
7897 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7898 require that the non-constant be of a boolean type.
7899
7900 2015-04-29 Josh Triplett <josh@joshtriplett.org>
7901
7902 * c-common.c (handle_section_attribute): Refactor to reduce
7903 nesting and distinguish between error cases.
7904
7905 2015-04-29 Marek Polacek <polacek@redhat.com>
7906
7907 PR c/64610
7908 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7909 with 0/1.
7910
7911 2015-04-29 Jakub Jelinek <jakub@redhat.com>
7912
7913 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7914 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7915 HOST_BITS_PER_WIDE_INT.
7916
7917 2015-04-28 Tom de Vries <tom@codesourcery.com>
7918
7919 PR tree-optimization/65887
7920 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7921
7922 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
7923 Pierre-Marie de Rodat <derodat@adacore.com>
7924
7925 * c-ada-spec.c (in_function): Delete.
7926 (dump_generic_ada_node): Do not change in_function and remove the
7927 redundant code dealing with it.
7928 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7929 (print_ada_methods): Output the static member functions in a nested
7930 package after the regular methods as well as associated renamings.
7931
7932 2015-04-24 Marek Polacek <polacek@redhat.com>
7933
7934 PR c/65830
7935 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7936 and OPT_Wshift_count_overflow.
7937
7938 PR c/63357
7939 * c-common.c (warn_logical_operator): Warn if the operands have the
7940 same expressions.
7941
7942 2015-04-24 Marek Polacek <polacek@redhat.com>
7943
7944 PR c/61534
7945 * c-common.c (warn_logical_operator): Bail if either operand comes
7946 from a macro expansion.
7947
7948 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7949
7950 PR target/55143
7951 * c-common.c (c_default_pointer_mode): Add definition.
7952 * c-common.h (c_default_pointer_mode): Add declaration.
7953
7954 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7955
7956 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7957 on record_builtin_type argument.
7958
7959 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7960
7961 PR c/65120
7962 * c-common.c (warn_logical_not_parentheses): Don't warn for
7963 !x == 0 or !x != 0.
7964
7965 2015-03-07 Marek Polacek <polacek@redhat.com>
7966
7967 PR sanitizer/65280
7968 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7969 before trying to figure out whether we have a flexible array member.
7970
7971 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
7972 Jonathan Wakely <jwakely.gcc@gmail.com>
7973
7974 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7975
7976 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7977
7978 PR ada/65319
7979 * c-ada-spec.c (print_destructor): Remove obsolete code.
7980
7981 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7982
7983 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7984 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7985 DECL_TEMPLATE_RESULT emulations.
7986 (dump_ada_template)): Add guard for TYPE_METHODS.
7987
7988 2015-02-27 Marek Polacek <polacek@redhat.com>
7989
7990 PR c/65040
7991 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7992
7993 2015-02-27 Kai Tietz <ktietz@redhat.com>
7994
7995 PR c/35330
7996 * c-pragma.c (handle_pragma_weak): Do not try to create
7997 weak/alias of declarations not being function, or variable
7998 declarations.
7999
8000 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8001
8002 PR libgomp/64625
8003 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8004 Remove macros.
8005 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8006
8007 2015-02-16 Marek Polacek <polacek@redhat.com>
8008
8009 PR c/65066
8010 * c-format.c (check_format_types): Handle null param.
8011
8012 2015-02-13 Marek Polacek <polacek@redhat.com>
8013
8014 PR c/65040
8015 * c-format.c (check_format_types): Don't warn about different
8016 signedness if the original value is in the range of WANTED_TYPE.
8017
8018 2015-02-12 Jason Merrill <jason@redhat.com>
8019
8020 PR c++/64956
8021 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8022 to the current highest version.
8023 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8024
8025 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8026
8027 PR c/64824
8028 PR c/64868
8029 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8030 instead of RDIV_EXPR. Use build_binary_op instead of
8031 build2_loc.
8032
8033 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8034
8035 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8036 to pass input_location as first argument.
8037
8038 2015-01-23 Tom de Vries <tom@codesourcery.com>
8039
8040 PR libgomp/64672
8041 * c.opt (fopenacc): Mark as LTO option.
8042
8043 2015-01-23 Tom de Vries <tom@codesourcery.com>
8044
8045 PR libgomp/64707
8046 * c.opt (fopenmp): Mark as LTO option.
8047
8048 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8049
8050 PR c/63307
8051 * cilk.c (fill_decls_vec): Only put decls into vector v.
8052 (compare_decls): Fix up formatting.
8053
8054 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8055
8056 PR c/63307
8057 * cilk.c: Include vec.h.
8058 (struct cilk_decls): New structure.
8059 (wrapper_parm_cb): Split this function to...
8060 (fill_decls_vec): ...this...
8061 (create_parm_list): ...and this.
8062 (compare_decls): New function.
8063 (for_local_cb): Remove.
8064 (wrapper_local_cb): Ditto.
8065 (build_wrapper_type): For now first traverse and fill vector of
8066 declarations then sort it and then deal with sorted vector.
8067 (cilk_outline): Ditto.
8068 (declare_one_free_variable): Ditto.
8069
8070 2015-01-21 Jason Merrill <jason@redhat.com>
8071
8072 PR c++/64629
8073 * c-format.c (check_format_arg): Call decl_constant_value.
8074
8075 2015-01-19 Martin Liska <mliska@suse.cz>
8076
8077 * c-common.c (handle_noicf_attribute): New function.
8078
8079 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8080 Bernd Schmidt <bernds@codesourcery.com>
8081 James Norris <jnorris@codesourcery.com>
8082 Cesar Philippidis <cesar@codesourcery.com>
8083 Ilmir Usmanov <i.usmanov@samsung.com>
8084 Jakub Jelinek <jakub@redhat.com>
8085
8086 * c.opt (fopenacc): New option.
8087 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8088 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8089 New macros.
8090 * c-common.h (c_finish_oacc_wait): New prototype.
8091 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8092 (c_finish_oacc_wait): New function.
8093 * c-pragma.c (oacc_pragmas): New variable.
8094 (c_pp_lookup_pragma, init_pragma): Handle it.
8095 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8096 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8097 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8098 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8099 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8100 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8101 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8102 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8103 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8104 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8105 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8106 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8107 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8108 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8109 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8110 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8111 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8112 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8113 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8114 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8115 PRAGMA_OACC_CLAUSE_WORKER.
8116
8117 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8118
8119 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8120 for the new option fstack-protector_explicit.
8121 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8122 (handle_stack_protect_attribute): New function.
8123
8124 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8125
8126 * c.opt: New option -Warray-bounds=.
8127
8128 2015-01-09 Michael Collison <michael.collison@linaro.org>
8129
8130 * array-notation-common.c: Include hash-set.h, machmode.h,
8131 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8132 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8133 * c-ada-spec.c: Ditto.
8134 * c-cilkplus.c: Ditto.
8135 * c-common.c: Include input.h due to flattening of tree.h.
8136 Define macro GCC_C_COMMON_C.
8137 * c-common.h: Flatten tree.h header files into c-common.h.
8138 Remove include of tree-core.h.
8139 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8140 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8141 fold-const.h, wide-int.h, and inchash.h due to
8142 flattening of tree.h.
8143 * c-dump.c: Ditto.
8144 * c-format.c: Flatten tree.h header files into c-common.h.
8145 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8146 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8147 fold-const.h, wide-int.h, and inchash.h due to
8148 flattening of tree.h.
8149 * c-dump.c: Include hash-set.h, machmode.h,
8150 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8151 fold-const.h, wide-int.h, and inchash.h due to
8152 flattening of tree.h.
8153 * c-format.c: Include hash-set.h, machmode.h,
8154 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8155 fold-const.h, wide-int.h, inchash.h and real.h due to
8156 flattening of tree.h.
8157 * c-gimplify.c: Include hash-set.h, machmode.h,
8158 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8159 fold-const.h, wide-int.h, and inchash.h due to
8160 flattening of tree.h.
8161 * cilk.c: Ditto.
8162 * c-lex.c: Ditto.
8163 * c-omp.c: Ditto.
8164 * c-opts.c: Ditto.
8165 * c-pch.c: Ditto.
8166 * c-ppoutput.c: Ditto.
8167 * c-pragma.c: Ditto.
8168 * c-pretty-print.c: Ditto.
8169 * c-semantics.c: Ditto.
8170 * c-ubsan.c: Ditto.
8171 * stub-objc.c: Ditto.
8172
8173 2015-01-08 Jason Merrill <jason@redhat.com>
8174
8175 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8176 do_ubsan_in_current_function.
8177 (ubsan_maybe_instrument_reference_or_call): Likewise.
8178 * c-ubsan.h: Declare it.
8179
8180 2015-01-08 Mike Stump <mikestump@comcast.net>
8181
8182 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8183
8184 2015-01-07 Marek Polacek <polacek@redhat.com>
8185
8186 PR c/64440
8187 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8188 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8189
8190 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8191
8192 PR c++/31397
8193 * c.opt (Wsuggest-override): New option.
8194
8195 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8196
8197 Update copyright years.
8198
8199 2015-01-05 Marek Polacek <polacek@redhat.com>
8200
8201 PR c/64423
8202 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8203 parameter. Use it.
8204 * c-common.h (warn_array_subscript_with_type_char): Update
8205 declaration.
8206
8207 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8208
8209 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8210 Control macro with flag_sized_deallocation.
8211
8212 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8213
8214 * c.opt (Wdiscarded-array-qualifiers): New option.
8215
8216 2014-12-19 Jakub Jelinek <jakub@redhat.com>
8217
8218 PR preprocessor/63831
8219 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8220 and __has_cpp_attribute here.
8221 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8222 c_common_has_attribute.
8223 * c-common.h (c_common_has_attribute): New prototype.
8224 * c-lex.c (init_c_lex): Set cb->has_attribute to
8225 c_common_has_attribute instead of cb_has_attribute.
8226 (get_token_no_padding): New function.
8227 (cb_has_attribute): Renamed to ...
8228 (c_common_has_attribute): ... this. No longer static. Use
8229 get_token_no_padding, require ()s, don't build TREE_LIST
8230 unnecessarily, fix up formatting, adjust diagnostics, call
8231 init_attributes.
8232
8233 2014-12-15 Jason Merrill <jason@redhat.com>
8234
8235 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8236 (-Wsized-deallocation): New.
8237 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8238 to on in C++14 and up.
8239
8240 2014-12-11 Jason Merrill <jason@redhat.com>
8241
8242 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8243
8244 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8245 we aren't complaining about VLAs.
8246
8247 2014-12-06 Marek Polacek <polacek@redhat.com>
8248
8249 PR tree-optimization/64183
8250 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8251 shift-expression if it is integer_type_node. Use types_compatible_p.
8252
8253 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8254
8255 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8256 last argument from create_tmp_var_raw and create_tmp_var calls.
8257 * cilk.c (gimplify_cilk_spawn): Likewise.
8258 * c-omp.c (c_finish_omp_atomic): Likewise.
8259
8260 2014-11-28 Marek Polacek <polacek@redhat.com>
8261
8262 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8263 instead of unsigned_type_node.
8264
8265 2014-11-28 Marek Polacek <polacek@redhat.com>
8266
8267 PR c/63862
8268 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8269 to op1_utype.
8270 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8271 expression to unsigned_type_node.
8272
8273 2014-11-20 Mark Wielaard <mjw@redhat.com>
8274
8275 PR debug/38757
8276 * c-opts.c (set_std_c89): Set lang_hooks.name.
8277 (set_std_c99): Likewise.
8278 (set_std_c11): Likewise.
8279 (set_std_cxx98): Likewise.
8280 (set_std_cxx11): Likewise.
8281 (set_std_cxx14): Likewise.
8282 (set_std_cxx1z): Likewise.
8283
8284 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8285
8286 PR target/63764
8287 * c-common.h (convert_vector_to_pointer_for_subscript): Change
8288 return type to bool.
8289 * c-common.c: Include gimple-expr.h.
8290 (convert_vector_to_pointer_for_subscript): Change return type to
8291 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8292 and copy it into a TARGET_EXPR and use that instead of *vecp
8293 directly.
8294
8295 2014-11-19 David Malcolm <dmalcolm@redhat.com>
8296
8297 Merger of git branch "gimple-classes-v2-option-3".
8298 * ChangeLog.gimple-classes: New.
8299 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8300 from being just a vec<gimple> to a vec<gbind *>.
8301
8302 2014-11-18 Jakub Jelinek <jakub@redhat.com>
8303
8304 PR sanitizer/63813
8305 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8306 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8307 get_pointer_alignment for non-pointers. Use ptype, or if it is
8308 reference type, corresponding pointer type, as type of kind
8309 argument.
8310 (ubsan_maybe_instrument_reference,
8311 ubsan_maybe_instrument_member_call): Adjust callers.
8312
8313 2014-11-15 Marek Polacek <polacek@redhat.com>
8314
8315 PR middle-end/63884
8316 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8317 for NULL fndecl.
8318 (extract_array_notation_exprs): Return for NULL node.
8319
8320 2014-11-12 Joseph Myers <joseph@codesourcery.com>
8321
8322 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8323 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8324
8325 2014-11-12 Jakub Jelinek <jakub@redhat.com>
8326
8327 PR c/59708
8328 * c-common.c (check_builtin_function_arguments): Handle
8329 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8330
8331 2014-11-10 Andi Kleen <ak@linux.intel.com>
8332
8333 PR c/60804
8334 * c-common.h (check_no_cilk): Declare.
8335 * cilk.c (get_error_location): New function.
8336 (check_no_cilk): Dito.
8337
8338 2014-11-10 Andi Kleen <ak@linux.intel.com>
8339
8340 * cilk.c (recognize_spawn): Use expression location
8341 for error message.
8342
8343 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8344
8345 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8346
8347 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8348
8349 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8350 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8351 (__cpp_range_based_for, __cpp_initializer_lists,
8352 __cpp_delegating_constructors, __cpp_nsdmi,
8353 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8354 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8355 __has_cpp_attribute.
8356 * c-lex.c (cb_has_attribute): New callback CPP function;
8357 (init_c_lex): Set has_attribute callback.
8358
8359 2014-11-04 Richard Biener <rguenther@suse.de>
8360
8361 * c-common.c (shorten_compare): Do not shorten mixed
8362 DFP and non-DFP compares.
8363
8364 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8365
8366 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8367 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8368 Commentary and rearrangement of tests.
8369 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8370 Commentary and rearrangement of tests.
8371 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8372 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8373
8374 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8375
8376 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8377 enum from machine_mode.
8378
8379 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8380
8381 * c-common.c: Adjust include files.
8382 * c-gimplify.c: Ditto.
8383 * cilk.c: Ditto.
8384 * c-pragma.c: Ditto.
8385 * c-ubsan.c: Ditto.
8386
8387 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8388
8389 * c-gimplify.c: Adjust include files.
8390
8391 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8392
8393 PR c++/53061
8394 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8395 c_common_initialize_diagnostics.
8396 * c-common.h: Likewise.
8397
8398 2014-10-24 Marek Polacek <polacek@redhat.com>
8399
8400 PR c/56980
8401 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8402 print "struct"/"union"/"enum" for typedefed names.
8403
8404 2014-10-23 Marek Polacek <polacek@redhat.com>
8405
8406 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8407 in unsigned type.
8408
8409 2014-10-22 Jakub Jelinek <jakub@redhat.com>
8410 Yury Gribov <y.gribov@samsung.com>
8411
8412 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8413 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8414 instead of flag_sanitize_recover as bool flag.
8415
8416 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8417
8418 * cilk.c: Revert previous change.
8419
8420 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8421
8422 PR c/63307
8423 * cilk.c: Include vec.h.
8424 (struct cilk_decls): New structure.
8425 (wrapper_parm_cb): Split this function to...
8426 (fill_decls_vec): ...this...
8427 (create_parm_list): ...and this.
8428 (compare_decls): New function.
8429 (for_local_cb): Remove.
8430 (wrapper_local_cb): Ditto.
8431 (build_wrapper_type): For now first traverse and fill vector of
8432 declarations then sort it and then deal with sorted vector.
8433 (cilk_outline): Ditto.
8434 (declare_one_free_variable): Ditto.
8435
8436 2014-10-17 Marek Polacek <polacek@redhat.com>
8437
8438 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8439 * c.opt (Wimplicit-int): Initialize to -1.
8440
8441 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8442
8443 * c-pragma.c: Adjust include files.
8444 * c-semantics.c: Likewise.
8445
8446 2014-10-16 DJ Delorie <dj@redhat.com>
8447
8448 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8449 multiples of bytes.
8450
8451 2014-10-14 Jason Merrill <jason@redhat.com>
8452
8453 PR c++/63455
8454 * c-common.h (CPP_PREPARSED_EXPR): New.
8455 (N_CP_TTYPES): Adjust.
8456
8457 2014-10-15 Marek Polacek <polacek@redhat.com>
8458
8459 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8460
8461 2014-10-14 DJ Delorie <dj@redhat.com>
8462
8463 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8464 types, not just __int128.
8465 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8466 types, not just __int128.
8467 (cpp_atomic_builtins): Round pointer sizes up.
8468 (type_suffix): Use type precision, not specific types.
8469 * c-common.c (c_common_reswords): Remove __int128 special case.
8470 (c_common_type_for_size): Check for all __intN types, not just
8471 __int128.
8472 (c_common_type_for_mode): Likewise.
8473 (c_common_signed_or_unsigned_type): Likewise.
8474 (c_build_bitfield_integer_type): Likewise.
8475 (c_common_nodes_and_builtins): Likewise.
8476 (keyword_begins_type_specifier): Likewise.
8477 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8478 __intN variants.
8479
8480 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8481
8482 * c-common.c: Use hash_table instead of hashtab.
8483
8484 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8485
8486 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8487 C++11 section.
8488
8489 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
8490
8491 PR c++/54427
8492 PR c++/57198
8493 PR c++/58845
8494 * c-common.c (warn_logical_operator): Punt for vectors.
8495
8496 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8497
8498 Implement SD-6: SG10 Feature Test Recommendations
8499 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8500 macros and the __has_header macro.
8501
8502 2014-09-30 Jason Merrill <jason@redhat.com>
8503
8504 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8505 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8506 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8507
8508 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8509 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8510
8511 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8512 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8513
8514 2014-09-24 Marek Polacek <polacek@redhat.com>
8515
8516 PR c/61405
8517 PR c/53874
8518 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8519
8520 2014-09-23 Andi Kleen <ak@linux.intel.com>
8521
8522 * c-common.c (handle_no_reorder_attribute): New function.
8523 (c_common_attribute_table): Add no_reorder attribute.
8524
8525 2014-09-22 Joseph Myers <joseph@codesourcery.com>
8526
8527 * c-cppbuiltin.c (c_cpp_builtins): Define
8528 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8529 modes.
8530
8531 2014-09-18 Joseph Myers <joseph@codesourcery.com>
8532
8533 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8534 for supported floating-point modes.
8535
8536 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8537
8538 * c.opt (Wpsabi): Use LangEnabledBy.
8539 * c-opts.c (c_common_handle_option): Do not handle here.
8540
8541 2014-09-12 Joseph Myers <joseph@codesourcery.com>
8542
8543 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8544 macros for floating-point modes.
8545
8546 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
8547
8548 PR target/58757
8549 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8550 __*_DENORM_MIN__ without denormals.
8551
8552 2014-09-10 Jakub Jelinek <jakub@redhat.com>
8553
8554 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8555 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8556 ubsan_create_data callers.
8557 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8558 index is constant or BIT_AND_EXPR with constant mask and is
8559 small enough for the bound.
8560 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8561 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8562
8563 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8564
8565 * c.opt: Add CppReason to various flags.
8566 (Wdate-time): Re-sort.
8567 * c-common.c: Include c-common.h earlier.
8568 (struct reason_option_codes_t): Delete.
8569 (c_option_controlling_cpp_error): Prefix global type and struct
8570 with cpp_.
8571
8572 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8573
8574 * c.opt (Wnormalized): New.
8575 (Wnormalized=): Use Enum and Reject Negative.
8576 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8577
8578 2014-09-08 Joseph Myers <joseph@codesourcery.com>
8579
8580 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8581 digits of floating-point modes if -fbuilding-libgcc.
8582
8583 2014-09-05 Joseph Myers <joseph@codesourcery.com>
8584
8585 * c-cppbuiltin.c (c_cpp_builtins): Also define
8586 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8587 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8588 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8589 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8590 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8591 __LIBGCC_STACK_GROWS_DOWNWARD__,
8592 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8593 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8594 __LIBGCC_DWARF_FRAME_REGISTERS__,
8595 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8596 __LIBGCC_STACK_POINTER_REGNUM__ and
8597 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8598 (builtin_define_with_value): Handle backslash-escaping in string
8599 macro values.
8600
8601 2014-09-05 Richard Biener <rguenther@suse.de>
8602
8603 PR middle-end/63148
8604 * c-format.c (check_format_arg): Properly handle
8605 effectively signed POINTER_PLUS_EXPR offset.
8606
8607 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8608
8609 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8610 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8611 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8612 and Init.
8613 * c-opts.c (c_common_handle_option): Do not handle here.
8614 (sanitize_cpp_opts): Likewise.
8615 * c-common.c (struct reason_option_codes_t): Handle
8616 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8617
8618 2014-09-03 Marek Polacek <polacek@redhat.com>
8619
8620 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8621
8622 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8623 Balaji V. Iyer <balaji.v.iyer@intel.com>
8624 Igor Zamyatin <igor.zamyatin@intel.com>
8625
8626 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8627 * c-common.c (c_common_reswords): Added _Cilk_for.
8628 * c-common.h (enum rid): Added RID_CILK_FOR.
8629 (cilk_for_number_of_iterations): Add declaration.
8630 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8631 CILK_FOR.
8632 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8633 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8634
8635 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8636
8637 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8638 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8639 Wundef): Use CPP, Var and Init.
8640 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8641
8642 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8643
8644 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8645 * c-opts.c (c_common_handle_option): Do not handle here.
8646
8647 2014-08-25 Jason Merrill <jason@redhat.com>
8648
8649 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8650 -std=c++14 and -std=gnu++14, rather than the reverse.
8651 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8652 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8653 * c-common.h (cxx_dialect): Remove cxx1y.
8654
8655 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8656
8657 * c-common.h (enum cxx_dialect): Add cxx14.
8658 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8659 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8660 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8661
8662 2014-08-22 Jason Merrill <jason@redhat.com>
8663
8664 * c.opt (std=gnu++17): Fix alias.
8665
8666 2014-08-22 Marek Polacek <polacek@redhat.com>
8667
8668 PR c++/62199
8669 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8670 check for vector types. Drop LHS argument.
8671 * c-common.h (warn_logical_not_parentheses): Adjust.
8672
8673 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8674
8675 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8676 (Wmultichar): Likewise.
8677 (Wdate-time): Use C-family languages instead of Common. Use CPP
8678 and Var.
8679 * c-opts.c (c_common_handle_option): Do not handle the above
8680 options here.
8681 (sanitize_cpp_opts): Likewise.
8682
8683 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8684
8685 PR fortran/44054
8686 * c-opts.c: Include tree-diagnostics.h.
8687 (c_diagnostic_finalizer): New.
8688 (c_common_initialize_diagnostics): Use it.
8689
8690 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8691
8692 PR preprocessor/51303
8693 * c-common.c (struct reason_option_codes_t option_codes):
8694 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8695
8696 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8697
8698 PR c/60975
8699 PR c/53063
8700 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8701 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8702 (c_common_post_options): Call init_global_opts_from_cpp.
8703 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8704
8705 2014-08-19 Marek Polacek <polacek@redhat.com>
8706
8707 PR c++/62153
8708 * c-common.c (maybe_warn_bool_compare): New function.
8709 * c-common.h (maybe_warn_bool_compare): Declare.
8710 * c.opt (Wbool-compare): New option.
8711
8712 2014-08-19 Marek Polacek <polacek@redhat.com>
8713
8714 * c.opt (Wc99-c11-compat): New option.
8715
8716 2014-08-19 Marek Polacek <polacek@redhat.com>
8717
8718 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8719 to warn_c90_c99_compat.
8720 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8721 to -1.
8722
8723 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8724 Steven Bosscher <steven@gcc.gnu.org>
8725
8726 PR c/52952
8727 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8728 format_check_results.
8729 (check_function_format): Use true and add comment for boolean
8730 argument.
8731 (finish_dollar_format_checking): Use explicit location when warning.
8732 (check_format_info): Likewise.
8733 (check_format_arg): Set extra_arg_loc and format_string_loc.
8734 (check_format_info_main): Use explicit location when warning.
8735 (check_format_types): Pass explicit location.
8736 (format_type_warning): Likewise.
8737
8738 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8739
8740 PR fortran/44054
8741 * c-format.c: Handle Fortran flags.
8742
8743 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8744
8745 PR other/61962
8746 * array-notation-common.c (find_rank): Added handling for other
8747 types of references.
8748
8749 2014-08-10 Marek Polacek <polacek@redhat.com>
8750
8751 PR c/51849
8752 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8753 * c.opt (Wc90-c99-compat): Add option.
8754
8755 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8756
8757 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8758
8759 2014-08-03 Marek Polacek <polacek@redhat.com>
8760
8761 * c-common.c (check_case_value): Add location_t parameter. Use it.
8762 (c_add_case_label): Pass loc to check_case_value.
8763
8764 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8765
8766 * cilk.c: Use hash_map instead of pointer_map.
8767
8768 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8769
8770 * c-gimplify.c: Use hash_set instead of pointer_set.
8771
8772 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8773
8774 PR middle-end/61455
8775 * array-notation-common.c (extract_array_notation_exprs): Handling
8776 of DECL_EXPR added.
8777
8778 2014-08-01 Jakub Jelinek <jakub@redhat.com>
8779
8780 * c-common.h (min_align_of_type): Removed prototype.
8781 * c-common.c (min_align_of_type): Removed.
8782 * c-ubsan.h (ubsan_maybe_instrument_reference,
8783 ubsan_maybe_instrument_member_call): New prototypes.
8784 * c-ubsan.c: Include stor-layout.h and builtins.h.
8785 (ubsan_maybe_instrument_reference_or_call,
8786 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8787 functions.
8788
8789 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8790
8791 PR c++/60517
8792 * c.opt (-Wreturn-local-addr): Move to common.opt.
8793
8794 2014-07-30 Jason Merrill <jason@redhat.com>
8795
8796 PR c++/61659
8797 PR c++/61687
8798 Revert:
8799 * c.opt (-fuse-all-virtuals): New.
8800
8801 2014-07-30 Tom Tromey <tromey@redhat.com>
8802
8803 PR c/59855
8804 * c.opt (Wdesignated-init): New option.
8805 * c-common.c (c_common_attribute_table): Add "designated_init".
8806 (handle_designated_init): New function.
8807
8808 2014-07-24 Marek Polacek <polacek@redhat.com>
8809
8810 PR c/57653
8811 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8812
8813 2014-07-16 Dodji Seketeli <dodji@redhat.com>
8814
8815 PR preprocessor/60723 - missing system-ness marks for macro tokens
8816 * c-ppoutput.c (struct print::prev_was_system_token): New data
8817 member.
8818 (init_pp_output): Initialize it.
8819 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8820 (do_line_change): Return a flag saying if a line marker was
8821 emitted or not.
8822 (scan_translation_unit): Detect if the system-ness of the token we
8823 are about to emit is different from the one of the previously
8824 emitted token. If so, emit a line marker. Avoid emitting useless
8825 adjacent line markers. Avoid emitting line markers for tokens
8826 originating from the expansion of built-in macros.
8827 (scan_translation_unit_directives_only): Adjust.
8828
8829 2014-07-15 Marek Polacek <polacek@redhat.com>
8830
8831 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8832 TYPE_MAX_VALUE is NULL.
8833
8834 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8835
8836 PR middle-end/61294
8837 * c.opt (Wmemset-transposed-args): New warning.
8838
8839 2014-07-10 Jason Merrill <jason@redhat.com>
8840
8841 PR c++/61659
8842 PR c++/61687
8843 * c.opt (-fuse-all-virtuals): New.
8844
8845 2014-07-09 Richard Biener <rguenther@suse.de>
8846
8847 PR c-family/61741
8848 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8849 using unsigned arithmetic if overflow does not wrap instead of
8850 if overflow is undefined.
8851
8852 2014-07-06 Marek Polacek <polacek@redhat.com>
8853
8854 PR c/6940
8855 * c.opt (Wsizeof-array-argument): New option.
8856
8857 2014-07-03 Jakub Jelinek <jakub@redhat.com>
8858
8859 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
8860 comments->count <= 1, as comments->entries might be NULL.
8861
8862 2014-07-01 Marek Polacek <polacek@redhat.com>
8863
8864 * c.opt (Wint-conversion): New option.
8865
8866 2014-07-01 Marek Polacek <polacek@redhat.com>
8867
8868 PR c/58286
8869 * c.opt (Wincompatible-pointer-types): New option.
8870
8871 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8872
8873 PR c++/51400
8874 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8875 Do not discard TYPE_QUALS of type.
8876
8877 2014-06-26 Jason Merrill <jason@redhat.com>
8878
8879 * c-common.h (enum cxx_dialect): Add cxx1z.
8880 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8881 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8882
8883 2014-06-26 Teresa Johnson <tejohnson@google.com>
8884
8885 * c-common.h (get_dump_info): Declare.
8886 * c-gimplify.c (c_genericize): Use saved dump files.
8887 * c-opts.c (c_common_parse_file): Begin and end dumps
8888 once around parsing invocation.
8889 (get_dump_info): New function.
8890
8891 2014-06-23 Marek Polacek <polacek@redhat.com>
8892 Andrew MacLeod <amacleod@redhat.com>
8893
8894 PR c/61553
8895 * c-common.c (get_atomic_generic_size): Don't segfault if the
8896 type doesn't have a size.
8897
8898 2014-06-20 Marek Polacek <polacek@redhat.com>
8899
8900 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8901 (ubsan_walk_array_refs_r): New function.
8902 (c_genericize): Instrument array bounds.
8903 * c-ubsan.c: Include "internal-fn.h".
8904 (ubsan_instrument_division): Mark instrumented arrays as having
8905 side effects. Adjust ubsan_type_descriptor call.
8906 (ubsan_instrument_shift): Likewise.
8907 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8908 (ubsan_instrument_bounds): New function.
8909 (ubsan_array_ref_instrumented_p): New function.
8910 (ubsan_maybe_instrument_array_ref): New function.
8911 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8912 (ubsan_array_ref_instrumented_p): Declare.
8913 (ubsan_maybe_instrument_array_ref): Declare.
8914
8915 2014-06-20 Hale Wang <hale.wang@arm.com>
8916
8917 PR lto/61123
8918 * c.opt (fshort-enums): Add to LTO.
8919 * c.opt (fshort-wchar): Likewise.
8920
8921 2014-06-16 Marek Polacek <polacek@redhat.com>
8922
8923 PR c/60439
8924 * c.opt (Wswitch-bool): Add Var.
8925
8926 2014-06-12 Jakub Jelinek <jakub@redhat.com>
8927
8928 PR middle-end/61486
8929 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8930 #pragma omp target teams or
8931 #pragma omp {,target }teams distribute simd.
8932
8933 2014-06-12 Jason Merrill <jason@redhat.com>
8934
8935 * c.opt (Wabi=, fabi-compat-version): New.
8936 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8937 (c_common_post_options): Handle flag_abi_compat_version default.
8938 Disallow -fabi-compat-version=1.
8939 * c-common.h (abi_version_crosses): New.
8940
8941 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
8942
8943 * c-common.c (handle_section_attribute): Update handling for
8944 section names that are no longer trees.
8945
8946 2014-06-10 Jakub Jelinek <jakub@redhat.com>
8947
8948 PR fortran/60928
8949 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8950 (omp_pragmas): ... back here.
8951
8952 2014-06-05 Marek Polacek <polacek@redhat.com>
8953
8954 PR c/49706
8955 * c-common.c (warn_logical_not_parentheses): New function.
8956 * c-common.h (warn_logical_not_parentheses): Declare.
8957 * c.opt (Wlogical-not-parentheses): New option.
8958
8959 2014-06-04 Marek Polacek <polacek@redhat.com>
8960
8961 PR c/30020
8962 * c-common.c (check_case_bounds): Add location parameter.
8963 Use it.
8964 (c_add_case_label): Pass loc to check_case_bounds.
8965
8966 2014-06-03 Marek Polacek <polacek@redhat.com>
8967
8968 PR c/60439
8969 * c.opt (Wswitch-bool): New option.
8970
8971 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8972
8973 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8974 Remove prototypes.
8975 (record_types_used_by_current_var_decl): Move prototype to where
8976 it belongs.
8977
8978 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8979 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8980 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8981
8982 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8983
8984 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8985 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8986 void_zero_node.
8987 * c-pretty-print.c (pp_c_void_constant): New function.
8988 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8989 (c_pretty_printer::expression): Handle VOID_CST.
8990 * cilk.c (extract_free_variables): Likewise.
8991 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8992 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8993
8994 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8995
8996 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8997 * c-pragma.c (push_alignment): Adjust.
8998 (handle_pragma_push_options): Likewise.
8999
9000 2014-05-09 Marek Polacek <polacek@redhat.com>
9001
9002 PR c/50459
9003 * c-common.c (check_user_alignment): Return -1 if alignment is error
9004 node.
9005 (handle_aligned_attribute): Don't call default_conversion on
9006 FUNCTION_DECLs.
9007 (handle_vector_size_attribute): Likewise.
9008 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9009 (handle_sentinel_attribute): Call default_conversion and allow even
9010 integral types as an argument.
9011
9012 2014-05-08 Marek Polacek <polacek@redhat.com>
9013
9014 PR c/61053
9015 * c-common.c (min_align_of_type): New function factored out from...
9016 (c_sizeof_or_alignof_type): ...here.
9017 * c-common.h (min_align_of_type): Declare.
9018
9019 2014-05-08 Marek Polacek <polacek@redhat.com>
9020
9021 PR c/61077
9022 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9023 parameter type of main.
9024
9025 2014-05-07 DJ Delorie <dj@redhat.com>
9026
9027 * c-cppbuiltin.c (print_bits_of_hex): New.
9028 (builtin_define_type_minmax): Print values using hex so as not to
9029 require a pre-computed list of string values.
9030
9031 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9032 Mike Stump <mikestump@comcast.net>
9033 Richard Sandiford <rdsandiford@googlemail.com>
9034
9035 * c-ada-spec.c: Include wide-int.h.
9036 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9037 (dump_generic_ada_node): Use wide-int interfaces.
9038 * c-common.c: Include wide-int-print.h.
9039 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9040 (pointer_int_sum): Use wide-int interfaces.
9041 (c_common_nodes_and_builtins): Use make_int_cst.
9042 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9043 (handle_alloc_size_attribute): Use wide-int interfaces.
9044 (get_nonnull_operand): Likewise.
9045 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9046 * c-lex.c: Include wide-int.h.
9047 (narrowest_unsigned_type): Take a widest_int rather than two
9048 HOST_WIDE_INTs.
9049 (narrowest_signed_type): Likewise.
9050 (interpret_integer): Update accordingly. Use wide-int interfaces.
9051 (lex_charconst): Use wide-int interfaces.
9052 * c-pretty-print.c: Include wide-int.h.
9053 (pp_c_integer_constant): Use wide-int interfaces.
9054 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9055 INT_CST_LT_UNSIGNED.
9056
9057 2014-05-06 Richard Biener <rguenther@suse.de>
9058
9059 * c-opts.c (c_common_post_options): For -freestanding,
9060 -fno-hosted and -fno-builtin disable pattern recognition
9061 if not enabled explicitely.
9062
9063 2014-05-02 Marek Polacek <polacek@redhat.com>
9064
9065 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9066
9067 2014-05-01 Marek Polacek <polacek@redhat.com>
9068
9069 PR c/43245
9070 * c.opt (Wdiscarded-qualifiers): Add.
9071
9072 2014-04-30 Marek Polacek <polacek@redhat.com>
9073
9074 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9075 INT_MIN / -1 sanitization only for integer types.
9076
9077 2014-04-25 Marek Polacek <polacek@redhat.com>
9078
9079 PR c/18079
9080 * c-common.c (handle_noinline_attribute): Warn if the attribute
9081 conflicts with always_inline attribute.
9082 (handle_always_inline_attribute): Warn if the attribute conflicts
9083 with noinline attribute.
9084
9085 2014-04-25 Marek Polacek <polacek@redhat.com>
9086
9087 PR c/60156
9088 * c-common.c (check_main_parameter_types): Warn about variadic main.
9089
9090 2014-04-24 Mike Stump <mikestump@comcast.net>
9091
9092 * c.opt (Wshadow-ivar): Default to on.
9093
9094 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9095
9096 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9097
9098 2014-04-23 Marek Polacek <polacek@redhat.com>
9099
9100 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9101
9102 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9103
9104 PR sanitizer/60275
9105 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9106 if flag_sanitize_undefined_trap_on_error.
9107 (ubsan_instrument_division, ubsan_instrument_shift,
9108 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9109 if !flag_sanitize_recover.
9110
9111 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9112
9113 PR libstdc++/43622
9114 * c-common.c (registered_builtin_types): Make non-static.
9115 * c-common.h (registered_builtin_types): Declare.
9116
9117 2014-04-14 Richard Biener <rguenther@suse.de>
9118 Marc Glisse <marc.glisse@inria.fr>
9119
9120 PR c/60819
9121 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9122 apply may-alias the scalar pointer type when applicable.
9123
9124 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9125
9126 PR middle-end/60467
9127 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9128 as possible argument for Cilk_spawn.
9129
9130 2014-04-11 Tobias Burnus <burnus@net-b.de>
9131
9132 PR c/60194
9133 * c.opt (Wformat-signedness): Add
9134 * c-format.c(check_format_types): Use it.
9135
9136 2014-04-11 Jason Merrill <jason@redhat.com>
9137
9138 PR c++/57926
9139 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9140 default_conversion for an array argument.
9141
9142 2014-04-08 Marek Polacek <polacek@redhat.com>
9143
9144 PR sanitizer/60745
9145 * c-ubsan.c: Include asan.h.
9146 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9147
9148 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9149
9150 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9151
9152 2014-04-02 Marek Polacek <polacek@redhat.com>
9153
9154 * c-common.h (c_expand_expr): Remove declaration.
9155
9156 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9157
9158 PR c++/60689
9159 * c-common.c (add_atomic_size_parameter): When creating new
9160 params vector, push the size argument first.
9161
9162 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9163
9164 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9165 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9166 ubsan_create_data callers.
9167
9168 2014-03-22 Jakub Jelinek <jakub@redhat.com>
9169
9170 PR debug/60603
9171 * c-opts.c (c_finish_options): Restore cb_file_change call to
9172 <built-in>.
9173
9174 2014-03-13 Jakub Jelinek <jakub@redhat.com>
9175
9176 PR middle-end/36282
9177 * c-pragma.c (apply_pragma_weak): Only look at
9178 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9179 DECL_ASSEMBLER_NAME_SET_P (decl).
9180 (maybe_apply_pending_pragma_weaks): Exit early if
9181 vec_safe_is_empty (pending_weaks) rather than only when
9182 !pending_weaks.
9183 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9184 set assembler name back to NULL afterwards.
9185
9186 2014-03-11 Jason Merrill <jason@redhat.com>
9187
9188 * c.opt: Add -std=gnu++14.
9189
9190 2014-03-11 Ian Bolton <ian.bolton@arm.com>
9191
9192 * c-opts.c (c_common_post_options): Don't override
9193 -ffp-contract=fast if unsafe-math-optimizations is on.
9194
9195 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
9196
9197 * c.opt: Enable LTO FE for fshort-double.
9198
9199 2014-03-07 Jason Merrill <jason@redhat.com>
9200
9201 * c.opt: Add -std=c++14.
9202
9203 2014-03-06 Marek Polacek <polacek@redhat.com>
9204
9205 PR c/60197
9206 * cilk.c (contains_cilk_spawn_stmt): New function.
9207 (contains_cilk_spawn_stmt_walker): Likewise.
9208 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9209 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9210
9211 2014-03-03 Jakub Jelinek <jakub@redhat.com>
9212
9213 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9214 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9215 even when flag_preprocess_only.
9216
9217 2014-02-26 Jason Merrill <jason@redhat.com>
9218
9219 PR c++/59231
9220 PR c++/11586
9221 * c-common.c (shorten_compare): Don't check
9222 c_inhibit_evaluation_warnings.
9223
9224 2014-02-19 Jakub Jelinek <jakub@redhat.com>
9225
9226 PR c/37743
9227 * c-common.c (c_common_nodes_and_builtins): When initializing
9228 c_uint{16,32,64}_type_node, also set corresponding
9229 uint{16,32,64}_type_node to the same value.
9230
9231 PR c++/60267
9232 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9233 for PRAGMA_IVDEP if flag_preprocess_only.
9234
9235 2014-02-12 Jakub Jelinek <jakub@redhat.com>
9236
9237 PR c/60101
9238 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9239 if false, add ADD itself, rather than vice versa.
9240 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9241 copy. For SAVE_EXPR, only call merge_tlist once.
9242
9243 2014-02-08 Jakub Jelinek <jakub@redhat.com>
9244
9245 PR middle-end/60092
9246 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9247 and tree_to_uhwi.
9248 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9249 functions.
9250 (c_common_attribute_table): Add alloc_align and assume_aligned
9251 attributes.
9252
9253 2014-02-06 Marek Polacek <polacek@redhat.com>
9254
9255 PR c/60087
9256 * c-common.c (warn_for_sign_compare): Call warning_at with location
9257 instead of warning.
9258
9259 2014-02-05 Marek Polacek <polacek@redhat.com>
9260
9261 PR c/53123
9262 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9263 statement.
9264
9265 2014-02-04 Marek Polacek <polacek@redhat.com>
9266
9267 PR c/60036
9268 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9269 SAVE_EXPR.
9270
9271 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
9272
9273 PR c++/53017
9274 PR c++/59211
9275 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9276 handle_vector_size_attribute, handle_nonnull_attribute): Call
9277 default_conversion on the attribute argument.
9278 (handle_nonnull_attribute): Increment the argument number.
9279
9280 2014-01-31 Marek Polacek <polacek@redhat.com>
9281
9282 PR c/59963
9283 * c-common.c (add_atomic_size_parameter): Pass vNULL to
9284 build_function_call_vec.
9285 (resolve_overloaded_builtin): Likewise.
9286 * c-common.h (build_function_call_vec): Adjust declaration.
9287
9288 2014-01-30 Marek Polacek <polacek@redhat.com>
9289
9290 PR c/59940
9291 * c-common.h (unsafe_conversion_p): Adjust declaration.
9292 (warnings_for_convert_and_check): Likewise.
9293 (convert_and_check): Likewise.
9294 * c-common.c (unsafe_conversion_p): Add location parameter. Call
9295 expansion_point_location_if_in_system_header on it.
9296 (warnings_for_convert_and_check): Add location parameter. Call
9297 expansion_point_location_if_in_system_header on it. Use it.
9298 (convert_and_check): Add location parameter. Use it.
9299 (conversion_warning): Likewise.
9300 (c_add_case_label): Adjust convert_and_check calls.
9301 (scalar_to_vector): Adjust unsafe_conversion_p calls.
9302
9303 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9304
9305 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9306 flag_cilkplus.
9307 * c-pragma.c (init_pragma): Likewise.
9308 * c.opt: Likewise.
9309
9310 2014-01-23 Marek Polacek <polacek@redhat.com>
9311
9312 PR c/59846
9313 * c-common.c (shorten_compare): Add location_t parameter.
9314 * c-common.h (shorten_binary_op): Adjust declaration.
9315
9316 2014-01-23 Marek Polacek <polacek@redhat.com>
9317
9318 PR c/58346
9319 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9320 * c-common.h: Declare it.
9321
9322 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9323
9324 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9325 * c-ada-spec.c (dump_ads): Likewise.
9326 (cpp_check): Likewise.
9327 (dump_ada_specs): Likewise.
9328
9329 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
9330
9331 PR c++/49718
9332 * c-common.c (handle_no_instrument_function_attribute): Allow
9333 no_instrument_function attribute in class member
9334 definition/declaration.
9335
9336 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9337
9338 PR c/58943
9339 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9340 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9341 being COMPOUND_EXPR.
9342 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9343 operand a SAVE_EXPR and second MODIFY_EXPR.
9344
9345 2014-01-09 Jakub Jelinek <jakub@redhat.com>
9346
9347 PR target/58115
9348 * c-pch.c (c_common_write_pch): Call
9349 prepare_target_option_nodes_for_pch.
9350
9351 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9352
9353 Update copyright years
9354
9355 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9356
9357 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9358 the copyright notice.
9359
9360 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9361
9362 * c-ada-spec.c (print_constructor): New function.
9363 (print_destructor): Retrieve the origin of the destructor.
9364 (print_ada_declaration): Revamp handling of constructors/destructors.
9365
9366 2013-12-23 Stuart Hastings <stuart@apple.com>
9367 Bill Maddox <maddox@google.com>
9368 Jason Merrill <jason@redhat.com>
9369
9370 * c.opt: Add -fdeclone-ctor-dtor.
9371 * c-opts.c (c_common_post_options): Default to on iff -Os.
9372
9373 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9374
9375 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9376 attribute.
9377 * c-pragma.h (enum pragma_cilk_clause): Remove.
9378 (enum pragma_omp_clause): Added the following fields:
9379 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9380 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9381 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9382 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9383 PRAGMA_CILK_CLAUSE_UNIFORM.
9384
9385
9386 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9387
9388 * cilk.c (cilk_outline): Made this function non-static.
9389 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9390 (create_cilk_wrapper): Added a new parameter: a function pointer.
9391 (c_install_body_w_frame_cleanup): Remove
9392 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9393 * c-common.h (cilk_outline): New prototype.
9394 (gimplify_cilk_spawn): Removed two parameters.
9395 (cilk_install_body_with_frame_cleanup): New prototype.
9396 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9397 CILK_SPAWN_STMT case.
9398
9399 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9400
9401 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9402
9403 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9404 (int_array_type_node): Remove.
9405 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9406
9407 2013-12-05 Marek Polacek <polacek@redhat.com>
9408
9409 PR c/52023
9410 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9411 [ADJUST_FIELD_ALIGN].
9412
9413 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9414
9415 PR c/52023
9416 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9417 and check field alignment if set.
9418 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9419 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9420
9421 2013-12-04 Jakub Jelinek <jakub@redhat.com>
9422 Marek Polacek <polacek@redhat.com>
9423
9424 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9425 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9426
9427 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9428
9429 PR c/59309
9430 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9431 arguments.
9432
9433 2013-11-29 Jakub Jelinek <jakub@redhat.com>
9434
9435 PR c/59280
9436 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9437 goto invalid. If it is error_mark_node, don't issue further
9438 diagnostics.
9439
9440 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9441
9442 * c.opt (Wopenmp-simd): New.
9443
9444 2013-11-22 Jakub Jelinek <jakub@redhat.com>
9445
9446 * c-ubsan.h (ubsan_instrument_return): New prototype.
9447 * c-ubsan.c (ubsan_instrument_return): New function.
9448
9449 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9450
9451 * c-common.c: Add required include files from gimple.h.
9452 * c-gimplify.c: Likewise.
9453 * cilk.c: Likewise.
9454
9455 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9456
9457 * c-common.c (unsafe_conversion_p): Remove use of
9458 EXPR_LOC_OR_HERE macro.
9459 (conversion_warning): Likewise.
9460 (warnings_for_convert_and_check): Likewise.
9461 (warn_for_collisions_1): Likewise.
9462 (shorten_compare): Likewise, and remove use of in_system_header
9463 macro, using the location from the former.
9464 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9465 (cb_def_pragma): Remove use of in_system_header macro.
9466 (lex_string): Likewise.
9467 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9468
9469 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9470 Mike Stump <mikestump@comcast.net>
9471 Richard Sandiford <rdsandiford@googlemail.com>
9472
9473 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9474 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9475 tree_fits_shwi_p or tree_fits_uhwi_p.
9476 (dump_generic_ada_node): Likewise.
9477 * c-format.c (check_format_arg): Likewise.
9478 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9479
9480 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9481
9482 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9483
9484 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9485
9486 PR c/53001
9487 * c-common.c (unsafe_conversion_p): Make this function
9488 return an enumeration with more detail.
9489 (conversion_warning): Use the new return type of
9490 unsafe_conversion_p to separately warn either about conversions
9491 that lower floating point number precision or about the other
9492 kinds of conversions.
9493 * c-common.h (enum conversion_safety): New enumeration.
9494 (unsafe_conversion_p): switching return type to
9495 conversion_safety enumeration.
9496 * c.opt: Adding new warning -Wfloat-conversion and
9497 enabling it with -Wconversion.
9498
9499 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9500
9501 * c-opts.c: Include plugin.h.
9502 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9503
9504 2013-11-19 Marek Polacek <polacek@redhat.com>
9505
9506 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9507 call.
9508 (ubsan_instrument_shift): Likewise.
9509 (ubsan_instrument_vla): Likewise.
9510
9511 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9512
9513 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9514 cast to unsigned type.
9515
9516 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9517
9518 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9519 tree_low_cst.
9520 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9521 rather than tree_low_cst.
9522
9523 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9524
9525 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9526 tree_to_uhwi throughout.
9527
9528 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9529
9530 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9531 tree_low_cst (..., 0) with tree_to_shwi throughout.
9532
9533 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9534
9535 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9536 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9537
9538 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9539
9540 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9541 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9542
9543 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9544
9545 * c-cilkplus.c: New file.
9546 * c-common.c (readonly_error): Add location argument.
9547 * c-common.h (readonly_error): Same.
9548 (c_finish_cilk_clauses): Protoize.
9549 (c_check_cilk_loop): Same.
9550 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9551 Do not fail on error_mark_node.
9552 Abstract increment canonicalization to here...
9553 (c_omp_for_incr_canonicalize_ptr): New.
9554 c-pragma.c (init_pragma): Register "simd" pragma.
9555 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9556 (enum pragma_cilk_clause): New.
9557
9558 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9559
9560 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9561 wchar_type and host_integerp checks.
9562
9563 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9564
9565 * c-common.c: Likewise.
9566 * c-gimplify.c: Likewise.
9567 * cilk.c: Likewise.
9568
9569 2013-11-14 Diego Novillo <dnovillo@google.com>
9570
9571 * c-common.c: Include fold-const.h.
9572 Include stor-layout.h.
9573 Include calls.h.
9574 Include stringpool.h.
9575 Include attribs.h.
9576 Include varasm.h.
9577 Include trans-mem.h.
9578 * c-cppbuiltin.c: Include stor-layout.h.
9579 Include stringpool.h.
9580 * c-format.c: Include stringpool.h.
9581 * c-lex.c: Include stringpool.h.
9582 Include stor-layout.h.
9583 * c-pragma.c: Include stringpool.h.
9584 Include attribs.h.
9585 Include varasm.h.
9586 Include gcc-symtab.h.
9587 * c-pretty-print.c: Include stor-layout.h.
9588 Include attribs.h.
9589 * cilk.c: Include stringpool.h.
9590 Include calls.h.
9591
9592 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9593
9594 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9595 * c-common.c (c_common_reswords): Add __auto_type.
9596 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9597
9598 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9599
9600 * c-common.c: Include gimplify.h.
9601 * c-gimplify.c: Likewise.
9602 * cilk.c: Likewise.
9603 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9604 * c-ubsan.c: Don't include gimple.h.
9605
9606 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9607
9608 * c-common.c (c_common_reswords): Add _Thread_local.
9609
9610 2013-11-09 Joseph Myers <joseph@codesourcery.com>
9611
9612 * c-common.c (atomic_size_supported_p): New function.
9613 (resolve_overloaded_atomic_exchange)
9614 (resolve_overloaded_atomic_compare_exchange)
9615 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9616 Use it instead of comparing size with a local list of sizes.
9617
9618 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
9619 Joseph Myers <joseph@codesourcery.com>
9620
9621 * c-common.h (enum rid): Add RID_ATOMIC.
9622 * c-common.c (c_common_reswords): Add _Atomic.
9623 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9624 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9625 * c-format.c (check_format_types): Check for extra _Atomic
9626 qualifiers in format argument.
9627 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9628 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9629
9630 2013-11-06 Tobias Burnus <burnus@net-b.de>
9631
9632 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9633
9634 2013-11-06 Joseph Myers <joseph@codesourcery.com>
9635
9636 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9637 standards modes.
9638 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9639 to mean lack of IEEE 754 support.
9640
9641 2013-11-05 Tobias Burnus <burnus@net-b.de>
9642
9643 * c.opt (-Wdate-time): New option
9644 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9645
9646 2013-11-05 Joseph Myers <joseph@codesourcery.com>
9647
9648 * c-cppbuiltin.c (cpp_iec_559_value): Test
9649 flag_excess_precision_cmdline not flag_excess_precision.
9650
9651 2013-11-05 Tobias Burnus <burnus@net-b.de>
9652
9653 * c.opt (fopenmp-simd): New option.
9654 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9655 (omp_pragmas): ... this new struct.
9656 (c_pp_lookup_pragma): Also walk omp_pragmas.
9657 (init_pragma): Init pragmas for -fopenmp-simd.
9658
9659 2013-11-04 Marek Polacek <polacek@redhat.com>
9660
9661 PR c++/58979
9662 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9663
9664 2013-11-04 Joseph Myers <joseph@codesourcery.com>
9665
9666 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9667 New functions.
9668 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9669
9670 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9671
9672 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9673 (dump_ada_specs): Adjust prototype of second callback.
9674 * c-ada-spec.c (cpp_check): New global variable.
9675 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9676 (print_generic_ada_decl): Likewise.
9677 (has_static_fields): Change return type to bool and add guard.
9678 (has_nontrivial_methods): New predicate.
9679 (is_tagged_type): Change return type to bool.
9680 (separate_class_package): Call has_nontrivial_methods.
9681 (pp_ada_tree_identifier): Minor tweaks.
9682 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9683 (dump_ada_array_domains): Likewise.
9684 (dump_ada_array_type): Likewise.
9685 (dump_template_types): Remove cpp_check parameter and do not pass it to
9686 dump_generic_ada_node.
9687 (dump_ada_template): Likewise.
9688 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9689 recursively.
9690 (print_ada_methods): Change return type to integer. Remove cpp_check
9691 parameter and do not pass it down.
9692 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9693 dump_generic_ada_node.
9694 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9695 accessing methods.
9696 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9697 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9698 value of print_ada_methods.
9699 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9700 Set cpp_check to it before invoking dump_ada_nodes.
9701 (dump_ada_specs): Likewise.
9702
9703 2013-11-03 Marek Polacek <polacek@redhat.com>
9704
9705 * c-ubsan.c: Don't include hash-table.h.
9706 (ubsan_instrument_vla): New function.
9707 * c-ubsan.h: Declare it.
9708
9709 2013-10-31 David Malcolm <dmalcolm@redhat.com>
9710
9711 Automated part of renaming of symtab_node_base to symtab_node.
9712
9713 Patch autogenerated by rename_symtab.py from
9714 https://github.com/davidmalcolm/gcc-refactoring-scripts
9715 revision 58bb219cc090b2f4516a9297d868c245495ee622
9716
9717 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9718 symtab_node_base to symtab_node.
9719
9720 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9721
9722 Implement C++14 digit separators.
9723 * c-lex.c (interpret_float): Remove digit separators from scratch string
9724 before building real literal.
9725
9726 2013-10-30 Jakub Jelinek <jakub@redhat.com>
9727
9728 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9729
9730 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9731
9732 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9733 fields.
9734 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9735 enabled.
9736 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9737 (insert_cilk_frame): New prototype.
9738 (cilk_init_builtins): Likewise.
9739 (gimplify_cilk_spawn): Likewise.
9740 (c_cilk_install_body_w_frame_cleanup): Likewise.
9741 (cilk_detect_spawn_and_unwrap): Likewise.
9742 (cilk_set_spawn_marker): Likewise.
9743 (build_cilk_sync): Likewise.
9744 (build_cilk_spawn): Likewise.
9745 * cilk.c: New file.
9746
9747 2013-10-29 David Malcolm <dmalcolm@redhat.com>
9748
9749 Patch autogenerated by refactor_symtab.py from
9750 https://github.com/davidmalcolm/gcc-refactoring-scripts
9751 revision 58bb219cc090b2f4516a9297d868c245495ee622
9752
9753 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9754 to a true class hierarchy.
9755 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9756
9757 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9758
9759 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9760
9761 2013-10-26 Jeff Law <law@redhat.com>
9762
9763 * c-common.c (c_define_builtins): Remove mudflap support.
9764 * c.opt: Ignore and warn for mudflap options.
9765
9766 2013-10-24 Tobias Burnus <burnus@net-b.de>
9767
9768 PR other/33426
9769 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9770 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9771
9772 2013-10-23 Jason Merrill <jason@redhat.com>
9773
9774 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9775
9776 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9777
9778 * c-common.h (omp_clause_mask::operator !=): New method.
9779 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9780 instead of if (mask & something) tests everywhere.
9781
9782 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9783 201307 instead of 201107.
9784 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9785 (c_common_attribute_table): Add "omp declare target" and
9786 "omp declare simd" attributes.
9787 (handle_omp_declare_target_attribute,
9788 handle_omp_declare_simd_attribute): New functions.
9789 * c-omp.c: Include c-pragma.h.
9790 (c_finish_omp_taskgroup): New function.
9791 (c_finish_omp_atomic): Add swapped argument, if true,
9792 build the operation first with rhs, lhs arguments and use NOP_EXPR
9793 build_modify_expr.
9794 (c_finish_omp_for): Add code argument, pass it down to make_code.
9795 (c_omp_split_clauses): New function.
9796 (c_split_parallel_clauses): Removed.
9797 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9798 c_omp_declare_simd_clauses_to_decls): New functions.
9799 * c-common.h (omp_clause_mask): New type.
9800 (OMP_CLAUSE_MASK_1): Define.
9801 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9802 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9803 omp_clause_mask::operator |, omp_clause_mask::operator &,
9804 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9805 omp_clause_mask::operator ==): New methods.
9806 (enum c_omp_clause_split): New.
9807 (c_finish_omp_taskgroup): New prototype.
9808 (c_finish_omp_atomic): Add swapped argument.
9809 (c_finish_omp_for): Add code argument.
9810 (c_omp_split_clauses): New prototype.
9811 (c_split_parallel_clauses): Removed.
9812 (c_omp_declare_simd_clauses_to_numbers,
9813 c_omp_declare_simd_clauses_to_decls): New prototypes.
9814 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9815 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9816 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9817 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9818 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9819 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9820 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9821 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9822 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9823 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9824 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9825 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9826 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9827 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9828 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9829 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9830 PRAGMA_OMP_CLAUSE_UNIFORM.
9831
9832 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
9833
9834 PR tree-optimization/20318
9835 * c-common.c (handle_returns_nonnull_attribute): New function.
9836 (c_common_attribute_table): Add returns_nonnull.
9837
9838 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
9839
9840 PR c++/19476
9841 * c.opt (fcheck-new): Move to common.opt.
9842
9843 2013-09-25 Marek Polacek <polacek@redhat.com>
9844 Jakub Jelinek <jakub@redhat.com>
9845
9846 PR sanitizer/58413
9847 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9848 an expression if we can prove it is correct.
9849 (ubsan_instrument_division): Likewise. Remove unnecessary
9850 check.
9851
9852 2013-09-18 Marek Polacek <polacek@redhat.com>
9853
9854 PR sanitizer/58411
9855 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9856 Declare it.
9857 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9858
9859 2013-09-14 Iain Sandoe <iain@codesourcery.com>
9860
9861 PR target/48094
9862 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9863 fobjc-gc, freplace-objc-classes): Accept for LTO.
9864
9865 2013-09-13 Jacek Caban <jacek@codeweavers.com>
9866
9867 * c-target.def: New hook
9868
9869 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9870
9871 PR c++/43452
9872 * c.opt (Wdelete-incomplete): Add.
9873
9874 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9875
9876 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9877 (vector_types_compatible_elements_p): New function.
9878 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9879 declaration.
9880 (vector_types_compatible_elements_p): Declare.
9881
9882 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9883
9884 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9885 a virtual member function.
9886 (pp_simple_type_specifier): Remove.
9887 (pp_c_type_specifier): Likewise.
9888 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9889 Rename from pp_c_type_specifier. Adjust.
9890 (c_pretty_printer::c_pretty_printer): Do not assign to
9891 simple_type_specifier.
9892
9893 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9894
9895 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9896 member function.
9897 (c_pretty_printer::storage_class_specifier): Likewise.
9898 (c_pretty_printer::initializer): Likewise.
9899 (pp_declaration): Remove.
9900 (pp_declaration_specifiers): Likewise.
9901 (pp_abstract_declarator): Likewise.
9902 (pp_declarator): Likewise.
9903 (pp_type_id): Likewise.
9904 (pp_statement): Likewise.
9905 (pp_constant): Likewise.
9906 (pp_id_expression): Likewise.
9907 (pp_primary_expression): Likewise.
9908 (pp_unary_expression): Likewise.
9909 (pp_multiplicative_expression): Likewise.
9910 (pp_conditional_expression): Likewise.
9911 (pp_assignment_expression): Likewise.
9912 (pp_expression): Likewise.
9913 (pp_c_type_id): Likewise.
9914 (pp_c_storage_class_specifier): Likewise.
9915 * c-pretty-print.c (pp_c_type_cast): Tidy.
9916 (pp_c_pointer): Likewise.
9917 (pp_c_type_specifier): Likewise.
9918 (pp_c_parameter_type_list): Likewise.
9919 (pp_c_function_definition): Likewise.
9920 (pp_c_init_declarator): Likewise.
9921 (pp_c_initializer_list): Likewise.
9922 (pp_c_constructor_elts): Likewise.
9923 (c_pretty_printer::direct_abstract_declarator): Likewise.
9924 (c_pretty_printer::declaration_specifiers): Likewise.
9925 (c_pretty_printer::primary_expression): Likewise.
9926 (c_pretty_printer::postfix_expression): Likewise.
9927 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9928 (c_pretty_printer::storage_class_specifier): Rename from
9929 pp_c_storage_class_specifier.
9930 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9931 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9932 storage_class_specifier, initializer, offset_list, flags.
9933
9934 2013-08-30 Marek Polacek <polacek@redhat.com>
9935
9936 * c-ubsan.c: New file.
9937 * c-ubsan.h: New file.
9938
9939 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9940
9941 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9942 member function.
9943 (c_pretty_printer::declaration_specifiers): Likewise.
9944 (c_pretty_printer::declarator): Likewise.
9945 (c_pretty_printer::abstract_declarator): Likewise.
9946 (c_pretty_printer::direct_abstract_declarator): Likewise.
9947 (c_pretty_printer::direct_declarator): Likewise.
9948 (c_pretty_printer::function_specifier): Likewise.
9949 (pp_declaration): Adjust.
9950 (pp_declaration_specifiers): Likewise.
9951 (pp_abstract_declarator): Likewise.
9952 (pp_direct_declarator): Likewise.
9953 (pp_function_specifier): Likewise.
9954 (pp_direct_abstract_declarator): Remove as unused.
9955 (pp_c_declaration): Remove.
9956 (pp_c_declaration_specifiers): Likewise.
9957 (pp_c_declarator): Likewise.
9958 (pp_c_direct_declarator): Likewise.
9959 (pp_c_function_specifier): Likewise.
9960 (pp_c_direct_abstract_declarator): Likewise.
9961 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9962 from pp_c_abstract_declarator. Adjust.
9963 (c_pretty_printer::direct_abstract_declarator): Rename from
9964 pp_c_direct_abstract_declarator. Adjust.
9965 (c_pretty_printer::function_specifier): Rename from
9966 pp_c_function_specifier. Adjust.
9967 (c_pretty_printer::declaration_specifiers): Rename from
9968 pp_c_declaration_specifiers. Adjust.
9969 (c_pretty_printer::direct_declarator): Rename from
9970 pp_c_direct_declarator. Adjust.
9971 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9972 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9973 (c_pretty_printer::c_pretty_printer): Do not assign to
9974 declaration, declaration_specifiers, declarator,
9975 direct_declarator, direct_abstract_declarator, function_specifier.
9976
9977 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9978
9979 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9980 virtual member function.
9981 (c_pretty_printer::multiplicative_expression): Likewise.
9982 (c_pretty_printer::conditional_expression): Likewise.
9983 (c_pretty_printer::assignment_expression): Likewise.
9984 (c_pretty_printer::expression): Likewise.
9985 (pp_unary_expression): Adjust.
9986 (pp_multiplicative_expression): Likewise.
9987 (pp_assignment_expression): Likewise.
9988 (pp_conditional_expression): Likewise.
9989 (pp_expression): Likewise.
9990 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9991 from pp_c_unary_expression. Adjust.
9992 (c_pretty_printer::multiplicative_expression): Rename from
9993 pp_c_multiplicative_expression. Adjust.
9994 (c_pretty_printer::conditional_expression): Rename from
9995 pp_c_conditional_expression. Adjust.
9996 (c_pretty_printer::assignment_expression): Rename from
9997 pp_c_assignment_expression. Adjust.
9998 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9999 (c_pretty_printer::c_pretty_printer): Do not assign to
10000 unary_expression, multiplicative_expression,
10001 conditional_expression, expression.
10002
10003 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10004
10005 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10006 virtual member function.
10007 (pp_postfix_expression): Adjust.
10008 (pp_c_postfix_expression): Remove.
10009 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10010 from pp_c_postfix_expression. Adjust.
10011 (c_pretty_printer::c_pretty_printer): Do not assign to
10012 postfix_expression.
10013
10014 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10015
10016 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10017 virtua member function.
10018 (pp_primary_expression): Adjust.
10019 (pp_c_primary_expression): Remove.
10020 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10021 from pp_c_primary_expression. Adjust.
10022 (pp_c_initializer_list): Use pp_primary_expression.
10023 (c_pretty_printer::c_pretty_printer): Do not assign to
10024 primary_expression.
10025
10026 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10027
10028 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10029 * c-pretty-print.c (M_): Remove.
10030 (c_pretty_printer::translate_string): Define.
10031 (pp_c_type_specifier): Use it.
10032 (pp_c_primary_expression): Likewise.
10033 (pp_c_expression): Likewise.
10034
10035 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10036
10037 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10038 virtual function.
10039 (pp_c_id_expression): Remove.
10040 (pp_id_expression): Adjust.
10041 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10042 pp_c_id_expression. Adjust.
10043 (pp_c_postfix_expression): Use pp_id_expression.
10044 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10045
10046 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10047
10048 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10049 member function.
10050 (pp_constant): Adjust.
10051 (pp_c_constant): Remove.
10052 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10053 pp_c_constant. Adjust.
10054 (pp_c_constant)
10055 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10056 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10057
10058 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10059
10060 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10061 (c_pretty_printer::c_pretty_printer): Declare.
10062 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10063 c_pretty_printer_init. Adjust.
10064 (print_c_tree): Do not call c_pretty_printer_init.
10065 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10066
10067 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10068
10069 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10070
10071 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10072
10073 PR c++/58080
10074 * c-common.c (pointer_int_sum): Add bool parameter.
10075 * c-common.h (pointer_int_sum): Adjust declaration.
10076
10077 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10078
10079 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10080 c_pretty_printer variable.
10081
10082 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10083
10084 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10085 (pp_base): Remove.
10086 (pp_c_base): Likewise. Adjust users.
10087 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10088 (pp_c_whitespace): Do not call pp_base.
10089 (pp_c_left_paren): Likewise.
10090 (pp_c_right_paren): Likewise.
10091 (pp_c_left_brace): Likewise.
10092 (pp_c_right_brace): Likewise.
10093 (pp_c_left_bracket): Likewise.
10094 (pp_c_right_bracket): Likewise.
10095 (pp_c_dot): Likewise.
10096 (pp_c_ampersand): Likewise.
10097 (pp_c_star): Likewise.
10098 (pp_c_arrow): Likewise.
10099 (pp_c_semicolon): Likewise.
10100 (pp_c_complement): Likewise.
10101 (pp_c_exclamation): Likewise.
10102 (pp_c_direct_declarator): Likewise.
10103 (pp_c_ws_string): Likewise.
10104 (pp_c_identifier): Likewise.
10105 (pp_c_statement): Likewise.
10106 (print_c_tree): Likewise.
10107
10108 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10109
10110 PR c++/58072
10111 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10112 provide useful error strings.
10113
10114 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10115
10116 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10117 printer functions instead of pp_string or operators and punctuators.
10118 (dump_generic_ada_node): Likewise.
10119 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10120 (pp_c_relational_expression): Likewise.
10121 (pp_c_logical_or_expression): Likewise.
10122
10123 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10124
10125 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10126 functions instead of pp_character.
10127 (pp_ada_tree_identifier): Likewise.
10128 (dump_ada_double_name): Likewise.
10129 (dump_ada_function_declaration): Likewise.
10130 (dump_ada_array_domains): Likewise.
10131 (dump_template_types): Likewise.
10132 (dump_generic_ada_node): Likewise.
10133 (print_ada_declaration): Likewise.
10134 (print_ada_struct_decl): Likewise.
10135 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10136
10137 2013-07-23 Tom Tromey <tromey@redhat.com>
10138
10139 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10140 * c-common.c (c_common_reswords): Add _Generic.
10141
10142 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10143
10144 * c-common.c: Fix typos.
10145 * c-common.h: Likewise.
10146
10147 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10148
10149 PR c++/55203
10150 * c-common.c (c_common_attribute_table): Add warn_unused.
10151 (handle_warn_unused_attribute): New.
10152
10153 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10154
10155 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10156 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10157
10158 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10159
10160 PR c++/57869
10161 * c.opt: Add Wconditionally-supported.
10162
10163 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10164
10165 * array-notation-common.c (length_mismatch_in_expr_p): Delete
10166 unused variables l_length and l_node.
10167
10168 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
10169
10170 PR c/57821
10171 * c-common.c (complete_array_type): Delay folding first index
10172 like other indices. When folding, check for index overflow.
10173
10174 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
10175
10176 PR c++/57509
10177 * c-common.h (c_build_vec_perm_expr): New complain argument.
10178 * c-common.c (c_build_vec_perm_expr): Likewise.
10179 Use save_expr also in C++.
10180
10181 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10182
10183 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10184 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10185 * c-opts.c (c_common_post_options): Likewise.
10186
10187 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10188
10189 * array-notation-common.c (length_mismatch_in_expr): Changed the
10190 parameter type's from a dynamic array to a vec_tree. Also removed
10191 the size parameters.
10192 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10193 the change above.
10194
10195 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10196
10197 * c-common.h (struct cilkplus_an_parts): New structure.
10198 (struct cilkplus_an_loop_parts): Likewise.
10199 (cilkplus_extract_an_triplets): New prototype.
10200 (fix_sec_implicit_args): Likewise.
10201 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10202 (fix_sec_implicit_args): Likewise.
10203
10204 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10205
10206 * array-notation-common.c (find_inv_trees): Removed an unwanted
10207 typecasting.
10208 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10209 enum rid to enum tree_code.
10210
10211 2013-06-11 Jan Hubicka <jh@suse.cz>
10212
10213 * c-common.c (handle_alias_ifunc_attribute): Do not set
10214 DECL_EXTERNAL for weakref variables.
10215 * c-pragma.c (handle_pragma_weak): Make sure aliases
10216 are not declared as external.
10217
10218 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10219
10220 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10221 function from c/c-array-notation.c.
10222 (is_cilkplus_reduce_builtin): Likewise.
10223 (find_rank): Likewise.
10224 (extract_array_notation_exprs): Likewise.
10225 (replace_array_notations): Likewise.
10226 (find_inv_trees): Likewise.
10227 (replace_inv_trees): Likewise.
10228 (contains_array_notation_expr): Likewise.
10229 (find_correct_array_notation_type): Likewise.
10230 * c-common.h (struct inv_list): Moved this struct from the file
10231 c/c-array-notation.c and added a new field called additional tcodes.
10232 (length_mismatch_in_expr_p): New prototype.
10233 (is_cilkplus_reduce_builtin): Likewise.
10234 (find_rank): Likewise.
10235 (extract_array_notation_exprs): Likewise.
10236 (replace_array_notation): Likewise.
10237 (find_inv_trees): Likewise.
10238 (replace_inv_trees): Likewise.
10239 (find_correct_array_notation_type): Likewise.
10240
10241 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10242
10243 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10244 function array_notation_init_builtins is called.
10245 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10246 * c-common.def (ARRAY_NOTATION_REF): New tree.
10247 * c-common.h (build_array_notation_expr): New function declaration.
10248 (build_array_notation_ref): Likewise.
10249 (extract_sec_implicit_index_arg): New extern declaration.
10250 (is_sec_implicit_index_fn): Likewise.
10251 (ARRAY_NOTATION_CHECK): New define.
10252 (ARRAY_NOTATION_ARRAY): Likewise.
10253 (ARRAY_NOTATION_START): Likewise.
10254 (ARRAY_NOTATION_LENGTH): Likewise.
10255 (ARRAY_NOTATION_STRIDE): Likewise.
10256 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10257 ARRAY_NOTATION_REF.
10258 (pp_c_expression): Likewise.
10259 * c.opt (flag_enable_cilkplus): New flag.
10260 * array-notation-common.c: New file.
10261
10262 2013-05-14 Jakub Jelinek <jakub@redhat.com>
10263
10264 PR c++/57274
10265 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10266
10267 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
10268
10269 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10270 vectors.
10271
10272 2013-05-07 Han Shen <shenhan@google.com>
10273
10274 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10275
10276 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
10277
10278 * c-common.c (check_user_alignment): Emit error for negative values.
10279
10280 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10281
10282 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10283
10284 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10285
10286 * c-cppbuiltin.c (c_cpp_builtins): Do not define
10287 __GXX_EXPERIMENTAL_CXX1Y__.
10288
10289 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10290 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
10291
10292 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10293 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10294 to simply use OPT_Wpointer_arith.
10295 (c_sizeof_or_alignof_type): Likewise.
10296
10297 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
10298
10299 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10300
10301 2013-04-12 Jakub Jelinek <jakub@redhat.com>
10302
10303 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10304 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10305 specifiers.
10306
10307 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10308
10309 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10310
10311 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10312
10313 * c-common.c (pointer_int_sum): Remove dead code.
10314
10315 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10316
10317 PR middle-end/56524
10318 * c-common.c (handle_optimize_attribute): Don't call
10319 save_optabs_if_changed.
10320
10321 2013-03-05 Jakub Jelinek <jakub@redhat.com>
10322
10323 PR middle-end/56461
10324 * c-pch.c (pch_init): Free target_validity at the end.
10325
10326 2013-03-04 Jakub Jelinek <jakub@redhat.com>
10327
10328 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10329
10330 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10331 Jakub Jelinek <jakub@redhat.com>
10332
10333 PR sanitizer/56454
10334 * c-common.c (handle_no_sanitize_address_attribute): New function.
10335 (c_common_attribute_table): Add no_sanitize_address attribute.
10336 (handle_no_address_safety_analysis_attribute): Add
10337 no_sanitize_address attribute, not no_address_safety_analysis
10338 attribute.
10339
10340 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
10341
10342 PR target/52555
10343 * c-common.c (handle_optimize_attribute): Call
10344 save_optabs_if_changed.
10345
10346 2013-02-18 Jakub Jelinek <jakub@redhat.com>
10347 Steven Bosscher <steven@gcc.gnu.org>
10348
10349 PR pch/54117
10350 * c-opts.c (c_common_post_options): If debug info is enabled
10351 and non-dwarf*, refuse to load PCH files and when writing PCH
10352 file warn.
10353
10354 2013-02-05 Jakub Jelinek <jakub@redhat.com>
10355
10356 PR middle-end/56167
10357 * c-common.c (handle_error_attribute): Fix condition.
10358
10359 2013-01-30 Jakub Jelinek <jakub@redhat.com>
10360
10361 PR c++/55742
10362 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10363
10364 2013-01-18 Jason Merrill <jason@redhat.com>
10365
10366 PR target/54908
10367 * c.opt (-fextern-tls-init): New.
10368 * c-opts.c (c_common_post_options): Handle it.
10369
10370 2013-01-09 Jakub Jelinek <jakub@redhat.com>
10371
10372 PR c/48418
10373 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10374 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10375 and is either negative or bigger or equal to type precision
10376 of the first operand.
10377
10378 2012-12-03 Marek Polacek <polacek@redhat.com>
10379
10380 PR c/55570
10381 * c-common.c (check_user_alignment): Swap order of tests,
10382 check TREE_CODE first.
10383
10384 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10385
10386 PR c++/52654
10387 * c-common.h (overflow_type): New enum.
10388 (build_userdef_literal): Add overflow_type argument.
10389 (tree_userdef_literal): Add overflow_type.
10390 (USERDEF_LITERAL_OVERFLOW): New access macro.
10391 * c-common.c (build_userdef_literal): Add overflow_type
10392 argument.
10393 * c-lex.c (c_lex_with_flags): Add overflow_type to
10394 build_userdef_literal calls.
10395 (interpret_integer, interpret_float): Add overflow_type argument.
10396
10397 2012-11-28 Richard Biener <rguenther@suse.de>
10398
10399 PR c/35634
10400 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10401 here and use a type with proper overflow behavior for types that would
10402 need to be promoted for the arithmetic.
10403
10404 2012-11-23 Jakub Jelinek <jakub@redhat.com>
10405
10406 PR sanitizer/55435
10407 * c-common.c (handle_no_address_safety_analysis_attribute): New
10408 function.
10409 (c_common_attribute_table): Add no_address_safety_analysis.
10410
10411 2012-11-16 Simon Baldwin <simonb@google.com>
10412
10413 * c.opt: Add f[no-]canonical-system-headers.
10414 * c-opts.c (c_common_handle_option): Handle
10415 OPT_fcanonical_system_headers.
10416
10417 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10418
10419 PR c++/54413
10420 * c-opts.c (c_common_handle_option): Set new flags.
10421 * c.opt: Describe new flags.
10422
10423 2012-11-09 Jason Merrill <jason@redhat.com>
10424
10425 * c.opt (Wabi-tag): New.
10426
10427 2012-11-09 Andi Kleen <ak@linux.intel.com>
10428
10429 PR 55139
10430 * c-common.c (get_atomic_generic_size): Mask with
10431 MEMMODEL_MASK
10432
10433 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10434
10435 PR c/53063
10436 * c.opt (Wformat): Make it Alias Wformat=1.
10437 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10438 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10439 LangEnabledBy.
10440 (Wformat=): RejectNegative. Use LangEnabledBy.
10441 (Wnonnull): Use LangEnabledBy.
10442 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10443 * c-format.c (set_Wformat): Delete.
10444 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10445 (maybe_read_dollar_number): Likewise.
10446 (avoid_dollar_number): Likewise.
10447 (finish_dollar_format_checking): Likewise.
10448 (check_format_info): Likewise.
10449 (check_format_info_main): Likewise.
10450 (check_format_types): Likewise.
10451 (format_type_warning): Likewise.
10452 * c-common.c (int): Likewise.
10453 (check_function_sentinel): Likewise.
10454 * c-common.h (warn_format,set_Wformat): Do not declare here.
10455
10456 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10457
10458 PR c/53063
10459 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10460 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10461 Use LangEnabledBy.
10462 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10463 common.opt.
10464 (Wvariadic-macros): Init(1).
10465 * c-opts.c (c_common_handle_option): Do not handle them
10466 explicitly.
10467 (c_common_post_options): Likewise.
10468 (sanitize_cpp_opts): warn_unused_macros is now
10469 cpp_warn_unused_macros.
10470 (push_command_line_include): Likewise.
10471 * c-common.c (warn_unknown_pragmas): Do not define.
10472 * c-common.h (warn_unknown_pragmas): Do not declare.
10473
10474 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10475
10476 PR c/51294
10477 * c-common.c (conversion_warning): Handle conditional expressions.
10478
10479 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10480
10481 PR c++/54930
10482 * c.opt (Wreturn_local_addr): Define new option.
10483
10484 2012-10-25 Jason Merrill <jason@redhat.com>
10485
10486 * c.opt (Wvirtual-move-assign): New.
10487
10488 * c.opt (Winherited-variadic-ctor): New.
10489
10490 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10491
10492 PR c++/54427
10493 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10494
10495 2012-10-23 Joseph Myers <joseph@codesourcery.com>
10496
10497 * c-common.h (pch_cpp_save_state): Declare.
10498 * c-target.def (c_preinclude): New hook.
10499 * c-opts.c (done_preinclude): New.
10500 (push_command_line_include): Handle default preincluded header.
10501 (cb_file_change): Call pch_cpp_save_state when calling
10502 push_command_line_include.
10503 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10504 (pch_cpp_save_state): New.
10505 (pch_init): Call pch_cpp_save_state conditionally, instead of
10506 calling cpp_save_state.
10507
10508 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10509
10510 PR c/53063
10511 PR c/40989
10512 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10513 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10514 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10515 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10516 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10517 * c-opts.c (c_common_handle_option): Remove explicit handling from
10518 here.
10519 (c_common_post_options): Likewise.
10520
10521 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10522
10523 * c-ada-spec.c (LOCATION_COL): Delete.
10524 (compare_location): New function.
10525 (compare_node): Use it.
10526 (compare_comment): Likewise.
10527
10528 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10529
10530 PR c/53063
10531 PR c/40989
10532 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10533 * c-opts.c (c_common_handle_option): Do not set them here. Add
10534 comment.
10535 (c_common_post_options): Likewise.
10536
10537 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10538
10539 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10540 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10541 Remove POINTER_TYPE handling, add large unsigned handling and use
10542 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10543
10544 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10545
10546 PR c/54381
10547 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10548 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10549 locs and array of 3 trees instead of just single loc and single
10550 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10551 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10552 For *cmp* builtins that take two sources strings report warnings
10553 about first and second source, not about destination and source.
10554
10555 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
10556
10557 PR c++/53055
10558 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10559
10560 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10561
10562 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10563 declaring something coming from another file.
10564
10565 2012-10-10 Arnaud Charlet <charlet@adacore.com>
10566
10567 PR ada/54845
10568 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10569
10570 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10571
10572 PR c++/54194
10573 * c-common.c (warn_about_parentheses): Add location_t parameter;
10574 use EXPR_LOC_OR_LOC.
10575 * c-common.h: Update declaration.
10576
10577 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
10578
10579 PR c++/54427
10580 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10581 more operations. Make error messages optional.
10582 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10583 (scalar_to_vector): Declare.
10584
10585 2012-10-08 Jason Merrill <jason@redhat.com>
10586
10587 * c-common.c (c_common_reswords): Add thread_local.
10588
10589 2012-10-08 Dodji Seketeli <dodji@redhat.com>
10590
10591 PR c++/53528 C++11 attribute support
10592 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10593 new functions.
10594 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10595 static function.
10596 (handle_aligned_attribute): In choose strictest alignment
10597 among many. Use new check_cxx_fundamental_alignment_constraints.
10598 (handle_transparent_union_attribute): In c++11 attribute syntax,
10599 don't look through typedefs.
10600
10601 2012-10-04 Arnaud Charlet <charlet@adacore.com>
10602
10603 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10604 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10605 out of dumpfile.h.
10606
10607 2012-09-25 Dehao Chen <dehao@google.com>
10608
10609 PR middle-end/54645
10610 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
10611 map when read in the pch.
10612
10613 2012-09-18 Arnaud Charlet <charlet@adacore.com>
10614
10615 * c-ada-spec.c: Style fixes.
10616
10617 2012-09-18 Thomas Quinot <quinot@adacore.com>
10618
10619 * c.opt (-fada-spec-parent): Define new command line switch.
10620 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10621 is specified, generate binding spec as a child of the specified unit.
10622
10623 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10624 Manuel López-Ibáñez <manu@gcc.gnu.org>
10625
10626 PR c++/53210
10627 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10628
10629 2012-08-23 Arnaud Charlet <charlet@adacore.com>
10630
10631 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10632 for pointers, and add missing Convention C pragma.
10633 (print_ada_struct_decl): Add missing aliased keyword.
10634 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10635
10636 2012-08-17 Jakub Jelinek <jakub@redhat.com>
10637
10638 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10639 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10640 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10641 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10642 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10643
10644 2012-08-10 Richard Guenther <rguenther@suse.de>
10645
10646 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10647
10648 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10649
10650 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10651 instead of separate pp_newline and pp_flush.
10652 (print_c_tree): Likewise.
10653
10654 2012-07-26 Richard Henderson <rth@redhat.com>
10655
10656 * c-common.c (handle_hot_attribute): Allow labels.
10657 (handle_cold_attribute): Likewise.
10658
10659 2012-07-20 Jakub Jelinek <jakub@redhat.com>
10660
10661 PR c++/28656
10662 * c-common.c (check_function_nonnull): Handle multiple nonnull
10663 attributes properly.
10664
10665 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10666
10667 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10668 * c-ada-spec.c: Likewise.
10669 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10670
10671 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10672
10673 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10674 Remove code conditional on it.
10675
10676 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10677
10678 * c-gimplify.c: Do not include basic-block.h.
10679 * c-common.c: Do not include linfuncs.h.
10680
10681 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10682
10683 * c-common.h: Include tree.h.
10684
10685 2012-07-02 Jason Merrill <jason@redhat.com>
10686
10687 PR c++/53524
10688 * c-common.c (get_priority): Call default_conversion.
10689
10690 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
10691
10692 * c-pch.c (c_common_write_pch): Remove unused variables.
10693
10694 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10695
10696 * cppspec.c: Moved from gcc/ to here.
10697
10698 2012-06-27 Kai Tietz <ktietz@redhat.com>
10699
10700 PR preprocessor/37215
10701 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10702
10703 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10704
10705 * c-common.h (c_common_print_pch_checksum): Remove.
10706 * c-pch.c: Do not include output.h.
10707 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10708 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10709 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10710 (struct c_pch_header): Remove.
10711 (get_ident): Update gpch version.
10712 (pch_init): Do not print executable_checksum to asm_out_file.
10713 Do not fail if there is no asm_out_file to read back from. Set
10714 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10715 (c_common_write_pch): Verify that nothing was written to asm_out_file
10716 since pch_init was called. Do not write a c_pch_header, and do not
10717 copy from asm_out_file to the PCH.
10718 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10719 the content of asm_out_file from the PCH.
10720 (c_common_print_pch_checksum): Remove.
10721 * c-opts.c (c_common_init): Print out executable_checksum directly.
10722
10723 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10724
10725 * c-target.def (objc_declare_unresolved_class_reference,
10726 objc_declare_class_definition): Add new hooks.
10727
10728 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10729
10730 * c-lex.c: Do not include output.h.
10731 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10732 Remove uses of ASM_OUTPUT_IDENT.
10733
10734 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
10735
10736 PR c++/51033
10737 * c-common.h (c_build_vec_perm_expr): Move decl here.
10738 * c-common.c (c_build_vec_perm_expr): Move definition
10739 here.
10740
10741 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10742
10743 * c.opt (fconserve-space): Turn into a no-op.
10744
10745 2012-06-04 Sterling Augustine <saugustine@google.com>
10746
10747 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10748 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10749 both the start and end of the function.
10750
10751 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10752
10753 * c-common.c: Do not include output.h.
10754 * c-pragma.c: Likewise.
10755
10756 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10757
10758 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10759 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10760 (lang_decl_name): Handle namespace decls.
10761
10762 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10763
10764 * c-ada-spec.c: Do not include output.h.
10765 * c-semantics.c: Likewise.
10766
10767 2012-05-29 Joseph Myers <joseph@codesourcery.com>
10768
10769 * c-common.c: Fix typo.
10770
10771 2012-05-29 Michael Matz <matz@suse.de>
10772
10773 * c-common.h (c_expand_decl): Remove prototype.
10774
10775 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10776
10777 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10778 * c-opts.c (c_common_handle_option): Remove code handling
10779 warn_missing_braces.
10780
10781 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10782
10783 PR c++/25137
10784 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10785 -Wmissing_braces.
10786
10787 2012-05-22 Dodji Seketeli <dodji@redhat.com>
10788
10789 PR c++/53322
10790 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10791
10792 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10793
10794 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10795 * c-opts.c (c_common_handle_option): Do not handle explicitly
10796 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10797
10798 2012-05-16 Dodji Seketeli <dodji@redhat.com>
10799
10800 PR preprocessor/7263
10801 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
10802 to cpp_classify_number. For diagnostics, use the precise location
10803 instead of the global input_location.
10804
10805 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10806
10807 PR c++/11856
10808 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10809
10810 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10811
10812 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
10813
10814 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10815
10816 PR 53063
10817 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10818 Wreorder): Use LangEnabledBy.
10819 * c-opts.c (c_common_handle_option): Do not enable them
10820 explicitly. Call lang-specific generated functions.
10821 (c_common_post_options): Do not set them here.
10822
10823 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10824
10825 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10826 Wmissing-field-initializers,Wmissing-parameter-type,
10827 Wold-style-declaration,Woverride-init): Use EnabledBy.
10828 * c-opts.c (c_common_post_options): Do not set here explicitly.
10829
10830 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10831
10832 PR 53063
10833 * c-opts.c (c_common_handle_option): Use handle_generated_option
10834 to enable sub-options.
10835
10836 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10837
10838 PR c++/53158
10839 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10840
10841 2012-05-10 Richard Guenther <rguenther@suse.de>
10842
10843 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10844 adjust commentary about TYPE_IS_SIZETYPE types.
10845
10846 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10847
10848 PR c++/53261
10849 * c-common.c (warn_logical_operator): Check that argument of
10850 integer_zerop is not NULL.
10851
10852 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10853
10854 PR c/43772
10855 * c-common.c (warn_logical_operator): Do not warn if either side
10856 is already true or false.
10857
10858 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10859
10860 PR c/51712
10861 * c-common.c (expr_original_type): New.
10862 (shorten_compare): Do not warn for enumeration types.
10863
10864 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10865
10866 * c.opt (fpermissive): Add Var(flag_permissive).
10867
10868 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
10869
10870 PR c++/51033
10871 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10872 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10873
10874 2012-04-30 Dodji Seketeli <dodji@redhat.com>
10875
10876 Add -Wvarargs option
10877 * c.opt (Wvarargs): Define new option.
10878
10879 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10880
10881 * c-common.c (check_function_arguments): Replace
10882 Wmissing-format-attribute with Wsuggest-attribute=format.
10883
10884 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10885
10886 * c.opt (Wsuggest-attribute=format): New. Alias of
10887 Wmissing-format-attribute.
10888 * c-format.c (decode_format_type): Replace
10889 Wmissing-format-attribute with Wsuggest-attribute=format.
10890 (check_function_format): Likewise.
10891
10892 2012-04-27 Ollie Wild <aaw@google.com>
10893
10894 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10895 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10896 * c.opt: Add Wliteral-suffix.
10897
10898 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10899
10900 PR c/44774
10901 * c.opt (Wpedantic): New.
10902 (pedantic): Alias Wpedantic.
10903 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10904 (c_common_post_options): Likewise.
10905 (sanitize_cpp_opts): Likewise.
10906 * c-lex.c (interpret_float): Likewise.
10907 * c-format.c (check_format_types): Likewise.
10908 * c-common.c (pointer_int_sum): Likewise.
10909 (c_sizeof_or_alignof_type): Likewise.
10910 (c_add_case_label): Likewise.
10911 (c_do_switch_warnings): Likewise.
10912 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10913
10914 2012-04-15 Jason Merrill <jason@redhat.com>
10915
10916 PR c++/52818
10917 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10918 (C_STD_NAME): Distinguish between C++98 and C++11.
10919
10920 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10921
10922 PR target/52624
10923 * c-common.h (uint16_type_node): Rename into...
10924 (c_uint16_type_node): ...this.
10925 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10926 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10927
10928 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10929
10930 * c-common.c (warn_if_unused_value): Move definition to here.
10931 * c-common.h (warn_if_unused_value): Move declaration to here.
10932
10933 2012-03-23 William Bader <williambader@hotmail.com>
10934
10935 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10936
10937 2012-03-20 Jason Merrill <jason@redhat.com>
10938
10939 * c-common.h (enum cxx_dialect): Add cxx1y.
10940 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10941 test.
10942 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10943 * c-opts.c (c_common_post_options): Likewise.
10944 (set_std_cxx1y): New.
10945 (c_common_handle_option): Call it.
10946 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10947
10948 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10949
10950 PR c++/14710
10951 * c.opt ([Wuseless-cast]): Add.
10952
10953 2012-03-16 Richard Guenther <rguenther@suse.de>
10954
10955 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10956
10957 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10958
10959 PR c++/44783
10960 * c.opt (ftemplate-backtrace-limit) Add.
10961
10962 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10963
10964 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10965 handling.
10966 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10967 (init_pragma): Don't register extern_prefix.
10968
10969 2012-03-12 Richard Guenther <rguenther@suse.de>
10970
10971 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10972 (builtin_type_for_size): Likewise.
10973
10974 2012-02-13 Jakub Jelinek <jakub@redhat.com>
10975
10976 PR c++/52215
10977 * c-common.c (sync_resolve_params): Don't decide whether to convert
10978 or not based on TYPE_SIZE comparison, convert whenever arg_type
10979 is unsigned INTEGER_TYPE.
10980
10981 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10982
10983 PR c/52118
10984 * c.opt ([Wunused-local-typedefs]): Fix description.
10985
10986 2012-01-24 Mike Stump <mikestump@comcast.net>
10987
10988 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10989 exactly.
10990
10991 2012-01-18 Richard Guenther <rguenther@suse.de>
10992
10993 * c-opts.c (c_common_post_options): Reset LTO flags if
10994 we are about to generate a PCH.
10995
10996 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10997
10998 PR c++/51777
10999 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11000 use pp_unsigned_wide_integer.
11001
11002 2012-01-10 Richard Guenther <rguenther@suse.de>
11003
11004 PR middle-end/51806
11005 * c-opts.c (c_common_handle_option): Move -Werror handling
11006 to language independent code.
11007
11008 2012-01-05 Richard Guenther <rguenther@suse.de>
11009
11010 PR middle-end/51764
11011 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11012 from common.opt.
11013
11014 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11015
11016 PR c++/51316
11017 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11018 of array types with an unknown bound.
11019
11020 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11021
11022 * c-common.c (flag_isoc99): Update comment to refer to C11.
11023 (flag_isoc1x): Change to flag_isoc11.
11024 * c-common.h (flag_isoc99): Update comment to refer to C11.
11025 (flag_isoc1x): Change to flag_isoc11.
11026 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11027 C11.
11028 * c-opts.c (set_std_c1x): Change to set_std_c11.
11029 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11030 Call set_std_c11.
11031 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11032 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11033 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11034 standard.
11035 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11036 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11037 (std=gnu1x): Make alias of std=gnu11.
11038
11039 2011-12-19 Jason Merrill <jason@redhat.com>
11040
11041 PR c++/51228
11042 * c-common.c (handle_transparent_union_attribute): Check the first
11043 field if the type is complete.
11044
11045 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11046
11047 PR libstdc++/51365
11048 * c-common.c (RID_IS_FINAL): Add.
11049 * c-common.h (RID_IS_FINAL): Add.
11050
11051 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11052
11053 * c.opt (fgnu-runtime): Provide full description.
11054 (fnext-runtime): Likewise.
11055 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11056
11057 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11058
11059 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11060 predefines in one place. Add LOCK_FREE predefines.
11061 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11062 new func.
11063
11064 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11065
11066 PR c/51256
11067 * c-common.c (get_atomic_generic_size): Check for various error
11068 conditions
11069 (resolve_overloaded_atomic_exchange,
11070 resolve_overloaded_atomic_compare_exchange,
11071 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11072 error_mark_node for error conditions.
11073
11074 2011-11-08 Richard Guenther <rguenther@suse.de>
11075
11076 PR middle-end/51010
11077 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11078
11079 2011-11-07 Richard Henderson <rth@redhat.com>
11080 Aldy Hernandez <aldyh@redhat.com>
11081 Torvald Riegel <triegel@redhat.com>
11082
11083 Merged from transactional-memory.
11084
11085 * c-common.c (handle_tm_wrap_attribute,
11086 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11087 (struct c_common_reswords): Added __transaction* keywords.
11088 (struct c_common_attribute_table): Added transaction* and tm_regparm
11089 attributes.
11090 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11091 masks.
11092 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11093 find_tm_attribute): Declare.
11094
11095 2011-11-07 Jason Merrill <jason@redhat.com>
11096
11097 PR c++/35688
11098 * c-common.c, c-common.h: Revert yesterday's changes.
11099
11100 2011-11-06 Jason Merrill <jason@redhat.com>
11101
11102 PR c++/35688
11103 * c-common.c (decl_has_visibility_attr): Split out from...
11104 (c_determine_visibility): ...here.
11105 * c-common.h: Declare it.
11106
11107 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11108
11109 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11110 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11111 type.
11112 (check_user_alignment): New. Split out of
11113 handle_aligned_attribute. Disallow integer constants with
11114 noninteger types. Conditionally allow zero.
11115 (handle_aligned_attribute): Use check_user_alignment.
11116 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11117
11118 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11119 Richard Henderson <rth@redhat.com>
11120
11121 Merged from cxx-mem-model.
11122
11123 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11124 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11125 parameters that are the same type size.
11126 (get_atomic_generic_size): New. Find size of generic
11127 atomic function parameters and do typechecking.
11128 (add_atomic_size_parameter): New. Insert size into parameter list.
11129 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11130 either __atomic_exchange_n or external library call.
11131 (resolve_overloaded_atomic_compare_exchange): Restructure
11132 __atomic_compare_exchange to either _n variant or external library call.
11133 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11134 __atomic_load_n or an external library call.
11135 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11136 __atomic_store_n or an external library call.
11137 (resolve_overloaded_builtin): Handle new __atomic builtins.
11138
11139 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11140
11141 PR c++/50608
11142 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11143 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11144 <INDIRECT_REF>: Return the argument.
11145 <ARRAY_REF>: Remove special code for negative offset.
11146 Call fold_build_pointer_plus instead of size_binop.
11147 (fold_offsetof): Remove STOP_REF argument and adjust.
11148 * c-common.h (fold_offsetof_1): Declare.
11149 (fold_offsetof): Remove STOP_REF argument.
11150
11151 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11152
11153 PR c++/50810
11154 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11155 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11156 Wnarrowing for C++0x and C++98.
11157 * c.opt ([Wnarrowing]): Update.
11158
11159 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11160
11161 PR c++/44277
11162 * c.opt: Add Wzero-as-null-pointer-constant.
11163
11164 2011-10-31 Jason Merrill <jason@redhat.com>
11165
11166 * c.opt (-fdeduce-init-list): Off by default.
11167
11168 PR c++/50920
11169 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11170 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11171 and -Wc++11-compat.
11172 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11173
11174 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11175
11176 PR c++/30066
11177 * c.opt (fvisibility-inlines-hidden): Description change.
11178
11179 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11180
11181 Implement C++11 user-defined literals.
11182 * c-common.c (build_userdef_literal): New.
11183 * c-common.def: New tree code.
11184 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11185 * c-lex.c (interpret_float): Add suffix parm.
11186 (c_lex_with_flags): Build literal tokens.
11187
11188 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11189
11190 PR c++/50841
11191 Revert:
11192 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11193
11194 PR c++/50810
11195 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11196 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11197 Wnarrowing for C++0x and C++98.
11198 * c.opt ([Wnarrowing]): Update.
11199
11200 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11201
11202 PR c++/50810
11203 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11204 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11205 Wnarrowing for C++0x and C++98.
11206 * c.opt ([Wnarrowing]): Update.
11207
11208 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11209
11210 PR c++/45385
11211 * c-common.c (conversion_warning): Remove code looking for
11212 artificial operands.
11213
11214 2011-10-18 Dodji Seketeli <dodji@redhat.com>
11215
11216 PR bootstrap/50760
11217 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11218 !NO_IMPLICIT_EXTERN_C.
11219
11220 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
11221
11222 * c-common.c (c_common_reswords): Add __bases,
11223 __direct_bases.
11224 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11225
11226 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11227
11228 PR c++/50757
11229 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11230
11231 2011-10-15 Tom Tromey <tromey@redhat.com>
11232 Dodji Seketeli <dodji@redhat.com>
11233
11234 * c.opt (fdebug-cpp): New option.
11235 * c-opts.c (c_common_handle_option): Handle the option.
11236 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11237 output stream in parameter. Factorized from ...
11238 (maybe_print_line): ... this. Dump location debug information when
11239 -fdebug-cpp is in effect.
11240 (print_line_1): New static function. Takes an output stream in
11241 parameter. Factorized from ...
11242 (print_line): ... here. Dump location information when -fdebug-cpp
11243 is in effect.
11244 (scan_translation_unit): Dump location information when
11245 -fdebug-cpp is in effect.
11246
11247 2011-10-15 Tom Tromey <tromey@redhat.com>
11248 Dodji Seketeli <dodji@redhat.com>
11249
11250 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11251 without argument.
11252 * c-opts.c (c_common_handle_option)<case
11253 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11254 cases. Handle -ftrack-macro-expansion with and without argument.
11255
11256 2011-10-15 Tom Tromey <tromey@redhat.com>
11257 Dodji Seketeli <dodji@redhat.com>
11258
11259 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11260 (print_line, cb_define, do_line_change): Adjust to avoid touching
11261 the internals of struct line_map. Use the public API instead.
11262 * c-pch.c (c_common_read_pch): Likewise.
11263 * c-lex.c (fe_file_change): Likewise.
11264
11265 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
11266
11267 PR c++/17212
11268 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11269
11270 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
11271
11272 PR c++/33067
11273 * c-pretty-print.c (pp_c_floating_constant): Output
11274 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11275
11276 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11277
11278 * c-common.c (def_builtin_1): Delete old interface with two
11279 parallel arrays to hold standard builtin declarations, and replace
11280 it with a function based interface that can support creating
11281 builtins on the fly in the future. Change all uses, and poison
11282 the old names. Make sure 0 is not a legitimate builtin index.
11283 * c-omp.c (c_finish_omp_barrier): Ditto.
11284 (c_finish_omp_taskwait): Ditto.
11285 (c_finish_omp_flush): Ditto.
11286
11287 2011-10-11 Tristan Gingold <gingold@adacore.com>
11288
11289 * c.opt: (fallow-parameterless-variadic-functions): New.
11290
11291 2011-09-08 Dodji Seketeli <dodji@redhat.com>
11292
11293 PR c++/33255 - Support -Wunused-local-typedefs warning
11294 * c-common.h (struct c_language_function::local_typedefs): New
11295 field.
11296 (record_locally_defined_typedef, maybe_record_typedef_use)
11297 (maybe_warn_unused_local_typedefs): Declare new functions.
11298 * c-common.c (record_locally_defined_typedef)
11299 (maybe_record_typedef_use)
11300 (maybe_warn_unused_local_typedefs): Define new functions.
11301 * c.opt: Declare new -Wunused-local-typedefs flag.
11302
11303 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
11304
11305 PR middle-end/50266
11306 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11307 computations.
11308
11309 2011-09-05 Richard Guenther <rguenther@suse.de>
11310
11311 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11312 of integer_minus_one_node for empty array upper bounds.
11313
11314 2011-08-28 Dodji Seketeli <dodji@redhat.com>
11315
11316 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11317 it's the first time it's being called on this main TU.
11318
11319 2011-08-24 Richard Guenther <rguenther@suse.de>
11320
11321 PR c/49396
11322 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11323
11324 2011-08-22 Gabriel Charette <gchare@google.com>
11325
11326 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11327 defined in cpp_init_builtins and c_cpp_builtins.
11328
11329 2011-08-19 Joseph Myers <joseph@codesourcery.com>
11330
11331 * c-common.c (c_common_reswords): Add __builtin_complex.
11332 * c-common.h (RID_BUILTIN_COMPLEX): New.
11333
11334 2011-08-18 Joseph Myers <joseph@codesourcery.com>
11335
11336 * c-common.c (c_common_reswords): Add _Noreturn.
11337 (keyword_is_function_specifier): Handle RID_NORETURN.
11338 * c-common.h (RID_NORETURN): New.
11339
11340 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11341
11342 * c-common.c (unsafe_conversion_p): New function. Check if it is
11343 unsafe to convert an expression to the type.
11344 (conversion_warning): Adjust, use unsafe_conversion_p.
11345 * c-common.h (unsafe_conversion_p): New function declaration.
11346
11347 2011-08-02 Jakub Jelinek <jakub@redhat.com>
11348
11349 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11350 (c_finish_omp_taskyield): New prototype.
11351 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11352 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11353 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11354 or RHS1 have side-effects, evaluate those too in the right spot,
11355 if it is a decl and LHS is also a decl, error out if they
11356 aren't the same.
11357 (c_finish_omp_taskyield): New function.
11358 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11359 * c-pragma.c (omp_pragmas): Add taskyield.
11360 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11361 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11362 PRAGMA_OMP_CLAUSE_MERGEABLE.
11363
11364 2011-07-25 Dodji Seketeli <dodji@redhat.com>
11365
11366 * c-common.h (set_underlying_type): Remove parm name from
11367 declaration.
11368
11369 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
11370
11371 * c-pretty-print.h: Search c-common.h in c-family.
11372
11373 2011-07-22 Jason Merrill <jason@redhat.com>
11374
11375 PR c++/49793
11376 * c.opt (Wnarrowing): New.
11377
11378 PR c++/30112
11379 * c-common.h: Declare c_linkage_bindings.
11380 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11381
11382 PR c++/49813
11383 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11384 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11385 as flag_isoc99 for 'restrict'.
11386 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11387
11388 2011-07-21 Ian Lance Taylor <iant@google.com>
11389
11390 PR middle-end/49705
11391 * c-common.c (c_disable_warnings): New static function.
11392 (c_enable_warnings): New static function.
11393 (c_fully_fold_internal): Change local unused_p to bool. Call
11394 c_disable_warnings and c_enable_warnings rather than change
11395 c_inhibit_evaluation_warnings.
11396
11397 2011-07-20 Jason Merrill <jason@redhat.com>
11398
11399 PR c++/6709 (DR 743)
11400 PR c++/42603 (DR 950)
11401 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11402 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11403 (CPP_DECLTYPE): New.
11404 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11405
11406 2011-07-19 Richard Guenther <rguenther@suse.de>
11407
11408 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11409 * c-omp.c (c_finish_omp_for): Likewise.
11410
11411 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11412
11413 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11414 body on the next line.
11415
11416 2011-07-08 Jason Merrill <jason@redhat.com>
11417
11418 PR c++/45437
11419 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11420
11421 PR c++/49673
11422 * c-common.c (c_apply_type_quals_to_decl): Don't check
11423 TYPE_NEEDS_CONSTRUCTING.
11424
11425 2011-07-06 Richard Guenther <rguenther@suse.de>
11426
11427 * c-common.c (c_common_nodes_and_builtins):
11428 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11429
11430 2011-07-05 Richard Guenther <rguenther@suse.de>
11431
11432 * c-common.c (c_common_nodes_and_builtins): Build all common
11433 tree nodes first.
11434
11435 2011-06-27 Jakub Jelinek <jakub@redhat.com>
11436
11437 * c-common.h (c_tree_chain_next): New static inline function.
11438
11439 * c-common.c (check_builtin_function_arguments): Handle
11440 BUILT_IN_ASSUME_ALIGNED.
11441
11442 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
11443
11444 * c-common.c: Add sync_ or SYNC__ to builtin names.
11445 * c-omp.c: Add sync_ or SYNC__ to builtin names.
11446
11447 2011-06-20 Pierre Vittet <piervit@pvittet.com>
11448
11449 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11450 handler.
11451 (gen_pragma_handler): New union.
11452 (internal_pragma_handler): New type.
11453 (c_register_pragma_with_data)
11454 (c_register_pragma_with_expansion_and_data): New functions.
11455
11456 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11457 (c_register_pragma, c_register_pragma_with_expansion)
11458 (c_invoke_pragma_handler): Changed to work with
11459 internal_pragma_handler.
11460 (c_register_pragma_with_data)
11461 (c_register_pragma_with_expansion_and_data): New functions.
11462
11463 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11464
11465 * c-common.c: Include common/common-target.h.
11466 (handle_section_attribute): Use
11467 targetm_common.have_named_sections.
11468 * c-cppbuiltin.c: Include common/common-target.h.
11469 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11470
11471 2011-06-10 Richard Guenther <rguenther@suse.de>
11472
11473 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11474 to print a IDENTIFIER_NODE.
11475
11476 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11477 Joseph Myers <joseph@codesourcery.com>
11478
11479 * c.opt (fbuilding-libgcc): New option.
11480 * c-cppbuiltin.c (c_cpp_builtins): Define
11481 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11482
11483 2011-06-07 Jason Merrill <jason@redhat.com>
11484
11485 * c-common.c (max_tinst_depth): Lower default to 900.
11486
11487 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11488
11489 2011-06-07 Richard Guenther <rguenther@suse.de>
11490
11491 * c-common.c (c_common_nodes_and_builtins): Do not set
11492 size_type_node or call set_sizetype.
11493
11494 2011-06-07 Dodji Seketeli <dodji@redhat.com>
11495
11496 PR debug/49130
11497 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11498 type when using pointer comparison to compare types.
11499
11500 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11501
11502 * c.opt: Add -Wdelete-non-virtual-dtor.
11503 * c-opts.c (c_common_handle_option): Include it in -Wall.
11504
11505 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11506
11507 PR bootstrap/49190
11508
11509 Revert:
11510 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11511
11512 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11513 not tree_common.
11514
11515 2011-05-27 Jakub Jelinek <jakub@redhat.com>
11516
11517 PR c++/49165
11518 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11519 C++ don't call c_common_truthvalue_conversion on void type arms.
11520
11521 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11522
11523 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11524 (stmt_list_stack): Define.
11525 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11526 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11527
11528 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11529
11530 * c-common.c (warning_candidate_p): Check for BLOCKs.
11531
11532 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11533
11534 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11535 not tree_common.
11536
11537 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11538
11539 * c-common.c (def_fn_type): Remove extra va_end.
11540
11541 2011-05-23 Jason Merrill <jason@redhat.com>
11542
11543 PR c++/48106
11544 * c-common.c (c_common_get_narrower): New.
11545 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11546
11547 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11548
11549 * c-common.h (check_function_arguments): Tweak prototype of
11550 check_function_arguments.
11551 * c-common.c (check_function_arguments): Likewise. Adjust
11552 calls to check_function_nonnull, check_function_format, and
11553 check_function_sentinel.
11554 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11555 separate attributes and typelist arguments. Use
11556 FOREACH_FUNCTION_ARGS to iterate over argument types.
11557
11558 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11559
11560 * c-common.c (c_common_reswords): Reorder.
11561 * c-common.h (rid): Likewise.
11562
11563 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11564
11565 * c-common.c (def_fn_type): Don't call build_function_type, call
11566 build_function_type_array or build_varargs_function_type_array
11567 instead.
11568 (c_common_nodes_and_builtins): Likewise.
11569
11570 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11571
11572 * c-common.c (c_add_case_label): Omit the loc argument to
11573 build_case_label.
11574 * c-common.h (build_case_label): Remove.
11575 * c-semantics.c (build_case_label): Remove.
11576
11577 2011-05-05 Joseph Myers <joseph@codesourcery.com>
11578
11579 * c-objc.h (objc_start_method_definition): Update prototype.
11580 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11581
11582 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11583
11584 * c-common.c (check_main_parameter_types): Reindent. Don't use
11585 TYPE_ARG_TYPES directly.
11586 (handle_nonnull_attribute): Likewise.
11587 (sync_resolve_params): Likewise.
11588 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11589 to check_format_string.
11590 (handle_format_attribute): Likewise.
11591 (check_format_string): Take a function type to examine instead of
11592 a type list. Use a function_arg_iterator to step through argument
11593 types.
11594
11595 2011-05-04 Richard Guenther <rguenther@suse.de>
11596
11597 * c-common.c (fix_string_type): Use size_int for index type bounds.
11598 (start_fname_decls): Do not pass NULL to build_int_cst.
11599 (c_init_attributes): Likewise.
11600 * c-lex.c (c_lex_with_flags): Likewise.
11601
11602 2011-04-27 Jason Merrill <jason@redhat.com>
11603
11604 * c-common.c (make_tree_vector_from_list): New.
11605 * c-common.h: Declare it.
11606
11607 2011-04-26 Richard Guenther <rguenther@suse.de>
11608
11609 PR preprocessor/48248
11610 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11611 for output size with -P.
11612
11613 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11614
11615 * c-common.c (struct c_common_resword): Add __underlying_type.
11616 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11617
11618 2011-04-20 Jim Meyering <meyering@redhat.com>
11619
11620 * c-format.c (init_dollar_format_checking): Remove useless
11621 if-before-free.
11622
11623 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11624
11625 * c-objc.h (objc_get_interface_ivars): Removed.
11626 (objc_detect_field_duplicates): New.
11627 * stub-objc.c: Likewise.
11628
11629 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11630
11631 * stub-objc.c (objc_declare_protocols): Renamed to
11632 objc_declare_protocol.
11633 * c-objc.h: Likewise.
11634
11635 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11636
11637 * stub-objc.c (objc_declare_class): Updated argument name.
11638
11639 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11640
11641 * c-common.h (c_common_init_ts): Declare.
11642 * c-common.c (c_common_init_ts): Define.
11643
11644 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11645
11646 * c-objc.h (objc_build_message_expr): Updated prototype.
11647 * stub-objc.c (objc_build_message_expr): Likewise.
11648
11649 2011-04-12 Martin Jambor <mjambor@suse.cz>
11650
11651 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11652 of cgraph_node.
11653
11654 2011-04-11 Richard Guenther <rguenther@suse.de>
11655
11656 * c-common.c (complete_array_type): Build a range type of
11657 proper type.
11658
11659 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11660
11661 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11662 (handle_type_generic_attribute): Likewise.
11663
11664 2011-04-07 Jason Merrill <jason@redhat.com>
11665
11666 PR c++/48450
11667 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11668 conversion from C++0x scoped enum.
11669
11670 2011-04-06 Joseph Myers <joseph@codesourcery.com>
11671
11672 * c-target-def.h: New file.
11673 * c-target.def: New file.
11674 * c-target.h: New file.
11675 * c-common.c (targetcm): Don't define here.
11676 * c-common.h (default_handle_c_option): Declare.
11677 * c-format.c: Include c-target.h instead of target.h.
11678 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11679 include tm.h.
11680 (default_handle_c_option): Move from targhooks.c.
11681
11682 2011-03-29 Jakub Jelinek <jakub@redhat.com>
11683
11684 PR preprocessor/48248
11685 * c-ppoutput.c (print): Add src_file field.
11686 (init_pp_output): Initialize it.
11687 (maybe_print_line): Don't optimize by adding up to 8 newlines
11688 if map->to_file and print.src_file are different file.
11689 (print_line): Update print.src_file.
11690
11691 2011-03-25 Kai Tietz <ktietz@redhat.com>
11692
11693 * c-ada-spec.c (compare_comment): Use filename_cmp
11694 instead of strcmp for filename.
11695
11696 2011-03-25 Jeff Law <law@redhat.com>
11697
11698 * c-common.c (def_fn_type): Add missing va_end.
11699
11700 2011-03-25 Jason Merrill <jason@redhat.com>
11701
11702 * c.opt: Add -std=c++03.
11703
11704 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11705
11706 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11707
11708 2011-03-17 Kai Tietz <ktietz@redhat.com>
11709
11710 PR target/12171
11711 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11712 Display allowed attributes for function pointer types.
11713 (pp_c_attributes_display): New function to display
11714 attributes having affects_type_identity flag set to true.
11715 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11716
11717 * c-common.c (c_common_attribute_table):
11718 Add new element.
11719 (c_common_format_attribute_table): Likewise.
11720
11721 2011-03-18 Jason Merrill <jason@redhat.com>
11722
11723 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11724 * c-common.h: Don't declare it here.
11725 * c-common.c: Or define it here.
11726 * c-opts.c (c_common_handle_option): Or set it here.
11727
11728 PR c++/35315
11729 * c-common.c (handle_transparent_union_attribute): Don't
11730 make a duplicate type in C++.
11731
11732 2011-03-15 Jason Merrill <jason@redhat.com>
11733
11734 * c-common.c (max_constexpr_depth): New.
11735 * c-common.h: Declare it.
11736 * c-opts.c (c_common_handle_option): Set it.
11737 * c.opt (fconstexpr-depth): New option.
11738
11739 2011-03-11 Jason Merrill <jason@redhat.com>
11740
11741 * c-common.c (attribute_takes_identifier_p): Add missing const.
11742
11743 PR c++/46803
11744 * c-common.c (attribute_takes_identifier_p): Assume that an
11745 unknown attribute takes an identifier.
11746
11747 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11748
11749 PR c/47786
11750 * c-common.c (c_type_hash): Call list_length instead of iterating
11751 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11752
11753 2011-02-19 Jakub Jelinek <jakub@redhat.com>
11754
11755 PR c/47809
11756 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11757
11758 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11759
11760 * c.opt (fobjc-abi-version=) New.
11761 (fobjc-nilcheck): New.
11762
11763 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11764
11765 PR c++/46890
11766 * c-common.h (keyword_is_decl_specifier): Declare.
11767 * c-common.c (keyword_is_decl_specifier): Define.
11768 (keyword_is_function_specifier): New function.
11769
11770 2011-01-26 Jakub Jelinek <jakub@redhat.com>
11771
11772 PR c/47473
11773 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11774 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11775 REAL_TYPE.
11776
11777 2011-01-26 Arnaud Charlet <charlet@adacore.com>
11778
11779 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11780
11781 2011-01-26 Jakub Jelinek <jakub@redhat.com>
11782
11783 PR pch/47430
11784 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11785 after init_c_lex if pch_file is set.
11786
11787 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11788
11789 PR c++/43601
11790 * c.opt (-fkeep-inline-dllexport): New switch.
11791
11792 2011-01-12 Richard Guenther <rguenther@suse.de>
11793
11794 PR middle-end/32511
11795 * c-common.c (handle_weak_attribute): Warn instead of error
11796 on declaring an inline function weak.
11797
11798 2011-01-05 Tom Tromey <tromey@redhat.com>
11799
11800 * c-common.h (lvalue_error): Update.
11801 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11802 not error.
11803
11804 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
11805
11806 PR objc/47075
11807 * c-objc.h (objc_finish_message_expr): Added argument to
11808 prototype.
11809
11810 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11811
11812 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11813 Use prototype_p.
11814
11815 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11816
11817 * c-objc.h (objc_maybe_warn_exceptions): New.
11818 * stub-objc.c (objc_maybe_warn_exceptions): New.
11819
11820 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11821
11822 * c-common.h (readonly_error): Declare.
11823 * c-common.c (readonly_error): Define.
11824
11825 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11826
11827 * c-common.h (invalid_indirection_error): Declare.
11828 * c-common.c (invalid_indirection_error): Define.
11829
11830 2010-12-03 Richard Guenther <rguenther@suse.de>
11831
11832 PR c/46745
11833 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11834 (pp_c_unary_expression): Likewise.
11835 (pp_c_expression): Likewise.
11836
11837 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11838
11839 * c-common.h (objc_finish_function): New.
11840 (objc_non_volatilized_type): Removed.
11841 (objc_type_quals_match): Removed.
11842 * stub-objc.c (objc_finish_function): New.
11843 (objc_non_volatilized_type): Removed.
11844 (objc_type_quals_match): Removed.
11845
11846 2010-11-30 Joseph Myers <joseph@codesourcery.com>
11847
11848 * c-common.h (parse_optimize_options): Declare.
11849 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11850 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11851
11852 2010-11-29 Joseph Myers <joseph@codesourcery.com>
11853
11854 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11855 GET_ENVIRONMENT.
11856 * c-pch.c (O_BINARY): Don't define here.
11857 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11858
11859 2010-11-25 Joseph Myers <joseph@codesourcery.com>
11860
11861 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11862 targetm.except_unwind_info.
11863
11864 2010-11-23 Joseph Myers <joseph@codesourcery.com>
11865
11866 * c-opts.c (c_common_handle_option): Pass location to
11867 set_struct_debug_option.
11868
11869 2010-11-23 Joseph Myers <joseph@codesourcery.com>
11870
11871 * c-common.c (visibility_options): Move from ../opts.c.
11872 * c-common.h (struct visibility_flags, visibility_options):
11873 Declare here.
11874 * c-opts.c (finish_options): Rename to c_finish_options.
11875 (c_common_init): Update call to finish_options.
11876
11877 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11878
11879 PR objc/34033
11880 * c-lex.c (lex_string): Check that each string in an Objective-C
11881 string concat sequence starts with either one or zero '@', and
11882 that there are no spurious '@' signs at the end.
11883
11884 2010-11-20 Joseph Myers <joseph@codesourcery.com>
11885
11886 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11887 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11888 HANDLE_PRAGMA_VISIBILITY.
11889 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11890 HANDLE_PRAGMA_VISIBILITY): Don't define.
11891 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11892
11893 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11894
11895 PR c++/16189
11896 PR c++/36888
11897 PR c++/45331
11898 * c-common.h (keyword_begins_type_specifier): Declare.
11899 (keyword_is_storage_class_specifier): Declare.
11900 (keyword_is_type_qualifier): Declare.
11901 * c-common.c (keyword_begins_type_specifier): New function.
11902 (keyword_is_storage_class_specifier): New function.
11903 (keyword_is_type_qualifier): Declare.
11904
11905 2010-11-19 Joseph Myers <joseph@codesourcery.com>
11906
11907 PR c/46547
11908 * c-common.c (in_late_binary_op): Define.
11909 (c_common_truthvalue_conversion): Check in_late_binary_op before
11910 calling c_save_expr.
11911 * c-common.h (in_late_binary_op): Declare.
11912
11913 2010-11-19 Joseph Myers <joseph@codesourcery.com>
11914
11915 * c-opts.c (c_common_handle_option): Update calls to
11916 set_struct_debug_option.
11917
11918 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11919
11920 * c-common.h (objc_declare_protocols): Added additional argument.
11921 * stub-objc.c (objc_declare_protocol): Same change.
11922
11923 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11924
11925 PR c/33193
11926 * c-common.h (build_real_imag_expr): Declare.
11927 * c-semantics.c (build_real_imag_expr): Define.
11928
11929 2010-11-17 Joseph Myers <joseph@codesourcery.com>
11930
11931 * c-opts.c (c_common_parse_file): Take no arguments.
11932 * c-common.h (c_common_parse_file): Update prototype.
11933
11934 2010-11-16 Jakub Jelinek <jakub@redhat.com>
11935
11936 PR c++/46401
11937 * c-common.c (warning_candidate_p): Don't track non-const calls
11938 or STRING_CSTs.
11939
11940 2010-11-15 Ian Lance Taylor <iant@google.com>
11941
11942 * c-lex.c (init_c_lex): Set macro debug callbacks if
11943 flag_dump_go_spec is set.
11944
11945 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11946
11947 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11948 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11949
11950 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11951
11952 PR preprocessor/45038
11953 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11954 dialects.
11955
11956 2010-11-12 Joseph Myers <joseph@codesourcery.com>
11957
11958 * c-common.h (c_family_lang_mask): Declare.
11959 * c-opts.c (c_family_lang_mask): Make extern.
11960 * c-pragma.c (handle_pragma_diagnostic): Use
11961 control_warning_option.
11962
11963 2010-11-12 Joseph Myers <joseph@codesourcery.com>
11964
11965 * c-common.c (parse_optimize_options): Update call to
11966 decode_options.
11967 * c-common.h (c_common_handle_option): Update prototype.
11968 * c-opts.c (c_common_handle_option): Take location_t parameter and
11969 pass it to other functions.
11970
11971 2010-11-11 Joseph Myers <joseph@codesourcery.com>
11972
11973 * c-opts.c (warning_as_error_callback): Remove.
11974 (c_common_initialize_diagnostics): Don't call
11975 register_warning_as_error_callback.
11976 (c_common_handle_option): Handle -Werror=normalized= here.
11977
11978 2010-11-10 Joseph Myers <joseph@codesourcery.com>
11979
11980 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11981 in diagnostic.
11982 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11983 letter.
11984 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11985 Remove trailing '.' from diagnostics.
11986 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11987
11988 2010-11-10 Joseph Myers <joseph@codesourcery.com>
11989
11990 * c-common.c (parse_optimize_options): Pass global_dc to
11991 decode_options.
11992 * c-opts.c (c_common_handle_option): Pass &global_options to
11993 set_Wstrict_aliasing.
11994 * c.opt (v): Don't mark Common or document here.
11995
11996 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11997
11998 PR target/44981
11999 * c-format.c (format_type): New type gcc_objc_string_format_type.
12000 (valid_stringptr_type_p): New.
12001 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12002 (check_format_string): Pass expected type, use
12003 valid_stringptr_type_p (), check that the format string types are
12004 consistent with the format specification.
12005 (decode_format_attr): Warn if NSString is used outside objective-c.
12006 (format_types_orig): Add NSString.
12007 (format_name): New.
12008 (format_flags): New.
12009 (check_format_arg): Handle format strings requiring an external parser.
12010 first_target_format_type: New variable.
12011 (handle_format_attribute): Set up first_target_format_type, pass the
12012 expected format arg string type to check_format_string().
12013 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12014 * stub-objc.c (objc_string_ref_type_p): New.
12015 (objc_check_format_arg): New.
12016
12017 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12018
12019 Fixed using the Objective-C 2.0 dot-syntax with class names.
12020 * c-common.h (objc_build_class_component_ref): New.
12021 * stub-objc.c (objc_build_class_component_ref): New.
12022
12023 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12024
12025 * c.opt (Wproperty-assign-default): New option.
12026
12027 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12028
12029 Implemented -fobjc-std=objc1 flag.
12030 * c.opt (fobjc-std=objc1): New option.
12031
12032 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12033
12034 Implemented format and noreturn attributes for Objective-C methods.
12035 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12036 attribute for Objective-C methods.
12037
12038 2010-10-31 Jason Merrill <jason@redhat.com>
12039
12040 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12041 EXPR_LOC_OR_HERE.
12042
12043 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12044
12045 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12046 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12047 (objc_add_property_declaration): Removed arguments for copies and
12048 ivar.
12049 (objc_build_getter_call): Renamed to
12050 objc_maybe_build_component_ref.
12051 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12052 (objc_is_property_ref): New.
12053 * c-common.c (c_common_reswords): Removed copies and ivar.
12054 * stub-objc.c (objc_add_property_declaration): Removed arguments
12055 for copies and ivar.
12056 (objc_build_getter_call): Renamed to
12057 objc_maybe_build_component_ref.
12058 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12059 (objc_is_property_ref): New.
12060
12061 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12062 Matthew Gingell <gingell@adacore.com>
12063
12064 * c-ada-spec.c (separate_class_package): New function.
12065 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12066 name of their enclosing package.
12067 (print_ada_declaration): Use separate_class_package.
12068
12069 2010-10-27 Jason Merrill <jason@redhat.com>
12070
12071 * c-common.c (c_common_reswords): Add __is_literal_type.
12072 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12073
12074 * c-common.c (check_case_value): Remove special C++ code.
12075
12076 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12077
12078 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12079 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12080 and RID_LAST_PATTR.
12081 (objc_add_property_declaration): Added additional arguments.
12082 (objc_property_attribute_kind): Removed.
12083 (objc_set_property_attr): Removed.
12084 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12085 copy and nonatomic.
12086 * stub-objc.c (objc_add_property_declaration): Added additional
12087 arguments.
12088 (objc_set_property_attr): Removed.
12089
12090 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12091
12092 * c-common.h (objc_add_property_variable): Renamed to
12093 objc_add_property_declaration. Added location argument.
12094 * stub-objc.c (objc_add_property_variable): Same change.
12095
12096 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12097
12098 * c-common.h (objc_maybe_printable_name): New.
12099 * stub-objc.c (objc_maybe_printable_name): New.
12100
12101 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12102 Andrew Pinski <pinskia@gmail.com>
12103
12104 * c-common.h (c_common_mark_addressable_vec): Declare.
12105 * c-common.c (c_common_mark_addressable_vec): New function.
12106
12107 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12108
12109 * c-common.h (objc_set_method_type): Removed.
12110 (objc_add_method_declaration): Added boolean argument.
12111 (objc_start_method_definition): Same change.
12112 (objc_build_method_signature): Same change.
12113 * stub-objc.c (objc_set_method_type): Removed.
12114 (objc_add_method_declaration): Added boolean argument.
12115 (objc_start_method_definition): Same change.
12116 (objc_build_method_signature): Same change.
12117
12118 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12119
12120 * c-common.h (finish_file): Removed.
12121 (objc_write_global_declarations): New.
12122 * c-opts.c (c_common_parse_file): Do not call finish_file.
12123 * stub-objc.c (objc_write_global_declarations): New.
12124
12125 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12126
12127 Implemented parsing @synthesize and @dynamic for
12128 Objective-C/Objective-C++.
12129 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12130 (objc_add_synthesize_declaration): New.
12131 (objc_add_dynamic_declaration): New.
12132 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12133 * stub-objc.c (objc_add_synthesize_declaration): New.
12134 (objc_add_dynamic_declaration): New.
12135
12136 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12137
12138 PR target/46041
12139 * c-cppbuiltin.c (mode_has_fma): Move function here from
12140 builtins.c. Don't use the fma optab, instead just use the
12141 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12142 using -save-temps.
12143
12144 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12145
12146 Merge from 'apple/trunk' branch on FSF servers.
12147
12148 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12149
12150 Radar 4330422
12151 * c-common.h (objc_non_volatilized_type): New declaration
12152 * stub-objc.c (objc_non_volatilized_type): New stub.
12153
12154 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12155
12156 Merge from 'apple/trunk' branch on FSF servers.
12157
12158 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12159
12160 Radar 4133425
12161 * c-common.h (objc_diagnose_private_ivar): New decl.
12162 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12163
12164 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12165
12166 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12167 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12168 (objc_ivar_visibility_kind): New enum.
12169 (objc_set_visibility): Adjust prototype to use visibility enum.
12170 * stub-objc.c (objc_set_visibility): Adjust stub to use
12171 visibility enum.
12172
12173 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12174
12175 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12176 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12177 has the appropriate fma builtins.
12178 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12179
12180 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12181
12182 merge from FSF apple 'trunk' branch.
12183 2006 Fariborz Jahanian <fjahanian@apple.com>
12184
12185 Radars 4436866, 4505126, 4506903, 4517826
12186 * c-common.c (c_common_resword): Define @property and its attributes.
12187 * c-common.h: Define property attribute enum entries.
12188 (OBJC_IS_PATTR_KEYWORD): New.
12189 (objc_property_attribute_kind): New enum.
12190 Declare objc_set_property_attr (), objc_add_property_variable (),
12191 objc_build_getter_call () and objc_build_setter_call ().
12192 * stub-objc.c (objc_set_property_attr): New stub.
12193 (objc_add_property_variable): Likewise.
12194 (objc_build_getter_call): Likewise.
12195 (objc_build_setter_call) Likewise.
12196
12197 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12198
12199 merge from FSF apple 'trunk' branch.
12200 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
12201
12202 Radar 3803157 (method attributes)
12203 * c-common.c (handle_deprecated_attribute): Recognize
12204 objc methods as valid declarations.
12205 * c-common.h: Declare objc_method_decl ().
12206 * stub-objc.c (objc_method_decl): New stub.
12207
12208 2010-10-08 Joseph Myers <joseph@codesourcery.com>
12209
12210 * c-common.c (parse_optimize_options): Call
12211 decode_cmdline_options_to_array_default_mask before
12212 decode_options. Update arguments to decode_options.
12213 * c-common.h (c_common_init_options_struct): Declare.
12214 * c-opts.c (c_common_init_options_struct): New. Split out from
12215 c_common_init_options.
12216
12217 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12218
12219 Implemented fast enumeration for Objective-C.
12220 * c-common.h (objc_finish_foreach_loop): New.
12221 * stub-objc.c (objc_finish_foreach_loop): New.
12222
12223 2010-10-05 Joseph Myers <joseph@codesourcery.com>
12224
12225 * c-common.h (struct diagnostic_context): Don't declare here.
12226 (c_common_initialize_diagnostics): Declare using
12227 diagnostic_context typedef.
12228 * c-opts.c (c_common_handle_option): Pass global_dc to
12229 handle_generated_option.
12230
12231 2010-10-04 Joseph Myers <joseph@codesourcery.com>
12232
12233 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12234 handle_generated_option.
12235
12236 2010-10-03 Ian Lance Taylor <iant@google.com>
12237
12238 * c.opt (-fplan9-extensions): New option.
12239
12240 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12241
12242 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12243 Remove.
12244 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12245 of duplicating code.
12246
12247 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12248
12249 * c-common.c: Add two new entries for @optional
12250 and @required keywords.
12251
12252 merge from FSF 'apple/trunk' branch.
12253 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
12254
12255 Radar 4386773
12256 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12257 objective-c keywords.
12258 (objc_set_method_opt): New declaration.
12259 * stub-objc.c (objc_set_method_opt): New stub.
12260
12261 2010-09-30 Joseph Myers <joseph@codesourcery.com>
12262
12263 * c-common.c (handle_optimize_attribute): Pass &global_options to
12264 cl_optimization_save and cl_optimization_restore.
12265 * c-opts.c (c_common_handle_option): Pass &global_options to
12266 handle_generated_option.
12267 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12268 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12269 &global_options to cl_optimization_restore.
12270
12271 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
12272
12273 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12274 Objective-C/Objective-C++ keywords.
12275
12276 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12277
12278 Merge from 'apple/trunk' branch on FSF servers.
12279
12280 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
12281
12282 Radar 4281748
12283 * c-common.h (objc_check_global_decl): New declaration.
12284 * stub-objc.c (objc_check_global_decl): New stub.
12285
12286 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12287
12288 * c.opt: Don't use VarExists.
12289
12290 2010-09-29 Joseph Myers <joseph@codesourcery.com>
12291
12292 * c-common.c (c_cpp_error): Update names of diagnostic_context
12293 members.
12294 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12295 cl_optimization members.
12296 * c-opts.c (warning_as_error_callback, c_common_handle_option,
12297 sanitize_cpp_opts, finish_options): Update names of cpp_options
12298 members.
12299
12300 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
12301
12302 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
12303 (objc_is_reserved_word): Removed.
12304 * c-common.c: Updated comments.
12305 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12306 objc_is_reserved_word.
12307 * stub-objc.c (objc_is_reserved_word): Removed.
12308
12309 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12310
12311 * c-common.h (objc_add_method_declaration): Adjust prototype to
12312 include attributes.
12313 (objc_start_method_definition): Likewise.
12314 (objc_build_keyword_decl): Likewise.
12315 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12316 (objc_start_method_definition): Likewise.
12317 (objc_build_keyword_decl): Likewise.
12318
12319 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12320
12321 * c-common.h (objc_start_class_interface): Adjust prototype.
12322 (objc_start_category_interface): Likewise.
12323 (objc_start_protocol): Likewise.
12324 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12325 (objc_start_class_interface): Likewise.
12326 (objc_start_category_interface): Likewise.
12327
12328 2010-09-27 Ian Lance Taylor <iant@google.com>
12329
12330 * c-common.c (c_common_attribute_table): Add no_split_stack.
12331 (handle_no_split_stack_attribute): New static function.
12332
12333 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12334
12335 Merge from 'apple/trunk' branch on FSF servers.
12336
12337 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
12338
12339 Radar 4229905
12340 * c-common.h (objc_have_common_type): New declaration.
12341 * stub-objc.c (objc_have_common_type): New stub.
12342
12343 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12344
12345 Radar 4154928
12346 * c-common.h (objc_common_type): New prototype.
12347 * stub-objc.c (objc_common_type): New stub.
12348
12349 2010-09-24 Jan Hubicka <jh@suse.cz>
12350
12351 * c-common.c (handle_leaf_attribute): New function.
12352 (struct attribute_spec c_common_att): Add leaf.
12353
12354 2010-09-22 Joseph Myers <joseph@codesourcery.com>
12355
12356 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12357 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12358 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12359 -include-barrier, -include-directory, -include-directory=,
12360 -include-directory-after, -include-directory-after=,
12361 -include-prefix, -include-prefix=, -include-with-prefix,
12362 -include-with-prefix=, -include-with-prefix-after,
12363 -include-with-prefix-after=, -include-with-prefix-before,
12364 -include-with-prefix-before=, -no-integrated-cpp,
12365 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12366 -output=, -pedantic, -pedantic-errors, -preprocess,
12367 -print-missing-file-dependencies, -trace-includes, -traditional,
12368 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12369 -user-dependencies, -verbose, -write-dependencies,
12370 -write-user-dependencies, no-integrated-cpp, traditional): New.
12371
12372 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12373
12374 PR objc/23710
12375 * c-common.h (objc_start_method_definition): Return bool instead
12376 of void.
12377 * stub-objc.c (objc_start_method_definition): Return bool instead
12378 of void.
12379
12380 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12381
12382 PR objc/25965
12383 * c-common.h (objc_get_interface_ivars): New declaration.
12384 * stub-objc.c (objc_get_interface_ivars): New stub.
12385
12386 2010-09-15 Ian Lance Taylor <iant@google.com>
12387
12388 * c-common.c (parse_optimize_options): Do not capitalize warning
12389 messages. Remove period at end of warning message.
12390
12391 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12392
12393 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12394 (handle_alias_attribute): ... here.
12395 (handle_ifunc_attribute): New.
12396
12397 2010-09-06 Mark Mitchell <mark@codesourcery.com>
12398
12399 * c-common.h (do_warn_double_promotion): Declare.
12400 * c-common.c (do_warn_double_promotion): Define.
12401
12402 2010-09-05 Mark Mitchell <mark@codesourcery.com>
12403
12404 * c.opt (Wdouble-promotion): New.
12405
12406 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12407
12408 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12409 fvtable-thunks, fxref): Mark no longer supported in help text.
12410
12411 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12412
12413 * c.opt (Wimport, fall-virtual, falt-external-templates,
12414 fdefault-inline, fenum-int-equiv, fexternal-templates,
12415 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12416 fname-mangling-version-, fnew-abi, fnonnull-objects,
12417 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12418 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12419 applicable.
12420 (fhandle-exceptions): Mark with Alias and Warn.
12421 * c-opts.c (c_common_handle_option): Don't handle options marked
12422 as ignored.
12423
12424 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12425
12426 * c.opt (Wcomments, Werror-implicit-function-declaration,
12427 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12428 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12429 aliases.
12430 * c-common.c (option_codes): Use OPT_Wcomment instead of
12431 OPT_Wcomments.
12432 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12433 Don't handle options marked as aliases.
12434
12435 2010-08-25 Richard Guenther <rguenther@suse.de>
12436
12437 * c-common.c (c_common_get_alias_set): Remove special
12438 handling for pointers.
12439
12440 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12441
12442 * c-common.c: Use FOR_EACH_VEC_ELT.
12443 * c-gimplify.c: Likewise.
12444 * c-pragma.c: Likewise.
12445
12446 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12447
12448 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12449 RejectDriver.
12450 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12451 RejectDriver.
12452 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12453 instead of OPT_MDX and OPT_MMDX.
12454
12455 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12456
12457 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12458
12459 2010-08-12 Joseph Myers <joseph@codesourcery.com>
12460
12461 * c.opt (MD, MMD): Change to MDX and MMDX.
12462 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12463
12464 2010-08-11 Joseph Myers <joseph@codesourcery.com>
12465
12466 * c-opts.c (c_common_handle_option): Call handle_generated_option
12467 instead of handle_option.
12468
12469 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12470
12471 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12472 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12473
12474 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12475
12476 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12477 (pending_redefine_extname): Change type to a VEC.
12478 (add_to_renaming_pragma_list): Update for new type of
12479 pending_redefine_extname.
12480 (maybe_apply_renaming_pragma): Likewise.
12481
12482 2010-08-04 Arnaud Charlet <charlet@adacore.com>
12483
12484 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12485 visited.
12486 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12487 decide whether a type has already been declared/seen.
12488 Do not go to the original type.
12489 (dump_nested_types): New parameter forward.
12490 Generate forward declaration if needed and mark type as visited.
12491 (print_ada_declaration): Call dump_nested_types if not already done.
12492 Mark types as visited.
12493
12494 2010-08-03 Joseph Myers <joseph@codesourcery.com>
12495
12496 * c.opt (-print-pch-checksum): Remove option.
12497 * c-opts.c (c_common_handle_option): Don't handle
12498 OPT_print_pch_checksum.
12499
12500 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12501
12502 * c-common.h (c_common_handle_option): Update prototype and return
12503 value type.
12504 * c-opts.c (c_common_handle_option): Update prototype and return
12505 value type. Update calls to handle_option and
12506 enable_warning_as_error.
12507
12508 2010-07-27 Jakub Jelinek <jakub@redhat.com>
12509
12510 PR c/45079
12511 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12512
12513 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12514
12515 * c-common.h (c_common_missing_argument): Remove.
12516 * c-opts.c (c_common_missing_argument): Remove.
12517 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12518 idirafter, imacros, include, isysroot, isystem, iquote): Add
12519 MissingArgError.
12520 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12521
12522 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12523
12524 * c-common.h (c_common_option_lang_mask,
12525 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12526 New.
12527 (c_common_init_options): Update prototype.
12528 * c-opts.c (c_common_option_lang_mask): New.
12529 (c_common_initialize_diagnostics): Split out of
12530 c_common_init_options.
12531 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12532 New.
12533 (c_common_init_options): Update prototype. Use decoded options in
12534 search for -lang-asm.
12535
12536 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12537
12538 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12539 * c-format.c: Likewise.
12540
12541 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12542
12543 * c-common.h: Include diagnostic-core.h. Error if already
12544 included.
12545 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12546
12547 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12548
12549 * c-common.c (IN_GCC_FRONTEND): Do not undef.
12550 Do not include expr.h
12551 (vector_mode_valid_p): Move here.
12552
12553 2010-06-21 DJ Delorie <dj@redhat.com>
12554
12555 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12556 allow these pragmas anywhere.
12557
12558 2010-06-14 Jakub Jelinek <jakub@redhat.com>
12559
12560 PR bootstrap/44509
12561 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12562 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12563 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12564 ggc_strdup instead of xstrdup.
12565
12566 2010-06-10 Jakub Jelinek <jakub@redhat.com>
12567
12568 * c-cppbuiltin.c: Include cpp-id-data.h.
12569 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12570 (lazy_hex_fp_value): New function.
12571 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12572
12573 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12574
12575 * c-gimplify.c: Do not include tree-flow.h
12576
12577 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12578
12579 PR other/44034
12580 * c-common.c: Rename targetm member:
12581 targetm.enum_va_list -> targetm.enum_va_list_p
12582
12583 2010-06-28 Anatoly Sokolov <aesok@post.ru>
12584
12585 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12586
12587 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12588
12589 * c-cppbuiltin.c: Do not include except.h.
12590
12591 2010-06-24 Andi Kleen <ak@linux.intel.com>
12592
12593 * c-common.c (warn_for_omitted_condop): New.
12594 * c-common.h (warn_for_omitted_condop): Add prototype.
12595
12596 2010-06-21 Joseph Myers <joseph@codesourcery.com>
12597
12598 * c.opt (lang-objc): Remove.
12599 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12600
12601 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12602
12603 * c-opts.c: Include "tm_p.h".
12604
12605 2010-06-20 Joseph Myers <joseph@codesourcery.com>
12606
12607 * c-common.c (parse_optimize_options): Update call to
12608 decode_options.
12609
12610 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12611
12612 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12613 new type of types_used_by_cur_var_decl.
12614
12615 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12616
12617 PR bootstrap/44512
12618 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12619 for C++ standard compliance.
12620
12621 2010-06-16 Jason Merrill <jason@redhat.com>
12622
12623 * c.opt: Add -Wnoexcept.
12624
12625 2010-06-16 Richard Guenther <rguenther@suse.de>
12626
12627 PR c/44555
12628 * c-common.c (c_common_truthvalue_conversion): Remove
12629 premature and wrong optimization concering ADDR_EXPRs.
12630
12631 2010-06-15 Arnaud Charlet <charlet@adacore.com>
12632
12633 * c-ada-spec.c (dump_sloc): Remove column info.
12634 (is_simple_enum): New function.
12635 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12636 enum types when relevant.
12637
12638 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12639
12640 * c-common.c (conversion_warning): Warn at expression
12641 location.
12642
12643 2010-06-10 Joseph Myers <joseph@codesourcery.com>
12644
12645 * c-opts.c (c_common_handle_option): Don't handle
12646 OPT_fshow_column.
12647
12648 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12649
12650 * c-pragma.c (push_alignment): Use typed GC allocation.
12651 (handle_pragma_push_options): Likewise.
12652
12653 * c-common.c (parse_optimize_options): Likewise.
12654
12655 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12656 option.
12657
12658 2010-06-07 Joseph Myers <joseph@codesourcery.com>
12659
12660 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12661 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12662 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12663 flag_signed_bitfields, warn_strict_null_sentinel,
12664 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12665 flag_gen_declaration, flag_no_gnu_keywords,
12666 flag_implement_inlines, flag_implicit_templates,
12667 flag_implicit_inline_templates, flag_optional_diags,
12668 flag_elide_constructors, flag_default_inline, flag_rtti,
12669 flag_conserve_space, flag_access_control, flag_check_new,
12670 flag_new_for_scope, flag_weak, flag_working_directory,
12671 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12672 flag_enforce_eh_specs, flag_threadsafe_statics,
12673 flag_pretty_templates): Remove.
12674 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12675 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12676 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12677 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12678 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12679 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12680 flag_no_gnu_keywords, flag_implement_inlines,
12681 flag_implicit_templates, flag_implicit_inline_templates,
12682 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12683 flag_rtti, flag_conserve_space, flag_access_control,
12684 flag_check_new, flag_new_for_scope, flag_weak,
12685 flag_working_directory, flag_use_cxa_atexit,
12686 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12687 flag_threadsafe_statics, flag_pretty_templates,
12688 warn_strict_null_sentinel): Remove.
12689 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12690 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12691 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12692 fimplicit-inline-templates, fimplicit-templates,
12693 flax-vector-conversions, fms-extensions, fnil-receivers,
12694 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12695 frtti, fshort-double, fshort-enums, fshort-wchar,
12696 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12697 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12698 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12699 gen-decls, undef): Use Var.
12700 (fdefault-inline, foptional-diags): Document as doing nothing.
12701 * c-opts.c (c_common_handle_option): Remove cases for options now
12702 using Var. Mark ignored options as such.
12703
12704 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12705
12706 * c-common.c: Moved to here from parent directory.
12707 * c-common.def: Likewise.
12708 * c-common.h: Likewise.
12709 * c-cppbuiltin.c: Likewise.
12710 * c-dump.c: Likewise.
12711 * c-format.c: Likewise.
12712 * c-format.h : Likewise.
12713 * c-gimplify.c: Likewise.
12714 * c-lex.c: Likewise.
12715 * c-omp.c: Likewise.
12716 * c.opt: Likewise.
12717 * c-opts.c: Likewise.
12718 * c-pch.c: Likewise.
12719 * c-ppoutput.c: Likewise.
12720 * c-pragma.c: Likewise.
12721 * c-pragma.h: Likewise.
12722 * c-pretty-print.c: Likewise.
12723 * c-pretty-print.h: Likewise.
12724 * c-semantics.c: Likewise.
12725 * stub-objc.c: Likewise.
12726
12727 * c-common.c: Include gt-c-family-c-common.h.
12728 * c-pragma.c: Include gt-c-family-c-pragma.h.
12729 \f
12730 Copyright (C) 2010-2021 Free Software Foundation, Inc.
12731
12732 Copying and distribution of this file, with or without modification,
12733 are permitted in any medium without royalty provided the copyright
12734 notice and this notice are preserved.