]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
c: -Wstringop-overflow for parameters with forward-declared sizes
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
b2776076
GA
12023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2
3 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
4 (dump_ada_declaration): Ditto.
5 (dump_ada_structure): Ditto.
6 * c-common.cc (unsafe_conversion_p): Ditto.
7 (shorten_compare): Ditto.
8 (pointer_int_sum): Ditto.
9 (c_common_truthvalue_conversion): Ditto.
10 (scalar_to_vector): Ditto.
11 * c-common.h (gnu_vector_type_p): Ditto.
12 * c-omp.cc (c_omp_depend_t_p): Ditto.
13 (c_omp_split_clauses): Ditto.
14 * c-ubsan.cc (ubsan_instrument_division): Ditto.
15 * c-warn.cc (conversion_warning): Ditto.
16 (warnings_for_convert_and_check): Ditto.
17
ff2dcddf
GA
182023-05-18 Joseph Myers <joseph@codesourcery.com>
19
20 * c-format.cc (print_char_table): Handle %B like %b.
21
3427b51b
GA
222023-05-15 Joseph Myers <joseph@codesourcery.com>
23
24 * c-lex.cc (c_common_has_attribute): Use 202311 as
25 __has_c_attribute return for all C2x attributes.
26
272023-05-15 Patrick Palka <ppalka@redhat.com>
28
29 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
30 for C++23.
31
1fc8da95
GA
322023-05-01 Marek Polacek <polacek@redhat.com>
33
34 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
35
579cdc1e
GA
362023-03-28 David Malcolm <dmalcolm@redhat.com>
37
38 PR c/107002
39 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
40 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
41 Reject cases where involving macro expansions.
42
432023-03-28 Jason Merrill <jason@redhat.com>
44
45 PR c++/107163
46 * c-common.cc (verify_tree): Don't use sequenced handling
47 for COMPONENT_REF.
48
454a4d50
GA
492023-03-17 Jakub Jelinek <jakub@redhat.com>
50
51 PR c/109151
52 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
53 types rather than just INTEGER_TYPE.
54
c8065441
GA
552023-03-10 Marek Polacek <polacek@redhat.com>
56
57 PR sanitizer/108060
58 PR sanitizer/109050
59 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
60 the RHS before the LHS.
61
2858bf16
GA
622023-03-04 Jakub Jelinek <jakub@redhat.com>
63
64 PR c/107465
65 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
66 above innermost zero extension of BIT_NOT_EXPR result.
67
682023-03-04 Jakub Jelinek <jakub@redhat.com>
69
70 PR c/107465
71 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
72 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
73 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
74 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
75 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
76 from narrower unsigned, fix up computation of mask for the constant
77 cases and for unsigned other operand case handle differently
78 BIT_NOT_EXPR result being sign vs. zero extended.
79
802023-03-04 Jakub Jelinek <jakub@redhat.com>
81
82 PR c/107846
83 * c-warn.cc: Include langhooks.h.
84 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
85 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
86 is narrower than type0 and unsigned, use wi::min_precision with
87 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
88
2aa6673e
GA
892023-03-03 Alexandre Oliva <oliva@adacore.com>
90
91 * c-common.cc (c_common_nodes_and_builtins): Take
92 wchar_type_node for wint_type_node when aliased.
93 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
94 wchar_t, to the underlying type rather than wchar_t in
95 non-C++.
96 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
97
6f9e2f14
GA
982023-02-28 Marek Polacek <polacek@redhat.com>
99
100 PR c++/107938
101 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
102 POINTER_TYPE_P.
103
1042023-02-28 Jakub Jelinek <jakub@redhat.com>
105
106 PR sanitizer/108894
107 * c-common.h (c_strict_flex_array_level_of): Declare.
108 * c-common.cc (c_strict_flex_array_level_of): New function,
109 moved and renamed from c-decl.cc's strict_flex_array_level_of.
110 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
111 C check c_strict_flex_array_level_of whether a trailing array
112 should be treated as flexible member like. Handle C [0] arrays.
113 Add 1 + index_off_by_one rather than index_off_by_one to bounds
114 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
115 bounds comparison.
116
e2b20ed3
GA
1172023-02-23 Jakub Jelinek <jakub@redhat.com>
118
119 PR translation/108890
120 * c.opt (fcontracts): Fix description.
121
b6f98991
GA
1222023-02-22 Marek Polacek <polacek@redhat.com>
123
124 PR c/108880
125 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
126 pset to walk_tree_1.
127 (c_genericize): Call walk_tree with an explicit pset.
128
0263e9d5
GA
1292023-02-18 Martin Uecker <uecker@tugraz.at>
130
131 PR c/105660
132 * c-attribs.cc (append_access_attr): Use order of arguments when
133 construction string.
134 (append_access_attr_idxs): Rename and make static.
135 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
136
88cc4495
GA
1372023-02-16 Patrick Palka <ppalka@redhat.com>
138
139 * c-common.h: Mechanically drop static from static inline
140 functions via s/^static inline/inline/g.
141
0a251e74
GA
1422023-02-01 Jason Merrill <jason@redhat.com>
143
144 * c.opt: Add -Wno-changes-meaning.
145
317525b0
GA
1462023-01-31 Marek Polacek <polacek@redhat.com>
147
148 PR c++/107593
149 PR c++/108597
150 * c-common.h (instantiation_dependent_expression_p): Declare.
151 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
152 is dependent, invalidate the chain.
153
2371d100
GA
1542023-01-26 Marek Polacek <polacek@redhat.com>
155
156 PR c++/105300
157 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
158
9f98cfa5
GA
1592023-01-18 Marek Polacek <polacek@redhat.com>
160
161 PR c/108424
162 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
163
5013c3bb
GA
1642023-01-14 Jakub Jelinek <jakub@redhat.com>
165
166 PR c++/108365
167 * c-common.h (may_shorten_divmod): New static inline function.
168
1692023-01-13 Eric Botcazou <ebotcazou@adacore.com>
170
171 * c-ada-spec.cc (is_float32): New function.
172 (is_float64): Likewise.
173 (is_float128): Tweak.
174 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
175
81ed98bc
GA
1762023-01-12 Lewis Hyatt <lhyatt@gmail.com>
177
178 PR preprocessor/108244
179 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
180 deferred pragmas if -fdirectives-only.
181 (init_pragma): Likewise.
182
84723aca
GA
1832023-01-09 Martin Liska <mliska@suse.cz>
184
185 PR c/107993
186 * c-attribs.cc (handle_target_clones_attribute): Check for
187 string constant for all target_clone attribute values.
188
0f8fbb57
GA
1892023-01-03 Florian Weimer <fweimer@redhat.com>
190
191 * c-cppbuiltin.cc (c_cpp_builtins): Define
192 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
193
1942023-01-03 Florian Weimer <fweimer@redhat.com>
195
196 Revert:
197 2023-01-03 Florian Weimer <fweimer@redhat.com>
198
199 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
200 Define if constant is known.
201
2022023-01-03 Florian Weimer <fweimer@redhat.com>
203
204 Revert:
205 2023-01-02 Florian Weimer <fweimer@redhat.com>
206
207 * c-cppbuiltin.cc (c_cpp_builtins): Define
208 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
209
fee53a31
GA
2102023-01-02 Florian Weimer <fweimer@redhat.com>
211
212 * c-cppbuiltin.cc (c_cpp_builtins): Define
213 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
214
2152023-01-02 Florian Weimer <fweimer@redhat.com>
216
217 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
218 Define if constant is known.
219
d2ef2327
GA
2202022-12-19 Marek Polacek <polacek@redhat.com>
221
222 PR c/98487
223 * c-format.cc (check_function_format): Use get_attribute_name.
224
5fb1e674
GA
2252022-12-16 Qing Zhao <qing.zhao@oracle.com>
226
227 * c.opt (Wstrict-flex-arrays): New option.
228
596dbfff
GA
2292022-12-02 Andrew MacLeod <amacleod@redhat.com>
230
231 * c-attribs.cc (handle_deprecated_attribute): Use type when
232 using TYPE_NAME.
233
b35680ec
GA
2342022-12-02 Jakub Jelinek <jakub@redhat.com>
235
236 PR c++/84469
237 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
238 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
239 to any of the structured binding decls.
240
6eea85a9
GA
2412022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
242 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
243
244 PR driver/107787
245 * c-common.cc (fold_offsetof,
246 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
247 instead of OPT_Warray_bounds.
248
9a1b4f1d
GA
2492022-11-24 Jakub Jelinek <jakub@redhat.com>
250
251 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
252 with a dot.
253
8761284f
GA
2542022-11-23 Andrew Pinski <apinski@marvell.com>
255 Jakub Jelinek <jakub@redhat.com>
256
257 PR c/107127
258 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
259 instead of walk_tree for c_genericize_control_r.
260
2612022-11-23 Jakub Jelinek <jakub@redhat.com>
262
263 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
264 fcontract-role=, fcontract-semantic=): Add RejectNegative.
265 (fcontract-build-level=): Terminate description with dot.
266
fb98ede8
GA
2672022-11-19 Jakub Jelinek <jakub@redhat.com>
268
269 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
270 value from 202207L to 202211L.
271
2722022-11-19 Jeff Chapman II <jchapman@lock3software.com>
273 Andrew Sutton <asutton@lock3software.com>
274 Andrew Marmaduke <amarmaduke@lock3software.com>
275 Michael Lopez <mlopez@lock3software.com>
276 Jason Merrill <jason@redhat.com>
277
278 * c.opt: Add contracts flags.
279 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
280 macros.
281
80909529
GA
2822022-11-16 Marek Polacek <polacek@redhat.com>
283
284 PR c++/106649
285 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
286 C++23.
287 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
288 depending on cxx_dialect.
289 * c.opt (Winvalid-constexpr): New option.
290
2912022-11-16 Jakub Jelinek <jakub@redhat.com>
292
293 * c-common.def (CONCEPT_DECL): New tree, moved here from
294 cp-tree.def.
295 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
296 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
297 attribute on CONCEPT_DECL.
298
cdc34229
GA
2992022-11-15 Lewis Hyatt <lhyatt@gmail.com>
300
301 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
302 than a hard-coded string.
303
83d400bd
GA
3042022-11-15 Jakub Jelinek <jakub@redhat.com>
305
306 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
307 __cpp_multidimensional_subscript macro value to 202211L.
308
3092022-11-15 Patrick Palka <ppalka@redhat.com>
310
311 PR c++/107638
312 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
313 iff SUPPORTS_INIT_PRIORITY.
314
3152022-11-14 Martin Liska <mliska@suse.cz>
316
317 Revert:
318 2022-11-09 Martin Liska <mliska@suse.cz>
319
320 * c-target.def: Port to RST.
321
30d77d49
GA
3222022-11-12 Joseph Myers <joseph@codesourcery.com>
323
324 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
325
5b6ce16a
GA
3262022-11-11 Jonathan Wakely <jwakely@redhat.com>
327
328 PR c/85487
329 * c-pragma.cc (handle_pragma_ignore): New function.
330 (init_pragma): Register region and endregion pragmas.
331
1cdfd0e5
GA
3322022-11-09 Martin Liska <mliska@suse.cz>
333
334 * c-target.def: Port to RST.
335
05788e9b
GA
3362022-11-05 Lewis Hyatt <lhyatt@gmail.com>
337
338 PR preprocessor/55971
339 * c-ppoutput.cc (adjust_for_newlines): Update comment.
340
d29260ce
GA
3412022-11-03 Jason Merrill <jason@redhat.com>
342
343 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
344 -fconcepts-ts before C++20.
345
3055829a
GA
3462022-10-28 Joseph Myers <joseph@codesourcery.com>
347
348 * c-common.cc (def_fn_type): Call build_function_type for
349 zero-argument variable-argument function.
350 (c_common_nodes_and_builtins): Build default_function_type with
351 build_function_type.
352 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
353 option.
354
3552022-10-28 Joseph Myers <joseph@codesourcery.com>
356
357 PR c/61469
358 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
359 New. Moved from cp/cp-tree.h.
360 * c-warn.cc (warnings_for_convert_and_check): Do not consider
361 conversions to enum with underlying type bool to overflow.
362
486a5037
GA
3632022-10-26 Marek Polacek <polacek@redhat.com>
364
365 PR c++/106393
366 * c.opt (Wdangling-reference): New.
367
87f9c4a4
GA
3682022-10-19 Joseph Myers <joseph@codesourcery.com>
369
370 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
371 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
372 and FMT_LEN_wf64.
373 (NOARGUMENTS, NOLENGTHS): Update definitions.
374 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
375 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
376 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
377 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
378 (T_UF64, T2X_UF64): New macros.
379 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
380 and wfN length modifiers.
381 (print_char_table, scan_char_table): Add entries using wN and wfN
382 length modifiers.
383
21de009f
GA
3842022-10-18 Joseph Myers <joseph@codesourcery.com>
385
386 PR c/36113
387 * c-common.cc (c_common_type_for_size): Add fallback to
388 widest_unsigned_literal_type_node or
389 widest_integer_literal_type_node for precision that may not
390 exactly match the precision of those types.
391
baeec7cc
GA
3922022-10-14 Jakub Jelinek <jakub@redhat.com>
393
394 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
395 predefine __BFLT16_*__ macros and for C++23 also
396 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
397 macros for -fbuilding-libgcc.
398 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
399
4002022-10-14 Jakub Jelinek <jakub@redhat.com>
401
402 PR middle-end/323
403 PR c++/107097
404 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
405 the tree being specific to C/ObjC.
406 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
407 in C++ the same as in C.
408 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
409 even for C++.
410
621a911d
GA
4112022-10-13 Joseph Myers <joseph@codesourcery.com>
412
413 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
414 value 2 for *_IS_IEC_60559.
415
781f477a
GA
4162022-10-12 Lewis Hyatt <lhyatt@gmail.com>
417
418 PR preprocessor/60014
419 PR preprocessor/60723
420 * c-ppoutput.cc (class token_streamer): Remove member
421 line_marker_emitted to...
422 (token_streamer::stream): ...a local variable here. Set
423 print.prev_was_system_token on all code paths.
424
27bfe54e
GA
4252022-10-10 Nathan Sidwell <nathan@acm.org>
426
427 * c-opts.cc (c_common_post_options): Bump abi to 18.
428
4292022-10-10 Marek Polacek <polacek@redhat.com>
430
431 PR c++/106937
432 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
433 attributes here.
434 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
435 attributes here.
436 (pp_c_attributes): Remove.
437 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
438 get_attribute_name. Don't print a trailing space when printing the
439 [[]] form.
440 * c-pretty-print.h (pp_c_attributes): Remove.
441
9ff6c33e
GA
4422022-10-07 Qing Zhao <qing.zhao@oracle.com>
443
444 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
445 (c_common_attribute_table): New item for strict_flex_array.
446 * c.opt: (fstrict-flex-arrays): New option.
447 (fstrict-flex-arrays=): New option.
448
4492022-10-07 Martin Liska <mliska@suse.cz>
450
451 * name-hint.h: Use std::move.
452
4532022-10-07 Jakub Jelinek <jakub@redhat.com>
454
455 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
456 only in gnu namespace or as standard attribute, treat fallthrough
457 attributes in other namespaces like any other unknown attribute.
458
629d04d3
GA
4592022-10-06 Joseph Myers <joseph@codesourcery.com>
460
461 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
462 typeof_unqual.
463 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
464 (D_EXT11): New macro. Values of subsequent macros updated.
465
4662022-10-06 Jakub Jelinek <jakub@redhat.com>
467
468 PR c++/106654
469 * c-attribs.cc (handle_assume_attribute): New function.
470 (c_common_attribute_table): Add entry for assume attribute.
471 * c-lex.cc (c_common_has_attribute): Handle
472 __have_cpp_attribute (assume).
473
85872a69
GA
4742022-10-04 Jakub Jelinek <jakub@redhat.com>
475
476 * c-omp.cc (c_omp_directives): Uncomment begin declare target
477 entry.
478
69fd6dcc
GA
4792022-10-03 Patrick Palka <ppalka@redhat.com>
480
481 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
482 RID_IS_SAME_AS.
483
4842022-10-03 Joseph Myers <joseph@codesourcery.com>
485
486 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
487 special-case __*_EPSILON__ setting for IBM long double for C2x.
488
3a221b73
GA
4892022-09-30 Patrick Palka <ppalka@redhat.com>
490
491 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
492 C++ traits.
493 * c-common.h (enum rid): Likewise.
494
bbdcdf5c
GA
4952022-09-29 Joseph Myers <joseph@codesourcery.com>
496
497 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
498 C.
499
5002022-09-29 Patrick Palka <ppalka@redhat.com>
501
502 * c-common.cc (c_common_reswords): Add __remove_cv,
503 __remove_reference and __remove_cvref.
504 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
505 and RID_REMOVE_CVREF.
506
1f16a020
GA
5072022-09-27 Marek Polacek <polacek@redhat.com>
508
509 PR c++/101165
510 PR c++/106882
511 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
512
5132022-09-27 Marek Polacek <polacek@redhat.com>
514
515 * c-format.cc (c_keywords): Drop nothrow.
516
5172022-09-27 Jakub Jelinek <jakub@redhat.com>
518
519 PR c++/106651
520 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
521 __cpp_static_call_operator=202207L for C++23.
522
5232022-09-27 Jakub Jelinek <jakub@redhat.com>
524
525 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
526 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
527 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
528 * c-pragma.cc (omp_pragmas): Add assumes and begin.
529 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
530 (omp_pragmas_simd): Add assume.
531 * c-common.h (c_omp_directives): Declare.
532 * c-omp.cc (omp_directives): Rename to ...
533 (c_omp_directives): ... this. No longer static. Uncomment
534 assume, assumes, begin assumes and end assumes entries.
535 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
536 to PRAGMA_OMP_END.
537 (c_omp_categorize_directive): Adjust for omp_directives to
538 c_omp_directives renaming.
539
5402022-09-27 Jakub Jelinek <jakub@redhat.com>
541
542 PR c++/106652
543 PR c++/85518
544 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
545 _Float{32,64,128}x flags from D_CONLY to 0.
546 (shorten_binary_op): Punt if common_type returns error_mark_node.
547 (shorten_compare): Likewise.
548 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
549 and _Float{32,64,128}x builtin types if available. For C++
550 clear float128t_type_node.
551 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
552 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
553 * c-lex.cc (interpret_float): For q/Q suffixes prefer
554 float128t_type_node over float128_type_node. Allow
555 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
556 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
557 with pedwarn. Don't call excess_precision_type for C++.
558
220c4d8e
GA
5592022-09-26 Marek Polacek <polacek@redhat.com>
560
561 PR c++/106656
562 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
563 for C++20.
564
4afaeaab
GA
5652022-09-23 Marek Polacek <polacek@redhat.com>
566
567 PR c++/106784
568 * c-common.cc (c_common_reswords): Add __is_convertible and
569 __is_nothrow_convertible.
570 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
571 RID_IS_NOTHROW_CONVERTIBLE.
572
279c6715
GA
5732022-09-22 David Malcolm <dmalcolm@redhat.com>
574
575 PR c/106830
576 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
577 values that don't fit in uhwi.
578
d0fc05e8
GA
5792022-09-15 Richard Biener <rguenther@suse.de>
580
581 * c-common.h (build_void_list_node): Remove.
582 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
583 void_list_node.
584
861d1a11
GA
5852022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
586
587 * c-format.cc (convert_format_name_to_system_name): Fix warning.
588
fe2a8ce9
GA
5892022-09-07 Joseph Myers <joseph@codesourcery.com>
590
591 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
592 for alignas, alignof, bool, false, static_assert, thread_local and
593 true.
594
5952022-09-07 Jakub Jelinek <jakub@redhat.com>
596
597 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
598 " in comments" from description.
599 (Wunicode): New option.
600
25aeb922
GA
6012022-09-06 Jakub Jelinek <jakub@redhat.com>
602
603 PR c/106836
604 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
605
83f2f228
GA
6062022-09-03 Jakub Jelinek <jakub@redhat.com>
607
608 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
609 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
610 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
611 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
612
c64b0947
GA
6132022-09-02 David Malcolm <dmalcolm@redhat.com>
614
615 PR c/90885
616 * c-common.h (check_for_xor_used_as_pow): New decl.
617 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
618 * c-warn.cc (check_for_xor_used_as_pow): New.
619 * c.opt (Wxor-used-as-pow): New.
620
bb0a1556
GA
6212022-09-01 Jason Merrill <jason@redhat.com>
622
623 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
624 char8_t.
625 (braced_list_to_string): Check for char-sized elements.
626
6272022-09-01 Jakub Jelinek <jakub@redhat.com>
628
629 PR c++/106655
630 * c.opt (-Winvalid-utf8): New warning.
631 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
632 Set cpp_opts->cpp_input_charset_explicit.
633 (c_common_post_options): If -finput-charset=UTF-8 is explicit
634 in C++23, enable -Winvalid-utf8 by default and if -pedantic
635 or -pedantic-errors, make it a pedwarn.
636
542c60c4
GA
6372022-08-31 Joseph Myers <joseph@codesourcery.com>
638
639 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
640 for LABEL_DECL.
641 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
642 decl_attributes.
643 * c-common.h (do_case, c_add_case_label): Update declarations.
644 * c-lex.cc (c_common_has_attribute): For C, produce a result of
645 201910 for fallthrough and 202106 for maybe_unused.
646
16f542d6
GA
6472022-08-26 Marek Polacek <polacek@redhat.com>
648
649 PR c++/81159
650 * c.opt (Wself-move): New option.
651
6522022-08-26 Jakub Jelinek <jakub@redhat.com>
653
654 * c-common.cc (check_builtin_function_arguments): Handle
655 BUILT_IN_ISSIGNALING.
656
6572022-08-26 Jakub Jelinek <jakub@redhat.com>
658
659 PR c++/106648
660 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
661 __cpp_named_character_escapes to 202207L.
662
5d4389dc
GA
6632022-08-25 Marek Polacek <polacek@redhat.com>
664
665 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
666 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
667 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
668 (struct c_common_resword): Resize the disable member.
669 (D_C2X): Add.
670 (nullptr_node): Define.
671 (nullptr_type_node): Define.
672 (NULLPTR_TYPE_P): Define.
673 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
674 NULLPTR_TYPE.
675 (c_pretty_printer::direct_abstract_declarator): Likewise.
676 (c_pretty_printer::constant): Likewise.
677
47a61e65
GA
6782022-08-16 Tom Honermann <tom@honermann.net>
679
680 PR c++/106423
681 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
682 diagnostics in C++20 and later.
683 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
684
5cd525f0
GA
6852022-08-11 Marek Polacek <polacek@redhat.com>
686
687 PR middle-end/102633
688 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
689 suppress_warning here.
690
5f17badb
GA
6912022-08-08 Tom Honermann <tom@honermann.net>
692
693 PR preprocessor/106426
694 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
695 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
696
6972022-08-08 Tom Honermann <tom@honermann.net>
698
699 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
700 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
701 enabled.
702 * c-opts.cc (c_common_post_options): Set flag_char8_t if
703 targeting C2x.
704
4a7274dd
GA
7052022-07-31 Lewis Hyatt <lhyatt@gmail.com>
706
707 PR c++/66290
708 * c-common.h: Rename global done_lexing to
709 override_libcpp_locations.
710 * c-common.cc (c_cpp_diagnostic): Likewise.
711 * c-opts.cc (c_common_finish): Set override_libcpp_locations
712 (formerly done_lexing) immediately prior to calling cpp_finish ().
713
1e2c5f4c
GA
7142022-07-27 Lewis Hyatt <lhyatt@gmail.com>
715
716 * c-ppoutput.cc (token_streamer::stream): Update input_location
717 prior to streaming each token.
718
0e6fa997
GA
7192022-07-23 Immad Mir <mirimmad@outlook.com>
720
721 * c-attribs.cc: (c_common_attribute_table): add three new attributes
722 namely: fd_arg, fd_arg_read and fd_arg_write.
723 (handle_fd_arg_attribute): New.
724
bdc7b765
GA
7252022-07-15 Marek Polacek <polacek@redhat.com>
726
727 PR c++/104477
728 * c-common.cc (c_common_reswords): Add
729 __reference_constructs_from_temporary and
730 __reference_converts_from_temporary.
731 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
732 RID_REF_CONVERTS_FROM_TEMPORARY.
733
7342022-07-15 Jonathan Wakely <jwakely@redhat.com>
735
736 * c-format.cc (class range_label_for_format_type_mismatch):
737 Adjust to new label_text API.
738
c72d4714
GA
7392022-07-11 Lewis Hyatt <lhyatt@gmail.com>
740
741 PR preprocessor/106252
742 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
743 option argument prior to verifying the option was found.
744
6345c414
GA
7452022-07-07 David Malcolm <dmalcolm@redhat.com>
746
747 * c-format.cc (range_label_for_format_type_mismatch::get_text):
748 Update for removal of label_text::maybe_free in favor of automatic
749 memory management.
750
4bc92c3b
GA
7512022-07-06 Lewis Hyatt <lhyatt@gmail.com>
752
753 PR preprocessor/53920
754 PR c++/53431
755 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
756 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
757 (c_pp_stream_token): Declare.
758 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
759 pragmas to...
760 (should_output_pragmas): ...here. New function.
761 (token_streamer::stream): Support handling early pragmas.
762 (do_line_change): Likewise.
763 (c_pp_stream_token): New function.
764 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
765 (pragma_diagnostic_lex_normal): New function. Moved logic for
766 interpreting GCC diagnostic pragmas here.
767 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
768 directly from libcpp.
769 (handle_pragma_diagnostic): Refactor into helper function...
770 (handle_pragma_diagnostic_impl): ...here. New function.
771 (handle_pragma_diagnostic_early): New function.
772 (handle_pragma_diagnostic_early_pp): New function.
773 (struct pragma_ns_name): Renamed to...
774 (struct pragma_pp_data): ...this. Add new "early_handler" member.
775 (c_register_pragma_1): Support early pragmas in the preprocessor.
776 (c_register_pragma_with_early_handler): New function.
777 (c_register_pragma): Support the new early handlers in struct
778 internal_pragma_handler.
779 (c_register_pragma_with_data): Likewise.
780 (c_register_pragma_with_expansion): Likewise.
781 (c_register_pragma_with_expansion_and_data): Likewise.
782 (c_invoke_early_pragma_handler): New function.
783 (c_pp_invoke_early_pragma_handler): New function.
784 (init_pragma): Add early pragma support for diagnostic pragmas.
785 * c-pragma.h (struct internal_pragma_handler): Add new early handler
786 members.
787 (c_register_pragma_with_early_handler): Declare.
788 (c_invoke_early_pragma_handler): Declare.
789 (c_pp_invoke_early_pragma_handler): Declare.
790
d1f3a3ff
GA
7912022-07-05 Marek Polacek <polacek@redhat.com>
792
793 PR c++/105626
794 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
795 u8 strings.
796
ed974488
GA
7972022-07-01 Marek Polacek <polacek@redhat.com>
798
799 PR c++/106111
800 * c-common.h (enum rid): Update RID_LAST_CXX20.
801
976196b3
GA
8022022-06-30 Jonathan Wakely <jwakely@redhat.com>
803
804 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
805 names.
806
84c2131d
GA
8072022-06-24 Jason Merrill <jason@redhat.com>
808
809 PR c++/87729
810 PR c++/20423
811 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
812
4390e7bf
GA
8132022-06-18 Jakub Jelinek <jakub@redhat.com>
814
815 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
816 Use flag_sanitize_trap & SANITIZE_??? instead of
817 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
818 and flag_sanitize_trap differs for them, emit __builtin_trap only
819 for the comparison where trap is requested.
820 (ubsan_instrument_vla, ubsan_instrument_return): Use
821 lag_sanitize_trap & SANITIZE_??? instead of
822 flag_sanitize_undefined_trap_on_error.
823
c3642271
GA
8242022-06-13 Jason Merrill <jason@redhat.com>
825
826 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
827
d9176e64
GA
8282022-05-27 Marek Polacek <polacek@redhat.com>
829
830 PR c/90658
831 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
832
8332022-05-27 Jakub Jelinek <jakub@redhat.com>
834
835 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
836
57f2ce6a
GA
8372022-05-20 David Malcolm <dmalcolm@redhat.com>
838
839 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
840 and "override".
841 * c-pretty-print.h: Likewise.
842
1cda629f
GA
8432022-05-18 Marek Polacek <polacek@redhat.com>
844
845 PR c/105131
846 * c.opt (Wenum-int-mismatch): New.
847
8482022-05-18 Marek Polacek <polacek@redhat.com>
849
850 PR c++/105497
851 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
852 enumerator when it was marked with attribute unused.
853
8542022-05-18 Eric Botcazou <ebotcazou@adacore.com>
855
856 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
857 floating-point complex types.
858 <POINTER_TYPE>: Do not use limited_with clause if the designated
859 type is a scalar type.
860
3d9439b1
GA
8612022-05-17 Jakub Jelinek <jakub@redhat.com>
862
863 * c-omp.cc (c_finish_omp_depobj): Handle
864 OMP_CLAUSE_DEPEND_INOUTSET.
865
702bd11f
GA
8662022-05-16 Jason Merrill <jason@redhat.com>
867
868 PR c/105492
869 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
870 here.
871
8722022-05-16 Martin Liska <mliska@suse.cz>
873
874 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
875 (c_common_nodes_and_builtins): Likewise.
876 * c-format.cc (check_tokens): Likewise.
877 (check_plain): Likewise.
878 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
879 (init_pragma): Likewise.
880 * known-headers.cc (get_string_macro_hint): Likewise.
881 (get_stdlib_header_for_name): Likewise.
882 * c-attribs.cc: Likewise.
883
9df4ffe4
GA
8842022-05-13 Richard Biener <rguenther@suse.de>
885
886 * c-omp.cc: Remove gimple-fold.h include.
887
49ace834
GA
8882022-05-12 Jakub Jelinek <jakub@redhat.com>
889
890 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
891 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
892 if null_pointer_node.
893
d0d513b5
GA
8942022-05-11 Martin Liska <mliska@suse.cz>
895
896 PR target/105355
897 * c-opts.cc (c_common_handle_option): Change option name.
898 * c.opt: Remove Joined and use Separate option.
899
bd022ff9
GA
9002022-05-09 Alex Coplan <alex.coplan@arm.com>
901
902 * c-common.h (get_dump_info): Delete.
903 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
904 from the global dump_manager instead of the (now obsolete)
905 get_dump_info.
906 * c-opts.cc (original_dump_file): Delete.
907 (original_dump_flags): Delete.
908 (c_common_parse_file): Switch to using global dump_manager to
909 manage the original dump file; fix leak of dump file.
910 (get_dump_info): Delete.
911
a1947c92
GA
9122022-05-07 Marek Polacek <polacek@redhat.com>
913
914 PR c++/101833
915 PR c++/47634
916 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
917 with FN being either a function declaration or function type. Use
918 maybe_adjust_arg_pos_for_attribute.
919 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
920 check_function_format.
921 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
922 (positional_argument): Adjust.
923 * c-format.cc (get_constant): Rename to ...
924 (validate_constant): ... this. Take EXPR by reference. Return bool
925 instead of tree.
926 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
927 return value of validate_constant.
928 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
929 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
930 (check_function_format): Adjust a parameter name.
931 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
932
3e7db517
GA
9332022-05-04 Marek Polacek <polacek@redhat.com>
934
935 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
936 char to int.
937
95874f95
GA
9382022-04-30 Jason Merrill <jason@redhat.com>
939
940 PR c/100545
941 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
942 and typedef.
943 * c-common.cc (set_underlying_type): Add assert.
944
01ad093b
GA
9452022-04-26 Patrick Palka <ppalka@redhat.com>
946
947 PR c++/105304
948 * c-common.cc (verify_tree) [restart]: Move up to before the
949 NULL test.
950
da066c42
GA
9512022-04-11 Jakub Jelinek <jakub@redhat.com>
952
953 PR c++/105186
954 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
955 and __int%d__ builtin types, initialize corresponding ridpointers
956 entry.
957
150ab50f
GA
9582022-03-30 Marek Polacek <polacek@redhat.com>
959
960 PR c++/101030
961 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
962 conversion_warning when OP1 is null.
963
9642022-03-30 Thomas Schwinge <thomas@codesourcery.com>
965
966 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
967 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
968 option properties.
969
9702022-03-30 Thomas Schwinge <thomas@codesourcery.com>
971
972 * c.opt (Wuse-after-free): Remove.
973
9742022-03-30 Thomas Schwinge <thomas@codesourcery.com>
975
976 * c.opt (Warray-bounds): Remove.
977
d2906412
GA
9782022-03-26 Thomas Schwinge <thomas@codesourcery.com>
979
980 * c.opt: Properly quote comment.
981
31e989a2
GA
9822022-03-25 Eric Botcazou <ebotcazou@adacore.com>
983
984 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
985 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
986 the referenced type instead. Deal with the anonymous original type
987 of a typedef'ed type. In the actual access case, follow the chain
988 of external subtypes.
989 <TYPE_DECL>: Tidy up control flow.
990
d156bb87
GA
9912022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
992
993 * c-ada-spec.cc: Change array length
994
d7f00da1
GA
9952022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
996
997 * c-common.cc (c_family_tests): Call the new tests.
998 * c-common.h (c_diagnostic_tests): Declare.
999 (c_opt_problem_cc_tests): Likewise.
1000
10012022-03-19 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR c++/101515
1004 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1005 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1006 be printed.
1007
9fc8f278
GA
10082022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1009 Roger Sayle <roger@nextmovesoftware.com>
1010
1011 PR c/98198
1012 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1013
10142022-03-16 Patrick Palka <ppalka@redhat.com>
1015
1016 PR c++/96780
1017 * c.opt: Add -ffold-simple-inlines.
1018
b9756c08
GA
10192022-03-13 Tobias Burnus <tobias@codesourcery.com>
1020
1021 * c-target.def (check_string_object_format_arg): Fix description typo.
1022
57eeedda
GA
10232022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1024
1025 PR other/65095
1026 * c-common.h (c_omp_map_clause_name): Remove.
1027 * c-omp.cc (c_omp_map_clause_name): Remove.
1028
8cc4f9cd
GA
10292022-03-09 Jakub Jelinek <jakub@redhat.com>
1030
1031 PR c/104711
1032 * c-opts.cc (c_common_post_options): Don't enable
1033 -Wshift-negative-value from -Wextra for C++20 or later.
1034 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1035 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1036 instead of TYPE_UNSIGNED.
1037
e6533e2e
GA
10382022-03-07 Jakub Jelinek <jakub@redhat.com>
1039
1040 * c-attribs.cc: Fix up duplicated word issue in a comment.
1041
12d4552e
GA
10422022-03-01 Martin Liska <mliska@suse.cz>
1043
1044 PR ipa/104533
1045 * c-attribs.cc (handle_target_clones_attribute): Use
1046 get_target_clone_attr_len and report warning soon.
1047
0bdb0498
GA
10482022-02-17 Jonathan Wakely <jwakely@redhat.com>
1049
1050 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1051 (handle_pragma_weak): Likewise.
1052 (handle_pragma_scalar_storage_order): Likewise.
1053 (handle_pragma_redefine_extname): Likewise.
1054 (handle_pragma_visibility): Likewise.
1055 (handle_pragma_diagnostic): Likewise.
1056 (handle_pragma_target): Likewise.
1057 (handle_pragma_optimize): Likewise.
1058 (handle_pragma_push_options): Likewise.
1059 (handle_pragma_pop_options): Likewise.
1060 (handle_pragma_reset_options): Likewise.
1061 (handle_pragma_message): Likewise.
1062 (handle_pragma_float_const_decimal64): Likewise.
1063
cb3afcd2
GA
10642022-02-16 Jakub Jelinek <jakub@redhat.com>
1065
1066 PR c/104531
1067 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1068 build_binary_op with LT_EXPR and only if that doesn't return
1069 error_mark_node call build_modify_expr.
1070
10712022-02-16 Jakub Jelinek <jakub@redhat.com>
1072
1073 PR c/104510
1074 * c-common.cc (shorten_compare): Convert original arguments to
1075 the original *restype_ptr when mixing binary and decimal float.
1076
1f8a09d2
GA
10772022-02-14 Richard Biener <rguenther@suse.de>
1078
1079 PR c/104505
1080 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1081 internal function calls.
1082
e8d68f0a
GA
10832022-02-11 Richard Biener <rguenther@suse.de>
1084
1085 * c-attribs.cc (c_common_attribute_table): Add entry for
1086 vector_mask.
1087 (handle_vector_mask_attribute): New.
1088
a645583d
GA
10892022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1090
1091 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1092 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1093 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1094
3adf509f
GA
10952022-02-09 Jason Merrill <jason@redhat.com>
1096
1097 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1098 of __cpp_constexpr and __cpp_concepts for C++20.
1099
bb99171b
GA
11002022-01-24 Marek Polacek <polacek@redhat.com>
1101
1102 PR preprocessor/104030
1103 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1104
9dd44357
GA
11052022-01-21 Jakub Jelinek <jakub@redhat.com>
1106
1107 PR c++/104148
1108 * c-common.h (check_function_arguments_recurse): Add for_format
1109 arg.
1110 * c-common.cc (check_function_nonnull): Pass false to
1111 check_function_arguments_recurse's last argument.
1112 (check_function_arguments_recurse): Add for_format argument,
1113 if true, don't stop on warning_suppressed_p.
1114 * c-format.cc (check_format_info): Pass true to
1115 check_function_arguments_recurse's last argument.
1116
fe1ad141
GA
11172022-01-19 David Malcolm <dmalcolm@redhat.com>
1118
1119 * c-common.cc (c_common_c_tests): Rename to...
1120 (c_common_cc_tests): ...this.
1121 (c_family_tests): Update calls for .c to .cc renaming.
1122 * c-common.h (c_format_c_tests): Rename to...
1123 (c_format_cc_tests): ...this.
1124 (c_indentation_c_tests): Rename to...
1125 (c_indentation_cc_tests): ...this.
1126 (c_pretty_print_c_tests): Rename to...
1127 (c_pretty_print_cc_tests): ...this.
1128 * c-format.cc (c_format_c_tests): Rename to...
1129 (c_format_cc_tests): ...this.
1130 * c-indentation.cc (c_indentation_c_tests): Rename to...
1131 (c_indentation_cc_tests): ...this.
1132 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1133 (c_pretty_print_cc_tests): ...this.
1134
fc829782
GA
11352022-01-17 Martin Liska <mliska@suse.cz>
1136
1137 * c-ada-spec.cc: Rename .c names to .cc.
1138 * c-ada-spec.h: Likewise.
1139 * c-common.cc (c_build_vec_convert): Likewise.
1140 (warning_candidate_p): Likewise.
1141 * c-common.h (enum rid): Likewise.
1142 (build_real_imag_expr): Likewise.
1143 (finish_label_address_expr): Likewise.
1144 (c_get_substring_location): Likewise.
1145 (c_build_bind_expr): Likewise.
1146 (conflict_marker_get_final_tok_kind): Likewise.
1147 (c_parse_error): Likewise.
1148 (check_missing_format_attribute): Likewise.
1149 (invalid_array_size_error): Likewise.
1150 (warn_for_multistatement_macros): Likewise.
1151 (build_attr_access_from_parms): Likewise.
1152 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1153 * c-format.cc: Likewise.
1154 * c-gimplify.cc (c_gimplify_expr): Likewise.
1155 * c-indentation.h: Likewise.
1156 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1157 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1158 * c-opts.cc (c_common_post_options): Likewise.
1159 (set_std_cxx23): Likewise.
1160 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1161 * c-pretty-print.h: Likewise.
1162
11632022-01-17 Martin Liska <mliska@suse.cz>
1164
1165 * c-ada-spec.c: Moved to...
1166 * c-ada-spec.cc: ...here.
1167 * c-attribs.c: Moved to...
1168 * c-attribs.cc: ...here.
1169 * c-common.c: Moved to...
1170 * c-common.cc: ...here.
1171 * c-cppbuiltin.c: Moved to...
1172 * c-cppbuiltin.cc: ...here.
1173 * c-dump.c: Moved to...
1174 * c-dump.cc: ...here.
1175 * c-format.c: Moved to...
1176 * c-format.cc: ...here.
1177 * c-gimplify.c: Moved to...
1178 * c-gimplify.cc: ...here.
1179 * c-indentation.c: Moved to...
1180 * c-indentation.cc: ...here.
1181 * c-lex.c: Moved to...
1182 * c-lex.cc: ...here.
1183 * c-omp.c: Moved to...
1184 * c-omp.cc: ...here.
1185 * c-opts.c: Moved to...
1186 * c-opts.cc: ...here.
1187 * c-pch.c: Moved to...
1188 * c-pch.cc: ...here.
1189 * c-ppoutput.c: Moved to...
1190 * c-ppoutput.cc: ...here.
1191 * c-pragma.c: Moved to...
1192 * c-pragma.cc: ...here.
1193 * c-pretty-print.c: Moved to...
1194 * c-pretty-print.cc: ...here.
1195 * c-semantics.c: Moved to...
1196 * c-semantics.cc: ...here.
1197 * c-ubsan.c: Moved to...
1198 * c-ubsan.cc: ...here.
1199 * c-warn.c: Moved to...
1200 * c-warn.cc: ...here.
1201 * cppspec.c: Moved to...
1202 * cppspec.cc: ...here.
1203 * stub-objc.c: Moved to...
1204 * stub-objc.cc: ...here.
1205
9248ee41
GA
12062022-01-15 Martin Sebor <msebor@redhat.com>
1207
1208 PR c/63272
1209 * c.opt (-Wdangling-pointer): New option.
1210
12112022-01-15 Martin Sebor <msebor@redhat.com>
1212
1213 PR tree-optimization/80532
1214 * c.opt (-Wuse-after-free): New options.
1215
617db51d
GA
12162022-01-14 David Malcolm <dmalcolm@redhat.com>
1217
1218 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1219 (handle_tainted_args_attribute): New.
1220
ad3f0d08
GA
12212022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1222 Jason Merrill <jason@redhat.com>
1223
1224 PR c++/70417
1225 * c.opt: Added -Wmissing-template-keyword.
1226
12272022-01-13 Richard Biener <rguenther@suse.de>
1228
1229 PR c/104002
1230 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1231
02a8a01b
GA
12322022-01-12 Martin Liska <mliska@suse.cz>
1233
1234 PR target/103804
1235 * c-attribs.c (handle_optimize_attribute): Do not call
1236 cl_optimization_compare if we seen an error.
1237
01a254e3
GA
12382022-01-11 Jakub Jelinek <jakub@redhat.com>
1239
1240 PR c/101537
1241 PR c/103881
1242 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1243 and BIT_XOR_EXPR.
1244
d9450aa0
GA
12452022-01-10 Richard Biener <rguenther@suse.de>
1246
1247 PR middle-end/101530
1248 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1249 in a TARGET_EXPR to force a temporary.
1250
11ce8d04
GA
12512022-01-06 Marek Polacek <polacek@redhat.com>
1252
1253 PR c++/103758
1254 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1255 diagnostic messages.
1256 (handle_pragma_diagnostic): Likewise.
1257
a4ae8c37
GA
12582022-01-03 Marek Polacek <polacek@redhat.com>
1259
1260 PR c++/103758
1261 * c-format.c (check_tokens): Accept "decl-specifier*".
1262
12632022-01-03 Jakub Jelinek <jakub@redhat.com>
1264
1265 PR c++/103600
1266 * c-attribs.c (handle_non_overlapping_attribute): New function.
1267 (c_common_attribute_table): Add "non overlapping" attribute.
1268
84790a9d
GA
12692021-12-30 Jakub Jelinek <jakub@redhat.com>
1270
1271 PR c++/103012
1272 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1273 cpp_define_unused/cpp_undef calls with forced token locations
1274 BUILTINS_LOCATION.
1275
d1e111da
GA
12762021-12-27 Patrick Palka <ppalka@redhat.com>
1277
1278 PR c++/103700
1279 * c-common.c (pointer_int_sum): When quiet, return
1280 error_mark_node for an incomplete pointed-to type and don't
1281 call size_in_bytes_loc.
1282
2554e2da
GA
12832021-12-17 Jason Merrill <jason@redhat.com>
1284
1285 PR c++/103681
1286 * c-opts.c (c_common_post_options): Update defaults.
1287
774269aa
GA
12882021-12-16 Martin Liska <mliska@suse.cz>
1289
1290 PR target/103709
1291 * c-pragma.c (handle_pragma_pop_options): Do not check
1292 global options modification when an error is seen in parsing
1293 of options (pragmas or attributes).
1294
c8dcf64b
GA
12952021-12-12 Jonathan Wakely <jwakely@redhat.com>
1296
1297 * known-headers.cc: Define INCLUDE_MEMORY instead of
1298 INCLUDE_UNIQUE_PTR.
1299 * name-hint.h: Likewise.
1300 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1301
4b4839e3
GA
13022021-12-09 Jakub Jelinek <jakub@redhat.com>
1303
1304 PR pch/71934
1305 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1306 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1307
03a9bd05
GA
13082021-12-03 Jakub Jelinek <jakub@redhat.com>
1309
1310 PR pch/71934
1311 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1312 (pch_init): Don't initialize v.pch_init.
1313 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1314
40fa651e
GA
13152021-12-01 Jason Merrill <jason@redhat.com>
1316
1317 PR c++/103310
1318 * c.opt: Add -fconstexpr-fp-except.
1319
87cd82c8
GA
13202021-11-29 Richard Biener <rguenther@suse.de>
1321
1322 * c-format.c (check_format_string): Remove spurious
1323 gcc_unreachable.
1324
13252021-11-29 Richard Biener <rguenther@suse.de>
1326
1327 * c-opts.c (c_common_post_options): Remove unreachable return.
1328 * c-pragma.c (handle_pragma_target): Likewise.
1329 (handle_pragma_optimize): Likewise.
1330
091ccc06
GA
13312021-11-25 Jakub Jelinek <jakub@redhat.com>
1332
1333 PR c++/102611
1334 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1335 default for C++23 regardless of warn_deprecated.
1336 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1337 __cpp_multidimensional_subscript=202110L for C++23.
1338
e1d43592
GA
13392021-11-23 Martin Sebor <msebor@redhat.com>
1340
1341 PR middle-end/88232
1342 * c.opt: Add -Winfinite-recursion.
1343
9c077398
GA
13442021-11-19 Martin Sebor <msebor@redhat.com>
1345
1346 PR c++/33925
1347 PR c/102867
1348 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1349 and improve handling tof defined symbols.
1350
13512021-11-19 Martin Liska <mliska@suse.cz>
1352
1353 Revert:
1354 2021-11-18 Martin Liska <mliska@suse.cz>
1355
1356 * c-gimplify.c (genericize_c_loop): Use option directly.
1357
483092d3
GA
13582021-11-18 Matthias Kretz <m.kretz@gsi.de>
1359
1360 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1361 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1362
13632021-11-18 Martin Liska <mliska@suse.cz>
1364
1365 * c-gimplify.c (genericize_c_loop): Use option directly.
1366
280d2838
GA
13672021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1368
1369 PR c/91038
1370 PR c/29970
1371 * c-common.c (pointer_int_sum): Make sure pointer expressions
1372 are evaluated first when the size expression depends on for
1373 variably-modified types.
1374
13752021-11-17 Marek Polacek <polacek@redhat.com>
1376
1377 PR preprocessor/103026
1378 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1379
6b1695f4
GA
13802021-11-16 Jason Merrill <jason@redhat.com>
1381
1382 * c-common.c (release_tree_vector): Only cache vecs smaller than
1383 16 elements.
1384
e2b57363
GA
13852021-11-15 Jason Merrill <jason@redhat.com>
1386
1387 * c.opt: Add -fimplicit-constexpr.
1388 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1389 * c-opts.c (c_common_post_options): Disable below C++14.
1390
13912021-11-15 Jakub Jelinek <jakub@redhat.com>
1392
1393 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1394 Duplicate to both OMP_TARGET and OMP_TEAMS.
1395
8d36a0d2
GA
13962021-11-10 Marek Polacek <polacek@redhat.com>
1397
1398 PR c++/101940
1399 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1400 ignored_attributes.
1401
c9b1334e
GA
14022021-11-09 David Malcolm <dmalcolm@redhat.com>
1403
1404 * c-pragma.c (GCC_BAD_AT): New macro.
1405 (GCC_BAD2_AT): New macro.
1406 (handle_pragma_pack): Use the location of the pertinent token when
1407 issuing diagnostics about invalid constants/actions, and trailing
1408 junk.
1409 (handle_pragma_target): Likewise for non-string "GCC option".
1410 (handle_pragma_message): Likewise for trailing junk.
1411
18ae471f
GA
14122021-11-03 Joseph Myers <joseph@codesourcery.com>
1413
1414 PR c/103031
1415 * c-common.c (convert_and_check): Add argument init_const. Call
1416 convert_init if init_const.
1417 * c-common.h (convert_and_check): Update prototype.
1418 (convert_init): New prototype.
1419
cf82e8d9
GA
14202021-11-01 David Malcolm <dmalcolm@redhat.com>
1421
1422 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1423 CPP_OTHER tokens, set the "escape on output" flag.
1424
04a2cf3f
GA
14252021-10-27 Jakub Jelinek <jakub@redhat.com>
1426
1427 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1428 POINTER_PLUS_EXPR.
1429 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1430 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1431
14322021-10-27 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR c++/102854
1435 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1436 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1437 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1438 conversions temporarily clear the 3rd bit from d->kind while walking
1439 subtrees.
1440 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1441 if possibly non-rectangular.
1442
ae5c5406
GA
14432021-10-21 Jakub Jelinek <jakub@redhat.com>
1444
1445 PR middle-end/64888
1446 * c-omp.c (c_omp_predefined_variable): Return true also for
1447 ubsan_create_data created artificial variables.
1448
5d5885c9
GA
14492021-10-14 Joseph Myers <joseph@codesourcery.com>
1450
1451 * c-format.c (printf_length_specs, scanf_length_specs)
1452 (print_char_table, scan_char_table): Support DFP formats for C2X.
1453 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1454 (T2X_D32, T2X_D64, T2X_D128): New macros.
1455
14562021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1457
1458 * c-omp.c (c_omp_check_context_selector): Rename to
1459 omp_check_context_selector and move to omp-general.c.
1460 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1461 move to omp-general.c.
1462
52055987
GA
14632021-10-12 Joseph Myers <joseph@codesourcery.com>
1464
1465 * c-format.c (print_char_table): Add %b and %B formats.
1466 (scan_char_table): Add %b format.
1467 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1468 (T2X_UPD, T2X_UIM): New macros.
1469
14702021-10-12 Jakub Jelinek <jakub@redhat.com>
1471
1472 * c-omp.c (c_finish_omp_atomic): Use
1473 clear_padding_type_may_have_padding_p.
1474
ce6eec39
GA
14752021-10-08 Martin Liska <mliska@suse.cz>
1476
1477 * c-opts.c (c_common_post_options): Use new macro
1478 OPTION_SET_P.
1479
50e20ee6
GA
14802021-10-07 Martin Liska <mliska@suse.cz>
1481
1482 * c-common.c (parse_optimize_options): Make
1483 save_opt_decoded_options a pointer type.
1484
57c7ec62
GA
14852021-10-06 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR tree-optimization/102571
1488 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1489 padding, but the non-padding bits are contiguous set of bytes
1490 by adjusting the memcmp call arguments instead of emitting
1491 __builtin_clear_padding and then comparing all the type's bytes.
1492
14932021-10-06 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c++/102612
1496 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1497 __cpp_constexpr to 202110L rather than 201907L.
1498
da9c5f78
GA
14992021-10-04 Marek Polacek <polacek@redhat.com>
1500
1501 PR c++/97573
1502 * c-common.h (do_warn_array_compare): Declare.
1503 * c-warn.c (do_warn_array_compare): New.
1504 * c.opt (Warray-compare): New option.
1505
e3e07b89
GA
15062021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1507
1508 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1509 NULL, this is not needed.
1510
9d116bcc
GA
15112021-10-01 Martin Sebor <msebor@redhat.com>
1512
1513 PR c/102103
1514 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1515 Check and perform warning suppression.
1516 (c_common_truthvalue_conversion): Enhance warning suppression.
1517
15182021-10-01 Martin Liska <mliska@suse.cz>
1519
1520 PR target/102552
1521 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1522 used for program name, so merged_decoded_options should also
1523 respect that.
9d116bcc
GA
1524
15252021-10-01 Jakub Jelinek <jakub@redhat.com>
1526 Richard Biener <rguenther@suse.de>
1527
1528 PR sanitizer/102515
1529 * c-ubsan.c (ubsan_instrument_division): Check the right
1530 flag_sanitize_recover bit, depending on which sanitization
1531 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1532 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1533 and SANITIZE_DIVIDE is enabled, neither check is known
1534 to be false and flag_sanitize_recover bits for those two
1535 aren't the same, emit both __ubsan_handle_divrem_overflow
1536 and __ubsan_handle_divrem_overflow_abort calls.
1537
15382021-10-01 Martin Liska <mliska@suse.cz>
1539
1540 * c-common.c (parse_optimize_options): Combine optimize
1541 options with what was provided on the command line.
1542
15432021-10-01 Jakub Jelinek <jakub@redhat.com>
1544
1545 * c-omp.c (c_omp_split_clauses): Also copy
1546 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1547
cf966403
GA
15482021-09-27 Martin Liska <mliska@suse.cz>
1549
1550 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1551 x_flag_default_complex_method.
cf966403 1552
e4777439
GA
15532021-09-22 Jakub Jelinek <jakub@redhat.com>
1554
1555 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1556
62498024
GA
15572021-09-20 Matthias Kretz <m.kretz@gsi.de>
1558
1559 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1560 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1561 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1562 __ROUNDING_MATH__ according to the new optimization flags.
1563
cf74e7b5
GA
15642021-09-18 Jakub Jelinek <jakub@redhat.com>
1565
1566 * c-omp.c (c_omp_split_clauses): Split order clause also to
1567 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1568
0a4cb439
GA
15692021-09-17 Jakub Jelinek <jakub@redhat.com>
1570
1571 * c-omp.c (c_finish_omp_atomic): Avoid creating
1572 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1573 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1574 had NULL initializer. When omitting operands after v = x,
1575 use type of v rather than type of x. Fix type of vtmp
1576 TARGET_EXPR.
1577
07985c47
GA
15782021-09-13 Jason Merrill <jason@redhat.com>
1579
1580 * c.opt: Add -Winterference-size.
1581 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1582 and __GCC_CONSTRUCTIVE_SIZE.
1583
a26206ec
GA
15842021-09-10 Jakub Jelinek <jakub@redhat.com>
1585
1586 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1587 * c-omp.c: Include gimple-fold.h.
1588 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1589 OpenMP 5.1 atomics.
1590
f84e2f0b
GA
15912021-09-09 qing zhao <qing.zhao@oracle.com>
1592
1593 * c-attribs.c (handle_uninitialized_attribute): New function.
1594 (c_common_attribute_table): Add "uninitialized" attribute.
1595
b6db7cd4
GA
15962021-09-08 liuhongt <hongtao.liu@intel.com>
1597
1598 * c-common.c (excess_precision_mode_join): Update below comments.
1599 (c_ts18661_flt_eval_method): Set excess_precision_type to
1600 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1601 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1602 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1603 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1604
b2748138
GA
16052021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1606
1607 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1608
7b739540
GA
16092021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1610
1611 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1612 and -gnatwu warning for the package specification.
1613
e11c6046
GA
16142021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1615
1616 * c-attribs.c (handle_unavailable_attribute): New.
1617
1e2f030b
GA
16182021-08-30 Jason Merrill <jason@redhat.com>
1619
1620 * c.opt: Add -Wmissing-requires.
1621
85d77ac4
GA
16222021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1623
1624 PR other/93067
1625 * c-opts.c (c_common_input_charset_cb): New function.
1626 (c_common_post_options): Call new function
1627 diagnostic_initialize_input_context().
1628
7c9e1645
GA
16292021-08-20 Tobias Burnus <tobias@codesourcery.com>
1630
1631 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1632 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1633 "di" and "u", respecitively; fill with BADLEN to match
1634 size of 'types'.
1635 (get_init_dynamic_hwi): Split off from ...
1636 (init_dynamic_diag_info): ... here. Call it.
1637 (init_dynamic_gfc_info): Call it.
1638
16392021-08-20 Jakub Jelinek <jakub@redhat.com>
1640
1641 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1642 * c-pragma.c (omp_pragmas): Add error directive.
1643 * c-omp.c (omp_directives): Uncomment error directive entry.
1644
6e529985
GA
16452021-08-18 Jakub Jelinek <jakub@redhat.com>
1646
1647 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1648 * c-pragma.c (omp_pragmas): Add nothing directive.
1649 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1650
2d14d64b
GA
16512021-08-17 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR c++/101539
1654 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1655 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1656
16572021-08-17 Matt Jacobson <mhjacobson@me.com>
1658
1659 * c-opts.c (c_common_post_options): Default to
1660 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1661
16622021-08-17 Jakub Jelinek <jakub@redhat.com>
1663
1664 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1665 * c-pragma.c (omp_pragmas): Add scope construct.
1666 * c-omp.c (omp_directives): Uncomment scope directive entry.
1667
9d1d9fc8
GA
16682021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1669
1670 * c-cppbuiltin.c (c_cpp_builtins): Define
1671 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1672
72be20e2
GA
16732021-08-12 Jakub Jelinek <jakub@redhat.com>
1674
1675 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1676 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1677 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1678 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1679 enumerator.
1680 (c_finish_omp_masked): Declare.
1681 * c-omp.c (c_finish_omp_masked): New function.
1682 (c_omp_split_clauses): Handle combined masked constructs.
1683
4d17ca1b
GA
16842021-07-30 Jakub Jelinek <jakub@redhat.com>
1685
1686 PR c++/101539
1687 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1688 * c-common.c (c_common_reswords): Add
1689 __is_pointer_interconvertible_base_of.
1690
16912021-07-29 Richard Biener <rguenther@suse.de>
1692
1693 PR c/101512
1694 * c-common.c (c_common_mark_addressable_vec): Look through
1695 C_MAYBE_CONST_EXPR even if not at the toplevel.
1696
af3f12e6
GA
16972021-07-27 Martin Sebor <msebor@redhat.com>
1698
1699 PR c/101585
1700 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1701
ead235f6
GA
17022021-07-23 Jakub Jelinek <jakub@redhat.com>
1703
1704 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1705 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1706 and later.
1707
17082021-07-23 Jakub Jelinek <jakub@redhat.com>
1709
1710 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1711 PRAGMA_OMP__LAST_ enumerators.
1712
419c6c68
GA
17132021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1714 Joseph Myers <joseph@codesourcery.com>
1715 Cesar Philippidis <cesar@codesourcery.com>
1716
1717 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1718
92d45509
GA
17192021-07-20 Martin Sebor <msebor@redhat.com>
1720
1721 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1722 by-const-reference.
1723 * c-common.h (c_build_shufflevector): Same.
1724
87277b6a
GA
17252021-07-16 Andrew Pinski <apinski@marvell.com>
1726
1727 PR c/101453
1728 * c-common.c (parse_optimize_options): Use the correct
1729 size for buffer.
1730
d97d71a1
GA
17312021-07-15 Martin Sebor <msebor@redhat.com>
1732
1733 PR c/101289
1734 PR c/97548
1735 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1736
c4fee1c6
GA
17372021-07-14 Jason Merrill <jason@redhat.com>
1738
1739 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1740
6fba0eea
GA
17412021-07-06 Martin Sebor <msebor@redhat.com>
1742
1743 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1744 (gcc_cdiag_char_table): Same.
1745 (gcc_cxxdiag_char_table): Same.
6fba0eea 1746
7a60a6e8
GA
17472021-07-02 Jakub Jelinek <jakub@redhat.com>
1748
1749 * c-common.h (enum c_omp_directive_kind): New enum.
1750 (struct c_omp_directive): New type.
1751 (c_omp_categorize_directive): Declare.
1752 * c-omp.c (omp_directives): New variable.
1753 (c_omp_categorize_directive): New function.
1754
bea7c16a
GA
17552021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1756
1757 * c-ada-spec.c (packed_layout): New global variable.
1758 (dump_ada_declaration): Set it upon seeing a packed record type.
1759 Do not put the "aliased" keyword if it is set.
1760 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1761
17622021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1763
1764 * c-ada-spec.c (check_name): Rename into...
1765 (check_type_name_conflict): ...this. Minor tweak.
1766 (dump_ada_function_declaration): Adjust to above renaming.
1767 (dump_ada_array_domains): Fix oversight.
1768 (dump_ada_declaration): Call check_type_name_conflict for variables.
1769
90708f87
GA
17702021-06-25 Martin Sebor <msebor@redhat.com>
1771
1772 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1773 (c_common_truthvalue_conversion): Replace direct uses of
1774 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1775 copy_no_warning.
1776 (check_function_arguments_recurse): Same.
1777 * c-gimplify.c (c_gimplify_expr): Same.
1778 * c-warn.c (overflow_warning): Same.
1779 (warn_logical_operator): Same.
1780 (warn_if_unused_value): Same.
1781 (do_warn_unused_parameter): Same.
1782
9aa8327e
GA
17832021-06-24 Jakub Jelinek <jakub@redhat.com>
1784
1785 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1786 C_ORT_OMP_TARGET.
1787 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1788 combined target constructs also add map (always, tofrom:) clause.
1789
ede6c356
GA
17902021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1791
1792 * c-attribs.c (common_handle_aligned_attribute): Remove short
1793 circuit and dead code.
1794
8dc48181
GA
17952021-06-14 Jonathan Wakely <jwakely@redhat.com>
1796
1797 PR c++/101052
1798 * known-headers.cc (get_stdlib_header_for_name): Add known
1799 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1800 exit, and getenv.
1801
8b8c3912
GA
18022021-06-12 Jason Merrill <jason@redhat.com>
1803
1804 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1805
f16f65f8
GA
18062021-06-11 Jakub Jelinek <jakub@redhat.com>
1807
1808 PR c++/100974
1809 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1810 -std=c++2b for P1938R3 consteval if support.
1811
4f625f47
GA
18122021-06-09 Jason Merrill <jason@redhat.com>
1813
1814 PR c++/100879
1815 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1816 warning.
1817
438aac59
GA
18182021-06-07 Martin Liska <mliska@suse.cz>
1819
1820 * c-target.def: Split long lines and replace them
1821 with '\n\'.
1822
600f90cb
GA
18232021-06-04 Martin Sebor <msebor@redhat.com>
1824
1825 PR c/100783
1826 * c-attribs.c (positional_argument): Bail on erroneous types.
1827
18282021-06-04 Martin Sebor <msebor@redhat.com>
1829
1830 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1831 for element presence.
1832
440c8a0a
GA
18332021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1834
1835 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1836 (dump_ada_decl_name): Likewise.
1837 (dump_anonymous_type_name): Remove parent parameter and adjust.
1838 (dump_sloc): Minor tweak.
1839 (dump_ada_array_type): Remove type parameter and adjust.
1840 (dump_ada_enum_type): Remove parent parameter and adjust.
1841 (dump_ada_node): Adjust calls to above functions.
1842 (dumped_anonymous_types): New global variable.
1843 (dump_nested_types_1): Rename into...
1844 (dump_nested_types): ...this.
1845 (dump_nested_type): Remove parent and dumped_types parameters.
1846 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1847 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1848 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1849
18502021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1851
1852 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1853 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1854
18552021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1856
1857 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1858 (htable_t): New typedef.
1859 (overloaded_names): Use it.
1860 (add_name): New function.
1861 (init_overloaded_names): Use add_name to populate the table and add
1862 special cases for sigaction and stat.
1863 (overloaded_name_p): Rename into...
1864 (overloading_index): ...this. Do not initialize overloaded_names table
1865 here. Return the index or zero.
1866 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1867 but add an overloading suffix instead.
1868 (dump_ada_specs): Initialize overloaded_names tables here.
1869
b75978d1
GA
18702021-06-01 Martin Liska <mliska@suse.cz>
1871
1872 PR other/100759
1873 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1874 to a situation where we are not in processing of an optimize
1875 pragma.
1876 * c-pragma.c (handle_pragma_pop_options): Restore target
1877 options.
1878
ee682192
GA
18792021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1880
1881 PR testsuite/100749
1882 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1883
18842021-05-31 Richard Biener <rguenther@suse.de>
1885
1886 PR c++/88601
1887 * c-common.c: Include tree-vector-builder.h and
1888 vec-perm-indices.h.
1889 (c_common_reswords): Add __builtin_shufflevector.
1890 (c_build_shufflevector): New funtion.
1891 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1892 (c_build_shufflevector): Declare.
1893
48166757
GA
18942021-05-28 Jakub Jelinek <jakub@redhat.com>
1895
1896 PR middle-end/99928
1897 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1898 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1899
19002021-05-28 Tobias Burnus <tobias@codesourcery.com>
1901
1902 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1903
2bc6dace
GA
19042021-05-25 Martin Liska <mliska@suse.cz>
1905
1906 PR tree-optimization/92860
1907 PR target/99592
1908 * c-attribs.c (handle_optimize_attribute): Save target node
1909 before calling parse_optimize_options and save it in case
1910 it changes.
1911 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1912 (handle_pragma_pop_options): Likewise here.
1913
19142021-05-25 Martin Liska <mliska@suse.cz>
1915
1916 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1917
19182021-05-25 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR middle-end/99928
1921 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1922 combined with simd and not with taskloop or for.
1923
2832d51b
GA
19242021-05-21 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR middle-end/99928
1927 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1928 on firstprivate clause copy going to target construct, and for
1929 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1930
ea34e2ed
GA
19312021-05-20 Jonathan Wakely <jwakely@redhat.com>
1932
1933 * c.opt (Wc++11-extensions, Wc++14-extensions)
1934 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1935 options.
1936
19372021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1938
1939 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1940
19412021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1942
1943 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1944 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1945 (pch_init): Renamed member.
1946 (c_common_valid_pch): Adjust access to debug_type_names.
1947
65f32e5d
GA
19482021-05-19 Martin Sebor <msebor@redhat.com>
1949
1950 PR c/100619
1951 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1952 bounds.
1953
a8daf9a1
GA
19542021-05-18 Richard Biener <rguenther@suse.de>
1955
1956 PR c/100547
1957 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1958 Reword existing nunit diagnostic.
1959
a7ffc1ef
GA
19602021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1961
1962 * c-common.c (braced_list_to_string): Return CTOR unchanged
1963 if host and target character sizes don't match.
1964
87a7d10c
GA
19652021-05-14 Martin Liska <mliska@suse.cz>
1966
1967 * c.opt: Add Warning keyword for 2 options.
1968
f9af11c7
GA
19692021-05-13 Martin Liska <mliska@suse.cz>
1970
1971 PR middle-end/100504
1972 * c-attribs.c (handle_target_clones_attribute): Expect a string
1973 argument to target_clone argument.
1974
037e3661
GA
19752021-05-11 Joseph Myers <joseph@codesourcery.com>
1976
1977 * c-lex.c (interpret_float): Handle digit separators for C2X.
1978
aa891c56
GA
19792021-05-10 Martin Liska <mliska@suse.cz>
1980
1981 * c-ada-spec.c (print_destructor): Use startswith
1982 function instead of strncmp.
1983 (dump_ada_declaration): Likewise.
1984 * c-common.c (disable_builtin_function): Likewise.
1985 (def_builtin_1): Likewise.
1986 * c-format.c (check_tokens): Likewise.
1987 (check_plain): Likewise.
1988 (convert_format_name_to_system_name): Likewise.
1989
e4ff4ffb
GA
19902021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1991
1992 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1993 complex divide
1994
c0fa3f2f
GA
19952021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1996 Nathan Sidwell <nathan@codesourcery.com>
1997 Tom de Vries <vries@codesourcery.com>
1998 Julian Brown <julian@codesourcery.com>
1999 Kwok Cheung Yeung <kcy@codesourcery.com>
2000
2001 * c.opt (Wopenacc-parallelism): New.
2002
6e81e015
GA
20032021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2004
2005 * c.opt (fopenacc-kernels=): Remove.
2006
019a9220
GA
20072021-04-08 Jakub Jelinek <jakub@redhat.com>
2008
2009 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2010 occured -> occurred.
2011 (check_alignment_of_packed_member): Fix a comment typo,
2012 memeber -> member.
2013 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2014 and onless -> unless.
2015 (warn_parm_array_mismatch): Fix comment typos, declaratation
2016 -> declaration and woud -> would. Fix up comment indentation.
2017
20182021-04-08 Martin Sebor <msebor@redhat.com>
2019
2020 PR middle-end/99883
2021 * c.opt (Wmismatched-new-delete): Correct spelling.
2022
b1da9916
GA
20232021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2024
2025 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2026 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2027 enumeral types use again the type name for the enumeration constants.
2028 (dump_ada_node): Adjust call to dump_ada_enum_type.
2029 (dump_nested_type): Likewise.
2030
f1607029
GA
20312021-04-01 Jason Merrill <jason@redhat.com>
2032
2033 PR c++/98481
2034 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2035
4493b1c1
GA
20362021-03-25 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR c++/99565
2039 * c-warn.c (do_warn_duplicated_branches): Pass also
2040 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2041
6af7b307
GA
20422021-03-20 Jakub Jelinek <jakub@redhat.com>
2043
2044 PR debug/99230
2045 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2046
ceae9533
GA
20472021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2048
2049 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2050 after entering the separate class package, if any.
2051
67f10d28
GA
20522021-03-04 Richard Biener <rguenther@suse.de>
2053
2054 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2055 Handle ERROR_MARK.
2056
20572021-03-04 Jakub Jelinek <jakub@redhat.com>
2058
2059 PR c/99325
2060 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2061 (token_streamer::stream) Likewise.
2062 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2063 UNKNOWN_LOCATION.
2064
f3641ac7
GA
20652021-03-03 Jakub Jelinek <jakub@redhat.com>
2066
2067 PR c/99324
2068 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2069 instead of mark_addressable. Fix a comment typo -
2070 neutrallly -> neutrally.
2071
2c83c3fb
GA
20722021-02-28 Jakub Jelinek <jakub@redhat.com>
2073
2074 PR c/99304
2075 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2076 message - refernced -> referenced. Remove superfluous space before
2077 closing paren of function calls.
2078
daa68844
GA
20792021-02-25 Nathan Sidwell <nathan@acm.org>
2080
2081 PR c++/99166
2082 * c.opt (-flang-info-module-cmi): Renamed option.
2083
50352c6c
GA
20842021-02-19 Nathan Sidwell <nathan@acm.org>
2085
2086 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2087
bf81237e
GA
20882021-02-18 H.J. Lu <hjl.tools@gmail.com>
2089
2090 PR target/99113
2091 * c-attribs.c (c_common_attribute_table): Add the "retain"
2092 attribute.
2093 (handle_retain_attribute): New function.
2094
0e804ce3
GA
20952021-02-16 Marek Polacek <polacek@redhat.com>
2096
2097 PR c++/99062
2098 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2099 alignment argument is non-negative. Tweak a warning message.
2100
fab095da
GA
21012021-02-12 Martin Sebor <msebor@redhat.com>
2102
2103 PR c/99055
2104 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2105 print_generic_expr_to_str.
2106
4b37c3ea
GA
21072021-02-10 Richard Biener <rguenther@suse.de>
2108
2109 * c-common.c (parse_optimize_options): Free decoded_options.
2110
a19dd5e6
GA
21112021-02-04 emsr <3dw4rd@verizon.net>
2112
2113 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2114
9faaa807
GA
21152021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2116
2117 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2118 * c-lex.c (interpret_integer): Set node type for size literal.
2119
85d04a2e
GA
21202021-01-28 Jakub Jelinek <jakub@redhat.com>
2121
2122 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2123 draft from description.
2124 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2125
e62bb7f0
GA
21262021-01-26 Paul Fee <paul.f.fee@gmail.com>
2127
2128 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2129 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2130 and -std=gnu++2b
2131 * c-opts.c (set_std_cxx23): New.
2132 (c_common_handle_option): Set options when -std=c++23 is enabled.
2133 (c_common_post_options): Adjust comments.
2134 (set_std_cxx20): Likewise.
2135
161e4c08
GA
21362021-01-25 Martin Sebor <msebor@redhat.com>
2137
2138 PR c++/98646
2139 * c-common.c (check_nonnull_arg): Adjust warning text.
2140
4c9bcd5c
GA
21412021-01-17 Martin Sebor <msebor@redhat.com>
2142
2143 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2144 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2145
59cf67d1
GA
21462021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2147
2148 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2149 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2150
2f7f0d32
GA
21512021-01-15 Jakub Jelinek <jakub@redhat.com>
2152
2153 PR tree-optimization/98597
2154 * c-pretty-print.c: Include options.h.
2155 (c_fold_indirect_ref_for_warn): New function.
2156 (print_mem_ref): Use it. If it returns something that has compatible
2157 type and is TBAA compatible with zero offset, print it and return,
2158 otherwise print it using offsetof syntax or array ref syntax. Fix up
2159 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2160 argument has pointer to array type. Print pointers using the standard
2161 formatting.
2162
6851dda2
GA
21632021-01-12 Martin Sebor <msebor@redhat.com>
2164
2165 PR c/98597
2166 PR c/98592
2167 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2168 has pointer type. Remove redundant code. Avoid calling
2169 gimple_canonical_types_compatible_p.
2170
7d187e4f
GA
21712021-01-07 Martin Sebor <msebor@redhat.com>
2172
2173 PR middle-end/98578
2174 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2175 Avoid assuming acces type's size is constant. Correct condition
2176 guarding the printing of a parenthesis.
2177
942ae5be
GA
21782021-01-06 Martin Sebor <msebor@redhat.com>
2179
2180 PR c++/95768
2181 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2182 SSA_NAMEs print VLA names and GIMPLE defining statements.
2183 (print_mem_ref): New function.
2184 (c_pretty_printer::unary_expression): Call it.
2185
21862021-01-06 Richard Biener <rguenther@suse.de>
2187
2188 PR tree-optimization/95582
2189 * c-attribs.c (c_common_attribute_table): Add entry for
2190 signed_bool_precision.
2191 (handle_signed_bool_precision_attribute): New.
2192
8daa719b
GA
21932020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2194
2195 * c.opt: Add -stdlib= option and enumerations for
2196 libstdc++ and libc++.
2197
eefe499f
GA
21982020-12-16 Martin Liska <mliska@suse.cz>
2199
2200 * c.opt: Remove usage of Report.
2201
d52945ce
GA
22022020-12-14 Martin Sebor <msebor@redhat.com>
2203
2204 PR middle-end/98166
2205 PR c++/57111
2206 PR middle-end/98160
2207 * c-attribs.c (maybe_add_noinline): New function.
2208 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2209 Implicitly add attribute noinline to functions not declared inline
2210 and warn on those.
2211
ca2bd949
GA
22122020-12-09 Tobias Burnus <tobias@codesourcery.com>
2213
2214 * c-pragma.c (omp_pragmas): Add 'allocate'.
2215 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2216
f6e8e279
GA
22172020-12-08 Jakub Jelinek <jakub@redhat.com>
2218
2219 PR c++/98187
2220 * c-pragma.c (omp_pragmas): Remove "master".
2221 (omp_pragmas_simd): Add "master".
2222
bc8a7013
GA
22232020-12-07 Marek Polacek <polacek@redhat.com>
2224
2225 PR c++/98126
2226 * c-common.c (verify_tree_lim_r): New function.
2227 (verify_sequence_points): Use it. Use nullptr instead of 0.
2228
b8dd0ef7
GA
22292020-12-03 Martin Sebor <msebor@redhat.com>
2230
2231 PR c++/90629
2232 PR middle-end/94527
2233 * c-attribs.c (handle_dealloc_attribute): New function.
2234 (handle_malloc_attribute): Handle argument forms of attribute.
2235 * c.opt (-Wmismatched-dealloc): New option.
2236 (-Wmismatched-new-delete): New option.
2237
22382020-12-03 Jakub Jelinek <jakub@redhat.com>
2239
2240 PR libstdc++/93121
2241 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2242 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2243
e0f5e792
GA
22442020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2245
2246 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2247 {__GNUC_EXECUTION_CHARSET_NAME} and
2248 _WIDE_EXECUTION_CHARSET_NAME} macros.
2249
22502020-12-01 Nathan Sidwell <nathan@acm.org>
2251
2252 * c-common.c (module, import, export): New internal tokens (with
2253 trailing space).
2254 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2255 them.
2256 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2257 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2258
22592020-12-01 Nathan Sidwell <nathan@acm.org>
2260
2261 * c-opts.c (c_common_init_options): Ask for module dependencies.
2262 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2263 * c-pch.c (c_common_valid_pch): ... does not play with C++
2264 modules.
2265 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2266 options.
2267 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2268 (fmodule-only, fmodule-mapper, fmodule-lazy)
2269 (fmodule-version-ignore, Winvalid-imported-macros)
2270 (flang-info-include-translate, flang-info-include-translate-not):
2271 New options
2272
5fbf0ecb
GA
22732020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2274
2275 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2276 (dump_ada_structure): Also deal with convention, unchecked union and
2277 bit-field for nested types. In the latter case, print an Alignment
2278 aspect along with the Pack aspect.
2279
360258da
GA
22802020-11-25 Martin Sebor <msebor@redhat.com>
2281
2282 PR bootstrap/94982
2283 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2284 -Wformat-diag.
2285
1e2c9a27
GA
22862020-11-24 Martin Sebor <msebor@redhat.com>
2287
2288 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2289
8e6198d0
GA
22902020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2291
2292 * c-attribs.c (handle_special_var_sec_attribute): New.
2293 (handle_noinit_attribute): Remove.
2294 (attr_noinit_exclusions): Rename to...
2295 (attr_section_exclusions): ...this, and add "persistent" attribute
2296 exclusion.
2297 (c_common_attribute_table): Add "persistent" attribute.
2298
7a97e2fc
GA
22992020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2300
2301 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2302 Treat opaque types like other types.
2303 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2304 supported types.
2305
82e5048e
GA
23062020-11-20 Martin Sebor <msebor@redhat.com>
2307
2308 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2309 with fewer arguments.
2310
23112020-11-20 Martin Sebor <msebor@redhat.com>
2312
2313 PR middle-end/97879
2314 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2315 Error out on invalid modes.
2316
23172020-11-20 Jakub Jelinek <jakub@redhat.com>
2318
2319 PR libstdc++/88101
2320 * c-common.c (check_builtin_function_arguments): Handle
2321 BUILT_IN_CLEAR_PADDING.
2322
25bb75f8
GA
23232020-11-18 Nathan Sidwell <nathan@acm.org>
2324
2325 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2326
4dabb037
GA
23272020-11-17 Nathan Sidwell <nathan@acm.org>
2328
2329 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2330 after newly-added CTI_MODULE_HWM.
2331
23322020-11-17 Joseph Myers <joseph@codesourcery.com>
2333
2334 * c-cppbuiltin.c (builtin_define_float_constants): Define
2335 "*_IS_IEC_60559__" macros.
2336
23372020-11-17 Nathan Sidwell <nathan@acm.org>
2338
2339 * c-lex.c: #include "langhooks.h".
2340 (cb_undef): Maybe call preprocess_undef lang hook.
2341 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2342 lang hook.
2343 (push_command_line_include): Maybe call preprocess_main_file lang
2344 hook.
2345 (cb_file_change): Likewise.
2346 * c-ppoutput.c: #include "langhooks.h.
2347 (scan_translation_unit): Maybe call preprocess_token lang hook.
2348 (class do_streamer): New, derive from token_streamer.
2349 (directives_only_cb): Data pointer is do_streamer, call
2350 preprocess_token lang hook.
2351 (scan_translation_unit_directives_only): Use do_streamer.
2352 (print_line_1): Move src_line recording to after string output.
2353 (cb_undef): Maybe call preprocess_undef lang hook.
2354
23552020-11-17 Nathan Sidwell <nathan@acm.org>
2356
2357 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2358 code duplicating that functionality.
2359
23602020-11-17 Jakub Jelinek <jakub@redhat.com>
2361
2362 PR c/90628
2363 * c-common.c (check_builtin_function_arguments)
2364 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2365 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2366 for more builtins and argument positions.
2367
29c5d9ce
GA
23682020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2369
2370 PR objc/97854
2371 * stub-objc.c: Include c-common.h to declare enum rid.
2372
77f67db2
GA
23732020-11-13 Jakub Jelinek <jakub@redhat.com>
2374
2375 PR c++/63287
2376 * c-cppbuiltin.c: Include configargs.h.
2377 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2378 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2379 "single".
2380
23812020-11-13 Gergö Barany <gergo@codesourcery.com>
2382 Thomas Schwinge <thomas@codesourcery.com>
2383
2384 * c.opt (fopenacc-kernels): Add.
2385
23862020-11-13 Jason Merrill <jason@redhat.com>
2387
2388 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2389
23902020-11-13 Piotr H. Dabrowski <phd@phd.re>
2391
2392 PR c++/91318
2393 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2394
23952020-11-13 Martin Liska <mliska@suse.cz>
2396
2397 * c-attribs.c (build_attr_access_from_parms): Format properly.
2398
23992020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2400
2401 PR objc/90707
2402 * c-common.c (c_common_reswords): null_unspecified, nullable,
2403 nonnull, null_resettable: New keywords.
2404 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2405 RID_NONNULL, RID_NULL_RESETTABLE: New.
2406 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2407 ranges accepted for property attributes.
2408 * c-attribs.c (handle_objc_nullability_attribute): New.
2409 * c-objc.h (enum objc_property_attribute_group): Add
2410 OBJC_PROPATTR_GROUP_NULLABLE.
2411 (enum objc_property_attribute_kind):Add
2412 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2413 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2414
24152020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2416
2417 PR objc/77404
2418 * c-attribs.c (handle_objc_root_class_attribute): New
2419 * c-objc.h (objc_start_class_interface): Add a location
2420 value for the position of the class name.
2421 * c.opt: Add Wobjc-root-class.
2422 * stub-objc.c (objc_start_class_interface): Add a location
2423 value for the position of the class name.
2424
a5a11525
GA
24252020-11-12 Joseph Myers <joseph@codesourcery.com>
2426
2427 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2428 Allow scope for C. Handle standard attributes for C. Do not
2429 accept unscoped attributes if std_syntax and not handled as
2430 standard attributes.
2431 * c-common.h (c_common_has_attribute): Update prototype.
2432
24332020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2434
2435 PR pch/86674
2436 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2437 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2438
0f5f9ed5
GA
24392020-11-11 Patrick Palka <ppalka@redhat.com>
2440
2441 PR c++/88115
2442 * c-opts.c (c_common_post_options): Update latest_abi_version.
2443
bb622641
GA
24442020-11-10 Jakub Jelinek <jakub@redhat.com>
2445
2446 PR c/97748
2447 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2448 to false.
2449 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2450 recursively and just return true instead of warning if it is true.
2451 Handle COMPLEX_EXPR.
2452
24532020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2454
2455 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2456 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2457 (c_omp_adjust_map_clauses): New function.
2458
2bee28dd
GA
24592020-11-09 Marek Polacek <polacek@redhat.com>
2460
2461 DR 1914
2462 * c-common.c (attribute_fallthrough_p): Tweak the warning
2463 message.
2464
24652020-11-09 Patrick Palka <ppalka@redhat.com>
2466
2467 * c-pragma.c (handle_pragma_diagnostic): Split the
2468 unknown-option -Wpragmas diagnostic into a warning and a
2469 subsequent note containing a spelling suggestion. Avoid
2470 computing the suggestion if -Wpragmas warnings are being
2471 suppressed.
2472
24732020-11-09 Patrick Palka <ppalka@redhat.com>
2474
2475 PR testsuite/97117
2476 * c-indentation.c (get_visual_column): Remove location_t
2477 parameter. Move the column-tracking diagnostic code from here
2478 to ...
2479 (should_warn_for_misleading_indentation): ... here, before the
2480 early exit for when the loci are not all distinct. Don't pass a
2481 location_t argument to get_visual_column.
2482 (assert_get_visual_column_succeeds): Don't pass a location_t
2483 argument to get_visual_column.
2484 (assert_get_visual_column_fails): Likewise.
2485
fb95de7a
GA
24862020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2487
2488 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2489 of keywords accepted in @property attribute contexts.
2490 * c-objc.h (enum objc_property_attribute_group): Add
2491 OBJC_PROPATTR_GROUP_CLASS.
2492 (enum objc_property_attribute_kind): Add
2493 OBJC_PROPERTY_ATTR_CLASS.
2494
2da7ee05
GA
24952020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2496
2497 * c-common.c (c_common_reswords): Add 'atomic' property
2498 attribute.
2499 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2500 property attributes.
2501
25022020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2503
2504 * c-attribs.c (handle_nsobject_attribute): New.
2505 * c.opt: Add WNSObject-attribute.
2506
44cab2d8
GA
25072020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2508
2509 * c-objc.h (enum objc_property_attribute_group): New
2510 (enum objc_property_attribute_kind): New.
2511 (OBJC_PROPATTR_GROUP_MASK): New.
2512 (struct property_attribute_info): Small class encapsulating
2513 parser output from property attributes.
2514 (objc_prop_attr_kind_for_rid): New
2515 (objc_add_property_declaration): Simplify interface.
2516 * stub-objc.c (enum rid): Dummy type.
2517 (objc_add_property_declaration): Simplify interface.
2518 (objc_prop_attr_kind_for_rid): New.
2519
25202020-11-06 Nathan Sidwell <nathan@acm.org>
2521
2522 * c-ada-spec.c (collect_ada_nodes): Rename
2523 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2524 (collect_ada_node): Likewise.
2525 (dump_forward_type): Likewise.
2526 * c-common.c (set_underlying_type): Rename
2527 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2528 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2529
25302020-11-06 Jakub Jelinek <jakub@redhat.com>
2531
2532 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2533
0cfd9109
GA
25342020-11-05 Marek Polacek <polacek@redhat.com>
2535
2536 PR c++/97675
2537 * c.opt (Wexceptions): New option.
2538
25392020-11-05 Marek Polacek <polacek@redhat.com>
2540
2541 PR c++/25814
2542 * c.opt (Wvexing-parse): New option.
2543
35c125cb
GA
25442020-11-04 Jakub Jelinek <jakub@redhat.com>
2545
2546 PR c++/97670
2547 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2548 underlying decl to clear in the allocate_head bitmap.
2549
25502020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2551
2552 * c-objc.h (objc_non_constant_expr_p): New.
2553 * stub-objc.c (objc_non_constant_expr_p): New.
2554
fd2325ea
GA
25552020-11-03 Nathan Sidwell <nathan@acm.org>
2556
2557 * c.opt (MQ,MT): Reword description to be make-agnostic.
2558
88ce3d5f
GA
25592020-11-02 Nathan Sidwell <nathan@acm.org>
2560
2561 * c-opts.c (c_common_post_options): Move var decl to its
2562 initialization point.
2563
25642020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2565
2566 * c-lex.c (c_lex_with_flags): When combining '@' with a
2567 keyword for Objective-C, combine the location ranges too.
2568
25692020-10-30 Qing Zhao <qing.zhao@oracle.com>
2570 H.J.Lu <hjl.tools@gmail.com>
2571
2572 * c-attribs.c (c_common_attribute_table): Add new attribute
2573 zero_call_used_regs.
2574 (handle_zero_call_used_regs_attribute): New function.
2575
e93aae4a
GA
25762020-10-28 Marek Polacek <polacek@redhat.com>
2577
2578 PR c++/97573
2579 * c-opts.c (c_common_post_options): In C++20, turn on
2580 -Wdeprecated-enum-enum-conversion and
2581 -Wdeprecated-enum-float-conversion.
2582 * c.opt (Wdeprecated-enum-enum-conversion,
2583 Wdeprecated-enum-float-conversion): New options.
2584 (Wenum-conversion): Allow for C++ too.
2585
25862020-10-28 Jakub Jelinek <jakub@redhat.com>
2587
2588 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2589 * c-omp.c: Include bitmap.h.
2590 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2591
f19e7c8d
GA
25922020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2593
2594 * c-common.c (__is_nothrow_assignable): New.
2595 (__is_nothrow_constructible): Likewise.
2596 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2597 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2598
efe71fcc
GA
25992020-10-23 Jan Hubicka <hubicka@ucw.cz>
2600
2601 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2602
26032020-10-23 Marek Polacek <polacek@redhat.com>
2604
2605 PR c++/91741
2606 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2607 (c_common_init_ts): Likewise.
2608 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2609 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2610 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2611 (maybe_warn_sizeof_array_div): New function.
2612 * c.opt (Wsizeof-array-div): New option.
2613
26142020-10-23 Martin Sebor <msebor@redhat.com>
2615
2616 PR c/97463
2617 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2618
56ddd5e2
GA
26192020-10-22 Martin Liska <mliska@suse.cz>
2620
2621 PR c/94722
2622 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2623 (handle_stack_protect_attribute): Add error message for a
2624 no_stack_protector function.
2625
26262020-10-22 Martin Liska <mliska@suse.cz>
2627
2628 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2629
26302020-10-22 Jan Hubicka <hubicka@ucw.cz>
2631
2632 * c-gimplify.c: Include tree-nested.h
2633 (c_genericize): Update for new nested function info.
2634
b2698c21
GA
26352020-10-14 Martin Sebor <msebor@redhat.com>
2636
2637 PR c/97413
2638 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2639 bounds in an extra list.
2640
7e9282ae
GA
26412020-10-05 Richard Biener <rguenther@suse.de>
2642 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR c++/97197
2645 * c-pretty-print.c: Include langhooks.h.
2646 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2647 expression.
2648 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2649 unary_expression.
2650 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2651
660bfe61
GA
26522020-09-30 Martin Sebor <msebor@redhat.com>
2653
2654 PR middle-end/97189
2655 * c-attribs.c (append_access_attr): Use the function declaration
2656 location for a warning about an attribute access argument.
2657
93bca37c
GA
26582020-09-29 Marek Polacek <polacek@redhat.com>
2659
2660 PR c++/94695
2661 * c.opt (Wrange-loop-construct): New option.
2662
82b77dee
GA
26632020-09-23 Martin Sebor <msebor@redhat.com>
2664
2665 PR c/97131
2666 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2667
26682020-09-23 Marek Polacek <polacek@redhat.com>
2669
2670 PR c/97125
2671 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2672 after loops and other structured control constructs have been lowered.
2673
521d2711
GA
26742020-09-22 Jakub Jelinek <jakub@redhat.com>
2675
2676 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2677 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2678
44135373
GA
26792020-09-21 Marek Polacek <polacek@redhat.com>
2680
2681 * c.opt (Wctad-maybe-unsupported): New option.
2682
2fe5b7d1
GA
26832020-09-19 Martin Sebor <msebor@redhat.com>
2684
2685 PR c/50584
2686 * c-common.h (warn_parm_array_mismatch): Declare new function.
2687 (has_attribute): Move declaration of an existing function.
2688 (build_attr_access_from_parms): Declare new function.
2689 * c-warn.c (parm_array_as_string): Define new function.
2690 (plus_one): Define new function.
2691 (warn_parm_ptrarray_mismatch): Define new function.
2692 (warn_parm_array_mismatch): Define new function.
2693 (vla_bound_parm_decl): New function.
2694 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2695 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2696 qualifiers here...
2697 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2698 them in brackets here. Also print [static]. Strip extraneous
2699 expressions from VLA bounds.
2700
27012020-09-19 Martin Sebor <msebor@redhat.com>
2702
2703 PR c/50584
2704 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2705 (handle_argspec_attribute): New function.
2706 (get_argument, get_argument_type): New functions.
2707 (append_access_attrs): Add overload. Handle internal attribute
2708 representation in addition to external.
2709 (handle_access_attribute): Handle internal attribute representation
2710 in addition to external.
2711 (build_attr_access_from_parms): New function.
2712
27132020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2714
2715 * c-gimplify.c (genericize_c_loop): Rewrite to match
2716 c_finish_loop in c-typeck.c.
2717
27182020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2719
2720 * c-common.c (c_block_may_fallthrough): New, split from
2721 cxx_block_may_fallthrough in the cp front end.
2722 (c_common_init_ts): Move handling of loop and switch-related
2723 statements here from the cp front end.
2724 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2725 cp front end.
2726 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2727 * c-common.h (c_block_may_fallthru): Declare.
2728 (bc_state_t): Move here from cp front end.
2729 (save_bc_state, restore_bc_state): Declare.
2730 (c_genericize_control_stmt): Declare.
2731 (WHILE_COND, WHILE_BODY): Likewise.
2732 (DO_COND, DO_BODY): Likewise.
2733 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2734 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2735 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2736 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2737 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2738 * c-dump.c (dump_stmt): Copy from cp front end.
2739 (c_dump_tree): Move code to handle structured loop and switch
2740 tree nodes here from cp front end.
2741 * c-gimplify.c: Adjust includes.
2742 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2743 cp front end.
2744 (save_bc_state, restore_bc_state): New functions using old code
2745 from cp front end.
2746 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2747 (genericize_c_loop): Move from cp front end.
2748 (genericize_for_stmt, genericize_while_stmt): Likewise.
2749 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2750 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2751 (genericize_omp_for_stmt): Likewise.
2752 (c_genericize_control_stmt): New function using code split from
2753 cp front end.
2754 (c_genericize_control_r): New.
2755 (c_genericize): Call walk_tree with c_genericize_control_r.
2756 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2757 structured loop and switch tree nodes here from cp front end.
2758
2aad20c0
GA
27592020-09-17 Patrick Palka <ppalka@redhat.com>
2760
2761 PR c/80076
2762 * c-indentation.c (should_warn_for_misleading_indentation): Move
2763 declarations of local variables closer to their first use.
2764 Handle virtual token locations by resolving them to their
2765 respective macro expansion points. If all three tokens are
2766 produced from the same macro expansion, then instead use their
2767 loci within the macro definition.
2768
ecde1b0a
GA
27692020-09-16 Martin Sebor <msebor@redhat.com>
2770
2771 PR c/78666
2772 PR c/96126
2773 * c-attribs.c (validate_attr_args): New function.
2774 (validate_attr_arg): Same.
2775 (handle_section_attribute): Call it. Introduce a local variable.
2776 (handle_alloc_size_attribute): Same.
2777 (handle_alloc_align_attribute): Same.
2778
50a71cd0
GA
27792020-09-14 Jakub Jelinek <jakub@redhat.com>
2780
2781 * c-attribs.c (handle_optimize_attribute): Adjust
2782 cl_optimization_save, cl_optimization_restore and
2783 build_optimization_node callers.
2784 * c-pragma.c (handle_pragma_optimize): Adjust
2785 build_optimization_node caller.
2786 (handle_pragma_push_options): Adjust
2787 build_optimization_node and build_target_option_node callers.
2788 (handle_pragma_pop_options, handle_pragma_reset_options):
2789 Adjust cl_optimization_restore callers.
2790
8f7ea26a
GA
27912020-08-28 Martin Sebor <msebor@redhat.com>
2792
2793 * c.opt (Wstringop-overread): New option.
2794
a6493809
GA
27952020-08-11 Jakub Jelinek <jakub@redhat.com>
2796
2797 PR c/96545
2798 * c-common.c (get_atomic_generic_size): Require that first argument's
2799 type points to a complete type and use tree_fits_uhwi_p instead of
2800 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2801
48cc2e46
GA
28022020-07-31 Martin Sebor <msebor@redhat.com>
2803
2804 PR c++/96003
2805 * c-common.c (check_function_arguments_recurse): Return early when
2806 no-warning bit is set.
2807
28082020-07-31 Richard Biener <rguenther@suse.de>
2809
2810 PR debug/96383
2811 * c-common.h (c_common_finalize_early_debug): Declare.
2812 * c-common.c: Include debug.h.
2813 (c_common_finalize_early_debug): finalize_early_debug langhook
2814 implementation generating debug for extern declarations.
2815
e71dab87
GA
28162020-07-27 Nathan Sidwell <nathan@acm.org>
2817
2818 * c-common.c (try_to_locate_new_include_insertion_point): Use
2819 strcmp, not pointer equality.
2820
ae2e0bc1
GA
28212020-07-25 Martin Sebor <msebor@redhat.com>
2822
2823 PR c++/96310
2824 * c-common.c (check_nonnull_arg): Print note only when warning was
2825 issued.
2826
3ea9abca
GA
28272020-07-22 Tobias Burnus <tobias@codesourcery.com>
2828
2829 * c-omp.c (c_finish_omp_critical): Check for no name but
2830 nonzero hint provided.
2831
0933f508
GA
28322020-07-20 Jason Merrill <jason@redhat.com>
2833
2834 * c-cppbuiltin.c (c_cpp_builtins): Update
2835 __cpp_nontype_template_args for C++20.
2836
28372020-07-20 Martin Sebor <msebor@redhat.com>
2838
2839 PR c/96249
2840 * c.opt: Remove stray text.
2841
8ca07a30
GA
28422020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2843
2844 PR other/86904
2845 * c-indentation.c (should_warn_for_misleading_indentation): Get
2846 global tabstop from the new source.
2847 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2848 is now a common option.
2849 * c.opt: Likewise.
2850
a82c4c4c 28512020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2852
2853 * c.opt (Wscalar-storage-order): Add explicit variable.
2854
f60ee68d
GA
28552020-07-07 Nathan Sidwell <nathan@acm.org>
2856
2857 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2858 cpp_read_main_file.
2859 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2860 maps. Force token position to line_table's highest line.
2861 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2862 (cb_define): Always increment source line.
2863
4077d74c
GA
28642020-07-06 Martin Sebor <msebor@redhat.com>
2865
2866 PR c++/95984
2867 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2868 to stub lambda objects with null this pointer.
2869 (check_nonnull_arg): Handle C++ nullptr.
2870
b5f24739
GA
28712020-07-02 Jason Merrill <jason@redhat.com>
2872 Jakub Jelinek <jakub@redhat.com>
2873
2874 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2875
46fbb6c6
GA
28762020-06-30 Jakub Jelinek <jakub@redhat.com>
2877
2878 PR c++/95963
2879 * c-common.c (check_function_arguments_recurse): Don't crash on
2880 calls to internal functions.
2881
69273534
GA
28822020-06-28 Martin Sebor <msebor@redhat.com>
2883
2884 PR c++/86568
2885 * c-common.c (struct nonnull_arg_ctx): Add members.
2886 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2887 C++ member functions specially. Consider the this pointer implicitly
2888 nonnull.
2889 (check_nonnull_arg): Use location of argument when available.
2890 (check_function_arguments): Use nonnull_arg_ctx as argument.
2891
9a33c41f
GA
28922020-06-27 Jakub Jelinek <jakub@redhat.com>
2893
2894 PR middle-end/95903
2895 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2896 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2897 smaller precision intop operands separately.
2898
c9c05f73
GA
28992020-06-26 Marek Polacek <polacek@redhat.com>
2900
2901 * c-opts.c (c_common_init_options): Default to gnu++17.
2902
aff95ee7
GA
29032020-06-17 Jonathan Wakely <jwakely@redhat.com>
2904
bd0a89dc 2905 PR c/95378
aff95ee7
GA
2906 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2907 pointer arguments.
2908
56638b9b
GA
29092020-06-16 Jakub Jelinek <jakub@redhat.com>
2910
2911 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2912 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2913 idx members.
2914 (c_omp_is_loop_iterator): New function.
2915 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2916 if outer loop iterator is present. Perform duplicate checking through
2917 hash_set in the function rather than expecting caller to do that.
2918 Pass NULL instead of d->ppset to walk_tree_1.
2919 (c_omp_check_nonrect_loop_iv): New function.
2920 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2921 non-rectangular loop forms, diagnose multiple associated loops with
2922 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2923 (c_omp_check_loop_iv_exprs): Likewise.
2924
ec6ffbb9
GA
29252020-06-10 Martin Liska <mliska@suse.cz>
2926
2927 PR tree-optimization/92860
2928 * c-attribs.c (handle_optimize_attribute):
2929 Save global options and compare it after parsing of function
2930 attribute.
2931 * c-pragma.c (opt_stack::saved_global_options): New field.
2932 (handle_pragma_push_options): Save global_options.
2933 (handle_pragma_pop_options): Compare them after pop.
2934
b952c2cf
GA
29352020-06-09 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR c/95580
2938 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2939 case when MEM_REF's first argument has type pointer to incomplete type.
2940
1a59f3db
GA
29412020-06-05 Jason Merrill <jason@redhat.com>
2942
2943 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2944 operand to POINTER_PLUS_EXPR.
2945
3add3425
GA
29462020-06-04 Martin Sebor <msebor@redhat.com>
2947
2948 PR middle-end/10138
2949 PR middle-end/95136
2950 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2951 (handle_access_attribute): Same.
2952
9a5b7438
GA
29532020-06-03 Mark Wielaard <mark@klomp.org>
2954
2955 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2956 New function.
2957 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2958 New function declaration.
2959
29602020-06-03 Mark Wielaard <mark@klomp.org>
2961
2962 * known-headers.cc (get_string_macro_hint): New function.
2963 (get_stdlib_header_for_name): Use get_string_macro_hint.
2964 (get_c_stdlib_header_for_string_macro_name): New function.
2965 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2966 New function declaration.
2967
29682020-06-03 Tobias Burnus <tobias@codesourcery.com>
2969
2970 * c-common.h (c_omp_predetermined_mapping): Declare.
2971 * c-omp.c (c_omp_predetermined_mapping): New.
2972
af114c38
MW
29732020-05-22 Mark Wielaard <mark@klomp.org>
2974
2975 * known-headers.cc (get_stdlib_header_for_name): Add a new
2976 stdlib_hint array for stdbool and stdint.
2977
45c50b6a
MW
29782020-05-22 Mark Wielaard <mark@klomp.org>
2979
2980 * known-headers.cc (get_stdlib_header_for_name): Return
2981 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2982 flag_isoc99.
2983
c22027a0
NS
29842020-05-20 Nathan Sidwell <nathan@acm.org>
2985
38a4db21
NS
2986 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2987
c22027a0
NS
2988 * c-common.c (try_to_locate_new_include_insertion_point): Use
2989 strcmp to compare filenames.
2990 * c-lex.c (init_c_lex): Move declaration to initialization.
2991 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2992 deferred count loop.
2993
29f0e90d
JM
29942020-05-15 Jason Merrill <jason@redhat.com>
2995
2996 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2997
b04445d4
JM
29982020-05-13 Jason Merrill <jason@redhat.com>
2999
3000 * c.opt (std=c++20): Make c++2a the alias.
3001 (std=gnu++20): Likewise.
3002 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3003 * c-opts.c: Adjust.
3004 * c-cppbuiltin.c: Adjust.
3005 * c-ubsan.c: Adjust.
3006 * c-warn.c: Adjust.
3007
11dd3be5
EB
30082020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3009
3010 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3011
b224c376
NS
30122020-05-08 Nathan Sidwell <nathan@acm.org>
3013
3014 Reimplement directives only processing.
3015 * c-ppoutput.c (token_streamer): Ne.
3016 (directives_only_cb): New. Swallow ...
3017 (print_lines_directives_only): ... this.
3018 (scan_translation_unit_directives_only): Reimplment using the
3019 published interface.
3020
f1d94677
MP
30212020-05-07 Marek Polacek <polacek@redhat.com>
3022
3023 * c-format.c (badwords): Add "nonstatic".
3024
9b95bb52
JJ
3025202-05-07 Jakub Jelinek <jakub@redhat.com>
3026
3027 PR c/94968
3028 * c-common.c (speculation_safe_value_resolve_params): Return false if
3029 error_operand_p (val2).
3030 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3031 Remove extraneous semicolon.
3032
530b4409 30332020-05-06 qing zhao <qing.zhao@oracle.com>
3034
3035 PR c/94230
3036 * c-indentation.c (get_visual_column): Add a hint to use the new
3037 -flarge-source-files option.
3038
b776bdca
SSF
30392020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3040
3041 * c-attribs.c (handle_vector_size_attribute): Add attribute
3042 nonnull for argument args in order to silence warning of
3043 uninitialized variable usage. Since this is local to the
3044 compilation unit and thus cannot be checked at call sides by the
3045 compiler, added an assert statement in order to verify this.
3046
6607bdd9
L
30472020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3048
3049 PR target/93492
3050 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3051 value to USHRT_MAX (65535).
3052
691eeb65
JJ
30532020-04-29 Jakub Jelinek <jakub@redhat.com>
3054
3055 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3056
26d76be7
JJ
30572020-04-27 Jakub Jelinek <jakub@redhat.com>
3058
3059 PR c/94755
3060 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3061 fncode == BUILT_IN_NONE before initialization of first_param.
3062
7291b2ed
MP
30632020-04-23 Marek Polacek <polacek@redhat.com>
3064
3065 PR c++/94733
3066 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3067 TREE_PURPOSE.
3068
58a29af8
PP
30692020-04-14 Patrick Palka <ppalka@redhat.com>
3070
3071 PR c++/85278
3072 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3073 ampersand if it's an rvalue reference type.
3074
09f04139
MS
30752020-04-13 Martin Sebor <msebor@redhat.com>
3076
3077 PR c/92326
3078 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3079 printing array bound for flexible array members.
3080
ee26baf4
IS
30812020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3082
3083 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3084 define, per n4861.
3085
75efe9cb
RB
30862020-04-02 Richard Biener <rguenther@suse.de>
3087
3088 PR c/94392
3089 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3090 for -O2 and C++11 or newer.
3091
75defde9
PP
30922020-03-28 Patrick Palka <ppalka@redhat.com>
3093
3094 * c.opt: Add -fconcepts-diagnostics-depth.
3095
52f24a9e
MS
30962020-03-27 Martin Sebor <msebor@redhat.com>
3097
3098 PR c++/94346
3099 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3100 to decl_attributes. Make handling of different kinds of entities
3101 more robust.
3102
ccacf77b
MS
31032020-03-27 Martin Sebor <msebor@redhat.com>
3104
3105 PR c++/94098
3106 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3107 here.
3108
ca6c7225
JJ
31092020-03-23 Jakub Jelinek <jakub@redhat.com>
3110
3111 PR c++/91993
3112 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3113 result being COMPOUND_EXPRs, skip to ultimate rhs.
3114
1aa22b19
RS
31152020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3116
3117 PR middle-end/94072
3118 * c-common.c (c_common_type_for_mode): Before using a registered
3119 built-in type, check that the vectorness of the type matches
3120 the vectorness of the mode.
3121
700d4cb0
JJ
31222020-03-17 Jakub Jelinek <jakub@redhat.com>
3123
3124 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3125 issue in a diagnostic message.
3126
b408e010
LH
31272020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3128
3129 * c.opt: Avoid redundancy in the help text.
3130
e78e50d5
MP
31312020-03-02 Marek Polacek <polacek@redhat.com>
3132
3133 PR c++/93958 - add missing -std=gnu++20.
3134 * c.opt: Add -std=gnu++20.
3135
649e1741
MS
31362020-03-01 Martin Sebor <msebor@redhat.com>
3137
3138 PR c++/92721
3139 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3140 (handle_access_attribute): Same.
3141
7b60f3ba
JJ
31422020-02-25 Jakub Jelinek <jakub@redhat.com>
3143
3144 PR c/93858
3145 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3146 "did you mean" hint in diagnostics.
3147
fb260504
JM
31482020-02-15 Jason Merrill <jason@redhat.com>
3149
3150 * c.opt: Add -std=c++20.
3151
1d757b09
EB
31522020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3153
3154 * c-ada-spec.c: Include bitmap.h.
3155 (dump_ada_double_name): Rename into...
3156 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3157 (dump_ada_array_type): Adjust to above renaming. Robustify.
3158 (dump_nested_types_1): New function copied from... Add dumped_types
3159 parameter and pass it down to dump_nested_type.
3160 (dump_nested_types): ...this. Remove parent parameter. Just call
3161 dump_nested_types_1 on an automatic bitmap.
3162 (dump_nested_type): Add dumped_types parameter.
3163 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3164 Adjust recursive calls and adjust to above renaming.
3165 (dump_ada_declaration): Adjust call to dump_nested_types.
3166 Tidy up and adjust to above renaming.
3167 (dump_ada_specs): Initialize and release bitmap obstack.
3168
0cc575e4
MS
31692020-02-10 Martin Sebor <msebor@redhat.com>
3170
3171 PR c/93640
3172 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3173
a59aa302
JJ
31742020-02-10 Jakub Jelinek <jakub@redhat.com>
3175
3176 PR other/93641
3177 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3178 Remove useless extra test.
3179
e464fc90
TB
31802020-02-03 Julian Brown <julian@codesourcery.com>
3181 Tobias Burnus <tobias@codesourcery.com>
3182
3183 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3184
e3b6c052
JM
31852020-01-29 Jason Merrill <jason@redhat.com>
3186
3187 PR c++/89357
3188 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3189
6d00f052
JM
31902020-01-23 Jason Merrill <jason@redhat.com>
3191
3192 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3193
8a990ffa
MS
31942020-01-23 Martin Sebor <msebor@redhat.com>
3195
3196 PR c/84919
3197 * c-common.c (check_function_arguments): Avoid overlap checking
3198 of sprintf functions.
3199
55b7df8b
JM
32002020-01-22 Jason Merrill <jason@redhat.com>
3201
3202 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3203 PR c++/40752
3204 * c-warn.c (conversion_warning): Check operands only after checking
3205 the whole expression. Don't check second operand of + for sign.
3206
c77074d0
JM
32072020-01-21 Jason Merrill <jason@redhat.com>
3208 Manuel López-Ibáñez <manu@gcc.gnu.org>
3209
3210 PR c++/40752 - useless -Wconversion with short +=.
3211 * c.opt (-Warith-conversion): New.
3212 * c-warn.c (conversion_warning): Recurse for operands of
3213 operators. Only warn about the whole expression with
3214 -Warith-conversion.
3215
731dbfc3
JM
32162020-01-21 Jason Merrill <jason@redhat.com>
3217
3218 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3219 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3220
ad1a3914
NS
32212020-01-20 Nathan Sidwell <nathan@acm.org>
3222
3223 PR preprocessor/80005
3224 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3225
49789fd0
IS
32262020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3227
3228 * c-common.c (co_await, co_yield, co_return): New.
3229 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3230 RID_CO_RETURN): New enumeration values.
3231 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3232 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3233 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3234 * c.opt (fcoroutines): New command-line switch.
3235
4bc1899b
DM
32362020-01-10 David Malcolm <dmalcolm@redhat.com>
3237
3238 * c-format.c (local_event_ptr_node): New.
3239 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3240 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3241 * c-format.h (T_EVENT_PTR): New define.
3242
f25e33fa
MS
32432020-01-10 Martin Sebor <msebor@redhat.com>
3244
3245 PR c/93132
3246 * c-attribs.c (append_access_attrs): Validate against the translated
3247 access string rather than the human-readable representation.
3248
8d9254fc
JJ
32492020-01-01 Jakub Jelinek <jakub@redhat.com>
3250
3251 Update copyright years.
3252
39292e25
EB
32532019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3254
3255 * c-ada-spec.h (decl_sloc): Delete.
3256 * c-ada-spec.c (decl_sloc): Make static.
3257
519d7496
JB
32582019-12-19 Julian Brown <julian@codesourcery.com>
3259
3260 * c-common.h (c_omp_map_clause_name): Add prototype.
3261 * c-omp.c (c_omp_map_clause_name): New function.
3262 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3263 PRAGMA_OACC_CLAUSE_DETACH.
3264
a6163563
JB
32652019-12-19 Julian Brown <julian@codesourcery.com>
3266 Maciej W. Rozycki <macro@codesourcery.com>
3267 Tobias Burnus <tobias@codesourcery.com>
3268 Thomas Schwinge <thomas@codesourcery.com>
3269
3270 * c-pragma.h (pragma_omp_clause): Add
3271 PRAGMA_OACC_CLAUSE_NO_CREATE.
3272
e8f1ade2
MS
32732019-12-17 Martin Sebor <msebor@redhat.com>
3274
3275 PR c++/61339
3276 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3277
368877a1
DM
32782019-12-11 David Malcolm <dmalcolm@redhat.com>
3279
3280 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3281 implementation.
3282 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3283
d68f5d45
DM
32842019-12-09 David Malcolm <dmalcolm@redhat.com>
3285
3286 * c-format.c (range_label_for_format_type_mismatch::get_text):
3287 Replace label_text ctor called with true with label_text::take.
3288
d3e28653
DM
32892019-12-09 David Malcolm <dmalcolm@redhat.com>
3290
3291 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3292 initial newline from expected outputs.
3293 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3294 call to diagnostic_show_locus.
3295
abd6d8cc
JJ
32962019-12-06 Jakub Jelinek <jakub@redhat.com>
3297
3298 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3299 now.
3300
7906797e
MP
33012019-12-05 Marek Polacek <polacek@redhat.com>
3302 Jakub Jelinek <jakub@redhat.com>
3303
3304 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3305 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3306
5c04da88
MP
33072019-12-05 Marek Polacek <polacek@redhat.com>
3308
3309 PR c++/92271 - make __is_same alias for __is_same_as.
3310 * c-common.c: Add __is_same, an alias for __is_same_as.
3311
43aae289
MP
33122019-12-03 Marek Polacek <polacek@redhat.com>
3313
3314 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3315 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3316 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3317
d7ddfbcb
JH
33182019-11-30 Jan Hubicka <hubicka@ucw.cz>
3319
3320 * c-attribs.c (handle_symver_attribute): New function
3321 (c_common_attributes): Add symver.
3322
65ef05d0
RS
33232019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3324
3325 * c-common.c (pointer_int_sum): Use verify_type_context to check
3326 whether the target allows pointer arithmetic for the types involved.
3327 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3328 to check whether the target allows sizeof and alignof operations
3329 for the types involved.
3330
1a291106
JM
33312019-11-27 Jason Merrill <jason@redhat.com>
3332
3333 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3334
05d6cb1a
JJ
33352019-11-26 Jakub Jelinek <jakub@redhat.com>
3336
3337 PR c++/61414
3338 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3339 ENUMERAL_TYPEs.
3340
5b8d9367
JM
33412019-11-25 Joseph Myers <joseph@codesourcery.com>
3342
3343 PR c/91985
3344 * c-common.c (c_common_type_for_mode): Handle decimal
3345 floating-point types being NULL_TREE.
3346 * c-format.c (get_format_for_type_1): Handle specified types being
3347 NULL_TREE.
3348 * c-lex.c (interpret_float): Give an error for decimal
3349 floating-point constants when decimal floating-point not
3350 supported.
3351
1fbf51cb
JJ
33522019-11-23 Jakub Jelinek <jakub@redhat.com>
3353
3354 PR middle-end/83859
3355 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3356 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3357 group warning with inform together.
3358 (handle_access_attribute): Formatting fix.
3359
761df906
JJ
33602019-11-22 Jakub Jelinek <jakub@redhat.com>
3361
bdaf8be1
JJ
3362 PR c/90677
3363 * c-common.h (identifier_global_tag): Declare.
3364 * c-format.c (get_pointer_to_named_type): Renamed to ...
3365 (get_named_type): ... this. Use identifier_global_tag instead of
3366 identifier_global_value, handle the return value being a TYPE_P.
3367 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3368 to call get_named_type instead. Formatting fixes.
3369
c2ecce6d 3370 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3371 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3372 and __cpp_generic_lambdas for -std=c++2a. Define
3373 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3374 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3375 __cpp_concepts for -std=c++2a.
3376
54aa6b58
MS
33772019-11-22 Martin Sebor <msebor@redhat.com>
3378
3379 PR middle-end/83859
3380 * c-attribs.c (handle_access_attribute): New function.
3381 (c_common_attribute_table): Add new attribute.
3382 (get_argument_type): New function.
3383 (append_access_attrs): New function.
3384 (get_nonnull_operand): Rename...
3385 (get_attribute_operand): ...to this.
3386 * c-common.c (get_nonnull_operand): Rename...
3387 (get_attribute_operand): ...to this.
3388
6c80b1b5
JM
33892019-11-21 Joseph Myers <joseph@codesourcery.com>
3390
3391 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3392 of warning.
3393
192961ff
JM
33942019-11-19 Joseph Myers <joseph@codesourcery.com>
3395
3396 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3397 warning for standard attributes mixed with fallthrough attributes.
3398
f8aea5e3
JM
33992019-11-15 Joseph Myers <joseph@codesourcery.com>
3400
3401 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3402 * c-common.h (handle_fallthrough_attribute): Declare.
3403
2cc94aa8
JM
34042019-11-15 Joseph Myers <joseph@codesourcery.com>
3405
3406 * c-attribs.c (handle_deprecated_attribute): Remove static.
3407 * c-common.h (handle_deprecated_attribute): Declare.
3408
7c5890cc
JM
34092019-11-14 Joseph Myers <joseph@codesourcery.com>
3410
3411 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3412 char for C.
3413
b2417b59
JJ
34142019-11-14 Jakub Jelinek <jakub@redhat.com>
3415
d0ec7c93
JJ
3416 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3417 valid vendors.
3418
b2417b59
JJ
3419 * c-omp.c (c_omp_check_context_selector): Handle name lists
3420 containing string literals. Don't diagnose atomic_default_mem_order
3421 with multiple props.
3422
00be2a5f
JM
34232019-11-13 Joseph Myers <joseph@codesourcery.com>
3424
3425 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3426 NORM_MAX constants. Update call to get_max_float.
3427 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3428 constants.
3429
2dbad62d
EB
34302019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3431
3432 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3433 (dump_forward_type): Do not generate a declaration for function types.
3434 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3435 of the component type if it is declared in another file.
3436
6ed76044
ML
34372019-11-12 Martin Liska <mliska@suse.cz>
3438
3439 * c-opts.c (c_common_post_options):
3440 Use SET_OPTION_IF_UNSET.
3441
62aee289
MR
34422019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3443 Frederik Harwath <frederik@codesourcery.com>
3444
3445 gcc/c-family/
3446 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3447 constant.
3448 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3449
f486280c
RS
34502019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3451
3452 * c-common.h (gnu_vector_type_p): New function.
3453 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3454 vectors to satisfy gnu_vector_type_p.
3455 (c_build_vec_convert): Likewise __builtin_convertvector.
3456 (convert_vector_to_array_for_subscript): Likewise when applying
3457 implicit vector to array conversion.
3458 (scalar_to_vector): Likewise when converting vector-scalar
3459 operations to vector-vector operations.
3460
017c6491
JM
34612019-11-08 Joseph Myers <joseph@codesourcery.com>
3462
3463 * c.opt (Wold-style-definition): Initialize to -1.
3464 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3465 to flag_isoc2x if not set explicitly.
3466
c01bd174
JM
34672019-11-07 Joseph Myers <joseph@codesourcery.com>
3468
3469 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3470
0df65305
JM
34712019-11-05 Jason Merrill <jason@redhat.com>
3472
3473 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3474 -fconcepts.
3475
e0c866dd
KK
34762019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3477
3478 * c-opts.c (c_common_post_options): Update
3479 latest_abi_version.
3480
f968ef9b
JJ
34812019-11-02 Jakub Jelinek <jakub@redhat.com>
3482
d0c464d2
JJ
3483 * c-common.h (c_omp_get_context_selector): Remove.
3484 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3485 and renamed to omp_get_context_selector.
3486
917dd789
JJ
3487 * c-omp.c (c_omp_mark_declare_variant): Use
3488 omp_context_selector_set_compare.
3489
f968ef9b
JJ
3490 PR c++/88335 - Implement P1073R3: Immediate functions
3491 * c-common.h (enum rid): Add RID_CONSTEVAL.
3492 * c-common.c (c_common_reswords): Add consteval.
3493
5f6705b7
JJ
34942019-11-01 Martin Sebor <msebor@redhat.com>
3495
3496 PR middle-end/91679
3497 PR middle-end/91647
3498 PR middle-end/91463
3499 PR middle-end/92312
3500 * c-pretty-print.c (direct_abstract_declarator): Print
3501 bound in zero-length arrays.
3502 * c.opt (-Wzero-length-bounds): New option.
3503
43f1814c
NS
35042019-10-30 Nathan Sidwell <nathan@acm.org>
3505
3506 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3507 macros.
3508
ad1539d5
MS
35092019-10-28 Martin Sebor <msebor@redhat.com>
3510
3511 PR c/66970
3512 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3513 even when only preprocessing.
3514 * c-common.h (names_builtin_p): Declare new function.
3515 * c-lex.c (init_c_lex): Set has_builtin.
3516 (c_common_has_builtin): Define a new function.
3517 * c-ppoutput.c (init_pp_output): Set has_builtin.
3518
135df52c
JJ
35192019-10-24 Jakub Jelinek <jakub@redhat.com>
3520
3521 * c-common.h (c_omp_context_selector_matches): Remove.
3522 * c-omp.c (c_omp_context_selector_matches): Remove.
3523 * c-attribs.c (c_common_attribute_table): Add
3524 "omp declare target {host,nohost,block}" attributes.
3525
8ad0c477
JM
35262019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3527
3528 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3529
56898e43
RS
35302019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3531
3532 * c-common.h (user_facing_original_type_p): Declare.
3533 * c-common.c: Include c-spellcheck.h.
3534 (user_facing_original_type_p): New function.
3535
20de9568
JJ
35362019-10-12 Jakub Jelinek <jakub@redhat.com>
3537
3538 * c-common.h (c_omp_mark_declare_variant,
3539 c_omp_context_selector_matches): Declare.
3540 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3541 and hsa-common.h.
3542 (c_omp_get_context_selector): Support second argument NULL.
3543 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3544 functions.
3545 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3546 attribute, add "omp declare variant base" and
3547 "omp declare variant variant" attributes.
3548
175a85b2
JM
35492019-10-11 Joseph Myers <joseph@codesourcery.com>
3550
3551 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3552 CppReason(CPP_W_C11_C2X_COMPAT).
3553
fe2bc27c
JM
35542019-10-11 Joseph Myers <joseph@codesourcery.com>
3555
3556 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3557 _Decimal64 and _Decimal128.
3558
27dfdc0f
JM
35592019-10-10 Joseph Myers <joseph@codesourcery.com>
3560
3561 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3562 types if DFP not supported.
3563
94e7f906
JJ
35642019-10-10 Jakub Jelinek <jakub@redhat.com>
3565
3566 * c-common.h (c_omp_check_context_selector,
3567 c_omp_get_context_selector): Declare.
3568 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3569 in diagnostic message.
3570 (c_omp_check_context_selector, c_omp_get_context_selector): New
3571 functions.
3572 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3573 attribute.
3574 (handle_omp_declare_variant_attribute): New function.
3575
a7160771
MS
35762019-10-09 Martin Sebor <msebor@redhat.com>
3577
3578 PR tree-optimization/90879
3579 * c.opt (-Wstring-compare): New option.
3580
cb57504a
JM
35812019-10-08 Andrew Sutton <asutton@lock3software.com>
3582 Jason Merrill <jason@redhat.com>
3583
3584 Update the concepts implementation to conform to the C++20
3585 specification, improve compile times, and generally clean up
3586 the implementation.
3587
3588 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3589 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3590 * c.opt: Add -Wconcepts-ts.
3591 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3592 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3593 (set_std_cxx2a): Enable concepts by default.
3594
fbb2a6dc
JM
35952019-10-08 Joseph Myers <joseph@codesourcery.com>
3596
3597 * c-opts.c (c_common_post_options): Set
3598 -fno-fp-int-builtin-inexact for C2X.
3599
8e007055
JJ
36002019-10-05 Jakub Jelinek <jakub@redhat.com>
3601
3602 PR c++/91369 - Implement P0784R7: constexpr new
3603 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3604 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3605
843f104d
JM
36062019-10-04 Joseph Myers <joseph@codesourcery.com>
3607
3608 PR c/82752
3609 * c-format.c (C_STD_VER): Handle C2x.
3610 (C_STD_NAME): Likewise.
3611 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3612 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3613 modifier allowed and 'p' flag.
3614 * c-format.h (enum format_std_version): Add STD_C2X.
3615 (struct format_char_info): Mention 'p' in comment on flags2.
3616
e9c9a142
DM
36172019-10-01 David Malcolm <dmalcolm@redhat.com>
3618
3619 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3620 calling diagnostic_show_locus, rather than destroying it afterwards.
3621
7552c36a
JJ
36222019-10-01 Jakub Jelinek <jakub@redhat.com>
3623
3624 PR c++/91925
3625 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3626 with NULL DECL_FIELD_OFFSET.
3627
8209db25
RS
36282019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3629
3630 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3631 has a type name, use it in preference to the __vector syntax.
3632
9343bf99
RS
36332019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3634
3635 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3636 two spaces between a comma and "...".
3637
59bc434a
JJ
36382019-09-27 Jakub Jelinek <jakub@redhat.com>
3639
3640 PR c++/88203
3641 * c-common.h (c_omp_predefined_variable): Declare.
3642 * c-omp.c (c_omp_predefined_variable): New function.
3643 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3644 for predefined variables.
3645
c6447c20
RS
36462019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3647
3648 * c-common.h (build_function_call_vec): Take the original
3649 function decl as an optional final parameter.
3650 (check_builtin_function_arguments): Take the original function decl.
3651 * c-common.c (check_builtin_function_arguments): Likewise.
3652 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3653 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3654
c4438114
JM
36552019-09-15 Jason Merrill <jason@redhat.com>
3656
3657 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3658 fold_for_warn in "|| mask" warning.
3659
68a57628
ML
36602019-09-10 Martin Liska <mliska@suse.cz>
3661
3662 * c.opt: Use newly added WarnRemoved.
3663
f48ef52e
ML
36642019-09-09 Martin Liska <mliska@suse.cz>
3665
3666 * c.opt: Update comment of removed
3667 options that are preserved only for backward
3668 compatibility.
3669
67f6e649
ML
36702019-09-06 Martin Liska <mliska@suse.cz>
3671
3672 PR c++/91125
3673 * c-common.c: Remove definition of flag_use_repository.
3674 * c-common.h: Likewise.
3675 * c-opts.c (c_common_handle_option):
3676 Do not handle OPT_frepo option.
3677 * c.opt: Mark the option with Deprecated.
3678
db9d2274
MP
36792019-09-04 Marek Polacek <polacek@redhat.com>
3680
3681 * c.opt (fdeduce-init-list): Ignored.
3682
68e2c199
PK
36832019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3684
3685 PR c/78736
3686 * c.opt (Wenum-conversion): New option.
3687
7a4418a5
JL
36882019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3689
3690 * c-attribs.c (handle_section_attribute): Call the
3691 handle_generic_attribute target hook after performing target
3692 independent processing.
3693 (handle_noinit_attribute): Likewise.
3694
5f76ab15
ILT
36952019-09-03 Ian Lance Taylor <iant@golang.org>
3696
3697 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3698 when using -fgo-dump-spec.
3699
ae0d3f6a
ML
37002019-09-02 Martin Liska <mliska@suse.cz>
3701
3702 PR c++/91155
3703 * c-common.c (fname_as_string): Use cxx_printable_name for
3704 __PRETTY_FUNCTION__ same as was used before r265711.
3705
8a902edb
MP
37062019-08-28 Marek Polacek <polacek@redhat.com>
3707
3708 Implement P1152R4: Deprecating some uses of volatile.
3709 PR c++/91361
3710 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3711 default for C++2a, unless -Wno-deprecated.
3712 * c.opt (Wvolatile): New warning.
3713
4742dbe7
MP
37142019-08-28 Marek Polacek <polacek@redhat.com>
3715
3716 PR c++/91360 - Implement C++20 P1143R2: constinit.
3717 * c-common.c (c_common_reswords): Add constinit and __constinit.
3718 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3719 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3720 RID_LAST_CXX20.
3721 (D_CXX20): Define.
3722 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3723 * c-format.c (cxx_keywords): Add "constinit".
3724 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3725
6a074892
JJ
37262019-08-27 Jakub Jelinek <jakub@redhat.com>
3727
3728 PR c++/91415
3729 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3730 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3731 like COMPOUND_EXPR rather than normal expression.
3732
22f8849d
IS
37332019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3734
3735 PR pch/61250
3736 * c-lex.c (c_lex_with_flags): Don't call
3737 c_common_no_more_pch () from here.
3738
df375b03
JJ
37392019-08-23 Jakub Jelinek <jakub@redhat.com>
3740
3741 PR middle-end/91283
3742 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3743 instead of flag_excess_precision_cmdline.
3744 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3745 * c-opts.c (c_common_post_options): Likewise.
3746
14b7950f
MS
37472019-08-22 Martin Sebor <msebor@redhat.com>
3748
3749 PR middle-end/91490
3750 * c-common.c (braced_list_to_string): Add argument and overload.
3751 Handle flexible length arrays and unions.
3752
8bb2ee59
EB
37532019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3754
3755 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3756 function declarations where arguments are missing. Rename variables.
3757
21c1e205
RB
37582019-08-15 Richard Biener <rguenther@suse.de>
3759
3760 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3761 enabled, define __SIZETYPE__.
3762
f0033821
CL
37632019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3764
3765 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3766 exclusion with "section" attribute.
3767 (attr_noinit_exclusions): New table.
3768 (handle_noinit_attribute): New function.
3769
4d732405
RS
37702019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3771
3772 PR middle-end/91421
3773 * c-common.c (resolve_overloaded_builtin): Use
3774 copy_decl_built_in_function.
3775
51ad8481
MS
37762019-08-13 Martin Sebor <msebor@redhat.com>
3777
3778 PR c/80619
3779 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3780 (asm_fprintf_length_spec): Same.
3781 * c-format.h (format_lengths): Add FMT_LEN_w.
3782
77eb117f
JJ
37832019-08-10 Jakub Jelinek <jakub@redhat.com>
3784
3785 * c-pragma.h (enum pragma_omp_clause): Add
3786 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3787
398e3feb
JJ
37882019-08-07 Jakub Jelinek <jakub@redhat.com>
3789
3790 * c-pragma.h (enum pragma_omp_clause): Add
3791 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3792 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3793 enumeration value.
3794
ab574db6
MP
37952019-08-05 Marek Polacek <polacek@redhat.com>
3796
3797 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3798 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3799 default for C++2a, unless -Wno-deprecated.
3800 * c.opt (Wcomma-subscript): New warning.
3801
554a530f
JJ
38022019-07-20 Jakub Jelinek <jakub@redhat.com>
3803
3804 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3805 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3806 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3807 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3808 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3809 constructs with the loop construct.
3810
1a888209
JJ
38112019-07-13 Jakub Jelinek <jakub@redhat.com>
3812
3813 PR c/91149
3814 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3815 OMP_CLAUSE_REDUCTION_TASK handling.
3816
1fdd6f04
JJ
38172019-07-12 Jakub Jelinek <jakub@redhat.com>
3818
3819 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3820 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3821
99b1c316
MS
38222019-07-09 Martin Sebor <msebor@redhat.com>
3823
3824 PR c++/61339
1fdd6f04 3825 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3826 and others to class.
3827 * c-pretty-print.h: Same.
3828
6c1dae73
MS
38292019-07-09 Martin Sebor <msebor@redhat.com>
3830
3831 PR c++/61339
3832 * c-format.c (check_argument_type): Change class-key from class to
3833 struct and vice versa to match convention and avoid -Wclass-is-pod
3834 and -Wstruct-no-pod.
3835 * c-pretty-print.h: Same.
3836
8ba6ea87
ML
38372019-07-03 Martin Liska <mliska@suse.cz>
3838
3839 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3840 dead assignemts.
3841
83eb9522
JJ
38422019-07-03 Jakub Jelinek <jakub@redhat.com>
3843
3844 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3845 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3846 with OMP_PARALLEL.
3847
1c6ffbab
QZ
38482019-07-02 qing zhao <qing.zhao@oracle.com>
3849
3850 PR preprocessor/90581
3851 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3852 * c.opt: Add new option -fmax-include-depth.
3853
7ffc7de5
JM
38542019-06-26 Jason Merrill <jason@redhat.com>
3855
3856 PR c++/55442 - memory-hog with highly recursive constexpr.
3857 * c.opt (fconstexpr-loop-limit): New.
3858
361af3e4
JJ
38592019-06-25 Jakub Jelinek <jakub@redhat.com>
3860
3861 PR sanitizer/90954
3862 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3863 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3864
ab20d992
JJ
38652019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3866
3867 * c-common.c (c_common_nodes_and_builtins): Define
3868 alternate "__intN__" name for "__intN" types.
3869
f4af4019
JH
38702019-06-24 Jan Hubicka <jh@suse.cz>
3871
3872 * c-common.c (braced_lists_to_strings): Check that
3873 type is array or integer prior checking string flag.
3874
da9e9b57
MB
38752019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3876
3877 PR c++/90875 - added -Wswitch-outside-range option
3878 * c.opt (Wswitch-outside-range): Added new option.
3879 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3880
3f3d6a6f
MP
38812019-06-21 Marek Polacek <polacek@redhat.com>
3882
3883 PR c++/90953 - ICE with -Wmissing-format-attribute.
3884 * c-common.c (check_function_arguments_recurse): Use
3885 get_attribute_name.
3886 (check_missing_format_attribute): Likewise.
3887
1bf32c11
MP
38882019-06-19 Marek Polacek <polacek@redhat.com>
3889
3890 PR c++/60364 - noreturn after first decl not diagnosed.
3891 * c-attribs.c (handle_noreturn_attribute): No longer static.
3892 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3893 Declare.
3894 * c-format.c (check_function_format): Use get_attribute_name.
3895
a04c0734
MS
38962019-06-19 Martin Sebor <msebor@redhat.com>
3897
3898 PR translation/90156
3899 * c-format.c (function_format_info::format_type): Adjust type.
3900 (function_format_info::is_raw): New member.
3901 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3902 (decode_format_attr): Adjust call to decode_format_type.
3903 Avoid a redundant call to convert_format_name_to_system_name.
3904 Avoid abbreviating the word "arguments" in a diagnostic.
3905 (format_warning_substr): New function.
3906 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3907 (finish_dollar_format_checking): Same.
3908 (check_format_info): Same.
3909 (struct baltoks_t): New.
3910 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3911 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3912 functions.
3913 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3914 maybe_diag_unbalanced_tokens.
3915 (handle_format_attribute): Spell out the word "arguments" in
3916 a diagnostic.
3917
d3786ebb
MB
39182019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3919
3920 PR c++/90449 - add -Winaccessible-base option.
3921 * c.opt (Winaccessible-base): New option.
3922
bf38f7e9
JJ
39232019-06-10 Jakub Jelinek <jakub@redhat.com>
3924
3925 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3926 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3927 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3928 combined/composite constructs where it is not allowed. Copy over
3929 OMP_CLAUSE_REDUCTION_INSCAN.
3930
0ecf545c
MS
39312019-06-05 Martin Sebor <msebor@redhat.com>
3932
3933 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3934 (handle_alias_ifunc_attribute): Same.
3935 (handle_copy_attribute): Same.
3936 (handle_weakref_attribute): Same.
3937 (handle_nonnull_attribute): Same.
3938 * c-warn.c (warn_for_sign_compare): Same.
3939 (warn_for_restrict): Same.
3940 * c.opt: Same.
3941
36b34127
MS
39422019-06-05 Martin Sebor <msebor@redhat.com>
3943
3944 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3945 * c.opt (-Wformat-diag): Remove a spurious period.
3946
357a352f
JJ
39472019-05-29 Jakub Jelinek <jakub@redhat.com>
3948
3949 PR c/90628
3950 * c-common.c (check_builtin_function_arguments)
3951 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3952 as last argument.
3953
2b8235ea
EB
39542019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3955
3956 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3957
6d86ddc4
ML
39582019-05-22 Martin Liska <mliska@suse.cz>
3959
3960 PR lto/90500
3961 * c-attribs.c (handle_copy_attribute): Do not copy
3962 target_clones attribute.
3963
419ba5b9
EB
39642019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3965
3966 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3967 * c-ada-spec.c (print_assignment_operator): New function.
3968 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3969 assignment operators declared as methods and filter out the others.
3970
e03436e7
TS
39712019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3972
3973 PR c/89433
3974 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3975 "omp declare target".
3976
a9c697b8
MS
39772019-05-16 Martin Sebor <msebor@redhat.com>
3978
ab20d992
JJ
3979 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3980 keywords, operators, and types in diagnostics.
3981 (handle_scalar_storage_order_attribute): Same.
3982 (handle_mode_attribute): Same.
3983 (handle_visibility_attribute): Same.
3984 (handle_assume_aligned_attribute): Same.
3985 (handle_no_split_stack_attribute): Same.
3986 * c-common.c (shorten_compare): Same.
3987 (c_common_truthvalue_conversion): Same.
3988 (cb_get_source_date_epoch): Same.
3989 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3990 in diagnostics.
3991 (interpret_float): Same.
3992 * c-omp.c (c_finish_omp_for): Same.
3993 * c-opts.c (c_common_post_options): Same.
3994 * c-pch.c (c_common_pch_pragma): Same.
3995 * c-pragma.c (pop_alignment): Same.
3996 (handle_pragma_pack): Same.
3997 (apply_pragma_weak): Same.
3998 (handle_pragma_weak): Same.
3999 (handle_pragma_scalar_storage_order): Same.
4000 (handle_pragma_redefine_extname): Same.
4001 (add_to_renaming_pragma_list): Same.
4002 (maybe_apply_renaming_pragma): Same.
4003 (push_visibility): Same.
4004 (handle_pragma_visibility): Same.
4005 (handle_pragma_optimize): Same.
4006 (handle_pragma_message): Same.
4007 * c-warn.c (warn_for_omitted_condop): Same.
4008 (lvalue_error): Same.
a9c697b8 4009
6b943512
RB
40102019-05-15 Richard Biener <rguenther@suse.de>
4011
4012 PR c/90474
4013 * c-common.c (c_common_mark_addressable_vec): Also mark
4014 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4015 c_mark_addressable.
ab20d992 4016
b744fc85
NS
40172019-05-06 Nathan Sidwell <nathan@acm.org>
4018
4019 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4020
598f50d7
NS
40212019-04-30 Nathan Sidwell <nathan@acm.org>
4022
4023 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4024
5bcc5a3b
ML
40252019-04-30 Martin Liska <mliska@suse.cz>
4026
4027 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4028 for unknown options.
4029
e78a87f7
RS
40302019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4031
4032 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4033 the pointer target rather than the pointer itself.
4034
c280b7ee
JJ
40352019-04-19 Jakub Jelinek <jakub@redhat.com>
4036
4037 PR c/89888
4038 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4039 arguments.
4040 (c_do_switch_warnings): Remove outside_range_p argument.
4041 * c-common.c (check_case_bounds): Removed.
4042 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4043 Don't call check_case_bounds. Fold low_value as well as high_value.
4044 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4045 Check for case labels outside of range of original type here and
4046 adjust them.
4047
8e8225e6
JJ
40482019-04-12 Jakub Jelinek <jakub@redhat.com>
4049
63b8a166
JJ
4050 PR translation/90041
4051 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4052 in the Warn diagnostics.
4053
8e8225e6
JJ
4054 PR c/89946
4055 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4056 function comment. Warn if arguments of the attribute are not positive
4057 integer constants.
4058
53a3f614
EB
40592019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4060
4061 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4062 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4063
22be5873
EB
40642019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4065
4066 * c-ada-spec.c (is_float128): New predicate extracted from...
4067 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4068 <REAL_TYPE>: ...here. Call it.
4069
34facf20
DM
40702019-04-05 David Malcolm <dmalcolm@redhat.com>
4071
4072 PR c/89985
4073 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4074 auto_diagnostic_group. Guard inform calls by result of
4075 warning_at call.
4076
05564120
MP
40772019-04-05 Marek Polacek <polacek@redhat.com>
4078
ab20d992 4079 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
4080 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4081 of RHS.
4082
7a506c3c
JM
40832019-04-03 Jason Merrill <jason@redhat.com>
4084
4085 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4086 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4087
ddeae8c8
MS
40882019-04-01 Martin Sebor <msebor@redhat.com>
4089
4090 PR c/89685
4091 * c-attribs.c (handle_copy_attribute): Handle references and
4092 non-constant expressions.
4093
a15ffa22
JJ
40942019-03-22 Jakub Jelinek <jakub@redhat.com>
4095
4096 PR c++/87481
4097 * c.opt (-fconstexpr-ops-limit=): New option.
4098
36a3a7a3
JJ
40992019-03-21 Jakub Jelinek <jakub@redhat.com>
4100
4101 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4102 template param.
4103
bec1da64
MS
41042019-03-19 Martin Sebor <msebor@redhat.com>
4105
4106 PR tree-optimization/89688
4107 * c-common.c (braced_list_to_string): Make static.
4108 (braced_lists_to_strings): Define new function.
4109 * c-common.h (braced_list_to_string): Remove.
4110 (braced_lists_to_strings): Declare.
4111
1fe61adf
ML
41122019-03-12 Martin Liska <mliska@suse.cz>
4113
4114 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4115
93964ebd
ML
41162019-03-11 Martin Liska <mliska@suse.cz>
4117
4118 * c-opts.c (c_common_post_options): Wrap apostrophes
4119 in gcc internal format with %'.
4120
a3f9f006
ML
41212019-03-11 Martin Liska <mliska@suse.cz>
4122
4123 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4124 in a string format message and fix GNU coding style.
4125 * c-common.c (vector_types_convertible_p): Likewise.
4126 (c_build_vec_perm_expr): Likewise.
4127 * c-indentation.c (get_visual_column): Likewise.
4128 * c-opts.c (c_common_handle_option): Likewise.
4129 (c_common_post_options): Likewise.
4130 (sanitize_cpp_opts): Likewise.
4131 * c-pch.c (c_common_pch_pragma): Likewise.
4132 * c-pragma.c (handle_pragma_pack): Likewise.
4133
1db01ff9
JJ
41342019-03-08 Jakub Jelinek <jakub@redhat.com>
4135
4136 PR tree-optimization/89550
4137 * c-common.c (c_common_truthvalue_conversion): Only set
4138 TREE_NO_WARNING if warning_at returned true.
4139 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4140
ba790e6f
JJ
41412019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4142 Martin Sebor <msebor@gmail.com>
4143
4144 * c.opt (Wmissing-attributes): Clean up doc string.
4145
7da73ba7
JJ
41462019-02-25 Jakub Jelinek <jakub@redhat.com>
4147
4148 PR c/89495
4149 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4150 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4151 checking.
4152
921bb9d1
RB
41532019-02-22 Richard Biener <rguenther@suse.de>
4154
4155 * c-pch.c (no_checksum): Remove.
4156 (pch_init): Remove assertion that executable_checksum is not
4157 all zero.
4158 (c_common_valid_pch): Likewise.
4159
e2ebb05c
MS
41602019-02-18 Martin Sebor <msebor@redhat.com>
4161
4162 PR middle-end/89294
4163 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4164
3fe53000
DM
41652019-02-16 David Malcolm <dmalcolm@redhat.com>
4166
4167 PR c++/88680
4168 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4169 implementing -Wtype-limits.
4170
28a8cef1
MS
41712019-02-11 Martin Sebor <msebor@redhat.com>
4172
4173 PR c++/87996
4174 * c-common.c (invalid_array_size_error): New function.
4175 (valid_array_size_p): Call it. Handle size as well as type.
4176 * c-common.h (valid_constant_size_p): New function.
4177 (enum cst_size_error): New type.
4178
ec2be203
DM
41792019-01-31 David Malcolm <dmalcolm@redhat.com>
4180
4181 PR c/89122
4182 * known-headers.cc (get_stdlib_header_for_name): Add
4183 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4184
8936f047
JJ
41852019-01-31 Jakub Jelinek <jakub@redhat.com>
4186
4187 PR libstdc++/88170
4188 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4189 a C cast in pp_c_flag_gnu_v3 mode.
4190
6a335b96
JJ
41912019-01-29 Jakub Jelinek <jakub@redhat.com>
4192
4193 PR c/86125
4194 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4195 builtin_structptr_types types even for C.
4196
2a06eba5
BE
41972019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4198
4199 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4200 when rhs is of array type correctly. Fix handling of nested structures.
4201 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4202 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4203 type casts within nested compound expressions.
4204
18a23298
JJ
42052019-01-22 Jakub Jelinek <jakub@redhat.com>
4206
4207 PR middle-end/88968
4208 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4209 variable after using BIT_FIELD_REF.
4210
420183d9
L
42112019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4212
4213 PR c/51628
4214 PR c/88664
4215 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4216 Remove the boolean argument.
4217 * c-warn.c (check_address_of_packed_member): Renamed to ...
4218 (check_address_or_pointer_of_packed_member): This. Also
4219 warn pointer conversion.
4220 (check_and_warn_address_of_packed_member): Renamed to ...
4221 (check_and_warn_address_or_pointer_of_packed_member): This.
4222 Also warn pointer conversion.
4223 (warn_for_address_or_pointer_of_packed_member): Remove the
4224 boolean argument. Don't check pointer conversion here.
4225
99063eee
RS
42262019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4227
4228 PR inline-asm/52813
4229 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4230
a30d0196
JJ
42312019-01-14 Jakub Jelinek <jakub@redhat.com>
4232
4233 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4234 and __cpp_nontype_template_parameter_auto. Add a comment that
4235 __cpp_template_auto is deprecated.
4236
2d91f79d
TH
42372019-01-14 Tom Honermann <tom@honermann.net>
4238
4239 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4240 * c-common.c (c_common_reswords): Add char8_t.
4241 (fix_string_type): Use char8_t for the type of u8 string literals.
4242 (c_common_get_alias_set): char8_t doesn't alias.
4243 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4244 C++.
4245 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4246 (keyword_begins_type_specifier): Add RID_CHAR8.
4247 * c-common.h (rid): Add RID_CHAR8.
4248 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4249 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4250 Define char8_type_node and char8_array_type_node.
4251 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4252 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4253 (c_cpp_builtins): Predefine __cpp_char8_t.
4254 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4255 CPP_UTF8STRING.
4256 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4257 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4258 targeting C++2a.
4259 * c.opt: Add the -fchar8_t command line option.
4260
23db6ced
MS
42612019-01-14 Martin Sebor <msebor@redhat.com>
4262
4263 PR target/88638
4264 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4265 and issue errors if it fails.
4266 * c-common.h (valid_format_string_type_p): Declare.
4267 * c-format.c (valid_stringptr_type_p): Rename...
4268 (valid_format_string_type_p): ...to this and make extern.
4269 (handle_format_arg_attribute): Adjust to new name.
4270 (check_format_string): Same.
4271
234c3818
L
42722019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4273
4274 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4275 Replace "may may" with "may" in warning message.
4276
d8fcab68
JJ
42772019-01-07 Jakub Jelinek <jakub@redhat.com>
4278
4279 PR c++/85052
4280 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4281 (c_build_vec_convert): Declare.
4282 * c-common.c (c_build_vec_convert): New function.
4283
29d24852
MS
42842019-01-04 Martin Sebor <msebor@redhat.com>
4285
4286 PR c/88546
4287 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4288 Handle C++ empty throw specification and C11 _Noreturn.
4289 (has_attribute): Also handle C11 _Noreturn.
4290
9069a4c9
MS
42912019-01-04 Martin Sebor <msebor@redhat.com>
4292
4293 PR c/88363
4294 * c-attribs.c (positional_argument): Also accept enumerated types.
4295
a5544970
JJ
42962019-01-01 Jakub Jelinek <jakub@redhat.com>
4297
4298 Update copyright years.
4299
da77eace
L
43002018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4301
4302 PR c/51628
4303 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4304 * c-warn.c (check_alignment_of_packed_member): New function.
4305 (check_address_of_packed_member): Likewise.
4306 (check_and_warn_address_of_packed_member): Likewise.
4307 (warn_for_address_or_pointer_of_packed_member): Likewise.
4308 * c.opt: Add -Wno-address-of-packed-member.
4309
573767d4
DM
43102018-12-20 David Malcolm <dmalcolm@redhat.com>
4311
4312 PR c++/87504
4313 * c-warn.c (get_outermost_macro_expansion): New function.
4314 (spelled_the_same_p): Use it to unwind the macro expansions, and
4315 compare the outermost macro in each nested expansion, rather than
4316 the innermost.
4317
a14feb3c
DM
43182018-12-19 David Malcolm <dmalcolm@redhat.com>
4319
4320 PR c++/87504
4321 * c-common.h (warn_tautological_cmp): Convert 1st param from
4322 location_t to const op_location_t &.
4323 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4324 when testing for INTEGER_CST.
4325 (warn_tautological_bitwise_comparison): Convert 1st param from
4326 location_t to const op_location_t &; use it to build a
4327 binary_op_rich_location, and use this.
4328 (spelled_the_same_p): New function.
4329 (warn_tautological_cmp): Convert 1st param from location_t to
4330 const op_location_t &. Warn for macro expansions if
4331 spelled_the_same_p. Use binary_op_rich_location.
4332
dfd7fdca
DM
43332018-12-19 David Malcolm <dmalcolm@redhat.com>
4334
4335 PR c++/43064
4336 PR c++/43486
4337 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4338 (verify_tree): Handle location wrappers.
4339 (c_common_truthvalue_conversion): Strip any location wrapper.
4340 Handle CONST_DECL.
4341 (fold_offsetof): Strip any location wrapper.
4342 (complete_array_type): Likewise for initial_value.
4343 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4344 index before checking for INTEGER_CST.
4345 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4346 print parentheses around location wrappers.
4347 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4348 before checking for INTEGER_CST.
4349 (warn_tautological_bitwise_comparison): Call
4350 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4351 before checking for INTEGER_CST.
4352 (readonly_error): Strip any location wrapper.
4353 (warn_array_subscript_with_type_char): Strip location wrappers
4354 before checking for INTEGER_CST. Use the location of the index if
4355 available.
4356
5c8b3702
JM
43572018-12-06 Jason Merrill <jason@redhat.com>
4358
4359 PR c++/88136 - -Wdeprecated-copy false positives
4360 * c.opt (Wdeprecated-copy-dtor): New.
4361 (Wdeprecated-copy): Move to -Wextra.
4362
673670da
MS
43632018-11-29 Martin Sebor <msebor@redhat.com>
4364
4365 PR c/88172
4366 PR testsuite/88208
4367 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4368 alignments to values less than the target requires.
4369 (has_attribute): For attribute aligned consider both the attribute
4370 and the alignment bits.
4371 * c-common.c (c_init_attributes): Optionally issue a warning for
4372 zero alignment.
4373
04864ec8
MS
43742018-11-28 Martin Sebor <msebor@redhat.com>
4375
4376 PR c/88065
4377 PR c/87297
4378 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4379 or destination is an error.
4380
ace83db0
JJ
43812018-11-28 Jakub Jelinek <jakub@redhat.com>
4382
4383 PR c++/88215
4384 * c-ubsan.c: Include langhooks.h.
4385 (ubsan_instrument_division): Change gcc_assert that main variants
4386 of op0 and op1 types are equal to gcc_checking_assert that the
4387 main variants are compatible types.
4388
da193a27
EB
43892018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4390
4391 * c-ada-spec.c: Include stringpool.h.
4392 (has_static_fields): Return false for incomplete types.
4393 (is_tagged_type): Likewise.
4394 (has_nontrivial_methods): Likewise.
4395 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4396 (struct overloaded_name_hash): New structure.
4397 (struct overloaded_name_hasher): Likewise.
4398 (overloaded_names): New global variable.
4399 (init_overloaded_names): New static function.
4400 (overloaded_name_p): New predicate.
4401 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4402 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4403 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4404 Remove always-true condition and dump forward types.
4405 (dump_ada_specs): Delete overloaded_names.
4406
98f08eb8
MS
44072018-11-20 Martin Sebor <msebor@redhat.com>
4408
4409 * c-attribs.c (type_for_vector_size): New function.
4410 (type_valid_for_vector_size): Same.
4411 (handle_vector_size_attribute): Move code to the functions above
4412 and call them.
4413 (validate_attribute, has_attribute): New functions.
4414 * c-common.h (has_attribute): Declare.
4415 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4416 * c-common.c (c_common_resword): Same.
4417
2674fa47
JM
44182018-11-16 Jason Merrill <jason@redhat.com>
4419
4420 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4421 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4422
258b3854
JJ
44232018-11-16 Jakub Jelinek <jakub@redhat.com>
4424
4425 PR middle-end/87854
4426 * c-common.c (fix_string_type): Reject string literals larger than
4427 TYPE_MAX_VALUE (ssizetype) bytes.
4428
1d249509
MS
44292018-11-15 Martin Sebor <msebor@redhat.com>
4430
4431 PR c++/87541
4432 PR c++/87542
4433 * c-attribs.c (positional_argument): New function.
4434 (handle_alloc_size_attribute): Use it and simplify.
4435 (handle_alloc_align_attribute): Same.
4436 (handle_assume_aligned_attribute): Same.
4437 (handle_nonnull_attribute): Same.
4438 * c-common.c (check_function_arguments): Pass fntype to
4439 check_function_format.
4440 * c-common.h (check_function_format): Add an argument.
4441 (PosArgFlags, positional_argument): Declare new type and function.
4442 * c-format.c (decode_format_attr): Add arguments.
4443 (check_format_string, get_constant): Same.
4444 (convert_format_name_to_system_name): Adjust.
4445
478dd60d
DM
44462018-11-15 David Malcolm <dmalcolm@redhat.com>
4447
4448 PR other/19165
4449 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4450
8cca0163
JJ
44512018-11-14 Jakub Jelinek <jakub@redhat.com>
4452
8ee09943
JJ
4453 P1236R1 - Signed integers are two's complement
4454 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4455 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4456 with in-range second operand well defined for -std=c++2a.
4457
8cca0163
JJ
4458 PR other/88007
4459 * c-common.c (parse_optimize_options): Allocate option string from
4460 opts_obstack rather than as GC memory. Move the allocation after
4461 warning for invalid option.
4462
620e594b
DM
44632018-11-13 David Malcolm <dmalcolm@redhat.com>
4464
4465 * c-common.c (c_get_substring_location): Update for renaming of
4466 get_source_location_for_substring to get_location_within_string.
4467 * c-lex.c: Replace "source_location" with "location_t".
4468 * c-opts.c: Likewise.
4469 * c-ppoutput.c: Likewise.
4470
f9731de3
MS
44712018-11-13 Martin Sebor <msebor@redhat.com>
4472
4473 PR middle-end/81824
4474 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4475 (handle_tls_model_attribute): Improve diagnostics.
4476
e4bd6d5e
JM
44772018-11-12 Jason Merrill <jason@redhat.com>
4478
a6bb6b07
JM
4479 * c-cppbuiltin.c (c_cpp_builtins): Define
4480 __cpp_impl_destroying_delete.
4481
e4bd6d5e
JM
4482 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4483 __cpp_conditional_explicit.
4484
79a2c428
MS
44852018-11-09 Martin Sebor <msebor@redhat.com>
4486
4487 PR middle-end/81824
4488 * c-attribs.c (handle_copy_attribute): New function.
4489
4c7bd361
MS
44902018-11-09 Martin Sebor <msebor@redhat.com>
4491
4492 PR c/87795
4493 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4494
28567c40
JJ
44952018-11-08 Jakub Jelinek <jakub@redhat.com>
4496
4497 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4498 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4499 enum omp_memory_order MEMORY_ORDER.
4500 (c_finish_omp_flush): Add MO argument.
4501 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4502 (c_finish_omp_for): Add FINAL_P argument.
4503 * c-omp.c: Include memmodel.h.
4504 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4505 OMP_TASKGROUP_CLAUSES to it.
4506 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4507 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4508 instead of OMP_ATOMIC_SEQ_CST.
4509 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4510 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4511 __atomic_thread_fence call with the given value.
4512 (check_omp_for_incr_expr): Formatting fixes.
4513 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4514 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4515 is not constant expression 1 or -1. Transform NE_EXPR loops
4516 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4517 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4518 loops too.
4519 (c_omp_split_clauses): Add support for combined
4520 #pragma omp parallel master and
4521 #pragma omp {,parallel }master taskloop{, simd} constructs.
4522 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4523 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4524 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4525 (c_omp_predetermined_sharing): Don't return
4526 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4527 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4528 PRAGMA_OMP_REQUIRES.
4529 * c-pragma.h (enum pragma_kind): Likewise.
4530 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4531 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4532
204839e7
DM
45332018-11-08 David Malcolm <dmalcolm@redhat.com>
4534
4535 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4536
d8010ee4
DM
45372018-11-08 David Malcolm <dmalcolm@redhat.com>
4538
4539 * c-format.c (local_cgraph_node_ptr_node): New variable.
4540 (gcc_dump_printf_char_table): Add entry for %C.
4541 (get_pointer_to_named_type): New function, taken from the handling
4542 code for "gimple *" from...
4543 (init_dynamic_diag_info): ...here. Add handling for
4544 "cgraph_node *".
4545 * c-format.h (T_CGRAPH_NODE): New.
4546
4be5c72c
JM
45472018-10-19 Jason Merrill <jason@redhat.com>
4548
4549 * c-cppbuiltin.c (c_cpp_builtins): Add
4550 __cpp_nontype_template_parameter_class.
4551
f3f6029d
NS
45522018-10-31 Nathan Sidwell <nathan@acm.org>
4553
ab5324fb
NS
4554 * c-opts.c (c_finish_options): Force command line macro
4555 location. Refactor to avoid repeating main debug hook.
4556 (push_command_line_include): Clarify comment.
4557
f3f6029d
NS
4558 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4559
91e3ec29
MS
45602018-10-30 Martin Sebor <msebor@redhat.com>
4561
4562 PR middle-end/87041
4563 * c-format.c (check_format_types): Avoid diagnosing null pointer
4564 arguments to printf-family of functions.
4565
b5ff4f5c
MP
45662018-10-30 Marek Polacek <polacek@redhat.com>
4567
4568 Implement P0892R2, explicit(bool).
4569 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4570
7e2de6df
DM
45712018-10-29 David Malcolm <dmalcolm@redhat.com>
4572
4573 * name-hint.h (name_hint::take_deferred): New member function.
4574
b2bf438c
DM
45752018-10-29 David Malcolm <dmalcolm@redhat.com>
4576
4577 PR c++/56856
4578 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4579 argument.
4580 (check_function_restrict): Rename param "argarray" to
4581 "unfolded_argarray", and make a copy named "argarray", calling
4582 fold_for_warn on each argument.
4583 (check_function_arguments): Add note about responsibility for
4584 folding the arguments.
4585
9f936c86
JM
45862018-10-17 Joseph Myers <joseph@codesourcery.com>
4587
4588 * c-common.c (flag_isoc2x): New variable.
4589 * c-common.h (clk_c): Update comment to reference C2X.
4590 (flag_isoc99, flag_isoc11): Update comments to reference future
4591 standard versions in general.
4592 (flag_isoc2x): Declare.
4593 * c-opts.c (set_std_c2x): New function.
4594 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4595 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4596 flag_isoc2x to 0.
4597 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4598
7a8a92c4
JM
45992018-10-17 Joseph Myers <joseph@codesourcery.com>
4600
4601 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4602 (std=iso9899:2018): Document C17 as published in 2018.
4603
4dc003ff
CL
46042018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4605
4606 PR c++/87364
4607 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4608
79371671
WW
46092018-10-11 Will Wray <wjwray@gmail.com>
4610
4611 PR c++/87364
4612 * c-pretty-print.h (pp_c_type_cast): Prototype.
4613 (pp_c_integer_constant): Likewise.
4614 * c-pretty-print.c (pp_c_type_cast): No longer static.
4615 (pp_c_integer_constant): Likewise.
4616 (pp_c_enumeration_constant): Fix loop termination when finding
4617 name of constant. No longer returns a value. Call
4618 pp_c_integer_constant.
4619 (c_pretty_printer::constant): Update for changes to
4620 pp_c_enumeration_constant.
4621
46c62690
JJ
46222018-10-11 Jakub Jelinek <jakub@redhat.com>
4623
4624 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4625 for no_unique_address.
4626
c24300ba
DM
46272018-10-09 David Malcolm <dmalcolm@redhat.com>
4628
4629 * c-common.c (c_option_controlling_cpp_error): Rename to...
4630 (c_option_controlling_cpp_diagnostic): ...this, and convert
4631 "reason" from int to enum.
4632 (c_cpp_error): Rename to...
4633 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4634 * c-common.h (c_cpp_error): Rename to...
4635 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4636 * c-opts.c (c_common_init_options): Update for renaming.
4637
8656dafa
RS
46382018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4639
4640 PR c/87286
4641 * c-common.c (vector_types_compatible_elements_p): Use
4642 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4643
8cff0652
VK
46442018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4645
4646 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4647 to generate constructor destructor priority warning.
4648 * c.opt (-Wprio-ctor-dtor): New option.
4649
bedf03a2
JM
46502018-10-01 Jason Merrill <jason@redhat.com>
4651
4652 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4653
6cc430c1
EB
46542018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4655
4656 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4657 (dump_ada_node): Add const keyword.
4658
87677ac7
ML
46592018-09-25 Martin Liska <mliska@suse.cz>
4660
4661 * c-common.c (c_common_truthvalue_conversion):
4662 Remove Pascal from documentation.
4663
518196cb
EB
46642018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4665
4666 * c-ada-spec.c: Include diagnostic.h.
4667 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4668
a599af84
MP
46692018-09-19 Marek Polacek <polacek@redhat.com>
4670
4671 * c.opt (Wclass-conversion): New.
4672
9c4a4b3c
DM
46732018-09-17 David Malcolm <dmalcolm@redhat.com>
4674
4675 * c-format.c (range_label_for_format_type_mismatch::get_text):
4676 Update for new param.
4677
c896ecfe
DM
46782018-09-17 David Malcolm <dmalcolm@redhat.com>
4679
4680 * c-format.c (format_warning_at_char): Update for introduction of
4681 format_string_diagnostic_t.
4682 (format_type_warning): Likewise.
4683
80c6d1f4
MJ
46842018-09-17 Martin Jambor <mjambor@suse.cz>
4685
4686 PR c/63886
4687 * c.opt (Wabsolute-value): New.
4688
6d900107
BE
46892018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4690
4691 * c-common.c (complete_flexible_array_elts): New helper function.
4692 * c-common.h (complete_flexible_array_elts): Declare.
4693
b5764229
BE
46942018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4695
4696 * c-common.c (braced_list_to_string): Remove eval parameter.
4697 Add some more checks. Always create zero-terminated STRING_CST.
4698 * c-common.h (braced_list_to_string): Adjust prototype.
4699
85204e23
DM
47002018-08-27 David Malcolm <dmalcolm@redhat.com>
4701
4702 PR 87091
4703 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4704 to a tri-state.
4705 (maybe_suggest_missing_token_insertion): Likewise.
4706 (maybe_add_include_fixit): Add param "override_location". If set,
4707 and source-printing is enabled, then override the rich_location's
4708 primary location with that of the insertion point for the fix-it
4709 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4710 * c-common.h (extern void maybe_add_include_fixit): Add bool
4711 param.
4712 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4713 for conversion of show_caret_p to a tri-state.
4714 * c-warn.c (warn_for_restrict): Likewise.
4715 * known-headers.cc
4716 (suggest_missing_header::~suggest_missing_header): Update call to
4717 maybe_add_include_fixit to suggest overriding the location, as it
4718 is for a note.
4719
3d78e008
ML
47202018-08-27 Martin Liska <mliska@suse.cz>
4721
4722 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4723 fndecl_built_in_p and remove check for FUNCTION_DECL if
4724 possible.
3d78e008
ML
4725 (check_builtin_function_arguments): Likewise.
4726 (reject_gcc_builtin): Likewise.
4727 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4728
b5be6d0c
MP
47292018-08-26 Marek Polacek <polacek@redhat.com>
4730
4731 PR c++/87029, Implement -Wredundant-move.
4732 * c.opt (Wredundant-move): New option.
4733
79ca9c35
MP
47342018-08-21 Marek Polacek <polacek@redhat.com>
4735
4736 PR c++/86981, Implement -Wpessimizing-move.
4737 * c.opt (Wpessimizing-move): New option.
4738
097f82ec
DM
47392018-08-20 David Malcolm <dmalcolm@redhat.com>
4740
4741 PR other/84889
4742 * c-attribs.c (common_handle_aligned_attribute): Add
4743 auto_diagnostic_group instance.
4744 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4745 * c-opts.c (c_common_post_options): Likewise.
4746 * c-warn.c (warn_logical_not_parentheses): Likewise.
4747 (warn_duplicated_cond_add_or_warn): Likewise.
4748 (warn_for_multistatement_macros): Likewise.
4749
3fb558b1
NS
47502018-08-20 Nathan Sidwell <nathan@acm.org>
4751
4752 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4753 access.
4754
800c0e98
NS
47552018-08-17 Nathan Sidwell <nathan@acm.org>
4756
4757 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4758 field.
4759 (laxy_hex_fp_value_count): Make unsigned.
4760 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4761 manipulate the macro.
4762 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4763 cpp_define_lazily.
4764
6f795a92
DM
47652018-08-17 David Malcolm <dmalcolm@redhat.com>
4766
4767 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4768 (gcc_dump_printf_length_specs): New.
4769 (gcc_dump_printf_flag_pairs): New.
4770 (gcc_dump_printf_flag_specs): New.
4771 (gcc_dump_printf_char_table): New.
4772 (format_types_orig): Add entry for "gcc_dump_printf".
4773 (init_dynamic_diag_info): Set up length_char_specs and
4774 conversion_specs for gcc_dump_printf_format_type.
4775 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4776
c5d725c0
NS
47772018-08-17 Nathan Sidwell <nathan@acm.org>
4778
10f04917
NS
4779 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4780
c5d725c0
NS
4781 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4782 * c-cppbuiltin.c: Likewise.
4783
c0c12356
ML
47842018-08-17 Martin Liska <mliska@suse.cz>
4785
4786 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4787 Ignore/Deprecated flag. Warning is done automatically for
4788 Deprecated flags.
c0c12356 4789
10fcc142
DM
47902018-08-16 David Malcolm <dmalcolm@redhat.com>
4791
4792 PR c++/70693
4793 * c-common.c (selftest::c_family_tests): Call
4794 selftest::c_indentation_c_tests.
4795 * c-common.h (selftest::c_indentation_c_tests): New decl.
4796 * c-indentation.c: Include "selftest.h".
4797 (next_tab_stop): Add "tab_width" param, rather than accessing
4798 cpp_opts.
4799 (get_visual_column): Likewise. Clarify comment. Bulletproof
4800 against reading past the end of the line.
4801 (get_first_nws_vis_column): Add "tab_width" param.
4802 (detect_intervening_unindent): Likewise.
4803 (should_warn_for_misleading_indentation): Read tab width from
4804 cpp_opts and pass around.
4805 (selftest::test_next_tab_stop): New test.
4806 (selftest::assert_get_visual_column_succeeds): New function.
4807 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4808 (selftest::assert_get_visual_column_fails): New function.
4809 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4810 (selftest::test_get_visual_column): New test.
4811 (selftest::c_indentation_c_tests): New function.
4812
3f6677f4
NS
48132018-08-16 Nathan Sidwell <nathan@acm.org>
4814
4815 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4816 (store_ada_macro): Likewise.
4817 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4818 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4819
96e6ae57
DM
48202018-08-15 David Malcolm <dmalcolm@redhat.com>
4821
4822 * c-format.c: Include "selftest-diagnostic.h" and
4823 "gcc-rich-location.h".
4824 (format_warning_at_char): Pass NULL for new label params of
4825 format_warning_va.
4826 (class indirection_suffix): New class.
4827 (class range_label_for_format_type_mismatch): New class.
4828 (format_type_warning): Move logic for generating "*" suffix to
4829 class indirection_suffix. Create "fmt_label" and "param_label"
4830 to show their types, and pass them to the
4831 format_warning_at_substring calls.
4832 (selftest::test_type_mismatch_range_labels): New test.
4833 (selftest::c_format_c_tests): Call it.
4834
23aa9f7c
MS
48352018-08-13 Martin Sebor <msebor@redhat.com>
4836
4837 PR tree-optimization/71625
4838 * c-common.c (braced_list_to_string): New function.
4839 * c-common.h (braced_list_to_string): Declare it.
4840
f10a9135
NS
48412018-08-08 Nathan Sidwell <nathan@acm.org>
4842
4843 * c-common.c (try_to_locate_new_include_inertion_point): Use
4844 linemap_included_from_linemap.
4845 * c-lex.c (fe_file_change): Use linemap_included_from.
4846 * c-ppoutput.c (pp_file_change): Likewise.
4847
8a45b051
MS
48482018-08-01 Martin Sebor <msebor@redhat.com>
4849
4850 PR tree-optimization/86650
ab20d992 4851 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4852 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4853 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4854 * c-format.h (T89_G): Update to be "gimple *" rather than
4855 "gcall *".
4856 (local_gcall_ptr_node): Rename...
4857 (local_gimple_ptr_node): ...to this.
4858
e540ccc0
DM
48592018-07-31 David Malcolm <dmalcolm@redhat.com>
4860
4861 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4862 table entries for gcc_diag_char_table, and the 'Z' entry from
4863 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4864 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4865 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4866 adding missing "Z" for this table. Remove erroneous "G" and "K"
4867 entries.
4868 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4869 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4870 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4871
425fc685
RE
48722018-07-31 Richard Earnshaw <rearnsha@arm.com>
4873
4874 * c-common.c (speculation_safe_resolve_call): New function.
4875 (speculation_safe_resolve_params): New function.
4876 (speculation_safe_resolve_return): New function.
4877 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4878 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4879 __HAVE_SPECULATION_SAFE_VALUE.
4880
181463c2
DM
48812018-07-20 David Malcolm <dmalcolm@redhat.com>
4882
4883 * c-common.c (c_cpp_error): Remove redundant "line_table"
4884 parameter from call to rich_location::set_range.
4885 (maybe_suggest_missing_token_insertion): Likewise.
4886
0d7f9065
MS
48872018-07-20 Martin Sebor <msebor@redhat.com>
4888
4889 PR middle-end/82063
ab20d992 4890 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4891
00abf86c
MS
48922018-07-20 Martin Sebor <msebor@redhat.com>
4893
4894 PR middle-end/82063
4895 * c-common.h (c_common_handle_option): Change function argument
4896 to HOST_WIDE_INT.
4897 * c-opts.c (c_common_init_options): Same.
4898 (c_common_handle_option): Same. Remove special handling of
4899 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4900 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4901 options to take a HOST_WIDE_INT argument and accept a byte-size
4902 suffix. Initialize.
4903 (-Wvla-larger-than): Same.
4904 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4905 (-Wno-vla-larger-than): Same.
4906
9b452033
JJ
49072018-07-12 Jakub Jelinek <jakub@redhat.com>
4908
4909 * c-attribs.c (c_common_attribute_table): Add
4910 "omp declare target implicit" attribute.
4911
cd0762f3
RB
49122018-07-12 Richard Biener <rguenther@suse.de>
4913
4914 PR c/86453
4915 * c-attribs.c (handle_packed_attribute): Do not build a variant
4916 type with TYPE_PACKED, instead ignore the attribute if we may
4917 not apply to the original type.
4918
0b27c3ed
JJ
49192018-07-10 Jakub Jelinek <jakub@redhat.com>
4920
4921 PR c++/86443
4922 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4923 to contain TREE_LIST for both the original class iterator and the
4924 "last" helper var.
4925
e730a0ef
EB
49262018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4927
4928 * c-ada-spec.c (to_ada_name): Remove index parameter.
4929 (pp_ada_tree_identifier): Likewise.
4930 (dump_ada_macros): Adjust call to to_ada_name.
4931 (struct overloaded_name_hash): Delete.
4932 (struct overloaded_name_hasher): Likewise.
4933 (overloaded_names): Likewise.
4934 (compute_overloading_index): Likewise.
4935 (dump_ada_decl_name): Do not call compute_overloading_index and
4936 adjust calls to pp_ada_tree_identifier.
4937 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4938 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4939 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4940 (dump_ada_enum_type): Remove type and display_convention parameters.
4941 Adjust calls to pp_ada_tree_identifier.
4942 (dump_ada_node): Likewise and for dump_ada_structure.
4943 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4944 and tidy up.
4945 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4946 syntax.
4947 (print_constructor): Adjust call to pp_ada_tree_identifier.
4948 (print_destructor): Likewise.
4949 (dump_ada_declaration): Switch to aspect syntax.
4950 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4951 parameter with nested parameter.
4952 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4953 (dump_ada_specs): Do not delete overloaded_names table.
4954
8de583fc
PB
49552018-07-06 Peter Bergner <bergner@linux.ibm.com>
4956
4957 PR target/86324
e730a0ef 4958 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4959 target hook.
4960
09cff37b
NS
49612018-07-05 Nathan Sidwell <nathan@acm.org>
4962
4963 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4964 NO_IMPLICIT_EXTERN_C.
4965
98086b2b
ML
49662018-06-28 Martin Liska <mliska@suse.cz>
4967
4968 * cppspec.c: Include opt-suggestions.h.
4969
ab20d992
JJ
49702018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4971 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4972 Cesar Philippidis <cesar@codesourcery.com>
4973
4974 * c-pragma.h (enum pragma_omp_clause): Add
4975 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4976 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4977
f41b7612
JJ
49782018-06-20 Jakub Jelinek <jakub@redhat.com>
4979
4980 PR c++/86210
4981 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4982 comment.
4983
4252ccd7
MS
49842018-06-18 Martin Sebor <msebor@redhat.com>
4985
4986 PR middle-end/85602
4987 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4988 nonstring.
4989
e197e64e
KV
49902018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4991
4992 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4993
34a7a230
JM
49942018-06-13 Jason Merrill <jason@redhat.com>
4995
5cef3733
JM
4996 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4997 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4998 handling.
4999
34a7a230
JM
5000 PR c++/86094 - wrong code with defaulted move ctor.
5001 * c-opts.c (c_common_post_options): Bump the current ABI version to
5002 13. Set warn_abi_version and flag_abi_compat_version to the current
5003 version rather than 0. Fix defaulting flag_abi_compat_version from
5004 warn_abi_version.
5005
bb0f14ae
MS
50062018-06-12 Martin Sebor <msebor@redhat.com>
5007
5008 PR c/85931
5009 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5010 sizeof source and destination yields the same value.
5011
3713f2e2
ML
50122018-06-12 Martin Liska <mliska@suse.cz>
5013
5014 * c.opt: Make MPX-related options as Deprecated.
5015
4af78ef8
DM
50162018-06-08 David Malcolm <dmalcolm@redhat.com>
5017
5018 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5019 rather than 0.
5020
31db0fe0
ML
50212018-06-08 Martin Liska <mliska@suse.cz>
5022
5023 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5024 for MPX (macros, related functions, fields in cgraph_node, ...).
5025 (handle_bnd_legacy): Likewise.
5026 (handle_bnd_instrument): Likewise.
5027 * c.opt: Likewise.
5028
fe16acf2
JJ
50292018-06-06 Jakub Jelinek <jakub@redhat.com>
5030
5031 PR c++/86068
5032 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5033 __cpp_transactional_memory to 201500 instead of 210500.
5034
4dbdb49b
JM
50352018-06-06 Jason Merrill <jason@redhat.com>
5036
5037 PR c++/85710 - ICE with -Wmemset-elt-size.
5038 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5039
f8ad043f
JM
50402018-06-01 Jason Merrill <jason@redhat.com>
5041
5042 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5043 201703.
5044
abc24d93
EB
50452018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5046
5047 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5048 declaration for a typedef independently of whether the declaration of
5049 the subtype is generated.
5050
d258f4aa
MS
50512018-05-31 Martin Sebor <msebor@redhat.com>
5052
5053 PR c/82063
5054 * c.opt (-Wno-alloc-size-larger-than): New option.
5055
b67b9225
DP
50562018-04-22 David Pagan <dave.pagan@oracle.com>
5057
5058 PR c/55976
5059 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 5060 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
5061 differentiate between default (no option), -Wreturn-type, and
5062 -Wno-return-type.
5063
04eb9c55
JM
50642018-05-29 Jason Merrill <jason@redhat.com>
5065
5066 * c.opt (Winit-list-lifetime): New flag.
5067
b0c31bc6
BE
50682018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5069
5070 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5071 splay_tree_delete_pointers.
5072
44284983
JJ
50732018-05-26 Jakub Jelinek <jakub@redhat.com>
5074
5075 PR bootstrap/85921
5076 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5077 noinline variable to workaround broken kernel headers.
5078
b46b715d
JM
50792018-05-18 Jason Merrill <jason@redhat.com>
5080
5081 * c.opt (Wdeprecated-copy): New flag.
5082
40659769
ML
50832018-05-17 Martin Liska <mliska@suse.cz>
5084
5085 * c-warn.c (overflow_warning): Do not use
5086 space in between 'G_' and '('.
5087
403962ea
JM
50882018-05-09 Jason Merrill <jason@redhat.com>
5089
5090 * c-common.c (valid_array_size_p): Add complain parameter.
5091 * c-common.h: ...which defaults to true.
5092
1c9ee609
JJ
50932018-05-11 Jakub Jelinek <jakub@redhat.com>
5094
5095 PR c/85696
5096 * c-omp.c (c_omp_predetermined_sharing): Return
5097 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5098
19916065
ML
50992018-05-11 Martin Liska <mliska@suse.cz>
5100
92a285c1 5101 PR sanitizer/85556
19916065
ML
5102 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5103 TREE_LIST values.
5104
79e7b1fe
JJ
51052018-05-10 Jakub Jelinek <jakub@redhat.com>
5106
5107 PR c++/85662
5108 * c-common.h (fold_offsetof_1): Removed.
5109 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5110 CTX argument defaulted to ERROR_MARK.
5111 * c-common.c (fold_offsetof_1): Renamed to ...
5112 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5113 argument, convert the pointer constant to TYPE and use size_binop
5114 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5115 a pointer type. Adjust recursive calls.
5116
86c12f76
EB
51172018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5118
5119 PR c++/85400
5120 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5121
ee336e84
NS
51222018-05-07 Nathan Sidwell <nathan@acm.org>
5123
5124 * c.opt (ffor-scope): Remove functionality, issue warning.
5125
6c072e21
NS
51262018-05-03 Nathan Sidwell <nathan@acm.org>
5127
5128 * c.opt (ffriend-injection): Remove functionality, issue warning.
5129
2cc7d3a7
DM
51302018-05-01 David Malcolm <dmalcolm@redhat.com>
5131
5132 PR c/84258
5133 * c-format.c (struct format_check_results): Add field
5134 "number_non_char".
5135 (check_format_info): Initialize it, and warn if encountered.
5136 (check_format_arg): Distinguish between wide char and
5137 everything else when detecting arrays of non-char.
5138
7761dfbe
DM
51392018-04-30 David Malcolm <dmalcolm@redhat.com>
5140
5141 * c-format.c (get_corrected_substring): Update for
5142 location_get_source_line returning a char_span. Use a char_span
5143 when handling the prefix of the correction.
5144 * c-indentation.c (get_visual_column): Update for
5145 location_get_source_line returning a char_span.
5146 (get_first_nws_vis_column): Likewise.
5147
62e98ef1
DM
51482018-03-29 David Malcolm <dmalcolm@redhat.com>
5149
5150 PR c++/84269
5151 * known-headers.cc (get_stdlib_header_for_name): Add various names
5152 from <assert.h>, <string.h>, and <memory.h>; add more names from
5153 <stdio.h>.
5154
a7dea617
JJ
51552018-03-27 Jakub Jelinek <jakub@redhat.com>
5156
5157 PR c++/85061
5158 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5159 get_base_address of the second operand is a VAR_P, rather than the
5160 operand itself, and use gcc_checking_assert instead of gcc_assert.
5161
889a3a30
MP
51622018-03-23 Marek Polacek <polacek@redhat.com>
5163
5164 PR c++/85045
5165 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5166 <case RDIV_EXPR>: Tweak condition.
5167
452154b9
EB
51682018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5169
5170 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5171
63ecb626
JJ
51722018-03-16 Jakub Jelinek <jakub@redhat.com>
5173
ce811fc4
JJ
5174 PR c/84909
5175 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5176 diagnostics.
5177
63ecb626
JJ
5178 PR c/84910
5179 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5180 diagnostics.
5181
a1295eec
RB
51822018-03-16 Richard Biener <rguenther@suse.de>
5183
5184 PR c/84873
5185 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5186 unshare the possibly folded expression.
5187
919674fb
RB
51882018-03-15 Richard Biener <rguenther@suse.de>
5189
5190 PR c/84873
5191 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5192
f99309b2
MS
51932018-03-13 Martin Sebor <msebor@redhat.com>
5194
5195 PR tree-optimization/84725
5196 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5197 with all three narrow character types, including their qualified forms.
5198
e9b9fa4c
MS
51992018-03-12 Martin Sebor <msebor@redhat.com>
5200
5201 PR tree-optimization/83456
ab20d992 5202 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5203 Restore checking of bounded built-in functions.
5204 (check_function_arguments): Also return the result
5205 of warn_for_restrict.
ab20d992
JJ
5206 * c-common.c (check_function_restrict): Return bool.
5207 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5208
0805d020
MP
52092018-03-02 Marek Polacek <polacek@redhat.com>
5210
5211 PR c++/84171
5212 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5213 is erroneous.
5214
ed2a2f08
TS
52152018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5216
5217 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5218 function".
5219
90abdde0
MP
52202018-03-01 Marek Polacek <polacek@redhat.com>
5221
5222 PR c++/84639
5223 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5224 alignment in computation.
5225
c6db43fa
EB
52262018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5227
5228 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5229 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5230
9e25c7ed
EB
52312018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5232
5233 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5234 (is_char_array): Take a type instead of a declaration.
5235 (dump_ada_array_type): Likewise.
5236 (is_simple_enum): Minor tweak.
5237 (dump_ada_enum_type): New function extracted from...
5238 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5239 <INTEGER_TYPE>: Remove unreachable code.
5240 <RECORD_TYPE>: Likewise. Minor tweaks.
5241 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5242 <ENUMERAL_TYPE>: New case.
5243 <RECORD_TYPE>: Factor out common code.
5244 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5245 Minor tweaks. Deal with enumeral types.
5246 (dump_ada_structure): Minor tweaks.
5247
09de3550
EB
52482018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5249
5250 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5251 address for incomplete structures.
5252 (dump_forward_type): Do not bail out for incomplete structures.
5253 (dump_ada_declaration): Do not special-case incomplete structures
5254 for subtypes. Dump them as null records for types.
5255
095d8d4b
EB
52562018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5257
5258 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5259 (is_char_array): Fix formatting.
5260 (dump_template_types): Likewise.
5261 (dump_generic_ada_node): Rename into...
5262 (dump_ada_node): ...this.
5263 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5264 incomplete structures and not for empty structures. Do not use it
5265 when forward declarations are needed.
5266 (dump_forward_type): New function.
5267 (dump_nested_types): Remove FORWARD parameter. Do not consider
5268 TREE_VISITED and do not generate a forward declaration. Only dump
5269 original nested types for nested declaration.
5270 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5271 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5272 <RECORD_TYPE>: Do not consider TREE_VISITED.
5273 (dump_ada_declaration): Use booleans and fix formatting throughout.
5274 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5275 Call dump_forward_type instead of dump_nested_types for a typedef.
5276 Remove superfluous check and adjust call to dump_nested_types.
5277 <POINTER_TYPE>: Call dump_forward_type and fall through.
5278 (dump_ada_struct_decl): Rename into...
5279 (dump_ada_structure): ...this. Do not special-case empty structures.
5280
d4cfd486
MS
52812018-02-27 Martin Sebor <msebor@redhat.com>
5282
5283 PR c++/83871
5284 * c.opt (-Wmissing-attributes): New option.
5285
b22dbd03
ML
52862018-02-21 Martin Liska <mliska@suse.cz>
5287
5288 * c.opt (Wcatch-value=): Add IntegerRange.
5289
883dfe2a
JM
52902018-02-15 Jason Merrill <jason@redhat.com>
5291
5292 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5293
0444aa9c
NS
52942018-02-09 Nathan Sidwell <nathan@acm.org>
5295
5296 PR c/84293
5297 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5298 arg.
5299 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5300 arg. Adjust.
5301
cea71f0a
MS
53022018-02-09 Martin Sebor <msebor@redhat.com>
5303
5304 PR lto/84212
5305 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5306 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5307 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5308 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5309 (-Wuninitialized): Same.
5310
8c8b7be5
EB
53112018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5312
5313 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5314 keyword for components.
5315
7c30b12a
PC
53162018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5317
5318 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5319
eece7fe5
JK
53202018-02-02 Julia Koval <julia.koval@intel.com>
5321
5322 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5323
7d07a93a
MP
53242018-01-29 Marek Polacek <polacek@redhat.com>
5325
5326 PR c/83966
5327 * c-format.c (check_function_format): Check current_function_decl.
5328
53723269
JJ
53292018-01-27 Jakub Jelinek <jakub@redhat.com>
5330
5331 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5332 argument.
5333 (LAZY_HEX_FP_VALUES_CNT): Define.
5334 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5335 values rather than just 12.
5336 (builtin_define_with_hex_fp_value): Likewise.
5337
7365279f
BK
53382018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5339
92a285c1
ML
5340 PR other/70268
5341 * c.opt (-fmacro-prefix-map): New option.
5342 * c-opts.c (c_common_handle_option): Handle it.
5343 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5344 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5345
bb9869d5
DM
53462018-01-17 David Malcolm <dmalcolm@redhat.com>
5347
5348 PR c++/83814
5349 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5350
68dc87c3
EB
53512018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5352
5353 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5354 Skip 'f' and 'F' characters if it is true.
5355 (store_ada_macro): Minor tweak.
5356 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5357 <CPP_WSTRING>: Likewise.
5358 <CPP_STRING>: Output '&' in the buffer if not the first string.
5359 <CPP_NUMBER>: Adjust calls to dump_number.
5360
9a004410
DM
53612018-01-10 David Malcolm <dmalcolm@redhat.com>
5362
5363 PR c++/43486
5364 * c-common.c: Include "selftest.h".
5365 (get_atomic_generic_size): Perform the test for integral type
5366 before the range test for any integer constant, fixing indentation
5367 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5368 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5369 (selftest::test_fold_for_warn): New function.
5370 (selftest::c_common_c_tests): New function.
5371 (selftest::c_family_tests): Call it, and
5372 selftest::c_pretty_print_c_tests.
5373 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5374 * c-format.c (check_format_arg): Convert VAR_P check to a
5375 fold_for_warn.
5376 * c-pretty-print.c: Include "selftest.h".
5377 (pp_c_cast_expression): Don't print casts for location wrappers.
5378 (selftest::assert_c_pretty_printer_output): New function.
5379 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5380 (selftest::test_location_wrappers): New function.
5381 (selftest::c_pretty_print_c_tests): New function.
5382 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5383
5c0caeb3
RS
53842018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5385 Alan Hayward <alan.hayward@arm.com>
5386 David Sherwood <david.sherwood@arm.com>
5387
5388 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5389
73a699ae
RS
53902018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5391 Alan Hayward <alan.hayward@arm.com>
5392 David Sherwood <david.sherwood@arm.com>
5393
5394 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5395 as polynomial.
5396
928686b1
RS
53972018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5398 Alan Hayward <alan.hayward@arm.com>
5399 David Sherwood <david.sherwood@arm.com>
5400
5401 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5402 (convert_vector_to_array_for_subscript): Handle polynomial
5403 TYPE_VECTOR_SUBPARTS.
5404 (c_common_type_for_mode): Check valid_vector_subparts_p.
5405 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5406 VECTOR_CST_NELTS.
5407
85ec4feb
JJ
54082018-01-03 Jakub Jelinek <jakub@redhat.com>
5409
5410 Update copyright years.
5411
170a8bd6 54122017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5413 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5414
5415 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5416 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5417
ab20d992 54182017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5419
5420 PR debug/83527
5421 PR debug/83419
5422 * c-semantics.c (only_debug_stmts_after_p): New.
5423 (pop_stmt_list): Clear side effects in debug-only stmt list.
5424 Check for single nondebug stmt followed by debug stmts only.
5425
c12d20d4
AO
54262017-12-21 Alexandre Oliva <aoliva@redhat.com>
5427
5428 PR debug/83419
5429 * c-semantics.c (pop_stmt_list): Propagate side effects from
5430 single nondebug stmt to container list.
5431
01512446
JJ
54322017-12-19 Jakub Jelinek <jakub@redhat.com>
5433
5434 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5435 conditions with typical order conditions.
5436
82cfbd01
MP
54372017-12-18 Marek Polacek <polacek@redhat.com>
5438
5439 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5440 not in effect.
5441
99da11ec
MS
54422017-12-17 Martin Sebor <msebor@redhat.com>
5443
5444 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5445 an error for attribute warn_if_not_aligned.
5446
cc8bea0a
MS
54472017-12-16 Martin Sebor <msebor@redhat.com>
5448
5449 PR tree-optimization/78918
5450 * c-common.c (check_function_restrict): Avoid checking built-ins.
5451 * c.opt (-Wrestrict): Include in -Wall.
5452
4849deb1
JJ
54532017-12-15 Jakub Jelinek <jakub@redhat.com>
5454
5455 * c-attribs.c (c_common_attribute_table,
5456 c_common_format_attribute_table): Swap affects_type_identity
5457 and handler fields, adjust comments.
5458
c65e18d3
BE
54592017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5460
5461 * c.opt (Wcast-function-type): New warning option.
5462 * c-lex.c (get_fileinfo): Avoid warning.
5463 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5464
2004617a
QZ
54652017-12-14 Qing Zhao <qing.zhao@oracle.com>
5466
7365279f 5467 PR middle_end/79538
2004617a
QZ
5468 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5469 Adjust the size of buf1 and buf2, add a new buf to avoid
5470 format-overflow warning.
5471
ab20d992 54722017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5473
5474 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5475 subsequent statement list.
5476
5d9ae53d
MS
54772017-12-07 Martin Sebor <msebor@redhat.com>
5478
5479 PR c/81544
5480 PR c/81566
5481 * c-attribs.c (attr_aligned_exclusions): New array.
5482 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5483 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5484 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5485 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5486 (attr_warn_unused_result_exclusions): Same.
5487 (handle_hot_attribute, handle_cold_attribute): Simplify.
5488 (handle_const_attribute): Warn on function returning void.
5489 (handle_pure_attribute): Same.
5490 (handle_aligned_attribute): Diagnose conflicting attribute
5491 specifications.
5492 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5493
c79144f8
DM
54942017-12-06 David Malcolm <dmalcolm@redhat.com>
5495
5496 PR c/83236
5497 * c-common.c (selftest::c_family_tests): Call
5498 selftest::c_spellcheck_cc_tests.
5499 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5500 * c-spellcheck.cc: Include "selftest.h".
5501 (name_reserved_for_implementation_p): New function.
5502 (should_suggest_as_macro_p): New function.
5503 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5504 should_suggest_as_macro_p and call it.
5505 (selftest::test_name_reserved_for_implementation_p): New function.
5506 (selftest::c_spellcheck_cc_tests): New function.
5507 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5508
613bc14f
DM
55092017-12-06 David Malcolm <dmalcolm@redhat.com>
5510
5511 * c-spellcheck.cc: New file, taken from macro-handling code in
5512 spellcheck-tree.c.
5513 * c-spellcheck.h: New file, taken from macro-handling code in
5514 spellcheck-tree.h.
5515
e76c7157
JJ
55162017-12-01 Jakub Jelinek <jakub@redhat.com>
5517
5518 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5519 attribute.
5520 (handle_simd_attribute): Don't check for "cilk simd function"
5521 attribute. Reindent, formatting changes.
5522
b0da4034
JK
55232017-11-30 Julia Koval <julia.koval@intel.com>
5524
5525 * c-common.h (inv_list): Remove.
5526
058f0b9e
JJ
55272017-11-28 Jakub Jelinek <jakub@redhat.com>
5528
5529 PR sanitizer/81275
5530 * c-common.c (c_switch_covers_all_cases_p_1,
5531 c_switch_covers_all_cases_p): New functions.
5532 * c-common.h (c_switch_covers_all_cases_p): Declare.
5533
5e9d6aa4 55342017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5535 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5536
5537 * array-notation-common.c: Delete.
5538 * c-cilkplus.c: Ditto.
5539 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5540 * c-common.def (ARRAY_NOTATION_REF): Remove.
5541 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5542 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5543 c_validate_cilk_plus_loop, cilkplus_an_parts,
5544 cilk_ignorable_spawn_rhs_op,
5545 cilk_recognize_spawn): Remove.
5546 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5547 * c-omp.c: Remove CILK_SIMD check.
5548 * c-pragma.c: Ditto.
5549 * c-pragma.h: Remove CILK related pragmas.
5550 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5551 ARRAY_NOTATION_REF condition.
5552 (c_pretty_printer::expression): Ditto.
5553 * c.opt (fcilkplus): Remove.
5554 * cilk.c: Delete.
5555
1af4ebf5
MG
55562017-11-21 Marc Glisse <marc.glisse@inria.fr>
5557
5558 * c-pretty-print.c (pp_c_additive_expression,
5559 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5560
d44ed508
JJ
55612017-11-21 Jakub Jelinek <jakub@redhat.com>
5562
7d2f0f9b
JJ
5563 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5564
d44ed508
JJ
5565 PR c++/83059
5566 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5567 instead of tree_to_uhwi, formatting fix.
5568
26edace6
DM
55692017-11-20 David Malcolm <dmalcolm@redhat.com>
5570
5571 PR c/81404
5572 * known-headers.cc: New file, based on material from c/c-decl.c.
5573 (suggest_missing_header): Copied as-is.
5574 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5575 heavily edited to add C++ support. Add some knowledge about
5576 <limits.h>, <stdint.h>, and <wchar.h>.
5577 * known-headers.h: Likewise.
5578
6c7a259b
DM
55792017-11-20 David Malcolm <dmalcolm@redhat.com>
5580
5581 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5582 (lookup_name_fuzzy): Likewise. Convert return type from
5583 const char * to name_hint. Add location_t param.
5584 * name-hint.h: New header.
5585
f9c59f7e
JJ
55862017-11-19 Jakub Jelinek <jakub@redhat.com>
5587
5588 PR c/66618
5589 PR c/69960
5590 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5591
1e39313a
JM
55922017-11-16 Joseph Myers <joseph@codesourcery.com>
5593
5594 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5595 expected publication date of C17.
5596 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5597
3ca0dc60
JM
55982017-11-15 Joseph Myers <joseph@codesourcery.com>
5599
5600 PR c/81156
5601 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5602 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5603
025d57f0
MS
56042017-11-10 Martin Sebor <msebor@redhat.com>
5605
5606 PR c/81117
5607 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5608 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5609 * c.opt (-Wstringop-truncation): New option.
5610
1b6fa695
ML
56112017-11-06 Martin Liska <mliska@suse.cz>
5612
5613 PR middle-end/82404
5614 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5615 FE.
5616 * c.opt: Set default value of warn_return_type.
5617
64a5912c
DM
56182017-10-31 David Malcolm <dmalcolm@redhat.com>
5619
5620 * c-common.c (binary_op_error): Update for renaming of
5621 error_at_rich_loc.
5622 (c_parse_error): Likewise.
5623 * c-warn.c (warn_logical_not_parentheses): Likewise for
5624 renaming of inform_at_rich_loc.
5625 (warn_for_restrict): Likewise for renaming of
5626 warning_at_rich_loc_n.
5627
c76dc9c3
JM
56282017-10-30 Joseph Myers <joseph@codesourcery.com>
5629
5630 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5631 * c-opts.c (set_std_c17): New function.
5632 (c_common_init_options): Use gnu17 as default C version.
5633 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5634
ee5fd23a
MM
56352017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5636
5637 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5638 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5639 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5640 __FP_FAST_FMA<N>X.
5641
d1047465
MP
56422017-10-23 Marek Polacek <polacek@redhat.com>
5643
5644 PR c/82681
5645 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5646
9e878cf1
EB
56472017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5648
5649 * c-common.c (check_builtin_function_arguments): Also check arguments
5650 of __builtin_alloca_with_align_and_max.
5651
89b6abbb
DM
56522017-10-17 David Malcolm <dmalcolm@redhat.com>
5653
5654 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5655 rather than NULL to format_warning_va.
5656 (check_format_types): Likewise when calling format_type_warning.
5657 Remove code to extract source_ranges and source_range * in favor
5658 of just a location_t.
5659 (format_type_warning): Convert source_range * param to a
5660 location_t.
5661
39382c09
JJ
56622017-10-13 Jakub Jelinek <jakub@redhat.com>
5663
5664 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5665 [LR]SHIFT_EXPR.
5666
62e1c678
DM
56672017-10-12 David Malcolm <dmalcolm@redhat.com>
5668
5669 * c-common.c (enum missing_token_insertion_kind): New enum.
5670 (get_missing_token_insertion_kind): New function.
5671 (maybe_suggest_missing_token_insertion): New function.
5672 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5673
b90c9338
NS
56742017-10-11 Nathan Sidwell <nathan@acm.org>
5675
5676 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5677 (c_common_handle_option): Update incpath_kind names.
5678
3a266bcd
ML
56792017-10-11 Martin Liska <mliska@suse.cz>
5680
5681 PR sanitizer/82490
5682 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5683 Wattributes warning.
5684
8e6cdc90
RS
56852017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5686
5687 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5688 operating on trees as wide_ints.
5689 * c-common.c (pointer_int_sum): Likewise.
5690 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5691 * c-warn.c (match_case_to_enum_1): Likewise.
5692 (c_do_switch_warnings): Likewise.
5693 (maybe_warn_shift_overflow): Likewise.
5694
802b38c9
JJ
56952017-10-10 Jakub Jelinek <jakub@redhat.com>
5696
5697 PR c/82437
5698 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5699 instead of wide_int::from.
5700
4e34b338
JJ
57012017-10-06 Jakub Jelinek <jakub@redhat.com>
5702
5703 PR c/82437
5704 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5705 using to_widest use wide_int with the larger of the two precisions.
5706
4bc4b2b4
BE
57072017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5708
5709 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5710 functions.
5711
a1488398
RS
57122017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5713
5714 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5715 when combining the original unconverted comparison operands.
5716
01c9fb68
JJ
57172017-09-29 Jakub Jelinek <jakub@redhat.com>
5718
5719 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5720 attribute.
5721
6e3e8419
EB
57222017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5723
5724 * c-ada-spec.c (to_ada_name): Add index parameter.
5725 (pp_ada_tree_identifier): Likewise.
5726 (dump_ada_macros): Adjust call to to_ada_name.
5727 (struct overloaded_name_hash): New type.
5728 (struct overloaded_name_hasher): Likewise.
5729 (overloaded_names): New hash table.
5730 (compute_overloading_index): New function.
5731 (dump_ada_decl_name): Call it and pass the result to
5732 pp_ada_tree_identifier.
5733 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5734 (dump_ada_function_declaration): Likewise.
5735 (dump_generic_ada_node): Likewise.
5736 (print_constructor): Likewise.
5737 (print_destructor): Likewise.
5738 (dump_ada_specs): Delete overloaded_names table.
5739
79310774
EB
57402017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5741
5742 * c-ada-spec.c (max_ada_macros): Move around.
5743 (store_ada_macro_index): Likewise.
5744 (source_file): Rename into...
5745 (macro_source_file): ...this.
5746 (count_ada_macro): Move around.
5747 (store_ada_macro): Likewise.
5748 (compare_macro): Likewise.
5749 (print_ada_macros): Merge in...
5750 (dump_ada_macros): ...this.
5751 (source_file_base): Rename into...
5752 (current_source_file): ...this.
5753 (print_comment): Move around.
5754 (dump_ada_nodes): Call dump_ada_declaration directly.
5755 (struct with): Change type of limited field to bool.
5756 (append_withs): Change type of limited_access parameter to bool.
5757 (pp_ada_tree_identifie): Likewise.
5758 (dump_ada_decl_nam): Likewise.
5759 (dump_generic_ada_node): Likewise. Do not print the return type.
5760 (to_ada_name): Change type of space_found parameter to bool.
5761 (dump_ada_function_declaration): Return void and change type of
5762 parameters to bool. Also print the return type for a function.
5763 (print_ada_methods): Rename into...
5764 (dump_ada_methods): ...this.
5765 (print_ada_declaration): Rename into ...
5766 (dump_ada_declaration): ...this. Do not print the return type.
5767 (print_ada_struct_decl): Rename into...
5768 (dump_ada_struct_decl): ...this.
5769
7d386d45
JJ
57702017-09-29 Jakub Jelinek <jakub@redhat.com>
5771
5772 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5773 rather than DECL_INITIAL.
5774 (common_handle_aligned_attribute): Likewise.
5775
ab20d992 57762017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5777
5778 * c.opt (gen-decls): Add RejectNegative.
5779
026a79f7
AS
57802017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5781 Jakub Jelinek <jakub@redhat.com>
5782
5783 Add support for -std=c++2a.
5784 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5785 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5786 * c-opts.c (set_std_cxx2a): New.
5787 (c_common_handle_option): Set options when -std=c++2a is enabled.
5788 (c_common_post_options): Adjust comments.
5789 (set_std_cxx14, set_std_cxx17): Likewise.
5790
4a8ca690
EB
57912017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5792
5793 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5794 message for non-uniform endianness and issue a warning in C++.
5795
7b936140
JJ
57962017-09-15 Jakub Jelinek <jakub@redhat.com>
5797
5798 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5799 (Wc++17-compat): Change from undocumented alias to option.
5800 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5801 change C++1z to C++17 in description.
5802 (std=c++1z, std=gnu++1z): Change from option to undocumented
5803 deprecated alias.
5804 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5805 Adjust description.
5806 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5807 * c-opts.c (set_std_cxx1z): Rename to ...
5808 (set_std_cxx17): ... this.
5809 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5810 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5811 caller.
7b936140
JJ
5812 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5813 comments.
5814
12263f13
L
58152017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5816
5817 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5818 function alignment if warn_if_not_aligned_p is true.
5819
6836632e
NS
58202017-09-12 Nathan Sidwell <nathan@acm.org>
5821
5822 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5823 resort_sorted_fields): Move to c/c-decl.c.
5824 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5825 (struct sorted_fields_type): Move to c/c-lang.h.
5826
019bf9ad
JW
58272017-09-09 Jonathan Wakely <jwakely@redhat.com>
5828
5829 PR c++/81852
5830 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5831
bc7fe952
MP
58322017-09-04 Marek Polacek <polacek@redhat.com>
5833
5834 PR c/81783
5835 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5836 (warn_tautological_cmp): Call it.
5837
ab20d992 58382017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5839
5840 * c-opts.c (c_common_finish): Write dependency information even if
5841 there are errors.
5842
d2e05fcb
JJ
58432017-09-01 Jakub Jelinek <jakub@redhat.com>
5844
5845 PR c/81887
5846 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5847 (omp_pragmas_simd): ... here.
5848 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5849 create new clauses list containing just simd clause.
5850
18e2a8b8
RS
58512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5852 Alan Hayward <alan.hayward@arm.com>
5853 David Sherwood <david.sherwood@arm.com>
5854
5855 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5856 into scalar_mode_supported_p call.
5857 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5858
16d22000
RS
58592017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5860 Alan Hayward <alan.hayward@arm.com>
5861 David Sherwood <david.sherwood@arm.com>
5862
5863 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5864 for the mode iterator.
5865
b397965c
RS
58662017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5867 Alan Hayward <alan.hayward@arm.com>
5868 David Sherwood <david.sherwood@arm.com>
5869
5870 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5871 * c-common.c (c_build_vec_perm_expr): Likewise.
5872
357b7604
RS
58732017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5874 Alan Hayward <alan.hayward@arm.com>
5875 David Sherwood <david.sherwood@arm.com>
5876
5877 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5878
e05c94ba
RS
58792017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5880 Alan Hayward <alan.hayward@arm.com>
5881 David Sherwood <david.sherwood@arm.com>
5882
5883 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5884 before calling targetm.addr_space.valid_pointer_mode.
5885
5c20c4af
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-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5891
c94843d2 58922017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5893 Alan Hayward <alan.hayward@arm.com>
5894 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5895
5896 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5897 iterators.
5898 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5899
4e10a5a7
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-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5905 case statements.
5906
130fcab0
ML
59072017-08-29 Martin Liska <mliska@suse.cz>
5908
5909 PR other/39851
5910 * c-common.c (parse_optimize_options): Add argument to function
5911 call.
5912 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5913
14e18d71
DM
59142017-08-24 David Malcolm <dmalcolm@redhat.com>
5915
5916 * c-lex.c (interpret_float): Use token location
5917 when building an EXCESS_PRECISION_EXPR.
5918
2f687306
DM
59192017-08-21 David Malcolm <dmalcolm@redhat.com>
5920
5921 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5922 it to check_function_format.
5923 * c-common.h (check_function_arguments): Add vec<location_t> *
5924 param.
5925 (check_function_format): Likewise.
5926 * c-format.c (struct format_check_context): Add field "arglocs".
5927 (check_function_format): Add param "arglocs"; pass it to
5928 check_format_info.
ab20d992 5929 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5930 new field of format_ctx.
5931 (check_format_arg): Pass format_ctx->arglocs to new param of
5932 check_format_info_main.
5933 (class argument_parser): New field "arglocs".
5934 (argument_parser::argument_parser): Add "arglocs_" param and use
5935 it to initialize new field.
5936 (argument_parser::check_argument_type): Pass new arglocs field to
5937 check_format_types.
5938 (check_format_info_main): Add param "arglocs", and use it when
5939 constructing arg_parser.
5940 (check_format_types): Add param "arglocs"; use it if non-NULL when
5941 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5942
00aa1fa2
L
59432017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5944
5945 PR c/53037
5946 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5947 (c_common_attribute_table): Add warn_if_not_aligned.
5948 (handle_aligned_attribute): Renamed to ...
5949 (common_handle_aligned_attribute): Remove argument, name, and add
5950 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5951 (handle_aligned_attribute): New.
5952 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5953
27be025d
MS
59542017-08-14 Martin Sebor <msebor@redhat.com>
5955
5956 PR c/81117
5957 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5958 (handle_nonstring_attribute): New function.
5959
da67acb9
MS
59602017-08-14 Martin Sebor <msebor@redhat.com>
5961
5962 PR c/81117
5963 * c-format.h (T89_G): New macro.
5964 * c-format.c (local_gcall_ptr_node): New variable.
5965 (init_dynamic_diag_info): Initialize it.
5966
a8b522b4
ML
59672017-08-11 Martin Liska <mliska@suse.cz>
5968
5969 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5970 TARGET_SUPPORTS_ALIASES.
5971
32129a17
DM
59722017-08-10 David Malcolm <dmalcolm@redhat.com>
5973
5974 * c-common.c (c_parse_error): Add rich_location * param, using it
5975 rather implicitly using input_location.
5976 * c-common.h (c_parse_error): Add rich_location * param.
5977
30af3a2b
MP
59782017-08-09 Marek Polacek <polacek@redhat.com>
5979
5980 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5981 (c_common_truthvalue_conversion): Likewise.
5982 * c-omp.c (c_finish_omp_atomic): Likewise.
5983 * c-common.h (build_binary_op): Update declaration.
5984
314e6352
ML
59852017-08-08 Martin Liska <mliska@suse.cz>
5986
5987 * c-ada-spec.c: Include header files.
5988 * c-ubsan.c: Likewise.
5989 * c-warn.c: Likewise.
5990
56b5041c
JJ
59912017-08-07 Jakub Jelinek <jakub@redhat.com>
5992
5993 PR c/69389
5994 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5995
db440138
EB
59962017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5997
5998 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5999 (print_ada_methods): Likewise.
6000 (print_ada_declaration): Likewise.
6001
577eec56
ML
60022017-08-07 Martin Liska <mliska@suse.cz>
6003
6004 * array-notation-common.c: Add new includes.
6005 * c-format.c( handle_format_attribute): Canonicalize a format
6006 function name.
6007 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6008 attribute.
6009 * c-pretty-print.c: Add new include.
6010
b854df3c
EB
60112017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6012
6013 * c-ada-spec.c (has_static_fields): Look only into variables.
6014 (print_constructor): Add TYPE parameter and use it for the name.
6015 (print_destructor): Likewise.
6016 (print_ada_declaration): Adjust to new constructor/destructor names.
6017 Adjust calls to print_constructor and print_destructor.
6018 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6019 Look only into variables in the final loop.
6020
9f2cb25e
EB
60212017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6022
6023 * c-ada-spec.c (has_static_fields): Look only into fields.
6024 (dump_generic_ada_node): Small tweak.
6025 (dump_nested_types): Look only into fields.
6026 (print_ada_declaration): Look only into methods. Small tweak.
6027 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6028
f4bcd9eb
EB
60292017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6030
6031 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6032 (dump_ada_function_declaration): Likewise.
6033 (dump_generic_ada_node): Likewise.
6034 (print_ada_declaration): Add support for const-qualified variables.
6035
f34ebeb2
ML
60362017-07-31 Martin Liska <mliska@suse.cz>
6037
6038 PR sanitize/81530
6039 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6040 Guard condition with flag_sanitize_p also with current_function_decl
6041 non-null equality.
6042 (ubsan_maybe_instrument_reference_or_call): Likewise.
6043
218e5d04
UB
60442017-07-30 Uros Bizjak <ubizjak@gmail.com>
6045
6046 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6047
942047f2
EB
60482017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6049
6050 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6051 for enumeral types.
6052 (print_ada_declaration): Add missing guard for record types.
6053
a40ff0ae
JJ
60542017-07-27 Jakub Jelinek <jakub@redhat.com>
6055
6056 PR c/45784
6057 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6058 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6059 new COMPOUND_EXPRs around the rhs of the comparison.
6060
06bd22f6
MP
60612017-07-27 Marek Polacek <polacek@redhat.com>
6062
6063 PR c/81417
6064 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6065 the types.
6066
036ea399
JJ
60672017-07-27 Jakub Jelinek <jakub@redhat.com>
6068
6069 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6070 (handle_noipa_attribute): New function.
6071
417ca011
TD
60722017-07-07 Torsten Duwe <duwe@suse.de>
6073
6074 * c-attribs.c (c_common_attribute_table): Add entry for
6075 "patchable_function_entry".
6076
5aaa8fb4
NS
60772017-07-20 Nathan Sidwell <nathan@acm.org>
6078
6079 Remove TYPE_METHODS.
6080 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6081 dump_ada_template, print_ada_methods,
6082 print_ada_declaration): Member fns are on TYPE_FIELDS.
6083
ff22eb12
NS
60842017-07-18 Nathan Sidwell <nathan@acm.org>
6085
6086 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6087
eea77d1f
DM
60882017-07-14 David Malcolm <dmalcolm@redhat.com>
6089
6090 * c-common.c (try_to_locate_new_include_insertion_point): New
6091 function.
6092 (per_file_includes_t): New typedef.
6093 (added_includes_t): New typedef.
6094 (added_includes): New variable.
6095 (maybe_add_include_fixit): New function.
6096 * c-common.h (maybe_add_include_fixit): New decl.
6097
281ac396
MS
60982017-07-10 Martin Sebor <msebor@redhat.com>
6099
6100 PR other/81345
6101 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6102
b6f43128
DM
61032017-07-06 David Malcolm <dmalcolm@redhat.com>
6104
6105 * c-common.c (selftest::c_family_tests): New.
6106 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6107 (selftest::c_family_tests): New decl.
6108
efbf55b0
MP
61092017-07-04 Marek Polacek <polacek@redhat.com>
6110
6111 PR c/81231
6112 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6113 types.
6114
6c86bd88
MP
61152017-07-04 Marek Polacek <polacek@redhat.com>
6116
6117 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6118
17a7218b
ML
61192017-06-28 Martin Liska <mliska@suse.cz>
6120
6121 PR ipa/81128
6122 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6123 to a function declaration.
6124
63010089
ML
61252017-06-28 Martin Liska <mliska@suse.cz>
6126
6127 PR driver/79659
6128 * c.opt: Add IntegerRange to various options.
6129
3e2becc4
MP
61302017-06-26 Marek Polacek <polacek@redhat.com>
6131
6132 PR c/80116
6133 * c-common.h (warn_for_multistatement_macros): Declare.
6134 * c-warn.c: Include "c-family/c-indentation.h".
6135 (warn_for_multistatement_macros): New function.
6136 * c.opt (Wmultistatement-macros): New option.
6137 * c-indentation.c (guard_tinfo_to_string): No longer static.
6138 Change the parameter type to "enum rid". Handle RID_SWITCH.
6139 * c-indentation.h (guard_tinfo_to_string): Declare.
6140
2db9b7cd
MG
61412017-06-23 Marc Glisse <marc.glisse@inria.fr>
6142
6143 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6144
c3684b7b
MS
61452017-06-15 Martin Sebor <msebor@redhat.com>
6146
6147 PR c++/80560
6148 * c.opt (-Wclass-memaccess): New option.
6149
e72c4afd
BK
61502017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6151
6152 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6153
8a516588
MP
61542017-06-13 Marek Polacek <polacek@redhat.com>
6155
6156 PR objc/80949
6157 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6158 branches is null.
6159
45b2222a
ML
61602017-06-13 Martin Liska <mliska@suse.cz>
6161
6162 PR sanitize/78204
6163 * c-attribs.c (add_no_sanitize_value): New function.
6164 (handle_no_sanitize_attribute): Likewise.
6165 (handle_no_sanitize_address_attribute): Use the function.
6166 (handle_no_sanitize_thread_attribute): New function.
6167 (handle_no_address_safety_analysis_attribute): Use
6168 add_no_sanitize_value.
6169 (handle_no_sanitize_undefined_attribute): Likewise.
6170 * c-common.h: Declare new functions.
6171 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6172 (ubsan_instrument_shift): Likewise.
6173 (ubsan_instrument_bounds): Likewise.
6174 (ubsan_maybe_instrument_array_ref): Likewise.
6175 (ubsan_maybe_instrument_reference_or_call): Likewise.
6176
a01f151f
JM
61772017-06-11 Jason Merrill <jason@redhat.com>
6178
6179 * c-ada-spec.c, c-pragma.c: Use id_equal.
6180
3de4ac6d
MP
61812017-06-04 Marek Polacek <polacek@redhat.com>
6182
6183 PR c/80919
6184 * c-format.c (matching_type_p): Return false if any of the types
6185 requires structural equality.
6186
2474f48f
MS
61872017-06-02 Martin Sebor <msebor@redhat.com>
6188
6189 PR c/80892
6190 * c-warn.c (conversion_warning): Use -Wconversion for integer
6191 conversion and -Wfloat-conversion for floating one.
6192
40ffd95f
BE
61932017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6194
6195 * c.opt (Wsizeof-pointer-div): New warning option.
6196
3fa4634c
VR
61972017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6198
6199 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6200 (Wcatch-value=1): Enable by -Wall.
6201
f012c8ef
DM
62022017-05-30 David Malcolm <dmalcolm@redhat.com>
6203
6204 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6205 format_chars.
6206 * c.opt (fdiagnostics-show-template-tree): New option.
6207 (felide-type): New option.
6208
63dbcd13
VR
62092017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6210
6211 * c.opt (Wcatch-value=): New C++ warning flag.
6212
be136b5c
NS
62132017-05-24 Nathan Sidwell <nathan@acm.org>
6214
6215 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6216 const casts to avoid warning.
6217
3cd211af
MS
62182017-05-24 Martin Sebor <msebor@redhat.com>
6219
6220 PR c/80731
6221 * c-common.h (unsafe_conversion_p): Add a function argument.
6222 * c-common.c (unsafe_conversion_p): Same.
6223 Add type names and values to diagnostics.
6224 (scalar_to_vector): Adjust.
6225 * c-warn.c (constant_expression_error): Add a function argument.
6226 Add type names and values to diagnostics.
6227 (conversion_warning): Add a function argument.
6228 Add type names and values to diagnostics.
6229 (warnings_for_convert_and_check): Same.
6230
1ff7be5a
JM
62312017-05-19 Jason Merrill <jason@redhat.com>
6232
6233 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6234 enumerators.
6235
ff502317
BE
62362017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6237
6238 * c-format.c (locus): Move out of function scope,
6239 add GTY attribute.
6240
2a8a8d7b
NS
62412017-05-19 Nathan Sidwell <nathan@acm.org>
6242
6243 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6244 (c_common_parse_file): Remove class dump handling.
6245 (get_dump_info): Likewise.
6246
39aac208
RB
62472017-05-19 Richard Biener <rguenther@suse.de>
6248
6249 PR c++/80593
6250 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6251 to alias-set zero memory.
6252
6ecd2339
BE
62532017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6254
6255 * c-format.c (local_tree_type_node): Add GTY attribute.
6256
6574d78e
MP
62572017-05-18 Marek Polacek <polacek@redhat.com>
6258
6259 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6260 (c_common_fixed_point_type_for_size): Likewise.
6261 (c_common_type_for_mode): Likewise.
6262 (shorten_compare): Likewise.
6263 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6264 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6265
e3455240
MP
62662017-05-18 Marek Polacek <polacek@redhat.com>
6267
6268 * c-common.c (self_promoting_args_p): Change the return type to bool.
6269 Use false/true instead of 0/1.
6270 * c-common.h (self_promoting_args_p): Update.
6271
3fa8871b
MP
62722017-05-17 Marek Polacek <polacek@redhat.com>
6273
6274 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6275 * c-warn.c: Likewise.
6276
b42cc3ca
VV
62772017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6278
6279 Implement new C++ intrinsics __is_assignable and __is_constructible.
6280 * c-common.c (__is_assignable, __is_constructible): New.
6281 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6282
1a817418
ML
62832017-05-17 Martin Liska <mliska@suse.cz>
6284
6285 * c-common.h: Introduce dump_flags_t type and
6286 use it instead of int type.
6287 * c-gimplify.c (c_genericize): Likewise.
6288 * c-opts.c: Likewise.
6289
b2fa0a8b
MP
62902017-05-17 Marek Polacek <polacek@redhat.com>
6291
6292 * c-common.c (c_save_expr): Remove.
6293 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6294 * c-common.h (c_save_expr): Remove declaration.
6295
31c2d57d
VR
62962017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6297
6298 PR c/35441
6299 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6300 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6301 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6302 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6303 RDIV_EXPR.
6304 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6305
684f84de
MP
63062017-05-09 Marek Polacek <polacek@redhat.com>
6307
6308 PR c/80525
6309 * c-warn.c (unwrap_c_maybe_const): New.
6310 (warn_logical_operator): Call it.
6311
641da50a
NS
63122017-05-09 Nathan Sidwell <nathan@acm.org>
6313
6314 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6315 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6316
631238ac
MS
63172017-05-08 Martin Sebor <msebor@redhat.com>
6318
6319 PR translation/80280
6320 * c-format.h (struct format_flag_spec): Add new member.
6321 (T89_T): New macro.
6322 * c-format.c (local_tree_type_node): New global.
6323 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6324 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6325 (strfmon_flag_specs): Likewise.
6326 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6327 with distinct quoting properties.
6328 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6329 (flag_chars_t::validate): Add argument and handle bad quoting.
6330 (check_format_info_main): Handle quoting problems.
6331 (init_dynamic_diag_info): Simplify.
6332
49f0c04c
JM
63332017-05-08 Jason Merrill <jason@redhat.com>
6334
6335 * c-opts.c (c_common_post_options): Update defaults for
6336 flag_abi_version and flag_abi_compat_version.
6337
56d35585
DM
63382017-05-05 David Malcolm <dmalcolm@redhat.com>
6339
6340 * c-common.c (c_cpp_error): Replace report_diagnostic
6341 with diagnostic_report_diagnostic.
6342
0f2c4a8f
MS
63432017-05-04 Martin Sebor <msebor@redhat.com>
6344
6345 PR translation/80280
6346 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6347 (handle_weakref_attribute): Same.
6348
6fe63fb4
NS
63492017-05-03 Nathan Sidwell <nathan@acm.org>
6350
6351 Canonicalize canonical type hashing
6352 * c-common.c (complete_array_type): Use type_hash_canon.
6353
815d9cc6
XR
63542017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6355
92a285c1 6356 PR c++/80038
815d9cc6
XR
6357 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6358 prototype.
6359 (cilk_install_body_pedigree_operations): Likewise.
6360 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6361 detatched.
6362 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6363 (cilk_install_body_pedigree_operations): Likewise.
6364 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6365 unwrapping.
6366
f8a36447
JJ
63672017-04-27 Jakub Jelinek <jakub@redhat.com>
6368
6369 PR c++/80534
6370 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6371 flag on non-aggregate element types.
6372
7c145456
BE
63732017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6374
6375 * c-common.c (c_type_hasher, type_hash_table): Remove.
6376 (c_common_get_alias_set): Remove unreachable code.
6377 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6378
c3cbcd45
VR
63792017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6380
6381 * c.opt (Wextra-semi): New C++ warning flag.
6382
8a59d466
JJ
63832017-04-20 Jakub Jelinek <jakub@redhat.com>
6384
6385 PR middle-end/80423
6386 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6387
8487c9a5
JJ
63882017-04-18 Jakub Jelinek <jakub@redhat.com>
6389
6390 PR middle-end/79788
6391 PR middle-end/80375
6392 * c-common.c (c_common_type_for_mode): Don't handle
6393 widest_*_literal_type_node here.
6394 c_common_signed_or_unsigned_type): Likewise.
6395 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6396 to *intTI_type_node or *intDI_type_node depending on whether
6397 TImode is supported by the target or not.
6398
3ee0fb02
ML
63992017-04-10 Martin Liska <mliska@suse.cz>
6400
6401 PR sanitizer/80350
6402 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6403 doing an UBSAN check.
6404
5764ee3c
JW
64052017-04-03 Jonathan Wakely <jwakely@redhat.com>
6406
6407 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6408
6f3af356
JJ
64092017-03-31 Jakub Jelinek <jakub@redhat.com>
6410
6411 PR c++/79572
6412 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6413 tree *.
6414 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6415 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6416 REFERENCE_TYPE.
6417
f6a7a9d5
DM
64182017-03-31 David Malcolm <dmalcolm@redhat.com>
6419
6420 PR documentation/78732
6421 * c.opt (Wendif-labels): Fix description to refer to
6422 #else rather than #elif.
6423
af88f557
JJ
64242017-03-31 Jakub Jelinek <jakub@redhat.com>
6425
6426 PR libstdc++/80251
6427 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6428 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6429
a9e4a1a5
JJ
64302017-03-27 Jakub Jelinek <jakub@redhat.com>
6431
6432 PR middle-end/80162
6433 * c-common.c (c_common_mark_addressable_vec): Don't set
6434 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6435
3f01b620
MS
64362017-03-21 Martin Sebor <msebor@redhat.com>
6437
6438 PR c++/79548
6439 * c-common.c (set_underlying_type): Mark type used only when
6440 original del is declared unused.
6441
2f6f187a
DM
64422017-03-10 David Malcolm <dmalcolm@redhat.com>
6443
6444 PR translation/79848
6445 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6446 "%qs".
6447
a02fa805
DM
64482017-03-10 David Malcolm <dmalcolm@redhat.com>
6449
6450 PR c/79921
6451 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6452 from inform's message, so that xgettext can locate it.
6453
822a132c
MP
64542017-03-09 Marek Polacek <polacek@redhat.com>
6455
6456 PR c++/79962
6457 PR c++/79984
6458 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6459 conversion to the attribute list.
6460
bba81f1c
ML
64612017-03-09 Martin Liska <mliska@suse.cz>
6462
6463 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6464
108154ff
JM
64652017-03-03 Jason Merrill <jason@redhat.com>
6466
6467 * c.opt (Wnoexcept-type): New.
6468
eb0e7c34
RB
64692017-03-02 Richard Biener <rguenther@suse.de>
6470
6471 PR c/79756
6472 * c-common.c (c_common_mark_addressable_vec): Look through
6473 C_MAYBE_CONST_EXPR.
6474
9453ba0a
ML
64752017-02-28 Martin Liska <mliska@suse.cz>
6476
6477 * c.opt: Replace space with tabular for options of <number>
6478 type.
6479
6a825afe
ML
64802017-02-28 Martin Liska <mliska@suse.cz>
6481
6482 * c.opt: Fix --help=option -Q for options which are of
6483 an enum type.
6484
4227c9ad
JJ
64852017-02-24 Jakub Jelinek <jakub@redhat.com>
6486
6487 PR c++/79588
6488 * c-common.c (check_function_restrict): New function.
6489 (check_function_arguments): Add FNDECL argument. Call
6490 check_function_restrict if -Wrestrict.
6491 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6492 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6493 * c-common.h (check_function_arguments): Add FNDECL argument.
6494 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6495
59909673
EB
64962017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6497
6498 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6499 treatment of parameters with pointer-to-tagged type and tidy up.
6500 (print_ada_methods): Remove the special treatment of C++ static member
6501 functions.
6502
54dcd526
ML
65032017-02-22 Martin Liska <mliska@suse.cz>
6504
6505 * c.opt: Replace inequality signs with square brackets
6506 for -Wnornalized.
6507
00bc9de3
JJ
65082017-02-21 Jakub Jelinek <jakub@redhat.com>
6509
6510 PR c++/79641
6511 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6512 preserve quals.
6513
97fcf744
JM
65142017-02-17 Joseph Myers <joseph@codesourcery.com>
6515
6516 * c-cppbuiltin.c (builtin_define_float_constants): Define
6517 __DECIMAL_DIG__ to the value for long double.
6518
c7545f1c
MP
65192017-02-15 Marek Polacek <polacek@redhat.com>
6520
6521 PR c/79515
6522 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6523 conversion has occured.
6524
c2e84327
DM
65252017-01-24 David Malcolm <dmalcolm@redhat.com>
6526
6527 * c-common.c (c_common_reswords): Add "__RTL".
6528 * c-common.h (enum rid): Add RID_RTL.
6529
2ebd93e1
MP
65302017-01-20 Marek Polacek <polacek@redhat.com>
6531
6532 PR c/64279
6533 * c-common.h (do_warn_duplicated_branches_r): Declare.
6534 * c-gimplify.c (c_genericize): Walk the function tree calling
6535 do_warn_duplicated_branches_r.
6536 * c-warn.c (expr_from_macro_expansion_r): New.
6537 (do_warn_duplicated_branches): New.
6538 (do_warn_duplicated_branches_r): New.
6539 * c.opt (Wduplicated-branches): New option.
6540
0d80ab91
DM
65412017-01-17 David Malcolm <dmalcolm@redhat.com>
6542
6543 PR c++/71497
6544 * c-indentation.c (warn_for_misleading_indentation): Use the past
6545 subjunctive in the note.
6546
7f991c36
AH
65472017-01-17 Aldy Hernandez <aldyh@redhat.com>
6548
6549 PR c/79116
6550 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6551 start type to integer_type.
6552
1c70261c
JJ
65532017-01-16 Jakub Jelinek <jakub@redhat.com>
6554
6555 PR driver/49726
6556 * c.opt (gen-decls): Add Driver flag.
6557
1ddca3f3
PC
65582017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6559
6560 Revert:
6561 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6562
6563 PR c++/71737
6564 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6565
7d2f3f1d
PC
65662017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6567
6568 PR c++/71737
6569 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6570
bce6f760
MS
65712017-01-12 Martin Sebor <msebor@redhat.com>
6572
6573 (-Wformat-overflow): ...to this.
6574
bf5fbf46
MS
65752017-01-11 Martin Sebor <msebor@redhat.com>
6576
6577 PR c/78768
6578 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6579 Also enable for LTO.
6580
e363df3f
JM
65812017-01-10 Jason Merrill <jason@redhat.com>
6582
6583 Implement P0195R2, C++17 variadic using.
6584 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6585
bd2c6270
JJ
65862017-01-09 Jakub Jelinek <jakub@redhat.com>
6587
6588 PR translation/79019
6589 PR translation/79020
6590 * c.opt (Wnormalized=): Fix typo in description.
6591
efcc8d38
MS
65922017-01-08 Martin Sebor <msebor@redhat.com>
6593
6594 PR middle-end/77708
6595 * c.opt (-Wformat-truncation): New option.
6596
ab20d992 65972017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6598
6599 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6600 value to unsigned short to fit in 4 hex digits without
6601 warnings.
6602
4e89adf9
EB
66032017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6604
6605 * c.opt (fsso-struct): Add 'native' value.
6606
cd445b54
ML
66072017-01-05 Martin Liska <mliska@suse.cz>
6608
6609 PR pch/78970
6610 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6611 header.
6612
a9342885
MP
66132017-01-04 Marek Polacek <polacek@redhat.com>
6614
6615 PR c++/64767
6616 * c.opt (Wpointer-compare): New option.
6617
fc73e60c
JJ
66182017-01-04 Jakub Jelinek <jakub@redhat.com>
6619
6620 PR driver/78957
6621 * c.opt (fsso-struct=): Add RejectNegative.
6622
cbe34bb5
JJ
66232017-01-01 Jakub Jelinek <jakub@redhat.com>
6624
6625 Update copyright years.
6626
d4a6c0ea
ML
66272016-12-29 Martin Liska <mliska@suse.cz>
6628
6629 PR c/78933
6630 * c.opt (strong-eval-order): Add RejectNegative keyword.
6631
67a5ad7c
JM
66322016-12-22 Jason Merrill <jason@redhat.com>
6633
6634 Implement P0522R0, matching of template template arguments.
6635 * c-cppbuiltin.c (c_cpp_builtins): Define
6636 __cpp_template_template_args.
6637
0dba7960
JJ
66382016-12-21 Jakub Jelinek <jakub@redhat.com>
6639
6640 PR bootstrap/78817
6641 * c-common.c (struct nonnull_arg_ctx): New type.
6642 (check_function_nonnull): Return bool instead of void. Use
6643 nonnull_arg_ctx as context rather than just location_t.
6644 (check_nonnull_arg): Adjust for the new context type, set
6645 warned_p to true if a warning has been diagnosed.
6646 (check_function_arguments): Return bool instead of void.
6647 * c-common.h (check_function_arguments): Adjust prototype.
6648
31bfc9b9
JM
66492016-12-21 Jason Merrill <jason@redhat.com>
6650
6651 * c.opt (-fnew-ttp-matching): New flag.
6652 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6653
629b3d75
MJ
66542016-12-14 Martin Jambor <mjambor@suse.cz>
6655
6656 * c-omp.c: Include omp-general.h instead of omp-low.h.
6657 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6658 name.
6659
474da67e
MS
66602016-12-14 Martin Sebor <msebor@redhat.com>
6661
6662 PR c/17308
6663 * c-common.c (check_nonnull_arg): Disable when optimization
6664 is enabled.
6665
fe366b87
MP
66662016-12-12 Marek Polacek <polacek@redhat.com>
6667
6668 PR c++/78647
6669 * c-common.c (attribute_fallthrough_p): Return false for
6670 error_mark_node.
6671
8bd9f164
MS
66722016-12-08 Martin Sebor <msebor@redhat.com>
6673
6674 PR c/78284
6675 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6676
060162e0
MS
66772016-12-08 Martin Sebor <msebor@redhat.com>
6678
6679 PR c/78165
92a285c1
ML
6680 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6681 suffix.
060162e0 6682
ee92e7ba
MS
66832016-12-07 Martin Sebor <msebor@redhat.com>
6684
6685 PR c/53562
6686 PR middle-end/77784
6687 PR middle-end/78149
6688 PR middle-end/78138
6689 * c.opt (-Wstringop-overflow): New option.
6690
84b0769e
MO
66912016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6692
6693 * c-attribs.c (asan odr indicator): New attribute.
6694 (handle_asan_odr_indicator_attribute): New function.
6695
7fa6a965
PK
66962016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6697
6698 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6699 ptrdiff_type_node;
6700
56d8ffc1
JG
67012016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6702
6703 * c-common.c (excess_precision_mode_join): New.
6704 (c_ts18661_flt_eval_method): New.
6705 (c_c11_flt_eval_method): Likewise.
6706 (c_flt_eval_method): Likewise.
6707 * c-common.h (excess_precision_mode_join): New.
6708 (c_flt_eval_method): Likewise.
6709 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6710 (cpp_iec_559_value): Call it.
6711 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6712 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6713 __FLT_EVAL_METHOD_TS_18661_3__.
6714
04f0fcf7
JG
67152016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6716
6717 * c-opts.c (c_common_post_options): Add logic to handle the default
6718 case for -fpermitted-flt-eval-methods.
6719
fb2675cb
PB
67202016-11-23 Paolo Bonzini <bonzini@gnu.org>
6721
6722 * c.opt (Wexpansion-to-defined): New.
6723
ec1c5694
JJ
67242016-11-23 Jakub Jelinek <jakub@redhat.com>
6725
6726 PR target/78451
6727 * c-pragma.c (handle_pragma_target): Don't replace
6728 current_target_pragma, but chainon the new args to the current one.
6729
730c9e75
NS
67302016-11-22 Nathan Sidwell <nathan@acm.org>
6731
6732 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6733 indentation and formatting.
730c9e75 6734
89990732
MS
67352016-11-21 Martin Sebor <msebor@redhat.com>
6736
6737 * c.opt (-fprintf-return-value): Enable by default.
6738
48330c93
BE
67392016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6740
6741 PR c++/71973
6742 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6743 * c-common.c (c_common_nodes_and_builtins): Initialize
6744 const_tm_ptr_type_node.
6745
0d939c95
MP
67462016-11-16 Marek Polacek <polacek@redhat.com>
6747
6748 PR c/78285
6749 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6750
8e745a17
JJ
67512016-11-14 Jakub Jelinek <jakub@redhat.com>
6752
6753 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6754
1ee62b92 67552016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6756 Richard Biener <rguenther@suse.de>
6757
6758 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6759 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6760 * c.opt (fgimple): New option.
1ee62b92 6761
22b15758
UB
67622016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6763
6764 PR c/35503
6765 * c-common.h (warn_for_restrict): Declare.
6766 * c-warn.c: Include gcc-rich-location.h.
6767 (warn_for_restrict): New function.
6768 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6769 (gcc_cdiag_char_table): Likewise.
6770 (gcc_cxxdiag_char_table): Likewise.
6771 * c.opt (Wrestrict): New option.
6772
4be719cd
EB
67732016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6774
6775 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6776 for nested types only if the type is a record or union and dump SLOC.
6777
4a826ca6
JM
67782016-11-09 Jason Merrill <jason@redhat.com>
6779
6780 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6781
2e955d50
JJ
67822016-11-09 Jakub Jelinek <jakub@redhat.com>
6783
6784 * c-ubsan.c (ubsan_instrument_shift): Handle split
6785 -fsanitize=shift-base and -fsanitize=shift-exponent.
6786
51dc6603
JM
67872016-11-07 Jason Merrill <jason@redhat.com>
6788
6789 * c.opt (Wc++1z-compat): New.
6790 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6791
6dc4a604
ML
67922016-11-07 Martin Liska <mliska@suse.cz>
6793
6794 * c-warn.c (warn_for_unused_label): Save all labels used
6795 in goto or in &label.
6796
b302001e
JM
67972016-11-03 Jason Merrill <jason@redhat.com>
6798
6799 * c-cppbuiltin.c (c_cpp_builtins): Correct
6800 __cpp_inheriting_constructors.
6801
31f7f784
JM
68022016-11-01 Jason Merrill <jason@redhat.com>
6803
2bc78e3c
JM
6804 * c-cppbuiltin.c (c_cpp_builtins): Update
6805 __cpp_inheriting_constructors.
6806
31f7f784
JM
6807 * c.opt (-fnew-inheriting-ctors): New.
6808 * c-opts.c: Default to on for ABI 11+.
6809
dcb466ec
JJ
68102016-10-31 Jakub Jelinek <jakub@redhat.com>
6811
6812 PR c++/77948
6813 * c.opt (fext-numeric-literals): Add Var and Init.
6814 * c-opts.c (c_common_handle_option): Don't clear
6815 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6816 (c_common_post_options): Clear it here if not set
6817 explicitly.
6818
52e1b91e
AH
68192016-10-28 Aldy Hernandez <aldyh@redhat.com>
6820
6821 PR debug/77773
6822 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6823 if NULL.
6824
e16f1cc7
JJ
68252016-10-25 Jakub Jelinek <jakub@redhat.com>
6826
6827 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6828 * c-common.c (c_common_reswords): Add __builtin_launder.
6829
f8348061
BE
68302016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6831
6832 * c-common.c (c_common_truthvalue_conversion): Warn for
6833 multiplications in boolean context. Fix the quoting of '<<' and '<'
6834 in the shift warning.
6835
eff89e01
BE
68362016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6837
6838 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6839
24bc7bf4
JM
68402016-10-20 Jason Merrill <jason@redhat.com>
6841
6842 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6843
4c712374
BE
68442016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6845
6846 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6847 integer shift ops in boolean context.
6848
68492016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6850
6851 * c.opt (Walloca): New.
6852 (Walloca-larger-than=): New.
6853 (Wvla-larger-than=): New.
6854
8fa18c06
MP
68552016-10-17 Marek Polacek <polacek@redhat.com>
6856
6857 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6858 Return immediately when finding a match.
6859 (warn_tautological_cmp): Remove a boolean variable that is no longer
6860 needed.
6861
b12b1915
MP
68622016-10-17 Marek Polacek <polacek@redhat.com>
6863
6864 * c-attribs.c: New file.
6865 * c-common.c: Move attributes handling to c-attribs.c.
6866 (get_nonnull_operand): No longer static.
6867 * c-common.h: Move the declarations from c-attribs.c to its own section.
6868
2045acd9
JM
68692016-10-14 Jason Merrill <jason@redhat.com>
6870
6871 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6872 and __cpp_deduction_guides.
6873
14a2c9aa
JM
68742016-10-13 Jason Merrill <jason@redhat.com>
6875
6876 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6877
4d0cdd0c
TP
68782016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6879
6880 * c-cppbuiltin.c: Include memmodel.h.
6881 * c-opts.c: Likewise.
6882 * c-pragma.c: Likewise.
6883 * c-warn.c: Likewise.
6884
70f6d5e1
JJ
68852016-10-12 Jakub Jelinek <jakub@redhat.com>
6886
6887 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6888 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6889 * c-opts.c (sanitize_cpp_opts): Initialize
6890 cpp_opts->cpp_warn_implicit_fallthrough.
6891
78f61294
MP
68922016-10-11 Marek Polacek <polacek@redhat.com>
6893
6894 * c-common.c (warning_candidate_p): Change the return type to bool
6895 and return true/false instead of 1/0.
6896 (vector_mode_valid_p): Likewise.
6897
038b5cc0
MP
68982016-10-11 Marek Polacek <polacek@redhat.com>
6899
6900 * c-common.c (fold_for_warn): No longer static.
6901 (bool_promoted_to_int_p): Likewise.
6902 (c_common_get_narrower): Likewise.
6903 (constant_expression_warning): Move to c-warn.c.
6904 (constant_expression_error): Likewise.
6905 (overflow_warning): Likewise.
6906 (warn_logical_operator): Likewise.
6907 (find_array_ref_with_const_idx_r): Likewise.
6908 (warn_tautological_cmp): Likewise.
6909 (expr_has_boolean_operands_p): Likewise.
6910 (warn_logical_not_parentheses): Likewise.
6911 (warn_if_unused_value): Likewise.
6912 (strict_aliasing_warning): Likewise.
6913 (sizeof_pointer_memaccess_warning): Likewise.
6914 (check_main_parameter_types): Likewise.
6915 (conversion_warning): Likewise.
6916 (warnings_for_convert_and_check): Likewise.
6917 (match_case_to_enum_1): Likewise.
6918 (match_case_to_enum): Likewise.
6919 (c_do_switch_warnings): Likewise.
6920 (warn_for_omitted_condop): Likewise.
6921 (readonly_error): Likewise.
6922 (lvalue_error): Likewise.
6923 (invalid_indirection_error): Likewise.
6924 (warn_array_subscript_with_type_char): Likewise.
6925 (warn_about_parentheses): Likewise.
6926 (warn_for_unused_label): Likewise.
6927 (warn_for_div_by_zero): Likewise.
6928 (warn_for_memset): Likewise.
6929 (warn_for_sign_compare): Likewise.
6930 (do_warn_double_promotion): Likewise.
6931 (do_warn_unused_parameter): Likewise.
6932 (record_locally_defined_typedef): Likewise.
6933 (maybe_record_typedef_use): Likewise.
6934 (maybe_warn_unused_local_typedefs): Likewise.
6935 (maybe_warn_bool_compare): Likewise.
6936 (maybe_warn_shift_overflow): Likewise.
6937 (warn_duplicated_cond_add_or_warn): Likewise.
6938 (diagnose_mismatched_attributes): Likewise.
6939 * c-common.h: Move the declarations from c-warn.c to its own section.
6940 * c-warn.c: New file.
6941
627be19f
JM
69422016-10-08 Jason Merrill <jason@redhat.com>
6943
6944 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6945 into COND_EXPR in C++.
6946
7bad794a
JJ
69472016-10-08 Jakub Jelinek <jakub@redhat.com>
6948
6949 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6950 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6951 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6952
be845b04
JJ
69532016-10-07 Jakub Jelinek <jakub@redhat.com>
6954
6955 Implement LWG2296 helper intrinsic
6956 * c-common.h (enum rid): Add RID_ADDRESSOF.
6957 * c-common.c (c_common_reswords): Add __builtin_addressof.
6958
c09c4992
BE
69592016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6960
6961 PR c++/77700
6962 * c-common.c (c_common_truthvalue_conversion): Warn also for
6963 suspicious enum values in boolean context.
6964
342cfb3e
JJ
69652016-10-06 Jakub Jelinek <jakub@redhat.com>
6966
6967 Implement P0258R2 - helper for C++17
6968 std::has_unique_object_representations trait
6969 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6970 * c-common.c (c_common_reswords): Add
6971 __has_unique_object_representations.
6972
2e69f143
JJ
69732016-10-05 Jakub Jelinek <jakub@redhat.com>
6974
6975 PR sanitizer/66343
6976 * c-ubsan.c (ubsan_instrument_return): Don't call
6977 initialize_sanitizer_builtins here.
6978
700fff34
BE
69792016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6980
6981 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6982 conditional expression in boolean context when only one arm is
6983 non-boolean.
6984
9563bfcd
JJ
69852016-10-05 Jakub Jelinek <jakub@redhat.com>
6986
04a32443
JJ
6987 PR sanitizer/77823
6988 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6989 is not integral.
6990
9563bfcd
JJ
6991 * c-common.c (c_common_reswords): Update comment for C++11.
6992
f1644724
JM
69932016-10-04 Jason Merrill <jason@redhat.com>
6994
6995 * c-common.c (make_tree_vector_from_ctor): New.
6996 * c-common.h: Declare it.
6997
5a79befb
JJ
69982016-10-04 Jakub Jelinek <jakub@redhat.com>
6999
7000 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7001 __LIBGCC_JCR_SECTION_NAME__.
7002
1633d3b9
BE
70032016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7004
7005 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7006 left shift in boolean context.
7007
a2c6e7f2
JJ
70082016-09-29 Jakub Jelinek <jakub@redhat.com>
7009
7010 Implement P0001R1 - C++17 removal of register storage class specifier
7011 * c.opt (Wregister): New warning.
7012 * c-opts.c (c_common_post_options): Enable -Wregister by
7013 default for C++17.
7014
75304c87
JG
70152016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7016
7017 * c-opts.c (c_common_post_options): Remove special case for
7018 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7019 in C++.
7020
bbfac6da
JJ
70212016-09-27 Jakub Jelinek <jakub@redhat.com>
7022
6e39060a
JJ
7023 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7024 -std=c++1z.
7025
bbfac6da
JJ
7026 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7027
e73cf9a2
TP
70282016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7029
7030 * c-common.c: Include memmodel.h.
7031
c6147dc4
MP
70322016-09-26 Marek Polacek <polacek@redhat.com>
7033
7034 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7035
81fea426
MP
70362016-09-26 Marek Polacek <polacek@redhat.com>
7037
7038 PR c/7652
7039 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7040 (handle_fallthrough_attribute): New function.
7041 (attribute_fallthrough_p): New function.
7042 * c-common.h (attribute_fallthrough_p): Declare.
7043
9a2300e9
MP
70442016-09-24 Marek Polacek <polacek@redhat.com>
7045
7046 PR c/77490
7047 * c.opt (Wbool-operation): New.
7048
a09e9e35
BE
70492016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7050
7051 * c-common.c (c_common_truthvalue_conversion): Inhibit
7052 Wint-in-bool-context warning with from_macro_definition_at.
7053 Mention the expression will always evaluate to true.
7054
d43b4ccc
MS
70552016-09-21 Martin Sebor <msebor@redhat.com>
7056
7057 PR bootstrap/77676
7058 * c.opt (fprintf-return-value): Temporarily initialize to zero
7059 to unblock bootstrap failures.
7060
2e1c20b1
JJ
70612016-09-21 Jakub Jelinek <jakub@redhat.com>
7062
7063 PR c++/77651
7064 * c.opt (Waligned-new=): Add RejectNegative.
7065 (faligned-new=): Likewise. Spelling fix - change
7066 aligned_new_threshhold to aligned_new_threshold.
7067 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7068 to aligned_new_threshold.
7069
88d0c3f0
MS
70702016-09-20 Martin Sebor <msebor@redhat.com>
7071
7072 PR middle-end/49905
7073 * c.opt: Add -Wformat-length and -fprintf-return-value.
7074
144a96e4
BE
70752016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7076
7077 PR c++/77434
7078 * c.opt (Wint-in-bool-context): New warning.
7079 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7080 constants in boolean context.
7081
63012d9a
JM
70822016-09-19 Joseph Myers <joseph@codesourcery.com>
7083
7084 * c-common.c (max_align_t_align): Also consider alignment of
7085 float128_type_node.
7086
931388ce
JM
70872016-09-15 Jason Merrill <jason@redhat.com>
7088
7089 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7090 DECL_EXTERNAL.
7091
38711381
JM
70922016-09-14 Jason Merrill <jason@redhat.com>
7093
7094 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7095 limit FIELD_DECL, either.
7096
e51fbec3
MP
70972016-09-14 Marek Polacek <polacek@redhat.com>
7098
7099 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7100 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7101 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7102
254830ba
DM
71032016-09-13 David Malcolm <dmalcolm@redhat.com>
7104
7105 * c-common.c (warn_logical_not_parentheses): Replace
7106 rich_location::add_fixit_insert calls with add_fixit_insert_before
7107 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7108
42763690
JM
71092016-09-13 Jason Merrill <jason@redhat.com>
7110 Tom de Vries <tom@codesourcery.com>
7111
7112 PR c++/77427
7113 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7114
9453eee9
JM
71152016-09-13 Jason Merrill <jason@redhat.com>
7116
7117 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7118 limit types at all.
7119
e96809e3
JM
71202016-09-12 Jason Merrill <jason@redhat.com>
7121
7122 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7123 bit/byte confusion, allow large alignment for types.
7124
54dcdb88
BE
71252016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7126
7127 PR c++/77496
7128 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7129
d1463eb9
DM
71302016-09-12 David Malcolm <dmalcolm@redhat.com>
7131
7132 PR c/72858
7133 * c-format.c (argument_parser::check_argument_type): Add params
7134 "type_start" and "conversion_char". Use the former to generate
7135 offset_to_type_start and pass it and conversion_char to
7136 check_format_types.
7137 (check_format_info_main): Capture the start of the type
7138 information as "type_start", and pass it an format_char
7139 to arg_parser.check_argument_type.
7140 (check_format_types): Provide an example in the leading comment.
7141 Add params "offset_to_type_start" and "conversion_char"; pass
7142 them to format_type_warning calls.
7143 (test_get_modifier_for_format_len): Likewise.
7144 (matching_type_p): New function.
7145 (get_format_for_type): Add param "conversion_char" and move
7146 implementation into...
7147 (get_format_for_type_1): ...new function, called twice.
7148 Use new function matching_type_p rather than checking for
7149 TYPE_CANONICAL equality.
7150 (get_corrected_substring): New function.
7151 (format_type_warning): Provide an example in the leading comment.
7152 Add params "offset_to_type_start" and "conversion_char". Replace
7153 call to get_format_for_type with call to get_corrected_substring
7154 and move rejection of hints for widths/precisions there.
7155 (assert_format_for_type_streq): Add param "conversion_char".
7156 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7157 (test_get_format_for_type_printf): Add conversion chars to the
7158 tests, adding coverage for various combinations of integer
7159 vs double conversions, and for preserving octal and hexadecimal
7160 conversions.
7161 (test_get_format_for_type_scanf): Add conversion chars to the
7162 tests.
7163
5b28efbb
TV
71642016-09-10 Tom de Vries <tom@codesourcery.com>
7165
7166 PR C/71602
7167 * c-common.c (build_va_arg): Handle more strict
7168 targetm.canonical_va_list_type. Replace first argument type error with
7169 assert.
7170
3f0177e7
MS
71712016-09-09 Martin Sebor <msebor@redhat.com>
7172
7173 PR c/77520
7174 PR c/77521
7175 * c-format.c (argument_parser::find_format_char_info): Use %qc
7176 format directive unconditionally.
7177
af63ba4b
JM
71782016-09-09 Jason Merrill <jason@redhat.com>
7179
7180 Implement C++17 new of over-aligned types.
7181 * c.opt: Add -faligned-new and -Waligned-new.
7182 * c-common.c (max_align_t_align): Split out from...
7183 (cxx_fundamental_alignment_p): ...here.
7184 * c-common.h: Declare it.
7185 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7186
c65248cb
JM
71872016-09-09 Joseph Myers <joseph@codesourcery.com>
7188
7189 * c-cppbuiltin.c (builtin_define_type_width): New function.
7190 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7191 macros.
7192
e5106e27
DM
71932016-09-07 David Malcolm <dmalcolm@redhat.com>
7194
7195 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7196 a POINTER_TYPE.
7197 (substring_loc::get_location): Move to substring-locations.c,
7198 keeping implementation as...
7199 (c_get_substring_location): New function, from the above, reworked
7200 to use accessors rather than member lookup.
7201 * c-common.h (class substring_loc): Move to substring-locations.h,
7202 replacing with a forward decl.
7203 (c_get_substring_location): New decl.
7204 * c-format.c: Include "substring-locations.h".
7205 (format_warning_va): Move to substring-locations.c.
7206 (format_warning_at_substring): Likewise.
7207
ab20d992 72082016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7209
7210 PR c/77336
7211 * c-format.c (check_function_format): Avoid issuing warnings for
7212 functions unless they call format functions with non-constant
7213 format strings.
7214
b772a565
RB
72152016-09-06 Richard Biener <rguenther@suse.de>
7216
7217 PR c/77450
7218 * c-common.c (c_common_mark_addressable_vec): Handle
7219 COMPOUND_LITERAL_EXPR.
7220
25ff5dd3
MP
72212016-09-05 Marek Polacek <polacek@redhat.com>
7222
7223 PR c/77423
7224 * c-common.c (bool_promoted_to_int_p): New function.
7225 (expr_has_boolean_operands_p): New function.
7226 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7227 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7228
21234eb5
TV
72292016-09-04 Tom de Vries <tom@codesourcery.com>
7230
7231 revert:
7232 2016-08-29 Tom de Vries <tom@codesourcery.com>
7233
7234 * c-common.c (build_va_arg): Replace first argument type error
7235 with assert.
7236
9dc5773f
JJ
72372016-09-02 Jakub Jelinek <jakub@redhat.com>
7238
7239 PR c/65467
7240 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7241 (c_finish_omp_for): Reject _Atomic qualified iterators.
7242
72432016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7244
7245 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7246 size to guarantee it fits the output of the formatted function
7247 regardless of its arguments.
7248
295844f6
MP
72492016-09-01 Marek Polacek <polacek@redhat.com>
7250
7251 PR c/7652
7252 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7253 FALLTHRU comments.
7254
3d06b6f2
MP
72552016-08-29 Marek Polacek <polacek@redhat.com>
7256
7257 PR c/77292
7258 * c-common.c (warn_logical_not_parentheses): Don't warn for
7259 a comparison or a logical operator.
7260
34cedad5
TV
72612016-08-29 Tom de Vries <tom@codesourcery.com>
7262
7263 * c-common.c (build_va_arg): Fix type comparison assert.
7264
f162d717
TV
72652016-08-29 Tom de Vries <tom@codesourcery.com>
7266
7267 * c-common.c (build_va_arg): Replace first argument type error
7268 with assert.
7269
ba9bbd6f
TV
72702016-08-29 Tom de Vries <tom@codesourcery.com>
7271
7272 PR c/77398
7273 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7274 with error_mark_node as va_list instead of with illegal va_list.
7275
ebef225f
MP
72762016-08-25 Marek Polacek <polacek@redhat.com>
7277 David Malcolm <dmalcolm@redhat.com>
7278
7279 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7280 * c-common.h (warn_logical_not_parentheses): Update declaration.
7281
b00e6e75
MP
72822016-08-22 Marek Polacek <polacek@redhat.com>
7283
7284 PR c++/77321
7285 * c-common.c (warn_for_memset): Check type for null.
7286
6dc198e3
JM
72872016-08-22 Joseph Myers <joseph@codesourcery.com>
7288
14ec014e 7289 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7290 _FloatNx types for suffixes for built-in functions.
7291
c65699ef
JM
72922016-08-19 Joseph Myers <joseph@codesourcery.com>
7293
7294 PR c/32187
7295 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7296 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7297 (RID_FLOAT128X): New enum rid values.
7298 (CASE_RID_FLOATN_NX): New macro.
7299 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7300 keywords.
7301 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7302 corresponding complex types.
7303 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7304 _FloatNx and corresponding complex types.
7305 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7306 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7307 and _FloatNx types for the widest type for determining
7308 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7309 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7310 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7311 and _FloatNx types.
7312 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7313 constants.
7314 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7315 _FloatNx types.
7316
cc015f3a
DM
73172016-08-18 David Malcolm <dmalcolm@redhat.com>
7318
7319 * c-opts.c (c_diagnostic_finalizer): Update for change to
7320 diagnostic_show_locus.
7321
cb18fd07
DM
73222016-08-18 David Malcolm <dmalcolm@redhat.com>
7323
7324 * c-common.c: Include "spellcheck.h".
7325 (cb_get_suggestion): New function.
7326 * c-common.h (cb_get_suggestion): New decl.
7327 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7328 cb_get_suggestion.
7329
a76989dc
MP
73302016-08-18 Marek Polacek <polacek@redhat.com>
7331
7332 PR c/71514
7333 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7334 and pointer-to-VLA.
7335
65e736c0
DM
73362016-08-16 David Malcolm <dmalcolm@redhat.com>
7337
7338 PR c/72857
7339 * c-common.c (substring_loc::get_range): Rename to...
7340 (substring_loc::get_location): ...this, converting param from a
7341 source_range * to a location_t *. Call
7342 get_source_location_for_substring rather than
7343 get_source_range_for_substring, and pass in m_caret_idx.
7344 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7345 (substring_loc::get_range): Replace with...
7346 (substring_loc::get_location): ...this.
7347 (substring_loc::set_caret_index): New method.
7348 (substring_loc): Add field m_caret_idx.
7349 * c-format.c (format_warning_va): Update for above changes.
7350 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7351 clashing with type name.
7352 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7353 (check_argument_type): Likewise.
7354 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7355 Use a copy when emitting warnings, setting the caret index from TYPE.
7356
7e1dde14 73572016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7358 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7359
7360 * c-ada-spec.c (dump_number): New function.
7361 (handle_escape_character): Likewise.
7362 (print_ada_macros): Add handling of constant integers and strings.
7363
191816a3
MP
73642016-08-12 Marek Polacek <polacek@redhat.com>
7365
7366 PR c/7652
7367 * c-common.c (scalar_to_vector): Adjust fall through comment.
7368 * c-opts.c (c_common_handle_option): Likewise.
7369 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7370 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7371 fall through comment.
7372 * cilk.c (extract_free_variables): Add FALLTHRU.
7373
452df4a4
JM
73742016-08-10 Jason Merrill <jason@redhat.com>
7375
7376 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7377
f3365c12
JM
73782016-08-09 Jason Merrill <jason@redhat.com>
7379
7380 * c-common.c (c_common_attribute_table): vector_size affects type
7381 identity.
7382
f0bc3323
MP
73832016-08-09 Marek Polacek <polacek@redhat.com>
7384
7385 PR c/7652
7386 * c-ada-spec.c (dump_generic_ada_node): Add return.
7387
98e5a19a
JM
73882016-08-09 Jason Merrill <jason@redhat.com>
7389
7390 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7391 C++17 constexpr lambdas.
7392
895aa8e1
DM
73932016-08-08 David Malcolm <dmalcolm@redhat.com>
7394
7395 PR c/64955
7396 * c-common.h (selftest::c_format_c_tests): New declaration.
7397 (selftest::run_c_tests): New declaration.
7398 * c-format.c: Include "selftest.h.
7399 (format_warning_va): Add param "corrected_substring" and use
7400 it to add a replacement fix-it hint.
7401 (format_warning_at_substring): Likewise.
7402 (format_warning_at_char): Update for new param of
7403 format_warning_va.
7404 (argument_parser::check_argument_type): Pass "fki" to
7405 check_format_types.
7406 (check_format_types): Add param "fki" and pass it to
7407 format_type_warning.
7408 (deref_n_times): New function.
7409 (get_modifier_for_format_len): New function.
7410 (selftest::test_get_modifier_for_format_len): New function.
7411 (get_format_for_type): New function.
7412 (format_type_warning): Add param "fki" and use it to attempt
7413 to provide hints for argument types when calling
7414 format_warning_at_substring.
7415 (selftest::get_info): New function.
7416 (selftest::assert_format_for_type_streq): New function.
7417 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7418 (selftest::test_get_format_for_type_printf): New function.
7419 (selftest::test_get_format_for_type_scanf): New function.
7420 (selftest::c_format_c_tests): New function.
7421
e52ed3fe
DM
74222016-08-08 David Malcolm <dmalcolm@redhat.com>
7423
7424 PR c/52952
7425 * c-format.c: Include "diagnostic.h".
7426 (location_column_from_byte_offset): Delete.
7427 (location_from_offset): Delete.
7428 (format_warning_va): New function.
7429 (format_warning_at_substring): New function.
7430 (format_warning_at_char): New function.
7431 (check_format_arg): Capture location of format_tree and pass to
7432 check_format_info_main.
7433 (argument_parser): Add fields "start_of_this_format" and
7434 "format_string_cst".
7435 (flag_chars_t::validate): Add param "format_string_cst". Convert
7436 warning_at call using location_from_offset to call to
7437 format_warning_at_char.
7438 (argument_parser::argument_parser): Add param "format_string_cst_"
7439 and use use it to initialize field "format_string_cst".
7440 Initialize new field "start_of_this_format".
7441 (argument_parser::read_format_flags): Convert warning_at call
7442 using location_from_offset to a call to format_warning_at_char.
7443 (argument_parser::read_any_format_left_precision): Likewise.
7444 (argument_parser::read_any_format_precision): Likewise.
7445 (argument_parser::read_any_other_modifier): Likewise.
7446 (argument_parser::find_format_char_info): Likewise, in three places.
7447 (argument_parser::parse_any_scan_set): Likewise, in one place.
7448 (argument_parser::handle_conversions): Likewise, in two places.
7449 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7450 and use it to make a substring_loc. Pass the latter to
7451 check_format_types.
7452 (check_format_info_main): Add params "fmt_param_loc" and
7453 "format_string_cst". Convert warning_at calls using
7454 location_from_offset to calls to format_warning_at_char. Pass the
7455 new params to the arg_parser ctor. Pass "format_string_cst" to
7456 flag_chars.validate. Pass "fmt_param_loc" to
7457 arg_parser.check_argument_type.
7458 (check_format_types): Convert first param from a location_t
7459 to a const substring_loc & and rename to "fmt_loc". Attempt
7460 to extract the range of the relevant parameter and pass it
7461 to format_type_warning.
7462 (format_type_warning): Convert first param from a location_t
7463 to a const substring_loc & and rename to "fmt_loc". Add
7464 params "param_range" and "type". Replace calls to warning_at
7465 with calls to format_warning_at_substring.
7466
1c4d457e
DM
74672016-08-08 David Malcolm <dmalcolm@redhat.com>
7468
7469 * c-format.c (class flag_chars_t): New class.
7470 (struct length_modifier): New struct.
7471 (class argument_parser): New class.
7472 (flag_chars_t::flag_chars_t): New ctor.
7473 (flag_chars_t::has_char_p): New method.
7474 (flag_chars_t::add_char): New method.
7475 (flag_chars_t::validate): New method.
7476 (flag_chars_t::get_alloc_flag): New method.
7477 (flag_chars_t::assignment_suppression_p): New method.
7478 (argument_parser::argument_parser): New ctor.
7479 (argument_parser::read_any_dollar): New method.
7480 (argument_parser::read_format_flags): New method.
7481 (argument_parser::read_any_format_width): New method.
7482 (argument_parser::read_any_format_left_precision): New method.
7483 (argument_parser::read_any_format_precision): New method.
7484 (argument_parser::handle_alloc_chars): New method.
7485 (argument_parser::read_any_length_modifier): New method.
7486 (argument_parser::read_any_other_modifier): New method.
7487 (argument_parser::find_format_char_info): New method.
7488 (argument_parser::validate_flag_pairs): New method.
7489 (argument_parser::give_y2k_warnings): New method.
7490 (argument_parser::parse_any_scan_set): New method.
7491 (argument_parser::handle_conversions): New method.
7492 (argument_parser::check_argument_type): New method.
7493 (check_format_info_main): Introduce classes argument_parser
7494 and flag_chars_t, moving the code within the loop into methods
7495 of these classes. Make various locals "const".
7496
88fa5555
DM
74972016-08-05 David Malcolm <dmalcolm@redhat.com>
7498
7499 * c-common.c: Include "substring-locations.h".
7500 (get_cpp_ttype_from_string_type): New function.
7501 (g_string_concat_db): New global.
7502 (substring_loc::get_range): New method.
7503 * c-common.h (g_string_concat_db): New declaration.
7504 (class substring_loc): New class.
7505 * c-lex.c (lex_string): When concatenating strings, capture the
7506 locations of all tokens using a new obstack, and record the
7507 concatenation locations within g_string_concat_db.
7508 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7509 on the ggc-heap.
7510
78169471
MP
75112016-07-29 Marek Polacek <polacek@redhat.com>
7512
638fc14f
MP
7513 PR c/71926
7514 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7515 parentheses warning.
7516
78169471
MP
7517 PR c/71574
7518 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7519
1225d6b1
ML
75202016-07-28 Martin Liska <mliska@suse.cz>
7521
7522 PR gcov-profile/68025
7523 * c-common.c (handle_no_profile_instrument_function_attribute):
7524
ec1e2a40
BE
75252016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7526
7527 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7528 BITS_PER_UNIT_LOG.
7529
5ec2cd9f
JM
75302016-07-25 Jason Merrill <jason@redhat.com>
7531
7532 PR c++/65970
7533 * c.opt (fconstexpr-loop-limit): New.
7534
9dc5773f 75352016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7536
7537 PR c++/71675
7538 * c-common.c (resolve_overloaded_builtin): Avoid converting
7539 __atomic_compare_exchange_n return type to that of what its
7540 first argument points to.
7541
e3fe09c1
UB
75422016-07-22 Uros Bizjak <ubizjak@gmail.com>
7543
7544 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7545 ~(unsigned HOST_WIDE_INT) 0.
7546
bc91c436
ML
75472016-07-22 Martin Liska <mliska@suse.cz>
7548
7549 PR gcov-profile/69028
7550 PR gcov-profile/62047
7551 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7552 to the current_function_decl.
7553
451dcc66
JM
75542016-07-21 Jason Merrill <jason@redhat.com>
7555
7556 PR c++/65168
7557 * c-common.c (c_common_truthvalue_conversion): Check
7558 c_inhibit_evaluation_warnings for warning about address of
7559 reference.
7560
de6a69ee
DM
75612016-07-20 David Malcolm <dmalcolm@redhat.com>
7562
7563 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7564 const char *.
7565
d022c55a
JM
75662016-07-15 Jason Merrill <jason@redhat.com>
7567
7568 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7569
ddbbcb19
JJ
75702016-07-15 Jakub Jelinek <jakub@redhat.com>
7571
7572 PR c/71858
7573 * c-common.h (enum lookup_name_fuzzy_kind): Add
7574 FUZZY_LOOKUP_FUNCTION_NAME.
7575
d0cf395a
JM
75762016-07-08 Jason Merrill <jason@redhat.com>
7577
7578 P0145: Refining Expression Order for C++.
7579 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7580 * c-opts.c: Adjust.
7581
98d44e93
MT
75822016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7583
7584 PR c++/71214
7585 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7586
f9d8d994
TS
75872016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7588
7589 * c-pragma.h (enum pragma_kind): Rename
7590 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7591 users.
7592
4aa83879
RB
75932016-06-29 Richard Biener <rguenther@suse.de>
7594
7595 PR middle-end/71002
7596 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7597
a25bd9e6
JM
75982016-06-24 Jason Merrill <jason@redhat.com>
7599
7600 P0145R2: Refining Expression Order for C++.
7601 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7602 MODIFY_EXPR.
7603
a86451b9
JJ
76042016-06-24 Jakub Jelinek <jakub@redhat.com>
7605
7606 * c-common.c (check_builtin_function_arguments): Require last
7607 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7608 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7609 if the last argument is pointer to enumerated or boolean type.
7610
1a4f11c8
DM
76112016-06-22 David Malcolm <dmalcolm@redhat.com>
7612
7613 PR c/70339
7614 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7615 (lookup_name_fuzzy): New prototype.
7616
fe55692c
JDA
76172016-06-21 John David Anglin <danglin@gcc.gnu.org>
7618
7619 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7620
4eb24e01
JM
76212016-06-14 Jason Merrill <jason@redhat.com>
7622
7623 P0145R2: Refining Expression Order for C++.
7624 * c.opt (fargs-in-order): New.
7625 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7626
ef7cf206
JJ
76272016-06-13 Jakub Jelinek <jakub@redhat.com>
7628
0dda258b
JJ
7629 PR sanitizer/71498
7630 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7631 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7632
ef7cf206
JJ
7633 PR preprocessor/71183
7634 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7635 to cb_get_source_date_epoch.
7636
50b15873
JJ
76372016-06-10 Jakub Jelinek <jakub@redhat.com>
7638
7639 PR c/68657
7640 * c.opt (Wpsabi): Add Warning flag.
7641
4d926e34
MS
76422016-06-10 Martin Sebor <msebor@redhat.com>
7643
7644 PR c/71392
14ec014e 7645 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7646 the nonnull attribute in type-generic builtins.
7647
e01b4e16
MS
76482016-06-09 Martin Sebor <msebor@redhat.com>
7649
7650 PR c/70883
7651 * c-common.c (builtin_function_validate_nargs): Make text of error
7652 message consistent with others like it.
7653
44a845ca
MS
76542016-06-08 Martin Sebor <msebor@redhat.com>
7655 Jakub Jelinek <jakub@redhat.com>
7656
7657 PR c++/70507
7658 PR c/68120
7659 * c-common.c (check_builtin_function_arguments): Handle
7660 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7661
a80a7051
RB
76622016-06-08 Richard Biener <rguenther@suse.de>
7663
7664 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7665
bfd67b47
RB
76662016-06-07 Richard Biener <rguenther@suse.de>
7667
7668 PR c/61564
7669 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7670 options and warn about others.
7671
15c98b2e
ES
76722016-06-01 Eduard Sanou <dhole@openmailbox.org>
7673
7674 * c-common.c (get_source_date_epoch): Rename to
7675 cb_get_source_date_epoch.
7676 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7677 message when the parsing fails. Use error_at instead of fatal_error.
7678 * c-common.h (get_source_date_epoch): Rename to
7679 cb_get_source_date_epoch.
7680 * c-common.h (cb_get_source_date_epoch): Prototype.
7681 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7682 * c-common.h (c_omp_region_type): Remove trailing comma.
7683 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7684 * c-lex.c (c_lex_with_flags): Remove initialization of
7685 pfile->source_date_epoch.
7686
00631022
JJ
76872016-05-30 Jakub Jelinek <jakub@redhat.com>
7688
7689 PR c++/71349
7690 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7691 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7692 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7693 instead of C_OMP_CLAUSE_SPLIT_FOR.
7694
f17a223d
RB
76952016-05-24 Richard Biener <rguenther@suse.de>
7696
7697 PR middle-end/70434
7698 PR c/69504
7699 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7700 (convert_vector_to_array_for_subscript): ... this.
7701 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7702 VIEW_CONVERT_EXPR to an array type. Rename to ...
7703 (convert_vector_to_array_for_subscript): ... this.
7704
4f2e1536
MP
77052016-05-12 Marek Polacek <polacek@redhat.com>
7706
7707 PR c/70756
7708 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7709 size_in_bytes and pass LOC to it.
7710
d6e83a8d
MM
77112016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7712
7713 PR c/43651
7714 * c.opt (Wduplicate-decl-specifier): New option.
7715
5c3a10fb
MP
77162016-05-11 Marek Polacek <polacek@redhat.com>
7717
7718 PR c++/71024
7719 * c-common.c (diagnose_mismatched_attributes): New function.
7720 * c-common.h (diagnose_mismatched_attributes): Declare.
7721
deef7113
MP
77222016-05-04 Marek Polacek <polacek@redhat.com>
7723
7724 * c.opt (Wdangling-else): New option.
7725
79ce98bc
MP
77262016-05-03 Marek Polacek <polacek@redhat.com>
7727
7728 PR c/70859
7729 * c-common.c (builtin_function_validate_nargs): Add location
7730 parameter. Use it.
7731 (check_builtin_function_arguments): Add location and arguments
7732 parameters. Use them.
7733 * c-common.h (check_builtin_function_arguments): Update declaration.
7734
381cdae4
RB
77352016-05-03 Richard Biener <rguenther@suse.de>
7736
7737 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7738 allow call args to gimplify to SSA names.
7739
1d793c34
MP
77402016-05-03 Marek Polacek <polacek@redhat.com>
7741
7742 * c-common.h (enum c_omp_region_type): Remove stray comma.
7743
77886428
CP
77442016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7745
7746 * c-common.h (enum c_omp_region_type): Define.
7747
697e0b28
RS
77482016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7749
7750 * c-common.c (shorten_compare): Use wi::to_wide.
7751
e7ff0319
CP
77522016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7753
7754 PR middle-end/70626
7755 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7756 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7757 reduction clauses in acc parallel loops.
7758
2fff3db8
MP
77592016-04-29 Marek Polacek <polacek@redhat.com>
7760
7761 PR c/70852
7762 * c-common.c (warn_for_memset): Check domain before accessing it.
7763
509063eb
DV
77642016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7765
7766 PR/69089
7767 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7768 "aligned" attribute.
7769
b632761d
JM
77702016-04-28 Jason Merrill <jason@redhat.com>
7771
7772 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7773
174f6622
ES
77742016-04-28 Eduard Sanou <dhole@openmailbox.org>
7775 Matthias Klose <doko@debian.org>
7776
7777 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7778 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7779 handling.
7780 * c-common.h (get_source_date_epoch): Prototype.
7781 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7782
6bc2bb18
RB
77832015-04-27 Ryan Burn <contact@rnburn.com>
7784
7785 PR c++/69024
7786 PR c++/68997
7787 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7788 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7789 external linkage.
7790 (cilk_detect_and_unwrap): Corresponding changes.
7791 (extract_free_variables): Don't extract free variables from
7792 AGGR_INIT_EXPR slot.
7793 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7794 (cilk_recognize_spawn): Likewise.
7795
c1e1f433
BS
77962016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7797
7798 * c.opt (Wmemset-elt-size): New option.
7799 * c-common.c (warn_for_memset): New function.
7800 * c-common.h (warn_for_memset): Declare.
7801
d067e05f
JM
78022016-04-25 Jason Merrill <jason@redhat.com>
7803
7804 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7805 No longer static.
7806 * c-common.h: Declare it.
7807 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7808
9aa36ae5
JM
78092016-04-22 Jason Merrill <jason@redhat.com>
7810
7811 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7812
477d4906
IV
78132016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7814
7815 PR c++/69363
7816 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7817 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7818
fe37c7af
MM
78192016-04-18 Michael Matz <matz@suse.de>
7820
7821 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7822 and SET_DECL_ALIGN.
7823
23f2660f
EB
78242016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7825
7826 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7827 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7828 to incomplete types.
7829 (dump_nested_type): Remove redundant tests and tidy up.
7830 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7831 a type which is the typedef of an original type.
7832
1e77281b
MP
78332016-04-15 Marek Polacek <polacek@redhat.com>
7834
7835 PR c/70651
7836 * c-common.c (build_va_arg): Change two asserts into errors and return
7837 error_mark_node.
7838
b3a77f21
MP
78392016-04-13 Marek Polacek <polacek@redhat.com>
7840
7841 PR c++/70639
7842 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7843 for switch statements, too.
7844
322b8466
JM
78452016-03-28 Jason Merrill <jason@redhat.com>
7846
7847 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7848
fbdb6baf
MP
78492016-03-23 Marek Polacek <polacek@redhat.com>
7850
7851 PR c++/69884
7852 * c.opt (Wignored-attributes): New option.
7853
5c240f4d
DM
78542016-03-22 David Malcolm <dmalcolm@redhat.com>
7855
7856 PR c/69993
7857 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7858 diagnostic text, reversing the order of the warning and note so
7859 that they appear in source order.
7860
14ba7b28
MP
78612016-03-17 Marek Polacek <polacek@redhat.com>
7862
7863 PR c/69407
7864 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7865 operations.
7866
08a1cadc
JM
78672016-03-14 Jason Merrill <jason@redhat.com>
7868
2aaeea19
JM
7869 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7870
08a1cadc
JM
7871 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7872
c06d25bb
RB
78732016-03-09 Richard Biener <rguenther@suse.de>
7874
7875 PR c/70143
7876 * c-common.c (strict_aliasing_warning): Add back
7877 alias_sets_conflict_p check.
7878
80aac5c8
JM
78792016-03-08 Jason Merrill <jason@redhat.com>
7880
7881 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7882
64b23c13
DM
78832016-03-04 David Malcolm <dmalcolm@redhat.com>
7884
7885 PR c/68187
7886 * c-indentation.c (get_visual_column): Move code to determine next
7887 tab stop to...
7888 (next_tab_stop): ...this new function.
7889 (line_contains_hash_if): Delete function.
7890 (detect_preprocessor_logic): Delete function.
7891 (get_first_nws_vis_column): New function.
7892 (detect_intervening_unindent): New function.
7893 (should_warn_for_misleading_indentation): Replace call to
7894 detect_preprocessor_logic with a call to
7895 detect_intervening_unindent.
7896
729526f5
DM
78972016-03-04 David Malcolm <dmalcolm@redhat.com>
7898
7899 PR c/68187
7900 * c-indentation.c (should_warn_for_misleading_indentation): When
7901 suppressing warnings about cases where the guard and body are on
7902 the same column, only use the first non-whitespace column in place
7903 of the guard token column when dealing with "else" clauses.
7904 When rejecting aligned BODY and NEXT, loosen the requirement
7905 from equality with the first non-whitespace of guard to simply
7906 that they not be indented relative to it.
7907
e9a35493
RB
79082016-03-04 Richard Biener <rguenther@suse.de>
7909
7910 PR c++/70054
7911 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7912 instead of alias_sets_conflict_p.
7913
1be56bc5
MP
79142016-03-01 Marek Polacek <polacek@redhat.com>
7915
7916 PR c++/69795
7917 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7918 any DECL.
7919
35886f0b
MS
79202016-02-22 Martin Sebor <msebor@redhat.com>
7921
7922 PR middle-end/69780
7923 * c-common.c (check_builtin_function_arguments): Validate and
7924 reject invalid arguments to __builtin_alloca_with_align.
7925
4246c8da
MW
79262016-02-20 Mark Wielaard <mjw@redhat.com>
7927
7928 PR c/28901
7929 * c.opt (Wunused-const-variable): Turn into Alias for...
7930 (Wunused-const-variable=): New option.
7931
268be88c
BE
79322016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7933
7934 PR c++/69865
7935 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7936 here...
7937 (c_common_init_options): ...to here.
7938 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7939
871b3f47
JJ
79402016-02-19 Jakub Jelinek <jakub@redhat.com>
7941
7942 PR c++/69826
7943 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7944 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7945 flag_preprocess_only.
7946
bf14eba2
JJ
79472016-02-16 Jakub Jelinek <jakub@redhat.com>
7948
7949 PR c/69835
7950 * c.opt (Wnonnull-compare): Enable for -Wall.
7951
ba6b3795
JJ
79522016-02-15 Jakub Jelinek <jakub@redhat.com>
7953
7954 PR c++/69797
7955 * c-common.c (sync_resolve_size): Diagnose too few arguments
7956 even when params is non-NULL empty vector.
7957
a011cd92
BS
79582016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7959
7960 PR target/60410
7961 * c.opt (fshort-double): Remove.
7962
46cb9332
MS
79632016-02-05 Martin Sebor <msebor@redhat.com>
7964
7965 PR c++/69662
7966 * c.opt (Warning options): Update -Wplacement-new to take
7967 an optional argument.
7968
e1b81f2b
JJ
79692016-02-01 Jakub Jelinek <jakub@redhat.com>
7970
7971 PR preprocessor/69543
7972 PR c/69558
7973 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7974 instead of loc to control_warning_option.
7975
b6adbb9f
NS
79762016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7977
7978 * c.opt (fopenacc-dim=): New option.
7979
5d70666e
RB
79802016-01-27 Ryan Burn <contact@rnburn.com>
7981
7982 PR cilkplus/69267
7983 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7984 gimplify_arg. Removed superfluous post_p argument.
7985 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7986 superfluous post_p argument.
7987 * c-gimplify.c (c_gimplify_expr): Likewise.
7988
01e1dea3
DM
79892016-01-26 David Malcolm <dmalcolm@redhat.com>
7990
7991 PR other/69006
7992 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7993 pp_newline_and_flush with pp_flush.
7994
9f04a53e
MS
79952016-01-20 Martin Sebor <msebor@redhat.com>
7996
7997 PR c/69405
7998 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7999 an incompatible argument when the argument isn't a valid tree node.
8000
7f26f7df
JM
80012016-01-18 Jason Merrill <jason@redhat.com>
8002
8003 PR c++/68767
8004 * c-common.c (check_function_arguments_recurse): Fold the whole
8005 COND_EXPR, not just the condition.
8006
f62bf092
TV
80072016-01-18 Tom de Vries <tom@codesourcery.com>
8008
8009 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8010 classify as loop clause.
8011
e0a575ff
JJ
80122016-01-15 Jakub Jelinek <jakub@redhat.com>
8013
8014 PR bootstrap/68271
8015 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8016 C++ FE no longer has limit on number of pragmas.
8017
80182015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
8019
8020 PR c++/69048
8021 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 8022 to add missing cleanup point.
b6e3db06 8023
c7df95d8
DM
80242016-01-14 David Malcolm <dmalcolm@redhat.com>
8025
8026 PR c++/68819
8027 * c-indentation.c (get_visual_column): Add location_t param.
8028 Handle the column number being zero by effectively disabling the
8029 warning, with an "inform".
8030 (should_warn_for_misleading_indentation): Add location_t argument
8031 for all uses of get_visual_column.
8032
21efdd80
PP
80332016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8034
8035 PR c++/69029
8036 * c-indentation.c (should_warn_for_misleading_indentation):
8037 Don't warn about do-while statements.
8038
7a127fa7
MS
80392016-01-07 Martin Sebor <msebor@redhat.com>
8040
8041 PR c/68966
8042 * c-common.c (sync_resolve_size): Reject first argument when it's
8043 a pointer to _Bool.
8044
c589e975
DM
80452016-01-05 David Malcolm <dmalcolm@redhat.com>
8046
8047 PR c/69122
8048 * c-indentation.c (get_visual_column): Remove default argument.
8049 (should_warn_for_misleading_indentation): For the multiline case,
8050 update call to get_visual_column for next_stmt_exploc so that it
8051 captures the location of the first non-whitespace character in the
8052 relevant line. Don't issue warnings if there is non-whitespace
8053 before the next statement.
8054
818ab71a
JJ
80552016-01-04 Jakub Jelinek <jakub@redhat.com>
8056
8057 Update copyright years.
8058
745e411d
DM
80592015-12-21 David Malcolm <dmalcolm@redhat.com>
8060
8061 * c-common.c (binary_op_error): Convert first param from
8062 location_t to rich_location * and use it when emitting an error.
8063 * c-common.h (binary_op_error): Convert first param from
8064 location_t to rich_location *.
8065
de67c4c3
DM
80662015-12-16 David Malcolm <dmalcolm@redhat.com>
8067
8068 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8069 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8070
4a38b02b
IV
80712015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8072
8073 * c-common.c (c_common_attribute_table): Handle "omp declare target
8074 link" attribute.
8075
54d62f51
JJ
80762015-12-14 Jakub Jelinek <jakub@redhat.com>
8077
8078 PR c/68833
8079 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8080
8d4227c8
TB
80812014-12-12 Tobias Burnus <burnus@net-b.de>
8082
8083 PR fortran/68815
8084 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8085 specifiers (%d, %i,%u and %c).
8086
f6069ccc
DM
80872015-12-10 David Malcolm <dmalcolm@redhat.com>
8088
8089 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8090
63bbf46d
JJ
80912015-12-08 Jakub Jelinek <jakub@redhat.com>
8092
8093 PR c/48088
8094 PR c/68657
8095 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8096 * c-pragma.c (handle_pragma_diagnostic): Adjust
8097 control_warning_option caller.
8098
f79520bb
DM
80992015-12-07 David Malcolm <dmalcolm@redhat.com>
8100
8101 * c-common.c (c_cpp_error): Update for change to
8102 rich_location::set_range.
8103
b3d5bc62
JJ
81042015-12-04 Paolo Bonzini <bonzini@gnu.org>
8105
8106 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8107 shifting 1 out of the sign bit.
8108
81092015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8110
8111 * c-common.c (c_common_attribute_table[]): Update max arguments
8112 count for "simd" attribute.
8113 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8114
6eb4a537
JJ
81152015-12-03 Jakub Jelinek <jakub@redhat.com>
8116
8117 PR preprocessor/57580
8118 * c-ppoutput.c (print): Change printed field to bool.
8119 Move src_file last for smaller padding.
8120 (init_pp_output): Set print.printed to false instead of 0.
8121 (scan_translation_unit): Fix up formatting. Set print.printed
8122 to true after printing something other than newline.
8123 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8124 (maybe_print_line_1): Set print.printed to false instead of 0.
8125 (print_line_1): Likewise.
8126 (do_line_change): Set print.printed to true instead of 1.
8127 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8128 dump_macro): Set print.printed to false after printing newline.
8129
4250754e
JM
81302015-12-02 Jason Merrill <jason@redhat.com>
8131
f479b43d
JM
8132 * c-common.c (fold_for_warn): New.
8133 (warn_logical_operator, warn_tautological_cmp)
8134 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8135
4250754e
JM
8136 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8137 (c_fully_fold_internal, decl_constant_value_for_optimization):
8138 Move to c/c-fold.c.
8139 * c-common.h: Don't declare decl_constant_value_for_optimization.
8140
e9e32ee6
JM
81412015-12-02 Joseph Myers <joseph@codesourcery.com>
8142
8143 PR c/68162
8144 * c-common.h (c_build_qualified_type): Add extra default
8145 arguments.
8146
37d5ad46
JB
81472015-12-01 Julian Brown <julian@codesourcery.com>
8148 Cesar Philippidis <cesar@codesourcery.com>
8149 James Norris <James_Norris@mentor.com>
8150
8151 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8152 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8153 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8154
f07862c7
EB
81552015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8156
8157 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8158 (decl_sloc_common): Delete and move bulk of processing to...
8159 (decl_sloc): ...here.
8160 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8161 (dump_ada_double_name): Remove S parameter and compute the suffix.
8162 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8163 element type and deal with an anonymous one.
8164 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8165 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8166 and remove reference to QUAL_UNION_TYPE.
8167 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8168 (dump_nested_type): ...here. New function extracted from above.
8169 Generate a full declaration for anonymous element type of arrays.
8170 (print_ada_declaration): Really skip anonymous declarations. Remove
8171 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8172 Clean up processing of declarations of array types and objects.
8173 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8174 Remove obsolete code and tidy up.
8175
75c8aac3
JH
81762015-11-29 Jan Hubicka <hubicka@ucw.cz>
8177
8178 PR c/67581
8179 * c-common.c (handle_transparent_union_attribute): Update
8180 also type variants.
8181
b58d3df2
ML
81822015-11-27 Martin Liska <mliska@suse.cz>
8183
8184 PR c++/68312
8185 * array-notation-common.c (cilkplus_extract_an_triplets):
8186 Release vector of vectors.
8187 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8188
89a01fcf
EB
81892015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8190
8191 PR c++/68527
8192 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8193 (print_ada_struct_decl): Likewise.
8194
cc5c5226
IZ
81952015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8196
8197 PR c++/68001
8198 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8199 * cilk.c (recognize_spawn): Determine location in a more precise
8200 way.
8201
269adb9d
JM
82022015-11-19 Jason Merrill <jason@redhat.com>
8203
8204 * c-common.c (shorten_compare): But look through macros from
8205 system headers.
8206
d0eccfcd
JM
82072015-11-18 Jason Merrill <jason@redhat.com>
8208
8209 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8210 non-constant operand comes from a macro.
8211
3e44547c
JM
82122015-11-17 Jason Merrill <jason@redhat.com>
8213
8214 PR bootstrap/68346
8215 * c-common.c (warn_tautological_cmp): Fold before checking for
8216 constants.
8217
0f62c7a0
MP
82182015-11-16 Marek Polacek <polacek@redhat.com>
8219
8220 PR c++/68362
8221 * c-common.c (check_case_bounds): Fold low and high cases.
8222
a868811e
MP
82232015-11-16 Marek Polacek <polacek@redhat.com>
8224
8225 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8226 * c-common.c (c_common_get_alias_set): Likewise.
8227 (handle_visibility_attribute): Likewise.
8228
fff77217
KY
82292015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8230
8231 * c-common.c (handle_simd_attribute): New.
8232 (struct attribute_spec): Add entry for "simd".
8233 (handle_simd_attribute): New.
8234
269e63b7
KT
82352015-11-13 Kai Tietz <ktietz70@googlemail.com>
8236
8237 * c-lex.c (interpret_float): Use fold_convert.
8238
ebedc9a3
DM
82392015-11-13 David Malcolm <dmalcolm@redhat.com>
8240
8241 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8242 and store it on the result.
8243 * c-opts.c (c_common_init_options): Set
8244 global_dc->colorize_source_p.
8245
6e232ba4
JN
82462015-11-12 James Norris <jnorris@codesourcery.com>
8247 Joseph Myers <joseph@codesourcery.com>
8248
7365279f 8249 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8250 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8251 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8252 PRAGMA_OACC_CLAUSE_LINK.
8253
e78bede6
MP
82542015-11-11 Marek Polacek <polacek@redhat.com>
8255
8256 PR c/68107
8257 PR c++/68266
8258 * c-common.c (valid_array_size_p): New function.
8259 * c-common.h (valid_array_size_p): Declare.
8260
3f8257db 82612015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8262
8263 PR bootstrap/68271
8264 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8265
69f293c9
AM
82662015-11-11 Andrew MacLeod <amacleod@redhat.com>
8267
8268 * array-notation-common.c: Remove unused header files.
8269 * c-ada-spec.c: Likewise.
8270 * c-cilkplus.c: Likewise.
8271 * c-common.c: Likewise.
8272 * c-cppbuiltin.c: Likewise.
8273 * c-dump.c: Likewise.
8274 * c-format.c: Likewise.
8275 * c-gimplify.c: Likewise.
8276 * c-indentation.c: Likewise.
8277 * c-lex.c: Likewise.
8278 * c-omp.c: Likewise.
8279 * c-opts.c: Likewise.
8280 * c-pch.c: Likewise.
8281 * c-ppoutput.c: Likewise.
8282 * c-pragma.c: Likewise.
8283 * c-pretty-print.c: Likewise.
8284 * c-semantics.c: Likewise.
8285 * c-ubsan.c: Likewise.
8286 * cilk.c: Likewise.
8287 * stub-objc.c: Likewise.
8288
3a40d81d
NS
82892015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8290 Cesar Philippidis <cesar@codesourcery.com>
8291 James Norris <jnorris@codesourcery.com>
8292 Julian Brown <julian@codesourcery.com>
8293 Nathan Sidwell <nathan@codesourcery.com>
8294
8295 * c-pragma.c (oacc_pragmas): Add "routine".
8296 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8297
ee45a32d
EB
82982015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8299
8300 * c-common.c (c_common_attributes): Add scalar_storage_order.
8301 (handle_scalar_storage_order_attribute): New function.
8302 * c-pragma.c (global_sso): New variable.
8303 (maybe_apply_pragma_scalar_storage_order): New function.
8304 (handle_pragma_scalar_storage_order): Likewise.
8305 (init_pragma): Register scalar_storage_order.
8306 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8307 * c.opt (Wscalar-storage-order): New warning.
8308 (fsso-struct=): New option.
8309
eb11eb15
MS
83102015-11-08 Martin Sebor <msebor@redhat.com>
8311
8312 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8313
0aad0198
RS
83142015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8315
8316 * c-common.c: Don't undef DEF_BUILTIN.
8317
8a645150
DM
83182015-11-06 David Malcolm <dmalcolm@redhat.com>
8319
8320 * c-common.c (c_cpp_error): Convert parameter from location_t to
8321 rich_location *. Eliminate the "column_override" parameter and
8322 the call to diagnostic_override_column.
8323 Update the "done_lexing" clause to set range 0
8324 on the rich_location, rather than overwriting a location_t.
8325 * c-common.h (c_cpp_error): Convert parameter from location_t to
8326 rich_location *. Eliminate the "column_override" parameter.
8327
7a5e4956
CP
83282015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8329 Thomas Schwinge <thomas@codesourcery.com>
8330 James Norris <jnorris@codesourcery.com>
8331
8332 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8333 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8334 clauses with parallel and kernels and loops.
8335 * c-pragma.h (enum pragma_omp_clause): Add entries for
8336 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8337 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8338 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8339 INDEPENDENT,SEQ}.
8340 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8341
e2f5cc96
MS
83422015-11-05 Martin Sebor <msebor@redhat.com>
8343
8344 PR c++/67942
8345 * c.opt (-Wplacement-new): New option.
8346
e01d41e5
JJ
83472015-11-05 Jakub Jelinek <jakub@redhat.com>
8348
8349 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8350 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8351 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8352 save_expr or create_tmp_var* if TEST is true.
8353 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8354 Don't call add_stmt here.
8355 (struct c_omp_check_loop_iv_data): New type.
8356 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8357 c_omp_check_loop_iv_exprs): New functions.
8358 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8359 distribute.
8360 (c_omp_declare_simd_clauses_to_numbers): Change
8361 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8362 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8363 from numbers to PARM_DECLs.
8364
595278be
MM
83652015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8366
8367 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8368 flag_checking.
8369
3f8257db 83702015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8371
8372 PR c++-common/67882
b3d5bc62
JJ
8373 * c-common.h (fold_offsetof_1): Add argument.
8374 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8375 offsetof expressions that reference elements past the end of
8376 an array.
8377
4bf9e5a8
TS
83782015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8379 Chung-Lin Tang <cltang@codesourcery.com>
8380
8381 * c-pragma.c (oacc_pragmas): Add "atomic".
8382 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8383
3b1661a9
ES
83842015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8385
8386 * c-common.c (handle_target_clones_attribute): New.
8387 (c_common_attribute_table): Add handle_target_clones_attribute.
8388 (handle_always_inline_attribute): Add check on target_clones attribute.
8389 (handle_target_attribute): Ditto.
8390
2adfab87
AM
83912015-10-29 Andrew MacLeod <amacleod@redhat.com>
8392
8393 * array-notation-common.c: Reorder #include's and remove duplicates.
8394 * c-ada-spec.c: Likewise.
8395 * c-cilkplus.c: Likewise.
8396 * c-common.c: Likewise.
8397 * c-cppbuiltin.c: Likewise.
8398 * c-dump.c: Likewise.
8399 * c-format.c: Likewise.
8400 * c-gimplify.c: Likewise.
8401 * c-indentation.c: Likewise.
8402 * c-lex.c: Likewise.
8403 * c-omp.c: Likewise.
8404 * c-opts.c: Likewise.
8405 * c-pch.c: Likewise.
8406 * c-ppoutput.c: Likewise.
8407 * c-pragma.c: Likewise.
8408 * c-pretty-print.c: Likewise.
8409 * c-semantics.c: Likewise.
8410 * c-ubsan.c: Likewise.
8411 * cilk.c: Likewise.
8412 * stub-objc.c: Likewise.
8413
d90ec4f2
JM
84142015-10-28 Jason Merrill <jason@redhat.com>
8415
8416 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8417
88bae6f4
TS
84182015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8419 James Norris <jnorris@codesourcery.com>
8420 Cesar Philippidis <cesar@codesourcery.com>
8421
8422 PR c/64765
8423 PR c/64880
8424 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8425 * c-omp.c (c_oacc_split_loop_clauses): New function.
8426
b1726d6c
MS
84272015-10-21 Martin Sebor <msebor@redhat.com>
8428
8429 PR driver/68043
8430 * c.opt: End each sentence that describes an option with a period.
8431
fa60eeb9
MP
84322015-10-20 Marek Polacek <polacek@redhat.com>
8433
8434 * array-notation-common.c (is_cilkplus_vector_p): Define.
8435 * c-common.h (is_cilkplus_vector_p): Declare.
8436
95979049
MP
84372015-10-20 Marek Polacek <polacek@redhat.com>
8438
8439 * c.opt (std=gnu++11): Do not describe as experimental.
8440 (std=gnu++14): Likewise.
8441
2a9fb712
JM
84422015-10-19 Jason Merrill <jason@redhat.com>
8443
8444 * c-cppbuiltin.c (c_cpp_builtins): Define
8445 __cpp_nontype_template_args.
8446
13b380a3
JM
84472015-10-19 Jason Merrill <jason@redhat.com>
8448
8449 * c-cppbuiltin.c (c_cpp_builtins): Define
8450 __cpp_enumerator_attributes, __cpp_fold_expressions,
8451 __cpp_unicode_characters.
8452
d9a6bd32
JJ
84532015-10-13 Jakub Jelinek <jakub@redhat.com>
8454 Aldy Hernandez <aldyh@redhat.com>
8455
8456 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8457 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8458 (c_define_builtins): Likewise.
8459 * c-common.h (enum c_omp_clause_split): Add
8460 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8461 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8462 (c_finish_omp_for): Add ORIG_DECLV argument.
8463 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8464 201511 instead of 201307.
8465 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8466 OMP_CRITICAL_CLAUSES to it.
8467 (c_finish_omp_ordered): Add CLAUSES argument, set
8468 OMP_ORDERED_CLAUSES to it.
8469 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8470 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8471 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8472 constructs and new OpenMP 4.5 clauses. Clear
8473 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8474 verification code.
8475 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8476 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8477 (enum pragma_omp_clause): Add
8478 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8479 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8480
624d31fe
RS
84812015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8482
8483 * c-lex.c (interpret_float): Use real_equal instead of
8484 REAL_VALUES_EQUAL.
8485
b8fd7909
JM
84862015-10-04 Jason Merrill <jason@redhat.com>
8487
8488 Implement N4514, C++ Extensions for Transactional Memory.
8489 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8490 (c_common_attribute_table): Add transaction_safe_dynamic.
8491 transaction_safe now affects type identity.
8492 (handle_tm_attribute): Handle transaction_safe_dynamic.
8493 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8494 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8495 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8496 (D_TRANSMEM): New.
8497 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8498 * c-pretty-print.c (pp_c_attributes_display): Don't print
8499 transaction_safe in C++.
8500
12651878
MP
85012015-10-02 Marek Polacek <polacek@redhat.com>
8502
8503 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8504
3e3b8d63
MP
85052015-10-02 Marek Polacek <polacek@redhat.com>
8506
8507 PR c/64249
8508 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8509 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8510 * c.opt (Wduplicated-cond): New option.
8511
0d1a8f75
JM
85122015-10-01 Joseph Myers <joseph@codesourcery.com>
8513
8514 * c.opt (std=c11): Do not describe as experimental.
8515 (std=gnu11): Likewise.
8516 (std=iso9899:2011): Likewise.
8517
3e32ee19
NS
85182015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8519
8520 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8521 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8522
974348ee
MP
85232015-09-25 Marek Polacek <polacek@redhat.com>
8524
8525 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8526 (ubsan_instrument_shift): Likewise.
8527
15dbc1a6
MP
85282015-09-25 Marek Polacek <polacek@redhat.com>
8529
8530 PR sanitizer/64906
8531 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8532
6b95d7cc
PP
85332015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8534
8535 * c-indentation.c (should_warn_for_misleading_indentation):
8536 Compare next_stmt_vis_column with guard_line_first_nws instead
8537 of with guard_line_vis_column.
8538
c1822f9c
MLI
85392015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8540
8541 PR c/49654
8542 PR c/49655
8543 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8544 options and options not valid for the current language.
8545
d5398058
PP
85462015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8547
8548 * c-indentation.c (should_warn_for_misleading_indentation):
8549 Float out and consolidate the calls to get_visual_column that
8550 are passed guard_exploc as an argument. Compare
8551 next_stmt_vis_column with guard_line_first_nws instead of with
8552 body_line_first_nws.
8553
6b333269
NS
85542015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8555
8556 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8557 Wnamespaces): New C++ warnings.
8558
a75f1574
JM
85592015-09-22 Jason Merrill <jason@redhat.com>
8560
8561 * c-common.h (abi_compat_version_crosses): New.
8562 (warn_abi_version): Declare.
8563 * c-common.c: Define it.
8564 * c-opts.c (c_common_post_options): Handle it.
8565 flag_abi_compat_version defaults to 8.
8566
bdaaa8b7
VV
85672015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8568
8569 Complete the implementation of N4230, Nested namespace definition.
8570 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8571 __cpp_nested_namespace_definitions.
8572
eaa797e8
MLI
85732015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8574
8575 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8576
c4914de6
MLI
85772015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8578
8579 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8580 when warning.
8581 * c-pragma.h (pragma_lex): Add optional loc argument.
8582
fcb87c50
MM
85832015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8584
8585 * c-format.c (check_format_arg): Adjust to use common block size in all
8586 object pools.
8587
31bdd08a
DM
85882015-09-15 David Malcolm <dmalcolm@redhat.com>
8589
8590 * c-format.c (location_from_offset): Update for change in
8591 signature of location_get_source_line.
8592 * c-indentation.c (get_visual_column): Likewise.
8593 (line_contains_hash_if): Likewise.
8594
aa9f4b4c
MP
85952015-09-14 Marek Polacek <polacek@redhat.com>
8596
8597 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8598 setting various warnings.
8599
aa256c4a
MP
86002015-09-14 Marek Polacek <polacek@redhat.com>
8601
8602 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8603 a negative value.
8604
0f876f22
MW
86052015-09-11 Mark Wielaard <mjw@redhat.com>
8606
8607 PR c/28901
8608 * c.opt (Wunused-variable): Option from common.opt.
8609 (Wunused-const-variable): New option.
8610
273aa49e
PC
86112015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8612
8613 PR c++/53184
8614 * c.opt ([Wsubobject-linkage]): Add.
8615
1807ffc1
MS
86162015-09-03 Martin Sebor <msebor@redhat.com>
8617
8618 PR c/66516
8619 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8620 functions.
8621 * c-common.c (reject_gcc_builtin): Define.
8622
38942840
BI
86232015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8624
8625 PR middle-end/60586
8626 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8627 prototype.
8628 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8629 cilk_gimplify_call_params_in_spawned_fn.
8630 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8631 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8632 unwrapping.
8633
c316b5e4
MP
86342015-08-25 Marek Polacek <polacek@redhat.com>
8635
8636 PR middle-end/67330
8637 * c-common.c (handle_weak_attribute): Don't check whether the
8638 visibility can be changed here.
8639
584a7c46
MLI
86402015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8641
8642 * c-lex.c (c_lex_with_flags): Use explicit locations.
8643
a79683d5
TS
86442015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8645
8646 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8647 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8648
61717a45
FXC
86492015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8650
8651 PR middle-end/36757
8652 * c-common.c (check_builtin_function_arguments): Add check
8653 for BUILT_IN_SIGNBIT argument.
8654
329524f5
PC
86552015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8656
8657 PR c++/67160
8658 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8659 in c++1z mode.
8660
4ee55665
MP
86612015-08-17 Marek Polacek <polacek@redhat.com>
8662
8663 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8664 with whitespaces before qualifier names.
8665
b893e375
MP
86662015-08-12 Marek Polacek <polacek@redhat.com>
8667
8668 PR c++/55095
8669 * c-common.c (maybe_warn_shift_overflow): Properly handle
8670 left-shifting 1 into the sign bit.
8671
c2d89095
MLI
86722015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8673
8674 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8675
971e17ff
AS
86762015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8677 Braden Obrzut <admin@maniacsvault.net>
8678 Jason Merrill <jason@redhat.com>
8679
8680 Add C++ Concepts TS support.
8681 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8682 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8683 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8684 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8685 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8686 * c.opt (fconcepts): New.
8687
b3d5bc62
JJ
86882015-08-02 Martin Sebor <msebor@redhat.com>
8689
8690 * c.opt (-Wframe-address): New warning option.
8691
8ebca419
PP
86922015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8693
8694 * c-indentation.c (should_warn_for_misleading_indentation):
8695 Improve heuristics.
8696
1a1e101f
PP
86972015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8698
8699 * c-indentation.c (get_visual_column): Add parameter first_nws,
8700 use it. Update comment documenting the function.
8701 (is_first_nonwhitespace_on_line): Remove.
8702 (should_warn_for_misleading_indentation): Replace usage of
8703 of is_first_nonwhitespace_on_line with get_visual_column.
8704
992118a1
PP
87052015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8706
8707 * c-indentation.h (struct token_indent_info): Define.
8708 (get_token_indent_info): Define.
8709 (warn_for_misleading_information): Declare.
8710 * c-common.h (warn_for_misleading_information): Remove.
8711 * c-identation.c (warn_for_misleading_indentation):
8712 Change declaration to take three token_indent_infos. Adjust
8713 accordingly.
8714 * c-identation.c (should_warn_for_misleading_indentation):
8715 Likewise. Bail out early if the body is a compound statement.
8716 (guard_tinfo_to_string): Define.
8717
e8fa3817
JM
87182015-07-30 Jason Merrill <jason@redhat.com>
8719
8720 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8721 '*' for reference decay.
8722
173864e8
MP
87232015-07-30 Marek Polacek <polacek@redhat.com>
8724
8725 * c-common.c (warn_tautological_cmp): Bail for float types.
8726
f2afe6dd
MP
87272015-07-27 Marek Polacek <polacek@redhat.com>
8728
8729 PR bootstrap/67030
8730 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8731
05b28fd6
MP
87322015-07-27 Marek Polacek <polacek@redhat.com>
8733
8734 PR c++/66555
8735 PR c/54979
8736 * c-common.c (find_array_ref_with_const_idx_r): New function.
8737 (warn_tautological_cmp): New function.
8738 * c-common.h (warn_tautological_cmp): Declare.
8739 * c.opt (Wtautological-compare): New option.
8740
5a5062b8
MP
87412015-07-23 Marek Polacek <polacek@redhat.com>
8742
8743 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8744 (ubsan_instrument_shift): Likewise.
8745
dc891fe7
MP
87462015-07-23 Marek Polacek <polacek@redhat.com>
8747
8748 PR sanitizer/66908
8749 * c-ubsan.c: Include gimplify.h.
8750 (ubsan_instrument_division): Unshare OP0 and OP1.
8751 (ubsan_instrument_shift): Likewise.
8752
451b5e48
MP
87532015-07-20 Marek Polacek <polacek@redhat.com>
8754 Richard Sandiford <richard.sandiford@arm.com>
8755
8756 PR c++/55095
8757 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8758 Use EXPR_LOC_OR_LOC.
8759 (maybe_warn_shift_overflow): New function.
8760 * c-common.h (maybe_warn_shift_overflow): Declare.
8761 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8762 * c.opt (Wshift-overflow): New option.
8763
fb0b2914
ML
87642015-07-16 Martin Liska <mliska@suse.cz>
8765
8766 * c-format.c (static void check_format_info_main): Use
8767 object_allocator instead of pool_allocator.
8768 (check_format_arg): Likewise.
8769 (check_format_info_main): Likewise.
8770
903f5c23
AM
87712015-07-15 Andrew MacLeod <amacleod@redhat.com>
8772
8773 * c-opts.c: Remove multiline #include comment.
8774
026c3cfd
AH
87752015-07-12 Aldy Hernandez <aldyh@redhat.com>
8776
8777 * c-common.c: Fix double word typos.
8778
bb49ee66
EB
87792015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8780
8781 * c-ada-spec.h (cpp_operation): Revert latest change.
8782 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8783 constructors and destructors.
8784
1916bcb5
AM
87852015-07-09 Andrew MacLeod <amacleod@redhat.com>
8786
8787 * c-common.h: Adjust includes for flags.h changes.
8788 * stub-objc.c: Likewise.
026c3cfd 8789
a9dcd529
EB
87902015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8791
8792 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8793 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8794
b03b462f
JJ
87952015-07-08 Jakub Jelinek <jakub@redhat.com>
8796
8797 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8798 are to be removed, return NULL rather than original clauses list.
8799
c7131fb2
AM
88002015-07-07 Andrew MacLeod <amacleod@redhat.com>
8801
8802 * array-notation-common.c: Adjust includes.
8803 * c-ada-spec.c: Likewise.
8804 * c-cilkplus.c: Likewise.
8805 * c-common.h: Likewise.
8806 * c-cppbuiltin.c: Likewise.
8807 * c-dump.c: Likewise.
8808 * c-format.c: Likewise.
8809 * c-gimplify.c: Likewise.
8810 * c-indentation.c: Likewise.
8811 * c-lex.c: Likewise.
8812 * c-omp.c: Likewise.
8813 * c-opts.c: Likewise.
8814 * c-pch.c: Likewise.
8815 * c-ppoutput.c: Likewise.
8816 * c-pragma.c: Likewise.
8817 * c-pretty-print.c: Likewise.
8818 * c-semantics.c: Likewise.
8819 * c-ubsan.c: Likewise.
8820 * cilk.c: Likewise.
8821 * stub-objc.c: Likewise.
8822
2a7fb83f
EB
88232015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8824
8825 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8826 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8827
a03c9bf1
JM
88282015-07-01 Jason Merrill <jason@redhat.com>
8829
36a85135
JM
8830 * c-common.h (D_CXX11): Rename from D_CXX0X.
8831 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8832 * c-common.c: Adjust.
8833
e7fa68d5
JM
8834 * c-opts.c (c_common_post_options): Default to C++14.
8835
a03c9bf1
JM
8836 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8837
fe95b036
ESR
88382015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8839
8840 Implement N4197 - Adding u8 character literals
b3d5bc62 8841 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8842 CPP_CHAR.
b3d5bc62 8843 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8844 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8845 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8846 and CPP_UTF8CHAR tokens.
8847 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8848
da2e71c9
MLI
88492015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8850
8851 PR fortran/66605
8852 * c-common.c (do_warn_unused_parameter): Move here.
8853 * c-common.h (do_warn_unused_parameter): Declare.
8854
b155cfd9
MP
88552015-06-29 Marek Polacek <polacek@redhat.com>
8856
8857 PR c/66322
8858 * c-common.c (check_case_bounds): Add bool * parameter. Set
8859 OUTSIDE_RANGE_P.
8860 (c_add_case_label): Add bool * parameter. Pass it down to
8861 check_case_bounds.
8862 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8863 warning here.
8864 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8865 declarations.
8866
31521951
MP
88672015-06-27 Marek Polacek <polacek@redhat.com>
8868
8869 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8870 or VECTOR_INTEGER_TYPE_P throughout.
8871 * c-gimplify.c: Likewise.
8872
22d03525
MP
88732015-06-26 Marek Polacek <polacek@redhat.com>
8874
8875 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8876 * c-common.c (c_fully_fold_internal): Likewise.
8877 (c_alignof_expr): Likewise.
8878 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8879 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8880 * cilk.c (create_parm_list): Likewise.
22d03525 8881
af05e6e5
MP
88822015-06-26 Marek Polacek <polacek@redhat.com>
8883
8884 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8885
f0889939
AM
88862015-06-25 Andrew MacLeod <amacleod@redhat.com>
8887
8888 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8889 * c-gimplify.c: Likewise.
8890 * c-pragma.c: Likewise.
8891 * c-ubsan.c: Likewise.
8892 * cilk.c: Likewise.
8893
ca752f39
RS
88942015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8895
8896 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8897 ggc_hasher.
8898
16a16ec7
AM
88992015-06-25 Andrew MacLeod <amacleod@redhat.com>
8900
8901 * cilk.c: Move calls.h after tm.h in the include chain.
8902
0ae9bd27
MP
89032015-06-25 Marek Polacek <polacek@redhat.com>
8904
8905 * array-notation-common.c: Use VAR_P throughout.
8906 * c-ada-spec.c: Likewise.
8907 * c-common.c: Likewise.
8908 * c-format.c: Likewise.
8909 * c-gimplify.c: Likewise.
8910 * c-omp.c: Likewise.
8911 * c-pragma.c: Likewise.
8912 * c-pretty-print.c: Likewise.
8913 * cilk.c: Likewise.
8914
62f9079a
MP
89152015-06-25 Marek Polacek <polacek@redhat.com>
8916
8917 * cilk.c (extract_free_variables): Use is_global_var.
8918
0fa16060
RS
89192015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8920
8921 * c-common.c: Don't include target-def.h.
8922
a68ae2e1
MP
89232015-06-23 Marek Polacek <polacek@redhat.com>
8924
8925 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8926 when comparing INTEGER_CSTs.
8927
c6a2f2d9
PMR
89282015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8929
8930 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8931 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8932 (dump_ada_template): Skip partially specialized types.
8933
6b4db501
MM
89342015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8935
8936 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8937 swapping.
8938
abb226c9
AM
89392015-06-17 Andrew MacLeod <amacleod@redhat.com>
8940
8941 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8942 * c-ada-spec.c: Likewise.
8943 * c-cilkplus.c: Likewise.
8944 * c-common.c: Likewise.
8945 * c-common.h: Likewise.
8946 * c-cppbuiltin.c: Likewise.
8947 * c-dump.c: Likewise.
8948 * c-format.c: Likewise.
8949 * c-gimplify.c: Likewise.
8950 * c-indentation.c: Likewise.
8951 * c-lex.c: Likewise.
8952 * c-omp.c: Likewise.
8953 * c-opts.c: Likewise.
8954 * c-pch.c: Likewise.
8955 * c-ppoutput.c: Likewise.
8956 * c-pragma.c: Likewise.
8957 * c-pretty-print.c: Likewise.
8958 * c-semantics.c: Likewise.
8959 * c-ubsan.c: Likewise.
8960 * cilk.c: Likewise.
8961 * stub-objc.c: Likewise.
8962
076fecad
PP
89632015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8964
8965 PR c++/65168
8966 * c-common.c (c_common_truthvalue_conversion): Warn when
8967 converting an address of a reference to a truth value.
8968
13fdf2e2
AM
89692015-06-08 Andrew MacLeod <amacleod@redhat.com>
8970
8971 * array-notation-common.c : Adjust include files.
8972 * c-ada-spec.c : Likewise.
8973 * c-cilkplus.c : Likewise.
8974 * c-common.c : Likewise.
8975 * c-common.h : Likewise.
8976 * c-cppbuiltin.c : Likewise.
8977 * c-dump.c : Likewise.
8978 * c-format.c : Likewise.
8979 * c-gimplify.c : Likewise.
8980 * c-indentation.c : Likewise.
8981 * c-lex.c : Likewise.
8982 * c-omp.c : Likewise.
8983 * c-opts.c : Likewise.
8984 * c-pch.c : Likewise.
8985 * c-ppoutput.c : Likewise.
8986 * c-pragma.c : Likewise.
8987 * c-pretty-print.c : Likewise.
8988 * c-semantics.c : Likewise.
8989 * c-ubsan.c : Likewise.
8990 * cilk.c : Likewise.
8991 * stub-objc.c : Likewise.
8992
a1661b90
MP
89932015-06-08 Marek Polacek <polacek@redhat.com>
8994
8995 PR c/66415
8996 * c-format.c (location_from_offset): Return LOC if LINE is null.
8997
d7438551
AH
89982015-06-05 Aldy Hernandez <aldyh@redhat.com>
8999
9000 * c-common.h (c_parse_final_cleanups): New prototype.
9001 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9002
b3d5bc62
JJ
90032015-06-04 Sriraman Tallam <tmsriram@google.com>
9004
9005 * c-common.c (noplt): New attribute.
9006 (handle_noplt_attribute): New handler.
9007
ecb9f223
AM
90082015-06-04 Andrew MacLeod <amacleod@redhat.com>
9009
9010 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9011 * c-ada-spec.c: Likewise.
9012 * c-cilkplus.c: Likewise.
9013 * c-common.c: Likewise.
9014 * c-common.h: Likewise.
9015 * c-cppbuiltin.c: Likewise.
9016 * c-dump.c: Likewise.
9017 * c-format.c: Likewise.
9018 * c-gimplify.c: Likewise.
9019 * c-indentation.c: Likewise.
9020 * c-lex.c: Likewise.
9021 * c-omp.c: Likewise.
9022 * c-opts.c: Likewise.
9023 * c-pch.c: Likewise.
9024 * c-ppoutput.c: Likewise.
9025 * c-pragma.c: Likewise.
9026 * c-pretty-print.c: Likewise.
9027 * c-semantics.c: Likewise.
9028 * c-ubsan.c: Likewise.
9029 * cilk.c: Likewise.
9030 * stub-objc.c: Likewise.
9031
6ac48155
DM
90322015-06-02 David Malcolm <dmalcolm@redhat.com>
9033
9034 PR c/66220:
9035 * c-indentation.c (should_warn_for_misleading_indentation): Use
9036 expand_location rather than expand_location_to_spelling_point.
9037 Don't warn if the guarding statement is more indented than the
9038 next/body stmts.
9039
773ce42e
DM
90402015-06-02 David Malcolm <dmalcolm@redhat.com>
9041
9042 * c-indentation.c (warn_for_misleading_indentation): Bail out
9043 immediately if -Wmisleading-indentation isn't enabled.
9044
4fef8379
ML
90452015-06-01 Martin Liska <mliska@suse.cz>
9046
9047 * c-format.c (check_format_arg):Use new type-based pool allocator.
9048 (check_format_info_main) Likewise.
9049
1edfb384
EB
90502015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9051
9052 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9053 (has_nontrivial_methods): Likewise.
9054
9677ef52
MP
90552015-05-25 Marek Polacek <polacek@redhat.com>
9056
9057 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9058
fd5c817a
MP
90592015-05-22 Marek Polacek <polacek@redhat.com>
9060
9061 PR c/47043
9062 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9063
a2f45fe6 90642015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
9065
9066 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9067 STACK_GROWS_DOWNWARD.
9068
a2f45fe6 90692015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
9070
9071 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9072 STACK_GROWS_DOWNWARD rather than if it is defined.
9073
0fee2ac2 90742015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 9075
0fee2ac2
MLI
9076 PR c/52952
9077 * c-format.c (location_column_from_byte_offset): New.
9078 (location_from_offset): New.
9079 (struct format_wanted_type): Add offset_loc field.
9080 (check_format_info): Move handling of location for extra arguments
9081 closer to the point of warning.
9082 (check_format_info_main): Pass the result of location_from_offset
9083 to warning_at.
9084 (format_type_warning): Pass the result of location_from_offset
9085 to warning_at.
9086
cf4ef6f7
MP
90872015-05-20 Marek Polacek <polacek@redhat.com>
9088
9089 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9090
3a65ee74
MP
90912015-05-20 Marek Polacek <polacek@redhat.com>
9092
9093 * c-ada-spec.c (dump_sloc): Use DECL_P.
9094
21b634ae
MP
90952015-05-20 Marek Polacek <polacek@redhat.com>
9096
9097 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9098 * c-common.c: Likewise.
9099
0e50b624
DM
91002015-05-19 David Malcolm <dmalcolm@redhat.com>
9101
9102 * c-common.h (fe_file_change): Strengthen param from
9103 const line_map * to const line_map_ordinary *.
9104 (pp_file_change): Likewise.
9105 * c-lex.c (fe_file_change): Likewise.
9106 (cb_define): Use linemap_check_ordinary when invoking
9107 SOURCE_LINE.
9108 (cb_undef): Likewise.
9109 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9110 invoking cb_file_change.
9111 (c_finish_options): Likewise.
9112 (push_command_line_include): Likewise.
9113 (cb_file_change): Strengthen param "new_map" from
9114 const line_map * to const line_map_ordinary *.
9115 * c-ppoutput.c (cb_define): Likewise for local "map".
9116 (pp_file_change): Likewise for param "map" and local "from".
9117
fab27f52
MM
91182015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9119
9120 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9121
2fe1d762
TV
91222015-05-18 Tom de Vries <tom@codesourcery.com>
9123
9124 * c-common.c (build_va_arg_1): New function.
9125 (build_va_arg): Add address operator to va_list operand if necessary.
9126
7a37fa90
MM
91272015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9128
9129 PR c/48956
9130 * c-common.c (int_safely_convertible_to_real_p): Define.
9131 (unsafe_conversion_p): Check conversions involving complex types.
9132 (conversion_warning): Add new warning message for conversions which
9133 discard imaginary component.
9134 * c-common.h: (enum conversion_safety): Add new enumerator for such
9135 conversions.
9136
3aa3c9fc
MP
91372015-05-14 Marek Polacek <polacek@redhat.com>
9138
9139 PR c/66066
9140 PR c/66127
9141 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9142 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9143 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9144 use it. If FOR_INT_CONST, require that all evaluated operands be
9145 INTEGER_CSTs.
9146
c3388e62
DM
91472015-05-12 David Malcolm <dmalcolm@redhat.com>
9148
9149 * c-common.h (warn_for_misleading_indentation): New prototype.
9150 * c-indentation.c: New file.
9151 * c.opt (Wmisleading-indentation): New option.
9152
c7b38fd5
TV
91532015-05-12 Tom de Vries <tom@codesourcery.com>
9154
9155 PR tree-optimization/66010
9156 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9157
381bf11e
JM
91582015-05-09 Jason Merrill <jason@redhat.com>
9159
edff0c06
JM
9160 * c-opts.c (c_common_post_options): Also clear
9161 cpp_opts->cpp_warn_cxx11_compat.
9162
129211bc
JM
9163 * c-common.h (enum cxx_dialect): Add cxx_unset.
9164 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9165 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9166
381bf11e
JM
9167 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9168 (std=gnu++0x): Mark as Undocumented.
9169 (std=gnu++1y): Add deprecated message.
9170
fe191308
JM
91712015-05-08 Jason Merrill <jason@redhat.com>
9172
765189ff
JM
9173 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9174 * c-opts.c: Adjust.
9175
fe191308
JM
9176 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9177
755e528f
MP
91782015-05-08 Marek Polacek <polacek@redhat.com>
9179
9180 PR c/64918
9181 * c.opt (Woverride-init-side-effects): New option.
9182
0173bd2a
MP
91832015-05-07 Marek Polacek <polacek@redhat.com>
9184
9185 PR c/65179
9186 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9187 negative value.
9188 * c.opt (Wshift-negative-value): New option.
9189 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9190 when -Wextra and C99/C++11 mode.
9191
e0f0d3b9
MP
91922015-05-07 Marek Polacek <polacek@redhat.com>
9193 Martin Uecker <uecker@eecs.berkeley.edu>
9194
9195 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9196 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9197
8243e2a9
JM
91982015-05-05 Jason Merrill <jason@redhat.com>
9199
9200 * c.opt (Wterminate): New.
9201
577cd070
MP
92022015-04-30 Marek Polacek <polacek@redhat.com>
9203
9204 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9205 require that the non-constant be of a boolean type.
9206
0373796b
JT
92072015-04-29 Josh Triplett <josh@joshtriplett.org>
9208
e0f0d3b9
MP
9209 * c-common.c (handle_section_attribute): Refactor to reduce
9210 nesting and distinguish between error cases.
0373796b 9211
716c0ba6
MP
92122015-04-29 Marek Polacek <polacek@redhat.com>
9213
9214 PR c/64610
9215 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9216 with 0/1.
9217
8848828b
JJ
92182015-04-29 Jakub Jelinek <jakub@redhat.com>
9219
9220 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9221 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9222 HOST_BITS_PER_WIDE_INT.
9223
ecd0e562
TV
92242015-04-28 Tom de Vries <tom@codesourcery.com>
9225
9226 PR tree-optimization/65887
9227 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9228
2a877204 92292015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9230 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9231
9232 * c-ada-spec.c (in_function): Delete.
9233 (dump_generic_ada_node): Do not change in_function and remove the
9234 redundant code dealing with it.
9235 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9236 (print_ada_methods): Output the static member functions in a nested
9237 package after the regular methods as well as associated renamings.
9238
4853031e
MP
92392015-04-24 Marek Polacek <polacek@redhat.com>
9240
9241 PR c/65830
9242 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9243 and OPT_Wshift_count_overflow.
9244
8c2b7f79
MP
9245 PR c/63357
9246 * c-common.c (warn_logical_operator): Warn if the operands have the
9247 same expressions.
9248
b8787813
MP
92492015-04-24 Marek Polacek <polacek@redhat.com>
9250
9251 PR c/61534
9252 * c-common.c (warn_logical_operator): Bail if either operand comes
9253 from a macro expansion.
9254
8fba1830
BRF
92552015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9256
9257 PR target/55143
9258 * c-common.c (c_default_pointer_mode): Add definition.
9259 * c-common.h (c_default_pointer_mode): Add declaration.
9260
17958621
JJ
92612015-03-11 Jakub Jelinek <jakub@redhat.com>
9262
9263 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9264 on record_builtin_type argument.
9265
7ccb1a11
JJ
92662015-03-10 Jakub Jelinek <jakub@redhat.com>
9267
9268 PR c/65120
9269 * c-common.c (warn_logical_not_parentheses): Don't warn for
9270 !x == 0 or !x != 0.
9271
04fd785e
MP
92722015-03-07 Marek Polacek <polacek@redhat.com>
9273
9274 PR sanitizer/65280
9275 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9276 before trying to figure out whether we have a flexible array member.
9277
a4e26206 92782015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9279 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9280
9281 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9282
0d2489f4
EB
92832015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9284
9285 PR ada/65319
9286 * c-ada-spec.c (print_destructor): Remove obsolete code.
9287
83ed54d7
EB
92882015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9289
9290 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9291 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9292 DECL_TEMPLATE_RESULT emulations.
9293 (dump_ada_template)): Add guard for TYPE_METHODS.
9294
7631f0e2
MP
92952015-02-27 Marek Polacek <polacek@redhat.com>
9296
9297 PR c/65040
9298 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9299
d1783ae5
KT
93002015-02-27 Kai Tietz <ktietz@redhat.com>
9301
9302 PR c/35330
9303 * c-pragma.c (handle_pragma_weak): Do not try to create
9304 weak/alias of declarations not being function, or variable
9305 declarations.
9306
56a9f6bc
TS
93072015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9308
9309 PR libgomp/64625
9310 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9311 Remove macros.
9312 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9313
3d5cb23d
MP
93142015-02-16 Marek Polacek <polacek@redhat.com>
9315
9316 PR c/65066
9317 * c-format.c (check_format_types): Handle null param.
9318
fa008882
MP
93192015-02-13 Marek Polacek <polacek@redhat.com>
9320
9321 PR c/65040
9322 * c-format.c (check_format_types): Don't warn about different
9323 signedness if the original value is in the range of WANTED_TYPE.
9324
785f21af
JM
93252015-02-12 Jason Merrill <jason@redhat.com>
9326
9327 PR c++/64956
9328 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9329 to the current highest version.
9330 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9331
4886ec8e
JJ
93322015-02-04 Jakub Jelinek <jakub@redhat.com>
9333
9334 PR c/64824
9335 PR c/64868
9336 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9337 instead of RDIV_EXPR. Use build_binary_op instead of
9338 build2_loc.
9339
40fecdd6
JM
93402015-01-30 Joseph Myers <joseph@codesourcery.com>
9341
9342 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9343 to pass input_location as first argument.
9344
a0c88d06
TV
93452015-01-23 Tom de Vries <tom@codesourcery.com>
9346
9347 PR libgomp/64672
9348 * c.opt (fopenacc): Mark as LTO option.
9349
1506ae0e
TV
93502015-01-23 Tom de Vries <tom@codesourcery.com>
9351
9352 PR libgomp/64707
9353 * c.opt (fopenmp): Mark as LTO option.
9354
31be63ab
JJ
93552015-01-21 Jakub Jelinek <jakub@redhat.com>
9356
9357 PR c/63307
b1726d6c 9358 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9359 (compare_decls): Fix up formatting.
9360
93612015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9362
9363 PR c/63307
9364 * cilk.c: Include vec.h.
9365 (struct cilk_decls): New structure.
9366 (wrapper_parm_cb): Split this function to...
9367 (fill_decls_vec): ...this...
9368 (create_parm_list): ...and this.
9369 (compare_decls): New function.
9370 (for_local_cb): Remove.
9371 (wrapper_local_cb): Ditto.
9372 (build_wrapper_type): For now first traverse and fill vector of
9373 declarations then sort it and then deal with sorted vector.
9374 (cilk_outline): Ditto.
9375 (declare_one_free_variable): Ditto.
9376
6875457f
JM
93772015-01-21 Jason Merrill <jason@redhat.com>
9378
9379 PR c++/64629
9380 * c-format.c (check_format_arg): Call decl_constant_value.
9381
185c9e56
ML
93822015-01-19 Martin Liska <mliska@suse.cz>
9383
9384 * c-common.c (handle_noicf_attribute): New function.
9385
41dbbb37
TS
93862015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9387 Bernd Schmidt <bernds@codesourcery.com>
9388 James Norris <jnorris@codesourcery.com>
9389 Cesar Philippidis <cesar@codesourcery.com>
9390 Ilmir Usmanov <i.usmanov@samsung.com>
9391 Jakub Jelinek <jakub@redhat.com>
9392
9393 * c.opt (fopenacc): New option.
9394 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9395 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9396 New macros.
9397 * c-common.h (c_finish_oacc_wait): New prototype.
9398 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9399 (c_finish_oacc_wait): New function.
9400 * c-pragma.c (oacc_pragmas): New variable.
9401 (c_pp_lookup_pragma, init_pragma): Handle it.
9402 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9403 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9404 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9405 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9406 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9407 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9408 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9409 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9410 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9411 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9412 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9413 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9414 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9415 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9416 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9417 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9418 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9419 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9420 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9421 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9422 PRAGMA_OACC_CLAUSE_WORKER.
9423
3f8257db 94242015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9425
9426 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9427 for the new option fstack-protector_explicit.
9428 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9429 (handle_stack_protect_attribute): New function.
9430
3f8257db 94312015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9432
9433 * c.opt: New option -Warray-bounds=.
9434
adfac8df
JJ
94352015-01-09 Michael Collison <michael.collison@linaro.org>
9436
9437 * array-notation-common.c: Include hash-set.h, machmode.h,
9438 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9439 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9440 * c-ada-spec.c: Ditto.
9441 * c-cilkplus.c: Ditto.
9442 * c-common.c: Include input.h due to flattening of tree.h.
9443 Define macro GCC_C_COMMON_C.
9444 * c-common.h: Flatten tree.h header files into c-common.h.
9445 Remove include of tree-core.h.
9446 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9447 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9448 fold-const.h, wide-int.h, and inchash.h due to
9449 flattening of tree.h.
9450 * c-dump.c: Ditto.
9451 * c-format.c: Flatten tree.h header files into c-common.h.
9452 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9453 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9454 fold-const.h, wide-int.h, and inchash.h due to
9455 flattening of tree.h.
9456 * c-dump.c: Include hash-set.h, machmode.h,
9457 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9458 fold-const.h, wide-int.h, and inchash.h due to
9459 flattening of tree.h.
9460 * c-format.c: Include hash-set.h, machmode.h,
9461 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9462 fold-const.h, wide-int.h, inchash.h and real.h due to
9463 flattening of tree.h.
9464 * c-gimplify.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
9467 flattening of tree.h.
9468 * cilk.c: Ditto.
9469 * c-lex.c: Ditto.
9470 * c-omp.c: Ditto.
9471 * c-opts.c: Ditto.
9472 * c-pch.c: Ditto.
9473 * c-ppoutput.c: Ditto.
9474 * c-pragma.c: Ditto.
9475 * c-pretty-print.c: Ditto.
9476 * c-semantics.c: Ditto.
9477 * c-ubsan.c: Ditto.
9478 * stub-objc.c: Ditto.
9479
f5481fc4
JM
94802015-01-08 Jason Merrill <jason@redhat.com>
9481
9482 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9483 do_ubsan_in_current_function.
9484 (ubsan_maybe_instrument_reference_or_call): Likewise.
9485 * c-ubsan.h: Declare it.
9486
de35aa66
MS
94872015-01-08 Mike Stump <mikestump@comcast.net>
9488
9489 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9490
4a9a42ab
MP
94912015-01-07 Marek Polacek <polacek@redhat.com>
9492
9493 PR c/64440
9494 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9495 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9496
2f42e5de
TS
94972015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9498
9499 PR c++/31397
9500 * c.opt (Wsuggest-override): New option.
9501
5624e564
JJ
95022015-01-05 Jakub Jelinek <jakub@redhat.com>
9503
9504 Update copyright years.
9505
5bd012f8
MP
95062015-01-05 Marek Polacek <polacek@redhat.com>
9507
9508 PR c/64423
9509 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9510 parameter. Use it.
9511 * c-common.h (warn_array_subscript_with_type_char): Update
9512 declaration.
9513
a7fa8d18
ESR
95142014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9515
9516 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9517 Control macro with flag_sized_deallocation.
9518
3f8257db 95192014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9520
9521 * c.opt (Wdiscarded-array-qualifiers): New option.
9522
1f8d3e84
JJ
95232014-12-19 Jakub Jelinek <jakub@redhat.com>
9524
9525 PR preprocessor/63831
9526 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9527 and __has_cpp_attribute here.
9528 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9529 c_common_has_attribute.
9530 * c-common.h (c_common_has_attribute): New prototype.
9531 * c-lex.c (init_c_lex): Set cb->has_attribute to
9532 c_common_has_attribute instead of cb_has_attribute.
9533 (get_token_no_padding): New function.
9534 (cb_has_attribute): Renamed to ...
9535 (c_common_has_attribute): ... this. No longer static. Use
9536 get_token_no_padding, require ()s, don't build TREE_LIST
9537 unnecessarily, fix up formatting, adjust diagnostics, call
9538 init_attributes.
9539
20b06add
JM
95402014-12-15 Jason Merrill <jason@redhat.com>
9541
9542 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9543 (-Wsized-deallocation): New.
9544 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9545 to on in C++14 and up.
9546
94a073b2
JM
95472014-12-11 Jason Merrill <jason@redhat.com>
9548
acaa5911
JM
9549 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9550
94a073b2
JM
9551 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9552 we aren't complaining about VLAs.
9553
7fb66c15
MP
95542014-12-06 Marek Polacek <polacek@redhat.com>
9555
9556 PR tree-optimization/64183
9557 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9558 shift-expression if it is integer_type_node. Use types_compatible_p.
9559
b731b390
JJ
95602014-11-29 Jakub Jelinek <jakub@redhat.com>
9561
9562 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9563 last argument from create_tmp_var_raw and create_tmp_var calls.
9564 * cilk.c (gimplify_cilk_spawn): Likewise.
9565 * c-omp.c (c_finish_omp_atomic): Likewise.
9566
6a4da643
MP
95672014-11-28 Marek Polacek <polacek@redhat.com>
9568
9569 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9570 instead of unsigned_type_node.
9571
541e35a6
MP
95722014-11-28 Marek Polacek <polacek@redhat.com>
9573
9574 PR c/63862
9575 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9576 to op1_utype.
9577 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9578 expression to unsigned_type_node.
9579
dcc97066
MW
95802014-11-20 Mark Wielaard <mjw@redhat.com>
9581
9582 PR debug/38757
9583 * c-opts.c (set_std_c89): Set lang_hooks.name.
9584 (set_std_c99): Likewise.
9585 (set_std_c11): Likewise.
9586 (set_std_cxx98): Likewise.
9587 (set_std_cxx11): Likewise.
9588 (set_std_cxx14): Likewise.
9589 (set_std_cxx1z): Likewise.
9590
aa7da51a
JJ
95912014-11-21 Jakub Jelinek <jakub@redhat.com>
9592
9593 PR target/63764
9594 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9595 return type to bool.
009a3480 9596 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9597 (convert_vector_to_pointer_for_subscript): Change return type to
9598 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9599 and copy it into a TARGET_EXPR and use that instead of *vecp
9600 directly.
9601
538dd0b7
DM
96022014-11-19 David Malcolm <dmalcolm@redhat.com>
9603
9604 Merger of git branch "gimple-classes-v2-option-3".
9605 * ChangeLog.gimple-classes: New.
9606 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9607 from being just a vec<gimple> to a vec<gbind *>.
9608
c39a5e99
JJ
96092014-11-18 Jakub Jelinek <jakub@redhat.com>
9610
9611 PR sanitizer/63813
9612 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9613 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9614 get_pointer_alignment for non-pointers. Use ptype, or if it is
9615 reference type, corresponding pointer type, as type of kind
9616 argument.
9617 (ubsan_maybe_instrument_reference,
9618 ubsan_maybe_instrument_member_call): Adjust callers.
9619
8537a4a9
MP
96202014-11-15 Marek Polacek <polacek@redhat.com>
9621
9622 PR middle-end/63884
9623 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9624 for NULL fndecl.
9625 (extract_array_notation_exprs): Return for NULL node.
9626
2079956a
JM
96272014-11-12 Joseph Myers <joseph@codesourcery.com>
9628
9629 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9630 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9631
1304953e
JJ
96322014-11-12 Jakub Jelinek <jakub@redhat.com>
9633
9634 PR c/59708
9635 * c-common.c (check_builtin_function_arguments): Handle
9636 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9637
e5e44252
AK
96382014-11-10 Andi Kleen <ak@linux.intel.com>
9639
9640 PR c/60804
9641 * c-common.h (check_no_cilk): Declare.
9642 * cilk.c (get_error_location): New function.
9643 (check_no_cilk): Dito.
9644
e64b984d
AK
96452014-11-10 Andi Kleen <ak@linux.intel.com>
9646
9647 * cilk.c (recognize_spawn): Use expression location
9648 for error message.
9649
13c21655
PC
96502014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9651
9652 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9653
42fd12b1
ESR
96542014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9655
9656 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9657 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9658 (__cpp_range_based_for, __cpp_initializer_lists,
9659 __cpp_delegating_constructors, __cpp_nsdmi,
9660 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9661 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9662 __has_cpp_attribute.
9663 * c-lex.c (cb_has_attribute): New callback CPP function;
9664 (init_c_lex): Set has_attribute callback.
9665
6f450181
RB
96662014-11-04 Richard Biener <rguenther@suse.de>
9667
9668 * c-common.c (shorten_compare): Do not shorten mixed
9669 DFP and non-DFP compares.
9670
26f0e1d6
ESR
96712014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9672
9673 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9674 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9675 Commentary and rearrangement of tests.
9676 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9677 Commentary and rearrangement of tests.
ab20d992 9678 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9679 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9680
ef4bddc2
RS
96812014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9682
9683 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9684 enum from machine_mode.
9685
c582198b
AM
96862014-10-28 Andrew MacLeod <amacleod@redhat.com>
9687
adfac8df
JJ
9688 * c-common.c: Adjust include files.
9689 * c-gimplify.c: Ditto.
9690 * cilk.c: Ditto.
9691 * c-pragma.c: Ditto.
9692 * c-ubsan.c: Ditto.
c582198b 9693
60393bbc
AM
96942014-10-27 Andrew MacLeod <amacleod@redhat.com>
9695
9696 * c-gimplify.c: Adjust include files.
9697
d723bb7c
MLI
96982014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9699
9700 PR c++/53061
9701 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9702 c_common_initialize_diagnostics.
9703 * c-common.h: Likewise.
9704
90f3520e
MP
97052014-10-24 Marek Polacek <polacek@redhat.com>
9706
9707 PR c/56980
9708 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9709 print "struct"/"union"/"enum" for typedefed names.
9710
59d7607a
MP
97112014-10-23 Marek Polacek <polacek@redhat.com>
9712
9713 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9714 in unsigned type.
9715
d95a2703
JJ
97162014-10-22 Jakub Jelinek <jakub@redhat.com>
9717 Yury Gribov <y.gribov@samsung.com>
9718
9719 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9720 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9721 instead of flag_sanitize_recover as bool flag.
9722
8e6ef852
KY
97232014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9724
9725 * cilk.c: Revert previous change.
9726
948cf550
IZ
97272014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9728
9729 PR c/63307
9730 * cilk.c: Include vec.h.
9731 (struct cilk_decls): New structure.
9732 (wrapper_parm_cb): Split this function to...
9733 (fill_decls_vec): ...this...
9734 (create_parm_list): ...and this.
9735 (compare_decls): New function.
9736 (for_local_cb): Remove.
9737 (wrapper_local_cb): Ditto.
9738 (build_wrapper_type): For now first traverse and fill vector of
9739 declarations then sort it and then deal with sorted vector.
9740 (cilk_outline): Ditto.
9741 (declare_one_free_variable): Ditto.
9742
92574c7c
MP
97432014-10-17 Marek Polacek <polacek@redhat.com>
9744
9745 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9746 * c.opt (Wimplicit-int): Initialize to -1.
9747
83685514
AM
97482014-10-16 Andrew MacLeod <amacleod@redhat.com>
9749
9750 * c-pragma.c: Adjust include files.
9751 * c-semantics.c: Likewise.
9752
5b8300ea
DD
97532014-10-16 DJ Delorie <dj@redhat.com>
9754
9755 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9756 multiples of bytes.
9757
5f83e90b
JM
97582014-10-14 Jason Merrill <jason@redhat.com>
9759
9760 PR c++/63455
9761 * c-common.h (CPP_PREPARSED_EXPR): New.
9762 (N_CP_TTYPES): Adjust.
9763
d73326ca
MP
97642014-10-15 Marek Polacek <polacek@redhat.com>
9765
9766 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9767
78a7c317
DD
97682014-10-14 DJ Delorie <dj@redhat.com>
9769
9770 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9771 types, not just __int128.
9772 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9773 types, not just __int128.
9774 (cpp_atomic_builtins): Round pointer sizes up.
9775 (type_suffix): Use type precision, not specific types.
9776 * c-common.c (c_common_reswords): Remove __int128 special case.
9777 (c_common_type_for_size): Check for all __intN types, not just
9778 __int128.
9779 (c_common_type_for_mode): Likewise.
9780 (c_common_signed_or_unsigned_type): Likewise.
9781 (c_build_bitfield_integer_type): Likewise.
9782 (c_common_nodes_and_builtins): Likewise.
9783 (keyword_begins_type_specifier): Likewise.
9784 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9785 __intN variants.
9786
2a22f99c
TS
97872014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9788
9789 * c-common.c: Use hash_table instead of hashtab.
9790
2a8ef767
ESR
97912014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9792
adfac8df 9793 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9794 C++11 section.
9795
3c9aabbd
MG
97962014-10-03 Marc Glisse <marc.glisse@inria.fr>
9797
9798 PR c++/54427
9799 PR c++/57198
9800 PR c++/58845
9801 * c-common.c (warn_logical_operator): Punt for vectors.
9802
a15f7cb8
ESR
98032014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9804
9805 Implement SD-6: SG10 Feature Test Recommendations
9806 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9807 macros and the __has_header macro.
9808
8d0cf15e
JM
98092014-09-30 Jason Merrill <jason@redhat.com>
9810
dd5d5481
JM
9811 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9812 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9813 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9814
b752325e
JM
9815 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9816 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9817
8d0cf15e
JM
9818 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9819 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9820
083e891e
MP
98212014-09-24 Marek Polacek <polacek@redhat.com>
9822
9823 PR c/61405
9824 PR c/53874
9825 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9826
7861b648
AK
98272014-09-23 Andi Kleen <ak@linux.intel.com>
9828
9829 * c-common.c (handle_no_reorder_attribute): New function.
9830 (c_common_attribute_table): Add no_reorder attribute.
9831
9a79452d
JM
98322014-09-22 Joseph Myers <joseph@codesourcery.com>
9833
9834 * c-cppbuiltin.c (c_cpp_builtins): Define
9835 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9836 modes.
9837
dd69f047
JM
98382014-09-18 Joseph Myers <joseph@codesourcery.com>
9839
9840 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9841 for supported floating-point modes.
9842
737a4826
MLI
98432014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9844
9845 * c.opt (Wpsabi): Use LangEnabledBy.
9846 * c-opts.c (c_common_handle_option): Do not handle here.
9847
8cc4b7a2
JM
98482014-09-12 Joseph Myers <joseph@codesourcery.com>
9849
9850 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9851 macros for floating-point modes.
9852
179b5a55
MG
98532014-09-11 Marc Glisse <marc.glisse@inria.fr>
9854
9855 PR target/58757
9856 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9857 __*_DENORM_MIN__ without denormals.
9858
570a11fe
JJ
98592014-09-10 Jakub Jelinek <jakub@redhat.com>
9860
9861 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9862 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9863 ubsan_create_data callers.
9864 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9865 index is constant or BIT_AND_EXPR with constant mask and is
9866 small enough for the bound.
9867 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9868 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9869
b559c810
MLI
98702014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9871
9872 * c.opt: Add CppReason to various flags.
9873 (Wdate-time): Re-sort.
9874 * c-common.c: Include c-common.h earlier.
9875 (struct reason_option_codes_t): Delete.
9876 (c_option_controlling_cpp_error): Prefix global type and struct
9877 with cpp_.
9878
1ef33fd4
MLI
98792014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9880
9881 * c.opt (Wnormalized): New.
9882 (Wnormalized=): Use Enum and Reject Negative.
9883 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9884
66bb34c0
JM
98852014-09-08 Joseph Myers <joseph@codesourcery.com>
9886
9887 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9888 digits of floating-point modes if -fbuilding-libgcc.
9889
53d68b9f
JM
98902014-09-05 Joseph Myers <joseph@codesourcery.com>
9891
9892 * c-cppbuiltin.c (c_cpp_builtins): Also define
9893 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9894 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9895 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9896 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9897 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9898 __LIBGCC_STACK_GROWS_DOWNWARD__,
9899 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9900 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9901 __LIBGCC_DWARF_FRAME_REGISTERS__,
9902 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9903 __LIBGCC_STACK_POINTER_REGNUM__ and
9904 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9905 (builtin_define_with_value): Handle backslash-escaping in string
9906 macro values.
9907
f65586dc
RB
99082014-09-05 Richard Biener <rguenther@suse.de>
9909
9910 PR middle-end/63148
9911 * c-format.c (check_format_arg): Properly handle
9912 effectively signed POINTER_PLUS_EXPR offset.
9913
2b71f4a4
MLI
99142014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9915
9916 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9917 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9918 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9919 and Init.
9920 * c-opts.c (c_common_handle_option): Do not handle here.
9921 (sanitize_cpp_opts): Likewise.
9922 * c-common.c (struct reason_option_codes_t): Handle
9923 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9924
d2e4feca
MP
99252014-09-03 Marek Polacek <polacek@redhat.com>
9926
9927 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9928
9a771876
JJ
99292014-09-02 Jakub Jelinek <jakub@redhat.com>
9930 Balaji V. Iyer <balaji.v.iyer@intel.com>
9931 Igor Zamyatin <igor.zamyatin@intel.com>
9932
9933 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9934 * c-common.c (c_common_reswords): Added _Cilk_for.
9935 * c-common.h (enum rid): Added RID_CILK_FOR.
9936 (cilk_for_number_of_iterations): Add declaration.
9937 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9938 CILK_FOR.
9939 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9940 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9941
81b5d104
MLI
99422014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9943
9944 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9945 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9946 Wundef): Use CPP, Var and Init.
9947 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9948
b753b37b
MLI
99492014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9950
9951 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9952 * c-opts.c (c_common_handle_option): Do not handle here.
9953
028aee17
JM
99542014-08-25 Jason Merrill <jason@redhat.com>
9955
9956 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9957 -std=c++14 and -std=gnu++14, rather than the reverse.
9958 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9959 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9960 * c-common.h (cxx_dialect): Remove cxx1y.
9961
e4276ba5
ESR
99622014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9963
9964 * c-common.h (enum cxx_dialect): Add cxx14.
9965 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9966 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9967 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9968
a545cacd
JM
99692014-08-22 Jason Merrill <jason@redhat.com>
9970
9971 * c.opt (std=gnu++17): Fix alias.
9972
59ea0364
MP
99732014-08-22 Marek Polacek <polacek@redhat.com>
9974
9975 PR c++/62199
9976 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9977 check for vector types. Drop LHS argument.
9978 * c-common.h (warn_logical_not_parentheses): Adjust.
9979
596e808c
MLI
99802014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9981
9982 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9983 (Wmultichar): Likewise.
9984 (Wdate-time): Use C-family languages instead of Common. Use CPP
9985 and Var.
9986 * c-opts.c (c_common_handle_option): Do not handle the above
9987 options here.
9988 (sanitize_cpp_opts): Likewise.
9989
18767f65
MLI
99902014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9991
9992 PR fortran/44054
9993 * c-opts.c: Include tree-diagnostics.h.
9994 (c_diagnostic_finalizer): New.
9995 (c_common_initialize_diagnostics): Use it.
9996
b4413594
MLI
99972014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9998
9999 PR preprocessor/51303
10000 * c-common.c (struct reason_option_codes_t option_codes):
10001 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10002
43f9a13c
MLI
100032014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10004
10005 PR c/60975
10006 PR c/53063
10007 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10008 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10009 (c_common_post_options): Call init_global_opts_from_cpp.
10010 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10011
04159acf
MP
100122014-08-19 Marek Polacek <polacek@redhat.com>
10013
10014 PR c++/62153
10015 * c-common.c (maybe_warn_bool_compare): New function.
10016 * c-common.h (maybe_warn_bool_compare): Declare.
10017 * c.opt (Wbool-compare): New option.
10018
35aff4fb
MP
100192014-08-19 Marek Polacek <polacek@redhat.com>
10020
10021 * c.opt (Wc99-c11-compat): New option.
10022
177cce46
MP
100232014-08-19 Marek Polacek <polacek@redhat.com>
10024
10025 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10026 to warn_c90_c99_compat.
10027 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10028 to -1.
10029
6ae9194f
MLI
100302014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10031 Steven Bosscher <steven@gcc.gnu.org>
10032
10033 PR c/52952
10034 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10035 format_check_results.
10036 (check_function_format): Use true and add comment for boolean
10037 argument.
10038 (finish_dollar_format_checking): Use explicit location when warning.
10039 (check_format_info): Likewise.
10040 (check_format_arg): Set extra_arg_loc and format_string_loc.
10041 (check_format_info_main): Use explicit location when warning.
10042 (check_format_types): Pass explicit location.
10043 (format_type_warning): Likewise.
10044
8e54f6d3
MLI
100452014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10046
10047 PR fortran/44054
10048 * c-format.c: Handle Fortran flags.
10049
cd4e76fc
IZ
100502014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10051
10052 PR other/61962
10053 * array-notation-common.c (find_rank): Added handling for other
10054 types of references.
10055
f3bede71
MP
100562014-08-10 Marek Polacek <polacek@redhat.com>
10057
10058 PR c/51849
10059 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10060 * c.opt (Wc90-c99-compat): Add option.
10061
9f25a338
TS
100622014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10063
10064 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10065
62e4eb35
MP
100662014-08-03 Marek Polacek <polacek@redhat.com>
10067
ab20d992 10068 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
10069 (c_add_case_label): Pass loc to check_case_value.
10070
b787e7a2
TS
100712014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10072
10073 * cilk.c: Use hash_map instead of pointer_map.
10074
6e2830c3
TS
100752014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10076
10077 * c-gimplify.c: Use hash_set instead of pointer_set.
10078
a7ee52fb
IZ
100792014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10080
10081 PR middle-end/61455
10082 * array-notation-common.c (extract_array_notation_exprs): Handling
10083 of DECL_EXPR added.
10084
944fa280
JJ
100852014-08-01 Jakub Jelinek <jakub@redhat.com>
10086
10087 * c-common.h (min_align_of_type): Removed prototype.
10088 * c-common.c (min_align_of_type): Removed.
10089 * c-ubsan.h (ubsan_maybe_instrument_reference,
10090 ubsan_maybe_instrument_member_call): New prototypes.
10091 * c-ubsan.c: Include stor-layout.h and builtins.h.
10092 (ubsan_maybe_instrument_reference_or_call,
10093 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10094 functions.
10095
b4dfdc11
MG
100962014-07-31 Marc Glisse <marc.glisse@inria.fr>
10097
10098 PR c++/60517
10099 * c.opt (-Wreturn-local-addr): Move to common.opt.
10100
a41844e5
JM
101012014-07-30 Jason Merrill <jason@redhat.com>
10102
10103 PR c++/61659
10104 PR c++/61687
10105 Revert:
10106 * c.opt (-fuse-all-virtuals): New.
10107
976d5a22
TT
101082014-07-30 Tom Tromey <tromey@redhat.com>
10109
10110 PR c/59855
10111 * c.opt (Wdesignated-init): New option.
10112 * c-common.c (c_common_attribute_table): Add "designated_init".
10113 (handle_designated_init): New function.
10114
cdc94aca
MP
101152014-07-24 Marek Polacek <polacek@redhat.com>
10116
10117 PR c/57653
10118 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10119
f41373b6
DS
101202014-07-16 Dodji Seketeli <dodji@redhat.com>
10121
10122 PR preprocessor/60723 - missing system-ness marks for macro tokens
10123 * c-ppoutput.c (struct print::prev_was_system_token): New data
10124 member.
10125 (init_pp_output): Initialize it.
10126 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10127 (do_line_change): Return a flag saying if a line marker was
10128 emitted or not.
10129 (scan_translation_unit): Detect if the system-ness of the token we
10130 are about to emit is different from the one of the previously
10131 emitted token. If so, emit a line marker. Avoid emitting useless
10132 adjacent line markers. Avoid emitting line markers for tokens
10133 originating from the expansion of built-in macros.
10134 (scan_translation_unit_directives_only): Adjust.
10135
4d661eaa
MP
101362014-07-15 Marek Polacek <polacek@redhat.com>
10137
10138 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10139 TYPE_MAX_VALUE is NULL.
10140
b108f48f
JJ
101412014-07-14 Jakub Jelinek <jakub@redhat.com>
10142
10143 PR middle-end/61294
10144 * c.opt (Wmemset-transposed-args): New warning.
10145
c0221884
JM
101462014-07-10 Jason Merrill <jason@redhat.com>
10147
10148 PR c++/61659
10149 PR c++/61687
10150 * c.opt (-fuse-all-virtuals): New.
10151
63dfbb95
RB
101522014-07-09 Richard Biener <rguenther@suse.de>
10153
10154 PR c-family/61741
10155 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10156 using unsigned arithmetic if overflow does not wrap instead of
10157 if overflow is undefined.
10158
773ec47f
MP
101592014-07-06 Marek Polacek <polacek@redhat.com>
10160
10161 PR c/6940
10162 * c.opt (Wsizeof-array-argument): New option.
10163
00a7ba58
JJ
101642014-07-03 Jakub Jelinek <jakub@redhat.com>
10165
b1726d6c 10166 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10167 comments->count <= 1, as comments->entries might be NULL.
10168
52ec0ea3
MP
101692014-07-01 Marek Polacek <polacek@redhat.com>
10170
10171 * c.opt (Wint-conversion): New option.
10172
d5c3d343
MP
101732014-07-01 Marek Polacek <polacek@redhat.com>
10174
10175 PR c/58286
10176 * c.opt (Wincompatible-pointer-types): New option.
10177
6e7ceb17
PC
101782014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10179
10180 PR c++/51400
10181 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10182 Do not discard TYPE_QUALS of type.
10183
da73100b
JM
101842014-06-26 Jason Merrill <jason@redhat.com>
10185
10186 * c-common.h (enum cxx_dialect): Add cxx1z.
10187 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10188 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10189
08eedf75
TJ
101902014-06-26 Teresa Johnson <tejohnson@google.com>
10191
10192 * c-common.h (get_dump_info): Declare.
10193 * c-gimplify.c (c_genericize): Use saved dump files.
10194 * c-opts.c (c_common_parse_file): Begin and end dumps
10195 once around parsing invocation.
10196 (get_dump_info): New function.
10197
7b56b2f8
MP
101982014-06-23 Marek Polacek <polacek@redhat.com>
10199 Andrew MacLeod <amacleod@redhat.com>
10200
10201 PR c/61553
10202 * c-common.c (get_atomic_generic_size): Don't segfault if the
10203 type doesn't have a size.
10204
0e37a2f3
MP
102052014-06-20 Marek Polacek <polacek@redhat.com>
10206
10207 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10208 (ubsan_walk_array_refs_r): New function.
10209 (c_genericize): Instrument array bounds.
10210 * c-ubsan.c: Include "internal-fn.h".
10211 (ubsan_instrument_division): Mark instrumented arrays as having
10212 side effects. Adjust ubsan_type_descriptor call.
10213 (ubsan_instrument_shift): Likewise.
10214 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10215 (ubsan_instrument_bounds): New function.
10216 (ubsan_array_ref_instrumented_p): New function.
10217 (ubsan_maybe_instrument_array_ref): New function.
10218 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10219 (ubsan_array_ref_instrumented_p): Declare.
10220 (ubsan_maybe_instrument_array_ref): Declare.
10221
102222014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10223
10224 PR lto/61123
10225 * c.opt (fshort-enums): Add to LTO.
10226 * c.opt (fshort-wchar): Likewise.
10227
5c3d09f7
MP
102282014-06-16 Marek Polacek <polacek@redhat.com>
10229
10230 PR c/60439
10231 * c.opt (Wswitch-bool): Add Var.
10232
9cf32741
JJ
102332014-06-12 Jakub Jelinek <jakub@redhat.com>
10234
10235 PR middle-end/61486
10236 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10237 #pragma omp target teams or
10238 #pragma omp {,target }teams distribute simd.
10239
62984918
JM
102402014-06-12 Jason Merrill <jason@redhat.com>
10241
10242 * c.opt (Wabi=, fabi-compat-version): New.
10243 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10244 (c_common_post_options): Handle flag_abi_compat_version default.
10245 Disallow -fabi-compat-version=1.
10246 * c-common.h (abi_version_crosses): New.
10247
f961457f
JH
102482014-06-11 Jan Hubicka <hubicka@ucw.cz>
10249
adfac8df 10250 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10251 section names that are no longer trees.
10252
92d28cbb
JJ
102532014-06-10 Jakub Jelinek <jakub@redhat.com>
10254
10255 PR fortran/60928
10256 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10257 (omp_pragmas): ... back here.
10258
742938c9
MP
102592014-06-05 Marek Polacek <polacek@redhat.com>
10260
10261 PR c/49706
10262 * c-common.c (warn_logical_not_parentheses): New function.
10263 * c-common.h (warn_logical_not_parentheses): Declare.
10264 * c.opt (Wlogical-not-parentheses): New option.
10265
9d548dfb
MP
102662014-06-04 Marek Polacek <polacek@redhat.com>
10267
10268 PR c/30020
10269 * c-common.c (check_case_bounds): Add location parameter.
10270 Use it.
10271 (c_add_case_label): Pass loc to check_case_bounds.
10272
fedfecef
MP
102732014-06-03 Marek Polacek <polacek@redhat.com>
10274
10275 PR c/60439
10276 * c.opt (Wswitch-bool): New option.
10277
f6a7cffc
TS
102782014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10279
040d18b6
TS
10280 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10281 Remove prototypes.
10282 (record_types_used_by_current_var_decl): Move prototype to where
10283 it belongs.
10284
f6a7cffc
TS
10285 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10286 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10287 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10288
632f2871
RS
102892014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10290
10291 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10292 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10293 void_zero_node.
10294 * c-pretty-print.c (pp_c_void_constant): New function.
10295 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10296 (c_pretty_printer::expression): Handle VOID_CST.
10297 * cilk.c (extract_free_variables): Likewise.
10298 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10299 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10300
766090c2
TS
103012014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10302
10303 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10304 * c-pragma.c (push_alignment): Adjust.
10305 (handle_pragma_push_options): Likewise.
10306
661a0813
MP
103072014-05-09 Marek Polacek <polacek@redhat.com>
10308
10309 PR c/50459
10310 * c-common.c (check_user_alignment): Return -1 if alignment is error
10311 node.
10312 (handle_aligned_attribute): Don't call default_conversion on
10313 FUNCTION_DECLs.
10314 (handle_vector_size_attribute): Likewise.
10315 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10316 (handle_sentinel_attribute): Call default_conversion and allow even
10317 integral types as an argument.
10318
2793eeab
MP
103192014-05-08 Marek Polacek <polacek@redhat.com>
10320
10321 PR c/61053
10322 * c-common.c (min_align_of_type): New function factored out from...
10323 (c_sizeof_or_alignof_type): ...here.
10324 * c-common.h (min_align_of_type): Declare.
10325
f827930a
MP
103262014-05-08 Marek Polacek <polacek@redhat.com>
10327
10328 PR c/61077
10329 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10330 parameter type of main.
10331
ca49b74e
DD
103322014-05-07 DJ Delorie <dj@redhat.com>
10333
10334 * c-cppbuiltin.c (print_bits_of_hex): New.
10335 (builtin_define_type_minmax): Print values using hex so as not to
10336 require a pre-computed list of string values.
10337
1d60af08
KZ
103382014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10339 Mike Stump <mikestump@comcast.net>
10340 Richard Sandiford <rdsandiford@googlemail.com>
10341
10342 * c-ada-spec.c: Include wide-int.h.
10343 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10344 (dump_generic_ada_node): Use wide-int interfaces.
10345 * c-common.c: Include wide-int-print.h.
10346 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10347 (pointer_int_sum): Use wide-int interfaces.
10348 (c_common_nodes_and_builtins): Use make_int_cst.
10349 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10350 (handle_alloc_size_attribute): Use wide-int interfaces.
10351 (get_nonnull_operand): Likewise.
10352 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10353 * c-lex.c: Include wide-int.h.
10354 (narrowest_unsigned_type): Take a widest_int rather than two
10355 HOST_WIDE_INTs.
10356 (narrowest_signed_type): Likewise.
10357 (interpret_integer): Update accordingly. Use wide-int interfaces.
10358 (lex_charconst): Use wide-int interfaces.
10359 * c-pretty-print.c: Include wide-int.h.
10360 (pp_c_integer_constant): Use wide-int interfaces.
10361 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10362 INT_CST_LT_UNSIGNED.
10363
b15458be
RB
103642014-05-06 Richard Biener <rguenther@suse.de>
10365
10366 * c-opts.c (c_common_post_options): For -freestanding,
10367 -fno-hosted and -fno-builtin disable pattern recognition
10368 if not enabled explicitely.
10369
6577374e
MP
103702014-05-02 Marek Polacek <polacek@redhat.com>
10371
10372 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10373
d00887e8
MP
103742014-05-01 Marek Polacek <polacek@redhat.com>
10375
10376 PR c/43245
10377 * c.opt (Wdiscarded-qualifiers): Add.
10378
f8ed5150
MP
103792014-04-30 Marek Polacek <polacek@redhat.com>
10380
10381 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10382 INT_MIN / -1 sanitization only for integer types.
10383
45484dcf
MP
103842014-04-25 Marek Polacek <polacek@redhat.com>
10385
10386 PR c/18079
10387 * c-common.c (handle_noinline_attribute): Warn if the attribute
10388 conflicts with always_inline attribute.
10389 (handle_always_inline_attribute): Warn if the attribute conflicts
10390 with noinline attribute.
10391
38e514c0
MP
103922014-04-25 Marek Polacek <polacek@redhat.com>
10393
10394 PR c/60156
10395 * c-common.c (check_main_parameter_types): Warn about variadic main.
10396
44875f92
MS
103972014-04-24 Mike Stump <mikestump@comcast.net>
10398
10399 * c.opt (Wshadow-ivar): Default to on.
10400
dcaaa5a0
DP
104012014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10402
10403 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10404
c07d7c02
MP
104052014-04-23 Marek Polacek <polacek@redhat.com>
10406
10407 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10408
1c33c9b7
JJ
104092014-04-22 Jakub Jelinek <jakub@redhat.com>
10410
10411 PR sanitizer/60275
10412 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10413 if flag_sanitize_undefined_trap_on_error.
10414 (ubsan_instrument_division, ubsan_instrument_shift,
10415 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10416 if !flag_sanitize_recover.
10417
793c625f
MG
104182014-04-22 Marc Glisse <marc.glisse@inria.fr>
10419
10420 PR libstdc++/43622
10421 * c-common.c (registered_builtin_types): Make non-static.
10422 * c-common.h (registered_builtin_types): Declare.
10423
b0f1bf36 104242014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10425 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10426
10427 PR c/60819
10428 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10429 apply may-alias the scalar pointer type when applicable.
10430
3b07fa4a
IZ
104312014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10432
10433 PR middle-end/60467
10434 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10435 as possible argument for Cilk_spawn.
10436
cbbd2b1c
TB
104372014-04-11 Tobias Burnus <burnus@net-b.de>
10438
10439 PR c/60194
10440 * c.opt (Wformat-signedness): Add
10441 * c-format.c(check_format_types): Use it.
10442
6415bd5d
JM
104432014-04-11 Jason Merrill <jason@redhat.com>
10444
10445 PR c++/57926
10446 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10447 default_conversion for an array argument.
10448
6525783a
MP
104492014-04-08 Marek Polacek <polacek@redhat.com>
10450
10451 PR sanitizer/60745
10452 * c-ubsan.c: Include asan.h.
10453 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10454
880a467b
NS
104552014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10456
10457 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10458
7b59ff2d
MP
104592014-04-02 Marek Polacek <polacek@redhat.com>
10460
10461 * c-common.h (c_expand_expr): Remove declaration.
10462
8edbfaa6
JJ
104632014-03-28 Jakub Jelinek <jakub@redhat.com>
10464
10465 PR c++/60689
10466 * c-common.c (add_atomic_size_parameter): When creating new
10467 params vector, push the size argument first.
10468
07d72e1d
JJ
104692014-03-26 Jakub Jelinek <jakub@redhat.com>
10470
10471 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10472 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10473 ubsan_create_data callers.
10474
b35e0fa0
JJ
104752014-03-22 Jakub Jelinek <jakub@redhat.com>
10476
10477 PR debug/60603
10478 * c-opts.c (c_finish_options): Restore cb_file_change call to
10479 <built-in>.
10480
39a1ebb3
JJ
104812014-03-13 Jakub Jelinek <jakub@redhat.com>
10482
10483 PR middle-end/36282
10484 * c-pragma.c (apply_pragma_weak): Only look at
10485 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10486 DECL_ASSEMBLER_NAME_SET_P (decl).
10487 (maybe_apply_pending_pragma_weaks): Exit early if
10488 vec_safe_is_empty (pending_weaks) rather than only when
10489 !pending_weaks.
10490 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10491 set assembler name back to NULL afterwards.
10492
a07f6ed2
JM
104932014-03-11 Jason Merrill <jason@redhat.com>
10494
10495 * c.opt: Add -std=gnu++14.
10496
75b107f5
IB
104972014-03-11 Ian Bolton <ian.bolton@arm.com>
10498
10499 * c-opts.c (c_common_post_options): Don't override
10500 -ffp-contract=fast if unsafe-math-optimizations is on.
10501
f42c637e
PM
105022014-03-08 Paulo Matos <paulo@matos-sorge.com>
10503
22b15758 10504 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10505
70e24808
JM
105062014-03-07 Jason Merrill <jason@redhat.com>
10507
10508 * c.opt: Add -std=c++14.
10509
3af9c5e9
MP
105102014-03-06 Marek Polacek <polacek@redhat.com>
10511
10512 PR c/60197
10513 * cilk.c (contains_cilk_spawn_stmt): New function.
10514 (contains_cilk_spawn_stmt_walker): Likewise.
10515 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10516 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10517
b3bdf019
JJ
105182014-03-03 Jakub Jelinek <jakub@redhat.com>
10519
10520 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10521 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10522 even when flag_preprocess_only.
10523
ca7e759d
JM
105242014-02-26 Jason Merrill <jason@redhat.com>
10525
10526 PR c++/59231
10527 PR c++/11586
10528 * c-common.c (shorten_compare): Don't check
10529 c_inhibit_evaluation_warnings.
10530
28e41874
JJ
105312014-02-19 Jakub Jelinek <jakub@redhat.com>
10532
cca615af
JJ
10533 PR c/37743
10534 * c-common.c (c_common_nodes_and_builtins): When initializing
10535 c_uint{16,32,64}_type_node, also set corresponding
10536 uint{16,32,64}_type_node to the same value.
10537
28e41874
JJ
10538 PR c++/60267
10539 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10540 for PRAGMA_IVDEP if flag_preprocess_only.
10541
c2bf53a1
JJ
105422014-02-12 Jakub Jelinek <jakub@redhat.com>
10543
10544 PR c/60101
10545 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10546 if false, add ADD itself, rather than vice versa.
10547 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10548 copy. For SAVE_EXPR, only call merge_tlist once.
10549
8fcbce72
JJ
105502014-02-08 Jakub Jelinek <jakub@redhat.com>
10551
10552 PR middle-end/60092
10553 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10554 and tree_to_uhwi.
10555 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10556 functions.
10557 (c_common_attribute_table): Add alloc_align and assume_aligned
10558 attributes.
10559
0a756a3f
MP
105602014-02-06 Marek Polacek <polacek@redhat.com>
10561
10562 PR c/60087
10563 * c-common.c (warn_for_sign_compare): Call warning_at with location
10564 instead of warning.
10565
7ec4847a
MP
105662014-02-05 Marek Polacek <polacek@redhat.com>
10567
10568 PR c/53123
10569 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10570 statement.
10571
66f20604
MP
105722014-02-04 Marek Polacek <polacek@redhat.com>
10573
10574 PR c/60036
10575 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10576 SAVE_EXPR.
10577
5d77fb19
MG
105782014-02-03 Marc Glisse <marc.glisse@inria.fr>
10579
10580 PR c++/53017
10581 PR c++/59211
10582 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10583 handle_vector_size_attribute, handle_nonnull_attribute): Call
10584 default_conversion on the attribute argument.
10585 (handle_nonnull_attribute): Increment the argument number.
10586
81e5eca8
MP
105872014-01-31 Marek Polacek <polacek@redhat.com>
10588
10589 PR c/59963
10590 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10591 build_function_call_vec.
10592 (resolve_overloaded_builtin): Likewise.
10593 * c-common.h (build_function_call_vec): Adjust declaration.
10594
68fca595
MP
105952014-01-30 Marek Polacek <polacek@redhat.com>
10596
10597 PR c/59940
10598 * c-common.h (unsafe_conversion_p): Adjust declaration.
10599 (warnings_for_convert_and_check): Likewise.
10600 (convert_and_check): Likewise.
10601 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10602 expansion_point_location_if_in_system_header on it.
10603 (warnings_for_convert_and_check): Add location parameter. Call
10604 expansion_point_location_if_in_system_header on it. Use it.
10605 (convert_and_check): Add location parameter. Use it.
10606 (conversion_warning): Likewise.
10607 (c_add_case_label): Adjust convert_and_check calls.
10608 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10609
b72271b9
BI
106102014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10611
10612 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10613 flag_cilkplus.
10614 * c-pragma.c (init_pragma): Likewise.
10615 * c.opt: Likewise.
10616
393e8e8b
MP
106172014-01-23 Marek Polacek <polacek@redhat.com>
10618
10619 PR c/59846
10620 * c-common.c (shorten_compare): Add location_t parameter.
10621 * c-common.h (shorten_binary_op): Adjust declaration.
10622
f04dda30
MP
106232014-01-23 Marek Polacek <polacek@redhat.com>
10624
10625 PR c/58346
10626 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10627 * c-common.h: Declare it.
10628
621955cb
EB
106292014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10630
10631 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10632 * c-ada-spec.c (dump_ads): Likewise.
10633 (cpp_check): Likewise.
10634 (dump_ada_specs): Likewise.
10635
106362014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10637
10638 PR c++/49718
10639 * c-common.c (handle_no_instrument_function_attribute): Allow
10640 no_instrument_function attribute in class member
10641 definition/declaration.
10642
241f845a
JJ
106432014-01-15 Jakub Jelinek <jakub@redhat.com>
10644
10645 PR c/58943
10646 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10647 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10648 being COMPOUND_EXPR.
10649 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10650 operand a SAVE_EXPR and second MODIFY_EXPR.
10651
e83b8e2e
JJ
106522014-01-09 Jakub Jelinek <jakub@redhat.com>
10653
10654 PR target/58115
10655 * c-pch.c (c_common_write_pch): Call
10656 prepare_target_option_nodes_for_pch.
10657
23a5b65a
RS
106582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10659
10660 Update copyright years
10661
f9030485
RS
106622014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10663
10664 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10665 the copyright notice.
10666
f2aa696b
EB
106672013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10668
10669 * c-ada-spec.c (print_constructor): New function.
10670 (print_destructor): Retrieve the origin of the destructor.
10671 (print_ada_declaration): Revamp handling of constructors/destructors.
10672
3f8257db 106732013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10674 Bill Maddox <maddox@google.com>
10675 Jason Merrill <jason@redhat.com>
10676
10677 * c.opt: Add -fdeclone-ctor-dtor.
10678 * c-opts.c (c_common_post_options): Default to on iff -Os.
10679
41958c28
BI
106802013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10681
10682 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10683 attribute.
10684 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10685 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10686 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10687 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10688 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10689 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10690 PRAGMA_CILK_CLAUSE_UNIFORM.
10691
b1726d6c 10692
12893402
BI
106932013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10694
10695 * cilk.c (cilk_outline): Made this function non-static.
10696 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10697 (create_cilk_wrapper): Added a new parameter: a function pointer.
10698 (c_install_body_w_frame_cleanup): Remove
10699 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10700 * c-common.h (cilk_outline): New prototype.
10701 (gimplify_cilk_spawn): Removed two parameters.
10702 (cilk_install_body_with_frame_cleanup): New prototype.
10703 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10704 CILK_SPAWN_STMT case.
10705
085b42ed
BS
107062013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10707
2ce064c3
BS
10708 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10709
085b42ed
BS
10710 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10711 (int_array_type_node): Remove.
10712 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10713
9e36c9ed
MP
107142013-12-05 Marek Polacek <polacek@redhat.com>
10715
10716 PR c/52023
10717 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10718 [ADJUST_FIELD_ALIGN].
10719
296674db
JM
107202013-12-04 Joseph Myers <joseph@codesourcery.com>
10721
10722 PR c/52023
10723 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10724 and check field alignment if set.
10725 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10726 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10727
b1726d6c 107282013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10729 Marek Polacek <polacek@redhat.com>
10730
10731 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10732 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10733
d7947e19
L
107342013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10735
10736 PR c/59309
10737 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10738 arguments.
10739
fad7652e
JJ
107402013-11-29 Jakub Jelinek <jakub@redhat.com>
10741
10742 PR c/59280
10743 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10744 goto invalid. If it is error_mark_node, don't issue further
10745 diagnostics.
10746
8b5e1202
SO
107472013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10748
10749 * c.opt (Wopenmp-simd): New.
10750
0a508bb6
JJ
107512013-11-22 Jakub Jelinek <jakub@redhat.com>
10752
10753 * c-ubsan.h (ubsan_instrument_return): New prototype.
10754 * c-ubsan.c (ubsan_instrument_return): New function.
10755
2fb9a547
AM
107562013-11-22 Andrew MacLeod <amacleod@redhat.com>
10757
10758 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10759 * c-gimplify.c: Likewise.
10760 * cilk.c: Likewise.
2fb9a547 10761
8400e75e
DM
107622013-11-22 David Malcolm <dmalcolm@redhat.com>
10763
10764 * c-common.c (unsafe_conversion_p): Remove use of
10765 EXPR_LOC_OR_HERE macro.
10766 (conversion_warning): Likewise.
10767 (warnings_for_convert_and_check): Likewise.
10768 (warn_for_collisions_1): Likewise.
10769 (shorten_compare): Likewise, and remove use of in_system_header
10770 macro, using the location from the former.
10771 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10772 (cb_def_pragma): Remove use of in_system_header macro.
10773 (lex_string): Likewise.
10774 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10775
eb1ce453
KZ
107762013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10777 Mike Stump <mikestump@comcast.net>
10778 Richard Sandiford <rdsandiford@googlemail.com>
10779
10780 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10781 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10782 tree_fits_shwi_p or tree_fits_uhwi_p.
10783 (dump_generic_ada_node): Likewise.
10784 * c-format.c (check_format_arg): Likewise.
10785 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10786
6b3b8c27
KZ
107872013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10788
10789 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10790
49b0aa18
JC
107912013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10792
10793 PR c/53001
10794 * c-common.c (unsafe_conversion_p): Make this function
10795 return an enumeration with more detail.
10796 (conversion_warning): Use the new return type of
10797 unsafe_conversion_p to separately warn either about conversions
10798 that lower floating point number precision or about the other
10799 kinds of conversions.
10800 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10801 (unsafe_conversion_p): switching return type to
10802 conversion_safety enumeration.
49b0aa18
JC
10803 * c.opt: Adding new warning -Wfloat-conversion and
10804 enabling it with -Wconversion.
10805
b826515a
BS
108062013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10807
8e745a17
JJ
10808 * c-opts.c: Include plugin.h.
10809 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10810
b9a55b13
MP
108112013-11-19 Marek Polacek <polacek@redhat.com>
10812
10813 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10814 call.
10815 (ubsan_instrument_shift): Likewise.
10816 (ubsan_instrument_vla): Likewise.
10817
7d362f6c
RS
108182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10819
10820 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10821 cast to unsigned type.
10822
386b1f1f
RS
108232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10824
10825 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10826 tree_low_cst.
10827 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10828 rather than tree_low_cst.
10829
ae7e9ddd
RS
108302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10831
10832 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10833 tree_to_uhwi throughout.
10834
9439e9a1
RS
108352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10836
10837 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10838 tree_low_cst (..., 0) with tree_to_shwi throughout.
10839
cc269bb6
RS
108402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10841
10842 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10843 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10844
9541ffee
RS
108452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10846
10847 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10848 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10849
c02065fc
AH
108502013-11-15 Aldy Hernandez <aldyh@redhat.com>
10851
10852 * c-cilkplus.c: New file.
10853 * c-common.c (readonly_error): Add location argument.
10854 * c-common.h (readonly_error): Same.
10855 (c_finish_cilk_clauses): Protoize.
10856 (c_check_cilk_loop): Same.
10857 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10858 Do not fail on error_mark_node.
10859 Abstract increment canonicalization to here...
10860 (c_omp_for_incr_canonicalize_ptr): New.
10861 c-pragma.c (init_pragma): Register "simd" pragma.
10862 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10863 (enum pragma_cilk_clause): New.
10864
9cc65f15
RS
108652013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10866
10867 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10868 wchar_type and host_integerp checks.
10869
18f429e2
AM
108702013-11-14 Andrew MacLeod <amacleod@redhat.com>
10871
10872 * c-common.c: Likewise.
10873 * c-gimplify.c: Likewise.
10874 * cilk.c: Likewise.
10875
d8a2d370
DN
108762013-11-14 Diego Novillo <dnovillo@google.com>
10877
10878 * c-common.c: Include fold-const.h.
10879 Include stor-layout.h.
10880 Include calls.h.
10881 Include stringpool.h.
10882 Include attribs.h.
10883 Include varasm.h.
10884 Include trans-mem.h.
10885 * c-cppbuiltin.c: Include stor-layout.h.
10886 Include stringpool.h.
10887 * c-format.c: Include stringpool.h.
10888 * c-lex.c: Include stringpool.h.
10889 Include stor-layout.h.
10890 * c-pragma.c: Include stringpool.h.
10891 Include attribs.h.
10892 Include varasm.h.
10893 Include gcc-symtab.h.
10894 * c-pretty-print.c: Include stor-layout.h.
10895 Include attribs.h.
10896 * cilk.c: Include stringpool.h.
10897 Include calls.h.
10898
38b7bc7f
JM
108992013-11-13 Joseph Myers <joseph@codesourcery.com>
10900
10901 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10902 * c-common.c (c_common_reswords): Add __auto_type.
10903 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10904
45b0be94
AM
109052013-11-12 Andrew MacLeod <amacleod@redhat.com>
10906
18f429e2
AM
10907 * c-common.c: Include gimplify.h.
10908 * c-gimplify.c: Likewise.
10909 * cilk.c: Likewise.
10910 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10911 * c-ubsan.c: Don't include gimple.h.
45b0be94 10912
582d9b50
JM
109132013-11-12 Joseph Myers <joseph@codesourcery.com>
10914
10915 * c-common.c (c_common_reswords): Add _Thread_local.
10916
6b28e197
JM
109172013-11-09 Joseph Myers <joseph@codesourcery.com>
10918
10919 * c-common.c (atomic_size_supported_p): New function.
10920 (resolve_overloaded_atomic_exchange)
10921 (resolve_overloaded_atomic_compare_exchange)
10922 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10923 Use it instead of comparing size with a local list of sizes.
10924
267bac10
JM
109252013-11-07 Andrew MacLeod <amacleod@redhat.com>
10926 Joseph Myers <joseph@codesourcery.com>
10927
10928 * c-common.h (enum rid): Add RID_ATOMIC.
10929 * c-common.c (c_common_reswords): Add _Atomic.
10930 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10931 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10932 * c-format.c (check_format_types): Check for extra _Atomic
10933 qualifiers in format argument.
10934 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10935 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10936
5157b91e
TB
109372013-11-06 Tobias Burnus <burnus@net-b.de>
10938
10939 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10940
6dbe0958
JM
109412013-11-06 Joseph Myers <joseph@codesourcery.com>
10942
10943 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10944 standards modes.
10945 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10946 to mean lack of IEEE 754 support.
10947
e8ff5196
TB
109482013-11-05 Tobias Burnus <burnus@net-b.de>
10949
10950 * c.opt (-Wdate-time): New option
10951 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10952
254a0760
JM
109532013-11-05 Joseph Myers <joseph@codesourcery.com>
10954
10955 * c-cppbuiltin.c (cpp_iec_559_value): Test
10956 flag_excess_precision_cmdline not flag_excess_precision.
10957
6d7f7e0a
TB
109582013-11-05 Tobias Burnus <burnus@net-b.de>
10959
10960 * c.opt (fopenmp-simd): New option.
10961 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10962 (omp_pragmas): ... this new struct.
10963 (c_pp_lookup_pragma): Also walk omp_pragmas.
10964 (init_pragma): Init pragmas for -fopenmp-simd.
10965
55a7f02f
MP
109662013-11-04 Marek Polacek <polacek@redhat.com>
10967
10968 PR c++/58979
10969 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10970
9193fb05
JM
109712013-11-04 Joseph Myers <joseph@codesourcery.com>
10972
10973 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10974 New functions.
10975 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10976
94159ecf
EB
109772013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10978
10979 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10980 (dump_ada_specs): Adjust prototype of second callback.
10981 * c-ada-spec.c (cpp_check): New global variable.
10982 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10983 (print_generic_ada_decl): Likewise.
10984 (has_static_fields): Change return type to bool and add guard.
10985 (has_nontrivial_methods): New predicate.
10986 (is_tagged_type): Change return type to bool.
10987 (separate_class_package): Call has_nontrivial_methods.
10988 (pp_ada_tree_identifier): Minor tweaks.
10989 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10990 (dump_ada_array_domains): Likewise.
10991 (dump_ada_array_type): Likewise.
10992 (dump_template_types): Remove cpp_check parameter and do not pass it to
10993 dump_generic_ada_node.
10994 (dump_ada_template): Likewise.
10995 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10996 recursively.
10997 (print_ada_methods): Change return type to integer. Remove cpp_check
10998 parameter and do not pass it down.
10999 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11000 dump_generic_ada_node.
11001 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11002 accessing methods.
11003 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11004 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11005 value of print_ada_methods.
11006 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11007 Set cpp_check to it before invoking dump_ada_nodes.
11008 (dump_ada_specs): Likewise.
11009
b906f4ca
MP
110102013-11-03 Marek Polacek <polacek@redhat.com>
11011
11012 * c-ubsan.c: Don't include hash-table.h.
11013 (ubsan_instrument_vla): New function.
11014 * c-ubsan.h: Declare it.
11015
5e20cdc9
DM
110162013-10-31 David Malcolm <dmalcolm@redhat.com>
11017
11018 Automated part of renaming of symtab_node_base to symtab_node.
11019
11020 Patch autogenerated by rename_symtab.py from
11021 https://github.com/davidmalcolm/gcc-refactoring-scripts
11022 revision 58bb219cc090b2f4516a9297d868c245495ee622
11023
11024 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11025 symtab_node_base to symtab_node.
11026
7057e645
ESR
110272013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11028
8e745a17 11029 Implement C++14 digit separators.
7057e645
ESR
11030 * c-lex.c (interpret_float): Remove digit separators from scratch string
11031 before building real literal.
11032
193ea7bc
JJ
110332013-10-30 Jakub Jelinek <jakub@redhat.com>
11034
11035 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11036
939b37da
BI
110372013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11038
11039 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11040 fields.
11041 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11042 enabled.
11043 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11044 (insert_cilk_frame): New prototype.
11045 (cilk_init_builtins): Likewise.
11046 (gimplify_cilk_spawn): Likewise.
11047 (c_cilk_install_body_w_frame_cleanup): Likewise.
11048 (cilk_detect_spawn_and_unwrap): Likewise.
11049 (cilk_set_spawn_marker): Likewise.
11050 (build_cilk_sync): Likewise.
11051 (build_cilk_spawn): Likewise.
11052 * cilk.c: New file.
11053
67348ccc
DM
110542013-10-29 David Malcolm <dmalcolm@redhat.com>
11055
11056 Patch autogenerated by refactor_symtab.py from
11057 https://github.com/davidmalcolm/gcc-refactoring-scripts
11058 revision 58bb219cc090b2f4516a9297d868c245495ee622
11059
11060 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11061 to a true class hierarchy.
11062 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11063
d570872d
RS
110642013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11065
11066 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11067
98906124
JL
110682013-10-26 Jeff Law <law@redhat.com>
11069
adfac8df
JJ
11070 * c-common.c (c_define_builtins): Remove mudflap support.
11071 * c.opt: Ignore and warn for mudflap options.
98906124 11072
d73749df 110732013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
11074
11075 PR other/33426
11076 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11077 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11078
3f04b1bb
JM
110792013-10-23 Jason Merrill <jason@redhat.com>
11080
11081 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11082
acf0174b
JJ
110832013-10-11 Jakub Jelinek <jakub@redhat.com>
11084
acd15a28
JJ
11085 * c-common.h (omp_clause_mask::operator !=): New method.
11086 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11087 instead of if (mask & something) tests everywhere.
11088
acf0174b
JJ
11089 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11090 201307 instead of 201107.
11091 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11092 (c_common_attribute_table): Add "omp declare target" and
11093 "omp declare simd" attributes.
11094 (handle_omp_declare_target_attribute,
11095 handle_omp_declare_simd_attribute): New functions.
11096 * c-omp.c: Include c-pragma.h.
11097 (c_finish_omp_taskgroup): New function.
11098 (c_finish_omp_atomic): Add swapped argument, if true,
11099 build the operation first with rhs, lhs arguments and use NOP_EXPR
11100 build_modify_expr.
11101 (c_finish_omp_for): Add code argument, pass it down to make_code.
11102 (c_omp_split_clauses): New function.
11103 (c_split_parallel_clauses): Removed.
11104 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11105 c_omp_declare_simd_clauses_to_decls): New functions.
11106 * c-common.h (omp_clause_mask): New type.
11107 (OMP_CLAUSE_MASK_1): Define.
11108 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11109 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11110 omp_clause_mask::operator |, omp_clause_mask::operator &,
11111 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11112 omp_clause_mask::operator ==): New methods.
11113 (enum c_omp_clause_split): New.
11114 (c_finish_omp_taskgroup): New prototype.
11115 (c_finish_omp_atomic): Add swapped argument.
11116 (c_finish_omp_for): Add code argument.
11117 (c_omp_split_clauses): New prototype.
11118 (c_split_parallel_clauses): Removed.
11119 (c_omp_declare_simd_clauses_to_numbers,
11120 c_omp_declare_simd_clauses_to_decls): New prototypes.
11121 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11122 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11123 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11124 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11125 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11126 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11127 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11128 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11129 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11130 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11131 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11132 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11133 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11134 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11135 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11136 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11137 PRAGMA_OMP_CLAUSE_UNIFORM.
11138
826cacfe
MG
111392013-10-09 Marc Glisse <marc.glisse@inria.fr>
11140
11141 PR tree-optimization/20318
11142 * c-common.c (handle_returns_nonnull_attribute): New function.
11143 (c_common_attribute_table): Add returns_nonnull.
11144
2284b034
MG
111452013-10-03 Marc Glisse <marc.glisse@inria.fr>
11146
11147 PR c++/19476
11148 * c.opt (fcheck-new): Move to common.opt.
11149
b56e9788
MP
111502013-09-25 Marek Polacek <polacek@redhat.com>
11151 Jakub Jelinek <jakub@redhat.com>
11152
11153 PR sanitizer/58413
11154 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11155 an expression if we can prove it is correct.
11156 (ubsan_instrument_division): Likewise. Remove unnecessary
11157 check.
11158
ce6923c5
MP
111592013-09-18 Marek Polacek <polacek@redhat.com>
11160
11161 PR sanitizer/58411
11162 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11163 Declare it.
11164 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11165
fb5610fb
IS
111662013-09-14 Iain Sandoe <iain@codesourcery.com>
11167
11168 PR target/48094
11169 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11170 fobjc-gc, freplace-objc-classes): Accept for LTO.
11171
88b0e79e
JC
111722013-09-13 Jacek Caban <jacek@codeweavers.com>
11173
11174 * c-target.def: New hook
11175
c9b0866a
PC
111762013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11177
11178 PR c++/43452
11179 * c.opt (Wdelete-incomplete): Add.
11180
0af94e6f
JR
111812013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11182
11183 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11184 (vector_types_compatible_elements_p): New function.
11185 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11186 declaration.
11187 (vector_types_compatible_elements_p): Declare.
11188
7c26172c
GDR
111892013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11190
11191 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11192 a virtual member function.
11193 (pp_simple_type_specifier): Remove.
11194 (pp_c_type_specifier): Likewise.
11195 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11196 Rename from pp_c_type_specifier. Adjust.
11197 (c_pretty_printer::c_pretty_printer): Do not assign to
11198 simple_type_specifier.
11199
20059c8b
GDR
112002013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11201
11202 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11203 member function.
11204 (c_pretty_printer::storage_class_specifier): Likewise.
11205 (c_pretty_printer::initializer): Likewise.
11206 (pp_declaration): Remove.
11207 (pp_declaration_specifiers): Likewise.
11208 (pp_abstract_declarator): Likewise.
11209 (pp_declarator): Likewise.
11210 (pp_type_id): Likewise.
11211 (pp_statement): Likewise.
11212 (pp_constant): Likewise.
11213 (pp_id_expression): Likewise.
11214 (pp_primary_expression): Likewise.
11215 (pp_unary_expression): Likewise.
11216 (pp_multiplicative_expression): Likewise.
11217 (pp_conditional_expression): Likewise.
11218 (pp_assignment_expression): Likewise.
11219 (pp_expression): Likewise.
11220 (pp_c_type_id): Likewise.
11221 (pp_c_storage_class_specifier): Likewise.
11222 * c-pretty-print.c (pp_c_type_cast): Tidy.
11223 (pp_c_pointer): Likewise.
11224 (pp_c_type_specifier): Likewise.
11225 (pp_c_parameter_type_list): Likewise.
11226 (pp_c_function_definition): Likewise.
11227 (pp_c_init_declarator): Likewise.
11228 (pp_c_initializer_list): Likewise.
11229 (pp_c_constructor_elts): Likewise.
11230 (c_pretty_printer::direct_abstract_declarator): Likewise.
11231 (c_pretty_printer::declaration_specifiers): Likewise.
11232 (c_pretty_printer::primary_expression): Likewise.
11233 (c_pretty_printer::postfix_expression): Likewise.
11234 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11235 (c_pretty_printer::storage_class_specifier): Rename from
11236 pp_c_storage_class_specifier.
11237 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11238 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11239 storage_class_specifier, initializer, offset_list, flags.
11240
de5a5fa1
MP
112412013-08-30 Marek Polacek <polacek@redhat.com>
11242
11243 * c-ubsan.c: New file.
11244 * c-ubsan.h: New file.
11245
8f0e4d72
GDR
112462013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11247
11248 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11249 member function.
11250 (c_pretty_printer::declaration_specifiers): Likewise.
11251 (c_pretty_printer::declarator): Likewise.
11252 (c_pretty_printer::abstract_declarator): Likewise.
11253 (c_pretty_printer::direct_abstract_declarator): Likewise.
11254 (c_pretty_printer::direct_declarator): Likewise.
11255 (c_pretty_printer::function_specifier): Likewise.
11256 (pp_declaration): Adjust.
11257 (pp_declaration_specifiers): Likewise.
11258 (pp_abstract_declarator): Likewise.
11259 (pp_direct_declarator): Likewise.
11260 (pp_function_specifier): Likewise.
11261 (pp_direct_abstract_declarator): Remove as unused.
11262 (pp_c_declaration): Remove.
11263 (pp_c_declaration_specifiers): Likewise.
11264 (pp_c_declarator): Likewise.
11265 (pp_c_direct_declarator): Likewise.
11266 (pp_c_function_specifier): Likewise.
11267 (pp_c_direct_abstract_declarator): Likewise.
11268 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11269 from pp_c_abstract_declarator. Adjust.
ab20d992 11270 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11271 pp_c_direct_abstract_declarator. Adjust.
11272 (c_pretty_printer::function_specifier): Rename from
11273 pp_c_function_specifier. Adjust.
11274 (c_pretty_printer::declaration_specifiers): Rename from
11275 pp_c_declaration_specifiers. Adjust.
11276 (c_pretty_printer::direct_declarator): Rename from
11277 pp_c_direct_declarator. Adjust.
11278 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11279 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11280 (c_pretty_printer::c_pretty_printer): Do not assign to
11281 declaration, declaration_specifiers, declarator,
11282 direct_declarator, direct_abstract_declarator, function_specifier.
11283
00d34d3a
GDR
112842013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11285
11286 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11287 virtual member function.
11288 (c_pretty_printer::multiplicative_expression): Likewise.
11289 (c_pretty_printer::conditional_expression): Likewise.
11290 (c_pretty_printer::assignment_expression): Likewise.
11291 (c_pretty_printer::expression): Likewise.
11292 (pp_unary_expression): Adjust.
11293 (pp_multiplicative_expression): Likewise.
11294 (pp_assignment_expression): Likewise.
11295 (pp_conditional_expression): Likewise.
11296 (pp_expression): Likewise.
11297 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11298 from pp_c_unary_expression. Adjust.
11299 (c_pretty_printer::multiplicative_expression): Rename from
11300 pp_c_multiplicative_expression. Adjust.
11301 (c_pretty_printer::conditional_expression): Rename from
11302 pp_c_conditional_expression. Adjust.
11303 (c_pretty_printer::assignment_expression): Rename from
11304 pp_c_assignment_expression. Adjust.
11305 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11306 (c_pretty_printer::c_pretty_printer): Do not assign to
11307 unary_expression, multiplicative_expression,
11308 conditional_expression, expression.
11309
fb22178f
GDR
113102013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11311
11312 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11313 virtual member function.
11314 (pp_postfix_expression): Adjust.
11315 (pp_c_postfix_expression): Remove.
11316 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11317 from pp_c_postfix_expression. Adjust.
11318 (c_pretty_printer::c_pretty_printer): Do not assign to
11319 postfix_expression.
11320
7ecc2600
GDR
113212013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11322
11323 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11324 virtua member function.
11325 (pp_primary_expression): Adjust.
11326 (pp_c_primary_expression): Remove.
11327 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11328 from pp_c_primary_expression. Adjust.
11329 (pp_c_initializer_list): Use pp_primary_expression.
11330 (c_pretty_printer::c_pretty_printer): Do not assign to
11331 primary_expression.
11332
0691175f
GDR
113332013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11334
11335 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11336 * c-pretty-print.c (M_): Remove.
11337 (c_pretty_printer::translate_string): Define.
11338 (pp_c_type_specifier): Use it.
11339 (pp_c_primary_expression): Likewise.
11340 (pp_c_expression): Likewise.
11341
66dfe4c4
GDR
113422013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11343
11344 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11345 virtual function.
11346 (pp_c_id_expression): Remove.
11347 (pp_id_expression): Adjust.
11348 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11349 pp_c_id_expression. Adjust.
11350 (pp_c_postfix_expression): Use pp_id_expression.
11351 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11352
ca43e9d5
GDR
113532013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11354
11355 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11356 member function.
11357 (pp_constant): Adjust.
11358 (pp_c_constant): Remove.
11359 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11360 pp_c_constant. Adjust.
11361 (pp_c_constant)
11362 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11363 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11364
da6ca2b5
GDR
113652013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11366
11367 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11368 (c_pretty_printer::c_pretty_printer): Declare.
11369 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11370 c_pretty_printer_init. Adjust.
11371 (print_c_tree): Do not call c_pretty_printer_init.
11372 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11373
65a372f4
AC
113742013-08-09 Arnaud Charlet <charlet@adacore.com>
11375
11376 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11377
fd9b0f32
PC
113782013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11379
11380 PR c++/58080
11381 * c-common.c (pointer_int_sum): Add bool parameter.
11382 * c-common.h (pointer_int_sum): Adjust declaration.
11383
e0aec1e9
GDR
113842013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11385
11386 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11387 c_pretty_printer variable.
11388
b066401f
GDR
113892013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11390
11391 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11392 (pp_base): Remove.
11393 (pp_c_base): Likewise. Adjust users.
11394 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11395 (pp_c_whitespace): Do not call pp_base.
11396 (pp_c_left_paren): Likewise.
11397 (pp_c_right_paren): Likewise.
11398 (pp_c_left_brace): Likewise.
11399 (pp_c_right_brace): Likewise.
11400 (pp_c_left_bracket): Likewise.
11401 (pp_c_right_bracket): Likewise.
11402 (pp_c_dot): Likewise.
11403 (pp_c_ampersand): Likewise.
11404 (pp_c_star): Likewise.
11405 (pp_c_arrow): Likewise.
11406 (pp_c_semicolon): Likewise.
11407 (pp_c_complement): Likewise.
11408 (pp_c_exclamation): Likewise.
11409 (pp_c_direct_declarator): Likewise.
11410 (pp_c_ws_string): Likewise.
11411 (pp_c_identifier): Likewise.
11412 (pp_c_statement): Likewise.
11413 (print_c_tree): Likewise.
11414
65e5a578
ESR
114152013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11416
11417 PR c++/58072
11418 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11419 provide useful error strings.
11420
137a1a27
GDR
114212013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11422
11423 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11424 printer functions instead of pp_string or operators and punctuators.
11425 (dump_generic_ada_node): Likewise.
11426 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11427 (pp_c_relational_expression): Likewise.
11428 (pp_c_logical_or_expression): Likewise.
11429
07838b13
GDR
114302013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11431
11432 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11433 functions instead of pp_character.
11434 (pp_ada_tree_identifier): Likewise.
11435 (dump_ada_double_name): Likewise.
11436 (dump_ada_function_declaration): Likewise.
11437 (dump_ada_array_domains): Likewise.
11438 (dump_template_types): Likewise.
11439 (dump_generic_ada_node): Likewise.
11440 (print_ada_declaration): Likewise.
11441 (print_ada_struct_decl): Likewise.
11442 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11443
433cc7b0
TT
114442013-07-23 Tom Tromey <tromey@redhat.com>
11445
11446 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11447 * c-common.c (c_common_reswords): Add _Generic.
11448
688010ba
OB
114492013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11450
11451 * c-common.c: Fix typos.
11452 * c-common.h: Likewise.
11453
2a99e5e6
LL
114542013-07-13 Lubos Lunak <l.lunak@suse.cz>
11455
11456 PR c++/55203
11457 * c-common.c (c_common_attribute_table): Add warn_unused.
11458 (handle_warn_unused_attribute): New.
11459
c26302d5
JJ
114602013-07-10 Jakub Jelinek <jakub@redhat.com>
11461
11462 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11463 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11464
dfeadaa0
PC
114652013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11466
11467 PR c++/57869
11468 * c.opt: Add Wconditionally-supported.
11469
6a2fa4b2
GS
114702013-07-08 Graham Stott <graham.stott@btinternet.com>
11471
adfac8df 11472 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11473 unused variables l_length and l_node.
11474
ecdbd01a 114752013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11476
11477 PR c/57821
11478 * c-common.c (complete_array_type): Delay folding first index
11479 like other indices. When folding, check for index overflow.
11480
bedc293e
MG
114812013-06-27 Marc Glisse <marc.glisse@inria.fr>
11482
11483 PR c++/57509
11484 * c-common.h (c_build_vec_perm_expr): New complain argument.
11485 * c-common.c (c_build_vec_perm_expr): Likewise.
11486 Use save_expr also in C++.
11487
604b2bfc
GDR
114882013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11489
11490 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11491 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11492 * c-opts.c (c_common_post_options): Likewise.
11493
dfeadaa0 114942013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11495
11496 * array-notation-common.c (length_mismatch_in_expr): Changed the
11497 parameter type's from a dynamic array to a vec_tree. Also removed
11498 the size parameters.
11499 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11500 the change above.
11501
2ce86d2e
BI
115022013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11503
11504 * c-common.h (struct cilkplus_an_parts): New structure.
11505 (struct cilkplus_an_loop_parts): Likewise.
11506 (cilkplus_extract_an_triplets): New prototype.
11507 (fix_sec_implicit_args): Likewise.
11508 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11509 (fix_sec_implicit_args): Likewise.
604b2bfc 11510
07a6825b
BI
115112013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11512
11513 * array-notation-common.c (find_inv_trees): Removed an unwanted
11514 typecasting.
11515 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11516 enum rid to enum tree_code.
11517
08346abd
JH
115182013-06-11 Jan Hubicka <jh@suse.cz>
11519
11520 * c-common.c (handle_alias_ifunc_attribute): Do not set
11521 DECL_EXTERNAL for weakref variables.
11522 * c-pragma.c (handle_pragma_weak): Make sure aliases
11523 are not declared as external.
11524
d60f1706
BI
115252013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11526
11527 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11528 function from c/c-array-notation.c.
11529 (is_cilkplus_reduce_builtin): Likewise.
11530 (find_rank): Likewise.
11531 (extract_array_notation_exprs): Likewise.
11532 (replace_array_notations): Likewise.
11533 (find_inv_trees): Likewise.
11534 (replace_inv_trees): Likewise.
11535 (contains_array_notation_expr): Likewise.
11536 (find_correct_array_notation_type): Likewise.
11537 * c-common.h (struct inv_list): Moved this struct from the file
11538 c/c-array-notation.c and added a new field called additional tcodes.
11539 (length_mismatch_in_expr_p): New prototype.
11540 (is_cilkplus_reduce_builtin): Likewise.
11541 (find_rank): Likewise.
11542 (extract_array_notation_exprs): Likewise.
11543 (replace_array_notation): Likewise.
11544 (find_inv_trees): Likewise.
11545 (replace_inv_trees): Likewise.
11546 (find_correct_array_notation_type): Likewise.
dfeadaa0 11547
36536d79
BI
115482013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11549
11550 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11551 function array_notation_init_builtins is called.
11552 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11553 * c-common.def (ARRAY_NOTATION_REF): New tree.
11554 * c-common.h (build_array_notation_expr): New function declaration.
11555 (build_array_notation_ref): Likewise.
11556 (extract_sec_implicit_index_arg): New extern declaration.
11557 (is_sec_implicit_index_fn): Likewise.
11558 (ARRAY_NOTATION_CHECK): New define.
11559 (ARRAY_NOTATION_ARRAY): Likewise.
11560 (ARRAY_NOTATION_START): Likewise.
11561 (ARRAY_NOTATION_LENGTH): Likewise.
11562 (ARRAY_NOTATION_STRIDE): Likewise.
11563 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11564 ARRAY_NOTATION_REF.
11565 (pp_c_expression): Likewise.
11566 * c.opt (flag_enable_cilkplus): New flag.
11567 * array-notation-common.c: New file.
11568
f7716d57
JJ
115692013-05-14 Jakub Jelinek <jakub@redhat.com>
11570
11571 PR c++/57274
11572 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11573
a5e0cd1d
MG
115742013-05-10 Marc Glisse <marc.glisse@inria.fr>
11575
11576 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11577 vectors.
11578
f6bc1c4a
HS
115792013-05-07 Han Shen <shenhan@google.com>
11580
11581 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11582
3f12f6e9
SKS
115832013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11584
11585 * c-common.c (check_user_alignment): Emit error for negative values.
11586
61949153
PC
115872013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11588
11589 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11590
e93e18e9
PC
115912013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11592
11593 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11594 __GXX_EXPERIMENTAL_CXX1Y__.
11595
44d90fe1 115962013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11597 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11598
11599 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11600 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11601 to simply use OPT_Wpointer_arith.
11602 (c_sizeof_or_alignof_type): Likewise.
11603
13f39b2e
PC
116042013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11605
11606 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11607
4b84d650
JJ
116082013-04-12 Jakub Jelinek <jakub@redhat.com>
11609
11610 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11611 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11612 specifiers.
11613
fb037b5d
SB
116142013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11615
11616 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11617
4e856798
PC
116182013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11619
11620 * c-common.c (pointer_int_sum): Remove dead code.
11621
4b1baac8
RS
116222013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11623
11624 PR middle-end/56524
11625 * c-common.c (handle_optimize_attribute): Don't call
11626 save_optabs_if_changed.
11627
0b50e654
JJ
116282013-03-05 Jakub Jelinek <jakub@redhat.com>
11629
11630 PR middle-end/56461
11631 * c-pch.c (pch_init): Free target_validity at the end.
11632
48c41403
JJ
116332013-03-04 Jakub Jelinek <jakub@redhat.com>
11634
11635 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11636
e664c61c
KS
116372013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11638 Jakub Jelinek <jakub@redhat.com>
11639
11640 PR sanitizer/56454
11641 * c-common.c (handle_no_sanitize_address_attribute): New function.
11642 (c_common_attribute_table): Add no_sanitize_address attribute.
11643 (handle_no_address_safety_analysis_attribute): Add
11644 no_sanitize_address attribute, not no_address_safety_analysis
11645 attribute.
11646
a475fd3d 116472013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11648
11649 PR target/52555
11650 * c-common.c (handle_optimize_attribute): Call
11651 save_optabs_if_changed.
11652
f6007d99
JJ
116532013-02-18 Jakub Jelinek <jakub@redhat.com>
11654 Steven Bosscher <steven@gcc.gnu.org>
11655
11656 PR pch/54117
11657 * c-opts.c (c_common_post_options): If debug info is enabled
11658 and non-dwarf*, refuse to load PCH files and when writing PCH
11659 file warn.
11660
cf35e2b1
JJ
116612013-02-05 Jakub Jelinek <jakub@redhat.com>
11662
11663 PR middle-end/56167
11664 * c-common.c (handle_error_attribute): Fix condition.
11665
32887460
JJ
116662013-01-30 Jakub Jelinek <jakub@redhat.com>
11667
11668 PR c++/55742
11669 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11670
5af057d8
JM
116712013-01-18 Jason Merrill <jason@redhat.com>
11672
11673 PR target/54908
11674 * c.opt (-fextern-tls-init): New.
11675 * c-opts.c (c_common_post_options): Handle it.
11676
cc83c823
JJ
116772013-01-09 Jakub Jelinek <jakub@redhat.com>
11678
11679 PR c/48418
11680 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11681 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11682 and is either negative or bigger or equal to type precision
11683 of the first operand.
11684
a859517f
MP
116852012-12-03 Marek Polacek <polacek@redhat.com>
11686
11687 PR c/55570
11688 * c-common.c (check_user_alignment): Swap order of tests,
11689 check TREE_CODE first.
11690
2d7aa578
ESR
116912012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11692
11693 PR c++/52654
11694 * c-common.h (overflow_type): New enum.
11695 (build_userdef_literal): Add overflow_type argument.
11696 (tree_userdef_literal): Add overflow_type.
11697 (USERDEF_LITERAL_OVERFLOW): New access macro.
11698 * c-common.c (build_userdef_literal): Add overflow_type
11699 argument.
11700 * c-lex.c (c_lex_with_flags): Add overflow_type to
11701 build_userdef_literal calls.
11702 (interpret_integer, interpret_float): Add overflow_type argument.
11703
cc3c4f62
RB
117042012-11-28 Richard Biener <rguenther@suse.de>
11705
11706 PR c/35634
11707 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11708 here and use a type with proper overflow behavior for types that would
11709 need to be promoted for the arithmetic.
11710
77bc5132
JJ
117112012-11-23 Jakub Jelinek <jakub@redhat.com>
11712
11713 PR sanitizer/55435
11714 * c-common.c (handle_no_address_safety_analysis_attribute): New
11715 function.
11716 (c_common_attribute_table): Add no_address_safety_analysis.
11717
5dc99c46
SB
117182012-11-16 Simon Baldwin <simonb@google.com>
11719
11720 * c.opt: Add f[no-]canonical-system-headers.
11721 * c-opts.c (c_common_handle_option): Handle
11722 OPT_fcanonical_system_headers.
11723
a4a0016d
ESR
117242012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11725
11726 PR c++/54413
11727 * c-opts.c (c_common_handle_option): Set new flags.
11728 * c.opt: Describe new flags.
11729
7dbb85a7
JM
117302012-11-09 Jason Merrill <jason@redhat.com>
11731
11732 * c.opt (Wabi-tag): New.
11733
ad7bac31
AK
117342012-11-09 Andi Kleen <ak@linux.intel.com>
11735
11736 PR 55139
11737 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11738 MEMMODEL_MASK
ad7bac31 11739
7332899a
MLI
117402012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11741
11742 PR c/53063
11743 * c.opt (Wformat): Make it Alias Wformat=1.
11744 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11745 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11746 LangEnabledBy.
11747 (Wformat=): RejectNegative. Use LangEnabledBy.
11748 (Wnonnull): Use LangEnabledBy.
11749 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11750 * c-format.c (set_Wformat): Delete.
11751 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11752 (maybe_read_dollar_number): Likewise.
11753 (avoid_dollar_number): Likewise.
11754 (finish_dollar_format_checking): Likewise.
11755 (check_format_info): Likewise.
11756 (check_format_info_main): Likewise.
11757 (check_format_types): Likewise.
11758 (format_type_warning): Likewise.
11759 * c-common.c (int): Likewise.
11760 (check_function_sentinel): Likewise.
8e745a17 11761 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11762
34a180a6
MLI
117632012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11764
11765 PR c/53063
11766 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11767 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11768 Use LangEnabledBy.
11769 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11770 common.opt.
11771 (Wvariadic-macros): Init(1).
11772 * c-opts.c (c_common_handle_option): Do not handle them
11773 explicitly.
11774 (c_common_post_options): Likewise.
11775 (sanitize_cpp_opts): warn_unused_macros is now
11776 cpp_warn_unused_macros.
11777 (push_command_line_include): Likewise.
11778 * c-common.c (warn_unknown_pragmas): Do not define.
11779 * c-common.h (warn_unknown_pragmas): Do not declare.
11780
3f46d6a5
MLI
117812012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11782
11783 PR c/51294
11784 * c-common.c (conversion_warning): Handle conditional expressions.
11785
880661a4
JW
117862012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11787
11788 PR c++/54930
11789 * c.opt (Wreturn_local_addr): Define new option.
11790
4514a96b
JM
117912012-10-25 Jason Merrill <jason@redhat.com>
11792
f14edc1a
JM
11793 * c.opt (Wvirtual-move-assign): New.
11794
4514a96b
JM
11795 * c.opt (Winherited-variadic-ctor): New.
11796
93100c6b
MG
117972012-10-25 Marc Glisse <marc.glisse@inria.fr>
11798
11799 PR c++/54427
11800 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11801
1efcb8c6
JM
118022012-10-23 Joseph Myers <joseph@codesourcery.com>
11803
11804 * c-common.h (pch_cpp_save_state): Declare.
11805 * c-target.def (c_preinclude): New hook.
11806 * c-opts.c (done_preinclude): New.
11807 (push_command_line_include): Handle default preincluded header.
11808 (cb_file_change): Call pch_cpp_save_state when calling
11809 push_command_line_include.
11810 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11811 (pch_cpp_save_state): New.
11812 (pch_init): Call pch_cpp_save_state conditionally, instead of
11813 calling cpp_save_state.
11814
4a0ae68e
MLI
118152012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11816
11817 PR c/53063
11818 PR c/40989
11819 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11820 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11821 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11822 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11823 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11824 * c-opts.c (c_common_handle_option): Remove explicit handling from
11825 here.
11826 (c_common_post_options): Likewise.
11827
67e4210b
EB
118282012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11829
11830 * c-ada-spec.c (LOCATION_COL): Delete.
11831 (compare_location): New function.
11832 (compare_node): Use it.
11833 (compare_comment): Likewise.
11834
65d4f2cd
MLI
118352012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11836
11837 PR c/53063
11838 PR c/40989
11839 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11840 * c-opts.c (c_common_handle_option): Do not set them here. Add
11841 comment.
11842 (c_common_post_options): Likewise.
11843
909881cb
EB
118442012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11845
11846 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11847 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11848 Remove POINTER_TYPE handling, add large unsigned handling and use
11849 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11850
3a785c97
JJ
118512012-10-12 Jakub Jelinek <jakub@redhat.com>
11852
11853 PR c/54381
11854 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11855 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11856 locs and array of 3 trees instead of just single loc and single
11857 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11858 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11859 For *cmp* builtins that take two sources strings report warnings
11860 about first and second source, not about destination and source.
11861
5e54f81d
MG
118622012-10-12 Marc Glisse <marc.glisse@inria.fr>
11863
11864 PR c++/53055
11865 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11866
f5b02f1e
EB
118672012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11868
11869 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11870 declaring something coming from another file.
11871
b46dbc6c
AC
118722012-10-10 Arnaud Charlet <charlet@adacore.com>
11873
f5b02f1e 11874 PR ada/54845
b46dbc6c
AC
11875 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11876
5d9de0d0
PC
118772012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11878
11879 PR c++/54194
11880 * c-common.c (warn_about_parentheses): Add location_t parameter;
11881 use EXPR_LOC_OR_LOC.
11882 * c-common.h: Update declaration.
11883
a212e43f
MG
118842012-10-09 Marc Glisse <marc.glisse@inria.fr>
11885
11886 PR c++/54427
11887 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11888 more operations. Make error messages optional.
11889 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11890 (scalar_to_vector): Declare.
11891
b1db7f91
JM
118922012-10-08 Jason Merrill <jason@redhat.com>
11893
11894 * c-common.c (c_common_reswords): Add thread_local.
11895
e28d52cf
DS
118962012-10-08 Dodji Seketeli <dodji@redhat.com>
11897
11898 PR c++/53528 C++11 attribute support
11899 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11900 new functions.
11901 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11902 static function.
11903 (handle_aligned_attribute): In choose strictest alignment
11904 among many. Use new check_cxx_fundamental_alignment_constraints.
11905 (handle_transparent_union_attribute): In c++11 attribute syntax,
11906 don't look through typedefs.
11907
3b78de56
AC
119082012-10-04 Arnaud Charlet <charlet@adacore.com>
11909
11910 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11911 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11912 out of dumpfile.h.
11913
6040bb5f
DC
119142012-09-25 Dehao Chen <dehao@google.com>
11915
11916 PR middle-end/54645
3b78de56 11917 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11918 map when read in the pch.
11919
3f8257db 119202012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11921
11922 * c-ada-spec.c: Style fixes.
11923
3f8257db 119242012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11925
11926 * c.opt (-fada-spec-parent): Define new command line switch.
11927 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11928 is specified, generate binding spec as a child of the specified unit.
11929
0ccb505d
PC
119302012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11931 Manuel López-Ibáñez <manu@gcc.gnu.org>
11932
11933 PR c++/53210
11934 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11935
c583af79
AC
119362012-08-23 Arnaud Charlet <charlet@adacore.com>
11937
11938 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11939 for pointers, and add missing Convention C pragma.
11940 (print_ada_struct_decl): Add missing aliased keyword.
11941 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11942
1a4049e7
JJ
119432012-08-17 Jakub Jelinek <jakub@redhat.com>
11944
11945 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11946 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11947 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11948 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11949 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11950
70b5e7dc
RG
119512012-08-10 Richard Guenther <rguenther@suse.de>
11952
11953 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11954
f8923f7e
SB
119552012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11956
11957 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11958 instead of separate pp_newline and pp_flush.
11959 (print_c_tree): Likewise.
11960
e45abe1f
RH
119612012-07-26 Richard Henderson <rth@redhat.com>
11962
11963 * c-common.c (handle_hot_attribute): Allow labels.
11964 (handle_cold_attribute): Likewise.
11965
332f1d24
JJ
119662012-07-20 Jakub Jelinek <jakub@redhat.com>
11967
11968 PR c++/28656
11969 * c-common.c (check_function_nonnull): Handle multiple nonnull
11970 attributes properly.
11971
7ee2468b
SB
119722012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11973
11974 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11975 * c-ada-spec.c: Likewise.
11976 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11977
ee7b28eb
SB
119782012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11979
11980 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11981 Remove code conditional on it.
11982
6bdf3519
SB
119832012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11984
11985 * c-gimplify.c: Do not include basic-block.h.
11986 * c-common.c: Do not include linfuncs.h.
11987
532aafad
SB
119882012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11989
11990 * c-common.h: Include tree.h.
11991
8d0d1915
JM
119922012-07-02 Jason Merrill <jason@redhat.com>
11993
11994 PR c++/53524
11995 * c-common.c (get_priority): Call default_conversion.
11996
fbc873ad
UB
119972012-07-01 Uros Bizjak <ubizjak@gmail.com>
11998
11999 * c-pch.c (c_common_write_pch): Remove unused variables.
12000
d4a10d0a
SB
120012012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12002
12003 * cppspec.c: Moved from gcc/ to here.
12004
6f3a2e23
KT
120052012-06-27 Kai Tietz <ktietz@redhat.com>
12006
12007 PR preprocessor/37215
12008 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12009
8ca92d04
SB
120102012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12011
12012 * c-common.h (c_common_print_pch_checksum): Remove.
12013 * c-pch.c: Do not include output.h.
12014 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12015 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12016 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12017 (struct c_pch_header): Remove.
12018 (get_ident): Update gpch version.
12019 (pch_init): Do not print executable_checksum to asm_out_file.
12020 Do not fail if there is no asm_out_file to read back from. Set
12021 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12022 (c_common_write_pch): Verify that nothing was written to asm_out_file
12023 since pch_init was called. Do not write a c_pch_header, and do not
12024 copy from asm_out_file to the PCH.
12025 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12026 the content of asm_out_file from the PCH.
12027 (c_common_print_pch_checksum): Remove.
12028 * c-opts.c (c_common_init): Print out executable_checksum directly.
12029
70f42967
SB
120302012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12031
12032 * c-target.def (objc_declare_unresolved_class_reference,
12033 objc_declare_class_definition): Add new hooks.
12034
a8781821
SB
120352012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12036
12037 * c-lex.c: Do not include output.h.
12038 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12039 Remove uses of ASM_OUTPUT_IDENT.
12040
9e1a8dd1
RR
120412012-06-15 Marc Glisse <marc.glisse@inria.fr>
12042
12043 PR c++/51033
12044 * c-common.h (c_build_vec_perm_expr): Move decl here.
12045 * c-common.c (c_build_vec_perm_expr): Move definition
12046 here.
12047
6f07a821
SB
120482012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12049
12050 * c.opt (fconserve-space): Turn into a no-op.
12051
9faeb493 120522012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
12053
12054 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12055 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12056 both the start and end of the function.
12057
a4b7d13c
SB
120582012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12059
12060 * c-common.c: Do not include output.h.
12061 * c-pragma.c: Likewise.
12062
c265f413
SA
120632012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12064
12065 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12066 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12067 (lang_decl_name): Handle namespace decls.
12068
be7a421e
SB
120692012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12070
12071 * c-ada-spec.c: Do not include output.h.
12072 * c-semantics.c: Likewise.
12073
65de6659
JM
120742012-05-29 Joseph Myers <joseph@codesourcery.com>
12075
12076 * c-common.c: Fix typo.
12077
ca5f4331
MM
120782012-05-29 Michael Matz <matz@suse.de>
12079
12080 * c-common.h (c_expand_decl): Remove prototype.
12081
4f7f7aca
MLI
120822012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12083
12084 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12085 * c-opts.c (c_common_handle_option): Remove code handling
12086 warn_missing_braces.
12087
4a792f9b
PC
120882012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12089
12090 PR c++/25137
12091 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12092 -Wmissing_braces.
12093
650dc14a
DS
120942012-05-22 Dodji Seketeli <dodji@redhat.com>
12095
12096 PR c++/53322
12097 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12098
9b095bf1
MLI
120992012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12100
12101 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12102 * c-opts.c (c_common_handle_option): Do not handle explicitly
12103 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12104
0b2c4be5
DS
121052012-05-16 Dodji Seketeli <dodji@redhat.com>
12106
12107 PR preprocessor/7263
ab20d992 12108 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
12109 to cpp_classify_number. For diagnostics, use the precise location
12110 instead of the global input_location.
12111
a1bde5af
PC
121122012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12113
d02924ef 12114 PR c++/11856
a1bde5af
PC
12115 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12116
d1ede5f4
BS
121172012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12118
a1bde5af 12119 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 12120
f2bc201f
MLI
121212012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12122
12123 PR 53063
12124 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12125 Wreorder): Use LangEnabledBy.
12126 * c-opts.c (c_common_handle_option): Do not enable them
12127 explicitly. Call lang-specific generated functions.
12128 (c_common_post_options): Do not set them here.
12129
95744782
MLI
121302012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12131
12132 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12133 Wmissing-field-initializers,Wmissing-parameter-type,
12134 Wold-style-declaration,Woverride-init): Use EnabledBy.
12135 * c-opts.c (c_common_post_options): Do not set here explicitly.
12136
7d5a5747
MLI
121372012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12138
12139 PR 53063
12140 * c-opts.c (c_common_handle_option): Use handle_generated_option
12141 to enable sub-options.
12142
5a3c9cf2
PC
121432012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12144
12145 PR c++/53158
12146 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12147
3ac8781c
RG
121482012-05-10 Richard Guenther <rguenther@suse.de>
12149
12150 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12151 adjust commentary about TYPE_IS_SIZETYPE types.
12152
1e537948
MLI
121532012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12154
12155 PR c++/53261
12156 * c-common.c (warn_logical_operator): Check that argument of
12157 integer_zerop is not NULL.
12158
f2c4a785
MLI
121592012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12160
12161 PR c/43772
12162 * c-common.c (warn_logical_operator): Do not warn if either side
12163 is already true or false.
12164
50f305ca
MLI
121652012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12166
12167 PR c/51712
12168 * c-common.c (expr_original_type): New.
12169 (shorten_compare): Do not warn for enumeration types.
12170
0c3641b0
MLI
121712012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12172
12173 * c.opt (fpermissive): Add Var(flag_permissive).
12174
7edaa4d2
MG
121752012-04-30 Marc Glisse <marc.glisse@inria.fr>
12176
12177 PR c++/51033
12178 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12179 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12180
b9c8da34
DS
121812012-04-30 Dodji Seketeli <dodji@redhat.com>
12182
12183 Add -Wvarargs option
ab20d992 12184 * c.opt (Wvarargs): Define new option.
b9c8da34 12185
e6c69da0
MLI
121862012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12187
12188 * c-common.c (check_function_arguments): Replace
12189 Wmissing-format-attribute with Wsuggest-attribute=format.
12190
90137d8f
MLI
121912012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12192
12193 * c.opt (Wsuggest-attribute=format): New. Alias of
12194 Wmissing-format-attribute.
12195 * c-format.c (decode_format_type): Replace
12196 Wmissing-format-attribute with Wsuggest-attribute=format.
12197 (check_function_format): Likewise.
12198
9faeb493 121992012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12200
12201 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12202 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12203 * c.opt: Add Wliteral-suffix.
12204
c1771a20
MLI
122052012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12206
12207 PR c/44774
12208 * c.opt (Wpedantic): New.
12209 (pedantic): Alias Wpedantic.
12210 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12211 (c_common_post_options): Likewise.
12212 (sanitize_cpp_opts): Likewise.
12213 * c-lex.c (interpret_float): Likewise.
12214 * c-format.c (check_format_types): Likewise.
12215 * c-common.c (pointer_int_sum): Likewise.
12216 (c_sizeof_or_alignof_type): Likewise.
12217 (c_add_case_label): Likewise.
12218 (c_do_switch_warnings): Likewise.
12219 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12220
04b391c1
JM
122212012-04-15 Jason Merrill <jason@redhat.com>
12222
12223 PR c++/52818
12224 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12225 (C_STD_NAME): Distinguish between C++98 and C++11.
12226
ac868f29
EB
122272012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12228
12229 PR target/52624
12230 * c-common.h (uint16_type_node): Rename into...
12231 (c_uint16_type_node): ...this.
12232 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12233 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12234
fd4116f4
MLI
122352012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12236
12237 * c-common.c (warn_if_unused_value): Move definition to here.
12238 * c-common.h (warn_if_unused_value): Move declaration to here.
12239
573ac65e
WB
122402012-03-23 William Bader <williambader@hotmail.com>
12241
12242 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12243
552b8185
JM
122442012-03-20 Jason Merrill <jason@redhat.com>
12245
12246 * c-common.h (enum cxx_dialect): Add cxx1y.
12247 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12248 test.
12249 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12250 * c-opts.c (c_common_post_options): Likewise.
12251 (set_std_cxx1y): New.
12252 (c_common_handle_option): Call it.
12253 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12254
04398fa8
PC
122552012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12256
12257 PR c++/14710
12258 * c.opt ([Wuseless-cast]): Add.
12259
d2a12ae7
RG
122602012-03-16 Richard Guenther <rguenther@suse.de>
12261
12262 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12263
a12bf402
MLI
122642012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12265
12266 PR c++/44783
12267 * c.opt (ftemplate-backtrace-limit) Add.
12268
5c30094f
RO
122692012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12270
12271 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12272 handling.
12273 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12274 (init_pragma): Don't register extern_prefix.
12275
21fa2faf
RG
122762012-03-12 Richard Guenther <rguenther@suse.de>
12277
12278 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12279 (builtin_type_for_size): Likewise.
12280
e3793c6f
JJ
122812012-02-13 Jakub Jelinek <jakub@redhat.com>
12282
12283 PR c++/52215
12284 * c-common.c (sync_resolve_params): Don't decide whether to convert
12285 or not based on TYPE_SIZE comparison, convert whenever arg_type
12286 is unsigned INTEGER_TYPE.
12287
93286335
PC
122882012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12289
12290 PR c/52118
12291 * c.opt ([Wunused-local-typedefs]): Fix description.
12292
7a421706
MS
122932012-01-24 Mike Stump <mikestump@comcast.net>
12294
12295 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12296 exactly.
12297
ba9b1f11
RG
122982012-01-18 Richard Guenther <rguenther@suse.de>
12299
12300 * c-opts.c (c_common_post_options): Reset LTO flags if
12301 we are about to generate a PCH.
12302
465406be
PC
123032012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12304
12305 PR c++/51777
12306 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12307 use pp_unsigned_wide_integer.
12308
aee15221
RG
123092012-01-10 Richard Guenther <rguenther@suse.de>
12310
12311 PR middle-end/51806
12312 * c-opts.c (c_common_handle_option): Move -Werror handling
12313 to language independent code.
12314
5720c0dc
RG
123152012-01-05 Richard Guenther <rguenther@suse.de>
12316
12317 PR middle-end/51764
12318 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12319 from common.opt.
12320
73ac190a
PC
123212011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12322
12323 PR c++/51316
12324 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12325 of array types with an unknown bound.
12326
48b0b196
JM
123272011-12-20 Joseph Myers <joseph@codesourcery.com>
12328
12329 * c-common.c (flag_isoc99): Update comment to refer to C11.
12330 (flag_isoc1x): Change to flag_isoc11.
12331 * c-common.h (flag_isoc99): Update comment to refer to C11.
12332 (flag_isoc1x): Change to flag_isoc11.
12333 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12334 C11.
12335 * c-opts.c (set_std_c1x): Change to set_std_c11.
12336 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12337 Call set_std_c11.
12338 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12339 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12340 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12341 standard.
12342 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12343 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12344 (std=gnu1x): Make alias of std=gnu11.
12345
d58d6eb5
JM
123462011-12-19 Jason Merrill <jason@redhat.com>
12347
12348 PR c++/51228
12349 * c-common.c (handle_transparent_union_attribute): Check the first
12350 field if the type is complete.
12351
b3908fcc
JW
123522011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12353
12354 PR libstdc++/51365
12355 * c-common.c (RID_IS_FINAL): Add.
12356 * c-common.h (RID_IS_FINAL): Add.
12357
fea3ca91
IS
123582011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12359
12360 * c.opt (fgnu-runtime): Provide full description.
12361 (fnext-runtime): Likewise.
12362 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12363
62bad7cd
AM
123642011-11-28 Andrew MacLeod <amacleod@redhat.com>
12365
12366 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12367 predefines in one place. Add LOCK_FREE predefines.
12368 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12369 new func.
12370
c466c4ff
AM
123712011-11-24 Andrew MacLeod <amacleod@redhat.com>
12372
12373 PR c/51256
9faeb493 12374 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12375 conditions
9faeb493
UB
12376 (resolve_overloaded_atomic_exchange,
12377 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12378 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12379 error_mark_node for error conditions.
9faeb493 12380
a5952633
RG
123812011-11-08 Richard Guenther <rguenther@suse.de>
12382
12383 PR middle-end/51010
ab20d992 12384 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12385
0a35513e
AH
123862011-11-07 Richard Henderson <rth@redhat.com>
12387 Aldy Hernandez <aldyh@redhat.com>
12388 Torvald Riegel <triegel@redhat.com>
12389
12390 Merged from transactional-memory.
12391
12392 * c-common.c (handle_tm_wrap_attribute,
12393 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12394 (struct c_common_reswords): Added __transaction* keywords.
12395 (struct c_common_attribute_table): Added transaction* and tm_regparm
12396 attributes.
12397 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12398 masks.
12399 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12400 find_tm_attribute): Declare.
12401
6d87092d
JM
124022011-11-07 Jason Merrill <jason@redhat.com>
12403
12404 PR c++/35688
12405 * c-common.c, c-common.h: Revert yesterday's changes.
12406
8e7860a1
JM
124072011-11-06 Jason Merrill <jason@redhat.com>
12408
12409 PR c++/35688
12410 * c-common.c (decl_has_visibility_attr): Split out from...
12411 (c_determine_visibility): ...here.
12412 * c-common.h: Declare it.
12413
d19fa6b5
JM
124142011-11-06 Joseph Myers <joseph@codesourcery.com>
12415
12416 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12417 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12418 type.
12419 (check_user_alignment): New. Split out of
12420 handle_aligned_attribute. Disallow integer constants with
12421 noninteger types. Conditionally allow zero.
12422 (handle_aligned_attribute): Use check_user_alignment.
12423 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12424
86951993
AM
124252011-11-06 Andrew MacLeod <amacleod@redhat.com>
12426 Richard Henderson <rth@redhat.com>
12427
12428 Merged from cxx-mem-model.
12429
12430 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12431 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12432 parameters that are the same type size.
12433 (get_atomic_generic_size): New. Find size of generic
12434 atomic function parameters and do typechecking.
12435 (add_atomic_size_parameter): New. Insert size into parameter list.
12436 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12437 either __atomic_exchange_n or external library call.
9faeb493 12438 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12439 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12440 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12441 __atomic_load_n or an external library call.
12442 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12443 __atomic_store_n or an external library call.
12444 (resolve_overloaded_builtin): Handle new __atomic builtins.
12445
cf9e9959
EB
124462011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12447
12448 PR c++/50608
12449 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12450 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12451 <INDIRECT_REF>: Return the argument.
12452 <ARRAY_REF>: Remove special code for negative offset.
12453 Call fold_build_pointer_plus instead of size_binop.
12454 (fold_offsetof): Remove STOP_REF argument and adjust.
12455 * c-common.h (fold_offsetof_1): Declare.
12456 (fold_offsetof): Remove STOP_REF argument.
12457
25339f10
JM
124582011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12459
12460 PR c++/50810
12461 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12462 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12463 Wnarrowing for C++0x and C++98.
12464 * c.opt ([Wnarrowing]): Update.
12465
89401152
PC
124662011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12467
12468 PR c++/44277
12469 * c.opt: Add Wzero-as-null-pointer-constant.
12470
97e3ad20
JM
124712011-10-31 Jason Merrill <jason@redhat.com>
12472
15694fdd
JM
12473 * c.opt (-fdeduce-init-list): Off by default.
12474
97e3ad20
JM
12475 PR c++/50920
12476 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12477 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12478 and -Wc++11-compat.
12479 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12480
fb9120e3
RAV
124812011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12482
12483 PR c++/30066
12484 * c.opt (fvisibility-inlines-hidden): Description change.
12485
3ce4f9e4
ESR
124862011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12487
12488 Implement C++11 user-defined literals.
12489 * c-common.c (build_userdef_literal): New.
12490 * c-common.def: New tree code.
12491 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12492 * c-lex.c (interpret_float): Add suffix parm.
12493 (c_lex_with_flags): Build literal tokens.
12494
5f53c243
PC
124952011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12496
12497 PR c++/50841
12498 Revert:
12499 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12500
12501 PR c++/50810
12502 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12503 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12504 Wnarrowing for C++0x and C++98.
12505 * c.opt ([Wnarrowing]): Update.
12506
263734e1
PC
125072011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12508
12509 PR c++/50810
12510 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12511 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12512 Wnarrowing for C++0x and C++98.
12513 * c.opt ([Wnarrowing]): Update.
12514
d2e312d7
PC
125152011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12516
12517 PR c++/45385
12518 * c-common.c (conversion_warning): Remove code looking for
12519 artificial operands.
12520
d17687f6
DS
125212011-10-18 Dodji Seketeli <dodji@redhat.com>
12522
12523 PR bootstrap/50760
12524 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12525 !NO_IMPLICIT_EXTERN_C.
d17687f6 12526
fc8396e9
PC
125272011-10-17 Michael Spertus <mike_spertus@symantec.com>
12528
12529 * c-common.c (c_common_reswords): Add __bases,
12530 __direct_bases.
12531 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12532
125332011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12534
12535 PR c++/50757
12536 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12537
847e697a
TT
125382011-10-15 Tom Tromey <tromey@redhat.com>
12539 Dodji Seketeli <dodji@redhat.com>
12540
12541 * c.opt (fdebug-cpp): New option.
12542 * c-opts.c (c_common_handle_option): Handle the option.
12543 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12544 output stream in parameter. Factorized from ...
12545 (maybe_print_line): ... this. Dump location debug information when
12546 -fdebug-cpp is in effect.
12547 (print_line_1): New static function. Takes an output stream in
12548 parameter. Factorized from ...
12549 (print_line): ... here. Dump location information when -fdebug-cpp
12550 is in effect.
12551 (scan_translation_unit): Dump location information when
12552 -fdebug-cpp is in effect.
12553
92582b75
TT
125542011-10-15 Tom Tromey <tromey@redhat.com>
12555 Dodji Seketeli <dodji@redhat.com>
12556
12557 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12558 without argument.
12559 * c-opts.c (c_common_handle_option)<case
12560 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12561 cases. Handle -ftrack-macro-expansion with and without argument.
12562
46427374
TT
125632011-10-15 Tom Tromey <tromey@redhat.com>
12564 Dodji Seketeli <dodji@redhat.com>
12565
12566 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12567 (print_line, cb_define, do_line_change): Adjust to avoid touching
12568 the internals of struct line_map. Use the public API instead.
12569 * c-pch.c (c_common_read_pch): Likewise.
12570 * c-lex.c (fe_file_change): Likewise.
12571
fc8396e9
PC
125722011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12573
12574 PR c++/17212
12575 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12576
125772011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12578
12579 PR c++/33067
12580 * c-pretty-print.c (pp_c_floating_constant): Output
12581 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12582
e79983f4
MM
125832011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12584
12585 * c-common.c (def_builtin_1): Delete old interface with two
12586 parallel arrays to hold standard builtin declarations, and replace
12587 it with a function based interface that can support creating
12588 builtins on the fly in the future. Change all uses, and poison
12589 the old names. Make sure 0 is not a legitimate builtin index.
12590 * c-omp.c (c_finish_omp_barrier): Ditto.
12591 (c_finish_omp_taskwait): Ditto.
12592 (c_finish_omp_flush): Ditto.
12593
6637388f
TG
125942011-10-11 Tristan Gingold <gingold@adacore.com>
12595
12596 * c.opt: (fallow-parameterless-variadic-functions): New.
12597
3797cb21
DS
125982011-09-08 Dodji Seketeli <dodji@redhat.com>
12599
12600 PR c++/33255 - Support -Wunused-local-typedefs warning
12601 * c-common.h (struct c_language_function::local_typedefs): New
12602 field.
9faeb493
UB
12603 (record_locally_defined_typedef, maybe_record_typedef_use)
12604 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12605 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12606 (maybe_record_typedef_use)
12607 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12608 * c.opt: Declare new -Wunused-local-typedefs flag.
12609
693ddb1b
EB
126102011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12611
12612 PR middle-end/50266
12613 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12614 computations.
12615
830c740f
RG
126162011-09-05 Richard Guenther <rguenther@suse.de>
12617
12618 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12619 of integer_minus_one_node for empty array upper bounds.
12620
892a371f
DS
126212011-08-28 Dodji Seketeli <dodji@redhat.com>
12622
12623 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12624 it's the first time it's being called on this main TU.
12625
0e3fdb48
RB
126262011-08-24 Richard Guenther <rguenther@suse.de>
12627
12628 PR c/49396
12629 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12630
126312011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12632
12633 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12634 defined in cpp_init_builtins and c_cpp_builtins.
12635
d4a83c10
JM
126362011-08-19 Joseph Myers <joseph@codesourcery.com>
12637
12638 * c-common.c (c_common_reswords): Add __builtin_complex.
12639 * c-common.h (RID_BUILTIN_COMPLEX): New.
12640
bbceee64
JM
126412011-08-18 Joseph Myers <joseph@codesourcery.com>
12642
12643 * c-common.c (c_common_reswords): Add _Noreturn.
12644 (keyword_is_function_specifier): Handle RID_NORETURN.
12645 * c-common.h (RID_NORETURN): New.
12646
3f8257db 126472011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12648
12649 * c-common.c (unsafe_conversion_p): New function. Check if it is
12650 unsafe to convert an expression to the type.
12651 (conversion_warning): Adjust, use unsafe_conversion_p.
12652 * c-common.h (unsafe_conversion_p): New function declaration.
12653
20906c66
JJ
126542011-08-02 Jakub Jelinek <jakub@redhat.com>
12655
12656 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12657 (c_finish_omp_taskyield): New prototype.
12658 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12659 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12660 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12661 or RHS1 have side-effects, evaluate those too in the right spot,
12662 if it is a decl and LHS is also a decl, error out if they
12663 aren't the same.
12664 (c_finish_omp_taskyield): New function.
12665 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12666 * c-pragma.c (omp_pragmas): Add taskyield.
12667 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12668 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12669 PRAGMA_OMP_CLAUSE_MERGEABLE.
12670
770e5a2e
DS
126712011-07-25 Dodji Seketeli <dodji@redhat.com>
12672
12673 * c-common.h (set_underlying_type): Remove parm name from
12674 declaration.
12675
1baae426
RG
126762011-07-25 Romain Geissler <romain.geissler@gmail.com>
12677
12678 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12679
fcb21722
JM
126802011-07-22 Jason Merrill <jason@redhat.com>
12681
76f86d00
JM
12682 PR c++/49793
12683 * c.opt (Wnarrowing): New.
12684
3a636414
JM
12685 PR c++/30112
12686 * c-common.h: Declare c_linkage_bindings.
12687 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12688
fcb21722
JM
12689 PR c++/49813
12690 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12691 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12692 as flag_isoc99 for 'restrict'.
12693 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12694
02614448
ILT
126952011-07-21 Ian Lance Taylor <iant@google.com>
12696
12697 PR middle-end/49705
12698 * c-common.c (c_disable_warnings): New static function.
12699 (c_enable_warnings): New static function.
12700 (c_fully_fold_internal): Change local unused_p to bool. Call
12701 c_disable_warnings and c_enable_warnings rather than change
12702 c_inhibit_evaluation_warnings.
12703
34429675
JM
127042011-07-20 Jason Merrill <jason@redhat.com>
12705
12706 PR c++/6709 (DR 743)
12707 PR c++/42603 (DR 950)
12708 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12709 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12710 (CPP_DECLTYPE): New.
12711 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12712
5d49b6a7
RG
127132011-07-19 Richard Guenther <rguenther@suse.de>
12714
12715 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12716 * c-omp.c (c_finish_omp_for): Likewise.
12717
e84a58ff
EB
127182011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12719
12720 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12721 body on the next line.
12722
329af3c7
JM
127232011-07-08 Jason Merrill <jason@redhat.com>
12724
4063e61b
JM
12725 PR c++/45437
12726 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12727
329af3c7
JM
12728 PR c++/49673
12729 * c-common.c (c_apply_type_quals_to_decl): Don't check
12730 TYPE_NEEDS_CONSTRUCTING.
12731
1a072294
RG
127322011-07-06 Richard Guenther <rguenther@suse.de>
12733
12734 * c-common.c (c_common_nodes_and_builtins):
12735 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12736
fce5dddd
RG
127372011-07-05 Richard Guenther <rguenther@suse.de>
12738
12739 * c-common.c (c_common_nodes_and_builtins): Build all common
12740 tree nodes first.
12741
45d439ac
JJ
127422011-06-27 Jakub Jelinek <jakub@redhat.com>
12743
56300785
JJ
12744 * c-common.h (c_tree_chain_next): New static inline function.
12745
45d439ac
JJ
12746 * c-common.c (check_builtin_function_arguments): Handle
12747 BUILT_IN_ASSUME_ALIGNED.
12748
e0a8ecf2
AM
127492011-06-21 Andrew MacLeod <amacleod@redhat.com>
12750
12751 * c-common.c: Add sync_ or SYNC__ to builtin names.
12752 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12753
127542011-06-20 Pierre Vittet <piervit@pvittet.com>
12755
12756 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12757 handler.
12758 (gen_pragma_handler): New union.
12759 (internal_pragma_handler): New type.
12760 (c_register_pragma_with_data)
12761 (c_register_pragma_with_expansion_and_data): New functions.
12762
12763 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12764 (c_register_pragma, c_register_pragma_with_expansion)
12765 (c_invoke_pragma_handler): Changed to work with
12766 internal_pragma_handler.
12767 (c_register_pragma_with_data)
12768 (c_register_pragma_with_expansion_and_data): New functions.
12769
677f3fa8
JM
127702011-06-14 Joseph Myers <joseph@codesourcery.com>
12771
12772 * c-common.c: Include common/common-target.h.
12773 (handle_section_attribute): Use
12774 targetm_common.have_named_sections.
12775 * c-cppbuiltin.c: Include common/common-target.h.
12776 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12777
d7fc8c14
RG
127782011-06-10 Richard Guenther <rguenther@suse.de>
12779
12780 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12781 to print a IDENTIFIER_NODE.
12782
10e48e39
RO
127832011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12784 Joseph Myers <joseph@codesourcery.com>
12785
12786 * c.opt (fbuilding-libgcc): New option.
12787 * c-cppbuiltin.c (c_cpp_builtins): Define
12788 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12789
6976ae51
JM
127902011-06-07 Jason Merrill <jason@redhat.com>
12791
3ff60975
JM
12792 * c-common.c (max_tinst_depth): Lower default to 900.
12793
6976ae51
JM
12794 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12795
009db074
RG
127962011-06-07 Richard Guenther <rguenther@suse.de>
12797
12798 * c-common.c (c_common_nodes_and_builtins): Do not set
12799 size_type_node or call set_sizetype.
12800
b4592b92
DS
128012011-06-07 Dodji Seketeli <dodji@redhat.com>
12802
12803 PR debug/49130
12804 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12805 type when using pointer comparison to compare types.
b4592b92 12806
014ab419
JW
128072011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12808
12809 * c.opt: Add -Wdelete-non-virtual-dtor.
12810 * c-opts.c (c_common_handle_option): Include it in -Wall.
12811
4f60111f
NF
128122011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12813
12814 PR bootstrap/49190
12815
12816 Revert:
12817 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12818
12819 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12820 not tree_common.
12821
4cc4f2f4
JJ
128222011-05-27 Jakub Jelinek <jakub@redhat.com>
12823
12824 PR c++/49165
12825 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12826 C++ don't call c_common_truthvalue_conversion on void type arms.
12827
38e01f9e
NF
128282011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12829
12830 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12831 (stmt_list_stack): Define.
12832 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12833 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12834
92e948a8
NF
128352011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12836
12837 * c-common.c (warning_candidate_p): Check for BLOCKs.
12838
a2fc3e63
NF
128392011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12840
12841 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12842 not tree_common.
12843
0957c029
JJ
128442011-05-25 Jakub Jelinek <jakub@redhat.com>
12845
12846 * c-common.c (def_fn_type): Remove extra va_end.
12847
828fb3ba
JM
128482011-05-23 Jason Merrill <jason@redhat.com>
12849
12850 PR c++/48106
12851 * c-common.c (c_common_get_narrower): New.
12852 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12853
dde05067
NF
128542011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12855
12856 * c-common.h (check_function_arguments): Tweak prototype of
12857 check_function_arguments.
12858 * c-common.c (check_function_arguments): Likewise. Adjust
12859 calls to check_function_nonnull, check_function_format, and
12860 check_function_sentinel.
12861 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12862 separate attributes and typelist arguments. Use
12863 FOREACH_FUNCTION_ARGS to iterate over argument types.
12864
3c0d13bf
PC
128652011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12866
12867 * c-common.c (c_common_reswords): Reorder.
12868 * c-common.h (rid): Likewise.
12869
8242dd04
NF
128702011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12871
12872 * c-common.c (def_fn_type): Don't call build_function_type, call
12873 build_function_type_array or build_varargs_function_type_array
12874 instead.
12875 (c_common_nodes_and_builtins): Likewise.
12876
3d528853
NF
128772011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12878
12879 * c-common.c (c_add_case_label): Omit the loc argument to
12880 build_case_label.
12881 * c-common.h (build_case_label): Remove.
12882 * c-semantics.c (build_case_label): Remove.
12883
a04a722b
JM
128842011-05-05 Joseph Myers <joseph@codesourcery.com>
12885
12886 * c-objc.h (objc_start_method_definition): Update prototype.
12887 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12888
e19a18d4
NF
128892011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12890
12891 * c-common.c (check_main_parameter_types): Reindent. Don't use
12892 TYPE_ARG_TYPES directly.
12893 (handle_nonnull_attribute): Likewise.
12894 (sync_resolve_params): Likewise.
12895 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12896 to check_format_string.
12897 (handle_format_attribute): Likewise.
12898 (check_format_string): Take a function type to examine instead of
12899 a type list. Use a function_arg_iterator to step through argument
12900 types.
12901
c62c040f
RG
129022011-05-04 Richard Guenther <rguenther@suse.de>
12903
12904 * c-common.c (fix_string_type): Use size_int for index type bounds.
12905 (start_fname_decls): Do not pass NULL to build_int_cst.
12906 (c_init_attributes): Likewise.
12907 * c-lex.c (c_lex_with_flags): Likewise.
12908
c12ff9d8
JM
129092011-04-27 Jason Merrill <jason@redhat.com>
12910
12911 * c-common.c (make_tree_vector_from_list): New.
12912 * c-common.h: Declare it.
12913
304dfbe3
RG
129142011-04-26 Richard Guenther <rguenther@suse.de>
12915
12916 PR preprocessor/48248
12917 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12918 for output size with -P.
12919
3c0d13bf
PC
129202011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12921
12922 * c-common.c (struct c_common_resword): Add __underlying_type.
12923 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12924
04695783
JM
129252011-04-20 Jim Meyering <meyering@redhat.com>
12926
12927 * c-format.c (init_dollar_format_checking): Remove useless
12928 if-before-free.
12929
0dc33c3c
NP
129302011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12931
12932 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12933 (objc_detect_field_duplicates): New.
0dc33c3c 12934 * stub-objc.c: Likewise.
3c0d13bf 12935
c59633d9
NP
129362011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12937
12938 * stub-objc.c (objc_declare_protocols): Renamed to
12939 objc_declare_protocol.
12940 * c-objc.h: Likewise.
3c0d13bf 12941
32dabdaf
NP
129422011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12943
12944 * stub-objc.c (objc_declare_class): Updated argument name.
12945
81f653d6
NF
129462011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12947
12948 * c-common.h (c_common_init_ts): Declare.
12949 * c-common.c (c_common_init_ts): Define.
12950
eb345401
NP
129512011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12952
12953 * c-objc.h (objc_build_message_expr): Updated prototype.
12954 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12955
a358e188
MJ
129562011-04-12 Martin Jambor <mjambor@suse.cz>
12957
12958 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12959 of cgraph_node.
12960
e6313a78
RG
129612011-04-11 Richard Guenther <rguenther@suse.de>
12962
12963 * c-common.c (complete_array_type): Build a range type of
12964 proper type.
12965
dcf0c47e
NF
129662011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12967
12968 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12969 (handle_type_generic_attribute): Likewise.
12970
1ee44b26
JM
129712011-04-07 Jason Merrill <jason@redhat.com>
12972
12973 PR c++/48450
12974 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12975 conversion from C++0x scoped enum.
12976
acce4e77
JM
129772011-04-06 Joseph Myers <joseph@codesourcery.com>
12978
12979 * c-target-def.h: New file.
12980 * c-target.def: New file.
12981 * c-target.h: New file.
12982 * c-common.c (targetcm): Don't define here.
12983 * c-common.h (default_handle_c_option): Declare.
12984 * c-format.c: Include c-target.h instead of target.h.
12985 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12986 include tm.h.
12987 (default_handle_c_option): Move from targhooks.c.
12988
e2eefb55
JJ
129892011-03-29 Jakub Jelinek <jakub@redhat.com>
12990
12991 PR preprocessor/48248
12992 * c-ppoutput.c (print): Add src_file field.
12993 (init_pp_output): Initialize it.
12994 (maybe_print_line): Don't optimize by adding up to 8 newlines
12995 if map->to_file and print.src_file are different file.
12996 (print_line): Update print.src_file.
12997
ba78087b
KT
129982011-03-25 Kai Tietz <ktietz@redhat.com>
12999
13000 * c-ada-spec.c (compare_comment): Use filename_cmp
13001 instead of strcmp for filename.
13002
0edf1bb2
JL
130032011-03-25 Jeff Law <law@redhat.com>
13004
adfac8df 13005 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 13006
c7dc8804
JM
130072011-03-25 Jason Merrill <jason@redhat.com>
13008
13009 * c.opt: Add -std=c++03.
13010
d1d879b1
EB
130112011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13012
13013 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13014
3f8257db 130152011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
13016
13017 PR target/12171
5050afdf
KT
13018 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13019 Display allowed attributes for function pointer types.
13020 (pp_c_attributes_display): New function to display
13021 attributes having affects_type_identity flag set to true.
13022 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13023
62d784f7
KT
13024 * c-common.c (c_common_attribute_table):
13025 Add new element.
13026 (c_common_format_attribute_table): Likewise.
13027
82d37118
JM
130282011-03-18 Jason Merrill <jason@redhat.com>
13029
49a000c3
JM
13030 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13031 * c-common.h: Don't declare it here.
13032 * c-common.c: Or define it here.
13033 * c-opts.c (c_common_handle_option): Or set it here.
13034
82d37118
JM
13035 PR c++/35315
13036 * c-common.c (handle_transparent_union_attribute): Don't
13037 make a duplicate type in C++.
13038
17bc631c
JM
130392011-03-15 Jason Merrill <jason@redhat.com>
13040
13041 * c-common.c (max_constexpr_depth): New.
13042 * c-common.h: Declare it.
13043 * c-opts.c (c_common_handle_option): Set it.
13044 * c.opt (fconstexpr-depth): New option.
13045
1b9b91a6
JM
130462011-03-11 Jason Merrill <jason@redhat.com>
13047
f231b5ff
JM
13048 * c-common.c (attribute_takes_identifier_p): Add missing const.
13049
1b9b91a6
JM
13050 PR c++/46803
13051 * c-common.c (attribute_takes_identifier_p): Assume that an
13052 unknown attribute takes an identifier.
13053
a19e4d44
NF
130542011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13055
13056 PR c/47786
13057 * c-common.c (c_type_hash): Call list_length instead of iterating
13058 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13059
982d62f6
JJ
130602011-02-19 Jakub Jelinek <jakub@redhat.com>
13061
13062 PR c/47809
13063 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13064
0a256240
NP
130652011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13066
13067 * c.opt (fobjc-abi-version=) New.
13068 (fobjc-nilcheck): New.
13069
ba9e6dd5
NF
130702011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13071
13072 PR c++/46890
13073 * c-common.h (keyword_is_decl_specifier): Declare.
13074 * c-common.c (keyword_is_decl_specifier): Define.
13075 (keyword_is_function_specifier): New function.
13076
7273813a
JJ
130772011-01-26 Jakub Jelinek <jakub@redhat.com>
13078
13079 PR c/47473
13080 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13081 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13082 REAL_TYPE.
13083
908ef79b
AC
130842011-01-26 Arnaud Charlet <charlet@adacore.com>
13085
13086 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13087
237e9384
JJ
130882011-01-26 Jakub Jelinek <jakub@redhat.com>
13089
13090 PR pch/47430
13091 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13092 after init_c_lex if pch_file is set.
13093
47ea1edf
DK
130942011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13095
d4dba752 13096 PR c++/43601
47ea1edf
DK
13097 * c.opt (-fkeep-inline-dllexport): New switch.
13098
2aa9c6ae
RG
130992011-01-12 Richard Guenther <rguenther@suse.de>
13100
13101 PR middle-end/32511
13102 * c-common.c (handle_weak_attribute): Warn instead of error
13103 on declaring an inline function weak.
13104
7bd11157
TT
131052011-01-05 Tom Tromey <tromey@redhat.com>
13106
13107 * c-common.h (lvalue_error): Update.
13108 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13109 not error.
13110
0e66e494 131112010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 13112
b4f588c4
NP
13113 PR objc/47075
13114 * c-objc.h (objc_finish_message_expr): Added argument to
13115 prototype.
13116
f4da8dce
NF
131172010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13118
13119 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13120 Use prototype_p.
13121
46270f14
NP
131222010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13123
13124 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 13125 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 13126
4816c593
NF
131272010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13128
13129 * c-common.h (readonly_error): Declare.
13130 * c-common.c (readonly_error): Define.
13131
7a6daeb0
NF
131322010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13133
13134 * c-common.h (invalid_indirection_error): Declare.
13135 * c-common.c (invalid_indirection_error): Define.
13136
892f6119
RG
131372010-12-03 Richard Guenther <rguenther@suse.de>
13138
13139 PR c/46745
13140 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13141 (pp_c_unary_expression): Likewise.
13142 (pp_c_expression): Likewise.
13143
6c39e757
NP
131442010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13145
13146 * c-common.h (objc_finish_function): New.
13147 (objc_non_volatilized_type): Removed.
13148 (objc_type_quals_match): Removed.
13149 * stub-objc.c (objc_finish_function): New.
13150 (objc_non_volatilized_type): Removed.
13151 (objc_type_quals_match): Removed.
9faeb493 13152
7c475d11
JM
131532010-11-30 Joseph Myers <joseph@codesourcery.com>
13154
13155 * c-common.h (parse_optimize_options): Declare.
13156 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13157 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13158
71f3e391
JM
131592010-11-29 Joseph Myers <joseph@codesourcery.com>
13160
13161 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13162 GET_ENVIRONMENT.
13163 * c-pch.c (O_BINARY): Don't define here.
13164 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13165
d5fabb58
JM
131662010-11-25 Joseph Myers <joseph@codesourcery.com>
13167
13168 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13169 targetm.except_unwind_info.
13170
299404a1
JM
131712010-11-23 Joseph Myers <joseph@codesourcery.com>
13172
13173 * c-opts.c (c_common_handle_option): Pass location to
13174 set_struct_debug_option.
13175
c98cd5bf
JM
131762010-11-23 Joseph Myers <joseph@codesourcery.com>
13177
13178 * c-common.c (visibility_options): Move from ../opts.c.
13179 * c-common.h (struct visibility_flags, visibility_options):
13180 Declare here.
13181 * c-opts.c (finish_options): Rename to c_finish_options.
13182 (c_common_init): Update call to finish_options.
13183
a9546771
NP
131842010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13185
13186 PR objc/34033
13187 * c-lex.c (lex_string): Check that each string in an Objective-C
13188 string concat sequence starts with either one or zero '@', and
13189 that there are no spurious '@' signs at the end.
13190
24a57808
JM
131912010-11-20 Joseph Myers <joseph@codesourcery.com>
13192
13193 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13194 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13195 HANDLE_PRAGMA_VISIBILITY.
13196 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13197 HANDLE_PRAGMA_VISIBILITY): Don't define.
13198 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13199
a9aa2c3a
NF
132002010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13201
13202 PR c++/16189
13203 PR c++/36888
13204 PR c++/45331
13205 * c-common.h (keyword_begins_type_specifier): Declare.
13206 (keyword_is_storage_class_specifier): Declare.
13207 (keyword_is_type_qualifier): Declare.
13208 * c-common.c (keyword_begins_type_specifier): New function.
13209 (keyword_is_storage_class_specifier): New function.
13210 (keyword_is_type_qualifier): Declare.
13211
5386338c
JM
132122010-11-19 Joseph Myers <joseph@codesourcery.com>
13213
13214 PR c/46547
13215 * c-common.c (in_late_binary_op): Define.
13216 (c_common_truthvalue_conversion): Check in_late_binary_op before
13217 calling c_save_expr.
13218 * c-common.h (in_late_binary_op): Declare.
13219
69ccdddb
JM
132202010-11-19 Joseph Myers <joseph@codesourcery.com>
13221
13222 * c-opts.c (c_common_handle_option): Update calls to
13223 set_struct_debug_option.
13224
6b192a09
NP
132252010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13226
13227 * c-common.h (objc_declare_protocols): Added additional argument.
13228 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13229
fb52b50a
NF
132302010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13231
13232 PR c/33193
13233 * c-common.h (build_real_imag_expr): Declare.
13234 * c-semantics.c (build_real_imag_expr): Define.
13235
b37421c6
JM
132362010-11-17 Joseph Myers <joseph@codesourcery.com>
13237
13238 * c-opts.c (c_common_parse_file): Take no arguments.
13239 * c-common.h (c_common_parse_file): Update prototype.
13240
07078664
JJ
132412010-11-16 Jakub Jelinek <jakub@redhat.com>
13242
13243 PR c++/46401
13244 * c-common.c (warning_candidate_p): Don't track non-const calls
13245 or STRING_CSTs.
13246
c6a13190
ILT
132472010-11-15 Ian Lance Taylor <iant@google.com>
13248
13249 * c-lex.c (init_c_lex): Set macro debug callbacks if
13250 flag_dump_go_spec is set.
13251
925e8657
NP
132522010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13253
13254 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13255 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13256
bb0a9581
NF
132572010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13258
13259 PR preprocessor/45038
13260 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13261 dialects.
13262
c5fa0890
JM
132632010-11-12 Joseph Myers <joseph@codesourcery.com>
13264
13265 * c-common.h (c_family_lang_mask): Declare.
13266 * c-opts.c (c_family_lang_mask): Make extern.
13267 * c-pragma.c (handle_pragma_diagnostic): Use
13268 control_warning_option.
13269
a4d8c676
JM
132702010-11-12 Joseph Myers <joseph@codesourcery.com>
13271
13272 * c-common.c (parse_optimize_options): Update call to
13273 decode_options.
13274 * c-common.h (c_common_handle_option): Update prototype.
13275 * c-opts.c (c_common_handle_option): Take location_t parameter and
13276 pass it to other functions.
13277
f954bd2c
JM
132782010-11-11 Joseph Myers <joseph@codesourcery.com>
13279
13280 * c-opts.c (warning_as_error_callback): Remove.
13281 (c_common_initialize_diagnostics): Don't call
13282 register_warning_as_error_callback.
13283 (c_common_handle_option): Handle -Werror=normalized= here.
13284
d8a07487
JM
132852010-11-10 Joseph Myers <joseph@codesourcery.com>
13286
13287 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13288 in diagnostic.
13289 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13290 letter.
13291 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13292 Remove trailing '.' from diagnostics.
13293 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13294
d5478783
JM
132952010-11-10 Joseph Myers <joseph@codesourcery.com>
13296
13297 * c-common.c (parse_optimize_options): Pass global_dc to
13298 decode_options.
13299 * c-opts.c (c_common_handle_option): Pass &global_options to
13300 set_Wstrict_aliasing.
13301 * c.opt (v): Don't mark Common or document here.
13302
91ebb981
IS
133032010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13304
13305 PR target/44981
13306 * c-format.c (format_type): New type gcc_objc_string_format_type.
13307 (valid_stringptr_type_p): New.
13308 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13309 (check_format_string): Pass expected type, use
91ebb981
IS
13310 valid_stringptr_type_p (), check that the format string types are
13311 consistent with the format specification.
13312 (decode_format_attr): Warn if NSString is used outside objective-c.
13313 (format_types_orig): Add NSString.
13314 (format_name): New.
13315 (format_flags): New.
13316 (check_format_arg): Handle format strings requiring an external parser.
13317 first_target_format_type: New variable.
13318 (handle_format_attribute): Set up first_target_format_type, pass the
13319 expected format arg string type to check_format_string().
ab20d992 13320 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13321 * stub-objc.c (objc_string_ref_type_p): New.
13322 (objc_check_format_arg): New.
13323
bede2adc
NP
133242010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13325
9faeb493 13326 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13327 * c-common.h (objc_build_class_component_ref): New.
13328 * stub-objc.c (objc_build_class_component_ref): New.
13329
9a179d01
NP
133302010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13331
13332 * c.opt (Wproperty-assign-default): New option.
13333
22d8d616
NP
133342010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13335
13336 Implemented -fobjc-std=objc1 flag.
13337 * c.opt (fobjc-std=objc1): New option.
13338
2debdb4f
NP
133392010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13340
13341 Implemented format and noreturn attributes for Objective-C methods.
13342 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13343 attribute for Objective-C methods.
13344
ec52b111
JM
133452010-10-31 Jason Merrill <jason@redhat.com>
13346
13347 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13348 EXPR_LOC_OR_HERE.
13349
46a88c12
NP
133502010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13351
13352 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13353 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13354 (objc_add_property_declaration): Removed arguments for copies and
13355 ivar.
13356 (objc_build_getter_call): Renamed to
13357 objc_maybe_build_component_ref.
13358 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13359 (objc_is_property_ref): New.
13360 * c-common.c (c_common_reswords): Removed copies and ivar.
13361 * stub-objc.c (objc_add_property_declaration): Removed arguments
13362 for copies and ivar.
13363 (objc_build_getter_call): Renamed to
13364 objc_maybe_build_component_ref.
13365 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13366 (objc_is_property_ref): New.
9faeb493 13367
1e4bf85b
AC
133682010-10-29 Arnaud Charlet <charlet@adacore.com>
13369 Matthew Gingell <gingell@adacore.com>
13370
13371 * c-ada-spec.c (separate_class_package): New function.
13372 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13373 name of their enclosing package.
13374 (print_ada_declaration): Use separate_class_package.
13375
81f0bab2
JM
133762010-10-27 Jason Merrill <jason@redhat.com>
13377
2b08f2c5
JM
13378 * c-common.c (c_common_reswords): Add __is_literal_type.
13379 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13380
81f0bab2
JM
13381 * c-common.c (check_case_value): Remove special C++ code.
13382
200290f2
NP
133832010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13384
13385 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13386 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13387 and RID_LAST_PATTR.
13388 (objc_add_property_declaration): Added additional arguments.
13389 (objc_property_attribute_kind): Removed.
13390 (objc_set_property_attr): Removed.
13391 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13392 copy and nonatomic.
13393 * stub-objc.c (objc_add_property_declaration): Added additional
13394 arguments.
13395 (objc_set_property_attr): Removed.
9faeb493 13396
f614132b
NP
133972010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13398
13399 * c-common.h (objc_add_property_variable): Renamed to
13400 objc_add_property_declaration. Added location argument.
13401 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13402
b8a18805
NP
134032010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13404
13405 * c-common.h (objc_maybe_printable_name): New.
13406 * stub-objc.c (objc_maybe_printable_name): New.
13407
3f8257db
JJ
134082010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13409 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13410
13411 * c-common.h (c_common_mark_addressable_vec): Declare.
13412 * c-common.c (c_common_mark_addressable_vec): New function.
13413
249a82c4
NP
134142010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13415
13416 * c-common.h (objc_set_method_type): Removed.
13417 (objc_add_method_declaration): Added boolean argument.
13418 (objc_start_method_definition): Same change.
13419 (objc_build_method_signature): Same change.
13420 * stub-objc.c (objc_set_method_type): Removed.
13421 (objc_add_method_declaration): Added boolean argument.
13422 (objc_start_method_definition): Same change.
13423 (objc_build_method_signature): Same change.
13424
977e30bc
NP
134252010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13426
13427 * c-common.h (finish_file): Removed.
13428 (objc_write_global_declarations): New.
13429 * c-opts.c (c_common_parse_file): Do not call finish_file.
13430 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13431
da57d1b9
NP
134322010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13433
13434 Implemented parsing @synthesize and @dynamic for
13435 Objective-C/Objective-C++.
13436 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13437 (objc_add_synthesize_declaration): New.
13438 (objc_add_dynamic_declaration): New.
13439 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13440 * stub-objc.c (objc_add_synthesize_declaration): New.
13441 (objc_add_dynamic_declaration): New.
9faeb493 13442
0069111f
MM
134432010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13444
13445 PR target/46041
13446 * c-cppbuiltin.c (mode_has_fma): Move function here from
13447 builtins.c. Don't use the fma optab, instead just use the
13448 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13449 using -save-temps.
13450
e426b47b
NP
134512010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13452
13453 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13454
3f8257db 13455 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13456
9faeb493 13457 Radar 4330422
e426b47b
NP
13458 * c-common.h (objc_non_volatilized_type): New declaration
13459 * stub-objc.c (objc_non_volatilized_type): New stub.
13460
90fbfdc3
NP
134612010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13462
e426b47b 13463 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13464
ab20d992 13465 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13466
9faeb493 13467 Radar 4133425
90fbfdc3 13468 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13469 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13470
c37d8c30
IS
134712010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13472
13473 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13474 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13475 (objc_ivar_visibility_kind): New enum.
13476 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13477 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13478 visibility enum.
13479
1b1562a5
MM
134802010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13481
13482 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13483 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13484 has the appropriate fma builtins.
13485 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13486
668ea4b1
IS
134872010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13488
1b1562a5 13489 merge from FSF apple 'trunk' branch.
3f8257db 13490 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13491
668ea4b1
IS
13492 Radars 4436866, 4505126, 4506903, 4517826
13493 * c-common.c (c_common_resword): Define @property and its attributes.
13494 * c-common.h: Define property attribute enum entries.
13495 (OBJC_IS_PATTR_KEYWORD): New.
13496 (objc_property_attribute_kind): New enum.
13497 Declare objc_set_property_attr (), objc_add_property_variable (),
13498 objc_build_getter_call () and objc_build_setter_call ().
13499 * stub-objc.c (objc_set_property_attr): New stub.
13500 (objc_add_property_variable): Likewise.
13501 (objc_build_getter_call): Likewise.
13502 (objc_build_setter_call) Likewise.
1b1562a5 13503
a1178b30
IS
135042010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13505
1b1562a5 13506 merge from FSF apple 'trunk' branch.
ab20d992 13507 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13508
13509 Radar 3803157 (method attributes)
13510 * c-common.c (handle_deprecated_attribute): Recognize
13511 objc methods as valid declarations.
13512 * c-common.h: Declare objc_method_decl ().
1b1562a5 13513 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13514
a75bfaa6
JM
135152010-10-08 Joseph Myers <joseph@codesourcery.com>
13516
13517 * c-common.c (parse_optimize_options): Call
13518 decode_cmdline_options_to_array_default_mask before
13519 decode_options. Update arguments to decode_options.
13520 * c-common.h (c_common_init_options_struct): Declare.
13521 * c-opts.c (c_common_init_options_struct): New. Split out from
13522 c_common_init_options.
13523
f05b9d93
NP
135242010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13525
13526 Implemented fast enumeration for Objective-C.
13527 * c-common.h (objc_finish_foreach_loop): New.
13528 * stub-objc.c (objc_finish_foreach_loop): New.
13529
1ebe4b4f
JM
135302010-10-05 Joseph Myers <joseph@codesourcery.com>
13531
13532 * c-common.h (struct diagnostic_context): Don't declare here.
13533 (c_common_initialize_diagnostics): Declare using
13534 diagnostic_context typedef.
13535 * c-opts.c (c_common_handle_option): Pass global_dc to
13536 handle_generated_option.
13537
d4d24ba4
JM
135382010-10-04 Joseph Myers <joseph@codesourcery.com>
13539
13540 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13541 handle_generated_option.
13542
478a1c5b
ILT
135432010-10-03 Ian Lance Taylor <iant@google.com>
13544
13545 * c.opt (-fplan9-extensions): New option.
13546
82a1c2fe
FXC
135472010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13548
13549 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13550 Remove.
13551 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13552 of duplicating code.
13553
92902b1b
IS
135542010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13555
13556 * c-common.c: Add two new entries for @optional
13557 and @required keywords.
13558
13559 merge from FSF 'apple/trunk' branch.
3f8257db 13560 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13561
13562 Radar 4386773
13563 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13564 objective-c keywords.
13565 (objc_set_method_opt): New declaration.
13566 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13567
46625112
JM
135682010-09-30 Joseph Myers <joseph@codesourcery.com>
13569
13570 * c-common.c (handle_optimize_attribute): Pass &global_options to
13571 cl_optimization_save and cl_optimization_restore.
13572 * c-opts.c (c_common_handle_option): Pass &global_options to
13573 handle_generated_option.
13574 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13575 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13576 &global_options to cl_optimization_restore.
13577
49b91f05
NP
135782010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13579
13580 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13581 Objective-C/Objective-C++ keywords.
13582
13ed556f 135832010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13584
9faeb493
UB
13585 Merge from 'apple/trunk' branch on FSF servers.
13586
3f8257db 13587 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13588
13589 Radar 4281748
13590 * c-common.h (objc_check_global_decl): New declaration.
13591 * stub-objc.c (objc_check_global_decl): New stub.
13592
f0036cca
JM
135932010-09-29 Joseph Myers <joseph@codesourcery.com>
13594
13595 * c.opt: Don't use VarExists.
13596
e3339d0f
JM
135972010-09-29 Joseph Myers <joseph@codesourcery.com>
13598
13599 * c-common.c (c_cpp_error): Update names of diagnostic_context
13600 members.
13601 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13602 cl_optimization members.
13603 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13604 sanitize_cpp_opts, finish_options): Update names of cpp_options
13605 members.
13606
1973201f
NP
136072010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13608
13609 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13610 (objc_is_reserved_word): Removed.
13611 * c-common.c: Updated comments.
13612 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13613 objc_is_reserved_word.
13614 * stub-objc.c (objc_is_reserved_word): Removed.
13615
f7e71da5
IS
136162010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13617
9faeb493 13618 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13619 include attributes.
13620 (objc_start_method_definition): Likewise.
13621 (objc_build_keyword_decl): Likewise.
13622 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13623 (objc_start_method_definition): Likewise.
13624 (objc_build_keyword_decl): Likewise.
13625
c165dca7
IS
136262010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13627
13628 * c-common.h (objc_start_class_interface): Adjust prototype.
13629 (objc_start_category_interface): Likewise.
13630 (objc_start_protocol): Likewise.
13631 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13632 (objc_start_class_interface): Likewise.
13633 (objc_start_category_interface): Likewise.
13634
7458026b
ILT
136352010-09-27 Ian Lance Taylor <iant@google.com>
13636
13637 * c-common.c (c_common_attribute_table): Add no_split_stack.
13638 (handle_no_split_stack_attribute): New static function.
13639
b581b85b
NP
136402010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13641
9faeb493 13642 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13643
3f8257db 13644 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13645
9faeb493 13646 Radar 4229905
b581b85b
NP
13647 * c-common.h (objc_have_common_type): New declaration.
13648 * stub-objc.c (objc_have_common_type): New stub.
13649
13650 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13651
13652 Radar 4154928
13653 * c-common.h (objc_common_type): New prototype.
9faeb493 13654 * stub-objc.c (objc_common_type): New stub.
b581b85b 13655
46a4da10
JH
136562010-09-24 Jan Hubicka <jh@suse.cz>
13657
13658 * c-common.c (handle_leaf_attribute): New function.
13659 (struct attribute_spec c_common_att): Add leaf.
13660
e200444e
JM
136612010-09-22 Joseph Myers <joseph@codesourcery.com>
13662
13663 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13664 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13665 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13666 -include-barrier, -include-directory, -include-directory=,
13667 -include-directory-after, -include-directory-after=,
13668 -include-prefix, -include-prefix=, -include-with-prefix,
13669 -include-with-prefix=, -include-with-prefix-after,
13670 -include-with-prefix-after=, -include-with-prefix-before,
13671 -include-with-prefix-before=, -no-integrated-cpp,
13672 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13673 -output=, -pedantic, -pedantic-errors, -preprocess,
13674 -print-missing-file-dependencies, -trace-includes, -traditional,
13675 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13676 -user-dependencies, -verbose, -write-dependencies,
13677 -write-user-dependencies, no-integrated-cpp, traditional): New.
13678
29a80ea6
NP
136792010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13680
13681 PR objc/23710
ac1fc2fc
NP
13682 * c-common.h (objc_start_method_definition): Return bool instead
13683 of void.
13684 * stub-objc.c (objc_start_method_definition): Return bool instead
13685 of void.
13686
136872010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13688
13689 PR objc/25965
13690 * c-common.h (objc_get_interface_ivars): New declaration.
13691 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13692
de621752
ILT
136932010-09-15 Ian Lance Taylor <iant@google.com>
13694
13695 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13696 messages. Remove period at end of warning message.
de621752 13697
ba885ec5
NS
136982010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13699
13700 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13701 (handle_alias_attribute): ... here.
13702 (handle_ifunc_attribute): New.
13703
c5ee1358
MM
137042010-09-06 Mark Mitchell <mark@codesourcery.com>
13705
13706 * c-common.h (do_warn_double_promotion): Declare.
13707 * c-common.c (do_warn_double_promotion): Define.
13708
0a0b3574
MM
137092010-09-05 Mark Mitchell <mark@codesourcery.com>
13710
13711 * c.opt (Wdouble-promotion): New.
13712
d1779886
JM
137132010-09-02 Joseph Myers <joseph@codesourcery.com>
13714
13715 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13716 fvtable-thunks, fxref): Mark no longer supported in help text.
13717
2d2bd949
JM
137182010-09-02 Joseph Myers <joseph@codesourcery.com>
13719
13720 * c.opt (Wimport, fall-virtual, falt-external-templates,
13721 fdefault-inline, fenum-int-equiv, fexternal-templates,
13722 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13723 fname-mangling-version-, fnew-abi, fnonnull-objects,
13724 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13725 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13726 applicable.
13727 (fhandle-exceptions): Mark with Alias and Warn.
13728 * c-opts.c (c_common_handle_option): Don't handle options marked
13729 as ignored.
13730
5de8299c
JM
137312010-09-02 Joseph Myers <joseph@codesourcery.com>
13732
13733 * c.opt (Wcomments, Werror-implicit-function-declaration,
13734 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13735 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13736 aliases.
13737 * c-common.c (option_codes): Use OPT_Wcomment instead of
13738 OPT_Wcomments.
13739 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13740 Don't handle options marked as aliases.
13741
0ceb0201
RG
137422010-08-25 Richard Guenther <rguenther@suse.de>
13743
13744 * c-common.c (c_common_get_alias_set): Remove special
13745 handling for pointers.
13746
ac47786e
NF
137472010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13748
13749 * c-common.c: Use FOR_EACH_VEC_ELT.
13750 * c-gimplify.c: Likewise.
13751 * c-pragma.c: Likewise.
13752
c878765b
JM
137532010-08-16 Joseph Myers <joseph@codesourcery.com>
13754
13755 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13756 RejectDriver.
13757 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13758 RejectDriver.
13759 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13760 instead of OPT_MDX and OPT_MMDX.
13761
603349bf
JM
137622010-08-16 Joseph Myers <joseph@codesourcery.com>
13763
13764 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13765
644fa7ac
JM
137662010-08-12 Joseph Myers <joseph@codesourcery.com>
13767
13768 * c.opt (MD, MMD): Change to MDX and MMDX.
13769 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13770
481e1176
JM
137712010-08-11 Joseph Myers <joseph@codesourcery.com>
13772
13773 * c-opts.c (c_common_handle_option): Call handle_generated_option
13774 instead of handle_option.
13775
ac8dc9f7
NF
137762010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13777
13778 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13779 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13780
4f8c876d
NF
137812010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13782
13783 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13784 (pending_redefine_extname): Change type to a VEC.
13785 (add_to_renaming_pragma_list): Update for new type of
13786 pending_redefine_extname.
ac8dc9f7 13787 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13788
3b0c690e
AC
137892010-08-04 Arnaud Charlet <charlet@adacore.com>
13790
13791 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13792 visited.
13793 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13794 decide whether a type has already been declared/seen.
13795 Do not go to the original type.
13796 (dump_nested_types): New parameter forward.
13797 Generate forward declaration if needed and mark type as visited.
13798 (print_ada_declaration): Call dump_nested_types if not already done.
13799 Mark types as visited.
13800
1890bccc
JM
138012010-08-03 Joseph Myers <joseph@codesourcery.com>
13802
13803 * c.opt (-print-pch-checksum): Remove option.
13804 * c-opts.c (c_common_handle_option): Don't handle
13805 OPT_print_pch_checksum.
13806
5f20c657
JM
138072010-07-27 Joseph Myers <joseph@codesourcery.com>
13808
13809 * c-common.h (c_common_handle_option): Update prototype and return
13810 value type.
13811 * c-opts.c (c_common_handle_option): Update prototype and return
13812 value type. Update calls to handle_option and
13813 enable_warning_as_error.
13814
f551f80c
JJ
138152010-07-27 Jakub Jelinek <jakub@redhat.com>
13816
13817 PR c/45079
13818 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13819
61ff2bdc
JM
138202010-07-27 Joseph Myers <joseph@codesourcery.com>
13821
13822 * c-common.h (c_common_missing_argument): Remove.
13823 * c-opts.c (c_common_missing_argument): Remove.
13824 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13825 idirafter, imacros, include, isysroot, isystem, iquote): Add
13826 MissingArgError.
13827 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13828
7a9bf9a4
JM
138292010-07-27 Joseph Myers <joseph@codesourcery.com>
13830
13831 * c-common.h (c_common_option_lang_mask,
13832 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13833 New.
13834 (c_common_init_options): Update prototype.
13835 * c-opts.c (c_common_option_lang_mask): New.
13836 (c_common_initialize_diagnostics): Split out of
13837 c_common_init_options.
13838 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13839 New.
13840 (c_common_init_options): Update prototype. Use decoded options in
13841 search for -lang-asm.
13842
910ad8de
NF
138432010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13844
13845 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13846 * c-format.c: Likewise.
13847
718f9c0f
MLI
138482010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13849
13850 * c-common.h: Include diagnostic-core.h. Error if already
13851 included.
13852 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13853
4d451982
MLI
138542010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13855
adfac8df 13856 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13857 Do not include expr.h
13858 (vector_mode_valid_p): Move here.
13859
119fe915
SB
138602010-06-21 DJ Delorie <dj@redhat.com>
13861
13862 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13863 allow these pragmas anywhere.
13864
138652010-06-14 Jakub Jelinek <jakub@redhat.com>
13866
13867 PR bootstrap/44509
13868 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13869 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13870 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13871 ggc_strdup instead of xstrdup.
13872
138732010-06-10 Jakub Jelinek <jakub@redhat.com>
13874
13875 * c-cppbuiltin.c: Include cpp-id-data.h.
13876 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13877 (lazy_hex_fp_value): New function.
13878 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13879
6662d794
MLI
138802010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13881
13882 * c-gimplify.c: Do not include tree-flow.h
13883
38f8b050
JR
138842010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13885
13886 PR other/44034
13887 * c-common.c: Rename targetm member:
13888 targetm.enum_va_list -> targetm.enum_va_list_p
13889
9589f23e
AS
138902010-06-28 Anatoly Sokolov <aesok@post.ru>
13891
13892 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13893
3b06d379
SB
138942010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13895
13896 * c-cppbuiltin.c: Do not include except.h.
13897
d166d4c3
AK
138982010-06-24 Andi Kleen <ak@linux.intel.com>
13899
9faeb493
UB
13900 * c-common.c (warn_for_omitted_condop): New.
13901 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13902
70cb8be6
JM
139032010-06-21 Joseph Myers <joseph@codesourcery.com>
13904
13905 * c.opt (lang-objc): Remove.
13906 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13907
a4c97feb
JR
139082010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13909
13910 * c-opts.c: Include "tm_p.h".
13911
6e2f1956
JM
139122010-06-20 Joseph Myers <joseph@codesourcery.com>
13913
13914 * c-common.c (parse_optimize_options): Update call to
13915 decode_options.
13916
bc87224e
NF
139172010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13918
13919 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13920 new type of types_used_by_cur_var_decl.
13921
b49cf425
JR
139222010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13923
13924 PR bootstrap/44512
13925 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13926 for C++ standard compliance.
13927
59f9c2ed
JM
139282010-06-16 Jason Merrill <jason@redhat.com>
13929
13930 * c.opt: Add -Wnoexcept.
13931
33766b66
RG
139322010-06-16 Richard Guenther <rguenther@suse.de>
13933
13934 PR c/44555
13935 * c-common.c (c_common_truthvalue_conversion): Remove
13936 premature and wrong optimization concering ADDR_EXPRs.
13937
eff7e30c
AC
139382010-06-15 Arnaud Charlet <charlet@adacore.com>
13939
13940 * c-ada-spec.c (dump_sloc): Remove column info.
13941 (is_simple_enum): New function.
13942 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13943 enum types when relevant.
13944
6312e84d
MLI
139452010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13946
9faeb493 13947 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13948 location.
13949
1cb42611
JM
139502010-06-10 Joseph Myers <joseph@codesourcery.com>
13951
13952 * c-opts.c (c_common_handle_option): Don't handle
13953 OPT_fshow_column.
13954
a9429e29
LB
139552010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13956
13957 * c-pragma.c (push_alignment): Use typed GC allocation.
13958 (handle_pragma_push_options): Likewise.
13959
13960 * c-common.c (parse_optimize_options): Likewise.
13961
13962 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13963 option.
13964
5498f011
JM
139652010-06-07 Joseph Myers <joseph@codesourcery.com>
13966
13967 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13968 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13969 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13970 flag_signed_bitfields, warn_strict_null_sentinel,
13971 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13972 flag_gen_declaration, flag_no_gnu_keywords,
13973 flag_implement_inlines, flag_implicit_templates,
13974 flag_implicit_inline_templates, flag_optional_diags,
13975 flag_elide_constructors, flag_default_inline, flag_rtti,
13976 flag_conserve_space, flag_access_control, flag_check_new,
13977 flag_new_for_scope, flag_weak, flag_working_directory,
13978 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13979 flag_enforce_eh_specs, flag_threadsafe_statics,
13980 flag_pretty_templates): Remove.
13981 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13982 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13983 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13984 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13985 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13986 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13987 flag_no_gnu_keywords, flag_implement_inlines,
13988 flag_implicit_templates, flag_implicit_inline_templates,
13989 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13990 flag_rtti, flag_conserve_space, flag_access_control,
13991 flag_check_new, flag_new_for_scope, flag_weak,
13992 flag_working_directory, flag_use_cxa_atexit,
13993 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13994 flag_threadsafe_statics, flag_pretty_templates,
13995 warn_strict_null_sentinel): Remove.
13996 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13997 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13998 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13999 fimplicit-inline-templates, fimplicit-templates,
14000 flax-vector-conversions, fms-extensions, fnil-receivers,
14001 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14002 frtti, fshort-double, fshort-enums, fshort-wchar,
14003 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14004 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14005 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14006 gen-decls, undef): Use Var.
14007 (fdefault-inline, foptional-diags): Document as doing nothing.
14008 * c-opts.c (c_common_handle_option): Remove cases for options now
14009 using Var. Mark ignored options as such.
14010
39dabefd
SB
140112010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14012
9faeb493 14013 * c-common.c: Moved to here from parent directory.
39dabefd
SB
14014 * c-common.def: Likewise.
14015 * c-common.h: Likewise.
14016 * c-cppbuiltin.c: Likewise.
14017 * c-dump.c: Likewise.
14018 * c-format.c: Likewise.
14019 * c-format.h : Likewise.
14020 * c-gimplify.c: Likewise.
14021 * c-lex.c: Likewise.
14022 * c-omp.c: Likewise.
14023 * c.opt: Likewise.
14024 * c-opts.c: Likewise.
14025 * c-pch.c: Likewise.
14026 * c-ppoutput.c: Likewise.
14027 * c-pragma.c: Likewise.
14028 * c-pragma.h: Likewise.
14029 * c-pretty-print.c: Likewise.
14030 * c-pretty-print.h: Likewise.
14031 * c-semantics.c: Likewise.
14032 * stub-objc.c: Likewise.
14033
14034 * c-common.c: Include gt-c-family-c-common.h.
14035 * c-pragma.c: Include gt-c-family-c-pragma.h.
14036\f
68127a8e 14037Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
14038
14039Copying and distribution of this file, with or without modification,
14040are permitted in any medium without royalty provided the copyright
14041notice and this notice are preserved.