]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
1 2023-09-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/111069
4 * c-opts.cc (c_common_post_options): Change latest_abi_version to 19.
5
6 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7
8 * c.opt: Change spelling to macOS.
9
10 2023-08-31 Richard Biener <rguenther@suse.de>
11
12 PR middle-end/111253
13 * c-pretty-print.cc (c_pretty_printer::primary_expression):
14 Only dump gimple_assign_single_p SSA def RHS.
15
16 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
17
18 * c-common.h (c_omp_check_loop_binding_exprs): Declare.
19 * c-omp.cc: Include tree-iterator.h.
20 (find_binding_in_body): New.
21 (check_loop_binding_expr_r): New.
22 (LOCATION_OR): New.
23 (check_looop_binding_expr): New.
24 (c_omp_check_loop_binding_exprs): New.
25
26 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
27
28 * c-format.cc (read_any_format_width):
29 Rename TRUE/FALSE to true/false.
30
31 2023-08-20 Martin Uecker <uecker@tugraz.at>
32
33 * c-format.cc: Fix identation.
34
35 2023-08-20 Tomas Kalibera <tomas.kalibera@gmail.com>
36
37 PR c/95130
38 * c-format.cc: skip default format for printf symbol if
39 explicitly declared by prototype.
40
41 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
42
43 PR c/106537
44 * c.opt (Wcompare-distinct-pointer-types): New option.
45
46 2023-08-14 Jason Merrill <jason@redhat.com>
47
48 * c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
49
50 2023-08-11 Jakub Jelinek <jakub@redhat.com>
51
52 * c-common.cc (c_common_reswords): Add __typeof_unqual
53 and __typeof_unqual__ spellings of typeof_unqual.
54
55 2023-08-11 Martin Uecker <uecker@tugraz.at>
56
57 PR c/84510
58 * c.opt: Enable warning for C and ObjC.
59
60 2023-08-05 Martin Uecker <uecker@tugraz.at>
61
62 PR c/98536
63 * c-warn.cc (warn_parm_array_mismatch): Do not warn if more
64 bounds are specified.
65
66 2023-08-04 Tamar Christina <tamar.christina@arm.com>
67
68 * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR.
69 * c-pragma.cc (init_pragma): Use it.
70
71 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
72
73 * c-common.h (c_init_preprocess): Declare new function.
74 * c-opts.cc (c_common_init): Call it.
75 * c-lex.cc (cb_def_pragma): Add a comment.
76 (get_token): New function wrapping cpp_get_token.
77 (c_lex_with_flags): Use the new wrapper function to support
78 obtaining tokens in preprocess_only mode.
79 (lex_string): Likewise.
80 * c-pragma.cc (pragma_diagnostic_lex_normal): Rename to...
81 (pragma_diagnostic_lex): ...this.
82 (pragma_diagnostic_lex_pp): Remove.
83 (handle_pragma_diagnostic_impl): Call pragma_diagnostic_lex () in
84 all modes.
85 (c_pp_invoke_early_pragma_handler): Adapt to support pragma_lex ()
86 usage.
87 * c-pragma.h (pragma_lex_discard_to_eol): Declare.
88
89 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
90
91 PR c/65213
92 * c.opt (-Wmissing-variable-declarations): New option.
93
94 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
95
96 PR middle-end/77928
97 * c-common.cc (check_builtin_function_arguments):
98 Handle BUILT_IN_ISEQSIG.
99
100 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
101 Juzhe-Zhong <juzhe.zhong@rivai.ai>
102
103 * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION.
104
105 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
106
107 PR c/77650
108 * c.opt: New option -Wflex-array-member-not-at-end.
109
110 2023-06-28 Jason Merrill <jason@redhat.com>
111
112 PR c++/110344
113 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
114
115 2023-06-26 Richard Biener <rguenther@suse.de>
116
117 * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
118 operations.
119
120 2023-06-23 Marek Polacek <polacek@redhat.com>
121
122 * c-common.h (cxx_dialect): Add cxx26 as a dialect.
123 * c-opts.cc (set_std_cxx26): New.
124 (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
125 enabled.
126 (c_common_post_options): Adjust comments.
127 * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
128 and -std=gnu++2c.
129 (std=c++2b): Mark as Undocumented.
130 (std=c++23): No longer Undocumented.
131
132 2023-06-21 Alexander Monakov <amonakov@ispras.ru>
133
134 * c-gimplify.cc (fma_supported_p): New helper.
135 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
136 contraction.
137
138 2023-06-16 Alex Coplan <alex.coplan@arm.com>
139
140 * c.opt (Welaborated-enum-base): New.
141
142 2023-06-13 David Malcolm <dmalcolm@redhat.com>
143
144 PR c/84890
145 * known-headers.cc
146 (suggest_missing_header::~suggest_missing_header): Reword note to
147 avoid negative tone of "forgetting".
148
149 2023-06-07 Jason Merrill <jason@redhat.com>
150
151 PR c++/58487
152 * c.opt: Add -Wnrvo.
153
154 2023-05-26 Martin Uecker <uecker@tugraz.at>
155
156 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
157 record all parameters.
158
159 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
160
161 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
162 (dump_ada_declaration): Ditto.
163 (dump_ada_structure): Ditto.
164 * c-common.cc (unsafe_conversion_p): Ditto.
165 (shorten_compare): Ditto.
166 (pointer_int_sum): Ditto.
167 (c_common_truthvalue_conversion): Ditto.
168 (scalar_to_vector): Ditto.
169 * c-common.h (gnu_vector_type_p): Ditto.
170 * c-omp.cc (c_omp_depend_t_p): Ditto.
171 (c_omp_split_clauses): Ditto.
172 * c-ubsan.cc (ubsan_instrument_division): Ditto.
173 * c-warn.cc (conversion_warning): Ditto.
174 (warnings_for_convert_and_check): Ditto.
175
176 2023-05-18 Joseph Myers <joseph@codesourcery.com>
177
178 * c-format.cc (print_char_table): Handle %B like %b.
179
180 2023-05-15 Joseph Myers <joseph@codesourcery.com>
181
182 * c-lex.cc (c_common_has_attribute): Use 202311 as
183 __has_c_attribute return for all C2x attributes.
184
185 2023-05-15 Patrick Palka <ppalka@redhat.com>
186
187 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
188 for C++23.
189
190 2023-05-01 Marek Polacek <polacek@redhat.com>
191
192 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
193
194 2023-03-28 David Malcolm <dmalcolm@redhat.com>
195
196 PR c/107002
197 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
198 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
199 Reject cases where involving macro expansions.
200
201 2023-03-28 Jason Merrill <jason@redhat.com>
202
203 PR c++/107163
204 * c-common.cc (verify_tree): Don't use sequenced handling
205 for COMPONENT_REF.
206
207 2023-03-17 Jakub Jelinek <jakub@redhat.com>
208
209 PR c/109151
210 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
211 types rather than just INTEGER_TYPE.
212
213 2023-03-10 Marek Polacek <polacek@redhat.com>
214
215 PR sanitizer/108060
216 PR sanitizer/109050
217 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
218 the RHS before the LHS.
219
220 2023-03-04 Jakub Jelinek <jakub@redhat.com>
221
222 PR c/107465
223 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
224 above innermost zero extension of BIT_NOT_EXPR result.
225
226 2023-03-04 Jakub Jelinek <jakub@redhat.com>
227
228 PR c/107465
229 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
230 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
231 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
232 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
233 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
234 from narrower unsigned, fix up computation of mask for the constant
235 cases and for unsigned other operand case handle differently
236 BIT_NOT_EXPR result being sign vs. zero extended.
237
238 2023-03-04 Jakub Jelinek <jakub@redhat.com>
239
240 PR c/107846
241 * c-warn.cc: Include langhooks.h.
242 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
243 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
244 is narrower than type0 and unsigned, use wi::min_precision with
245 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
246
247 2023-03-03 Alexandre Oliva <oliva@adacore.com>
248
249 * c-common.cc (c_common_nodes_and_builtins): Take
250 wchar_type_node for wint_type_node when aliased.
251 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
252 wchar_t, to the underlying type rather than wchar_t in
253 non-C++.
254 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
255
256 2023-02-28 Marek Polacek <polacek@redhat.com>
257
258 PR c++/107938
259 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
260 POINTER_TYPE_P.
261
262 2023-02-28 Jakub Jelinek <jakub@redhat.com>
263
264 PR sanitizer/108894
265 * c-common.h (c_strict_flex_array_level_of): Declare.
266 * c-common.cc (c_strict_flex_array_level_of): New function,
267 moved and renamed from c-decl.cc's strict_flex_array_level_of.
268 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
269 C check c_strict_flex_array_level_of whether a trailing array
270 should be treated as flexible member like. Handle C [0] arrays.
271 Add 1 + index_off_by_one rather than index_off_by_one to bounds
272 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
273 bounds comparison.
274
275 2023-02-23 Jakub Jelinek <jakub@redhat.com>
276
277 PR translation/108890
278 * c.opt (fcontracts): Fix description.
279
280 2023-02-22 Marek Polacek <polacek@redhat.com>
281
282 PR c/108880
283 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
284 pset to walk_tree_1.
285 (c_genericize): Call walk_tree with an explicit pset.
286
287 2023-02-18 Martin Uecker <uecker@tugraz.at>
288
289 PR c/105660
290 * c-attribs.cc (append_access_attr): Use order of arguments when
291 construction string.
292 (append_access_attr_idxs): Rename and make static.
293 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
294
295 2023-02-16 Patrick Palka <ppalka@redhat.com>
296
297 * c-common.h: Mechanically drop static from static inline
298 functions via s/^static inline/inline/g.
299
300 2023-02-01 Jason Merrill <jason@redhat.com>
301
302 * c.opt: Add -Wno-changes-meaning.
303
304 2023-01-31 Marek Polacek <polacek@redhat.com>
305
306 PR c++/107593
307 PR c++/108597
308 * c-common.h (instantiation_dependent_expression_p): Declare.
309 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
310 is dependent, invalidate the chain.
311
312 2023-01-26 Marek Polacek <polacek@redhat.com>
313
314 PR c++/105300
315 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
316
317 2023-01-18 Marek Polacek <polacek@redhat.com>
318
319 PR c/108424
320 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
321
322 2023-01-14 Jakub Jelinek <jakub@redhat.com>
323
324 PR c++/108365
325 * c-common.h (may_shorten_divmod): New static inline function.
326
327 2023-01-13 Eric Botcazou <ebotcazou@adacore.com>
328
329 * c-ada-spec.cc (is_float32): New function.
330 (is_float64): Likewise.
331 (is_float128): Tweak.
332 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
333
334 2023-01-12 Lewis Hyatt <lhyatt@gmail.com>
335
336 PR preprocessor/108244
337 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
338 deferred pragmas if -fdirectives-only.
339 (init_pragma): Likewise.
340
341 2023-01-09 Martin Liska <mliska@suse.cz>
342
343 PR c/107993
344 * c-attribs.cc (handle_target_clones_attribute): Check for
345 string constant for all target_clone attribute values.
346
347 2023-01-03 Florian Weimer <fweimer@redhat.com>
348
349 * c-cppbuiltin.cc (c_cpp_builtins): Define
350 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
351
352 2023-01-03 Florian Weimer <fweimer@redhat.com>
353
354 Revert:
355 2023-01-03 Florian Weimer <fweimer@redhat.com>
356
357 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
358 Define if constant is known.
359
360 2023-01-03 Florian Weimer <fweimer@redhat.com>
361
362 Revert:
363 2023-01-02 Florian Weimer <fweimer@redhat.com>
364
365 * c-cppbuiltin.cc (c_cpp_builtins): Define
366 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
367
368 2023-01-02 Florian Weimer <fweimer@redhat.com>
369
370 * c-cppbuiltin.cc (c_cpp_builtins): Define
371 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
372
373 2023-01-02 Florian Weimer <fweimer@redhat.com>
374
375 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
376 Define if constant is known.
377
378 2022-12-19 Marek Polacek <polacek@redhat.com>
379
380 PR c/98487
381 * c-format.cc (check_function_format): Use get_attribute_name.
382
383 2022-12-16 Qing Zhao <qing.zhao@oracle.com>
384
385 * c.opt (Wstrict-flex-arrays): New option.
386
387 2022-12-02 Andrew MacLeod <amacleod@redhat.com>
388
389 * c-attribs.cc (handle_deprecated_attribute): Use type when
390 using TYPE_NAME.
391
392 2022-12-02 Jakub Jelinek <jakub@redhat.com>
393
394 PR c++/84469
395 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
396 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
397 to any of the structured binding decls.
398
399 2022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
400 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
401
402 PR driver/107787
403 * c-common.cc (fold_offsetof,
404 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
405 instead of OPT_Warray_bounds.
406
407 2022-11-24 Jakub Jelinek <jakub@redhat.com>
408
409 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
410 with a dot.
411
412 2022-11-23 Andrew Pinski <apinski@marvell.com>
413 Jakub Jelinek <jakub@redhat.com>
414
415 PR c/107127
416 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
417 instead of walk_tree for c_genericize_control_r.
418
419 2022-11-23 Jakub Jelinek <jakub@redhat.com>
420
421 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
422 fcontract-role=, fcontract-semantic=): Add RejectNegative.
423 (fcontract-build-level=): Terminate description with dot.
424
425 2022-11-19 Jakub Jelinek <jakub@redhat.com>
426
427 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
428 value from 202207L to 202211L.
429
430 2022-11-19 Jeff Chapman II <jchapman@lock3software.com>
431 Andrew Sutton <asutton@lock3software.com>
432 Andrew Marmaduke <amarmaduke@lock3software.com>
433 Michael Lopez <mlopez@lock3software.com>
434 Jason Merrill <jason@redhat.com>
435
436 * c.opt: Add contracts flags.
437 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
438 macros.
439
440 2022-11-16 Marek Polacek <polacek@redhat.com>
441
442 PR c++/106649
443 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
444 C++23.
445 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
446 depending on cxx_dialect.
447 * c.opt (Winvalid-constexpr): New option.
448
449 2022-11-16 Jakub Jelinek <jakub@redhat.com>
450
451 * c-common.def (CONCEPT_DECL): New tree, moved here from
452 cp-tree.def.
453 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
454 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
455 attribute on CONCEPT_DECL.
456
457 2022-11-15 Lewis Hyatt <lhyatt@gmail.com>
458
459 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
460 than a hard-coded string.
461
462 2022-11-15 Jakub Jelinek <jakub@redhat.com>
463
464 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
465 __cpp_multidimensional_subscript macro value to 202211L.
466
467 2022-11-15 Patrick Palka <ppalka@redhat.com>
468
469 PR c++/107638
470 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
471 iff SUPPORTS_INIT_PRIORITY.
472
473 2022-11-14 Martin Liska <mliska@suse.cz>
474
475 Revert:
476 2022-11-09 Martin Liska <mliska@suse.cz>
477
478 * c-target.def: Port to RST.
479
480 2022-11-12 Joseph Myers <joseph@codesourcery.com>
481
482 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
483
484 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
485
486 PR c/85487
487 * c-pragma.cc (handle_pragma_ignore): New function.
488 (init_pragma): Register region and endregion pragmas.
489
490 2022-11-09 Martin Liska <mliska@suse.cz>
491
492 * c-target.def: Port to RST.
493
494 2022-11-05 Lewis Hyatt <lhyatt@gmail.com>
495
496 PR preprocessor/55971
497 * c-ppoutput.cc (adjust_for_newlines): Update comment.
498
499 2022-11-03 Jason Merrill <jason@redhat.com>
500
501 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
502 -fconcepts-ts before C++20.
503
504 2022-10-28 Joseph Myers <joseph@codesourcery.com>
505
506 * c-common.cc (def_fn_type): Call build_function_type for
507 zero-argument variable-argument function.
508 (c_common_nodes_and_builtins): Build default_function_type with
509 build_function_type.
510 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
511 option.
512
513 2022-10-28 Joseph Myers <joseph@codesourcery.com>
514
515 PR c/61469
516 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
517 New. Moved from cp/cp-tree.h.
518 * c-warn.cc (warnings_for_convert_and_check): Do not consider
519 conversions to enum with underlying type bool to overflow.
520
521 2022-10-26 Marek Polacek <polacek@redhat.com>
522
523 PR c++/106393
524 * c.opt (Wdangling-reference): New.
525
526 2022-10-19 Joseph Myers <joseph@codesourcery.com>
527
528 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
529 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
530 and FMT_LEN_wf64.
531 (NOARGUMENTS, NOLENGTHS): Update definitions.
532 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
533 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
534 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
535 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
536 (T_UF64, T2X_UF64): New macros.
537 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
538 and wfN length modifiers.
539 (print_char_table, scan_char_table): Add entries using wN and wfN
540 length modifiers.
541
542 2022-10-18 Joseph Myers <joseph@codesourcery.com>
543
544 PR c/36113
545 * c-common.cc (c_common_type_for_size): Add fallback to
546 widest_unsigned_literal_type_node or
547 widest_integer_literal_type_node for precision that may not
548 exactly match the precision of those types.
549
550 2022-10-14 Jakub Jelinek <jakub@redhat.com>
551
552 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
553 predefine __BFLT16_*__ macros and for C++23 also
554 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
555 macros for -fbuilding-libgcc.
556 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
557
558 2022-10-14 Jakub Jelinek <jakub@redhat.com>
559
560 PR middle-end/323
561 PR c++/107097
562 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
563 the tree being specific to C/ObjC.
564 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
565 in C++ the same as in C.
566 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
567 even for C++.
568
569 2022-10-13 Joseph Myers <joseph@codesourcery.com>
570
571 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
572 value 2 for *_IS_IEC_60559.
573
574 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
575
576 PR preprocessor/60014
577 PR preprocessor/60723
578 * c-ppoutput.cc (class token_streamer): Remove member
579 line_marker_emitted to...
580 (token_streamer::stream): ...a local variable here. Set
581 print.prev_was_system_token on all code paths.
582
583 2022-10-10 Nathan Sidwell <nathan@acm.org>
584
585 * c-opts.cc (c_common_post_options): Bump abi to 18.
586
587 2022-10-10 Marek Polacek <polacek@redhat.com>
588
589 PR c++/106937
590 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
591 attributes here.
592 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
593 attributes here.
594 (pp_c_attributes): Remove.
595 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
596 get_attribute_name. Don't print a trailing space when printing the
597 [[]] form.
598 * c-pretty-print.h (pp_c_attributes): Remove.
599
600 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
601
602 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
603 (c_common_attribute_table): New item for strict_flex_array.
604 * c.opt: (fstrict-flex-arrays): New option.
605 (fstrict-flex-arrays=): New option.
606
607 2022-10-07 Martin Liska <mliska@suse.cz>
608
609 * name-hint.h: Use std::move.
610
611 2022-10-07 Jakub Jelinek <jakub@redhat.com>
612
613 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
614 only in gnu namespace or as standard attribute, treat fallthrough
615 attributes in other namespaces like any other unknown attribute.
616
617 2022-10-06 Joseph Myers <joseph@codesourcery.com>
618
619 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
620 typeof_unqual.
621 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
622 (D_EXT11): New macro. Values of subsequent macros updated.
623
624 2022-10-06 Jakub Jelinek <jakub@redhat.com>
625
626 PR c++/106654
627 * c-attribs.cc (handle_assume_attribute): New function.
628 (c_common_attribute_table): Add entry for assume attribute.
629 * c-lex.cc (c_common_has_attribute): Handle
630 __have_cpp_attribute (assume).
631
632 2022-10-04 Jakub Jelinek <jakub@redhat.com>
633
634 * c-omp.cc (c_omp_directives): Uncomment begin declare target
635 entry.
636
637 2022-10-03 Patrick Palka <ppalka@redhat.com>
638
639 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
640 RID_IS_SAME_AS.
641
642 2022-10-03 Joseph Myers <joseph@codesourcery.com>
643
644 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
645 special-case __*_EPSILON__ setting for IBM long double for C2x.
646
647 2022-09-30 Patrick Palka <ppalka@redhat.com>
648
649 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
650 C++ traits.
651 * c-common.h (enum rid): Likewise.
652
653 2022-09-29 Joseph Myers <joseph@codesourcery.com>
654
655 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
656 C.
657
658 2022-09-29 Patrick Palka <ppalka@redhat.com>
659
660 * c-common.cc (c_common_reswords): Add __remove_cv,
661 __remove_reference and __remove_cvref.
662 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
663 and RID_REMOVE_CVREF.
664
665 2022-09-27 Marek Polacek <polacek@redhat.com>
666
667 PR c++/101165
668 PR c++/106882
669 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
670
671 2022-09-27 Marek Polacek <polacek@redhat.com>
672
673 * c-format.cc (c_keywords): Drop nothrow.
674
675 2022-09-27 Jakub Jelinek <jakub@redhat.com>
676
677 PR c++/106651
678 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
679 __cpp_static_call_operator=202207L for C++23.
680
681 2022-09-27 Jakub Jelinek <jakub@redhat.com>
682
683 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
684 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
685 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
686 * c-pragma.cc (omp_pragmas): Add assumes and begin.
687 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
688 (omp_pragmas_simd): Add assume.
689 * c-common.h (c_omp_directives): Declare.
690 * c-omp.cc (omp_directives): Rename to ...
691 (c_omp_directives): ... this. No longer static. Uncomment
692 assume, assumes, begin assumes and end assumes entries.
693 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
694 to PRAGMA_OMP_END.
695 (c_omp_categorize_directive): Adjust for omp_directives to
696 c_omp_directives renaming.
697
698 2022-09-27 Jakub Jelinek <jakub@redhat.com>
699
700 PR c++/106652
701 PR c++/85518
702 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
703 _Float{32,64,128}x flags from D_CONLY to 0.
704 (shorten_binary_op): Punt if common_type returns error_mark_node.
705 (shorten_compare): Likewise.
706 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
707 and _Float{32,64,128}x builtin types if available. For C++
708 clear float128t_type_node.
709 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
710 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
711 * c-lex.cc (interpret_float): For q/Q suffixes prefer
712 float128t_type_node over float128_type_node. Allow
713 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
714 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
715 with pedwarn. Don't call excess_precision_type for C++.
716
717 2022-09-26 Marek Polacek <polacek@redhat.com>
718
719 PR c++/106656
720 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
721 for C++20.
722
723 2022-09-23 Marek Polacek <polacek@redhat.com>
724
725 PR c++/106784
726 * c-common.cc (c_common_reswords): Add __is_convertible and
727 __is_nothrow_convertible.
728 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
729 RID_IS_NOTHROW_CONVERTIBLE.
730
731 2022-09-22 David Malcolm <dmalcolm@redhat.com>
732
733 PR c/106830
734 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
735 values that don't fit in uhwi.
736
737 2022-09-15 Richard Biener <rguenther@suse.de>
738
739 * c-common.h (build_void_list_node): Remove.
740 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
741 void_list_node.
742
743 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
744
745 * c-format.cc (convert_format_name_to_system_name): Fix warning.
746
747 2022-09-07 Joseph Myers <joseph@codesourcery.com>
748
749 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
750 for alignas, alignof, bool, false, static_assert, thread_local and
751 true.
752
753 2022-09-07 Jakub Jelinek <jakub@redhat.com>
754
755 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
756 " in comments" from description.
757 (Wunicode): New option.
758
759 2022-09-06 Jakub Jelinek <jakub@redhat.com>
760
761 PR c/106836
762 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
763
764 2022-09-03 Jakub Jelinek <jakub@redhat.com>
765
766 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
767 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
768 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
769 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
770
771 2022-09-02 David Malcolm <dmalcolm@redhat.com>
772
773 PR c/90885
774 * c-common.h (check_for_xor_used_as_pow): New decl.
775 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
776 * c-warn.cc (check_for_xor_used_as_pow): New.
777 * c.opt (Wxor-used-as-pow): New.
778
779 2022-09-01 Jason Merrill <jason@redhat.com>
780
781 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
782 char8_t.
783 (braced_list_to_string): Check for char-sized elements.
784
785 2022-09-01 Jakub Jelinek <jakub@redhat.com>
786
787 PR c++/106655
788 * c.opt (-Winvalid-utf8): New warning.
789 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
790 Set cpp_opts->cpp_input_charset_explicit.
791 (c_common_post_options): If -finput-charset=UTF-8 is explicit
792 in C++23, enable -Winvalid-utf8 by default and if -pedantic
793 or -pedantic-errors, make it a pedwarn.
794
795 2022-08-31 Joseph Myers <joseph@codesourcery.com>
796
797 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
798 for LABEL_DECL.
799 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
800 decl_attributes.
801 * c-common.h (do_case, c_add_case_label): Update declarations.
802 * c-lex.cc (c_common_has_attribute): For C, produce a result of
803 201910 for fallthrough and 202106 for maybe_unused.
804
805 2022-08-26 Marek Polacek <polacek@redhat.com>
806
807 PR c++/81159
808 * c.opt (Wself-move): New option.
809
810 2022-08-26 Jakub Jelinek <jakub@redhat.com>
811
812 * c-common.cc (check_builtin_function_arguments): Handle
813 BUILT_IN_ISSIGNALING.
814
815 2022-08-26 Jakub Jelinek <jakub@redhat.com>
816
817 PR c++/106648
818 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
819 __cpp_named_character_escapes to 202207L.
820
821 2022-08-25 Marek Polacek <polacek@redhat.com>
822
823 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
824 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
825 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
826 (struct c_common_resword): Resize the disable member.
827 (D_C2X): Add.
828 (nullptr_node): Define.
829 (nullptr_type_node): Define.
830 (NULLPTR_TYPE_P): Define.
831 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
832 NULLPTR_TYPE.
833 (c_pretty_printer::direct_abstract_declarator): Likewise.
834 (c_pretty_printer::constant): Likewise.
835
836 2022-08-16 Tom Honermann <tom@honermann.net>
837
838 PR c++/106423
839 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
840 diagnostics in C++20 and later.
841 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
842
843 2022-08-11 Marek Polacek <polacek@redhat.com>
844
845 PR middle-end/102633
846 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
847 suppress_warning here.
848
849 2022-08-08 Tom Honermann <tom@honermann.net>
850
851 PR preprocessor/106426
852 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
853 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
854
855 2022-08-08 Tom Honermann <tom@honermann.net>
856
857 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
858 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
859 enabled.
860 * c-opts.cc (c_common_post_options): Set flag_char8_t if
861 targeting C2x.
862
863 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
864
865 PR c++/66290
866 * c-common.h: Rename global done_lexing to
867 override_libcpp_locations.
868 * c-common.cc (c_cpp_diagnostic): Likewise.
869 * c-opts.cc (c_common_finish): Set override_libcpp_locations
870 (formerly done_lexing) immediately prior to calling cpp_finish ().
871
872 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
873
874 * c-ppoutput.cc (token_streamer::stream): Update input_location
875 prior to streaming each token.
876
877 2022-07-23 Immad Mir <mirimmad@outlook.com>
878
879 * c-attribs.cc: (c_common_attribute_table): add three new attributes
880 namely: fd_arg, fd_arg_read and fd_arg_write.
881 (handle_fd_arg_attribute): New.
882
883 2022-07-15 Marek Polacek <polacek@redhat.com>
884
885 PR c++/104477
886 * c-common.cc (c_common_reswords): Add
887 __reference_constructs_from_temporary and
888 __reference_converts_from_temporary.
889 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
890 RID_REF_CONVERTS_FROM_TEMPORARY.
891
892 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
893
894 * c-format.cc (class range_label_for_format_type_mismatch):
895 Adjust to new label_text API.
896
897 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
898
899 PR preprocessor/106252
900 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
901 option argument prior to verifying the option was found.
902
903 2022-07-07 David Malcolm <dmalcolm@redhat.com>
904
905 * c-format.cc (range_label_for_format_type_mismatch::get_text):
906 Update for removal of label_text::maybe_free in favor of automatic
907 memory management.
908
909 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
910
911 PR preprocessor/53920
912 PR c++/53431
913 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
914 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
915 (c_pp_stream_token): Declare.
916 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
917 pragmas to...
918 (should_output_pragmas): ...here. New function.
919 (token_streamer::stream): Support handling early pragmas.
920 (do_line_change): Likewise.
921 (c_pp_stream_token): New function.
922 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
923 (pragma_diagnostic_lex_normal): New function. Moved logic for
924 interpreting GCC diagnostic pragmas here.
925 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
926 directly from libcpp.
927 (handle_pragma_diagnostic): Refactor into helper function...
928 (handle_pragma_diagnostic_impl): ...here. New function.
929 (handle_pragma_diagnostic_early): New function.
930 (handle_pragma_diagnostic_early_pp): New function.
931 (struct pragma_ns_name): Renamed to...
932 (struct pragma_pp_data): ...this. Add new "early_handler" member.
933 (c_register_pragma_1): Support early pragmas in the preprocessor.
934 (c_register_pragma_with_early_handler): New function.
935 (c_register_pragma): Support the new early handlers in struct
936 internal_pragma_handler.
937 (c_register_pragma_with_data): Likewise.
938 (c_register_pragma_with_expansion): Likewise.
939 (c_register_pragma_with_expansion_and_data): Likewise.
940 (c_invoke_early_pragma_handler): New function.
941 (c_pp_invoke_early_pragma_handler): New function.
942 (init_pragma): Add early pragma support for diagnostic pragmas.
943 * c-pragma.h (struct internal_pragma_handler): Add new early handler
944 members.
945 (c_register_pragma_with_early_handler): Declare.
946 (c_invoke_early_pragma_handler): Declare.
947 (c_pp_invoke_early_pragma_handler): Declare.
948
949 2022-07-05 Marek Polacek <polacek@redhat.com>
950
951 PR c++/105626
952 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
953 u8 strings.
954
955 2022-07-01 Marek Polacek <polacek@redhat.com>
956
957 PR c++/106111
958 * c-common.h (enum rid): Update RID_LAST_CXX20.
959
960 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
961
962 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
963 names.
964
965 2022-06-24 Jason Merrill <jason@redhat.com>
966
967 PR c++/87729
968 PR c++/20423
969 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
970
971 2022-06-18 Jakub Jelinek <jakub@redhat.com>
972
973 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
974 Use flag_sanitize_trap & SANITIZE_??? instead of
975 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
976 and flag_sanitize_trap differs for them, emit __builtin_trap only
977 for the comparison where trap is requested.
978 (ubsan_instrument_vla, ubsan_instrument_return): Use
979 lag_sanitize_trap & SANITIZE_??? instead of
980 flag_sanitize_undefined_trap_on_error.
981
982 2022-06-13 Jason Merrill <jason@redhat.com>
983
984 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
985
986 2022-05-27 Marek Polacek <polacek@redhat.com>
987
988 PR c/90658
989 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
990
991 2022-05-27 Jakub Jelinek <jakub@redhat.com>
992
993 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
994
995 2022-05-20 David Malcolm <dmalcolm@redhat.com>
996
997 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
998 and "override".
999 * c-pretty-print.h: Likewise.
1000
1001 2022-05-18 Marek Polacek <polacek@redhat.com>
1002
1003 PR c/105131
1004 * c.opt (Wenum-int-mismatch): New.
1005
1006 2022-05-18 Marek Polacek <polacek@redhat.com>
1007
1008 PR c++/105497
1009 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
1010 enumerator when it was marked with attribute unused.
1011
1012 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
1013
1014 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
1015 floating-point complex types.
1016 <POINTER_TYPE>: Do not use limited_with clause if the designated
1017 type is a scalar type.
1018
1019 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1020
1021 * c-omp.cc (c_finish_omp_depobj): Handle
1022 OMP_CLAUSE_DEPEND_INOUTSET.
1023
1024 2022-05-16 Jason Merrill <jason@redhat.com>
1025
1026 PR c/105492
1027 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
1028 here.
1029
1030 2022-05-16 Martin Liska <mliska@suse.cz>
1031
1032 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
1033 (c_common_nodes_and_builtins): Likewise.
1034 * c-format.cc (check_tokens): Likewise.
1035 (check_plain): Likewise.
1036 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
1037 (init_pragma): Likewise.
1038 * known-headers.cc (get_string_macro_hint): Likewise.
1039 (get_stdlib_header_for_name): Likewise.
1040 * c-attribs.cc: Likewise.
1041
1042 2022-05-13 Richard Biener <rguenther@suse.de>
1043
1044 * c-omp.cc: Remove gimple-fold.h include.
1045
1046 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1047
1048 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
1049 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
1050 if null_pointer_node.
1051
1052 2022-05-11 Martin Liska <mliska@suse.cz>
1053
1054 PR target/105355
1055 * c-opts.cc (c_common_handle_option): Change option name.
1056 * c.opt: Remove Joined and use Separate option.
1057
1058 2022-05-09 Alex Coplan <alex.coplan@arm.com>
1059
1060 * c-common.h (get_dump_info): Delete.
1061 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
1062 from the global dump_manager instead of the (now obsolete)
1063 get_dump_info.
1064 * c-opts.cc (original_dump_file): Delete.
1065 (original_dump_flags): Delete.
1066 (c_common_parse_file): Switch to using global dump_manager to
1067 manage the original dump file; fix leak of dump file.
1068 (get_dump_info): Delete.
1069
1070 2022-05-07 Marek Polacek <polacek@redhat.com>
1071
1072 PR c++/101833
1073 PR c++/47634
1074 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
1075 with FN being either a function declaration or function type. Use
1076 maybe_adjust_arg_pos_for_attribute.
1077 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
1078 check_function_format.
1079 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
1080 (positional_argument): Adjust.
1081 * c-format.cc (get_constant): Rename to ...
1082 (validate_constant): ... this. Take EXPR by reference. Return bool
1083 instead of tree.
1084 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
1085 return value of validate_constant.
1086 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
1087 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
1088 (check_function_format): Adjust a parameter name.
1089 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
1090
1091 2022-05-04 Marek Polacek <polacek@redhat.com>
1092
1093 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
1094 char to int.
1095
1096 2022-04-30 Jason Merrill <jason@redhat.com>
1097
1098 PR c/100545
1099 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
1100 and typedef.
1101 * c-common.cc (set_underlying_type): Add assert.
1102
1103 2022-04-26 Patrick Palka <ppalka@redhat.com>
1104
1105 PR c++/105304
1106 * c-common.cc (verify_tree) [restart]: Move up to before the
1107 NULL test.
1108
1109 2022-04-11 Jakub Jelinek <jakub@redhat.com>
1110
1111 PR c++/105186
1112 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1113 and __int%d__ builtin types, initialize corresponding ridpointers
1114 entry.
1115
1116 2022-03-30 Marek Polacek <polacek@redhat.com>
1117
1118 PR c++/101030
1119 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1120 conversion_warning when OP1 is null.
1121
1122 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1123
1124 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1125 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1126 option properties.
1127
1128 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1129
1130 * c.opt (Wuse-after-free): Remove.
1131
1132 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1133
1134 * c.opt (Warray-bounds): Remove.
1135
1136 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1137
1138 * c.opt: Properly quote comment.
1139
1140 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1141
1142 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1143 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1144 the referenced type instead. Deal with the anonymous original type
1145 of a typedef'ed type. In the actual access case, follow the chain
1146 of external subtypes.
1147 <TYPE_DECL>: Tidy up control flow.
1148
1149 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1150
1151 * c-ada-spec.cc: Change array length
1152
1153 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1154
1155 * c-common.cc (c_family_tests): Call the new tests.
1156 * c-common.h (c_diagnostic_tests): Declare.
1157 (c_opt_problem_cc_tests): Likewise.
1158
1159 2022-03-19 Jakub Jelinek <jakub@redhat.com>
1160
1161 PR c++/101515
1162 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1163 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1164 be printed.
1165
1166 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1167 Roger Sayle <roger@nextmovesoftware.com>
1168
1169 PR c/98198
1170 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1171
1172 2022-03-16 Patrick Palka <ppalka@redhat.com>
1173
1174 PR c++/96780
1175 * c.opt: Add -ffold-simple-inlines.
1176
1177 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
1178
1179 * c-target.def (check_string_object_format_arg): Fix description typo.
1180
1181 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1182
1183 PR other/65095
1184 * c-common.h (c_omp_map_clause_name): Remove.
1185 * c-omp.cc (c_omp_map_clause_name): Remove.
1186
1187 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1188
1189 PR c/104711
1190 * c-opts.cc (c_common_post_options): Don't enable
1191 -Wshift-negative-value from -Wextra for C++20 or later.
1192 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1193 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1194 instead of TYPE_UNSIGNED.
1195
1196 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1197
1198 * c-attribs.cc: Fix up duplicated word issue in a comment.
1199
1200 2022-03-01 Martin Liska <mliska@suse.cz>
1201
1202 PR ipa/104533
1203 * c-attribs.cc (handle_target_clones_attribute): Use
1204 get_target_clone_attr_len and report warning soon.
1205
1206 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1207
1208 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1209 (handle_pragma_weak): Likewise.
1210 (handle_pragma_scalar_storage_order): Likewise.
1211 (handle_pragma_redefine_extname): Likewise.
1212 (handle_pragma_visibility): Likewise.
1213 (handle_pragma_diagnostic): Likewise.
1214 (handle_pragma_target): Likewise.
1215 (handle_pragma_optimize): Likewise.
1216 (handle_pragma_push_options): Likewise.
1217 (handle_pragma_pop_options): Likewise.
1218 (handle_pragma_reset_options): Likewise.
1219 (handle_pragma_message): Likewise.
1220 (handle_pragma_float_const_decimal64): Likewise.
1221
1222 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1223
1224 PR c/104531
1225 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1226 build_binary_op with LT_EXPR and only if that doesn't return
1227 error_mark_node call build_modify_expr.
1228
1229 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1230
1231 PR c/104510
1232 * c-common.cc (shorten_compare): Convert original arguments to
1233 the original *restype_ptr when mixing binary and decimal float.
1234
1235 2022-02-14 Richard Biener <rguenther@suse.de>
1236
1237 PR c/104505
1238 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1239 internal function calls.
1240
1241 2022-02-11 Richard Biener <rguenther@suse.de>
1242
1243 * c-attribs.cc (c_common_attribute_table): Add entry for
1244 vector_mask.
1245 (handle_vector_mask_attribute): New.
1246
1247 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1248
1249 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1250 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1251 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1252
1253 2022-02-09 Jason Merrill <jason@redhat.com>
1254
1255 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1256 of __cpp_constexpr and __cpp_concepts for C++20.
1257
1258 2022-01-24 Marek Polacek <polacek@redhat.com>
1259
1260 PR preprocessor/104030
1261 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1262
1263 2022-01-21 Jakub Jelinek <jakub@redhat.com>
1264
1265 PR c++/104148
1266 * c-common.h (check_function_arguments_recurse): Add for_format
1267 arg.
1268 * c-common.cc (check_function_nonnull): Pass false to
1269 check_function_arguments_recurse's last argument.
1270 (check_function_arguments_recurse): Add for_format argument,
1271 if true, don't stop on warning_suppressed_p.
1272 * c-format.cc (check_format_info): Pass true to
1273 check_function_arguments_recurse's last argument.
1274
1275 2022-01-19 David Malcolm <dmalcolm@redhat.com>
1276
1277 * c-common.cc (c_common_c_tests): Rename to...
1278 (c_common_cc_tests): ...this.
1279 (c_family_tests): Update calls for .c to .cc renaming.
1280 * c-common.h (c_format_c_tests): Rename to...
1281 (c_format_cc_tests): ...this.
1282 (c_indentation_c_tests): Rename to...
1283 (c_indentation_cc_tests): ...this.
1284 (c_pretty_print_c_tests): Rename to...
1285 (c_pretty_print_cc_tests): ...this.
1286 * c-format.cc (c_format_c_tests): Rename to...
1287 (c_format_cc_tests): ...this.
1288 * c-indentation.cc (c_indentation_c_tests): Rename to...
1289 (c_indentation_cc_tests): ...this.
1290 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1291 (c_pretty_print_cc_tests): ...this.
1292
1293 2022-01-17 Martin Liska <mliska@suse.cz>
1294
1295 * c-ada-spec.cc: Rename .c names to .cc.
1296 * c-ada-spec.h: Likewise.
1297 * c-common.cc (c_build_vec_convert): Likewise.
1298 (warning_candidate_p): Likewise.
1299 * c-common.h (enum rid): Likewise.
1300 (build_real_imag_expr): Likewise.
1301 (finish_label_address_expr): Likewise.
1302 (c_get_substring_location): Likewise.
1303 (c_build_bind_expr): Likewise.
1304 (conflict_marker_get_final_tok_kind): Likewise.
1305 (c_parse_error): Likewise.
1306 (check_missing_format_attribute): Likewise.
1307 (invalid_array_size_error): Likewise.
1308 (warn_for_multistatement_macros): Likewise.
1309 (build_attr_access_from_parms): Likewise.
1310 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1311 * c-format.cc: Likewise.
1312 * c-gimplify.cc (c_gimplify_expr): Likewise.
1313 * c-indentation.h: Likewise.
1314 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1315 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1316 * c-opts.cc (c_common_post_options): Likewise.
1317 (set_std_cxx23): Likewise.
1318 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1319 * c-pretty-print.h: Likewise.
1320
1321 2022-01-17 Martin Liska <mliska@suse.cz>
1322
1323 * c-ada-spec.c: Moved to...
1324 * c-ada-spec.cc: ...here.
1325 * c-attribs.c: Moved to...
1326 * c-attribs.cc: ...here.
1327 * c-common.c: Moved to...
1328 * c-common.cc: ...here.
1329 * c-cppbuiltin.c: Moved to...
1330 * c-cppbuiltin.cc: ...here.
1331 * c-dump.c: Moved to...
1332 * c-dump.cc: ...here.
1333 * c-format.c: Moved to...
1334 * c-format.cc: ...here.
1335 * c-gimplify.c: Moved to...
1336 * c-gimplify.cc: ...here.
1337 * c-indentation.c: Moved to...
1338 * c-indentation.cc: ...here.
1339 * c-lex.c: Moved to...
1340 * c-lex.cc: ...here.
1341 * c-omp.c: Moved to...
1342 * c-omp.cc: ...here.
1343 * c-opts.c: Moved to...
1344 * c-opts.cc: ...here.
1345 * c-pch.c: Moved to...
1346 * c-pch.cc: ...here.
1347 * c-ppoutput.c: Moved to...
1348 * c-ppoutput.cc: ...here.
1349 * c-pragma.c: Moved to...
1350 * c-pragma.cc: ...here.
1351 * c-pretty-print.c: Moved to...
1352 * c-pretty-print.cc: ...here.
1353 * c-semantics.c: Moved to...
1354 * c-semantics.cc: ...here.
1355 * c-ubsan.c: Moved to...
1356 * c-ubsan.cc: ...here.
1357 * c-warn.c: Moved to...
1358 * c-warn.cc: ...here.
1359 * cppspec.c: Moved to...
1360 * cppspec.cc: ...here.
1361 * stub-objc.c: Moved to...
1362 * stub-objc.cc: ...here.
1363
1364 2022-01-15 Martin Sebor <msebor@redhat.com>
1365
1366 PR c/63272
1367 * c.opt (-Wdangling-pointer): New option.
1368
1369 2022-01-15 Martin Sebor <msebor@redhat.com>
1370
1371 PR tree-optimization/80532
1372 * c.opt (-Wuse-after-free): New options.
1373
1374 2022-01-14 David Malcolm <dmalcolm@redhat.com>
1375
1376 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1377 (handle_tainted_args_attribute): New.
1378
1379 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1380 Jason Merrill <jason@redhat.com>
1381
1382 PR c++/70417
1383 * c.opt: Added -Wmissing-template-keyword.
1384
1385 2022-01-13 Richard Biener <rguenther@suse.de>
1386
1387 PR c/104002
1388 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1389
1390 2022-01-12 Martin Liska <mliska@suse.cz>
1391
1392 PR target/103804
1393 * c-attribs.c (handle_optimize_attribute): Do not call
1394 cl_optimization_compare if we seen an error.
1395
1396 2022-01-11 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c/101537
1399 PR c/103881
1400 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1401 and BIT_XOR_EXPR.
1402
1403 2022-01-10 Richard Biener <rguenther@suse.de>
1404
1405 PR middle-end/101530
1406 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1407 in a TARGET_EXPR to force a temporary.
1408
1409 2022-01-06 Marek Polacek <polacek@redhat.com>
1410
1411 PR c++/103758
1412 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1413 diagnostic messages.
1414 (handle_pragma_diagnostic): Likewise.
1415
1416 2022-01-03 Marek Polacek <polacek@redhat.com>
1417
1418 PR c++/103758
1419 * c-format.c (check_tokens): Accept "decl-specifier*".
1420
1421 2022-01-03 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR c++/103600
1424 * c-attribs.c (handle_non_overlapping_attribute): New function.
1425 (c_common_attribute_table): Add "non overlapping" attribute.
1426
1427 2021-12-30 Jakub Jelinek <jakub@redhat.com>
1428
1429 PR c++/103012
1430 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1431 cpp_define_unused/cpp_undef calls with forced token locations
1432 BUILTINS_LOCATION.
1433
1434 2021-12-27 Patrick Palka <ppalka@redhat.com>
1435
1436 PR c++/103700
1437 * c-common.c (pointer_int_sum): When quiet, return
1438 error_mark_node for an incomplete pointed-to type and don't
1439 call size_in_bytes_loc.
1440
1441 2021-12-17 Jason Merrill <jason@redhat.com>
1442
1443 PR c++/103681
1444 * c-opts.c (c_common_post_options): Update defaults.
1445
1446 2021-12-16 Martin Liska <mliska@suse.cz>
1447
1448 PR target/103709
1449 * c-pragma.c (handle_pragma_pop_options): Do not check
1450 global options modification when an error is seen in parsing
1451 of options (pragmas or attributes).
1452
1453 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1454
1455 * known-headers.cc: Define INCLUDE_MEMORY instead of
1456 INCLUDE_UNIQUE_PTR.
1457 * name-hint.h: Likewise.
1458 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1459
1460 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR pch/71934
1463 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1464 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1465
1466 2021-12-03 Jakub Jelinek <jakub@redhat.com>
1467
1468 PR pch/71934
1469 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1470 (pch_init): Don't initialize v.pch_init.
1471 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1472
1473 2021-12-01 Jason Merrill <jason@redhat.com>
1474
1475 PR c++/103310
1476 * c.opt: Add -fconstexpr-fp-except.
1477
1478 2021-11-29 Richard Biener <rguenther@suse.de>
1479
1480 * c-format.c (check_format_string): Remove spurious
1481 gcc_unreachable.
1482
1483 2021-11-29 Richard Biener <rguenther@suse.de>
1484
1485 * c-opts.c (c_common_post_options): Remove unreachable return.
1486 * c-pragma.c (handle_pragma_target): Likewise.
1487 (handle_pragma_optimize): Likewise.
1488
1489 2021-11-25 Jakub Jelinek <jakub@redhat.com>
1490
1491 PR c++/102611
1492 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1493 default for C++23 regardless of warn_deprecated.
1494 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1495 __cpp_multidimensional_subscript=202110L for C++23.
1496
1497 2021-11-23 Martin Sebor <msebor@redhat.com>
1498
1499 PR middle-end/88232
1500 * c.opt: Add -Winfinite-recursion.
1501
1502 2021-11-19 Martin Sebor <msebor@redhat.com>
1503
1504 PR c++/33925
1505 PR c/102867
1506 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1507 and improve handling tof defined symbols.
1508
1509 2021-11-19 Martin Liska <mliska@suse.cz>
1510
1511 Revert:
1512 2021-11-18 Martin Liska <mliska@suse.cz>
1513
1514 * c-gimplify.c (genericize_c_loop): Use option directly.
1515
1516 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1517
1518 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1519 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1520
1521 2021-11-18 Martin Liska <mliska@suse.cz>
1522
1523 * c-gimplify.c (genericize_c_loop): Use option directly.
1524
1525 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1526
1527 PR c/91038
1528 PR c/29970
1529 * c-common.c (pointer_int_sum): Make sure pointer expressions
1530 are evaluated first when the size expression depends on for
1531 variably-modified types.
1532
1533 2021-11-17 Marek Polacek <polacek@redhat.com>
1534
1535 PR preprocessor/103026
1536 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1537
1538 2021-11-16 Jason Merrill <jason@redhat.com>
1539
1540 * c-common.c (release_tree_vector): Only cache vecs smaller than
1541 16 elements.
1542
1543 2021-11-15 Jason Merrill <jason@redhat.com>
1544
1545 * c.opt: Add -fimplicit-constexpr.
1546 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1547 * c-opts.c (c_common_post_options): Disable below C++14.
1548
1549 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1550
1551 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1552 Duplicate to both OMP_TARGET and OMP_TEAMS.
1553
1554 2021-11-10 Marek Polacek <polacek@redhat.com>
1555
1556 PR c++/101940
1557 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1558 ignored_attributes.
1559
1560 2021-11-09 David Malcolm <dmalcolm@redhat.com>
1561
1562 * c-pragma.c (GCC_BAD_AT): New macro.
1563 (GCC_BAD2_AT): New macro.
1564 (handle_pragma_pack): Use the location of the pertinent token when
1565 issuing diagnostics about invalid constants/actions, and trailing
1566 junk.
1567 (handle_pragma_target): Likewise for non-string "GCC option".
1568 (handle_pragma_message): Likewise for trailing junk.
1569
1570 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1571
1572 PR c/103031
1573 * c-common.c (convert_and_check): Add argument init_const. Call
1574 convert_init if init_const.
1575 * c-common.h (convert_and_check): Update prototype.
1576 (convert_init): New prototype.
1577
1578 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1579
1580 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1581 CPP_OTHER tokens, set the "escape on output" flag.
1582
1583 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1584
1585 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1586 POINTER_PLUS_EXPR.
1587 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1588 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1589
1590 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR c++/102854
1593 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1594 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1595 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1596 conversions temporarily clear the 3rd bit from d->kind while walking
1597 subtrees.
1598 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1599 if possibly non-rectangular.
1600
1601 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1602
1603 PR middle-end/64888
1604 * c-omp.c (c_omp_predefined_variable): Return true also for
1605 ubsan_create_data created artificial variables.
1606
1607 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1608
1609 * c-format.c (printf_length_specs, scanf_length_specs)
1610 (print_char_table, scan_char_table): Support DFP formats for C2X.
1611 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1612 (T2X_D32, T2X_D64, T2X_D128): New macros.
1613
1614 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1615
1616 * c-omp.c (c_omp_check_context_selector): Rename to
1617 omp_check_context_selector and move to omp-general.c.
1618 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1619 move to omp-general.c.
1620
1621 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1622
1623 * c-format.c (print_char_table): Add %b and %B formats.
1624 (scan_char_table): Add %b format.
1625 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1626 (T2X_UPD, T2X_UIM): New macros.
1627
1628 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1629
1630 * c-omp.c (c_finish_omp_atomic): Use
1631 clear_padding_type_may_have_padding_p.
1632
1633 2021-10-08 Martin Liska <mliska@suse.cz>
1634
1635 * c-opts.c (c_common_post_options): Use new macro
1636 OPTION_SET_P.
1637
1638 2021-10-07 Martin Liska <mliska@suse.cz>
1639
1640 * c-common.c (parse_optimize_options): Make
1641 save_opt_decoded_options a pointer type.
1642
1643 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1644
1645 PR tree-optimization/102571
1646 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1647 padding, but the non-padding bits are contiguous set of bytes
1648 by adjusting the memcmp call arguments instead of emitting
1649 __builtin_clear_padding and then comparing all the type's bytes.
1650
1651 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR c++/102612
1654 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1655 __cpp_constexpr to 202110L rather than 201907L.
1656
1657 2021-10-04 Marek Polacek <polacek@redhat.com>
1658
1659 PR c++/97573
1660 * c-common.h (do_warn_array_compare): Declare.
1661 * c-warn.c (do_warn_array_compare): New.
1662 * c.opt (Warray-compare): New option.
1663
1664 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1665
1666 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1667 NULL, this is not needed.
1668
1669 2021-10-01 Martin Sebor <msebor@redhat.com>
1670
1671 PR c/102103
1672 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1673 Check and perform warning suppression.
1674 (c_common_truthvalue_conversion): Enhance warning suppression.
1675
1676 2021-10-01 Martin Liska <mliska@suse.cz>
1677
1678 PR target/102552
1679 * c-common.c (parse_optimize_options): decoded_options[0] is
1680 used for program name, so merged_decoded_options should also
1681 respect that.
1682
1683 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1684 Richard Biener <rguenther@suse.de>
1685
1686 PR sanitizer/102515
1687 * c-ubsan.c (ubsan_instrument_division): Check the right
1688 flag_sanitize_recover bit, depending on which sanitization
1689 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1690 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1691 and SANITIZE_DIVIDE is enabled, neither check is known
1692 to be false and flag_sanitize_recover bits for those two
1693 aren't the same, emit both __ubsan_handle_divrem_overflow
1694 and __ubsan_handle_divrem_overflow_abort calls.
1695
1696 2021-10-01 Martin Liska <mliska@suse.cz>
1697
1698 * c-common.c (parse_optimize_options): Combine optimize
1699 options with what was provided on the command line.
1700
1701 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1702
1703 * c-omp.c (c_omp_split_clauses): Also copy
1704 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1705
1706 2021-09-27 Martin Liska <mliska@suse.cz>
1707
1708 * c-opts.c (c_common_init_options_struct): Set also
1709 x_flag_default_complex_method.
1710
1711 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1712
1713 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1714
1715 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1716
1717 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1718 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1719 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1720 __ROUNDING_MATH__ according to the new optimization flags.
1721
1722 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1723
1724 * c-omp.c (c_omp_split_clauses): Split order clause also to
1725 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1726
1727 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1728
1729 * c-omp.c (c_finish_omp_atomic): Avoid creating
1730 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1731 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1732 had NULL initializer. When omitting operands after v = x,
1733 use type of v rather than type of x. Fix type of vtmp
1734 TARGET_EXPR.
1735
1736 2021-09-13 Jason Merrill <jason@redhat.com>
1737
1738 * c.opt: Add -Winterference-size.
1739 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1740 and __GCC_CONSTRUCTIVE_SIZE.
1741
1742 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1743
1744 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1745 * c-omp.c: Include gimple-fold.h.
1746 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1747 OpenMP 5.1 atomics.
1748
1749 2021-09-09 qing zhao <qing.zhao@oracle.com>
1750
1751 * c-attribs.c (handle_uninitialized_attribute): New function.
1752 (c_common_attribute_table): Add "uninitialized" attribute.
1753
1754 2021-09-08 liuhongt <hongtao.liu@intel.com>
1755
1756 * c-common.c (excess_precision_mode_join): Update below comments.
1757 (c_ts18661_flt_eval_method): Set excess_precision_type to
1758 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1759 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1760 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1761 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1762
1763 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1764
1765 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1766
1767 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1768
1769 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1770 and -gnatwu warning for the package specification.
1771
1772 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1773
1774 * c-attribs.c (handle_unavailable_attribute): New.
1775
1776 2021-08-30 Jason Merrill <jason@redhat.com>
1777
1778 * c.opt: Add -Wmissing-requires.
1779
1780 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1781
1782 PR other/93067
1783 * c-opts.c (c_common_input_charset_cb): New function.
1784 (c_common_post_options): Call new function
1785 diagnostic_initialize_input_context().
1786
1787 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1788
1789 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1790 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1791 "di" and "u", respecitively; fill with BADLEN to match
1792 size of 'types'.
1793 (get_init_dynamic_hwi): Split off from ...
1794 (init_dynamic_diag_info): ... here. Call it.
1795 (init_dynamic_gfc_info): Call it.
1796
1797 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1798
1799 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1800 * c-pragma.c (omp_pragmas): Add error directive.
1801 * c-omp.c (omp_directives): Uncomment error directive entry.
1802
1803 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1804
1805 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1806 * c-pragma.c (omp_pragmas): Add nothing directive.
1807 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1808
1809 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1810
1811 PR c++/101539
1812 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1813 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1814
1815 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1816
1817 * c-opts.c (c_common_post_options): Default to
1818 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1819
1820 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1821
1822 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1823 * c-pragma.c (omp_pragmas): Add scope construct.
1824 * c-omp.c (omp_directives): Uncomment scope directive entry.
1825
1826 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1827
1828 * c-cppbuiltin.c (c_cpp_builtins): Define
1829 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1830
1831 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1832
1833 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1834 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1835 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1836 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1837 enumerator.
1838 (c_finish_omp_masked): Declare.
1839 * c-omp.c (c_finish_omp_masked): New function.
1840 (c_omp_split_clauses): Handle combined masked constructs.
1841
1842 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1843
1844 PR c++/101539
1845 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1846 * c-common.c (c_common_reswords): Add
1847 __is_pointer_interconvertible_base_of.
1848
1849 2021-07-29 Richard Biener <rguenther@suse.de>
1850
1851 PR c/101512
1852 * c-common.c (c_common_mark_addressable_vec): Look through
1853 C_MAYBE_CONST_EXPR even if not at the toplevel.
1854
1855 2021-07-27 Martin Sebor <msebor@redhat.com>
1856
1857 PR c/101585
1858 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1859
1860 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1861
1862 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1863 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1864 and later.
1865
1866 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1867
1868 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1869 PRAGMA_OMP__LAST_ enumerators.
1870
1871 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1872 Joseph Myers <joseph@codesourcery.com>
1873 Cesar Philippidis <cesar@codesourcery.com>
1874
1875 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1876
1877 2021-07-20 Martin Sebor <msebor@redhat.com>
1878
1879 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1880 by-const-reference.
1881 * c-common.h (c_build_shufflevector): Same.
1882
1883 2021-07-16 Andrew Pinski <apinski@marvell.com>
1884
1885 PR c/101453
1886 * c-common.c (parse_optimize_options): Use the correct
1887 size for buffer.
1888
1889 2021-07-15 Martin Sebor <msebor@redhat.com>
1890
1891 PR c/101289
1892 PR c/97548
1893 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1894
1895 2021-07-14 Jason Merrill <jason@redhat.com>
1896
1897 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1898
1899 2021-07-06 Martin Sebor <msebor@redhat.com>
1900
1901 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1902 (gcc_cdiag_char_table): Same.
1903 (gcc_cxxdiag_char_table): Same.
1904
1905 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1906
1907 * c-common.h (enum c_omp_directive_kind): New enum.
1908 (struct c_omp_directive): New type.
1909 (c_omp_categorize_directive): Declare.
1910 * c-omp.c (omp_directives): New variable.
1911 (c_omp_categorize_directive): New function.
1912
1913 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1914
1915 * c-ada-spec.c (packed_layout): New global variable.
1916 (dump_ada_declaration): Set it upon seeing a packed record type.
1917 Do not put the "aliased" keyword if it is set.
1918 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1919
1920 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1921
1922 * c-ada-spec.c (check_name): Rename into...
1923 (check_type_name_conflict): ...this. Minor tweak.
1924 (dump_ada_function_declaration): Adjust to above renaming.
1925 (dump_ada_array_domains): Fix oversight.
1926 (dump_ada_declaration): Call check_type_name_conflict for variables.
1927
1928 2021-06-25 Martin Sebor <msebor@redhat.com>
1929
1930 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1931 (c_common_truthvalue_conversion): Replace direct uses of
1932 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1933 copy_no_warning.
1934 (check_function_arguments_recurse): Same.
1935 * c-gimplify.c (c_gimplify_expr): Same.
1936 * c-warn.c (overflow_warning): Same.
1937 (warn_logical_operator): Same.
1938 (warn_if_unused_value): Same.
1939 (do_warn_unused_parameter): Same.
1940
1941 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1942
1943 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1944 C_ORT_OMP_TARGET.
1945 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1946 combined target constructs also add map (always, tofrom:) clause.
1947
1948 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1949
1950 * c-attribs.c (common_handle_aligned_attribute): Remove short
1951 circuit and dead code.
1952
1953 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1954
1955 PR c++/101052
1956 * known-headers.cc (get_stdlib_header_for_name): Add known
1957 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1958 exit, and getenv.
1959
1960 2021-06-12 Jason Merrill <jason@redhat.com>
1961
1962 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1963
1964 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1965
1966 PR c++/100974
1967 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1968 -std=c++2b for P1938R3 consteval if support.
1969
1970 2021-06-09 Jason Merrill <jason@redhat.com>
1971
1972 PR c++/100879
1973 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1974 warning.
1975
1976 2021-06-07 Martin Liska <mliska@suse.cz>
1977
1978 * c-target.def: Split long lines and replace them
1979 with '\n\'.
1980
1981 2021-06-04 Martin Sebor <msebor@redhat.com>
1982
1983 PR c/100783
1984 * c-attribs.c (positional_argument): Bail on erroneous types.
1985
1986 2021-06-04 Martin Sebor <msebor@redhat.com>
1987
1988 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1989 for element presence.
1990
1991 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1992
1993 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1994 (dump_ada_decl_name): Likewise.
1995 (dump_anonymous_type_name): Remove parent parameter and adjust.
1996 (dump_sloc): Minor tweak.
1997 (dump_ada_array_type): Remove type parameter and adjust.
1998 (dump_ada_enum_type): Remove parent parameter and adjust.
1999 (dump_ada_node): Adjust calls to above functions.
2000 (dumped_anonymous_types): New global variable.
2001 (dump_nested_types_1): Rename into...
2002 (dump_nested_types): ...this.
2003 (dump_nested_type): Remove parent and dumped_types parameters.
2004 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
2005 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
2006 (dump_ada_specs): Initialize and free dumped_anonymous_types.
2007
2008 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
2011 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
2012
2013 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2014
2015 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
2016 (htable_t): New typedef.
2017 (overloaded_names): Use it.
2018 (add_name): New function.
2019 (init_overloaded_names): Use add_name to populate the table and add
2020 special cases for sigaction and stat.
2021 (overloaded_name_p): Rename into...
2022 (overloading_index): ...this. Do not initialize overloaded_names table
2023 here. Return the index or zero.
2024 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
2025 but add an overloading suffix instead.
2026 (dump_ada_specs): Initialize overloaded_names tables here.
2027
2028 2021-06-01 Martin Liska <mliska@suse.cz>
2029
2030 PR other/100759
2031 * c-attribs.c (handle_optimize_attribute): Limit sanity check
2032 to a situation where we are not in processing of an optimize
2033 pragma.
2034 * c-pragma.c (handle_pragma_pop_options): Restore target
2035 options.
2036
2037 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
2038
2039 PR testsuite/100749
2040 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
2041
2042 2021-05-31 Richard Biener <rguenther@suse.de>
2043
2044 PR c++/88601
2045 * c-common.c: Include tree-vector-builder.h and
2046 vec-perm-indices.h.
2047 (c_common_reswords): Add __builtin_shufflevector.
2048 (c_build_shufflevector): New funtion.
2049 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
2050 (c_build_shufflevector): Declare.
2051
2052 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR middle-end/99928
2055 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
2056 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
2057
2058 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2059
2060 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
2061
2062 2021-05-25 Martin Liska <mliska@suse.cz>
2063
2064 PR tree-optimization/92860
2065 PR target/99592
2066 * c-attribs.c (handle_optimize_attribute): Save target node
2067 before calling parse_optimize_options and save it in case
2068 it changes.
2069 * c-pragma.c (handle_pragma_target): Similarly for pragma.
2070 (handle_pragma_pop_options): Likewise here.
2071
2072 2021-05-25 Martin Liska <mliska@suse.cz>
2073
2074 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
2075
2076 2021-05-25 Jakub Jelinek <jakub@redhat.com>
2077
2078 PR middle-end/99928
2079 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
2080 combined with simd and not with taskloop or for.
2081
2082 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2083
2084 PR middle-end/99928
2085 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2086 on firstprivate clause copy going to target construct, and for
2087 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
2088
2089 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
2090
2091 * c.opt (Wc++11-extensions, Wc++14-extensions)
2092 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
2093 options.
2094
2095 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2096
2097 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
2098
2099 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2100
2101 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
2102 * c-pch.c (struct c_pch_validity): Use type uint32_t.
2103 (pch_init): Renamed member.
2104 (c_common_valid_pch): Adjust access to debug_type_names.
2105
2106 2021-05-19 Martin Sebor <msebor@redhat.com>
2107
2108 PR c/100619
2109 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2110 bounds.
2111
2112 2021-05-18 Richard Biener <rguenther@suse.de>
2113
2114 PR c/100547
2115 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2116 Reword existing nunit diagnostic.
2117
2118 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
2119
2120 * c-common.c (braced_list_to_string): Return CTOR unchanged
2121 if host and target character sizes don't match.
2122
2123 2021-05-14 Martin Liska <mliska@suse.cz>
2124
2125 * c.opt: Add Warning keyword for 2 options.
2126
2127 2021-05-13 Martin Liska <mliska@suse.cz>
2128
2129 PR middle-end/100504
2130 * c-attribs.c (handle_target_clones_attribute): Expect a string
2131 argument to target_clone argument.
2132
2133 2021-05-11 Joseph Myers <joseph@codesourcery.com>
2134
2135 * c-lex.c (interpret_float): Handle digit separators for C2X.
2136
2137 2021-05-10 Martin Liska <mliska@suse.cz>
2138
2139 * c-ada-spec.c (print_destructor): Use startswith
2140 function instead of strncmp.
2141 (dump_ada_declaration): Likewise.
2142 * c-common.c (disable_builtin_function): Likewise.
2143 (def_builtin_1): Likewise.
2144 * c-format.c (check_tokens): Likewise.
2145 (check_plain): Likewise.
2146 (convert_format_name_to_system_name): Likewise.
2147
2148 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2149
2150 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2151 complex divide
2152
2153 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2154 Nathan Sidwell <nathan@codesourcery.com>
2155 Tom de Vries <vries@codesourcery.com>
2156 Julian Brown <julian@codesourcery.com>
2157 Kwok Cheung Yeung <kcy@codesourcery.com>
2158
2159 * c.opt (Wopenacc-parallelism): New.
2160
2161 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2162
2163 * c.opt (fopenacc-kernels=): Remove.
2164
2165 2021-04-08 Jakub Jelinek <jakub@redhat.com>
2166
2167 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2168 occured -> occurred.
2169 (check_alignment_of_packed_member): Fix a comment typo,
2170 memeber -> member.
2171 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2172 and onless -> unless.
2173 (warn_parm_array_mismatch): Fix comment typos, declaratation
2174 -> declaration and woud -> would. Fix up comment indentation.
2175
2176 2021-04-08 Martin Sebor <msebor@redhat.com>
2177
2178 PR middle-end/99883
2179 * c.opt (Wmismatched-new-delete): Correct spelling.
2180
2181 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2182
2183 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2184 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2185 enumeral types use again the type name for the enumeration constants.
2186 (dump_ada_node): Adjust call to dump_ada_enum_type.
2187 (dump_nested_type): Likewise.
2188
2189 2021-04-01 Jason Merrill <jason@redhat.com>
2190
2191 PR c++/98481
2192 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2193
2194 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2195
2196 PR c++/99565
2197 * c-warn.c (do_warn_duplicated_branches): Pass also
2198 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2199
2200 2021-03-20 Jakub Jelinek <jakub@redhat.com>
2201
2202 PR debug/99230
2203 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2204
2205 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2206
2207 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2208 after entering the separate class package, if any.
2209
2210 2021-03-04 Richard Biener <rguenther@suse.de>
2211
2212 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2213 Handle ERROR_MARK.
2214
2215 2021-03-04 Jakub Jelinek <jakub@redhat.com>
2216
2217 PR c/99325
2218 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2219 (token_streamer::stream) Likewise.
2220 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2221 UNKNOWN_LOCATION.
2222
2223 2021-03-03 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR c/99324
2226 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2227 instead of mark_addressable. Fix a comment typo -
2228 neutrallly -> neutrally.
2229
2230 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2231
2232 PR c/99304
2233 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2234 message - refernced -> referenced. Remove superfluous space before
2235 closing paren of function calls.
2236
2237 2021-02-25 Nathan Sidwell <nathan@acm.org>
2238
2239 PR c++/99166
2240 * c.opt (-flang-info-module-cmi): Renamed option.
2241
2242 2021-02-19 Nathan Sidwell <nathan@acm.org>
2243
2244 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2245
2246 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
2247
2248 PR target/99113
2249 * c-attribs.c (c_common_attribute_table): Add the "retain"
2250 attribute.
2251 (handle_retain_attribute): New function.
2252
2253 2021-02-16 Marek Polacek <polacek@redhat.com>
2254
2255 PR c++/99062
2256 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2257 alignment argument is non-negative. Tweak a warning message.
2258
2259 2021-02-12 Martin Sebor <msebor@redhat.com>
2260
2261 PR c/99055
2262 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2263 print_generic_expr_to_str.
2264
2265 2021-02-10 Richard Biener <rguenther@suse.de>
2266
2267 * c-common.c (parse_optimize_options): Free decoded_options.
2268
2269 2021-02-04 emsr <3dw4rd@verizon.net>
2270
2271 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2272
2273 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2274
2275 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2276 * c-lex.c (interpret_integer): Set node type for size literal.
2277
2278 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2279
2280 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2281 draft from description.
2282 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2283
2284 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
2285
2286 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2287 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2288 and -std=gnu++2b
2289 * c-opts.c (set_std_cxx23): New.
2290 (c_common_handle_option): Set options when -std=c++23 is enabled.
2291 (c_common_post_options): Adjust comments.
2292 (set_std_cxx20): Likewise.
2293
2294 2021-01-25 Martin Sebor <msebor@redhat.com>
2295
2296 PR c++/98646
2297 * c-common.c (check_nonnull_arg): Adjust warning text.
2298
2299 2021-01-17 Martin Sebor <msebor@redhat.com>
2300
2301 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2302 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2303
2304 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2305
2306 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2307 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2308
2309 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR tree-optimization/98597
2312 * c-pretty-print.c: Include options.h.
2313 (c_fold_indirect_ref_for_warn): New function.
2314 (print_mem_ref): Use it. If it returns something that has compatible
2315 type and is TBAA compatible with zero offset, print it and return,
2316 otherwise print it using offsetof syntax or array ref syntax. Fix up
2317 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2318 argument has pointer to array type. Print pointers using the standard
2319 formatting.
2320
2321 2021-01-12 Martin Sebor <msebor@redhat.com>
2322
2323 PR c/98597
2324 PR c/98592
2325 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2326 has pointer type. Remove redundant code. Avoid calling
2327 gimple_canonical_types_compatible_p.
2328
2329 2021-01-07 Martin Sebor <msebor@redhat.com>
2330
2331 PR middle-end/98578
2332 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2333 Avoid assuming acces type's size is constant. Correct condition
2334 guarding the printing of a parenthesis.
2335
2336 2021-01-06 Martin Sebor <msebor@redhat.com>
2337
2338 PR c++/95768
2339 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2340 SSA_NAMEs print VLA names and GIMPLE defining statements.
2341 (print_mem_ref): New function.
2342 (c_pretty_printer::unary_expression): Call it.
2343
2344 2021-01-06 Richard Biener <rguenther@suse.de>
2345
2346 PR tree-optimization/95582
2347 * c-attribs.c (c_common_attribute_table): Add entry for
2348 signed_bool_precision.
2349 (handle_signed_bool_precision_attribute): New.
2350
2351 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2352
2353 * c.opt: Add -stdlib= option and enumerations for
2354 libstdc++ and libc++.
2355
2356 2020-12-16 Martin Liska <mliska@suse.cz>
2357
2358 * c.opt: Remove usage of Report.
2359
2360 2020-12-14 Martin Sebor <msebor@redhat.com>
2361
2362 PR middle-end/98166
2363 PR c++/57111
2364 PR middle-end/98160
2365 * c-attribs.c (maybe_add_noinline): New function.
2366 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2367 Implicitly add attribute noinline to functions not declared inline
2368 and warn on those.
2369
2370 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2371
2372 * c-pragma.c (omp_pragmas): Add 'allocate'.
2373 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2374
2375 2020-12-08 Jakub Jelinek <jakub@redhat.com>
2376
2377 PR c++/98187
2378 * c-pragma.c (omp_pragmas): Remove "master".
2379 (omp_pragmas_simd): Add "master".
2380
2381 2020-12-07 Marek Polacek <polacek@redhat.com>
2382
2383 PR c++/98126
2384 * c-common.c (verify_tree_lim_r): New function.
2385 (verify_sequence_points): Use it. Use nullptr instead of 0.
2386
2387 2020-12-03 Martin Sebor <msebor@redhat.com>
2388
2389 PR c++/90629
2390 PR middle-end/94527
2391 * c-attribs.c (handle_dealloc_attribute): New function.
2392 (handle_malloc_attribute): Handle argument forms of attribute.
2393 * c.opt (-Wmismatched-dealloc): New option.
2394 (-Wmismatched-new-delete): New option.
2395
2396 2020-12-03 Jakub Jelinek <jakub@redhat.com>
2397
2398 PR libstdc++/93121
2399 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2400 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2401
2402 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2403
2404 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2405 {__GNUC_EXECUTION_CHARSET_NAME} and
2406 _WIDE_EXECUTION_CHARSET_NAME} macros.
2407
2408 2020-12-01 Nathan Sidwell <nathan@acm.org>
2409
2410 * c-common.c (module, import, export): New internal tokens (with
2411 trailing space).
2412 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2413 them.
2414 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2415 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2416
2417 2020-12-01 Nathan Sidwell <nathan@acm.org>
2418
2419 * c-opts.c (c_common_init_options): Ask for module dependencies.
2420 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2421 * c-pch.c (c_common_valid_pch): ... does not play with C++
2422 modules.
2423 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2424 options.
2425 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2426 (fmodule-only, fmodule-mapper, fmodule-lazy)
2427 (fmodule-version-ignore, Winvalid-imported-macros)
2428 (flang-info-include-translate, flang-info-include-translate-not):
2429 New options
2430
2431 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2432
2433 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2434 (dump_ada_structure): Also deal with convention, unchecked union and
2435 bit-field for nested types. In the latter case, print an Alignment
2436 aspect along with the Pack aspect.
2437
2438 2020-11-25 Martin Sebor <msebor@redhat.com>
2439
2440 PR bootstrap/94982
2441 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2442 -Wformat-diag.
2443
2444 2020-11-24 Martin Sebor <msebor@redhat.com>
2445
2446 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2447
2448 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2449
2450 * c-attribs.c (handle_special_var_sec_attribute): New.
2451 (handle_noinit_attribute): Remove.
2452 (attr_noinit_exclusions): Rename to...
2453 (attr_section_exclusions): ...this, and add "persistent" attribute
2454 exclusion.
2455 (c_common_attribute_table): Add "persistent" attribute.
2456
2457 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2458
2459 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2460 Treat opaque types like other types.
2461 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2462 supported types.
2463
2464 2020-11-20 Martin Sebor <msebor@redhat.com>
2465
2466 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2467 with fewer arguments.
2468
2469 2020-11-20 Martin Sebor <msebor@redhat.com>
2470
2471 PR middle-end/97879
2472 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2473 Error out on invalid modes.
2474
2475 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2476
2477 PR libstdc++/88101
2478 * c-common.c (check_builtin_function_arguments): Handle
2479 BUILT_IN_CLEAR_PADDING.
2480
2481 2020-11-18 Nathan Sidwell <nathan@acm.org>
2482
2483 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2484
2485 2020-11-17 Nathan Sidwell <nathan@acm.org>
2486
2487 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2488 after newly-added CTI_MODULE_HWM.
2489
2490 2020-11-17 Joseph Myers <joseph@codesourcery.com>
2491
2492 * c-cppbuiltin.c (builtin_define_float_constants): Define
2493 "*_IS_IEC_60559__" macros.
2494
2495 2020-11-17 Nathan Sidwell <nathan@acm.org>
2496
2497 * c-lex.c: #include "langhooks.h".
2498 (cb_undef): Maybe call preprocess_undef lang hook.
2499 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2500 lang hook.
2501 (push_command_line_include): Maybe call preprocess_main_file lang
2502 hook.
2503 (cb_file_change): Likewise.
2504 * c-ppoutput.c: #include "langhooks.h.
2505 (scan_translation_unit): Maybe call preprocess_token lang hook.
2506 (class do_streamer): New, derive from token_streamer.
2507 (directives_only_cb): Data pointer is do_streamer, call
2508 preprocess_token lang hook.
2509 (scan_translation_unit_directives_only): Use do_streamer.
2510 (print_line_1): Move src_line recording to after string output.
2511 (cb_undef): Maybe call preprocess_undef lang hook.
2512
2513 2020-11-17 Nathan Sidwell <nathan@acm.org>
2514
2515 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2516 code duplicating that functionality.
2517
2518 2020-11-17 Jakub Jelinek <jakub@redhat.com>
2519
2520 PR c/90628
2521 * c-common.c (check_builtin_function_arguments)
2522 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2523 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2524 for more builtins and argument positions.
2525
2526 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2527
2528 PR objc/97854
2529 * stub-objc.c: Include c-common.h to declare enum rid.
2530
2531 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2532
2533 PR c++/63287
2534 * c-cppbuiltin.c: Include configargs.h.
2535 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2536 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2537 "single".
2538
2539 2020-11-13 Gergö Barany <gergo@codesourcery.com>
2540 Thomas Schwinge <thomas@codesourcery.com>
2541
2542 * c.opt (fopenacc-kernels): Add.
2543
2544 2020-11-13 Jason Merrill <jason@redhat.com>
2545
2546 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2547
2548 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
2549
2550 PR c++/91318
2551 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2552
2553 2020-11-13 Martin Liska <mliska@suse.cz>
2554
2555 * c-attribs.c (build_attr_access_from_parms): Format properly.
2556
2557 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2558
2559 PR objc/90707
2560 * c-common.c (c_common_reswords): null_unspecified, nullable,
2561 nonnull, null_resettable: New keywords.
2562 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2563 RID_NONNULL, RID_NULL_RESETTABLE: New.
2564 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2565 ranges accepted for property attributes.
2566 * c-attribs.c (handle_objc_nullability_attribute): New.
2567 * c-objc.h (enum objc_property_attribute_group): Add
2568 OBJC_PROPATTR_GROUP_NULLABLE.
2569 (enum objc_property_attribute_kind):Add
2570 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2571 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2572
2573 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2574
2575 PR objc/77404
2576 * c-attribs.c (handle_objc_root_class_attribute): New
2577 * c-objc.h (objc_start_class_interface): Add a location
2578 value for the position of the class name.
2579 * c.opt: Add Wobjc-root-class.
2580 * stub-objc.c (objc_start_class_interface): Add a location
2581 value for the position of the class name.
2582
2583 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2584
2585 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2586 Allow scope for C. Handle standard attributes for C. Do not
2587 accept unscoped attributes if std_syntax and not handled as
2588 standard attributes.
2589 * c-common.h (c_common_has_attribute): Update prototype.
2590
2591 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2592
2593 PR pch/86674
2594 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2595 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2596
2597 2020-11-11 Patrick Palka <ppalka@redhat.com>
2598
2599 PR c++/88115
2600 * c-opts.c (c_common_post_options): Update latest_abi_version.
2601
2602 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2603
2604 PR c/97748
2605 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2606 to false.
2607 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2608 recursively and just return true instead of warning if it is true.
2609 Handle COMPLEX_EXPR.
2610
2611 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2612
2613 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2614 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2615 (c_omp_adjust_map_clauses): New function.
2616
2617 2020-11-09 Marek Polacek <polacek@redhat.com>
2618
2619 DR 1914
2620 * c-common.c (attribute_fallthrough_p): Tweak the warning
2621 message.
2622
2623 2020-11-09 Patrick Palka <ppalka@redhat.com>
2624
2625 * c-pragma.c (handle_pragma_diagnostic): Split the
2626 unknown-option -Wpragmas diagnostic into a warning and a
2627 subsequent note containing a spelling suggestion. Avoid
2628 computing the suggestion if -Wpragmas warnings are being
2629 suppressed.
2630
2631 2020-11-09 Patrick Palka <ppalka@redhat.com>
2632
2633 PR testsuite/97117
2634 * c-indentation.c (get_visual_column): Remove location_t
2635 parameter. Move the column-tracking diagnostic code from here
2636 to ...
2637 (should_warn_for_misleading_indentation): ... here, before the
2638 early exit for when the loci are not all distinct. Don't pass a
2639 location_t argument to get_visual_column.
2640 (assert_get_visual_column_succeeds): Don't pass a location_t
2641 argument to get_visual_column.
2642 (assert_get_visual_column_fails): Likewise.
2643
2644 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2645
2646 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2647 of keywords accepted in @property attribute contexts.
2648 * c-objc.h (enum objc_property_attribute_group): Add
2649 OBJC_PROPATTR_GROUP_CLASS.
2650 (enum objc_property_attribute_kind): Add
2651 OBJC_PROPERTY_ATTR_CLASS.
2652
2653 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2654
2655 * c-common.c (c_common_reswords): Add 'atomic' property
2656 attribute.
2657 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2658 property attributes.
2659
2660 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2661
2662 * c-attribs.c (handle_nsobject_attribute): New.
2663 * c.opt: Add WNSObject-attribute.
2664
2665 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2666
2667 * c-objc.h (enum objc_property_attribute_group): New
2668 (enum objc_property_attribute_kind): New.
2669 (OBJC_PROPATTR_GROUP_MASK): New.
2670 (struct property_attribute_info): Small class encapsulating
2671 parser output from property attributes.
2672 (objc_prop_attr_kind_for_rid): New
2673 (objc_add_property_declaration): Simplify interface.
2674 * stub-objc.c (enum rid): Dummy type.
2675 (objc_add_property_declaration): Simplify interface.
2676 (objc_prop_attr_kind_for_rid): New.
2677
2678 2020-11-06 Nathan Sidwell <nathan@acm.org>
2679
2680 * c-ada-spec.c (collect_ada_nodes): Rename
2681 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2682 (collect_ada_node): Likewise.
2683 (dump_forward_type): Likewise.
2684 * c-common.c (set_underlying_type): Rename
2685 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2686 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2687
2688 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2689
2690 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2691
2692 2020-11-05 Marek Polacek <polacek@redhat.com>
2693
2694 PR c++/97675
2695 * c.opt (Wexceptions): New option.
2696
2697 2020-11-05 Marek Polacek <polacek@redhat.com>
2698
2699 PR c++/25814
2700 * c.opt (Wvexing-parse): New option.
2701
2702 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2703
2704 PR c++/97670
2705 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2706 underlying decl to clear in the allocate_head bitmap.
2707
2708 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2709
2710 * c-objc.h (objc_non_constant_expr_p): New.
2711 * stub-objc.c (objc_non_constant_expr_p): New.
2712
2713 2020-11-03 Nathan Sidwell <nathan@acm.org>
2714
2715 * c.opt (MQ,MT): Reword description to be make-agnostic.
2716
2717 2020-11-02 Nathan Sidwell <nathan@acm.org>
2718
2719 * c-opts.c (c_common_post_options): Move var decl to its
2720 initialization point.
2721
2722 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2723
2724 * c-lex.c (c_lex_with_flags): When combining '@' with a
2725 keyword for Objective-C, combine the location ranges too.
2726
2727 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2728 H.J.Lu <hjl.tools@gmail.com>
2729
2730 * c-attribs.c (c_common_attribute_table): Add new attribute
2731 zero_call_used_regs.
2732 (handle_zero_call_used_regs_attribute): New function.
2733
2734 2020-10-28 Marek Polacek <polacek@redhat.com>
2735
2736 PR c++/97573
2737 * c-opts.c (c_common_post_options): In C++20, turn on
2738 -Wdeprecated-enum-enum-conversion and
2739 -Wdeprecated-enum-float-conversion.
2740 * c.opt (Wdeprecated-enum-enum-conversion,
2741 Wdeprecated-enum-float-conversion): New options.
2742 (Wenum-conversion): Allow for C++ too.
2743
2744 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2745
2746 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2747 * c-omp.c: Include bitmap.h.
2748 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2749
2750 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2751
2752 * c-common.c (__is_nothrow_assignable): New.
2753 (__is_nothrow_constructible): Likewise.
2754 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2755 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2756
2757 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2758
2759 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2760
2761 2020-10-23 Marek Polacek <polacek@redhat.com>
2762
2763 PR c++/91741
2764 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2765 (c_common_init_ts): Likewise.
2766 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2767 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2768 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2769 (maybe_warn_sizeof_array_div): New function.
2770 * c.opt (Wsizeof-array-div): New option.
2771
2772 2020-10-23 Martin Sebor <msebor@redhat.com>
2773
2774 PR c/97463
2775 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2776
2777 2020-10-22 Martin Liska <mliska@suse.cz>
2778
2779 PR c/94722
2780 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2781 (handle_stack_protect_attribute): Add error message for a
2782 no_stack_protector function.
2783
2784 2020-10-22 Martin Liska <mliska@suse.cz>
2785
2786 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2787
2788 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2789
2790 * c-gimplify.c: Include tree-nested.h
2791 (c_genericize): Update for new nested function info.
2792
2793 2020-10-14 Martin Sebor <msebor@redhat.com>
2794
2795 PR c/97413
2796 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2797 bounds in an extra list.
2798
2799 2020-10-05 Richard Biener <rguenther@suse.de>
2800 Jakub Jelinek <jakub@redhat.com>
2801
2802 PR c++/97197
2803 * c-pretty-print.c: Include langhooks.h.
2804 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2805 expression.
2806 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2807 unary_expression.
2808 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2809
2810 2020-09-30 Martin Sebor <msebor@redhat.com>
2811
2812 PR middle-end/97189
2813 * c-attribs.c (append_access_attr): Use the function declaration
2814 location for a warning about an attribute access argument.
2815
2816 2020-09-29 Marek Polacek <polacek@redhat.com>
2817
2818 PR c++/94695
2819 * c.opt (Wrange-loop-construct): New option.
2820
2821 2020-09-23 Martin Sebor <msebor@redhat.com>
2822
2823 PR c/97131
2824 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2825
2826 2020-09-23 Marek Polacek <polacek@redhat.com>
2827
2828 PR c/97125
2829 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2830 after loops and other structured control constructs have been lowered.
2831
2832 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2833
2834 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2835 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2836
2837 2020-09-21 Marek Polacek <polacek@redhat.com>
2838
2839 * c.opt (Wctad-maybe-unsupported): New option.
2840
2841 2020-09-19 Martin Sebor <msebor@redhat.com>
2842
2843 PR c/50584
2844 * c-common.h (warn_parm_array_mismatch): Declare new function.
2845 (has_attribute): Move declaration of an existing function.
2846 (build_attr_access_from_parms): Declare new function.
2847 * c-warn.c (parm_array_as_string): Define new function.
2848 (plus_one): Define new function.
2849 (warn_parm_ptrarray_mismatch): Define new function.
2850 (warn_parm_array_mismatch): Define new function.
2851 (vla_bound_parm_decl): New function.
2852 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2853 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2854 qualifiers here...
2855 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2856 them in brackets here. Also print [static]. Strip extraneous
2857 expressions from VLA bounds.
2858
2859 2020-09-19 Martin Sebor <msebor@redhat.com>
2860
2861 PR c/50584
2862 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2863 (handle_argspec_attribute): New function.
2864 (get_argument, get_argument_type): New functions.
2865 (append_access_attrs): Add overload. Handle internal attribute
2866 representation in addition to external.
2867 (handle_access_attribute): Handle internal attribute representation
2868 in addition to external.
2869 (build_attr_access_from_parms): New function.
2870
2871 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2872
2873 * c-gimplify.c (genericize_c_loop): Rewrite to match
2874 c_finish_loop in c-typeck.c.
2875
2876 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2877
2878 * c-common.c (c_block_may_fallthrough): New, split from
2879 cxx_block_may_fallthrough in the cp front end.
2880 (c_common_init_ts): Move handling of loop and switch-related
2881 statements here from the cp front end.
2882 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2883 cp front end.
2884 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2885 * c-common.h (c_block_may_fallthru): Declare.
2886 (bc_state_t): Move here from cp front end.
2887 (save_bc_state, restore_bc_state): Declare.
2888 (c_genericize_control_stmt): Declare.
2889 (WHILE_COND, WHILE_BODY): Likewise.
2890 (DO_COND, DO_BODY): Likewise.
2891 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2892 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2893 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2894 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2895 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2896 * c-dump.c (dump_stmt): Copy from cp front end.
2897 (c_dump_tree): Move code to handle structured loop and switch
2898 tree nodes here from cp front end.
2899 * c-gimplify.c: Adjust includes.
2900 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2901 cp front end.
2902 (save_bc_state, restore_bc_state): New functions using old code
2903 from cp front end.
2904 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2905 (genericize_c_loop): Move from cp front end.
2906 (genericize_for_stmt, genericize_while_stmt): Likewise.
2907 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2908 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2909 (genericize_omp_for_stmt): Likewise.
2910 (c_genericize_control_stmt): New function using code split from
2911 cp front end.
2912 (c_genericize_control_r): New.
2913 (c_genericize): Call walk_tree with c_genericize_control_r.
2914 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2915 structured loop and switch tree nodes here from cp front end.
2916
2917 2020-09-17 Patrick Palka <ppalka@redhat.com>
2918
2919 PR c/80076
2920 * c-indentation.c (should_warn_for_misleading_indentation): Move
2921 declarations of local variables closer to their first use.
2922 Handle virtual token locations by resolving them to their
2923 respective macro expansion points. If all three tokens are
2924 produced from the same macro expansion, then instead use their
2925 loci within the macro definition.
2926
2927 2020-09-16 Martin Sebor <msebor@redhat.com>
2928
2929 PR c/78666
2930 PR c/96126
2931 * c-attribs.c (validate_attr_args): New function.
2932 (validate_attr_arg): Same.
2933 (handle_section_attribute): Call it. Introduce a local variable.
2934 (handle_alloc_size_attribute): Same.
2935 (handle_alloc_align_attribute): Same.
2936
2937 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2938
2939 * c-attribs.c (handle_optimize_attribute): Adjust
2940 cl_optimization_save, cl_optimization_restore and
2941 build_optimization_node callers.
2942 * c-pragma.c (handle_pragma_optimize): Adjust
2943 build_optimization_node caller.
2944 (handle_pragma_push_options): Adjust
2945 build_optimization_node and build_target_option_node callers.
2946 (handle_pragma_pop_options, handle_pragma_reset_options):
2947 Adjust cl_optimization_restore callers.
2948
2949 2020-08-28 Martin Sebor <msebor@redhat.com>
2950
2951 * c.opt (Wstringop-overread): New option.
2952
2953 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2954
2955 PR c/96545
2956 * c-common.c (get_atomic_generic_size): Require that first argument's
2957 type points to a complete type and use tree_fits_uhwi_p instead of
2958 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2959
2960 2020-07-31 Martin Sebor <msebor@redhat.com>
2961
2962 PR c++/96003
2963 * c-common.c (check_function_arguments_recurse): Return early when
2964 no-warning bit is set.
2965
2966 2020-07-31 Richard Biener <rguenther@suse.de>
2967
2968 PR debug/96383
2969 * c-common.h (c_common_finalize_early_debug): Declare.
2970 * c-common.c: Include debug.h.
2971 (c_common_finalize_early_debug): finalize_early_debug langhook
2972 implementation generating debug for extern declarations.
2973
2974 2020-07-27 Nathan Sidwell <nathan@acm.org>
2975
2976 * c-common.c (try_to_locate_new_include_insertion_point): Use
2977 strcmp, not pointer equality.
2978
2979 2020-07-25 Martin Sebor <msebor@redhat.com>
2980
2981 PR c++/96310
2982 * c-common.c (check_nonnull_arg): Print note only when warning was
2983 issued.
2984
2985 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2986
2987 * c-omp.c (c_finish_omp_critical): Check for no name but
2988 nonzero hint provided.
2989
2990 2020-07-20 Jason Merrill <jason@redhat.com>
2991
2992 * c-cppbuiltin.c (c_cpp_builtins): Update
2993 __cpp_nontype_template_args for C++20.
2994
2995 2020-07-20 Martin Sebor <msebor@redhat.com>
2996
2997 PR c/96249
2998 * c.opt: Remove stray text.
2999
3000 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
3001
3002 PR other/86904
3003 * c-indentation.c (should_warn_for_misleading_indentation): Get
3004 global tabstop from the new source.
3005 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
3006 is now a common option.
3007 * c.opt: Likewise.
3008
3009 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
3010
3011 * c.opt (Wscalar-storage-order): Add explicit variable.
3012
3013 2020-07-07 Nathan Sidwell <nathan@acm.org>
3014
3015 * c-opts.c (c_common_post_options): Add 'injecting' arg to
3016 cpp_read_main_file.
3017 (c_finish_options): Add linemap_line_start calls for builtin and cmd
3018 maps. Force token position to line_table's highest line.
3019 * c-ppoutput.c (print_line_1): Refactor, print line zero.
3020 (cb_define): Always increment source line.
3021
3022 2020-07-06 Martin Sebor <msebor@redhat.com>
3023
3024 PR c++/95984
3025 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
3026 to stub lambda objects with null this pointer.
3027 (check_nonnull_arg): Handle C++ nullptr.
3028
3029 2020-07-02 Jason Merrill <jason@redhat.com>
3030 Jakub Jelinek <jakub@redhat.com>
3031
3032 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
3033
3034 2020-06-30 Jakub Jelinek <jakub@redhat.com>
3035
3036 PR c++/95963
3037 * c-common.c (check_function_arguments_recurse): Don't crash on
3038 calls to internal functions.
3039
3040 2020-06-28 Martin Sebor <msebor@redhat.com>
3041
3042 PR c++/86568
3043 * c-common.c (struct nonnull_arg_ctx): Add members.
3044 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
3045 C++ member functions specially. Consider the this pointer implicitly
3046 nonnull.
3047 (check_nonnull_arg): Use location of argument when available.
3048 (check_function_arguments): Use nonnull_arg_ctx as argument.
3049
3050 2020-06-27 Jakub Jelinek <jakub@redhat.com>
3051
3052 PR middle-end/95903
3053 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
3054 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
3055 smaller precision intop operands separately.
3056
3057 2020-06-26 Marek Polacek <polacek@redhat.com>
3058
3059 * c-opts.c (c_common_init_options): Default to gnu++17.
3060
3061 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3062
3063 PR c/95378
3064 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
3065 pointer arguments.
3066
3067 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3068
3069 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
3070 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
3071 idx members.
3072 (c_omp_is_loop_iterator): New function.
3073 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
3074 if outer loop iterator is present. Perform duplicate checking through
3075 hash_set in the function rather than expecting caller to do that.
3076 Pass NULL instead of d->ppset to walk_tree_1.
3077 (c_omp_check_nonrect_loop_iv): New function.
3078 (c_omp_check_loop_iv): Use it. Fill in new members, allow
3079 non-rectangular loop forms, diagnose multiple associated loops with
3080 the same iterator. Pass NULL instead of &pset to walk_tree_1.
3081 (c_omp_check_loop_iv_exprs): Likewise.
3082
3083 2020-06-10 Martin Liska <mliska@suse.cz>
3084
3085 PR tree-optimization/92860
3086 * c-attribs.c (handle_optimize_attribute):
3087 Save global options and compare it after parsing of function
3088 attribute.
3089 * c-pragma.c (opt_stack::saved_global_options): New field.
3090 (handle_pragma_push_options): Save global_options.
3091 (handle_pragma_pop_options): Compare them after pop.
3092
3093 2020-06-09 Jakub Jelinek <jakub@redhat.com>
3094
3095 PR c/95580
3096 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
3097 case when MEM_REF's first argument has type pointer to incomplete type.
3098
3099 2020-06-05 Jason Merrill <jason@redhat.com>
3100
3101 * c-pretty-print.c (pp_c_additive_expression): Handle negative
3102 operand to POINTER_PLUS_EXPR.
3103
3104 2020-06-04 Martin Sebor <msebor@redhat.com>
3105
3106 PR middle-end/10138
3107 PR middle-end/95136
3108 * c-attribs.c (append_access_attrs): Handle attr_access::none.
3109 (handle_access_attribute): Same.
3110
3111 2020-06-03 Mark Wielaard <mark@klomp.org>
3112
3113 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3114 New function.
3115 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3116 New function declaration.
3117
3118 2020-06-03 Mark Wielaard <mark@klomp.org>
3119
3120 * known-headers.cc (get_string_macro_hint): New function.
3121 (get_stdlib_header_for_name): Use get_string_macro_hint.
3122 (get_c_stdlib_header_for_string_macro_name): New function.
3123 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3124 New function declaration.
3125
3126 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
3127
3128 * c-common.h (c_omp_predetermined_mapping): Declare.
3129 * c-omp.c (c_omp_predetermined_mapping): New.
3130
3131 2020-05-22 Mark Wielaard <mark@klomp.org>
3132
3133 * known-headers.cc (get_stdlib_header_for_name): Add a new
3134 stdlib_hint array for stdbool and stdint.
3135
3136 2020-05-22 Mark Wielaard <mark@klomp.org>
3137
3138 * known-headers.cc (get_stdlib_header_for_name): Return
3139 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3140 flag_isoc99.
3141
3142 2020-05-20 Nathan Sidwell <nathan@acm.org>
3143
3144 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3145
3146 * c-common.c (try_to_locate_new_include_insertion_point): Use
3147 strcmp to compare filenames.
3148 * c-lex.c (init_c_lex): Move declaration to initialization.
3149 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3150 deferred count loop.
3151
3152 2020-05-15 Jason Merrill <jason@redhat.com>
3153
3154 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3155
3156 2020-05-13 Jason Merrill <jason@redhat.com>
3157
3158 * c.opt (std=c++20): Make c++2a the alias.
3159 (std=gnu++20): Likewise.
3160 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3161 * c-opts.c: Adjust.
3162 * c-cppbuiltin.c: Adjust.
3163 * c-ubsan.c: Adjust.
3164 * c-warn.c: Adjust.
3165
3166 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3167
3168 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3169
3170 2020-05-08 Nathan Sidwell <nathan@acm.org>
3171
3172 Reimplement directives only processing.
3173 * c-ppoutput.c (token_streamer): Ne.
3174 (directives_only_cb): New. Swallow ...
3175 (print_lines_directives_only): ... this.
3176 (scan_translation_unit_directives_only): Reimplment using the
3177 published interface.
3178
3179 2020-05-07 Marek Polacek <polacek@redhat.com>
3180
3181 * c-format.c (badwords): Add "nonstatic".
3182
3183 202-05-07 Jakub Jelinek <jakub@redhat.com>
3184
3185 PR c/94968
3186 * c-common.c (speculation_safe_value_resolve_params): Return false if
3187 error_operand_p (val2).
3188 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3189 Remove extraneous semicolon.
3190
3191 2020-05-06 qing zhao <qing.zhao@oracle.com>
3192
3193 PR c/94230
3194 * c-indentation.c (get_visual_column): Add a hint to use the new
3195 -flarge-source-files option.
3196
3197 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3198
3199 * c-attribs.c (handle_vector_size_attribute): Add attribute
3200 nonnull for argument args in order to silence warning of
3201 uninitialized variable usage. Since this is local to the
3202 compilation unit and thus cannot be checked at call sides by the
3203 compiler, added an assert statement in order to verify this.
3204
3205 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3206
3207 PR target/93492
3208 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3209 value to USHRT_MAX (65535).
3210
3211 2020-04-29 Jakub Jelinek <jakub@redhat.com>
3212
3213 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3214
3215 2020-04-27 Jakub Jelinek <jakub@redhat.com>
3216
3217 PR c/94755
3218 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3219 fncode == BUILT_IN_NONE before initialization of first_param.
3220
3221 2020-04-23 Marek Polacek <polacek@redhat.com>
3222
3223 PR c++/94733
3224 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3225 TREE_PURPOSE.
3226
3227 2020-04-14 Patrick Palka <ppalka@redhat.com>
3228
3229 PR c++/85278
3230 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3231 ampersand if it's an rvalue reference type.
3232
3233 2020-04-13 Martin Sebor <msebor@redhat.com>
3234
3235 PR c/92326
3236 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3237 printing array bound for flexible array members.
3238
3239 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3240
3241 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3242 define, per n4861.
3243
3244 2020-04-02 Richard Biener <rguenther@suse.de>
3245
3246 PR c/94392
3247 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3248 for -O2 and C++11 or newer.
3249
3250 2020-03-28 Patrick Palka <ppalka@redhat.com>
3251
3252 * c.opt: Add -fconcepts-diagnostics-depth.
3253
3254 2020-03-27 Martin Sebor <msebor@redhat.com>
3255
3256 PR c++/94346
3257 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3258 to decl_attributes. Make handling of different kinds of entities
3259 more robust.
3260
3261 2020-03-27 Martin Sebor <msebor@redhat.com>
3262
3263 PR c++/94098
3264 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3265 here.
3266
3267 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3268
3269 PR c++/91993
3270 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3271 result being COMPOUND_EXPRs, skip to ultimate rhs.
3272
3273 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3274
3275 PR middle-end/94072
3276 * c-common.c (c_common_type_for_mode): Before using a registered
3277 built-in type, check that the vectorness of the type matches
3278 the vectorness of the mode.
3279
3280 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3281
3282 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3283 issue in a diagnostic message.
3284
3285 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3286
3287 * c.opt: Avoid redundancy in the help text.
3288
3289 2020-03-02 Marek Polacek <polacek@redhat.com>
3290
3291 PR c++/93958 - add missing -std=gnu++20.
3292 * c.opt: Add -std=gnu++20.
3293
3294 2020-03-01 Martin Sebor <msebor@redhat.com>
3295
3296 PR c++/92721
3297 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3298 (handle_access_attribute): Same.
3299
3300 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3301
3302 PR c/93858
3303 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3304 "did you mean" hint in diagnostics.
3305
3306 2020-02-15 Jason Merrill <jason@redhat.com>
3307
3308 * c.opt: Add -std=c++20.
3309
3310 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3311
3312 * c-ada-spec.c: Include bitmap.h.
3313 (dump_ada_double_name): Rename into...
3314 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3315 (dump_ada_array_type): Adjust to above renaming. Robustify.
3316 (dump_nested_types_1): New function copied from... Add dumped_types
3317 parameter and pass it down to dump_nested_type.
3318 (dump_nested_types): ...this. Remove parent parameter. Just call
3319 dump_nested_types_1 on an automatic bitmap.
3320 (dump_nested_type): Add dumped_types parameter.
3321 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3322 Adjust recursive calls and adjust to above renaming.
3323 (dump_ada_declaration): Adjust call to dump_nested_types.
3324 Tidy up and adjust to above renaming.
3325 (dump_ada_specs): Initialize and release bitmap obstack.
3326
3327 2020-02-10 Martin Sebor <msebor@redhat.com>
3328
3329 PR c/93640
3330 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3331
3332 2020-02-10 Jakub Jelinek <jakub@redhat.com>
3333
3334 PR other/93641
3335 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3336 Remove useless extra test.
3337
3338 2020-02-03 Julian Brown <julian@codesourcery.com>
3339 Tobias Burnus <tobias@codesourcery.com>
3340
3341 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3342
3343 2020-01-29 Jason Merrill <jason@redhat.com>
3344
3345 PR c++/89357
3346 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3347
3348 2020-01-23 Jason Merrill <jason@redhat.com>
3349
3350 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3351
3352 2020-01-23 Martin Sebor <msebor@redhat.com>
3353
3354 PR c/84919
3355 * c-common.c (check_function_arguments): Avoid overlap checking
3356 of sprintf functions.
3357
3358 2020-01-22 Jason Merrill <jason@redhat.com>
3359
3360 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3361 PR c++/40752
3362 * c-warn.c (conversion_warning): Check operands only after checking
3363 the whole expression. Don't check second operand of + for sign.
3364
3365 2020-01-21 Jason Merrill <jason@redhat.com>
3366 Manuel López-Ibáñez <manu@gcc.gnu.org>
3367
3368 PR c++/40752 - useless -Wconversion with short +=.
3369 * c.opt (-Warith-conversion): New.
3370 * c-warn.c (conversion_warning): Recurse for operands of
3371 operators. Only warn about the whole expression with
3372 -Warith-conversion.
3373
3374 2020-01-21 Jason Merrill <jason@redhat.com>
3375
3376 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3377 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3378
3379 2020-01-20 Nathan Sidwell <nathan@acm.org>
3380
3381 PR preprocessor/80005
3382 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3383
3384 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3385
3386 * c-common.c (co_await, co_yield, co_return): New.
3387 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3388 RID_CO_RETURN): New enumeration values.
3389 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3390 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3391 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3392 * c.opt (fcoroutines): New command-line switch.
3393
3394 2020-01-10 David Malcolm <dmalcolm@redhat.com>
3395
3396 * c-format.c (local_event_ptr_node): New.
3397 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3398 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3399 * c-format.h (T_EVENT_PTR): New define.
3400
3401 2020-01-10 Martin Sebor <msebor@redhat.com>
3402
3403 PR c/93132
3404 * c-attribs.c (append_access_attrs): Validate against the translated
3405 access string rather than the human-readable representation.
3406
3407 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3408
3409 Update copyright years.
3410
3411 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3412
3413 * c-ada-spec.h (decl_sloc): Delete.
3414 * c-ada-spec.c (decl_sloc): Make static.
3415
3416 2019-12-19 Julian Brown <julian@codesourcery.com>
3417
3418 * c-common.h (c_omp_map_clause_name): Add prototype.
3419 * c-omp.c (c_omp_map_clause_name): New function.
3420 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3421 PRAGMA_OACC_CLAUSE_DETACH.
3422
3423 2019-12-19 Julian Brown <julian@codesourcery.com>
3424 Maciej W. Rozycki <macro@codesourcery.com>
3425 Tobias Burnus <tobias@codesourcery.com>
3426 Thomas Schwinge <thomas@codesourcery.com>
3427
3428 * c-pragma.h (pragma_omp_clause): Add
3429 PRAGMA_OACC_CLAUSE_NO_CREATE.
3430
3431 2019-12-17 Martin Sebor <msebor@redhat.com>
3432
3433 PR c++/61339
3434 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3435
3436 2019-12-11 David Malcolm <dmalcolm@redhat.com>
3437
3438 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3439 implementation.
3440 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3441
3442 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3443
3444 * c-format.c (range_label_for_format_type_mismatch::get_text):
3445 Replace label_text ctor called with true with label_text::take.
3446
3447 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3448
3449 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3450 initial newline from expected outputs.
3451 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3452 call to diagnostic_show_locus.
3453
3454 2019-12-06 Jakub Jelinek <jakub@redhat.com>
3455
3456 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3457 now.
3458
3459 2019-12-05 Marek Polacek <polacek@redhat.com>
3460 Jakub Jelinek <jakub@redhat.com>
3461
3462 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3463 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3464
3465 2019-12-05 Marek Polacek <polacek@redhat.com>
3466
3467 PR c++/92271 - make __is_same alias for __is_same_as.
3468 * c-common.c: Add __is_same, an alias for __is_same_as.
3469
3470 2019-12-03 Marek Polacek <polacek@redhat.com>
3471
3472 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3473 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3474 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3475
3476 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
3477
3478 * c-attribs.c (handle_symver_attribute): New function
3479 (c_common_attributes): Add symver.
3480
3481 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3482
3483 * c-common.c (pointer_int_sum): Use verify_type_context to check
3484 whether the target allows pointer arithmetic for the types involved.
3485 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3486 to check whether the target allows sizeof and alignof operations
3487 for the types involved.
3488
3489 2019-11-27 Jason Merrill <jason@redhat.com>
3490
3491 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3492
3493 2019-11-26 Jakub Jelinek <jakub@redhat.com>
3494
3495 PR c++/61414
3496 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3497 ENUMERAL_TYPEs.
3498
3499 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3500
3501 PR c/91985
3502 * c-common.c (c_common_type_for_mode): Handle decimal
3503 floating-point types being NULL_TREE.
3504 * c-format.c (get_format_for_type_1): Handle specified types being
3505 NULL_TREE.
3506 * c-lex.c (interpret_float): Give an error for decimal
3507 floating-point constants when decimal floating-point not
3508 supported.
3509
3510 2019-11-23 Jakub Jelinek <jakub@redhat.com>
3511
3512 PR middle-end/83859
3513 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3514 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3515 group warning with inform together.
3516 (handle_access_attribute): Formatting fix.
3517
3518 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3519
3520 PR c/90677
3521 * c-common.h (identifier_global_tag): Declare.
3522 * c-format.c (get_pointer_to_named_type): Renamed to ...
3523 (get_named_type): ... this. Use identifier_global_tag instead of
3524 identifier_global_value, handle the return value being a TYPE_P.
3525 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3526 to call get_named_type instead. Formatting fixes.
3527
3528 Implement P1902R1, Missing feature-test macros 2017-2019.
3529 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3530 and __cpp_generic_lambdas for -std=c++2a. Define
3531 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3532 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3533 __cpp_concepts for -std=c++2a.
3534
3535 2019-11-22 Martin Sebor <msebor@redhat.com>
3536
3537 PR middle-end/83859
3538 * c-attribs.c (handle_access_attribute): New function.
3539 (c_common_attribute_table): Add new attribute.
3540 (get_argument_type): New function.
3541 (append_access_attrs): New function.
3542 (get_nonnull_operand): Rename...
3543 (get_attribute_operand): ...to this.
3544 * c-common.c (get_nonnull_operand): Rename...
3545 (get_attribute_operand): ...to this.
3546
3547 2019-11-21 Joseph Myers <joseph@codesourcery.com>
3548
3549 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3550 of warning.
3551
3552 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3553
3554 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3555 warning for standard attributes mixed with fallthrough attributes.
3556
3557 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3558
3559 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3560 * c-common.h (handle_fallthrough_attribute): Declare.
3561
3562 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3563
3564 * c-attribs.c (handle_deprecated_attribute): Remove static.
3565 * c-common.h (handle_deprecated_attribute): Declare.
3566
3567 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3568
3569 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3570 char for C.
3571
3572 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3573
3574 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3575 valid vendors.
3576
3577 * c-omp.c (c_omp_check_context_selector): Handle name lists
3578 containing string literals. Don't diagnose atomic_default_mem_order
3579 with multiple props.
3580
3581 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3582
3583 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3584 NORM_MAX constants. Update call to get_max_float.
3585 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3586 constants.
3587
3588 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3589
3590 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3591 (dump_forward_type): Do not generate a declaration for function types.
3592 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3593 of the component type if it is declared in another file.
3594
3595 2019-11-12 Martin Liska <mliska@suse.cz>
3596
3597 * c-opts.c (c_common_post_options):
3598 Use SET_OPTION_IF_UNSET.
3599
3600 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3601 Frederik Harwath <frederik@codesourcery.com>
3602
3603 gcc/c-family/
3604 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3605 constant.
3606 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3607
3608 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3609
3610 * c-common.h (gnu_vector_type_p): New function.
3611 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3612 vectors to satisfy gnu_vector_type_p.
3613 (c_build_vec_convert): Likewise __builtin_convertvector.
3614 (convert_vector_to_array_for_subscript): Likewise when applying
3615 implicit vector to array conversion.
3616 (scalar_to_vector): Likewise when converting vector-scalar
3617 operations to vector-vector operations.
3618
3619 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3620
3621 * c.opt (Wold-style-definition): Initialize to -1.
3622 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3623 to flag_isoc2x if not set explicitly.
3624
3625 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3626
3627 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3628
3629 2019-11-05 Jason Merrill <jason@redhat.com>
3630
3631 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3632 -fconcepts.
3633
3634 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3635
3636 * c-opts.c (c_common_post_options): Update
3637 latest_abi_version.
3638
3639 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3640
3641 * c-common.h (c_omp_get_context_selector): Remove.
3642 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3643 and renamed to omp_get_context_selector.
3644
3645 * c-omp.c (c_omp_mark_declare_variant): Use
3646 omp_context_selector_set_compare.
3647
3648 PR c++/88335 - Implement P1073R3: Immediate functions
3649 * c-common.h (enum rid): Add RID_CONSTEVAL.
3650 * c-common.c (c_common_reswords): Add consteval.
3651
3652 2019-11-01 Martin Sebor <msebor@redhat.com>
3653
3654 PR middle-end/91679
3655 PR middle-end/91647
3656 PR middle-end/91463
3657 PR middle-end/92312
3658 * c-pretty-print.c (direct_abstract_declarator): Print
3659 bound in zero-length arrays.
3660 * c.opt (-Wzero-length-bounds): New option.
3661
3662 2019-10-30 Nathan Sidwell <nathan@acm.org>
3663
3664 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3665 macros.
3666
3667 2019-10-28 Martin Sebor <msebor@redhat.com>
3668
3669 PR c/66970
3670 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3671 even when only preprocessing.
3672 * c-common.h (names_builtin_p): Declare new function.
3673 * c-lex.c (init_c_lex): Set has_builtin.
3674 (c_common_has_builtin): Define a new function.
3675 * c-ppoutput.c (init_pp_output): Set has_builtin.
3676
3677 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3678
3679 * c-common.h (c_omp_context_selector_matches): Remove.
3680 * c-omp.c (c_omp_context_selector_matches): Remove.
3681 * c-attribs.c (c_common_attribute_table): Add
3682 "omp declare target {host,nohost,block}" attributes.
3683
3684 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3685
3686 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3687
3688 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3689
3690 * c-common.h (user_facing_original_type_p): Declare.
3691 * c-common.c: Include c-spellcheck.h.
3692 (user_facing_original_type_p): New function.
3693
3694 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3695
3696 * c-common.h (c_omp_mark_declare_variant,
3697 c_omp_context_selector_matches): Declare.
3698 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3699 and hsa-common.h.
3700 (c_omp_get_context_selector): Support second argument NULL.
3701 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3702 functions.
3703 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3704 attribute, add "omp declare variant base" and
3705 "omp declare variant variant" attributes.
3706
3707 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3708
3709 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3710 CppReason(CPP_W_C11_C2X_COMPAT).
3711
3712 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3713
3714 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3715 _Decimal64 and _Decimal128.
3716
3717 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3718
3719 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3720 types if DFP not supported.
3721
3722 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3723
3724 * c-common.h (c_omp_check_context_selector,
3725 c_omp_get_context_selector): Declare.
3726 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3727 in diagnostic message.
3728 (c_omp_check_context_selector, c_omp_get_context_selector): New
3729 functions.
3730 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3731 attribute.
3732 (handle_omp_declare_variant_attribute): New function.
3733
3734 2019-10-09 Martin Sebor <msebor@redhat.com>
3735
3736 PR tree-optimization/90879
3737 * c.opt (-Wstring-compare): New option.
3738
3739 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3740 Jason Merrill <jason@redhat.com>
3741
3742 Update the concepts implementation to conform to the C++20
3743 specification, improve compile times, and generally clean up
3744 the implementation.
3745
3746 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3747 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3748 * c.opt: Add -Wconcepts-ts.
3749 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3750 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3751 (set_std_cxx2a): Enable concepts by default.
3752
3753 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3754
3755 * c-opts.c (c_common_post_options): Set
3756 -fno-fp-int-builtin-inexact for C2X.
3757
3758 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3759
3760 PR c++/91369 - Implement P0784R7: constexpr new
3761 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3762 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3763
3764 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3765
3766 PR c/82752
3767 * c-format.c (C_STD_VER): Handle C2x.
3768 (C_STD_NAME): Likewise.
3769 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3770 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3771 modifier allowed and 'p' flag.
3772 * c-format.h (enum format_std_version): Add STD_C2X.
3773 (struct format_char_info): Mention 'p' in comment on flags2.
3774
3775 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3776
3777 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3778 calling diagnostic_show_locus, rather than destroying it afterwards.
3779
3780 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3781
3782 PR c++/91925
3783 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3784 with NULL DECL_FIELD_OFFSET.
3785
3786 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3787
3788 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3789 has a type name, use it in preference to the __vector syntax.
3790
3791 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3792
3793 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3794 two spaces between a comma and "...".
3795
3796 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3797
3798 PR c++/88203
3799 * c-common.h (c_omp_predefined_variable): Declare.
3800 * c-omp.c (c_omp_predefined_variable): New function.
3801 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3802 for predefined variables.
3803
3804 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3805
3806 * c-common.h (build_function_call_vec): Take the original
3807 function decl as an optional final parameter.
3808 (check_builtin_function_arguments): Take the original function decl.
3809 * c-common.c (check_builtin_function_arguments): Likewise.
3810 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3811 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3812
3813 2019-09-15 Jason Merrill <jason@redhat.com>
3814
3815 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3816 fold_for_warn in "|| mask" warning.
3817
3818 2019-09-10 Martin Liska <mliska@suse.cz>
3819
3820 * c.opt: Use newly added WarnRemoved.
3821
3822 2019-09-09 Martin Liska <mliska@suse.cz>
3823
3824 * c.opt: Update comment of removed
3825 options that are preserved only for backward
3826 compatibility.
3827
3828 2019-09-06 Martin Liska <mliska@suse.cz>
3829
3830 PR c++/91125
3831 * c-common.c: Remove definition of flag_use_repository.
3832 * c-common.h: Likewise.
3833 * c-opts.c (c_common_handle_option):
3834 Do not handle OPT_frepo option.
3835 * c.opt: Mark the option with Deprecated.
3836
3837 2019-09-04 Marek Polacek <polacek@redhat.com>
3838
3839 * c.opt (fdeduce-init-list): Ignored.
3840
3841 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3842
3843 PR c/78736
3844 * c.opt (Wenum-conversion): New option.
3845
3846 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3847
3848 * c-attribs.c (handle_section_attribute): Call the
3849 handle_generic_attribute target hook after performing target
3850 independent processing.
3851 (handle_noinit_attribute): Likewise.
3852
3853 2019-09-03 Ian Lance Taylor <iant@golang.org>
3854
3855 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3856 when using -fgo-dump-spec.
3857
3858 2019-09-02 Martin Liska <mliska@suse.cz>
3859
3860 PR c++/91155
3861 * c-common.c (fname_as_string): Use cxx_printable_name for
3862 __PRETTY_FUNCTION__ same as was used before r265711.
3863
3864 2019-08-28 Marek Polacek <polacek@redhat.com>
3865
3866 Implement P1152R4: Deprecating some uses of volatile.
3867 PR c++/91361
3868 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3869 default for C++2a, unless -Wno-deprecated.
3870 * c.opt (Wvolatile): New warning.
3871
3872 2019-08-28 Marek Polacek <polacek@redhat.com>
3873
3874 PR c++/91360 - Implement C++20 P1143R2: constinit.
3875 * c-common.c (c_common_reswords): Add constinit and __constinit.
3876 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3877 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3878 RID_LAST_CXX20.
3879 (D_CXX20): Define.
3880 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3881 * c-format.c (cxx_keywords): Add "constinit".
3882 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3883
3884 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3885
3886 PR c++/91415
3887 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3888 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3889 like COMPOUND_EXPR rather than normal expression.
3890
3891 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3892
3893 PR pch/61250
3894 * c-lex.c (c_lex_with_flags): Don't call
3895 c_common_no_more_pch () from here.
3896
3897 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3898
3899 PR middle-end/91283
3900 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3901 instead of flag_excess_precision_cmdline.
3902 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3903 * c-opts.c (c_common_post_options): Likewise.
3904
3905 2019-08-22 Martin Sebor <msebor@redhat.com>
3906
3907 PR middle-end/91490
3908 * c-common.c (braced_list_to_string): Add argument and overload.
3909 Handle flexible length arrays and unions.
3910
3911 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3912
3913 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3914 function declarations where arguments are missing. Rename variables.
3915
3916 2019-08-15 Richard Biener <rguenther@suse.de>
3917
3918 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3919 enabled, define __SIZETYPE__.
3920
3921 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3922
3923 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3924 exclusion with "section" attribute.
3925 (attr_noinit_exclusions): New table.
3926 (handle_noinit_attribute): New function.
3927
3928 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3929
3930 PR middle-end/91421
3931 * c-common.c (resolve_overloaded_builtin): Use
3932 copy_decl_built_in_function.
3933
3934 2019-08-13 Martin Sebor <msebor@redhat.com>
3935
3936 PR c/80619
3937 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3938 (asm_fprintf_length_spec): Same.
3939 * c-format.h (format_lengths): Add FMT_LEN_w.
3940
3941 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3942
3943 * c-pragma.h (enum pragma_omp_clause): Add
3944 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3945
3946 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3947
3948 * c-pragma.h (enum pragma_omp_clause): Add
3949 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3950 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3951 enumeration value.
3952
3953 2019-08-05 Marek Polacek <polacek@redhat.com>
3954
3955 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3956 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3957 default for C++2a, unless -Wno-deprecated.
3958 * c.opt (Wcomma-subscript): New warning.
3959
3960 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3961
3962 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3963 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3964 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3965 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3966 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3967 constructs with the loop construct.
3968
3969 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3970
3971 PR c/91149
3972 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3973 OMP_CLAUSE_REDUCTION_TASK handling.
3974
3975 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3976
3977 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3978 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3979
3980 2019-07-09 Martin Sebor <msebor@redhat.com>
3981
3982 PR c++/61339
3983 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3984 and others to class.
3985 * c-pretty-print.h: Same.
3986
3987 2019-07-09 Martin Sebor <msebor@redhat.com>
3988
3989 PR c++/61339
3990 * c-format.c (check_argument_type): Change class-key from class to
3991 struct and vice versa to match convention and avoid -Wclass-is-pod
3992 and -Wstruct-no-pod.
3993 * c-pretty-print.h: Same.
3994
3995 2019-07-03 Martin Liska <mliska@suse.cz>
3996
3997 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3998 dead assignemts.
3999
4000 2019-07-03 Jakub Jelinek <jakub@redhat.com>
4001
4002 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
4003 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
4004 with OMP_PARALLEL.
4005
4006 2019-07-02 qing zhao <qing.zhao@oracle.com>
4007
4008 PR preprocessor/90581
4009 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
4010 * c.opt: Add new option -fmax-include-depth.
4011
4012 2019-06-26 Jason Merrill <jason@redhat.com>
4013
4014 PR c++/55442 - memory-hog with highly recursive constexpr.
4015 * c.opt (fconstexpr-loop-limit): New.
4016
4017 2019-06-25 Jakub Jelinek <jakub@redhat.com>
4018
4019 PR sanitizer/90954
4020 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
4021 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
4022
4023 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4024
4025 * c-common.c (c_common_nodes_and_builtins): Define
4026 alternate "__intN__" name for "__intN" types.
4027
4028 2019-06-24 Jan Hubicka <jh@suse.cz>
4029
4030 * c-common.c (braced_lists_to_strings): Check that
4031 type is array or integer prior checking string flag.
4032
4033 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
4034
4035 PR c++/90875 - added -Wswitch-outside-range option
4036 * c.opt (Wswitch-outside-range): Added new option.
4037 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
4038
4039 2019-06-21 Marek Polacek <polacek@redhat.com>
4040
4041 PR c++/90953 - ICE with -Wmissing-format-attribute.
4042 * c-common.c (check_function_arguments_recurse): Use
4043 get_attribute_name.
4044 (check_missing_format_attribute): Likewise.
4045
4046 2019-06-19 Marek Polacek <polacek@redhat.com>
4047
4048 PR c++/60364 - noreturn after first decl not diagnosed.
4049 * c-attribs.c (handle_noreturn_attribute): No longer static.
4050 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
4051 Declare.
4052 * c-format.c (check_function_format): Use get_attribute_name.
4053
4054 2019-06-19 Martin Sebor <msebor@redhat.com>
4055
4056 PR translation/90156
4057 * c-format.c (function_format_info::format_type): Adjust type.
4058 (function_format_info::is_raw): New member.
4059 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
4060 (decode_format_attr): Adjust call to decode_format_type.
4061 Avoid a redundant call to convert_format_name_to_system_name.
4062 Avoid abbreviating the word "arguments" in a diagnostic.
4063 (format_warning_substr): New function.
4064 (avoid_dollar_number): Quote dollar sign in a diagnostic.
4065 (finish_dollar_format_checking): Same.
4066 (check_format_info): Same.
4067 (struct baltoks_t): New.
4068 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
4069 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
4070 functions.
4071 (check_format_info_main): Call check_plain. Use baltoks_t. Call
4072 maybe_diag_unbalanced_tokens.
4073 (handle_format_attribute): Spell out the word "arguments" in
4074 a diagnostic.
4075
4076 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
4077
4078 PR c++/90449 - add -Winaccessible-base option.
4079 * c.opt (Winaccessible-base): New option.
4080
4081 2019-06-10 Jakub Jelinek <jakub@redhat.com>
4082
4083 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
4084 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
4085 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
4086 combined/composite constructs where it is not allowed. Copy over
4087 OMP_CLAUSE_REDUCTION_INSCAN.
4088
4089 2019-06-05 Martin Sebor <msebor@redhat.com>
4090
4091 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
4092 (handle_alias_ifunc_attribute): Same.
4093 (handle_copy_attribute): Same.
4094 (handle_weakref_attribute): Same.
4095 (handle_nonnull_attribute): Same.
4096 * c-warn.c (warn_for_sign_compare): Same.
4097 (warn_for_restrict): Same.
4098 * c.opt: Same.
4099
4100 2019-06-05 Martin Sebor <msebor@redhat.com>
4101
4102 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
4103 * c.opt (-Wformat-diag): Remove a spurious period.
4104
4105 2019-05-29 Jakub Jelinek <jakub@redhat.com>
4106
4107 PR c/90628
4108 * c-common.c (check_builtin_function_arguments)
4109 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4110 as last argument.
4111
4112 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
4113
4114 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4115
4116 2019-05-22 Martin Liska <mliska@suse.cz>
4117
4118 PR lto/90500
4119 * c-attribs.c (handle_copy_attribute): Do not copy
4120 target_clones attribute.
4121
4122 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
4123
4124 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4125 * c-ada-spec.c (print_assignment_operator): New function.
4126 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4127 assignment operators declared as methods and filter out the others.
4128
4129 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4130
4131 PR c/89433
4132 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4133 "omp declare target".
4134
4135 2019-05-16 Martin Sebor <msebor@redhat.com>
4136
4137 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4138 keywords, operators, and types in diagnostics.
4139 (handle_scalar_storage_order_attribute): Same.
4140 (handle_mode_attribute): Same.
4141 (handle_visibility_attribute): Same.
4142 (handle_assume_aligned_attribute): Same.
4143 (handle_no_split_stack_attribute): Same.
4144 * c-common.c (shorten_compare): Same.
4145 (c_common_truthvalue_conversion): Same.
4146 (cb_get_source_date_epoch): Same.
4147 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4148 in diagnostics.
4149 (interpret_float): Same.
4150 * c-omp.c (c_finish_omp_for): Same.
4151 * c-opts.c (c_common_post_options): Same.
4152 * c-pch.c (c_common_pch_pragma): Same.
4153 * c-pragma.c (pop_alignment): Same.
4154 (handle_pragma_pack): Same.
4155 (apply_pragma_weak): Same.
4156 (handle_pragma_weak): Same.
4157 (handle_pragma_scalar_storage_order): Same.
4158 (handle_pragma_redefine_extname): Same.
4159 (add_to_renaming_pragma_list): Same.
4160 (maybe_apply_renaming_pragma): Same.
4161 (push_visibility): Same.
4162 (handle_pragma_visibility): Same.
4163 (handle_pragma_optimize): Same.
4164 (handle_pragma_message): Same.
4165 * c-warn.c (warn_for_omitted_condop): Same.
4166 (lvalue_error): Same.
4167
4168 2019-05-15 Richard Biener <rguenther@suse.de>
4169
4170 PR c/90474
4171 * c-common.c (c_common_mark_addressable_vec): Also mark
4172 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4173 c_mark_addressable.
4174
4175 2019-05-06 Nathan Sidwell <nathan@acm.org>
4176
4177 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4178
4179 2019-04-30 Nathan Sidwell <nathan@acm.org>
4180
4181 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4182
4183 2019-04-30 Martin Liska <mliska@suse.cz>
4184
4185 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4186 for unknown options.
4187
4188 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4189
4190 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4191 the pointer target rather than the pointer itself.
4192
4193 2019-04-19 Jakub Jelinek <jakub@redhat.com>
4194
4195 PR c/89888
4196 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4197 arguments.
4198 (c_do_switch_warnings): Remove outside_range_p argument.
4199 * c-common.c (check_case_bounds): Removed.
4200 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4201 Don't call check_case_bounds. Fold low_value as well as high_value.
4202 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4203 Check for case labels outside of range of original type here and
4204 adjust them.
4205
4206 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4207
4208 PR translation/90041
4209 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4210 in the Warn diagnostics.
4211
4212 PR c/89946
4213 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4214 function comment. Warn if arguments of the attribute are not positive
4215 integer constants.
4216
4217 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4218
4219 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4220 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4221
4222 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4223
4224 * c-ada-spec.c (is_float128): New predicate extracted from...
4225 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4226 <REAL_TYPE>: ...here. Call it.
4227
4228 2019-04-05 David Malcolm <dmalcolm@redhat.com>
4229
4230 PR c/89985
4231 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4232 auto_diagnostic_group. Guard inform calls by result of
4233 warning_at call.
4234
4235 2019-04-05 Marek Polacek <polacek@redhat.com>
4236
4237 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
4238 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4239 of RHS.
4240
4241 2019-04-03 Jason Merrill <jason@redhat.com>
4242
4243 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4244 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4245
4246 2019-04-01 Martin Sebor <msebor@redhat.com>
4247
4248 PR c/89685
4249 * c-attribs.c (handle_copy_attribute): Handle references and
4250 non-constant expressions.
4251
4252 2019-03-22 Jakub Jelinek <jakub@redhat.com>
4253
4254 PR c++/87481
4255 * c.opt (-fconstexpr-ops-limit=): New option.
4256
4257 2019-03-21 Jakub Jelinek <jakub@redhat.com>
4258
4259 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4260 template param.
4261
4262 2019-03-19 Martin Sebor <msebor@redhat.com>
4263
4264 PR tree-optimization/89688
4265 * c-common.c (braced_list_to_string): Make static.
4266 (braced_lists_to_strings): Define new function.
4267 * c-common.h (braced_list_to_string): Remove.
4268 (braced_lists_to_strings): Declare.
4269
4270 2019-03-12 Martin Liska <mliska@suse.cz>
4271
4272 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4273
4274 2019-03-11 Martin Liska <mliska@suse.cz>
4275
4276 * c-opts.c (c_common_post_options): Wrap apostrophes
4277 in gcc internal format with %'.
4278
4279 2019-03-11 Martin Liska <mliska@suse.cz>
4280
4281 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4282 in a string format message and fix GNU coding style.
4283 * c-common.c (vector_types_convertible_p): Likewise.
4284 (c_build_vec_perm_expr): Likewise.
4285 * c-indentation.c (get_visual_column): Likewise.
4286 * c-opts.c (c_common_handle_option): Likewise.
4287 (c_common_post_options): Likewise.
4288 (sanitize_cpp_opts): Likewise.
4289 * c-pch.c (c_common_pch_pragma): Likewise.
4290 * c-pragma.c (handle_pragma_pack): Likewise.
4291
4292 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR tree-optimization/89550
4295 * c-common.c (c_common_truthvalue_conversion): Only set
4296 TREE_NO_WARNING if warning_at returned true.
4297 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4298
4299 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4300 Martin Sebor <msebor@gmail.com>
4301
4302 * c.opt (Wmissing-attributes): Clean up doc string.
4303
4304 2019-02-25 Jakub Jelinek <jakub@redhat.com>
4305
4306 PR c/89495
4307 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4308 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4309 checking.
4310
4311 2019-02-22 Richard Biener <rguenther@suse.de>
4312
4313 * c-pch.c (no_checksum): Remove.
4314 (pch_init): Remove assertion that executable_checksum is not
4315 all zero.
4316 (c_common_valid_pch): Likewise.
4317
4318 2019-02-18 Martin Sebor <msebor@redhat.com>
4319
4320 PR middle-end/89294
4321 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4322
4323 2019-02-16 David Malcolm <dmalcolm@redhat.com>
4324
4325 PR c++/88680
4326 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4327 implementing -Wtype-limits.
4328
4329 2019-02-11 Martin Sebor <msebor@redhat.com>
4330
4331 PR c++/87996
4332 * c-common.c (invalid_array_size_error): New function.
4333 (valid_array_size_p): Call it. Handle size as well as type.
4334 * c-common.h (valid_constant_size_p): New function.
4335 (enum cst_size_error): New type.
4336
4337 2019-01-31 David Malcolm <dmalcolm@redhat.com>
4338
4339 PR c/89122
4340 * known-headers.cc (get_stdlib_header_for_name): Add
4341 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4342
4343 2019-01-31 Jakub Jelinek <jakub@redhat.com>
4344
4345 PR libstdc++/88170
4346 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4347 a C cast in pp_c_flag_gnu_v3 mode.
4348
4349 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4350
4351 PR c/86125
4352 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4353 builtin_structptr_types types even for C.
4354
4355 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4356
4357 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4358 when rhs is of array type correctly. Fix handling of nested structures.
4359 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4360 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4361 type casts within nested compound expressions.
4362
4363 2019-01-22 Jakub Jelinek <jakub@redhat.com>
4364
4365 PR middle-end/88968
4366 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4367 variable after using BIT_FIELD_REF.
4368
4369 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4370
4371 PR c/51628
4372 PR c/88664
4373 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4374 Remove the boolean argument.
4375 * c-warn.c (check_address_of_packed_member): Renamed to ...
4376 (check_address_or_pointer_of_packed_member): This. Also
4377 warn pointer conversion.
4378 (check_and_warn_address_of_packed_member): Renamed to ...
4379 (check_and_warn_address_or_pointer_of_packed_member): This.
4380 Also warn pointer conversion.
4381 (warn_for_address_or_pointer_of_packed_member): Remove the
4382 boolean argument. Don't check pointer conversion here.
4383
4384 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4385
4386 PR inline-asm/52813
4387 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4388
4389 2019-01-14 Jakub Jelinek <jakub@redhat.com>
4390
4391 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4392 and __cpp_nontype_template_parameter_auto. Add a comment that
4393 __cpp_template_auto is deprecated.
4394
4395 2019-01-14 Tom Honermann <tom@honermann.net>
4396
4397 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4398 * c-common.c (c_common_reswords): Add char8_t.
4399 (fix_string_type): Use char8_t for the type of u8 string literals.
4400 (c_common_get_alias_set): char8_t doesn't alias.
4401 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4402 C++.
4403 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4404 (keyword_begins_type_specifier): Add RID_CHAR8.
4405 * c-common.h (rid): Add RID_CHAR8.
4406 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4407 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4408 Define char8_type_node and char8_array_type_node.
4409 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4410 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4411 (c_cpp_builtins): Predefine __cpp_char8_t.
4412 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4413 CPP_UTF8STRING.
4414 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4415 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4416 targeting C++2a.
4417 * c.opt: Add the -fchar8_t command line option.
4418
4419 2019-01-14 Martin Sebor <msebor@redhat.com>
4420
4421 PR target/88638
4422 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4423 and issue errors if it fails.
4424 * c-common.h (valid_format_string_type_p): Declare.
4425 * c-format.c (valid_stringptr_type_p): Rename...
4426 (valid_format_string_type_p): ...to this and make extern.
4427 (handle_format_arg_attribute): Adjust to new name.
4428 (check_format_string): Same.
4429
4430 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4431
4432 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4433 Replace "may may" with "may" in warning message.
4434
4435 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4436
4437 PR c++/85052
4438 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4439 (c_build_vec_convert): Declare.
4440 * c-common.c (c_build_vec_convert): New function.
4441
4442 2019-01-04 Martin Sebor <msebor@redhat.com>
4443
4444 PR c/88546
4445 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4446 Handle C++ empty throw specification and C11 _Noreturn.
4447 (has_attribute): Also handle C11 _Noreturn.
4448
4449 2019-01-04 Martin Sebor <msebor@redhat.com>
4450
4451 PR c/88363
4452 * c-attribs.c (positional_argument): Also accept enumerated types.
4453
4454 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4455
4456 Update copyright years.
4457
4458 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4459
4460 PR c/51628
4461 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4462 * c-warn.c (check_alignment_of_packed_member): New function.
4463 (check_address_of_packed_member): Likewise.
4464 (check_and_warn_address_of_packed_member): Likewise.
4465 (warn_for_address_or_pointer_of_packed_member): Likewise.
4466 * c.opt: Add -Wno-address-of-packed-member.
4467
4468 2018-12-20 David Malcolm <dmalcolm@redhat.com>
4469
4470 PR c++/87504
4471 * c-warn.c (get_outermost_macro_expansion): New function.
4472 (spelled_the_same_p): Use it to unwind the macro expansions, and
4473 compare the outermost macro in each nested expansion, rather than
4474 the innermost.
4475
4476 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4477
4478 PR c++/87504
4479 * c-common.h (warn_tautological_cmp): Convert 1st param from
4480 location_t to const op_location_t &.
4481 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4482 when testing for INTEGER_CST.
4483 (warn_tautological_bitwise_comparison): Convert 1st param from
4484 location_t to const op_location_t &; use it to build a
4485 binary_op_rich_location, and use this.
4486 (spelled_the_same_p): New function.
4487 (warn_tautological_cmp): Convert 1st param from location_t to
4488 const op_location_t &. Warn for macro expansions if
4489 spelled_the_same_p. Use binary_op_rich_location.
4490
4491 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4492
4493 PR c++/43064
4494 PR c++/43486
4495 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4496 (verify_tree): Handle location wrappers.
4497 (c_common_truthvalue_conversion): Strip any location wrapper.
4498 Handle CONST_DECL.
4499 (fold_offsetof): Strip any location wrapper.
4500 (complete_array_type): Likewise for initial_value.
4501 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4502 index before checking for INTEGER_CST.
4503 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4504 print parentheses around location wrappers.
4505 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4506 before checking for INTEGER_CST.
4507 (warn_tautological_bitwise_comparison): Call
4508 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4509 before checking for INTEGER_CST.
4510 (readonly_error): Strip any location wrapper.
4511 (warn_array_subscript_with_type_char): Strip location wrappers
4512 before checking for INTEGER_CST. Use the location of the index if
4513 available.
4514
4515 2018-12-06 Jason Merrill <jason@redhat.com>
4516
4517 PR c++/88136 - -Wdeprecated-copy false positives
4518 * c.opt (Wdeprecated-copy-dtor): New.
4519 (Wdeprecated-copy): Move to -Wextra.
4520
4521 2018-11-29 Martin Sebor <msebor@redhat.com>
4522
4523 PR c/88172
4524 PR testsuite/88208
4525 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4526 alignments to values less than the target requires.
4527 (has_attribute): For attribute aligned consider both the attribute
4528 and the alignment bits.
4529 * c-common.c (c_init_attributes): Optionally issue a warning for
4530 zero alignment.
4531
4532 2018-11-28 Martin Sebor <msebor@redhat.com>
4533
4534 PR c/88065
4535 PR c/87297
4536 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4537 or destination is an error.
4538
4539 2018-11-28 Jakub Jelinek <jakub@redhat.com>
4540
4541 PR c++/88215
4542 * c-ubsan.c: Include langhooks.h.
4543 (ubsan_instrument_division): Change gcc_assert that main variants
4544 of op0 and op1 types are equal to gcc_checking_assert that the
4545 main variants are compatible types.
4546
4547 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4548
4549 * c-ada-spec.c: Include stringpool.h.
4550 (has_static_fields): Return false for incomplete types.
4551 (is_tagged_type): Likewise.
4552 (has_nontrivial_methods): Likewise.
4553 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4554 (struct overloaded_name_hash): New structure.
4555 (struct overloaded_name_hasher): Likewise.
4556 (overloaded_names): New global variable.
4557 (init_overloaded_names): New static function.
4558 (overloaded_name_p): New predicate.
4559 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4560 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4561 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4562 Remove always-true condition and dump forward types.
4563 (dump_ada_specs): Delete overloaded_names.
4564
4565 2018-11-20 Martin Sebor <msebor@redhat.com>
4566
4567 * c-attribs.c (type_for_vector_size): New function.
4568 (type_valid_for_vector_size): Same.
4569 (handle_vector_size_attribute): Move code to the functions above
4570 and call them.
4571 (validate_attribute, has_attribute): New functions.
4572 * c-common.h (has_attribute): Declare.
4573 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4574 * c-common.c (c_common_resword): Same.
4575
4576 2018-11-16 Jason Merrill <jason@redhat.com>
4577
4578 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4579 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4580
4581 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4582
4583 PR middle-end/87854
4584 * c-common.c (fix_string_type): Reject string literals larger than
4585 TYPE_MAX_VALUE (ssizetype) bytes.
4586
4587 2018-11-15 Martin Sebor <msebor@redhat.com>
4588
4589 PR c++/87541
4590 PR c++/87542
4591 * c-attribs.c (positional_argument): New function.
4592 (handle_alloc_size_attribute): Use it and simplify.
4593 (handle_alloc_align_attribute): Same.
4594 (handle_assume_aligned_attribute): Same.
4595 (handle_nonnull_attribute): Same.
4596 * c-common.c (check_function_arguments): Pass fntype to
4597 check_function_format.
4598 * c-common.h (check_function_format): Add an argument.
4599 (PosArgFlags, positional_argument): Declare new type and function.
4600 * c-format.c (decode_format_attr): Add arguments.
4601 (check_format_string, get_constant): Same.
4602 (convert_format_name_to_system_name): Adjust.
4603
4604 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4605
4606 PR other/19165
4607 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4608
4609 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4610
4611 P1236R1 - Signed integers are two's complement
4612 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4613 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4614 with in-range second operand well defined for -std=c++2a.
4615
4616 PR other/88007
4617 * c-common.c (parse_optimize_options): Allocate option string from
4618 opts_obstack rather than as GC memory. Move the allocation after
4619 warning for invalid option.
4620
4621 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4622
4623 * c-common.c (c_get_substring_location): Update for renaming of
4624 get_source_location_for_substring to get_location_within_string.
4625 * c-lex.c: Replace "source_location" with "location_t".
4626 * c-opts.c: Likewise.
4627 * c-ppoutput.c: Likewise.
4628
4629 2018-11-13 Martin Sebor <msebor@redhat.com>
4630
4631 PR middle-end/81824
4632 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4633 (handle_tls_model_attribute): Improve diagnostics.
4634
4635 2018-11-12 Jason Merrill <jason@redhat.com>
4636
4637 * c-cppbuiltin.c (c_cpp_builtins): Define
4638 __cpp_impl_destroying_delete.
4639
4640 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4641 __cpp_conditional_explicit.
4642
4643 2018-11-09 Martin Sebor <msebor@redhat.com>
4644
4645 PR middle-end/81824
4646 * c-attribs.c (handle_copy_attribute): New function.
4647
4648 2018-11-09 Martin Sebor <msebor@redhat.com>
4649
4650 PR c/87795
4651 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4652
4653 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4654
4655 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4656 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4657 enum omp_memory_order MEMORY_ORDER.
4658 (c_finish_omp_flush): Add MO argument.
4659 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4660 (c_finish_omp_for): Add FINAL_P argument.
4661 * c-omp.c: Include memmodel.h.
4662 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4663 OMP_TASKGROUP_CLAUSES to it.
4664 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4665 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4666 instead of OMP_ATOMIC_SEQ_CST.
4667 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4668 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4669 __atomic_thread_fence call with the given value.
4670 (check_omp_for_incr_expr): Formatting fixes.
4671 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4672 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4673 is not constant expression 1 or -1. Transform NE_EXPR loops
4674 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4675 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4676 loops too.
4677 (c_omp_split_clauses): Add support for combined
4678 #pragma omp parallel master and
4679 #pragma omp {,parallel }master taskloop{, simd} constructs.
4680 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4681 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4682 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4683 (c_omp_predetermined_sharing): Don't return
4684 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4685 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4686 PRAGMA_OMP_REQUIRES.
4687 * c-pragma.h (enum pragma_kind): Likewise.
4688 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4689 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4690
4691 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4692
4693 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4694
4695 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4696
4697 * c-format.c (local_cgraph_node_ptr_node): New variable.
4698 (gcc_dump_printf_char_table): Add entry for %C.
4699 (get_pointer_to_named_type): New function, taken from the handling
4700 code for "gimple *" from...
4701 (init_dynamic_diag_info): ...here. Add handling for
4702 "cgraph_node *".
4703 * c-format.h (T_CGRAPH_NODE): New.
4704
4705 2018-10-19 Jason Merrill <jason@redhat.com>
4706
4707 * c-cppbuiltin.c (c_cpp_builtins): Add
4708 __cpp_nontype_template_parameter_class.
4709
4710 2018-10-31 Nathan Sidwell <nathan@acm.org>
4711
4712 * c-opts.c (c_finish_options): Force command line macro
4713 location. Refactor to avoid repeating main debug hook.
4714 (push_command_line_include): Clarify comment.
4715
4716 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4717
4718 2018-10-30 Martin Sebor <msebor@redhat.com>
4719
4720 PR middle-end/87041
4721 * c-format.c (check_format_types): Avoid diagnosing null pointer
4722 arguments to printf-family of functions.
4723
4724 2018-10-30 Marek Polacek <polacek@redhat.com>
4725
4726 Implement P0892R2, explicit(bool).
4727 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4728
4729 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4730
4731 * name-hint.h (name_hint::take_deferred): New member function.
4732
4733 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4734
4735 PR c++/56856
4736 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4737 argument.
4738 (check_function_restrict): Rename param "argarray" to
4739 "unfolded_argarray", and make a copy named "argarray", calling
4740 fold_for_warn on each argument.
4741 (check_function_arguments): Add note about responsibility for
4742 folding the arguments.
4743
4744 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4745
4746 * c-common.c (flag_isoc2x): New variable.
4747 * c-common.h (clk_c): Update comment to reference C2X.
4748 (flag_isoc99, flag_isoc11): Update comments to reference future
4749 standard versions in general.
4750 (flag_isoc2x): Declare.
4751 * c-opts.c (set_std_c2x): New function.
4752 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4753 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4754 flag_isoc2x to 0.
4755 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4756
4757 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4758
4759 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4760 (std=iso9899:2018): Document C17 as published in 2018.
4761
4762 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4763
4764 PR c++/87364
4765 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4766
4767 2018-10-11 Will Wray <wjwray@gmail.com>
4768
4769 PR c++/87364
4770 * c-pretty-print.h (pp_c_type_cast): Prototype.
4771 (pp_c_integer_constant): Likewise.
4772 * c-pretty-print.c (pp_c_type_cast): No longer static.
4773 (pp_c_integer_constant): Likewise.
4774 (pp_c_enumeration_constant): Fix loop termination when finding
4775 name of constant. No longer returns a value. Call
4776 pp_c_integer_constant.
4777 (c_pretty_printer::constant): Update for changes to
4778 pp_c_enumeration_constant.
4779
4780 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4781
4782 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4783 for no_unique_address.
4784
4785 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4786
4787 * c-common.c (c_option_controlling_cpp_error): Rename to...
4788 (c_option_controlling_cpp_diagnostic): ...this, and convert
4789 "reason" from int to enum.
4790 (c_cpp_error): Rename to...
4791 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4792 * c-common.h (c_cpp_error): Rename to...
4793 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4794 * c-opts.c (c_common_init_options): Update for renaming.
4795
4796 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4797
4798 PR c/87286
4799 * c-common.c (vector_types_compatible_elements_p): Use
4800 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4801
4802 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4803
4804 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4805 to generate constructor destructor priority warning.
4806 * c.opt (-Wprio-ctor-dtor): New option.
4807
4808 2018-10-01 Jason Merrill <jason@redhat.com>
4809
4810 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4811
4812 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4813
4814 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4815 (dump_ada_node): Add const keyword.
4816
4817 2018-09-25 Martin Liska <mliska@suse.cz>
4818
4819 * c-common.c (c_common_truthvalue_conversion):
4820 Remove Pascal from documentation.
4821
4822 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4823
4824 * c-ada-spec.c: Include diagnostic.h.
4825 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4826
4827 2018-09-19 Marek Polacek <polacek@redhat.com>
4828
4829 * c.opt (Wclass-conversion): New.
4830
4831 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4832
4833 * c-format.c (range_label_for_format_type_mismatch::get_text):
4834 Update for new param.
4835
4836 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4837
4838 * c-format.c (format_warning_at_char): Update for introduction of
4839 format_string_diagnostic_t.
4840 (format_type_warning): Likewise.
4841
4842 2018-09-17 Martin Jambor <mjambor@suse.cz>
4843
4844 PR c/63886
4845 * c.opt (Wabsolute-value): New.
4846
4847 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4848
4849 * c-common.c (complete_flexible_array_elts): New helper function.
4850 * c-common.h (complete_flexible_array_elts): Declare.
4851
4852 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4853
4854 * c-common.c (braced_list_to_string): Remove eval parameter.
4855 Add some more checks. Always create zero-terminated STRING_CST.
4856 * c-common.h (braced_list_to_string): Adjust prototype.
4857
4858 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4859
4860 PR 87091
4861 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4862 to a tri-state.
4863 (maybe_suggest_missing_token_insertion): Likewise.
4864 (maybe_add_include_fixit): Add param "override_location". If set,
4865 and source-printing is enabled, then override the rich_location's
4866 primary location with that of the insertion point for the fix-it
4867 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4868 * c-common.h (extern void maybe_add_include_fixit): Add bool
4869 param.
4870 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4871 for conversion of show_caret_p to a tri-state.
4872 * c-warn.c (warn_for_restrict): Likewise.
4873 * known-headers.cc
4874 (suggest_missing_header::~suggest_missing_header): Update call to
4875 maybe_add_include_fixit to suggest overriding the location, as it
4876 is for a note.
4877
4878 2018-08-27 Martin Liska <mliska@suse.cz>
4879
4880 * c-common.c (check_function_restrict): Use new function
4881 fndecl_built_in_p and remove check for FUNCTION_DECL if
4882 possible.
4883 (check_builtin_function_arguments): Likewise.
4884 (reject_gcc_builtin): Likewise.
4885 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4886
4887 2018-08-26 Marek Polacek <polacek@redhat.com>
4888
4889 PR c++/87029, Implement -Wredundant-move.
4890 * c.opt (Wredundant-move): New option.
4891
4892 2018-08-21 Marek Polacek <polacek@redhat.com>
4893
4894 PR c++/86981, Implement -Wpessimizing-move.
4895 * c.opt (Wpessimizing-move): New option.
4896
4897 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4898
4899 PR other/84889
4900 * c-attribs.c (common_handle_aligned_attribute): Add
4901 auto_diagnostic_group instance.
4902 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4903 * c-opts.c (c_common_post_options): Likewise.
4904 * c-warn.c (warn_logical_not_parentheses): Likewise.
4905 (warn_duplicated_cond_add_or_warn): Likewise.
4906 (warn_for_multistatement_macros): Likewise.
4907
4908 2018-08-20 Nathan Sidwell <nathan@acm.org>
4909
4910 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4911 access.
4912
4913 2018-08-17 Nathan Sidwell <nathan@acm.org>
4914
4915 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4916 field.
4917 (laxy_hex_fp_value_count): Make unsigned.
4918 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4919 manipulate the macro.
4920 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4921 cpp_define_lazily.
4922
4923 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4924
4925 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4926 (gcc_dump_printf_length_specs): New.
4927 (gcc_dump_printf_flag_pairs): New.
4928 (gcc_dump_printf_flag_specs): New.
4929 (gcc_dump_printf_char_table): New.
4930 (format_types_orig): Add entry for "gcc_dump_printf".
4931 (init_dynamic_diag_info): Set up length_char_specs and
4932 conversion_specs for gcc_dump_printf_format_type.
4933 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4934
4935 2018-08-17 Nathan Sidwell <nathan@acm.org>
4936
4937 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4938
4939 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4940 * c-cppbuiltin.c: Likewise.
4941
4942 2018-08-17 Martin Liska <mliska@suse.cz>
4943
4944 * c.opt: Remove Warn, Init and Report for options with
4945 Ignore/Deprecated flag. Warning is done automatically for
4946 Deprecated flags.
4947
4948 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4949
4950 PR c++/70693
4951 * c-common.c (selftest::c_family_tests): Call
4952 selftest::c_indentation_c_tests.
4953 * c-common.h (selftest::c_indentation_c_tests): New decl.
4954 * c-indentation.c: Include "selftest.h".
4955 (next_tab_stop): Add "tab_width" param, rather than accessing
4956 cpp_opts.
4957 (get_visual_column): Likewise. Clarify comment. Bulletproof
4958 against reading past the end of the line.
4959 (get_first_nws_vis_column): Add "tab_width" param.
4960 (detect_intervening_unindent): Likewise.
4961 (should_warn_for_misleading_indentation): Read tab width from
4962 cpp_opts and pass around.
4963 (selftest::test_next_tab_stop): New test.
4964 (selftest::assert_get_visual_column_succeeds): New function.
4965 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4966 (selftest::assert_get_visual_column_fails): New function.
4967 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4968 (selftest::test_get_visual_column): New test.
4969 (selftest::c_indentation_c_tests): New function.
4970
4971 2018-08-16 Nathan Sidwell <nathan@acm.org>
4972
4973 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4974 (store_ada_macro): Likewise.
4975 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4976 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4977
4978 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4979
4980 * c-format.c: Include "selftest-diagnostic.h" and
4981 "gcc-rich-location.h".
4982 (format_warning_at_char): Pass NULL for new label params of
4983 format_warning_va.
4984 (class indirection_suffix): New class.
4985 (class range_label_for_format_type_mismatch): New class.
4986 (format_type_warning): Move logic for generating "*" suffix to
4987 class indirection_suffix. Create "fmt_label" and "param_label"
4988 to show their types, and pass them to the
4989 format_warning_at_substring calls.
4990 (selftest::test_type_mismatch_range_labels): New test.
4991 (selftest::c_format_c_tests): Call it.
4992
4993 2018-08-13 Martin Sebor <msebor@redhat.com>
4994
4995 PR tree-optimization/71625
4996 * c-common.c (braced_list_to_string): New function.
4997 * c-common.h (braced_list_to_string): Declare it.
4998
4999 2018-08-08 Nathan Sidwell <nathan@acm.org>
5000
5001 * c-common.c (try_to_locate_new_include_inertion_point): Use
5002 linemap_included_from_linemap.
5003 * c-lex.c (fe_file_change): Use linemap_included_from.
5004 * c-ppoutput.c (pp_file_change): Likewise.
5005
5006 2018-08-01 Martin Sebor <msebor@redhat.com>
5007
5008 PR tree-optimization/86650
5009 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
5010 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
5011 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
5012 * c-format.h (T89_G): Update to be "gimple *" rather than
5013 "gcall *".
5014 (local_gcall_ptr_node): Rename...
5015 (local_gimple_ptr_node): ...to this.
5016
5017 2018-07-31 David Malcolm <dmalcolm@redhat.com>
5018
5019 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
5020 table entries for gcc_diag_char_table, and the 'Z' entry from
5021 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
5022 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
5023 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
5024 adding missing "Z" for this table. Remove erroneous "G" and "K"
5025 entries.
5026 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5027 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
5028 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5029
5030 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5031
5032 * c-common.c (speculation_safe_resolve_call): New function.
5033 (speculation_safe_resolve_params): New function.
5034 (speculation_safe_resolve_return): New function.
5035 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
5036 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
5037 __HAVE_SPECULATION_SAFE_VALUE.
5038
5039 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5040
5041 * c-common.c (c_cpp_error): Remove redundant "line_table"
5042 parameter from call to rich_location::set_range.
5043 (maybe_suggest_missing_token_insertion): Likewise.
5044
5045 2018-07-20 Martin Sebor <msebor@redhat.com>
5046
5047 PR middle-end/82063
5048 * c.opt (-Warray-bounds): Remove redundant -Wall.
5049
5050 2018-07-20 Martin Sebor <msebor@redhat.com>
5051
5052 PR middle-end/82063
5053 * c-common.h (c_common_handle_option): Change function argument
5054 to HOST_WIDE_INT.
5055 * c-opts.c (c_common_init_options): Same.
5056 (c_common_handle_option): Same. Remove special handling of
5057 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
5058 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
5059 options to take a HOST_WIDE_INT argument and accept a byte-size
5060 suffix. Initialize.
5061 (-Wvla-larger-than): Same.
5062 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
5063 (-Wno-vla-larger-than): Same.
5064
5065 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5066
5067 * c-attribs.c (c_common_attribute_table): Add
5068 "omp declare target implicit" attribute.
5069
5070 2018-07-12 Richard Biener <rguenther@suse.de>
5071
5072 PR c/86453
5073 * c-attribs.c (handle_packed_attribute): Do not build a variant
5074 type with TYPE_PACKED, instead ignore the attribute if we may
5075 not apply to the original type.
5076
5077 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5078
5079 PR c++/86443
5080 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
5081 to contain TREE_LIST for both the original class iterator and the
5082 "last" helper var.
5083
5084 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
5085
5086 * c-ada-spec.c (to_ada_name): Remove index parameter.
5087 (pp_ada_tree_identifier): Likewise.
5088 (dump_ada_macros): Adjust call to to_ada_name.
5089 (struct overloaded_name_hash): Delete.
5090 (struct overloaded_name_hasher): Likewise.
5091 (overloaded_names): Likewise.
5092 (compute_overloading_index): Likewise.
5093 (dump_ada_decl_name): Do not call compute_overloading_index and
5094 adjust calls to pp_ada_tree_identifier.
5095 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5096 (dump_ada_import): Add spc parameter and switch to aspect syntax.
5097 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
5098 (dump_ada_enum_type): Remove type and display_convention parameters.
5099 Adjust calls to pp_ada_tree_identifier.
5100 (dump_ada_node): Likewise and for dump_ada_structure.
5101 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
5102 and tidy up.
5103 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5104 syntax.
5105 (print_constructor): Adjust call to pp_ada_tree_identifier.
5106 (print_destructor): Likewise.
5107 (dump_ada_declaration): Switch to aspect syntax.
5108 (dump_ada_structure): Likewise and tidy up. Replace display_convention
5109 parameter with nested parameter.
5110 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5111 (dump_ada_specs): Do not delete overloaded_names table.
5112
5113 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5114
5115 PR target/86324
5116 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
5117 target hook.
5118
5119 2018-07-05 Nathan Sidwell <nathan@acm.org>
5120
5121 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5122 NO_IMPLICIT_EXTERN_C.
5123
5124 2018-06-28 Martin Liska <mliska@suse.cz>
5125
5126 * cppspec.c: Include opt-suggestions.h.
5127
5128 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5129 Thomas Schwinge <thomas@codesourcery.com>
5130 Cesar Philippidis <cesar@codesourcery.com>
5131
5132 * c-pragma.h (enum pragma_omp_clause): Add
5133 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5134 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5135
5136 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5137
5138 PR c++/86210
5139 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5140 comment.
5141
5142 2018-06-18 Martin Sebor <msebor@redhat.com>
5143
5144 PR middle-end/85602
5145 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5146 nonstring.
5147
5148 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5149
5150 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5151
5152 2018-06-13 Jason Merrill <jason@redhat.com>
5153
5154 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5155 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5156 handling.
5157
5158 PR c++/86094 - wrong code with defaulted move ctor.
5159 * c-opts.c (c_common_post_options): Bump the current ABI version to
5160 13. Set warn_abi_version and flag_abi_compat_version to the current
5161 version rather than 0. Fix defaulting flag_abi_compat_version from
5162 warn_abi_version.
5163
5164 2018-06-12 Martin Sebor <msebor@redhat.com>
5165
5166 PR c/85931
5167 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5168 sizeof source and destination yields the same value.
5169
5170 2018-06-12 Martin Liska <mliska@suse.cz>
5171
5172 * c.opt: Make MPX-related options as Deprecated.
5173
5174 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5175
5176 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5177 rather than 0.
5178
5179 2018-06-08 Martin Liska <mliska@suse.cz>
5180
5181 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5182 for MPX (macros, related functions, fields in cgraph_node, ...).
5183 (handle_bnd_legacy): Likewise.
5184 (handle_bnd_instrument): Likewise.
5185 * c.opt: Likewise.
5186
5187 2018-06-06 Jakub Jelinek <jakub@redhat.com>
5188
5189 PR c++/86068
5190 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5191 __cpp_transactional_memory to 201500 instead of 210500.
5192
5193 2018-06-06 Jason Merrill <jason@redhat.com>
5194
5195 PR c++/85710 - ICE with -Wmemset-elt-size.
5196 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5197
5198 2018-06-01 Jason Merrill <jason@redhat.com>
5199
5200 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5201 201703.
5202
5203 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5204
5205 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5206 declaration for a typedef independently of whether the declaration of
5207 the subtype is generated.
5208
5209 2018-05-31 Martin Sebor <msebor@redhat.com>
5210
5211 PR c/82063
5212 * c.opt (-Wno-alloc-size-larger-than): New option.
5213
5214 2018-04-22 David Pagan <dave.pagan@oracle.com>
5215
5216 PR c/55976
5217 * c-opts.c (c_common_post_options): Set default for warn_return_type
5218 for C++/C++ with ObjC extensions only. For C, makes it possible to
5219 differentiate between default (no option), -Wreturn-type, and
5220 -Wno-return-type.
5221
5222 2018-05-29 Jason Merrill <jason@redhat.com>
5223
5224 * c.opt (Winit-list-lifetime): New flag.
5225
5226 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5227
5228 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5229 splay_tree_delete_pointers.
5230
5231 2018-05-26 Jakub Jelinek <jakub@redhat.com>
5232
5233 PR bootstrap/85921
5234 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5235 noinline variable to workaround broken kernel headers.
5236
5237 2018-05-18 Jason Merrill <jason@redhat.com>
5238
5239 * c.opt (Wdeprecated-copy): New flag.
5240
5241 2018-05-17 Martin Liska <mliska@suse.cz>
5242
5243 * c-warn.c (overflow_warning): Do not use
5244 space in between 'G_' and '('.
5245
5246 2018-05-09 Jason Merrill <jason@redhat.com>
5247
5248 * c-common.c (valid_array_size_p): Add complain parameter.
5249 * c-common.h: ...which defaults to true.
5250
5251 2018-05-11 Jakub Jelinek <jakub@redhat.com>
5252
5253 PR c/85696
5254 * c-omp.c (c_omp_predetermined_sharing): Return
5255 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5256
5257 2018-05-11 Martin Liska <mliska@suse.cz>
5258
5259 PR sanitizer/85556
5260 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5261 TREE_LIST values.
5262
5263 2018-05-10 Jakub Jelinek <jakub@redhat.com>
5264
5265 PR c++/85662
5266 * c-common.h (fold_offsetof_1): Removed.
5267 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5268 CTX argument defaulted to ERROR_MARK.
5269 * c-common.c (fold_offsetof_1): Renamed to ...
5270 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5271 argument, convert the pointer constant to TYPE and use size_binop
5272 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5273 a pointer type. Adjust recursive calls.
5274
5275 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5276
5277 PR c++/85400
5278 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5279
5280 2018-05-07 Nathan Sidwell <nathan@acm.org>
5281
5282 * c.opt (ffor-scope): Remove functionality, issue warning.
5283
5284 2018-05-03 Nathan Sidwell <nathan@acm.org>
5285
5286 * c.opt (ffriend-injection): Remove functionality, issue warning.
5287
5288 2018-05-01 David Malcolm <dmalcolm@redhat.com>
5289
5290 PR c/84258
5291 * c-format.c (struct format_check_results): Add field
5292 "number_non_char".
5293 (check_format_info): Initialize it, and warn if encountered.
5294 (check_format_arg): Distinguish between wide char and
5295 everything else when detecting arrays of non-char.
5296
5297 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5298
5299 * c-format.c (get_corrected_substring): Update for
5300 location_get_source_line returning a char_span. Use a char_span
5301 when handling the prefix of the correction.
5302 * c-indentation.c (get_visual_column): Update for
5303 location_get_source_line returning a char_span.
5304 (get_first_nws_vis_column): Likewise.
5305
5306 2018-03-29 David Malcolm <dmalcolm@redhat.com>
5307
5308 PR c++/84269
5309 * known-headers.cc (get_stdlib_header_for_name): Add various names
5310 from <assert.h>, <string.h>, and <memory.h>; add more names from
5311 <stdio.h>.
5312
5313 2018-03-27 Jakub Jelinek <jakub@redhat.com>
5314
5315 PR c++/85061
5316 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5317 get_base_address of the second operand is a VAR_P, rather than the
5318 operand itself, and use gcc_checking_assert instead of gcc_assert.
5319
5320 2018-03-23 Marek Polacek <polacek@redhat.com>
5321
5322 PR c++/85045
5323 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5324 <case RDIV_EXPR>: Tweak condition.
5325
5326 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5327
5328 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5329
5330 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5331
5332 PR c/84909
5333 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5334 diagnostics.
5335
5336 PR c/84910
5337 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5338 diagnostics.
5339
5340 2018-03-16 Richard Biener <rguenther@suse.de>
5341
5342 PR c/84873
5343 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5344 unshare the possibly folded expression.
5345
5346 2018-03-15 Richard Biener <rguenther@suse.de>
5347
5348 PR c/84873
5349 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5350
5351 2018-03-13 Martin Sebor <msebor@redhat.com>
5352
5353 PR tree-optimization/84725
5354 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5355 with all three narrow character types, including their qualified forms.
5356
5357 2018-03-12 Martin Sebor <msebor@redhat.com>
5358
5359 PR tree-optimization/83456
5360 * c-common.c (check_function_restrict): Return bool.
5361 Restore checking of bounded built-in functions.
5362 (check_function_arguments): Also return the result
5363 of warn_for_restrict.
5364 * c-common.c (check_function_restrict): Return bool.
5365 * c-warn.c (warn_for_restrict): Return bool.
5366
5367 2018-03-02 Marek Polacek <polacek@redhat.com>
5368
5369 PR c++/84171
5370 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5371 is erroneous.
5372
5373 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5374
5375 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5376 function".
5377
5378 2018-03-01 Marek Polacek <polacek@redhat.com>
5379
5380 PR c++/84639
5381 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5382 alignment in computation.
5383
5384 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5385
5386 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5387 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5388
5389 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5390
5391 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5392 (is_char_array): Take a type instead of a declaration.
5393 (dump_ada_array_type): Likewise.
5394 (is_simple_enum): Minor tweak.
5395 (dump_ada_enum_type): New function extracted from...
5396 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5397 <INTEGER_TYPE>: Remove unreachable code.
5398 <RECORD_TYPE>: Likewise. Minor tweaks.
5399 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5400 <ENUMERAL_TYPE>: New case.
5401 <RECORD_TYPE>: Factor out common code.
5402 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5403 Minor tweaks. Deal with enumeral types.
5404 (dump_ada_structure): Minor tweaks.
5405
5406 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5407
5408 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5409 address for incomplete structures.
5410 (dump_forward_type): Do not bail out for incomplete structures.
5411 (dump_ada_declaration): Do not special-case incomplete structures
5412 for subtypes. Dump them as null records for types.
5413
5414 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5415
5416 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5417 (is_char_array): Fix formatting.
5418 (dump_template_types): Likewise.
5419 (dump_generic_ada_node): Rename into...
5420 (dump_ada_node): ...this.
5421 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5422 incomplete structures and not for empty structures. Do not use it
5423 when forward declarations are needed.
5424 (dump_forward_type): New function.
5425 (dump_nested_types): Remove FORWARD parameter. Do not consider
5426 TREE_VISITED and do not generate a forward declaration. Only dump
5427 original nested types for nested declaration.
5428 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5429 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5430 <RECORD_TYPE>: Do not consider TREE_VISITED.
5431 (dump_ada_declaration): Use booleans and fix formatting throughout.
5432 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5433 Call dump_forward_type instead of dump_nested_types for a typedef.
5434 Remove superfluous check and adjust call to dump_nested_types.
5435 <POINTER_TYPE>: Call dump_forward_type and fall through.
5436 (dump_ada_struct_decl): Rename into...
5437 (dump_ada_structure): ...this. Do not special-case empty structures.
5438
5439 2018-02-27 Martin Sebor <msebor@redhat.com>
5440
5441 PR c++/83871
5442 * c.opt (-Wmissing-attributes): New option.
5443
5444 2018-02-21 Martin Liska <mliska@suse.cz>
5445
5446 * c.opt (Wcatch-value=): Add IntegerRange.
5447
5448 2018-02-15 Jason Merrill <jason@redhat.com>
5449
5450 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5451
5452 2018-02-09 Nathan Sidwell <nathan@acm.org>
5453
5454 PR c/84293
5455 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5456 arg.
5457 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5458 arg. Adjust.
5459
5460 2018-02-09 Martin Sebor <msebor@redhat.com>
5461
5462 PR lto/84212
5463 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5464 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5465 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5466 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5467 (-Wuninitialized): Same.
5468
5469 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5470
5471 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5472 keyword for components.
5473
5474 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5475
5476 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5477
5478 2018-02-02 Julia Koval <julia.koval@intel.com>
5479
5480 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5481
5482 2018-01-29 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/83966
5485 * c-format.c (check_function_format): Check current_function_decl.
5486
5487 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5488
5489 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5490 argument.
5491 (LAZY_HEX_FP_VALUES_CNT): Define.
5492 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5493 values rather than just 12.
5494 (builtin_define_with_hex_fp_value): Likewise.
5495
5496 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5497
5498 PR other/70268
5499 * c.opt (-fmacro-prefix-map): New option.
5500 * c-opts.c (c_common_handle_option): Handle it.
5501 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5502 * c-ppoutput.c (init_pp_output): Likewise.
5503
5504 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5505
5506 PR c++/83814
5507 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5508
5509 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5510
5511 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5512 Skip 'f' and 'F' characters if it is true.
5513 (store_ada_macro): Minor tweak.
5514 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5515 <CPP_WSTRING>: Likewise.
5516 <CPP_STRING>: Output '&' in the buffer if not the first string.
5517 <CPP_NUMBER>: Adjust calls to dump_number.
5518
5519 2018-01-10 David Malcolm <dmalcolm@redhat.com>
5520
5521 PR c++/43486
5522 * c-common.c: Include "selftest.h".
5523 (get_atomic_generic_size): Perform the test for integral type
5524 before the range test for any integer constant, fixing indentation
5525 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5526 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5527 (selftest::test_fold_for_warn): New function.
5528 (selftest::c_common_c_tests): New function.
5529 (selftest::c_family_tests): Call it, and
5530 selftest::c_pretty_print_c_tests.
5531 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5532 * c-format.c (check_format_arg): Convert VAR_P check to a
5533 fold_for_warn.
5534 * c-pretty-print.c: Include "selftest.h".
5535 (pp_c_cast_expression): Don't print casts for location wrappers.
5536 (selftest::assert_c_pretty_printer_output): New function.
5537 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5538 (selftest::test_location_wrappers): New function.
5539 (selftest::c_pretty_print_c_tests): New function.
5540 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5541
5542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5543 Alan Hayward <alan.hayward@arm.com>
5544 David Sherwood <david.sherwood@arm.com>
5545
5546 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5547
5548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5549 Alan Hayward <alan.hayward@arm.com>
5550 David Sherwood <david.sherwood@arm.com>
5551
5552 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5553 as polynomial.
5554
5555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5556 Alan Hayward <alan.hayward@arm.com>
5557 David Sherwood <david.sherwood@arm.com>
5558
5559 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5560 (convert_vector_to_array_for_subscript): Handle polynomial
5561 TYPE_VECTOR_SUBPARTS.
5562 (c_common_type_for_mode): Check valid_vector_subparts_p.
5563 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5564 VECTOR_CST_NELTS.
5565
5566 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5567
5568 Update copyright years.
5569
5570 2017-12-22 Mike Stump <mikestump@comcast.net>
5571 Eric Botcazou <ebotcazou@adacore.com>
5572
5573 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5574 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5575
5576 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5577
5578 PR debug/83527
5579 PR debug/83419
5580 * c-semantics.c (only_debug_stmts_after_p): New.
5581 (pop_stmt_list): Clear side effects in debug-only stmt list.
5582 Check for single nondebug stmt followed by debug stmts only.
5583
5584 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5585
5586 PR debug/83419
5587 * c-semantics.c (pop_stmt_list): Propagate side effects from
5588 single nondebug stmt to container list.
5589
5590 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5591
5592 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5593 conditions with typical order conditions.
5594
5595 2017-12-18 Marek Polacek <polacek@redhat.com>
5596
5597 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5598 not in effect.
5599
5600 2017-12-17 Martin Sebor <msebor@redhat.com>
5601
5602 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5603 an error for attribute warn_if_not_aligned.
5604
5605 2017-12-16 Martin Sebor <msebor@redhat.com>
5606
5607 PR tree-optimization/78918
5608 * c-common.c (check_function_restrict): Avoid checking built-ins.
5609 * c.opt (-Wrestrict): Include in -Wall.
5610
5611 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5612
5613 * c-attribs.c (c_common_attribute_table,
5614 c_common_format_attribute_table): Swap affects_type_identity
5615 and handler fields, adjust comments.
5616
5617 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5618
5619 * c.opt (Wcast-function-type): New warning option.
5620 * c-lex.c (get_fileinfo): Avoid warning.
5621 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5622
5623 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5624
5625 PR middle_end/79538
5626 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5627 Adjust the size of buf1 and buf2, add a new buf to avoid
5628 format-overflow warning.
5629
5630 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5631
5632 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5633 subsequent statement list.
5634
5635 2017-12-07 Martin Sebor <msebor@redhat.com>
5636
5637 PR c/81544
5638 PR c/81566
5639 * c-attribs.c (attr_aligned_exclusions): New array.
5640 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5641 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5642 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5643 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5644 (attr_warn_unused_result_exclusions): Same.
5645 (handle_hot_attribute, handle_cold_attribute): Simplify.
5646 (handle_const_attribute): Warn on function returning void.
5647 (handle_pure_attribute): Same.
5648 (handle_aligned_attribute): Diagnose conflicting attribute
5649 specifications.
5650 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5651
5652 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5653
5654 PR c/83236
5655 * c-common.c (selftest::c_family_tests): Call
5656 selftest::c_spellcheck_cc_tests.
5657 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5658 * c-spellcheck.cc: Include "selftest.h".
5659 (name_reserved_for_implementation_p): New function.
5660 (should_suggest_as_macro_p): New function.
5661 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5662 should_suggest_as_macro_p and call it.
5663 (selftest::test_name_reserved_for_implementation_p): New function.
5664 (selftest::c_spellcheck_cc_tests): New function.
5665 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5666
5667 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5668
5669 * c-spellcheck.cc: New file, taken from macro-handling code in
5670 spellcheck-tree.c.
5671 * c-spellcheck.h: New file, taken from macro-handling code in
5672 spellcheck-tree.h.
5673
5674 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5675
5676 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5677 attribute.
5678 (handle_simd_attribute): Don't check for "cilk simd function"
5679 attribute. Reindent, formatting changes.
5680
5681 2017-11-30 Julia Koval <julia.koval@intel.com>
5682
5683 * c-common.h (inv_list): Remove.
5684
5685 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5686
5687 PR sanitizer/81275
5688 * c-common.c (c_switch_covers_all_cases_p_1,
5689 c_switch_covers_all_cases_p): New functions.
5690 * c-common.h (c_switch_covers_all_cases_p): Declare.
5691
5692 2017-11-28 Julia Koval <julia.koval@intel.com>
5693 Sebastian Peryt <sebastian.peryt@intel.com>
5694
5695 * array-notation-common.c: Delete.
5696 * c-cilkplus.c: Ditto.
5697 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5698 * c-common.def (ARRAY_NOTATION_REF): Remove.
5699 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5700 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5701 c_validate_cilk_plus_loop, cilkplus_an_parts,
5702 cilk_ignorable_spawn_rhs_op,
5703 cilk_recognize_spawn): Remove.
5704 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5705 * c-omp.c: Remove CILK_SIMD check.
5706 * c-pragma.c: Ditto.
5707 * c-pragma.h: Remove CILK related pragmas.
5708 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5709 ARRAY_NOTATION_REF condition.
5710 (c_pretty_printer::expression): Ditto.
5711 * c.opt (fcilkplus): Remove.
5712 * cilk.c: Delete.
5713
5714 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5715
5716 * c-pretty-print.c (pp_c_additive_expression,
5717 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5718
5719 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5720
5721 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5722
5723 PR c++/83059
5724 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5725 instead of tree_to_uhwi, formatting fix.
5726
5727 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5728
5729 PR c/81404
5730 * known-headers.cc: New file, based on material from c/c-decl.c.
5731 (suggest_missing_header): Copied as-is.
5732 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5733 heavily edited to add C++ support. Add some knowledge about
5734 <limits.h>, <stdint.h>, and <wchar.h>.
5735 * known-headers.h: Likewise.
5736
5737 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5738
5739 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5740 (lookup_name_fuzzy): Likewise. Convert return type from
5741 const char * to name_hint. Add location_t param.
5742 * name-hint.h: New header.
5743
5744 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5745
5746 PR c/66618
5747 PR c/69960
5748 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5749
5750 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5751
5752 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5753 expected publication date of C17.
5754 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5755
5756 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5757
5758 PR c/81156
5759 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5760 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5761
5762 2017-11-10 Martin Sebor <msebor@redhat.com>
5763
5764 PR c/81117
5765 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5766 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5767 * c.opt (-Wstringop-truncation): New option.
5768
5769 2017-11-06 Martin Liska <mliska@suse.cz>
5770
5771 PR middle-end/82404
5772 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5773 FE.
5774 * c.opt: Set default value of warn_return_type.
5775
5776 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5777
5778 * c-common.c (binary_op_error): Update for renaming of
5779 error_at_rich_loc.
5780 (c_parse_error): Likewise.
5781 * c-warn.c (warn_logical_not_parentheses): Likewise for
5782 renaming of inform_at_rich_loc.
5783 (warn_for_restrict): Likewise for renaming of
5784 warning_at_rich_loc_n.
5785
5786 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5787
5788 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5789 * c-opts.c (set_std_c17): New function.
5790 (c_common_init_options): Use gnu17 as default C version.
5791 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5792
5793 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5794
5795 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5796 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5797 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5798 __FP_FAST_FMA<N>X.
5799
5800 2017-10-23 Marek Polacek <polacek@redhat.com>
5801
5802 PR c/82681
5803 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5804
5805 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5806
5807 * c-common.c (check_builtin_function_arguments): Also check arguments
5808 of __builtin_alloca_with_align_and_max.
5809
5810 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5811
5812 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5813 rather than NULL to format_warning_va.
5814 (check_format_types): Likewise when calling format_type_warning.
5815 Remove code to extract source_ranges and source_range * in favor
5816 of just a location_t.
5817 (format_type_warning): Convert source_range * param to a
5818 location_t.
5819
5820 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5821
5822 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5823 [LR]SHIFT_EXPR.
5824
5825 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5826
5827 * c-common.c (enum missing_token_insertion_kind): New enum.
5828 (get_missing_token_insertion_kind): New function.
5829 (maybe_suggest_missing_token_insertion): New function.
5830 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5831
5832 2017-10-11 Nathan Sidwell <nathan@acm.org>
5833
5834 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5835 (c_common_handle_option): Update incpath_kind names.
5836
5837 2017-10-11 Martin Liska <mliska@suse.cz>
5838
5839 PR sanitizer/82490
5840 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5841 Wattributes warning.
5842
5843 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5844
5845 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5846 operating on trees as wide_ints.
5847 * c-common.c (pointer_int_sum): Likewise.
5848 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5849 * c-warn.c (match_case_to_enum_1): Likewise.
5850 (c_do_switch_warnings): Likewise.
5851 (maybe_warn_shift_overflow): Likewise.
5852
5853 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5854
5855 PR c/82437
5856 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5857 instead of wide_int::from.
5858
5859 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5860
5861 PR c/82437
5862 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5863 using to_widest use wide_int with the larger of the two precisions.
5864
5865 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5866
5867 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5868 functions.
5869
5870 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5871
5872 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5873 when combining the original unconverted comparison operands.
5874
5875 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5876
5877 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5878 attribute.
5879
5880 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5881
5882 * c-ada-spec.c (to_ada_name): Add index parameter.
5883 (pp_ada_tree_identifier): Likewise.
5884 (dump_ada_macros): Adjust call to to_ada_name.
5885 (struct overloaded_name_hash): New type.
5886 (struct overloaded_name_hasher): Likewise.
5887 (overloaded_names): New hash table.
5888 (compute_overloading_index): New function.
5889 (dump_ada_decl_name): Call it and pass the result to
5890 pp_ada_tree_identifier.
5891 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5892 (dump_ada_function_declaration): Likewise.
5893 (dump_generic_ada_node): Likewise.
5894 (print_constructor): Likewise.
5895 (print_destructor): Likewise.
5896 (dump_ada_specs): Delete overloaded_names table.
5897
5898 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5899
5900 * c-ada-spec.c (max_ada_macros): Move around.
5901 (store_ada_macro_index): Likewise.
5902 (source_file): Rename into...
5903 (macro_source_file): ...this.
5904 (count_ada_macro): Move around.
5905 (store_ada_macro): Likewise.
5906 (compare_macro): Likewise.
5907 (print_ada_macros): Merge in...
5908 (dump_ada_macros): ...this.
5909 (source_file_base): Rename into...
5910 (current_source_file): ...this.
5911 (print_comment): Move around.
5912 (dump_ada_nodes): Call dump_ada_declaration directly.
5913 (struct with): Change type of limited field to bool.
5914 (append_withs): Change type of limited_access parameter to bool.
5915 (pp_ada_tree_identifie): Likewise.
5916 (dump_ada_decl_nam): Likewise.
5917 (dump_generic_ada_node): Likewise. Do not print the return type.
5918 (to_ada_name): Change type of space_found parameter to bool.
5919 (dump_ada_function_declaration): Return void and change type of
5920 parameters to bool. Also print the return type for a function.
5921 (print_ada_methods): Rename into...
5922 (dump_ada_methods): ...this.
5923 (print_ada_declaration): Rename into ...
5924 (dump_ada_declaration): ...this. Do not print the return type.
5925 (print_ada_struct_decl): Rename into...
5926 (dump_ada_struct_decl): ...this.
5927
5928 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5929
5930 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5931 rather than DECL_INITIAL.
5932 (common_handle_aligned_attribute): Likewise.
5933
5934 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5935
5936 * c.opt (gen-decls): Add RejectNegative.
5937
5938 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5939 Jakub Jelinek <jakub@redhat.com>
5940
5941 Add support for -std=c++2a.
5942 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5943 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5944 * c-opts.c (set_std_cxx2a): New.
5945 (c_common_handle_option): Set options when -std=c++2a is enabled.
5946 (c_common_post_options): Adjust comments.
5947 (set_std_cxx14, set_std_cxx17): Likewise.
5948
5949 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5950
5951 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5952 message for non-uniform endianness and issue a warning in C++.
5953
5954 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5955
5956 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5957 (Wc++17-compat): Change from undocumented alias to option.
5958 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5959 change C++1z to C++17 in description.
5960 (std=c++1z, std=gnu++1z): Change from option to undocumented
5961 deprecated alias.
5962 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5963 Adjust description.
5964 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5965 * c-opts.c (set_std_cxx1z): Rename to ...
5966 (set_std_cxx17): ... this.
5967 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5968 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5969 caller.
5970 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5971 comments.
5972
5973 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5974
5975 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5976 function alignment if warn_if_not_aligned_p is true.
5977
5978 2017-09-12 Nathan Sidwell <nathan@acm.org>
5979
5980 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5981 resort_sorted_fields): Move to c/c-decl.c.
5982 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5983 (struct sorted_fields_type): Move to c/c-lang.h.
5984
5985 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5986
5987 PR c++/81852
5988 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5989
5990 2017-09-04 Marek Polacek <polacek@redhat.com>
5991
5992 PR c/81783
5993 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5994 (warn_tautological_cmp): Call it.
5995
5996 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5997
5998 * c-opts.c (c_common_finish): Write dependency information even if
5999 there are errors.
6000
6001 2017-09-01 Jakub Jelinek <jakub@redhat.com>
6002
6003 PR c/81887
6004 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
6005 (omp_pragmas_simd): ... here.
6006 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
6007 create new clauses list containing just simd clause.
6008
6009 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6010 Alan Hayward <alan.hayward@arm.com>
6011 David Sherwood <david.sherwood@arm.com>
6012
6013 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6014 into scalar_mode_supported_p call.
6015 (handle_mode_attribute): Update call to scalar_mode_supported_p.
6016
6017 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6018 Alan Hayward <alan.hayward@arm.com>
6019 David Sherwood <david.sherwood@arm.com>
6020
6021 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
6022 for the mode iterator.
6023
6024 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6025 Alan Hayward <alan.hayward@arm.com>
6026 David Sherwood <david.sherwood@arm.com>
6027
6028 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
6029 * c-common.c (c_build_vec_perm_expr): Likewise.
6030
6031 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6032 Alan Hayward <alan.hayward@arm.com>
6033 David Sherwood <david.sherwood@arm.com>
6034
6035 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
6036
6037 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6038 Alan Hayward <alan.hayward@arm.com>
6039 David Sherwood <david.sherwood@arm.com>
6040
6041 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
6042 before calling targetm.addr_space.valid_pointer_mode.
6043
6044 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6045 Alan Hayward <alan.hayward@arm.com>
6046 David Sherwood <david.sherwood@arm.com>
6047
6048 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
6049
6050 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6051 Alan Hayward <alan.hayward@arm.com>
6052 David Sherwood <david.sherwood@arm.com>
6053
6054 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
6055 iterators.
6056 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6057
6058 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6059 Alan Hayward <alan.hayward@arm.com>
6060 David Sherwood <david.sherwood@arm.com>
6061
6062 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
6063 case statements.
6064
6065 2017-08-29 Martin Liska <mliska@suse.cz>
6066
6067 PR other/39851
6068 * c-common.c (parse_optimize_options): Add argument to function
6069 call.
6070 * c-pragma.c (handle_pragma_diagnostic): Likewise.
6071
6072 2017-08-24 David Malcolm <dmalcolm@redhat.com>
6073
6074 * c-lex.c (interpret_float): Use token location
6075 when building an EXCESS_PRECISION_EXPR.
6076
6077 2017-08-21 David Malcolm <dmalcolm@redhat.com>
6078
6079 * c-common.c (check_function_arguments): Add "arglogs" param; pass
6080 it to check_function_format.
6081 * c-common.h (check_function_arguments): Add vec<location_t> *
6082 param.
6083 (check_function_format): Likewise.
6084 * c-format.c (struct format_check_context): Add field "arglocs".
6085 (check_function_format): Add param "arglocs"; pass it to
6086 check_format_info.
6087 (check_format_info): Add param "arglocs"; use it to initialize
6088 new field of format_ctx.
6089 (check_format_arg): Pass format_ctx->arglocs to new param of
6090 check_format_info_main.
6091 (class argument_parser): New field "arglocs".
6092 (argument_parser::argument_parser): Add "arglocs_" param and use
6093 it to initialize new field.
6094 (argument_parser::check_argument_type): Pass new arglocs field to
6095 check_format_types.
6096 (check_format_info_main): Add param "arglocs", and use it when
6097 constructing arg_parser.
6098 (check_format_types): Add param "arglocs"; use it if non-NULL when
6099 !EXPR_HAS_LOCATION (cur_param) to get at location information.
6100
6101 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
6102
6103 PR c/53037
6104 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6105 (c_common_attribute_table): Add warn_if_not_aligned.
6106 (handle_aligned_attribute): Renamed to ...
6107 (common_handle_aligned_attribute): Remove argument, name, and add
6108 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
6109 (handle_aligned_attribute): New.
6110 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6111
6112 2017-08-14 Martin Sebor <msebor@redhat.com>
6113
6114 PR c/81117
6115 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6116 (handle_nonstring_attribute): New function.
6117
6118 2017-08-14 Martin Sebor <msebor@redhat.com>
6119
6120 PR c/81117
6121 * c-format.h (T89_G): New macro.
6122 * c-format.c (local_gcall_ptr_node): New variable.
6123 (init_dynamic_diag_info): Initialize it.
6124
6125 2017-08-11 Martin Liska <mliska@suse.cz>
6126
6127 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6128 TARGET_SUPPORTS_ALIASES.
6129
6130 2017-08-10 David Malcolm <dmalcolm@redhat.com>
6131
6132 * c-common.c (c_parse_error): Add rich_location * param, using it
6133 rather implicitly using input_location.
6134 * c-common.h (c_parse_error): Add rich_location * param.
6135
6136 2017-08-09 Marek Polacek <polacek@redhat.com>
6137
6138 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6139 (c_common_truthvalue_conversion): Likewise.
6140 * c-omp.c (c_finish_omp_atomic): Likewise.
6141 * c-common.h (build_binary_op): Update declaration.
6142
6143 2017-08-08 Martin Liska <mliska@suse.cz>
6144
6145 * c-ada-spec.c: Include header files.
6146 * c-ubsan.c: Likewise.
6147 * c-warn.c: Likewise.
6148
6149 2017-08-07 Jakub Jelinek <jakub@redhat.com>
6150
6151 PR c/69389
6152 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6153
6154 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6155
6156 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6157 (print_ada_methods): Likewise.
6158 (print_ada_declaration): Likewise.
6159
6160 2017-08-07 Martin Liska <mliska@suse.cz>
6161
6162 * array-notation-common.c: Add new includes.
6163 * c-format.c( handle_format_attribute): Canonicalize a format
6164 function name.
6165 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6166 attribute.
6167 * c-pretty-print.c: Add new include.
6168
6169 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6170
6171 * c-ada-spec.c (has_static_fields): Look only into variables.
6172 (print_constructor): Add TYPE parameter and use it for the name.
6173 (print_destructor): Likewise.
6174 (print_ada_declaration): Adjust to new constructor/destructor names.
6175 Adjust calls to print_constructor and print_destructor.
6176 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6177 Look only into variables in the final loop.
6178
6179 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6180
6181 * c-ada-spec.c (has_static_fields): Look only into fields.
6182 (dump_generic_ada_node): Small tweak.
6183 (dump_nested_types): Look only into fields.
6184 (print_ada_declaration): Look only into methods. Small tweak.
6185 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6186
6187 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6188
6189 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6190 (dump_ada_function_declaration): Likewise.
6191 (dump_generic_ada_node): Likewise.
6192 (print_ada_declaration): Add support for const-qualified variables.
6193
6194 2017-07-31 Martin Liska <mliska@suse.cz>
6195
6196 PR sanitize/81530
6197 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6198 Guard condition with flag_sanitize_p also with current_function_decl
6199 non-null equality.
6200 (ubsan_maybe_instrument_reference_or_call): Likewise.
6201
6202 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
6203
6204 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6205
6206 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6207
6208 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6209 for enumeral types.
6210 (print_ada_declaration): Add missing guard for record types.
6211
6212 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6213
6214 PR c/45784
6215 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6216 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6217 new COMPOUND_EXPRs around the rhs of the comparison.
6218
6219 2017-07-27 Marek Polacek <polacek@redhat.com>
6220
6221 PR c/81417
6222 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6223 the types.
6224
6225 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6226
6227 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6228 (handle_noipa_attribute): New function.
6229
6230 2017-07-07 Torsten Duwe <duwe@suse.de>
6231
6232 * c-attribs.c (c_common_attribute_table): Add entry for
6233 "patchable_function_entry".
6234
6235 2017-07-20 Nathan Sidwell <nathan@acm.org>
6236
6237 Remove TYPE_METHODS.
6238 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6239 dump_ada_template, print_ada_methods,
6240 print_ada_declaration): Member fns are on TYPE_FIELDS.
6241
6242 2017-07-18 Nathan Sidwell <nathan@acm.org>
6243
6244 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6245
6246 2017-07-14 David Malcolm <dmalcolm@redhat.com>
6247
6248 * c-common.c (try_to_locate_new_include_insertion_point): New
6249 function.
6250 (per_file_includes_t): New typedef.
6251 (added_includes_t): New typedef.
6252 (added_includes): New variable.
6253 (maybe_add_include_fixit): New function.
6254 * c-common.h (maybe_add_include_fixit): New decl.
6255
6256 2017-07-10 Martin Sebor <msebor@redhat.com>
6257
6258 PR other/81345
6259 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6260
6261 2017-07-06 David Malcolm <dmalcolm@redhat.com>
6262
6263 * c-common.c (selftest::c_family_tests): New.
6264 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6265 (selftest::c_family_tests): New decl.
6266
6267 2017-07-04 Marek Polacek <polacek@redhat.com>
6268
6269 PR c/81231
6270 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6271 types.
6272
6273 2017-07-04 Marek Polacek <polacek@redhat.com>
6274
6275 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6276
6277 2017-06-28 Martin Liska <mliska@suse.cz>
6278
6279 PR ipa/81128
6280 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6281 to a function declaration.
6282
6283 2017-06-28 Martin Liska <mliska@suse.cz>
6284
6285 PR driver/79659
6286 * c.opt: Add IntegerRange to various options.
6287
6288 2017-06-26 Marek Polacek <polacek@redhat.com>
6289
6290 PR c/80116
6291 * c-common.h (warn_for_multistatement_macros): Declare.
6292 * c-warn.c: Include "c-family/c-indentation.h".
6293 (warn_for_multistatement_macros): New function.
6294 * c.opt (Wmultistatement-macros): New option.
6295 * c-indentation.c (guard_tinfo_to_string): No longer static.
6296 Change the parameter type to "enum rid". Handle RID_SWITCH.
6297 * c-indentation.h (guard_tinfo_to_string): Declare.
6298
6299 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
6300
6301 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6302
6303 2017-06-15 Martin Sebor <msebor@redhat.com>
6304
6305 PR c++/80560
6306 * c.opt (-Wclass-memaccess): New option.
6307
6308 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6309
6310 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6311
6312 2017-06-13 Marek Polacek <polacek@redhat.com>
6313
6314 PR objc/80949
6315 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6316 branches is null.
6317
6318 2017-06-13 Martin Liska <mliska@suse.cz>
6319
6320 PR sanitize/78204
6321 * c-attribs.c (add_no_sanitize_value): New function.
6322 (handle_no_sanitize_attribute): Likewise.
6323 (handle_no_sanitize_address_attribute): Use the function.
6324 (handle_no_sanitize_thread_attribute): New function.
6325 (handle_no_address_safety_analysis_attribute): Use
6326 add_no_sanitize_value.
6327 (handle_no_sanitize_undefined_attribute): Likewise.
6328 * c-common.h: Declare new functions.
6329 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6330 (ubsan_instrument_shift): Likewise.
6331 (ubsan_instrument_bounds): Likewise.
6332 (ubsan_maybe_instrument_array_ref): Likewise.
6333 (ubsan_maybe_instrument_reference_or_call): Likewise.
6334
6335 2017-06-11 Jason Merrill <jason@redhat.com>
6336
6337 * c-ada-spec.c, c-pragma.c: Use id_equal.
6338
6339 2017-06-04 Marek Polacek <polacek@redhat.com>
6340
6341 PR c/80919
6342 * c-format.c (matching_type_p): Return false if any of the types
6343 requires structural equality.
6344
6345 2017-06-02 Martin Sebor <msebor@redhat.com>
6346
6347 PR c/80892
6348 * c-warn.c (conversion_warning): Use -Wconversion for integer
6349 conversion and -Wfloat-conversion for floating one.
6350
6351 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6352
6353 * c.opt (Wsizeof-pointer-div): New warning option.
6354
6355 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6356
6357 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6358 (Wcatch-value=1): Enable by -Wall.
6359
6360 2017-05-30 David Malcolm <dmalcolm@redhat.com>
6361
6362 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6363 format_chars.
6364 * c.opt (fdiagnostics-show-template-tree): New option.
6365 (felide-type): New option.
6366
6367 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6368
6369 * c.opt (Wcatch-value=): New C++ warning flag.
6370
6371 2017-05-24 Nathan Sidwell <nathan@acm.org>
6372
6373 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6374 const casts to avoid warning.
6375
6376 2017-05-24 Martin Sebor <msebor@redhat.com>
6377
6378 PR c/80731
6379 * c-common.h (unsafe_conversion_p): Add a function argument.
6380 * c-common.c (unsafe_conversion_p): Same.
6381 Add type names and values to diagnostics.
6382 (scalar_to_vector): Adjust.
6383 * c-warn.c (constant_expression_error): Add a function argument.
6384 Add type names and values to diagnostics.
6385 (conversion_warning): Add a function argument.
6386 Add type names and values to diagnostics.
6387 (warnings_for_convert_and_check): Same.
6388
6389 2017-05-19 Jason Merrill <jason@redhat.com>
6390
6391 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6392 enumerators.
6393
6394 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6395
6396 * c-format.c (locus): Move out of function scope,
6397 add GTY attribute.
6398
6399 2017-05-19 Nathan Sidwell <nathan@acm.org>
6400
6401 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6402 (c_common_parse_file): Remove class dump handling.
6403 (get_dump_info): Likewise.
6404
6405 2017-05-19 Richard Biener <rguenther@suse.de>
6406
6407 PR c++/80593
6408 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6409 to alias-set zero memory.
6410
6411 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6412
6413 * c-format.c (local_tree_type_node): Add GTY attribute.
6414
6415 2017-05-18 Marek Polacek <polacek@redhat.com>
6416
6417 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6418 (c_common_fixed_point_type_for_size): Likewise.
6419 (c_common_type_for_mode): Likewise.
6420 (shorten_compare): Likewise.
6421 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6422 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6423
6424 2017-05-18 Marek Polacek <polacek@redhat.com>
6425
6426 * c-common.c (self_promoting_args_p): Change the return type to bool.
6427 Use false/true instead of 0/1.
6428 * c-common.h (self_promoting_args_p): Update.
6429
6430 2017-05-17 Marek Polacek <polacek@redhat.com>
6431
6432 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6433 * c-warn.c: Likewise.
6434
6435 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6436
6437 Implement new C++ intrinsics __is_assignable and __is_constructible.
6438 * c-common.c (__is_assignable, __is_constructible): New.
6439 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6440
6441 2017-05-17 Martin Liska <mliska@suse.cz>
6442
6443 * c-common.h: Introduce dump_flags_t type and
6444 use it instead of int type.
6445 * c-gimplify.c (c_genericize): Likewise.
6446 * c-opts.c: Likewise.
6447
6448 2017-05-17 Marek Polacek <polacek@redhat.com>
6449
6450 * c-common.c (c_save_expr): Remove.
6451 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6452 * c-common.h (c_save_expr): Remove declaration.
6453
6454 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6455
6456 PR c/35441
6457 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6458 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6459 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6460 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6461 RDIV_EXPR.
6462 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6463
6464 2017-05-09 Marek Polacek <polacek@redhat.com>
6465
6466 PR c/80525
6467 * c-warn.c (unwrap_c_maybe_const): New.
6468 (warn_logical_operator): Call it.
6469
6470 2017-05-09 Nathan Sidwell <nathan@acm.org>
6471
6472 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6473 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6474
6475 2017-05-08 Martin Sebor <msebor@redhat.com>
6476
6477 PR translation/80280
6478 * c-format.h (struct format_flag_spec): Add new member.
6479 (T89_T): New macro.
6480 * c-format.c (local_tree_type_node): New global.
6481 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6482 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6483 (strfmon_flag_specs): Likewise.
6484 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6485 with distinct quoting properties.
6486 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6487 (flag_chars_t::validate): Add argument and handle bad quoting.
6488 (check_format_info_main): Handle quoting problems.
6489 (init_dynamic_diag_info): Simplify.
6490
6491 2017-05-08 Jason Merrill <jason@redhat.com>
6492
6493 * c-opts.c (c_common_post_options): Update defaults for
6494 flag_abi_version and flag_abi_compat_version.
6495
6496 2017-05-05 David Malcolm <dmalcolm@redhat.com>
6497
6498 * c-common.c (c_cpp_error): Replace report_diagnostic
6499 with diagnostic_report_diagnostic.
6500
6501 2017-05-04 Martin Sebor <msebor@redhat.com>
6502
6503 PR translation/80280
6504 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6505 (handle_weakref_attribute): Same.
6506
6507 2017-05-03 Nathan Sidwell <nathan@acm.org>
6508
6509 Canonicalize canonical type hashing
6510 * c-common.c (complete_array_type): Use type_hash_canon.
6511
6512 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6513
6514 PR c++/80038
6515 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6516 prototype.
6517 (cilk_install_body_pedigree_operations): Likewise.
6518 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6519 detatched.
6520 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6521 (cilk_install_body_pedigree_operations): Likewise.
6522 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6523 unwrapping.
6524
6525 2017-04-27 Jakub Jelinek <jakub@redhat.com>
6526
6527 PR c++/80534
6528 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6529 flag on non-aggregate element types.
6530
6531 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6532
6533 * c-common.c (c_type_hasher, type_hash_table): Remove.
6534 (c_common_get_alias_set): Remove unreachable code.
6535 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6536
6537 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6538
6539 * c.opt (Wextra-semi): New C++ warning flag.
6540
6541 2017-04-20 Jakub Jelinek <jakub@redhat.com>
6542
6543 PR middle-end/80423
6544 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6545
6546 2017-04-18 Jakub Jelinek <jakub@redhat.com>
6547
6548 PR middle-end/79788
6549 PR middle-end/80375
6550 * c-common.c (c_common_type_for_mode): Don't handle
6551 widest_*_literal_type_node here.
6552 c_common_signed_or_unsigned_type): Likewise.
6553 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6554 to *intTI_type_node or *intDI_type_node depending on whether
6555 TImode is supported by the target or not.
6556
6557 2017-04-10 Martin Liska <mliska@suse.cz>
6558
6559 PR sanitizer/80350
6560 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6561 doing an UBSAN check.
6562
6563 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6564
6565 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6566
6567 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6568
6569 PR c++/79572
6570 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6571 tree *.
6572 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6573 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6574 REFERENCE_TYPE.
6575
6576 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6577
6578 PR documentation/78732
6579 * c.opt (Wendif-labels): Fix description to refer to
6580 #else rather than #elif.
6581
6582 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6583
6584 PR libstdc++/80251
6585 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6586 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6587
6588 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6589
6590 PR middle-end/80162
6591 * c-common.c (c_common_mark_addressable_vec): Don't set
6592 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6593
6594 2017-03-21 Martin Sebor <msebor@redhat.com>
6595
6596 PR c++/79548
6597 * c-common.c (set_underlying_type): Mark type used only when
6598 original del is declared unused.
6599
6600 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6601
6602 PR translation/79848
6603 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6604 "%qs".
6605
6606 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6607
6608 PR c/79921
6609 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6610 from inform's message, so that xgettext can locate it.
6611
6612 2017-03-09 Marek Polacek <polacek@redhat.com>
6613
6614 PR c++/79962
6615 PR c++/79984
6616 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6617 conversion to the attribute list.
6618
6619 2017-03-09 Martin Liska <mliska@suse.cz>
6620
6621 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6622
6623 2017-03-03 Jason Merrill <jason@redhat.com>
6624
6625 * c.opt (Wnoexcept-type): New.
6626
6627 2017-03-02 Richard Biener <rguenther@suse.de>
6628
6629 PR c/79756
6630 * c-common.c (c_common_mark_addressable_vec): Look through
6631 C_MAYBE_CONST_EXPR.
6632
6633 2017-02-28 Martin Liska <mliska@suse.cz>
6634
6635 * c.opt: Replace space with tabular for options of <number>
6636 type.
6637
6638 2017-02-28 Martin Liska <mliska@suse.cz>
6639
6640 * c.opt: Fix --help=option -Q for options which are of
6641 an enum type.
6642
6643 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6644
6645 PR c++/79588
6646 * c-common.c (check_function_restrict): New function.
6647 (check_function_arguments): Add FNDECL argument. Call
6648 check_function_restrict if -Wrestrict.
6649 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6650 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6651 * c-common.h (check_function_arguments): Add FNDECL argument.
6652 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6653
6654 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6655
6656 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6657 treatment of parameters with pointer-to-tagged type and tidy up.
6658 (print_ada_methods): Remove the special treatment of C++ static member
6659 functions.
6660
6661 2017-02-22 Martin Liska <mliska@suse.cz>
6662
6663 * c.opt: Replace inequality signs with square brackets
6664 for -Wnornalized.
6665
6666 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6667
6668 PR c++/79641
6669 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6670 preserve quals.
6671
6672 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6673
6674 * c-cppbuiltin.c (builtin_define_float_constants): Define
6675 __DECIMAL_DIG__ to the value for long double.
6676
6677 2017-02-15 Marek Polacek <polacek@redhat.com>
6678
6679 PR c/79515
6680 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6681 conversion has occured.
6682
6683 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6684
6685 * c-common.c (c_common_reswords): Add "__RTL".
6686 * c-common.h (enum rid): Add RID_RTL.
6687
6688 2017-01-20 Marek Polacek <polacek@redhat.com>
6689
6690 PR c/64279
6691 * c-common.h (do_warn_duplicated_branches_r): Declare.
6692 * c-gimplify.c (c_genericize): Walk the function tree calling
6693 do_warn_duplicated_branches_r.
6694 * c-warn.c (expr_from_macro_expansion_r): New.
6695 (do_warn_duplicated_branches): New.
6696 (do_warn_duplicated_branches_r): New.
6697 * c.opt (Wduplicated-branches): New option.
6698
6699 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6700
6701 PR c++/71497
6702 * c-indentation.c (warn_for_misleading_indentation): Use the past
6703 subjunctive in the note.
6704
6705 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6706
6707 PR c/79116
6708 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6709 start type to integer_type.
6710
6711 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6712
6713 PR driver/49726
6714 * c.opt (gen-decls): Add Driver flag.
6715
6716 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6717
6718 Revert:
6719 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6720
6721 PR c++/71737
6722 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6723
6724 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6725
6726 PR c++/71737
6727 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6728
6729 2017-01-12 Martin Sebor <msebor@redhat.com>
6730
6731 (-Wformat-overflow): ...to this.
6732
6733 2017-01-11 Martin Sebor <msebor@redhat.com>
6734
6735 PR c/78768
6736 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6737 Also enable for LTO.
6738
6739 2017-01-10 Jason Merrill <jason@redhat.com>
6740
6741 Implement P0195R2, C++17 variadic using.
6742 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6743
6744 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6745
6746 PR translation/79019
6747 PR translation/79020
6748 * c.opt (Wnormalized=): Fix typo in description.
6749
6750 2017-01-08 Martin Sebor <msebor@redhat.com>
6751
6752 PR middle-end/77708
6753 * c.opt (-Wformat-truncation): New option.
6754
6755 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6756
6757 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6758 value to unsigned short to fit in 4 hex digits without
6759 warnings.
6760
6761 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6762
6763 * c.opt (fsso-struct): Add 'native' value.
6764
6765 2017-01-05 Martin Liska <mliska@suse.cz>
6766
6767 PR pch/78970
6768 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6769 header.
6770
6771 2017-01-04 Marek Polacek <polacek@redhat.com>
6772
6773 PR c++/64767
6774 * c.opt (Wpointer-compare): New option.
6775
6776 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6777
6778 PR driver/78957
6779 * c.opt (fsso-struct=): Add RejectNegative.
6780
6781 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6782
6783 Update copyright years.
6784
6785 2016-12-29 Martin Liska <mliska@suse.cz>
6786
6787 PR c/78933
6788 * c.opt (strong-eval-order): Add RejectNegative keyword.
6789
6790 2016-12-22 Jason Merrill <jason@redhat.com>
6791
6792 Implement P0522R0, matching of template template arguments.
6793 * c-cppbuiltin.c (c_cpp_builtins): Define
6794 __cpp_template_template_args.
6795
6796 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6797
6798 PR bootstrap/78817
6799 * c-common.c (struct nonnull_arg_ctx): New type.
6800 (check_function_nonnull): Return bool instead of void. Use
6801 nonnull_arg_ctx as context rather than just location_t.
6802 (check_nonnull_arg): Adjust for the new context type, set
6803 warned_p to true if a warning has been diagnosed.
6804 (check_function_arguments): Return bool instead of void.
6805 * c-common.h (check_function_arguments): Adjust prototype.
6806
6807 2016-12-21 Jason Merrill <jason@redhat.com>
6808
6809 * c.opt (-fnew-ttp-matching): New flag.
6810 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6811
6812 2016-12-14 Martin Jambor <mjambor@suse.cz>
6813
6814 * c-omp.c: Include omp-general.h instead of omp-low.h.
6815 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6816 name.
6817
6818 2016-12-14 Martin Sebor <msebor@redhat.com>
6819
6820 PR c/17308
6821 * c-common.c (check_nonnull_arg): Disable when optimization
6822 is enabled.
6823
6824 2016-12-12 Marek Polacek <polacek@redhat.com>
6825
6826 PR c++/78647
6827 * c-common.c (attribute_fallthrough_p): Return false for
6828 error_mark_node.
6829
6830 2016-12-08 Martin Sebor <msebor@redhat.com>
6831
6832 PR c/78284
6833 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6834
6835 2016-12-08 Martin Sebor <msebor@redhat.com>
6836
6837 PR c/78165
6838 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6839 suffix.
6840
6841 2016-12-07 Martin Sebor <msebor@redhat.com>
6842
6843 PR c/53562
6844 PR middle-end/77784
6845 PR middle-end/78149
6846 PR middle-end/78138
6847 * c.opt (-Wstringop-overflow): New option.
6848
6849 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6850
6851 * c-attribs.c (asan odr indicator): New attribute.
6852 (handle_asan_odr_indicator_attribute): New function.
6853
6854 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6855
6856 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6857 ptrdiff_type_node;
6858
6859 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6860
6861 * c-common.c (excess_precision_mode_join): New.
6862 (c_ts18661_flt_eval_method): New.
6863 (c_c11_flt_eval_method): Likewise.
6864 (c_flt_eval_method): Likewise.
6865 * c-common.h (excess_precision_mode_join): New.
6866 (c_flt_eval_method): Likewise.
6867 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6868 (cpp_iec_559_value): Call it.
6869 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6870 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6871 __FLT_EVAL_METHOD_TS_18661_3__.
6872
6873 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6874
6875 * c-opts.c (c_common_post_options): Add logic to handle the default
6876 case for -fpermitted-flt-eval-methods.
6877
6878 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6879
6880 * c.opt (Wexpansion-to-defined): New.
6881
6882 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6883
6884 PR target/78451
6885 * c-pragma.c (handle_pragma_target): Don't replace
6886 current_target_pragma, but chainon the new args to the current one.
6887
6888 2016-11-22 Nathan Sidwell <nathan@acm.org>
6889
6890 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6891 indentation and formatting.
6892
6893 2016-11-21 Martin Sebor <msebor@redhat.com>
6894
6895 * c.opt (-fprintf-return-value): Enable by default.
6896
6897 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6898
6899 PR c++/71973
6900 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6901 * c-common.c (c_common_nodes_and_builtins): Initialize
6902 const_tm_ptr_type_node.
6903
6904 2016-11-16 Marek Polacek <polacek@redhat.com>
6905
6906 PR c/78285
6907 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6908
6909 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6910
6911 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6912
6913 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6914 Richard Biener <rguenther@suse.de>
6915
6916 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6917 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6918 * c.opt (fgimple): New option.
6919
6920 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6921
6922 PR c/35503
6923 * c-common.h (warn_for_restrict): Declare.
6924 * c-warn.c: Include gcc-rich-location.h.
6925 (warn_for_restrict): New function.
6926 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6927 (gcc_cdiag_char_table): Likewise.
6928 (gcc_cxxdiag_char_table): Likewise.
6929 * c.opt (Wrestrict): New option.
6930
6931 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6932
6933 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6934 for nested types only if the type is a record or union and dump SLOC.
6935
6936 2016-11-09 Jason Merrill <jason@redhat.com>
6937
6938 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6939
6940 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6941
6942 * c-ubsan.c (ubsan_instrument_shift): Handle split
6943 -fsanitize=shift-base and -fsanitize=shift-exponent.
6944
6945 2016-11-07 Jason Merrill <jason@redhat.com>
6946
6947 * c.opt (Wc++1z-compat): New.
6948 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6949
6950 2016-11-07 Martin Liska <mliska@suse.cz>
6951
6952 * c-warn.c (warn_for_unused_label): Save all labels used
6953 in goto or in &label.
6954
6955 2016-11-03 Jason Merrill <jason@redhat.com>
6956
6957 * c-cppbuiltin.c (c_cpp_builtins): Correct
6958 __cpp_inheriting_constructors.
6959
6960 2016-11-01 Jason Merrill <jason@redhat.com>
6961
6962 * c-cppbuiltin.c (c_cpp_builtins): Update
6963 __cpp_inheriting_constructors.
6964
6965 * c.opt (-fnew-inheriting-ctors): New.
6966 * c-opts.c: Default to on for ABI 11+.
6967
6968 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6969
6970 PR c++/77948
6971 * c.opt (fext-numeric-literals): Add Var and Init.
6972 * c-opts.c (c_common_handle_option): Don't clear
6973 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6974 (c_common_post_options): Clear it here if not set
6975 explicitly.
6976
6977 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6978
6979 PR debug/77773
6980 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6981 if NULL.
6982
6983 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6984
6985 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6986 * c-common.c (c_common_reswords): Add __builtin_launder.
6987
6988 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6989
6990 * c-common.c (c_common_truthvalue_conversion): Warn for
6991 multiplications in boolean context. Fix the quoting of '<<' and '<'
6992 in the shift warning.
6993
6994 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6995
6996 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6997
6998 2016-10-20 Jason Merrill <jason@redhat.com>
6999
7000 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
7001
7002 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7003
7004 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
7005 integer shift ops in boolean context.
7006
7007 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
7008
7009 * c.opt (Walloca): New.
7010 (Walloca-larger-than=): New.
7011 (Wvla-larger-than=): New.
7012
7013 2016-10-17 Marek Polacek <polacek@redhat.com>
7014
7015 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
7016 Return immediately when finding a match.
7017 (warn_tautological_cmp): Remove a boolean variable that is no longer
7018 needed.
7019
7020 2016-10-17 Marek Polacek <polacek@redhat.com>
7021
7022 * c-attribs.c: New file.
7023 * c-common.c: Move attributes handling to c-attribs.c.
7024 (get_nonnull_operand): No longer static.
7025 * c-common.h: Move the declarations from c-attribs.c to its own section.
7026
7027 2016-10-14 Jason Merrill <jason@redhat.com>
7028
7029 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
7030 and __cpp_deduction_guides.
7031
7032 2016-10-13 Jason Merrill <jason@redhat.com>
7033
7034 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
7035
7036 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7037
7038 * c-cppbuiltin.c: Include memmodel.h.
7039 * c-opts.c: Likewise.
7040 * c-pragma.c: Likewise.
7041 * c-warn.c: Likewise.
7042
7043 2016-10-12 Jakub Jelinek <jakub@redhat.com>
7044
7045 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
7046 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
7047 * c-opts.c (sanitize_cpp_opts): Initialize
7048 cpp_opts->cpp_warn_implicit_fallthrough.
7049
7050 2016-10-11 Marek Polacek <polacek@redhat.com>
7051
7052 * c-common.c (warning_candidate_p): Change the return type to bool
7053 and return true/false instead of 1/0.
7054 (vector_mode_valid_p): Likewise.
7055
7056 2016-10-11 Marek Polacek <polacek@redhat.com>
7057
7058 * c-common.c (fold_for_warn): No longer static.
7059 (bool_promoted_to_int_p): Likewise.
7060 (c_common_get_narrower): Likewise.
7061 (constant_expression_warning): Move to c-warn.c.
7062 (constant_expression_error): Likewise.
7063 (overflow_warning): Likewise.
7064 (warn_logical_operator): Likewise.
7065 (find_array_ref_with_const_idx_r): Likewise.
7066 (warn_tautological_cmp): Likewise.
7067 (expr_has_boolean_operands_p): Likewise.
7068 (warn_logical_not_parentheses): Likewise.
7069 (warn_if_unused_value): Likewise.
7070 (strict_aliasing_warning): Likewise.
7071 (sizeof_pointer_memaccess_warning): Likewise.
7072 (check_main_parameter_types): Likewise.
7073 (conversion_warning): Likewise.
7074 (warnings_for_convert_and_check): Likewise.
7075 (match_case_to_enum_1): Likewise.
7076 (match_case_to_enum): Likewise.
7077 (c_do_switch_warnings): Likewise.
7078 (warn_for_omitted_condop): Likewise.
7079 (readonly_error): Likewise.
7080 (lvalue_error): Likewise.
7081 (invalid_indirection_error): Likewise.
7082 (warn_array_subscript_with_type_char): Likewise.
7083 (warn_about_parentheses): Likewise.
7084 (warn_for_unused_label): Likewise.
7085 (warn_for_div_by_zero): Likewise.
7086 (warn_for_memset): Likewise.
7087 (warn_for_sign_compare): Likewise.
7088 (do_warn_double_promotion): Likewise.
7089 (do_warn_unused_parameter): Likewise.
7090 (record_locally_defined_typedef): Likewise.
7091 (maybe_record_typedef_use): Likewise.
7092 (maybe_warn_unused_local_typedefs): Likewise.
7093 (maybe_warn_bool_compare): Likewise.
7094 (maybe_warn_shift_overflow): Likewise.
7095 (warn_duplicated_cond_add_or_warn): Likewise.
7096 (diagnose_mismatched_attributes): Likewise.
7097 * c-common.h: Move the declarations from c-warn.c to its own section.
7098 * c-warn.c: New file.
7099
7100 2016-10-08 Jason Merrill <jason@redhat.com>
7101
7102 * c-common.c (c_common_truthvalue_conversion): Don't distribute
7103 into COND_EXPR in C++.
7104
7105 2016-10-08 Jakub Jelinek <jakub@redhat.com>
7106
7107 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7108 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7109 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7110
7111 2016-10-07 Jakub Jelinek <jakub@redhat.com>
7112
7113 Implement LWG2296 helper intrinsic
7114 * c-common.h (enum rid): Add RID_ADDRESSOF.
7115 * c-common.c (c_common_reswords): Add __builtin_addressof.
7116
7117 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
7118
7119 PR c++/77700
7120 * c-common.c (c_common_truthvalue_conversion): Warn also for
7121 suspicious enum values in boolean context.
7122
7123 2016-10-06 Jakub Jelinek <jakub@redhat.com>
7124
7125 Implement P0258R2 - helper for C++17
7126 std::has_unique_object_representations trait
7127 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7128 * c-common.c (c_common_reswords): Add
7129 __has_unique_object_representations.
7130
7131 2016-10-05 Jakub Jelinek <jakub@redhat.com>
7132
7133 PR sanitizer/66343
7134 * c-ubsan.c (ubsan_instrument_return): Don't call
7135 initialize_sanitizer_builtins here.
7136
7137 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7138
7139 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7140 conditional expression in boolean context when only one arm is
7141 non-boolean.
7142
7143 2016-10-05 Jakub Jelinek <jakub@redhat.com>
7144
7145 PR sanitizer/77823
7146 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7147 is not integral.
7148
7149 * c-common.c (c_common_reswords): Update comment for C++11.
7150
7151 2016-10-04 Jason Merrill <jason@redhat.com>
7152
7153 * c-common.c (make_tree_vector_from_ctor): New.
7154 * c-common.h: Declare it.
7155
7156 2016-10-04 Jakub Jelinek <jakub@redhat.com>
7157
7158 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7159 __LIBGCC_JCR_SECTION_NAME__.
7160
7161 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7162
7163 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7164 left shift in boolean context.
7165
7166 2016-09-29 Jakub Jelinek <jakub@redhat.com>
7167
7168 Implement P0001R1 - C++17 removal of register storage class specifier
7169 * c.opt (Wregister): New warning.
7170 * c-opts.c (c_common_post_options): Enable -Wregister by
7171 default for C++17.
7172
7173 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7174
7175 * c-opts.c (c_common_post_options): Remove special case for
7176 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7177 in C++.
7178
7179 2016-09-27 Jakub Jelinek <jakub@redhat.com>
7180
7181 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7182 -std=c++1z.
7183
7184 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7185
7186 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7187
7188 * c-common.c: Include memmodel.h.
7189
7190 2016-09-26 Marek Polacek <polacek@redhat.com>
7191
7192 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7193
7194 2016-09-26 Marek Polacek <polacek@redhat.com>
7195
7196 PR c/7652
7197 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7198 (handle_fallthrough_attribute): New function.
7199 (attribute_fallthrough_p): New function.
7200 * c-common.h (attribute_fallthrough_p): Declare.
7201
7202 2016-09-24 Marek Polacek <polacek@redhat.com>
7203
7204 PR c/77490
7205 * c.opt (Wbool-operation): New.
7206
7207 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7208
7209 * c-common.c (c_common_truthvalue_conversion): Inhibit
7210 Wint-in-bool-context warning with from_macro_definition_at.
7211 Mention the expression will always evaluate to true.
7212
7213 2016-09-21 Martin Sebor <msebor@redhat.com>
7214
7215 PR bootstrap/77676
7216 * c.opt (fprintf-return-value): Temporarily initialize to zero
7217 to unblock bootstrap failures.
7218
7219 2016-09-21 Jakub Jelinek <jakub@redhat.com>
7220
7221 PR c++/77651
7222 * c.opt (Waligned-new=): Add RejectNegative.
7223 (faligned-new=): Likewise. Spelling fix - change
7224 aligned_new_threshhold to aligned_new_threshold.
7225 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7226 to aligned_new_threshold.
7227
7228 2016-09-20 Martin Sebor <msebor@redhat.com>
7229
7230 PR middle-end/49905
7231 * c.opt: Add -Wformat-length and -fprintf-return-value.
7232
7233 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7234
7235 PR c++/77434
7236 * c.opt (Wint-in-bool-context): New warning.
7237 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7238 constants in boolean context.
7239
7240 2016-09-19 Joseph Myers <joseph@codesourcery.com>
7241
7242 * c-common.c (max_align_t_align): Also consider alignment of
7243 float128_type_node.
7244
7245 2016-09-15 Jason Merrill <jason@redhat.com>
7246
7247 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7248 DECL_EXTERNAL.
7249
7250 2016-09-14 Jason Merrill <jason@redhat.com>
7251
7252 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7253 limit FIELD_DECL, either.
7254
7255 2016-09-14 Marek Polacek <polacek@redhat.com>
7256
7257 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7258 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7259 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7260
7261 2016-09-13 David Malcolm <dmalcolm@redhat.com>
7262
7263 * c-common.c (warn_logical_not_parentheses): Replace
7264 rich_location::add_fixit_insert calls with add_fixit_insert_before
7265 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7266
7267 2016-09-13 Jason Merrill <jason@redhat.com>
7268 Tom de Vries <tom@codesourcery.com>
7269
7270 PR c++/77427
7271 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7272
7273 2016-09-13 Jason Merrill <jason@redhat.com>
7274
7275 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7276 limit types at all.
7277
7278 2016-09-12 Jason Merrill <jason@redhat.com>
7279
7280 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7281 bit/byte confusion, allow large alignment for types.
7282
7283 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7284
7285 PR c++/77496
7286 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7287
7288 2016-09-12 David Malcolm <dmalcolm@redhat.com>
7289
7290 PR c/72858
7291 * c-format.c (argument_parser::check_argument_type): Add params
7292 "type_start" and "conversion_char". Use the former to generate
7293 offset_to_type_start and pass it and conversion_char to
7294 check_format_types.
7295 (check_format_info_main): Capture the start of the type
7296 information as "type_start", and pass it an format_char
7297 to arg_parser.check_argument_type.
7298 (check_format_types): Provide an example in the leading comment.
7299 Add params "offset_to_type_start" and "conversion_char"; pass
7300 them to format_type_warning calls.
7301 (test_get_modifier_for_format_len): Likewise.
7302 (matching_type_p): New function.
7303 (get_format_for_type): Add param "conversion_char" and move
7304 implementation into...
7305 (get_format_for_type_1): ...new function, called twice.
7306 Use new function matching_type_p rather than checking for
7307 TYPE_CANONICAL equality.
7308 (get_corrected_substring): New function.
7309 (format_type_warning): Provide an example in the leading comment.
7310 Add params "offset_to_type_start" and "conversion_char". Replace
7311 call to get_format_for_type with call to get_corrected_substring
7312 and move rejection of hints for widths/precisions there.
7313 (assert_format_for_type_streq): Add param "conversion_char".
7314 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7315 (test_get_format_for_type_printf): Add conversion chars to the
7316 tests, adding coverage for various combinations of integer
7317 vs double conversions, and for preserving octal and hexadecimal
7318 conversions.
7319 (test_get_format_for_type_scanf): Add conversion chars to the
7320 tests.
7321
7322 2016-09-10 Tom de Vries <tom@codesourcery.com>
7323
7324 PR C/71602
7325 * c-common.c (build_va_arg): Handle more strict
7326 targetm.canonical_va_list_type. Replace first argument type error with
7327 assert.
7328
7329 2016-09-09 Martin Sebor <msebor@redhat.com>
7330
7331 PR c/77520
7332 PR c/77521
7333 * c-format.c (argument_parser::find_format_char_info): Use %qc
7334 format directive unconditionally.
7335
7336 2016-09-09 Jason Merrill <jason@redhat.com>
7337
7338 Implement C++17 new of over-aligned types.
7339 * c.opt: Add -faligned-new and -Waligned-new.
7340 * c-common.c (max_align_t_align): Split out from...
7341 (cxx_fundamental_alignment_p): ...here.
7342 * c-common.h: Declare it.
7343 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7344
7345 2016-09-09 Joseph Myers <joseph@codesourcery.com>
7346
7347 * c-cppbuiltin.c (builtin_define_type_width): New function.
7348 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7349 macros.
7350
7351 2016-09-07 David Malcolm <dmalcolm@redhat.com>
7352
7353 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7354 a POINTER_TYPE.
7355 (substring_loc::get_location): Move to substring-locations.c,
7356 keeping implementation as...
7357 (c_get_substring_location): New function, from the above, reworked
7358 to use accessors rather than member lookup.
7359 * c-common.h (class substring_loc): Move to substring-locations.h,
7360 replacing with a forward decl.
7361 (c_get_substring_location): New decl.
7362 * c-format.c: Include "substring-locations.h".
7363 (format_warning_va): Move to substring-locations.c.
7364 (format_warning_at_substring): Likewise.
7365
7366 2016-09-06 Martin Sebor <msebor@redhat.com>
7367
7368 PR c/77336
7369 * c-format.c (check_function_format): Avoid issuing warnings for
7370 functions unless they call format functions with non-constant
7371 format strings.
7372
7373 2016-09-06 Richard Biener <rguenther@suse.de>
7374
7375 PR c/77450
7376 * c-common.c (c_common_mark_addressable_vec): Handle
7377 COMPOUND_LITERAL_EXPR.
7378
7379 2016-09-05 Marek Polacek <polacek@redhat.com>
7380
7381 PR c/77423
7382 * c-common.c (bool_promoted_to_int_p): New function.
7383 (expr_has_boolean_operands_p): New function.
7384 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7385 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7386
7387 2016-09-04 Tom de Vries <tom@codesourcery.com>
7388
7389 revert:
7390 2016-08-29 Tom de Vries <tom@codesourcery.com>
7391
7392 * c-common.c (build_va_arg): Replace first argument type error
7393 with assert.
7394
7395 2016-09-02 Jakub Jelinek <jakub@redhat.com>
7396
7397 PR c/65467
7398 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7399 (c_finish_omp_for): Reject _Atomic qualified iterators.
7400
7401 2016-09-01 Martin Sebor <msebor@redhat.com>
7402
7403 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7404 size to guarantee it fits the output of the formatted function
7405 regardless of its arguments.
7406
7407 2016-09-01 Marek Polacek <polacek@redhat.com>
7408
7409 PR c/7652
7410 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7411 FALLTHRU comments.
7412
7413 2016-08-29 Marek Polacek <polacek@redhat.com>
7414
7415 PR c/77292
7416 * c-common.c (warn_logical_not_parentheses): Don't warn for
7417 a comparison or a logical operator.
7418
7419 2016-08-29 Tom de Vries <tom@codesourcery.com>
7420
7421 * c-common.c (build_va_arg): Fix type comparison assert.
7422
7423 2016-08-29 Tom de Vries <tom@codesourcery.com>
7424
7425 * c-common.c (build_va_arg): Replace first argument type error
7426 with assert.
7427
7428 2016-08-29 Tom de Vries <tom@codesourcery.com>
7429
7430 PR c/77398
7431 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7432 with error_mark_node as va_list instead of with illegal va_list.
7433
7434 2016-08-25 Marek Polacek <polacek@redhat.com>
7435 David Malcolm <dmalcolm@redhat.com>
7436
7437 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7438 * c-common.h (warn_logical_not_parentheses): Update declaration.
7439
7440 2016-08-22 Marek Polacek <polacek@redhat.com>
7441
7442 PR c++/77321
7443 * c-common.c (warn_for_memset): Check type for null.
7444
7445 2016-08-22 Joseph Myers <joseph@codesourcery.com>
7446
7447 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
7448 _FloatNx types for suffixes for built-in functions.
7449
7450 2016-08-19 Joseph Myers <joseph@codesourcery.com>
7451
7452 PR c/32187
7453 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7454 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7455 (RID_FLOAT128X): New enum rid values.
7456 (CASE_RID_FLOATN_NX): New macro.
7457 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7458 keywords.
7459 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7460 corresponding complex types.
7461 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7462 _FloatNx and corresponding complex types.
7463 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7464 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7465 and _FloatNx types for the widest type for determining
7466 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7467 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7468 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7469 and _FloatNx types.
7470 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7471 constants.
7472 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7473 _FloatNx types.
7474
7475 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7476
7477 * c-opts.c (c_diagnostic_finalizer): Update for change to
7478 diagnostic_show_locus.
7479
7480 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7481
7482 * c-common.c: Include "spellcheck.h".
7483 (cb_get_suggestion): New function.
7484 * c-common.h (cb_get_suggestion): New decl.
7485 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7486 cb_get_suggestion.
7487
7488 2016-08-18 Marek Polacek <polacek@redhat.com>
7489
7490 PR c/71514
7491 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7492 and pointer-to-VLA.
7493
7494 2016-08-16 David Malcolm <dmalcolm@redhat.com>
7495
7496 PR c/72857
7497 * c-common.c (substring_loc::get_range): Rename to...
7498 (substring_loc::get_location): ...this, converting param from a
7499 source_range * to a location_t *. Call
7500 get_source_location_for_substring rather than
7501 get_source_range_for_substring, and pass in m_caret_idx.
7502 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7503 (substring_loc::get_range): Replace with...
7504 (substring_loc::get_location): ...this.
7505 (substring_loc::set_caret_index): New method.
7506 (substring_loc): Add field m_caret_idx.
7507 * c-format.c (format_warning_va): Update for above changes.
7508 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7509 clashing with type name.
7510 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7511 (check_argument_type): Likewise.
7512 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7513 Use a copy when emitting warnings, setting the caret index from TYPE.
7514
7515 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
7516 Arnaud Charlet <charlet@adacore.com>
7517
7518 * c-ada-spec.c (dump_number): New function.
7519 (handle_escape_character): Likewise.
7520 (print_ada_macros): Add handling of constant integers and strings.
7521
7522 2016-08-12 Marek Polacek <polacek@redhat.com>
7523
7524 PR c/7652
7525 * c-common.c (scalar_to_vector): Adjust fall through comment.
7526 * c-opts.c (c_common_handle_option): Likewise.
7527 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7528 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7529 fall through comment.
7530 * cilk.c (extract_free_variables): Add FALLTHRU.
7531
7532 2016-08-10 Jason Merrill <jason@redhat.com>
7533
7534 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7535
7536 2016-08-09 Jason Merrill <jason@redhat.com>
7537
7538 * c-common.c (c_common_attribute_table): vector_size affects type
7539 identity.
7540
7541 2016-08-09 Marek Polacek <polacek@redhat.com>
7542
7543 PR c/7652
7544 * c-ada-spec.c (dump_generic_ada_node): Add return.
7545
7546 2016-08-09 Jason Merrill <jason@redhat.com>
7547
7548 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7549 C++17 constexpr lambdas.
7550
7551 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7552
7553 PR c/64955
7554 * c-common.h (selftest::c_format_c_tests): New declaration.
7555 (selftest::run_c_tests): New declaration.
7556 * c-format.c: Include "selftest.h.
7557 (format_warning_va): Add param "corrected_substring" and use
7558 it to add a replacement fix-it hint.
7559 (format_warning_at_substring): Likewise.
7560 (format_warning_at_char): Update for new param of
7561 format_warning_va.
7562 (argument_parser::check_argument_type): Pass "fki" to
7563 check_format_types.
7564 (check_format_types): Add param "fki" and pass it to
7565 format_type_warning.
7566 (deref_n_times): New function.
7567 (get_modifier_for_format_len): New function.
7568 (selftest::test_get_modifier_for_format_len): New function.
7569 (get_format_for_type): New function.
7570 (format_type_warning): Add param "fki" and use it to attempt
7571 to provide hints for argument types when calling
7572 format_warning_at_substring.
7573 (selftest::get_info): New function.
7574 (selftest::assert_format_for_type_streq): New function.
7575 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7576 (selftest::test_get_format_for_type_printf): New function.
7577 (selftest::test_get_format_for_type_scanf): New function.
7578 (selftest::c_format_c_tests): New function.
7579
7580 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7581
7582 PR c/52952
7583 * c-format.c: Include "diagnostic.h".
7584 (location_column_from_byte_offset): Delete.
7585 (location_from_offset): Delete.
7586 (format_warning_va): New function.
7587 (format_warning_at_substring): New function.
7588 (format_warning_at_char): New function.
7589 (check_format_arg): Capture location of format_tree and pass to
7590 check_format_info_main.
7591 (argument_parser): Add fields "start_of_this_format" and
7592 "format_string_cst".
7593 (flag_chars_t::validate): Add param "format_string_cst". Convert
7594 warning_at call using location_from_offset to call to
7595 format_warning_at_char.
7596 (argument_parser::argument_parser): Add param "format_string_cst_"
7597 and use use it to initialize field "format_string_cst".
7598 Initialize new field "start_of_this_format".
7599 (argument_parser::read_format_flags): Convert warning_at call
7600 using location_from_offset to a call to format_warning_at_char.
7601 (argument_parser::read_any_format_left_precision): Likewise.
7602 (argument_parser::read_any_format_precision): Likewise.
7603 (argument_parser::read_any_other_modifier): Likewise.
7604 (argument_parser::find_format_char_info): Likewise, in three places.
7605 (argument_parser::parse_any_scan_set): Likewise, in one place.
7606 (argument_parser::handle_conversions): Likewise, in two places.
7607 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7608 and use it to make a substring_loc. Pass the latter to
7609 check_format_types.
7610 (check_format_info_main): Add params "fmt_param_loc" and
7611 "format_string_cst". Convert warning_at calls using
7612 location_from_offset to calls to format_warning_at_char. Pass the
7613 new params to the arg_parser ctor. Pass "format_string_cst" to
7614 flag_chars.validate. Pass "fmt_param_loc" to
7615 arg_parser.check_argument_type.
7616 (check_format_types): Convert first param from a location_t
7617 to a const substring_loc & and rename to "fmt_loc". Attempt
7618 to extract the range of the relevant parameter and pass it
7619 to format_type_warning.
7620 (format_type_warning): Convert first param from a location_t
7621 to a const substring_loc & and rename to "fmt_loc". Add
7622 params "param_range" and "type". Replace calls to warning_at
7623 with calls to format_warning_at_substring.
7624
7625 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7626
7627 * c-format.c (class flag_chars_t): New class.
7628 (struct length_modifier): New struct.
7629 (class argument_parser): New class.
7630 (flag_chars_t::flag_chars_t): New ctor.
7631 (flag_chars_t::has_char_p): New method.
7632 (flag_chars_t::add_char): New method.
7633 (flag_chars_t::validate): New method.
7634 (flag_chars_t::get_alloc_flag): New method.
7635 (flag_chars_t::assignment_suppression_p): New method.
7636 (argument_parser::argument_parser): New ctor.
7637 (argument_parser::read_any_dollar): New method.
7638 (argument_parser::read_format_flags): New method.
7639 (argument_parser::read_any_format_width): New method.
7640 (argument_parser::read_any_format_left_precision): New method.
7641 (argument_parser::read_any_format_precision): New method.
7642 (argument_parser::handle_alloc_chars): New method.
7643 (argument_parser::read_any_length_modifier): New method.
7644 (argument_parser::read_any_other_modifier): New method.
7645 (argument_parser::find_format_char_info): New method.
7646 (argument_parser::validate_flag_pairs): New method.
7647 (argument_parser::give_y2k_warnings): New method.
7648 (argument_parser::parse_any_scan_set): New method.
7649 (argument_parser::handle_conversions): New method.
7650 (argument_parser::check_argument_type): New method.
7651 (check_format_info_main): Introduce classes argument_parser
7652 and flag_chars_t, moving the code within the loop into methods
7653 of these classes. Make various locals "const".
7654
7655 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7656
7657 * c-common.c: Include "substring-locations.h".
7658 (get_cpp_ttype_from_string_type): New function.
7659 (g_string_concat_db): New global.
7660 (substring_loc::get_range): New method.
7661 * c-common.h (g_string_concat_db): New declaration.
7662 (class substring_loc): New class.
7663 * c-lex.c (lex_string): When concatenating strings, capture the
7664 locations of all tokens using a new obstack, and record the
7665 concatenation locations within g_string_concat_db.
7666 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7667 on the ggc-heap.
7668
7669 2016-07-29 Marek Polacek <polacek@redhat.com>
7670
7671 PR c/71926
7672 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7673 parentheses warning.
7674
7675 PR c/71574
7676 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7677
7678 2016-07-28 Martin Liska <mliska@suse.cz>
7679
7680 PR gcov-profile/68025
7681 * c-common.c (handle_no_profile_instrument_function_attribute):
7682
7683 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7684
7685 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7686 BITS_PER_UNIT_LOG.
7687
7688 2016-07-25 Jason Merrill <jason@redhat.com>
7689
7690 PR c++/65970
7691 * c.opt (fconstexpr-loop-limit): New.
7692
7693 2016-07-22 Martin Sebor <msebor@redhat.com>
7694
7695 PR c++/71675
7696 * c-common.c (resolve_overloaded_builtin): Avoid converting
7697 __atomic_compare_exchange_n return type to that of what its
7698 first argument points to.
7699
7700 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7701
7702 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7703 ~(unsigned HOST_WIDE_INT) 0.
7704
7705 2016-07-22 Martin Liska <mliska@suse.cz>
7706
7707 PR gcov-profile/69028
7708 PR gcov-profile/62047
7709 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7710 to the current_function_decl.
7711
7712 2016-07-21 Jason Merrill <jason@redhat.com>
7713
7714 PR c++/65168
7715 * c-common.c (c_common_truthvalue_conversion): Check
7716 c_inhibit_evaluation_warnings for warning about address of
7717 reference.
7718
7719 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7720
7721 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7722 const char *.
7723
7724 2016-07-15 Jason Merrill <jason@redhat.com>
7725
7726 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7727
7728 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7729
7730 PR c/71858
7731 * c-common.h (enum lookup_name_fuzzy_kind): Add
7732 FUZZY_LOOKUP_FUNCTION_NAME.
7733
7734 2016-07-08 Jason Merrill <jason@redhat.com>
7735
7736 P0145: Refining Expression Order for C++.
7737 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7738 * c-opts.c: Adjust.
7739
7740 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7741
7742 PR c++/71214
7743 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7744
7745 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7746
7747 * c-pragma.h (enum pragma_kind): Rename
7748 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7749 users.
7750
7751 2016-06-29 Richard Biener <rguenther@suse.de>
7752
7753 PR middle-end/71002
7754 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7755
7756 2016-06-24 Jason Merrill <jason@redhat.com>
7757
7758 P0145R2: Refining Expression Order for C++.
7759 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7760 MODIFY_EXPR.
7761
7762 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7763
7764 * c-common.c (check_builtin_function_arguments): Require last
7765 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7766 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7767 if the last argument is pointer to enumerated or boolean type.
7768
7769 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7770
7771 PR c/70339
7772 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7773 (lookup_name_fuzzy): New prototype.
7774
7775 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7776
7777 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7778
7779 2016-06-14 Jason Merrill <jason@redhat.com>
7780
7781 P0145R2: Refining Expression Order for C++.
7782 * c.opt (fargs-in-order): New.
7783 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7784
7785 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7786
7787 PR sanitizer/71498
7788 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7789 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7790
7791 PR preprocessor/71183
7792 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7793 to cb_get_source_date_epoch.
7794
7795 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7796
7797 PR c/68657
7798 * c.opt (Wpsabi): Add Warning flag.
7799
7800 2016-06-10 Martin Sebor <msebor@redhat.com>
7801
7802 PR c/71392
7803 * c-common.c (handle_nonnull_attribute): Accept
7804 the nonnull attribute in type-generic builtins.
7805
7806 2016-06-09 Martin Sebor <msebor@redhat.com>
7807
7808 PR c/70883
7809 * c-common.c (builtin_function_validate_nargs): Make text of error
7810 message consistent with others like it.
7811
7812 2016-06-08 Martin Sebor <msebor@redhat.com>
7813 Jakub Jelinek <jakub@redhat.com>
7814
7815 PR c++/70507
7816 PR c/68120
7817 * c-common.c (check_builtin_function_arguments): Handle
7818 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7819
7820 2016-06-08 Richard Biener <rguenther@suse.de>
7821
7822 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7823
7824 2016-06-07 Richard Biener <rguenther@suse.de>
7825
7826 PR c/61564
7827 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7828 options and warn about others.
7829
7830 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7831
7832 * c-common.c (get_source_date_epoch): Rename to
7833 cb_get_source_date_epoch.
7834 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7835 message when the parsing fails. Use error_at instead of fatal_error.
7836 * c-common.h (get_source_date_epoch): Rename to
7837 cb_get_source_date_epoch.
7838 * c-common.h (cb_get_source_date_epoch): Prototype.
7839 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7840 * c-common.h (c_omp_region_type): Remove trailing comma.
7841 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7842 * c-lex.c (c_lex_with_flags): Remove initialization of
7843 pfile->source_date_epoch.
7844
7845 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7846
7847 PR c++/71349
7848 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7849 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7850 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7851 instead of C_OMP_CLAUSE_SPLIT_FOR.
7852
7853 2016-05-24 Richard Biener <rguenther@suse.de>
7854
7855 PR middle-end/70434
7856 PR c/69504
7857 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7858 (convert_vector_to_array_for_subscript): ... this.
7859 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7860 VIEW_CONVERT_EXPR to an array type. Rename to ...
7861 (convert_vector_to_array_for_subscript): ... this.
7862
7863 2016-05-12 Marek Polacek <polacek@redhat.com>
7864
7865 PR c/70756
7866 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7867 size_in_bytes and pass LOC to it.
7868
7869 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7870
7871 PR c/43651
7872 * c.opt (Wduplicate-decl-specifier): New option.
7873
7874 2016-05-11 Marek Polacek <polacek@redhat.com>
7875
7876 PR c++/71024
7877 * c-common.c (diagnose_mismatched_attributes): New function.
7878 * c-common.h (diagnose_mismatched_attributes): Declare.
7879
7880 2016-05-04 Marek Polacek <polacek@redhat.com>
7881
7882 * c.opt (Wdangling-else): New option.
7883
7884 2016-05-03 Marek Polacek <polacek@redhat.com>
7885
7886 PR c/70859
7887 * c-common.c (builtin_function_validate_nargs): Add location
7888 parameter. Use it.
7889 (check_builtin_function_arguments): Add location and arguments
7890 parameters. Use them.
7891 * c-common.h (check_builtin_function_arguments): Update declaration.
7892
7893 2016-05-03 Richard Biener <rguenther@suse.de>
7894
7895 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7896 allow call args to gimplify to SSA names.
7897
7898 2016-05-03 Marek Polacek <polacek@redhat.com>
7899
7900 * c-common.h (enum c_omp_region_type): Remove stray comma.
7901
7902 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7903
7904 * c-common.h (enum c_omp_region_type): Define.
7905
7906 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7907
7908 * c-common.c (shorten_compare): Use wi::to_wide.
7909
7910 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7911
7912 PR middle-end/70626
7913 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7914 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7915 reduction clauses in acc parallel loops.
7916
7917 2016-04-29 Marek Polacek <polacek@redhat.com>
7918
7919 PR c/70852
7920 * c-common.c (warn_for_memset): Check domain before accessing it.
7921
7922 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7923
7924 PR/69089
7925 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7926 "aligned" attribute.
7927
7928 2016-04-28 Jason Merrill <jason@redhat.com>
7929
7930 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7931
7932 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7933 Matthias Klose <doko@debian.org>
7934
7935 * c-common.c (get_source_date_epoch): New function, gets the environment
7936 variable SOURCE_DATE_EPOCH and parses it as long long with error
7937 handling.
7938 * c-common.h (get_source_date_epoch): Prototype.
7939 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7940
7941 2015-04-27 Ryan Burn <contact@rnburn.com>
7942
7943 PR c++/69024
7944 PR c++/68997
7945 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7946 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7947 external linkage.
7948 (cilk_detect_and_unwrap): Corresponding changes.
7949 (extract_free_variables): Don't extract free variables from
7950 AGGR_INIT_EXPR slot.
7951 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7952 (cilk_recognize_spawn): Likewise.
7953
7954 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7955
7956 * c.opt (Wmemset-elt-size): New option.
7957 * c-common.c (warn_for_memset): New function.
7958 * c-common.h (warn_for_memset): Declare.
7959
7960 2016-04-25 Jason Merrill <jason@redhat.com>
7961
7962 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7963 No longer static.
7964 * c-common.h: Declare it.
7965 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7966
7967 2016-04-22 Jason Merrill <jason@redhat.com>
7968
7969 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7970
7971 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7972
7973 PR c++/69363
7974 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7975 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7976
7977 2016-04-18 Michael Matz <matz@suse.de>
7978
7979 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7980 and SET_DECL_ALIGN.
7981
7982 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7983
7984 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7985 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7986 to incomplete types.
7987 (dump_nested_type): Remove redundant tests and tidy up.
7988 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7989 a type which is the typedef of an original type.
7990
7991 2016-04-15 Marek Polacek <polacek@redhat.com>
7992
7993 PR c/70651
7994 * c-common.c (build_va_arg): Change two asserts into errors and return
7995 error_mark_node.
7996
7997 2016-04-13 Marek Polacek <polacek@redhat.com>
7998
7999 PR c++/70639
8000 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
8001 for switch statements, too.
8002
8003 2016-03-28 Jason Merrill <jason@redhat.com>
8004
8005 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
8006
8007 2016-03-23 Marek Polacek <polacek@redhat.com>
8008
8009 PR c++/69884
8010 * c.opt (Wignored-attributes): New option.
8011
8012 2016-03-22 David Malcolm <dmalcolm@redhat.com>
8013
8014 PR c/69993
8015 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
8016 diagnostic text, reversing the order of the warning and note so
8017 that they appear in source order.
8018
8019 2016-03-17 Marek Polacek <polacek@redhat.com>
8020
8021 PR c/69407
8022 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
8023 operations.
8024
8025 2016-03-14 Jason Merrill <jason@redhat.com>
8026
8027 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
8028
8029 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
8030
8031 2016-03-09 Richard Biener <rguenther@suse.de>
8032
8033 PR c/70143
8034 * c-common.c (strict_aliasing_warning): Add back
8035 alias_sets_conflict_p check.
8036
8037 2016-03-08 Jason Merrill <jason@redhat.com>
8038
8039 * c-opts.c (set_std_cxx1z): Don't enable concepts.
8040
8041 2016-03-04 David Malcolm <dmalcolm@redhat.com>
8042
8043 PR c/68187
8044 * c-indentation.c (get_visual_column): Move code to determine next
8045 tab stop to...
8046 (next_tab_stop): ...this new function.
8047 (line_contains_hash_if): Delete function.
8048 (detect_preprocessor_logic): Delete function.
8049 (get_first_nws_vis_column): New function.
8050 (detect_intervening_unindent): New function.
8051 (should_warn_for_misleading_indentation): Replace call to
8052 detect_preprocessor_logic with a call to
8053 detect_intervening_unindent.
8054
8055 2016-03-04 David Malcolm <dmalcolm@redhat.com>
8056
8057 PR c/68187
8058 * c-indentation.c (should_warn_for_misleading_indentation): When
8059 suppressing warnings about cases where the guard and body are on
8060 the same column, only use the first non-whitespace column in place
8061 of the guard token column when dealing with "else" clauses.
8062 When rejecting aligned BODY and NEXT, loosen the requirement
8063 from equality with the first non-whitespace of guard to simply
8064 that they not be indented relative to it.
8065
8066 2016-03-04 Richard Biener <rguenther@suse.de>
8067
8068 PR c++/70054
8069 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
8070 instead of alias_sets_conflict_p.
8071
8072 2016-03-01 Marek Polacek <polacek@redhat.com>
8073
8074 PR c++/69795
8075 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
8076 any DECL.
8077
8078 2016-02-22 Martin Sebor <msebor@redhat.com>
8079
8080 PR middle-end/69780
8081 * c-common.c (check_builtin_function_arguments): Validate and
8082 reject invalid arguments to __builtin_alloca_with_align.
8083
8084 2016-02-20 Mark Wielaard <mjw@redhat.com>
8085
8086 PR c/28901
8087 * c.opt (Wunused-const-variable): Turn into Alias for...
8088 (Wunused-const-variable=): New option.
8089
8090 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8091
8092 PR c++/69865
8093 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
8094 here...
8095 (c_common_init_options): ...to here.
8096 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
8097
8098 2016-02-19 Jakub Jelinek <jakub@redhat.com>
8099
8100 PR c++/69826
8101 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
8102 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
8103 flag_preprocess_only.
8104
8105 2016-02-16 Jakub Jelinek <jakub@redhat.com>
8106
8107 PR c/69835
8108 * c.opt (Wnonnull-compare): Enable for -Wall.
8109
8110 2016-02-15 Jakub Jelinek <jakub@redhat.com>
8111
8112 PR c++/69797
8113 * c-common.c (sync_resolve_size): Diagnose too few arguments
8114 even when params is non-NULL empty vector.
8115
8116 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
8117
8118 PR target/60410
8119 * c.opt (fshort-double): Remove.
8120
8121 2016-02-05 Martin Sebor <msebor@redhat.com>
8122
8123 PR c++/69662
8124 * c.opt (Warning options): Update -Wplacement-new to take
8125 an optional argument.
8126
8127 2016-02-01 Jakub Jelinek <jakub@redhat.com>
8128
8129 PR preprocessor/69543
8130 PR c/69558
8131 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8132 instead of loc to control_warning_option.
8133
8134 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8135
8136 * c.opt (fopenacc-dim=): New option.
8137
8138 2016-01-27 Ryan Burn <contact@rnburn.com>
8139
8140 PR cilkplus/69267
8141 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8142 gimplify_arg. Removed superfluous post_p argument.
8143 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8144 superfluous post_p argument.
8145 * c-gimplify.c (c_gimplify_expr): Likewise.
8146
8147 2016-01-26 David Malcolm <dmalcolm@redhat.com>
8148
8149 PR other/69006
8150 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8151 pp_newline_and_flush with pp_flush.
8152
8153 2016-01-20 Martin Sebor <msebor@redhat.com>
8154
8155 PR c/69405
8156 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8157 an incompatible argument when the argument isn't a valid tree node.
8158
8159 2016-01-18 Jason Merrill <jason@redhat.com>
8160
8161 PR c++/68767
8162 * c-common.c (check_function_arguments_recurse): Fold the whole
8163 COND_EXPR, not just the condition.
8164
8165 2016-01-18 Tom de Vries <tom@codesourcery.com>
8166
8167 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8168 classify as loop clause.
8169
8170 2016-01-15 Jakub Jelinek <jakub@redhat.com>
8171
8172 PR bootstrap/68271
8173 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8174 C++ FE no longer has limit on number of pragmas.
8175
8176 2015-01-14 Ryan Burn <contact@rnburn.com>
8177
8178 PR c++/69048
8179 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
8180 to add missing cleanup point.
8181
8182 2016-01-14 David Malcolm <dmalcolm@redhat.com>
8183
8184 PR c++/68819
8185 * c-indentation.c (get_visual_column): Add location_t param.
8186 Handle the column number being zero by effectively disabling the
8187 warning, with an "inform".
8188 (should_warn_for_misleading_indentation): Add location_t argument
8189 for all uses of get_visual_column.
8190
8191 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8192
8193 PR c++/69029
8194 * c-indentation.c (should_warn_for_misleading_indentation):
8195 Don't warn about do-while statements.
8196
8197 2016-01-07 Martin Sebor <msebor@redhat.com>
8198
8199 PR c/68966
8200 * c-common.c (sync_resolve_size): Reject first argument when it's
8201 a pointer to _Bool.
8202
8203 2016-01-05 David Malcolm <dmalcolm@redhat.com>
8204
8205 PR c/69122
8206 * c-indentation.c (get_visual_column): Remove default argument.
8207 (should_warn_for_misleading_indentation): For the multiline case,
8208 update call to get_visual_column for next_stmt_exploc so that it
8209 captures the location of the first non-whitespace character in the
8210 relevant line. Don't issue warnings if there is non-whitespace
8211 before the next statement.
8212
8213 2016-01-04 Jakub Jelinek <jakub@redhat.com>
8214
8215 Update copyright years.
8216
8217 2015-12-21 David Malcolm <dmalcolm@redhat.com>
8218
8219 * c-common.c (binary_op_error): Convert first param from
8220 location_t to rich_location * and use it when emitting an error.
8221 * c-common.h (binary_op_error): Convert first param from
8222 location_t to rich_location *.
8223
8224 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8225
8226 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8227 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8228
8229 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8230
8231 * c-common.c (c_common_attribute_table): Handle "omp declare target
8232 link" attribute.
8233
8234 2015-12-14 Jakub Jelinek <jakub@redhat.com>
8235
8236 PR c/68833
8237 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8238
8239 2014-12-12 Tobias Burnus <burnus@net-b.de>
8240
8241 PR fortran/68815
8242 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8243 specifiers (%d, %i,%u and %c).
8244
8245 2015-12-10 David Malcolm <dmalcolm@redhat.com>
8246
8247 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8248
8249 2015-12-08 Jakub Jelinek <jakub@redhat.com>
8250
8251 PR c/48088
8252 PR c/68657
8253 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8254 * c-pragma.c (handle_pragma_diagnostic): Adjust
8255 control_warning_option caller.
8256
8257 2015-12-07 David Malcolm <dmalcolm@redhat.com>
8258
8259 * c-common.c (c_cpp_error): Update for change to
8260 rich_location::set_range.
8261
8262 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
8263
8264 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8265 shifting 1 out of the sign bit.
8266
8267 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8268
8269 * c-common.c (c_common_attribute_table[]): Update max arguments
8270 count for "simd" attribute.
8271 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8272
8273 2015-12-03 Jakub Jelinek <jakub@redhat.com>
8274
8275 PR preprocessor/57580
8276 * c-ppoutput.c (print): Change printed field to bool.
8277 Move src_file last for smaller padding.
8278 (init_pp_output): Set print.printed to false instead of 0.
8279 (scan_translation_unit): Fix up formatting. Set print.printed
8280 to true after printing something other than newline.
8281 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8282 (maybe_print_line_1): Set print.printed to false instead of 0.
8283 (print_line_1): Likewise.
8284 (do_line_change): Set print.printed to true instead of 1.
8285 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8286 dump_macro): Set print.printed to false after printing newline.
8287
8288 2015-12-02 Jason Merrill <jason@redhat.com>
8289
8290 * c-common.c (fold_for_warn): New.
8291 (warn_logical_operator, warn_tautological_cmp)
8292 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8293
8294 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8295 (c_fully_fold_internal, decl_constant_value_for_optimization):
8296 Move to c/c-fold.c.
8297 * c-common.h: Don't declare decl_constant_value_for_optimization.
8298
8299 2015-12-02 Joseph Myers <joseph@codesourcery.com>
8300
8301 PR c/68162
8302 * c-common.h (c_build_qualified_type): Add extra default
8303 arguments.
8304
8305 2015-12-01 Julian Brown <julian@codesourcery.com>
8306 Cesar Philippidis <cesar@codesourcery.com>
8307 James Norris <James_Norris@mentor.com>
8308
8309 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8310 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8311 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8312
8313 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8314
8315 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8316 (decl_sloc_common): Delete and move bulk of processing to...
8317 (decl_sloc): ...here.
8318 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8319 (dump_ada_double_name): Remove S parameter and compute the suffix.
8320 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8321 element type and deal with an anonymous one.
8322 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8323 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8324 and remove reference to QUAL_UNION_TYPE.
8325 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8326 (dump_nested_type): ...here. New function extracted from above.
8327 Generate a full declaration for anonymous element type of arrays.
8328 (print_ada_declaration): Really skip anonymous declarations. Remove
8329 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8330 Clean up processing of declarations of array types and objects.
8331 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8332 Remove obsolete code and tidy up.
8333
8334 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
8335
8336 PR c/67581
8337 * c-common.c (handle_transparent_union_attribute): Update
8338 also type variants.
8339
8340 2015-11-27 Martin Liska <mliska@suse.cz>
8341
8342 PR c++/68312
8343 * array-notation-common.c (cilkplus_extract_an_triplets):
8344 Release vector of vectors.
8345 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8346
8347 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8348
8349 PR c++/68527
8350 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8351 (print_ada_struct_decl): Likewise.
8352
8353 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8354
8355 PR c++/68001
8356 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8357 * cilk.c (recognize_spawn): Determine location in a more precise
8358 way.
8359
8360 2015-11-19 Jason Merrill <jason@redhat.com>
8361
8362 * c-common.c (shorten_compare): But look through macros from
8363 system headers.
8364
8365 2015-11-18 Jason Merrill <jason@redhat.com>
8366
8367 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8368 non-constant operand comes from a macro.
8369
8370 2015-11-17 Jason Merrill <jason@redhat.com>
8371
8372 PR bootstrap/68346
8373 * c-common.c (warn_tautological_cmp): Fold before checking for
8374 constants.
8375
8376 2015-11-16 Marek Polacek <polacek@redhat.com>
8377
8378 PR c++/68362
8379 * c-common.c (check_case_bounds): Fold low and high cases.
8380
8381 2015-11-16 Marek Polacek <polacek@redhat.com>
8382
8383 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8384 * c-common.c (c_common_get_alias_set): Likewise.
8385 (handle_visibility_attribute): Likewise.
8386
8387 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8388
8389 * c-common.c (handle_simd_attribute): New.
8390 (struct attribute_spec): Add entry for "simd".
8391 (handle_simd_attribute): New.
8392
8393 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
8394
8395 * c-lex.c (interpret_float): Use fold_convert.
8396
8397 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8398
8399 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8400 and store it on the result.
8401 * c-opts.c (c_common_init_options): Set
8402 global_dc->colorize_source_p.
8403
8404 2015-11-12 James Norris <jnorris@codesourcery.com>
8405 Joseph Myers <joseph@codesourcery.com>
8406
8407 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
8408 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8409 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8410 PRAGMA_OACC_CLAUSE_LINK.
8411
8412 2015-11-11 Marek Polacek <polacek@redhat.com>
8413
8414 PR c/68107
8415 PR c++/68266
8416 * c-common.c (valid_array_size_p): New function.
8417 * c-common.h (valid_array_size_p): Declare.
8418
8419 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
8420
8421 PR bootstrap/68271
8422 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8423
8424 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
8425
8426 * array-notation-common.c: Remove unused header files.
8427 * c-ada-spec.c: Likewise.
8428 * c-cilkplus.c: Likewise.
8429 * c-common.c: Likewise.
8430 * c-cppbuiltin.c: Likewise.
8431 * c-dump.c: Likewise.
8432 * c-format.c: Likewise.
8433 * c-gimplify.c: Likewise.
8434 * c-indentation.c: Likewise.
8435 * c-lex.c: Likewise.
8436 * c-omp.c: Likewise.
8437 * c-opts.c: Likewise.
8438 * c-pch.c: Likewise.
8439 * c-ppoutput.c: Likewise.
8440 * c-pragma.c: Likewise.
8441 * c-pretty-print.c: Likewise.
8442 * c-semantics.c: Likewise.
8443 * c-ubsan.c: Likewise.
8444 * cilk.c: Likewise.
8445 * stub-objc.c: Likewise.
8446
8447 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8448 Cesar Philippidis <cesar@codesourcery.com>
8449 James Norris <jnorris@codesourcery.com>
8450 Julian Brown <julian@codesourcery.com>
8451 Nathan Sidwell <nathan@codesourcery.com>
8452
8453 * c-pragma.c (oacc_pragmas): Add "routine".
8454 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8455
8456 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8457
8458 * c-common.c (c_common_attributes): Add scalar_storage_order.
8459 (handle_scalar_storage_order_attribute): New function.
8460 * c-pragma.c (global_sso): New variable.
8461 (maybe_apply_pragma_scalar_storage_order): New function.
8462 (handle_pragma_scalar_storage_order): Likewise.
8463 (init_pragma): Register scalar_storage_order.
8464 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8465 * c.opt (Wscalar-storage-order): New warning.
8466 (fsso-struct=): New option.
8467
8468 2015-11-08 Martin Sebor <msebor@redhat.com>
8469
8470 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8471
8472 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8473
8474 * c-common.c: Don't undef DEF_BUILTIN.
8475
8476 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8477
8478 * c-common.c (c_cpp_error): Convert parameter from location_t to
8479 rich_location *. Eliminate the "column_override" parameter and
8480 the call to diagnostic_override_column.
8481 Update the "done_lexing" clause to set range 0
8482 on the rich_location, rather than overwriting a location_t.
8483 * c-common.h (c_cpp_error): Convert parameter from location_t to
8484 rich_location *. Eliminate the "column_override" parameter.
8485
8486 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8487 Thomas Schwinge <thomas@codesourcery.com>
8488 James Norris <jnorris@codesourcery.com>
8489
8490 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8491 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8492 clauses with parallel and kernels and loops.
8493 * c-pragma.h (enum pragma_omp_clause): Add entries for
8494 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8495 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8496 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8497 INDEPENDENT,SEQ}.
8498 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8499
8500 2015-11-05 Martin Sebor <msebor@redhat.com>
8501
8502 PR c++/67942
8503 * c.opt (-Wplacement-new): New option.
8504
8505 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8506
8507 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8508 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8509 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8510 save_expr or create_tmp_var* if TEST is true.
8511 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8512 Don't call add_stmt here.
8513 (struct c_omp_check_loop_iv_data): New type.
8514 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8515 c_omp_check_loop_iv_exprs): New functions.
8516 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8517 distribute.
8518 (c_omp_declare_simd_clauses_to_numbers): Change
8519 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8520 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8521 from numbers to PARM_DECLs.
8522
8523 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8524
8525 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8526 flag_checking.
8527
8528 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
8529
8530 PR c++-common/67882
8531 * c-common.h (fold_offsetof_1): Add argument.
8532 * c-common.c (fold_offsetof_1): Diagnose more invalid
8533 offsetof expressions that reference elements past the end of
8534 an array.
8535
8536 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8537 Chung-Lin Tang <cltang@codesourcery.com>
8538
8539 * c-pragma.c (oacc_pragmas): Add "atomic".
8540 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8541
8542 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8543
8544 * c-common.c (handle_target_clones_attribute): New.
8545 (c_common_attribute_table): Add handle_target_clones_attribute.
8546 (handle_always_inline_attribute): Add check on target_clones attribute.
8547 (handle_target_attribute): Ditto.
8548
8549 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8550
8551 * array-notation-common.c: Reorder #include's and remove duplicates.
8552 * c-ada-spec.c: Likewise.
8553 * c-cilkplus.c: Likewise.
8554 * c-common.c: Likewise.
8555 * c-cppbuiltin.c: Likewise.
8556 * c-dump.c: Likewise.
8557 * c-format.c: Likewise.
8558 * c-gimplify.c: Likewise.
8559 * c-indentation.c: Likewise.
8560 * c-lex.c: Likewise.
8561 * c-omp.c: Likewise.
8562 * c-opts.c: Likewise.
8563 * c-pch.c: Likewise.
8564 * c-ppoutput.c: Likewise.
8565 * c-pragma.c: Likewise.
8566 * c-pretty-print.c: Likewise.
8567 * c-semantics.c: Likewise.
8568 * c-ubsan.c: Likewise.
8569 * cilk.c: Likewise.
8570 * stub-objc.c: Likewise.
8571
8572 2015-10-28 Jason Merrill <jason@redhat.com>
8573
8574 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8575
8576 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8577 James Norris <jnorris@codesourcery.com>
8578 Cesar Philippidis <cesar@codesourcery.com>
8579
8580 PR c/64765
8581 PR c/64880
8582 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8583 * c-omp.c (c_oacc_split_loop_clauses): New function.
8584
8585 2015-10-21 Martin Sebor <msebor@redhat.com>
8586
8587 PR driver/68043
8588 * c.opt: End each sentence that describes an option with a period.
8589
8590 2015-10-20 Marek Polacek <polacek@redhat.com>
8591
8592 * array-notation-common.c (is_cilkplus_vector_p): Define.
8593 * c-common.h (is_cilkplus_vector_p): Declare.
8594
8595 2015-10-20 Marek Polacek <polacek@redhat.com>
8596
8597 * c.opt (std=gnu++11): Do not describe as experimental.
8598 (std=gnu++14): Likewise.
8599
8600 2015-10-19 Jason Merrill <jason@redhat.com>
8601
8602 * c-cppbuiltin.c (c_cpp_builtins): Define
8603 __cpp_nontype_template_args.
8604
8605 2015-10-19 Jason Merrill <jason@redhat.com>
8606
8607 * c-cppbuiltin.c (c_cpp_builtins): Define
8608 __cpp_enumerator_attributes, __cpp_fold_expressions,
8609 __cpp_unicode_characters.
8610
8611 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8612 Aldy Hernandez <aldyh@redhat.com>
8613
8614 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8615 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8616 (c_define_builtins): Likewise.
8617 * c-common.h (enum c_omp_clause_split): Add
8618 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8619 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8620 (c_finish_omp_for): Add ORIG_DECLV argument.
8621 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8622 201511 instead of 201307.
8623 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8624 OMP_CRITICAL_CLAUSES to it.
8625 (c_finish_omp_ordered): Add CLAUSES argument, set
8626 OMP_ORDERED_CLAUSES to it.
8627 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8628 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8629 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8630 constructs and new OpenMP 4.5 clauses. Clear
8631 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8632 verification code.
8633 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8634 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8635 (enum pragma_omp_clause): Add
8636 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8637 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8638
8639 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8640
8641 * c-lex.c (interpret_float): Use real_equal instead of
8642 REAL_VALUES_EQUAL.
8643
8644 2015-10-04 Jason Merrill <jason@redhat.com>
8645
8646 Implement N4514, C++ Extensions for Transactional Memory.
8647 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8648 (c_common_attribute_table): Add transaction_safe_dynamic.
8649 transaction_safe now affects type identity.
8650 (handle_tm_attribute): Handle transaction_safe_dynamic.
8651 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8652 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8653 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8654 (D_TRANSMEM): New.
8655 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8656 * c-pretty-print.c (pp_c_attributes_display): Don't print
8657 transaction_safe in C++.
8658
8659 2015-10-02 Marek Polacek <polacek@redhat.com>
8660
8661 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8662
8663 2015-10-02 Marek Polacek <polacek@redhat.com>
8664
8665 PR c/64249
8666 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8667 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8668 * c.opt (Wduplicated-cond): New option.
8669
8670 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8671
8672 * c.opt (std=c11): Do not describe as experimental.
8673 (std=gnu11): Likewise.
8674 (std=iso9899:2011): Likewise.
8675
8676 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8677
8678 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8679 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8680
8681 2015-09-25 Marek Polacek <polacek@redhat.com>
8682
8683 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8684 (ubsan_instrument_shift): Likewise.
8685
8686 2015-09-25 Marek Polacek <polacek@redhat.com>
8687
8688 PR sanitizer/64906
8689 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8690
8691 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8692
8693 * c-indentation.c (should_warn_for_misleading_indentation):
8694 Compare next_stmt_vis_column with guard_line_first_nws instead
8695 of with guard_line_vis_column.
8696
8697 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8698
8699 PR c/49654
8700 PR c/49655
8701 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8702 options and options not valid for the current language.
8703
8704 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8705
8706 * c-indentation.c (should_warn_for_misleading_indentation):
8707 Float out and consolidate the calls to get_visual_column that
8708 are passed guard_exploc as an argument. Compare
8709 next_stmt_vis_column with guard_line_first_nws instead of with
8710 body_line_first_nws.
8711
8712 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8713
8714 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8715 Wnamespaces): New C++ warnings.
8716
8717 2015-09-22 Jason Merrill <jason@redhat.com>
8718
8719 * c-common.h (abi_compat_version_crosses): New.
8720 (warn_abi_version): Declare.
8721 * c-common.c: Define it.
8722 * c-opts.c (c_common_post_options): Handle it.
8723 flag_abi_compat_version defaults to 8.
8724
8725 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8726
8727 Complete the implementation of N4230, Nested namespace definition.
8728 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8729 __cpp_nested_namespace_definitions.
8730
8731 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8732
8733 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8734
8735 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8736
8737 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8738 when warning.
8739 * c-pragma.h (pragma_lex): Add optional loc argument.
8740
8741 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8742
8743 * c-format.c (check_format_arg): Adjust to use common block size in all
8744 object pools.
8745
8746 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8747
8748 * c-format.c (location_from_offset): Update for change in
8749 signature of location_get_source_line.
8750 * c-indentation.c (get_visual_column): Likewise.
8751 (line_contains_hash_if): Likewise.
8752
8753 2015-09-14 Marek Polacek <polacek@redhat.com>
8754
8755 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8756 setting various warnings.
8757
8758 2015-09-14 Marek Polacek <polacek@redhat.com>
8759
8760 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8761 a negative value.
8762
8763 2015-09-11 Mark Wielaard <mjw@redhat.com>
8764
8765 PR c/28901
8766 * c.opt (Wunused-variable): Option from common.opt.
8767 (Wunused-const-variable): New option.
8768
8769 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8770
8771 PR c++/53184
8772 * c.opt ([Wsubobject-linkage]): Add.
8773
8774 2015-09-03 Martin Sebor <msebor@redhat.com>
8775
8776 PR c/66516
8777 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8778 functions.
8779 * c-common.c (reject_gcc_builtin): Define.
8780
8781 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8782
8783 PR middle-end/60586
8784 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8785 prototype.
8786 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8787 cilk_gimplify_call_params_in_spawned_fn.
8788 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8789 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8790 unwrapping.
8791
8792 2015-08-25 Marek Polacek <polacek@redhat.com>
8793
8794 PR middle-end/67330
8795 * c-common.c (handle_weak_attribute): Don't check whether the
8796 visibility can be changed here.
8797
8798 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8799
8800 * c-lex.c (c_lex_with_flags): Use explicit locations.
8801
8802 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8803
8804 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8805 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8806
8807 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8808
8809 PR middle-end/36757
8810 * c-common.c (check_builtin_function_arguments): Add check
8811 for BUILT_IN_SIGNBIT argument.
8812
8813 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8814
8815 PR c++/67160
8816 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8817 in c++1z mode.
8818
8819 2015-08-17 Marek Polacek <polacek@redhat.com>
8820
8821 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8822 with whitespaces before qualifier names.
8823
8824 2015-08-12 Marek Polacek <polacek@redhat.com>
8825
8826 PR c++/55095
8827 * c-common.c (maybe_warn_shift_overflow): Properly handle
8828 left-shifting 1 into the sign bit.
8829
8830 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8831
8832 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8833
8834 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8835 Braden Obrzut <admin@maniacsvault.net>
8836 Jason Merrill <jason@redhat.com>
8837
8838 Add C++ Concepts TS support.
8839 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8840 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8841 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8842 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8843 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8844 * c.opt (fconcepts): New.
8845
8846 2015-08-02 Martin Sebor <msebor@redhat.com>
8847
8848 * c.opt (-Wframe-address): New warning option.
8849
8850 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8851
8852 * c-indentation.c (should_warn_for_misleading_indentation):
8853 Improve heuristics.
8854
8855 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8856
8857 * c-indentation.c (get_visual_column): Add parameter first_nws,
8858 use it. Update comment documenting the function.
8859 (is_first_nonwhitespace_on_line): Remove.
8860 (should_warn_for_misleading_indentation): Replace usage of
8861 of is_first_nonwhitespace_on_line with get_visual_column.
8862
8863 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8864
8865 * c-indentation.h (struct token_indent_info): Define.
8866 (get_token_indent_info): Define.
8867 (warn_for_misleading_information): Declare.
8868 * c-common.h (warn_for_misleading_information): Remove.
8869 * c-identation.c (warn_for_misleading_indentation):
8870 Change declaration to take three token_indent_infos. Adjust
8871 accordingly.
8872 * c-identation.c (should_warn_for_misleading_indentation):
8873 Likewise. Bail out early if the body is a compound statement.
8874 (guard_tinfo_to_string): Define.
8875
8876 2015-07-30 Jason Merrill <jason@redhat.com>
8877
8878 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8879 '*' for reference decay.
8880
8881 2015-07-30 Marek Polacek <polacek@redhat.com>
8882
8883 * c-common.c (warn_tautological_cmp): Bail for float types.
8884
8885 2015-07-27 Marek Polacek <polacek@redhat.com>
8886
8887 PR bootstrap/67030
8888 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8889
8890 2015-07-27 Marek Polacek <polacek@redhat.com>
8891
8892 PR c++/66555
8893 PR c/54979
8894 * c-common.c (find_array_ref_with_const_idx_r): New function.
8895 (warn_tautological_cmp): New function.
8896 * c-common.h (warn_tautological_cmp): Declare.
8897 * c.opt (Wtautological-compare): New option.
8898
8899 2015-07-23 Marek Polacek <polacek@redhat.com>
8900
8901 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8902 (ubsan_instrument_shift): Likewise.
8903
8904 2015-07-23 Marek Polacek <polacek@redhat.com>
8905
8906 PR sanitizer/66908
8907 * c-ubsan.c: Include gimplify.h.
8908 (ubsan_instrument_division): Unshare OP0 and OP1.
8909 (ubsan_instrument_shift): Likewise.
8910
8911 2015-07-20 Marek Polacek <polacek@redhat.com>
8912 Richard Sandiford <richard.sandiford@arm.com>
8913
8914 PR c++/55095
8915 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8916 Use EXPR_LOC_OR_LOC.
8917 (maybe_warn_shift_overflow): New function.
8918 * c-common.h (maybe_warn_shift_overflow): Declare.
8919 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8920 * c.opt (Wshift-overflow): New option.
8921
8922 2015-07-16 Martin Liska <mliska@suse.cz>
8923
8924 * c-format.c (static void check_format_info_main): Use
8925 object_allocator instead of pool_allocator.
8926 (check_format_arg): Likewise.
8927 (check_format_info_main): Likewise.
8928
8929 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8930
8931 * c-opts.c: Remove multiline #include comment.
8932
8933 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8934
8935 * c-common.c: Fix double word typos.
8936
8937 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8938
8939 * c-ada-spec.h (cpp_operation): Revert latest change.
8940 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8941 constructors and destructors.
8942
8943 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8944
8945 * c-common.h: Adjust includes for flags.h changes.
8946 * stub-objc.c: Likewise.
8947
8948 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8949
8950 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8951 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8952
8953 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8954
8955 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8956 are to be removed, return NULL rather than original clauses list.
8957
8958 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8959
8960 * array-notation-common.c: Adjust includes.
8961 * c-ada-spec.c: Likewise.
8962 * c-cilkplus.c: Likewise.
8963 * c-common.h: Likewise.
8964 * c-cppbuiltin.c: Likewise.
8965 * c-dump.c: Likewise.
8966 * c-format.c: Likewise.
8967 * c-gimplify.c: Likewise.
8968 * c-indentation.c: Likewise.
8969 * c-lex.c: Likewise.
8970 * c-omp.c: Likewise.
8971 * c-opts.c: Likewise.
8972 * c-pch.c: Likewise.
8973 * c-ppoutput.c: Likewise.
8974 * c-pragma.c: Likewise.
8975 * c-pretty-print.c: Likewise.
8976 * c-semantics.c: Likewise.
8977 * c-ubsan.c: Likewise.
8978 * cilk.c: Likewise.
8979 * stub-objc.c: Likewise.
8980
8981 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8982
8983 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8984 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8985
8986 2015-07-01 Jason Merrill <jason@redhat.com>
8987
8988 * c-common.h (D_CXX11): Rename from D_CXX0X.
8989 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8990 * c-common.c: Adjust.
8991
8992 * c-opts.c (c_common_post_options): Default to C++14.
8993
8994 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8995
8996 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8997
8998 Implement N4197 - Adding u8 character literals
8999 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
9000 CPP_CHAR.
9001 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
9002 CPP_UTF8CHAR_USERDEF tokens.
9003 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
9004 and CPP_UTF8CHAR tokens.
9005 (lex_charconst): Treat CPP_UTF8CHAR token.
9006
9007 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9008
9009 PR fortran/66605
9010 * c-common.c (do_warn_unused_parameter): Move here.
9011 * c-common.h (do_warn_unused_parameter): Declare.
9012
9013 2015-06-29 Marek Polacek <polacek@redhat.com>
9014
9015 PR c/66322
9016 * c-common.c (check_case_bounds): Add bool * parameter. Set
9017 OUTSIDE_RANGE_P.
9018 (c_add_case_label): Add bool * parameter. Pass it down to
9019 check_case_bounds.
9020 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
9021 warning here.
9022 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
9023 declarations.
9024
9025 2015-06-27 Marek Polacek <polacek@redhat.com>
9026
9027 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
9028 or VECTOR_INTEGER_TYPE_P throughout.
9029 * c-gimplify.c: Likewise.
9030
9031 2015-06-26 Marek Polacek <polacek@redhat.com>
9032
9033 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
9034 * c-common.c (c_fully_fold_internal): Likewise.
9035 (c_alignof_expr): Likewise.
9036 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
9037 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
9038 * cilk.c (create_parm_list): Likewise.
9039
9040 2015-06-26 Marek Polacek <polacek@redhat.com>
9041
9042 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
9043
9044 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9045
9046 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
9047 * c-gimplify.c: Likewise.
9048 * c-pragma.c: Likewise.
9049 * c-ubsan.c: Likewise.
9050 * cilk.c: Likewise.
9051
9052 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
9053
9054 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
9055 ggc_hasher.
9056
9057 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9058
9059 * cilk.c: Move calls.h after tm.h in the include chain.
9060
9061 2015-06-25 Marek Polacek <polacek@redhat.com>
9062
9063 * array-notation-common.c: Use VAR_P throughout.
9064 * c-ada-spec.c: Likewise.
9065 * c-common.c: Likewise.
9066 * c-format.c: Likewise.
9067 * c-gimplify.c: Likewise.
9068 * c-omp.c: Likewise.
9069 * c-pragma.c: Likewise.
9070 * c-pretty-print.c: Likewise.
9071 * cilk.c: Likewise.
9072
9073 2015-06-25 Marek Polacek <polacek@redhat.com>
9074
9075 * cilk.c (extract_free_variables): Use is_global_var.
9076
9077 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
9078
9079 * c-common.c: Don't include target-def.h.
9080
9081 2015-06-23 Marek Polacek <polacek@redhat.com>
9082
9083 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
9084 when comparing INTEGER_CSTs.
9085
9086 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
9087
9088 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
9089 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
9090 (dump_ada_template): Skip partially specialized types.
9091
9092 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
9093
9094 * c-common.c (scalar_to_vector): Use std::swap instead of manually
9095 swapping.
9096
9097 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
9098
9099 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
9100 * c-ada-spec.c: Likewise.
9101 * c-cilkplus.c: Likewise.
9102 * c-common.c: Likewise.
9103 * c-common.h: Likewise.
9104 * c-cppbuiltin.c: Likewise.
9105 * c-dump.c: Likewise.
9106 * c-format.c: Likewise.
9107 * c-gimplify.c: Likewise.
9108 * c-indentation.c: Likewise.
9109 * c-lex.c: Likewise.
9110 * c-omp.c: Likewise.
9111 * c-opts.c: Likewise.
9112 * c-pch.c: Likewise.
9113 * c-ppoutput.c: Likewise.
9114 * c-pragma.c: Likewise.
9115 * c-pretty-print.c: Likewise.
9116 * c-semantics.c: Likewise.
9117 * c-ubsan.c: Likewise.
9118 * cilk.c: Likewise.
9119 * stub-objc.c: Likewise.
9120
9121 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
9122
9123 PR c++/65168
9124 * c-common.c (c_common_truthvalue_conversion): Warn when
9125 converting an address of a reference to a truth value.
9126
9127 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
9128
9129 * array-notation-common.c : Adjust include files.
9130 * c-ada-spec.c : Likewise.
9131 * c-cilkplus.c : Likewise.
9132 * c-common.c : Likewise.
9133 * c-common.h : Likewise.
9134 * c-cppbuiltin.c : Likewise.
9135 * c-dump.c : Likewise.
9136 * c-format.c : Likewise.
9137 * c-gimplify.c : Likewise.
9138 * c-indentation.c : Likewise.
9139 * c-lex.c : Likewise.
9140 * c-omp.c : Likewise.
9141 * c-opts.c : Likewise.
9142 * c-pch.c : Likewise.
9143 * c-ppoutput.c : Likewise.
9144 * c-pragma.c : Likewise.
9145 * c-pretty-print.c : Likewise.
9146 * c-semantics.c : Likewise.
9147 * c-ubsan.c : Likewise.
9148 * cilk.c : Likewise.
9149 * stub-objc.c : Likewise.
9150
9151 2015-06-08 Marek Polacek <polacek@redhat.com>
9152
9153 PR c/66415
9154 * c-format.c (location_from_offset): Return LOC if LINE is null.
9155
9156 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
9157
9158 * c-common.h (c_parse_final_cleanups): New prototype.
9159 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9160
9161 2015-06-04 Sriraman Tallam <tmsriram@google.com>
9162
9163 * c-common.c (noplt): New attribute.
9164 (handle_noplt_attribute): New handler.
9165
9166 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
9167
9168 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9169 * c-ada-spec.c: Likewise.
9170 * c-cilkplus.c: Likewise.
9171 * c-common.c: Likewise.
9172 * c-common.h: Likewise.
9173 * c-cppbuiltin.c: Likewise.
9174 * c-dump.c: Likewise.
9175 * c-format.c: Likewise.
9176 * c-gimplify.c: Likewise.
9177 * c-indentation.c: Likewise.
9178 * c-lex.c: Likewise.
9179 * c-omp.c: Likewise.
9180 * c-opts.c: Likewise.
9181 * c-pch.c: Likewise.
9182 * c-ppoutput.c: Likewise.
9183 * c-pragma.c: Likewise.
9184 * c-pretty-print.c: Likewise.
9185 * c-semantics.c: Likewise.
9186 * c-ubsan.c: Likewise.
9187 * cilk.c: Likewise.
9188 * stub-objc.c: Likewise.
9189
9190 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9191
9192 PR c/66220:
9193 * c-indentation.c (should_warn_for_misleading_indentation): Use
9194 expand_location rather than expand_location_to_spelling_point.
9195 Don't warn if the guarding statement is more indented than the
9196 next/body stmts.
9197
9198 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9199
9200 * c-indentation.c (warn_for_misleading_indentation): Bail out
9201 immediately if -Wmisleading-indentation isn't enabled.
9202
9203 2015-06-01 Martin Liska <mliska@suse.cz>
9204
9205 * c-format.c (check_format_arg):Use new type-based pool allocator.
9206 (check_format_info_main) Likewise.
9207
9208 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9209
9210 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9211 (has_nontrivial_methods): Likewise.
9212
9213 2015-05-25 Marek Polacek <polacek@redhat.com>
9214
9215 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9216
9217 2015-05-22 Marek Polacek <polacek@redhat.com>
9218
9219 PR c/47043
9220 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9221
9222 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9223
9224 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9225 STACK_GROWS_DOWNWARD.
9226
9227 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9228
9229 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9230 STACK_GROWS_DOWNWARD rather than if it is defined.
9231
9232 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9233
9234 PR c/52952
9235 * c-format.c (location_column_from_byte_offset): New.
9236 (location_from_offset): New.
9237 (struct format_wanted_type): Add offset_loc field.
9238 (check_format_info): Move handling of location for extra arguments
9239 closer to the point of warning.
9240 (check_format_info_main): Pass the result of location_from_offset
9241 to warning_at.
9242 (format_type_warning): Pass the result of location_from_offset
9243 to warning_at.
9244
9245 2015-05-20 Marek Polacek <polacek@redhat.com>
9246
9247 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9248
9249 2015-05-20 Marek Polacek <polacek@redhat.com>
9250
9251 * c-ada-spec.c (dump_sloc): Use DECL_P.
9252
9253 2015-05-20 Marek Polacek <polacek@redhat.com>
9254
9255 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9256 * c-common.c: Likewise.
9257
9258 2015-05-19 David Malcolm <dmalcolm@redhat.com>
9259
9260 * c-common.h (fe_file_change): Strengthen param from
9261 const line_map * to const line_map_ordinary *.
9262 (pp_file_change): Likewise.
9263 * c-lex.c (fe_file_change): Likewise.
9264 (cb_define): Use linemap_check_ordinary when invoking
9265 SOURCE_LINE.
9266 (cb_undef): Likewise.
9267 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9268 invoking cb_file_change.
9269 (c_finish_options): Likewise.
9270 (push_command_line_include): Likewise.
9271 (cb_file_change): Strengthen param "new_map" from
9272 const line_map * to const line_map_ordinary *.
9273 * c-ppoutput.c (cb_define): Likewise for local "map".
9274 (pp_file_change): Likewise for param "map" and local "from".
9275
9276 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9277
9278 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9279
9280 2015-05-18 Tom de Vries <tom@codesourcery.com>
9281
9282 * c-common.c (build_va_arg_1): New function.
9283 (build_va_arg): Add address operator to va_list operand if necessary.
9284
9285 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9286
9287 PR c/48956
9288 * c-common.c (int_safely_convertible_to_real_p): Define.
9289 (unsafe_conversion_p): Check conversions involving complex types.
9290 (conversion_warning): Add new warning message for conversions which
9291 discard imaginary component.
9292 * c-common.h: (enum conversion_safety): Add new enumerator for such
9293 conversions.
9294
9295 2015-05-14 Marek Polacek <polacek@redhat.com>
9296
9297 PR c/66066
9298 PR c/66127
9299 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9300 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9301 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9302 use it. If FOR_INT_CONST, require that all evaluated operands be
9303 INTEGER_CSTs.
9304
9305 2015-05-12 David Malcolm <dmalcolm@redhat.com>
9306
9307 * c-common.h (warn_for_misleading_indentation): New prototype.
9308 * c-indentation.c: New file.
9309 * c.opt (Wmisleading-indentation): New option.
9310
9311 2015-05-12 Tom de Vries <tom@codesourcery.com>
9312
9313 PR tree-optimization/66010
9314 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9315
9316 2015-05-09 Jason Merrill <jason@redhat.com>
9317
9318 * c-opts.c (c_common_post_options): Also clear
9319 cpp_opts->cpp_warn_cxx11_compat.
9320
9321 * c-common.h (enum cxx_dialect): Add cxx_unset.
9322 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9323 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9324
9325 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9326 (std=gnu++0x): Mark as Undocumented.
9327 (std=gnu++1y): Add deprecated message.
9328
9329 2015-05-08 Jason Merrill <jason@redhat.com>
9330
9331 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9332 * c-opts.c: Adjust.
9333
9334 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9335
9336 2015-05-08 Marek Polacek <polacek@redhat.com>
9337
9338 PR c/64918
9339 * c.opt (Woverride-init-side-effects): New option.
9340
9341 2015-05-07 Marek Polacek <polacek@redhat.com>
9342
9343 PR c/65179
9344 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9345 negative value.
9346 * c.opt (Wshift-negative-value): New option.
9347 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9348 when -Wextra and C99/C++11 mode.
9349
9350 2015-05-07 Marek Polacek <polacek@redhat.com>
9351 Martin Uecker <uecker@eecs.berkeley.edu>
9352
9353 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9354 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9355
9356 2015-05-05 Jason Merrill <jason@redhat.com>
9357
9358 * c.opt (Wterminate): New.
9359
9360 2015-04-30 Marek Polacek <polacek@redhat.com>
9361
9362 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9363 require that the non-constant be of a boolean type.
9364
9365 2015-04-29 Josh Triplett <josh@joshtriplett.org>
9366
9367 * c-common.c (handle_section_attribute): Refactor to reduce
9368 nesting and distinguish between error cases.
9369
9370 2015-04-29 Marek Polacek <polacek@redhat.com>
9371
9372 PR c/64610
9373 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9374 with 0/1.
9375
9376 2015-04-29 Jakub Jelinek <jakub@redhat.com>
9377
9378 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9379 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9380 HOST_BITS_PER_WIDE_INT.
9381
9382 2015-04-28 Tom de Vries <tom@codesourcery.com>
9383
9384 PR tree-optimization/65887
9385 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9386
9387 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
9388 Pierre-Marie de Rodat <derodat@adacore.com>
9389
9390 * c-ada-spec.c (in_function): Delete.
9391 (dump_generic_ada_node): Do not change in_function and remove the
9392 redundant code dealing with it.
9393 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9394 (print_ada_methods): Output the static member functions in a nested
9395 package after the regular methods as well as associated renamings.
9396
9397 2015-04-24 Marek Polacek <polacek@redhat.com>
9398
9399 PR c/65830
9400 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9401 and OPT_Wshift_count_overflow.
9402
9403 PR c/63357
9404 * c-common.c (warn_logical_operator): Warn if the operands have the
9405 same expressions.
9406
9407 2015-04-24 Marek Polacek <polacek@redhat.com>
9408
9409 PR c/61534
9410 * c-common.c (warn_logical_operator): Bail if either operand comes
9411 from a macro expansion.
9412
9413 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9414
9415 PR target/55143
9416 * c-common.c (c_default_pointer_mode): Add definition.
9417 * c-common.h (c_default_pointer_mode): Add declaration.
9418
9419 2015-03-11 Jakub Jelinek <jakub@redhat.com>
9420
9421 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9422 on record_builtin_type argument.
9423
9424 2015-03-10 Jakub Jelinek <jakub@redhat.com>
9425
9426 PR c/65120
9427 * c-common.c (warn_logical_not_parentheses): Don't warn for
9428 !x == 0 or !x != 0.
9429
9430 2015-03-07 Marek Polacek <polacek@redhat.com>
9431
9432 PR sanitizer/65280
9433 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9434 before trying to figure out whether we have a flexible array member.
9435
9436 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
9437 Jonathan Wakely <jwakely.gcc@gmail.com>
9438
9439 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9440
9441 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9442
9443 PR ada/65319
9444 * c-ada-spec.c (print_destructor): Remove obsolete code.
9445
9446 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9447
9448 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9449 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9450 DECL_TEMPLATE_RESULT emulations.
9451 (dump_ada_template)): Add guard for TYPE_METHODS.
9452
9453 2015-02-27 Marek Polacek <polacek@redhat.com>
9454
9455 PR c/65040
9456 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9457
9458 2015-02-27 Kai Tietz <ktietz@redhat.com>
9459
9460 PR c/35330
9461 * c-pragma.c (handle_pragma_weak): Do not try to create
9462 weak/alias of declarations not being function, or variable
9463 declarations.
9464
9465 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9466
9467 PR libgomp/64625
9468 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9469 Remove macros.
9470 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9471
9472 2015-02-16 Marek Polacek <polacek@redhat.com>
9473
9474 PR c/65066
9475 * c-format.c (check_format_types): Handle null param.
9476
9477 2015-02-13 Marek Polacek <polacek@redhat.com>
9478
9479 PR c/65040
9480 * c-format.c (check_format_types): Don't warn about different
9481 signedness if the original value is in the range of WANTED_TYPE.
9482
9483 2015-02-12 Jason Merrill <jason@redhat.com>
9484
9485 PR c++/64956
9486 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9487 to the current highest version.
9488 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9489
9490 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9491
9492 PR c/64824
9493 PR c/64868
9494 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9495 instead of RDIV_EXPR. Use build_binary_op instead of
9496 build2_loc.
9497
9498 2015-01-30 Joseph Myers <joseph@codesourcery.com>
9499
9500 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9501 to pass input_location as first argument.
9502
9503 2015-01-23 Tom de Vries <tom@codesourcery.com>
9504
9505 PR libgomp/64672
9506 * c.opt (fopenacc): Mark as LTO option.
9507
9508 2015-01-23 Tom de Vries <tom@codesourcery.com>
9509
9510 PR libgomp/64707
9511 * c.opt (fopenmp): Mark as LTO option.
9512
9513 2015-01-21 Jakub Jelinek <jakub@redhat.com>
9514
9515 PR c/63307
9516 * cilk.c (fill_decls_vec): Only put decls into vector v.
9517 (compare_decls): Fix up formatting.
9518
9519 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9520
9521 PR c/63307
9522 * cilk.c: Include vec.h.
9523 (struct cilk_decls): New structure.
9524 (wrapper_parm_cb): Split this function to...
9525 (fill_decls_vec): ...this...
9526 (create_parm_list): ...and this.
9527 (compare_decls): New function.
9528 (for_local_cb): Remove.
9529 (wrapper_local_cb): Ditto.
9530 (build_wrapper_type): For now first traverse and fill vector of
9531 declarations then sort it and then deal with sorted vector.
9532 (cilk_outline): Ditto.
9533 (declare_one_free_variable): Ditto.
9534
9535 2015-01-21 Jason Merrill <jason@redhat.com>
9536
9537 PR c++/64629
9538 * c-format.c (check_format_arg): Call decl_constant_value.
9539
9540 2015-01-19 Martin Liska <mliska@suse.cz>
9541
9542 * c-common.c (handle_noicf_attribute): New function.
9543
9544 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9545 Bernd Schmidt <bernds@codesourcery.com>
9546 James Norris <jnorris@codesourcery.com>
9547 Cesar Philippidis <cesar@codesourcery.com>
9548 Ilmir Usmanov <i.usmanov@samsung.com>
9549 Jakub Jelinek <jakub@redhat.com>
9550
9551 * c.opt (fopenacc): New option.
9552 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9553 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9554 New macros.
9555 * c-common.h (c_finish_oacc_wait): New prototype.
9556 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9557 (c_finish_oacc_wait): New function.
9558 * c-pragma.c (oacc_pragmas): New variable.
9559 (c_pp_lookup_pragma, init_pragma): Handle it.
9560 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9561 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9562 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9563 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9564 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9565 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9566 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9567 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9568 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9569 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9570 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9571 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9572 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9573 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9574 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9575 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9576 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9577 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9578 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9579 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9580 PRAGMA_OACC_CLAUSE_WORKER.
9581
9582 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9583
9584 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9585 for the new option fstack-protector_explicit.
9586 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9587 (handle_stack_protect_attribute): New function.
9588
9589 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9590
9591 * c.opt: New option -Warray-bounds=.
9592
9593 2015-01-09 Michael Collison <michael.collison@linaro.org>
9594
9595 * array-notation-common.c: Include hash-set.h, machmode.h,
9596 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9597 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9598 * c-ada-spec.c: Ditto.
9599 * c-cilkplus.c: Ditto.
9600 * c-common.c: Include input.h due to flattening of tree.h.
9601 Define macro GCC_C_COMMON_C.
9602 * c-common.h: Flatten tree.h header files into c-common.h.
9603 Remove include of tree-core.h.
9604 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9605 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9606 fold-const.h, wide-int.h, and inchash.h due to
9607 flattening of tree.h.
9608 * c-dump.c: Ditto.
9609 * c-format.c: Flatten tree.h header files into c-common.h.
9610 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9611 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9612 fold-const.h, wide-int.h, and inchash.h due to
9613 flattening of tree.h.
9614 * c-dump.c: Include hash-set.h, machmode.h,
9615 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9616 fold-const.h, wide-int.h, and inchash.h due to
9617 flattening of tree.h.
9618 * c-format.c: Include hash-set.h, machmode.h,
9619 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9620 fold-const.h, wide-int.h, inchash.h and real.h due to
9621 flattening of tree.h.
9622 * c-gimplify.c: Include hash-set.h, machmode.h,
9623 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9624 fold-const.h, wide-int.h, and inchash.h due to
9625 flattening of tree.h.
9626 * cilk.c: Ditto.
9627 * c-lex.c: Ditto.
9628 * c-omp.c: Ditto.
9629 * c-opts.c: Ditto.
9630 * c-pch.c: Ditto.
9631 * c-ppoutput.c: Ditto.
9632 * c-pragma.c: Ditto.
9633 * c-pretty-print.c: Ditto.
9634 * c-semantics.c: Ditto.
9635 * c-ubsan.c: Ditto.
9636 * stub-objc.c: Ditto.
9637
9638 2015-01-08 Jason Merrill <jason@redhat.com>
9639
9640 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9641 do_ubsan_in_current_function.
9642 (ubsan_maybe_instrument_reference_or_call): Likewise.
9643 * c-ubsan.h: Declare it.
9644
9645 2015-01-08 Mike Stump <mikestump@comcast.net>
9646
9647 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9648
9649 2015-01-07 Marek Polacek <polacek@redhat.com>
9650
9651 PR c/64440
9652 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9653 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9654
9655 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9656
9657 PR c++/31397
9658 * c.opt (Wsuggest-override): New option.
9659
9660 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9661
9662 Update copyright years.
9663
9664 2015-01-05 Marek Polacek <polacek@redhat.com>
9665
9666 PR c/64423
9667 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9668 parameter. Use it.
9669 * c-common.h (warn_array_subscript_with_type_char): Update
9670 declaration.
9671
9672 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9673
9674 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9675 Control macro with flag_sized_deallocation.
9676
9677 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9678
9679 * c.opt (Wdiscarded-array-qualifiers): New option.
9680
9681 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9682
9683 PR preprocessor/63831
9684 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9685 and __has_cpp_attribute here.
9686 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9687 c_common_has_attribute.
9688 * c-common.h (c_common_has_attribute): New prototype.
9689 * c-lex.c (init_c_lex): Set cb->has_attribute to
9690 c_common_has_attribute instead of cb_has_attribute.
9691 (get_token_no_padding): New function.
9692 (cb_has_attribute): Renamed to ...
9693 (c_common_has_attribute): ... this. No longer static. Use
9694 get_token_no_padding, require ()s, don't build TREE_LIST
9695 unnecessarily, fix up formatting, adjust diagnostics, call
9696 init_attributes.
9697
9698 2014-12-15 Jason Merrill <jason@redhat.com>
9699
9700 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9701 (-Wsized-deallocation): New.
9702 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9703 to on in C++14 and up.
9704
9705 2014-12-11 Jason Merrill <jason@redhat.com>
9706
9707 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9708
9709 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9710 we aren't complaining about VLAs.
9711
9712 2014-12-06 Marek Polacek <polacek@redhat.com>
9713
9714 PR tree-optimization/64183
9715 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9716 shift-expression if it is integer_type_node. Use types_compatible_p.
9717
9718 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9719
9720 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9721 last argument from create_tmp_var_raw and create_tmp_var calls.
9722 * cilk.c (gimplify_cilk_spawn): Likewise.
9723 * c-omp.c (c_finish_omp_atomic): Likewise.
9724
9725 2014-11-28 Marek Polacek <polacek@redhat.com>
9726
9727 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9728 instead of unsigned_type_node.
9729
9730 2014-11-28 Marek Polacek <polacek@redhat.com>
9731
9732 PR c/63862
9733 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9734 to op1_utype.
9735 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9736 expression to unsigned_type_node.
9737
9738 2014-11-20 Mark Wielaard <mjw@redhat.com>
9739
9740 PR debug/38757
9741 * c-opts.c (set_std_c89): Set lang_hooks.name.
9742 (set_std_c99): Likewise.
9743 (set_std_c11): Likewise.
9744 (set_std_cxx98): Likewise.
9745 (set_std_cxx11): Likewise.
9746 (set_std_cxx14): Likewise.
9747 (set_std_cxx1z): Likewise.
9748
9749 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9750
9751 PR target/63764
9752 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9753 return type to bool.
9754 * c-common.c: Include gimple-expr.h.
9755 (convert_vector_to_pointer_for_subscript): Change return type to
9756 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9757 and copy it into a TARGET_EXPR and use that instead of *vecp
9758 directly.
9759
9760 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9761
9762 Merger of git branch "gimple-classes-v2-option-3".
9763 * ChangeLog.gimple-classes: New.
9764 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9765 from being just a vec<gimple> to a vec<gbind *>.
9766
9767 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9768
9769 PR sanitizer/63813
9770 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9771 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9772 get_pointer_alignment for non-pointers. Use ptype, or if it is
9773 reference type, corresponding pointer type, as type of kind
9774 argument.
9775 (ubsan_maybe_instrument_reference,
9776 ubsan_maybe_instrument_member_call): Adjust callers.
9777
9778 2014-11-15 Marek Polacek <polacek@redhat.com>
9779
9780 PR middle-end/63884
9781 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9782 for NULL fndecl.
9783 (extract_array_notation_exprs): Return for NULL node.
9784
9785 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9786
9787 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9788 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9789
9790 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9791
9792 PR c/59708
9793 * c-common.c (check_builtin_function_arguments): Handle
9794 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9795
9796 2014-11-10 Andi Kleen <ak@linux.intel.com>
9797
9798 PR c/60804
9799 * c-common.h (check_no_cilk): Declare.
9800 * cilk.c (get_error_location): New function.
9801 (check_no_cilk): Dito.
9802
9803 2014-11-10 Andi Kleen <ak@linux.intel.com>
9804
9805 * cilk.c (recognize_spawn): Use expression location
9806 for error message.
9807
9808 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9809
9810 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9811
9812 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9813
9814 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9815 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9816 (__cpp_range_based_for, __cpp_initializer_lists,
9817 __cpp_delegating_constructors, __cpp_nsdmi,
9818 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9819 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9820 __has_cpp_attribute.
9821 * c-lex.c (cb_has_attribute): New callback CPP function;
9822 (init_c_lex): Set has_attribute callback.
9823
9824 2014-11-04 Richard Biener <rguenther@suse.de>
9825
9826 * c-common.c (shorten_compare): Do not shorten mixed
9827 DFP and non-DFP compares.
9828
9829 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9830
9831 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9832 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9833 Commentary and rearrangement of tests.
9834 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9835 Commentary and rearrangement of tests.
9836 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9837 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9838
9839 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9840
9841 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9842 enum from machine_mode.
9843
9844 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9845
9846 * c-common.c: Adjust include files.
9847 * c-gimplify.c: Ditto.
9848 * cilk.c: Ditto.
9849 * c-pragma.c: Ditto.
9850 * c-ubsan.c: Ditto.
9851
9852 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9853
9854 * c-gimplify.c: Adjust include files.
9855
9856 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9857
9858 PR c++/53061
9859 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9860 c_common_initialize_diagnostics.
9861 * c-common.h: Likewise.
9862
9863 2014-10-24 Marek Polacek <polacek@redhat.com>
9864
9865 PR c/56980
9866 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9867 print "struct"/"union"/"enum" for typedefed names.
9868
9869 2014-10-23 Marek Polacek <polacek@redhat.com>
9870
9871 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9872 in unsigned type.
9873
9874 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9875 Yury Gribov <y.gribov@samsung.com>
9876
9877 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9878 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9879 instead of flag_sanitize_recover as bool flag.
9880
9881 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9882
9883 * cilk.c: Revert previous change.
9884
9885 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9886
9887 PR c/63307
9888 * cilk.c: Include vec.h.
9889 (struct cilk_decls): New structure.
9890 (wrapper_parm_cb): Split this function to...
9891 (fill_decls_vec): ...this...
9892 (create_parm_list): ...and this.
9893 (compare_decls): New function.
9894 (for_local_cb): Remove.
9895 (wrapper_local_cb): Ditto.
9896 (build_wrapper_type): For now first traverse and fill vector of
9897 declarations then sort it and then deal with sorted vector.
9898 (cilk_outline): Ditto.
9899 (declare_one_free_variable): Ditto.
9900
9901 2014-10-17 Marek Polacek <polacek@redhat.com>
9902
9903 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9904 * c.opt (Wimplicit-int): Initialize to -1.
9905
9906 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9907
9908 * c-pragma.c: Adjust include files.
9909 * c-semantics.c: Likewise.
9910
9911 2014-10-16 DJ Delorie <dj@redhat.com>
9912
9913 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9914 multiples of bytes.
9915
9916 2014-10-14 Jason Merrill <jason@redhat.com>
9917
9918 PR c++/63455
9919 * c-common.h (CPP_PREPARSED_EXPR): New.
9920 (N_CP_TTYPES): Adjust.
9921
9922 2014-10-15 Marek Polacek <polacek@redhat.com>
9923
9924 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9925
9926 2014-10-14 DJ Delorie <dj@redhat.com>
9927
9928 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9929 types, not just __int128.
9930 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9931 types, not just __int128.
9932 (cpp_atomic_builtins): Round pointer sizes up.
9933 (type_suffix): Use type precision, not specific types.
9934 * c-common.c (c_common_reswords): Remove __int128 special case.
9935 (c_common_type_for_size): Check for all __intN types, not just
9936 __int128.
9937 (c_common_type_for_mode): Likewise.
9938 (c_common_signed_or_unsigned_type): Likewise.
9939 (c_build_bitfield_integer_type): Likewise.
9940 (c_common_nodes_and_builtins): Likewise.
9941 (keyword_begins_type_specifier): Likewise.
9942 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9943 __intN variants.
9944
9945 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9946
9947 * c-common.c: Use hash_table instead of hashtab.
9948
9949 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9950
9951 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9952 C++11 section.
9953
9954 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9955
9956 PR c++/54427
9957 PR c++/57198
9958 PR c++/58845
9959 * c-common.c (warn_logical_operator): Punt for vectors.
9960
9961 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9962
9963 Implement SD-6: SG10 Feature Test Recommendations
9964 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9965 macros and the __has_header macro.
9966
9967 2014-09-30 Jason Merrill <jason@redhat.com>
9968
9969 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9970 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9971 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9972
9973 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9974 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9975
9976 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9977 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9978
9979 2014-09-24 Marek Polacek <polacek@redhat.com>
9980
9981 PR c/61405
9982 PR c/53874
9983 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9984
9985 2014-09-23 Andi Kleen <ak@linux.intel.com>
9986
9987 * c-common.c (handle_no_reorder_attribute): New function.
9988 (c_common_attribute_table): Add no_reorder attribute.
9989
9990 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9991
9992 * c-cppbuiltin.c (c_cpp_builtins): Define
9993 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9994 modes.
9995
9996 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9997
9998 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9999 for supported floating-point modes.
10000
10001 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10002
10003 * c.opt (Wpsabi): Use LangEnabledBy.
10004 * c-opts.c (c_common_handle_option): Do not handle here.
10005
10006 2014-09-12 Joseph Myers <joseph@codesourcery.com>
10007
10008 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
10009 macros for floating-point modes.
10010
10011 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
10012
10013 PR target/58757
10014 * c-cppbuiltin.c (builtin_define_float_constants): Correct
10015 __*_DENORM_MIN__ without denormals.
10016
10017 2014-09-10 Jakub Jelinek <jakub@redhat.com>
10018
10019 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10020 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10021 ubsan_create_data callers.
10022 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
10023 index is constant or BIT_AND_EXPR with constant mask and is
10024 small enough for the bound.
10025 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
10026 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
10027
10028 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10029
10030 * c.opt: Add CppReason to various flags.
10031 (Wdate-time): Re-sort.
10032 * c-common.c: Include c-common.h earlier.
10033 (struct reason_option_codes_t): Delete.
10034 (c_option_controlling_cpp_error): Prefix global type and struct
10035 with cpp_.
10036
10037 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10038
10039 * c.opt (Wnormalized): New.
10040 (Wnormalized=): Use Enum and Reject Negative.
10041 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
10042
10043 2014-09-08 Joseph Myers <joseph@codesourcery.com>
10044
10045 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
10046 digits of floating-point modes if -fbuilding-libgcc.
10047
10048 2014-09-05 Joseph Myers <joseph@codesourcery.com>
10049
10050 * c-cppbuiltin.c (c_cpp_builtins): Also define
10051 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
10052 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
10053 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
10054 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
10055 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
10056 __LIBGCC_STACK_GROWS_DOWNWARD__,
10057 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
10058 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
10059 __LIBGCC_DWARF_FRAME_REGISTERS__,
10060 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
10061 __LIBGCC_STACK_POINTER_REGNUM__ and
10062 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
10063 (builtin_define_with_value): Handle backslash-escaping in string
10064 macro values.
10065
10066 2014-09-05 Richard Biener <rguenther@suse.de>
10067
10068 PR middle-end/63148
10069 * c-format.c (check_format_arg): Properly handle
10070 effectively signed POINTER_PLUS_EXPR offset.
10071
10072 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10073
10074 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
10075 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
10076 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
10077 and Init.
10078 * c-opts.c (c_common_handle_option): Do not handle here.
10079 (sanitize_cpp_opts): Likewise.
10080 * c-common.c (struct reason_option_codes_t): Handle
10081 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
10082
10083 2014-09-03 Marek Polacek <polacek@redhat.com>
10084
10085 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
10086
10087 2014-09-02 Jakub Jelinek <jakub@redhat.com>
10088 Balaji V. Iyer <balaji.v.iyer@intel.com>
10089 Igor Zamyatin <igor.zamyatin@intel.com>
10090
10091 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
10092 * c-common.c (c_common_reswords): Added _Cilk_for.
10093 * c-common.h (enum rid): Added RID_CILK_FOR.
10094 (cilk_for_number_of_iterations): Add declaration.
10095 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
10096 CILK_FOR.
10097 * c-pragma.c (init_pragma): Register "grainsize" pragma.
10098 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
10099
10100 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10101
10102 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
10103 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10104 Wundef): Use CPP, Var and Init.
10105 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10106
10107 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10108
10109 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10110 * c-opts.c (c_common_handle_option): Do not handle here.
10111
10112 2014-08-25 Jason Merrill <jason@redhat.com>
10113
10114 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10115 -std=c++14 and -std=gnu++14, rather than the reverse.
10116 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10117 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10118 * c-common.h (cxx_dialect): Remove cxx1y.
10119
10120 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
10121
10122 * c-common.h (enum cxx_dialect): Add cxx14.
10123 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10124 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10125 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10126
10127 2014-08-22 Jason Merrill <jason@redhat.com>
10128
10129 * c.opt (std=gnu++17): Fix alias.
10130
10131 2014-08-22 Marek Polacek <polacek@redhat.com>
10132
10133 PR c++/62199
10134 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10135 check for vector types. Drop LHS argument.
10136 * c-common.h (warn_logical_not_parentheses): Adjust.
10137
10138 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10139
10140 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10141 (Wmultichar): Likewise.
10142 (Wdate-time): Use C-family languages instead of Common. Use CPP
10143 and Var.
10144 * c-opts.c (c_common_handle_option): Do not handle the above
10145 options here.
10146 (sanitize_cpp_opts): Likewise.
10147
10148 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10149
10150 PR fortran/44054
10151 * c-opts.c: Include tree-diagnostics.h.
10152 (c_diagnostic_finalizer): New.
10153 (c_common_initialize_diagnostics): Use it.
10154
10155 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10156
10157 PR preprocessor/51303
10158 * c-common.c (struct reason_option_codes_t option_codes):
10159 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10160
10161 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10162
10163 PR c/60975
10164 PR c/53063
10165 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10166 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10167 (c_common_post_options): Call init_global_opts_from_cpp.
10168 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10169
10170 2014-08-19 Marek Polacek <polacek@redhat.com>
10171
10172 PR c++/62153
10173 * c-common.c (maybe_warn_bool_compare): New function.
10174 * c-common.h (maybe_warn_bool_compare): Declare.
10175 * c.opt (Wbool-compare): New option.
10176
10177 2014-08-19 Marek Polacek <polacek@redhat.com>
10178
10179 * c.opt (Wc99-c11-compat): New option.
10180
10181 2014-08-19 Marek Polacek <polacek@redhat.com>
10182
10183 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10184 to warn_c90_c99_compat.
10185 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10186 to -1.
10187
10188 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10189 Steven Bosscher <steven@gcc.gnu.org>
10190
10191 PR c/52952
10192 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10193 format_check_results.
10194 (check_function_format): Use true and add comment for boolean
10195 argument.
10196 (finish_dollar_format_checking): Use explicit location when warning.
10197 (check_format_info): Likewise.
10198 (check_format_arg): Set extra_arg_loc and format_string_loc.
10199 (check_format_info_main): Use explicit location when warning.
10200 (check_format_types): Pass explicit location.
10201 (format_type_warning): Likewise.
10202
10203 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10204
10205 PR fortran/44054
10206 * c-format.c: Handle Fortran flags.
10207
10208 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10209
10210 PR other/61962
10211 * array-notation-common.c (find_rank): Added handling for other
10212 types of references.
10213
10214 2014-08-10 Marek Polacek <polacek@redhat.com>
10215
10216 PR c/51849
10217 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10218 * c.opt (Wc90-c99-compat): Add option.
10219
10220 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10221
10222 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10223
10224 2014-08-03 Marek Polacek <polacek@redhat.com>
10225
10226 * c-common.c (check_case_value): Add location_t parameter. Use it.
10227 (c_add_case_label): Pass loc to check_case_value.
10228
10229 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10230
10231 * cilk.c: Use hash_map instead of pointer_map.
10232
10233 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10234
10235 * c-gimplify.c: Use hash_set instead of pointer_set.
10236
10237 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10238
10239 PR middle-end/61455
10240 * array-notation-common.c (extract_array_notation_exprs): Handling
10241 of DECL_EXPR added.
10242
10243 2014-08-01 Jakub Jelinek <jakub@redhat.com>
10244
10245 * c-common.h (min_align_of_type): Removed prototype.
10246 * c-common.c (min_align_of_type): Removed.
10247 * c-ubsan.h (ubsan_maybe_instrument_reference,
10248 ubsan_maybe_instrument_member_call): New prototypes.
10249 * c-ubsan.c: Include stor-layout.h and builtins.h.
10250 (ubsan_maybe_instrument_reference_or_call,
10251 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10252 functions.
10253
10254 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
10255
10256 PR c++/60517
10257 * c.opt (-Wreturn-local-addr): Move to common.opt.
10258
10259 2014-07-30 Jason Merrill <jason@redhat.com>
10260
10261 PR c++/61659
10262 PR c++/61687
10263 Revert:
10264 * c.opt (-fuse-all-virtuals): New.
10265
10266 2014-07-30 Tom Tromey <tromey@redhat.com>
10267
10268 PR c/59855
10269 * c.opt (Wdesignated-init): New option.
10270 * c-common.c (c_common_attribute_table): Add "designated_init".
10271 (handle_designated_init): New function.
10272
10273 2014-07-24 Marek Polacek <polacek@redhat.com>
10274
10275 PR c/57653
10276 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10277
10278 2014-07-16 Dodji Seketeli <dodji@redhat.com>
10279
10280 PR preprocessor/60723 - missing system-ness marks for macro tokens
10281 * c-ppoutput.c (struct print::prev_was_system_token): New data
10282 member.
10283 (init_pp_output): Initialize it.
10284 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10285 (do_line_change): Return a flag saying if a line marker was
10286 emitted or not.
10287 (scan_translation_unit): Detect if the system-ness of the token we
10288 are about to emit is different from the one of the previously
10289 emitted token. If so, emit a line marker. Avoid emitting useless
10290 adjacent line markers. Avoid emitting line markers for tokens
10291 originating from the expansion of built-in macros.
10292 (scan_translation_unit_directives_only): Adjust.
10293
10294 2014-07-15 Marek Polacek <polacek@redhat.com>
10295
10296 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10297 TYPE_MAX_VALUE is NULL.
10298
10299 2014-07-14 Jakub Jelinek <jakub@redhat.com>
10300
10301 PR middle-end/61294
10302 * c.opt (Wmemset-transposed-args): New warning.
10303
10304 2014-07-10 Jason Merrill <jason@redhat.com>
10305
10306 PR c++/61659
10307 PR c++/61687
10308 * c.opt (-fuse-all-virtuals): New.
10309
10310 2014-07-09 Richard Biener <rguenther@suse.de>
10311
10312 PR c-family/61741
10313 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10314 using unsigned arithmetic if overflow does not wrap instead of
10315 if overflow is undefined.
10316
10317 2014-07-06 Marek Polacek <polacek@redhat.com>
10318
10319 PR c/6940
10320 * c.opt (Wsizeof-array-argument): New option.
10321
10322 2014-07-03 Jakub Jelinek <jakub@redhat.com>
10323
10324 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
10325 comments->count <= 1, as comments->entries might be NULL.
10326
10327 2014-07-01 Marek Polacek <polacek@redhat.com>
10328
10329 * c.opt (Wint-conversion): New option.
10330
10331 2014-07-01 Marek Polacek <polacek@redhat.com>
10332
10333 PR c/58286
10334 * c.opt (Wincompatible-pointer-types): New option.
10335
10336 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10337
10338 PR c++/51400
10339 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10340 Do not discard TYPE_QUALS of type.
10341
10342 2014-06-26 Jason Merrill <jason@redhat.com>
10343
10344 * c-common.h (enum cxx_dialect): Add cxx1z.
10345 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10346 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10347
10348 2014-06-26 Teresa Johnson <tejohnson@google.com>
10349
10350 * c-common.h (get_dump_info): Declare.
10351 * c-gimplify.c (c_genericize): Use saved dump files.
10352 * c-opts.c (c_common_parse_file): Begin and end dumps
10353 once around parsing invocation.
10354 (get_dump_info): New function.
10355
10356 2014-06-23 Marek Polacek <polacek@redhat.com>
10357 Andrew MacLeod <amacleod@redhat.com>
10358
10359 PR c/61553
10360 * c-common.c (get_atomic_generic_size): Don't segfault if the
10361 type doesn't have a size.
10362
10363 2014-06-20 Marek Polacek <polacek@redhat.com>
10364
10365 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10366 (ubsan_walk_array_refs_r): New function.
10367 (c_genericize): Instrument array bounds.
10368 * c-ubsan.c: Include "internal-fn.h".
10369 (ubsan_instrument_division): Mark instrumented arrays as having
10370 side effects. Adjust ubsan_type_descriptor call.
10371 (ubsan_instrument_shift): Likewise.
10372 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10373 (ubsan_instrument_bounds): New function.
10374 (ubsan_array_ref_instrumented_p): New function.
10375 (ubsan_maybe_instrument_array_ref): New function.
10376 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10377 (ubsan_array_ref_instrumented_p): Declare.
10378 (ubsan_maybe_instrument_array_ref): Declare.
10379
10380 2014-06-20 Hale Wang <hale.wang@arm.com>
10381
10382 PR lto/61123
10383 * c.opt (fshort-enums): Add to LTO.
10384 * c.opt (fshort-wchar): Likewise.
10385
10386 2014-06-16 Marek Polacek <polacek@redhat.com>
10387
10388 PR c/60439
10389 * c.opt (Wswitch-bool): Add Var.
10390
10391 2014-06-12 Jakub Jelinek <jakub@redhat.com>
10392
10393 PR middle-end/61486
10394 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10395 #pragma omp target teams or
10396 #pragma omp {,target }teams distribute simd.
10397
10398 2014-06-12 Jason Merrill <jason@redhat.com>
10399
10400 * c.opt (Wabi=, fabi-compat-version): New.
10401 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10402 (c_common_post_options): Handle flag_abi_compat_version default.
10403 Disallow -fabi-compat-version=1.
10404 * c-common.h (abi_version_crosses): New.
10405
10406 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
10407
10408 * c-common.c (handle_section_attribute): Update handling for
10409 section names that are no longer trees.
10410
10411 2014-06-10 Jakub Jelinek <jakub@redhat.com>
10412
10413 PR fortran/60928
10414 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10415 (omp_pragmas): ... back here.
10416
10417 2014-06-05 Marek Polacek <polacek@redhat.com>
10418
10419 PR c/49706
10420 * c-common.c (warn_logical_not_parentheses): New function.
10421 * c-common.h (warn_logical_not_parentheses): Declare.
10422 * c.opt (Wlogical-not-parentheses): New option.
10423
10424 2014-06-04 Marek Polacek <polacek@redhat.com>
10425
10426 PR c/30020
10427 * c-common.c (check_case_bounds): Add location parameter.
10428 Use it.
10429 (c_add_case_label): Pass loc to check_case_bounds.
10430
10431 2014-06-03 Marek Polacek <polacek@redhat.com>
10432
10433 PR c/60439
10434 * c.opt (Wswitch-bool): New option.
10435
10436 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10437
10438 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10439 Remove prototypes.
10440 (record_types_used_by_current_var_decl): Move prototype to where
10441 it belongs.
10442
10443 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10444 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10445 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10446
10447 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10448
10449 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10450 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10451 void_zero_node.
10452 * c-pretty-print.c (pp_c_void_constant): New function.
10453 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10454 (c_pretty_printer::expression): Handle VOID_CST.
10455 * cilk.c (extract_free_variables): Likewise.
10456 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10457 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10458
10459 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10460
10461 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10462 * c-pragma.c (push_alignment): Adjust.
10463 (handle_pragma_push_options): Likewise.
10464
10465 2014-05-09 Marek Polacek <polacek@redhat.com>
10466
10467 PR c/50459
10468 * c-common.c (check_user_alignment): Return -1 if alignment is error
10469 node.
10470 (handle_aligned_attribute): Don't call default_conversion on
10471 FUNCTION_DECLs.
10472 (handle_vector_size_attribute): Likewise.
10473 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10474 (handle_sentinel_attribute): Call default_conversion and allow even
10475 integral types as an argument.
10476
10477 2014-05-08 Marek Polacek <polacek@redhat.com>
10478
10479 PR c/61053
10480 * c-common.c (min_align_of_type): New function factored out from...
10481 (c_sizeof_or_alignof_type): ...here.
10482 * c-common.h (min_align_of_type): Declare.
10483
10484 2014-05-08 Marek Polacek <polacek@redhat.com>
10485
10486 PR c/61077
10487 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10488 parameter type of main.
10489
10490 2014-05-07 DJ Delorie <dj@redhat.com>
10491
10492 * c-cppbuiltin.c (print_bits_of_hex): New.
10493 (builtin_define_type_minmax): Print values using hex so as not to
10494 require a pre-computed list of string values.
10495
10496 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10497 Mike Stump <mikestump@comcast.net>
10498 Richard Sandiford <rdsandiford@googlemail.com>
10499
10500 * c-ada-spec.c: Include wide-int.h.
10501 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10502 (dump_generic_ada_node): Use wide-int interfaces.
10503 * c-common.c: Include wide-int-print.h.
10504 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10505 (pointer_int_sum): Use wide-int interfaces.
10506 (c_common_nodes_and_builtins): Use make_int_cst.
10507 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10508 (handle_alloc_size_attribute): Use wide-int interfaces.
10509 (get_nonnull_operand): Likewise.
10510 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10511 * c-lex.c: Include wide-int.h.
10512 (narrowest_unsigned_type): Take a widest_int rather than two
10513 HOST_WIDE_INTs.
10514 (narrowest_signed_type): Likewise.
10515 (interpret_integer): Update accordingly. Use wide-int interfaces.
10516 (lex_charconst): Use wide-int interfaces.
10517 * c-pretty-print.c: Include wide-int.h.
10518 (pp_c_integer_constant): Use wide-int interfaces.
10519 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10520 INT_CST_LT_UNSIGNED.
10521
10522 2014-05-06 Richard Biener <rguenther@suse.de>
10523
10524 * c-opts.c (c_common_post_options): For -freestanding,
10525 -fno-hosted and -fno-builtin disable pattern recognition
10526 if not enabled explicitely.
10527
10528 2014-05-02 Marek Polacek <polacek@redhat.com>
10529
10530 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10531
10532 2014-05-01 Marek Polacek <polacek@redhat.com>
10533
10534 PR c/43245
10535 * c.opt (Wdiscarded-qualifiers): Add.
10536
10537 2014-04-30 Marek Polacek <polacek@redhat.com>
10538
10539 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10540 INT_MIN / -1 sanitization only for integer types.
10541
10542 2014-04-25 Marek Polacek <polacek@redhat.com>
10543
10544 PR c/18079
10545 * c-common.c (handle_noinline_attribute): Warn if the attribute
10546 conflicts with always_inline attribute.
10547 (handle_always_inline_attribute): Warn if the attribute conflicts
10548 with noinline attribute.
10549
10550 2014-04-25 Marek Polacek <polacek@redhat.com>
10551
10552 PR c/60156
10553 * c-common.c (check_main_parameter_types): Warn about variadic main.
10554
10555 2014-04-24 Mike Stump <mikestump@comcast.net>
10556
10557 * c.opt (Wshadow-ivar): Default to on.
10558
10559 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10560
10561 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10562
10563 2014-04-23 Marek Polacek <polacek@redhat.com>
10564
10565 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10566
10567 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10568
10569 PR sanitizer/60275
10570 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10571 if flag_sanitize_undefined_trap_on_error.
10572 (ubsan_instrument_division, ubsan_instrument_shift,
10573 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10574 if !flag_sanitize_recover.
10575
10576 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10577
10578 PR libstdc++/43622
10579 * c-common.c (registered_builtin_types): Make non-static.
10580 * c-common.h (registered_builtin_types): Declare.
10581
10582 2014-04-14 Richard Biener <rguenther@suse.de>
10583 Marc Glisse <marc.glisse@inria.fr>
10584
10585 PR c/60819
10586 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10587 apply may-alias the scalar pointer type when applicable.
10588
10589 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10590
10591 PR middle-end/60467
10592 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10593 as possible argument for Cilk_spawn.
10594
10595 2014-04-11 Tobias Burnus <burnus@net-b.de>
10596
10597 PR c/60194
10598 * c.opt (Wformat-signedness): Add
10599 * c-format.c(check_format_types): Use it.
10600
10601 2014-04-11 Jason Merrill <jason@redhat.com>
10602
10603 PR c++/57926
10604 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10605 default_conversion for an array argument.
10606
10607 2014-04-08 Marek Polacek <polacek@redhat.com>
10608
10609 PR sanitizer/60745
10610 * c-ubsan.c: Include asan.h.
10611 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10612
10613 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10614
10615 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10616
10617 2014-04-02 Marek Polacek <polacek@redhat.com>
10618
10619 * c-common.h (c_expand_expr): Remove declaration.
10620
10621 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10622
10623 PR c++/60689
10624 * c-common.c (add_atomic_size_parameter): When creating new
10625 params vector, push the size argument first.
10626
10627 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10628
10629 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10630 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10631 ubsan_create_data callers.
10632
10633 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10634
10635 PR debug/60603
10636 * c-opts.c (c_finish_options): Restore cb_file_change call to
10637 <built-in>.
10638
10639 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10640
10641 PR middle-end/36282
10642 * c-pragma.c (apply_pragma_weak): Only look at
10643 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10644 DECL_ASSEMBLER_NAME_SET_P (decl).
10645 (maybe_apply_pending_pragma_weaks): Exit early if
10646 vec_safe_is_empty (pending_weaks) rather than only when
10647 !pending_weaks.
10648 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10649 set assembler name back to NULL afterwards.
10650
10651 2014-03-11 Jason Merrill <jason@redhat.com>
10652
10653 * c.opt: Add -std=gnu++14.
10654
10655 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10656
10657 * c-opts.c (c_common_post_options): Don't override
10658 -ffp-contract=fast if unsafe-math-optimizations is on.
10659
10660 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10661
10662 * c.opt: Enable LTO FE for fshort-double.
10663
10664 2014-03-07 Jason Merrill <jason@redhat.com>
10665
10666 * c.opt: Add -std=c++14.
10667
10668 2014-03-06 Marek Polacek <polacek@redhat.com>
10669
10670 PR c/60197
10671 * cilk.c (contains_cilk_spawn_stmt): New function.
10672 (contains_cilk_spawn_stmt_walker): Likewise.
10673 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10674 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10675
10676 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10677
10678 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10679 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10680 even when flag_preprocess_only.
10681
10682 2014-02-26 Jason Merrill <jason@redhat.com>
10683
10684 PR c++/59231
10685 PR c++/11586
10686 * c-common.c (shorten_compare): Don't check
10687 c_inhibit_evaluation_warnings.
10688
10689 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10690
10691 PR c/37743
10692 * c-common.c (c_common_nodes_and_builtins): When initializing
10693 c_uint{16,32,64}_type_node, also set corresponding
10694 uint{16,32,64}_type_node to the same value.
10695
10696 PR c++/60267
10697 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10698 for PRAGMA_IVDEP if flag_preprocess_only.
10699
10700 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10701
10702 PR c/60101
10703 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10704 if false, add ADD itself, rather than vice versa.
10705 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10706 copy. For SAVE_EXPR, only call merge_tlist once.
10707
10708 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10709
10710 PR middle-end/60092
10711 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10712 and tree_to_uhwi.
10713 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10714 functions.
10715 (c_common_attribute_table): Add alloc_align and assume_aligned
10716 attributes.
10717
10718 2014-02-06 Marek Polacek <polacek@redhat.com>
10719
10720 PR c/60087
10721 * c-common.c (warn_for_sign_compare): Call warning_at with location
10722 instead of warning.
10723
10724 2014-02-05 Marek Polacek <polacek@redhat.com>
10725
10726 PR c/53123
10727 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10728 statement.
10729
10730 2014-02-04 Marek Polacek <polacek@redhat.com>
10731
10732 PR c/60036
10733 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10734 SAVE_EXPR.
10735
10736 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10737
10738 PR c++/53017
10739 PR c++/59211
10740 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10741 handle_vector_size_attribute, handle_nonnull_attribute): Call
10742 default_conversion on the attribute argument.
10743 (handle_nonnull_attribute): Increment the argument number.
10744
10745 2014-01-31 Marek Polacek <polacek@redhat.com>
10746
10747 PR c/59963
10748 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10749 build_function_call_vec.
10750 (resolve_overloaded_builtin): Likewise.
10751 * c-common.h (build_function_call_vec): Adjust declaration.
10752
10753 2014-01-30 Marek Polacek <polacek@redhat.com>
10754
10755 PR c/59940
10756 * c-common.h (unsafe_conversion_p): Adjust declaration.
10757 (warnings_for_convert_and_check): Likewise.
10758 (convert_and_check): Likewise.
10759 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10760 expansion_point_location_if_in_system_header on it.
10761 (warnings_for_convert_and_check): Add location parameter. Call
10762 expansion_point_location_if_in_system_header on it. Use it.
10763 (convert_and_check): Add location parameter. Use it.
10764 (conversion_warning): Likewise.
10765 (c_add_case_label): Adjust convert_and_check calls.
10766 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10767
10768 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10769
10770 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10771 flag_cilkplus.
10772 * c-pragma.c (init_pragma): Likewise.
10773 * c.opt: Likewise.
10774
10775 2014-01-23 Marek Polacek <polacek@redhat.com>
10776
10777 PR c/59846
10778 * c-common.c (shorten_compare): Add location_t parameter.
10779 * c-common.h (shorten_binary_op): Adjust declaration.
10780
10781 2014-01-23 Marek Polacek <polacek@redhat.com>
10782
10783 PR c/58346
10784 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10785 * c-common.h: Declare it.
10786
10787 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10788
10789 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10790 * c-ada-spec.c (dump_ads): Likewise.
10791 (cpp_check): Likewise.
10792 (dump_ada_specs): Likewise.
10793
10794 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10795
10796 PR c++/49718
10797 * c-common.c (handle_no_instrument_function_attribute): Allow
10798 no_instrument_function attribute in class member
10799 definition/declaration.
10800
10801 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10802
10803 PR c/58943
10804 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10805 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10806 being COMPOUND_EXPR.
10807 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10808 operand a SAVE_EXPR and second MODIFY_EXPR.
10809
10810 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10811
10812 PR target/58115
10813 * c-pch.c (c_common_write_pch): Call
10814 prepare_target_option_nodes_for_pch.
10815
10816 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10817
10818 Update copyright years
10819
10820 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10821
10822 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10823 the copyright notice.
10824
10825 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10826
10827 * c-ada-spec.c (print_constructor): New function.
10828 (print_destructor): Retrieve the origin of the destructor.
10829 (print_ada_declaration): Revamp handling of constructors/destructors.
10830
10831 2013-12-23 Stuart Hastings <stuart@apple.com>
10832 Bill Maddox <maddox@google.com>
10833 Jason Merrill <jason@redhat.com>
10834
10835 * c.opt: Add -fdeclone-ctor-dtor.
10836 * c-opts.c (c_common_post_options): Default to on iff -Os.
10837
10838 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10839
10840 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10841 attribute.
10842 * c-pragma.h (enum pragma_cilk_clause): Remove.
10843 (enum pragma_omp_clause): Added the following fields:
10844 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10845 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10846 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10847 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10848 PRAGMA_CILK_CLAUSE_UNIFORM.
10849
10850
10851 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10852
10853 * cilk.c (cilk_outline): Made this function non-static.
10854 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10855 (create_cilk_wrapper): Added a new parameter: a function pointer.
10856 (c_install_body_w_frame_cleanup): Remove
10857 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10858 * c-common.h (cilk_outline): New prototype.
10859 (gimplify_cilk_spawn): Removed two parameters.
10860 (cilk_install_body_with_frame_cleanup): New prototype.
10861 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10862 CILK_SPAWN_STMT case.
10863
10864 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10865
10866 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10867
10868 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10869 (int_array_type_node): Remove.
10870 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10871
10872 2013-12-05 Marek Polacek <polacek@redhat.com>
10873
10874 PR c/52023
10875 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10876 [ADJUST_FIELD_ALIGN].
10877
10878 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10879
10880 PR c/52023
10881 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10882 and check field alignment if set.
10883 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10884 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10885
10886 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10887 Marek Polacek <polacek@redhat.com>
10888
10889 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10890 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10891
10892 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10893
10894 PR c/59309
10895 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10896 arguments.
10897
10898 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10899
10900 PR c/59280
10901 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10902 goto invalid. If it is error_mark_node, don't issue further
10903 diagnostics.
10904
10905 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10906
10907 * c.opt (Wopenmp-simd): New.
10908
10909 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10910
10911 * c-ubsan.h (ubsan_instrument_return): New prototype.
10912 * c-ubsan.c (ubsan_instrument_return): New function.
10913
10914 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10915
10916 * c-common.c: Add required include files from gimple.h.
10917 * c-gimplify.c: Likewise.
10918 * cilk.c: Likewise.
10919
10920 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10921
10922 * c-common.c (unsafe_conversion_p): Remove use of
10923 EXPR_LOC_OR_HERE macro.
10924 (conversion_warning): Likewise.
10925 (warnings_for_convert_and_check): Likewise.
10926 (warn_for_collisions_1): Likewise.
10927 (shorten_compare): Likewise, and remove use of in_system_header
10928 macro, using the location from the former.
10929 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10930 (cb_def_pragma): Remove use of in_system_header macro.
10931 (lex_string): Likewise.
10932 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10933
10934 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10935 Mike Stump <mikestump@comcast.net>
10936 Richard Sandiford <rdsandiford@googlemail.com>
10937
10938 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10939 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10940 tree_fits_shwi_p or tree_fits_uhwi_p.
10941 (dump_generic_ada_node): Likewise.
10942 * c-format.c (check_format_arg): Likewise.
10943 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10944
10945 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10946
10947 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10948
10949 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10950
10951 PR c/53001
10952 * c-common.c (unsafe_conversion_p): Make this function
10953 return an enumeration with more detail.
10954 (conversion_warning): Use the new return type of
10955 unsafe_conversion_p to separately warn either about conversions
10956 that lower floating point number precision or about the other
10957 kinds of conversions.
10958 * c-common.h (enum conversion_safety): New enumeration.
10959 (unsafe_conversion_p): switching return type to
10960 conversion_safety enumeration.
10961 * c.opt: Adding new warning -Wfloat-conversion and
10962 enabling it with -Wconversion.
10963
10964 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10965
10966 * c-opts.c: Include plugin.h.
10967 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10968
10969 2013-11-19 Marek Polacek <polacek@redhat.com>
10970
10971 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10972 call.
10973 (ubsan_instrument_shift): Likewise.
10974 (ubsan_instrument_vla): Likewise.
10975
10976 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10977
10978 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10979 cast to unsigned type.
10980
10981 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10982
10983 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10984 tree_low_cst.
10985 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10986 rather than tree_low_cst.
10987
10988 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10989
10990 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10991 tree_to_uhwi throughout.
10992
10993 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10994
10995 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10996 tree_low_cst (..., 0) with tree_to_shwi throughout.
10997
10998 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10999
11000 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
11001 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
11002
11003 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11004
11005 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
11006 host_integerp (..., 0) with tree_fits_shwi_p throughout.
11007
11008 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
11009
11010 * c-cilkplus.c: New file.
11011 * c-common.c (readonly_error): Add location argument.
11012 * c-common.h (readonly_error): Same.
11013 (c_finish_cilk_clauses): Protoize.
11014 (c_check_cilk_loop): Same.
11015 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
11016 Do not fail on error_mark_node.
11017 Abstract increment canonicalization to here...
11018 (c_omp_for_incr_canonicalize_ptr): New.
11019 c-pragma.c (init_pragma): Register "simd" pragma.
11020 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
11021 (enum pragma_cilk_clause): New.
11022
11023 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
11024
11025 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
11026 wchar_type and host_integerp checks.
11027
11028 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
11029
11030 * c-common.c: Likewise.
11031 * c-gimplify.c: Likewise.
11032 * cilk.c: Likewise.
11033
11034 2013-11-14 Diego Novillo <dnovillo@google.com>
11035
11036 * c-common.c: Include fold-const.h.
11037 Include stor-layout.h.
11038 Include calls.h.
11039 Include stringpool.h.
11040 Include attribs.h.
11041 Include varasm.h.
11042 Include trans-mem.h.
11043 * c-cppbuiltin.c: Include stor-layout.h.
11044 Include stringpool.h.
11045 * c-format.c: Include stringpool.h.
11046 * c-lex.c: Include stringpool.h.
11047 Include stor-layout.h.
11048 * c-pragma.c: Include stringpool.h.
11049 Include attribs.h.
11050 Include varasm.h.
11051 Include gcc-symtab.h.
11052 * c-pretty-print.c: Include stor-layout.h.
11053 Include attribs.h.
11054 * cilk.c: Include stringpool.h.
11055 Include calls.h.
11056
11057 2013-11-13 Joseph Myers <joseph@codesourcery.com>
11058
11059 * c-common.h (enum rid): Add RID_AUTO_TYPE.
11060 * c-common.c (c_common_reswords): Add __auto_type.
11061 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
11062
11063 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
11064
11065 * c-common.c: Include gimplify.h.
11066 * c-gimplify.c: Likewise.
11067 * cilk.c: Likewise.
11068 * c-omp.c: Include gimple-expr.h instead of gimple.h.
11069 * c-ubsan.c: Don't include gimple.h.
11070
11071 2013-11-12 Joseph Myers <joseph@codesourcery.com>
11072
11073 * c-common.c (c_common_reswords): Add _Thread_local.
11074
11075 2013-11-09 Joseph Myers <joseph@codesourcery.com>
11076
11077 * c-common.c (atomic_size_supported_p): New function.
11078 (resolve_overloaded_atomic_exchange)
11079 (resolve_overloaded_atomic_compare_exchange)
11080 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
11081 Use it instead of comparing size with a local list of sizes.
11082
11083 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
11084 Joseph Myers <joseph@codesourcery.com>
11085
11086 * c-common.h (enum rid): Add RID_ATOMIC.
11087 * c-common.c (c_common_reswords): Add _Atomic.
11088 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
11089 (keyword_is_type_qualifier): Accept RID_ATOMIC.
11090 * c-format.c (check_format_types): Check for extra _Atomic
11091 qualifiers in format argument.
11092 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
11093 (pp_c_type_qualifier_list): Mention _Atomic in comment.
11094
11095 2013-11-06 Tobias Burnus <burnus@net-b.de>
11096
11097 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
11098
11099 2013-11-06 Joseph Myers <joseph@codesourcery.com>
11100
11101 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
11102 standards modes.
11103 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11104 to mean lack of IEEE 754 support.
11105
11106 2013-11-05 Tobias Burnus <burnus@net-b.de>
11107
11108 * c.opt (-Wdate-time): New option
11109 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11110
11111 2013-11-05 Joseph Myers <joseph@codesourcery.com>
11112
11113 * c-cppbuiltin.c (cpp_iec_559_value): Test
11114 flag_excess_precision_cmdline not flag_excess_precision.
11115
11116 2013-11-05 Tobias Burnus <burnus@net-b.de>
11117
11118 * c.opt (fopenmp-simd): New option.
11119 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11120 (omp_pragmas): ... this new struct.
11121 (c_pp_lookup_pragma): Also walk omp_pragmas.
11122 (init_pragma): Init pragmas for -fopenmp-simd.
11123
11124 2013-11-04 Marek Polacek <polacek@redhat.com>
11125
11126 PR c++/58979
11127 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11128
11129 2013-11-04 Joseph Myers <joseph@codesourcery.com>
11130
11131 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11132 New functions.
11133 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11134
11135 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11136
11137 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11138 (dump_ada_specs): Adjust prototype of second callback.
11139 * c-ada-spec.c (cpp_check): New global variable.
11140 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11141 (print_generic_ada_decl): Likewise.
11142 (has_static_fields): Change return type to bool and add guard.
11143 (has_nontrivial_methods): New predicate.
11144 (is_tagged_type): Change return type to bool.
11145 (separate_class_package): Call has_nontrivial_methods.
11146 (pp_ada_tree_identifier): Minor tweaks.
11147 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11148 (dump_ada_array_domains): Likewise.
11149 (dump_ada_array_type): Likewise.
11150 (dump_template_types): Remove cpp_check parameter and do not pass it to
11151 dump_generic_ada_node.
11152 (dump_ada_template): Likewise.
11153 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11154 recursively.
11155 (print_ada_methods): Change return type to integer. Remove cpp_check
11156 parameter and do not pass it down.
11157 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11158 dump_generic_ada_node.
11159 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11160 accessing methods.
11161 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11162 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11163 value of print_ada_methods.
11164 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11165 Set cpp_check to it before invoking dump_ada_nodes.
11166 (dump_ada_specs): Likewise.
11167
11168 2013-11-03 Marek Polacek <polacek@redhat.com>
11169
11170 * c-ubsan.c: Don't include hash-table.h.
11171 (ubsan_instrument_vla): New function.
11172 * c-ubsan.h: Declare it.
11173
11174 2013-10-31 David Malcolm <dmalcolm@redhat.com>
11175
11176 Automated part of renaming of symtab_node_base to symtab_node.
11177
11178 Patch autogenerated by rename_symtab.py from
11179 https://github.com/davidmalcolm/gcc-refactoring-scripts
11180 revision 58bb219cc090b2f4516a9297d868c245495ee622
11181
11182 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11183 symtab_node_base to symtab_node.
11184
11185 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11186
11187 Implement C++14 digit separators.
11188 * c-lex.c (interpret_float): Remove digit separators from scratch string
11189 before building real literal.
11190
11191 2013-10-30 Jakub Jelinek <jakub@redhat.com>
11192
11193 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11194
11195 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11196
11197 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11198 fields.
11199 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11200 enabled.
11201 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11202 (insert_cilk_frame): New prototype.
11203 (cilk_init_builtins): Likewise.
11204 (gimplify_cilk_spawn): Likewise.
11205 (c_cilk_install_body_w_frame_cleanup): Likewise.
11206 (cilk_detect_spawn_and_unwrap): Likewise.
11207 (cilk_set_spawn_marker): Likewise.
11208 (build_cilk_sync): Likewise.
11209 (build_cilk_spawn): Likewise.
11210 * cilk.c: New file.
11211
11212 2013-10-29 David Malcolm <dmalcolm@redhat.com>
11213
11214 Patch autogenerated by refactor_symtab.py from
11215 https://github.com/davidmalcolm/gcc-refactoring-scripts
11216 revision 58bb219cc090b2f4516a9297d868c245495ee622
11217
11218 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11219 to a true class hierarchy.
11220 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11221
11222 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11223
11224 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11225
11226 2013-10-26 Jeff Law <law@redhat.com>
11227
11228 * c-common.c (c_define_builtins): Remove mudflap support.
11229 * c.opt: Ignore and warn for mudflap options.
11230
11231 2013-10-24 Tobias Burnus <burnus@net-b.de>
11232
11233 PR other/33426
11234 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11235 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11236
11237 2013-10-23 Jason Merrill <jason@redhat.com>
11238
11239 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11240
11241 2013-10-11 Jakub Jelinek <jakub@redhat.com>
11242
11243 * c-common.h (omp_clause_mask::operator !=): New method.
11244 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11245 instead of if (mask & something) tests everywhere.
11246
11247 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11248 201307 instead of 201107.
11249 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11250 (c_common_attribute_table): Add "omp declare target" and
11251 "omp declare simd" attributes.
11252 (handle_omp_declare_target_attribute,
11253 handle_omp_declare_simd_attribute): New functions.
11254 * c-omp.c: Include c-pragma.h.
11255 (c_finish_omp_taskgroup): New function.
11256 (c_finish_omp_atomic): Add swapped argument, if true,
11257 build the operation first with rhs, lhs arguments and use NOP_EXPR
11258 build_modify_expr.
11259 (c_finish_omp_for): Add code argument, pass it down to make_code.
11260 (c_omp_split_clauses): New function.
11261 (c_split_parallel_clauses): Removed.
11262 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11263 c_omp_declare_simd_clauses_to_decls): New functions.
11264 * c-common.h (omp_clause_mask): New type.
11265 (OMP_CLAUSE_MASK_1): Define.
11266 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11267 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11268 omp_clause_mask::operator |, omp_clause_mask::operator &,
11269 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11270 omp_clause_mask::operator ==): New methods.
11271 (enum c_omp_clause_split): New.
11272 (c_finish_omp_taskgroup): New prototype.
11273 (c_finish_omp_atomic): Add swapped argument.
11274 (c_finish_omp_for): Add code argument.
11275 (c_omp_split_clauses): New prototype.
11276 (c_split_parallel_clauses): Removed.
11277 (c_omp_declare_simd_clauses_to_numbers,
11278 c_omp_declare_simd_clauses_to_decls): New prototypes.
11279 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11280 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11281 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11282 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11283 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11284 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11285 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11286 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11287 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11288 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11289 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11290 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11291 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11292 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11293 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11294 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11295 PRAGMA_OMP_CLAUSE_UNIFORM.
11296
11297 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
11298
11299 PR tree-optimization/20318
11300 * c-common.c (handle_returns_nonnull_attribute): New function.
11301 (c_common_attribute_table): Add returns_nonnull.
11302
11303 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
11304
11305 PR c++/19476
11306 * c.opt (fcheck-new): Move to common.opt.
11307
11308 2013-09-25 Marek Polacek <polacek@redhat.com>
11309 Jakub Jelinek <jakub@redhat.com>
11310
11311 PR sanitizer/58413
11312 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11313 an expression if we can prove it is correct.
11314 (ubsan_instrument_division): Likewise. Remove unnecessary
11315 check.
11316
11317 2013-09-18 Marek Polacek <polacek@redhat.com>
11318
11319 PR sanitizer/58411
11320 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11321 Declare it.
11322 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11323
11324 2013-09-14 Iain Sandoe <iain@codesourcery.com>
11325
11326 PR target/48094
11327 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11328 fobjc-gc, freplace-objc-classes): Accept for LTO.
11329
11330 2013-09-13 Jacek Caban <jacek@codeweavers.com>
11331
11332 * c-target.def: New hook
11333
11334 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11335
11336 PR c++/43452
11337 * c.opt (Wdelete-incomplete): Add.
11338
11339 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11340
11341 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11342 (vector_types_compatible_elements_p): New function.
11343 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11344 declaration.
11345 (vector_types_compatible_elements_p): Declare.
11346
11347 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11348
11349 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11350 a virtual member function.
11351 (pp_simple_type_specifier): Remove.
11352 (pp_c_type_specifier): Likewise.
11353 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11354 Rename from pp_c_type_specifier. Adjust.
11355 (c_pretty_printer::c_pretty_printer): Do not assign to
11356 simple_type_specifier.
11357
11358 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11359
11360 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11361 member function.
11362 (c_pretty_printer::storage_class_specifier): Likewise.
11363 (c_pretty_printer::initializer): Likewise.
11364 (pp_declaration): Remove.
11365 (pp_declaration_specifiers): Likewise.
11366 (pp_abstract_declarator): Likewise.
11367 (pp_declarator): Likewise.
11368 (pp_type_id): Likewise.
11369 (pp_statement): Likewise.
11370 (pp_constant): Likewise.
11371 (pp_id_expression): Likewise.
11372 (pp_primary_expression): Likewise.
11373 (pp_unary_expression): Likewise.
11374 (pp_multiplicative_expression): Likewise.
11375 (pp_conditional_expression): Likewise.
11376 (pp_assignment_expression): Likewise.
11377 (pp_expression): Likewise.
11378 (pp_c_type_id): Likewise.
11379 (pp_c_storage_class_specifier): Likewise.
11380 * c-pretty-print.c (pp_c_type_cast): Tidy.
11381 (pp_c_pointer): Likewise.
11382 (pp_c_type_specifier): Likewise.
11383 (pp_c_parameter_type_list): Likewise.
11384 (pp_c_function_definition): Likewise.
11385 (pp_c_init_declarator): Likewise.
11386 (pp_c_initializer_list): Likewise.
11387 (pp_c_constructor_elts): Likewise.
11388 (c_pretty_printer::direct_abstract_declarator): Likewise.
11389 (c_pretty_printer::declaration_specifiers): Likewise.
11390 (c_pretty_printer::primary_expression): Likewise.
11391 (c_pretty_printer::postfix_expression): Likewise.
11392 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11393 (c_pretty_printer::storage_class_specifier): Rename from
11394 pp_c_storage_class_specifier.
11395 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11396 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11397 storage_class_specifier, initializer, offset_list, flags.
11398
11399 2013-08-30 Marek Polacek <polacek@redhat.com>
11400
11401 * c-ubsan.c: New file.
11402 * c-ubsan.h: New file.
11403
11404 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11405
11406 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11407 member function.
11408 (c_pretty_printer::declaration_specifiers): Likewise.
11409 (c_pretty_printer::declarator): Likewise.
11410 (c_pretty_printer::abstract_declarator): Likewise.
11411 (c_pretty_printer::direct_abstract_declarator): Likewise.
11412 (c_pretty_printer::direct_declarator): Likewise.
11413 (c_pretty_printer::function_specifier): Likewise.
11414 (pp_declaration): Adjust.
11415 (pp_declaration_specifiers): Likewise.
11416 (pp_abstract_declarator): Likewise.
11417 (pp_direct_declarator): Likewise.
11418 (pp_function_specifier): Likewise.
11419 (pp_direct_abstract_declarator): Remove as unused.
11420 (pp_c_declaration): Remove.
11421 (pp_c_declaration_specifiers): Likewise.
11422 (pp_c_declarator): Likewise.
11423 (pp_c_direct_declarator): Likewise.
11424 (pp_c_function_specifier): Likewise.
11425 (pp_c_direct_abstract_declarator): Likewise.
11426 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11427 from pp_c_abstract_declarator. Adjust.
11428 (c_pretty_printer::direct_abstract_declarator): Rename from
11429 pp_c_direct_abstract_declarator. Adjust.
11430 (c_pretty_printer::function_specifier): Rename from
11431 pp_c_function_specifier. Adjust.
11432 (c_pretty_printer::declaration_specifiers): Rename from
11433 pp_c_declaration_specifiers. Adjust.
11434 (c_pretty_printer::direct_declarator): Rename from
11435 pp_c_direct_declarator. Adjust.
11436 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11437 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11438 (c_pretty_printer::c_pretty_printer): Do not assign to
11439 declaration, declaration_specifiers, declarator,
11440 direct_declarator, direct_abstract_declarator, function_specifier.
11441
11442 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11443
11444 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11445 virtual member function.
11446 (c_pretty_printer::multiplicative_expression): Likewise.
11447 (c_pretty_printer::conditional_expression): Likewise.
11448 (c_pretty_printer::assignment_expression): Likewise.
11449 (c_pretty_printer::expression): Likewise.
11450 (pp_unary_expression): Adjust.
11451 (pp_multiplicative_expression): Likewise.
11452 (pp_assignment_expression): Likewise.
11453 (pp_conditional_expression): Likewise.
11454 (pp_expression): Likewise.
11455 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11456 from pp_c_unary_expression. Adjust.
11457 (c_pretty_printer::multiplicative_expression): Rename from
11458 pp_c_multiplicative_expression. Adjust.
11459 (c_pretty_printer::conditional_expression): Rename from
11460 pp_c_conditional_expression. Adjust.
11461 (c_pretty_printer::assignment_expression): Rename from
11462 pp_c_assignment_expression. Adjust.
11463 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11464 (c_pretty_printer::c_pretty_printer): Do not assign to
11465 unary_expression, multiplicative_expression,
11466 conditional_expression, expression.
11467
11468 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11469
11470 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11471 virtual member function.
11472 (pp_postfix_expression): Adjust.
11473 (pp_c_postfix_expression): Remove.
11474 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11475 from pp_c_postfix_expression. Adjust.
11476 (c_pretty_printer::c_pretty_printer): Do not assign to
11477 postfix_expression.
11478
11479 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11480
11481 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11482 virtua member function.
11483 (pp_primary_expression): Adjust.
11484 (pp_c_primary_expression): Remove.
11485 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11486 from pp_c_primary_expression. Adjust.
11487 (pp_c_initializer_list): Use pp_primary_expression.
11488 (c_pretty_printer::c_pretty_printer): Do not assign to
11489 primary_expression.
11490
11491 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11492
11493 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11494 * c-pretty-print.c (M_): Remove.
11495 (c_pretty_printer::translate_string): Define.
11496 (pp_c_type_specifier): Use it.
11497 (pp_c_primary_expression): Likewise.
11498 (pp_c_expression): Likewise.
11499
11500 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11501
11502 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11503 virtual function.
11504 (pp_c_id_expression): Remove.
11505 (pp_id_expression): Adjust.
11506 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11507 pp_c_id_expression. Adjust.
11508 (pp_c_postfix_expression): Use pp_id_expression.
11509 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11510
11511 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11512
11513 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11514 member function.
11515 (pp_constant): Adjust.
11516 (pp_c_constant): Remove.
11517 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11518 pp_c_constant. Adjust.
11519 (pp_c_constant)
11520 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11521 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11522
11523 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11524
11525 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11526 (c_pretty_printer::c_pretty_printer): Declare.
11527 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11528 c_pretty_printer_init. Adjust.
11529 (print_c_tree): Do not call c_pretty_printer_init.
11530 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11531
11532 2013-08-09 Arnaud Charlet <charlet@adacore.com>
11533
11534 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11535
11536 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11537
11538 PR c++/58080
11539 * c-common.c (pointer_int_sum): Add bool parameter.
11540 * c-common.h (pointer_int_sum): Adjust declaration.
11541
11542 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11543
11544 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11545 c_pretty_printer variable.
11546
11547 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11548
11549 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11550 (pp_base): Remove.
11551 (pp_c_base): Likewise. Adjust users.
11552 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11553 (pp_c_whitespace): Do not call pp_base.
11554 (pp_c_left_paren): Likewise.
11555 (pp_c_right_paren): Likewise.
11556 (pp_c_left_brace): Likewise.
11557 (pp_c_right_brace): Likewise.
11558 (pp_c_left_bracket): Likewise.
11559 (pp_c_right_bracket): Likewise.
11560 (pp_c_dot): Likewise.
11561 (pp_c_ampersand): Likewise.
11562 (pp_c_star): Likewise.
11563 (pp_c_arrow): Likewise.
11564 (pp_c_semicolon): Likewise.
11565 (pp_c_complement): Likewise.
11566 (pp_c_exclamation): Likewise.
11567 (pp_c_direct_declarator): Likewise.
11568 (pp_c_ws_string): Likewise.
11569 (pp_c_identifier): Likewise.
11570 (pp_c_statement): Likewise.
11571 (print_c_tree): Likewise.
11572
11573 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11574
11575 PR c++/58072
11576 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11577 provide useful error strings.
11578
11579 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11580
11581 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11582 printer functions instead of pp_string or operators and punctuators.
11583 (dump_generic_ada_node): Likewise.
11584 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11585 (pp_c_relational_expression): Likewise.
11586 (pp_c_logical_or_expression): Likewise.
11587
11588 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11589
11590 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11591 functions instead of pp_character.
11592 (pp_ada_tree_identifier): Likewise.
11593 (dump_ada_double_name): Likewise.
11594 (dump_ada_function_declaration): Likewise.
11595 (dump_ada_array_domains): Likewise.
11596 (dump_template_types): Likewise.
11597 (dump_generic_ada_node): Likewise.
11598 (print_ada_declaration): Likewise.
11599 (print_ada_struct_decl): Likewise.
11600 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11601
11602 2013-07-23 Tom Tromey <tromey@redhat.com>
11603
11604 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11605 * c-common.c (c_common_reswords): Add _Generic.
11606
11607 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11608
11609 * c-common.c: Fix typos.
11610 * c-common.h: Likewise.
11611
11612 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11613
11614 PR c++/55203
11615 * c-common.c (c_common_attribute_table): Add warn_unused.
11616 (handle_warn_unused_attribute): New.
11617
11618 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11619
11620 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11621 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11622
11623 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11624
11625 PR c++/57869
11626 * c.opt: Add Wconditionally-supported.
11627
11628 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11629
11630 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11631 unused variables l_length and l_node.
11632
11633 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11634
11635 PR c/57821
11636 * c-common.c (complete_array_type): Delay folding first index
11637 like other indices. When folding, check for index overflow.
11638
11639 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11640
11641 PR c++/57509
11642 * c-common.h (c_build_vec_perm_expr): New complain argument.
11643 * c-common.c (c_build_vec_perm_expr): Likewise.
11644 Use save_expr also in C++.
11645
11646 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11647
11648 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11649 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11650 * c-opts.c (c_common_post_options): Likewise.
11651
11652 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11653
11654 * array-notation-common.c (length_mismatch_in_expr): Changed the
11655 parameter type's from a dynamic array to a vec_tree. Also removed
11656 the size parameters.
11657 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11658 the change above.
11659
11660 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11661
11662 * c-common.h (struct cilkplus_an_parts): New structure.
11663 (struct cilkplus_an_loop_parts): Likewise.
11664 (cilkplus_extract_an_triplets): New prototype.
11665 (fix_sec_implicit_args): Likewise.
11666 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11667 (fix_sec_implicit_args): Likewise.
11668
11669 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11670
11671 * array-notation-common.c (find_inv_trees): Removed an unwanted
11672 typecasting.
11673 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11674 enum rid to enum tree_code.
11675
11676 2013-06-11 Jan Hubicka <jh@suse.cz>
11677
11678 * c-common.c (handle_alias_ifunc_attribute): Do not set
11679 DECL_EXTERNAL for weakref variables.
11680 * c-pragma.c (handle_pragma_weak): Make sure aliases
11681 are not declared as external.
11682
11683 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11684
11685 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11686 function from c/c-array-notation.c.
11687 (is_cilkplus_reduce_builtin): Likewise.
11688 (find_rank): Likewise.
11689 (extract_array_notation_exprs): Likewise.
11690 (replace_array_notations): Likewise.
11691 (find_inv_trees): Likewise.
11692 (replace_inv_trees): Likewise.
11693 (contains_array_notation_expr): Likewise.
11694 (find_correct_array_notation_type): Likewise.
11695 * c-common.h (struct inv_list): Moved this struct from the file
11696 c/c-array-notation.c and added a new field called additional tcodes.
11697 (length_mismatch_in_expr_p): New prototype.
11698 (is_cilkplus_reduce_builtin): Likewise.
11699 (find_rank): Likewise.
11700 (extract_array_notation_exprs): Likewise.
11701 (replace_array_notation): Likewise.
11702 (find_inv_trees): Likewise.
11703 (replace_inv_trees): Likewise.
11704 (find_correct_array_notation_type): Likewise.
11705
11706 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11707
11708 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11709 function array_notation_init_builtins is called.
11710 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11711 * c-common.def (ARRAY_NOTATION_REF): New tree.
11712 * c-common.h (build_array_notation_expr): New function declaration.
11713 (build_array_notation_ref): Likewise.
11714 (extract_sec_implicit_index_arg): New extern declaration.
11715 (is_sec_implicit_index_fn): Likewise.
11716 (ARRAY_NOTATION_CHECK): New define.
11717 (ARRAY_NOTATION_ARRAY): Likewise.
11718 (ARRAY_NOTATION_START): Likewise.
11719 (ARRAY_NOTATION_LENGTH): Likewise.
11720 (ARRAY_NOTATION_STRIDE): Likewise.
11721 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11722 ARRAY_NOTATION_REF.
11723 (pp_c_expression): Likewise.
11724 * c.opt (flag_enable_cilkplus): New flag.
11725 * array-notation-common.c: New file.
11726
11727 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11728
11729 PR c++/57274
11730 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11731
11732 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11733
11734 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11735 vectors.
11736
11737 2013-05-07 Han Shen <shenhan@google.com>
11738
11739 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11740
11741 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11742
11743 * c-common.c (check_user_alignment): Emit error for negative values.
11744
11745 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11746
11747 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11748
11749 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11750
11751 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11752 __GXX_EXPERIMENTAL_CXX1Y__.
11753
11754 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11755 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11756
11757 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11758 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11759 to simply use OPT_Wpointer_arith.
11760 (c_sizeof_or_alignof_type): Likewise.
11761
11762 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11763
11764 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11765
11766 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11767
11768 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11769 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11770 specifiers.
11771
11772 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11773
11774 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11775
11776 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11777
11778 * c-common.c (pointer_int_sum): Remove dead code.
11779
11780 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11781
11782 PR middle-end/56524
11783 * c-common.c (handle_optimize_attribute): Don't call
11784 save_optabs_if_changed.
11785
11786 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11787
11788 PR middle-end/56461
11789 * c-pch.c (pch_init): Free target_validity at the end.
11790
11791 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11792
11793 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11794
11795 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11796 Jakub Jelinek <jakub@redhat.com>
11797
11798 PR sanitizer/56454
11799 * c-common.c (handle_no_sanitize_address_attribute): New function.
11800 (c_common_attribute_table): Add no_sanitize_address attribute.
11801 (handle_no_address_safety_analysis_attribute): Add
11802 no_sanitize_address attribute, not no_address_safety_analysis
11803 attribute.
11804
11805 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11806
11807 PR target/52555
11808 * c-common.c (handle_optimize_attribute): Call
11809 save_optabs_if_changed.
11810
11811 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11812 Steven Bosscher <steven@gcc.gnu.org>
11813
11814 PR pch/54117
11815 * c-opts.c (c_common_post_options): If debug info is enabled
11816 and non-dwarf*, refuse to load PCH files and when writing PCH
11817 file warn.
11818
11819 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11820
11821 PR middle-end/56167
11822 * c-common.c (handle_error_attribute): Fix condition.
11823
11824 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11825
11826 PR c++/55742
11827 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11828
11829 2013-01-18 Jason Merrill <jason@redhat.com>
11830
11831 PR target/54908
11832 * c.opt (-fextern-tls-init): New.
11833 * c-opts.c (c_common_post_options): Handle it.
11834
11835 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11836
11837 PR c/48418
11838 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11839 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11840 and is either negative or bigger or equal to type precision
11841 of the first operand.
11842
11843 2012-12-03 Marek Polacek <polacek@redhat.com>
11844
11845 PR c/55570
11846 * c-common.c (check_user_alignment): Swap order of tests,
11847 check TREE_CODE first.
11848
11849 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11850
11851 PR c++/52654
11852 * c-common.h (overflow_type): New enum.
11853 (build_userdef_literal): Add overflow_type argument.
11854 (tree_userdef_literal): Add overflow_type.
11855 (USERDEF_LITERAL_OVERFLOW): New access macro.
11856 * c-common.c (build_userdef_literal): Add overflow_type
11857 argument.
11858 * c-lex.c (c_lex_with_flags): Add overflow_type to
11859 build_userdef_literal calls.
11860 (interpret_integer, interpret_float): Add overflow_type argument.
11861
11862 2012-11-28 Richard Biener <rguenther@suse.de>
11863
11864 PR c/35634
11865 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11866 here and use a type with proper overflow behavior for types that would
11867 need to be promoted for the arithmetic.
11868
11869 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11870
11871 PR sanitizer/55435
11872 * c-common.c (handle_no_address_safety_analysis_attribute): New
11873 function.
11874 (c_common_attribute_table): Add no_address_safety_analysis.
11875
11876 2012-11-16 Simon Baldwin <simonb@google.com>
11877
11878 * c.opt: Add f[no-]canonical-system-headers.
11879 * c-opts.c (c_common_handle_option): Handle
11880 OPT_fcanonical_system_headers.
11881
11882 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11883
11884 PR c++/54413
11885 * c-opts.c (c_common_handle_option): Set new flags.
11886 * c.opt: Describe new flags.
11887
11888 2012-11-09 Jason Merrill <jason@redhat.com>
11889
11890 * c.opt (Wabi-tag): New.
11891
11892 2012-11-09 Andi Kleen <ak@linux.intel.com>
11893
11894 PR 55139
11895 * c-common.c (get_atomic_generic_size): Mask with
11896 MEMMODEL_MASK
11897
11898 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11899
11900 PR c/53063
11901 * c.opt (Wformat): Make it Alias Wformat=1.
11902 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11903 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11904 LangEnabledBy.
11905 (Wformat=): RejectNegative. Use LangEnabledBy.
11906 (Wnonnull): Use LangEnabledBy.
11907 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11908 * c-format.c (set_Wformat): Delete.
11909 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11910 (maybe_read_dollar_number): Likewise.
11911 (avoid_dollar_number): Likewise.
11912 (finish_dollar_format_checking): Likewise.
11913 (check_format_info): Likewise.
11914 (check_format_info_main): Likewise.
11915 (check_format_types): Likewise.
11916 (format_type_warning): Likewise.
11917 * c-common.c (int): Likewise.
11918 (check_function_sentinel): Likewise.
11919 * c-common.h (warn_format,set_Wformat): Do not declare here.
11920
11921 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11922
11923 PR c/53063
11924 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11925 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11926 Use LangEnabledBy.
11927 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11928 common.opt.
11929 (Wvariadic-macros): Init(1).
11930 * c-opts.c (c_common_handle_option): Do not handle them
11931 explicitly.
11932 (c_common_post_options): Likewise.
11933 (sanitize_cpp_opts): warn_unused_macros is now
11934 cpp_warn_unused_macros.
11935 (push_command_line_include): Likewise.
11936 * c-common.c (warn_unknown_pragmas): Do not define.
11937 * c-common.h (warn_unknown_pragmas): Do not declare.
11938
11939 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11940
11941 PR c/51294
11942 * c-common.c (conversion_warning): Handle conditional expressions.
11943
11944 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11945
11946 PR c++/54930
11947 * c.opt (Wreturn_local_addr): Define new option.
11948
11949 2012-10-25 Jason Merrill <jason@redhat.com>
11950
11951 * c.opt (Wvirtual-move-assign): New.
11952
11953 * c.opt (Winherited-variadic-ctor): New.
11954
11955 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11956
11957 PR c++/54427
11958 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11959
11960 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11961
11962 * c-common.h (pch_cpp_save_state): Declare.
11963 * c-target.def (c_preinclude): New hook.
11964 * c-opts.c (done_preinclude): New.
11965 (push_command_line_include): Handle default preincluded header.
11966 (cb_file_change): Call pch_cpp_save_state when calling
11967 push_command_line_include.
11968 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11969 (pch_cpp_save_state): New.
11970 (pch_init): Call pch_cpp_save_state conditionally, instead of
11971 calling cpp_save_state.
11972
11973 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11974
11975 PR c/53063
11976 PR c/40989
11977 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11978 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11979 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11980 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11981 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11982 * c-opts.c (c_common_handle_option): Remove explicit handling from
11983 here.
11984 (c_common_post_options): Likewise.
11985
11986 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11987
11988 * c-ada-spec.c (LOCATION_COL): Delete.
11989 (compare_location): New function.
11990 (compare_node): Use it.
11991 (compare_comment): Likewise.
11992
11993 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11994
11995 PR c/53063
11996 PR c/40989
11997 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11998 * c-opts.c (c_common_handle_option): Do not set them here. Add
11999 comment.
12000 (c_common_post_options): Likewise.
12001
12002 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
12003
12004 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
12005 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
12006 Remove POINTER_TYPE handling, add large unsigned handling and use
12007 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
12008
12009 2012-10-12 Jakub Jelinek <jakub@redhat.com>
12010
12011 PR c/54381
12012 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
12013 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
12014 locs and array of 3 trees instead of just single loc and single
12015 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
12016 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
12017 For *cmp* builtins that take two sources strings report warnings
12018 about first and second source, not about destination and source.
12019
12020 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
12021
12022 PR c++/53055
12023 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
12024
12025 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
12026
12027 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
12028 declaring something coming from another file.
12029
12030 2012-10-10 Arnaud Charlet <charlet@adacore.com>
12031
12032 PR ada/54845
12033 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
12034
12035 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
12036
12037 PR c++/54194
12038 * c-common.c (warn_about_parentheses): Add location_t parameter;
12039 use EXPR_LOC_OR_LOC.
12040 * c-common.h: Update declaration.
12041
12042 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
12043
12044 PR c++/54427
12045 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
12046 more operations. Make error messages optional.
12047 * c-common.h (enum stv_conv): Moved from c-typeck.c.
12048 (scalar_to_vector): Declare.
12049
12050 2012-10-08 Jason Merrill <jason@redhat.com>
12051
12052 * c-common.c (c_common_reswords): Add thread_local.
12053
12054 2012-10-08 Dodji Seketeli <dodji@redhat.com>
12055
12056 PR c++/53528 C++11 attribute support
12057 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
12058 new functions.
12059 * c-common.c (check_cxx_fundamental_alignment_constraints): New
12060 static function.
12061 (handle_aligned_attribute): In choose strictest alignment
12062 among many. Use new check_cxx_fundamental_alignment_constraints.
12063 (handle_transparent_union_attribute): In c++11 attribute syntax,
12064 don't look through typedefs.
12065
12066 2012-10-04 Arnaud Charlet <charlet@adacore.com>
12067
12068 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
12069 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
12070 out of dumpfile.h.
12071
12072 2012-09-25 Dehao Chen <dehao@google.com>
12073
12074 PR middle-end/54645
12075 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
12076 map when read in the pch.
12077
12078 2012-09-18 Arnaud Charlet <charlet@adacore.com>
12079
12080 * c-ada-spec.c: Style fixes.
12081
12082 2012-09-18 Thomas Quinot <quinot@adacore.com>
12083
12084 * c.opt (-fada-spec-parent): Define new command line switch.
12085 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
12086 is specified, generate binding spec as a child of the specified unit.
12087
12088 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
12089 Manuel López-Ibáñez <manu@gcc.gnu.org>
12090
12091 PR c++/53210
12092 * c.opt ([Winit-self]): Enabled by -Wall in C++.
12093
12094 2012-08-23 Arnaud Charlet <charlet@adacore.com>
12095
12096 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
12097 for pointers, and add missing Convention C pragma.
12098 (print_ada_struct_decl): Add missing aliased keyword.
12099 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
12100
12101 2012-08-17 Jakub Jelinek <jakub@redhat.com>
12102
12103 * c-common.c (sizeof_pointer_memaccess_warning): New function.
12104 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12105 * c-opts.c (c_common_handle_option): Enable it for -Wall.
12106 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12107 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12108
12109 2012-08-10 Richard Guenther <rguenther@suse.de>
12110
12111 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12112
12113 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
12114
12115 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12116 instead of separate pp_newline and pp_flush.
12117 (print_c_tree): Likewise.
12118
12119 2012-07-26 Richard Henderson <rth@redhat.com>
12120
12121 * c-common.c (handle_hot_attribute): Allow labels.
12122 (handle_cold_attribute): Likewise.
12123
12124 2012-07-20 Jakub Jelinek <jakub@redhat.com>
12125
12126 PR c++/28656
12127 * c-common.c (check_function_nonnull): Handle multiple nonnull
12128 attributes properly.
12129
12130 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12131
12132 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12133 * c-ada-spec.c: Likewise.
12134 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12135
12136 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12137
12138 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12139 Remove code conditional on it.
12140
12141 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12142
12143 * c-gimplify.c: Do not include basic-block.h.
12144 * c-common.c: Do not include linfuncs.h.
12145
12146 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12147
12148 * c-common.h: Include tree.h.
12149
12150 2012-07-02 Jason Merrill <jason@redhat.com>
12151
12152 PR c++/53524
12153 * c-common.c (get_priority): Call default_conversion.
12154
12155 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
12156
12157 * c-pch.c (c_common_write_pch): Remove unused variables.
12158
12159 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12160
12161 * cppspec.c: Moved from gcc/ to here.
12162
12163 2012-06-27 Kai Tietz <ktietz@redhat.com>
12164
12165 PR preprocessor/37215
12166 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12167
12168 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12169
12170 * c-common.h (c_common_print_pch_checksum): Remove.
12171 * c-pch.c: Do not include output.h.
12172 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12173 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12174 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12175 (struct c_pch_header): Remove.
12176 (get_ident): Update gpch version.
12177 (pch_init): Do not print executable_checksum to asm_out_file.
12178 Do not fail if there is no asm_out_file to read back from. Set
12179 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12180 (c_common_write_pch): Verify that nothing was written to asm_out_file
12181 since pch_init was called. Do not write a c_pch_header, and do not
12182 copy from asm_out_file to the PCH.
12183 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12184 the content of asm_out_file from the PCH.
12185 (c_common_print_pch_checksum): Remove.
12186 * c-opts.c (c_common_init): Print out executable_checksum directly.
12187
12188 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12189
12190 * c-target.def (objc_declare_unresolved_class_reference,
12191 objc_declare_class_definition): Add new hooks.
12192
12193 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12194
12195 * c-lex.c: Do not include output.h.
12196 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12197 Remove uses of ASM_OUTPUT_IDENT.
12198
12199 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
12200
12201 PR c++/51033
12202 * c-common.h (c_build_vec_perm_expr): Move decl here.
12203 * c-common.c (c_build_vec_perm_expr): Move definition
12204 here.
12205
12206 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12207
12208 * c.opt (fconserve-space): Turn into a no-op.
12209
12210 2012-06-04 Sterling Augustine <saugustine@google.com>
12211
12212 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12213 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12214 both the start and end of the function.
12215
12216 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12217
12218 * c-common.c: Do not include output.h.
12219 * c-pragma.c: Likewise.
12220
12221 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12222
12223 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12224 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12225 (lang_decl_name): Handle namespace decls.
12226
12227 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12228
12229 * c-ada-spec.c: Do not include output.h.
12230 * c-semantics.c: Likewise.
12231
12232 2012-05-29 Joseph Myers <joseph@codesourcery.com>
12233
12234 * c-common.c: Fix typo.
12235
12236 2012-05-29 Michael Matz <matz@suse.de>
12237
12238 * c-common.h (c_expand_decl): Remove prototype.
12239
12240 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12241
12242 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12243 * c-opts.c (c_common_handle_option): Remove code handling
12244 warn_missing_braces.
12245
12246 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12247
12248 PR c++/25137
12249 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12250 -Wmissing_braces.
12251
12252 2012-05-22 Dodji Seketeli <dodji@redhat.com>
12253
12254 PR c++/53322
12255 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12256
12257 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12258
12259 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12260 * c-opts.c (c_common_handle_option): Do not handle explicitly
12261 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12262
12263 2012-05-16 Dodji Seketeli <dodji@redhat.com>
12264
12265 PR preprocessor/7263
12266 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
12267 to cpp_classify_number. For diagnostics, use the precise location
12268 instead of the global input_location.
12269
12270 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12271
12272 PR c++/11856
12273 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12274
12275 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12276
12277 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
12278
12279 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12280
12281 PR 53063
12282 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12283 Wreorder): Use LangEnabledBy.
12284 * c-opts.c (c_common_handle_option): Do not enable them
12285 explicitly. Call lang-specific generated functions.
12286 (c_common_post_options): Do not set them here.
12287
12288 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12289
12290 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12291 Wmissing-field-initializers,Wmissing-parameter-type,
12292 Wold-style-declaration,Woverride-init): Use EnabledBy.
12293 * c-opts.c (c_common_post_options): Do not set here explicitly.
12294
12295 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12296
12297 PR 53063
12298 * c-opts.c (c_common_handle_option): Use handle_generated_option
12299 to enable sub-options.
12300
12301 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12302
12303 PR c++/53158
12304 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12305
12306 2012-05-10 Richard Guenther <rguenther@suse.de>
12307
12308 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12309 adjust commentary about TYPE_IS_SIZETYPE types.
12310
12311 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12312
12313 PR c++/53261
12314 * c-common.c (warn_logical_operator): Check that argument of
12315 integer_zerop is not NULL.
12316
12317 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12318
12319 PR c/43772
12320 * c-common.c (warn_logical_operator): Do not warn if either side
12321 is already true or false.
12322
12323 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12324
12325 PR c/51712
12326 * c-common.c (expr_original_type): New.
12327 (shorten_compare): Do not warn for enumeration types.
12328
12329 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12330
12331 * c.opt (fpermissive): Add Var(flag_permissive).
12332
12333 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
12334
12335 PR c++/51033
12336 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12337 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12338
12339 2012-04-30 Dodji Seketeli <dodji@redhat.com>
12340
12341 Add -Wvarargs option
12342 * c.opt (Wvarargs): Define new option.
12343
12344 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12345
12346 * c-common.c (check_function_arguments): Replace
12347 Wmissing-format-attribute with Wsuggest-attribute=format.
12348
12349 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12350
12351 * c.opt (Wsuggest-attribute=format): New. Alias of
12352 Wmissing-format-attribute.
12353 * c-format.c (decode_format_type): Replace
12354 Wmissing-format-attribute with Wsuggest-attribute=format.
12355 (check_function_format): Likewise.
12356
12357 2012-04-27 Ollie Wild <aaw@google.com>
12358
12359 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12360 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12361 * c.opt: Add Wliteral-suffix.
12362
12363 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12364
12365 PR c/44774
12366 * c.opt (Wpedantic): New.
12367 (pedantic): Alias Wpedantic.
12368 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12369 (c_common_post_options): Likewise.
12370 (sanitize_cpp_opts): Likewise.
12371 * c-lex.c (interpret_float): Likewise.
12372 * c-format.c (check_format_types): Likewise.
12373 * c-common.c (pointer_int_sum): Likewise.
12374 (c_sizeof_or_alignof_type): Likewise.
12375 (c_add_case_label): Likewise.
12376 (c_do_switch_warnings): Likewise.
12377 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12378
12379 2012-04-15 Jason Merrill <jason@redhat.com>
12380
12381 PR c++/52818
12382 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12383 (C_STD_NAME): Distinguish between C++98 and C++11.
12384
12385 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12386
12387 PR target/52624
12388 * c-common.h (uint16_type_node): Rename into...
12389 (c_uint16_type_node): ...this.
12390 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12391 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12392
12393 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12394
12395 * c-common.c (warn_if_unused_value): Move definition to here.
12396 * c-common.h (warn_if_unused_value): Move declaration to here.
12397
12398 2012-03-23 William Bader <williambader@hotmail.com>
12399
12400 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12401
12402 2012-03-20 Jason Merrill <jason@redhat.com>
12403
12404 * c-common.h (enum cxx_dialect): Add cxx1y.
12405 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12406 test.
12407 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12408 * c-opts.c (c_common_post_options): Likewise.
12409 (set_std_cxx1y): New.
12410 (c_common_handle_option): Call it.
12411 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12412
12413 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12414
12415 PR c++/14710
12416 * c.opt ([Wuseless-cast]): Add.
12417
12418 2012-03-16 Richard Guenther <rguenther@suse.de>
12419
12420 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12421
12422 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12423
12424 PR c++/44783
12425 * c.opt (ftemplate-backtrace-limit) Add.
12426
12427 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12428
12429 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12430 handling.
12431 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12432 (init_pragma): Don't register extern_prefix.
12433
12434 2012-03-12 Richard Guenther <rguenther@suse.de>
12435
12436 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12437 (builtin_type_for_size): Likewise.
12438
12439 2012-02-13 Jakub Jelinek <jakub@redhat.com>
12440
12441 PR c++/52215
12442 * c-common.c (sync_resolve_params): Don't decide whether to convert
12443 or not based on TYPE_SIZE comparison, convert whenever arg_type
12444 is unsigned INTEGER_TYPE.
12445
12446 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12447
12448 PR c/52118
12449 * c.opt ([Wunused-local-typedefs]): Fix description.
12450
12451 2012-01-24 Mike Stump <mikestump@comcast.net>
12452
12453 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12454 exactly.
12455
12456 2012-01-18 Richard Guenther <rguenther@suse.de>
12457
12458 * c-opts.c (c_common_post_options): Reset LTO flags if
12459 we are about to generate a PCH.
12460
12461 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12462
12463 PR c++/51777
12464 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12465 use pp_unsigned_wide_integer.
12466
12467 2012-01-10 Richard Guenther <rguenther@suse.de>
12468
12469 PR middle-end/51806
12470 * c-opts.c (c_common_handle_option): Move -Werror handling
12471 to language independent code.
12472
12473 2012-01-05 Richard Guenther <rguenther@suse.de>
12474
12475 PR middle-end/51764
12476 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12477 from common.opt.
12478
12479 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12480
12481 PR c++/51316
12482 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12483 of array types with an unknown bound.
12484
12485 2011-12-20 Joseph Myers <joseph@codesourcery.com>
12486
12487 * c-common.c (flag_isoc99): Update comment to refer to C11.
12488 (flag_isoc1x): Change to flag_isoc11.
12489 * c-common.h (flag_isoc99): Update comment to refer to C11.
12490 (flag_isoc1x): Change to flag_isoc11.
12491 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12492 C11.
12493 * c-opts.c (set_std_c1x): Change to set_std_c11.
12494 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12495 Call set_std_c11.
12496 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12497 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12498 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12499 standard.
12500 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12501 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12502 (std=gnu1x): Make alias of std=gnu11.
12503
12504 2011-12-19 Jason Merrill <jason@redhat.com>
12505
12506 PR c++/51228
12507 * c-common.c (handle_transparent_union_attribute): Check the first
12508 field if the type is complete.
12509
12510 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12511
12512 PR libstdc++/51365
12513 * c-common.c (RID_IS_FINAL): Add.
12514 * c-common.h (RID_IS_FINAL): Add.
12515
12516 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12517
12518 * c.opt (fgnu-runtime): Provide full description.
12519 (fnext-runtime): Likewise.
12520 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12521
12522 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
12523
12524 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12525 predefines in one place. Add LOCK_FREE predefines.
12526 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12527 new func.
12528
12529 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
12530
12531 PR c/51256
12532 * c-common.c (get_atomic_generic_size): Check for various error
12533 conditions
12534 (resolve_overloaded_atomic_exchange,
12535 resolve_overloaded_atomic_compare_exchange,
12536 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12537 error_mark_node for error conditions.
12538
12539 2011-11-08 Richard Guenther <rguenther@suse.de>
12540
12541 PR middle-end/51010
12542 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
12543
12544 2011-11-07 Richard Henderson <rth@redhat.com>
12545 Aldy Hernandez <aldyh@redhat.com>
12546 Torvald Riegel <triegel@redhat.com>
12547
12548 Merged from transactional-memory.
12549
12550 * c-common.c (handle_tm_wrap_attribute,
12551 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12552 (struct c_common_reswords): Added __transaction* keywords.
12553 (struct c_common_attribute_table): Added transaction* and tm_regparm
12554 attributes.
12555 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12556 masks.
12557 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12558 find_tm_attribute): Declare.
12559
12560 2011-11-07 Jason Merrill <jason@redhat.com>
12561
12562 PR c++/35688
12563 * c-common.c, c-common.h: Revert yesterday's changes.
12564
12565 2011-11-06 Jason Merrill <jason@redhat.com>
12566
12567 PR c++/35688
12568 * c-common.c (decl_has_visibility_attr): Split out from...
12569 (c_determine_visibility): ...here.
12570 * c-common.h: Declare it.
12571
12572 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12573
12574 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12575 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12576 type.
12577 (check_user_alignment): New. Split out of
12578 handle_aligned_attribute. Disallow integer constants with
12579 noninteger types. Conditionally allow zero.
12580 (handle_aligned_attribute): Use check_user_alignment.
12581 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12582
12583 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12584 Richard Henderson <rth@redhat.com>
12585
12586 Merged from cxx-mem-model.
12587
12588 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12589 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12590 parameters that are the same type size.
12591 (get_atomic_generic_size): New. Find size of generic
12592 atomic function parameters and do typechecking.
12593 (add_atomic_size_parameter): New. Insert size into parameter list.
12594 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12595 either __atomic_exchange_n or external library call.
12596 (resolve_overloaded_atomic_compare_exchange): Restructure
12597 __atomic_compare_exchange to either _n variant or external library call.
12598 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12599 __atomic_load_n or an external library call.
12600 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12601 __atomic_store_n or an external library call.
12602 (resolve_overloaded_builtin): Handle new __atomic builtins.
12603
12604 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12605
12606 PR c++/50608
12607 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12608 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12609 <INDIRECT_REF>: Return the argument.
12610 <ARRAY_REF>: Remove special code for negative offset.
12611 Call fold_build_pointer_plus instead of size_binop.
12612 (fold_offsetof): Remove STOP_REF argument and adjust.
12613 * c-common.h (fold_offsetof_1): Declare.
12614 (fold_offsetof): Remove STOP_REF argument.
12615
12616 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12617
12618 PR c++/50810
12619 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12620 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12621 Wnarrowing for C++0x and C++98.
12622 * c.opt ([Wnarrowing]): Update.
12623
12624 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12625
12626 PR c++/44277
12627 * c.opt: Add Wzero-as-null-pointer-constant.
12628
12629 2011-10-31 Jason Merrill <jason@redhat.com>
12630
12631 * c.opt (-fdeduce-init-list): Off by default.
12632
12633 PR c++/50920
12634 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12635 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12636 and -Wc++11-compat.
12637 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12638
12639 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12640
12641 PR c++/30066
12642 * c.opt (fvisibility-inlines-hidden): Description change.
12643
12644 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12645
12646 Implement C++11 user-defined literals.
12647 * c-common.c (build_userdef_literal): New.
12648 * c-common.def: New tree code.
12649 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12650 * c-lex.c (interpret_float): Add suffix parm.
12651 (c_lex_with_flags): Build literal tokens.
12652
12653 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12654
12655 PR c++/50841
12656 Revert:
12657 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12658
12659 PR c++/50810
12660 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12661 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12662 Wnarrowing for C++0x and C++98.
12663 * c.opt ([Wnarrowing]): Update.
12664
12665 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12666
12667 PR c++/50810
12668 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12669 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12670 Wnarrowing for C++0x and C++98.
12671 * c.opt ([Wnarrowing]): Update.
12672
12673 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12674
12675 PR c++/45385
12676 * c-common.c (conversion_warning): Remove code looking for
12677 artificial operands.
12678
12679 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12680
12681 PR bootstrap/50760
12682 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12683 !NO_IMPLICIT_EXTERN_C.
12684
12685 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12686
12687 * c-common.c (c_common_reswords): Add __bases,
12688 __direct_bases.
12689 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12690
12691 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12692
12693 PR c++/50757
12694 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12695
12696 2011-10-15 Tom Tromey <tromey@redhat.com>
12697 Dodji Seketeli <dodji@redhat.com>
12698
12699 * c.opt (fdebug-cpp): New option.
12700 * c-opts.c (c_common_handle_option): Handle the option.
12701 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12702 output stream in parameter. Factorized from ...
12703 (maybe_print_line): ... this. Dump location debug information when
12704 -fdebug-cpp is in effect.
12705 (print_line_1): New static function. Takes an output stream in
12706 parameter. Factorized from ...
12707 (print_line): ... here. Dump location information when -fdebug-cpp
12708 is in effect.
12709 (scan_translation_unit): Dump location information when
12710 -fdebug-cpp is in effect.
12711
12712 2011-10-15 Tom Tromey <tromey@redhat.com>
12713 Dodji Seketeli <dodji@redhat.com>
12714
12715 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12716 without argument.
12717 * c-opts.c (c_common_handle_option)<case
12718 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12719 cases. Handle -ftrack-macro-expansion with and without argument.
12720
12721 2011-10-15 Tom Tromey <tromey@redhat.com>
12722 Dodji Seketeli <dodji@redhat.com>
12723
12724 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12725 (print_line, cb_define, do_line_change): Adjust to avoid touching
12726 the internals of struct line_map. Use the public API instead.
12727 * c-pch.c (c_common_read_pch): Likewise.
12728 * c-lex.c (fe_file_change): Likewise.
12729
12730 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12731
12732 PR c++/17212
12733 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12734
12735 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12736
12737 PR c++/33067
12738 * c-pretty-print.c (pp_c_floating_constant): Output
12739 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12740
12741 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12742
12743 * c-common.c (def_builtin_1): Delete old interface with two
12744 parallel arrays to hold standard builtin declarations, and replace
12745 it with a function based interface that can support creating
12746 builtins on the fly in the future. Change all uses, and poison
12747 the old names. Make sure 0 is not a legitimate builtin index.
12748 * c-omp.c (c_finish_omp_barrier): Ditto.
12749 (c_finish_omp_taskwait): Ditto.
12750 (c_finish_omp_flush): Ditto.
12751
12752 2011-10-11 Tristan Gingold <gingold@adacore.com>
12753
12754 * c.opt: (fallow-parameterless-variadic-functions): New.
12755
12756 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12757
12758 PR c++/33255 - Support -Wunused-local-typedefs warning
12759 * c-common.h (struct c_language_function::local_typedefs): New
12760 field.
12761 (record_locally_defined_typedef, maybe_record_typedef_use)
12762 (maybe_warn_unused_local_typedefs): Declare new functions.
12763 * c-common.c (record_locally_defined_typedef)
12764 (maybe_record_typedef_use)
12765 (maybe_warn_unused_local_typedefs): Define new functions.
12766 * c.opt: Declare new -Wunused-local-typedefs flag.
12767
12768 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12769
12770 PR middle-end/50266
12771 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12772 computations.
12773
12774 2011-09-05 Richard Guenther <rguenther@suse.de>
12775
12776 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12777 of integer_minus_one_node for empty array upper bounds.
12778
12779 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12780
12781 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12782 it's the first time it's being called on this main TU.
12783
12784 2011-08-24 Richard Guenther <rguenther@suse.de>
12785
12786 PR c/49396
12787 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12788
12789 2011-08-22 Gabriel Charette <gchare@google.com>
12790
12791 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12792 defined in cpp_init_builtins and c_cpp_builtins.
12793
12794 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12795
12796 * c-common.c (c_common_reswords): Add __builtin_complex.
12797 * c-common.h (RID_BUILTIN_COMPLEX): New.
12798
12799 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12800
12801 * c-common.c (c_common_reswords): Add _Noreturn.
12802 (keyword_is_function_specifier): Handle RID_NORETURN.
12803 * c-common.h (RID_NORETURN): New.
12804
12805 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12806
12807 * c-common.c (unsafe_conversion_p): New function. Check if it is
12808 unsafe to convert an expression to the type.
12809 (conversion_warning): Adjust, use unsafe_conversion_p.
12810 * c-common.h (unsafe_conversion_p): New function declaration.
12811
12812 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12813
12814 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12815 (c_finish_omp_taskyield): New prototype.
12816 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12817 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12818 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12819 or RHS1 have side-effects, evaluate those too in the right spot,
12820 if it is a decl and LHS is also a decl, error out if they
12821 aren't the same.
12822 (c_finish_omp_taskyield): New function.
12823 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12824 * c-pragma.c (omp_pragmas): Add taskyield.
12825 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12826 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12827 PRAGMA_OMP_CLAUSE_MERGEABLE.
12828
12829 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12830
12831 * c-common.h (set_underlying_type): Remove parm name from
12832 declaration.
12833
12834 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12835
12836 * c-pretty-print.h: Search c-common.h in c-family.
12837
12838 2011-07-22 Jason Merrill <jason@redhat.com>
12839
12840 PR c++/49793
12841 * c.opt (Wnarrowing): New.
12842
12843 PR c++/30112
12844 * c-common.h: Declare c_linkage_bindings.
12845 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12846
12847 PR c++/49813
12848 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12849 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12850 as flag_isoc99 for 'restrict'.
12851 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12852
12853 2011-07-21 Ian Lance Taylor <iant@google.com>
12854
12855 PR middle-end/49705
12856 * c-common.c (c_disable_warnings): New static function.
12857 (c_enable_warnings): New static function.
12858 (c_fully_fold_internal): Change local unused_p to bool. Call
12859 c_disable_warnings and c_enable_warnings rather than change
12860 c_inhibit_evaluation_warnings.
12861
12862 2011-07-20 Jason Merrill <jason@redhat.com>
12863
12864 PR c++/6709 (DR 743)
12865 PR c++/42603 (DR 950)
12866 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12867 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12868 (CPP_DECLTYPE): New.
12869 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12870
12871 2011-07-19 Richard Guenther <rguenther@suse.de>
12872
12873 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12874 * c-omp.c (c_finish_omp_for): Likewise.
12875
12876 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12877
12878 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12879 body on the next line.
12880
12881 2011-07-08 Jason Merrill <jason@redhat.com>
12882
12883 PR c++/45437
12884 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12885
12886 PR c++/49673
12887 * c-common.c (c_apply_type_quals_to_decl): Don't check
12888 TYPE_NEEDS_CONSTRUCTING.
12889
12890 2011-07-06 Richard Guenther <rguenther@suse.de>
12891
12892 * c-common.c (c_common_nodes_and_builtins):
12893 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12894
12895 2011-07-05 Richard Guenther <rguenther@suse.de>
12896
12897 * c-common.c (c_common_nodes_and_builtins): Build all common
12898 tree nodes first.
12899
12900 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12901
12902 * c-common.h (c_tree_chain_next): New static inline function.
12903
12904 * c-common.c (check_builtin_function_arguments): Handle
12905 BUILT_IN_ASSUME_ALIGNED.
12906
12907 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12908
12909 * c-common.c: Add sync_ or SYNC__ to builtin names.
12910 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12911
12912 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12913
12914 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12915 handler.
12916 (gen_pragma_handler): New union.
12917 (internal_pragma_handler): New type.
12918 (c_register_pragma_with_data)
12919 (c_register_pragma_with_expansion_and_data): New functions.
12920
12921 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12922 (c_register_pragma, c_register_pragma_with_expansion)
12923 (c_invoke_pragma_handler): Changed to work with
12924 internal_pragma_handler.
12925 (c_register_pragma_with_data)
12926 (c_register_pragma_with_expansion_and_data): New functions.
12927
12928 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12929
12930 * c-common.c: Include common/common-target.h.
12931 (handle_section_attribute): Use
12932 targetm_common.have_named_sections.
12933 * c-cppbuiltin.c: Include common/common-target.h.
12934 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12935
12936 2011-06-10 Richard Guenther <rguenther@suse.de>
12937
12938 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12939 to print a IDENTIFIER_NODE.
12940
12941 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12942 Joseph Myers <joseph@codesourcery.com>
12943
12944 * c.opt (fbuilding-libgcc): New option.
12945 * c-cppbuiltin.c (c_cpp_builtins): Define
12946 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12947
12948 2011-06-07 Jason Merrill <jason@redhat.com>
12949
12950 * c-common.c (max_tinst_depth): Lower default to 900.
12951
12952 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12953
12954 2011-06-07 Richard Guenther <rguenther@suse.de>
12955
12956 * c-common.c (c_common_nodes_and_builtins): Do not set
12957 size_type_node or call set_sizetype.
12958
12959 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12960
12961 PR debug/49130
12962 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12963 type when using pointer comparison to compare types.
12964
12965 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12966
12967 * c.opt: Add -Wdelete-non-virtual-dtor.
12968 * c-opts.c (c_common_handle_option): Include it in -Wall.
12969
12970 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12971
12972 PR bootstrap/49190
12973
12974 Revert:
12975 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12976
12977 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12978 not tree_common.
12979
12980 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12981
12982 PR c++/49165
12983 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12984 C++ don't call c_common_truthvalue_conversion on void type arms.
12985
12986 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12987
12988 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12989 (stmt_list_stack): Define.
12990 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12991 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12992
12993 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12994
12995 * c-common.c (warning_candidate_p): Check for BLOCKs.
12996
12997 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12998
12999 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13000 not tree_common.
13001
13002 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13003
13004 * c-common.c (def_fn_type): Remove extra va_end.
13005
13006 2011-05-23 Jason Merrill <jason@redhat.com>
13007
13008 PR c++/48106
13009 * c-common.c (c_common_get_narrower): New.
13010 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
13011
13012 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
13013
13014 * c-common.h (check_function_arguments): Tweak prototype of
13015 check_function_arguments.
13016 * c-common.c (check_function_arguments): Likewise. Adjust
13017 calls to check_function_nonnull, check_function_format, and
13018 check_function_sentinel.
13019 (check_function_sentinel): Take a FUNCTION_TYPE rather than
13020 separate attributes and typelist arguments. Use
13021 FOREACH_FUNCTION_ARGS to iterate over argument types.
13022
13023 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
13024
13025 * c-common.c (c_common_reswords): Reorder.
13026 * c-common.h (rid): Likewise.
13027
13028 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
13029
13030 * c-common.c (def_fn_type): Don't call build_function_type, call
13031 build_function_type_array or build_varargs_function_type_array
13032 instead.
13033 (c_common_nodes_and_builtins): Likewise.
13034
13035 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13036
13037 * c-common.c (c_add_case_label): Omit the loc argument to
13038 build_case_label.
13039 * c-common.h (build_case_label): Remove.
13040 * c-semantics.c (build_case_label): Remove.
13041
13042 2011-05-05 Joseph Myers <joseph@codesourcery.com>
13043
13044 * c-objc.h (objc_start_method_definition): Update prototype.
13045 * stub-objc.c (objc_start_method_definition): Add extra parameter.
13046
13047 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
13048
13049 * c-common.c (check_main_parameter_types): Reindent. Don't use
13050 TYPE_ARG_TYPES directly.
13051 (handle_nonnull_attribute): Likewise.
13052 (sync_resolve_params): Likewise.
13053 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
13054 to check_format_string.
13055 (handle_format_attribute): Likewise.
13056 (check_format_string): Take a function type to examine instead of
13057 a type list. Use a function_arg_iterator to step through argument
13058 types.
13059
13060 2011-05-04 Richard Guenther <rguenther@suse.de>
13061
13062 * c-common.c (fix_string_type): Use size_int for index type bounds.
13063 (start_fname_decls): Do not pass NULL to build_int_cst.
13064 (c_init_attributes): Likewise.
13065 * c-lex.c (c_lex_with_flags): Likewise.
13066
13067 2011-04-27 Jason Merrill <jason@redhat.com>
13068
13069 * c-common.c (make_tree_vector_from_list): New.
13070 * c-common.h: Declare it.
13071
13072 2011-04-26 Richard Guenther <rguenther@suse.de>
13073
13074 PR preprocessor/48248
13075 * c-ppoutput.c (maybe_print_line): Always optimize newlines
13076 for output size with -P.
13077
13078 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
13079
13080 * c-common.c (struct c_common_resword): Add __underlying_type.
13081 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
13082
13083 2011-04-20 Jim Meyering <meyering@redhat.com>
13084
13085 * c-format.c (init_dollar_format_checking): Remove useless
13086 if-before-free.
13087
13088 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
13089
13090 * c-objc.h (objc_get_interface_ivars): Removed.
13091 (objc_detect_field_duplicates): New.
13092 * stub-objc.c: Likewise.
13093
13094 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13095
13096 * stub-objc.c (objc_declare_protocols): Renamed to
13097 objc_declare_protocol.
13098 * c-objc.h: Likewise.
13099
13100 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13101
13102 * stub-objc.c (objc_declare_class): Updated argument name.
13103
13104 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13105
13106 * c-common.h (c_common_init_ts): Declare.
13107 * c-common.c (c_common_init_ts): Define.
13108
13109 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
13110
13111 * c-objc.h (objc_build_message_expr): Updated prototype.
13112 * stub-objc.c (objc_build_message_expr): Likewise.
13113
13114 2011-04-12 Martin Jambor <mjambor@suse.cz>
13115
13116 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13117 of cgraph_node.
13118
13119 2011-04-11 Richard Guenther <rguenther@suse.de>
13120
13121 * c-common.c (complete_array_type): Build a range type of
13122 proper type.
13123
13124 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13125
13126 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13127 (handle_type_generic_attribute): Likewise.
13128
13129 2011-04-07 Jason Merrill <jason@redhat.com>
13130
13131 PR c++/48450
13132 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13133 conversion from C++0x scoped enum.
13134
13135 2011-04-06 Joseph Myers <joseph@codesourcery.com>
13136
13137 * c-target-def.h: New file.
13138 * c-target.def: New file.
13139 * c-target.h: New file.
13140 * c-common.c (targetcm): Don't define here.
13141 * c-common.h (default_handle_c_option): Declare.
13142 * c-format.c: Include c-target.h instead of target.h.
13143 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13144 include tm.h.
13145 (default_handle_c_option): Move from targhooks.c.
13146
13147 2011-03-29 Jakub Jelinek <jakub@redhat.com>
13148
13149 PR preprocessor/48248
13150 * c-ppoutput.c (print): Add src_file field.
13151 (init_pp_output): Initialize it.
13152 (maybe_print_line): Don't optimize by adding up to 8 newlines
13153 if map->to_file and print.src_file are different file.
13154 (print_line): Update print.src_file.
13155
13156 2011-03-25 Kai Tietz <ktietz@redhat.com>
13157
13158 * c-ada-spec.c (compare_comment): Use filename_cmp
13159 instead of strcmp for filename.
13160
13161 2011-03-25 Jeff Law <law@redhat.com>
13162
13163 * c-common.c (def_fn_type): Add missing va_end.
13164
13165 2011-03-25 Jason Merrill <jason@redhat.com>
13166
13167 * c.opt: Add -std=c++03.
13168
13169 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13170
13171 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13172
13173 2011-03-17 Kai Tietz <ktietz@redhat.com>
13174
13175 PR target/12171
13176 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13177 Display allowed attributes for function pointer types.
13178 (pp_c_attributes_display): New function to display
13179 attributes having affects_type_identity flag set to true.
13180 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13181
13182 * c-common.c (c_common_attribute_table):
13183 Add new element.
13184 (c_common_format_attribute_table): Likewise.
13185
13186 2011-03-18 Jason Merrill <jason@redhat.com>
13187
13188 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13189 * c-common.h: Don't declare it here.
13190 * c-common.c: Or define it here.
13191 * c-opts.c (c_common_handle_option): Or set it here.
13192
13193 PR c++/35315
13194 * c-common.c (handle_transparent_union_attribute): Don't
13195 make a duplicate type in C++.
13196
13197 2011-03-15 Jason Merrill <jason@redhat.com>
13198
13199 * c-common.c (max_constexpr_depth): New.
13200 * c-common.h: Declare it.
13201 * c-opts.c (c_common_handle_option): Set it.
13202 * c.opt (fconstexpr-depth): New option.
13203
13204 2011-03-11 Jason Merrill <jason@redhat.com>
13205
13206 * c-common.c (attribute_takes_identifier_p): Add missing const.
13207
13208 PR c++/46803
13209 * c-common.c (attribute_takes_identifier_p): Assume that an
13210 unknown attribute takes an identifier.
13211
13212 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13213
13214 PR c/47786
13215 * c-common.c (c_type_hash): Call list_length instead of iterating
13216 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13217
13218 2011-02-19 Jakub Jelinek <jakub@redhat.com>
13219
13220 PR c/47809
13221 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13222
13223 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13224
13225 * c.opt (fobjc-abi-version=) New.
13226 (fobjc-nilcheck): New.
13227
13228 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13229
13230 PR c++/46890
13231 * c-common.h (keyword_is_decl_specifier): Declare.
13232 * c-common.c (keyword_is_decl_specifier): Define.
13233 (keyword_is_function_specifier): New function.
13234
13235 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13236
13237 PR c/47473
13238 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13239 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13240 REAL_TYPE.
13241
13242 2011-01-26 Arnaud Charlet <charlet@adacore.com>
13243
13244 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13245
13246 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13247
13248 PR pch/47430
13249 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13250 after init_c_lex if pch_file is set.
13251
13252 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13253
13254 PR c++/43601
13255 * c.opt (-fkeep-inline-dllexport): New switch.
13256
13257 2011-01-12 Richard Guenther <rguenther@suse.de>
13258
13259 PR middle-end/32511
13260 * c-common.c (handle_weak_attribute): Warn instead of error
13261 on declaring an inline function weak.
13262
13263 2011-01-05 Tom Tromey <tromey@redhat.com>
13264
13265 * c-common.h (lvalue_error): Update.
13266 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13267 not error.
13268
13269 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
13270
13271 PR objc/47075
13272 * c-objc.h (objc_finish_message_expr): Added argument to
13273 prototype.
13274
13275 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13276
13277 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13278 Use prototype_p.
13279
13280 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13281
13282 * c-objc.h (objc_maybe_warn_exceptions): New.
13283 * stub-objc.c (objc_maybe_warn_exceptions): New.
13284
13285 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13286
13287 * c-common.h (readonly_error): Declare.
13288 * c-common.c (readonly_error): Define.
13289
13290 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13291
13292 * c-common.h (invalid_indirection_error): Declare.
13293 * c-common.c (invalid_indirection_error): Define.
13294
13295 2010-12-03 Richard Guenther <rguenther@suse.de>
13296
13297 PR c/46745
13298 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13299 (pp_c_unary_expression): Likewise.
13300 (pp_c_expression): Likewise.
13301
13302 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13303
13304 * c-common.h (objc_finish_function): New.
13305 (objc_non_volatilized_type): Removed.
13306 (objc_type_quals_match): Removed.
13307 * stub-objc.c (objc_finish_function): New.
13308 (objc_non_volatilized_type): Removed.
13309 (objc_type_quals_match): Removed.
13310
13311 2010-11-30 Joseph Myers <joseph@codesourcery.com>
13312
13313 * c-common.h (parse_optimize_options): Declare.
13314 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13315 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13316
13317 2010-11-29 Joseph Myers <joseph@codesourcery.com>
13318
13319 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13320 GET_ENVIRONMENT.
13321 * c-pch.c (O_BINARY): Don't define here.
13322 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13323
13324 2010-11-25 Joseph Myers <joseph@codesourcery.com>
13325
13326 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13327 targetm.except_unwind_info.
13328
13329 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13330
13331 * c-opts.c (c_common_handle_option): Pass location to
13332 set_struct_debug_option.
13333
13334 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13335
13336 * c-common.c (visibility_options): Move from ../opts.c.
13337 * c-common.h (struct visibility_flags, visibility_options):
13338 Declare here.
13339 * c-opts.c (finish_options): Rename to c_finish_options.
13340 (c_common_init): Update call to finish_options.
13341
13342 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13343
13344 PR objc/34033
13345 * c-lex.c (lex_string): Check that each string in an Objective-C
13346 string concat sequence starts with either one or zero '@', and
13347 that there are no spurious '@' signs at the end.
13348
13349 2010-11-20 Joseph Myers <joseph@codesourcery.com>
13350
13351 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13352 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13353 HANDLE_PRAGMA_VISIBILITY.
13354 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13355 HANDLE_PRAGMA_VISIBILITY): Don't define.
13356 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13357
13358 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13359
13360 PR c++/16189
13361 PR c++/36888
13362 PR c++/45331
13363 * c-common.h (keyword_begins_type_specifier): Declare.
13364 (keyword_is_storage_class_specifier): Declare.
13365 (keyword_is_type_qualifier): Declare.
13366 * c-common.c (keyword_begins_type_specifier): New function.
13367 (keyword_is_storage_class_specifier): New function.
13368 (keyword_is_type_qualifier): Declare.
13369
13370 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13371
13372 PR c/46547
13373 * c-common.c (in_late_binary_op): Define.
13374 (c_common_truthvalue_conversion): Check in_late_binary_op before
13375 calling c_save_expr.
13376 * c-common.h (in_late_binary_op): Declare.
13377
13378 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13379
13380 * c-opts.c (c_common_handle_option): Update calls to
13381 set_struct_debug_option.
13382
13383 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13384
13385 * c-common.h (objc_declare_protocols): Added additional argument.
13386 * stub-objc.c (objc_declare_protocol): Same change.
13387
13388 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13389
13390 PR c/33193
13391 * c-common.h (build_real_imag_expr): Declare.
13392 * c-semantics.c (build_real_imag_expr): Define.
13393
13394 2010-11-17 Joseph Myers <joseph@codesourcery.com>
13395
13396 * c-opts.c (c_common_parse_file): Take no arguments.
13397 * c-common.h (c_common_parse_file): Update prototype.
13398
13399 2010-11-16 Jakub Jelinek <jakub@redhat.com>
13400
13401 PR c++/46401
13402 * c-common.c (warning_candidate_p): Don't track non-const calls
13403 or STRING_CSTs.
13404
13405 2010-11-15 Ian Lance Taylor <iant@google.com>
13406
13407 * c-lex.c (init_c_lex): Set macro debug callbacks if
13408 flag_dump_go_spec is set.
13409
13410 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13411
13412 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13413 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13414
13415 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13416
13417 PR preprocessor/45038
13418 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13419 dialects.
13420
13421 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13422
13423 * c-common.h (c_family_lang_mask): Declare.
13424 * c-opts.c (c_family_lang_mask): Make extern.
13425 * c-pragma.c (handle_pragma_diagnostic): Use
13426 control_warning_option.
13427
13428 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13429
13430 * c-common.c (parse_optimize_options): Update call to
13431 decode_options.
13432 * c-common.h (c_common_handle_option): Update prototype.
13433 * c-opts.c (c_common_handle_option): Take location_t parameter and
13434 pass it to other functions.
13435
13436 2010-11-11 Joseph Myers <joseph@codesourcery.com>
13437
13438 * c-opts.c (warning_as_error_callback): Remove.
13439 (c_common_initialize_diagnostics): Don't call
13440 register_warning_as_error_callback.
13441 (c_common_handle_option): Handle -Werror=normalized= here.
13442
13443 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13444
13445 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13446 in diagnostic.
13447 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13448 letter.
13449 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13450 Remove trailing '.' from diagnostics.
13451 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13452
13453 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13454
13455 * c-common.c (parse_optimize_options): Pass global_dc to
13456 decode_options.
13457 * c-opts.c (c_common_handle_option): Pass &global_options to
13458 set_Wstrict_aliasing.
13459 * c.opt (v): Don't mark Common or document here.
13460
13461 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13462
13463 PR target/44981
13464 * c-format.c (format_type): New type gcc_objc_string_format_type.
13465 (valid_stringptr_type_p): New.
13466 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
13467 (check_format_string): Pass expected type, use
13468 valid_stringptr_type_p (), check that the format string types are
13469 consistent with the format specification.
13470 (decode_format_attr): Warn if NSString is used outside objective-c.
13471 (format_types_orig): Add NSString.
13472 (format_name): New.
13473 (format_flags): New.
13474 (check_format_arg): Handle format strings requiring an external parser.
13475 first_target_format_type: New variable.
13476 (handle_format_attribute): Set up first_target_format_type, pass the
13477 expected format arg string type to check_format_string().
13478 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
13479 * stub-objc.c (objc_string_ref_type_p): New.
13480 (objc_check_format_arg): New.
13481
13482 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13483
13484 Fixed using the Objective-C 2.0 dot-syntax with class names.
13485 * c-common.h (objc_build_class_component_ref): New.
13486 * stub-objc.c (objc_build_class_component_ref): New.
13487
13488 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13489
13490 * c.opt (Wproperty-assign-default): New option.
13491
13492 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13493
13494 Implemented -fobjc-std=objc1 flag.
13495 * c.opt (fobjc-std=objc1): New option.
13496
13497 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13498
13499 Implemented format and noreturn attributes for Objective-C methods.
13500 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13501 attribute for Objective-C methods.
13502
13503 2010-10-31 Jason Merrill <jason@redhat.com>
13504
13505 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13506 EXPR_LOC_OR_HERE.
13507
13508 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13509
13510 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13511 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13512 (objc_add_property_declaration): Removed arguments for copies and
13513 ivar.
13514 (objc_build_getter_call): Renamed to
13515 objc_maybe_build_component_ref.
13516 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13517 (objc_is_property_ref): New.
13518 * c-common.c (c_common_reswords): Removed copies and ivar.
13519 * stub-objc.c (objc_add_property_declaration): Removed arguments
13520 for copies and ivar.
13521 (objc_build_getter_call): Renamed to
13522 objc_maybe_build_component_ref.
13523 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13524 (objc_is_property_ref): New.
13525
13526 2010-10-29 Arnaud Charlet <charlet@adacore.com>
13527 Matthew Gingell <gingell@adacore.com>
13528
13529 * c-ada-spec.c (separate_class_package): New function.
13530 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13531 name of their enclosing package.
13532 (print_ada_declaration): Use separate_class_package.
13533
13534 2010-10-27 Jason Merrill <jason@redhat.com>
13535
13536 * c-common.c (c_common_reswords): Add __is_literal_type.
13537 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13538
13539 * c-common.c (check_case_value): Remove special C++ code.
13540
13541 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13542
13543 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13544 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13545 and RID_LAST_PATTR.
13546 (objc_add_property_declaration): Added additional arguments.
13547 (objc_property_attribute_kind): Removed.
13548 (objc_set_property_attr): Removed.
13549 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13550 copy and nonatomic.
13551 * stub-objc.c (objc_add_property_declaration): Added additional
13552 arguments.
13553 (objc_set_property_attr): Removed.
13554
13555 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13556
13557 * c-common.h (objc_add_property_variable): Renamed to
13558 objc_add_property_declaration. Added location argument.
13559 * stub-objc.c (objc_add_property_variable): Same change.
13560
13561 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13562
13563 * c-common.h (objc_maybe_printable_name): New.
13564 * stub-objc.c (objc_maybe_printable_name): New.
13565
13566 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13567 Andrew Pinski <pinskia@gmail.com>
13568
13569 * c-common.h (c_common_mark_addressable_vec): Declare.
13570 * c-common.c (c_common_mark_addressable_vec): New function.
13571
13572 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13573
13574 * c-common.h (objc_set_method_type): Removed.
13575 (objc_add_method_declaration): Added boolean argument.
13576 (objc_start_method_definition): Same change.
13577 (objc_build_method_signature): Same change.
13578 * stub-objc.c (objc_set_method_type): Removed.
13579 (objc_add_method_declaration): Added boolean argument.
13580 (objc_start_method_definition): Same change.
13581 (objc_build_method_signature): Same change.
13582
13583 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13584
13585 * c-common.h (finish_file): Removed.
13586 (objc_write_global_declarations): New.
13587 * c-opts.c (c_common_parse_file): Do not call finish_file.
13588 * stub-objc.c (objc_write_global_declarations): New.
13589
13590 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13591
13592 Implemented parsing @synthesize and @dynamic for
13593 Objective-C/Objective-C++.
13594 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13595 (objc_add_synthesize_declaration): New.
13596 (objc_add_dynamic_declaration): New.
13597 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13598 * stub-objc.c (objc_add_synthesize_declaration): New.
13599 (objc_add_dynamic_declaration): New.
13600
13601 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13602
13603 PR target/46041
13604 * c-cppbuiltin.c (mode_has_fma): Move function here from
13605 builtins.c. Don't use the fma optab, instead just use the
13606 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13607 using -save-temps.
13608
13609 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13610
13611 Merge from 'apple/trunk' branch on FSF servers.
13612
13613 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13614
13615 Radar 4330422
13616 * c-common.h (objc_non_volatilized_type): New declaration
13617 * stub-objc.c (objc_non_volatilized_type): New stub.
13618
13619 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13620
13621 Merge from 'apple/trunk' branch on FSF servers.
13622
13623 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13624
13625 Radar 4133425
13626 * c-common.h (objc_diagnose_private_ivar): New decl.
13627 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13628
13629 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13630
13631 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13632 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13633 (objc_ivar_visibility_kind): New enum.
13634 (objc_set_visibility): Adjust prototype to use visibility enum.
13635 * stub-objc.c (objc_set_visibility): Adjust stub to use
13636 visibility enum.
13637
13638 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13639
13640 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13641 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13642 has the appropriate fma builtins.
13643 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13644
13645 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13646
13647 merge from FSF apple 'trunk' branch.
13648 2006 Fariborz Jahanian <fjahanian@apple.com>
13649
13650 Radars 4436866, 4505126, 4506903, 4517826
13651 * c-common.c (c_common_resword): Define @property and its attributes.
13652 * c-common.h: Define property attribute enum entries.
13653 (OBJC_IS_PATTR_KEYWORD): New.
13654 (objc_property_attribute_kind): New enum.
13655 Declare objc_set_property_attr (), objc_add_property_variable (),
13656 objc_build_getter_call () and objc_build_setter_call ().
13657 * stub-objc.c (objc_set_property_attr): New stub.
13658 (objc_add_property_variable): Likewise.
13659 (objc_build_getter_call): Likewise.
13660 (objc_build_setter_call) Likewise.
13661
13662 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13663
13664 merge from FSF apple 'trunk' branch.
13665 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13666
13667 Radar 3803157 (method attributes)
13668 * c-common.c (handle_deprecated_attribute): Recognize
13669 objc methods as valid declarations.
13670 * c-common.h: Declare objc_method_decl ().
13671 * stub-objc.c (objc_method_decl): New stub.
13672
13673 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13674
13675 * c-common.c (parse_optimize_options): Call
13676 decode_cmdline_options_to_array_default_mask before
13677 decode_options. Update arguments to decode_options.
13678 * c-common.h (c_common_init_options_struct): Declare.
13679 * c-opts.c (c_common_init_options_struct): New. Split out from
13680 c_common_init_options.
13681
13682 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13683
13684 Implemented fast enumeration for Objective-C.
13685 * c-common.h (objc_finish_foreach_loop): New.
13686 * stub-objc.c (objc_finish_foreach_loop): New.
13687
13688 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13689
13690 * c-common.h (struct diagnostic_context): Don't declare here.
13691 (c_common_initialize_diagnostics): Declare using
13692 diagnostic_context typedef.
13693 * c-opts.c (c_common_handle_option): Pass global_dc to
13694 handle_generated_option.
13695
13696 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13697
13698 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13699 handle_generated_option.
13700
13701 2010-10-03 Ian Lance Taylor <iant@google.com>
13702
13703 * c.opt (-fplan9-extensions): New option.
13704
13705 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13706
13707 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13708 Remove.
13709 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13710 of duplicating code.
13711
13712 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13713
13714 * c-common.c: Add two new entries for @optional
13715 and @required keywords.
13716
13717 merge from FSF 'apple/trunk' branch.
13718 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13719
13720 Radar 4386773
13721 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13722 objective-c keywords.
13723 (objc_set_method_opt): New declaration.
13724 * stub-objc.c (objc_set_method_opt): New stub.
13725
13726 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13727
13728 * c-common.c (handle_optimize_attribute): Pass &global_options to
13729 cl_optimization_save and cl_optimization_restore.
13730 * c-opts.c (c_common_handle_option): Pass &global_options to
13731 handle_generated_option.
13732 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13733 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13734 &global_options to cl_optimization_restore.
13735
13736 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13737
13738 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13739 Objective-C/Objective-C++ keywords.
13740
13741 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13742
13743 Merge from 'apple/trunk' branch on FSF servers.
13744
13745 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13746
13747 Radar 4281748
13748 * c-common.h (objc_check_global_decl): New declaration.
13749 * stub-objc.c (objc_check_global_decl): New stub.
13750
13751 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13752
13753 * c.opt: Don't use VarExists.
13754
13755 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13756
13757 * c-common.c (c_cpp_error): Update names of diagnostic_context
13758 members.
13759 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13760 cl_optimization members.
13761 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13762 sanitize_cpp_opts, finish_options): Update names of cpp_options
13763 members.
13764
13765 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13766
13767 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13768 (objc_is_reserved_word): Removed.
13769 * c-common.c: Updated comments.
13770 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13771 objc_is_reserved_word.
13772 * stub-objc.c (objc_is_reserved_word): Removed.
13773
13774 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13775
13776 * c-common.h (objc_add_method_declaration): Adjust prototype to
13777 include attributes.
13778 (objc_start_method_definition): Likewise.
13779 (objc_build_keyword_decl): Likewise.
13780 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13781 (objc_start_method_definition): Likewise.
13782 (objc_build_keyword_decl): Likewise.
13783
13784 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13785
13786 * c-common.h (objc_start_class_interface): Adjust prototype.
13787 (objc_start_category_interface): Likewise.
13788 (objc_start_protocol): Likewise.
13789 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13790 (objc_start_class_interface): Likewise.
13791 (objc_start_category_interface): Likewise.
13792
13793 2010-09-27 Ian Lance Taylor <iant@google.com>
13794
13795 * c-common.c (c_common_attribute_table): Add no_split_stack.
13796 (handle_no_split_stack_attribute): New static function.
13797
13798 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13799
13800 Merge from 'apple/trunk' branch on FSF servers.
13801
13802 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13803
13804 Radar 4229905
13805 * c-common.h (objc_have_common_type): New declaration.
13806 * stub-objc.c (objc_have_common_type): New stub.
13807
13808 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13809
13810 Radar 4154928
13811 * c-common.h (objc_common_type): New prototype.
13812 * stub-objc.c (objc_common_type): New stub.
13813
13814 2010-09-24 Jan Hubicka <jh@suse.cz>
13815
13816 * c-common.c (handle_leaf_attribute): New function.
13817 (struct attribute_spec c_common_att): Add leaf.
13818
13819 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13820
13821 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13822 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13823 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13824 -include-barrier, -include-directory, -include-directory=,
13825 -include-directory-after, -include-directory-after=,
13826 -include-prefix, -include-prefix=, -include-with-prefix,
13827 -include-with-prefix=, -include-with-prefix-after,
13828 -include-with-prefix-after=, -include-with-prefix-before,
13829 -include-with-prefix-before=, -no-integrated-cpp,
13830 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13831 -output=, -pedantic, -pedantic-errors, -preprocess,
13832 -print-missing-file-dependencies, -trace-includes, -traditional,
13833 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13834 -user-dependencies, -verbose, -write-dependencies,
13835 -write-user-dependencies, no-integrated-cpp, traditional): New.
13836
13837 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13838
13839 PR objc/23710
13840 * c-common.h (objc_start_method_definition): Return bool instead
13841 of void.
13842 * stub-objc.c (objc_start_method_definition): Return bool instead
13843 of void.
13844
13845 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13846
13847 PR objc/25965
13848 * c-common.h (objc_get_interface_ivars): New declaration.
13849 * stub-objc.c (objc_get_interface_ivars): New stub.
13850
13851 2010-09-15 Ian Lance Taylor <iant@google.com>
13852
13853 * c-common.c (parse_optimize_options): Do not capitalize warning
13854 messages. Remove period at end of warning message.
13855
13856 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13857
13858 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13859 (handle_alias_attribute): ... here.
13860 (handle_ifunc_attribute): New.
13861
13862 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13863
13864 * c-common.h (do_warn_double_promotion): Declare.
13865 * c-common.c (do_warn_double_promotion): Define.
13866
13867 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13868
13869 * c.opt (Wdouble-promotion): New.
13870
13871 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13872
13873 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13874 fvtable-thunks, fxref): Mark no longer supported in help text.
13875
13876 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13877
13878 * c.opt (Wimport, fall-virtual, falt-external-templates,
13879 fdefault-inline, fenum-int-equiv, fexternal-templates,
13880 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13881 fname-mangling-version-, fnew-abi, fnonnull-objects,
13882 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13883 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13884 applicable.
13885 (fhandle-exceptions): Mark with Alias and Warn.
13886 * c-opts.c (c_common_handle_option): Don't handle options marked
13887 as ignored.
13888
13889 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13890
13891 * c.opt (Wcomments, Werror-implicit-function-declaration,
13892 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13893 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13894 aliases.
13895 * c-common.c (option_codes): Use OPT_Wcomment instead of
13896 OPT_Wcomments.
13897 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13898 Don't handle options marked as aliases.
13899
13900 2010-08-25 Richard Guenther <rguenther@suse.de>
13901
13902 * c-common.c (c_common_get_alias_set): Remove special
13903 handling for pointers.
13904
13905 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13906
13907 * c-common.c: Use FOR_EACH_VEC_ELT.
13908 * c-gimplify.c: Likewise.
13909 * c-pragma.c: Likewise.
13910
13911 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13912
13913 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13914 RejectDriver.
13915 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13916 RejectDriver.
13917 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13918 instead of OPT_MDX and OPT_MMDX.
13919
13920 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13921
13922 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13923
13924 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13925
13926 * c.opt (MD, MMD): Change to MDX and MMDX.
13927 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13928
13929 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13930
13931 * c-opts.c (c_common_handle_option): Call handle_generated_option
13932 instead of handle_option.
13933
13934 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13935
13936 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13937 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13938
13939 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13940
13941 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13942 (pending_redefine_extname): Change type to a VEC.
13943 (add_to_renaming_pragma_list): Update for new type of
13944 pending_redefine_extname.
13945 (maybe_apply_renaming_pragma): Likewise.
13946
13947 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13948
13949 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13950 visited.
13951 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13952 decide whether a type has already been declared/seen.
13953 Do not go to the original type.
13954 (dump_nested_types): New parameter forward.
13955 Generate forward declaration if needed and mark type as visited.
13956 (print_ada_declaration): Call dump_nested_types if not already done.
13957 Mark types as visited.
13958
13959 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13960
13961 * c.opt (-print-pch-checksum): Remove option.
13962 * c-opts.c (c_common_handle_option): Don't handle
13963 OPT_print_pch_checksum.
13964
13965 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13966
13967 * c-common.h (c_common_handle_option): Update prototype and return
13968 value type.
13969 * c-opts.c (c_common_handle_option): Update prototype and return
13970 value type. Update calls to handle_option and
13971 enable_warning_as_error.
13972
13973 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13974
13975 PR c/45079
13976 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13977
13978 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13979
13980 * c-common.h (c_common_missing_argument): Remove.
13981 * c-opts.c (c_common_missing_argument): Remove.
13982 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13983 idirafter, imacros, include, isysroot, isystem, iquote): Add
13984 MissingArgError.
13985 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13986
13987 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13988
13989 * c-common.h (c_common_option_lang_mask,
13990 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13991 New.
13992 (c_common_init_options): Update prototype.
13993 * c-opts.c (c_common_option_lang_mask): New.
13994 (c_common_initialize_diagnostics): Split out of
13995 c_common_init_options.
13996 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13997 New.
13998 (c_common_init_options): Update prototype. Use decoded options in
13999 search for -lang-asm.
14000
14001 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
14002
14003 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
14004 * c-format.c: Likewise.
14005
14006 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
14007
14008 * c-common.h: Include diagnostic-core.h. Error if already
14009 included.
14010 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
14011
14012 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
14013
14014 * c-common.c (IN_GCC_FRONTEND): Do not undef.
14015 Do not include expr.h
14016 (vector_mode_valid_p): Move here.
14017
14018 2010-06-21 DJ Delorie <dj@redhat.com>
14019
14020 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
14021 allow these pragmas anywhere.
14022
14023 2010-06-14 Jakub Jelinek <jakub@redhat.com>
14024
14025 PR bootstrap/44509
14026 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
14027 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
14028 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
14029 ggc_strdup instead of xstrdup.
14030
14031 2010-06-10 Jakub Jelinek <jakub@redhat.com>
14032
14033 * c-cppbuiltin.c: Include cpp-id-data.h.
14034 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
14035 (lazy_hex_fp_value): New function.
14036 (builtin_define_with_hex_fp_value): Provide definitions lazily.
14037
14038 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
14039
14040 * c-gimplify.c: Do not include tree-flow.h
14041
14042 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
14043
14044 PR other/44034
14045 * c-common.c: Rename targetm member:
14046 targetm.enum_va_list -> targetm.enum_va_list_p
14047
14048 2010-06-28 Anatoly Sokolov <aesok@post.ru>
14049
14050 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
14051
14052 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
14053
14054 * c-cppbuiltin.c: Do not include except.h.
14055
14056 2010-06-24 Andi Kleen <ak@linux.intel.com>
14057
14058 * c-common.c (warn_for_omitted_condop): New.
14059 * c-common.h (warn_for_omitted_condop): Add prototype.
14060
14061 2010-06-21 Joseph Myers <joseph@codesourcery.com>
14062
14063 * c.opt (lang-objc): Remove.
14064 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
14065
14066 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
14067
14068 * c-opts.c: Include "tm_p.h".
14069
14070 2010-06-20 Joseph Myers <joseph@codesourcery.com>
14071
14072 * c-common.c (parse_optimize_options): Update call to
14073 decode_options.
14074
14075 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
14076
14077 * c-common.c (record_types_used_by_current_var_decl): Adjust for
14078 new type of types_used_by_cur_var_decl.
14079
14080 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
14081
14082 PR bootstrap/44512
14083 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
14084 for C++ standard compliance.
14085
14086 2010-06-16 Jason Merrill <jason@redhat.com>
14087
14088 * c.opt: Add -Wnoexcept.
14089
14090 2010-06-16 Richard Guenther <rguenther@suse.de>
14091
14092 PR c/44555
14093 * c-common.c (c_common_truthvalue_conversion): Remove
14094 premature and wrong optimization concering ADDR_EXPRs.
14095
14096 2010-06-15 Arnaud Charlet <charlet@adacore.com>
14097
14098 * c-ada-spec.c (dump_sloc): Remove column info.
14099 (is_simple_enum): New function.
14100 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
14101 enum types when relevant.
14102
14103 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
14104
14105 * c-common.c (conversion_warning): Warn at expression
14106 location.
14107
14108 2010-06-10 Joseph Myers <joseph@codesourcery.com>
14109
14110 * c-opts.c (c_common_handle_option): Don't handle
14111 OPT_fshow_column.
14112
14113 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
14114
14115 * c-pragma.c (push_alignment): Use typed GC allocation.
14116 (handle_pragma_push_options): Likewise.
14117
14118 * c-common.c (parse_optimize_options): Likewise.
14119
14120 * c-common.h (struct sorted_fields_type): Add variable_size GTY
14121 option.
14122
14123 2010-06-07 Joseph Myers <joseph@codesourcery.com>
14124
14125 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14126 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14127 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14128 flag_signed_bitfields, warn_strict_null_sentinel,
14129 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14130 flag_gen_declaration, flag_no_gnu_keywords,
14131 flag_implement_inlines, flag_implicit_templates,
14132 flag_implicit_inline_templates, flag_optional_diags,
14133 flag_elide_constructors, flag_default_inline, flag_rtti,
14134 flag_conserve_space, flag_access_control, flag_check_new,
14135 flag_new_for_scope, flag_weak, flag_working_directory,
14136 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14137 flag_enforce_eh_specs, flag_threadsafe_statics,
14138 flag_pretty_templates): Remove.
14139 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14140 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14141 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14142 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14143 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14144 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14145 flag_no_gnu_keywords, flag_implement_inlines,
14146 flag_implicit_templates, flag_implicit_inline_templates,
14147 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14148 flag_rtti, flag_conserve_space, flag_access_control,
14149 flag_check_new, flag_new_for_scope, flag_weak,
14150 flag_working_directory, flag_use_cxa_atexit,
14151 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14152 flag_threadsafe_statics, flag_pretty_templates,
14153 warn_strict_null_sentinel): Remove.
14154 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14155 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14156 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14157 fimplicit-inline-templates, fimplicit-templates,
14158 flax-vector-conversions, fms-extensions, fnil-receivers,
14159 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14160 frtti, fshort-double, fshort-enums, fshort-wchar,
14161 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14162 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14163 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14164 gen-decls, undef): Use Var.
14165 (fdefault-inline, foptional-diags): Document as doing nothing.
14166 * c-opts.c (c_common_handle_option): Remove cases for options now
14167 using Var. Mark ignored options as such.
14168
14169 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14170
14171 * c-common.c: Moved to here from parent directory.
14172 * c-common.def: Likewise.
14173 * c-common.h: Likewise.
14174 * c-cppbuiltin.c: Likewise.
14175 * c-dump.c: Likewise.
14176 * c-format.c: Likewise.
14177 * c-format.h : Likewise.
14178 * c-gimplify.c: Likewise.
14179 * c-lex.c: Likewise.
14180 * c-omp.c: Likewise.
14181 * c.opt: Likewise.
14182 * c-opts.c: Likewise.
14183 * c-pch.c: Likewise.
14184 * c-ppoutput.c: Likewise.
14185 * c-pragma.c: Likewise.
14186 * c-pragma.h: Likewise.
14187 * c-pretty-print.c: Likewise.
14188 * c-pretty-print.h: Likewise.
14189 * c-semantics.c: Likewise.
14190 * stub-objc.c: Likewise.
14191
14192 * c-common.c: Include gt-c-family-c-common.h.
14193 * c-pragma.c: Include gt-c-family-c-pragma.h.
14194 \f
14195 Copyright (C) 2010-2023 Free Software Foundation, Inc.
14196
14197 Copying and distribution of this file, with or without modification,
14198 are permitted in any medium without royalty provided the copyright
14199 notice and this notice are preserved.