]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
compiler, libgo: support bootstrapping gc compiler
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
80e9ca0e
GA
12023-06-21 Alexander Monakov <amonakov@ispras.ru>
2
3 * c-gimplify.cc (fma_supported_p): New helper.
4 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
5 contraction.
6
f10a4ce0
GA
72023-06-16 Alex Coplan <alex.coplan@arm.com>
8
9 * c.opt (Welaborated-enum-base): New.
10
532fb120
GA
112023-06-13 David Malcolm <dmalcolm@redhat.com>
12
13 PR c/84890
14 * known-headers.cc
15 (suggest_missing_header::~suggest_missing_header): Reword note to
16 avoid negative tone of "forgetting".
17
8c5b1365
GA
182023-06-07 Jason Merrill <jason@redhat.com>
19
20 PR c++/58487
21 * c.opt: Add -Wnrvo.
22
6e6bb373
GA
232023-05-26 Martin Uecker <uecker@tugraz.at>
24
25 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
26 record all parameters.
27
b2776076
GA
282023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
29
30 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
31 (dump_ada_declaration): Ditto.
32 (dump_ada_structure): Ditto.
33 * c-common.cc (unsafe_conversion_p): Ditto.
34 (shorten_compare): Ditto.
35 (pointer_int_sum): Ditto.
36 (c_common_truthvalue_conversion): Ditto.
37 (scalar_to_vector): Ditto.
38 * c-common.h (gnu_vector_type_p): Ditto.
39 * c-omp.cc (c_omp_depend_t_p): Ditto.
40 (c_omp_split_clauses): Ditto.
41 * c-ubsan.cc (ubsan_instrument_division): Ditto.
42 * c-warn.cc (conversion_warning): Ditto.
43 (warnings_for_convert_and_check): Ditto.
44
ff2dcddf
GA
452023-05-18 Joseph Myers <joseph@codesourcery.com>
46
47 * c-format.cc (print_char_table): Handle %B like %b.
48
3427b51b
GA
492023-05-15 Joseph Myers <joseph@codesourcery.com>
50
51 * c-lex.cc (c_common_has_attribute): Use 202311 as
52 __has_c_attribute return for all C2x attributes.
53
542023-05-15 Patrick Palka <ppalka@redhat.com>
55
56 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
57 for C++23.
58
1fc8da95
GA
592023-05-01 Marek Polacek <polacek@redhat.com>
60
61 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
62
579cdc1e
GA
632023-03-28 David Malcolm <dmalcolm@redhat.com>
64
65 PR c/107002
66 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
67 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
68 Reject cases where involving macro expansions.
69
702023-03-28 Jason Merrill <jason@redhat.com>
71
72 PR c++/107163
73 * c-common.cc (verify_tree): Don't use sequenced handling
74 for COMPONENT_REF.
75
454a4d50
GA
762023-03-17 Jakub Jelinek <jakub@redhat.com>
77
78 PR c/109151
79 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
80 types rather than just INTEGER_TYPE.
81
c8065441
GA
822023-03-10 Marek Polacek <polacek@redhat.com>
83
84 PR sanitizer/108060
85 PR sanitizer/109050
86 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
87 the RHS before the LHS.
88
2858bf16
GA
892023-03-04 Jakub Jelinek <jakub@redhat.com>
90
91 PR c/107465
92 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
93 above innermost zero extension of BIT_NOT_EXPR result.
94
952023-03-04 Jakub Jelinek <jakub@redhat.com>
96
97 PR c/107465
98 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
99 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
100 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
101 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
102 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
103 from narrower unsigned, fix up computation of mask for the constant
104 cases and for unsigned other operand case handle differently
105 BIT_NOT_EXPR result being sign vs. zero extended.
106
1072023-03-04 Jakub Jelinek <jakub@redhat.com>
108
109 PR c/107846
110 * c-warn.cc: Include langhooks.h.
111 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
112 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
113 is narrower than type0 and unsigned, use wi::min_precision with
114 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
115
2aa6673e
GA
1162023-03-03 Alexandre Oliva <oliva@adacore.com>
117
118 * c-common.cc (c_common_nodes_and_builtins): Take
119 wchar_type_node for wint_type_node when aliased.
120 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
121 wchar_t, to the underlying type rather than wchar_t in
122 non-C++.
123 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
124
6f9e2f14
GA
1252023-02-28 Marek Polacek <polacek@redhat.com>
126
127 PR c++/107938
128 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
129 POINTER_TYPE_P.
130
1312023-02-28 Jakub Jelinek <jakub@redhat.com>
132
133 PR sanitizer/108894
134 * c-common.h (c_strict_flex_array_level_of): Declare.
135 * c-common.cc (c_strict_flex_array_level_of): New function,
136 moved and renamed from c-decl.cc's strict_flex_array_level_of.
137 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
138 C check c_strict_flex_array_level_of whether a trailing array
139 should be treated as flexible member like. Handle C [0] arrays.
140 Add 1 + index_off_by_one rather than index_off_by_one to bounds
141 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
142 bounds comparison.
143
e2b20ed3
GA
1442023-02-23 Jakub Jelinek <jakub@redhat.com>
145
146 PR translation/108890
147 * c.opt (fcontracts): Fix description.
148
b6f98991
GA
1492023-02-22 Marek Polacek <polacek@redhat.com>
150
151 PR c/108880
152 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
153 pset to walk_tree_1.
154 (c_genericize): Call walk_tree with an explicit pset.
155
0263e9d5
GA
1562023-02-18 Martin Uecker <uecker@tugraz.at>
157
158 PR c/105660
159 * c-attribs.cc (append_access_attr): Use order of arguments when
160 construction string.
161 (append_access_attr_idxs): Rename and make static.
162 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
163
88cc4495
GA
1642023-02-16 Patrick Palka <ppalka@redhat.com>
165
166 * c-common.h: Mechanically drop static from static inline
167 functions via s/^static inline/inline/g.
168
0a251e74
GA
1692023-02-01 Jason Merrill <jason@redhat.com>
170
171 * c.opt: Add -Wno-changes-meaning.
172
317525b0
GA
1732023-01-31 Marek Polacek <polacek@redhat.com>
174
175 PR c++/107593
176 PR c++/108597
177 * c-common.h (instantiation_dependent_expression_p): Declare.
178 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
179 is dependent, invalidate the chain.
180
2371d100
GA
1812023-01-26 Marek Polacek <polacek@redhat.com>
182
183 PR c++/105300
184 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
185
9f98cfa5
GA
1862023-01-18 Marek Polacek <polacek@redhat.com>
187
188 PR c/108424
189 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
190
5013c3bb
GA
1912023-01-14 Jakub Jelinek <jakub@redhat.com>
192
193 PR c++/108365
194 * c-common.h (may_shorten_divmod): New static inline function.
195
1962023-01-13 Eric Botcazou <ebotcazou@adacore.com>
197
198 * c-ada-spec.cc (is_float32): New function.
199 (is_float64): Likewise.
200 (is_float128): Tweak.
201 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
202
81ed98bc
GA
2032023-01-12 Lewis Hyatt <lhyatt@gmail.com>
204
205 PR preprocessor/108244
206 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
207 deferred pragmas if -fdirectives-only.
208 (init_pragma): Likewise.
209
84723aca
GA
2102023-01-09 Martin Liska <mliska@suse.cz>
211
212 PR c/107993
213 * c-attribs.cc (handle_target_clones_attribute): Check for
214 string constant for all target_clone attribute values.
215
0f8fbb57
GA
2162023-01-03 Florian Weimer <fweimer@redhat.com>
217
218 * c-cppbuiltin.cc (c_cpp_builtins): Define
219 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
220
2212023-01-03 Florian Weimer <fweimer@redhat.com>
222
223 Revert:
224 2023-01-03 Florian Weimer <fweimer@redhat.com>
225
226 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
227 Define if constant is known.
228
2292023-01-03 Florian Weimer <fweimer@redhat.com>
230
231 Revert:
232 2023-01-02 Florian Weimer <fweimer@redhat.com>
233
234 * c-cppbuiltin.cc (c_cpp_builtins): Define
235 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
236
fee53a31
GA
2372023-01-02 Florian Weimer <fweimer@redhat.com>
238
239 * c-cppbuiltin.cc (c_cpp_builtins): Define
240 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
241
2422023-01-02 Florian Weimer <fweimer@redhat.com>
243
244 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
245 Define if constant is known.
246
d2ef2327
GA
2472022-12-19 Marek Polacek <polacek@redhat.com>
248
249 PR c/98487
250 * c-format.cc (check_function_format): Use get_attribute_name.
251
5fb1e674
GA
2522022-12-16 Qing Zhao <qing.zhao@oracle.com>
253
254 * c.opt (Wstrict-flex-arrays): New option.
255
596dbfff
GA
2562022-12-02 Andrew MacLeod <amacleod@redhat.com>
257
258 * c-attribs.cc (handle_deprecated_attribute): Use type when
259 using TYPE_NAME.
260
b35680ec
GA
2612022-12-02 Jakub Jelinek <jakub@redhat.com>
262
263 PR c++/84469
264 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
265 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
266 to any of the structured binding decls.
267
6eea85a9
GA
2682022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
269 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
270
271 PR driver/107787
272 * c-common.cc (fold_offsetof,
273 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
274 instead of OPT_Warray_bounds.
275
9a1b4f1d
GA
2762022-11-24 Jakub Jelinek <jakub@redhat.com>
277
278 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
279 with a dot.
280
8761284f
GA
2812022-11-23 Andrew Pinski <apinski@marvell.com>
282 Jakub Jelinek <jakub@redhat.com>
283
284 PR c/107127
285 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
286 instead of walk_tree for c_genericize_control_r.
287
2882022-11-23 Jakub Jelinek <jakub@redhat.com>
289
290 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
291 fcontract-role=, fcontract-semantic=): Add RejectNegative.
292 (fcontract-build-level=): Terminate description with dot.
293
fb98ede8
GA
2942022-11-19 Jakub Jelinek <jakub@redhat.com>
295
296 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
297 value from 202207L to 202211L.
298
2992022-11-19 Jeff Chapman II <jchapman@lock3software.com>
300 Andrew Sutton <asutton@lock3software.com>
301 Andrew Marmaduke <amarmaduke@lock3software.com>
302 Michael Lopez <mlopez@lock3software.com>
303 Jason Merrill <jason@redhat.com>
304
305 * c.opt: Add contracts flags.
306 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
307 macros.
308
80909529
GA
3092022-11-16 Marek Polacek <polacek@redhat.com>
310
311 PR c++/106649
312 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
313 C++23.
314 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
315 depending on cxx_dialect.
316 * c.opt (Winvalid-constexpr): New option.
317
3182022-11-16 Jakub Jelinek <jakub@redhat.com>
319
320 * c-common.def (CONCEPT_DECL): New tree, moved here from
321 cp-tree.def.
322 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
323 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
324 attribute on CONCEPT_DECL.
325
cdc34229
GA
3262022-11-15 Lewis Hyatt <lhyatt@gmail.com>
327
328 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
329 than a hard-coded string.
330
83d400bd
GA
3312022-11-15 Jakub Jelinek <jakub@redhat.com>
332
333 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
334 __cpp_multidimensional_subscript macro value to 202211L.
335
3362022-11-15 Patrick Palka <ppalka@redhat.com>
337
338 PR c++/107638
339 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
340 iff SUPPORTS_INIT_PRIORITY.
341
3422022-11-14 Martin Liska <mliska@suse.cz>
343
344 Revert:
345 2022-11-09 Martin Liska <mliska@suse.cz>
346
347 * c-target.def: Port to RST.
348
30d77d49
GA
3492022-11-12 Joseph Myers <joseph@codesourcery.com>
350
351 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
352
5b6ce16a
GA
3532022-11-11 Jonathan Wakely <jwakely@redhat.com>
354
355 PR c/85487
356 * c-pragma.cc (handle_pragma_ignore): New function.
357 (init_pragma): Register region and endregion pragmas.
358
1cdfd0e5
GA
3592022-11-09 Martin Liska <mliska@suse.cz>
360
361 * c-target.def: Port to RST.
362
05788e9b
GA
3632022-11-05 Lewis Hyatt <lhyatt@gmail.com>
364
365 PR preprocessor/55971
366 * c-ppoutput.cc (adjust_for_newlines): Update comment.
367
d29260ce
GA
3682022-11-03 Jason Merrill <jason@redhat.com>
369
370 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
371 -fconcepts-ts before C++20.
372
3055829a
GA
3732022-10-28 Joseph Myers <joseph@codesourcery.com>
374
375 * c-common.cc (def_fn_type): Call build_function_type for
376 zero-argument variable-argument function.
377 (c_common_nodes_and_builtins): Build default_function_type with
378 build_function_type.
379 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
380 option.
381
3822022-10-28 Joseph Myers <joseph@codesourcery.com>
383
384 PR c/61469
385 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
386 New. Moved from cp/cp-tree.h.
387 * c-warn.cc (warnings_for_convert_and_check): Do not consider
388 conversions to enum with underlying type bool to overflow.
389
486a5037
GA
3902022-10-26 Marek Polacek <polacek@redhat.com>
391
392 PR c++/106393
393 * c.opt (Wdangling-reference): New.
394
87f9c4a4
GA
3952022-10-19 Joseph Myers <joseph@codesourcery.com>
396
397 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
398 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
399 and FMT_LEN_wf64.
400 (NOARGUMENTS, NOLENGTHS): Update definitions.
401 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
402 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
403 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
404 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
405 (T_UF64, T2X_UF64): New macros.
406 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
407 and wfN length modifiers.
408 (print_char_table, scan_char_table): Add entries using wN and wfN
409 length modifiers.
410
21de009f
GA
4112022-10-18 Joseph Myers <joseph@codesourcery.com>
412
413 PR c/36113
414 * c-common.cc (c_common_type_for_size): Add fallback to
415 widest_unsigned_literal_type_node or
416 widest_integer_literal_type_node for precision that may not
417 exactly match the precision of those types.
418
baeec7cc
GA
4192022-10-14 Jakub Jelinek <jakub@redhat.com>
420
421 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
422 predefine __BFLT16_*__ macros and for C++23 also
423 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
424 macros for -fbuilding-libgcc.
425 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
426
4272022-10-14 Jakub Jelinek <jakub@redhat.com>
428
429 PR middle-end/323
430 PR c++/107097
431 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
432 the tree being specific to C/ObjC.
433 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
434 in C++ the same as in C.
435 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
436 even for C++.
437
621a911d
GA
4382022-10-13 Joseph Myers <joseph@codesourcery.com>
439
440 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
441 value 2 for *_IS_IEC_60559.
442
781f477a
GA
4432022-10-12 Lewis Hyatt <lhyatt@gmail.com>
444
445 PR preprocessor/60014
446 PR preprocessor/60723
447 * c-ppoutput.cc (class token_streamer): Remove member
448 line_marker_emitted to...
449 (token_streamer::stream): ...a local variable here. Set
450 print.prev_was_system_token on all code paths.
451
27bfe54e
GA
4522022-10-10 Nathan Sidwell <nathan@acm.org>
453
454 * c-opts.cc (c_common_post_options): Bump abi to 18.
455
4562022-10-10 Marek Polacek <polacek@redhat.com>
457
458 PR c++/106937
459 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
460 attributes here.
461 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
462 attributes here.
463 (pp_c_attributes): Remove.
464 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
465 get_attribute_name. Don't print a trailing space when printing the
466 [[]] form.
467 * c-pretty-print.h (pp_c_attributes): Remove.
468
9ff6c33e
GA
4692022-10-07 Qing Zhao <qing.zhao@oracle.com>
470
471 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
472 (c_common_attribute_table): New item for strict_flex_array.
473 * c.opt: (fstrict-flex-arrays): New option.
474 (fstrict-flex-arrays=): New option.
475
4762022-10-07 Martin Liska <mliska@suse.cz>
477
478 * name-hint.h: Use std::move.
479
4802022-10-07 Jakub Jelinek <jakub@redhat.com>
481
482 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
483 only in gnu namespace or as standard attribute, treat fallthrough
484 attributes in other namespaces like any other unknown attribute.
485
629d04d3
GA
4862022-10-06 Joseph Myers <joseph@codesourcery.com>
487
488 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
489 typeof_unqual.
490 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
491 (D_EXT11): New macro. Values of subsequent macros updated.
492
4932022-10-06 Jakub Jelinek <jakub@redhat.com>
494
495 PR c++/106654
496 * c-attribs.cc (handle_assume_attribute): New function.
497 (c_common_attribute_table): Add entry for assume attribute.
498 * c-lex.cc (c_common_has_attribute): Handle
499 __have_cpp_attribute (assume).
500
85872a69
GA
5012022-10-04 Jakub Jelinek <jakub@redhat.com>
502
503 * c-omp.cc (c_omp_directives): Uncomment begin declare target
504 entry.
505
69fd6dcc
GA
5062022-10-03 Patrick Palka <ppalka@redhat.com>
507
508 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
509 RID_IS_SAME_AS.
510
5112022-10-03 Joseph Myers <joseph@codesourcery.com>
512
513 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
514 special-case __*_EPSILON__ setting for IBM long double for C2x.
515
3a221b73
GA
5162022-09-30 Patrick Palka <ppalka@redhat.com>
517
518 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
519 C++ traits.
520 * c-common.h (enum rid): Likewise.
521
bbdcdf5c
GA
5222022-09-29 Joseph Myers <joseph@codesourcery.com>
523
524 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
525 C.
526
5272022-09-29 Patrick Palka <ppalka@redhat.com>
528
529 * c-common.cc (c_common_reswords): Add __remove_cv,
530 __remove_reference and __remove_cvref.
531 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
532 and RID_REMOVE_CVREF.
533
1f16a020
GA
5342022-09-27 Marek Polacek <polacek@redhat.com>
535
536 PR c++/101165
537 PR c++/106882
538 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
539
5402022-09-27 Marek Polacek <polacek@redhat.com>
541
542 * c-format.cc (c_keywords): Drop nothrow.
543
5442022-09-27 Jakub Jelinek <jakub@redhat.com>
545
546 PR c++/106651
547 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
548 __cpp_static_call_operator=202207L for C++23.
549
5502022-09-27 Jakub Jelinek <jakub@redhat.com>
551
552 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
553 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
554 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
555 * c-pragma.cc (omp_pragmas): Add assumes and begin.
556 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
557 (omp_pragmas_simd): Add assume.
558 * c-common.h (c_omp_directives): Declare.
559 * c-omp.cc (omp_directives): Rename to ...
560 (c_omp_directives): ... this. No longer static. Uncomment
561 assume, assumes, begin assumes and end assumes entries.
562 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
563 to PRAGMA_OMP_END.
564 (c_omp_categorize_directive): Adjust for omp_directives to
565 c_omp_directives renaming.
566
5672022-09-27 Jakub Jelinek <jakub@redhat.com>
568
569 PR c++/106652
570 PR c++/85518
571 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
572 _Float{32,64,128}x flags from D_CONLY to 0.
573 (shorten_binary_op): Punt if common_type returns error_mark_node.
574 (shorten_compare): Likewise.
575 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
576 and _Float{32,64,128}x builtin types if available. For C++
577 clear float128t_type_node.
578 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
579 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
580 * c-lex.cc (interpret_float): For q/Q suffixes prefer
581 float128t_type_node over float128_type_node. Allow
582 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
583 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
584 with pedwarn. Don't call excess_precision_type for C++.
585
220c4d8e
GA
5862022-09-26 Marek Polacek <polacek@redhat.com>
587
588 PR c++/106656
589 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
590 for C++20.
591
4afaeaab
GA
5922022-09-23 Marek Polacek <polacek@redhat.com>
593
594 PR c++/106784
595 * c-common.cc (c_common_reswords): Add __is_convertible and
596 __is_nothrow_convertible.
597 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
598 RID_IS_NOTHROW_CONVERTIBLE.
599
279c6715
GA
6002022-09-22 David Malcolm <dmalcolm@redhat.com>
601
602 PR c/106830
603 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
604 values that don't fit in uhwi.
605
d0fc05e8
GA
6062022-09-15 Richard Biener <rguenther@suse.de>
607
608 * c-common.h (build_void_list_node): Remove.
609 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
610 void_list_node.
611
861d1a11
GA
6122022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
613
614 * c-format.cc (convert_format_name_to_system_name): Fix warning.
615
fe2a8ce9
GA
6162022-09-07 Joseph Myers <joseph@codesourcery.com>
617
618 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
619 for alignas, alignof, bool, false, static_assert, thread_local and
620 true.
621
6222022-09-07 Jakub Jelinek <jakub@redhat.com>
623
624 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
625 " in comments" from description.
626 (Wunicode): New option.
627
25aeb922
GA
6282022-09-06 Jakub Jelinek <jakub@redhat.com>
629
630 PR c/106836
631 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
632
83f2f228
GA
6332022-09-03 Jakub Jelinek <jakub@redhat.com>
634
635 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
636 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
637 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
638 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
639
c64b0947
GA
6402022-09-02 David Malcolm <dmalcolm@redhat.com>
641
642 PR c/90885
643 * c-common.h (check_for_xor_used_as_pow): New decl.
644 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
645 * c-warn.cc (check_for_xor_used_as_pow): New.
646 * c.opt (Wxor-used-as-pow): New.
647
bb0a1556
GA
6482022-09-01 Jason Merrill <jason@redhat.com>
649
650 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
651 char8_t.
652 (braced_list_to_string): Check for char-sized elements.
653
6542022-09-01 Jakub Jelinek <jakub@redhat.com>
655
656 PR c++/106655
657 * c.opt (-Winvalid-utf8): New warning.
658 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
659 Set cpp_opts->cpp_input_charset_explicit.
660 (c_common_post_options): If -finput-charset=UTF-8 is explicit
661 in C++23, enable -Winvalid-utf8 by default and if -pedantic
662 or -pedantic-errors, make it a pedwarn.
663
542c60c4
GA
6642022-08-31 Joseph Myers <joseph@codesourcery.com>
665
666 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
667 for LABEL_DECL.
668 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
669 decl_attributes.
670 * c-common.h (do_case, c_add_case_label): Update declarations.
671 * c-lex.cc (c_common_has_attribute): For C, produce a result of
672 201910 for fallthrough and 202106 for maybe_unused.
673
16f542d6
GA
6742022-08-26 Marek Polacek <polacek@redhat.com>
675
676 PR c++/81159
677 * c.opt (Wself-move): New option.
678
6792022-08-26 Jakub Jelinek <jakub@redhat.com>
680
681 * c-common.cc (check_builtin_function_arguments): Handle
682 BUILT_IN_ISSIGNALING.
683
6842022-08-26 Jakub Jelinek <jakub@redhat.com>
685
686 PR c++/106648
687 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
688 __cpp_named_character_escapes to 202207L.
689
5d4389dc
GA
6902022-08-25 Marek Polacek <polacek@redhat.com>
691
692 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
693 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
694 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
695 (struct c_common_resword): Resize the disable member.
696 (D_C2X): Add.
697 (nullptr_node): Define.
698 (nullptr_type_node): Define.
699 (NULLPTR_TYPE_P): Define.
700 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
701 NULLPTR_TYPE.
702 (c_pretty_printer::direct_abstract_declarator): Likewise.
703 (c_pretty_printer::constant): Likewise.
704
47a61e65
GA
7052022-08-16 Tom Honermann <tom@honermann.net>
706
707 PR c++/106423
708 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
709 diagnostics in C++20 and later.
710 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
711
5cd525f0
GA
7122022-08-11 Marek Polacek <polacek@redhat.com>
713
714 PR middle-end/102633
715 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
716 suppress_warning here.
717
5f17badb
GA
7182022-08-08 Tom Honermann <tom@honermann.net>
719
720 PR preprocessor/106426
721 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
722 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
723
7242022-08-08 Tom Honermann <tom@honermann.net>
725
726 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
727 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
728 enabled.
729 * c-opts.cc (c_common_post_options): Set flag_char8_t if
730 targeting C2x.
731
4a7274dd
GA
7322022-07-31 Lewis Hyatt <lhyatt@gmail.com>
733
734 PR c++/66290
735 * c-common.h: Rename global done_lexing to
736 override_libcpp_locations.
737 * c-common.cc (c_cpp_diagnostic): Likewise.
738 * c-opts.cc (c_common_finish): Set override_libcpp_locations
739 (formerly done_lexing) immediately prior to calling cpp_finish ().
740
1e2c5f4c
GA
7412022-07-27 Lewis Hyatt <lhyatt@gmail.com>
742
743 * c-ppoutput.cc (token_streamer::stream): Update input_location
744 prior to streaming each token.
745
0e6fa997
GA
7462022-07-23 Immad Mir <mirimmad@outlook.com>
747
748 * c-attribs.cc: (c_common_attribute_table): add three new attributes
749 namely: fd_arg, fd_arg_read and fd_arg_write.
750 (handle_fd_arg_attribute): New.
751
bdc7b765
GA
7522022-07-15 Marek Polacek <polacek@redhat.com>
753
754 PR c++/104477
755 * c-common.cc (c_common_reswords): Add
756 __reference_constructs_from_temporary and
757 __reference_converts_from_temporary.
758 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
759 RID_REF_CONVERTS_FROM_TEMPORARY.
760
7612022-07-15 Jonathan Wakely <jwakely@redhat.com>
762
763 * c-format.cc (class range_label_for_format_type_mismatch):
764 Adjust to new label_text API.
765
c72d4714
GA
7662022-07-11 Lewis Hyatt <lhyatt@gmail.com>
767
768 PR preprocessor/106252
769 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
770 option argument prior to verifying the option was found.
771
6345c414
GA
7722022-07-07 David Malcolm <dmalcolm@redhat.com>
773
774 * c-format.cc (range_label_for_format_type_mismatch::get_text):
775 Update for removal of label_text::maybe_free in favor of automatic
776 memory management.
777
4bc92c3b
GA
7782022-07-06 Lewis Hyatt <lhyatt@gmail.com>
779
780 PR preprocessor/53920
781 PR c++/53431
782 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
783 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
784 (c_pp_stream_token): Declare.
785 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
786 pragmas to...
787 (should_output_pragmas): ...here. New function.
788 (token_streamer::stream): Support handling early pragmas.
789 (do_line_change): Likewise.
790 (c_pp_stream_token): New function.
791 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
792 (pragma_diagnostic_lex_normal): New function. Moved logic for
793 interpreting GCC diagnostic pragmas here.
794 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
795 directly from libcpp.
796 (handle_pragma_diagnostic): Refactor into helper function...
797 (handle_pragma_diagnostic_impl): ...here. New function.
798 (handle_pragma_diagnostic_early): New function.
799 (handle_pragma_diagnostic_early_pp): New function.
800 (struct pragma_ns_name): Renamed to...
801 (struct pragma_pp_data): ...this. Add new "early_handler" member.
802 (c_register_pragma_1): Support early pragmas in the preprocessor.
803 (c_register_pragma_with_early_handler): New function.
804 (c_register_pragma): Support the new early handlers in struct
805 internal_pragma_handler.
806 (c_register_pragma_with_data): Likewise.
807 (c_register_pragma_with_expansion): Likewise.
808 (c_register_pragma_with_expansion_and_data): Likewise.
809 (c_invoke_early_pragma_handler): New function.
810 (c_pp_invoke_early_pragma_handler): New function.
811 (init_pragma): Add early pragma support for diagnostic pragmas.
812 * c-pragma.h (struct internal_pragma_handler): Add new early handler
813 members.
814 (c_register_pragma_with_early_handler): Declare.
815 (c_invoke_early_pragma_handler): Declare.
816 (c_pp_invoke_early_pragma_handler): Declare.
817
d1f3a3ff
GA
8182022-07-05 Marek Polacek <polacek@redhat.com>
819
820 PR c++/105626
821 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
822 u8 strings.
823
ed974488
GA
8242022-07-01 Marek Polacek <polacek@redhat.com>
825
826 PR c++/106111
827 * c-common.h (enum rid): Update RID_LAST_CXX20.
828
976196b3
GA
8292022-06-30 Jonathan Wakely <jwakely@redhat.com>
830
831 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
832 names.
833
84c2131d
GA
8342022-06-24 Jason Merrill <jason@redhat.com>
835
836 PR c++/87729
837 PR c++/20423
838 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
839
4390e7bf
GA
8402022-06-18 Jakub Jelinek <jakub@redhat.com>
841
842 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
843 Use flag_sanitize_trap & SANITIZE_??? instead of
844 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
845 and flag_sanitize_trap differs for them, emit __builtin_trap only
846 for the comparison where trap is requested.
847 (ubsan_instrument_vla, ubsan_instrument_return): Use
848 lag_sanitize_trap & SANITIZE_??? instead of
849 flag_sanitize_undefined_trap_on_error.
850
c3642271
GA
8512022-06-13 Jason Merrill <jason@redhat.com>
852
853 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
854
d9176e64
GA
8552022-05-27 Marek Polacek <polacek@redhat.com>
856
857 PR c/90658
858 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
859
8602022-05-27 Jakub Jelinek <jakub@redhat.com>
861
862 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
863
57f2ce6a
GA
8642022-05-20 David Malcolm <dmalcolm@redhat.com>
865
866 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
867 and "override".
868 * c-pretty-print.h: Likewise.
869
1cda629f
GA
8702022-05-18 Marek Polacek <polacek@redhat.com>
871
872 PR c/105131
873 * c.opt (Wenum-int-mismatch): New.
874
8752022-05-18 Marek Polacek <polacek@redhat.com>
876
877 PR c++/105497
878 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
879 enumerator when it was marked with attribute unused.
880
8812022-05-18 Eric Botcazou <ebotcazou@adacore.com>
882
883 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
884 floating-point complex types.
885 <POINTER_TYPE>: Do not use limited_with clause if the designated
886 type is a scalar type.
887
3d9439b1
GA
8882022-05-17 Jakub Jelinek <jakub@redhat.com>
889
890 * c-omp.cc (c_finish_omp_depobj): Handle
891 OMP_CLAUSE_DEPEND_INOUTSET.
892
702bd11f
GA
8932022-05-16 Jason Merrill <jason@redhat.com>
894
895 PR c/105492
896 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
897 here.
898
8992022-05-16 Martin Liska <mliska@suse.cz>
900
901 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
902 (c_common_nodes_and_builtins): Likewise.
903 * c-format.cc (check_tokens): Likewise.
904 (check_plain): Likewise.
905 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
906 (init_pragma): Likewise.
907 * known-headers.cc (get_string_macro_hint): Likewise.
908 (get_stdlib_header_for_name): Likewise.
909 * c-attribs.cc: Likewise.
910
9df4ffe4
GA
9112022-05-13 Richard Biener <rguenther@suse.de>
912
913 * c-omp.cc: Remove gimple-fold.h include.
914
49ace834
GA
9152022-05-12 Jakub Jelinek <jakub@redhat.com>
916
917 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
918 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
919 if null_pointer_node.
920
d0d513b5
GA
9212022-05-11 Martin Liska <mliska@suse.cz>
922
923 PR target/105355
924 * c-opts.cc (c_common_handle_option): Change option name.
925 * c.opt: Remove Joined and use Separate option.
926
bd022ff9
GA
9272022-05-09 Alex Coplan <alex.coplan@arm.com>
928
929 * c-common.h (get_dump_info): Delete.
930 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
931 from the global dump_manager instead of the (now obsolete)
932 get_dump_info.
933 * c-opts.cc (original_dump_file): Delete.
934 (original_dump_flags): Delete.
935 (c_common_parse_file): Switch to using global dump_manager to
936 manage the original dump file; fix leak of dump file.
937 (get_dump_info): Delete.
938
a1947c92
GA
9392022-05-07 Marek Polacek <polacek@redhat.com>
940
941 PR c++/101833
942 PR c++/47634
943 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
944 with FN being either a function declaration or function type. Use
945 maybe_adjust_arg_pos_for_attribute.
946 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
947 check_function_format.
948 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
949 (positional_argument): Adjust.
950 * c-format.cc (get_constant): Rename to ...
951 (validate_constant): ... this. Take EXPR by reference. Return bool
952 instead of tree.
953 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
954 return value of validate_constant.
955 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
956 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
957 (check_function_format): Adjust a parameter name.
958 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
959
3e7db517
GA
9602022-05-04 Marek Polacek <polacek@redhat.com>
961
962 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
963 char to int.
964
95874f95
GA
9652022-04-30 Jason Merrill <jason@redhat.com>
966
967 PR c/100545
968 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
969 and typedef.
970 * c-common.cc (set_underlying_type): Add assert.
971
01ad093b
GA
9722022-04-26 Patrick Palka <ppalka@redhat.com>
973
974 PR c++/105304
975 * c-common.cc (verify_tree) [restart]: Move up to before the
976 NULL test.
977
da066c42
GA
9782022-04-11 Jakub Jelinek <jakub@redhat.com>
979
980 PR c++/105186
981 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
982 and __int%d__ builtin types, initialize corresponding ridpointers
983 entry.
984
150ab50f
GA
9852022-03-30 Marek Polacek <polacek@redhat.com>
986
987 PR c++/101030
988 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
989 conversion_warning when OP1 is null.
990
9912022-03-30 Thomas Schwinge <thomas@codesourcery.com>
992
993 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
994 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
995 option properties.
996
9972022-03-30 Thomas Schwinge <thomas@codesourcery.com>
998
999 * c.opt (Wuse-after-free): Remove.
1000
10012022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1002
1003 * c.opt (Warray-bounds): Remove.
1004
d2906412
GA
10052022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1006
1007 * c.opt: Properly quote comment.
1008
31e989a2
GA
10092022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1010
1011 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1012 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1013 the referenced type instead. Deal with the anonymous original type
1014 of a typedef'ed type. In the actual access case, follow the chain
1015 of external subtypes.
1016 <TYPE_DECL>: Tidy up control flow.
1017
d156bb87
GA
10182022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1019
1020 * c-ada-spec.cc: Change array length
1021
d7f00da1
GA
10222022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1023
1024 * c-common.cc (c_family_tests): Call the new tests.
1025 * c-common.h (c_diagnostic_tests): Declare.
1026 (c_opt_problem_cc_tests): Likewise.
1027
10282022-03-19 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR c++/101515
1031 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1032 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1033 be printed.
1034
9fc8f278
GA
10352022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1036 Roger Sayle <roger@nextmovesoftware.com>
1037
1038 PR c/98198
1039 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1040
10412022-03-16 Patrick Palka <ppalka@redhat.com>
1042
1043 PR c++/96780
1044 * c.opt: Add -ffold-simple-inlines.
1045
b9756c08
GA
10462022-03-13 Tobias Burnus <tobias@codesourcery.com>
1047
1048 * c-target.def (check_string_object_format_arg): Fix description typo.
1049
57eeedda
GA
10502022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1051
1052 PR other/65095
1053 * c-common.h (c_omp_map_clause_name): Remove.
1054 * c-omp.cc (c_omp_map_clause_name): Remove.
1055
8cc4f9cd
GA
10562022-03-09 Jakub Jelinek <jakub@redhat.com>
1057
1058 PR c/104711
1059 * c-opts.cc (c_common_post_options): Don't enable
1060 -Wshift-negative-value from -Wextra for C++20 or later.
1061 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1062 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1063 instead of TYPE_UNSIGNED.
1064
e6533e2e
GA
10652022-03-07 Jakub Jelinek <jakub@redhat.com>
1066
1067 * c-attribs.cc: Fix up duplicated word issue in a comment.
1068
12d4552e
GA
10692022-03-01 Martin Liska <mliska@suse.cz>
1070
1071 PR ipa/104533
1072 * c-attribs.cc (handle_target_clones_attribute): Use
1073 get_target_clone_attr_len and report warning soon.
1074
0bdb0498
GA
10752022-02-17 Jonathan Wakely <jwakely@redhat.com>
1076
1077 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1078 (handle_pragma_weak): Likewise.
1079 (handle_pragma_scalar_storage_order): Likewise.
1080 (handle_pragma_redefine_extname): Likewise.
1081 (handle_pragma_visibility): Likewise.
1082 (handle_pragma_diagnostic): Likewise.
1083 (handle_pragma_target): Likewise.
1084 (handle_pragma_optimize): Likewise.
1085 (handle_pragma_push_options): Likewise.
1086 (handle_pragma_pop_options): Likewise.
1087 (handle_pragma_reset_options): Likewise.
1088 (handle_pragma_message): Likewise.
1089 (handle_pragma_float_const_decimal64): Likewise.
1090
cb3afcd2
GA
10912022-02-16 Jakub Jelinek <jakub@redhat.com>
1092
1093 PR c/104531
1094 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1095 build_binary_op with LT_EXPR and only if that doesn't return
1096 error_mark_node call build_modify_expr.
1097
10982022-02-16 Jakub Jelinek <jakub@redhat.com>
1099
1100 PR c/104510
1101 * c-common.cc (shorten_compare): Convert original arguments to
1102 the original *restype_ptr when mixing binary and decimal float.
1103
1f8a09d2
GA
11042022-02-14 Richard Biener <rguenther@suse.de>
1105
1106 PR c/104505
1107 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1108 internal function calls.
1109
e8d68f0a
GA
11102022-02-11 Richard Biener <rguenther@suse.de>
1111
1112 * c-attribs.cc (c_common_attribute_table): Add entry for
1113 vector_mask.
1114 (handle_vector_mask_attribute): New.
1115
a645583d
GA
11162022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1117
1118 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1119 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1120 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1121
3adf509f
GA
11222022-02-09 Jason Merrill <jason@redhat.com>
1123
1124 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1125 of __cpp_constexpr and __cpp_concepts for C++20.
1126
bb99171b
GA
11272022-01-24 Marek Polacek <polacek@redhat.com>
1128
1129 PR preprocessor/104030
1130 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1131
9dd44357
GA
11322022-01-21 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR c++/104148
1135 * c-common.h (check_function_arguments_recurse): Add for_format
1136 arg.
1137 * c-common.cc (check_function_nonnull): Pass false to
1138 check_function_arguments_recurse's last argument.
1139 (check_function_arguments_recurse): Add for_format argument,
1140 if true, don't stop on warning_suppressed_p.
1141 * c-format.cc (check_format_info): Pass true to
1142 check_function_arguments_recurse's last argument.
1143
fe1ad141
GA
11442022-01-19 David Malcolm <dmalcolm@redhat.com>
1145
1146 * c-common.cc (c_common_c_tests): Rename to...
1147 (c_common_cc_tests): ...this.
1148 (c_family_tests): Update calls for .c to .cc renaming.
1149 * c-common.h (c_format_c_tests): Rename to...
1150 (c_format_cc_tests): ...this.
1151 (c_indentation_c_tests): Rename to...
1152 (c_indentation_cc_tests): ...this.
1153 (c_pretty_print_c_tests): Rename to...
1154 (c_pretty_print_cc_tests): ...this.
1155 * c-format.cc (c_format_c_tests): Rename to...
1156 (c_format_cc_tests): ...this.
1157 * c-indentation.cc (c_indentation_c_tests): Rename to...
1158 (c_indentation_cc_tests): ...this.
1159 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1160 (c_pretty_print_cc_tests): ...this.
1161
fc829782
GA
11622022-01-17 Martin Liska <mliska@suse.cz>
1163
1164 * c-ada-spec.cc: Rename .c names to .cc.
1165 * c-ada-spec.h: Likewise.
1166 * c-common.cc (c_build_vec_convert): Likewise.
1167 (warning_candidate_p): Likewise.
1168 * c-common.h (enum rid): Likewise.
1169 (build_real_imag_expr): Likewise.
1170 (finish_label_address_expr): Likewise.
1171 (c_get_substring_location): Likewise.
1172 (c_build_bind_expr): Likewise.
1173 (conflict_marker_get_final_tok_kind): Likewise.
1174 (c_parse_error): Likewise.
1175 (check_missing_format_attribute): Likewise.
1176 (invalid_array_size_error): Likewise.
1177 (warn_for_multistatement_macros): Likewise.
1178 (build_attr_access_from_parms): Likewise.
1179 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1180 * c-format.cc: Likewise.
1181 * c-gimplify.cc (c_gimplify_expr): Likewise.
1182 * c-indentation.h: Likewise.
1183 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1184 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1185 * c-opts.cc (c_common_post_options): Likewise.
1186 (set_std_cxx23): Likewise.
1187 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1188 * c-pretty-print.h: Likewise.
1189
11902022-01-17 Martin Liska <mliska@suse.cz>
1191
1192 * c-ada-spec.c: Moved to...
1193 * c-ada-spec.cc: ...here.
1194 * c-attribs.c: Moved to...
1195 * c-attribs.cc: ...here.
1196 * c-common.c: Moved to...
1197 * c-common.cc: ...here.
1198 * c-cppbuiltin.c: Moved to...
1199 * c-cppbuiltin.cc: ...here.
1200 * c-dump.c: Moved to...
1201 * c-dump.cc: ...here.
1202 * c-format.c: Moved to...
1203 * c-format.cc: ...here.
1204 * c-gimplify.c: Moved to...
1205 * c-gimplify.cc: ...here.
1206 * c-indentation.c: Moved to...
1207 * c-indentation.cc: ...here.
1208 * c-lex.c: Moved to...
1209 * c-lex.cc: ...here.
1210 * c-omp.c: Moved to...
1211 * c-omp.cc: ...here.
1212 * c-opts.c: Moved to...
1213 * c-opts.cc: ...here.
1214 * c-pch.c: Moved to...
1215 * c-pch.cc: ...here.
1216 * c-ppoutput.c: Moved to...
1217 * c-ppoutput.cc: ...here.
1218 * c-pragma.c: Moved to...
1219 * c-pragma.cc: ...here.
1220 * c-pretty-print.c: Moved to...
1221 * c-pretty-print.cc: ...here.
1222 * c-semantics.c: Moved to...
1223 * c-semantics.cc: ...here.
1224 * c-ubsan.c: Moved to...
1225 * c-ubsan.cc: ...here.
1226 * c-warn.c: Moved to...
1227 * c-warn.cc: ...here.
1228 * cppspec.c: Moved to...
1229 * cppspec.cc: ...here.
1230 * stub-objc.c: Moved to...
1231 * stub-objc.cc: ...here.
1232
9248ee41
GA
12332022-01-15 Martin Sebor <msebor@redhat.com>
1234
1235 PR c/63272
1236 * c.opt (-Wdangling-pointer): New option.
1237
12382022-01-15 Martin Sebor <msebor@redhat.com>
1239
1240 PR tree-optimization/80532
1241 * c.opt (-Wuse-after-free): New options.
1242
617db51d
GA
12432022-01-14 David Malcolm <dmalcolm@redhat.com>
1244
1245 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1246 (handle_tainted_args_attribute): New.
1247
ad3f0d08
GA
12482022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1249 Jason Merrill <jason@redhat.com>
1250
1251 PR c++/70417
1252 * c.opt: Added -Wmissing-template-keyword.
1253
12542022-01-13 Richard Biener <rguenther@suse.de>
1255
1256 PR c/104002
1257 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1258
02a8a01b
GA
12592022-01-12 Martin Liska <mliska@suse.cz>
1260
1261 PR target/103804
1262 * c-attribs.c (handle_optimize_attribute): Do not call
1263 cl_optimization_compare if we seen an error.
1264
01a254e3
GA
12652022-01-11 Jakub Jelinek <jakub@redhat.com>
1266
1267 PR c/101537
1268 PR c/103881
1269 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1270 and BIT_XOR_EXPR.
1271
d9450aa0
GA
12722022-01-10 Richard Biener <rguenther@suse.de>
1273
1274 PR middle-end/101530
1275 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1276 in a TARGET_EXPR to force a temporary.
1277
11ce8d04
GA
12782022-01-06 Marek Polacek <polacek@redhat.com>
1279
1280 PR c++/103758
1281 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1282 diagnostic messages.
1283 (handle_pragma_diagnostic): Likewise.
1284
a4ae8c37
GA
12852022-01-03 Marek Polacek <polacek@redhat.com>
1286
1287 PR c++/103758
1288 * c-format.c (check_tokens): Accept "decl-specifier*".
1289
12902022-01-03 Jakub Jelinek <jakub@redhat.com>
1291
1292 PR c++/103600
1293 * c-attribs.c (handle_non_overlapping_attribute): New function.
1294 (c_common_attribute_table): Add "non overlapping" attribute.
1295
84790a9d
GA
12962021-12-30 Jakub Jelinek <jakub@redhat.com>
1297
1298 PR c++/103012
1299 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1300 cpp_define_unused/cpp_undef calls with forced token locations
1301 BUILTINS_LOCATION.
1302
d1e111da
GA
13032021-12-27 Patrick Palka <ppalka@redhat.com>
1304
1305 PR c++/103700
1306 * c-common.c (pointer_int_sum): When quiet, return
1307 error_mark_node for an incomplete pointed-to type and don't
1308 call size_in_bytes_loc.
1309
2554e2da
GA
13102021-12-17 Jason Merrill <jason@redhat.com>
1311
1312 PR c++/103681
1313 * c-opts.c (c_common_post_options): Update defaults.
1314
774269aa
GA
13152021-12-16 Martin Liska <mliska@suse.cz>
1316
1317 PR target/103709
1318 * c-pragma.c (handle_pragma_pop_options): Do not check
1319 global options modification when an error is seen in parsing
1320 of options (pragmas or attributes).
1321
c8dcf64b
GA
13222021-12-12 Jonathan Wakely <jwakely@redhat.com>
1323
1324 * known-headers.cc: Define INCLUDE_MEMORY instead of
1325 INCLUDE_UNIQUE_PTR.
1326 * name-hint.h: Likewise.
1327 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1328
4b4839e3
GA
13292021-12-09 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR pch/71934
1332 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1333 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1334
03a9bd05
GA
13352021-12-03 Jakub Jelinek <jakub@redhat.com>
1336
1337 PR pch/71934
1338 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1339 (pch_init): Don't initialize v.pch_init.
1340 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1341
40fa651e
GA
13422021-12-01 Jason Merrill <jason@redhat.com>
1343
1344 PR c++/103310
1345 * c.opt: Add -fconstexpr-fp-except.
1346
87cd82c8
GA
13472021-11-29 Richard Biener <rguenther@suse.de>
1348
1349 * c-format.c (check_format_string): Remove spurious
1350 gcc_unreachable.
1351
13522021-11-29 Richard Biener <rguenther@suse.de>
1353
1354 * c-opts.c (c_common_post_options): Remove unreachable return.
1355 * c-pragma.c (handle_pragma_target): Likewise.
1356 (handle_pragma_optimize): Likewise.
1357
091ccc06
GA
13582021-11-25 Jakub Jelinek <jakub@redhat.com>
1359
1360 PR c++/102611
1361 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1362 default for C++23 regardless of warn_deprecated.
1363 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1364 __cpp_multidimensional_subscript=202110L for C++23.
1365
e1d43592
GA
13662021-11-23 Martin Sebor <msebor@redhat.com>
1367
1368 PR middle-end/88232
1369 * c.opt: Add -Winfinite-recursion.
1370
9c077398
GA
13712021-11-19 Martin Sebor <msebor@redhat.com>
1372
1373 PR c++/33925
1374 PR c/102867
1375 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1376 and improve handling tof defined symbols.
1377
13782021-11-19 Martin Liska <mliska@suse.cz>
1379
1380 Revert:
1381 2021-11-18 Martin Liska <mliska@suse.cz>
1382
1383 * c-gimplify.c (genericize_c_loop): Use option directly.
1384
483092d3
GA
13852021-11-18 Matthias Kretz <m.kretz@gsi.de>
1386
1387 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1388 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1389
13902021-11-18 Martin Liska <mliska@suse.cz>
1391
1392 * c-gimplify.c (genericize_c_loop): Use option directly.
1393
280d2838
GA
13942021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1395
1396 PR c/91038
1397 PR c/29970
1398 * c-common.c (pointer_int_sum): Make sure pointer expressions
1399 are evaluated first when the size expression depends on for
1400 variably-modified types.
1401
14022021-11-17 Marek Polacek <polacek@redhat.com>
1403
1404 PR preprocessor/103026
1405 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1406
6b1695f4
GA
14072021-11-16 Jason Merrill <jason@redhat.com>
1408
1409 * c-common.c (release_tree_vector): Only cache vecs smaller than
1410 16 elements.
1411
e2b57363
GA
14122021-11-15 Jason Merrill <jason@redhat.com>
1413
1414 * c.opt: Add -fimplicit-constexpr.
1415 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1416 * c-opts.c (c_common_post_options): Disable below C++14.
1417
14182021-11-15 Jakub Jelinek <jakub@redhat.com>
1419
1420 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1421 Duplicate to both OMP_TARGET and OMP_TEAMS.
1422
8d36a0d2
GA
14232021-11-10 Marek Polacek <polacek@redhat.com>
1424
1425 PR c++/101940
1426 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1427 ignored_attributes.
1428
c9b1334e
GA
14292021-11-09 David Malcolm <dmalcolm@redhat.com>
1430
1431 * c-pragma.c (GCC_BAD_AT): New macro.
1432 (GCC_BAD2_AT): New macro.
1433 (handle_pragma_pack): Use the location of the pertinent token when
1434 issuing diagnostics about invalid constants/actions, and trailing
1435 junk.
1436 (handle_pragma_target): Likewise for non-string "GCC option".
1437 (handle_pragma_message): Likewise for trailing junk.
1438
18ae471f
GA
14392021-11-03 Joseph Myers <joseph@codesourcery.com>
1440
1441 PR c/103031
1442 * c-common.c (convert_and_check): Add argument init_const. Call
1443 convert_init if init_const.
1444 * c-common.h (convert_and_check): Update prototype.
1445 (convert_init): New prototype.
1446
cf82e8d9
GA
14472021-11-01 David Malcolm <dmalcolm@redhat.com>
1448
1449 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1450 CPP_OTHER tokens, set the "escape on output" flag.
1451
04a2cf3f
GA
14522021-10-27 Jakub Jelinek <jakub@redhat.com>
1453
1454 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1455 POINTER_PLUS_EXPR.
1456 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1457 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1458
14592021-10-27 Jakub Jelinek <jakub@redhat.com>
1460
1461 PR c++/102854
1462 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1463 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1464 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1465 conversions temporarily clear the 3rd bit from d->kind while walking
1466 subtrees.
1467 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1468 if possibly non-rectangular.
1469
ae5c5406
GA
14702021-10-21 Jakub Jelinek <jakub@redhat.com>
1471
1472 PR middle-end/64888
1473 * c-omp.c (c_omp_predefined_variable): Return true also for
1474 ubsan_create_data created artificial variables.
1475
5d5885c9
GA
14762021-10-14 Joseph Myers <joseph@codesourcery.com>
1477
1478 * c-format.c (printf_length_specs, scanf_length_specs)
1479 (print_char_table, scan_char_table): Support DFP formats for C2X.
1480 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1481 (T2X_D32, T2X_D64, T2X_D128): New macros.
1482
14832021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1484
1485 * c-omp.c (c_omp_check_context_selector): Rename to
1486 omp_check_context_selector and move to omp-general.c.
1487 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1488 move to omp-general.c.
1489
52055987
GA
14902021-10-12 Joseph Myers <joseph@codesourcery.com>
1491
1492 * c-format.c (print_char_table): Add %b and %B formats.
1493 (scan_char_table): Add %b format.
1494 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1495 (T2X_UPD, T2X_UIM): New macros.
1496
14972021-10-12 Jakub Jelinek <jakub@redhat.com>
1498
1499 * c-omp.c (c_finish_omp_atomic): Use
1500 clear_padding_type_may_have_padding_p.
1501
ce6eec39
GA
15022021-10-08 Martin Liska <mliska@suse.cz>
1503
1504 * c-opts.c (c_common_post_options): Use new macro
1505 OPTION_SET_P.
1506
50e20ee6
GA
15072021-10-07 Martin Liska <mliska@suse.cz>
1508
1509 * c-common.c (parse_optimize_options): Make
1510 save_opt_decoded_options a pointer type.
1511
57c7ec62
GA
15122021-10-06 Jakub Jelinek <jakub@redhat.com>
1513
1514 PR tree-optimization/102571
1515 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1516 padding, but the non-padding bits are contiguous set of bytes
1517 by adjusting the memcmp call arguments instead of emitting
1518 __builtin_clear_padding and then comparing all the type's bytes.
1519
15202021-10-06 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c++/102612
1523 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1524 __cpp_constexpr to 202110L rather than 201907L.
1525
da9c5f78
GA
15262021-10-04 Marek Polacek <polacek@redhat.com>
1527
1528 PR c++/97573
1529 * c-common.h (do_warn_array_compare): Declare.
1530 * c-warn.c (do_warn_array_compare): New.
1531 * c.opt (Warray-compare): New option.
1532
e3e07b89
GA
15332021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1534
1535 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1536 NULL, this is not needed.
1537
9d116bcc
GA
15382021-10-01 Martin Sebor <msebor@redhat.com>
1539
1540 PR c/102103
1541 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1542 Check and perform warning suppression.
1543 (c_common_truthvalue_conversion): Enhance warning suppression.
1544
15452021-10-01 Martin Liska <mliska@suse.cz>
1546
1547 PR target/102552
1548 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1549 used for program name, so merged_decoded_options should also
1550 respect that.
9d116bcc
GA
1551
15522021-10-01 Jakub Jelinek <jakub@redhat.com>
1553 Richard Biener <rguenther@suse.de>
1554
1555 PR sanitizer/102515
1556 * c-ubsan.c (ubsan_instrument_division): Check the right
1557 flag_sanitize_recover bit, depending on which sanitization
1558 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1559 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1560 and SANITIZE_DIVIDE is enabled, neither check is known
1561 to be false and flag_sanitize_recover bits for those two
1562 aren't the same, emit both __ubsan_handle_divrem_overflow
1563 and __ubsan_handle_divrem_overflow_abort calls.
1564
15652021-10-01 Martin Liska <mliska@suse.cz>
1566
1567 * c-common.c (parse_optimize_options): Combine optimize
1568 options with what was provided on the command line.
1569
15702021-10-01 Jakub Jelinek <jakub@redhat.com>
1571
1572 * c-omp.c (c_omp_split_clauses): Also copy
1573 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1574
cf966403
GA
15752021-09-27 Martin Liska <mliska@suse.cz>
1576
1577 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1578 x_flag_default_complex_method.
cf966403 1579
e4777439
GA
15802021-09-22 Jakub Jelinek <jakub@redhat.com>
1581
1582 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1583
62498024
GA
15842021-09-20 Matthias Kretz <m.kretz@gsi.de>
1585
1586 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1587 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1588 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1589 __ROUNDING_MATH__ according to the new optimization flags.
1590
cf74e7b5
GA
15912021-09-18 Jakub Jelinek <jakub@redhat.com>
1592
1593 * c-omp.c (c_omp_split_clauses): Split order clause also to
1594 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1595
0a4cb439
GA
15962021-09-17 Jakub Jelinek <jakub@redhat.com>
1597
1598 * c-omp.c (c_finish_omp_atomic): Avoid creating
1599 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1600 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1601 had NULL initializer. When omitting operands after v = x,
1602 use type of v rather than type of x. Fix type of vtmp
1603 TARGET_EXPR.
1604
07985c47
GA
16052021-09-13 Jason Merrill <jason@redhat.com>
1606
1607 * c.opt: Add -Winterference-size.
1608 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1609 and __GCC_CONSTRUCTIVE_SIZE.
1610
a26206ec
GA
16112021-09-10 Jakub Jelinek <jakub@redhat.com>
1612
1613 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1614 * c-omp.c: Include gimple-fold.h.
1615 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1616 OpenMP 5.1 atomics.
1617
f84e2f0b
GA
16182021-09-09 qing zhao <qing.zhao@oracle.com>
1619
1620 * c-attribs.c (handle_uninitialized_attribute): New function.
1621 (c_common_attribute_table): Add "uninitialized" attribute.
1622
b6db7cd4
GA
16232021-09-08 liuhongt <hongtao.liu@intel.com>
1624
1625 * c-common.c (excess_precision_mode_join): Update below comments.
1626 (c_ts18661_flt_eval_method): Set excess_precision_type to
1627 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1628 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1629 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1630 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1631
b2748138
GA
16322021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1633
1634 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1635
7b739540
GA
16362021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1637
1638 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1639 and -gnatwu warning for the package specification.
1640
e11c6046
GA
16412021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1642
1643 * c-attribs.c (handle_unavailable_attribute): New.
1644
1e2f030b
GA
16452021-08-30 Jason Merrill <jason@redhat.com>
1646
1647 * c.opt: Add -Wmissing-requires.
1648
85d77ac4
GA
16492021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1650
1651 PR other/93067
1652 * c-opts.c (c_common_input_charset_cb): New function.
1653 (c_common_post_options): Call new function
1654 diagnostic_initialize_input_context().
1655
7c9e1645
GA
16562021-08-20 Tobias Burnus <tobias@codesourcery.com>
1657
1658 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1659 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1660 "di" and "u", respecitively; fill with BADLEN to match
1661 size of 'types'.
1662 (get_init_dynamic_hwi): Split off from ...
1663 (init_dynamic_diag_info): ... here. Call it.
1664 (init_dynamic_gfc_info): Call it.
1665
16662021-08-20 Jakub Jelinek <jakub@redhat.com>
1667
1668 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1669 * c-pragma.c (omp_pragmas): Add error directive.
1670 * c-omp.c (omp_directives): Uncomment error directive entry.
1671
6e529985
GA
16722021-08-18 Jakub Jelinek <jakub@redhat.com>
1673
1674 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1675 * c-pragma.c (omp_pragmas): Add nothing directive.
1676 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1677
2d14d64b
GA
16782021-08-17 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR c++/101539
1681 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1682 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1683
16842021-08-17 Matt Jacobson <mhjacobson@me.com>
1685
1686 * c-opts.c (c_common_post_options): Default to
1687 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1688
16892021-08-17 Jakub Jelinek <jakub@redhat.com>
1690
1691 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1692 * c-pragma.c (omp_pragmas): Add scope construct.
1693 * c-omp.c (omp_directives): Uncomment scope directive entry.
1694
9d1d9fc8
GA
16952021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1696
1697 * c-cppbuiltin.c (c_cpp_builtins): Define
1698 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1699
72be20e2
GA
17002021-08-12 Jakub Jelinek <jakub@redhat.com>
1701
1702 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1703 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1704 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1705 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1706 enumerator.
1707 (c_finish_omp_masked): Declare.
1708 * c-omp.c (c_finish_omp_masked): New function.
1709 (c_omp_split_clauses): Handle combined masked constructs.
1710
4d17ca1b
GA
17112021-07-30 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR c++/101539
1714 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1715 * c-common.c (c_common_reswords): Add
1716 __is_pointer_interconvertible_base_of.
1717
17182021-07-29 Richard Biener <rguenther@suse.de>
1719
1720 PR c/101512
1721 * c-common.c (c_common_mark_addressable_vec): Look through
1722 C_MAYBE_CONST_EXPR even if not at the toplevel.
1723
af3f12e6
GA
17242021-07-27 Martin Sebor <msebor@redhat.com>
1725
1726 PR c/101585
1727 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1728
ead235f6
GA
17292021-07-23 Jakub Jelinek <jakub@redhat.com>
1730
1731 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1732 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1733 and later.
1734
17352021-07-23 Jakub Jelinek <jakub@redhat.com>
1736
1737 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1738 PRAGMA_OMP__LAST_ enumerators.
1739
419c6c68
GA
17402021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1741 Joseph Myers <joseph@codesourcery.com>
1742 Cesar Philippidis <cesar@codesourcery.com>
1743
1744 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1745
92d45509
GA
17462021-07-20 Martin Sebor <msebor@redhat.com>
1747
1748 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1749 by-const-reference.
1750 * c-common.h (c_build_shufflevector): Same.
1751
87277b6a
GA
17522021-07-16 Andrew Pinski <apinski@marvell.com>
1753
1754 PR c/101453
1755 * c-common.c (parse_optimize_options): Use the correct
1756 size for buffer.
1757
d97d71a1
GA
17582021-07-15 Martin Sebor <msebor@redhat.com>
1759
1760 PR c/101289
1761 PR c/97548
1762 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1763
c4fee1c6
GA
17642021-07-14 Jason Merrill <jason@redhat.com>
1765
1766 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1767
6fba0eea
GA
17682021-07-06 Martin Sebor <msebor@redhat.com>
1769
1770 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1771 (gcc_cdiag_char_table): Same.
1772 (gcc_cxxdiag_char_table): Same.
6fba0eea 1773
7a60a6e8
GA
17742021-07-02 Jakub Jelinek <jakub@redhat.com>
1775
1776 * c-common.h (enum c_omp_directive_kind): New enum.
1777 (struct c_omp_directive): New type.
1778 (c_omp_categorize_directive): Declare.
1779 * c-omp.c (omp_directives): New variable.
1780 (c_omp_categorize_directive): New function.
1781
bea7c16a
GA
17822021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1783
1784 * c-ada-spec.c (packed_layout): New global variable.
1785 (dump_ada_declaration): Set it upon seeing a packed record type.
1786 Do not put the "aliased" keyword if it is set.
1787 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1788
17892021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1790
1791 * c-ada-spec.c (check_name): Rename into...
1792 (check_type_name_conflict): ...this. Minor tweak.
1793 (dump_ada_function_declaration): Adjust to above renaming.
1794 (dump_ada_array_domains): Fix oversight.
1795 (dump_ada_declaration): Call check_type_name_conflict for variables.
1796
90708f87
GA
17972021-06-25 Martin Sebor <msebor@redhat.com>
1798
1799 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1800 (c_common_truthvalue_conversion): Replace direct uses of
1801 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1802 copy_no_warning.
1803 (check_function_arguments_recurse): Same.
1804 * c-gimplify.c (c_gimplify_expr): Same.
1805 * c-warn.c (overflow_warning): Same.
1806 (warn_logical_operator): Same.
1807 (warn_if_unused_value): Same.
1808 (do_warn_unused_parameter): Same.
1809
9aa8327e
GA
18102021-06-24 Jakub Jelinek <jakub@redhat.com>
1811
1812 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1813 C_ORT_OMP_TARGET.
1814 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1815 combined target constructs also add map (always, tofrom:) clause.
1816
ede6c356
GA
18172021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1818
1819 * c-attribs.c (common_handle_aligned_attribute): Remove short
1820 circuit and dead code.
1821
8dc48181
GA
18222021-06-14 Jonathan Wakely <jwakely@redhat.com>
1823
1824 PR c++/101052
1825 * known-headers.cc (get_stdlib_header_for_name): Add known
1826 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1827 exit, and getenv.
1828
8b8c3912
GA
18292021-06-12 Jason Merrill <jason@redhat.com>
1830
1831 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1832
f16f65f8
GA
18332021-06-11 Jakub Jelinek <jakub@redhat.com>
1834
1835 PR c++/100974
1836 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1837 -std=c++2b for P1938R3 consteval if support.
1838
4f625f47
GA
18392021-06-09 Jason Merrill <jason@redhat.com>
1840
1841 PR c++/100879
1842 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1843 warning.
1844
438aac59
GA
18452021-06-07 Martin Liska <mliska@suse.cz>
1846
1847 * c-target.def: Split long lines and replace them
1848 with '\n\'.
1849
600f90cb
GA
18502021-06-04 Martin Sebor <msebor@redhat.com>
1851
1852 PR c/100783
1853 * c-attribs.c (positional_argument): Bail on erroneous types.
1854
18552021-06-04 Martin Sebor <msebor@redhat.com>
1856
1857 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1858 for element presence.
1859
440c8a0a
GA
18602021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1861
1862 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1863 (dump_ada_decl_name): Likewise.
1864 (dump_anonymous_type_name): Remove parent parameter and adjust.
1865 (dump_sloc): Minor tweak.
1866 (dump_ada_array_type): Remove type parameter and adjust.
1867 (dump_ada_enum_type): Remove parent parameter and adjust.
1868 (dump_ada_node): Adjust calls to above functions.
1869 (dumped_anonymous_types): New global variable.
1870 (dump_nested_types_1): Rename into...
1871 (dump_nested_types): ...this.
1872 (dump_nested_type): Remove parent and dumped_types parameters.
1873 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1874 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1875 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1876
18772021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1878
1879 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1880 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1881
18822021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1883
1884 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1885 (htable_t): New typedef.
1886 (overloaded_names): Use it.
1887 (add_name): New function.
1888 (init_overloaded_names): Use add_name to populate the table and add
1889 special cases for sigaction and stat.
1890 (overloaded_name_p): Rename into...
1891 (overloading_index): ...this. Do not initialize overloaded_names table
1892 here. Return the index or zero.
1893 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1894 but add an overloading suffix instead.
1895 (dump_ada_specs): Initialize overloaded_names tables here.
1896
b75978d1
GA
18972021-06-01 Martin Liska <mliska@suse.cz>
1898
1899 PR other/100759
1900 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1901 to a situation where we are not in processing of an optimize
1902 pragma.
1903 * c-pragma.c (handle_pragma_pop_options): Restore target
1904 options.
1905
ee682192
GA
19062021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1907
1908 PR testsuite/100749
1909 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1910
19112021-05-31 Richard Biener <rguenther@suse.de>
1912
1913 PR c++/88601
1914 * c-common.c: Include tree-vector-builder.h and
1915 vec-perm-indices.h.
1916 (c_common_reswords): Add __builtin_shufflevector.
1917 (c_build_shufflevector): New funtion.
1918 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1919 (c_build_shufflevector): Declare.
1920
48166757
GA
19212021-05-28 Jakub Jelinek <jakub@redhat.com>
1922
1923 PR middle-end/99928
1924 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1925 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1926
19272021-05-28 Tobias Burnus <tobias@codesourcery.com>
1928
1929 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1930
2bc6dace
GA
19312021-05-25 Martin Liska <mliska@suse.cz>
1932
1933 PR tree-optimization/92860
1934 PR target/99592
1935 * c-attribs.c (handle_optimize_attribute): Save target node
1936 before calling parse_optimize_options and save it in case
1937 it changes.
1938 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1939 (handle_pragma_pop_options): Likewise here.
1940
19412021-05-25 Martin Liska <mliska@suse.cz>
1942
1943 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1944
19452021-05-25 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR middle-end/99928
1948 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1949 combined with simd and not with taskloop or for.
1950
2832d51b
GA
19512021-05-21 Jakub Jelinek <jakub@redhat.com>
1952
1953 PR middle-end/99928
1954 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1955 on firstprivate clause copy going to target construct, and for
1956 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1957
ea34e2ed
GA
19582021-05-20 Jonathan Wakely <jwakely@redhat.com>
1959
1960 * c.opt (Wc++11-extensions, Wc++14-extensions)
1961 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1962 options.
1963
19642021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1965
1966 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1967
19682021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1969
1970 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1971 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1972 (pch_init): Renamed member.
1973 (c_common_valid_pch): Adjust access to debug_type_names.
1974
65f32e5d
GA
19752021-05-19 Martin Sebor <msebor@redhat.com>
1976
1977 PR c/100619
1978 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1979 bounds.
1980
a8daf9a1
GA
19812021-05-18 Richard Biener <rguenther@suse.de>
1982
1983 PR c/100547
1984 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1985 Reword existing nunit diagnostic.
1986
a7ffc1ef
GA
19872021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1988
1989 * c-common.c (braced_list_to_string): Return CTOR unchanged
1990 if host and target character sizes don't match.
1991
87a7d10c
GA
19922021-05-14 Martin Liska <mliska@suse.cz>
1993
1994 * c.opt: Add Warning keyword for 2 options.
1995
f9af11c7
GA
19962021-05-13 Martin Liska <mliska@suse.cz>
1997
1998 PR middle-end/100504
1999 * c-attribs.c (handle_target_clones_attribute): Expect a string
2000 argument to target_clone argument.
2001
037e3661
GA
20022021-05-11 Joseph Myers <joseph@codesourcery.com>
2003
2004 * c-lex.c (interpret_float): Handle digit separators for C2X.
2005
aa891c56
GA
20062021-05-10 Martin Liska <mliska@suse.cz>
2007
2008 * c-ada-spec.c (print_destructor): Use startswith
2009 function instead of strncmp.
2010 (dump_ada_declaration): Likewise.
2011 * c-common.c (disable_builtin_function): Likewise.
2012 (def_builtin_1): Likewise.
2013 * c-format.c (check_tokens): Likewise.
2014 (check_plain): Likewise.
2015 (convert_format_name_to_system_name): Likewise.
2016
e4ff4ffb
GA
20172021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2018
2019 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2020 complex divide
2021
c0fa3f2f
GA
20222021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2023 Nathan Sidwell <nathan@codesourcery.com>
2024 Tom de Vries <vries@codesourcery.com>
2025 Julian Brown <julian@codesourcery.com>
2026 Kwok Cheung Yeung <kcy@codesourcery.com>
2027
2028 * c.opt (Wopenacc-parallelism): New.
2029
6e81e015
GA
20302021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2031
2032 * c.opt (fopenacc-kernels=): Remove.
2033
019a9220
GA
20342021-04-08 Jakub Jelinek <jakub@redhat.com>
2035
2036 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2037 occured -> occurred.
2038 (check_alignment_of_packed_member): Fix a comment typo,
2039 memeber -> member.
2040 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2041 and onless -> unless.
2042 (warn_parm_array_mismatch): Fix comment typos, declaratation
2043 -> declaration and woud -> would. Fix up comment indentation.
2044
20452021-04-08 Martin Sebor <msebor@redhat.com>
2046
2047 PR middle-end/99883
2048 * c.opt (Wmismatched-new-delete): Correct spelling.
2049
b1da9916
GA
20502021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2051
2052 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2053 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2054 enumeral types use again the type name for the enumeration constants.
2055 (dump_ada_node): Adjust call to dump_ada_enum_type.
2056 (dump_nested_type): Likewise.
2057
f1607029
GA
20582021-04-01 Jason Merrill <jason@redhat.com>
2059
2060 PR c++/98481
2061 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2062
4493b1c1
GA
20632021-03-25 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c++/99565
2066 * c-warn.c (do_warn_duplicated_branches): Pass also
2067 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2068
6af7b307
GA
20692021-03-20 Jakub Jelinek <jakub@redhat.com>
2070
2071 PR debug/99230
2072 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2073
ceae9533
GA
20742021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2075
2076 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2077 after entering the separate class package, if any.
2078
67f10d28
GA
20792021-03-04 Richard Biener <rguenther@suse.de>
2080
2081 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2082 Handle ERROR_MARK.
2083
20842021-03-04 Jakub Jelinek <jakub@redhat.com>
2085
2086 PR c/99325
2087 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2088 (token_streamer::stream) Likewise.
2089 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2090 UNKNOWN_LOCATION.
2091
f3641ac7
GA
20922021-03-03 Jakub Jelinek <jakub@redhat.com>
2093
2094 PR c/99324
2095 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2096 instead of mark_addressable. Fix a comment typo -
2097 neutrallly -> neutrally.
2098
2c83c3fb
GA
20992021-02-28 Jakub Jelinek <jakub@redhat.com>
2100
2101 PR c/99304
2102 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2103 message - refernced -> referenced. Remove superfluous space before
2104 closing paren of function calls.
2105
daa68844
GA
21062021-02-25 Nathan Sidwell <nathan@acm.org>
2107
2108 PR c++/99166
2109 * c.opt (-flang-info-module-cmi): Renamed option.
2110
50352c6c
GA
21112021-02-19 Nathan Sidwell <nathan@acm.org>
2112
2113 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2114
bf81237e
GA
21152021-02-18 H.J. Lu <hjl.tools@gmail.com>
2116
2117 PR target/99113
2118 * c-attribs.c (c_common_attribute_table): Add the "retain"
2119 attribute.
2120 (handle_retain_attribute): New function.
2121
0e804ce3
GA
21222021-02-16 Marek Polacek <polacek@redhat.com>
2123
2124 PR c++/99062
2125 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2126 alignment argument is non-negative. Tweak a warning message.
2127
fab095da
GA
21282021-02-12 Martin Sebor <msebor@redhat.com>
2129
2130 PR c/99055
2131 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2132 print_generic_expr_to_str.
2133
4b37c3ea
GA
21342021-02-10 Richard Biener <rguenther@suse.de>
2135
2136 * c-common.c (parse_optimize_options): Free decoded_options.
2137
a19dd5e6
GA
21382021-02-04 emsr <3dw4rd@verizon.net>
2139
2140 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2141
9faaa807
GA
21422021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2143
2144 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2145 * c-lex.c (interpret_integer): Set node type for size literal.
2146
85d04a2e
GA
21472021-01-28 Jakub Jelinek <jakub@redhat.com>
2148
2149 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2150 draft from description.
2151 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2152
e62bb7f0
GA
21532021-01-26 Paul Fee <paul.f.fee@gmail.com>
2154
2155 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2156 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2157 and -std=gnu++2b
2158 * c-opts.c (set_std_cxx23): New.
2159 (c_common_handle_option): Set options when -std=c++23 is enabled.
2160 (c_common_post_options): Adjust comments.
2161 (set_std_cxx20): Likewise.
2162
161e4c08
GA
21632021-01-25 Martin Sebor <msebor@redhat.com>
2164
2165 PR c++/98646
2166 * c-common.c (check_nonnull_arg): Adjust warning text.
2167
4c9bcd5c
GA
21682021-01-17 Martin Sebor <msebor@redhat.com>
2169
2170 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2171 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2172
59cf67d1
GA
21732021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2174
2175 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2176 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2177
2f7f0d32
GA
21782021-01-15 Jakub Jelinek <jakub@redhat.com>
2179
2180 PR tree-optimization/98597
2181 * c-pretty-print.c: Include options.h.
2182 (c_fold_indirect_ref_for_warn): New function.
2183 (print_mem_ref): Use it. If it returns something that has compatible
2184 type and is TBAA compatible with zero offset, print it and return,
2185 otherwise print it using offsetof syntax or array ref syntax. Fix up
2186 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2187 argument has pointer to array type. Print pointers using the standard
2188 formatting.
2189
6851dda2
GA
21902021-01-12 Martin Sebor <msebor@redhat.com>
2191
2192 PR c/98597
2193 PR c/98592
2194 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2195 has pointer type. Remove redundant code. Avoid calling
2196 gimple_canonical_types_compatible_p.
2197
7d187e4f
GA
21982021-01-07 Martin Sebor <msebor@redhat.com>
2199
2200 PR middle-end/98578
2201 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2202 Avoid assuming acces type's size is constant. Correct condition
2203 guarding the printing of a parenthesis.
2204
942ae5be
GA
22052021-01-06 Martin Sebor <msebor@redhat.com>
2206
2207 PR c++/95768
2208 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2209 SSA_NAMEs print VLA names and GIMPLE defining statements.
2210 (print_mem_ref): New function.
2211 (c_pretty_printer::unary_expression): Call it.
2212
22132021-01-06 Richard Biener <rguenther@suse.de>
2214
2215 PR tree-optimization/95582
2216 * c-attribs.c (c_common_attribute_table): Add entry for
2217 signed_bool_precision.
2218 (handle_signed_bool_precision_attribute): New.
2219
8daa719b
GA
22202020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2221
2222 * c.opt: Add -stdlib= option and enumerations for
2223 libstdc++ and libc++.
2224
eefe499f
GA
22252020-12-16 Martin Liska <mliska@suse.cz>
2226
2227 * c.opt: Remove usage of Report.
2228
d52945ce
GA
22292020-12-14 Martin Sebor <msebor@redhat.com>
2230
2231 PR middle-end/98166
2232 PR c++/57111
2233 PR middle-end/98160
2234 * c-attribs.c (maybe_add_noinline): New function.
2235 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2236 Implicitly add attribute noinline to functions not declared inline
2237 and warn on those.
2238
ca2bd949
GA
22392020-12-09 Tobias Burnus <tobias@codesourcery.com>
2240
2241 * c-pragma.c (omp_pragmas): Add 'allocate'.
2242 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2243
f6e8e279
GA
22442020-12-08 Jakub Jelinek <jakub@redhat.com>
2245
2246 PR c++/98187
2247 * c-pragma.c (omp_pragmas): Remove "master".
2248 (omp_pragmas_simd): Add "master".
2249
bc8a7013
GA
22502020-12-07 Marek Polacek <polacek@redhat.com>
2251
2252 PR c++/98126
2253 * c-common.c (verify_tree_lim_r): New function.
2254 (verify_sequence_points): Use it. Use nullptr instead of 0.
2255
b8dd0ef7
GA
22562020-12-03 Martin Sebor <msebor@redhat.com>
2257
2258 PR c++/90629
2259 PR middle-end/94527
2260 * c-attribs.c (handle_dealloc_attribute): New function.
2261 (handle_malloc_attribute): Handle argument forms of attribute.
2262 * c.opt (-Wmismatched-dealloc): New option.
2263 (-Wmismatched-new-delete): New option.
2264
22652020-12-03 Jakub Jelinek <jakub@redhat.com>
2266
2267 PR libstdc++/93121
2268 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2269 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2270
e0f5e792
GA
22712020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2272
2273 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2274 {__GNUC_EXECUTION_CHARSET_NAME} and
2275 _WIDE_EXECUTION_CHARSET_NAME} macros.
2276
22772020-12-01 Nathan Sidwell <nathan@acm.org>
2278
2279 * c-common.c (module, import, export): New internal tokens (with
2280 trailing space).
2281 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2282 them.
2283 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2284 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2285
22862020-12-01 Nathan Sidwell <nathan@acm.org>
2287
2288 * c-opts.c (c_common_init_options): Ask for module dependencies.
2289 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2290 * c-pch.c (c_common_valid_pch): ... does not play with C++
2291 modules.
2292 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2293 options.
2294 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2295 (fmodule-only, fmodule-mapper, fmodule-lazy)
2296 (fmodule-version-ignore, Winvalid-imported-macros)
2297 (flang-info-include-translate, flang-info-include-translate-not):
2298 New options
2299
5fbf0ecb
GA
23002020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2301
2302 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2303 (dump_ada_structure): Also deal with convention, unchecked union and
2304 bit-field for nested types. In the latter case, print an Alignment
2305 aspect along with the Pack aspect.
2306
360258da
GA
23072020-11-25 Martin Sebor <msebor@redhat.com>
2308
2309 PR bootstrap/94982
2310 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2311 -Wformat-diag.
2312
1e2c9a27
GA
23132020-11-24 Martin Sebor <msebor@redhat.com>
2314
2315 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2316
8e6198d0
GA
23172020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2318
2319 * c-attribs.c (handle_special_var_sec_attribute): New.
2320 (handle_noinit_attribute): Remove.
2321 (attr_noinit_exclusions): Rename to...
2322 (attr_section_exclusions): ...this, and add "persistent" attribute
2323 exclusion.
2324 (c_common_attribute_table): Add "persistent" attribute.
2325
7a97e2fc
GA
23262020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2327
2328 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2329 Treat opaque types like other types.
2330 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2331 supported types.
2332
82e5048e
GA
23332020-11-20 Martin Sebor <msebor@redhat.com>
2334
2335 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2336 with fewer arguments.
2337
23382020-11-20 Martin Sebor <msebor@redhat.com>
2339
2340 PR middle-end/97879
2341 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2342 Error out on invalid modes.
2343
23442020-11-20 Jakub Jelinek <jakub@redhat.com>
2345
2346 PR libstdc++/88101
2347 * c-common.c (check_builtin_function_arguments): Handle
2348 BUILT_IN_CLEAR_PADDING.
2349
25bb75f8
GA
23502020-11-18 Nathan Sidwell <nathan@acm.org>
2351
2352 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2353
4dabb037
GA
23542020-11-17 Nathan Sidwell <nathan@acm.org>
2355
2356 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2357 after newly-added CTI_MODULE_HWM.
2358
23592020-11-17 Joseph Myers <joseph@codesourcery.com>
2360
2361 * c-cppbuiltin.c (builtin_define_float_constants): Define
2362 "*_IS_IEC_60559__" macros.
2363
23642020-11-17 Nathan Sidwell <nathan@acm.org>
2365
2366 * c-lex.c: #include "langhooks.h".
2367 (cb_undef): Maybe call preprocess_undef lang hook.
2368 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2369 lang hook.
2370 (push_command_line_include): Maybe call preprocess_main_file lang
2371 hook.
2372 (cb_file_change): Likewise.
2373 * c-ppoutput.c: #include "langhooks.h.
2374 (scan_translation_unit): Maybe call preprocess_token lang hook.
2375 (class do_streamer): New, derive from token_streamer.
2376 (directives_only_cb): Data pointer is do_streamer, call
2377 preprocess_token lang hook.
2378 (scan_translation_unit_directives_only): Use do_streamer.
2379 (print_line_1): Move src_line recording to after string output.
2380 (cb_undef): Maybe call preprocess_undef lang hook.
2381
23822020-11-17 Nathan Sidwell <nathan@acm.org>
2383
2384 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2385 code duplicating that functionality.
2386
23872020-11-17 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR c/90628
2390 * c-common.c (check_builtin_function_arguments)
2391 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2392 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2393 for more builtins and argument positions.
2394
29c5d9ce
GA
23952020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2396
2397 PR objc/97854
2398 * stub-objc.c: Include c-common.h to declare enum rid.
2399
77f67db2
GA
24002020-11-13 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c++/63287
2403 * c-cppbuiltin.c: Include configargs.h.
2404 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2405 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2406 "single".
2407
24082020-11-13 Gergö Barany <gergo@codesourcery.com>
2409 Thomas Schwinge <thomas@codesourcery.com>
2410
2411 * c.opt (fopenacc-kernels): Add.
2412
24132020-11-13 Jason Merrill <jason@redhat.com>
2414
2415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2416
24172020-11-13 Piotr H. Dabrowski <phd@phd.re>
2418
2419 PR c++/91318
2420 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2421
24222020-11-13 Martin Liska <mliska@suse.cz>
2423
2424 * c-attribs.c (build_attr_access_from_parms): Format properly.
2425
24262020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2427
2428 PR objc/90707
2429 * c-common.c (c_common_reswords): null_unspecified, nullable,
2430 nonnull, null_resettable: New keywords.
2431 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2432 RID_NONNULL, RID_NULL_RESETTABLE: New.
2433 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2434 ranges accepted for property attributes.
2435 * c-attribs.c (handle_objc_nullability_attribute): New.
2436 * c-objc.h (enum objc_property_attribute_group): Add
2437 OBJC_PROPATTR_GROUP_NULLABLE.
2438 (enum objc_property_attribute_kind):Add
2439 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2440 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2441
24422020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2443
2444 PR objc/77404
2445 * c-attribs.c (handle_objc_root_class_attribute): New
2446 * c-objc.h (objc_start_class_interface): Add a location
2447 value for the position of the class name.
2448 * c.opt: Add Wobjc-root-class.
2449 * stub-objc.c (objc_start_class_interface): Add a location
2450 value for the position of the class name.
2451
a5a11525
GA
24522020-11-12 Joseph Myers <joseph@codesourcery.com>
2453
2454 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2455 Allow scope for C. Handle standard attributes for C. Do not
2456 accept unscoped attributes if std_syntax and not handled as
2457 standard attributes.
2458 * c-common.h (c_common_has_attribute): Update prototype.
2459
24602020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2461
2462 PR pch/86674
2463 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2464 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2465
0f5f9ed5
GA
24662020-11-11 Patrick Palka <ppalka@redhat.com>
2467
2468 PR c++/88115
2469 * c-opts.c (c_common_post_options): Update latest_abi_version.
2470
bb622641
GA
24712020-11-10 Jakub Jelinek <jakub@redhat.com>
2472
2473 PR c/97748
2474 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2475 to false.
2476 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2477 recursively and just return true instead of warning if it is true.
2478 Handle COMPLEX_EXPR.
2479
24802020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2481
2482 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2483 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2484 (c_omp_adjust_map_clauses): New function.
2485
2bee28dd
GA
24862020-11-09 Marek Polacek <polacek@redhat.com>
2487
2488 DR 1914
2489 * c-common.c (attribute_fallthrough_p): Tweak the warning
2490 message.
2491
24922020-11-09 Patrick Palka <ppalka@redhat.com>
2493
2494 * c-pragma.c (handle_pragma_diagnostic): Split the
2495 unknown-option -Wpragmas diagnostic into a warning and a
2496 subsequent note containing a spelling suggestion. Avoid
2497 computing the suggestion if -Wpragmas warnings are being
2498 suppressed.
2499
25002020-11-09 Patrick Palka <ppalka@redhat.com>
2501
2502 PR testsuite/97117
2503 * c-indentation.c (get_visual_column): Remove location_t
2504 parameter. Move the column-tracking diagnostic code from here
2505 to ...
2506 (should_warn_for_misleading_indentation): ... here, before the
2507 early exit for when the loci are not all distinct. Don't pass a
2508 location_t argument to get_visual_column.
2509 (assert_get_visual_column_succeeds): Don't pass a location_t
2510 argument to get_visual_column.
2511 (assert_get_visual_column_fails): Likewise.
2512
fb95de7a
GA
25132020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2514
2515 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2516 of keywords accepted in @property attribute contexts.
2517 * c-objc.h (enum objc_property_attribute_group): Add
2518 OBJC_PROPATTR_GROUP_CLASS.
2519 (enum objc_property_attribute_kind): Add
2520 OBJC_PROPERTY_ATTR_CLASS.
2521
2da7ee05
GA
25222020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2523
2524 * c-common.c (c_common_reswords): Add 'atomic' property
2525 attribute.
2526 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2527 property attributes.
2528
25292020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2530
2531 * c-attribs.c (handle_nsobject_attribute): New.
2532 * c.opt: Add WNSObject-attribute.
2533
44cab2d8
GA
25342020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2535
2536 * c-objc.h (enum objc_property_attribute_group): New
2537 (enum objc_property_attribute_kind): New.
2538 (OBJC_PROPATTR_GROUP_MASK): New.
2539 (struct property_attribute_info): Small class encapsulating
2540 parser output from property attributes.
2541 (objc_prop_attr_kind_for_rid): New
2542 (objc_add_property_declaration): Simplify interface.
2543 * stub-objc.c (enum rid): Dummy type.
2544 (objc_add_property_declaration): Simplify interface.
2545 (objc_prop_attr_kind_for_rid): New.
2546
25472020-11-06 Nathan Sidwell <nathan@acm.org>
2548
2549 * c-ada-spec.c (collect_ada_nodes): Rename
2550 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2551 (collect_ada_node): Likewise.
2552 (dump_forward_type): Likewise.
2553 * c-common.c (set_underlying_type): Rename
2554 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2555 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2556
25572020-11-06 Jakub Jelinek <jakub@redhat.com>
2558
2559 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2560
0cfd9109
GA
25612020-11-05 Marek Polacek <polacek@redhat.com>
2562
2563 PR c++/97675
2564 * c.opt (Wexceptions): New option.
2565
25662020-11-05 Marek Polacek <polacek@redhat.com>
2567
2568 PR c++/25814
2569 * c.opt (Wvexing-parse): New option.
2570
35c125cb
GA
25712020-11-04 Jakub Jelinek <jakub@redhat.com>
2572
2573 PR c++/97670
2574 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2575 underlying decl to clear in the allocate_head bitmap.
2576
25772020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2578
2579 * c-objc.h (objc_non_constant_expr_p): New.
2580 * stub-objc.c (objc_non_constant_expr_p): New.
2581
fd2325ea
GA
25822020-11-03 Nathan Sidwell <nathan@acm.org>
2583
2584 * c.opt (MQ,MT): Reword description to be make-agnostic.
2585
88ce3d5f
GA
25862020-11-02 Nathan Sidwell <nathan@acm.org>
2587
2588 * c-opts.c (c_common_post_options): Move var decl to its
2589 initialization point.
2590
25912020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2592
2593 * c-lex.c (c_lex_with_flags): When combining '@' with a
2594 keyword for Objective-C, combine the location ranges too.
2595
25962020-10-30 Qing Zhao <qing.zhao@oracle.com>
2597 H.J.Lu <hjl.tools@gmail.com>
2598
2599 * c-attribs.c (c_common_attribute_table): Add new attribute
2600 zero_call_used_regs.
2601 (handle_zero_call_used_regs_attribute): New function.
2602
e93aae4a
GA
26032020-10-28 Marek Polacek <polacek@redhat.com>
2604
2605 PR c++/97573
2606 * c-opts.c (c_common_post_options): In C++20, turn on
2607 -Wdeprecated-enum-enum-conversion and
2608 -Wdeprecated-enum-float-conversion.
2609 * c.opt (Wdeprecated-enum-enum-conversion,
2610 Wdeprecated-enum-float-conversion): New options.
2611 (Wenum-conversion): Allow for C++ too.
2612
26132020-10-28 Jakub Jelinek <jakub@redhat.com>
2614
2615 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2616 * c-omp.c: Include bitmap.h.
2617 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2618
f19e7c8d
GA
26192020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2620
2621 * c-common.c (__is_nothrow_assignable): New.
2622 (__is_nothrow_constructible): Likewise.
2623 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2624 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2625
efe71fcc
GA
26262020-10-23 Jan Hubicka <hubicka@ucw.cz>
2627
2628 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2629
26302020-10-23 Marek Polacek <polacek@redhat.com>
2631
2632 PR c++/91741
2633 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2634 (c_common_init_ts): Likewise.
2635 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2636 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2637 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2638 (maybe_warn_sizeof_array_div): New function.
2639 * c.opt (Wsizeof-array-div): New option.
2640
26412020-10-23 Martin Sebor <msebor@redhat.com>
2642
2643 PR c/97463
2644 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2645
56ddd5e2
GA
26462020-10-22 Martin Liska <mliska@suse.cz>
2647
2648 PR c/94722
2649 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2650 (handle_stack_protect_attribute): Add error message for a
2651 no_stack_protector function.
2652
26532020-10-22 Martin Liska <mliska@suse.cz>
2654
2655 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2656
26572020-10-22 Jan Hubicka <hubicka@ucw.cz>
2658
2659 * c-gimplify.c: Include tree-nested.h
2660 (c_genericize): Update for new nested function info.
2661
b2698c21
GA
26622020-10-14 Martin Sebor <msebor@redhat.com>
2663
2664 PR c/97413
2665 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2666 bounds in an extra list.
2667
7e9282ae
GA
26682020-10-05 Richard Biener <rguenther@suse.de>
2669 Jakub Jelinek <jakub@redhat.com>
2670
2671 PR c++/97197
2672 * c-pretty-print.c: Include langhooks.h.
2673 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2674 expression.
2675 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2676 unary_expression.
2677 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2678
660bfe61
GA
26792020-09-30 Martin Sebor <msebor@redhat.com>
2680
2681 PR middle-end/97189
2682 * c-attribs.c (append_access_attr): Use the function declaration
2683 location for a warning about an attribute access argument.
2684
93bca37c
GA
26852020-09-29 Marek Polacek <polacek@redhat.com>
2686
2687 PR c++/94695
2688 * c.opt (Wrange-loop-construct): New option.
2689
82b77dee
GA
26902020-09-23 Martin Sebor <msebor@redhat.com>
2691
2692 PR c/97131
2693 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2694
26952020-09-23 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/97125
2698 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2699 after loops and other structured control constructs have been lowered.
2700
521d2711
GA
27012020-09-22 Jakub Jelinek <jakub@redhat.com>
2702
2703 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2704 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2705
44135373
GA
27062020-09-21 Marek Polacek <polacek@redhat.com>
2707
2708 * c.opt (Wctad-maybe-unsupported): New option.
2709
2fe5b7d1
GA
27102020-09-19 Martin Sebor <msebor@redhat.com>
2711
2712 PR c/50584
2713 * c-common.h (warn_parm_array_mismatch): Declare new function.
2714 (has_attribute): Move declaration of an existing function.
2715 (build_attr_access_from_parms): Declare new function.
2716 * c-warn.c (parm_array_as_string): Define new function.
2717 (plus_one): Define new function.
2718 (warn_parm_ptrarray_mismatch): Define new function.
2719 (warn_parm_array_mismatch): Define new function.
2720 (vla_bound_parm_decl): New function.
2721 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2722 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2723 qualifiers here...
2724 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2725 them in brackets here. Also print [static]. Strip extraneous
2726 expressions from VLA bounds.
2727
27282020-09-19 Martin Sebor <msebor@redhat.com>
2729
2730 PR c/50584
2731 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2732 (handle_argspec_attribute): New function.
2733 (get_argument, get_argument_type): New functions.
2734 (append_access_attrs): Add overload. Handle internal attribute
2735 representation in addition to external.
2736 (handle_access_attribute): Handle internal attribute representation
2737 in addition to external.
2738 (build_attr_access_from_parms): New function.
2739
27402020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2741
2742 * c-gimplify.c (genericize_c_loop): Rewrite to match
2743 c_finish_loop in c-typeck.c.
2744
27452020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2746
2747 * c-common.c (c_block_may_fallthrough): New, split from
2748 cxx_block_may_fallthrough in the cp front end.
2749 (c_common_init_ts): Move handling of loop and switch-related
2750 statements here from the cp front end.
2751 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2752 cp front end.
2753 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2754 * c-common.h (c_block_may_fallthru): Declare.
2755 (bc_state_t): Move here from cp front end.
2756 (save_bc_state, restore_bc_state): Declare.
2757 (c_genericize_control_stmt): Declare.
2758 (WHILE_COND, WHILE_BODY): Likewise.
2759 (DO_COND, DO_BODY): Likewise.
2760 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2761 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2762 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2763 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2764 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2765 * c-dump.c (dump_stmt): Copy from cp front end.
2766 (c_dump_tree): Move code to handle structured loop and switch
2767 tree nodes here from cp front end.
2768 * c-gimplify.c: Adjust includes.
2769 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2770 cp front end.
2771 (save_bc_state, restore_bc_state): New functions using old code
2772 from cp front end.
2773 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2774 (genericize_c_loop): Move from cp front end.
2775 (genericize_for_stmt, genericize_while_stmt): Likewise.
2776 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2777 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2778 (genericize_omp_for_stmt): Likewise.
2779 (c_genericize_control_stmt): New function using code split from
2780 cp front end.
2781 (c_genericize_control_r): New.
2782 (c_genericize): Call walk_tree with c_genericize_control_r.
2783 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2784 structured loop and switch tree nodes here from cp front end.
2785
2aad20c0
GA
27862020-09-17 Patrick Palka <ppalka@redhat.com>
2787
2788 PR c/80076
2789 * c-indentation.c (should_warn_for_misleading_indentation): Move
2790 declarations of local variables closer to their first use.
2791 Handle virtual token locations by resolving them to their
2792 respective macro expansion points. If all three tokens are
2793 produced from the same macro expansion, then instead use their
2794 loci within the macro definition.
2795
ecde1b0a
GA
27962020-09-16 Martin Sebor <msebor@redhat.com>
2797
2798 PR c/78666
2799 PR c/96126
2800 * c-attribs.c (validate_attr_args): New function.
2801 (validate_attr_arg): Same.
2802 (handle_section_attribute): Call it. Introduce a local variable.
2803 (handle_alloc_size_attribute): Same.
2804 (handle_alloc_align_attribute): Same.
2805
50a71cd0
GA
28062020-09-14 Jakub Jelinek <jakub@redhat.com>
2807
2808 * c-attribs.c (handle_optimize_attribute): Adjust
2809 cl_optimization_save, cl_optimization_restore and
2810 build_optimization_node callers.
2811 * c-pragma.c (handle_pragma_optimize): Adjust
2812 build_optimization_node caller.
2813 (handle_pragma_push_options): Adjust
2814 build_optimization_node and build_target_option_node callers.
2815 (handle_pragma_pop_options, handle_pragma_reset_options):
2816 Adjust cl_optimization_restore callers.
2817
8f7ea26a
GA
28182020-08-28 Martin Sebor <msebor@redhat.com>
2819
2820 * c.opt (Wstringop-overread): New option.
2821
a6493809
GA
28222020-08-11 Jakub Jelinek <jakub@redhat.com>
2823
2824 PR c/96545
2825 * c-common.c (get_atomic_generic_size): Require that first argument's
2826 type points to a complete type and use tree_fits_uhwi_p instead of
2827 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2828
48cc2e46
GA
28292020-07-31 Martin Sebor <msebor@redhat.com>
2830
2831 PR c++/96003
2832 * c-common.c (check_function_arguments_recurse): Return early when
2833 no-warning bit is set.
2834
28352020-07-31 Richard Biener <rguenther@suse.de>
2836
2837 PR debug/96383
2838 * c-common.h (c_common_finalize_early_debug): Declare.
2839 * c-common.c: Include debug.h.
2840 (c_common_finalize_early_debug): finalize_early_debug langhook
2841 implementation generating debug for extern declarations.
2842
e71dab87
GA
28432020-07-27 Nathan Sidwell <nathan@acm.org>
2844
2845 * c-common.c (try_to_locate_new_include_insertion_point): Use
2846 strcmp, not pointer equality.
2847
ae2e0bc1
GA
28482020-07-25 Martin Sebor <msebor@redhat.com>
2849
2850 PR c++/96310
2851 * c-common.c (check_nonnull_arg): Print note only when warning was
2852 issued.
2853
3ea9abca
GA
28542020-07-22 Tobias Burnus <tobias@codesourcery.com>
2855
2856 * c-omp.c (c_finish_omp_critical): Check for no name but
2857 nonzero hint provided.
2858
0933f508
GA
28592020-07-20 Jason Merrill <jason@redhat.com>
2860
2861 * c-cppbuiltin.c (c_cpp_builtins): Update
2862 __cpp_nontype_template_args for C++20.
2863
28642020-07-20 Martin Sebor <msebor@redhat.com>
2865
2866 PR c/96249
2867 * c.opt: Remove stray text.
2868
8ca07a30
GA
28692020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2870
2871 PR other/86904
2872 * c-indentation.c (should_warn_for_misleading_indentation): Get
2873 global tabstop from the new source.
2874 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2875 is now a common option.
2876 * c.opt: Likewise.
2877
a82c4c4c 28782020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2879
2880 * c.opt (Wscalar-storage-order): Add explicit variable.
2881
f60ee68d
GA
28822020-07-07 Nathan Sidwell <nathan@acm.org>
2883
2884 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2885 cpp_read_main_file.
2886 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2887 maps. Force token position to line_table's highest line.
2888 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2889 (cb_define): Always increment source line.
2890
4077d74c
GA
28912020-07-06 Martin Sebor <msebor@redhat.com>
2892
2893 PR c++/95984
2894 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2895 to stub lambda objects with null this pointer.
2896 (check_nonnull_arg): Handle C++ nullptr.
2897
b5f24739
GA
28982020-07-02 Jason Merrill <jason@redhat.com>
2899 Jakub Jelinek <jakub@redhat.com>
2900
2901 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2902
46fbb6c6
GA
29032020-06-30 Jakub Jelinek <jakub@redhat.com>
2904
2905 PR c++/95963
2906 * c-common.c (check_function_arguments_recurse): Don't crash on
2907 calls to internal functions.
2908
69273534
GA
29092020-06-28 Martin Sebor <msebor@redhat.com>
2910
2911 PR c++/86568
2912 * c-common.c (struct nonnull_arg_ctx): Add members.
2913 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2914 C++ member functions specially. Consider the this pointer implicitly
2915 nonnull.
2916 (check_nonnull_arg): Use location of argument when available.
2917 (check_function_arguments): Use nonnull_arg_ctx as argument.
2918
9a33c41f
GA
29192020-06-27 Jakub Jelinek <jakub@redhat.com>
2920
2921 PR middle-end/95903
2922 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2923 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2924 smaller precision intop operands separately.
2925
c9c05f73
GA
29262020-06-26 Marek Polacek <polacek@redhat.com>
2927
2928 * c-opts.c (c_common_init_options): Default to gnu++17.
2929
aff95ee7
GA
29302020-06-17 Jonathan Wakely <jwakely@redhat.com>
2931
bd0a89dc 2932 PR c/95378
aff95ee7
GA
2933 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2934 pointer arguments.
2935
56638b9b
GA
29362020-06-16 Jakub Jelinek <jakub@redhat.com>
2937
2938 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2939 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2940 idx members.
2941 (c_omp_is_loop_iterator): New function.
2942 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2943 if outer loop iterator is present. Perform duplicate checking through
2944 hash_set in the function rather than expecting caller to do that.
2945 Pass NULL instead of d->ppset to walk_tree_1.
2946 (c_omp_check_nonrect_loop_iv): New function.
2947 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2948 non-rectangular loop forms, diagnose multiple associated loops with
2949 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2950 (c_omp_check_loop_iv_exprs): Likewise.
2951
ec6ffbb9
GA
29522020-06-10 Martin Liska <mliska@suse.cz>
2953
2954 PR tree-optimization/92860
2955 * c-attribs.c (handle_optimize_attribute):
2956 Save global options and compare it after parsing of function
2957 attribute.
2958 * c-pragma.c (opt_stack::saved_global_options): New field.
2959 (handle_pragma_push_options): Save global_options.
2960 (handle_pragma_pop_options): Compare them after pop.
2961
b952c2cf
GA
29622020-06-09 Jakub Jelinek <jakub@redhat.com>
2963
2964 PR c/95580
2965 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2966 case when MEM_REF's first argument has type pointer to incomplete type.
2967
1a59f3db
GA
29682020-06-05 Jason Merrill <jason@redhat.com>
2969
2970 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2971 operand to POINTER_PLUS_EXPR.
2972
3add3425
GA
29732020-06-04 Martin Sebor <msebor@redhat.com>
2974
2975 PR middle-end/10138
2976 PR middle-end/95136
2977 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2978 (handle_access_attribute): Same.
2979
9a5b7438
GA
29802020-06-03 Mark Wielaard <mark@klomp.org>
2981
2982 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2983 New function.
2984 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2985 New function declaration.
2986
29872020-06-03 Mark Wielaard <mark@klomp.org>
2988
2989 * known-headers.cc (get_string_macro_hint): New function.
2990 (get_stdlib_header_for_name): Use get_string_macro_hint.
2991 (get_c_stdlib_header_for_string_macro_name): New function.
2992 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2993 New function declaration.
2994
29952020-06-03 Tobias Burnus <tobias@codesourcery.com>
2996
2997 * c-common.h (c_omp_predetermined_mapping): Declare.
2998 * c-omp.c (c_omp_predetermined_mapping): New.
2999
af114c38
MW
30002020-05-22 Mark Wielaard <mark@klomp.org>
3001
3002 * known-headers.cc (get_stdlib_header_for_name): Add a new
3003 stdlib_hint array for stdbool and stdint.
3004
45c50b6a
MW
30052020-05-22 Mark Wielaard <mark@klomp.org>
3006
3007 * known-headers.cc (get_stdlib_header_for_name): Return
3008 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3009 flag_isoc99.
3010
c22027a0
NS
30112020-05-20 Nathan Sidwell <nathan@acm.org>
3012
38a4db21
NS
3013 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3014
c22027a0
NS
3015 * c-common.c (try_to_locate_new_include_insertion_point): Use
3016 strcmp to compare filenames.
3017 * c-lex.c (init_c_lex): Move declaration to initialization.
3018 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3019 deferred count loop.
3020
29f0e90d
JM
30212020-05-15 Jason Merrill <jason@redhat.com>
3022
3023 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3024
b04445d4
JM
30252020-05-13 Jason Merrill <jason@redhat.com>
3026
3027 * c.opt (std=c++20): Make c++2a the alias.
3028 (std=gnu++20): Likewise.
3029 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3030 * c-opts.c: Adjust.
3031 * c-cppbuiltin.c: Adjust.
3032 * c-ubsan.c: Adjust.
3033 * c-warn.c: Adjust.
3034
11dd3be5
EB
30352020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3036
3037 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3038
b224c376
NS
30392020-05-08 Nathan Sidwell <nathan@acm.org>
3040
3041 Reimplement directives only processing.
3042 * c-ppoutput.c (token_streamer): Ne.
3043 (directives_only_cb): New. Swallow ...
3044 (print_lines_directives_only): ... this.
3045 (scan_translation_unit_directives_only): Reimplment using the
3046 published interface.
3047
f1d94677
MP
30482020-05-07 Marek Polacek <polacek@redhat.com>
3049
3050 * c-format.c (badwords): Add "nonstatic".
3051
9b95bb52
JJ
3052202-05-07 Jakub Jelinek <jakub@redhat.com>
3053
3054 PR c/94968
3055 * c-common.c (speculation_safe_value_resolve_params): Return false if
3056 error_operand_p (val2).
3057 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3058 Remove extraneous semicolon.
3059
530b4409 30602020-05-06 qing zhao <qing.zhao@oracle.com>
3061
3062 PR c/94230
3063 * c-indentation.c (get_visual_column): Add a hint to use the new
3064 -flarge-source-files option.
3065
b776bdca
SSF
30662020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3067
3068 * c-attribs.c (handle_vector_size_attribute): Add attribute
3069 nonnull for argument args in order to silence warning of
3070 uninitialized variable usage. Since this is local to the
3071 compilation unit and thus cannot be checked at call sides by the
3072 compiler, added an assert statement in order to verify this.
3073
6607bdd9
L
30742020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3075
3076 PR target/93492
3077 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3078 value to USHRT_MAX (65535).
3079
691eeb65
JJ
30802020-04-29 Jakub Jelinek <jakub@redhat.com>
3081
3082 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3083
26d76be7
JJ
30842020-04-27 Jakub Jelinek <jakub@redhat.com>
3085
3086 PR c/94755
3087 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3088 fncode == BUILT_IN_NONE before initialization of first_param.
3089
7291b2ed
MP
30902020-04-23 Marek Polacek <polacek@redhat.com>
3091
3092 PR c++/94733
3093 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3094 TREE_PURPOSE.
3095
58a29af8
PP
30962020-04-14 Patrick Palka <ppalka@redhat.com>
3097
3098 PR c++/85278
3099 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3100 ampersand if it's an rvalue reference type.
3101
09f04139
MS
31022020-04-13 Martin Sebor <msebor@redhat.com>
3103
3104 PR c/92326
3105 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3106 printing array bound for flexible array members.
3107
ee26baf4
IS
31082020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3109
3110 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3111 define, per n4861.
3112
75efe9cb
RB
31132020-04-02 Richard Biener <rguenther@suse.de>
3114
3115 PR c/94392
3116 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3117 for -O2 and C++11 or newer.
3118
75defde9
PP
31192020-03-28 Patrick Palka <ppalka@redhat.com>
3120
3121 * c.opt: Add -fconcepts-diagnostics-depth.
3122
52f24a9e
MS
31232020-03-27 Martin Sebor <msebor@redhat.com>
3124
3125 PR c++/94346
3126 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3127 to decl_attributes. Make handling of different kinds of entities
3128 more robust.
3129
ccacf77b
MS
31302020-03-27 Martin Sebor <msebor@redhat.com>
3131
3132 PR c++/94098
3133 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3134 here.
3135
ca6c7225
JJ
31362020-03-23 Jakub Jelinek <jakub@redhat.com>
3137
3138 PR c++/91993
3139 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3140 result being COMPOUND_EXPRs, skip to ultimate rhs.
3141
1aa22b19
RS
31422020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3143
3144 PR middle-end/94072
3145 * c-common.c (c_common_type_for_mode): Before using a registered
3146 built-in type, check that the vectorness of the type matches
3147 the vectorness of the mode.
3148
700d4cb0
JJ
31492020-03-17 Jakub Jelinek <jakub@redhat.com>
3150
3151 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3152 issue in a diagnostic message.
3153
b408e010
LH
31542020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3155
3156 * c.opt: Avoid redundancy in the help text.
3157
e78e50d5
MP
31582020-03-02 Marek Polacek <polacek@redhat.com>
3159
3160 PR c++/93958 - add missing -std=gnu++20.
3161 * c.opt: Add -std=gnu++20.
3162
649e1741
MS
31632020-03-01 Martin Sebor <msebor@redhat.com>
3164
3165 PR c++/92721
3166 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3167 (handle_access_attribute): Same.
3168
7b60f3ba
JJ
31692020-02-25 Jakub Jelinek <jakub@redhat.com>
3170
3171 PR c/93858
3172 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3173 "did you mean" hint in diagnostics.
3174
fb260504
JM
31752020-02-15 Jason Merrill <jason@redhat.com>
3176
3177 * c.opt: Add -std=c++20.
3178
1d757b09
EB
31792020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3180
3181 * c-ada-spec.c: Include bitmap.h.
3182 (dump_ada_double_name): Rename into...
3183 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3184 (dump_ada_array_type): Adjust to above renaming. Robustify.
3185 (dump_nested_types_1): New function copied from... Add dumped_types
3186 parameter and pass it down to dump_nested_type.
3187 (dump_nested_types): ...this. Remove parent parameter. Just call
3188 dump_nested_types_1 on an automatic bitmap.
3189 (dump_nested_type): Add dumped_types parameter.
3190 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3191 Adjust recursive calls and adjust to above renaming.
3192 (dump_ada_declaration): Adjust call to dump_nested_types.
3193 Tidy up and adjust to above renaming.
3194 (dump_ada_specs): Initialize and release bitmap obstack.
3195
0cc575e4
MS
31962020-02-10 Martin Sebor <msebor@redhat.com>
3197
3198 PR c/93640
3199 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3200
a59aa302
JJ
32012020-02-10 Jakub Jelinek <jakub@redhat.com>
3202
3203 PR other/93641
3204 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3205 Remove useless extra test.
3206
e464fc90
TB
32072020-02-03 Julian Brown <julian@codesourcery.com>
3208 Tobias Burnus <tobias@codesourcery.com>
3209
3210 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3211
e3b6c052
JM
32122020-01-29 Jason Merrill <jason@redhat.com>
3213
3214 PR c++/89357
3215 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3216
6d00f052
JM
32172020-01-23 Jason Merrill <jason@redhat.com>
3218
3219 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3220
8a990ffa
MS
32212020-01-23 Martin Sebor <msebor@redhat.com>
3222
3223 PR c/84919
3224 * c-common.c (check_function_arguments): Avoid overlap checking
3225 of sprintf functions.
3226
55b7df8b
JM
32272020-01-22 Jason Merrill <jason@redhat.com>
3228
3229 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3230 PR c++/40752
3231 * c-warn.c (conversion_warning): Check operands only after checking
3232 the whole expression. Don't check second operand of + for sign.
3233
c77074d0
JM
32342020-01-21 Jason Merrill <jason@redhat.com>
3235 Manuel López-Ibáñez <manu@gcc.gnu.org>
3236
3237 PR c++/40752 - useless -Wconversion with short +=.
3238 * c.opt (-Warith-conversion): New.
3239 * c-warn.c (conversion_warning): Recurse for operands of
3240 operators. Only warn about the whole expression with
3241 -Warith-conversion.
3242
731dbfc3
JM
32432020-01-21 Jason Merrill <jason@redhat.com>
3244
3245 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3246 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3247
ad1a3914
NS
32482020-01-20 Nathan Sidwell <nathan@acm.org>
3249
3250 PR preprocessor/80005
3251 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3252
49789fd0
IS
32532020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3254
3255 * c-common.c (co_await, co_yield, co_return): New.
3256 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3257 RID_CO_RETURN): New enumeration values.
3258 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3259 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3260 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3261 * c.opt (fcoroutines): New command-line switch.
3262
4bc1899b
DM
32632020-01-10 David Malcolm <dmalcolm@redhat.com>
3264
3265 * c-format.c (local_event_ptr_node): New.
3266 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3267 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3268 * c-format.h (T_EVENT_PTR): New define.
3269
f25e33fa
MS
32702020-01-10 Martin Sebor <msebor@redhat.com>
3271
3272 PR c/93132
3273 * c-attribs.c (append_access_attrs): Validate against the translated
3274 access string rather than the human-readable representation.
3275
8d9254fc
JJ
32762020-01-01 Jakub Jelinek <jakub@redhat.com>
3277
3278 Update copyright years.
3279
39292e25
EB
32802019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3281
3282 * c-ada-spec.h (decl_sloc): Delete.
3283 * c-ada-spec.c (decl_sloc): Make static.
3284
519d7496
JB
32852019-12-19 Julian Brown <julian@codesourcery.com>
3286
3287 * c-common.h (c_omp_map_clause_name): Add prototype.
3288 * c-omp.c (c_omp_map_clause_name): New function.
3289 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3290 PRAGMA_OACC_CLAUSE_DETACH.
3291
a6163563
JB
32922019-12-19 Julian Brown <julian@codesourcery.com>
3293 Maciej W. Rozycki <macro@codesourcery.com>
3294 Tobias Burnus <tobias@codesourcery.com>
3295 Thomas Schwinge <thomas@codesourcery.com>
3296
3297 * c-pragma.h (pragma_omp_clause): Add
3298 PRAGMA_OACC_CLAUSE_NO_CREATE.
3299
e8f1ade2
MS
33002019-12-17 Martin Sebor <msebor@redhat.com>
3301
3302 PR c++/61339
3303 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3304
368877a1
DM
33052019-12-11 David Malcolm <dmalcolm@redhat.com>
3306
3307 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3308 implementation.
3309 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3310
d68f5d45
DM
33112019-12-09 David Malcolm <dmalcolm@redhat.com>
3312
3313 * c-format.c (range_label_for_format_type_mismatch::get_text):
3314 Replace label_text ctor called with true with label_text::take.
3315
d3e28653
DM
33162019-12-09 David Malcolm <dmalcolm@redhat.com>
3317
3318 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3319 initial newline from expected outputs.
3320 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3321 call to diagnostic_show_locus.
3322
abd6d8cc
JJ
33232019-12-06 Jakub Jelinek <jakub@redhat.com>
3324
3325 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3326 now.
3327
7906797e
MP
33282019-12-05 Marek Polacek <polacek@redhat.com>
3329 Jakub Jelinek <jakub@redhat.com>
3330
3331 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3332 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3333
5c04da88
MP
33342019-12-05 Marek Polacek <polacek@redhat.com>
3335
3336 PR c++/92271 - make __is_same alias for __is_same_as.
3337 * c-common.c: Add __is_same, an alias for __is_same_as.
3338
43aae289
MP
33392019-12-03 Marek Polacek <polacek@redhat.com>
3340
3341 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3342 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3343 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3344
d7ddfbcb
JH
33452019-11-30 Jan Hubicka <hubicka@ucw.cz>
3346
3347 * c-attribs.c (handle_symver_attribute): New function
3348 (c_common_attributes): Add symver.
3349
65ef05d0
RS
33502019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3351
3352 * c-common.c (pointer_int_sum): Use verify_type_context to check
3353 whether the target allows pointer arithmetic for the types involved.
3354 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3355 to check whether the target allows sizeof and alignof operations
3356 for the types involved.
3357
1a291106
JM
33582019-11-27 Jason Merrill <jason@redhat.com>
3359
3360 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3361
05d6cb1a
JJ
33622019-11-26 Jakub Jelinek <jakub@redhat.com>
3363
3364 PR c++/61414
3365 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3366 ENUMERAL_TYPEs.
3367
5b8d9367
JM
33682019-11-25 Joseph Myers <joseph@codesourcery.com>
3369
3370 PR c/91985
3371 * c-common.c (c_common_type_for_mode): Handle decimal
3372 floating-point types being NULL_TREE.
3373 * c-format.c (get_format_for_type_1): Handle specified types being
3374 NULL_TREE.
3375 * c-lex.c (interpret_float): Give an error for decimal
3376 floating-point constants when decimal floating-point not
3377 supported.
3378
1fbf51cb
JJ
33792019-11-23 Jakub Jelinek <jakub@redhat.com>
3380
3381 PR middle-end/83859
3382 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3383 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3384 group warning with inform together.
3385 (handle_access_attribute): Formatting fix.
3386
761df906
JJ
33872019-11-22 Jakub Jelinek <jakub@redhat.com>
3388
bdaf8be1
JJ
3389 PR c/90677
3390 * c-common.h (identifier_global_tag): Declare.
3391 * c-format.c (get_pointer_to_named_type): Renamed to ...
3392 (get_named_type): ... this. Use identifier_global_tag instead of
3393 identifier_global_value, handle the return value being a TYPE_P.
3394 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3395 to call get_named_type instead. Formatting fixes.
3396
c2ecce6d 3397 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3398 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3399 and __cpp_generic_lambdas for -std=c++2a. Define
3400 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3401 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3402 __cpp_concepts for -std=c++2a.
3403
54aa6b58
MS
34042019-11-22 Martin Sebor <msebor@redhat.com>
3405
3406 PR middle-end/83859
3407 * c-attribs.c (handle_access_attribute): New function.
3408 (c_common_attribute_table): Add new attribute.
3409 (get_argument_type): New function.
3410 (append_access_attrs): New function.
3411 (get_nonnull_operand): Rename...
3412 (get_attribute_operand): ...to this.
3413 * c-common.c (get_nonnull_operand): Rename...
3414 (get_attribute_operand): ...to this.
3415
6c80b1b5
JM
34162019-11-21 Joseph Myers <joseph@codesourcery.com>
3417
3418 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3419 of warning.
3420
192961ff
JM
34212019-11-19 Joseph Myers <joseph@codesourcery.com>
3422
3423 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3424 warning for standard attributes mixed with fallthrough attributes.
3425
f8aea5e3
JM
34262019-11-15 Joseph Myers <joseph@codesourcery.com>
3427
3428 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3429 * c-common.h (handle_fallthrough_attribute): Declare.
3430
2cc94aa8
JM
34312019-11-15 Joseph Myers <joseph@codesourcery.com>
3432
3433 * c-attribs.c (handle_deprecated_attribute): Remove static.
3434 * c-common.h (handle_deprecated_attribute): Declare.
3435
7c5890cc
JM
34362019-11-14 Joseph Myers <joseph@codesourcery.com>
3437
3438 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3439 char for C.
3440
b2417b59
JJ
34412019-11-14 Jakub Jelinek <jakub@redhat.com>
3442
d0ec7c93
JJ
3443 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3444 valid vendors.
3445
b2417b59
JJ
3446 * c-omp.c (c_omp_check_context_selector): Handle name lists
3447 containing string literals. Don't diagnose atomic_default_mem_order
3448 with multiple props.
3449
00be2a5f
JM
34502019-11-13 Joseph Myers <joseph@codesourcery.com>
3451
3452 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3453 NORM_MAX constants. Update call to get_max_float.
3454 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3455 constants.
3456
2dbad62d
EB
34572019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3458
3459 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3460 (dump_forward_type): Do not generate a declaration for function types.
3461 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3462 of the component type if it is declared in another file.
3463
6ed76044
ML
34642019-11-12 Martin Liska <mliska@suse.cz>
3465
3466 * c-opts.c (c_common_post_options):
3467 Use SET_OPTION_IF_UNSET.
3468
62aee289
MR
34692019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3470 Frederik Harwath <frederik@codesourcery.com>
3471
3472 gcc/c-family/
3473 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3474 constant.
3475 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3476
f486280c
RS
34772019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3478
3479 * c-common.h (gnu_vector_type_p): New function.
3480 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3481 vectors to satisfy gnu_vector_type_p.
3482 (c_build_vec_convert): Likewise __builtin_convertvector.
3483 (convert_vector_to_array_for_subscript): Likewise when applying
3484 implicit vector to array conversion.
3485 (scalar_to_vector): Likewise when converting vector-scalar
3486 operations to vector-vector operations.
3487
017c6491
JM
34882019-11-08 Joseph Myers <joseph@codesourcery.com>
3489
3490 * c.opt (Wold-style-definition): Initialize to -1.
3491 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3492 to flag_isoc2x if not set explicitly.
3493
c01bd174
JM
34942019-11-07 Joseph Myers <joseph@codesourcery.com>
3495
3496 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3497
0df65305
JM
34982019-11-05 Jason Merrill <jason@redhat.com>
3499
3500 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3501 -fconcepts.
3502
e0c866dd
KK
35032019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3504
3505 * c-opts.c (c_common_post_options): Update
3506 latest_abi_version.
3507
f968ef9b
JJ
35082019-11-02 Jakub Jelinek <jakub@redhat.com>
3509
d0c464d2
JJ
3510 * c-common.h (c_omp_get_context_selector): Remove.
3511 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3512 and renamed to omp_get_context_selector.
3513
917dd789
JJ
3514 * c-omp.c (c_omp_mark_declare_variant): Use
3515 omp_context_selector_set_compare.
3516
f968ef9b
JJ
3517 PR c++/88335 - Implement P1073R3: Immediate functions
3518 * c-common.h (enum rid): Add RID_CONSTEVAL.
3519 * c-common.c (c_common_reswords): Add consteval.
3520
5f6705b7
JJ
35212019-11-01 Martin Sebor <msebor@redhat.com>
3522
3523 PR middle-end/91679
3524 PR middle-end/91647
3525 PR middle-end/91463
3526 PR middle-end/92312
3527 * c-pretty-print.c (direct_abstract_declarator): Print
3528 bound in zero-length arrays.
3529 * c.opt (-Wzero-length-bounds): New option.
3530
43f1814c
NS
35312019-10-30 Nathan Sidwell <nathan@acm.org>
3532
3533 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3534 macros.
3535
ad1539d5
MS
35362019-10-28 Martin Sebor <msebor@redhat.com>
3537
3538 PR c/66970
3539 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3540 even when only preprocessing.
3541 * c-common.h (names_builtin_p): Declare new function.
3542 * c-lex.c (init_c_lex): Set has_builtin.
3543 (c_common_has_builtin): Define a new function.
3544 * c-ppoutput.c (init_pp_output): Set has_builtin.
3545
135df52c
JJ
35462019-10-24 Jakub Jelinek <jakub@redhat.com>
3547
3548 * c-common.h (c_omp_context_selector_matches): Remove.
3549 * c-omp.c (c_omp_context_selector_matches): Remove.
3550 * c-attribs.c (c_common_attribute_table): Add
3551 "omp declare target {host,nohost,block}" attributes.
3552
8ad0c477
JM
35532019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3554
3555 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3556
56898e43
RS
35572019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3558
3559 * c-common.h (user_facing_original_type_p): Declare.
3560 * c-common.c: Include c-spellcheck.h.
3561 (user_facing_original_type_p): New function.
3562
20de9568
JJ
35632019-10-12 Jakub Jelinek <jakub@redhat.com>
3564
3565 * c-common.h (c_omp_mark_declare_variant,
3566 c_omp_context_selector_matches): Declare.
3567 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3568 and hsa-common.h.
3569 (c_omp_get_context_selector): Support second argument NULL.
3570 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3571 functions.
3572 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3573 attribute, add "omp declare variant base" and
3574 "omp declare variant variant" attributes.
3575
175a85b2
JM
35762019-10-11 Joseph Myers <joseph@codesourcery.com>
3577
3578 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3579 CppReason(CPP_W_C11_C2X_COMPAT).
3580
fe2bc27c
JM
35812019-10-11 Joseph Myers <joseph@codesourcery.com>
3582
3583 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3584 _Decimal64 and _Decimal128.
3585
27dfdc0f
JM
35862019-10-10 Joseph Myers <joseph@codesourcery.com>
3587
3588 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3589 types if DFP not supported.
3590
94e7f906
JJ
35912019-10-10 Jakub Jelinek <jakub@redhat.com>
3592
3593 * c-common.h (c_omp_check_context_selector,
3594 c_omp_get_context_selector): Declare.
3595 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3596 in diagnostic message.
3597 (c_omp_check_context_selector, c_omp_get_context_selector): New
3598 functions.
3599 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3600 attribute.
3601 (handle_omp_declare_variant_attribute): New function.
3602
a7160771
MS
36032019-10-09 Martin Sebor <msebor@redhat.com>
3604
3605 PR tree-optimization/90879
3606 * c.opt (-Wstring-compare): New option.
3607
cb57504a
JM
36082019-10-08 Andrew Sutton <asutton@lock3software.com>
3609 Jason Merrill <jason@redhat.com>
3610
3611 Update the concepts implementation to conform to the C++20
3612 specification, improve compile times, and generally clean up
3613 the implementation.
3614
3615 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3616 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3617 * c.opt: Add -Wconcepts-ts.
3618 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3619 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3620 (set_std_cxx2a): Enable concepts by default.
3621
fbb2a6dc
JM
36222019-10-08 Joseph Myers <joseph@codesourcery.com>
3623
3624 * c-opts.c (c_common_post_options): Set
3625 -fno-fp-int-builtin-inexact for C2X.
3626
8e007055
JJ
36272019-10-05 Jakub Jelinek <jakub@redhat.com>
3628
3629 PR c++/91369 - Implement P0784R7: constexpr new
3630 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3631 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3632
843f104d
JM
36332019-10-04 Joseph Myers <joseph@codesourcery.com>
3634
3635 PR c/82752
3636 * c-format.c (C_STD_VER): Handle C2x.
3637 (C_STD_NAME): Likewise.
3638 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3639 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3640 modifier allowed and 'p' flag.
3641 * c-format.h (enum format_std_version): Add STD_C2X.
3642 (struct format_char_info): Mention 'p' in comment on flags2.
3643
e9c9a142
DM
36442019-10-01 David Malcolm <dmalcolm@redhat.com>
3645
3646 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3647 calling diagnostic_show_locus, rather than destroying it afterwards.
3648
7552c36a
JJ
36492019-10-01 Jakub Jelinek <jakub@redhat.com>
3650
3651 PR c++/91925
3652 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3653 with NULL DECL_FIELD_OFFSET.
3654
8209db25
RS
36552019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3656
3657 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3658 has a type name, use it in preference to the __vector syntax.
3659
9343bf99
RS
36602019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3661
3662 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3663 two spaces between a comma and "...".
3664
59bc434a
JJ
36652019-09-27 Jakub Jelinek <jakub@redhat.com>
3666
3667 PR c++/88203
3668 * c-common.h (c_omp_predefined_variable): Declare.
3669 * c-omp.c (c_omp_predefined_variable): New function.
3670 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3671 for predefined variables.
3672
c6447c20
RS
36732019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3674
3675 * c-common.h (build_function_call_vec): Take the original
3676 function decl as an optional final parameter.
3677 (check_builtin_function_arguments): Take the original function decl.
3678 * c-common.c (check_builtin_function_arguments): Likewise.
3679 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3680 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3681
c4438114
JM
36822019-09-15 Jason Merrill <jason@redhat.com>
3683
3684 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3685 fold_for_warn in "|| mask" warning.
3686
68a57628
ML
36872019-09-10 Martin Liska <mliska@suse.cz>
3688
3689 * c.opt: Use newly added WarnRemoved.
3690
f48ef52e
ML
36912019-09-09 Martin Liska <mliska@suse.cz>
3692
3693 * c.opt: Update comment of removed
3694 options that are preserved only for backward
3695 compatibility.
3696
67f6e649
ML
36972019-09-06 Martin Liska <mliska@suse.cz>
3698
3699 PR c++/91125
3700 * c-common.c: Remove definition of flag_use_repository.
3701 * c-common.h: Likewise.
3702 * c-opts.c (c_common_handle_option):
3703 Do not handle OPT_frepo option.
3704 * c.opt: Mark the option with Deprecated.
3705
db9d2274
MP
37062019-09-04 Marek Polacek <polacek@redhat.com>
3707
3708 * c.opt (fdeduce-init-list): Ignored.
3709
68e2c199
PK
37102019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3711
3712 PR c/78736
3713 * c.opt (Wenum-conversion): New option.
3714
7a4418a5
JL
37152019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3716
3717 * c-attribs.c (handle_section_attribute): Call the
3718 handle_generic_attribute target hook after performing target
3719 independent processing.
3720 (handle_noinit_attribute): Likewise.
3721
5f76ab15
ILT
37222019-09-03 Ian Lance Taylor <iant@golang.org>
3723
3724 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3725 when using -fgo-dump-spec.
3726
ae0d3f6a
ML
37272019-09-02 Martin Liska <mliska@suse.cz>
3728
3729 PR c++/91155
3730 * c-common.c (fname_as_string): Use cxx_printable_name for
3731 __PRETTY_FUNCTION__ same as was used before r265711.
3732
8a902edb
MP
37332019-08-28 Marek Polacek <polacek@redhat.com>
3734
3735 Implement P1152R4: Deprecating some uses of volatile.
3736 PR c++/91361
3737 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3738 default for C++2a, unless -Wno-deprecated.
3739 * c.opt (Wvolatile): New warning.
3740
4742dbe7
MP
37412019-08-28 Marek Polacek <polacek@redhat.com>
3742
3743 PR c++/91360 - Implement C++20 P1143R2: constinit.
3744 * c-common.c (c_common_reswords): Add constinit and __constinit.
3745 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3746 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3747 RID_LAST_CXX20.
3748 (D_CXX20): Define.
3749 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3750 * c-format.c (cxx_keywords): Add "constinit".
3751 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3752
6a074892
JJ
37532019-08-27 Jakub Jelinek <jakub@redhat.com>
3754
3755 PR c++/91415
3756 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3757 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3758 like COMPOUND_EXPR rather than normal expression.
3759
22f8849d
IS
37602019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3761
3762 PR pch/61250
3763 * c-lex.c (c_lex_with_flags): Don't call
3764 c_common_no_more_pch () from here.
3765
df375b03
JJ
37662019-08-23 Jakub Jelinek <jakub@redhat.com>
3767
3768 PR middle-end/91283
3769 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3770 instead of flag_excess_precision_cmdline.
3771 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3772 * c-opts.c (c_common_post_options): Likewise.
3773
14b7950f
MS
37742019-08-22 Martin Sebor <msebor@redhat.com>
3775
3776 PR middle-end/91490
3777 * c-common.c (braced_list_to_string): Add argument and overload.
3778 Handle flexible length arrays and unions.
3779
8bb2ee59
EB
37802019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3781
3782 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3783 function declarations where arguments are missing. Rename variables.
3784
21c1e205
RB
37852019-08-15 Richard Biener <rguenther@suse.de>
3786
3787 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3788 enabled, define __SIZETYPE__.
3789
f0033821
CL
37902019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3791
3792 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3793 exclusion with "section" attribute.
3794 (attr_noinit_exclusions): New table.
3795 (handle_noinit_attribute): New function.
3796
4d732405
RS
37972019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3798
3799 PR middle-end/91421
3800 * c-common.c (resolve_overloaded_builtin): Use
3801 copy_decl_built_in_function.
3802
51ad8481
MS
38032019-08-13 Martin Sebor <msebor@redhat.com>
3804
3805 PR c/80619
3806 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3807 (asm_fprintf_length_spec): Same.
3808 * c-format.h (format_lengths): Add FMT_LEN_w.
3809
77eb117f
JJ
38102019-08-10 Jakub Jelinek <jakub@redhat.com>
3811
3812 * c-pragma.h (enum pragma_omp_clause): Add
3813 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3814
398e3feb
JJ
38152019-08-07 Jakub Jelinek <jakub@redhat.com>
3816
3817 * c-pragma.h (enum pragma_omp_clause): Add
3818 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3819 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3820 enumeration value.
3821
ab574db6
MP
38222019-08-05 Marek Polacek <polacek@redhat.com>
3823
3824 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3825 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3826 default for C++2a, unless -Wno-deprecated.
3827 * c.opt (Wcomma-subscript): New warning.
3828
554a530f
JJ
38292019-07-20 Jakub Jelinek <jakub@redhat.com>
3830
3831 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3832 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3833 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3834 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3835 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3836 constructs with the loop construct.
3837
1a888209
JJ
38382019-07-13 Jakub Jelinek <jakub@redhat.com>
3839
3840 PR c/91149
3841 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3842 OMP_CLAUSE_REDUCTION_TASK handling.
3843
1fdd6f04
JJ
38442019-07-12 Jakub Jelinek <jakub@redhat.com>
3845
3846 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3847 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3848
99b1c316
MS
38492019-07-09 Martin Sebor <msebor@redhat.com>
3850
3851 PR c++/61339
1fdd6f04 3852 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3853 and others to class.
3854 * c-pretty-print.h: Same.
3855
6c1dae73
MS
38562019-07-09 Martin Sebor <msebor@redhat.com>
3857
3858 PR c++/61339
3859 * c-format.c (check_argument_type): Change class-key from class to
3860 struct and vice versa to match convention and avoid -Wclass-is-pod
3861 and -Wstruct-no-pod.
3862 * c-pretty-print.h: Same.
3863
8ba6ea87
ML
38642019-07-03 Martin Liska <mliska@suse.cz>
3865
3866 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3867 dead assignemts.
3868
83eb9522
JJ
38692019-07-03 Jakub Jelinek <jakub@redhat.com>
3870
3871 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3872 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3873 with OMP_PARALLEL.
3874
1c6ffbab
QZ
38752019-07-02 qing zhao <qing.zhao@oracle.com>
3876
3877 PR preprocessor/90581
3878 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3879 * c.opt: Add new option -fmax-include-depth.
3880
7ffc7de5
JM
38812019-06-26 Jason Merrill <jason@redhat.com>
3882
3883 PR c++/55442 - memory-hog with highly recursive constexpr.
3884 * c.opt (fconstexpr-loop-limit): New.
3885
361af3e4
JJ
38862019-06-25 Jakub Jelinek <jakub@redhat.com>
3887
3888 PR sanitizer/90954
3889 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3890 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3891
ab20d992
JJ
38922019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3893
3894 * c-common.c (c_common_nodes_and_builtins): Define
3895 alternate "__intN__" name for "__intN" types.
3896
f4af4019
JH
38972019-06-24 Jan Hubicka <jh@suse.cz>
3898
3899 * c-common.c (braced_lists_to_strings): Check that
3900 type is array or integer prior checking string flag.
3901
da9e9b57
MB
39022019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3903
3904 PR c++/90875 - added -Wswitch-outside-range option
3905 * c.opt (Wswitch-outside-range): Added new option.
3906 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3907
3f3d6a6f
MP
39082019-06-21 Marek Polacek <polacek@redhat.com>
3909
3910 PR c++/90953 - ICE with -Wmissing-format-attribute.
3911 * c-common.c (check_function_arguments_recurse): Use
3912 get_attribute_name.
3913 (check_missing_format_attribute): Likewise.
3914
1bf32c11
MP
39152019-06-19 Marek Polacek <polacek@redhat.com>
3916
3917 PR c++/60364 - noreturn after first decl not diagnosed.
3918 * c-attribs.c (handle_noreturn_attribute): No longer static.
3919 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3920 Declare.
3921 * c-format.c (check_function_format): Use get_attribute_name.
3922
a04c0734
MS
39232019-06-19 Martin Sebor <msebor@redhat.com>
3924
3925 PR translation/90156
3926 * c-format.c (function_format_info::format_type): Adjust type.
3927 (function_format_info::is_raw): New member.
3928 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3929 (decode_format_attr): Adjust call to decode_format_type.
3930 Avoid a redundant call to convert_format_name_to_system_name.
3931 Avoid abbreviating the word "arguments" in a diagnostic.
3932 (format_warning_substr): New function.
3933 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3934 (finish_dollar_format_checking): Same.
3935 (check_format_info): Same.
3936 (struct baltoks_t): New.
3937 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3938 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3939 functions.
3940 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3941 maybe_diag_unbalanced_tokens.
3942 (handle_format_attribute): Spell out the word "arguments" in
3943 a diagnostic.
3944
d3786ebb
MB
39452019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3946
3947 PR c++/90449 - add -Winaccessible-base option.
3948 * c.opt (Winaccessible-base): New option.
3949
bf38f7e9
JJ
39502019-06-10 Jakub Jelinek <jakub@redhat.com>
3951
3952 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3953 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3954 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3955 combined/composite constructs where it is not allowed. Copy over
3956 OMP_CLAUSE_REDUCTION_INSCAN.
3957
0ecf545c
MS
39582019-06-05 Martin Sebor <msebor@redhat.com>
3959
3960 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3961 (handle_alias_ifunc_attribute): Same.
3962 (handle_copy_attribute): Same.
3963 (handle_weakref_attribute): Same.
3964 (handle_nonnull_attribute): Same.
3965 * c-warn.c (warn_for_sign_compare): Same.
3966 (warn_for_restrict): Same.
3967 * c.opt: Same.
3968
36b34127
MS
39692019-06-05 Martin Sebor <msebor@redhat.com>
3970
3971 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3972 * c.opt (-Wformat-diag): Remove a spurious period.
3973
357a352f
JJ
39742019-05-29 Jakub Jelinek <jakub@redhat.com>
3975
3976 PR c/90628
3977 * c-common.c (check_builtin_function_arguments)
3978 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3979 as last argument.
3980
2b8235ea
EB
39812019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3982
3983 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3984
6d86ddc4
ML
39852019-05-22 Martin Liska <mliska@suse.cz>
3986
3987 PR lto/90500
3988 * c-attribs.c (handle_copy_attribute): Do not copy
3989 target_clones attribute.
3990
419ba5b9
EB
39912019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3992
3993 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3994 * c-ada-spec.c (print_assignment_operator): New function.
3995 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3996 assignment operators declared as methods and filter out the others.
3997
e03436e7
TS
39982019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3999
4000 PR c/89433
4001 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4002 "omp declare target".
4003
a9c697b8
MS
40042019-05-16 Martin Sebor <msebor@redhat.com>
4005
ab20d992
JJ
4006 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4007 keywords, operators, and types in diagnostics.
4008 (handle_scalar_storage_order_attribute): Same.
4009 (handle_mode_attribute): Same.
4010 (handle_visibility_attribute): Same.
4011 (handle_assume_aligned_attribute): Same.
4012 (handle_no_split_stack_attribute): Same.
4013 * c-common.c (shorten_compare): Same.
4014 (c_common_truthvalue_conversion): Same.
4015 (cb_get_source_date_epoch): Same.
4016 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4017 in diagnostics.
4018 (interpret_float): Same.
4019 * c-omp.c (c_finish_omp_for): Same.
4020 * c-opts.c (c_common_post_options): Same.
4021 * c-pch.c (c_common_pch_pragma): Same.
4022 * c-pragma.c (pop_alignment): Same.
4023 (handle_pragma_pack): Same.
4024 (apply_pragma_weak): Same.
4025 (handle_pragma_weak): Same.
4026 (handle_pragma_scalar_storage_order): Same.
4027 (handle_pragma_redefine_extname): Same.
4028 (add_to_renaming_pragma_list): Same.
4029 (maybe_apply_renaming_pragma): Same.
4030 (push_visibility): Same.
4031 (handle_pragma_visibility): Same.
4032 (handle_pragma_optimize): Same.
4033 (handle_pragma_message): Same.
4034 * c-warn.c (warn_for_omitted_condop): Same.
4035 (lvalue_error): Same.
a9c697b8 4036
6b943512
RB
40372019-05-15 Richard Biener <rguenther@suse.de>
4038
4039 PR c/90474
4040 * c-common.c (c_common_mark_addressable_vec): Also mark
4041 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4042 c_mark_addressable.
ab20d992 4043
b744fc85
NS
40442019-05-06 Nathan Sidwell <nathan@acm.org>
4045
4046 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4047
598f50d7
NS
40482019-04-30 Nathan Sidwell <nathan@acm.org>
4049
4050 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4051
5bcc5a3b
ML
40522019-04-30 Martin Liska <mliska@suse.cz>
4053
4054 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4055 for unknown options.
4056
e78a87f7
RS
40572019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4058
4059 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4060 the pointer target rather than the pointer itself.
4061
c280b7ee
JJ
40622019-04-19 Jakub Jelinek <jakub@redhat.com>
4063
4064 PR c/89888
4065 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4066 arguments.
4067 (c_do_switch_warnings): Remove outside_range_p argument.
4068 * c-common.c (check_case_bounds): Removed.
4069 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4070 Don't call check_case_bounds. Fold low_value as well as high_value.
4071 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4072 Check for case labels outside of range of original type here and
4073 adjust them.
4074
8e8225e6
JJ
40752019-04-12 Jakub Jelinek <jakub@redhat.com>
4076
63b8a166
JJ
4077 PR translation/90041
4078 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4079 in the Warn diagnostics.
4080
8e8225e6
JJ
4081 PR c/89946
4082 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4083 function comment. Warn if arguments of the attribute are not positive
4084 integer constants.
4085
53a3f614
EB
40862019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4087
4088 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4089 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4090
22be5873
EB
40912019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4092
4093 * c-ada-spec.c (is_float128): New predicate extracted from...
4094 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4095 <REAL_TYPE>: ...here. Call it.
4096
34facf20
DM
40972019-04-05 David Malcolm <dmalcolm@redhat.com>
4098
4099 PR c/89985
4100 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4101 auto_diagnostic_group. Guard inform calls by result of
4102 warning_at call.
4103
05564120
MP
41042019-04-05 Marek Polacek <polacek@redhat.com>
4105
ab20d992 4106 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
4107 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4108 of RHS.
4109
7a506c3c
JM
41102019-04-03 Jason Merrill <jason@redhat.com>
4111
4112 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4113 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4114
ddeae8c8
MS
41152019-04-01 Martin Sebor <msebor@redhat.com>
4116
4117 PR c/89685
4118 * c-attribs.c (handle_copy_attribute): Handle references and
4119 non-constant expressions.
4120
a15ffa22
JJ
41212019-03-22 Jakub Jelinek <jakub@redhat.com>
4122
4123 PR c++/87481
4124 * c.opt (-fconstexpr-ops-limit=): New option.
4125
36a3a7a3
JJ
41262019-03-21 Jakub Jelinek <jakub@redhat.com>
4127
4128 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4129 template param.
4130
bec1da64
MS
41312019-03-19 Martin Sebor <msebor@redhat.com>
4132
4133 PR tree-optimization/89688
4134 * c-common.c (braced_list_to_string): Make static.
4135 (braced_lists_to_strings): Define new function.
4136 * c-common.h (braced_list_to_string): Remove.
4137 (braced_lists_to_strings): Declare.
4138
1fe61adf
ML
41392019-03-12 Martin Liska <mliska@suse.cz>
4140
4141 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4142
93964ebd
ML
41432019-03-11 Martin Liska <mliska@suse.cz>
4144
4145 * c-opts.c (c_common_post_options): Wrap apostrophes
4146 in gcc internal format with %'.
4147
a3f9f006
ML
41482019-03-11 Martin Liska <mliska@suse.cz>
4149
4150 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4151 in a string format message and fix GNU coding style.
4152 * c-common.c (vector_types_convertible_p): Likewise.
4153 (c_build_vec_perm_expr): Likewise.
4154 * c-indentation.c (get_visual_column): Likewise.
4155 * c-opts.c (c_common_handle_option): Likewise.
4156 (c_common_post_options): Likewise.
4157 (sanitize_cpp_opts): Likewise.
4158 * c-pch.c (c_common_pch_pragma): Likewise.
4159 * c-pragma.c (handle_pragma_pack): Likewise.
4160
1db01ff9
JJ
41612019-03-08 Jakub Jelinek <jakub@redhat.com>
4162
4163 PR tree-optimization/89550
4164 * c-common.c (c_common_truthvalue_conversion): Only set
4165 TREE_NO_WARNING if warning_at returned true.
4166 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4167
ba790e6f
JJ
41682019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4169 Martin Sebor <msebor@gmail.com>
4170
4171 * c.opt (Wmissing-attributes): Clean up doc string.
4172
7da73ba7
JJ
41732019-02-25 Jakub Jelinek <jakub@redhat.com>
4174
4175 PR c/89495
4176 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4177 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4178 checking.
4179
921bb9d1
RB
41802019-02-22 Richard Biener <rguenther@suse.de>
4181
4182 * c-pch.c (no_checksum): Remove.
4183 (pch_init): Remove assertion that executable_checksum is not
4184 all zero.
4185 (c_common_valid_pch): Likewise.
4186
e2ebb05c
MS
41872019-02-18 Martin Sebor <msebor@redhat.com>
4188
4189 PR middle-end/89294
4190 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4191
3fe53000
DM
41922019-02-16 David Malcolm <dmalcolm@redhat.com>
4193
4194 PR c++/88680
4195 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4196 implementing -Wtype-limits.
4197
28a8cef1
MS
41982019-02-11 Martin Sebor <msebor@redhat.com>
4199
4200 PR c++/87996
4201 * c-common.c (invalid_array_size_error): New function.
4202 (valid_array_size_p): Call it. Handle size as well as type.
4203 * c-common.h (valid_constant_size_p): New function.
4204 (enum cst_size_error): New type.
4205
ec2be203
DM
42062019-01-31 David Malcolm <dmalcolm@redhat.com>
4207
4208 PR c/89122
4209 * known-headers.cc (get_stdlib_header_for_name): Add
4210 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4211
8936f047
JJ
42122019-01-31 Jakub Jelinek <jakub@redhat.com>
4213
4214 PR libstdc++/88170
4215 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4216 a C cast in pp_c_flag_gnu_v3 mode.
4217
6a335b96
JJ
42182019-01-29 Jakub Jelinek <jakub@redhat.com>
4219
4220 PR c/86125
4221 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4222 builtin_structptr_types types even for C.
4223
2a06eba5
BE
42242019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4225
4226 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4227 when rhs is of array type correctly. Fix handling of nested structures.
4228 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4229 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4230 type casts within nested compound expressions.
4231
18a23298
JJ
42322019-01-22 Jakub Jelinek <jakub@redhat.com>
4233
4234 PR middle-end/88968
4235 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4236 variable after using BIT_FIELD_REF.
4237
420183d9
L
42382019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4239
4240 PR c/51628
4241 PR c/88664
4242 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4243 Remove the boolean argument.
4244 * c-warn.c (check_address_of_packed_member): Renamed to ...
4245 (check_address_or_pointer_of_packed_member): This. Also
4246 warn pointer conversion.
4247 (check_and_warn_address_of_packed_member): Renamed to ...
4248 (check_and_warn_address_or_pointer_of_packed_member): This.
4249 Also warn pointer conversion.
4250 (warn_for_address_or_pointer_of_packed_member): Remove the
4251 boolean argument. Don't check pointer conversion here.
4252
99063eee
RS
42532019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4254
4255 PR inline-asm/52813
4256 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4257
a30d0196
JJ
42582019-01-14 Jakub Jelinek <jakub@redhat.com>
4259
4260 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4261 and __cpp_nontype_template_parameter_auto. Add a comment that
4262 __cpp_template_auto is deprecated.
4263
2d91f79d
TH
42642019-01-14 Tom Honermann <tom@honermann.net>
4265
4266 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4267 * c-common.c (c_common_reswords): Add char8_t.
4268 (fix_string_type): Use char8_t for the type of u8 string literals.
4269 (c_common_get_alias_set): char8_t doesn't alias.
4270 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4271 C++.
4272 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4273 (keyword_begins_type_specifier): Add RID_CHAR8.
4274 * c-common.h (rid): Add RID_CHAR8.
4275 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4276 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4277 Define char8_type_node and char8_array_type_node.
4278 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4279 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4280 (c_cpp_builtins): Predefine __cpp_char8_t.
4281 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4282 CPP_UTF8STRING.
4283 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4284 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4285 targeting C++2a.
4286 * c.opt: Add the -fchar8_t command line option.
4287
23db6ced
MS
42882019-01-14 Martin Sebor <msebor@redhat.com>
4289
4290 PR target/88638
4291 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4292 and issue errors if it fails.
4293 * c-common.h (valid_format_string_type_p): Declare.
4294 * c-format.c (valid_stringptr_type_p): Rename...
4295 (valid_format_string_type_p): ...to this and make extern.
4296 (handle_format_arg_attribute): Adjust to new name.
4297 (check_format_string): Same.
4298
234c3818
L
42992019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4300
4301 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4302 Replace "may may" with "may" in warning message.
4303
d8fcab68
JJ
43042019-01-07 Jakub Jelinek <jakub@redhat.com>
4305
4306 PR c++/85052
4307 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4308 (c_build_vec_convert): Declare.
4309 * c-common.c (c_build_vec_convert): New function.
4310
29d24852
MS
43112019-01-04 Martin Sebor <msebor@redhat.com>
4312
4313 PR c/88546
4314 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4315 Handle C++ empty throw specification and C11 _Noreturn.
4316 (has_attribute): Also handle C11 _Noreturn.
4317
9069a4c9
MS
43182019-01-04 Martin Sebor <msebor@redhat.com>
4319
4320 PR c/88363
4321 * c-attribs.c (positional_argument): Also accept enumerated types.
4322
a5544970
JJ
43232019-01-01 Jakub Jelinek <jakub@redhat.com>
4324
4325 Update copyright years.
4326
da77eace
L
43272018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4328
4329 PR c/51628
4330 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4331 * c-warn.c (check_alignment_of_packed_member): New function.
4332 (check_address_of_packed_member): Likewise.
4333 (check_and_warn_address_of_packed_member): Likewise.
4334 (warn_for_address_or_pointer_of_packed_member): Likewise.
4335 * c.opt: Add -Wno-address-of-packed-member.
4336
573767d4
DM
43372018-12-20 David Malcolm <dmalcolm@redhat.com>
4338
4339 PR c++/87504
4340 * c-warn.c (get_outermost_macro_expansion): New function.
4341 (spelled_the_same_p): Use it to unwind the macro expansions, and
4342 compare the outermost macro in each nested expansion, rather than
4343 the innermost.
4344
a14feb3c
DM
43452018-12-19 David Malcolm <dmalcolm@redhat.com>
4346
4347 PR c++/87504
4348 * c-common.h (warn_tautological_cmp): Convert 1st param from
4349 location_t to const op_location_t &.
4350 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4351 when testing for INTEGER_CST.
4352 (warn_tautological_bitwise_comparison): Convert 1st param from
4353 location_t to const op_location_t &; use it to build a
4354 binary_op_rich_location, and use this.
4355 (spelled_the_same_p): New function.
4356 (warn_tautological_cmp): Convert 1st param from location_t to
4357 const op_location_t &. Warn for macro expansions if
4358 spelled_the_same_p. Use binary_op_rich_location.
4359
dfd7fdca
DM
43602018-12-19 David Malcolm <dmalcolm@redhat.com>
4361
4362 PR c++/43064
4363 PR c++/43486
4364 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4365 (verify_tree): Handle location wrappers.
4366 (c_common_truthvalue_conversion): Strip any location wrapper.
4367 Handle CONST_DECL.
4368 (fold_offsetof): Strip any location wrapper.
4369 (complete_array_type): Likewise for initial_value.
4370 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4371 index before checking for INTEGER_CST.
4372 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4373 print parentheses around location wrappers.
4374 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4375 before checking for INTEGER_CST.
4376 (warn_tautological_bitwise_comparison): Call
4377 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4378 before checking for INTEGER_CST.
4379 (readonly_error): Strip any location wrapper.
4380 (warn_array_subscript_with_type_char): Strip location wrappers
4381 before checking for INTEGER_CST. Use the location of the index if
4382 available.
4383
5c8b3702
JM
43842018-12-06 Jason Merrill <jason@redhat.com>
4385
4386 PR c++/88136 - -Wdeprecated-copy false positives
4387 * c.opt (Wdeprecated-copy-dtor): New.
4388 (Wdeprecated-copy): Move to -Wextra.
4389
673670da
MS
43902018-11-29 Martin Sebor <msebor@redhat.com>
4391
4392 PR c/88172
4393 PR testsuite/88208
4394 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4395 alignments to values less than the target requires.
4396 (has_attribute): For attribute aligned consider both the attribute
4397 and the alignment bits.
4398 * c-common.c (c_init_attributes): Optionally issue a warning for
4399 zero alignment.
4400
04864ec8
MS
44012018-11-28 Martin Sebor <msebor@redhat.com>
4402
4403 PR c/88065
4404 PR c/87297
4405 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4406 or destination is an error.
4407
ace83db0
JJ
44082018-11-28 Jakub Jelinek <jakub@redhat.com>
4409
4410 PR c++/88215
4411 * c-ubsan.c: Include langhooks.h.
4412 (ubsan_instrument_division): Change gcc_assert that main variants
4413 of op0 and op1 types are equal to gcc_checking_assert that the
4414 main variants are compatible types.
4415
da193a27
EB
44162018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4417
4418 * c-ada-spec.c: Include stringpool.h.
4419 (has_static_fields): Return false for incomplete types.
4420 (is_tagged_type): Likewise.
4421 (has_nontrivial_methods): Likewise.
4422 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4423 (struct overloaded_name_hash): New structure.
4424 (struct overloaded_name_hasher): Likewise.
4425 (overloaded_names): New global variable.
4426 (init_overloaded_names): New static function.
4427 (overloaded_name_p): New predicate.
4428 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4429 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4430 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4431 Remove always-true condition and dump forward types.
4432 (dump_ada_specs): Delete overloaded_names.
4433
98f08eb8
MS
44342018-11-20 Martin Sebor <msebor@redhat.com>
4435
4436 * c-attribs.c (type_for_vector_size): New function.
4437 (type_valid_for_vector_size): Same.
4438 (handle_vector_size_attribute): Move code to the functions above
4439 and call them.
4440 (validate_attribute, has_attribute): New functions.
4441 * c-common.h (has_attribute): Declare.
4442 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4443 * c-common.c (c_common_resword): Same.
4444
2674fa47
JM
44452018-11-16 Jason Merrill <jason@redhat.com>
4446
4447 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4448 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4449
258b3854
JJ
44502018-11-16 Jakub Jelinek <jakub@redhat.com>
4451
4452 PR middle-end/87854
4453 * c-common.c (fix_string_type): Reject string literals larger than
4454 TYPE_MAX_VALUE (ssizetype) bytes.
4455
1d249509
MS
44562018-11-15 Martin Sebor <msebor@redhat.com>
4457
4458 PR c++/87541
4459 PR c++/87542
4460 * c-attribs.c (positional_argument): New function.
4461 (handle_alloc_size_attribute): Use it and simplify.
4462 (handle_alloc_align_attribute): Same.
4463 (handle_assume_aligned_attribute): Same.
4464 (handle_nonnull_attribute): Same.
4465 * c-common.c (check_function_arguments): Pass fntype to
4466 check_function_format.
4467 * c-common.h (check_function_format): Add an argument.
4468 (PosArgFlags, positional_argument): Declare new type and function.
4469 * c-format.c (decode_format_attr): Add arguments.
4470 (check_format_string, get_constant): Same.
4471 (convert_format_name_to_system_name): Adjust.
4472
478dd60d
DM
44732018-11-15 David Malcolm <dmalcolm@redhat.com>
4474
4475 PR other/19165
4476 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4477
8cca0163
JJ
44782018-11-14 Jakub Jelinek <jakub@redhat.com>
4479
8ee09943
JJ
4480 P1236R1 - Signed integers are two's complement
4481 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4482 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4483 with in-range second operand well defined for -std=c++2a.
4484
8cca0163
JJ
4485 PR other/88007
4486 * c-common.c (parse_optimize_options): Allocate option string from
4487 opts_obstack rather than as GC memory. Move the allocation after
4488 warning for invalid option.
4489
620e594b
DM
44902018-11-13 David Malcolm <dmalcolm@redhat.com>
4491
4492 * c-common.c (c_get_substring_location): Update for renaming of
4493 get_source_location_for_substring to get_location_within_string.
4494 * c-lex.c: Replace "source_location" with "location_t".
4495 * c-opts.c: Likewise.
4496 * c-ppoutput.c: Likewise.
4497
f9731de3
MS
44982018-11-13 Martin Sebor <msebor@redhat.com>
4499
4500 PR middle-end/81824
4501 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4502 (handle_tls_model_attribute): Improve diagnostics.
4503
e4bd6d5e
JM
45042018-11-12 Jason Merrill <jason@redhat.com>
4505
a6bb6b07
JM
4506 * c-cppbuiltin.c (c_cpp_builtins): Define
4507 __cpp_impl_destroying_delete.
4508
e4bd6d5e
JM
4509 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4510 __cpp_conditional_explicit.
4511
79a2c428
MS
45122018-11-09 Martin Sebor <msebor@redhat.com>
4513
4514 PR middle-end/81824
4515 * c-attribs.c (handle_copy_attribute): New function.
4516
4c7bd361
MS
45172018-11-09 Martin Sebor <msebor@redhat.com>
4518
4519 PR c/87795
4520 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4521
28567c40
JJ
45222018-11-08 Jakub Jelinek <jakub@redhat.com>
4523
4524 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4525 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4526 enum omp_memory_order MEMORY_ORDER.
4527 (c_finish_omp_flush): Add MO argument.
4528 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4529 (c_finish_omp_for): Add FINAL_P argument.
4530 * c-omp.c: Include memmodel.h.
4531 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4532 OMP_TASKGROUP_CLAUSES to it.
4533 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4534 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4535 instead of OMP_ATOMIC_SEQ_CST.
4536 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4537 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4538 __atomic_thread_fence call with the given value.
4539 (check_omp_for_incr_expr): Formatting fixes.
4540 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4541 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4542 is not constant expression 1 or -1. Transform NE_EXPR loops
4543 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4544 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4545 loops too.
4546 (c_omp_split_clauses): Add support for combined
4547 #pragma omp parallel master and
4548 #pragma omp {,parallel }master taskloop{, simd} constructs.
4549 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4550 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4551 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4552 (c_omp_predetermined_sharing): Don't return
4553 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4554 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4555 PRAGMA_OMP_REQUIRES.
4556 * c-pragma.h (enum pragma_kind): Likewise.
4557 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4558 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4559
204839e7
DM
45602018-11-08 David Malcolm <dmalcolm@redhat.com>
4561
4562 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4563
d8010ee4
DM
45642018-11-08 David Malcolm <dmalcolm@redhat.com>
4565
4566 * c-format.c (local_cgraph_node_ptr_node): New variable.
4567 (gcc_dump_printf_char_table): Add entry for %C.
4568 (get_pointer_to_named_type): New function, taken from the handling
4569 code for "gimple *" from...
4570 (init_dynamic_diag_info): ...here. Add handling for
4571 "cgraph_node *".
4572 * c-format.h (T_CGRAPH_NODE): New.
4573
4be5c72c
JM
45742018-10-19 Jason Merrill <jason@redhat.com>
4575
4576 * c-cppbuiltin.c (c_cpp_builtins): Add
4577 __cpp_nontype_template_parameter_class.
4578
f3f6029d
NS
45792018-10-31 Nathan Sidwell <nathan@acm.org>
4580
ab5324fb
NS
4581 * c-opts.c (c_finish_options): Force command line macro
4582 location. Refactor to avoid repeating main debug hook.
4583 (push_command_line_include): Clarify comment.
4584
f3f6029d
NS
4585 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4586
91e3ec29
MS
45872018-10-30 Martin Sebor <msebor@redhat.com>
4588
4589 PR middle-end/87041
4590 * c-format.c (check_format_types): Avoid diagnosing null pointer
4591 arguments to printf-family of functions.
4592
b5ff4f5c
MP
45932018-10-30 Marek Polacek <polacek@redhat.com>
4594
4595 Implement P0892R2, explicit(bool).
4596 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4597
7e2de6df
DM
45982018-10-29 David Malcolm <dmalcolm@redhat.com>
4599
4600 * name-hint.h (name_hint::take_deferred): New member function.
4601
b2bf438c
DM
46022018-10-29 David Malcolm <dmalcolm@redhat.com>
4603
4604 PR c++/56856
4605 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4606 argument.
4607 (check_function_restrict): Rename param "argarray" to
4608 "unfolded_argarray", and make a copy named "argarray", calling
4609 fold_for_warn on each argument.
4610 (check_function_arguments): Add note about responsibility for
4611 folding the arguments.
4612
9f936c86
JM
46132018-10-17 Joseph Myers <joseph@codesourcery.com>
4614
4615 * c-common.c (flag_isoc2x): New variable.
4616 * c-common.h (clk_c): Update comment to reference C2X.
4617 (flag_isoc99, flag_isoc11): Update comments to reference future
4618 standard versions in general.
4619 (flag_isoc2x): Declare.
4620 * c-opts.c (set_std_c2x): New function.
4621 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4622 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4623 flag_isoc2x to 0.
4624 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4625
7a8a92c4
JM
46262018-10-17 Joseph Myers <joseph@codesourcery.com>
4627
4628 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4629 (std=iso9899:2018): Document C17 as published in 2018.
4630
4dc003ff
CL
46312018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4632
4633 PR c++/87364
4634 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4635
79371671
WW
46362018-10-11 Will Wray <wjwray@gmail.com>
4637
4638 PR c++/87364
4639 * c-pretty-print.h (pp_c_type_cast): Prototype.
4640 (pp_c_integer_constant): Likewise.
4641 * c-pretty-print.c (pp_c_type_cast): No longer static.
4642 (pp_c_integer_constant): Likewise.
4643 (pp_c_enumeration_constant): Fix loop termination when finding
4644 name of constant. No longer returns a value. Call
4645 pp_c_integer_constant.
4646 (c_pretty_printer::constant): Update for changes to
4647 pp_c_enumeration_constant.
4648
46c62690
JJ
46492018-10-11 Jakub Jelinek <jakub@redhat.com>
4650
4651 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4652 for no_unique_address.
4653
c24300ba
DM
46542018-10-09 David Malcolm <dmalcolm@redhat.com>
4655
4656 * c-common.c (c_option_controlling_cpp_error): Rename to...
4657 (c_option_controlling_cpp_diagnostic): ...this, and convert
4658 "reason" from int to enum.
4659 (c_cpp_error): Rename to...
4660 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4661 * c-common.h (c_cpp_error): Rename to...
4662 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4663 * c-opts.c (c_common_init_options): Update for renaming.
4664
8656dafa
RS
46652018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4666
4667 PR c/87286
4668 * c-common.c (vector_types_compatible_elements_p): Use
4669 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4670
8cff0652
VK
46712018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4672
4673 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4674 to generate constructor destructor priority warning.
4675 * c.opt (-Wprio-ctor-dtor): New option.
4676
bedf03a2
JM
46772018-10-01 Jason Merrill <jason@redhat.com>
4678
4679 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4680
6cc430c1
EB
46812018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4682
4683 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4684 (dump_ada_node): Add const keyword.
4685
87677ac7
ML
46862018-09-25 Martin Liska <mliska@suse.cz>
4687
4688 * c-common.c (c_common_truthvalue_conversion):
4689 Remove Pascal from documentation.
4690
518196cb
EB
46912018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4692
4693 * c-ada-spec.c: Include diagnostic.h.
4694 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4695
a599af84
MP
46962018-09-19 Marek Polacek <polacek@redhat.com>
4697
4698 * c.opt (Wclass-conversion): New.
4699
9c4a4b3c
DM
47002018-09-17 David Malcolm <dmalcolm@redhat.com>
4701
4702 * c-format.c (range_label_for_format_type_mismatch::get_text):
4703 Update for new param.
4704
c896ecfe
DM
47052018-09-17 David Malcolm <dmalcolm@redhat.com>
4706
4707 * c-format.c (format_warning_at_char): Update for introduction of
4708 format_string_diagnostic_t.
4709 (format_type_warning): Likewise.
4710
80c6d1f4
MJ
47112018-09-17 Martin Jambor <mjambor@suse.cz>
4712
4713 PR c/63886
4714 * c.opt (Wabsolute-value): New.
4715
6d900107
BE
47162018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4717
4718 * c-common.c (complete_flexible_array_elts): New helper function.
4719 * c-common.h (complete_flexible_array_elts): Declare.
4720
b5764229
BE
47212018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4722
4723 * c-common.c (braced_list_to_string): Remove eval parameter.
4724 Add some more checks. Always create zero-terminated STRING_CST.
4725 * c-common.h (braced_list_to_string): Adjust prototype.
4726
85204e23
DM
47272018-08-27 David Malcolm <dmalcolm@redhat.com>
4728
4729 PR 87091
4730 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4731 to a tri-state.
4732 (maybe_suggest_missing_token_insertion): Likewise.
4733 (maybe_add_include_fixit): Add param "override_location". If set,
4734 and source-printing is enabled, then override the rich_location's
4735 primary location with that of the insertion point for the fix-it
4736 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4737 * c-common.h (extern void maybe_add_include_fixit): Add bool
4738 param.
4739 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4740 for conversion of show_caret_p to a tri-state.
4741 * c-warn.c (warn_for_restrict): Likewise.
4742 * known-headers.cc
4743 (suggest_missing_header::~suggest_missing_header): Update call to
4744 maybe_add_include_fixit to suggest overriding the location, as it
4745 is for a note.
4746
3d78e008
ML
47472018-08-27 Martin Liska <mliska@suse.cz>
4748
4749 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4750 fndecl_built_in_p and remove check for FUNCTION_DECL if
4751 possible.
3d78e008
ML
4752 (check_builtin_function_arguments): Likewise.
4753 (reject_gcc_builtin): Likewise.
4754 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4755
b5be6d0c
MP
47562018-08-26 Marek Polacek <polacek@redhat.com>
4757
4758 PR c++/87029, Implement -Wredundant-move.
4759 * c.opt (Wredundant-move): New option.
4760
79ca9c35
MP
47612018-08-21 Marek Polacek <polacek@redhat.com>
4762
4763 PR c++/86981, Implement -Wpessimizing-move.
4764 * c.opt (Wpessimizing-move): New option.
4765
097f82ec
DM
47662018-08-20 David Malcolm <dmalcolm@redhat.com>
4767
4768 PR other/84889
4769 * c-attribs.c (common_handle_aligned_attribute): Add
4770 auto_diagnostic_group instance.
4771 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4772 * c-opts.c (c_common_post_options): Likewise.
4773 * c-warn.c (warn_logical_not_parentheses): Likewise.
4774 (warn_duplicated_cond_add_or_warn): Likewise.
4775 (warn_for_multistatement_macros): Likewise.
4776
3fb558b1
NS
47772018-08-20 Nathan Sidwell <nathan@acm.org>
4778
4779 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4780 access.
4781
800c0e98
NS
47822018-08-17 Nathan Sidwell <nathan@acm.org>
4783
4784 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4785 field.
4786 (laxy_hex_fp_value_count): Make unsigned.
4787 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4788 manipulate the macro.
4789 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4790 cpp_define_lazily.
4791
6f795a92
DM
47922018-08-17 David Malcolm <dmalcolm@redhat.com>
4793
4794 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4795 (gcc_dump_printf_length_specs): New.
4796 (gcc_dump_printf_flag_pairs): New.
4797 (gcc_dump_printf_flag_specs): New.
4798 (gcc_dump_printf_char_table): New.
4799 (format_types_orig): Add entry for "gcc_dump_printf".
4800 (init_dynamic_diag_info): Set up length_char_specs and
4801 conversion_specs for gcc_dump_printf_format_type.
4802 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4803
c5d725c0
NS
48042018-08-17 Nathan Sidwell <nathan@acm.org>
4805
10f04917
NS
4806 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4807
c5d725c0
NS
4808 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4809 * c-cppbuiltin.c: Likewise.
4810
c0c12356
ML
48112018-08-17 Martin Liska <mliska@suse.cz>
4812
4813 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4814 Ignore/Deprecated flag. Warning is done automatically for
4815 Deprecated flags.
c0c12356 4816
10fcc142
DM
48172018-08-16 David Malcolm <dmalcolm@redhat.com>
4818
4819 PR c++/70693
4820 * c-common.c (selftest::c_family_tests): Call
4821 selftest::c_indentation_c_tests.
4822 * c-common.h (selftest::c_indentation_c_tests): New decl.
4823 * c-indentation.c: Include "selftest.h".
4824 (next_tab_stop): Add "tab_width" param, rather than accessing
4825 cpp_opts.
4826 (get_visual_column): Likewise. Clarify comment. Bulletproof
4827 against reading past the end of the line.
4828 (get_first_nws_vis_column): Add "tab_width" param.
4829 (detect_intervening_unindent): Likewise.
4830 (should_warn_for_misleading_indentation): Read tab width from
4831 cpp_opts and pass around.
4832 (selftest::test_next_tab_stop): New test.
4833 (selftest::assert_get_visual_column_succeeds): New function.
4834 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4835 (selftest::assert_get_visual_column_fails): New function.
4836 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4837 (selftest::test_get_visual_column): New test.
4838 (selftest::c_indentation_c_tests): New function.
4839
3f6677f4
NS
48402018-08-16 Nathan Sidwell <nathan@acm.org>
4841
4842 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4843 (store_ada_macro): Likewise.
4844 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4845 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4846
96e6ae57
DM
48472018-08-15 David Malcolm <dmalcolm@redhat.com>
4848
4849 * c-format.c: Include "selftest-diagnostic.h" and
4850 "gcc-rich-location.h".
4851 (format_warning_at_char): Pass NULL for new label params of
4852 format_warning_va.
4853 (class indirection_suffix): New class.
4854 (class range_label_for_format_type_mismatch): New class.
4855 (format_type_warning): Move logic for generating "*" suffix to
4856 class indirection_suffix. Create "fmt_label" and "param_label"
4857 to show their types, and pass them to the
4858 format_warning_at_substring calls.
4859 (selftest::test_type_mismatch_range_labels): New test.
4860 (selftest::c_format_c_tests): Call it.
4861
23aa9f7c
MS
48622018-08-13 Martin Sebor <msebor@redhat.com>
4863
4864 PR tree-optimization/71625
4865 * c-common.c (braced_list_to_string): New function.
4866 * c-common.h (braced_list_to_string): Declare it.
4867
f10a9135
NS
48682018-08-08 Nathan Sidwell <nathan@acm.org>
4869
4870 * c-common.c (try_to_locate_new_include_inertion_point): Use
4871 linemap_included_from_linemap.
4872 * c-lex.c (fe_file_change): Use linemap_included_from.
4873 * c-ppoutput.c (pp_file_change): Likewise.
4874
8a45b051
MS
48752018-08-01 Martin Sebor <msebor@redhat.com>
4876
4877 PR tree-optimization/86650
ab20d992 4878 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4879 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4880 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4881 * c-format.h (T89_G): Update to be "gimple *" rather than
4882 "gcall *".
4883 (local_gcall_ptr_node): Rename...
4884 (local_gimple_ptr_node): ...to this.
4885
e540ccc0
DM
48862018-07-31 David Malcolm <dmalcolm@redhat.com>
4887
4888 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4889 table entries for gcc_diag_char_table, and the 'Z' entry from
4890 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4891 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4892 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4893 adding missing "Z" for this table. Remove erroneous "G" and "K"
4894 entries.
4895 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4896 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4897 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4898
425fc685
RE
48992018-07-31 Richard Earnshaw <rearnsha@arm.com>
4900
4901 * c-common.c (speculation_safe_resolve_call): New function.
4902 (speculation_safe_resolve_params): New function.
4903 (speculation_safe_resolve_return): New function.
4904 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4905 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4906 __HAVE_SPECULATION_SAFE_VALUE.
4907
181463c2
DM
49082018-07-20 David Malcolm <dmalcolm@redhat.com>
4909
4910 * c-common.c (c_cpp_error): Remove redundant "line_table"
4911 parameter from call to rich_location::set_range.
4912 (maybe_suggest_missing_token_insertion): Likewise.
4913
0d7f9065
MS
49142018-07-20 Martin Sebor <msebor@redhat.com>
4915
4916 PR middle-end/82063
ab20d992 4917 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4918
00abf86c
MS
49192018-07-20 Martin Sebor <msebor@redhat.com>
4920
4921 PR middle-end/82063
4922 * c-common.h (c_common_handle_option): Change function argument
4923 to HOST_WIDE_INT.
4924 * c-opts.c (c_common_init_options): Same.
4925 (c_common_handle_option): Same. Remove special handling of
4926 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4927 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4928 options to take a HOST_WIDE_INT argument and accept a byte-size
4929 suffix. Initialize.
4930 (-Wvla-larger-than): Same.
4931 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4932 (-Wno-vla-larger-than): Same.
4933
9b452033
JJ
49342018-07-12 Jakub Jelinek <jakub@redhat.com>
4935
4936 * c-attribs.c (c_common_attribute_table): Add
4937 "omp declare target implicit" attribute.
4938
cd0762f3
RB
49392018-07-12 Richard Biener <rguenther@suse.de>
4940
4941 PR c/86453
4942 * c-attribs.c (handle_packed_attribute): Do not build a variant
4943 type with TYPE_PACKED, instead ignore the attribute if we may
4944 not apply to the original type.
4945
0b27c3ed
JJ
49462018-07-10 Jakub Jelinek <jakub@redhat.com>
4947
4948 PR c++/86443
4949 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4950 to contain TREE_LIST for both the original class iterator and the
4951 "last" helper var.
4952
e730a0ef
EB
49532018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4954
4955 * c-ada-spec.c (to_ada_name): Remove index parameter.
4956 (pp_ada_tree_identifier): Likewise.
4957 (dump_ada_macros): Adjust call to to_ada_name.
4958 (struct overloaded_name_hash): Delete.
4959 (struct overloaded_name_hasher): Likewise.
4960 (overloaded_names): Likewise.
4961 (compute_overloading_index): Likewise.
4962 (dump_ada_decl_name): Do not call compute_overloading_index and
4963 adjust calls to pp_ada_tree_identifier.
4964 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4965 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4966 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4967 (dump_ada_enum_type): Remove type and display_convention parameters.
4968 Adjust calls to pp_ada_tree_identifier.
4969 (dump_ada_node): Likewise and for dump_ada_structure.
4970 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4971 and tidy up.
4972 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4973 syntax.
4974 (print_constructor): Adjust call to pp_ada_tree_identifier.
4975 (print_destructor): Likewise.
4976 (dump_ada_declaration): Switch to aspect syntax.
4977 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4978 parameter with nested parameter.
4979 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4980 (dump_ada_specs): Do not delete overloaded_names table.
4981
8de583fc
PB
49822018-07-06 Peter Bergner <bergner@linux.ibm.com>
4983
4984 PR target/86324
e730a0ef 4985 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4986 target hook.
4987
09cff37b
NS
49882018-07-05 Nathan Sidwell <nathan@acm.org>
4989
4990 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4991 NO_IMPLICIT_EXTERN_C.
4992
98086b2b
ML
49932018-06-28 Martin Liska <mliska@suse.cz>
4994
4995 * cppspec.c: Include opt-suggestions.h.
4996
ab20d992
JJ
49972018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4998 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4999 Cesar Philippidis <cesar@codesourcery.com>
5000
5001 * c-pragma.h (enum pragma_omp_clause): Add
5002 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5003 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5004
f41b7612
JJ
50052018-06-20 Jakub Jelinek <jakub@redhat.com>
5006
5007 PR c++/86210
5008 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5009 comment.
5010
4252ccd7
MS
50112018-06-18 Martin Sebor <msebor@redhat.com>
5012
5013 PR middle-end/85602
5014 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5015 nonstring.
5016
e197e64e
KV
50172018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5018
5019 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5020
34a7a230
JM
50212018-06-13 Jason Merrill <jason@redhat.com>
5022
5cef3733
JM
5023 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5024 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5025 handling.
5026
34a7a230
JM
5027 PR c++/86094 - wrong code with defaulted move ctor.
5028 * c-opts.c (c_common_post_options): Bump the current ABI version to
5029 13. Set warn_abi_version and flag_abi_compat_version to the current
5030 version rather than 0. Fix defaulting flag_abi_compat_version from
5031 warn_abi_version.
5032
bb0f14ae
MS
50332018-06-12 Martin Sebor <msebor@redhat.com>
5034
5035 PR c/85931
5036 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5037 sizeof source and destination yields the same value.
5038
3713f2e2
ML
50392018-06-12 Martin Liska <mliska@suse.cz>
5040
5041 * c.opt: Make MPX-related options as Deprecated.
5042
4af78ef8
DM
50432018-06-08 David Malcolm <dmalcolm@redhat.com>
5044
5045 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5046 rather than 0.
5047
31db0fe0
ML
50482018-06-08 Martin Liska <mliska@suse.cz>
5049
5050 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5051 for MPX (macros, related functions, fields in cgraph_node, ...).
5052 (handle_bnd_legacy): Likewise.
5053 (handle_bnd_instrument): Likewise.
5054 * c.opt: Likewise.
5055
fe16acf2
JJ
50562018-06-06 Jakub Jelinek <jakub@redhat.com>
5057
5058 PR c++/86068
5059 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5060 __cpp_transactional_memory to 201500 instead of 210500.
5061
4dbdb49b
JM
50622018-06-06 Jason Merrill <jason@redhat.com>
5063
5064 PR c++/85710 - ICE with -Wmemset-elt-size.
5065 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5066
f8ad043f
JM
50672018-06-01 Jason Merrill <jason@redhat.com>
5068
5069 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5070 201703.
5071
abc24d93
EB
50722018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5073
5074 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5075 declaration for a typedef independently of whether the declaration of
5076 the subtype is generated.
5077
d258f4aa
MS
50782018-05-31 Martin Sebor <msebor@redhat.com>
5079
5080 PR c/82063
5081 * c.opt (-Wno-alloc-size-larger-than): New option.
5082
b67b9225
DP
50832018-04-22 David Pagan <dave.pagan@oracle.com>
5084
5085 PR c/55976
5086 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 5087 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
5088 differentiate between default (no option), -Wreturn-type, and
5089 -Wno-return-type.
5090
04eb9c55
JM
50912018-05-29 Jason Merrill <jason@redhat.com>
5092
5093 * c.opt (Winit-list-lifetime): New flag.
5094
b0c31bc6
BE
50952018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5096
5097 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5098 splay_tree_delete_pointers.
5099
44284983
JJ
51002018-05-26 Jakub Jelinek <jakub@redhat.com>
5101
5102 PR bootstrap/85921
5103 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5104 noinline variable to workaround broken kernel headers.
5105
b46b715d
JM
51062018-05-18 Jason Merrill <jason@redhat.com>
5107
5108 * c.opt (Wdeprecated-copy): New flag.
5109
40659769
ML
51102018-05-17 Martin Liska <mliska@suse.cz>
5111
5112 * c-warn.c (overflow_warning): Do not use
5113 space in between 'G_' and '('.
5114
403962ea
JM
51152018-05-09 Jason Merrill <jason@redhat.com>
5116
5117 * c-common.c (valid_array_size_p): Add complain parameter.
5118 * c-common.h: ...which defaults to true.
5119
1c9ee609
JJ
51202018-05-11 Jakub Jelinek <jakub@redhat.com>
5121
5122 PR c/85696
5123 * c-omp.c (c_omp_predetermined_sharing): Return
5124 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5125
19916065
ML
51262018-05-11 Martin Liska <mliska@suse.cz>
5127
92a285c1 5128 PR sanitizer/85556
19916065
ML
5129 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5130 TREE_LIST values.
5131
79e7b1fe
JJ
51322018-05-10 Jakub Jelinek <jakub@redhat.com>
5133
5134 PR c++/85662
5135 * c-common.h (fold_offsetof_1): Removed.
5136 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5137 CTX argument defaulted to ERROR_MARK.
5138 * c-common.c (fold_offsetof_1): Renamed to ...
5139 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5140 argument, convert the pointer constant to TYPE and use size_binop
5141 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5142 a pointer type. Adjust recursive calls.
5143
86c12f76
EB
51442018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5145
5146 PR c++/85400
5147 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5148
ee336e84
NS
51492018-05-07 Nathan Sidwell <nathan@acm.org>
5150
5151 * c.opt (ffor-scope): Remove functionality, issue warning.
5152
6c072e21
NS
51532018-05-03 Nathan Sidwell <nathan@acm.org>
5154
5155 * c.opt (ffriend-injection): Remove functionality, issue warning.
5156
2cc7d3a7
DM
51572018-05-01 David Malcolm <dmalcolm@redhat.com>
5158
5159 PR c/84258
5160 * c-format.c (struct format_check_results): Add field
5161 "number_non_char".
5162 (check_format_info): Initialize it, and warn if encountered.
5163 (check_format_arg): Distinguish between wide char and
5164 everything else when detecting arrays of non-char.
5165
7761dfbe
DM
51662018-04-30 David Malcolm <dmalcolm@redhat.com>
5167
5168 * c-format.c (get_corrected_substring): Update for
5169 location_get_source_line returning a char_span. Use a char_span
5170 when handling the prefix of the correction.
5171 * c-indentation.c (get_visual_column): Update for
5172 location_get_source_line returning a char_span.
5173 (get_first_nws_vis_column): Likewise.
5174
62e98ef1
DM
51752018-03-29 David Malcolm <dmalcolm@redhat.com>
5176
5177 PR c++/84269
5178 * known-headers.cc (get_stdlib_header_for_name): Add various names
5179 from <assert.h>, <string.h>, and <memory.h>; add more names from
5180 <stdio.h>.
5181
a7dea617
JJ
51822018-03-27 Jakub Jelinek <jakub@redhat.com>
5183
5184 PR c++/85061
5185 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5186 get_base_address of the second operand is a VAR_P, rather than the
5187 operand itself, and use gcc_checking_assert instead of gcc_assert.
5188
889a3a30
MP
51892018-03-23 Marek Polacek <polacek@redhat.com>
5190
5191 PR c++/85045
5192 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5193 <case RDIV_EXPR>: Tweak condition.
5194
452154b9
EB
51952018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5196
5197 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5198
63ecb626
JJ
51992018-03-16 Jakub Jelinek <jakub@redhat.com>
5200
ce811fc4
JJ
5201 PR c/84909
5202 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5203 diagnostics.
5204
63ecb626
JJ
5205 PR c/84910
5206 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5207 diagnostics.
5208
a1295eec
RB
52092018-03-16 Richard Biener <rguenther@suse.de>
5210
5211 PR c/84873
5212 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5213 unshare the possibly folded expression.
5214
919674fb
RB
52152018-03-15 Richard Biener <rguenther@suse.de>
5216
5217 PR c/84873
5218 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5219
f99309b2
MS
52202018-03-13 Martin Sebor <msebor@redhat.com>
5221
5222 PR tree-optimization/84725
5223 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5224 with all three narrow character types, including their qualified forms.
5225
e9b9fa4c
MS
52262018-03-12 Martin Sebor <msebor@redhat.com>
5227
5228 PR tree-optimization/83456
ab20d992 5229 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5230 Restore checking of bounded built-in functions.
5231 (check_function_arguments): Also return the result
5232 of warn_for_restrict.
ab20d992
JJ
5233 * c-common.c (check_function_restrict): Return bool.
5234 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5235
0805d020
MP
52362018-03-02 Marek Polacek <polacek@redhat.com>
5237
5238 PR c++/84171
5239 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5240 is erroneous.
5241
ed2a2f08
TS
52422018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5243
5244 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5245 function".
5246
90abdde0
MP
52472018-03-01 Marek Polacek <polacek@redhat.com>
5248
5249 PR c++/84639
5250 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5251 alignment in computation.
5252
c6db43fa
EB
52532018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5254
5255 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5256 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5257
9e25c7ed
EB
52582018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5259
5260 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5261 (is_char_array): Take a type instead of a declaration.
5262 (dump_ada_array_type): Likewise.
5263 (is_simple_enum): Minor tweak.
5264 (dump_ada_enum_type): New function extracted from...
5265 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5266 <INTEGER_TYPE>: Remove unreachable code.
5267 <RECORD_TYPE>: Likewise. Minor tweaks.
5268 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5269 <ENUMERAL_TYPE>: New case.
5270 <RECORD_TYPE>: Factor out common code.
5271 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5272 Minor tweaks. Deal with enumeral types.
5273 (dump_ada_structure): Minor tweaks.
5274
09de3550
EB
52752018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5276
5277 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5278 address for incomplete structures.
5279 (dump_forward_type): Do not bail out for incomplete structures.
5280 (dump_ada_declaration): Do not special-case incomplete structures
5281 for subtypes. Dump them as null records for types.
5282
095d8d4b
EB
52832018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5284
5285 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5286 (is_char_array): Fix formatting.
5287 (dump_template_types): Likewise.
5288 (dump_generic_ada_node): Rename into...
5289 (dump_ada_node): ...this.
5290 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5291 incomplete structures and not for empty structures. Do not use it
5292 when forward declarations are needed.
5293 (dump_forward_type): New function.
5294 (dump_nested_types): Remove FORWARD parameter. Do not consider
5295 TREE_VISITED and do not generate a forward declaration. Only dump
5296 original nested types for nested declaration.
5297 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5298 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5299 <RECORD_TYPE>: Do not consider TREE_VISITED.
5300 (dump_ada_declaration): Use booleans and fix formatting throughout.
5301 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5302 Call dump_forward_type instead of dump_nested_types for a typedef.
5303 Remove superfluous check and adjust call to dump_nested_types.
5304 <POINTER_TYPE>: Call dump_forward_type and fall through.
5305 (dump_ada_struct_decl): Rename into...
5306 (dump_ada_structure): ...this. Do not special-case empty structures.
5307
d4cfd486
MS
53082018-02-27 Martin Sebor <msebor@redhat.com>
5309
5310 PR c++/83871
5311 * c.opt (-Wmissing-attributes): New option.
5312
b22dbd03
ML
53132018-02-21 Martin Liska <mliska@suse.cz>
5314
5315 * c.opt (Wcatch-value=): Add IntegerRange.
5316
883dfe2a
JM
53172018-02-15 Jason Merrill <jason@redhat.com>
5318
5319 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5320
0444aa9c
NS
53212018-02-09 Nathan Sidwell <nathan@acm.org>
5322
5323 PR c/84293
5324 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5325 arg.
5326 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5327 arg. Adjust.
5328
cea71f0a
MS
53292018-02-09 Martin Sebor <msebor@redhat.com>
5330
5331 PR lto/84212
5332 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5333 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5334 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5335 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5336 (-Wuninitialized): Same.
5337
8c8b7be5
EB
53382018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5339
5340 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5341 keyword for components.
5342
7c30b12a
PC
53432018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5344
5345 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5346
eece7fe5
JK
53472018-02-02 Julia Koval <julia.koval@intel.com>
5348
5349 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5350
7d07a93a
MP
53512018-01-29 Marek Polacek <polacek@redhat.com>
5352
5353 PR c/83966
5354 * c-format.c (check_function_format): Check current_function_decl.
5355
53723269
JJ
53562018-01-27 Jakub Jelinek <jakub@redhat.com>
5357
5358 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5359 argument.
5360 (LAZY_HEX_FP_VALUES_CNT): Define.
5361 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5362 values rather than just 12.
5363 (builtin_define_with_hex_fp_value): Likewise.
5364
7365279f
BK
53652018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5366
92a285c1
ML
5367 PR other/70268
5368 * c.opt (-fmacro-prefix-map): New option.
5369 * c-opts.c (c_common_handle_option): Handle it.
5370 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5371 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5372
bb9869d5
DM
53732018-01-17 David Malcolm <dmalcolm@redhat.com>
5374
5375 PR c++/83814
5376 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5377
68dc87c3
EB
53782018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5379
5380 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5381 Skip 'f' and 'F' characters if it is true.
5382 (store_ada_macro): Minor tweak.
5383 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5384 <CPP_WSTRING>: Likewise.
5385 <CPP_STRING>: Output '&' in the buffer if not the first string.
5386 <CPP_NUMBER>: Adjust calls to dump_number.
5387
9a004410
DM
53882018-01-10 David Malcolm <dmalcolm@redhat.com>
5389
5390 PR c++/43486
5391 * c-common.c: Include "selftest.h".
5392 (get_atomic_generic_size): Perform the test for integral type
5393 before the range test for any integer constant, fixing indentation
5394 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5395 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5396 (selftest::test_fold_for_warn): New function.
5397 (selftest::c_common_c_tests): New function.
5398 (selftest::c_family_tests): Call it, and
5399 selftest::c_pretty_print_c_tests.
5400 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5401 * c-format.c (check_format_arg): Convert VAR_P check to a
5402 fold_for_warn.
5403 * c-pretty-print.c: Include "selftest.h".
5404 (pp_c_cast_expression): Don't print casts for location wrappers.
5405 (selftest::assert_c_pretty_printer_output): New function.
5406 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5407 (selftest::test_location_wrappers): New function.
5408 (selftest::c_pretty_print_c_tests): New function.
5409 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5410
5c0caeb3
RS
54112018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5412 Alan Hayward <alan.hayward@arm.com>
5413 David Sherwood <david.sherwood@arm.com>
5414
5415 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5416
73a699ae
RS
54172018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5418 Alan Hayward <alan.hayward@arm.com>
5419 David Sherwood <david.sherwood@arm.com>
5420
5421 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5422 as polynomial.
5423
928686b1
RS
54242018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5425 Alan Hayward <alan.hayward@arm.com>
5426 David Sherwood <david.sherwood@arm.com>
5427
5428 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5429 (convert_vector_to_array_for_subscript): Handle polynomial
5430 TYPE_VECTOR_SUBPARTS.
5431 (c_common_type_for_mode): Check valid_vector_subparts_p.
5432 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5433 VECTOR_CST_NELTS.
5434
85ec4feb
JJ
54352018-01-03 Jakub Jelinek <jakub@redhat.com>
5436
5437 Update copyright years.
5438
170a8bd6 54392017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5440 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5441
5442 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5443 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5444
ab20d992 54452017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5446
5447 PR debug/83527
5448 PR debug/83419
5449 * c-semantics.c (only_debug_stmts_after_p): New.
5450 (pop_stmt_list): Clear side effects in debug-only stmt list.
5451 Check for single nondebug stmt followed by debug stmts only.
5452
c12d20d4
AO
54532017-12-21 Alexandre Oliva <aoliva@redhat.com>
5454
5455 PR debug/83419
5456 * c-semantics.c (pop_stmt_list): Propagate side effects from
5457 single nondebug stmt to container list.
5458
01512446
JJ
54592017-12-19 Jakub Jelinek <jakub@redhat.com>
5460
5461 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5462 conditions with typical order conditions.
5463
82cfbd01
MP
54642017-12-18 Marek Polacek <polacek@redhat.com>
5465
5466 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5467 not in effect.
5468
99da11ec
MS
54692017-12-17 Martin Sebor <msebor@redhat.com>
5470
5471 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5472 an error for attribute warn_if_not_aligned.
5473
cc8bea0a
MS
54742017-12-16 Martin Sebor <msebor@redhat.com>
5475
5476 PR tree-optimization/78918
5477 * c-common.c (check_function_restrict): Avoid checking built-ins.
5478 * c.opt (-Wrestrict): Include in -Wall.
5479
4849deb1
JJ
54802017-12-15 Jakub Jelinek <jakub@redhat.com>
5481
5482 * c-attribs.c (c_common_attribute_table,
5483 c_common_format_attribute_table): Swap affects_type_identity
5484 and handler fields, adjust comments.
5485
c65e18d3
BE
54862017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5487
5488 * c.opt (Wcast-function-type): New warning option.
5489 * c-lex.c (get_fileinfo): Avoid warning.
5490 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5491
2004617a
QZ
54922017-12-14 Qing Zhao <qing.zhao@oracle.com>
5493
7365279f 5494 PR middle_end/79538
2004617a
QZ
5495 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5496 Adjust the size of buf1 and buf2, add a new buf to avoid
5497 format-overflow warning.
5498
ab20d992 54992017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5500
5501 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5502 subsequent statement list.
5503
5d9ae53d
MS
55042017-12-07 Martin Sebor <msebor@redhat.com>
5505
5506 PR c/81544
5507 PR c/81566
5508 * c-attribs.c (attr_aligned_exclusions): New array.
5509 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5510 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5511 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5512 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5513 (attr_warn_unused_result_exclusions): Same.
5514 (handle_hot_attribute, handle_cold_attribute): Simplify.
5515 (handle_const_attribute): Warn on function returning void.
5516 (handle_pure_attribute): Same.
5517 (handle_aligned_attribute): Diagnose conflicting attribute
5518 specifications.
5519 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5520
c79144f8
DM
55212017-12-06 David Malcolm <dmalcolm@redhat.com>
5522
5523 PR c/83236
5524 * c-common.c (selftest::c_family_tests): Call
5525 selftest::c_spellcheck_cc_tests.
5526 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5527 * c-spellcheck.cc: Include "selftest.h".
5528 (name_reserved_for_implementation_p): New function.
5529 (should_suggest_as_macro_p): New function.
5530 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5531 should_suggest_as_macro_p and call it.
5532 (selftest::test_name_reserved_for_implementation_p): New function.
5533 (selftest::c_spellcheck_cc_tests): New function.
5534 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5535
613bc14f
DM
55362017-12-06 David Malcolm <dmalcolm@redhat.com>
5537
5538 * c-spellcheck.cc: New file, taken from macro-handling code in
5539 spellcheck-tree.c.
5540 * c-spellcheck.h: New file, taken from macro-handling code in
5541 spellcheck-tree.h.
5542
e76c7157
JJ
55432017-12-01 Jakub Jelinek <jakub@redhat.com>
5544
5545 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5546 attribute.
5547 (handle_simd_attribute): Don't check for "cilk simd function"
5548 attribute. Reindent, formatting changes.
5549
b0da4034
JK
55502017-11-30 Julia Koval <julia.koval@intel.com>
5551
5552 * c-common.h (inv_list): Remove.
5553
058f0b9e
JJ
55542017-11-28 Jakub Jelinek <jakub@redhat.com>
5555
5556 PR sanitizer/81275
5557 * c-common.c (c_switch_covers_all_cases_p_1,
5558 c_switch_covers_all_cases_p): New functions.
5559 * c-common.h (c_switch_covers_all_cases_p): Declare.
5560
5e9d6aa4 55612017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5562 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5563
5564 * array-notation-common.c: Delete.
5565 * c-cilkplus.c: Ditto.
5566 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5567 * c-common.def (ARRAY_NOTATION_REF): Remove.
5568 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5569 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5570 c_validate_cilk_plus_loop, cilkplus_an_parts,
5571 cilk_ignorable_spawn_rhs_op,
5572 cilk_recognize_spawn): Remove.
5573 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5574 * c-omp.c: Remove CILK_SIMD check.
5575 * c-pragma.c: Ditto.
5576 * c-pragma.h: Remove CILK related pragmas.
5577 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5578 ARRAY_NOTATION_REF condition.
5579 (c_pretty_printer::expression): Ditto.
5580 * c.opt (fcilkplus): Remove.
5581 * cilk.c: Delete.
5582
1af4ebf5
MG
55832017-11-21 Marc Glisse <marc.glisse@inria.fr>
5584
5585 * c-pretty-print.c (pp_c_additive_expression,
5586 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5587
d44ed508
JJ
55882017-11-21 Jakub Jelinek <jakub@redhat.com>
5589
7d2f0f9b
JJ
5590 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5591
d44ed508
JJ
5592 PR c++/83059
5593 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5594 instead of tree_to_uhwi, formatting fix.
5595
26edace6
DM
55962017-11-20 David Malcolm <dmalcolm@redhat.com>
5597
5598 PR c/81404
5599 * known-headers.cc: New file, based on material from c/c-decl.c.
5600 (suggest_missing_header): Copied as-is.
5601 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5602 heavily edited to add C++ support. Add some knowledge about
5603 <limits.h>, <stdint.h>, and <wchar.h>.
5604 * known-headers.h: Likewise.
5605
6c7a259b
DM
56062017-11-20 David Malcolm <dmalcolm@redhat.com>
5607
5608 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5609 (lookup_name_fuzzy): Likewise. Convert return type from
5610 const char * to name_hint. Add location_t param.
5611 * name-hint.h: New header.
5612
f9c59f7e
JJ
56132017-11-19 Jakub Jelinek <jakub@redhat.com>
5614
5615 PR c/66618
5616 PR c/69960
5617 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5618
1e39313a
JM
56192017-11-16 Joseph Myers <joseph@codesourcery.com>
5620
5621 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5622 expected publication date of C17.
5623 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5624
3ca0dc60
JM
56252017-11-15 Joseph Myers <joseph@codesourcery.com>
5626
5627 PR c/81156
5628 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5629 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5630
025d57f0
MS
56312017-11-10 Martin Sebor <msebor@redhat.com>
5632
5633 PR c/81117
5634 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5635 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5636 * c.opt (-Wstringop-truncation): New option.
5637
1b6fa695
ML
56382017-11-06 Martin Liska <mliska@suse.cz>
5639
5640 PR middle-end/82404
5641 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5642 FE.
5643 * c.opt: Set default value of warn_return_type.
5644
64a5912c
DM
56452017-10-31 David Malcolm <dmalcolm@redhat.com>
5646
5647 * c-common.c (binary_op_error): Update for renaming of
5648 error_at_rich_loc.
5649 (c_parse_error): Likewise.
5650 * c-warn.c (warn_logical_not_parentheses): Likewise for
5651 renaming of inform_at_rich_loc.
5652 (warn_for_restrict): Likewise for renaming of
5653 warning_at_rich_loc_n.
5654
c76dc9c3
JM
56552017-10-30 Joseph Myers <joseph@codesourcery.com>
5656
5657 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5658 * c-opts.c (set_std_c17): New function.
5659 (c_common_init_options): Use gnu17 as default C version.
5660 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5661
ee5fd23a
MM
56622017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5663
5664 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5665 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5666 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5667 __FP_FAST_FMA<N>X.
5668
d1047465
MP
56692017-10-23 Marek Polacek <polacek@redhat.com>
5670
5671 PR c/82681
5672 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5673
9e878cf1
EB
56742017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5675
5676 * c-common.c (check_builtin_function_arguments): Also check arguments
5677 of __builtin_alloca_with_align_and_max.
5678
89b6abbb
DM
56792017-10-17 David Malcolm <dmalcolm@redhat.com>
5680
5681 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5682 rather than NULL to format_warning_va.
5683 (check_format_types): Likewise when calling format_type_warning.
5684 Remove code to extract source_ranges and source_range * in favor
5685 of just a location_t.
5686 (format_type_warning): Convert source_range * param to a
5687 location_t.
5688
39382c09
JJ
56892017-10-13 Jakub Jelinek <jakub@redhat.com>
5690
5691 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5692 [LR]SHIFT_EXPR.
5693
62e1c678
DM
56942017-10-12 David Malcolm <dmalcolm@redhat.com>
5695
5696 * c-common.c (enum missing_token_insertion_kind): New enum.
5697 (get_missing_token_insertion_kind): New function.
5698 (maybe_suggest_missing_token_insertion): New function.
5699 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5700
b90c9338
NS
57012017-10-11 Nathan Sidwell <nathan@acm.org>
5702
5703 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5704 (c_common_handle_option): Update incpath_kind names.
5705
3a266bcd
ML
57062017-10-11 Martin Liska <mliska@suse.cz>
5707
5708 PR sanitizer/82490
5709 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5710 Wattributes warning.
5711
8e6cdc90
RS
57122017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5713
5714 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5715 operating on trees as wide_ints.
5716 * c-common.c (pointer_int_sum): Likewise.
5717 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5718 * c-warn.c (match_case_to_enum_1): Likewise.
5719 (c_do_switch_warnings): Likewise.
5720 (maybe_warn_shift_overflow): Likewise.
5721
802b38c9
JJ
57222017-10-10 Jakub Jelinek <jakub@redhat.com>
5723
5724 PR c/82437
5725 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5726 instead of wide_int::from.
5727
4e34b338
JJ
57282017-10-06 Jakub Jelinek <jakub@redhat.com>
5729
5730 PR c/82437
5731 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5732 using to_widest use wide_int with the larger of the two precisions.
5733
4bc4b2b4
BE
57342017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5735
5736 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5737 functions.
5738
a1488398
RS
57392017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5740
5741 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5742 when combining the original unconverted comparison operands.
5743
01c9fb68
JJ
57442017-09-29 Jakub Jelinek <jakub@redhat.com>
5745
5746 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5747 attribute.
5748
6e3e8419
EB
57492017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5750
5751 * c-ada-spec.c (to_ada_name): Add index parameter.
5752 (pp_ada_tree_identifier): Likewise.
5753 (dump_ada_macros): Adjust call to to_ada_name.
5754 (struct overloaded_name_hash): New type.
5755 (struct overloaded_name_hasher): Likewise.
5756 (overloaded_names): New hash table.
5757 (compute_overloading_index): New function.
5758 (dump_ada_decl_name): Call it and pass the result to
5759 pp_ada_tree_identifier.
5760 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5761 (dump_ada_function_declaration): Likewise.
5762 (dump_generic_ada_node): Likewise.
5763 (print_constructor): Likewise.
5764 (print_destructor): Likewise.
5765 (dump_ada_specs): Delete overloaded_names table.
5766
79310774
EB
57672017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5768
5769 * c-ada-spec.c (max_ada_macros): Move around.
5770 (store_ada_macro_index): Likewise.
5771 (source_file): Rename into...
5772 (macro_source_file): ...this.
5773 (count_ada_macro): Move around.
5774 (store_ada_macro): Likewise.
5775 (compare_macro): Likewise.
5776 (print_ada_macros): Merge in...
5777 (dump_ada_macros): ...this.
5778 (source_file_base): Rename into...
5779 (current_source_file): ...this.
5780 (print_comment): Move around.
5781 (dump_ada_nodes): Call dump_ada_declaration directly.
5782 (struct with): Change type of limited field to bool.
5783 (append_withs): Change type of limited_access parameter to bool.
5784 (pp_ada_tree_identifie): Likewise.
5785 (dump_ada_decl_nam): Likewise.
5786 (dump_generic_ada_node): Likewise. Do not print the return type.
5787 (to_ada_name): Change type of space_found parameter to bool.
5788 (dump_ada_function_declaration): Return void and change type of
5789 parameters to bool. Also print the return type for a function.
5790 (print_ada_methods): Rename into...
5791 (dump_ada_methods): ...this.
5792 (print_ada_declaration): Rename into ...
5793 (dump_ada_declaration): ...this. Do not print the return type.
5794 (print_ada_struct_decl): Rename into...
5795 (dump_ada_struct_decl): ...this.
5796
7d386d45
JJ
57972017-09-29 Jakub Jelinek <jakub@redhat.com>
5798
5799 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5800 rather than DECL_INITIAL.
5801 (common_handle_aligned_attribute): Likewise.
5802
ab20d992 58032017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5804
5805 * c.opt (gen-decls): Add RejectNegative.
5806
026a79f7
AS
58072017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5808 Jakub Jelinek <jakub@redhat.com>
5809
5810 Add support for -std=c++2a.
5811 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5812 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5813 * c-opts.c (set_std_cxx2a): New.
5814 (c_common_handle_option): Set options when -std=c++2a is enabled.
5815 (c_common_post_options): Adjust comments.
5816 (set_std_cxx14, set_std_cxx17): Likewise.
5817
4a8ca690
EB
58182017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5819
5820 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5821 message for non-uniform endianness and issue a warning in C++.
5822
7b936140
JJ
58232017-09-15 Jakub Jelinek <jakub@redhat.com>
5824
5825 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5826 (Wc++17-compat): Change from undocumented alias to option.
5827 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5828 change C++1z to C++17 in description.
5829 (std=c++1z, std=gnu++1z): Change from option to undocumented
5830 deprecated alias.
5831 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5832 Adjust description.
5833 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5834 * c-opts.c (set_std_cxx1z): Rename to ...
5835 (set_std_cxx17): ... this.
5836 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5837 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5838 caller.
7b936140
JJ
5839 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5840 comments.
5841
12263f13
L
58422017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5843
5844 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5845 function alignment if warn_if_not_aligned_p is true.
5846
6836632e
NS
58472017-09-12 Nathan Sidwell <nathan@acm.org>
5848
5849 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5850 resort_sorted_fields): Move to c/c-decl.c.
5851 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5852 (struct sorted_fields_type): Move to c/c-lang.h.
5853
019bf9ad
JW
58542017-09-09 Jonathan Wakely <jwakely@redhat.com>
5855
5856 PR c++/81852
5857 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5858
bc7fe952
MP
58592017-09-04 Marek Polacek <polacek@redhat.com>
5860
5861 PR c/81783
5862 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5863 (warn_tautological_cmp): Call it.
5864
ab20d992 58652017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5866
5867 * c-opts.c (c_common_finish): Write dependency information even if
5868 there are errors.
5869
d2e05fcb
JJ
58702017-09-01 Jakub Jelinek <jakub@redhat.com>
5871
5872 PR c/81887
5873 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5874 (omp_pragmas_simd): ... here.
5875 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5876 create new clauses list containing just simd clause.
5877
18e2a8b8
RS
58782017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5879 Alan Hayward <alan.hayward@arm.com>
5880 David Sherwood <david.sherwood@arm.com>
5881
5882 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5883 into scalar_mode_supported_p call.
5884 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5885
16d22000
RS
58862017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5887 Alan Hayward <alan.hayward@arm.com>
5888 David Sherwood <david.sherwood@arm.com>
5889
5890 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5891 for the mode iterator.
5892
b397965c
RS
58932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5894 Alan Hayward <alan.hayward@arm.com>
5895 David Sherwood <david.sherwood@arm.com>
5896
5897 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5898 * c-common.c (c_build_vec_perm_expr): Likewise.
5899
357b7604
RS
59002017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5901 Alan Hayward <alan.hayward@arm.com>
5902 David Sherwood <david.sherwood@arm.com>
5903
5904 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5905
e05c94ba
RS
59062017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5907 Alan Hayward <alan.hayward@arm.com>
5908 David Sherwood <david.sherwood@arm.com>
5909
5910 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5911 before calling targetm.addr_space.valid_pointer_mode.
5912
5c20c4af
RS
59132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5914 Alan Hayward <alan.hayward@arm.com>
5915 David Sherwood <david.sherwood@arm.com>
5916
5917 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5918
c94843d2 59192017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5920 Alan Hayward <alan.hayward@arm.com>
5921 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5922
5923 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5924 iterators.
5925 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5926
4e10a5a7
RS
59272017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5928 Alan Hayward <alan.hayward@arm.com>
5929 David Sherwood <david.sherwood@arm.com>
5930
5931 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5932 case statements.
5933
130fcab0
ML
59342017-08-29 Martin Liska <mliska@suse.cz>
5935
5936 PR other/39851
5937 * c-common.c (parse_optimize_options): Add argument to function
5938 call.
5939 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5940
14e18d71
DM
59412017-08-24 David Malcolm <dmalcolm@redhat.com>
5942
5943 * c-lex.c (interpret_float): Use token location
5944 when building an EXCESS_PRECISION_EXPR.
5945
2f687306
DM
59462017-08-21 David Malcolm <dmalcolm@redhat.com>
5947
5948 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5949 it to check_function_format.
5950 * c-common.h (check_function_arguments): Add vec<location_t> *
5951 param.
5952 (check_function_format): Likewise.
5953 * c-format.c (struct format_check_context): Add field "arglocs".
5954 (check_function_format): Add param "arglocs"; pass it to
5955 check_format_info.
ab20d992 5956 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5957 new field of format_ctx.
5958 (check_format_arg): Pass format_ctx->arglocs to new param of
5959 check_format_info_main.
5960 (class argument_parser): New field "arglocs".
5961 (argument_parser::argument_parser): Add "arglocs_" param and use
5962 it to initialize new field.
5963 (argument_parser::check_argument_type): Pass new arglocs field to
5964 check_format_types.
5965 (check_format_info_main): Add param "arglocs", and use it when
5966 constructing arg_parser.
5967 (check_format_types): Add param "arglocs"; use it if non-NULL when
5968 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5969
00aa1fa2
L
59702017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5971
5972 PR c/53037
5973 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5974 (c_common_attribute_table): Add warn_if_not_aligned.
5975 (handle_aligned_attribute): Renamed to ...
5976 (common_handle_aligned_attribute): Remove argument, name, and add
5977 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5978 (handle_aligned_attribute): New.
5979 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5980
27be025d
MS
59812017-08-14 Martin Sebor <msebor@redhat.com>
5982
5983 PR c/81117
5984 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5985 (handle_nonstring_attribute): New function.
5986
da67acb9
MS
59872017-08-14 Martin Sebor <msebor@redhat.com>
5988
5989 PR c/81117
5990 * c-format.h (T89_G): New macro.
5991 * c-format.c (local_gcall_ptr_node): New variable.
5992 (init_dynamic_diag_info): Initialize it.
5993
a8b522b4
ML
59942017-08-11 Martin Liska <mliska@suse.cz>
5995
5996 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5997 TARGET_SUPPORTS_ALIASES.
5998
32129a17
DM
59992017-08-10 David Malcolm <dmalcolm@redhat.com>
6000
6001 * c-common.c (c_parse_error): Add rich_location * param, using it
6002 rather implicitly using input_location.
6003 * c-common.h (c_parse_error): Add rich_location * param.
6004
30af3a2b
MP
60052017-08-09 Marek Polacek <polacek@redhat.com>
6006
6007 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6008 (c_common_truthvalue_conversion): Likewise.
6009 * c-omp.c (c_finish_omp_atomic): Likewise.
6010 * c-common.h (build_binary_op): Update declaration.
6011
314e6352
ML
60122017-08-08 Martin Liska <mliska@suse.cz>
6013
6014 * c-ada-spec.c: Include header files.
6015 * c-ubsan.c: Likewise.
6016 * c-warn.c: Likewise.
6017
56b5041c
JJ
60182017-08-07 Jakub Jelinek <jakub@redhat.com>
6019
6020 PR c/69389
6021 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6022
db440138
EB
60232017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6024
6025 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6026 (print_ada_methods): Likewise.
6027 (print_ada_declaration): Likewise.
6028
577eec56
ML
60292017-08-07 Martin Liska <mliska@suse.cz>
6030
6031 * array-notation-common.c: Add new includes.
6032 * c-format.c( handle_format_attribute): Canonicalize a format
6033 function name.
6034 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6035 attribute.
6036 * c-pretty-print.c: Add new include.
6037
b854df3c
EB
60382017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6039
6040 * c-ada-spec.c (has_static_fields): Look only into variables.
6041 (print_constructor): Add TYPE parameter and use it for the name.
6042 (print_destructor): Likewise.
6043 (print_ada_declaration): Adjust to new constructor/destructor names.
6044 Adjust calls to print_constructor and print_destructor.
6045 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6046 Look only into variables in the final loop.
6047
9f2cb25e
EB
60482017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6049
6050 * c-ada-spec.c (has_static_fields): Look only into fields.
6051 (dump_generic_ada_node): Small tweak.
6052 (dump_nested_types): Look only into fields.
6053 (print_ada_declaration): Look only into methods. Small tweak.
6054 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6055
f4bcd9eb
EB
60562017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6057
6058 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6059 (dump_ada_function_declaration): Likewise.
6060 (dump_generic_ada_node): Likewise.
6061 (print_ada_declaration): Add support for const-qualified variables.
6062
f34ebeb2
ML
60632017-07-31 Martin Liska <mliska@suse.cz>
6064
6065 PR sanitize/81530
6066 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6067 Guard condition with flag_sanitize_p also with current_function_decl
6068 non-null equality.
6069 (ubsan_maybe_instrument_reference_or_call): Likewise.
6070
218e5d04
UB
60712017-07-30 Uros Bizjak <ubizjak@gmail.com>
6072
6073 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6074
942047f2
EB
60752017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6076
6077 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6078 for enumeral types.
6079 (print_ada_declaration): Add missing guard for record types.
6080
a40ff0ae
JJ
60812017-07-27 Jakub Jelinek <jakub@redhat.com>
6082
6083 PR c/45784
6084 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6085 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6086 new COMPOUND_EXPRs around the rhs of the comparison.
6087
06bd22f6
MP
60882017-07-27 Marek Polacek <polacek@redhat.com>
6089
6090 PR c/81417
6091 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6092 the types.
6093
036ea399
JJ
60942017-07-27 Jakub Jelinek <jakub@redhat.com>
6095
6096 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6097 (handle_noipa_attribute): New function.
6098
417ca011
TD
60992017-07-07 Torsten Duwe <duwe@suse.de>
6100
6101 * c-attribs.c (c_common_attribute_table): Add entry for
6102 "patchable_function_entry".
6103
5aaa8fb4
NS
61042017-07-20 Nathan Sidwell <nathan@acm.org>
6105
6106 Remove TYPE_METHODS.
6107 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6108 dump_ada_template, print_ada_methods,
6109 print_ada_declaration): Member fns are on TYPE_FIELDS.
6110
ff22eb12
NS
61112017-07-18 Nathan Sidwell <nathan@acm.org>
6112
6113 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6114
eea77d1f
DM
61152017-07-14 David Malcolm <dmalcolm@redhat.com>
6116
6117 * c-common.c (try_to_locate_new_include_insertion_point): New
6118 function.
6119 (per_file_includes_t): New typedef.
6120 (added_includes_t): New typedef.
6121 (added_includes): New variable.
6122 (maybe_add_include_fixit): New function.
6123 * c-common.h (maybe_add_include_fixit): New decl.
6124
281ac396
MS
61252017-07-10 Martin Sebor <msebor@redhat.com>
6126
6127 PR other/81345
6128 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6129
b6f43128
DM
61302017-07-06 David Malcolm <dmalcolm@redhat.com>
6131
6132 * c-common.c (selftest::c_family_tests): New.
6133 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6134 (selftest::c_family_tests): New decl.
6135
efbf55b0
MP
61362017-07-04 Marek Polacek <polacek@redhat.com>
6137
6138 PR c/81231
6139 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6140 types.
6141
6c86bd88
MP
61422017-07-04 Marek Polacek <polacek@redhat.com>
6143
6144 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6145
17a7218b
ML
61462017-06-28 Martin Liska <mliska@suse.cz>
6147
6148 PR ipa/81128
6149 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6150 to a function declaration.
6151
63010089
ML
61522017-06-28 Martin Liska <mliska@suse.cz>
6153
6154 PR driver/79659
6155 * c.opt: Add IntegerRange to various options.
6156
3e2becc4
MP
61572017-06-26 Marek Polacek <polacek@redhat.com>
6158
6159 PR c/80116
6160 * c-common.h (warn_for_multistatement_macros): Declare.
6161 * c-warn.c: Include "c-family/c-indentation.h".
6162 (warn_for_multistatement_macros): New function.
6163 * c.opt (Wmultistatement-macros): New option.
6164 * c-indentation.c (guard_tinfo_to_string): No longer static.
6165 Change the parameter type to "enum rid". Handle RID_SWITCH.
6166 * c-indentation.h (guard_tinfo_to_string): Declare.
6167
2db9b7cd
MG
61682017-06-23 Marc Glisse <marc.glisse@inria.fr>
6169
6170 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6171
c3684b7b
MS
61722017-06-15 Martin Sebor <msebor@redhat.com>
6173
6174 PR c++/80560
6175 * c.opt (-Wclass-memaccess): New option.
6176
e72c4afd
BK
61772017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6178
6179 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6180
8a516588
MP
61812017-06-13 Marek Polacek <polacek@redhat.com>
6182
6183 PR objc/80949
6184 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6185 branches is null.
6186
45b2222a
ML
61872017-06-13 Martin Liska <mliska@suse.cz>
6188
6189 PR sanitize/78204
6190 * c-attribs.c (add_no_sanitize_value): New function.
6191 (handle_no_sanitize_attribute): Likewise.
6192 (handle_no_sanitize_address_attribute): Use the function.
6193 (handle_no_sanitize_thread_attribute): New function.
6194 (handle_no_address_safety_analysis_attribute): Use
6195 add_no_sanitize_value.
6196 (handle_no_sanitize_undefined_attribute): Likewise.
6197 * c-common.h: Declare new functions.
6198 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6199 (ubsan_instrument_shift): Likewise.
6200 (ubsan_instrument_bounds): Likewise.
6201 (ubsan_maybe_instrument_array_ref): Likewise.
6202 (ubsan_maybe_instrument_reference_or_call): Likewise.
6203
a01f151f
JM
62042017-06-11 Jason Merrill <jason@redhat.com>
6205
6206 * c-ada-spec.c, c-pragma.c: Use id_equal.
6207
3de4ac6d
MP
62082017-06-04 Marek Polacek <polacek@redhat.com>
6209
6210 PR c/80919
6211 * c-format.c (matching_type_p): Return false if any of the types
6212 requires structural equality.
6213
2474f48f
MS
62142017-06-02 Martin Sebor <msebor@redhat.com>
6215
6216 PR c/80892
6217 * c-warn.c (conversion_warning): Use -Wconversion for integer
6218 conversion and -Wfloat-conversion for floating one.
6219
40ffd95f
BE
62202017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6221
6222 * c.opt (Wsizeof-pointer-div): New warning option.
6223
3fa4634c
VR
62242017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6225
6226 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6227 (Wcatch-value=1): Enable by -Wall.
6228
f012c8ef
DM
62292017-05-30 David Malcolm <dmalcolm@redhat.com>
6230
6231 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6232 format_chars.
6233 * c.opt (fdiagnostics-show-template-tree): New option.
6234 (felide-type): New option.
6235
63dbcd13
VR
62362017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6237
6238 * c.opt (Wcatch-value=): New C++ warning flag.
6239
be136b5c
NS
62402017-05-24 Nathan Sidwell <nathan@acm.org>
6241
6242 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6243 const casts to avoid warning.
6244
3cd211af
MS
62452017-05-24 Martin Sebor <msebor@redhat.com>
6246
6247 PR c/80731
6248 * c-common.h (unsafe_conversion_p): Add a function argument.
6249 * c-common.c (unsafe_conversion_p): Same.
6250 Add type names and values to diagnostics.
6251 (scalar_to_vector): Adjust.
6252 * c-warn.c (constant_expression_error): Add a function argument.
6253 Add type names and values to diagnostics.
6254 (conversion_warning): Add a function argument.
6255 Add type names and values to diagnostics.
6256 (warnings_for_convert_and_check): Same.
6257
1ff7be5a
JM
62582017-05-19 Jason Merrill <jason@redhat.com>
6259
6260 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6261 enumerators.
6262
ff502317
BE
62632017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6264
6265 * c-format.c (locus): Move out of function scope,
6266 add GTY attribute.
6267
2a8a8d7b
NS
62682017-05-19 Nathan Sidwell <nathan@acm.org>
6269
6270 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6271 (c_common_parse_file): Remove class dump handling.
6272 (get_dump_info): Likewise.
6273
39aac208
RB
62742017-05-19 Richard Biener <rguenther@suse.de>
6275
6276 PR c++/80593
6277 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6278 to alias-set zero memory.
6279
6ecd2339
BE
62802017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6281
6282 * c-format.c (local_tree_type_node): Add GTY attribute.
6283
6574d78e
MP
62842017-05-18 Marek Polacek <polacek@redhat.com>
6285
6286 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6287 (c_common_fixed_point_type_for_size): Likewise.
6288 (c_common_type_for_mode): Likewise.
6289 (shorten_compare): Likewise.
6290 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6291 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6292
e3455240
MP
62932017-05-18 Marek Polacek <polacek@redhat.com>
6294
6295 * c-common.c (self_promoting_args_p): Change the return type to bool.
6296 Use false/true instead of 0/1.
6297 * c-common.h (self_promoting_args_p): Update.
6298
3fa8871b
MP
62992017-05-17 Marek Polacek <polacek@redhat.com>
6300
6301 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6302 * c-warn.c: Likewise.
6303
b42cc3ca
VV
63042017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6305
6306 Implement new C++ intrinsics __is_assignable and __is_constructible.
6307 * c-common.c (__is_assignable, __is_constructible): New.
6308 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6309
1a817418
ML
63102017-05-17 Martin Liska <mliska@suse.cz>
6311
6312 * c-common.h: Introduce dump_flags_t type and
6313 use it instead of int type.
6314 * c-gimplify.c (c_genericize): Likewise.
6315 * c-opts.c: Likewise.
6316
b2fa0a8b
MP
63172017-05-17 Marek Polacek <polacek@redhat.com>
6318
6319 * c-common.c (c_save_expr): Remove.
6320 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6321 * c-common.h (c_save_expr): Remove declaration.
6322
31c2d57d
VR
63232017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6324
6325 PR c/35441
6326 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6327 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6328 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6329 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6330 RDIV_EXPR.
6331 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6332
684f84de
MP
63332017-05-09 Marek Polacek <polacek@redhat.com>
6334
6335 PR c/80525
6336 * c-warn.c (unwrap_c_maybe_const): New.
6337 (warn_logical_operator): Call it.
6338
641da50a
NS
63392017-05-09 Nathan Sidwell <nathan@acm.org>
6340
6341 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6342 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6343
631238ac
MS
63442017-05-08 Martin Sebor <msebor@redhat.com>
6345
6346 PR translation/80280
6347 * c-format.h (struct format_flag_spec): Add new member.
6348 (T89_T): New macro.
6349 * c-format.c (local_tree_type_node): New global.
6350 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6351 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6352 (strfmon_flag_specs): Likewise.
6353 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6354 with distinct quoting properties.
6355 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6356 (flag_chars_t::validate): Add argument and handle bad quoting.
6357 (check_format_info_main): Handle quoting problems.
6358 (init_dynamic_diag_info): Simplify.
6359
49f0c04c
JM
63602017-05-08 Jason Merrill <jason@redhat.com>
6361
6362 * c-opts.c (c_common_post_options): Update defaults for
6363 flag_abi_version and flag_abi_compat_version.
6364
56d35585
DM
63652017-05-05 David Malcolm <dmalcolm@redhat.com>
6366
6367 * c-common.c (c_cpp_error): Replace report_diagnostic
6368 with diagnostic_report_diagnostic.
6369
0f2c4a8f
MS
63702017-05-04 Martin Sebor <msebor@redhat.com>
6371
6372 PR translation/80280
6373 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6374 (handle_weakref_attribute): Same.
6375
6fe63fb4
NS
63762017-05-03 Nathan Sidwell <nathan@acm.org>
6377
6378 Canonicalize canonical type hashing
6379 * c-common.c (complete_array_type): Use type_hash_canon.
6380
815d9cc6
XR
63812017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6382
92a285c1 6383 PR c++/80038
815d9cc6
XR
6384 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6385 prototype.
6386 (cilk_install_body_pedigree_operations): Likewise.
6387 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6388 detatched.
6389 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6390 (cilk_install_body_pedigree_operations): Likewise.
6391 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6392 unwrapping.
6393
f8a36447
JJ
63942017-04-27 Jakub Jelinek <jakub@redhat.com>
6395
6396 PR c++/80534
6397 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6398 flag on non-aggregate element types.
6399
7c145456
BE
64002017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6401
6402 * c-common.c (c_type_hasher, type_hash_table): Remove.
6403 (c_common_get_alias_set): Remove unreachable code.
6404 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6405
c3cbcd45
VR
64062017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6407
6408 * c.opt (Wextra-semi): New C++ warning flag.
6409
8a59d466
JJ
64102017-04-20 Jakub Jelinek <jakub@redhat.com>
6411
6412 PR middle-end/80423
6413 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6414
8487c9a5
JJ
64152017-04-18 Jakub Jelinek <jakub@redhat.com>
6416
6417 PR middle-end/79788
6418 PR middle-end/80375
6419 * c-common.c (c_common_type_for_mode): Don't handle
6420 widest_*_literal_type_node here.
6421 c_common_signed_or_unsigned_type): Likewise.
6422 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6423 to *intTI_type_node or *intDI_type_node depending on whether
6424 TImode is supported by the target or not.
6425
3ee0fb02
ML
64262017-04-10 Martin Liska <mliska@suse.cz>
6427
6428 PR sanitizer/80350
6429 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6430 doing an UBSAN check.
6431
5764ee3c
JW
64322017-04-03 Jonathan Wakely <jwakely@redhat.com>
6433
6434 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6435
6f3af356
JJ
64362017-03-31 Jakub Jelinek <jakub@redhat.com>
6437
6438 PR c++/79572
6439 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6440 tree *.
6441 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6442 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6443 REFERENCE_TYPE.
6444
f6a7a9d5
DM
64452017-03-31 David Malcolm <dmalcolm@redhat.com>
6446
6447 PR documentation/78732
6448 * c.opt (Wendif-labels): Fix description to refer to
6449 #else rather than #elif.
6450
af88f557
JJ
64512017-03-31 Jakub Jelinek <jakub@redhat.com>
6452
6453 PR libstdc++/80251
6454 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6455 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6456
a9e4a1a5
JJ
64572017-03-27 Jakub Jelinek <jakub@redhat.com>
6458
6459 PR middle-end/80162
6460 * c-common.c (c_common_mark_addressable_vec): Don't set
6461 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6462
3f01b620
MS
64632017-03-21 Martin Sebor <msebor@redhat.com>
6464
6465 PR c++/79548
6466 * c-common.c (set_underlying_type): Mark type used only when
6467 original del is declared unused.
6468
2f6f187a
DM
64692017-03-10 David Malcolm <dmalcolm@redhat.com>
6470
6471 PR translation/79848
6472 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6473 "%qs".
6474
a02fa805
DM
64752017-03-10 David Malcolm <dmalcolm@redhat.com>
6476
6477 PR c/79921
6478 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6479 from inform's message, so that xgettext can locate it.
6480
822a132c
MP
64812017-03-09 Marek Polacek <polacek@redhat.com>
6482
6483 PR c++/79962
6484 PR c++/79984
6485 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6486 conversion to the attribute list.
6487
bba81f1c
ML
64882017-03-09 Martin Liska <mliska@suse.cz>
6489
6490 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6491
108154ff
JM
64922017-03-03 Jason Merrill <jason@redhat.com>
6493
6494 * c.opt (Wnoexcept-type): New.
6495
eb0e7c34
RB
64962017-03-02 Richard Biener <rguenther@suse.de>
6497
6498 PR c/79756
6499 * c-common.c (c_common_mark_addressable_vec): Look through
6500 C_MAYBE_CONST_EXPR.
6501
9453ba0a
ML
65022017-02-28 Martin Liska <mliska@suse.cz>
6503
6504 * c.opt: Replace space with tabular for options of <number>
6505 type.
6506
6a825afe
ML
65072017-02-28 Martin Liska <mliska@suse.cz>
6508
6509 * c.opt: Fix --help=option -Q for options which are of
6510 an enum type.
6511
4227c9ad
JJ
65122017-02-24 Jakub Jelinek <jakub@redhat.com>
6513
6514 PR c++/79588
6515 * c-common.c (check_function_restrict): New function.
6516 (check_function_arguments): Add FNDECL argument. Call
6517 check_function_restrict if -Wrestrict.
6518 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6519 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6520 * c-common.h (check_function_arguments): Add FNDECL argument.
6521 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6522
59909673
EB
65232017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6524
6525 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6526 treatment of parameters with pointer-to-tagged type and tidy up.
6527 (print_ada_methods): Remove the special treatment of C++ static member
6528 functions.
6529
54dcd526
ML
65302017-02-22 Martin Liska <mliska@suse.cz>
6531
6532 * c.opt: Replace inequality signs with square brackets
6533 for -Wnornalized.
6534
00bc9de3
JJ
65352017-02-21 Jakub Jelinek <jakub@redhat.com>
6536
6537 PR c++/79641
6538 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6539 preserve quals.
6540
97fcf744
JM
65412017-02-17 Joseph Myers <joseph@codesourcery.com>
6542
6543 * c-cppbuiltin.c (builtin_define_float_constants): Define
6544 __DECIMAL_DIG__ to the value for long double.
6545
c7545f1c
MP
65462017-02-15 Marek Polacek <polacek@redhat.com>
6547
6548 PR c/79515
6549 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6550 conversion has occured.
6551
c2e84327
DM
65522017-01-24 David Malcolm <dmalcolm@redhat.com>
6553
6554 * c-common.c (c_common_reswords): Add "__RTL".
6555 * c-common.h (enum rid): Add RID_RTL.
6556
2ebd93e1
MP
65572017-01-20 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/64279
6560 * c-common.h (do_warn_duplicated_branches_r): Declare.
6561 * c-gimplify.c (c_genericize): Walk the function tree calling
6562 do_warn_duplicated_branches_r.
6563 * c-warn.c (expr_from_macro_expansion_r): New.
6564 (do_warn_duplicated_branches): New.
6565 (do_warn_duplicated_branches_r): New.
6566 * c.opt (Wduplicated-branches): New option.
6567
0d80ab91
DM
65682017-01-17 David Malcolm <dmalcolm@redhat.com>
6569
6570 PR c++/71497
6571 * c-indentation.c (warn_for_misleading_indentation): Use the past
6572 subjunctive in the note.
6573
7f991c36
AH
65742017-01-17 Aldy Hernandez <aldyh@redhat.com>
6575
6576 PR c/79116
6577 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6578 start type to integer_type.
6579
1c70261c
JJ
65802017-01-16 Jakub Jelinek <jakub@redhat.com>
6581
6582 PR driver/49726
6583 * c.opt (gen-decls): Add Driver flag.
6584
1ddca3f3
PC
65852017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6586
6587 Revert:
6588 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6589
6590 PR c++/71737
6591 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6592
7d2f3f1d
PC
65932017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6594
6595 PR c++/71737
6596 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6597
bce6f760
MS
65982017-01-12 Martin Sebor <msebor@redhat.com>
6599
6600 (-Wformat-overflow): ...to this.
6601
bf5fbf46
MS
66022017-01-11 Martin Sebor <msebor@redhat.com>
6603
6604 PR c/78768
6605 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6606 Also enable for LTO.
6607
e363df3f
JM
66082017-01-10 Jason Merrill <jason@redhat.com>
6609
6610 Implement P0195R2, C++17 variadic using.
6611 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6612
bd2c6270
JJ
66132017-01-09 Jakub Jelinek <jakub@redhat.com>
6614
6615 PR translation/79019
6616 PR translation/79020
6617 * c.opt (Wnormalized=): Fix typo in description.
6618
efcc8d38
MS
66192017-01-08 Martin Sebor <msebor@redhat.com>
6620
6621 PR middle-end/77708
6622 * c.opt (-Wformat-truncation): New option.
6623
ab20d992 66242017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6625
6626 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6627 value to unsigned short to fit in 4 hex digits without
6628 warnings.
6629
4e89adf9
EB
66302017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6631
6632 * c.opt (fsso-struct): Add 'native' value.
6633
cd445b54
ML
66342017-01-05 Martin Liska <mliska@suse.cz>
6635
6636 PR pch/78970
6637 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6638 header.
6639
a9342885
MP
66402017-01-04 Marek Polacek <polacek@redhat.com>
6641
6642 PR c++/64767
6643 * c.opt (Wpointer-compare): New option.
6644
fc73e60c
JJ
66452017-01-04 Jakub Jelinek <jakub@redhat.com>
6646
6647 PR driver/78957
6648 * c.opt (fsso-struct=): Add RejectNegative.
6649
cbe34bb5
JJ
66502017-01-01 Jakub Jelinek <jakub@redhat.com>
6651
6652 Update copyright years.
6653
d4a6c0ea
ML
66542016-12-29 Martin Liska <mliska@suse.cz>
6655
6656 PR c/78933
6657 * c.opt (strong-eval-order): Add RejectNegative keyword.
6658
67a5ad7c
JM
66592016-12-22 Jason Merrill <jason@redhat.com>
6660
6661 Implement P0522R0, matching of template template arguments.
6662 * c-cppbuiltin.c (c_cpp_builtins): Define
6663 __cpp_template_template_args.
6664
0dba7960
JJ
66652016-12-21 Jakub Jelinek <jakub@redhat.com>
6666
6667 PR bootstrap/78817
6668 * c-common.c (struct nonnull_arg_ctx): New type.
6669 (check_function_nonnull): Return bool instead of void. Use
6670 nonnull_arg_ctx as context rather than just location_t.
6671 (check_nonnull_arg): Adjust for the new context type, set
6672 warned_p to true if a warning has been diagnosed.
6673 (check_function_arguments): Return bool instead of void.
6674 * c-common.h (check_function_arguments): Adjust prototype.
6675
31bfc9b9
JM
66762016-12-21 Jason Merrill <jason@redhat.com>
6677
6678 * c.opt (-fnew-ttp-matching): New flag.
6679 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6680
629b3d75
MJ
66812016-12-14 Martin Jambor <mjambor@suse.cz>
6682
6683 * c-omp.c: Include omp-general.h instead of omp-low.h.
6684 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6685 name.
6686
474da67e
MS
66872016-12-14 Martin Sebor <msebor@redhat.com>
6688
6689 PR c/17308
6690 * c-common.c (check_nonnull_arg): Disable when optimization
6691 is enabled.
6692
fe366b87
MP
66932016-12-12 Marek Polacek <polacek@redhat.com>
6694
6695 PR c++/78647
6696 * c-common.c (attribute_fallthrough_p): Return false for
6697 error_mark_node.
6698
8bd9f164
MS
66992016-12-08 Martin Sebor <msebor@redhat.com>
6700
6701 PR c/78284
6702 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6703
060162e0
MS
67042016-12-08 Martin Sebor <msebor@redhat.com>
6705
6706 PR c/78165
92a285c1
ML
6707 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6708 suffix.
060162e0 6709
ee92e7ba
MS
67102016-12-07 Martin Sebor <msebor@redhat.com>
6711
6712 PR c/53562
6713 PR middle-end/77784
6714 PR middle-end/78149
6715 PR middle-end/78138
6716 * c.opt (-Wstringop-overflow): New option.
6717
84b0769e
MO
67182016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6719
6720 * c-attribs.c (asan odr indicator): New attribute.
6721 (handle_asan_odr_indicator_attribute): New function.
6722
7fa6a965
PK
67232016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6724
6725 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6726 ptrdiff_type_node;
6727
56d8ffc1
JG
67282016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6729
6730 * c-common.c (excess_precision_mode_join): New.
6731 (c_ts18661_flt_eval_method): New.
6732 (c_c11_flt_eval_method): Likewise.
6733 (c_flt_eval_method): Likewise.
6734 * c-common.h (excess_precision_mode_join): New.
6735 (c_flt_eval_method): Likewise.
6736 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6737 (cpp_iec_559_value): Call it.
6738 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6739 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6740 __FLT_EVAL_METHOD_TS_18661_3__.
6741
04f0fcf7
JG
67422016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6743
6744 * c-opts.c (c_common_post_options): Add logic to handle the default
6745 case for -fpermitted-flt-eval-methods.
6746
fb2675cb
PB
67472016-11-23 Paolo Bonzini <bonzini@gnu.org>
6748
6749 * c.opt (Wexpansion-to-defined): New.
6750
ec1c5694
JJ
67512016-11-23 Jakub Jelinek <jakub@redhat.com>
6752
6753 PR target/78451
6754 * c-pragma.c (handle_pragma_target): Don't replace
6755 current_target_pragma, but chainon the new args to the current one.
6756
730c9e75
NS
67572016-11-22 Nathan Sidwell <nathan@acm.org>
6758
6759 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6760 indentation and formatting.
730c9e75 6761
89990732
MS
67622016-11-21 Martin Sebor <msebor@redhat.com>
6763
6764 * c.opt (-fprintf-return-value): Enable by default.
6765
48330c93
BE
67662016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6767
6768 PR c++/71973
6769 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6770 * c-common.c (c_common_nodes_and_builtins): Initialize
6771 const_tm_ptr_type_node.
6772
0d939c95
MP
67732016-11-16 Marek Polacek <polacek@redhat.com>
6774
6775 PR c/78285
6776 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6777
8e745a17
JJ
67782016-11-14 Jakub Jelinek <jakub@redhat.com>
6779
6780 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6781
1ee62b92 67822016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6783 Richard Biener <rguenther@suse.de>
6784
6785 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6786 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6787 * c.opt (fgimple): New option.
1ee62b92 6788
22b15758
UB
67892016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6790
6791 PR c/35503
6792 * c-common.h (warn_for_restrict): Declare.
6793 * c-warn.c: Include gcc-rich-location.h.
6794 (warn_for_restrict): New function.
6795 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6796 (gcc_cdiag_char_table): Likewise.
6797 (gcc_cxxdiag_char_table): Likewise.
6798 * c.opt (Wrestrict): New option.
6799
4be719cd
EB
68002016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6801
6802 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6803 for nested types only if the type is a record or union and dump SLOC.
6804
4a826ca6
JM
68052016-11-09 Jason Merrill <jason@redhat.com>
6806
6807 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6808
2e955d50
JJ
68092016-11-09 Jakub Jelinek <jakub@redhat.com>
6810
6811 * c-ubsan.c (ubsan_instrument_shift): Handle split
6812 -fsanitize=shift-base and -fsanitize=shift-exponent.
6813
51dc6603
JM
68142016-11-07 Jason Merrill <jason@redhat.com>
6815
6816 * c.opt (Wc++1z-compat): New.
6817 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6818
6dc4a604
ML
68192016-11-07 Martin Liska <mliska@suse.cz>
6820
6821 * c-warn.c (warn_for_unused_label): Save all labels used
6822 in goto or in &label.
6823
b302001e
JM
68242016-11-03 Jason Merrill <jason@redhat.com>
6825
6826 * c-cppbuiltin.c (c_cpp_builtins): Correct
6827 __cpp_inheriting_constructors.
6828
31f7f784
JM
68292016-11-01 Jason Merrill <jason@redhat.com>
6830
2bc78e3c
JM
6831 * c-cppbuiltin.c (c_cpp_builtins): Update
6832 __cpp_inheriting_constructors.
6833
31f7f784
JM
6834 * c.opt (-fnew-inheriting-ctors): New.
6835 * c-opts.c: Default to on for ABI 11+.
6836
dcb466ec
JJ
68372016-10-31 Jakub Jelinek <jakub@redhat.com>
6838
6839 PR c++/77948
6840 * c.opt (fext-numeric-literals): Add Var and Init.
6841 * c-opts.c (c_common_handle_option): Don't clear
6842 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6843 (c_common_post_options): Clear it here if not set
6844 explicitly.
6845
52e1b91e
AH
68462016-10-28 Aldy Hernandez <aldyh@redhat.com>
6847
6848 PR debug/77773
6849 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6850 if NULL.
6851
e16f1cc7
JJ
68522016-10-25 Jakub Jelinek <jakub@redhat.com>
6853
6854 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6855 * c-common.c (c_common_reswords): Add __builtin_launder.
6856
f8348061
BE
68572016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6858
6859 * c-common.c (c_common_truthvalue_conversion): Warn for
6860 multiplications in boolean context. Fix the quoting of '<<' and '<'
6861 in the shift warning.
6862
eff89e01
BE
68632016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6864
6865 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6866
24bc7bf4
JM
68672016-10-20 Jason Merrill <jason@redhat.com>
6868
6869 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6870
4c712374
BE
68712016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6872
6873 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6874 integer shift ops in boolean context.
6875
68762016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6877
6878 * c.opt (Walloca): New.
6879 (Walloca-larger-than=): New.
6880 (Wvla-larger-than=): New.
6881
8fa18c06
MP
68822016-10-17 Marek Polacek <polacek@redhat.com>
6883
6884 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6885 Return immediately when finding a match.
6886 (warn_tautological_cmp): Remove a boolean variable that is no longer
6887 needed.
6888
b12b1915
MP
68892016-10-17 Marek Polacek <polacek@redhat.com>
6890
6891 * c-attribs.c: New file.
6892 * c-common.c: Move attributes handling to c-attribs.c.
6893 (get_nonnull_operand): No longer static.
6894 * c-common.h: Move the declarations from c-attribs.c to its own section.
6895
2045acd9
JM
68962016-10-14 Jason Merrill <jason@redhat.com>
6897
6898 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6899 and __cpp_deduction_guides.
6900
14a2c9aa
JM
69012016-10-13 Jason Merrill <jason@redhat.com>
6902
6903 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6904
4d0cdd0c
TP
69052016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6906
6907 * c-cppbuiltin.c: Include memmodel.h.
6908 * c-opts.c: Likewise.
6909 * c-pragma.c: Likewise.
6910 * c-warn.c: Likewise.
6911
70f6d5e1
JJ
69122016-10-12 Jakub Jelinek <jakub@redhat.com>
6913
6914 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6915 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6916 * c-opts.c (sanitize_cpp_opts): Initialize
6917 cpp_opts->cpp_warn_implicit_fallthrough.
6918
78f61294
MP
69192016-10-11 Marek Polacek <polacek@redhat.com>
6920
6921 * c-common.c (warning_candidate_p): Change the return type to bool
6922 and return true/false instead of 1/0.
6923 (vector_mode_valid_p): Likewise.
6924
038b5cc0
MP
69252016-10-11 Marek Polacek <polacek@redhat.com>
6926
6927 * c-common.c (fold_for_warn): No longer static.
6928 (bool_promoted_to_int_p): Likewise.
6929 (c_common_get_narrower): Likewise.
6930 (constant_expression_warning): Move to c-warn.c.
6931 (constant_expression_error): Likewise.
6932 (overflow_warning): Likewise.
6933 (warn_logical_operator): Likewise.
6934 (find_array_ref_with_const_idx_r): Likewise.
6935 (warn_tautological_cmp): Likewise.
6936 (expr_has_boolean_operands_p): Likewise.
6937 (warn_logical_not_parentheses): Likewise.
6938 (warn_if_unused_value): Likewise.
6939 (strict_aliasing_warning): Likewise.
6940 (sizeof_pointer_memaccess_warning): Likewise.
6941 (check_main_parameter_types): Likewise.
6942 (conversion_warning): Likewise.
6943 (warnings_for_convert_and_check): Likewise.
6944 (match_case_to_enum_1): Likewise.
6945 (match_case_to_enum): Likewise.
6946 (c_do_switch_warnings): Likewise.
6947 (warn_for_omitted_condop): Likewise.
6948 (readonly_error): Likewise.
6949 (lvalue_error): Likewise.
6950 (invalid_indirection_error): Likewise.
6951 (warn_array_subscript_with_type_char): Likewise.
6952 (warn_about_parentheses): Likewise.
6953 (warn_for_unused_label): Likewise.
6954 (warn_for_div_by_zero): Likewise.
6955 (warn_for_memset): Likewise.
6956 (warn_for_sign_compare): Likewise.
6957 (do_warn_double_promotion): Likewise.
6958 (do_warn_unused_parameter): Likewise.
6959 (record_locally_defined_typedef): Likewise.
6960 (maybe_record_typedef_use): Likewise.
6961 (maybe_warn_unused_local_typedefs): Likewise.
6962 (maybe_warn_bool_compare): Likewise.
6963 (maybe_warn_shift_overflow): Likewise.
6964 (warn_duplicated_cond_add_or_warn): Likewise.
6965 (diagnose_mismatched_attributes): Likewise.
6966 * c-common.h: Move the declarations from c-warn.c to its own section.
6967 * c-warn.c: New file.
6968
627be19f
JM
69692016-10-08 Jason Merrill <jason@redhat.com>
6970
6971 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6972 into COND_EXPR in C++.
6973
7bad794a
JJ
69742016-10-08 Jakub Jelinek <jakub@redhat.com>
6975
6976 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6977 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6978 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6979
be845b04
JJ
69802016-10-07 Jakub Jelinek <jakub@redhat.com>
6981
6982 Implement LWG2296 helper intrinsic
6983 * c-common.h (enum rid): Add RID_ADDRESSOF.
6984 * c-common.c (c_common_reswords): Add __builtin_addressof.
6985
c09c4992
BE
69862016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6987
6988 PR c++/77700
6989 * c-common.c (c_common_truthvalue_conversion): Warn also for
6990 suspicious enum values in boolean context.
6991
342cfb3e
JJ
69922016-10-06 Jakub Jelinek <jakub@redhat.com>
6993
6994 Implement P0258R2 - helper for C++17
6995 std::has_unique_object_representations trait
6996 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6997 * c-common.c (c_common_reswords): Add
6998 __has_unique_object_representations.
6999
2e69f143
JJ
70002016-10-05 Jakub Jelinek <jakub@redhat.com>
7001
7002 PR sanitizer/66343
7003 * c-ubsan.c (ubsan_instrument_return): Don't call
7004 initialize_sanitizer_builtins here.
7005
700fff34
BE
70062016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7007
7008 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7009 conditional expression in boolean context when only one arm is
7010 non-boolean.
7011
9563bfcd
JJ
70122016-10-05 Jakub Jelinek <jakub@redhat.com>
7013
04a32443
JJ
7014 PR sanitizer/77823
7015 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7016 is not integral.
7017
9563bfcd
JJ
7018 * c-common.c (c_common_reswords): Update comment for C++11.
7019
f1644724
JM
70202016-10-04 Jason Merrill <jason@redhat.com>
7021
7022 * c-common.c (make_tree_vector_from_ctor): New.
7023 * c-common.h: Declare it.
7024
5a79befb
JJ
70252016-10-04 Jakub Jelinek <jakub@redhat.com>
7026
7027 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7028 __LIBGCC_JCR_SECTION_NAME__.
7029
1633d3b9
BE
70302016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7031
7032 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7033 left shift in boolean context.
7034
a2c6e7f2
JJ
70352016-09-29 Jakub Jelinek <jakub@redhat.com>
7036
7037 Implement P0001R1 - C++17 removal of register storage class specifier
7038 * c.opt (Wregister): New warning.
7039 * c-opts.c (c_common_post_options): Enable -Wregister by
7040 default for C++17.
7041
75304c87
JG
70422016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7043
7044 * c-opts.c (c_common_post_options): Remove special case for
7045 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7046 in C++.
7047
bbfac6da
JJ
70482016-09-27 Jakub Jelinek <jakub@redhat.com>
7049
6e39060a
JJ
7050 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7051 -std=c++1z.
7052
bbfac6da
JJ
7053 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7054
e73cf9a2
TP
70552016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7056
7057 * c-common.c: Include memmodel.h.
7058
c6147dc4
MP
70592016-09-26 Marek Polacek <polacek@redhat.com>
7060
7061 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7062
81fea426
MP
70632016-09-26 Marek Polacek <polacek@redhat.com>
7064
7065 PR c/7652
7066 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7067 (handle_fallthrough_attribute): New function.
7068 (attribute_fallthrough_p): New function.
7069 * c-common.h (attribute_fallthrough_p): Declare.
7070
9a2300e9
MP
70712016-09-24 Marek Polacek <polacek@redhat.com>
7072
7073 PR c/77490
7074 * c.opt (Wbool-operation): New.
7075
a09e9e35
BE
70762016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7077
7078 * c-common.c (c_common_truthvalue_conversion): Inhibit
7079 Wint-in-bool-context warning with from_macro_definition_at.
7080 Mention the expression will always evaluate to true.
7081
d43b4ccc
MS
70822016-09-21 Martin Sebor <msebor@redhat.com>
7083
7084 PR bootstrap/77676
7085 * c.opt (fprintf-return-value): Temporarily initialize to zero
7086 to unblock bootstrap failures.
7087
2e1c20b1
JJ
70882016-09-21 Jakub Jelinek <jakub@redhat.com>
7089
7090 PR c++/77651
7091 * c.opt (Waligned-new=): Add RejectNegative.
7092 (faligned-new=): Likewise. Spelling fix - change
7093 aligned_new_threshhold to aligned_new_threshold.
7094 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7095 to aligned_new_threshold.
7096
88d0c3f0
MS
70972016-09-20 Martin Sebor <msebor@redhat.com>
7098
7099 PR middle-end/49905
7100 * c.opt: Add -Wformat-length and -fprintf-return-value.
7101
144a96e4
BE
71022016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7103
7104 PR c++/77434
7105 * c.opt (Wint-in-bool-context): New warning.
7106 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7107 constants in boolean context.
7108
63012d9a
JM
71092016-09-19 Joseph Myers <joseph@codesourcery.com>
7110
7111 * c-common.c (max_align_t_align): Also consider alignment of
7112 float128_type_node.
7113
931388ce
JM
71142016-09-15 Jason Merrill <jason@redhat.com>
7115
7116 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7117 DECL_EXTERNAL.
7118
38711381
JM
71192016-09-14 Jason Merrill <jason@redhat.com>
7120
7121 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7122 limit FIELD_DECL, either.
7123
e51fbec3
MP
71242016-09-14 Marek Polacek <polacek@redhat.com>
7125
7126 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7127 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7128 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7129
254830ba
DM
71302016-09-13 David Malcolm <dmalcolm@redhat.com>
7131
7132 * c-common.c (warn_logical_not_parentheses): Replace
7133 rich_location::add_fixit_insert calls with add_fixit_insert_before
7134 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7135
42763690
JM
71362016-09-13 Jason Merrill <jason@redhat.com>
7137 Tom de Vries <tom@codesourcery.com>
7138
7139 PR c++/77427
7140 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7141
9453eee9
JM
71422016-09-13 Jason Merrill <jason@redhat.com>
7143
7144 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7145 limit types at all.
7146
e96809e3
JM
71472016-09-12 Jason Merrill <jason@redhat.com>
7148
7149 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7150 bit/byte confusion, allow large alignment for types.
7151
54dcdb88
BE
71522016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7153
7154 PR c++/77496
7155 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7156
d1463eb9
DM
71572016-09-12 David Malcolm <dmalcolm@redhat.com>
7158
7159 PR c/72858
7160 * c-format.c (argument_parser::check_argument_type): Add params
7161 "type_start" and "conversion_char". Use the former to generate
7162 offset_to_type_start and pass it and conversion_char to
7163 check_format_types.
7164 (check_format_info_main): Capture the start of the type
7165 information as "type_start", and pass it an format_char
7166 to arg_parser.check_argument_type.
7167 (check_format_types): Provide an example in the leading comment.
7168 Add params "offset_to_type_start" and "conversion_char"; pass
7169 them to format_type_warning calls.
7170 (test_get_modifier_for_format_len): Likewise.
7171 (matching_type_p): New function.
7172 (get_format_for_type): Add param "conversion_char" and move
7173 implementation into...
7174 (get_format_for_type_1): ...new function, called twice.
7175 Use new function matching_type_p rather than checking for
7176 TYPE_CANONICAL equality.
7177 (get_corrected_substring): New function.
7178 (format_type_warning): Provide an example in the leading comment.
7179 Add params "offset_to_type_start" and "conversion_char". Replace
7180 call to get_format_for_type with call to get_corrected_substring
7181 and move rejection of hints for widths/precisions there.
7182 (assert_format_for_type_streq): Add param "conversion_char".
7183 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7184 (test_get_format_for_type_printf): Add conversion chars to the
7185 tests, adding coverage for various combinations of integer
7186 vs double conversions, and for preserving octal and hexadecimal
7187 conversions.
7188 (test_get_format_for_type_scanf): Add conversion chars to the
7189 tests.
7190
5b28efbb
TV
71912016-09-10 Tom de Vries <tom@codesourcery.com>
7192
7193 PR C/71602
7194 * c-common.c (build_va_arg): Handle more strict
7195 targetm.canonical_va_list_type. Replace first argument type error with
7196 assert.
7197
3f0177e7
MS
71982016-09-09 Martin Sebor <msebor@redhat.com>
7199
7200 PR c/77520
7201 PR c/77521
7202 * c-format.c (argument_parser::find_format_char_info): Use %qc
7203 format directive unconditionally.
7204
af63ba4b
JM
72052016-09-09 Jason Merrill <jason@redhat.com>
7206
7207 Implement C++17 new of over-aligned types.
7208 * c.opt: Add -faligned-new and -Waligned-new.
7209 * c-common.c (max_align_t_align): Split out from...
7210 (cxx_fundamental_alignment_p): ...here.
7211 * c-common.h: Declare it.
7212 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7213
c65248cb
JM
72142016-09-09 Joseph Myers <joseph@codesourcery.com>
7215
7216 * c-cppbuiltin.c (builtin_define_type_width): New function.
7217 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7218 macros.
7219
e5106e27
DM
72202016-09-07 David Malcolm <dmalcolm@redhat.com>
7221
7222 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7223 a POINTER_TYPE.
7224 (substring_loc::get_location): Move to substring-locations.c,
7225 keeping implementation as...
7226 (c_get_substring_location): New function, from the above, reworked
7227 to use accessors rather than member lookup.
7228 * c-common.h (class substring_loc): Move to substring-locations.h,
7229 replacing with a forward decl.
7230 (c_get_substring_location): New decl.
7231 * c-format.c: Include "substring-locations.h".
7232 (format_warning_va): Move to substring-locations.c.
7233 (format_warning_at_substring): Likewise.
7234
ab20d992 72352016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7236
7237 PR c/77336
7238 * c-format.c (check_function_format): Avoid issuing warnings for
7239 functions unless they call format functions with non-constant
7240 format strings.
7241
b772a565
RB
72422016-09-06 Richard Biener <rguenther@suse.de>
7243
7244 PR c/77450
7245 * c-common.c (c_common_mark_addressable_vec): Handle
7246 COMPOUND_LITERAL_EXPR.
7247
25ff5dd3
MP
72482016-09-05 Marek Polacek <polacek@redhat.com>
7249
7250 PR c/77423
7251 * c-common.c (bool_promoted_to_int_p): New function.
7252 (expr_has_boolean_operands_p): New function.
7253 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7254 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7255
21234eb5
TV
72562016-09-04 Tom de Vries <tom@codesourcery.com>
7257
7258 revert:
7259 2016-08-29 Tom de Vries <tom@codesourcery.com>
7260
7261 * c-common.c (build_va_arg): Replace first argument type error
7262 with assert.
7263
9dc5773f
JJ
72642016-09-02 Jakub Jelinek <jakub@redhat.com>
7265
7266 PR c/65467
7267 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7268 (c_finish_omp_for): Reject _Atomic qualified iterators.
7269
72702016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7271
7272 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7273 size to guarantee it fits the output of the formatted function
7274 regardless of its arguments.
7275
295844f6
MP
72762016-09-01 Marek Polacek <polacek@redhat.com>
7277
7278 PR c/7652
7279 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7280 FALLTHRU comments.
7281
3d06b6f2
MP
72822016-08-29 Marek Polacek <polacek@redhat.com>
7283
7284 PR c/77292
7285 * c-common.c (warn_logical_not_parentheses): Don't warn for
7286 a comparison or a logical operator.
7287
34cedad5
TV
72882016-08-29 Tom de Vries <tom@codesourcery.com>
7289
7290 * c-common.c (build_va_arg): Fix type comparison assert.
7291
f162d717
TV
72922016-08-29 Tom de Vries <tom@codesourcery.com>
7293
7294 * c-common.c (build_va_arg): Replace first argument type error
7295 with assert.
7296
ba9bbd6f
TV
72972016-08-29 Tom de Vries <tom@codesourcery.com>
7298
7299 PR c/77398
7300 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7301 with error_mark_node as va_list instead of with illegal va_list.
7302
ebef225f
MP
73032016-08-25 Marek Polacek <polacek@redhat.com>
7304 David Malcolm <dmalcolm@redhat.com>
7305
7306 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7307 * c-common.h (warn_logical_not_parentheses): Update declaration.
7308
b00e6e75
MP
73092016-08-22 Marek Polacek <polacek@redhat.com>
7310
7311 PR c++/77321
7312 * c-common.c (warn_for_memset): Check type for null.
7313
6dc198e3
JM
73142016-08-22 Joseph Myers <joseph@codesourcery.com>
7315
14ec014e 7316 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7317 _FloatNx types for suffixes for built-in functions.
7318
c65699ef
JM
73192016-08-19 Joseph Myers <joseph@codesourcery.com>
7320
7321 PR c/32187
7322 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7323 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7324 (RID_FLOAT128X): New enum rid values.
7325 (CASE_RID_FLOATN_NX): New macro.
7326 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7327 keywords.
7328 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7329 corresponding complex types.
7330 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7331 _FloatNx and corresponding complex types.
7332 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7333 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7334 and _FloatNx types for the widest type for determining
7335 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7336 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7337 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7338 and _FloatNx types.
7339 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7340 constants.
7341 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7342 _FloatNx types.
7343
cc015f3a
DM
73442016-08-18 David Malcolm <dmalcolm@redhat.com>
7345
7346 * c-opts.c (c_diagnostic_finalizer): Update for change to
7347 diagnostic_show_locus.
7348
cb18fd07
DM
73492016-08-18 David Malcolm <dmalcolm@redhat.com>
7350
7351 * c-common.c: Include "spellcheck.h".
7352 (cb_get_suggestion): New function.
7353 * c-common.h (cb_get_suggestion): New decl.
7354 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7355 cb_get_suggestion.
7356
a76989dc
MP
73572016-08-18 Marek Polacek <polacek@redhat.com>
7358
7359 PR c/71514
7360 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7361 and pointer-to-VLA.
7362
65e736c0
DM
73632016-08-16 David Malcolm <dmalcolm@redhat.com>
7364
7365 PR c/72857
7366 * c-common.c (substring_loc::get_range): Rename to...
7367 (substring_loc::get_location): ...this, converting param from a
7368 source_range * to a location_t *. Call
7369 get_source_location_for_substring rather than
7370 get_source_range_for_substring, and pass in m_caret_idx.
7371 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7372 (substring_loc::get_range): Replace with...
7373 (substring_loc::get_location): ...this.
7374 (substring_loc::set_caret_index): New method.
7375 (substring_loc): Add field m_caret_idx.
7376 * c-format.c (format_warning_va): Update for above changes.
7377 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7378 clashing with type name.
7379 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7380 (check_argument_type): Likewise.
7381 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7382 Use a copy when emitting warnings, setting the caret index from TYPE.
7383
7e1dde14 73842016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7385 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7386
7387 * c-ada-spec.c (dump_number): New function.
7388 (handle_escape_character): Likewise.
7389 (print_ada_macros): Add handling of constant integers and strings.
7390
191816a3
MP
73912016-08-12 Marek Polacek <polacek@redhat.com>
7392
7393 PR c/7652
7394 * c-common.c (scalar_to_vector): Adjust fall through comment.
7395 * c-opts.c (c_common_handle_option): Likewise.
7396 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7397 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7398 fall through comment.
7399 * cilk.c (extract_free_variables): Add FALLTHRU.
7400
452df4a4
JM
74012016-08-10 Jason Merrill <jason@redhat.com>
7402
7403 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7404
f3365c12
JM
74052016-08-09 Jason Merrill <jason@redhat.com>
7406
7407 * c-common.c (c_common_attribute_table): vector_size affects type
7408 identity.
7409
f0bc3323
MP
74102016-08-09 Marek Polacek <polacek@redhat.com>
7411
7412 PR c/7652
7413 * c-ada-spec.c (dump_generic_ada_node): Add return.
7414
98e5a19a
JM
74152016-08-09 Jason Merrill <jason@redhat.com>
7416
7417 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7418 C++17 constexpr lambdas.
7419
895aa8e1
DM
74202016-08-08 David Malcolm <dmalcolm@redhat.com>
7421
7422 PR c/64955
7423 * c-common.h (selftest::c_format_c_tests): New declaration.
7424 (selftest::run_c_tests): New declaration.
7425 * c-format.c: Include "selftest.h.
7426 (format_warning_va): Add param "corrected_substring" and use
7427 it to add a replacement fix-it hint.
7428 (format_warning_at_substring): Likewise.
7429 (format_warning_at_char): Update for new param of
7430 format_warning_va.
7431 (argument_parser::check_argument_type): Pass "fki" to
7432 check_format_types.
7433 (check_format_types): Add param "fki" and pass it to
7434 format_type_warning.
7435 (deref_n_times): New function.
7436 (get_modifier_for_format_len): New function.
7437 (selftest::test_get_modifier_for_format_len): New function.
7438 (get_format_for_type): New function.
7439 (format_type_warning): Add param "fki" and use it to attempt
7440 to provide hints for argument types when calling
7441 format_warning_at_substring.
7442 (selftest::get_info): New function.
7443 (selftest::assert_format_for_type_streq): New function.
7444 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7445 (selftest::test_get_format_for_type_printf): New function.
7446 (selftest::test_get_format_for_type_scanf): New function.
7447 (selftest::c_format_c_tests): New function.
7448
e52ed3fe
DM
74492016-08-08 David Malcolm <dmalcolm@redhat.com>
7450
7451 PR c/52952
7452 * c-format.c: Include "diagnostic.h".
7453 (location_column_from_byte_offset): Delete.
7454 (location_from_offset): Delete.
7455 (format_warning_va): New function.
7456 (format_warning_at_substring): New function.
7457 (format_warning_at_char): New function.
7458 (check_format_arg): Capture location of format_tree and pass to
7459 check_format_info_main.
7460 (argument_parser): Add fields "start_of_this_format" and
7461 "format_string_cst".
7462 (flag_chars_t::validate): Add param "format_string_cst". Convert
7463 warning_at call using location_from_offset to call to
7464 format_warning_at_char.
7465 (argument_parser::argument_parser): Add param "format_string_cst_"
7466 and use use it to initialize field "format_string_cst".
7467 Initialize new field "start_of_this_format".
7468 (argument_parser::read_format_flags): Convert warning_at call
7469 using location_from_offset to a call to format_warning_at_char.
7470 (argument_parser::read_any_format_left_precision): Likewise.
7471 (argument_parser::read_any_format_precision): Likewise.
7472 (argument_parser::read_any_other_modifier): Likewise.
7473 (argument_parser::find_format_char_info): Likewise, in three places.
7474 (argument_parser::parse_any_scan_set): Likewise, in one place.
7475 (argument_parser::handle_conversions): Likewise, in two places.
7476 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7477 and use it to make a substring_loc. Pass the latter to
7478 check_format_types.
7479 (check_format_info_main): Add params "fmt_param_loc" and
7480 "format_string_cst". Convert warning_at calls using
7481 location_from_offset to calls to format_warning_at_char. Pass the
7482 new params to the arg_parser ctor. Pass "format_string_cst" to
7483 flag_chars.validate. Pass "fmt_param_loc" to
7484 arg_parser.check_argument_type.
7485 (check_format_types): Convert first param from a location_t
7486 to a const substring_loc & and rename to "fmt_loc". Attempt
7487 to extract the range of the relevant parameter and pass it
7488 to format_type_warning.
7489 (format_type_warning): Convert first param from a location_t
7490 to a const substring_loc & and rename to "fmt_loc". Add
7491 params "param_range" and "type". Replace calls to warning_at
7492 with calls to format_warning_at_substring.
7493
1c4d457e
DM
74942016-08-08 David Malcolm <dmalcolm@redhat.com>
7495
7496 * c-format.c (class flag_chars_t): New class.
7497 (struct length_modifier): New struct.
7498 (class argument_parser): New class.
7499 (flag_chars_t::flag_chars_t): New ctor.
7500 (flag_chars_t::has_char_p): New method.
7501 (flag_chars_t::add_char): New method.
7502 (flag_chars_t::validate): New method.
7503 (flag_chars_t::get_alloc_flag): New method.
7504 (flag_chars_t::assignment_suppression_p): New method.
7505 (argument_parser::argument_parser): New ctor.
7506 (argument_parser::read_any_dollar): New method.
7507 (argument_parser::read_format_flags): New method.
7508 (argument_parser::read_any_format_width): New method.
7509 (argument_parser::read_any_format_left_precision): New method.
7510 (argument_parser::read_any_format_precision): New method.
7511 (argument_parser::handle_alloc_chars): New method.
7512 (argument_parser::read_any_length_modifier): New method.
7513 (argument_parser::read_any_other_modifier): New method.
7514 (argument_parser::find_format_char_info): New method.
7515 (argument_parser::validate_flag_pairs): New method.
7516 (argument_parser::give_y2k_warnings): New method.
7517 (argument_parser::parse_any_scan_set): New method.
7518 (argument_parser::handle_conversions): New method.
7519 (argument_parser::check_argument_type): New method.
7520 (check_format_info_main): Introduce classes argument_parser
7521 and flag_chars_t, moving the code within the loop into methods
7522 of these classes. Make various locals "const".
7523
88fa5555
DM
75242016-08-05 David Malcolm <dmalcolm@redhat.com>
7525
7526 * c-common.c: Include "substring-locations.h".
7527 (get_cpp_ttype_from_string_type): New function.
7528 (g_string_concat_db): New global.
7529 (substring_loc::get_range): New method.
7530 * c-common.h (g_string_concat_db): New declaration.
7531 (class substring_loc): New class.
7532 * c-lex.c (lex_string): When concatenating strings, capture the
7533 locations of all tokens using a new obstack, and record the
7534 concatenation locations within g_string_concat_db.
7535 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7536 on the ggc-heap.
7537
78169471
MP
75382016-07-29 Marek Polacek <polacek@redhat.com>
7539
638fc14f
MP
7540 PR c/71926
7541 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7542 parentheses warning.
7543
78169471
MP
7544 PR c/71574
7545 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7546
1225d6b1
ML
75472016-07-28 Martin Liska <mliska@suse.cz>
7548
7549 PR gcov-profile/68025
7550 * c-common.c (handle_no_profile_instrument_function_attribute):
7551
ec1e2a40
BE
75522016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7553
7554 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7555 BITS_PER_UNIT_LOG.
7556
5ec2cd9f
JM
75572016-07-25 Jason Merrill <jason@redhat.com>
7558
7559 PR c++/65970
7560 * c.opt (fconstexpr-loop-limit): New.
7561
9dc5773f 75622016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7563
7564 PR c++/71675
7565 * c-common.c (resolve_overloaded_builtin): Avoid converting
7566 __atomic_compare_exchange_n return type to that of what its
7567 first argument points to.
7568
e3fe09c1
UB
75692016-07-22 Uros Bizjak <ubizjak@gmail.com>
7570
7571 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7572 ~(unsigned HOST_WIDE_INT) 0.
7573
bc91c436
ML
75742016-07-22 Martin Liska <mliska@suse.cz>
7575
7576 PR gcov-profile/69028
7577 PR gcov-profile/62047
7578 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7579 to the current_function_decl.
7580
451dcc66
JM
75812016-07-21 Jason Merrill <jason@redhat.com>
7582
7583 PR c++/65168
7584 * c-common.c (c_common_truthvalue_conversion): Check
7585 c_inhibit_evaluation_warnings for warning about address of
7586 reference.
7587
de6a69ee
DM
75882016-07-20 David Malcolm <dmalcolm@redhat.com>
7589
7590 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7591 const char *.
7592
d022c55a
JM
75932016-07-15 Jason Merrill <jason@redhat.com>
7594
7595 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7596
ddbbcb19
JJ
75972016-07-15 Jakub Jelinek <jakub@redhat.com>
7598
7599 PR c/71858
7600 * c-common.h (enum lookup_name_fuzzy_kind): Add
7601 FUZZY_LOOKUP_FUNCTION_NAME.
7602
d0cf395a
JM
76032016-07-08 Jason Merrill <jason@redhat.com>
7604
7605 P0145: Refining Expression Order for C++.
7606 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7607 * c-opts.c: Adjust.
7608
98d44e93
MT
76092016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7610
7611 PR c++/71214
7612 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7613
f9d8d994
TS
76142016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7615
7616 * c-pragma.h (enum pragma_kind): Rename
7617 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7618 users.
7619
4aa83879
RB
76202016-06-29 Richard Biener <rguenther@suse.de>
7621
7622 PR middle-end/71002
7623 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7624
a25bd9e6
JM
76252016-06-24 Jason Merrill <jason@redhat.com>
7626
7627 P0145R2: Refining Expression Order for C++.
7628 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7629 MODIFY_EXPR.
7630
a86451b9
JJ
76312016-06-24 Jakub Jelinek <jakub@redhat.com>
7632
7633 * c-common.c (check_builtin_function_arguments): Require last
7634 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7635 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7636 if the last argument is pointer to enumerated or boolean type.
7637
1a4f11c8
DM
76382016-06-22 David Malcolm <dmalcolm@redhat.com>
7639
7640 PR c/70339
7641 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7642 (lookup_name_fuzzy): New prototype.
7643
fe55692c
JDA
76442016-06-21 John David Anglin <danglin@gcc.gnu.org>
7645
7646 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7647
4eb24e01
JM
76482016-06-14 Jason Merrill <jason@redhat.com>
7649
7650 P0145R2: Refining Expression Order for C++.
7651 * c.opt (fargs-in-order): New.
7652 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7653
ef7cf206
JJ
76542016-06-13 Jakub Jelinek <jakub@redhat.com>
7655
0dda258b
JJ
7656 PR sanitizer/71498
7657 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7658 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7659
ef7cf206
JJ
7660 PR preprocessor/71183
7661 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7662 to cb_get_source_date_epoch.
7663
50b15873
JJ
76642016-06-10 Jakub Jelinek <jakub@redhat.com>
7665
7666 PR c/68657
7667 * c.opt (Wpsabi): Add Warning flag.
7668
4d926e34
MS
76692016-06-10 Martin Sebor <msebor@redhat.com>
7670
7671 PR c/71392
14ec014e 7672 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7673 the nonnull attribute in type-generic builtins.
7674
e01b4e16
MS
76752016-06-09 Martin Sebor <msebor@redhat.com>
7676
7677 PR c/70883
7678 * c-common.c (builtin_function_validate_nargs): Make text of error
7679 message consistent with others like it.
7680
44a845ca
MS
76812016-06-08 Martin Sebor <msebor@redhat.com>
7682 Jakub Jelinek <jakub@redhat.com>
7683
7684 PR c++/70507
7685 PR c/68120
7686 * c-common.c (check_builtin_function_arguments): Handle
7687 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7688
a80a7051
RB
76892016-06-08 Richard Biener <rguenther@suse.de>
7690
7691 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7692
bfd67b47
RB
76932016-06-07 Richard Biener <rguenther@suse.de>
7694
7695 PR c/61564
7696 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7697 options and warn about others.
7698
15c98b2e
ES
76992016-06-01 Eduard Sanou <dhole@openmailbox.org>
7700
7701 * c-common.c (get_source_date_epoch): Rename to
7702 cb_get_source_date_epoch.
7703 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7704 message when the parsing fails. Use error_at instead of fatal_error.
7705 * c-common.h (get_source_date_epoch): Rename to
7706 cb_get_source_date_epoch.
7707 * c-common.h (cb_get_source_date_epoch): Prototype.
7708 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7709 * c-common.h (c_omp_region_type): Remove trailing comma.
7710 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7711 * c-lex.c (c_lex_with_flags): Remove initialization of
7712 pfile->source_date_epoch.
7713
00631022
JJ
77142016-05-30 Jakub Jelinek <jakub@redhat.com>
7715
7716 PR c++/71349
7717 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7718 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7719 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7720 instead of C_OMP_CLAUSE_SPLIT_FOR.
7721
f17a223d
RB
77222016-05-24 Richard Biener <rguenther@suse.de>
7723
7724 PR middle-end/70434
7725 PR c/69504
7726 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7727 (convert_vector_to_array_for_subscript): ... this.
7728 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7729 VIEW_CONVERT_EXPR to an array type. Rename to ...
7730 (convert_vector_to_array_for_subscript): ... this.
7731
4f2e1536
MP
77322016-05-12 Marek Polacek <polacek@redhat.com>
7733
7734 PR c/70756
7735 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7736 size_in_bytes and pass LOC to it.
7737
d6e83a8d
MM
77382016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7739
7740 PR c/43651
7741 * c.opt (Wduplicate-decl-specifier): New option.
7742
5c3a10fb
MP
77432016-05-11 Marek Polacek <polacek@redhat.com>
7744
7745 PR c++/71024
7746 * c-common.c (diagnose_mismatched_attributes): New function.
7747 * c-common.h (diagnose_mismatched_attributes): Declare.
7748
deef7113
MP
77492016-05-04 Marek Polacek <polacek@redhat.com>
7750
7751 * c.opt (Wdangling-else): New option.
7752
79ce98bc
MP
77532016-05-03 Marek Polacek <polacek@redhat.com>
7754
7755 PR c/70859
7756 * c-common.c (builtin_function_validate_nargs): Add location
7757 parameter. Use it.
7758 (check_builtin_function_arguments): Add location and arguments
7759 parameters. Use them.
7760 * c-common.h (check_builtin_function_arguments): Update declaration.
7761
381cdae4
RB
77622016-05-03 Richard Biener <rguenther@suse.de>
7763
7764 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7765 allow call args to gimplify to SSA names.
7766
1d793c34
MP
77672016-05-03 Marek Polacek <polacek@redhat.com>
7768
7769 * c-common.h (enum c_omp_region_type): Remove stray comma.
7770
77886428
CP
77712016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7772
7773 * c-common.h (enum c_omp_region_type): Define.
7774
697e0b28
RS
77752016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7776
7777 * c-common.c (shorten_compare): Use wi::to_wide.
7778
e7ff0319
CP
77792016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7780
7781 PR middle-end/70626
7782 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7783 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7784 reduction clauses in acc parallel loops.
7785
2fff3db8
MP
77862016-04-29 Marek Polacek <polacek@redhat.com>
7787
7788 PR c/70852
7789 * c-common.c (warn_for_memset): Check domain before accessing it.
7790
509063eb
DV
77912016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7792
7793 PR/69089
7794 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7795 "aligned" attribute.
7796
b632761d
JM
77972016-04-28 Jason Merrill <jason@redhat.com>
7798
7799 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7800
174f6622
ES
78012016-04-28 Eduard Sanou <dhole@openmailbox.org>
7802 Matthias Klose <doko@debian.org>
7803
7804 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7805 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7806 handling.
7807 * c-common.h (get_source_date_epoch): Prototype.
7808 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7809
6bc2bb18
RB
78102015-04-27 Ryan Burn <contact@rnburn.com>
7811
7812 PR c++/69024
7813 PR c++/68997
7814 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7815 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7816 external linkage.
7817 (cilk_detect_and_unwrap): Corresponding changes.
7818 (extract_free_variables): Don't extract free variables from
7819 AGGR_INIT_EXPR slot.
7820 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7821 (cilk_recognize_spawn): Likewise.
7822
c1e1f433
BS
78232016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7824
7825 * c.opt (Wmemset-elt-size): New option.
7826 * c-common.c (warn_for_memset): New function.
7827 * c-common.h (warn_for_memset): Declare.
7828
d067e05f
JM
78292016-04-25 Jason Merrill <jason@redhat.com>
7830
7831 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7832 No longer static.
7833 * c-common.h: Declare it.
7834 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7835
9aa36ae5
JM
78362016-04-22 Jason Merrill <jason@redhat.com>
7837
7838 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7839
477d4906
IV
78402016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7841
7842 PR c++/69363
7843 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7844 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7845
fe37c7af
MM
78462016-04-18 Michael Matz <matz@suse.de>
7847
7848 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7849 and SET_DECL_ALIGN.
7850
23f2660f
EB
78512016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7852
7853 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7854 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7855 to incomplete types.
7856 (dump_nested_type): Remove redundant tests and tidy up.
7857 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7858 a type which is the typedef of an original type.
7859
1e77281b
MP
78602016-04-15 Marek Polacek <polacek@redhat.com>
7861
7862 PR c/70651
7863 * c-common.c (build_va_arg): Change two asserts into errors and return
7864 error_mark_node.
7865
b3a77f21
MP
78662016-04-13 Marek Polacek <polacek@redhat.com>
7867
7868 PR c++/70639
7869 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7870 for switch statements, too.
7871
322b8466
JM
78722016-03-28 Jason Merrill <jason@redhat.com>
7873
7874 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7875
fbdb6baf
MP
78762016-03-23 Marek Polacek <polacek@redhat.com>
7877
7878 PR c++/69884
7879 * c.opt (Wignored-attributes): New option.
7880
5c240f4d
DM
78812016-03-22 David Malcolm <dmalcolm@redhat.com>
7882
7883 PR c/69993
7884 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7885 diagnostic text, reversing the order of the warning and note so
7886 that they appear in source order.
7887
14ba7b28
MP
78882016-03-17 Marek Polacek <polacek@redhat.com>
7889
7890 PR c/69407
7891 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7892 operations.
7893
08a1cadc
JM
78942016-03-14 Jason Merrill <jason@redhat.com>
7895
2aaeea19
JM
7896 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7897
08a1cadc
JM
7898 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7899
c06d25bb
RB
79002016-03-09 Richard Biener <rguenther@suse.de>
7901
7902 PR c/70143
7903 * c-common.c (strict_aliasing_warning): Add back
7904 alias_sets_conflict_p check.
7905
80aac5c8
JM
79062016-03-08 Jason Merrill <jason@redhat.com>
7907
7908 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7909
64b23c13
DM
79102016-03-04 David Malcolm <dmalcolm@redhat.com>
7911
7912 PR c/68187
7913 * c-indentation.c (get_visual_column): Move code to determine next
7914 tab stop to...
7915 (next_tab_stop): ...this new function.
7916 (line_contains_hash_if): Delete function.
7917 (detect_preprocessor_logic): Delete function.
7918 (get_first_nws_vis_column): New function.
7919 (detect_intervening_unindent): New function.
7920 (should_warn_for_misleading_indentation): Replace call to
7921 detect_preprocessor_logic with a call to
7922 detect_intervening_unindent.
7923
729526f5
DM
79242016-03-04 David Malcolm <dmalcolm@redhat.com>
7925
7926 PR c/68187
7927 * c-indentation.c (should_warn_for_misleading_indentation): When
7928 suppressing warnings about cases where the guard and body are on
7929 the same column, only use the first non-whitespace column in place
7930 of the guard token column when dealing with "else" clauses.
7931 When rejecting aligned BODY and NEXT, loosen the requirement
7932 from equality with the first non-whitespace of guard to simply
7933 that they not be indented relative to it.
7934
e9a35493
RB
79352016-03-04 Richard Biener <rguenther@suse.de>
7936
7937 PR c++/70054
7938 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7939 instead of alias_sets_conflict_p.
7940
1be56bc5
MP
79412016-03-01 Marek Polacek <polacek@redhat.com>
7942
7943 PR c++/69795
7944 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7945 any DECL.
7946
35886f0b
MS
79472016-02-22 Martin Sebor <msebor@redhat.com>
7948
7949 PR middle-end/69780
7950 * c-common.c (check_builtin_function_arguments): Validate and
7951 reject invalid arguments to __builtin_alloca_with_align.
7952
4246c8da
MW
79532016-02-20 Mark Wielaard <mjw@redhat.com>
7954
7955 PR c/28901
7956 * c.opt (Wunused-const-variable): Turn into Alias for...
7957 (Wunused-const-variable=): New option.
7958
268be88c
BE
79592016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7960
7961 PR c++/69865
7962 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7963 here...
7964 (c_common_init_options): ...to here.
7965 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7966
871b3f47
JJ
79672016-02-19 Jakub Jelinek <jakub@redhat.com>
7968
7969 PR c++/69826
7970 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7971 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7972 flag_preprocess_only.
7973
bf14eba2
JJ
79742016-02-16 Jakub Jelinek <jakub@redhat.com>
7975
7976 PR c/69835
7977 * c.opt (Wnonnull-compare): Enable for -Wall.
7978
ba6b3795
JJ
79792016-02-15 Jakub Jelinek <jakub@redhat.com>
7980
7981 PR c++/69797
7982 * c-common.c (sync_resolve_size): Diagnose too few arguments
7983 even when params is non-NULL empty vector.
7984
a011cd92
BS
79852016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7986
7987 PR target/60410
7988 * c.opt (fshort-double): Remove.
7989
46cb9332
MS
79902016-02-05 Martin Sebor <msebor@redhat.com>
7991
7992 PR c++/69662
7993 * c.opt (Warning options): Update -Wplacement-new to take
7994 an optional argument.
7995
e1b81f2b
JJ
79962016-02-01 Jakub Jelinek <jakub@redhat.com>
7997
7998 PR preprocessor/69543
7999 PR c/69558
8000 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8001 instead of loc to control_warning_option.
8002
b6adbb9f
NS
80032016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8004
8005 * c.opt (fopenacc-dim=): New option.
8006
5d70666e
RB
80072016-01-27 Ryan Burn <contact@rnburn.com>
8008
8009 PR cilkplus/69267
8010 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8011 gimplify_arg. Removed superfluous post_p argument.
8012 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8013 superfluous post_p argument.
8014 * c-gimplify.c (c_gimplify_expr): Likewise.
8015
01e1dea3
DM
80162016-01-26 David Malcolm <dmalcolm@redhat.com>
8017
8018 PR other/69006
8019 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8020 pp_newline_and_flush with pp_flush.
8021
9f04a53e
MS
80222016-01-20 Martin Sebor <msebor@redhat.com>
8023
8024 PR c/69405
8025 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8026 an incompatible argument when the argument isn't a valid tree node.
8027
7f26f7df
JM
80282016-01-18 Jason Merrill <jason@redhat.com>
8029
8030 PR c++/68767
8031 * c-common.c (check_function_arguments_recurse): Fold the whole
8032 COND_EXPR, not just the condition.
8033
f62bf092
TV
80342016-01-18 Tom de Vries <tom@codesourcery.com>
8035
8036 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8037 classify as loop clause.
8038
e0a575ff
JJ
80392016-01-15 Jakub Jelinek <jakub@redhat.com>
8040
8041 PR bootstrap/68271
8042 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8043 C++ FE no longer has limit on number of pragmas.
8044
80452015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
8046
8047 PR c++/69048
8048 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 8049 to add missing cleanup point.
b6e3db06 8050
c7df95d8
DM
80512016-01-14 David Malcolm <dmalcolm@redhat.com>
8052
8053 PR c++/68819
8054 * c-indentation.c (get_visual_column): Add location_t param.
8055 Handle the column number being zero by effectively disabling the
8056 warning, with an "inform".
8057 (should_warn_for_misleading_indentation): Add location_t argument
8058 for all uses of get_visual_column.
8059
21efdd80
PP
80602016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8061
8062 PR c++/69029
8063 * c-indentation.c (should_warn_for_misleading_indentation):
8064 Don't warn about do-while statements.
8065
7a127fa7
MS
80662016-01-07 Martin Sebor <msebor@redhat.com>
8067
8068 PR c/68966
8069 * c-common.c (sync_resolve_size): Reject first argument when it's
8070 a pointer to _Bool.
8071
c589e975
DM
80722016-01-05 David Malcolm <dmalcolm@redhat.com>
8073
8074 PR c/69122
8075 * c-indentation.c (get_visual_column): Remove default argument.
8076 (should_warn_for_misleading_indentation): For the multiline case,
8077 update call to get_visual_column for next_stmt_exploc so that it
8078 captures the location of the first non-whitespace character in the
8079 relevant line. Don't issue warnings if there is non-whitespace
8080 before the next statement.
8081
818ab71a
JJ
80822016-01-04 Jakub Jelinek <jakub@redhat.com>
8083
8084 Update copyright years.
8085
745e411d
DM
80862015-12-21 David Malcolm <dmalcolm@redhat.com>
8087
8088 * c-common.c (binary_op_error): Convert first param from
8089 location_t to rich_location * and use it when emitting an error.
8090 * c-common.h (binary_op_error): Convert first param from
8091 location_t to rich_location *.
8092
de67c4c3
DM
80932015-12-16 David Malcolm <dmalcolm@redhat.com>
8094
8095 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8096 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8097
4a38b02b
IV
80982015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8099
8100 * c-common.c (c_common_attribute_table): Handle "omp declare target
8101 link" attribute.
8102
54d62f51
JJ
81032015-12-14 Jakub Jelinek <jakub@redhat.com>
8104
8105 PR c/68833
8106 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8107
8d4227c8
TB
81082014-12-12 Tobias Burnus <burnus@net-b.de>
8109
8110 PR fortran/68815
8111 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8112 specifiers (%d, %i,%u and %c).
8113
f6069ccc
DM
81142015-12-10 David Malcolm <dmalcolm@redhat.com>
8115
8116 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8117
63bbf46d
JJ
81182015-12-08 Jakub Jelinek <jakub@redhat.com>
8119
8120 PR c/48088
8121 PR c/68657
8122 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8123 * c-pragma.c (handle_pragma_diagnostic): Adjust
8124 control_warning_option caller.
8125
f79520bb
DM
81262015-12-07 David Malcolm <dmalcolm@redhat.com>
8127
8128 * c-common.c (c_cpp_error): Update for change to
8129 rich_location::set_range.
8130
b3d5bc62
JJ
81312015-12-04 Paolo Bonzini <bonzini@gnu.org>
8132
8133 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8134 shifting 1 out of the sign bit.
8135
81362015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8137
8138 * c-common.c (c_common_attribute_table[]): Update max arguments
8139 count for "simd" attribute.
8140 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8141
6eb4a537
JJ
81422015-12-03 Jakub Jelinek <jakub@redhat.com>
8143
8144 PR preprocessor/57580
8145 * c-ppoutput.c (print): Change printed field to bool.
8146 Move src_file last for smaller padding.
8147 (init_pp_output): Set print.printed to false instead of 0.
8148 (scan_translation_unit): Fix up formatting. Set print.printed
8149 to true after printing something other than newline.
8150 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8151 (maybe_print_line_1): Set print.printed to false instead of 0.
8152 (print_line_1): Likewise.
8153 (do_line_change): Set print.printed to true instead of 1.
8154 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8155 dump_macro): Set print.printed to false after printing newline.
8156
4250754e
JM
81572015-12-02 Jason Merrill <jason@redhat.com>
8158
f479b43d
JM
8159 * c-common.c (fold_for_warn): New.
8160 (warn_logical_operator, warn_tautological_cmp)
8161 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8162
4250754e
JM
8163 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8164 (c_fully_fold_internal, decl_constant_value_for_optimization):
8165 Move to c/c-fold.c.
8166 * c-common.h: Don't declare decl_constant_value_for_optimization.
8167
e9e32ee6
JM
81682015-12-02 Joseph Myers <joseph@codesourcery.com>
8169
8170 PR c/68162
8171 * c-common.h (c_build_qualified_type): Add extra default
8172 arguments.
8173
37d5ad46
JB
81742015-12-01 Julian Brown <julian@codesourcery.com>
8175 Cesar Philippidis <cesar@codesourcery.com>
8176 James Norris <James_Norris@mentor.com>
8177
8178 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8179 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8180 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8181
f07862c7
EB
81822015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8183
8184 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8185 (decl_sloc_common): Delete and move bulk of processing to...
8186 (decl_sloc): ...here.
8187 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8188 (dump_ada_double_name): Remove S parameter and compute the suffix.
8189 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8190 element type and deal with an anonymous one.
8191 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8192 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8193 and remove reference to QUAL_UNION_TYPE.
8194 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8195 (dump_nested_type): ...here. New function extracted from above.
8196 Generate a full declaration for anonymous element type of arrays.
8197 (print_ada_declaration): Really skip anonymous declarations. Remove
8198 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8199 Clean up processing of declarations of array types and objects.
8200 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8201 Remove obsolete code and tidy up.
8202
75c8aac3
JH
82032015-11-29 Jan Hubicka <hubicka@ucw.cz>
8204
8205 PR c/67581
8206 * c-common.c (handle_transparent_union_attribute): Update
8207 also type variants.
8208
b58d3df2
ML
82092015-11-27 Martin Liska <mliska@suse.cz>
8210
8211 PR c++/68312
8212 * array-notation-common.c (cilkplus_extract_an_triplets):
8213 Release vector of vectors.
8214 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8215
89a01fcf
EB
82162015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8217
8218 PR c++/68527
8219 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8220 (print_ada_struct_decl): Likewise.
8221
cc5c5226
IZ
82222015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8223
8224 PR c++/68001
8225 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8226 * cilk.c (recognize_spawn): Determine location in a more precise
8227 way.
8228
269adb9d
JM
82292015-11-19 Jason Merrill <jason@redhat.com>
8230
8231 * c-common.c (shorten_compare): But look through macros from
8232 system headers.
8233
d0eccfcd
JM
82342015-11-18 Jason Merrill <jason@redhat.com>
8235
8236 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8237 non-constant operand comes from a macro.
8238
3e44547c
JM
82392015-11-17 Jason Merrill <jason@redhat.com>
8240
8241 PR bootstrap/68346
8242 * c-common.c (warn_tautological_cmp): Fold before checking for
8243 constants.
8244
0f62c7a0
MP
82452015-11-16 Marek Polacek <polacek@redhat.com>
8246
8247 PR c++/68362
8248 * c-common.c (check_case_bounds): Fold low and high cases.
8249
a868811e
MP
82502015-11-16 Marek Polacek <polacek@redhat.com>
8251
8252 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8253 * c-common.c (c_common_get_alias_set): Likewise.
8254 (handle_visibility_attribute): Likewise.
8255
fff77217
KY
82562015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8257
8258 * c-common.c (handle_simd_attribute): New.
8259 (struct attribute_spec): Add entry for "simd".
8260 (handle_simd_attribute): New.
8261
269e63b7
KT
82622015-11-13 Kai Tietz <ktietz70@googlemail.com>
8263
8264 * c-lex.c (interpret_float): Use fold_convert.
8265
ebedc9a3
DM
82662015-11-13 David Malcolm <dmalcolm@redhat.com>
8267
8268 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8269 and store it on the result.
8270 * c-opts.c (c_common_init_options): Set
8271 global_dc->colorize_source_p.
8272
6e232ba4
JN
82732015-11-12 James Norris <jnorris@codesourcery.com>
8274 Joseph Myers <joseph@codesourcery.com>
8275
7365279f 8276 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8277 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8278 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8279 PRAGMA_OACC_CLAUSE_LINK.
8280
e78bede6
MP
82812015-11-11 Marek Polacek <polacek@redhat.com>
8282
8283 PR c/68107
8284 PR c++/68266
8285 * c-common.c (valid_array_size_p): New function.
8286 * c-common.h (valid_array_size_p): Declare.
8287
3f8257db 82882015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8289
8290 PR bootstrap/68271
8291 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8292
69f293c9
AM
82932015-11-11 Andrew MacLeod <amacleod@redhat.com>
8294
8295 * array-notation-common.c: Remove unused header files.
8296 * c-ada-spec.c: Likewise.
8297 * c-cilkplus.c: Likewise.
8298 * c-common.c: Likewise.
8299 * c-cppbuiltin.c: Likewise.
8300 * c-dump.c: Likewise.
8301 * c-format.c: Likewise.
8302 * c-gimplify.c: Likewise.
8303 * c-indentation.c: Likewise.
8304 * c-lex.c: Likewise.
8305 * c-omp.c: Likewise.
8306 * c-opts.c: Likewise.
8307 * c-pch.c: Likewise.
8308 * c-ppoutput.c: Likewise.
8309 * c-pragma.c: Likewise.
8310 * c-pretty-print.c: Likewise.
8311 * c-semantics.c: Likewise.
8312 * c-ubsan.c: Likewise.
8313 * cilk.c: Likewise.
8314 * stub-objc.c: Likewise.
8315
3a40d81d
NS
83162015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8317 Cesar Philippidis <cesar@codesourcery.com>
8318 James Norris <jnorris@codesourcery.com>
8319 Julian Brown <julian@codesourcery.com>
8320 Nathan Sidwell <nathan@codesourcery.com>
8321
8322 * c-pragma.c (oacc_pragmas): Add "routine".
8323 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8324
ee45a32d
EB
83252015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8326
8327 * c-common.c (c_common_attributes): Add scalar_storage_order.
8328 (handle_scalar_storage_order_attribute): New function.
8329 * c-pragma.c (global_sso): New variable.
8330 (maybe_apply_pragma_scalar_storage_order): New function.
8331 (handle_pragma_scalar_storage_order): Likewise.
8332 (init_pragma): Register scalar_storage_order.
8333 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8334 * c.opt (Wscalar-storage-order): New warning.
8335 (fsso-struct=): New option.
8336
eb11eb15
MS
83372015-11-08 Martin Sebor <msebor@redhat.com>
8338
8339 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8340
0aad0198
RS
83412015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8342
8343 * c-common.c: Don't undef DEF_BUILTIN.
8344
8a645150
DM
83452015-11-06 David Malcolm <dmalcolm@redhat.com>
8346
8347 * c-common.c (c_cpp_error): Convert parameter from location_t to
8348 rich_location *. Eliminate the "column_override" parameter and
8349 the call to diagnostic_override_column.
8350 Update the "done_lexing" clause to set range 0
8351 on the rich_location, rather than overwriting a location_t.
8352 * c-common.h (c_cpp_error): Convert parameter from location_t to
8353 rich_location *. Eliminate the "column_override" parameter.
8354
7a5e4956
CP
83552015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8356 Thomas Schwinge <thomas@codesourcery.com>
8357 James Norris <jnorris@codesourcery.com>
8358
8359 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8360 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8361 clauses with parallel and kernels and loops.
8362 * c-pragma.h (enum pragma_omp_clause): Add entries for
8363 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8364 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8365 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8366 INDEPENDENT,SEQ}.
8367 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8368
e2f5cc96
MS
83692015-11-05 Martin Sebor <msebor@redhat.com>
8370
8371 PR c++/67942
8372 * c.opt (-Wplacement-new): New option.
8373
e01d41e5
JJ
83742015-11-05 Jakub Jelinek <jakub@redhat.com>
8375
8376 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8377 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8378 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8379 save_expr or create_tmp_var* if TEST is true.
8380 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8381 Don't call add_stmt here.
8382 (struct c_omp_check_loop_iv_data): New type.
8383 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8384 c_omp_check_loop_iv_exprs): New functions.
8385 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8386 distribute.
8387 (c_omp_declare_simd_clauses_to_numbers): Change
8388 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8389 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8390 from numbers to PARM_DECLs.
8391
595278be
MM
83922015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8393
8394 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8395 flag_checking.
8396
3f8257db 83972015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8398
8399 PR c++-common/67882
b3d5bc62
JJ
8400 * c-common.h (fold_offsetof_1): Add argument.
8401 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8402 offsetof expressions that reference elements past the end of
8403 an array.
8404
4bf9e5a8
TS
84052015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8406 Chung-Lin Tang <cltang@codesourcery.com>
8407
8408 * c-pragma.c (oacc_pragmas): Add "atomic".
8409 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8410
3b1661a9
ES
84112015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8412
8413 * c-common.c (handle_target_clones_attribute): New.
8414 (c_common_attribute_table): Add handle_target_clones_attribute.
8415 (handle_always_inline_attribute): Add check on target_clones attribute.
8416 (handle_target_attribute): Ditto.
8417
2adfab87
AM
84182015-10-29 Andrew MacLeod <amacleod@redhat.com>
8419
8420 * array-notation-common.c: Reorder #include's and remove duplicates.
8421 * c-ada-spec.c: Likewise.
8422 * c-cilkplus.c: Likewise.
8423 * c-common.c: Likewise.
8424 * c-cppbuiltin.c: Likewise.
8425 * c-dump.c: Likewise.
8426 * c-format.c: Likewise.
8427 * c-gimplify.c: Likewise.
8428 * c-indentation.c: Likewise.
8429 * c-lex.c: Likewise.
8430 * c-omp.c: Likewise.
8431 * c-opts.c: Likewise.
8432 * c-pch.c: Likewise.
8433 * c-ppoutput.c: Likewise.
8434 * c-pragma.c: Likewise.
8435 * c-pretty-print.c: Likewise.
8436 * c-semantics.c: Likewise.
8437 * c-ubsan.c: Likewise.
8438 * cilk.c: Likewise.
8439 * stub-objc.c: Likewise.
8440
d90ec4f2
JM
84412015-10-28 Jason Merrill <jason@redhat.com>
8442
8443 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8444
88bae6f4
TS
84452015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8446 James Norris <jnorris@codesourcery.com>
8447 Cesar Philippidis <cesar@codesourcery.com>
8448
8449 PR c/64765
8450 PR c/64880
8451 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8452 * c-omp.c (c_oacc_split_loop_clauses): New function.
8453
b1726d6c
MS
84542015-10-21 Martin Sebor <msebor@redhat.com>
8455
8456 PR driver/68043
8457 * c.opt: End each sentence that describes an option with a period.
8458
fa60eeb9
MP
84592015-10-20 Marek Polacek <polacek@redhat.com>
8460
8461 * array-notation-common.c (is_cilkplus_vector_p): Define.
8462 * c-common.h (is_cilkplus_vector_p): Declare.
8463
95979049
MP
84642015-10-20 Marek Polacek <polacek@redhat.com>
8465
8466 * c.opt (std=gnu++11): Do not describe as experimental.
8467 (std=gnu++14): Likewise.
8468
2a9fb712
JM
84692015-10-19 Jason Merrill <jason@redhat.com>
8470
8471 * c-cppbuiltin.c (c_cpp_builtins): Define
8472 __cpp_nontype_template_args.
8473
13b380a3
JM
84742015-10-19 Jason Merrill <jason@redhat.com>
8475
8476 * c-cppbuiltin.c (c_cpp_builtins): Define
8477 __cpp_enumerator_attributes, __cpp_fold_expressions,
8478 __cpp_unicode_characters.
8479
d9a6bd32
JJ
84802015-10-13 Jakub Jelinek <jakub@redhat.com>
8481 Aldy Hernandez <aldyh@redhat.com>
8482
8483 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8484 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8485 (c_define_builtins): Likewise.
8486 * c-common.h (enum c_omp_clause_split): Add
8487 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8488 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8489 (c_finish_omp_for): Add ORIG_DECLV argument.
8490 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8491 201511 instead of 201307.
8492 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8493 OMP_CRITICAL_CLAUSES to it.
8494 (c_finish_omp_ordered): Add CLAUSES argument, set
8495 OMP_ORDERED_CLAUSES to it.
8496 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8497 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8498 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8499 constructs and new OpenMP 4.5 clauses. Clear
8500 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8501 verification code.
8502 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8503 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8504 (enum pragma_omp_clause): Add
8505 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8506 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8507
624d31fe
RS
85082015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8509
8510 * c-lex.c (interpret_float): Use real_equal instead of
8511 REAL_VALUES_EQUAL.
8512
b8fd7909
JM
85132015-10-04 Jason Merrill <jason@redhat.com>
8514
8515 Implement N4514, C++ Extensions for Transactional Memory.
8516 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8517 (c_common_attribute_table): Add transaction_safe_dynamic.
8518 transaction_safe now affects type identity.
8519 (handle_tm_attribute): Handle transaction_safe_dynamic.
8520 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8521 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8522 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8523 (D_TRANSMEM): New.
8524 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8525 * c-pretty-print.c (pp_c_attributes_display): Don't print
8526 transaction_safe in C++.
8527
12651878
MP
85282015-10-02 Marek Polacek <polacek@redhat.com>
8529
8530 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8531
3e3b8d63
MP
85322015-10-02 Marek Polacek <polacek@redhat.com>
8533
8534 PR c/64249
8535 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8536 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8537 * c.opt (Wduplicated-cond): New option.
8538
0d1a8f75
JM
85392015-10-01 Joseph Myers <joseph@codesourcery.com>
8540
8541 * c.opt (std=c11): Do not describe as experimental.
8542 (std=gnu11): Likewise.
8543 (std=iso9899:2011): Likewise.
8544
3e32ee19
NS
85452015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8546
8547 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8548 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8549
974348ee
MP
85502015-09-25 Marek Polacek <polacek@redhat.com>
8551
8552 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8553 (ubsan_instrument_shift): Likewise.
8554
15dbc1a6
MP
85552015-09-25 Marek Polacek <polacek@redhat.com>
8556
8557 PR sanitizer/64906
8558 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8559
6b95d7cc
PP
85602015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8561
8562 * c-indentation.c (should_warn_for_misleading_indentation):
8563 Compare next_stmt_vis_column with guard_line_first_nws instead
8564 of with guard_line_vis_column.
8565
c1822f9c
MLI
85662015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8567
8568 PR c/49654
8569 PR c/49655
8570 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8571 options and options not valid for the current language.
8572
d5398058
PP
85732015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8574
8575 * c-indentation.c (should_warn_for_misleading_indentation):
8576 Float out and consolidate the calls to get_visual_column that
8577 are passed guard_exploc as an argument. Compare
8578 next_stmt_vis_column with guard_line_first_nws instead of with
8579 body_line_first_nws.
8580
6b333269
NS
85812015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8582
8583 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8584 Wnamespaces): New C++ warnings.
8585
a75f1574
JM
85862015-09-22 Jason Merrill <jason@redhat.com>
8587
8588 * c-common.h (abi_compat_version_crosses): New.
8589 (warn_abi_version): Declare.
8590 * c-common.c: Define it.
8591 * c-opts.c (c_common_post_options): Handle it.
8592 flag_abi_compat_version defaults to 8.
8593
bdaaa8b7
VV
85942015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8595
8596 Complete the implementation of N4230, Nested namespace definition.
8597 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8598 __cpp_nested_namespace_definitions.
8599
eaa797e8
MLI
86002015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8601
8602 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8603
c4914de6
MLI
86042015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8605
8606 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8607 when warning.
8608 * c-pragma.h (pragma_lex): Add optional loc argument.
8609
fcb87c50
MM
86102015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8611
8612 * c-format.c (check_format_arg): Adjust to use common block size in all
8613 object pools.
8614
31bdd08a
DM
86152015-09-15 David Malcolm <dmalcolm@redhat.com>
8616
8617 * c-format.c (location_from_offset): Update for change in
8618 signature of location_get_source_line.
8619 * c-indentation.c (get_visual_column): Likewise.
8620 (line_contains_hash_if): Likewise.
8621
aa9f4b4c
MP
86222015-09-14 Marek Polacek <polacek@redhat.com>
8623
8624 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8625 setting various warnings.
8626
aa256c4a
MP
86272015-09-14 Marek Polacek <polacek@redhat.com>
8628
8629 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8630 a negative value.
8631
0f876f22
MW
86322015-09-11 Mark Wielaard <mjw@redhat.com>
8633
8634 PR c/28901
8635 * c.opt (Wunused-variable): Option from common.opt.
8636 (Wunused-const-variable): New option.
8637
273aa49e
PC
86382015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8639
8640 PR c++/53184
8641 * c.opt ([Wsubobject-linkage]): Add.
8642
1807ffc1
MS
86432015-09-03 Martin Sebor <msebor@redhat.com>
8644
8645 PR c/66516
8646 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8647 functions.
8648 * c-common.c (reject_gcc_builtin): Define.
8649
38942840
BI
86502015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8651
8652 PR middle-end/60586
8653 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8654 prototype.
8655 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8656 cilk_gimplify_call_params_in_spawned_fn.
8657 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8658 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8659 unwrapping.
8660
c316b5e4
MP
86612015-08-25 Marek Polacek <polacek@redhat.com>
8662
8663 PR middle-end/67330
8664 * c-common.c (handle_weak_attribute): Don't check whether the
8665 visibility can be changed here.
8666
584a7c46
MLI
86672015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8668
8669 * c-lex.c (c_lex_with_flags): Use explicit locations.
8670
a79683d5
TS
86712015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8672
8673 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8674 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8675
61717a45
FXC
86762015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8677
8678 PR middle-end/36757
8679 * c-common.c (check_builtin_function_arguments): Add check
8680 for BUILT_IN_SIGNBIT argument.
8681
329524f5
PC
86822015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8683
8684 PR c++/67160
8685 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8686 in c++1z mode.
8687
4ee55665
MP
86882015-08-17 Marek Polacek <polacek@redhat.com>
8689
8690 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8691 with whitespaces before qualifier names.
8692
b893e375
MP
86932015-08-12 Marek Polacek <polacek@redhat.com>
8694
8695 PR c++/55095
8696 * c-common.c (maybe_warn_shift_overflow): Properly handle
8697 left-shifting 1 into the sign bit.
8698
c2d89095
MLI
86992015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8700
8701 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8702
971e17ff
AS
87032015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8704 Braden Obrzut <admin@maniacsvault.net>
8705 Jason Merrill <jason@redhat.com>
8706
8707 Add C++ Concepts TS support.
8708 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8709 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8710 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8711 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8712 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8713 * c.opt (fconcepts): New.
8714
b3d5bc62
JJ
87152015-08-02 Martin Sebor <msebor@redhat.com>
8716
8717 * c.opt (-Wframe-address): New warning option.
8718
8ebca419
PP
87192015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8720
8721 * c-indentation.c (should_warn_for_misleading_indentation):
8722 Improve heuristics.
8723
1a1e101f
PP
87242015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8725
8726 * c-indentation.c (get_visual_column): Add parameter first_nws,
8727 use it. Update comment documenting the function.
8728 (is_first_nonwhitespace_on_line): Remove.
8729 (should_warn_for_misleading_indentation): Replace usage of
8730 of is_first_nonwhitespace_on_line with get_visual_column.
8731
992118a1
PP
87322015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8733
8734 * c-indentation.h (struct token_indent_info): Define.
8735 (get_token_indent_info): Define.
8736 (warn_for_misleading_information): Declare.
8737 * c-common.h (warn_for_misleading_information): Remove.
8738 * c-identation.c (warn_for_misleading_indentation):
8739 Change declaration to take three token_indent_infos. Adjust
8740 accordingly.
8741 * c-identation.c (should_warn_for_misleading_indentation):
8742 Likewise. Bail out early if the body is a compound statement.
8743 (guard_tinfo_to_string): Define.
8744
e8fa3817
JM
87452015-07-30 Jason Merrill <jason@redhat.com>
8746
8747 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8748 '*' for reference decay.
8749
173864e8
MP
87502015-07-30 Marek Polacek <polacek@redhat.com>
8751
8752 * c-common.c (warn_tautological_cmp): Bail for float types.
8753
f2afe6dd
MP
87542015-07-27 Marek Polacek <polacek@redhat.com>
8755
8756 PR bootstrap/67030
8757 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8758
05b28fd6
MP
87592015-07-27 Marek Polacek <polacek@redhat.com>
8760
8761 PR c++/66555
8762 PR c/54979
8763 * c-common.c (find_array_ref_with_const_idx_r): New function.
8764 (warn_tautological_cmp): New function.
8765 * c-common.h (warn_tautological_cmp): Declare.
8766 * c.opt (Wtautological-compare): New option.
8767
5a5062b8
MP
87682015-07-23 Marek Polacek <polacek@redhat.com>
8769
8770 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8771 (ubsan_instrument_shift): Likewise.
8772
dc891fe7
MP
87732015-07-23 Marek Polacek <polacek@redhat.com>
8774
8775 PR sanitizer/66908
8776 * c-ubsan.c: Include gimplify.h.
8777 (ubsan_instrument_division): Unshare OP0 and OP1.
8778 (ubsan_instrument_shift): Likewise.
8779
451b5e48
MP
87802015-07-20 Marek Polacek <polacek@redhat.com>
8781 Richard Sandiford <richard.sandiford@arm.com>
8782
8783 PR c++/55095
8784 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8785 Use EXPR_LOC_OR_LOC.
8786 (maybe_warn_shift_overflow): New function.
8787 * c-common.h (maybe_warn_shift_overflow): Declare.
8788 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8789 * c.opt (Wshift-overflow): New option.
8790
fb0b2914
ML
87912015-07-16 Martin Liska <mliska@suse.cz>
8792
8793 * c-format.c (static void check_format_info_main): Use
8794 object_allocator instead of pool_allocator.
8795 (check_format_arg): Likewise.
8796 (check_format_info_main): Likewise.
8797
903f5c23
AM
87982015-07-15 Andrew MacLeod <amacleod@redhat.com>
8799
8800 * c-opts.c: Remove multiline #include comment.
8801
026c3cfd
AH
88022015-07-12 Aldy Hernandez <aldyh@redhat.com>
8803
8804 * c-common.c: Fix double word typos.
8805
bb49ee66
EB
88062015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8807
8808 * c-ada-spec.h (cpp_operation): Revert latest change.
8809 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8810 constructors and destructors.
8811
1916bcb5
AM
88122015-07-09 Andrew MacLeod <amacleod@redhat.com>
8813
8814 * c-common.h: Adjust includes for flags.h changes.
8815 * stub-objc.c: Likewise.
026c3cfd 8816
a9dcd529
EB
88172015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8818
8819 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8820 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8821
b03b462f
JJ
88222015-07-08 Jakub Jelinek <jakub@redhat.com>
8823
8824 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8825 are to be removed, return NULL rather than original clauses list.
8826
c7131fb2
AM
88272015-07-07 Andrew MacLeod <amacleod@redhat.com>
8828
8829 * array-notation-common.c: Adjust includes.
8830 * c-ada-spec.c: Likewise.
8831 * c-cilkplus.c: Likewise.
8832 * c-common.h: Likewise.
8833 * c-cppbuiltin.c: Likewise.
8834 * c-dump.c: Likewise.
8835 * c-format.c: Likewise.
8836 * c-gimplify.c: Likewise.
8837 * c-indentation.c: Likewise.
8838 * c-lex.c: Likewise.
8839 * c-omp.c: Likewise.
8840 * c-opts.c: Likewise.
8841 * c-pch.c: Likewise.
8842 * c-ppoutput.c: Likewise.
8843 * c-pragma.c: Likewise.
8844 * c-pretty-print.c: Likewise.
8845 * c-semantics.c: Likewise.
8846 * c-ubsan.c: Likewise.
8847 * cilk.c: Likewise.
8848 * stub-objc.c: Likewise.
8849
2a7fb83f
EB
88502015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8851
8852 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8853 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8854
a03c9bf1
JM
88552015-07-01 Jason Merrill <jason@redhat.com>
8856
36a85135
JM
8857 * c-common.h (D_CXX11): Rename from D_CXX0X.
8858 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8859 * c-common.c: Adjust.
8860
e7fa68d5
JM
8861 * c-opts.c (c_common_post_options): Default to C++14.
8862
a03c9bf1
JM
8863 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8864
fe95b036
ESR
88652015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8866
8867 Implement N4197 - Adding u8 character literals
b3d5bc62 8868 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8869 CPP_CHAR.
b3d5bc62 8870 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8871 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8872 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8873 and CPP_UTF8CHAR tokens.
8874 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8875
da2e71c9
MLI
88762015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8877
8878 PR fortran/66605
8879 * c-common.c (do_warn_unused_parameter): Move here.
8880 * c-common.h (do_warn_unused_parameter): Declare.
8881
b155cfd9
MP
88822015-06-29 Marek Polacek <polacek@redhat.com>
8883
8884 PR c/66322
8885 * c-common.c (check_case_bounds): Add bool * parameter. Set
8886 OUTSIDE_RANGE_P.
8887 (c_add_case_label): Add bool * parameter. Pass it down to
8888 check_case_bounds.
8889 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8890 warning here.
8891 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8892 declarations.
8893
31521951
MP
88942015-06-27 Marek Polacek <polacek@redhat.com>
8895
8896 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8897 or VECTOR_INTEGER_TYPE_P throughout.
8898 * c-gimplify.c: Likewise.
8899
22d03525
MP
89002015-06-26 Marek Polacek <polacek@redhat.com>
8901
8902 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8903 * c-common.c (c_fully_fold_internal): Likewise.
8904 (c_alignof_expr): Likewise.
8905 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8906 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8907 * cilk.c (create_parm_list): Likewise.
22d03525 8908
af05e6e5
MP
89092015-06-26 Marek Polacek <polacek@redhat.com>
8910
8911 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8912
f0889939
AM
89132015-06-25 Andrew MacLeod <amacleod@redhat.com>
8914
8915 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8916 * c-gimplify.c: Likewise.
8917 * c-pragma.c: Likewise.
8918 * c-ubsan.c: Likewise.
8919 * cilk.c: Likewise.
8920
ca752f39
RS
89212015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8922
8923 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8924 ggc_hasher.
8925
16a16ec7
AM
89262015-06-25 Andrew MacLeod <amacleod@redhat.com>
8927
8928 * cilk.c: Move calls.h after tm.h in the include chain.
8929
0ae9bd27
MP
89302015-06-25 Marek Polacek <polacek@redhat.com>
8931
8932 * array-notation-common.c: Use VAR_P throughout.
8933 * c-ada-spec.c: Likewise.
8934 * c-common.c: Likewise.
8935 * c-format.c: Likewise.
8936 * c-gimplify.c: Likewise.
8937 * c-omp.c: Likewise.
8938 * c-pragma.c: Likewise.
8939 * c-pretty-print.c: Likewise.
8940 * cilk.c: Likewise.
8941
62f9079a
MP
89422015-06-25 Marek Polacek <polacek@redhat.com>
8943
8944 * cilk.c (extract_free_variables): Use is_global_var.
8945
0fa16060
RS
89462015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8947
8948 * c-common.c: Don't include target-def.h.
8949
a68ae2e1
MP
89502015-06-23 Marek Polacek <polacek@redhat.com>
8951
8952 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8953 when comparing INTEGER_CSTs.
8954
c6a2f2d9
PMR
89552015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8956
8957 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8958 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8959 (dump_ada_template): Skip partially specialized types.
8960
6b4db501
MM
89612015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8962
8963 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8964 swapping.
8965
abb226c9
AM
89662015-06-17 Andrew MacLeod <amacleod@redhat.com>
8967
8968 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8969 * c-ada-spec.c: Likewise.
8970 * c-cilkplus.c: Likewise.
8971 * c-common.c: Likewise.
8972 * c-common.h: Likewise.
8973 * c-cppbuiltin.c: Likewise.
8974 * c-dump.c: Likewise.
8975 * c-format.c: Likewise.
8976 * c-gimplify.c: Likewise.
8977 * c-indentation.c: Likewise.
8978 * c-lex.c: Likewise.
8979 * c-omp.c: Likewise.
8980 * c-opts.c: Likewise.
8981 * c-pch.c: Likewise.
8982 * c-ppoutput.c: Likewise.
8983 * c-pragma.c: Likewise.
8984 * c-pretty-print.c: Likewise.
8985 * c-semantics.c: Likewise.
8986 * c-ubsan.c: Likewise.
8987 * cilk.c: Likewise.
8988 * stub-objc.c: Likewise.
8989
076fecad
PP
89902015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8991
8992 PR c++/65168
8993 * c-common.c (c_common_truthvalue_conversion): Warn when
8994 converting an address of a reference to a truth value.
8995
13fdf2e2
AM
89962015-06-08 Andrew MacLeod <amacleod@redhat.com>
8997
8998 * array-notation-common.c : Adjust include files.
8999 * c-ada-spec.c : Likewise.
9000 * c-cilkplus.c : Likewise.
9001 * c-common.c : Likewise.
9002 * c-common.h : Likewise.
9003 * c-cppbuiltin.c : Likewise.
9004 * c-dump.c : Likewise.
9005 * c-format.c : Likewise.
9006 * c-gimplify.c : Likewise.
9007 * c-indentation.c : Likewise.
9008 * c-lex.c : Likewise.
9009 * c-omp.c : Likewise.
9010 * c-opts.c : Likewise.
9011 * c-pch.c : Likewise.
9012 * c-ppoutput.c : Likewise.
9013 * c-pragma.c : Likewise.
9014 * c-pretty-print.c : Likewise.
9015 * c-semantics.c : Likewise.
9016 * c-ubsan.c : Likewise.
9017 * cilk.c : Likewise.
9018 * stub-objc.c : Likewise.
9019
a1661b90
MP
90202015-06-08 Marek Polacek <polacek@redhat.com>
9021
9022 PR c/66415
9023 * c-format.c (location_from_offset): Return LOC if LINE is null.
9024
d7438551
AH
90252015-06-05 Aldy Hernandez <aldyh@redhat.com>
9026
9027 * c-common.h (c_parse_final_cleanups): New prototype.
9028 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9029
b3d5bc62
JJ
90302015-06-04 Sriraman Tallam <tmsriram@google.com>
9031
9032 * c-common.c (noplt): New attribute.
9033 (handle_noplt_attribute): New handler.
9034
ecb9f223
AM
90352015-06-04 Andrew MacLeod <amacleod@redhat.com>
9036
9037 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9038 * c-ada-spec.c: Likewise.
9039 * c-cilkplus.c: Likewise.
9040 * c-common.c: Likewise.
9041 * c-common.h: Likewise.
9042 * c-cppbuiltin.c: Likewise.
9043 * c-dump.c: Likewise.
9044 * c-format.c: Likewise.
9045 * c-gimplify.c: Likewise.
9046 * c-indentation.c: Likewise.
9047 * c-lex.c: Likewise.
9048 * c-omp.c: Likewise.
9049 * c-opts.c: Likewise.
9050 * c-pch.c: Likewise.
9051 * c-ppoutput.c: Likewise.
9052 * c-pragma.c: Likewise.
9053 * c-pretty-print.c: Likewise.
9054 * c-semantics.c: Likewise.
9055 * c-ubsan.c: Likewise.
9056 * cilk.c: Likewise.
9057 * stub-objc.c: Likewise.
9058
6ac48155
DM
90592015-06-02 David Malcolm <dmalcolm@redhat.com>
9060
9061 PR c/66220:
9062 * c-indentation.c (should_warn_for_misleading_indentation): Use
9063 expand_location rather than expand_location_to_spelling_point.
9064 Don't warn if the guarding statement is more indented than the
9065 next/body stmts.
9066
773ce42e
DM
90672015-06-02 David Malcolm <dmalcolm@redhat.com>
9068
9069 * c-indentation.c (warn_for_misleading_indentation): Bail out
9070 immediately if -Wmisleading-indentation isn't enabled.
9071
4fef8379
ML
90722015-06-01 Martin Liska <mliska@suse.cz>
9073
9074 * c-format.c (check_format_arg):Use new type-based pool allocator.
9075 (check_format_info_main) Likewise.
9076
1edfb384
EB
90772015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9078
9079 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9080 (has_nontrivial_methods): Likewise.
9081
9677ef52
MP
90822015-05-25 Marek Polacek <polacek@redhat.com>
9083
9084 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9085
fd5c817a
MP
90862015-05-22 Marek Polacek <polacek@redhat.com>
9087
9088 PR c/47043
9089 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9090
a2f45fe6 90912015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
9092
9093 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9094 STACK_GROWS_DOWNWARD.
9095
a2f45fe6 90962015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
9097
9098 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9099 STACK_GROWS_DOWNWARD rather than if it is defined.
9100
0fee2ac2 91012015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 9102
0fee2ac2
MLI
9103 PR c/52952
9104 * c-format.c (location_column_from_byte_offset): New.
9105 (location_from_offset): New.
9106 (struct format_wanted_type): Add offset_loc field.
9107 (check_format_info): Move handling of location for extra arguments
9108 closer to the point of warning.
9109 (check_format_info_main): Pass the result of location_from_offset
9110 to warning_at.
9111 (format_type_warning): Pass the result of location_from_offset
9112 to warning_at.
9113
cf4ef6f7
MP
91142015-05-20 Marek Polacek <polacek@redhat.com>
9115
9116 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9117
3a65ee74
MP
91182015-05-20 Marek Polacek <polacek@redhat.com>
9119
9120 * c-ada-spec.c (dump_sloc): Use DECL_P.
9121
21b634ae
MP
91222015-05-20 Marek Polacek <polacek@redhat.com>
9123
9124 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9125 * c-common.c: Likewise.
9126
0e50b624
DM
91272015-05-19 David Malcolm <dmalcolm@redhat.com>
9128
9129 * c-common.h (fe_file_change): Strengthen param from
9130 const line_map * to const line_map_ordinary *.
9131 (pp_file_change): Likewise.
9132 * c-lex.c (fe_file_change): Likewise.
9133 (cb_define): Use linemap_check_ordinary when invoking
9134 SOURCE_LINE.
9135 (cb_undef): Likewise.
9136 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9137 invoking cb_file_change.
9138 (c_finish_options): Likewise.
9139 (push_command_line_include): Likewise.
9140 (cb_file_change): Strengthen param "new_map" from
9141 const line_map * to const line_map_ordinary *.
9142 * c-ppoutput.c (cb_define): Likewise for local "map".
9143 (pp_file_change): Likewise for param "map" and local "from".
9144
fab27f52
MM
91452015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9146
9147 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9148
2fe1d762
TV
91492015-05-18 Tom de Vries <tom@codesourcery.com>
9150
9151 * c-common.c (build_va_arg_1): New function.
9152 (build_va_arg): Add address operator to va_list operand if necessary.
9153
7a37fa90
MM
91542015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9155
9156 PR c/48956
9157 * c-common.c (int_safely_convertible_to_real_p): Define.
9158 (unsafe_conversion_p): Check conversions involving complex types.
9159 (conversion_warning): Add new warning message for conversions which
9160 discard imaginary component.
9161 * c-common.h: (enum conversion_safety): Add new enumerator for such
9162 conversions.
9163
3aa3c9fc
MP
91642015-05-14 Marek Polacek <polacek@redhat.com>
9165
9166 PR c/66066
9167 PR c/66127
9168 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9169 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9170 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9171 use it. If FOR_INT_CONST, require that all evaluated operands be
9172 INTEGER_CSTs.
9173
c3388e62
DM
91742015-05-12 David Malcolm <dmalcolm@redhat.com>
9175
9176 * c-common.h (warn_for_misleading_indentation): New prototype.
9177 * c-indentation.c: New file.
9178 * c.opt (Wmisleading-indentation): New option.
9179
c7b38fd5
TV
91802015-05-12 Tom de Vries <tom@codesourcery.com>
9181
9182 PR tree-optimization/66010
9183 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9184
381bf11e
JM
91852015-05-09 Jason Merrill <jason@redhat.com>
9186
edff0c06
JM
9187 * c-opts.c (c_common_post_options): Also clear
9188 cpp_opts->cpp_warn_cxx11_compat.
9189
129211bc
JM
9190 * c-common.h (enum cxx_dialect): Add cxx_unset.
9191 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9192 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9193
381bf11e
JM
9194 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9195 (std=gnu++0x): Mark as Undocumented.
9196 (std=gnu++1y): Add deprecated message.
9197
fe191308
JM
91982015-05-08 Jason Merrill <jason@redhat.com>
9199
765189ff
JM
9200 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9201 * c-opts.c: Adjust.
9202
fe191308
JM
9203 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9204
755e528f
MP
92052015-05-08 Marek Polacek <polacek@redhat.com>
9206
9207 PR c/64918
9208 * c.opt (Woverride-init-side-effects): New option.
9209
0173bd2a
MP
92102015-05-07 Marek Polacek <polacek@redhat.com>
9211
9212 PR c/65179
9213 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9214 negative value.
9215 * c.opt (Wshift-negative-value): New option.
9216 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9217 when -Wextra and C99/C++11 mode.
9218
e0f0d3b9
MP
92192015-05-07 Marek Polacek <polacek@redhat.com>
9220 Martin Uecker <uecker@eecs.berkeley.edu>
9221
9222 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9223 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9224
8243e2a9
JM
92252015-05-05 Jason Merrill <jason@redhat.com>
9226
9227 * c.opt (Wterminate): New.
9228
577cd070
MP
92292015-04-30 Marek Polacek <polacek@redhat.com>
9230
9231 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9232 require that the non-constant be of a boolean type.
9233
0373796b
JT
92342015-04-29 Josh Triplett <josh@joshtriplett.org>
9235
e0f0d3b9
MP
9236 * c-common.c (handle_section_attribute): Refactor to reduce
9237 nesting and distinguish between error cases.
0373796b 9238
716c0ba6
MP
92392015-04-29 Marek Polacek <polacek@redhat.com>
9240
9241 PR c/64610
9242 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9243 with 0/1.
9244
8848828b
JJ
92452015-04-29 Jakub Jelinek <jakub@redhat.com>
9246
9247 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9248 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9249 HOST_BITS_PER_WIDE_INT.
9250
ecd0e562
TV
92512015-04-28 Tom de Vries <tom@codesourcery.com>
9252
9253 PR tree-optimization/65887
9254 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9255
2a877204 92562015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9257 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9258
9259 * c-ada-spec.c (in_function): Delete.
9260 (dump_generic_ada_node): Do not change in_function and remove the
9261 redundant code dealing with it.
9262 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9263 (print_ada_methods): Output the static member functions in a nested
9264 package after the regular methods as well as associated renamings.
9265
4853031e
MP
92662015-04-24 Marek Polacek <polacek@redhat.com>
9267
9268 PR c/65830
9269 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9270 and OPT_Wshift_count_overflow.
9271
8c2b7f79
MP
9272 PR c/63357
9273 * c-common.c (warn_logical_operator): Warn if the operands have the
9274 same expressions.
9275
b8787813
MP
92762015-04-24 Marek Polacek <polacek@redhat.com>
9277
9278 PR c/61534
9279 * c-common.c (warn_logical_operator): Bail if either operand comes
9280 from a macro expansion.
9281
8fba1830
BRF
92822015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9283
9284 PR target/55143
9285 * c-common.c (c_default_pointer_mode): Add definition.
9286 * c-common.h (c_default_pointer_mode): Add declaration.
9287
17958621
JJ
92882015-03-11 Jakub Jelinek <jakub@redhat.com>
9289
9290 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9291 on record_builtin_type argument.
9292
7ccb1a11
JJ
92932015-03-10 Jakub Jelinek <jakub@redhat.com>
9294
9295 PR c/65120
9296 * c-common.c (warn_logical_not_parentheses): Don't warn for
9297 !x == 0 or !x != 0.
9298
04fd785e
MP
92992015-03-07 Marek Polacek <polacek@redhat.com>
9300
9301 PR sanitizer/65280
9302 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9303 before trying to figure out whether we have a flexible array member.
9304
a4e26206 93052015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9306 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9307
9308 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9309
0d2489f4
EB
93102015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9311
9312 PR ada/65319
9313 * c-ada-spec.c (print_destructor): Remove obsolete code.
9314
83ed54d7
EB
93152015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9316
9317 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9318 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9319 DECL_TEMPLATE_RESULT emulations.
9320 (dump_ada_template)): Add guard for TYPE_METHODS.
9321
7631f0e2
MP
93222015-02-27 Marek Polacek <polacek@redhat.com>
9323
9324 PR c/65040
9325 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9326
d1783ae5
KT
93272015-02-27 Kai Tietz <ktietz@redhat.com>
9328
9329 PR c/35330
9330 * c-pragma.c (handle_pragma_weak): Do not try to create
9331 weak/alias of declarations not being function, or variable
9332 declarations.
9333
56a9f6bc
TS
93342015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9335
9336 PR libgomp/64625
9337 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9338 Remove macros.
9339 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9340
3d5cb23d
MP
93412015-02-16 Marek Polacek <polacek@redhat.com>
9342
9343 PR c/65066
9344 * c-format.c (check_format_types): Handle null param.
9345
fa008882
MP
93462015-02-13 Marek Polacek <polacek@redhat.com>
9347
9348 PR c/65040
9349 * c-format.c (check_format_types): Don't warn about different
9350 signedness if the original value is in the range of WANTED_TYPE.
9351
785f21af
JM
93522015-02-12 Jason Merrill <jason@redhat.com>
9353
9354 PR c++/64956
9355 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9356 to the current highest version.
9357 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9358
4886ec8e
JJ
93592015-02-04 Jakub Jelinek <jakub@redhat.com>
9360
9361 PR c/64824
9362 PR c/64868
9363 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9364 instead of RDIV_EXPR. Use build_binary_op instead of
9365 build2_loc.
9366
40fecdd6
JM
93672015-01-30 Joseph Myers <joseph@codesourcery.com>
9368
9369 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9370 to pass input_location as first argument.
9371
a0c88d06
TV
93722015-01-23 Tom de Vries <tom@codesourcery.com>
9373
9374 PR libgomp/64672
9375 * c.opt (fopenacc): Mark as LTO option.
9376
1506ae0e
TV
93772015-01-23 Tom de Vries <tom@codesourcery.com>
9378
9379 PR libgomp/64707
9380 * c.opt (fopenmp): Mark as LTO option.
9381
31be63ab
JJ
93822015-01-21 Jakub Jelinek <jakub@redhat.com>
9383
9384 PR c/63307
b1726d6c 9385 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9386 (compare_decls): Fix up formatting.
9387
93882015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9389
9390 PR c/63307
9391 * cilk.c: Include vec.h.
9392 (struct cilk_decls): New structure.
9393 (wrapper_parm_cb): Split this function to...
9394 (fill_decls_vec): ...this...
9395 (create_parm_list): ...and this.
9396 (compare_decls): New function.
9397 (for_local_cb): Remove.
9398 (wrapper_local_cb): Ditto.
9399 (build_wrapper_type): For now first traverse and fill vector of
9400 declarations then sort it and then deal with sorted vector.
9401 (cilk_outline): Ditto.
9402 (declare_one_free_variable): Ditto.
9403
6875457f
JM
94042015-01-21 Jason Merrill <jason@redhat.com>
9405
9406 PR c++/64629
9407 * c-format.c (check_format_arg): Call decl_constant_value.
9408
185c9e56
ML
94092015-01-19 Martin Liska <mliska@suse.cz>
9410
9411 * c-common.c (handle_noicf_attribute): New function.
9412
41dbbb37
TS
94132015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9414 Bernd Schmidt <bernds@codesourcery.com>
9415 James Norris <jnorris@codesourcery.com>
9416 Cesar Philippidis <cesar@codesourcery.com>
9417 Ilmir Usmanov <i.usmanov@samsung.com>
9418 Jakub Jelinek <jakub@redhat.com>
9419
9420 * c.opt (fopenacc): New option.
9421 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9422 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9423 New macros.
9424 * c-common.h (c_finish_oacc_wait): New prototype.
9425 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9426 (c_finish_oacc_wait): New function.
9427 * c-pragma.c (oacc_pragmas): New variable.
9428 (c_pp_lookup_pragma, init_pragma): Handle it.
9429 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9430 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9431 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9432 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9433 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9434 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9435 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9436 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9437 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9438 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9439 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9440 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9441 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9442 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9443 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9444 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9445 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9446 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9447 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9448 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9449 PRAGMA_OACC_CLAUSE_WORKER.
9450
3f8257db 94512015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9452
9453 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9454 for the new option fstack-protector_explicit.
9455 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9456 (handle_stack_protect_attribute): New function.
9457
3f8257db 94582015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9459
9460 * c.opt: New option -Warray-bounds=.
9461
adfac8df
JJ
94622015-01-09 Michael Collison <michael.collison@linaro.org>
9463
9464 * array-notation-common.c: Include hash-set.h, machmode.h,
9465 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9466 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9467 * c-ada-spec.c: Ditto.
9468 * c-cilkplus.c: Ditto.
9469 * c-common.c: Include input.h due to flattening of tree.h.
9470 Define macro GCC_C_COMMON_C.
9471 * c-common.h: Flatten tree.h header files into c-common.h.
9472 Remove include of tree-core.h.
9473 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9474 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9475 fold-const.h, wide-int.h, and inchash.h due to
9476 flattening of tree.h.
9477 * c-dump.c: Ditto.
9478 * c-format.c: Flatten tree.h header files into c-common.h.
9479 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9480 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9481 fold-const.h, wide-int.h, and inchash.h due to
9482 flattening of tree.h.
9483 * c-dump.c: Include hash-set.h, machmode.h,
9484 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9485 fold-const.h, wide-int.h, and inchash.h due to
9486 flattening of tree.h.
9487 * c-format.c: Include hash-set.h, machmode.h,
9488 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9489 fold-const.h, wide-int.h, inchash.h and real.h due to
9490 flattening of tree.h.
9491 * c-gimplify.c: Include hash-set.h, machmode.h,
9492 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9493 fold-const.h, wide-int.h, and inchash.h due to
9494 flattening of tree.h.
9495 * cilk.c: Ditto.
9496 * c-lex.c: Ditto.
9497 * c-omp.c: Ditto.
9498 * c-opts.c: Ditto.
9499 * c-pch.c: Ditto.
9500 * c-ppoutput.c: Ditto.
9501 * c-pragma.c: Ditto.
9502 * c-pretty-print.c: Ditto.
9503 * c-semantics.c: Ditto.
9504 * c-ubsan.c: Ditto.
9505 * stub-objc.c: Ditto.
9506
f5481fc4
JM
95072015-01-08 Jason Merrill <jason@redhat.com>
9508
9509 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9510 do_ubsan_in_current_function.
9511 (ubsan_maybe_instrument_reference_or_call): Likewise.
9512 * c-ubsan.h: Declare it.
9513
de35aa66
MS
95142015-01-08 Mike Stump <mikestump@comcast.net>
9515
9516 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9517
4a9a42ab
MP
95182015-01-07 Marek Polacek <polacek@redhat.com>
9519
9520 PR c/64440
9521 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9522 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9523
2f42e5de
TS
95242015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9525
9526 PR c++/31397
9527 * c.opt (Wsuggest-override): New option.
9528
5624e564
JJ
95292015-01-05 Jakub Jelinek <jakub@redhat.com>
9530
9531 Update copyright years.
9532
5bd012f8
MP
95332015-01-05 Marek Polacek <polacek@redhat.com>
9534
9535 PR c/64423
9536 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9537 parameter. Use it.
9538 * c-common.h (warn_array_subscript_with_type_char): Update
9539 declaration.
9540
a7fa8d18
ESR
95412014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9542
9543 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9544 Control macro with flag_sized_deallocation.
9545
3f8257db 95462014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9547
9548 * c.opt (Wdiscarded-array-qualifiers): New option.
9549
1f8d3e84
JJ
95502014-12-19 Jakub Jelinek <jakub@redhat.com>
9551
9552 PR preprocessor/63831
9553 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9554 and __has_cpp_attribute here.
9555 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9556 c_common_has_attribute.
9557 * c-common.h (c_common_has_attribute): New prototype.
9558 * c-lex.c (init_c_lex): Set cb->has_attribute to
9559 c_common_has_attribute instead of cb_has_attribute.
9560 (get_token_no_padding): New function.
9561 (cb_has_attribute): Renamed to ...
9562 (c_common_has_attribute): ... this. No longer static. Use
9563 get_token_no_padding, require ()s, don't build TREE_LIST
9564 unnecessarily, fix up formatting, adjust diagnostics, call
9565 init_attributes.
9566
20b06add
JM
95672014-12-15 Jason Merrill <jason@redhat.com>
9568
9569 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9570 (-Wsized-deallocation): New.
9571 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9572 to on in C++14 and up.
9573
94a073b2
JM
95742014-12-11 Jason Merrill <jason@redhat.com>
9575
acaa5911
JM
9576 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9577
94a073b2
JM
9578 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9579 we aren't complaining about VLAs.
9580
7fb66c15
MP
95812014-12-06 Marek Polacek <polacek@redhat.com>
9582
9583 PR tree-optimization/64183
9584 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9585 shift-expression if it is integer_type_node. Use types_compatible_p.
9586
b731b390
JJ
95872014-11-29 Jakub Jelinek <jakub@redhat.com>
9588
9589 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9590 last argument from create_tmp_var_raw and create_tmp_var calls.
9591 * cilk.c (gimplify_cilk_spawn): Likewise.
9592 * c-omp.c (c_finish_omp_atomic): Likewise.
9593
6a4da643
MP
95942014-11-28 Marek Polacek <polacek@redhat.com>
9595
9596 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9597 instead of unsigned_type_node.
9598
541e35a6
MP
95992014-11-28 Marek Polacek <polacek@redhat.com>
9600
9601 PR c/63862
9602 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9603 to op1_utype.
9604 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9605 expression to unsigned_type_node.
9606
dcc97066
MW
96072014-11-20 Mark Wielaard <mjw@redhat.com>
9608
9609 PR debug/38757
9610 * c-opts.c (set_std_c89): Set lang_hooks.name.
9611 (set_std_c99): Likewise.
9612 (set_std_c11): Likewise.
9613 (set_std_cxx98): Likewise.
9614 (set_std_cxx11): Likewise.
9615 (set_std_cxx14): Likewise.
9616 (set_std_cxx1z): Likewise.
9617
aa7da51a
JJ
96182014-11-21 Jakub Jelinek <jakub@redhat.com>
9619
9620 PR target/63764
9621 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9622 return type to bool.
009a3480 9623 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9624 (convert_vector_to_pointer_for_subscript): Change return type to
9625 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9626 and copy it into a TARGET_EXPR and use that instead of *vecp
9627 directly.
9628
538dd0b7
DM
96292014-11-19 David Malcolm <dmalcolm@redhat.com>
9630
9631 Merger of git branch "gimple-classes-v2-option-3".
9632 * ChangeLog.gimple-classes: New.
9633 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9634 from being just a vec<gimple> to a vec<gbind *>.
9635
c39a5e99
JJ
96362014-11-18 Jakub Jelinek <jakub@redhat.com>
9637
9638 PR sanitizer/63813
9639 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9640 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9641 get_pointer_alignment for non-pointers. Use ptype, or if it is
9642 reference type, corresponding pointer type, as type of kind
9643 argument.
9644 (ubsan_maybe_instrument_reference,
9645 ubsan_maybe_instrument_member_call): Adjust callers.
9646
8537a4a9
MP
96472014-11-15 Marek Polacek <polacek@redhat.com>
9648
9649 PR middle-end/63884
9650 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9651 for NULL fndecl.
9652 (extract_array_notation_exprs): Return for NULL node.
9653
2079956a
JM
96542014-11-12 Joseph Myers <joseph@codesourcery.com>
9655
9656 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9657 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9658
1304953e
JJ
96592014-11-12 Jakub Jelinek <jakub@redhat.com>
9660
9661 PR c/59708
9662 * c-common.c (check_builtin_function_arguments): Handle
9663 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9664
e5e44252
AK
96652014-11-10 Andi Kleen <ak@linux.intel.com>
9666
9667 PR c/60804
9668 * c-common.h (check_no_cilk): Declare.
9669 * cilk.c (get_error_location): New function.
9670 (check_no_cilk): Dito.
9671
e64b984d
AK
96722014-11-10 Andi Kleen <ak@linux.intel.com>
9673
9674 * cilk.c (recognize_spawn): Use expression location
9675 for error message.
9676
13c21655
PC
96772014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9678
9679 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9680
42fd12b1
ESR
96812014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9682
9683 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9684 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9685 (__cpp_range_based_for, __cpp_initializer_lists,
9686 __cpp_delegating_constructors, __cpp_nsdmi,
9687 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9688 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9689 __has_cpp_attribute.
9690 * c-lex.c (cb_has_attribute): New callback CPP function;
9691 (init_c_lex): Set has_attribute callback.
9692
6f450181
RB
96932014-11-04 Richard Biener <rguenther@suse.de>
9694
9695 * c-common.c (shorten_compare): Do not shorten mixed
9696 DFP and non-DFP compares.
9697
26f0e1d6
ESR
96982014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9699
9700 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9701 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9702 Commentary and rearrangement of tests.
9703 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9704 Commentary and rearrangement of tests.
ab20d992 9705 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9706 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9707
ef4bddc2
RS
97082014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9709
9710 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9711 enum from machine_mode.
9712
c582198b
AM
97132014-10-28 Andrew MacLeod <amacleod@redhat.com>
9714
adfac8df
JJ
9715 * c-common.c: Adjust include files.
9716 * c-gimplify.c: Ditto.
9717 * cilk.c: Ditto.
9718 * c-pragma.c: Ditto.
9719 * c-ubsan.c: Ditto.
c582198b 9720
60393bbc
AM
97212014-10-27 Andrew MacLeod <amacleod@redhat.com>
9722
9723 * c-gimplify.c: Adjust include files.
9724
d723bb7c
MLI
97252014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9726
9727 PR c++/53061
9728 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9729 c_common_initialize_diagnostics.
9730 * c-common.h: Likewise.
9731
90f3520e
MP
97322014-10-24 Marek Polacek <polacek@redhat.com>
9733
9734 PR c/56980
9735 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9736 print "struct"/"union"/"enum" for typedefed names.
9737
59d7607a
MP
97382014-10-23 Marek Polacek <polacek@redhat.com>
9739
9740 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9741 in unsigned type.
9742
d95a2703
JJ
97432014-10-22 Jakub Jelinek <jakub@redhat.com>
9744 Yury Gribov <y.gribov@samsung.com>
9745
9746 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9747 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9748 instead of flag_sanitize_recover as bool flag.
9749
8e6ef852
KY
97502014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9751
9752 * cilk.c: Revert previous change.
9753
948cf550
IZ
97542014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9755
9756 PR c/63307
9757 * cilk.c: Include vec.h.
9758 (struct cilk_decls): New structure.
9759 (wrapper_parm_cb): Split this function to...
9760 (fill_decls_vec): ...this...
9761 (create_parm_list): ...and this.
9762 (compare_decls): New function.
9763 (for_local_cb): Remove.
9764 (wrapper_local_cb): Ditto.
9765 (build_wrapper_type): For now first traverse and fill vector of
9766 declarations then sort it and then deal with sorted vector.
9767 (cilk_outline): Ditto.
9768 (declare_one_free_variable): Ditto.
9769
92574c7c
MP
97702014-10-17 Marek Polacek <polacek@redhat.com>
9771
9772 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9773 * c.opt (Wimplicit-int): Initialize to -1.
9774
83685514
AM
97752014-10-16 Andrew MacLeod <amacleod@redhat.com>
9776
9777 * c-pragma.c: Adjust include files.
9778 * c-semantics.c: Likewise.
9779
5b8300ea
DD
97802014-10-16 DJ Delorie <dj@redhat.com>
9781
9782 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9783 multiples of bytes.
9784
5f83e90b
JM
97852014-10-14 Jason Merrill <jason@redhat.com>
9786
9787 PR c++/63455
9788 * c-common.h (CPP_PREPARSED_EXPR): New.
9789 (N_CP_TTYPES): Adjust.
9790
d73326ca
MP
97912014-10-15 Marek Polacek <polacek@redhat.com>
9792
9793 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9794
78a7c317
DD
97952014-10-14 DJ Delorie <dj@redhat.com>
9796
9797 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9798 types, not just __int128.
9799 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9800 types, not just __int128.
9801 (cpp_atomic_builtins): Round pointer sizes up.
9802 (type_suffix): Use type precision, not specific types.
9803 * c-common.c (c_common_reswords): Remove __int128 special case.
9804 (c_common_type_for_size): Check for all __intN types, not just
9805 __int128.
9806 (c_common_type_for_mode): Likewise.
9807 (c_common_signed_or_unsigned_type): Likewise.
9808 (c_build_bitfield_integer_type): Likewise.
9809 (c_common_nodes_and_builtins): Likewise.
9810 (keyword_begins_type_specifier): Likewise.
9811 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9812 __intN variants.
9813
2a22f99c
TS
98142014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9815
9816 * c-common.c: Use hash_table instead of hashtab.
9817
2a8ef767
ESR
98182014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9819
adfac8df 9820 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9821 C++11 section.
9822
3c9aabbd
MG
98232014-10-03 Marc Glisse <marc.glisse@inria.fr>
9824
9825 PR c++/54427
9826 PR c++/57198
9827 PR c++/58845
9828 * c-common.c (warn_logical_operator): Punt for vectors.
9829
a15f7cb8
ESR
98302014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9831
9832 Implement SD-6: SG10 Feature Test Recommendations
9833 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9834 macros and the __has_header macro.
9835
8d0cf15e
JM
98362014-09-30 Jason Merrill <jason@redhat.com>
9837
dd5d5481
JM
9838 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9839 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9840 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9841
b752325e
JM
9842 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9843 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9844
8d0cf15e
JM
9845 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9846 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9847
083e891e
MP
98482014-09-24 Marek Polacek <polacek@redhat.com>
9849
9850 PR c/61405
9851 PR c/53874
9852 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9853
7861b648
AK
98542014-09-23 Andi Kleen <ak@linux.intel.com>
9855
9856 * c-common.c (handle_no_reorder_attribute): New function.
9857 (c_common_attribute_table): Add no_reorder attribute.
9858
9a79452d
JM
98592014-09-22 Joseph Myers <joseph@codesourcery.com>
9860
9861 * c-cppbuiltin.c (c_cpp_builtins): Define
9862 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9863 modes.
9864
dd69f047
JM
98652014-09-18 Joseph Myers <joseph@codesourcery.com>
9866
9867 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9868 for supported floating-point modes.
9869
737a4826
MLI
98702014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9871
9872 * c.opt (Wpsabi): Use LangEnabledBy.
9873 * c-opts.c (c_common_handle_option): Do not handle here.
9874
8cc4b7a2
JM
98752014-09-12 Joseph Myers <joseph@codesourcery.com>
9876
9877 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9878 macros for floating-point modes.
9879
179b5a55
MG
98802014-09-11 Marc Glisse <marc.glisse@inria.fr>
9881
9882 PR target/58757
9883 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9884 __*_DENORM_MIN__ without denormals.
9885
570a11fe
JJ
98862014-09-10 Jakub Jelinek <jakub@redhat.com>
9887
9888 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9889 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9890 ubsan_create_data callers.
9891 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9892 index is constant or BIT_AND_EXPR with constant mask and is
9893 small enough for the bound.
9894 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9895 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9896
b559c810
MLI
98972014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9898
9899 * c.opt: Add CppReason to various flags.
9900 (Wdate-time): Re-sort.
9901 * c-common.c: Include c-common.h earlier.
9902 (struct reason_option_codes_t): Delete.
9903 (c_option_controlling_cpp_error): Prefix global type and struct
9904 with cpp_.
9905
1ef33fd4
MLI
99062014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9907
9908 * c.opt (Wnormalized): New.
9909 (Wnormalized=): Use Enum and Reject Negative.
9910 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9911
66bb34c0
JM
99122014-09-08 Joseph Myers <joseph@codesourcery.com>
9913
9914 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9915 digits of floating-point modes if -fbuilding-libgcc.
9916
53d68b9f
JM
99172014-09-05 Joseph Myers <joseph@codesourcery.com>
9918
9919 * c-cppbuiltin.c (c_cpp_builtins): Also define
9920 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9921 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9922 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9923 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9924 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9925 __LIBGCC_STACK_GROWS_DOWNWARD__,
9926 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9927 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9928 __LIBGCC_DWARF_FRAME_REGISTERS__,
9929 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9930 __LIBGCC_STACK_POINTER_REGNUM__ and
9931 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9932 (builtin_define_with_value): Handle backslash-escaping in string
9933 macro values.
9934
f65586dc
RB
99352014-09-05 Richard Biener <rguenther@suse.de>
9936
9937 PR middle-end/63148
9938 * c-format.c (check_format_arg): Properly handle
9939 effectively signed POINTER_PLUS_EXPR offset.
9940
2b71f4a4
MLI
99412014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9942
9943 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9944 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9945 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9946 and Init.
9947 * c-opts.c (c_common_handle_option): Do not handle here.
9948 (sanitize_cpp_opts): Likewise.
9949 * c-common.c (struct reason_option_codes_t): Handle
9950 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9951
d2e4feca
MP
99522014-09-03 Marek Polacek <polacek@redhat.com>
9953
9954 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9955
9a771876
JJ
99562014-09-02 Jakub Jelinek <jakub@redhat.com>
9957 Balaji V. Iyer <balaji.v.iyer@intel.com>
9958 Igor Zamyatin <igor.zamyatin@intel.com>
9959
9960 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9961 * c-common.c (c_common_reswords): Added _Cilk_for.
9962 * c-common.h (enum rid): Added RID_CILK_FOR.
9963 (cilk_for_number_of_iterations): Add declaration.
9964 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9965 CILK_FOR.
9966 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9967 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9968
81b5d104
MLI
99692014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9970
9971 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9972 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9973 Wundef): Use CPP, Var and Init.
9974 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9975
b753b37b
MLI
99762014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9977
9978 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9979 * c-opts.c (c_common_handle_option): Do not handle here.
9980
028aee17
JM
99812014-08-25 Jason Merrill <jason@redhat.com>
9982
9983 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9984 -std=c++14 and -std=gnu++14, rather than the reverse.
9985 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9986 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9987 * c-common.h (cxx_dialect): Remove cxx1y.
9988
e4276ba5
ESR
99892014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9990
9991 * c-common.h (enum cxx_dialect): Add cxx14.
9992 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9993 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9994 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9995
a545cacd
JM
99962014-08-22 Jason Merrill <jason@redhat.com>
9997
9998 * c.opt (std=gnu++17): Fix alias.
9999
59ea0364
MP
100002014-08-22 Marek Polacek <polacek@redhat.com>
10001
10002 PR c++/62199
10003 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10004 check for vector types. Drop LHS argument.
10005 * c-common.h (warn_logical_not_parentheses): Adjust.
10006
596e808c
MLI
100072014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10008
10009 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10010 (Wmultichar): Likewise.
10011 (Wdate-time): Use C-family languages instead of Common. Use CPP
10012 and Var.
10013 * c-opts.c (c_common_handle_option): Do not handle the above
10014 options here.
10015 (sanitize_cpp_opts): Likewise.
10016
18767f65
MLI
100172014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10018
10019 PR fortran/44054
10020 * c-opts.c: Include tree-diagnostics.h.
10021 (c_diagnostic_finalizer): New.
10022 (c_common_initialize_diagnostics): Use it.
10023
b4413594
MLI
100242014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10025
10026 PR preprocessor/51303
10027 * c-common.c (struct reason_option_codes_t option_codes):
10028 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10029
43f9a13c
MLI
100302014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10031
10032 PR c/60975
10033 PR c/53063
10034 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10035 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10036 (c_common_post_options): Call init_global_opts_from_cpp.
10037 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10038
04159acf
MP
100392014-08-19 Marek Polacek <polacek@redhat.com>
10040
10041 PR c++/62153
10042 * c-common.c (maybe_warn_bool_compare): New function.
10043 * c-common.h (maybe_warn_bool_compare): Declare.
10044 * c.opt (Wbool-compare): New option.
10045
35aff4fb
MP
100462014-08-19 Marek Polacek <polacek@redhat.com>
10047
10048 * c.opt (Wc99-c11-compat): New option.
10049
177cce46
MP
100502014-08-19 Marek Polacek <polacek@redhat.com>
10051
10052 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10053 to warn_c90_c99_compat.
10054 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10055 to -1.
10056
6ae9194f
MLI
100572014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10058 Steven Bosscher <steven@gcc.gnu.org>
10059
10060 PR c/52952
10061 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10062 format_check_results.
10063 (check_function_format): Use true and add comment for boolean
10064 argument.
10065 (finish_dollar_format_checking): Use explicit location when warning.
10066 (check_format_info): Likewise.
10067 (check_format_arg): Set extra_arg_loc and format_string_loc.
10068 (check_format_info_main): Use explicit location when warning.
10069 (check_format_types): Pass explicit location.
10070 (format_type_warning): Likewise.
10071
8e54f6d3
MLI
100722014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10073
10074 PR fortran/44054
10075 * c-format.c: Handle Fortran flags.
10076
cd4e76fc
IZ
100772014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10078
10079 PR other/61962
10080 * array-notation-common.c (find_rank): Added handling for other
10081 types of references.
10082
f3bede71
MP
100832014-08-10 Marek Polacek <polacek@redhat.com>
10084
10085 PR c/51849
10086 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10087 * c.opt (Wc90-c99-compat): Add option.
10088
9f25a338
TS
100892014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10090
10091 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10092
62e4eb35
MP
100932014-08-03 Marek Polacek <polacek@redhat.com>
10094
ab20d992 10095 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
10096 (c_add_case_label): Pass loc to check_case_value.
10097
b787e7a2
TS
100982014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10099
10100 * cilk.c: Use hash_map instead of pointer_map.
10101
6e2830c3
TS
101022014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10103
10104 * c-gimplify.c: Use hash_set instead of pointer_set.
10105
a7ee52fb
IZ
101062014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10107
10108 PR middle-end/61455
10109 * array-notation-common.c (extract_array_notation_exprs): Handling
10110 of DECL_EXPR added.
10111
944fa280
JJ
101122014-08-01 Jakub Jelinek <jakub@redhat.com>
10113
10114 * c-common.h (min_align_of_type): Removed prototype.
10115 * c-common.c (min_align_of_type): Removed.
10116 * c-ubsan.h (ubsan_maybe_instrument_reference,
10117 ubsan_maybe_instrument_member_call): New prototypes.
10118 * c-ubsan.c: Include stor-layout.h and builtins.h.
10119 (ubsan_maybe_instrument_reference_or_call,
10120 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10121 functions.
10122
b4dfdc11
MG
101232014-07-31 Marc Glisse <marc.glisse@inria.fr>
10124
10125 PR c++/60517
10126 * c.opt (-Wreturn-local-addr): Move to common.opt.
10127
a41844e5
JM
101282014-07-30 Jason Merrill <jason@redhat.com>
10129
10130 PR c++/61659
10131 PR c++/61687
10132 Revert:
10133 * c.opt (-fuse-all-virtuals): New.
10134
976d5a22
TT
101352014-07-30 Tom Tromey <tromey@redhat.com>
10136
10137 PR c/59855
10138 * c.opt (Wdesignated-init): New option.
10139 * c-common.c (c_common_attribute_table): Add "designated_init".
10140 (handle_designated_init): New function.
10141
cdc94aca
MP
101422014-07-24 Marek Polacek <polacek@redhat.com>
10143
10144 PR c/57653
10145 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10146
f41373b6
DS
101472014-07-16 Dodji Seketeli <dodji@redhat.com>
10148
10149 PR preprocessor/60723 - missing system-ness marks for macro tokens
10150 * c-ppoutput.c (struct print::prev_was_system_token): New data
10151 member.
10152 (init_pp_output): Initialize it.
10153 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10154 (do_line_change): Return a flag saying if a line marker was
10155 emitted or not.
10156 (scan_translation_unit): Detect if the system-ness of the token we
10157 are about to emit is different from the one of the previously
10158 emitted token. If so, emit a line marker. Avoid emitting useless
10159 adjacent line markers. Avoid emitting line markers for tokens
10160 originating from the expansion of built-in macros.
10161 (scan_translation_unit_directives_only): Adjust.
10162
4d661eaa
MP
101632014-07-15 Marek Polacek <polacek@redhat.com>
10164
10165 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10166 TYPE_MAX_VALUE is NULL.
10167
b108f48f
JJ
101682014-07-14 Jakub Jelinek <jakub@redhat.com>
10169
10170 PR middle-end/61294
10171 * c.opt (Wmemset-transposed-args): New warning.
10172
c0221884
JM
101732014-07-10 Jason Merrill <jason@redhat.com>
10174
10175 PR c++/61659
10176 PR c++/61687
10177 * c.opt (-fuse-all-virtuals): New.
10178
63dfbb95
RB
101792014-07-09 Richard Biener <rguenther@suse.de>
10180
10181 PR c-family/61741
10182 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10183 using unsigned arithmetic if overflow does not wrap instead of
10184 if overflow is undefined.
10185
773ec47f
MP
101862014-07-06 Marek Polacek <polacek@redhat.com>
10187
10188 PR c/6940
10189 * c.opt (Wsizeof-array-argument): New option.
10190
00a7ba58
JJ
101912014-07-03 Jakub Jelinek <jakub@redhat.com>
10192
b1726d6c 10193 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10194 comments->count <= 1, as comments->entries might be NULL.
10195
52ec0ea3
MP
101962014-07-01 Marek Polacek <polacek@redhat.com>
10197
10198 * c.opt (Wint-conversion): New option.
10199
d5c3d343
MP
102002014-07-01 Marek Polacek <polacek@redhat.com>
10201
10202 PR c/58286
10203 * c.opt (Wincompatible-pointer-types): New option.
10204
6e7ceb17
PC
102052014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10206
10207 PR c++/51400
10208 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10209 Do not discard TYPE_QUALS of type.
10210
da73100b
JM
102112014-06-26 Jason Merrill <jason@redhat.com>
10212
10213 * c-common.h (enum cxx_dialect): Add cxx1z.
10214 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10215 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10216
08eedf75
TJ
102172014-06-26 Teresa Johnson <tejohnson@google.com>
10218
10219 * c-common.h (get_dump_info): Declare.
10220 * c-gimplify.c (c_genericize): Use saved dump files.
10221 * c-opts.c (c_common_parse_file): Begin and end dumps
10222 once around parsing invocation.
10223 (get_dump_info): New function.
10224
7b56b2f8
MP
102252014-06-23 Marek Polacek <polacek@redhat.com>
10226 Andrew MacLeod <amacleod@redhat.com>
10227
10228 PR c/61553
10229 * c-common.c (get_atomic_generic_size): Don't segfault if the
10230 type doesn't have a size.
10231
0e37a2f3
MP
102322014-06-20 Marek Polacek <polacek@redhat.com>
10233
10234 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10235 (ubsan_walk_array_refs_r): New function.
10236 (c_genericize): Instrument array bounds.
10237 * c-ubsan.c: Include "internal-fn.h".
10238 (ubsan_instrument_division): Mark instrumented arrays as having
10239 side effects. Adjust ubsan_type_descriptor call.
10240 (ubsan_instrument_shift): Likewise.
10241 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10242 (ubsan_instrument_bounds): New function.
10243 (ubsan_array_ref_instrumented_p): New function.
10244 (ubsan_maybe_instrument_array_ref): New function.
10245 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10246 (ubsan_array_ref_instrumented_p): Declare.
10247 (ubsan_maybe_instrument_array_ref): Declare.
10248
102492014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10250
10251 PR lto/61123
10252 * c.opt (fshort-enums): Add to LTO.
10253 * c.opt (fshort-wchar): Likewise.
10254
5c3d09f7
MP
102552014-06-16 Marek Polacek <polacek@redhat.com>
10256
10257 PR c/60439
10258 * c.opt (Wswitch-bool): Add Var.
10259
9cf32741
JJ
102602014-06-12 Jakub Jelinek <jakub@redhat.com>
10261
10262 PR middle-end/61486
10263 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10264 #pragma omp target teams or
10265 #pragma omp {,target }teams distribute simd.
10266
62984918
JM
102672014-06-12 Jason Merrill <jason@redhat.com>
10268
10269 * c.opt (Wabi=, fabi-compat-version): New.
10270 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10271 (c_common_post_options): Handle flag_abi_compat_version default.
10272 Disallow -fabi-compat-version=1.
10273 * c-common.h (abi_version_crosses): New.
10274
f961457f
JH
102752014-06-11 Jan Hubicka <hubicka@ucw.cz>
10276
adfac8df 10277 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10278 section names that are no longer trees.
10279
92d28cbb
JJ
102802014-06-10 Jakub Jelinek <jakub@redhat.com>
10281
10282 PR fortran/60928
10283 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10284 (omp_pragmas): ... back here.
10285
742938c9
MP
102862014-06-05 Marek Polacek <polacek@redhat.com>
10287
10288 PR c/49706
10289 * c-common.c (warn_logical_not_parentheses): New function.
10290 * c-common.h (warn_logical_not_parentheses): Declare.
10291 * c.opt (Wlogical-not-parentheses): New option.
10292
9d548dfb
MP
102932014-06-04 Marek Polacek <polacek@redhat.com>
10294
10295 PR c/30020
10296 * c-common.c (check_case_bounds): Add location parameter.
10297 Use it.
10298 (c_add_case_label): Pass loc to check_case_bounds.
10299
fedfecef
MP
103002014-06-03 Marek Polacek <polacek@redhat.com>
10301
10302 PR c/60439
10303 * c.opt (Wswitch-bool): New option.
10304
f6a7cffc
TS
103052014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10306
040d18b6
TS
10307 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10308 Remove prototypes.
10309 (record_types_used_by_current_var_decl): Move prototype to where
10310 it belongs.
10311
f6a7cffc
TS
10312 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10313 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10314 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10315
632f2871
RS
103162014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10317
10318 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10319 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10320 void_zero_node.
10321 * c-pretty-print.c (pp_c_void_constant): New function.
10322 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10323 (c_pretty_printer::expression): Handle VOID_CST.
10324 * cilk.c (extract_free_variables): Likewise.
10325 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10326 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10327
766090c2
TS
103282014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10329
10330 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10331 * c-pragma.c (push_alignment): Adjust.
10332 (handle_pragma_push_options): Likewise.
10333
661a0813
MP
103342014-05-09 Marek Polacek <polacek@redhat.com>
10335
10336 PR c/50459
10337 * c-common.c (check_user_alignment): Return -1 if alignment is error
10338 node.
10339 (handle_aligned_attribute): Don't call default_conversion on
10340 FUNCTION_DECLs.
10341 (handle_vector_size_attribute): Likewise.
10342 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10343 (handle_sentinel_attribute): Call default_conversion and allow even
10344 integral types as an argument.
10345
2793eeab
MP
103462014-05-08 Marek Polacek <polacek@redhat.com>
10347
10348 PR c/61053
10349 * c-common.c (min_align_of_type): New function factored out from...
10350 (c_sizeof_or_alignof_type): ...here.
10351 * c-common.h (min_align_of_type): Declare.
10352
f827930a
MP
103532014-05-08 Marek Polacek <polacek@redhat.com>
10354
10355 PR c/61077
10356 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10357 parameter type of main.
10358
ca49b74e
DD
103592014-05-07 DJ Delorie <dj@redhat.com>
10360
10361 * c-cppbuiltin.c (print_bits_of_hex): New.
10362 (builtin_define_type_minmax): Print values using hex so as not to
10363 require a pre-computed list of string values.
10364
1d60af08
KZ
103652014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10366 Mike Stump <mikestump@comcast.net>
10367 Richard Sandiford <rdsandiford@googlemail.com>
10368
10369 * c-ada-spec.c: Include wide-int.h.
10370 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10371 (dump_generic_ada_node): Use wide-int interfaces.
10372 * c-common.c: Include wide-int-print.h.
10373 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10374 (pointer_int_sum): Use wide-int interfaces.
10375 (c_common_nodes_and_builtins): Use make_int_cst.
10376 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10377 (handle_alloc_size_attribute): Use wide-int interfaces.
10378 (get_nonnull_operand): Likewise.
10379 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10380 * c-lex.c: Include wide-int.h.
10381 (narrowest_unsigned_type): Take a widest_int rather than two
10382 HOST_WIDE_INTs.
10383 (narrowest_signed_type): Likewise.
10384 (interpret_integer): Update accordingly. Use wide-int interfaces.
10385 (lex_charconst): Use wide-int interfaces.
10386 * c-pretty-print.c: Include wide-int.h.
10387 (pp_c_integer_constant): Use wide-int interfaces.
10388 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10389 INT_CST_LT_UNSIGNED.
10390
b15458be
RB
103912014-05-06 Richard Biener <rguenther@suse.de>
10392
10393 * c-opts.c (c_common_post_options): For -freestanding,
10394 -fno-hosted and -fno-builtin disable pattern recognition
10395 if not enabled explicitely.
10396
6577374e
MP
103972014-05-02 Marek Polacek <polacek@redhat.com>
10398
10399 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10400
d00887e8
MP
104012014-05-01 Marek Polacek <polacek@redhat.com>
10402
10403 PR c/43245
10404 * c.opt (Wdiscarded-qualifiers): Add.
10405
f8ed5150
MP
104062014-04-30 Marek Polacek <polacek@redhat.com>
10407
10408 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10409 INT_MIN / -1 sanitization only for integer types.
10410
45484dcf
MP
104112014-04-25 Marek Polacek <polacek@redhat.com>
10412
10413 PR c/18079
10414 * c-common.c (handle_noinline_attribute): Warn if the attribute
10415 conflicts with always_inline attribute.
10416 (handle_always_inline_attribute): Warn if the attribute conflicts
10417 with noinline attribute.
10418
38e514c0
MP
104192014-04-25 Marek Polacek <polacek@redhat.com>
10420
10421 PR c/60156
10422 * c-common.c (check_main_parameter_types): Warn about variadic main.
10423
44875f92
MS
104242014-04-24 Mike Stump <mikestump@comcast.net>
10425
10426 * c.opt (Wshadow-ivar): Default to on.
10427
dcaaa5a0
DP
104282014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10429
10430 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10431
c07d7c02
MP
104322014-04-23 Marek Polacek <polacek@redhat.com>
10433
10434 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10435
1c33c9b7
JJ
104362014-04-22 Jakub Jelinek <jakub@redhat.com>
10437
10438 PR sanitizer/60275
10439 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10440 if flag_sanitize_undefined_trap_on_error.
10441 (ubsan_instrument_division, ubsan_instrument_shift,
10442 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10443 if !flag_sanitize_recover.
10444
793c625f
MG
104452014-04-22 Marc Glisse <marc.glisse@inria.fr>
10446
10447 PR libstdc++/43622
10448 * c-common.c (registered_builtin_types): Make non-static.
10449 * c-common.h (registered_builtin_types): Declare.
10450
b0f1bf36 104512014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10452 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10453
10454 PR c/60819
10455 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10456 apply may-alias the scalar pointer type when applicable.
10457
3b07fa4a
IZ
104582014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10459
10460 PR middle-end/60467
10461 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10462 as possible argument for Cilk_spawn.
10463
cbbd2b1c
TB
104642014-04-11 Tobias Burnus <burnus@net-b.de>
10465
10466 PR c/60194
10467 * c.opt (Wformat-signedness): Add
10468 * c-format.c(check_format_types): Use it.
10469
6415bd5d
JM
104702014-04-11 Jason Merrill <jason@redhat.com>
10471
10472 PR c++/57926
10473 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10474 default_conversion for an array argument.
10475
6525783a
MP
104762014-04-08 Marek Polacek <polacek@redhat.com>
10477
10478 PR sanitizer/60745
10479 * c-ubsan.c: Include asan.h.
10480 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10481
880a467b
NS
104822014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10483
10484 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10485
7b59ff2d
MP
104862014-04-02 Marek Polacek <polacek@redhat.com>
10487
10488 * c-common.h (c_expand_expr): Remove declaration.
10489
8edbfaa6
JJ
104902014-03-28 Jakub Jelinek <jakub@redhat.com>
10491
10492 PR c++/60689
10493 * c-common.c (add_atomic_size_parameter): When creating new
10494 params vector, push the size argument first.
10495
07d72e1d
JJ
104962014-03-26 Jakub Jelinek <jakub@redhat.com>
10497
10498 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10499 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10500 ubsan_create_data callers.
10501
b35e0fa0
JJ
105022014-03-22 Jakub Jelinek <jakub@redhat.com>
10503
10504 PR debug/60603
10505 * c-opts.c (c_finish_options): Restore cb_file_change call to
10506 <built-in>.
10507
39a1ebb3
JJ
105082014-03-13 Jakub Jelinek <jakub@redhat.com>
10509
10510 PR middle-end/36282
10511 * c-pragma.c (apply_pragma_weak): Only look at
10512 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10513 DECL_ASSEMBLER_NAME_SET_P (decl).
10514 (maybe_apply_pending_pragma_weaks): Exit early if
10515 vec_safe_is_empty (pending_weaks) rather than only when
10516 !pending_weaks.
10517 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10518 set assembler name back to NULL afterwards.
10519
a07f6ed2
JM
105202014-03-11 Jason Merrill <jason@redhat.com>
10521
10522 * c.opt: Add -std=gnu++14.
10523
75b107f5
IB
105242014-03-11 Ian Bolton <ian.bolton@arm.com>
10525
10526 * c-opts.c (c_common_post_options): Don't override
10527 -ffp-contract=fast if unsafe-math-optimizations is on.
10528
f42c637e
PM
105292014-03-08 Paulo Matos <paulo@matos-sorge.com>
10530
22b15758 10531 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10532
70e24808
JM
105332014-03-07 Jason Merrill <jason@redhat.com>
10534
10535 * c.opt: Add -std=c++14.
10536
3af9c5e9
MP
105372014-03-06 Marek Polacek <polacek@redhat.com>
10538
10539 PR c/60197
10540 * cilk.c (contains_cilk_spawn_stmt): New function.
10541 (contains_cilk_spawn_stmt_walker): Likewise.
10542 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10543 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10544
b3bdf019
JJ
105452014-03-03 Jakub Jelinek <jakub@redhat.com>
10546
10547 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10548 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10549 even when flag_preprocess_only.
10550
ca7e759d
JM
105512014-02-26 Jason Merrill <jason@redhat.com>
10552
10553 PR c++/59231
10554 PR c++/11586
10555 * c-common.c (shorten_compare): Don't check
10556 c_inhibit_evaluation_warnings.
10557
28e41874
JJ
105582014-02-19 Jakub Jelinek <jakub@redhat.com>
10559
cca615af
JJ
10560 PR c/37743
10561 * c-common.c (c_common_nodes_and_builtins): When initializing
10562 c_uint{16,32,64}_type_node, also set corresponding
10563 uint{16,32,64}_type_node to the same value.
10564
28e41874
JJ
10565 PR c++/60267
10566 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10567 for PRAGMA_IVDEP if flag_preprocess_only.
10568
c2bf53a1
JJ
105692014-02-12 Jakub Jelinek <jakub@redhat.com>
10570
10571 PR c/60101
10572 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10573 if false, add ADD itself, rather than vice versa.
10574 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10575 copy. For SAVE_EXPR, only call merge_tlist once.
10576
8fcbce72
JJ
105772014-02-08 Jakub Jelinek <jakub@redhat.com>
10578
10579 PR middle-end/60092
10580 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10581 and tree_to_uhwi.
10582 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10583 functions.
10584 (c_common_attribute_table): Add alloc_align and assume_aligned
10585 attributes.
10586
0a756a3f
MP
105872014-02-06 Marek Polacek <polacek@redhat.com>
10588
10589 PR c/60087
10590 * c-common.c (warn_for_sign_compare): Call warning_at with location
10591 instead of warning.
10592
7ec4847a
MP
105932014-02-05 Marek Polacek <polacek@redhat.com>
10594
10595 PR c/53123
10596 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10597 statement.
10598
66f20604
MP
105992014-02-04 Marek Polacek <polacek@redhat.com>
10600
10601 PR c/60036
10602 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10603 SAVE_EXPR.
10604
5d77fb19
MG
106052014-02-03 Marc Glisse <marc.glisse@inria.fr>
10606
10607 PR c++/53017
10608 PR c++/59211
10609 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10610 handle_vector_size_attribute, handle_nonnull_attribute): Call
10611 default_conversion on the attribute argument.
10612 (handle_nonnull_attribute): Increment the argument number.
10613
81e5eca8
MP
106142014-01-31 Marek Polacek <polacek@redhat.com>
10615
10616 PR c/59963
10617 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10618 build_function_call_vec.
10619 (resolve_overloaded_builtin): Likewise.
10620 * c-common.h (build_function_call_vec): Adjust declaration.
10621
68fca595
MP
106222014-01-30 Marek Polacek <polacek@redhat.com>
10623
10624 PR c/59940
10625 * c-common.h (unsafe_conversion_p): Adjust declaration.
10626 (warnings_for_convert_and_check): Likewise.
10627 (convert_and_check): Likewise.
10628 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10629 expansion_point_location_if_in_system_header on it.
10630 (warnings_for_convert_and_check): Add location parameter. Call
10631 expansion_point_location_if_in_system_header on it. Use it.
10632 (convert_and_check): Add location parameter. Use it.
10633 (conversion_warning): Likewise.
10634 (c_add_case_label): Adjust convert_and_check calls.
10635 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10636
b72271b9
BI
106372014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10638
10639 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10640 flag_cilkplus.
10641 * c-pragma.c (init_pragma): Likewise.
10642 * c.opt: Likewise.
10643
393e8e8b
MP
106442014-01-23 Marek Polacek <polacek@redhat.com>
10645
10646 PR c/59846
10647 * c-common.c (shorten_compare): Add location_t parameter.
10648 * c-common.h (shorten_binary_op): Adjust declaration.
10649
f04dda30
MP
106502014-01-23 Marek Polacek <polacek@redhat.com>
10651
10652 PR c/58346
10653 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10654 * c-common.h: Declare it.
10655
621955cb
EB
106562014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10657
10658 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10659 * c-ada-spec.c (dump_ads): Likewise.
10660 (cpp_check): Likewise.
10661 (dump_ada_specs): Likewise.
10662
106632014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10664
10665 PR c++/49718
10666 * c-common.c (handle_no_instrument_function_attribute): Allow
10667 no_instrument_function attribute in class member
10668 definition/declaration.
10669
241f845a
JJ
106702014-01-15 Jakub Jelinek <jakub@redhat.com>
10671
10672 PR c/58943
10673 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10674 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10675 being COMPOUND_EXPR.
10676 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10677 operand a SAVE_EXPR and second MODIFY_EXPR.
10678
e83b8e2e
JJ
106792014-01-09 Jakub Jelinek <jakub@redhat.com>
10680
10681 PR target/58115
10682 * c-pch.c (c_common_write_pch): Call
10683 prepare_target_option_nodes_for_pch.
10684
23a5b65a
RS
106852014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10686
10687 Update copyright years
10688
f9030485
RS
106892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10690
10691 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10692 the copyright notice.
10693
f2aa696b
EB
106942013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10695
10696 * c-ada-spec.c (print_constructor): New function.
10697 (print_destructor): Retrieve the origin of the destructor.
10698 (print_ada_declaration): Revamp handling of constructors/destructors.
10699
3f8257db 107002013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10701 Bill Maddox <maddox@google.com>
10702 Jason Merrill <jason@redhat.com>
10703
10704 * c.opt: Add -fdeclone-ctor-dtor.
10705 * c-opts.c (c_common_post_options): Default to on iff -Os.
10706
41958c28
BI
107072013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10708
10709 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10710 attribute.
10711 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10712 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10713 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10714 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10715 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10716 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10717 PRAGMA_CILK_CLAUSE_UNIFORM.
10718
b1726d6c 10719
12893402
BI
107202013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10721
10722 * cilk.c (cilk_outline): Made this function non-static.
10723 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10724 (create_cilk_wrapper): Added a new parameter: a function pointer.
10725 (c_install_body_w_frame_cleanup): Remove
10726 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10727 * c-common.h (cilk_outline): New prototype.
10728 (gimplify_cilk_spawn): Removed two parameters.
10729 (cilk_install_body_with_frame_cleanup): New prototype.
10730 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10731 CILK_SPAWN_STMT case.
10732
085b42ed
BS
107332013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10734
2ce064c3
BS
10735 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10736
085b42ed
BS
10737 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10738 (int_array_type_node): Remove.
10739 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10740
9e36c9ed
MP
107412013-12-05 Marek Polacek <polacek@redhat.com>
10742
10743 PR c/52023
10744 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10745 [ADJUST_FIELD_ALIGN].
10746
296674db
JM
107472013-12-04 Joseph Myers <joseph@codesourcery.com>
10748
10749 PR c/52023
10750 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10751 and check field alignment if set.
10752 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10753 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10754
b1726d6c 107552013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10756 Marek Polacek <polacek@redhat.com>
10757
10758 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10759 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10760
d7947e19
L
107612013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10762
10763 PR c/59309
10764 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10765 arguments.
10766
fad7652e
JJ
107672013-11-29 Jakub Jelinek <jakub@redhat.com>
10768
10769 PR c/59280
10770 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10771 goto invalid. If it is error_mark_node, don't issue further
10772 diagnostics.
10773
8b5e1202
SO
107742013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10775
10776 * c.opt (Wopenmp-simd): New.
10777
0a508bb6
JJ
107782013-11-22 Jakub Jelinek <jakub@redhat.com>
10779
10780 * c-ubsan.h (ubsan_instrument_return): New prototype.
10781 * c-ubsan.c (ubsan_instrument_return): New function.
10782
2fb9a547
AM
107832013-11-22 Andrew MacLeod <amacleod@redhat.com>
10784
10785 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10786 * c-gimplify.c: Likewise.
10787 * cilk.c: Likewise.
2fb9a547 10788
8400e75e
DM
107892013-11-22 David Malcolm <dmalcolm@redhat.com>
10790
10791 * c-common.c (unsafe_conversion_p): Remove use of
10792 EXPR_LOC_OR_HERE macro.
10793 (conversion_warning): Likewise.
10794 (warnings_for_convert_and_check): Likewise.
10795 (warn_for_collisions_1): Likewise.
10796 (shorten_compare): Likewise, and remove use of in_system_header
10797 macro, using the location from the former.
10798 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10799 (cb_def_pragma): Remove use of in_system_header macro.
10800 (lex_string): Likewise.
10801 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10802
eb1ce453
KZ
108032013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10804 Mike Stump <mikestump@comcast.net>
10805 Richard Sandiford <rdsandiford@googlemail.com>
10806
10807 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10808 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10809 tree_fits_shwi_p or tree_fits_uhwi_p.
10810 (dump_generic_ada_node): Likewise.
10811 * c-format.c (check_format_arg): Likewise.
10812 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10813
6b3b8c27
KZ
108142013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10815
10816 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10817
49b0aa18
JC
108182013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10819
10820 PR c/53001
10821 * c-common.c (unsafe_conversion_p): Make this function
10822 return an enumeration with more detail.
10823 (conversion_warning): Use the new return type of
10824 unsafe_conversion_p to separately warn either about conversions
10825 that lower floating point number precision or about the other
10826 kinds of conversions.
10827 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10828 (unsafe_conversion_p): switching return type to
10829 conversion_safety enumeration.
49b0aa18
JC
10830 * c.opt: Adding new warning -Wfloat-conversion and
10831 enabling it with -Wconversion.
10832
b826515a
BS
108332013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10834
8e745a17
JJ
10835 * c-opts.c: Include plugin.h.
10836 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10837
b9a55b13
MP
108382013-11-19 Marek Polacek <polacek@redhat.com>
10839
10840 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10841 call.
10842 (ubsan_instrument_shift): Likewise.
10843 (ubsan_instrument_vla): Likewise.
10844
7d362f6c
RS
108452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10846
10847 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10848 cast to unsigned type.
10849
386b1f1f
RS
108502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10851
10852 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10853 tree_low_cst.
10854 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10855 rather than tree_low_cst.
10856
ae7e9ddd
RS
108572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10858
10859 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10860 tree_to_uhwi throughout.
10861
9439e9a1
RS
108622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10863
10864 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10865 tree_low_cst (..., 0) with tree_to_shwi throughout.
10866
cc269bb6
RS
108672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10868
10869 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10870 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10871
9541ffee
RS
108722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10873
10874 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10875 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10876
c02065fc
AH
108772013-11-15 Aldy Hernandez <aldyh@redhat.com>
10878
10879 * c-cilkplus.c: New file.
10880 * c-common.c (readonly_error): Add location argument.
10881 * c-common.h (readonly_error): Same.
10882 (c_finish_cilk_clauses): Protoize.
10883 (c_check_cilk_loop): Same.
10884 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10885 Do not fail on error_mark_node.
10886 Abstract increment canonicalization to here...
10887 (c_omp_for_incr_canonicalize_ptr): New.
10888 c-pragma.c (init_pragma): Register "simd" pragma.
10889 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10890 (enum pragma_cilk_clause): New.
10891
9cc65f15
RS
108922013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10893
10894 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10895 wchar_type and host_integerp checks.
10896
18f429e2
AM
108972013-11-14 Andrew MacLeod <amacleod@redhat.com>
10898
10899 * c-common.c: Likewise.
10900 * c-gimplify.c: Likewise.
10901 * cilk.c: Likewise.
10902
d8a2d370
DN
109032013-11-14 Diego Novillo <dnovillo@google.com>
10904
10905 * c-common.c: Include fold-const.h.
10906 Include stor-layout.h.
10907 Include calls.h.
10908 Include stringpool.h.
10909 Include attribs.h.
10910 Include varasm.h.
10911 Include trans-mem.h.
10912 * c-cppbuiltin.c: Include stor-layout.h.
10913 Include stringpool.h.
10914 * c-format.c: Include stringpool.h.
10915 * c-lex.c: Include stringpool.h.
10916 Include stor-layout.h.
10917 * c-pragma.c: Include stringpool.h.
10918 Include attribs.h.
10919 Include varasm.h.
10920 Include gcc-symtab.h.
10921 * c-pretty-print.c: Include stor-layout.h.
10922 Include attribs.h.
10923 * cilk.c: Include stringpool.h.
10924 Include calls.h.
10925
38b7bc7f
JM
109262013-11-13 Joseph Myers <joseph@codesourcery.com>
10927
10928 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10929 * c-common.c (c_common_reswords): Add __auto_type.
10930 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10931
45b0be94
AM
109322013-11-12 Andrew MacLeod <amacleod@redhat.com>
10933
18f429e2
AM
10934 * c-common.c: Include gimplify.h.
10935 * c-gimplify.c: Likewise.
10936 * cilk.c: Likewise.
10937 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10938 * c-ubsan.c: Don't include gimple.h.
45b0be94 10939
582d9b50
JM
109402013-11-12 Joseph Myers <joseph@codesourcery.com>
10941
10942 * c-common.c (c_common_reswords): Add _Thread_local.
10943
6b28e197
JM
109442013-11-09 Joseph Myers <joseph@codesourcery.com>
10945
10946 * c-common.c (atomic_size_supported_p): New function.
10947 (resolve_overloaded_atomic_exchange)
10948 (resolve_overloaded_atomic_compare_exchange)
10949 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10950 Use it instead of comparing size with a local list of sizes.
10951
267bac10
JM
109522013-11-07 Andrew MacLeod <amacleod@redhat.com>
10953 Joseph Myers <joseph@codesourcery.com>
10954
10955 * c-common.h (enum rid): Add RID_ATOMIC.
10956 * c-common.c (c_common_reswords): Add _Atomic.
10957 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10958 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10959 * c-format.c (check_format_types): Check for extra _Atomic
10960 qualifiers in format argument.
10961 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10962 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10963
5157b91e
TB
109642013-11-06 Tobias Burnus <burnus@net-b.de>
10965
10966 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10967
6dbe0958
JM
109682013-11-06 Joseph Myers <joseph@codesourcery.com>
10969
10970 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10971 standards modes.
10972 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10973 to mean lack of IEEE 754 support.
10974
e8ff5196
TB
109752013-11-05 Tobias Burnus <burnus@net-b.de>
10976
10977 * c.opt (-Wdate-time): New option
10978 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10979
254a0760
JM
109802013-11-05 Joseph Myers <joseph@codesourcery.com>
10981
10982 * c-cppbuiltin.c (cpp_iec_559_value): Test
10983 flag_excess_precision_cmdline not flag_excess_precision.
10984
6d7f7e0a
TB
109852013-11-05 Tobias Burnus <burnus@net-b.de>
10986
10987 * c.opt (fopenmp-simd): New option.
10988 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10989 (omp_pragmas): ... this new struct.
10990 (c_pp_lookup_pragma): Also walk omp_pragmas.
10991 (init_pragma): Init pragmas for -fopenmp-simd.
10992
55a7f02f
MP
109932013-11-04 Marek Polacek <polacek@redhat.com>
10994
10995 PR c++/58979
10996 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10997
9193fb05
JM
109982013-11-04 Joseph Myers <joseph@codesourcery.com>
10999
11000 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11001 New functions.
11002 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11003
94159ecf
EB
110042013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11005
11006 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11007 (dump_ada_specs): Adjust prototype of second callback.
11008 * c-ada-spec.c (cpp_check): New global variable.
11009 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11010 (print_generic_ada_decl): Likewise.
11011 (has_static_fields): Change return type to bool and add guard.
11012 (has_nontrivial_methods): New predicate.
11013 (is_tagged_type): Change return type to bool.
11014 (separate_class_package): Call has_nontrivial_methods.
11015 (pp_ada_tree_identifier): Minor tweaks.
11016 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11017 (dump_ada_array_domains): Likewise.
11018 (dump_ada_array_type): Likewise.
11019 (dump_template_types): Remove cpp_check parameter and do not pass it to
11020 dump_generic_ada_node.
11021 (dump_ada_template): Likewise.
11022 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11023 recursively.
11024 (print_ada_methods): Change return type to integer. Remove cpp_check
11025 parameter and do not pass it down.
11026 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11027 dump_generic_ada_node.
11028 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11029 accessing methods.
11030 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11031 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11032 value of print_ada_methods.
11033 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11034 Set cpp_check to it before invoking dump_ada_nodes.
11035 (dump_ada_specs): Likewise.
11036
b906f4ca
MP
110372013-11-03 Marek Polacek <polacek@redhat.com>
11038
11039 * c-ubsan.c: Don't include hash-table.h.
11040 (ubsan_instrument_vla): New function.
11041 * c-ubsan.h: Declare it.
11042
5e20cdc9
DM
110432013-10-31 David Malcolm <dmalcolm@redhat.com>
11044
11045 Automated part of renaming of symtab_node_base to symtab_node.
11046
11047 Patch autogenerated by rename_symtab.py from
11048 https://github.com/davidmalcolm/gcc-refactoring-scripts
11049 revision 58bb219cc090b2f4516a9297d868c245495ee622
11050
11051 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11052 symtab_node_base to symtab_node.
11053
7057e645
ESR
110542013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11055
8e745a17 11056 Implement C++14 digit separators.
7057e645
ESR
11057 * c-lex.c (interpret_float): Remove digit separators from scratch string
11058 before building real literal.
11059
193ea7bc
JJ
110602013-10-30 Jakub Jelinek <jakub@redhat.com>
11061
11062 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11063
939b37da
BI
110642013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11065
11066 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11067 fields.
11068 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11069 enabled.
11070 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11071 (insert_cilk_frame): New prototype.
11072 (cilk_init_builtins): Likewise.
11073 (gimplify_cilk_spawn): Likewise.
11074 (c_cilk_install_body_w_frame_cleanup): Likewise.
11075 (cilk_detect_spawn_and_unwrap): Likewise.
11076 (cilk_set_spawn_marker): Likewise.
11077 (build_cilk_sync): Likewise.
11078 (build_cilk_spawn): Likewise.
11079 * cilk.c: New file.
11080
67348ccc
DM
110812013-10-29 David Malcolm <dmalcolm@redhat.com>
11082
11083 Patch autogenerated by refactor_symtab.py from
11084 https://github.com/davidmalcolm/gcc-refactoring-scripts
11085 revision 58bb219cc090b2f4516a9297d868c245495ee622
11086
11087 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11088 to a true class hierarchy.
11089 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11090
d570872d
RS
110912013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11092
11093 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11094
98906124
JL
110952013-10-26 Jeff Law <law@redhat.com>
11096
adfac8df
JJ
11097 * c-common.c (c_define_builtins): Remove mudflap support.
11098 * c.opt: Ignore and warn for mudflap options.
98906124 11099
d73749df 111002013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
11101
11102 PR other/33426
11103 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11104 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11105
3f04b1bb
JM
111062013-10-23 Jason Merrill <jason@redhat.com>
11107
11108 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11109
acf0174b
JJ
111102013-10-11 Jakub Jelinek <jakub@redhat.com>
11111
acd15a28
JJ
11112 * c-common.h (omp_clause_mask::operator !=): New method.
11113 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11114 instead of if (mask & something) tests everywhere.
11115
acf0174b
JJ
11116 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11117 201307 instead of 201107.
11118 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11119 (c_common_attribute_table): Add "omp declare target" and
11120 "omp declare simd" attributes.
11121 (handle_omp_declare_target_attribute,
11122 handle_omp_declare_simd_attribute): New functions.
11123 * c-omp.c: Include c-pragma.h.
11124 (c_finish_omp_taskgroup): New function.
11125 (c_finish_omp_atomic): Add swapped argument, if true,
11126 build the operation first with rhs, lhs arguments and use NOP_EXPR
11127 build_modify_expr.
11128 (c_finish_omp_for): Add code argument, pass it down to make_code.
11129 (c_omp_split_clauses): New function.
11130 (c_split_parallel_clauses): Removed.
11131 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11132 c_omp_declare_simd_clauses_to_decls): New functions.
11133 * c-common.h (omp_clause_mask): New type.
11134 (OMP_CLAUSE_MASK_1): Define.
11135 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11136 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11137 omp_clause_mask::operator |, omp_clause_mask::operator &,
11138 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11139 omp_clause_mask::operator ==): New methods.
11140 (enum c_omp_clause_split): New.
11141 (c_finish_omp_taskgroup): New prototype.
11142 (c_finish_omp_atomic): Add swapped argument.
11143 (c_finish_omp_for): Add code argument.
11144 (c_omp_split_clauses): New prototype.
11145 (c_split_parallel_clauses): Removed.
11146 (c_omp_declare_simd_clauses_to_numbers,
11147 c_omp_declare_simd_clauses_to_decls): New prototypes.
11148 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11149 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11150 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11151 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11152 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11153 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11154 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11155 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11156 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11157 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11158 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11159 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11160 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11161 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11162 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11163 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11164 PRAGMA_OMP_CLAUSE_UNIFORM.
11165
826cacfe
MG
111662013-10-09 Marc Glisse <marc.glisse@inria.fr>
11167
11168 PR tree-optimization/20318
11169 * c-common.c (handle_returns_nonnull_attribute): New function.
11170 (c_common_attribute_table): Add returns_nonnull.
11171
2284b034
MG
111722013-10-03 Marc Glisse <marc.glisse@inria.fr>
11173
11174 PR c++/19476
11175 * c.opt (fcheck-new): Move to common.opt.
11176
b56e9788
MP
111772013-09-25 Marek Polacek <polacek@redhat.com>
11178 Jakub Jelinek <jakub@redhat.com>
11179
11180 PR sanitizer/58413
11181 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11182 an expression if we can prove it is correct.
11183 (ubsan_instrument_division): Likewise. Remove unnecessary
11184 check.
11185
ce6923c5
MP
111862013-09-18 Marek Polacek <polacek@redhat.com>
11187
11188 PR sanitizer/58411
11189 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11190 Declare it.
11191 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11192
fb5610fb
IS
111932013-09-14 Iain Sandoe <iain@codesourcery.com>
11194
11195 PR target/48094
11196 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11197 fobjc-gc, freplace-objc-classes): Accept for LTO.
11198
88b0e79e
JC
111992013-09-13 Jacek Caban <jacek@codeweavers.com>
11200
11201 * c-target.def: New hook
11202
c9b0866a
PC
112032013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11204
11205 PR c++/43452
11206 * c.opt (Wdelete-incomplete): Add.
11207
0af94e6f
JR
112082013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11209
11210 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11211 (vector_types_compatible_elements_p): New function.
11212 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11213 declaration.
11214 (vector_types_compatible_elements_p): Declare.
11215
7c26172c
GDR
112162013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11217
11218 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11219 a virtual member function.
11220 (pp_simple_type_specifier): Remove.
11221 (pp_c_type_specifier): Likewise.
11222 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11223 Rename from pp_c_type_specifier. Adjust.
11224 (c_pretty_printer::c_pretty_printer): Do not assign to
11225 simple_type_specifier.
11226
20059c8b
GDR
112272013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11228
11229 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11230 member function.
11231 (c_pretty_printer::storage_class_specifier): Likewise.
11232 (c_pretty_printer::initializer): Likewise.
11233 (pp_declaration): Remove.
11234 (pp_declaration_specifiers): Likewise.
11235 (pp_abstract_declarator): Likewise.
11236 (pp_declarator): Likewise.
11237 (pp_type_id): Likewise.
11238 (pp_statement): Likewise.
11239 (pp_constant): Likewise.
11240 (pp_id_expression): Likewise.
11241 (pp_primary_expression): Likewise.
11242 (pp_unary_expression): Likewise.
11243 (pp_multiplicative_expression): Likewise.
11244 (pp_conditional_expression): Likewise.
11245 (pp_assignment_expression): Likewise.
11246 (pp_expression): Likewise.
11247 (pp_c_type_id): Likewise.
11248 (pp_c_storage_class_specifier): Likewise.
11249 * c-pretty-print.c (pp_c_type_cast): Tidy.
11250 (pp_c_pointer): Likewise.
11251 (pp_c_type_specifier): Likewise.
11252 (pp_c_parameter_type_list): Likewise.
11253 (pp_c_function_definition): Likewise.
11254 (pp_c_init_declarator): Likewise.
11255 (pp_c_initializer_list): Likewise.
11256 (pp_c_constructor_elts): Likewise.
11257 (c_pretty_printer::direct_abstract_declarator): Likewise.
11258 (c_pretty_printer::declaration_specifiers): Likewise.
11259 (c_pretty_printer::primary_expression): Likewise.
11260 (c_pretty_printer::postfix_expression): Likewise.
11261 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11262 (c_pretty_printer::storage_class_specifier): Rename from
11263 pp_c_storage_class_specifier.
11264 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11265 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11266 storage_class_specifier, initializer, offset_list, flags.
11267
de5a5fa1
MP
112682013-08-30 Marek Polacek <polacek@redhat.com>
11269
11270 * c-ubsan.c: New file.
11271 * c-ubsan.h: New file.
11272
8f0e4d72
GDR
112732013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11274
11275 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11276 member function.
11277 (c_pretty_printer::declaration_specifiers): Likewise.
11278 (c_pretty_printer::declarator): Likewise.
11279 (c_pretty_printer::abstract_declarator): Likewise.
11280 (c_pretty_printer::direct_abstract_declarator): Likewise.
11281 (c_pretty_printer::direct_declarator): Likewise.
11282 (c_pretty_printer::function_specifier): Likewise.
11283 (pp_declaration): Adjust.
11284 (pp_declaration_specifiers): Likewise.
11285 (pp_abstract_declarator): Likewise.
11286 (pp_direct_declarator): Likewise.
11287 (pp_function_specifier): Likewise.
11288 (pp_direct_abstract_declarator): Remove as unused.
11289 (pp_c_declaration): Remove.
11290 (pp_c_declaration_specifiers): Likewise.
11291 (pp_c_declarator): Likewise.
11292 (pp_c_direct_declarator): Likewise.
11293 (pp_c_function_specifier): Likewise.
11294 (pp_c_direct_abstract_declarator): Likewise.
11295 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11296 from pp_c_abstract_declarator. Adjust.
ab20d992 11297 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11298 pp_c_direct_abstract_declarator. Adjust.
11299 (c_pretty_printer::function_specifier): Rename from
11300 pp_c_function_specifier. Adjust.
11301 (c_pretty_printer::declaration_specifiers): Rename from
11302 pp_c_declaration_specifiers. Adjust.
11303 (c_pretty_printer::direct_declarator): Rename from
11304 pp_c_direct_declarator. Adjust.
11305 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11306 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11307 (c_pretty_printer::c_pretty_printer): Do not assign to
11308 declaration, declaration_specifiers, declarator,
11309 direct_declarator, direct_abstract_declarator, function_specifier.
11310
00d34d3a
GDR
113112013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11312
11313 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11314 virtual member function.
11315 (c_pretty_printer::multiplicative_expression): Likewise.
11316 (c_pretty_printer::conditional_expression): Likewise.
11317 (c_pretty_printer::assignment_expression): Likewise.
11318 (c_pretty_printer::expression): Likewise.
11319 (pp_unary_expression): Adjust.
11320 (pp_multiplicative_expression): Likewise.
11321 (pp_assignment_expression): Likewise.
11322 (pp_conditional_expression): Likewise.
11323 (pp_expression): Likewise.
11324 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11325 from pp_c_unary_expression. Adjust.
11326 (c_pretty_printer::multiplicative_expression): Rename from
11327 pp_c_multiplicative_expression. Adjust.
11328 (c_pretty_printer::conditional_expression): Rename from
11329 pp_c_conditional_expression. Adjust.
11330 (c_pretty_printer::assignment_expression): Rename from
11331 pp_c_assignment_expression. Adjust.
11332 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11333 (c_pretty_printer::c_pretty_printer): Do not assign to
11334 unary_expression, multiplicative_expression,
11335 conditional_expression, expression.
11336
fb22178f
GDR
113372013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11338
11339 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11340 virtual member function.
11341 (pp_postfix_expression): Adjust.
11342 (pp_c_postfix_expression): Remove.
11343 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11344 from pp_c_postfix_expression. Adjust.
11345 (c_pretty_printer::c_pretty_printer): Do not assign to
11346 postfix_expression.
11347
7ecc2600
GDR
113482013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11349
11350 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11351 virtua member function.
11352 (pp_primary_expression): Adjust.
11353 (pp_c_primary_expression): Remove.
11354 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11355 from pp_c_primary_expression. Adjust.
11356 (pp_c_initializer_list): Use pp_primary_expression.
11357 (c_pretty_printer::c_pretty_printer): Do not assign to
11358 primary_expression.
11359
0691175f
GDR
113602013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11361
11362 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11363 * c-pretty-print.c (M_): Remove.
11364 (c_pretty_printer::translate_string): Define.
11365 (pp_c_type_specifier): Use it.
11366 (pp_c_primary_expression): Likewise.
11367 (pp_c_expression): Likewise.
11368
66dfe4c4
GDR
113692013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11370
11371 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11372 virtual function.
11373 (pp_c_id_expression): Remove.
11374 (pp_id_expression): Adjust.
11375 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11376 pp_c_id_expression. Adjust.
11377 (pp_c_postfix_expression): Use pp_id_expression.
11378 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11379
ca43e9d5
GDR
113802013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11381
11382 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11383 member function.
11384 (pp_constant): Adjust.
11385 (pp_c_constant): Remove.
11386 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11387 pp_c_constant. Adjust.
11388 (pp_c_constant)
11389 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11390 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11391
da6ca2b5
GDR
113922013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11393
11394 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11395 (c_pretty_printer::c_pretty_printer): Declare.
11396 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11397 c_pretty_printer_init. Adjust.
11398 (print_c_tree): Do not call c_pretty_printer_init.
11399 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11400
65a372f4
AC
114012013-08-09 Arnaud Charlet <charlet@adacore.com>
11402
11403 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11404
fd9b0f32
PC
114052013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11406
11407 PR c++/58080
11408 * c-common.c (pointer_int_sum): Add bool parameter.
11409 * c-common.h (pointer_int_sum): Adjust declaration.
11410
e0aec1e9
GDR
114112013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11412
11413 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11414 c_pretty_printer variable.
11415
b066401f
GDR
114162013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11417
11418 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11419 (pp_base): Remove.
11420 (pp_c_base): Likewise. Adjust users.
11421 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11422 (pp_c_whitespace): Do not call pp_base.
11423 (pp_c_left_paren): Likewise.
11424 (pp_c_right_paren): Likewise.
11425 (pp_c_left_brace): Likewise.
11426 (pp_c_right_brace): Likewise.
11427 (pp_c_left_bracket): Likewise.
11428 (pp_c_right_bracket): Likewise.
11429 (pp_c_dot): Likewise.
11430 (pp_c_ampersand): Likewise.
11431 (pp_c_star): Likewise.
11432 (pp_c_arrow): Likewise.
11433 (pp_c_semicolon): Likewise.
11434 (pp_c_complement): Likewise.
11435 (pp_c_exclamation): Likewise.
11436 (pp_c_direct_declarator): Likewise.
11437 (pp_c_ws_string): Likewise.
11438 (pp_c_identifier): Likewise.
11439 (pp_c_statement): Likewise.
11440 (print_c_tree): Likewise.
11441
65e5a578
ESR
114422013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11443
11444 PR c++/58072
11445 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11446 provide useful error strings.
11447
137a1a27
GDR
114482013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11449
11450 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11451 printer functions instead of pp_string or operators and punctuators.
11452 (dump_generic_ada_node): Likewise.
11453 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11454 (pp_c_relational_expression): Likewise.
11455 (pp_c_logical_or_expression): Likewise.
11456
07838b13
GDR
114572013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11458
11459 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11460 functions instead of pp_character.
11461 (pp_ada_tree_identifier): Likewise.
11462 (dump_ada_double_name): Likewise.
11463 (dump_ada_function_declaration): Likewise.
11464 (dump_ada_array_domains): Likewise.
11465 (dump_template_types): Likewise.
11466 (dump_generic_ada_node): Likewise.
11467 (print_ada_declaration): Likewise.
11468 (print_ada_struct_decl): Likewise.
11469 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11470
433cc7b0
TT
114712013-07-23 Tom Tromey <tromey@redhat.com>
11472
11473 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11474 * c-common.c (c_common_reswords): Add _Generic.
11475
688010ba
OB
114762013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11477
11478 * c-common.c: Fix typos.
11479 * c-common.h: Likewise.
11480
2a99e5e6
LL
114812013-07-13 Lubos Lunak <l.lunak@suse.cz>
11482
11483 PR c++/55203
11484 * c-common.c (c_common_attribute_table): Add warn_unused.
11485 (handle_warn_unused_attribute): New.
11486
c26302d5
JJ
114872013-07-10 Jakub Jelinek <jakub@redhat.com>
11488
11489 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11490 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11491
dfeadaa0
PC
114922013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11493
11494 PR c++/57869
11495 * c.opt: Add Wconditionally-supported.
11496
6a2fa4b2
GS
114972013-07-08 Graham Stott <graham.stott@btinternet.com>
11498
adfac8df 11499 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11500 unused variables l_length and l_node.
11501
ecdbd01a 115022013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11503
11504 PR c/57821
11505 * c-common.c (complete_array_type): Delay folding first index
11506 like other indices. When folding, check for index overflow.
11507
bedc293e
MG
115082013-06-27 Marc Glisse <marc.glisse@inria.fr>
11509
11510 PR c++/57509
11511 * c-common.h (c_build_vec_perm_expr): New complain argument.
11512 * c-common.c (c_build_vec_perm_expr): Likewise.
11513 Use save_expr also in C++.
11514
604b2bfc
GDR
115152013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11516
11517 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11518 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11519 * c-opts.c (c_common_post_options): Likewise.
11520
dfeadaa0 115212013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11522
11523 * array-notation-common.c (length_mismatch_in_expr): Changed the
11524 parameter type's from a dynamic array to a vec_tree. Also removed
11525 the size parameters.
11526 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11527 the change above.
11528
2ce86d2e
BI
115292013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11530
11531 * c-common.h (struct cilkplus_an_parts): New structure.
11532 (struct cilkplus_an_loop_parts): Likewise.
11533 (cilkplus_extract_an_triplets): New prototype.
11534 (fix_sec_implicit_args): Likewise.
11535 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11536 (fix_sec_implicit_args): Likewise.
604b2bfc 11537
07a6825b
BI
115382013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11539
11540 * array-notation-common.c (find_inv_trees): Removed an unwanted
11541 typecasting.
11542 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11543 enum rid to enum tree_code.
11544
08346abd
JH
115452013-06-11 Jan Hubicka <jh@suse.cz>
11546
11547 * c-common.c (handle_alias_ifunc_attribute): Do not set
11548 DECL_EXTERNAL for weakref variables.
11549 * c-pragma.c (handle_pragma_weak): Make sure aliases
11550 are not declared as external.
11551
d60f1706
BI
115522013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11553
11554 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11555 function from c/c-array-notation.c.
11556 (is_cilkplus_reduce_builtin): Likewise.
11557 (find_rank): Likewise.
11558 (extract_array_notation_exprs): Likewise.
11559 (replace_array_notations): Likewise.
11560 (find_inv_trees): Likewise.
11561 (replace_inv_trees): Likewise.
11562 (contains_array_notation_expr): Likewise.
11563 (find_correct_array_notation_type): Likewise.
11564 * c-common.h (struct inv_list): Moved this struct from the file
11565 c/c-array-notation.c and added a new field called additional tcodes.
11566 (length_mismatch_in_expr_p): New prototype.
11567 (is_cilkplus_reduce_builtin): Likewise.
11568 (find_rank): Likewise.
11569 (extract_array_notation_exprs): Likewise.
11570 (replace_array_notation): Likewise.
11571 (find_inv_trees): Likewise.
11572 (replace_inv_trees): Likewise.
11573 (find_correct_array_notation_type): Likewise.
dfeadaa0 11574
36536d79
BI
115752013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11576
11577 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11578 function array_notation_init_builtins is called.
11579 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11580 * c-common.def (ARRAY_NOTATION_REF): New tree.
11581 * c-common.h (build_array_notation_expr): New function declaration.
11582 (build_array_notation_ref): Likewise.
11583 (extract_sec_implicit_index_arg): New extern declaration.
11584 (is_sec_implicit_index_fn): Likewise.
11585 (ARRAY_NOTATION_CHECK): New define.
11586 (ARRAY_NOTATION_ARRAY): Likewise.
11587 (ARRAY_NOTATION_START): Likewise.
11588 (ARRAY_NOTATION_LENGTH): Likewise.
11589 (ARRAY_NOTATION_STRIDE): Likewise.
11590 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11591 ARRAY_NOTATION_REF.
11592 (pp_c_expression): Likewise.
11593 * c.opt (flag_enable_cilkplus): New flag.
11594 * array-notation-common.c: New file.
11595
f7716d57
JJ
115962013-05-14 Jakub Jelinek <jakub@redhat.com>
11597
11598 PR c++/57274
11599 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11600
a5e0cd1d
MG
116012013-05-10 Marc Glisse <marc.glisse@inria.fr>
11602
11603 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11604 vectors.
11605
f6bc1c4a
HS
116062013-05-07 Han Shen <shenhan@google.com>
11607
11608 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11609
3f12f6e9
SKS
116102013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11611
11612 * c-common.c (check_user_alignment): Emit error for negative values.
11613
61949153
PC
116142013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11615
11616 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11617
e93e18e9
PC
116182013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11619
11620 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11621 __GXX_EXPERIMENTAL_CXX1Y__.
11622
44d90fe1 116232013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11624 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11625
11626 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11627 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11628 to simply use OPT_Wpointer_arith.
11629 (c_sizeof_or_alignof_type): Likewise.
11630
13f39b2e
PC
116312013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11632
11633 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11634
4b84d650
JJ
116352013-04-12 Jakub Jelinek <jakub@redhat.com>
11636
11637 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11638 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11639 specifiers.
11640
fb037b5d
SB
116412013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11642
11643 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11644
4e856798
PC
116452013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11646
11647 * c-common.c (pointer_int_sum): Remove dead code.
11648
4b1baac8
RS
116492013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11650
11651 PR middle-end/56524
11652 * c-common.c (handle_optimize_attribute): Don't call
11653 save_optabs_if_changed.
11654
0b50e654
JJ
116552013-03-05 Jakub Jelinek <jakub@redhat.com>
11656
11657 PR middle-end/56461
11658 * c-pch.c (pch_init): Free target_validity at the end.
11659
48c41403
JJ
116602013-03-04 Jakub Jelinek <jakub@redhat.com>
11661
11662 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11663
e664c61c
KS
116642013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11665 Jakub Jelinek <jakub@redhat.com>
11666
11667 PR sanitizer/56454
11668 * c-common.c (handle_no_sanitize_address_attribute): New function.
11669 (c_common_attribute_table): Add no_sanitize_address attribute.
11670 (handle_no_address_safety_analysis_attribute): Add
11671 no_sanitize_address attribute, not no_address_safety_analysis
11672 attribute.
11673
a475fd3d 116742013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11675
11676 PR target/52555
11677 * c-common.c (handle_optimize_attribute): Call
11678 save_optabs_if_changed.
11679
f6007d99
JJ
116802013-02-18 Jakub Jelinek <jakub@redhat.com>
11681 Steven Bosscher <steven@gcc.gnu.org>
11682
11683 PR pch/54117
11684 * c-opts.c (c_common_post_options): If debug info is enabled
11685 and non-dwarf*, refuse to load PCH files and when writing PCH
11686 file warn.
11687
cf35e2b1
JJ
116882013-02-05 Jakub Jelinek <jakub@redhat.com>
11689
11690 PR middle-end/56167
11691 * c-common.c (handle_error_attribute): Fix condition.
11692
32887460
JJ
116932013-01-30 Jakub Jelinek <jakub@redhat.com>
11694
11695 PR c++/55742
11696 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11697
5af057d8
JM
116982013-01-18 Jason Merrill <jason@redhat.com>
11699
11700 PR target/54908
11701 * c.opt (-fextern-tls-init): New.
11702 * c-opts.c (c_common_post_options): Handle it.
11703
cc83c823
JJ
117042013-01-09 Jakub Jelinek <jakub@redhat.com>
11705
11706 PR c/48418
11707 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11708 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11709 and is either negative or bigger or equal to type precision
11710 of the first operand.
11711
a859517f
MP
117122012-12-03 Marek Polacek <polacek@redhat.com>
11713
11714 PR c/55570
11715 * c-common.c (check_user_alignment): Swap order of tests,
11716 check TREE_CODE first.
11717
2d7aa578
ESR
117182012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11719
11720 PR c++/52654
11721 * c-common.h (overflow_type): New enum.
11722 (build_userdef_literal): Add overflow_type argument.
11723 (tree_userdef_literal): Add overflow_type.
11724 (USERDEF_LITERAL_OVERFLOW): New access macro.
11725 * c-common.c (build_userdef_literal): Add overflow_type
11726 argument.
11727 * c-lex.c (c_lex_with_flags): Add overflow_type to
11728 build_userdef_literal calls.
11729 (interpret_integer, interpret_float): Add overflow_type argument.
11730
cc3c4f62
RB
117312012-11-28 Richard Biener <rguenther@suse.de>
11732
11733 PR c/35634
11734 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11735 here and use a type with proper overflow behavior for types that would
11736 need to be promoted for the arithmetic.
11737
77bc5132
JJ
117382012-11-23 Jakub Jelinek <jakub@redhat.com>
11739
11740 PR sanitizer/55435
11741 * c-common.c (handle_no_address_safety_analysis_attribute): New
11742 function.
11743 (c_common_attribute_table): Add no_address_safety_analysis.
11744
5dc99c46
SB
117452012-11-16 Simon Baldwin <simonb@google.com>
11746
11747 * c.opt: Add f[no-]canonical-system-headers.
11748 * c-opts.c (c_common_handle_option): Handle
11749 OPT_fcanonical_system_headers.
11750
a4a0016d
ESR
117512012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11752
11753 PR c++/54413
11754 * c-opts.c (c_common_handle_option): Set new flags.
11755 * c.opt: Describe new flags.
11756
7dbb85a7
JM
117572012-11-09 Jason Merrill <jason@redhat.com>
11758
11759 * c.opt (Wabi-tag): New.
11760
ad7bac31
AK
117612012-11-09 Andi Kleen <ak@linux.intel.com>
11762
11763 PR 55139
11764 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11765 MEMMODEL_MASK
ad7bac31 11766
7332899a
MLI
117672012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11768
11769 PR c/53063
11770 * c.opt (Wformat): Make it Alias Wformat=1.
11771 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11772 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11773 LangEnabledBy.
11774 (Wformat=): RejectNegative. Use LangEnabledBy.
11775 (Wnonnull): Use LangEnabledBy.
11776 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11777 * c-format.c (set_Wformat): Delete.
11778 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11779 (maybe_read_dollar_number): Likewise.
11780 (avoid_dollar_number): Likewise.
11781 (finish_dollar_format_checking): Likewise.
11782 (check_format_info): Likewise.
11783 (check_format_info_main): Likewise.
11784 (check_format_types): Likewise.
11785 (format_type_warning): Likewise.
11786 * c-common.c (int): Likewise.
11787 (check_function_sentinel): Likewise.
8e745a17 11788 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11789
34a180a6
MLI
117902012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11791
11792 PR c/53063
11793 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11794 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11795 Use LangEnabledBy.
11796 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11797 common.opt.
11798 (Wvariadic-macros): Init(1).
11799 * c-opts.c (c_common_handle_option): Do not handle them
11800 explicitly.
11801 (c_common_post_options): Likewise.
11802 (sanitize_cpp_opts): warn_unused_macros is now
11803 cpp_warn_unused_macros.
11804 (push_command_line_include): Likewise.
11805 * c-common.c (warn_unknown_pragmas): Do not define.
11806 * c-common.h (warn_unknown_pragmas): Do not declare.
11807
3f46d6a5
MLI
118082012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11809
11810 PR c/51294
11811 * c-common.c (conversion_warning): Handle conditional expressions.
11812
880661a4
JW
118132012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11814
11815 PR c++/54930
11816 * c.opt (Wreturn_local_addr): Define new option.
11817
4514a96b
JM
118182012-10-25 Jason Merrill <jason@redhat.com>
11819
f14edc1a
JM
11820 * c.opt (Wvirtual-move-assign): New.
11821
4514a96b
JM
11822 * c.opt (Winherited-variadic-ctor): New.
11823
93100c6b
MG
118242012-10-25 Marc Glisse <marc.glisse@inria.fr>
11825
11826 PR c++/54427
11827 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11828
1efcb8c6
JM
118292012-10-23 Joseph Myers <joseph@codesourcery.com>
11830
11831 * c-common.h (pch_cpp_save_state): Declare.
11832 * c-target.def (c_preinclude): New hook.
11833 * c-opts.c (done_preinclude): New.
11834 (push_command_line_include): Handle default preincluded header.
11835 (cb_file_change): Call pch_cpp_save_state when calling
11836 push_command_line_include.
11837 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11838 (pch_cpp_save_state): New.
11839 (pch_init): Call pch_cpp_save_state conditionally, instead of
11840 calling cpp_save_state.
11841
4a0ae68e
MLI
118422012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11843
11844 PR c/53063
11845 PR c/40989
11846 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11847 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11848 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11849 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11850 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11851 * c-opts.c (c_common_handle_option): Remove explicit handling from
11852 here.
11853 (c_common_post_options): Likewise.
11854
67e4210b
EB
118552012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11856
11857 * c-ada-spec.c (LOCATION_COL): Delete.
11858 (compare_location): New function.
11859 (compare_node): Use it.
11860 (compare_comment): Likewise.
11861
65d4f2cd
MLI
118622012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11863
11864 PR c/53063
11865 PR c/40989
11866 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11867 * c-opts.c (c_common_handle_option): Do not set them here. Add
11868 comment.
11869 (c_common_post_options): Likewise.
11870
909881cb
EB
118712012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11872
11873 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11874 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11875 Remove POINTER_TYPE handling, add large unsigned handling and use
11876 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11877
3a785c97
JJ
118782012-10-12 Jakub Jelinek <jakub@redhat.com>
11879
11880 PR c/54381
11881 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11882 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11883 locs and array of 3 trees instead of just single loc and single
11884 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11885 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11886 For *cmp* builtins that take two sources strings report warnings
11887 about first and second source, not about destination and source.
11888
5e54f81d
MG
118892012-10-12 Marc Glisse <marc.glisse@inria.fr>
11890
11891 PR c++/53055
11892 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11893
f5b02f1e
EB
118942012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11895
11896 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11897 declaring something coming from another file.
11898
b46dbc6c
AC
118992012-10-10 Arnaud Charlet <charlet@adacore.com>
11900
f5b02f1e 11901 PR ada/54845
b46dbc6c
AC
11902 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11903
5d9de0d0
PC
119042012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11905
11906 PR c++/54194
11907 * c-common.c (warn_about_parentheses): Add location_t parameter;
11908 use EXPR_LOC_OR_LOC.
11909 * c-common.h: Update declaration.
11910
a212e43f
MG
119112012-10-09 Marc Glisse <marc.glisse@inria.fr>
11912
11913 PR c++/54427
11914 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11915 more operations. Make error messages optional.
11916 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11917 (scalar_to_vector): Declare.
11918
b1db7f91
JM
119192012-10-08 Jason Merrill <jason@redhat.com>
11920
11921 * c-common.c (c_common_reswords): Add thread_local.
11922
e28d52cf
DS
119232012-10-08 Dodji Seketeli <dodji@redhat.com>
11924
11925 PR c++/53528 C++11 attribute support
11926 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11927 new functions.
11928 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11929 static function.
11930 (handle_aligned_attribute): In choose strictest alignment
11931 among many. Use new check_cxx_fundamental_alignment_constraints.
11932 (handle_transparent_union_attribute): In c++11 attribute syntax,
11933 don't look through typedefs.
11934
3b78de56
AC
119352012-10-04 Arnaud Charlet <charlet@adacore.com>
11936
11937 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11938 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11939 out of dumpfile.h.
11940
6040bb5f
DC
119412012-09-25 Dehao Chen <dehao@google.com>
11942
11943 PR middle-end/54645
3b78de56 11944 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11945 map when read in the pch.
11946
3f8257db 119472012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11948
11949 * c-ada-spec.c: Style fixes.
11950
3f8257db 119512012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11952
11953 * c.opt (-fada-spec-parent): Define new command line switch.
11954 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11955 is specified, generate binding spec as a child of the specified unit.
11956
0ccb505d
PC
119572012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11958 Manuel López-Ibáñez <manu@gcc.gnu.org>
11959
11960 PR c++/53210
11961 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11962
c583af79
AC
119632012-08-23 Arnaud Charlet <charlet@adacore.com>
11964
11965 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11966 for pointers, and add missing Convention C pragma.
11967 (print_ada_struct_decl): Add missing aliased keyword.
11968 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11969
1a4049e7
JJ
119702012-08-17 Jakub Jelinek <jakub@redhat.com>
11971
11972 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11973 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11974 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11975 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11976 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11977
70b5e7dc
RG
119782012-08-10 Richard Guenther <rguenther@suse.de>
11979
11980 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11981
f8923f7e
SB
119822012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11983
11984 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11985 instead of separate pp_newline and pp_flush.
11986 (print_c_tree): Likewise.
11987
e45abe1f
RH
119882012-07-26 Richard Henderson <rth@redhat.com>
11989
11990 * c-common.c (handle_hot_attribute): Allow labels.
11991 (handle_cold_attribute): Likewise.
11992
332f1d24
JJ
119932012-07-20 Jakub Jelinek <jakub@redhat.com>
11994
11995 PR c++/28656
11996 * c-common.c (check_function_nonnull): Handle multiple nonnull
11997 attributes properly.
11998
7ee2468b
SB
119992012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12000
12001 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12002 * c-ada-spec.c: Likewise.
12003 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12004
ee7b28eb
SB
120052012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12006
12007 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12008 Remove code conditional on it.
12009
6bdf3519
SB
120102012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12011
12012 * c-gimplify.c: Do not include basic-block.h.
12013 * c-common.c: Do not include linfuncs.h.
12014
532aafad
SB
120152012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12016
12017 * c-common.h: Include tree.h.
12018
8d0d1915
JM
120192012-07-02 Jason Merrill <jason@redhat.com>
12020
12021 PR c++/53524
12022 * c-common.c (get_priority): Call default_conversion.
12023
fbc873ad
UB
120242012-07-01 Uros Bizjak <ubizjak@gmail.com>
12025
12026 * c-pch.c (c_common_write_pch): Remove unused variables.
12027
d4a10d0a
SB
120282012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12029
12030 * cppspec.c: Moved from gcc/ to here.
12031
6f3a2e23
KT
120322012-06-27 Kai Tietz <ktietz@redhat.com>
12033
12034 PR preprocessor/37215
12035 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12036
8ca92d04
SB
120372012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12038
12039 * c-common.h (c_common_print_pch_checksum): Remove.
12040 * c-pch.c: Do not include output.h.
12041 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12042 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12043 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12044 (struct c_pch_header): Remove.
12045 (get_ident): Update gpch version.
12046 (pch_init): Do not print executable_checksum to asm_out_file.
12047 Do not fail if there is no asm_out_file to read back from. Set
12048 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12049 (c_common_write_pch): Verify that nothing was written to asm_out_file
12050 since pch_init was called. Do not write a c_pch_header, and do not
12051 copy from asm_out_file to the PCH.
12052 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12053 the content of asm_out_file from the PCH.
12054 (c_common_print_pch_checksum): Remove.
12055 * c-opts.c (c_common_init): Print out executable_checksum directly.
12056
70f42967
SB
120572012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12058
12059 * c-target.def (objc_declare_unresolved_class_reference,
12060 objc_declare_class_definition): Add new hooks.
12061
a8781821
SB
120622012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12063
12064 * c-lex.c: Do not include output.h.
12065 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12066 Remove uses of ASM_OUTPUT_IDENT.
12067
9e1a8dd1
RR
120682012-06-15 Marc Glisse <marc.glisse@inria.fr>
12069
12070 PR c++/51033
12071 * c-common.h (c_build_vec_perm_expr): Move decl here.
12072 * c-common.c (c_build_vec_perm_expr): Move definition
12073 here.
12074
6f07a821
SB
120752012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12076
12077 * c.opt (fconserve-space): Turn into a no-op.
12078
9faeb493 120792012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
12080
12081 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12082 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12083 both the start and end of the function.
12084
a4b7d13c
SB
120852012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12086
12087 * c-common.c: Do not include output.h.
12088 * c-pragma.c: Likewise.
12089
c265f413
SA
120902012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12091
12092 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12093 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12094 (lang_decl_name): Handle namespace decls.
12095
be7a421e
SB
120962012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12097
12098 * c-ada-spec.c: Do not include output.h.
12099 * c-semantics.c: Likewise.
12100
65de6659
JM
121012012-05-29 Joseph Myers <joseph@codesourcery.com>
12102
12103 * c-common.c: Fix typo.
12104
ca5f4331
MM
121052012-05-29 Michael Matz <matz@suse.de>
12106
12107 * c-common.h (c_expand_decl): Remove prototype.
12108
4f7f7aca
MLI
121092012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12110
12111 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12112 * c-opts.c (c_common_handle_option): Remove code handling
12113 warn_missing_braces.
12114
4a792f9b
PC
121152012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12116
12117 PR c++/25137
12118 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12119 -Wmissing_braces.
12120
650dc14a
DS
121212012-05-22 Dodji Seketeli <dodji@redhat.com>
12122
12123 PR c++/53322
12124 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12125
9b095bf1
MLI
121262012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12127
12128 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12129 * c-opts.c (c_common_handle_option): Do not handle explicitly
12130 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12131
0b2c4be5
DS
121322012-05-16 Dodji Seketeli <dodji@redhat.com>
12133
12134 PR preprocessor/7263
ab20d992 12135 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
12136 to cpp_classify_number. For diagnostics, use the precise location
12137 instead of the global input_location.
12138
a1bde5af
PC
121392012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12140
d02924ef 12141 PR c++/11856
a1bde5af
PC
12142 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12143
d1ede5f4
BS
121442012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12145
a1bde5af 12146 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 12147
f2bc201f
MLI
121482012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12149
12150 PR 53063
12151 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12152 Wreorder): Use LangEnabledBy.
12153 * c-opts.c (c_common_handle_option): Do not enable them
12154 explicitly. Call lang-specific generated functions.
12155 (c_common_post_options): Do not set them here.
12156
95744782
MLI
121572012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12158
12159 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12160 Wmissing-field-initializers,Wmissing-parameter-type,
12161 Wold-style-declaration,Woverride-init): Use EnabledBy.
12162 * c-opts.c (c_common_post_options): Do not set here explicitly.
12163
7d5a5747
MLI
121642012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12165
12166 PR 53063
12167 * c-opts.c (c_common_handle_option): Use handle_generated_option
12168 to enable sub-options.
12169
5a3c9cf2
PC
121702012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12171
12172 PR c++/53158
12173 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12174
3ac8781c
RG
121752012-05-10 Richard Guenther <rguenther@suse.de>
12176
12177 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12178 adjust commentary about TYPE_IS_SIZETYPE types.
12179
1e537948
MLI
121802012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12181
12182 PR c++/53261
12183 * c-common.c (warn_logical_operator): Check that argument of
12184 integer_zerop is not NULL.
12185
f2c4a785
MLI
121862012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12187
12188 PR c/43772
12189 * c-common.c (warn_logical_operator): Do not warn if either side
12190 is already true or false.
12191
50f305ca
MLI
121922012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12193
12194 PR c/51712
12195 * c-common.c (expr_original_type): New.
12196 (shorten_compare): Do not warn for enumeration types.
12197
0c3641b0
MLI
121982012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12199
12200 * c.opt (fpermissive): Add Var(flag_permissive).
12201
7edaa4d2
MG
122022012-04-30 Marc Glisse <marc.glisse@inria.fr>
12203
12204 PR c++/51033
12205 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12206 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12207
b9c8da34
DS
122082012-04-30 Dodji Seketeli <dodji@redhat.com>
12209
12210 Add -Wvarargs option
ab20d992 12211 * c.opt (Wvarargs): Define new option.
b9c8da34 12212
e6c69da0
MLI
122132012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12214
12215 * c-common.c (check_function_arguments): Replace
12216 Wmissing-format-attribute with Wsuggest-attribute=format.
12217
90137d8f
MLI
122182012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12219
12220 * c.opt (Wsuggest-attribute=format): New. Alias of
12221 Wmissing-format-attribute.
12222 * c-format.c (decode_format_type): Replace
12223 Wmissing-format-attribute with Wsuggest-attribute=format.
12224 (check_function_format): Likewise.
12225
9faeb493 122262012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12227
12228 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12229 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12230 * c.opt: Add Wliteral-suffix.
12231
c1771a20
MLI
122322012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12233
12234 PR c/44774
12235 * c.opt (Wpedantic): New.
12236 (pedantic): Alias Wpedantic.
12237 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12238 (c_common_post_options): Likewise.
12239 (sanitize_cpp_opts): Likewise.
12240 * c-lex.c (interpret_float): Likewise.
12241 * c-format.c (check_format_types): Likewise.
12242 * c-common.c (pointer_int_sum): Likewise.
12243 (c_sizeof_or_alignof_type): Likewise.
12244 (c_add_case_label): Likewise.
12245 (c_do_switch_warnings): Likewise.
12246 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12247
04b391c1
JM
122482012-04-15 Jason Merrill <jason@redhat.com>
12249
12250 PR c++/52818
12251 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12252 (C_STD_NAME): Distinguish between C++98 and C++11.
12253
ac868f29
EB
122542012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12255
12256 PR target/52624
12257 * c-common.h (uint16_type_node): Rename into...
12258 (c_uint16_type_node): ...this.
12259 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12260 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12261
fd4116f4
MLI
122622012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12263
12264 * c-common.c (warn_if_unused_value): Move definition to here.
12265 * c-common.h (warn_if_unused_value): Move declaration to here.
12266
573ac65e
WB
122672012-03-23 William Bader <williambader@hotmail.com>
12268
12269 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12270
552b8185
JM
122712012-03-20 Jason Merrill <jason@redhat.com>
12272
12273 * c-common.h (enum cxx_dialect): Add cxx1y.
12274 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12275 test.
12276 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12277 * c-opts.c (c_common_post_options): Likewise.
12278 (set_std_cxx1y): New.
12279 (c_common_handle_option): Call it.
12280 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12281
04398fa8
PC
122822012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12283
12284 PR c++/14710
12285 * c.opt ([Wuseless-cast]): Add.
12286
d2a12ae7
RG
122872012-03-16 Richard Guenther <rguenther@suse.de>
12288
12289 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12290
a12bf402
MLI
122912012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12292
12293 PR c++/44783
12294 * c.opt (ftemplate-backtrace-limit) Add.
12295
5c30094f
RO
122962012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12297
12298 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12299 handling.
12300 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12301 (init_pragma): Don't register extern_prefix.
12302
21fa2faf
RG
123032012-03-12 Richard Guenther <rguenther@suse.de>
12304
12305 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12306 (builtin_type_for_size): Likewise.
12307
e3793c6f
JJ
123082012-02-13 Jakub Jelinek <jakub@redhat.com>
12309
12310 PR c++/52215
12311 * c-common.c (sync_resolve_params): Don't decide whether to convert
12312 or not based on TYPE_SIZE comparison, convert whenever arg_type
12313 is unsigned INTEGER_TYPE.
12314
93286335
PC
123152012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12316
12317 PR c/52118
12318 * c.opt ([Wunused-local-typedefs]): Fix description.
12319
7a421706
MS
123202012-01-24 Mike Stump <mikestump@comcast.net>
12321
12322 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12323 exactly.
12324
ba9b1f11
RG
123252012-01-18 Richard Guenther <rguenther@suse.de>
12326
12327 * c-opts.c (c_common_post_options): Reset LTO flags if
12328 we are about to generate a PCH.
12329
465406be
PC
123302012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12331
12332 PR c++/51777
12333 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12334 use pp_unsigned_wide_integer.
12335
aee15221
RG
123362012-01-10 Richard Guenther <rguenther@suse.de>
12337
12338 PR middle-end/51806
12339 * c-opts.c (c_common_handle_option): Move -Werror handling
12340 to language independent code.
12341
5720c0dc
RG
123422012-01-05 Richard Guenther <rguenther@suse.de>
12343
12344 PR middle-end/51764
12345 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12346 from common.opt.
12347
73ac190a
PC
123482011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12349
12350 PR c++/51316
12351 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12352 of array types with an unknown bound.
12353
48b0b196
JM
123542011-12-20 Joseph Myers <joseph@codesourcery.com>
12355
12356 * c-common.c (flag_isoc99): Update comment to refer to C11.
12357 (flag_isoc1x): Change to flag_isoc11.
12358 * c-common.h (flag_isoc99): Update comment to refer to C11.
12359 (flag_isoc1x): Change to flag_isoc11.
12360 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12361 C11.
12362 * c-opts.c (set_std_c1x): Change to set_std_c11.
12363 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12364 Call set_std_c11.
12365 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12366 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12367 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12368 standard.
12369 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12370 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12371 (std=gnu1x): Make alias of std=gnu11.
12372
d58d6eb5
JM
123732011-12-19 Jason Merrill <jason@redhat.com>
12374
12375 PR c++/51228
12376 * c-common.c (handle_transparent_union_attribute): Check the first
12377 field if the type is complete.
12378
b3908fcc
JW
123792011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12380
12381 PR libstdc++/51365
12382 * c-common.c (RID_IS_FINAL): Add.
12383 * c-common.h (RID_IS_FINAL): Add.
12384
fea3ca91
IS
123852011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12386
12387 * c.opt (fgnu-runtime): Provide full description.
12388 (fnext-runtime): Likewise.
12389 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12390
62bad7cd
AM
123912011-11-28 Andrew MacLeod <amacleod@redhat.com>
12392
12393 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12394 predefines in one place. Add LOCK_FREE predefines.
12395 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12396 new func.
12397
c466c4ff
AM
123982011-11-24 Andrew MacLeod <amacleod@redhat.com>
12399
12400 PR c/51256
9faeb493 12401 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12402 conditions
9faeb493
UB
12403 (resolve_overloaded_atomic_exchange,
12404 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12405 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12406 error_mark_node for error conditions.
9faeb493 12407
a5952633
RG
124082011-11-08 Richard Guenther <rguenther@suse.de>
12409
12410 PR middle-end/51010
ab20d992 12411 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12412
0a35513e
AH
124132011-11-07 Richard Henderson <rth@redhat.com>
12414 Aldy Hernandez <aldyh@redhat.com>
12415 Torvald Riegel <triegel@redhat.com>
12416
12417 Merged from transactional-memory.
12418
12419 * c-common.c (handle_tm_wrap_attribute,
12420 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12421 (struct c_common_reswords): Added __transaction* keywords.
12422 (struct c_common_attribute_table): Added transaction* and tm_regparm
12423 attributes.
12424 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12425 masks.
12426 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12427 find_tm_attribute): Declare.
12428
6d87092d
JM
124292011-11-07 Jason Merrill <jason@redhat.com>
12430
12431 PR c++/35688
12432 * c-common.c, c-common.h: Revert yesterday's changes.
12433
8e7860a1
JM
124342011-11-06 Jason Merrill <jason@redhat.com>
12435
12436 PR c++/35688
12437 * c-common.c (decl_has_visibility_attr): Split out from...
12438 (c_determine_visibility): ...here.
12439 * c-common.h: Declare it.
12440
d19fa6b5
JM
124412011-11-06 Joseph Myers <joseph@codesourcery.com>
12442
12443 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12444 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12445 type.
12446 (check_user_alignment): New. Split out of
12447 handle_aligned_attribute. Disallow integer constants with
12448 noninteger types. Conditionally allow zero.
12449 (handle_aligned_attribute): Use check_user_alignment.
12450 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12451
86951993
AM
124522011-11-06 Andrew MacLeod <amacleod@redhat.com>
12453 Richard Henderson <rth@redhat.com>
12454
12455 Merged from cxx-mem-model.
12456
12457 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12458 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12459 parameters that are the same type size.
12460 (get_atomic_generic_size): New. Find size of generic
12461 atomic function parameters and do typechecking.
12462 (add_atomic_size_parameter): New. Insert size into parameter list.
12463 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12464 either __atomic_exchange_n or external library call.
9faeb493 12465 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12466 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12467 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12468 __atomic_load_n or an external library call.
12469 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12470 __atomic_store_n or an external library call.
12471 (resolve_overloaded_builtin): Handle new __atomic builtins.
12472
cf9e9959
EB
124732011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12474
12475 PR c++/50608
12476 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12477 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12478 <INDIRECT_REF>: Return the argument.
12479 <ARRAY_REF>: Remove special code for negative offset.
12480 Call fold_build_pointer_plus instead of size_binop.
12481 (fold_offsetof): Remove STOP_REF argument and adjust.
12482 * c-common.h (fold_offsetof_1): Declare.
12483 (fold_offsetof): Remove STOP_REF argument.
12484
25339f10
JM
124852011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12486
12487 PR c++/50810
12488 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12489 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12490 Wnarrowing for C++0x and C++98.
12491 * c.opt ([Wnarrowing]): Update.
12492
89401152
PC
124932011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12494
12495 PR c++/44277
12496 * c.opt: Add Wzero-as-null-pointer-constant.
12497
97e3ad20
JM
124982011-10-31 Jason Merrill <jason@redhat.com>
12499
15694fdd
JM
12500 * c.opt (-fdeduce-init-list): Off by default.
12501
97e3ad20
JM
12502 PR c++/50920
12503 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12504 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12505 and -Wc++11-compat.
12506 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12507
fb9120e3
RAV
125082011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12509
12510 PR c++/30066
12511 * c.opt (fvisibility-inlines-hidden): Description change.
12512
3ce4f9e4
ESR
125132011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12514
12515 Implement C++11 user-defined literals.
12516 * c-common.c (build_userdef_literal): New.
12517 * c-common.def: New tree code.
12518 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12519 * c-lex.c (interpret_float): Add suffix parm.
12520 (c_lex_with_flags): Build literal tokens.
12521
5f53c243
PC
125222011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12523
12524 PR c++/50841
12525 Revert:
12526 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12527
12528 PR c++/50810
12529 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12530 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12531 Wnarrowing for C++0x and C++98.
12532 * c.opt ([Wnarrowing]): Update.
12533
263734e1
PC
125342011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12535
12536 PR c++/50810
12537 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12538 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12539 Wnarrowing for C++0x and C++98.
12540 * c.opt ([Wnarrowing]): Update.
12541
d2e312d7
PC
125422011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12543
12544 PR c++/45385
12545 * c-common.c (conversion_warning): Remove code looking for
12546 artificial operands.
12547
d17687f6
DS
125482011-10-18 Dodji Seketeli <dodji@redhat.com>
12549
12550 PR bootstrap/50760
12551 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12552 !NO_IMPLICIT_EXTERN_C.
d17687f6 12553
fc8396e9
PC
125542011-10-17 Michael Spertus <mike_spertus@symantec.com>
12555
12556 * c-common.c (c_common_reswords): Add __bases,
12557 __direct_bases.
12558 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12559
125602011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12561
12562 PR c++/50757
12563 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12564
847e697a
TT
125652011-10-15 Tom Tromey <tromey@redhat.com>
12566 Dodji Seketeli <dodji@redhat.com>
12567
12568 * c.opt (fdebug-cpp): New option.
12569 * c-opts.c (c_common_handle_option): Handle the option.
12570 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12571 output stream in parameter. Factorized from ...
12572 (maybe_print_line): ... this. Dump location debug information when
12573 -fdebug-cpp is in effect.
12574 (print_line_1): New static function. Takes an output stream in
12575 parameter. Factorized from ...
12576 (print_line): ... here. Dump location information when -fdebug-cpp
12577 is in effect.
12578 (scan_translation_unit): Dump location information when
12579 -fdebug-cpp is in effect.
12580
92582b75
TT
125812011-10-15 Tom Tromey <tromey@redhat.com>
12582 Dodji Seketeli <dodji@redhat.com>
12583
12584 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12585 without argument.
12586 * c-opts.c (c_common_handle_option)<case
12587 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12588 cases. Handle -ftrack-macro-expansion with and without argument.
12589
46427374
TT
125902011-10-15 Tom Tromey <tromey@redhat.com>
12591 Dodji Seketeli <dodji@redhat.com>
12592
12593 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12594 (print_line, cb_define, do_line_change): Adjust to avoid touching
12595 the internals of struct line_map. Use the public API instead.
12596 * c-pch.c (c_common_read_pch): Likewise.
12597 * c-lex.c (fe_file_change): Likewise.
12598
fc8396e9
PC
125992011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12600
12601 PR c++/17212
12602 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12603
126042011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12605
12606 PR c++/33067
12607 * c-pretty-print.c (pp_c_floating_constant): Output
12608 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12609
e79983f4
MM
126102011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12611
12612 * c-common.c (def_builtin_1): Delete old interface with two
12613 parallel arrays to hold standard builtin declarations, and replace
12614 it with a function based interface that can support creating
12615 builtins on the fly in the future. Change all uses, and poison
12616 the old names. Make sure 0 is not a legitimate builtin index.
12617 * c-omp.c (c_finish_omp_barrier): Ditto.
12618 (c_finish_omp_taskwait): Ditto.
12619 (c_finish_omp_flush): Ditto.
12620
6637388f
TG
126212011-10-11 Tristan Gingold <gingold@adacore.com>
12622
12623 * c.opt: (fallow-parameterless-variadic-functions): New.
12624
3797cb21
DS
126252011-09-08 Dodji Seketeli <dodji@redhat.com>
12626
12627 PR c++/33255 - Support -Wunused-local-typedefs warning
12628 * c-common.h (struct c_language_function::local_typedefs): New
12629 field.
9faeb493
UB
12630 (record_locally_defined_typedef, maybe_record_typedef_use)
12631 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12632 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12633 (maybe_record_typedef_use)
12634 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12635 * c.opt: Declare new -Wunused-local-typedefs flag.
12636
693ddb1b
EB
126372011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12638
12639 PR middle-end/50266
12640 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12641 computations.
12642
830c740f
RG
126432011-09-05 Richard Guenther <rguenther@suse.de>
12644
12645 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12646 of integer_minus_one_node for empty array upper bounds.
12647
892a371f
DS
126482011-08-28 Dodji Seketeli <dodji@redhat.com>
12649
12650 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12651 it's the first time it's being called on this main TU.
12652
0e3fdb48
RB
126532011-08-24 Richard Guenther <rguenther@suse.de>
12654
12655 PR c/49396
12656 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12657
126582011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12659
12660 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12661 defined in cpp_init_builtins and c_cpp_builtins.
12662
d4a83c10
JM
126632011-08-19 Joseph Myers <joseph@codesourcery.com>
12664
12665 * c-common.c (c_common_reswords): Add __builtin_complex.
12666 * c-common.h (RID_BUILTIN_COMPLEX): New.
12667
bbceee64
JM
126682011-08-18 Joseph Myers <joseph@codesourcery.com>
12669
12670 * c-common.c (c_common_reswords): Add _Noreturn.
12671 (keyword_is_function_specifier): Handle RID_NORETURN.
12672 * c-common.h (RID_NORETURN): New.
12673
3f8257db 126742011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12675
12676 * c-common.c (unsafe_conversion_p): New function. Check if it is
12677 unsafe to convert an expression to the type.
12678 (conversion_warning): Adjust, use unsafe_conversion_p.
12679 * c-common.h (unsafe_conversion_p): New function declaration.
12680
20906c66
JJ
126812011-08-02 Jakub Jelinek <jakub@redhat.com>
12682
12683 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12684 (c_finish_omp_taskyield): New prototype.
12685 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12686 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12687 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12688 or RHS1 have side-effects, evaluate those too in the right spot,
12689 if it is a decl and LHS is also a decl, error out if they
12690 aren't the same.
12691 (c_finish_omp_taskyield): New function.
12692 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12693 * c-pragma.c (omp_pragmas): Add taskyield.
12694 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12695 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12696 PRAGMA_OMP_CLAUSE_MERGEABLE.
12697
770e5a2e
DS
126982011-07-25 Dodji Seketeli <dodji@redhat.com>
12699
12700 * c-common.h (set_underlying_type): Remove parm name from
12701 declaration.
12702
1baae426
RG
127032011-07-25 Romain Geissler <romain.geissler@gmail.com>
12704
12705 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12706
fcb21722
JM
127072011-07-22 Jason Merrill <jason@redhat.com>
12708
76f86d00
JM
12709 PR c++/49793
12710 * c.opt (Wnarrowing): New.
12711
3a636414
JM
12712 PR c++/30112
12713 * c-common.h: Declare c_linkage_bindings.
12714 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12715
fcb21722
JM
12716 PR c++/49813
12717 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12718 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12719 as flag_isoc99 for 'restrict'.
12720 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12721
02614448
ILT
127222011-07-21 Ian Lance Taylor <iant@google.com>
12723
12724 PR middle-end/49705
12725 * c-common.c (c_disable_warnings): New static function.
12726 (c_enable_warnings): New static function.
12727 (c_fully_fold_internal): Change local unused_p to bool. Call
12728 c_disable_warnings and c_enable_warnings rather than change
12729 c_inhibit_evaluation_warnings.
12730
34429675
JM
127312011-07-20 Jason Merrill <jason@redhat.com>
12732
12733 PR c++/6709 (DR 743)
12734 PR c++/42603 (DR 950)
12735 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12736 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12737 (CPP_DECLTYPE): New.
12738 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12739
5d49b6a7
RG
127402011-07-19 Richard Guenther <rguenther@suse.de>
12741
12742 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12743 * c-omp.c (c_finish_omp_for): Likewise.
12744
e84a58ff
EB
127452011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12746
12747 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12748 body on the next line.
12749
329af3c7
JM
127502011-07-08 Jason Merrill <jason@redhat.com>
12751
4063e61b
JM
12752 PR c++/45437
12753 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12754
329af3c7
JM
12755 PR c++/49673
12756 * c-common.c (c_apply_type_quals_to_decl): Don't check
12757 TYPE_NEEDS_CONSTRUCTING.
12758
1a072294
RG
127592011-07-06 Richard Guenther <rguenther@suse.de>
12760
12761 * c-common.c (c_common_nodes_and_builtins):
12762 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12763
fce5dddd
RG
127642011-07-05 Richard Guenther <rguenther@suse.de>
12765
12766 * c-common.c (c_common_nodes_and_builtins): Build all common
12767 tree nodes first.
12768
45d439ac
JJ
127692011-06-27 Jakub Jelinek <jakub@redhat.com>
12770
56300785
JJ
12771 * c-common.h (c_tree_chain_next): New static inline function.
12772
45d439ac
JJ
12773 * c-common.c (check_builtin_function_arguments): Handle
12774 BUILT_IN_ASSUME_ALIGNED.
12775
e0a8ecf2
AM
127762011-06-21 Andrew MacLeod <amacleod@redhat.com>
12777
12778 * c-common.c: Add sync_ or SYNC__ to builtin names.
12779 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12780
127812011-06-20 Pierre Vittet <piervit@pvittet.com>
12782
12783 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12784 handler.
12785 (gen_pragma_handler): New union.
12786 (internal_pragma_handler): New type.
12787 (c_register_pragma_with_data)
12788 (c_register_pragma_with_expansion_and_data): New functions.
12789
12790 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12791 (c_register_pragma, c_register_pragma_with_expansion)
12792 (c_invoke_pragma_handler): Changed to work with
12793 internal_pragma_handler.
12794 (c_register_pragma_with_data)
12795 (c_register_pragma_with_expansion_and_data): New functions.
12796
677f3fa8
JM
127972011-06-14 Joseph Myers <joseph@codesourcery.com>
12798
12799 * c-common.c: Include common/common-target.h.
12800 (handle_section_attribute): Use
12801 targetm_common.have_named_sections.
12802 * c-cppbuiltin.c: Include common/common-target.h.
12803 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12804
d7fc8c14
RG
128052011-06-10 Richard Guenther <rguenther@suse.de>
12806
12807 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12808 to print a IDENTIFIER_NODE.
12809
10e48e39
RO
128102011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12811 Joseph Myers <joseph@codesourcery.com>
12812
12813 * c.opt (fbuilding-libgcc): New option.
12814 * c-cppbuiltin.c (c_cpp_builtins): Define
12815 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12816
6976ae51
JM
128172011-06-07 Jason Merrill <jason@redhat.com>
12818
3ff60975
JM
12819 * c-common.c (max_tinst_depth): Lower default to 900.
12820
6976ae51
JM
12821 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12822
009db074
RG
128232011-06-07 Richard Guenther <rguenther@suse.de>
12824
12825 * c-common.c (c_common_nodes_and_builtins): Do not set
12826 size_type_node or call set_sizetype.
12827
b4592b92
DS
128282011-06-07 Dodji Seketeli <dodji@redhat.com>
12829
12830 PR debug/49130
12831 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12832 type when using pointer comparison to compare types.
b4592b92 12833
014ab419
JW
128342011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12835
12836 * c.opt: Add -Wdelete-non-virtual-dtor.
12837 * c-opts.c (c_common_handle_option): Include it in -Wall.
12838
4f60111f
NF
128392011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12840
12841 PR bootstrap/49190
12842
12843 Revert:
12844 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12845
12846 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12847 not tree_common.
12848
4cc4f2f4
JJ
128492011-05-27 Jakub Jelinek <jakub@redhat.com>
12850
12851 PR c++/49165
12852 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12853 C++ don't call c_common_truthvalue_conversion on void type arms.
12854
38e01f9e
NF
128552011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12856
12857 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12858 (stmt_list_stack): Define.
12859 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12860 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12861
92e948a8
NF
128622011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12863
12864 * c-common.c (warning_candidate_p): Check for BLOCKs.
12865
a2fc3e63
NF
128662011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12867
12868 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12869 not tree_common.
12870
0957c029
JJ
128712011-05-25 Jakub Jelinek <jakub@redhat.com>
12872
12873 * c-common.c (def_fn_type): Remove extra va_end.
12874
828fb3ba
JM
128752011-05-23 Jason Merrill <jason@redhat.com>
12876
12877 PR c++/48106
12878 * c-common.c (c_common_get_narrower): New.
12879 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12880
dde05067
NF
128812011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12882
12883 * c-common.h (check_function_arguments): Tweak prototype of
12884 check_function_arguments.
12885 * c-common.c (check_function_arguments): Likewise. Adjust
12886 calls to check_function_nonnull, check_function_format, and
12887 check_function_sentinel.
12888 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12889 separate attributes and typelist arguments. Use
12890 FOREACH_FUNCTION_ARGS to iterate over argument types.
12891
3c0d13bf
PC
128922011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12893
12894 * c-common.c (c_common_reswords): Reorder.
12895 * c-common.h (rid): Likewise.
12896
8242dd04
NF
128972011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12898
12899 * c-common.c (def_fn_type): Don't call build_function_type, call
12900 build_function_type_array or build_varargs_function_type_array
12901 instead.
12902 (c_common_nodes_and_builtins): Likewise.
12903
3d528853
NF
129042011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12905
12906 * c-common.c (c_add_case_label): Omit the loc argument to
12907 build_case_label.
12908 * c-common.h (build_case_label): Remove.
12909 * c-semantics.c (build_case_label): Remove.
12910
a04a722b
JM
129112011-05-05 Joseph Myers <joseph@codesourcery.com>
12912
12913 * c-objc.h (objc_start_method_definition): Update prototype.
12914 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12915
e19a18d4
NF
129162011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12917
12918 * c-common.c (check_main_parameter_types): Reindent. Don't use
12919 TYPE_ARG_TYPES directly.
12920 (handle_nonnull_attribute): Likewise.
12921 (sync_resolve_params): Likewise.
12922 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12923 to check_format_string.
12924 (handle_format_attribute): Likewise.
12925 (check_format_string): Take a function type to examine instead of
12926 a type list. Use a function_arg_iterator to step through argument
12927 types.
12928
c62c040f
RG
129292011-05-04 Richard Guenther <rguenther@suse.de>
12930
12931 * c-common.c (fix_string_type): Use size_int for index type bounds.
12932 (start_fname_decls): Do not pass NULL to build_int_cst.
12933 (c_init_attributes): Likewise.
12934 * c-lex.c (c_lex_with_flags): Likewise.
12935
c12ff9d8
JM
129362011-04-27 Jason Merrill <jason@redhat.com>
12937
12938 * c-common.c (make_tree_vector_from_list): New.
12939 * c-common.h: Declare it.
12940
304dfbe3
RG
129412011-04-26 Richard Guenther <rguenther@suse.de>
12942
12943 PR preprocessor/48248
12944 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12945 for output size with -P.
12946
3c0d13bf
PC
129472011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12948
12949 * c-common.c (struct c_common_resword): Add __underlying_type.
12950 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12951
04695783
JM
129522011-04-20 Jim Meyering <meyering@redhat.com>
12953
12954 * c-format.c (init_dollar_format_checking): Remove useless
12955 if-before-free.
12956
0dc33c3c
NP
129572011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12958
12959 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12960 (objc_detect_field_duplicates): New.
0dc33c3c 12961 * stub-objc.c: Likewise.
3c0d13bf 12962
c59633d9
NP
129632011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12964
12965 * stub-objc.c (objc_declare_protocols): Renamed to
12966 objc_declare_protocol.
12967 * c-objc.h: Likewise.
3c0d13bf 12968
32dabdaf
NP
129692011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12970
12971 * stub-objc.c (objc_declare_class): Updated argument name.
12972
81f653d6
NF
129732011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12974
12975 * c-common.h (c_common_init_ts): Declare.
12976 * c-common.c (c_common_init_ts): Define.
12977
eb345401
NP
129782011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12979
12980 * c-objc.h (objc_build_message_expr): Updated prototype.
12981 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12982
a358e188
MJ
129832011-04-12 Martin Jambor <mjambor@suse.cz>
12984
12985 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12986 of cgraph_node.
12987
e6313a78
RG
129882011-04-11 Richard Guenther <rguenther@suse.de>
12989
12990 * c-common.c (complete_array_type): Build a range type of
12991 proper type.
12992
dcf0c47e
NF
129932011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12994
12995 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12996 (handle_type_generic_attribute): Likewise.
12997
1ee44b26
JM
129982011-04-07 Jason Merrill <jason@redhat.com>
12999
13000 PR c++/48450
13001 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13002 conversion from C++0x scoped enum.
13003
acce4e77
JM
130042011-04-06 Joseph Myers <joseph@codesourcery.com>
13005
13006 * c-target-def.h: New file.
13007 * c-target.def: New file.
13008 * c-target.h: New file.
13009 * c-common.c (targetcm): Don't define here.
13010 * c-common.h (default_handle_c_option): Declare.
13011 * c-format.c: Include c-target.h instead of target.h.
13012 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13013 include tm.h.
13014 (default_handle_c_option): Move from targhooks.c.
13015
e2eefb55
JJ
130162011-03-29 Jakub Jelinek <jakub@redhat.com>
13017
13018 PR preprocessor/48248
13019 * c-ppoutput.c (print): Add src_file field.
13020 (init_pp_output): Initialize it.
13021 (maybe_print_line): Don't optimize by adding up to 8 newlines
13022 if map->to_file and print.src_file are different file.
13023 (print_line): Update print.src_file.
13024
ba78087b
KT
130252011-03-25 Kai Tietz <ktietz@redhat.com>
13026
13027 * c-ada-spec.c (compare_comment): Use filename_cmp
13028 instead of strcmp for filename.
13029
0edf1bb2
JL
130302011-03-25 Jeff Law <law@redhat.com>
13031
adfac8df 13032 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 13033
c7dc8804
JM
130342011-03-25 Jason Merrill <jason@redhat.com>
13035
13036 * c.opt: Add -std=c++03.
13037
d1d879b1
EB
130382011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13039
13040 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13041
3f8257db 130422011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
13043
13044 PR target/12171
5050afdf
KT
13045 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13046 Display allowed attributes for function pointer types.
13047 (pp_c_attributes_display): New function to display
13048 attributes having affects_type_identity flag set to true.
13049 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13050
62d784f7
KT
13051 * c-common.c (c_common_attribute_table):
13052 Add new element.
13053 (c_common_format_attribute_table): Likewise.
13054
82d37118
JM
130552011-03-18 Jason Merrill <jason@redhat.com>
13056
49a000c3
JM
13057 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13058 * c-common.h: Don't declare it here.
13059 * c-common.c: Or define it here.
13060 * c-opts.c (c_common_handle_option): Or set it here.
13061
82d37118
JM
13062 PR c++/35315
13063 * c-common.c (handle_transparent_union_attribute): Don't
13064 make a duplicate type in C++.
13065
17bc631c
JM
130662011-03-15 Jason Merrill <jason@redhat.com>
13067
13068 * c-common.c (max_constexpr_depth): New.
13069 * c-common.h: Declare it.
13070 * c-opts.c (c_common_handle_option): Set it.
13071 * c.opt (fconstexpr-depth): New option.
13072
1b9b91a6
JM
130732011-03-11 Jason Merrill <jason@redhat.com>
13074
f231b5ff
JM
13075 * c-common.c (attribute_takes_identifier_p): Add missing const.
13076
1b9b91a6
JM
13077 PR c++/46803
13078 * c-common.c (attribute_takes_identifier_p): Assume that an
13079 unknown attribute takes an identifier.
13080
a19e4d44
NF
130812011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13082
13083 PR c/47786
13084 * c-common.c (c_type_hash): Call list_length instead of iterating
13085 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13086
982d62f6
JJ
130872011-02-19 Jakub Jelinek <jakub@redhat.com>
13088
13089 PR c/47809
13090 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13091
0a256240
NP
130922011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13093
13094 * c.opt (fobjc-abi-version=) New.
13095 (fobjc-nilcheck): New.
13096
ba9e6dd5
NF
130972011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13098
13099 PR c++/46890
13100 * c-common.h (keyword_is_decl_specifier): Declare.
13101 * c-common.c (keyword_is_decl_specifier): Define.
13102 (keyword_is_function_specifier): New function.
13103
7273813a
JJ
131042011-01-26 Jakub Jelinek <jakub@redhat.com>
13105
13106 PR c/47473
13107 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13108 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13109 REAL_TYPE.
13110
908ef79b
AC
131112011-01-26 Arnaud Charlet <charlet@adacore.com>
13112
13113 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13114
237e9384
JJ
131152011-01-26 Jakub Jelinek <jakub@redhat.com>
13116
13117 PR pch/47430
13118 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13119 after init_c_lex if pch_file is set.
13120
47ea1edf
DK
131212011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13122
d4dba752 13123 PR c++/43601
47ea1edf
DK
13124 * c.opt (-fkeep-inline-dllexport): New switch.
13125
2aa9c6ae
RG
131262011-01-12 Richard Guenther <rguenther@suse.de>
13127
13128 PR middle-end/32511
13129 * c-common.c (handle_weak_attribute): Warn instead of error
13130 on declaring an inline function weak.
13131
7bd11157
TT
131322011-01-05 Tom Tromey <tromey@redhat.com>
13133
13134 * c-common.h (lvalue_error): Update.
13135 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13136 not error.
13137
0e66e494 131382010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 13139
b4f588c4
NP
13140 PR objc/47075
13141 * c-objc.h (objc_finish_message_expr): Added argument to
13142 prototype.
13143
f4da8dce
NF
131442010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13145
13146 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13147 Use prototype_p.
13148
46270f14
NP
131492010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13150
13151 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 13152 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 13153
4816c593
NF
131542010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13155
13156 * c-common.h (readonly_error): Declare.
13157 * c-common.c (readonly_error): Define.
13158
7a6daeb0
NF
131592010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13160
13161 * c-common.h (invalid_indirection_error): Declare.
13162 * c-common.c (invalid_indirection_error): Define.
13163
892f6119
RG
131642010-12-03 Richard Guenther <rguenther@suse.de>
13165
13166 PR c/46745
13167 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13168 (pp_c_unary_expression): Likewise.
13169 (pp_c_expression): Likewise.
13170
6c39e757
NP
131712010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13172
13173 * c-common.h (objc_finish_function): New.
13174 (objc_non_volatilized_type): Removed.
13175 (objc_type_quals_match): Removed.
13176 * stub-objc.c (objc_finish_function): New.
13177 (objc_non_volatilized_type): Removed.
13178 (objc_type_quals_match): Removed.
9faeb493 13179
7c475d11
JM
131802010-11-30 Joseph Myers <joseph@codesourcery.com>
13181
13182 * c-common.h (parse_optimize_options): Declare.
13183 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13184 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13185
71f3e391
JM
131862010-11-29 Joseph Myers <joseph@codesourcery.com>
13187
13188 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13189 GET_ENVIRONMENT.
13190 * c-pch.c (O_BINARY): Don't define here.
13191 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13192
d5fabb58
JM
131932010-11-25 Joseph Myers <joseph@codesourcery.com>
13194
13195 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13196 targetm.except_unwind_info.
13197
299404a1
JM
131982010-11-23 Joseph Myers <joseph@codesourcery.com>
13199
13200 * c-opts.c (c_common_handle_option): Pass location to
13201 set_struct_debug_option.
13202
c98cd5bf
JM
132032010-11-23 Joseph Myers <joseph@codesourcery.com>
13204
13205 * c-common.c (visibility_options): Move from ../opts.c.
13206 * c-common.h (struct visibility_flags, visibility_options):
13207 Declare here.
13208 * c-opts.c (finish_options): Rename to c_finish_options.
13209 (c_common_init): Update call to finish_options.
13210
a9546771
NP
132112010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13212
13213 PR objc/34033
13214 * c-lex.c (lex_string): Check that each string in an Objective-C
13215 string concat sequence starts with either one or zero '@', and
13216 that there are no spurious '@' signs at the end.
13217
24a57808
JM
132182010-11-20 Joseph Myers <joseph@codesourcery.com>
13219
13220 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13221 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13222 HANDLE_PRAGMA_VISIBILITY.
13223 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13224 HANDLE_PRAGMA_VISIBILITY): Don't define.
13225 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13226
a9aa2c3a
NF
132272010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13228
13229 PR c++/16189
13230 PR c++/36888
13231 PR c++/45331
13232 * c-common.h (keyword_begins_type_specifier): Declare.
13233 (keyword_is_storage_class_specifier): Declare.
13234 (keyword_is_type_qualifier): Declare.
13235 * c-common.c (keyword_begins_type_specifier): New function.
13236 (keyword_is_storage_class_specifier): New function.
13237 (keyword_is_type_qualifier): Declare.
13238
5386338c
JM
132392010-11-19 Joseph Myers <joseph@codesourcery.com>
13240
13241 PR c/46547
13242 * c-common.c (in_late_binary_op): Define.
13243 (c_common_truthvalue_conversion): Check in_late_binary_op before
13244 calling c_save_expr.
13245 * c-common.h (in_late_binary_op): Declare.
13246
69ccdddb
JM
132472010-11-19 Joseph Myers <joseph@codesourcery.com>
13248
13249 * c-opts.c (c_common_handle_option): Update calls to
13250 set_struct_debug_option.
13251
6b192a09
NP
132522010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13253
13254 * c-common.h (objc_declare_protocols): Added additional argument.
13255 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13256
fb52b50a
NF
132572010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13258
13259 PR c/33193
13260 * c-common.h (build_real_imag_expr): Declare.
13261 * c-semantics.c (build_real_imag_expr): Define.
13262
b37421c6
JM
132632010-11-17 Joseph Myers <joseph@codesourcery.com>
13264
13265 * c-opts.c (c_common_parse_file): Take no arguments.
13266 * c-common.h (c_common_parse_file): Update prototype.
13267
07078664
JJ
132682010-11-16 Jakub Jelinek <jakub@redhat.com>
13269
13270 PR c++/46401
13271 * c-common.c (warning_candidate_p): Don't track non-const calls
13272 or STRING_CSTs.
13273
c6a13190
ILT
132742010-11-15 Ian Lance Taylor <iant@google.com>
13275
13276 * c-lex.c (init_c_lex): Set macro debug callbacks if
13277 flag_dump_go_spec is set.
13278
925e8657
NP
132792010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13280
13281 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13282 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13283
bb0a9581
NF
132842010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13285
13286 PR preprocessor/45038
13287 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13288 dialects.
13289
c5fa0890
JM
132902010-11-12 Joseph Myers <joseph@codesourcery.com>
13291
13292 * c-common.h (c_family_lang_mask): Declare.
13293 * c-opts.c (c_family_lang_mask): Make extern.
13294 * c-pragma.c (handle_pragma_diagnostic): Use
13295 control_warning_option.
13296
a4d8c676
JM
132972010-11-12 Joseph Myers <joseph@codesourcery.com>
13298
13299 * c-common.c (parse_optimize_options): Update call to
13300 decode_options.
13301 * c-common.h (c_common_handle_option): Update prototype.
13302 * c-opts.c (c_common_handle_option): Take location_t parameter and
13303 pass it to other functions.
13304
f954bd2c
JM
133052010-11-11 Joseph Myers <joseph@codesourcery.com>
13306
13307 * c-opts.c (warning_as_error_callback): Remove.
13308 (c_common_initialize_diagnostics): Don't call
13309 register_warning_as_error_callback.
13310 (c_common_handle_option): Handle -Werror=normalized= here.
13311
d8a07487
JM
133122010-11-10 Joseph Myers <joseph@codesourcery.com>
13313
13314 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13315 in diagnostic.
13316 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13317 letter.
13318 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13319 Remove trailing '.' from diagnostics.
13320 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13321
d5478783
JM
133222010-11-10 Joseph Myers <joseph@codesourcery.com>
13323
13324 * c-common.c (parse_optimize_options): Pass global_dc to
13325 decode_options.
13326 * c-opts.c (c_common_handle_option): Pass &global_options to
13327 set_Wstrict_aliasing.
13328 * c.opt (v): Don't mark Common or document here.
13329
91ebb981
IS
133302010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13331
13332 PR target/44981
13333 * c-format.c (format_type): New type gcc_objc_string_format_type.
13334 (valid_stringptr_type_p): New.
13335 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13336 (check_format_string): Pass expected type, use
91ebb981
IS
13337 valid_stringptr_type_p (), check that the format string types are
13338 consistent with the format specification.
13339 (decode_format_attr): Warn if NSString is used outside objective-c.
13340 (format_types_orig): Add NSString.
13341 (format_name): New.
13342 (format_flags): New.
13343 (check_format_arg): Handle format strings requiring an external parser.
13344 first_target_format_type: New variable.
13345 (handle_format_attribute): Set up first_target_format_type, pass the
13346 expected format arg string type to check_format_string().
ab20d992 13347 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13348 * stub-objc.c (objc_string_ref_type_p): New.
13349 (objc_check_format_arg): New.
13350
bede2adc
NP
133512010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13352
9faeb493 13353 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13354 * c-common.h (objc_build_class_component_ref): New.
13355 * stub-objc.c (objc_build_class_component_ref): New.
13356
9a179d01
NP
133572010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13358
13359 * c.opt (Wproperty-assign-default): New option.
13360
22d8d616
NP
133612010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13362
13363 Implemented -fobjc-std=objc1 flag.
13364 * c.opt (fobjc-std=objc1): New option.
13365
2debdb4f
NP
133662010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13367
13368 Implemented format and noreturn attributes for Objective-C methods.
13369 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13370 attribute for Objective-C methods.
13371
ec52b111
JM
133722010-10-31 Jason Merrill <jason@redhat.com>
13373
13374 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13375 EXPR_LOC_OR_HERE.
13376
46a88c12
NP
133772010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13378
13379 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13380 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13381 (objc_add_property_declaration): Removed arguments for copies and
13382 ivar.
13383 (objc_build_getter_call): Renamed to
13384 objc_maybe_build_component_ref.
13385 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13386 (objc_is_property_ref): New.
13387 * c-common.c (c_common_reswords): Removed copies and ivar.
13388 * stub-objc.c (objc_add_property_declaration): Removed arguments
13389 for copies and ivar.
13390 (objc_build_getter_call): Renamed to
13391 objc_maybe_build_component_ref.
13392 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13393 (objc_is_property_ref): New.
9faeb493 13394
1e4bf85b
AC
133952010-10-29 Arnaud Charlet <charlet@adacore.com>
13396 Matthew Gingell <gingell@adacore.com>
13397
13398 * c-ada-spec.c (separate_class_package): New function.
13399 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13400 name of their enclosing package.
13401 (print_ada_declaration): Use separate_class_package.
13402
81f0bab2
JM
134032010-10-27 Jason Merrill <jason@redhat.com>
13404
2b08f2c5
JM
13405 * c-common.c (c_common_reswords): Add __is_literal_type.
13406 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13407
81f0bab2
JM
13408 * c-common.c (check_case_value): Remove special C++ code.
13409
200290f2
NP
134102010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13411
13412 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13413 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13414 and RID_LAST_PATTR.
13415 (objc_add_property_declaration): Added additional arguments.
13416 (objc_property_attribute_kind): Removed.
13417 (objc_set_property_attr): Removed.
13418 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13419 copy and nonatomic.
13420 * stub-objc.c (objc_add_property_declaration): Added additional
13421 arguments.
13422 (objc_set_property_attr): Removed.
9faeb493 13423
f614132b
NP
134242010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13425
13426 * c-common.h (objc_add_property_variable): Renamed to
13427 objc_add_property_declaration. Added location argument.
13428 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13429
b8a18805
NP
134302010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13431
13432 * c-common.h (objc_maybe_printable_name): New.
13433 * stub-objc.c (objc_maybe_printable_name): New.
13434
3f8257db
JJ
134352010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13436 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13437
13438 * c-common.h (c_common_mark_addressable_vec): Declare.
13439 * c-common.c (c_common_mark_addressable_vec): New function.
13440
249a82c4
NP
134412010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13442
13443 * c-common.h (objc_set_method_type): Removed.
13444 (objc_add_method_declaration): Added boolean argument.
13445 (objc_start_method_definition): Same change.
13446 (objc_build_method_signature): Same change.
13447 * stub-objc.c (objc_set_method_type): Removed.
13448 (objc_add_method_declaration): Added boolean argument.
13449 (objc_start_method_definition): Same change.
13450 (objc_build_method_signature): Same change.
13451
977e30bc
NP
134522010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13453
13454 * c-common.h (finish_file): Removed.
13455 (objc_write_global_declarations): New.
13456 * c-opts.c (c_common_parse_file): Do not call finish_file.
13457 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13458
da57d1b9
NP
134592010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13460
13461 Implemented parsing @synthesize and @dynamic for
13462 Objective-C/Objective-C++.
13463 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13464 (objc_add_synthesize_declaration): New.
13465 (objc_add_dynamic_declaration): New.
13466 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13467 * stub-objc.c (objc_add_synthesize_declaration): New.
13468 (objc_add_dynamic_declaration): New.
9faeb493 13469
0069111f
MM
134702010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13471
13472 PR target/46041
13473 * c-cppbuiltin.c (mode_has_fma): Move function here from
13474 builtins.c. Don't use the fma optab, instead just use the
13475 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13476 using -save-temps.
13477
e426b47b
NP
134782010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13479
13480 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13481
3f8257db 13482 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13483
9faeb493 13484 Radar 4330422
e426b47b
NP
13485 * c-common.h (objc_non_volatilized_type): New declaration
13486 * stub-objc.c (objc_non_volatilized_type): New stub.
13487
90fbfdc3
NP
134882010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13489
e426b47b 13490 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13491
ab20d992 13492 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13493
9faeb493 13494 Radar 4133425
90fbfdc3 13495 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13496 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13497
c37d8c30
IS
134982010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13499
13500 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13501 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13502 (objc_ivar_visibility_kind): New enum.
13503 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13504 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13505 visibility enum.
13506
1b1562a5
MM
135072010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13508
13509 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13510 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13511 has the appropriate fma builtins.
13512 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13513
668ea4b1
IS
135142010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13515
1b1562a5 13516 merge from FSF apple 'trunk' branch.
3f8257db 13517 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13518
668ea4b1
IS
13519 Radars 4436866, 4505126, 4506903, 4517826
13520 * c-common.c (c_common_resword): Define @property and its attributes.
13521 * c-common.h: Define property attribute enum entries.
13522 (OBJC_IS_PATTR_KEYWORD): New.
13523 (objc_property_attribute_kind): New enum.
13524 Declare objc_set_property_attr (), objc_add_property_variable (),
13525 objc_build_getter_call () and objc_build_setter_call ().
13526 * stub-objc.c (objc_set_property_attr): New stub.
13527 (objc_add_property_variable): Likewise.
13528 (objc_build_getter_call): Likewise.
13529 (objc_build_setter_call) Likewise.
1b1562a5 13530
a1178b30
IS
135312010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13532
1b1562a5 13533 merge from FSF apple 'trunk' branch.
ab20d992 13534 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13535
13536 Radar 3803157 (method attributes)
13537 * c-common.c (handle_deprecated_attribute): Recognize
13538 objc methods as valid declarations.
13539 * c-common.h: Declare objc_method_decl ().
1b1562a5 13540 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13541
a75bfaa6
JM
135422010-10-08 Joseph Myers <joseph@codesourcery.com>
13543
13544 * c-common.c (parse_optimize_options): Call
13545 decode_cmdline_options_to_array_default_mask before
13546 decode_options. Update arguments to decode_options.
13547 * c-common.h (c_common_init_options_struct): Declare.
13548 * c-opts.c (c_common_init_options_struct): New. Split out from
13549 c_common_init_options.
13550
f05b9d93
NP
135512010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13552
13553 Implemented fast enumeration for Objective-C.
13554 * c-common.h (objc_finish_foreach_loop): New.
13555 * stub-objc.c (objc_finish_foreach_loop): New.
13556
1ebe4b4f
JM
135572010-10-05 Joseph Myers <joseph@codesourcery.com>
13558
13559 * c-common.h (struct diagnostic_context): Don't declare here.
13560 (c_common_initialize_diagnostics): Declare using
13561 diagnostic_context typedef.
13562 * c-opts.c (c_common_handle_option): Pass global_dc to
13563 handle_generated_option.
13564
d4d24ba4
JM
135652010-10-04 Joseph Myers <joseph@codesourcery.com>
13566
13567 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13568 handle_generated_option.
13569
478a1c5b
ILT
135702010-10-03 Ian Lance Taylor <iant@google.com>
13571
13572 * c.opt (-fplan9-extensions): New option.
13573
82a1c2fe
FXC
135742010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13575
13576 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13577 Remove.
13578 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13579 of duplicating code.
13580
92902b1b
IS
135812010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13582
13583 * c-common.c: Add two new entries for @optional
13584 and @required keywords.
13585
13586 merge from FSF 'apple/trunk' branch.
3f8257db 13587 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13588
13589 Radar 4386773
13590 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13591 objective-c keywords.
13592 (objc_set_method_opt): New declaration.
13593 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13594
46625112
JM
135952010-09-30 Joseph Myers <joseph@codesourcery.com>
13596
13597 * c-common.c (handle_optimize_attribute): Pass &global_options to
13598 cl_optimization_save and cl_optimization_restore.
13599 * c-opts.c (c_common_handle_option): Pass &global_options to
13600 handle_generated_option.
13601 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13602 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13603 &global_options to cl_optimization_restore.
13604
49b91f05
NP
136052010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13606
13607 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13608 Objective-C/Objective-C++ keywords.
13609
13ed556f 136102010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13611
9faeb493
UB
13612 Merge from 'apple/trunk' branch on FSF servers.
13613
3f8257db 13614 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13615
13616 Radar 4281748
13617 * c-common.h (objc_check_global_decl): New declaration.
13618 * stub-objc.c (objc_check_global_decl): New stub.
13619
f0036cca
JM
136202010-09-29 Joseph Myers <joseph@codesourcery.com>
13621
13622 * c.opt: Don't use VarExists.
13623
e3339d0f
JM
136242010-09-29 Joseph Myers <joseph@codesourcery.com>
13625
13626 * c-common.c (c_cpp_error): Update names of diagnostic_context
13627 members.
13628 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13629 cl_optimization members.
13630 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13631 sanitize_cpp_opts, finish_options): Update names of cpp_options
13632 members.
13633
1973201f
NP
136342010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13635
13636 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13637 (objc_is_reserved_word): Removed.
13638 * c-common.c: Updated comments.
13639 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13640 objc_is_reserved_word.
13641 * stub-objc.c (objc_is_reserved_word): Removed.
13642
f7e71da5
IS
136432010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13644
9faeb493 13645 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13646 include attributes.
13647 (objc_start_method_definition): Likewise.
13648 (objc_build_keyword_decl): Likewise.
13649 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13650 (objc_start_method_definition): Likewise.
13651 (objc_build_keyword_decl): Likewise.
13652
c165dca7
IS
136532010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13654
13655 * c-common.h (objc_start_class_interface): Adjust prototype.
13656 (objc_start_category_interface): Likewise.
13657 (objc_start_protocol): Likewise.
13658 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13659 (objc_start_class_interface): Likewise.
13660 (objc_start_category_interface): Likewise.
13661
7458026b
ILT
136622010-09-27 Ian Lance Taylor <iant@google.com>
13663
13664 * c-common.c (c_common_attribute_table): Add no_split_stack.
13665 (handle_no_split_stack_attribute): New static function.
13666
b581b85b
NP
136672010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13668
9faeb493 13669 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13670
3f8257db 13671 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13672
9faeb493 13673 Radar 4229905
b581b85b
NP
13674 * c-common.h (objc_have_common_type): New declaration.
13675 * stub-objc.c (objc_have_common_type): New stub.
13676
13677 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13678
13679 Radar 4154928
13680 * c-common.h (objc_common_type): New prototype.
9faeb493 13681 * stub-objc.c (objc_common_type): New stub.
b581b85b 13682
46a4da10
JH
136832010-09-24 Jan Hubicka <jh@suse.cz>
13684
13685 * c-common.c (handle_leaf_attribute): New function.
13686 (struct attribute_spec c_common_att): Add leaf.
13687
e200444e
JM
136882010-09-22 Joseph Myers <joseph@codesourcery.com>
13689
13690 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13691 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13692 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13693 -include-barrier, -include-directory, -include-directory=,
13694 -include-directory-after, -include-directory-after=,
13695 -include-prefix, -include-prefix=, -include-with-prefix,
13696 -include-with-prefix=, -include-with-prefix-after,
13697 -include-with-prefix-after=, -include-with-prefix-before,
13698 -include-with-prefix-before=, -no-integrated-cpp,
13699 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13700 -output=, -pedantic, -pedantic-errors, -preprocess,
13701 -print-missing-file-dependencies, -trace-includes, -traditional,
13702 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13703 -user-dependencies, -verbose, -write-dependencies,
13704 -write-user-dependencies, no-integrated-cpp, traditional): New.
13705
29a80ea6
NP
137062010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13707
13708 PR objc/23710
ac1fc2fc
NP
13709 * c-common.h (objc_start_method_definition): Return bool instead
13710 of void.
13711 * stub-objc.c (objc_start_method_definition): Return bool instead
13712 of void.
13713
137142010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13715
13716 PR objc/25965
13717 * c-common.h (objc_get_interface_ivars): New declaration.
13718 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13719
de621752
ILT
137202010-09-15 Ian Lance Taylor <iant@google.com>
13721
13722 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13723 messages. Remove period at end of warning message.
de621752 13724
ba885ec5
NS
137252010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13726
13727 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13728 (handle_alias_attribute): ... here.
13729 (handle_ifunc_attribute): New.
13730
c5ee1358
MM
137312010-09-06 Mark Mitchell <mark@codesourcery.com>
13732
13733 * c-common.h (do_warn_double_promotion): Declare.
13734 * c-common.c (do_warn_double_promotion): Define.
13735
0a0b3574
MM
137362010-09-05 Mark Mitchell <mark@codesourcery.com>
13737
13738 * c.opt (Wdouble-promotion): New.
13739
d1779886
JM
137402010-09-02 Joseph Myers <joseph@codesourcery.com>
13741
13742 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13743 fvtable-thunks, fxref): Mark no longer supported in help text.
13744
2d2bd949
JM
137452010-09-02 Joseph Myers <joseph@codesourcery.com>
13746
13747 * c.opt (Wimport, fall-virtual, falt-external-templates,
13748 fdefault-inline, fenum-int-equiv, fexternal-templates,
13749 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13750 fname-mangling-version-, fnew-abi, fnonnull-objects,
13751 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13752 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13753 applicable.
13754 (fhandle-exceptions): Mark with Alias and Warn.
13755 * c-opts.c (c_common_handle_option): Don't handle options marked
13756 as ignored.
13757
5de8299c
JM
137582010-09-02 Joseph Myers <joseph@codesourcery.com>
13759
13760 * c.opt (Wcomments, Werror-implicit-function-declaration,
13761 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13762 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13763 aliases.
13764 * c-common.c (option_codes): Use OPT_Wcomment instead of
13765 OPT_Wcomments.
13766 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13767 Don't handle options marked as aliases.
13768
0ceb0201
RG
137692010-08-25 Richard Guenther <rguenther@suse.de>
13770
13771 * c-common.c (c_common_get_alias_set): Remove special
13772 handling for pointers.
13773
ac47786e
NF
137742010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13775
13776 * c-common.c: Use FOR_EACH_VEC_ELT.
13777 * c-gimplify.c: Likewise.
13778 * c-pragma.c: Likewise.
13779
c878765b
JM
137802010-08-16 Joseph Myers <joseph@codesourcery.com>
13781
13782 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13783 RejectDriver.
13784 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13785 RejectDriver.
13786 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13787 instead of OPT_MDX and OPT_MMDX.
13788
603349bf
JM
137892010-08-16 Joseph Myers <joseph@codesourcery.com>
13790
13791 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13792
644fa7ac
JM
137932010-08-12 Joseph Myers <joseph@codesourcery.com>
13794
13795 * c.opt (MD, MMD): Change to MDX and MMDX.
13796 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13797
481e1176
JM
137982010-08-11 Joseph Myers <joseph@codesourcery.com>
13799
13800 * c-opts.c (c_common_handle_option): Call handle_generated_option
13801 instead of handle_option.
13802
ac8dc9f7
NF
138032010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13804
13805 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13806 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13807
4f8c876d
NF
138082010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13809
13810 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13811 (pending_redefine_extname): Change type to a VEC.
13812 (add_to_renaming_pragma_list): Update for new type of
13813 pending_redefine_extname.
ac8dc9f7 13814 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13815
3b0c690e
AC
138162010-08-04 Arnaud Charlet <charlet@adacore.com>
13817
13818 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13819 visited.
13820 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13821 decide whether a type has already been declared/seen.
13822 Do not go to the original type.
13823 (dump_nested_types): New parameter forward.
13824 Generate forward declaration if needed and mark type as visited.
13825 (print_ada_declaration): Call dump_nested_types if not already done.
13826 Mark types as visited.
13827
1890bccc
JM
138282010-08-03 Joseph Myers <joseph@codesourcery.com>
13829
13830 * c.opt (-print-pch-checksum): Remove option.
13831 * c-opts.c (c_common_handle_option): Don't handle
13832 OPT_print_pch_checksum.
13833
5f20c657
JM
138342010-07-27 Joseph Myers <joseph@codesourcery.com>
13835
13836 * c-common.h (c_common_handle_option): Update prototype and return
13837 value type.
13838 * c-opts.c (c_common_handle_option): Update prototype and return
13839 value type. Update calls to handle_option and
13840 enable_warning_as_error.
13841
f551f80c
JJ
138422010-07-27 Jakub Jelinek <jakub@redhat.com>
13843
13844 PR c/45079
13845 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13846
61ff2bdc
JM
138472010-07-27 Joseph Myers <joseph@codesourcery.com>
13848
13849 * c-common.h (c_common_missing_argument): Remove.
13850 * c-opts.c (c_common_missing_argument): Remove.
13851 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13852 idirafter, imacros, include, isysroot, isystem, iquote): Add
13853 MissingArgError.
13854 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13855
7a9bf9a4
JM
138562010-07-27 Joseph Myers <joseph@codesourcery.com>
13857
13858 * c-common.h (c_common_option_lang_mask,
13859 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13860 New.
13861 (c_common_init_options): Update prototype.
13862 * c-opts.c (c_common_option_lang_mask): New.
13863 (c_common_initialize_diagnostics): Split out of
13864 c_common_init_options.
13865 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13866 New.
13867 (c_common_init_options): Update prototype. Use decoded options in
13868 search for -lang-asm.
13869
910ad8de
NF
138702010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13871
13872 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13873 * c-format.c: Likewise.
13874
718f9c0f
MLI
138752010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13876
13877 * c-common.h: Include diagnostic-core.h. Error if already
13878 included.
13879 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13880
4d451982
MLI
138812010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13882
adfac8df 13883 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13884 Do not include expr.h
13885 (vector_mode_valid_p): Move here.
13886
119fe915
SB
138872010-06-21 DJ Delorie <dj@redhat.com>
13888
13889 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13890 allow these pragmas anywhere.
13891
138922010-06-14 Jakub Jelinek <jakub@redhat.com>
13893
13894 PR bootstrap/44509
13895 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13896 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13897 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13898 ggc_strdup instead of xstrdup.
13899
139002010-06-10 Jakub Jelinek <jakub@redhat.com>
13901
13902 * c-cppbuiltin.c: Include cpp-id-data.h.
13903 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13904 (lazy_hex_fp_value): New function.
13905 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13906
6662d794
MLI
139072010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13908
13909 * c-gimplify.c: Do not include tree-flow.h
13910
38f8b050
JR
139112010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13912
13913 PR other/44034
13914 * c-common.c: Rename targetm member:
13915 targetm.enum_va_list -> targetm.enum_va_list_p
13916
9589f23e
AS
139172010-06-28 Anatoly Sokolov <aesok@post.ru>
13918
13919 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13920
3b06d379
SB
139212010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13922
13923 * c-cppbuiltin.c: Do not include except.h.
13924
d166d4c3
AK
139252010-06-24 Andi Kleen <ak@linux.intel.com>
13926
9faeb493
UB
13927 * c-common.c (warn_for_omitted_condop): New.
13928 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13929
70cb8be6
JM
139302010-06-21 Joseph Myers <joseph@codesourcery.com>
13931
13932 * c.opt (lang-objc): Remove.
13933 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13934
a4c97feb
JR
139352010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13936
13937 * c-opts.c: Include "tm_p.h".
13938
6e2f1956
JM
139392010-06-20 Joseph Myers <joseph@codesourcery.com>
13940
13941 * c-common.c (parse_optimize_options): Update call to
13942 decode_options.
13943
bc87224e
NF
139442010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13945
13946 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13947 new type of types_used_by_cur_var_decl.
13948
b49cf425
JR
139492010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13950
13951 PR bootstrap/44512
13952 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13953 for C++ standard compliance.
13954
59f9c2ed
JM
139552010-06-16 Jason Merrill <jason@redhat.com>
13956
13957 * c.opt: Add -Wnoexcept.
13958
33766b66
RG
139592010-06-16 Richard Guenther <rguenther@suse.de>
13960
13961 PR c/44555
13962 * c-common.c (c_common_truthvalue_conversion): Remove
13963 premature and wrong optimization concering ADDR_EXPRs.
13964
eff7e30c
AC
139652010-06-15 Arnaud Charlet <charlet@adacore.com>
13966
13967 * c-ada-spec.c (dump_sloc): Remove column info.
13968 (is_simple_enum): New function.
13969 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13970 enum types when relevant.
13971
6312e84d
MLI
139722010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13973
9faeb493 13974 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13975 location.
13976
1cb42611
JM
139772010-06-10 Joseph Myers <joseph@codesourcery.com>
13978
13979 * c-opts.c (c_common_handle_option): Don't handle
13980 OPT_fshow_column.
13981
a9429e29
LB
139822010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13983
13984 * c-pragma.c (push_alignment): Use typed GC allocation.
13985 (handle_pragma_push_options): Likewise.
13986
13987 * c-common.c (parse_optimize_options): Likewise.
13988
13989 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13990 option.
13991
5498f011
JM
139922010-06-07 Joseph Myers <joseph@codesourcery.com>
13993
13994 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13995 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13996 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13997 flag_signed_bitfields, warn_strict_null_sentinel,
13998 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13999 flag_gen_declaration, flag_no_gnu_keywords,
14000 flag_implement_inlines, flag_implicit_templates,
14001 flag_implicit_inline_templates, flag_optional_diags,
14002 flag_elide_constructors, flag_default_inline, flag_rtti,
14003 flag_conserve_space, flag_access_control, flag_check_new,
14004 flag_new_for_scope, flag_weak, flag_working_directory,
14005 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14006 flag_enforce_eh_specs, flag_threadsafe_statics,
14007 flag_pretty_templates): Remove.
14008 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14009 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14010 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14011 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14012 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14013 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14014 flag_no_gnu_keywords, flag_implement_inlines,
14015 flag_implicit_templates, flag_implicit_inline_templates,
14016 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14017 flag_rtti, flag_conserve_space, flag_access_control,
14018 flag_check_new, flag_new_for_scope, flag_weak,
14019 flag_working_directory, flag_use_cxa_atexit,
14020 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14021 flag_threadsafe_statics, flag_pretty_templates,
14022 warn_strict_null_sentinel): Remove.
14023 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14024 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14025 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14026 fimplicit-inline-templates, fimplicit-templates,
14027 flax-vector-conversions, fms-extensions, fnil-receivers,
14028 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14029 frtti, fshort-double, fshort-enums, fshort-wchar,
14030 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14031 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14032 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14033 gen-decls, undef): Use Var.
14034 (fdefault-inline, foptional-diags): Document as doing nothing.
14035 * c-opts.c (c_common_handle_option): Remove cases for options now
14036 using Var. Mark ignored options as such.
14037
39dabefd
SB
140382010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14039
9faeb493 14040 * c-common.c: Moved to here from parent directory.
39dabefd
SB
14041 * c-common.def: Likewise.
14042 * c-common.h: Likewise.
14043 * c-cppbuiltin.c: Likewise.
14044 * c-dump.c: Likewise.
14045 * c-format.c: Likewise.
14046 * c-format.h : Likewise.
14047 * c-gimplify.c: Likewise.
14048 * c-lex.c: Likewise.
14049 * c-omp.c: Likewise.
14050 * c.opt: Likewise.
14051 * c-opts.c: Likewise.
14052 * c-pch.c: Likewise.
14053 * c-ppoutput.c: Likewise.
14054 * c-pragma.c: Likewise.
14055 * c-pragma.h: Likewise.
14056 * c-pretty-print.c: Likewise.
14057 * c-pretty-print.h: Likewise.
14058 * c-semantics.c: Likewise.
14059 * stub-objc.c: Likewise.
14060
14061 * c-common.c: Include gt-c-family-c-common.h.
14062 * c-pragma.c: Include gt-c-family-c-pragma.h.
14063\f
68127a8e 14064Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
14065
14066Copying and distribution of this file, with or without modification,
14067are permitted in any medium without royalty provided the copyright
14068notice and this notice are preserved.