]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
c: Handle printf %B like %b for C2x
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
3427b51b
GA
12023-05-15 Joseph Myers <joseph@codesourcery.com>
2
3 * c-lex.cc (c_common_has_attribute): Use 202311 as
4 __has_c_attribute return for all C2x attributes.
5
62023-05-15 Patrick Palka <ppalka@redhat.com>
7
8 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
9 for C++23.
10
1fc8da95
GA
112023-05-01 Marek Polacek <polacek@redhat.com>
12
13 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
14
579cdc1e
GA
152023-03-28 David Malcolm <dmalcolm@redhat.com>
16
17 PR c/107002
18 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
19 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
20 Reject cases where involving macro expansions.
21
222023-03-28 Jason Merrill <jason@redhat.com>
23
24 PR c++/107163
25 * c-common.cc (verify_tree): Don't use sequenced handling
26 for COMPONENT_REF.
27
454a4d50
GA
282023-03-17 Jakub Jelinek <jakub@redhat.com>
29
30 PR c/109151
31 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
32 types rather than just INTEGER_TYPE.
33
c8065441
GA
342023-03-10 Marek Polacek <polacek@redhat.com>
35
36 PR sanitizer/108060
37 PR sanitizer/109050
38 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
39 the RHS before the LHS.
40
2858bf16
GA
412023-03-04 Jakub Jelinek <jakub@redhat.com>
42
43 PR c/107465
44 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
45 above innermost zero extension of BIT_NOT_EXPR result.
46
472023-03-04 Jakub Jelinek <jakub@redhat.com>
48
49 PR c/107465
50 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
51 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
52 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
53 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
54 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
55 from narrower unsigned, fix up computation of mask for the constant
56 cases and for unsigned other operand case handle differently
57 BIT_NOT_EXPR result being sign vs. zero extended.
58
592023-03-04 Jakub Jelinek <jakub@redhat.com>
60
61 PR c/107846
62 * c-warn.cc: Include langhooks.h.
63 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
64 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
65 is narrower than type0 and unsigned, use wi::min_precision with
66 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
67
2aa6673e
GA
682023-03-03 Alexandre Oliva <oliva@adacore.com>
69
70 * c-common.cc (c_common_nodes_and_builtins): Take
71 wchar_type_node for wint_type_node when aliased.
72 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
73 wchar_t, to the underlying type rather than wchar_t in
74 non-C++.
75 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
76
6f9e2f14
GA
772023-02-28 Marek Polacek <polacek@redhat.com>
78
79 PR c++/107938
80 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
81 POINTER_TYPE_P.
82
832023-02-28 Jakub Jelinek <jakub@redhat.com>
84
85 PR sanitizer/108894
86 * c-common.h (c_strict_flex_array_level_of): Declare.
87 * c-common.cc (c_strict_flex_array_level_of): New function,
88 moved and renamed from c-decl.cc's strict_flex_array_level_of.
89 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
90 C check c_strict_flex_array_level_of whether a trailing array
91 should be treated as flexible member like. Handle C [0] arrays.
92 Add 1 + index_off_by_one rather than index_off_by_one to bounds
93 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
94 bounds comparison.
95
e2b20ed3
GA
962023-02-23 Jakub Jelinek <jakub@redhat.com>
97
98 PR translation/108890
99 * c.opt (fcontracts): Fix description.
100
b6f98991
GA
1012023-02-22 Marek Polacek <polacek@redhat.com>
102
103 PR c/108880
104 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
105 pset to walk_tree_1.
106 (c_genericize): Call walk_tree with an explicit pset.
107
0263e9d5
GA
1082023-02-18 Martin Uecker <uecker@tugraz.at>
109
110 PR c/105660
111 * c-attribs.cc (append_access_attr): Use order of arguments when
112 construction string.
113 (append_access_attr_idxs): Rename and make static.
114 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
115
88cc4495
GA
1162023-02-16 Patrick Palka <ppalka@redhat.com>
117
118 * c-common.h: Mechanically drop static from static inline
119 functions via s/^static inline/inline/g.
120
0a251e74
GA
1212023-02-01 Jason Merrill <jason@redhat.com>
122
123 * c.opt: Add -Wno-changes-meaning.
124
317525b0
GA
1252023-01-31 Marek Polacek <polacek@redhat.com>
126
127 PR c++/107593
128 PR c++/108597
129 * c-common.h (instantiation_dependent_expression_p): Declare.
130 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
131 is dependent, invalidate the chain.
132
2371d100
GA
1332023-01-26 Marek Polacek <polacek@redhat.com>
134
135 PR c++/105300
136 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
137
9f98cfa5
GA
1382023-01-18 Marek Polacek <polacek@redhat.com>
139
140 PR c/108424
141 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
142
5013c3bb
GA
1432023-01-14 Jakub Jelinek <jakub@redhat.com>
144
145 PR c++/108365
146 * c-common.h (may_shorten_divmod): New static inline function.
147
1482023-01-13 Eric Botcazou <ebotcazou@adacore.com>
149
150 * c-ada-spec.cc (is_float32): New function.
151 (is_float64): Likewise.
152 (is_float128): Tweak.
153 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
154
81ed98bc
GA
1552023-01-12 Lewis Hyatt <lhyatt@gmail.com>
156
157 PR preprocessor/108244
158 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
159 deferred pragmas if -fdirectives-only.
160 (init_pragma): Likewise.
161
84723aca
GA
1622023-01-09 Martin Liska <mliska@suse.cz>
163
164 PR c/107993
165 * c-attribs.cc (handle_target_clones_attribute): Check for
166 string constant for all target_clone attribute values.
167
0f8fbb57
GA
1682023-01-03 Florian Weimer <fweimer@redhat.com>
169
170 * c-cppbuiltin.cc (c_cpp_builtins): Define
171 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
172
1732023-01-03 Florian Weimer <fweimer@redhat.com>
174
175 Revert:
176 2023-01-03 Florian Weimer <fweimer@redhat.com>
177
178 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
179 Define if constant is known.
180
1812023-01-03 Florian Weimer <fweimer@redhat.com>
182
183 Revert:
184 2023-01-02 Florian Weimer <fweimer@redhat.com>
185
186 * c-cppbuiltin.cc (c_cpp_builtins): Define
187 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
188
fee53a31
GA
1892023-01-02 Florian Weimer <fweimer@redhat.com>
190
191 * c-cppbuiltin.cc (c_cpp_builtins): Define
192 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
193
1942023-01-02 Florian Weimer <fweimer@redhat.com>
195
196 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
197 Define if constant is known.
198
d2ef2327
GA
1992022-12-19 Marek Polacek <polacek@redhat.com>
200
201 PR c/98487
202 * c-format.cc (check_function_format): Use get_attribute_name.
203
5fb1e674
GA
2042022-12-16 Qing Zhao <qing.zhao@oracle.com>
205
206 * c.opt (Wstrict-flex-arrays): New option.
207
596dbfff
GA
2082022-12-02 Andrew MacLeod <amacleod@redhat.com>
209
210 * c-attribs.cc (handle_deprecated_attribute): Use type when
211 using TYPE_NAME.
212
b35680ec
GA
2132022-12-02 Jakub Jelinek <jakub@redhat.com>
214
215 PR c++/84469
216 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
217 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
218 to any of the structured binding decls.
219
6eea85a9
GA
2202022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
221 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
222
223 PR driver/107787
224 * c-common.cc (fold_offsetof,
225 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
226 instead of OPT_Warray_bounds.
227
9a1b4f1d
GA
2282022-11-24 Jakub Jelinek <jakub@redhat.com>
229
230 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
231 with a dot.
232
8761284f
GA
2332022-11-23 Andrew Pinski <apinski@marvell.com>
234 Jakub Jelinek <jakub@redhat.com>
235
236 PR c/107127
237 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
238 instead of walk_tree for c_genericize_control_r.
239
2402022-11-23 Jakub Jelinek <jakub@redhat.com>
241
242 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
243 fcontract-role=, fcontract-semantic=): Add RejectNegative.
244 (fcontract-build-level=): Terminate description with dot.
245
fb98ede8
GA
2462022-11-19 Jakub Jelinek <jakub@redhat.com>
247
248 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
249 value from 202207L to 202211L.
250
2512022-11-19 Jeff Chapman II <jchapman@lock3software.com>
252 Andrew Sutton <asutton@lock3software.com>
253 Andrew Marmaduke <amarmaduke@lock3software.com>
254 Michael Lopez <mlopez@lock3software.com>
255 Jason Merrill <jason@redhat.com>
256
257 * c.opt: Add contracts flags.
258 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
259 macros.
260
80909529
GA
2612022-11-16 Marek Polacek <polacek@redhat.com>
262
263 PR c++/106649
264 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
265 C++23.
266 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
267 depending on cxx_dialect.
268 * c.opt (Winvalid-constexpr): New option.
269
2702022-11-16 Jakub Jelinek <jakub@redhat.com>
271
272 * c-common.def (CONCEPT_DECL): New tree, moved here from
273 cp-tree.def.
274 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
275 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
276 attribute on CONCEPT_DECL.
277
cdc34229
GA
2782022-11-15 Lewis Hyatt <lhyatt@gmail.com>
279
280 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
281 than a hard-coded string.
282
83d400bd
GA
2832022-11-15 Jakub Jelinek <jakub@redhat.com>
284
285 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
286 __cpp_multidimensional_subscript macro value to 202211L.
287
2882022-11-15 Patrick Palka <ppalka@redhat.com>
289
290 PR c++/107638
291 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
292 iff SUPPORTS_INIT_PRIORITY.
293
2942022-11-14 Martin Liska <mliska@suse.cz>
295
296 Revert:
297 2022-11-09 Martin Liska <mliska@suse.cz>
298
299 * c-target.def: Port to RST.
300
30d77d49
GA
3012022-11-12 Joseph Myers <joseph@codesourcery.com>
302
303 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
304
5b6ce16a
GA
3052022-11-11 Jonathan Wakely <jwakely@redhat.com>
306
307 PR c/85487
308 * c-pragma.cc (handle_pragma_ignore): New function.
309 (init_pragma): Register region and endregion pragmas.
310
1cdfd0e5
GA
3112022-11-09 Martin Liska <mliska@suse.cz>
312
313 * c-target.def: Port to RST.
314
05788e9b
GA
3152022-11-05 Lewis Hyatt <lhyatt@gmail.com>
316
317 PR preprocessor/55971
318 * c-ppoutput.cc (adjust_for_newlines): Update comment.
319
d29260ce
GA
3202022-11-03 Jason Merrill <jason@redhat.com>
321
322 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
323 -fconcepts-ts before C++20.
324
3055829a
GA
3252022-10-28 Joseph Myers <joseph@codesourcery.com>
326
327 * c-common.cc (def_fn_type): Call build_function_type for
328 zero-argument variable-argument function.
329 (c_common_nodes_and_builtins): Build default_function_type with
330 build_function_type.
331 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
332 option.
333
3342022-10-28 Joseph Myers <joseph@codesourcery.com>
335
336 PR c/61469
337 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
338 New. Moved from cp/cp-tree.h.
339 * c-warn.cc (warnings_for_convert_and_check): Do not consider
340 conversions to enum with underlying type bool to overflow.
341
486a5037
GA
3422022-10-26 Marek Polacek <polacek@redhat.com>
343
344 PR c++/106393
345 * c.opt (Wdangling-reference): New.
346
87f9c4a4
GA
3472022-10-19 Joseph Myers <joseph@codesourcery.com>
348
349 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
350 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
351 and FMT_LEN_wf64.
352 (NOARGUMENTS, NOLENGTHS): Update definitions.
353 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
354 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
355 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
356 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
357 (T_UF64, T2X_UF64): New macros.
358 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
359 and wfN length modifiers.
360 (print_char_table, scan_char_table): Add entries using wN and wfN
361 length modifiers.
362
21de009f
GA
3632022-10-18 Joseph Myers <joseph@codesourcery.com>
364
365 PR c/36113
366 * c-common.cc (c_common_type_for_size): Add fallback to
367 widest_unsigned_literal_type_node or
368 widest_integer_literal_type_node for precision that may not
369 exactly match the precision of those types.
370
baeec7cc
GA
3712022-10-14 Jakub Jelinek <jakub@redhat.com>
372
373 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
374 predefine __BFLT16_*__ macros and for C++23 also
375 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
376 macros for -fbuilding-libgcc.
377 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
378
3792022-10-14 Jakub Jelinek <jakub@redhat.com>
380
381 PR middle-end/323
382 PR c++/107097
383 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
384 the tree being specific to C/ObjC.
385 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
386 in C++ the same as in C.
387 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
388 even for C++.
389
621a911d
GA
3902022-10-13 Joseph Myers <joseph@codesourcery.com>
391
392 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
393 value 2 for *_IS_IEC_60559.
394
781f477a
GA
3952022-10-12 Lewis Hyatt <lhyatt@gmail.com>
396
397 PR preprocessor/60014
398 PR preprocessor/60723
399 * c-ppoutput.cc (class token_streamer): Remove member
400 line_marker_emitted to...
401 (token_streamer::stream): ...a local variable here. Set
402 print.prev_was_system_token on all code paths.
403
27bfe54e
GA
4042022-10-10 Nathan Sidwell <nathan@acm.org>
405
406 * c-opts.cc (c_common_post_options): Bump abi to 18.
407
4082022-10-10 Marek Polacek <polacek@redhat.com>
409
410 PR c++/106937
411 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
412 attributes here.
413 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
414 attributes here.
415 (pp_c_attributes): Remove.
416 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
417 get_attribute_name. Don't print a trailing space when printing the
418 [[]] form.
419 * c-pretty-print.h (pp_c_attributes): Remove.
420
9ff6c33e
GA
4212022-10-07 Qing Zhao <qing.zhao@oracle.com>
422
423 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
424 (c_common_attribute_table): New item for strict_flex_array.
425 * c.opt: (fstrict-flex-arrays): New option.
426 (fstrict-flex-arrays=): New option.
427
4282022-10-07 Martin Liska <mliska@suse.cz>
429
430 * name-hint.h: Use std::move.
431
4322022-10-07 Jakub Jelinek <jakub@redhat.com>
433
434 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
435 only in gnu namespace or as standard attribute, treat fallthrough
436 attributes in other namespaces like any other unknown attribute.
437
629d04d3
GA
4382022-10-06 Joseph Myers <joseph@codesourcery.com>
439
440 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
441 typeof_unqual.
442 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
443 (D_EXT11): New macro. Values of subsequent macros updated.
444
4452022-10-06 Jakub Jelinek <jakub@redhat.com>
446
447 PR c++/106654
448 * c-attribs.cc (handle_assume_attribute): New function.
449 (c_common_attribute_table): Add entry for assume attribute.
450 * c-lex.cc (c_common_has_attribute): Handle
451 __have_cpp_attribute (assume).
452
85872a69
GA
4532022-10-04 Jakub Jelinek <jakub@redhat.com>
454
455 * c-omp.cc (c_omp_directives): Uncomment begin declare target
456 entry.
457
69fd6dcc
GA
4582022-10-03 Patrick Palka <ppalka@redhat.com>
459
460 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
461 RID_IS_SAME_AS.
462
4632022-10-03 Joseph Myers <joseph@codesourcery.com>
464
465 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
466 special-case __*_EPSILON__ setting for IBM long double for C2x.
467
3a221b73
GA
4682022-09-30 Patrick Palka <ppalka@redhat.com>
469
470 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
471 C++ traits.
472 * c-common.h (enum rid): Likewise.
473
bbdcdf5c
GA
4742022-09-29 Joseph Myers <joseph@codesourcery.com>
475
476 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
477 C.
478
4792022-09-29 Patrick Palka <ppalka@redhat.com>
480
481 * c-common.cc (c_common_reswords): Add __remove_cv,
482 __remove_reference and __remove_cvref.
483 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
484 and RID_REMOVE_CVREF.
485
1f16a020
GA
4862022-09-27 Marek Polacek <polacek@redhat.com>
487
488 PR c++/101165
489 PR c++/106882
490 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
491
4922022-09-27 Marek Polacek <polacek@redhat.com>
493
494 * c-format.cc (c_keywords): Drop nothrow.
495
4962022-09-27 Jakub Jelinek <jakub@redhat.com>
497
498 PR c++/106651
499 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
500 __cpp_static_call_operator=202207L for C++23.
501
5022022-09-27 Jakub Jelinek <jakub@redhat.com>
503
504 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
505 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
506 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
507 * c-pragma.cc (omp_pragmas): Add assumes and begin.
508 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
509 (omp_pragmas_simd): Add assume.
510 * c-common.h (c_omp_directives): Declare.
511 * c-omp.cc (omp_directives): Rename to ...
512 (c_omp_directives): ... this. No longer static. Uncomment
513 assume, assumes, begin assumes and end assumes entries.
514 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
515 to PRAGMA_OMP_END.
516 (c_omp_categorize_directive): Adjust for omp_directives to
517 c_omp_directives renaming.
518
5192022-09-27 Jakub Jelinek <jakub@redhat.com>
520
521 PR c++/106652
522 PR c++/85518
523 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
524 _Float{32,64,128}x flags from D_CONLY to 0.
525 (shorten_binary_op): Punt if common_type returns error_mark_node.
526 (shorten_compare): Likewise.
527 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
528 and _Float{32,64,128}x builtin types if available. For C++
529 clear float128t_type_node.
530 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
531 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
532 * c-lex.cc (interpret_float): For q/Q suffixes prefer
533 float128t_type_node over float128_type_node. Allow
534 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
535 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
536 with pedwarn. Don't call excess_precision_type for C++.
537
220c4d8e
GA
5382022-09-26 Marek Polacek <polacek@redhat.com>
539
540 PR c++/106656
541 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
542 for C++20.
543
4afaeaab
GA
5442022-09-23 Marek Polacek <polacek@redhat.com>
545
546 PR c++/106784
547 * c-common.cc (c_common_reswords): Add __is_convertible and
548 __is_nothrow_convertible.
549 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
550 RID_IS_NOTHROW_CONVERTIBLE.
551
279c6715
GA
5522022-09-22 David Malcolm <dmalcolm@redhat.com>
553
554 PR c/106830
555 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
556 values that don't fit in uhwi.
557
d0fc05e8
GA
5582022-09-15 Richard Biener <rguenther@suse.de>
559
560 * c-common.h (build_void_list_node): Remove.
561 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
562 void_list_node.
563
861d1a11
GA
5642022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
565
566 * c-format.cc (convert_format_name_to_system_name): Fix warning.
567
fe2a8ce9
GA
5682022-09-07 Joseph Myers <joseph@codesourcery.com>
569
570 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
571 for alignas, alignof, bool, false, static_assert, thread_local and
572 true.
573
5742022-09-07 Jakub Jelinek <jakub@redhat.com>
575
576 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
577 " in comments" from description.
578 (Wunicode): New option.
579
25aeb922
GA
5802022-09-06 Jakub Jelinek <jakub@redhat.com>
581
582 PR c/106836
583 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
584
83f2f228
GA
5852022-09-03 Jakub Jelinek <jakub@redhat.com>
586
587 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
588 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
589 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
590 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
591
c64b0947
GA
5922022-09-02 David Malcolm <dmalcolm@redhat.com>
593
594 PR c/90885
595 * c-common.h (check_for_xor_used_as_pow): New decl.
596 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
597 * c-warn.cc (check_for_xor_used_as_pow): New.
598 * c.opt (Wxor-used-as-pow): New.
599
bb0a1556
GA
6002022-09-01 Jason Merrill <jason@redhat.com>
601
602 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
603 char8_t.
604 (braced_list_to_string): Check for char-sized elements.
605
6062022-09-01 Jakub Jelinek <jakub@redhat.com>
607
608 PR c++/106655
609 * c.opt (-Winvalid-utf8): New warning.
610 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
611 Set cpp_opts->cpp_input_charset_explicit.
612 (c_common_post_options): If -finput-charset=UTF-8 is explicit
613 in C++23, enable -Winvalid-utf8 by default and if -pedantic
614 or -pedantic-errors, make it a pedwarn.
615
542c60c4
GA
6162022-08-31 Joseph Myers <joseph@codesourcery.com>
617
618 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
619 for LABEL_DECL.
620 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
621 decl_attributes.
622 * c-common.h (do_case, c_add_case_label): Update declarations.
623 * c-lex.cc (c_common_has_attribute): For C, produce a result of
624 201910 for fallthrough and 202106 for maybe_unused.
625
16f542d6
GA
6262022-08-26 Marek Polacek <polacek@redhat.com>
627
628 PR c++/81159
629 * c.opt (Wself-move): New option.
630
6312022-08-26 Jakub Jelinek <jakub@redhat.com>
632
633 * c-common.cc (check_builtin_function_arguments): Handle
634 BUILT_IN_ISSIGNALING.
635
6362022-08-26 Jakub Jelinek <jakub@redhat.com>
637
638 PR c++/106648
639 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
640 __cpp_named_character_escapes to 202207L.
641
5d4389dc
GA
6422022-08-25 Marek Polacek <polacek@redhat.com>
643
644 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
645 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
646 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
647 (struct c_common_resword): Resize the disable member.
648 (D_C2X): Add.
649 (nullptr_node): Define.
650 (nullptr_type_node): Define.
651 (NULLPTR_TYPE_P): Define.
652 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
653 NULLPTR_TYPE.
654 (c_pretty_printer::direct_abstract_declarator): Likewise.
655 (c_pretty_printer::constant): Likewise.
656
47a61e65
GA
6572022-08-16 Tom Honermann <tom@honermann.net>
658
659 PR c++/106423
660 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
661 diagnostics in C++20 and later.
662 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
663
5cd525f0
GA
6642022-08-11 Marek Polacek <polacek@redhat.com>
665
666 PR middle-end/102633
667 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
668 suppress_warning here.
669
5f17badb
GA
6702022-08-08 Tom Honermann <tom@honermann.net>
671
672 PR preprocessor/106426
673 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
674 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
675
6762022-08-08 Tom Honermann <tom@honermann.net>
677
678 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
679 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
680 enabled.
681 * c-opts.cc (c_common_post_options): Set flag_char8_t if
682 targeting C2x.
683
4a7274dd
GA
6842022-07-31 Lewis Hyatt <lhyatt@gmail.com>
685
686 PR c++/66290
687 * c-common.h: Rename global done_lexing to
688 override_libcpp_locations.
689 * c-common.cc (c_cpp_diagnostic): Likewise.
690 * c-opts.cc (c_common_finish): Set override_libcpp_locations
691 (formerly done_lexing) immediately prior to calling cpp_finish ().
692
1e2c5f4c
GA
6932022-07-27 Lewis Hyatt <lhyatt@gmail.com>
694
695 * c-ppoutput.cc (token_streamer::stream): Update input_location
696 prior to streaming each token.
697
0e6fa997
GA
6982022-07-23 Immad Mir <mirimmad@outlook.com>
699
700 * c-attribs.cc: (c_common_attribute_table): add three new attributes
701 namely: fd_arg, fd_arg_read and fd_arg_write.
702 (handle_fd_arg_attribute): New.
703
bdc7b765
GA
7042022-07-15 Marek Polacek <polacek@redhat.com>
705
706 PR c++/104477
707 * c-common.cc (c_common_reswords): Add
708 __reference_constructs_from_temporary and
709 __reference_converts_from_temporary.
710 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
711 RID_REF_CONVERTS_FROM_TEMPORARY.
712
7132022-07-15 Jonathan Wakely <jwakely@redhat.com>
714
715 * c-format.cc (class range_label_for_format_type_mismatch):
716 Adjust to new label_text API.
717
c72d4714
GA
7182022-07-11 Lewis Hyatt <lhyatt@gmail.com>
719
720 PR preprocessor/106252
721 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
722 option argument prior to verifying the option was found.
723
6345c414
GA
7242022-07-07 David Malcolm <dmalcolm@redhat.com>
725
726 * c-format.cc (range_label_for_format_type_mismatch::get_text):
727 Update for removal of label_text::maybe_free in favor of automatic
728 memory management.
729
4bc92c3b
GA
7302022-07-06 Lewis Hyatt <lhyatt@gmail.com>
731
732 PR preprocessor/53920
733 PR c++/53431
734 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
735 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
736 (c_pp_stream_token): Declare.
737 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
738 pragmas to...
739 (should_output_pragmas): ...here. New function.
740 (token_streamer::stream): Support handling early pragmas.
741 (do_line_change): Likewise.
742 (c_pp_stream_token): New function.
743 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
744 (pragma_diagnostic_lex_normal): New function. Moved logic for
745 interpreting GCC diagnostic pragmas here.
746 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
747 directly from libcpp.
748 (handle_pragma_diagnostic): Refactor into helper function...
749 (handle_pragma_diagnostic_impl): ...here. New function.
750 (handle_pragma_diagnostic_early): New function.
751 (handle_pragma_diagnostic_early_pp): New function.
752 (struct pragma_ns_name): Renamed to...
753 (struct pragma_pp_data): ...this. Add new "early_handler" member.
754 (c_register_pragma_1): Support early pragmas in the preprocessor.
755 (c_register_pragma_with_early_handler): New function.
756 (c_register_pragma): Support the new early handlers in struct
757 internal_pragma_handler.
758 (c_register_pragma_with_data): Likewise.
759 (c_register_pragma_with_expansion): Likewise.
760 (c_register_pragma_with_expansion_and_data): Likewise.
761 (c_invoke_early_pragma_handler): New function.
762 (c_pp_invoke_early_pragma_handler): New function.
763 (init_pragma): Add early pragma support for diagnostic pragmas.
764 * c-pragma.h (struct internal_pragma_handler): Add new early handler
765 members.
766 (c_register_pragma_with_early_handler): Declare.
767 (c_invoke_early_pragma_handler): Declare.
768 (c_pp_invoke_early_pragma_handler): Declare.
769
d1f3a3ff
GA
7702022-07-05 Marek Polacek <polacek@redhat.com>
771
772 PR c++/105626
773 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
774 u8 strings.
775
ed974488
GA
7762022-07-01 Marek Polacek <polacek@redhat.com>
777
778 PR c++/106111
779 * c-common.h (enum rid): Update RID_LAST_CXX20.
780
976196b3
GA
7812022-06-30 Jonathan Wakely <jwakely@redhat.com>
782
783 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
784 names.
785
84c2131d
GA
7862022-06-24 Jason Merrill <jason@redhat.com>
787
788 PR c++/87729
789 PR c++/20423
790 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
791
4390e7bf
GA
7922022-06-18 Jakub Jelinek <jakub@redhat.com>
793
794 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
795 Use flag_sanitize_trap & SANITIZE_??? instead of
796 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
797 and flag_sanitize_trap differs for them, emit __builtin_trap only
798 for the comparison where trap is requested.
799 (ubsan_instrument_vla, ubsan_instrument_return): Use
800 lag_sanitize_trap & SANITIZE_??? instead of
801 flag_sanitize_undefined_trap_on_error.
802
c3642271
GA
8032022-06-13 Jason Merrill <jason@redhat.com>
804
805 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
806
d9176e64
GA
8072022-05-27 Marek Polacek <polacek@redhat.com>
808
809 PR c/90658
810 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
811
8122022-05-27 Jakub Jelinek <jakub@redhat.com>
813
814 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
815
57f2ce6a
GA
8162022-05-20 David Malcolm <dmalcolm@redhat.com>
817
818 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
819 and "override".
820 * c-pretty-print.h: Likewise.
821
1cda629f
GA
8222022-05-18 Marek Polacek <polacek@redhat.com>
823
824 PR c/105131
825 * c.opt (Wenum-int-mismatch): New.
826
8272022-05-18 Marek Polacek <polacek@redhat.com>
828
829 PR c++/105497
830 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
831 enumerator when it was marked with attribute unused.
832
8332022-05-18 Eric Botcazou <ebotcazou@adacore.com>
834
835 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
836 floating-point complex types.
837 <POINTER_TYPE>: Do not use limited_with clause if the designated
838 type is a scalar type.
839
3d9439b1
GA
8402022-05-17 Jakub Jelinek <jakub@redhat.com>
841
842 * c-omp.cc (c_finish_omp_depobj): Handle
843 OMP_CLAUSE_DEPEND_INOUTSET.
844
702bd11f
GA
8452022-05-16 Jason Merrill <jason@redhat.com>
846
847 PR c/105492
848 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
849 here.
850
8512022-05-16 Martin Liska <mliska@suse.cz>
852
853 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
854 (c_common_nodes_and_builtins): Likewise.
855 * c-format.cc (check_tokens): Likewise.
856 (check_plain): Likewise.
857 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
858 (init_pragma): Likewise.
859 * known-headers.cc (get_string_macro_hint): Likewise.
860 (get_stdlib_header_for_name): Likewise.
861 * c-attribs.cc: Likewise.
862
9df4ffe4
GA
8632022-05-13 Richard Biener <rguenther@suse.de>
864
865 * c-omp.cc: Remove gimple-fold.h include.
866
49ace834
GA
8672022-05-12 Jakub Jelinek <jakub@redhat.com>
868
869 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
870 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
871 if null_pointer_node.
872
d0d513b5
GA
8732022-05-11 Martin Liska <mliska@suse.cz>
874
875 PR target/105355
876 * c-opts.cc (c_common_handle_option): Change option name.
877 * c.opt: Remove Joined and use Separate option.
878
bd022ff9
GA
8792022-05-09 Alex Coplan <alex.coplan@arm.com>
880
881 * c-common.h (get_dump_info): Delete.
882 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
883 from the global dump_manager instead of the (now obsolete)
884 get_dump_info.
885 * c-opts.cc (original_dump_file): Delete.
886 (original_dump_flags): Delete.
887 (c_common_parse_file): Switch to using global dump_manager to
888 manage the original dump file; fix leak of dump file.
889 (get_dump_info): Delete.
890
a1947c92
GA
8912022-05-07 Marek Polacek <polacek@redhat.com>
892
893 PR c++/101833
894 PR c++/47634
895 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
896 with FN being either a function declaration or function type. Use
897 maybe_adjust_arg_pos_for_attribute.
898 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
899 check_function_format.
900 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
901 (positional_argument): Adjust.
902 * c-format.cc (get_constant): Rename to ...
903 (validate_constant): ... this. Take EXPR by reference. Return bool
904 instead of tree.
905 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
906 return value of validate_constant.
907 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
908 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
909 (check_function_format): Adjust a parameter name.
910 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
911
3e7db517
GA
9122022-05-04 Marek Polacek <polacek@redhat.com>
913
914 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
915 char to int.
916
95874f95
GA
9172022-04-30 Jason Merrill <jason@redhat.com>
918
919 PR c/100545
920 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
921 and typedef.
922 * c-common.cc (set_underlying_type): Add assert.
923
01ad093b
GA
9242022-04-26 Patrick Palka <ppalka@redhat.com>
925
926 PR c++/105304
927 * c-common.cc (verify_tree) [restart]: Move up to before the
928 NULL test.
929
da066c42
GA
9302022-04-11 Jakub Jelinek <jakub@redhat.com>
931
932 PR c++/105186
933 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
934 and __int%d__ builtin types, initialize corresponding ridpointers
935 entry.
936
150ab50f
GA
9372022-03-30 Marek Polacek <polacek@redhat.com>
938
939 PR c++/101030
940 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
941 conversion_warning when OP1 is null.
942
9432022-03-30 Thomas Schwinge <thomas@codesourcery.com>
944
945 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
946 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
947 option properties.
948
9492022-03-30 Thomas Schwinge <thomas@codesourcery.com>
950
951 * c.opt (Wuse-after-free): Remove.
952
9532022-03-30 Thomas Schwinge <thomas@codesourcery.com>
954
955 * c.opt (Warray-bounds): Remove.
956
d2906412
GA
9572022-03-26 Thomas Schwinge <thomas@codesourcery.com>
958
959 * c.opt: Properly quote comment.
960
31e989a2
GA
9612022-03-25 Eric Botcazou <ebotcazou@adacore.com>
962
963 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
964 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
965 the referenced type instead. Deal with the anonymous original type
966 of a typedef'ed type. In the actual access case, follow the chain
967 of external subtypes.
968 <TYPE_DECL>: Tidy up control flow.
969
d156bb87
GA
9702022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
971
972 * c-ada-spec.cc: Change array length
973
d7f00da1
GA
9742022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
975
976 * c-common.cc (c_family_tests): Call the new tests.
977 * c-common.h (c_diagnostic_tests): Declare.
978 (c_opt_problem_cc_tests): Likewise.
979
9802022-03-19 Jakub Jelinek <jakub@redhat.com>
981
982 PR c++/101515
983 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
984 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
985 be printed.
986
9fc8f278
GA
9872022-03-16 Christophe Lyon <christophe.lyon@arm.com>
988 Roger Sayle <roger@nextmovesoftware.com>
989
990 PR c/98198
991 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
992
9932022-03-16 Patrick Palka <ppalka@redhat.com>
994
995 PR c++/96780
996 * c.opt: Add -ffold-simple-inlines.
997
b9756c08
GA
9982022-03-13 Tobias Burnus <tobias@codesourcery.com>
999
1000 * c-target.def (check_string_object_format_arg): Fix description typo.
1001
57eeedda
GA
10022022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1003
1004 PR other/65095
1005 * c-common.h (c_omp_map_clause_name): Remove.
1006 * c-omp.cc (c_omp_map_clause_name): Remove.
1007
8cc4f9cd
GA
10082022-03-09 Jakub Jelinek <jakub@redhat.com>
1009
1010 PR c/104711
1011 * c-opts.cc (c_common_post_options): Don't enable
1012 -Wshift-negative-value from -Wextra for C++20 or later.
1013 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1014 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1015 instead of TYPE_UNSIGNED.
1016
e6533e2e
GA
10172022-03-07 Jakub Jelinek <jakub@redhat.com>
1018
1019 * c-attribs.cc: Fix up duplicated word issue in a comment.
1020
12d4552e
GA
10212022-03-01 Martin Liska <mliska@suse.cz>
1022
1023 PR ipa/104533
1024 * c-attribs.cc (handle_target_clones_attribute): Use
1025 get_target_clone_attr_len and report warning soon.
1026
0bdb0498
GA
10272022-02-17 Jonathan Wakely <jwakely@redhat.com>
1028
1029 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1030 (handle_pragma_weak): Likewise.
1031 (handle_pragma_scalar_storage_order): Likewise.
1032 (handle_pragma_redefine_extname): Likewise.
1033 (handle_pragma_visibility): Likewise.
1034 (handle_pragma_diagnostic): Likewise.
1035 (handle_pragma_target): Likewise.
1036 (handle_pragma_optimize): Likewise.
1037 (handle_pragma_push_options): Likewise.
1038 (handle_pragma_pop_options): Likewise.
1039 (handle_pragma_reset_options): Likewise.
1040 (handle_pragma_message): Likewise.
1041 (handle_pragma_float_const_decimal64): Likewise.
1042
cb3afcd2
GA
10432022-02-16 Jakub Jelinek <jakub@redhat.com>
1044
1045 PR c/104531
1046 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1047 build_binary_op with LT_EXPR and only if that doesn't return
1048 error_mark_node call build_modify_expr.
1049
10502022-02-16 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c/104510
1053 * c-common.cc (shorten_compare): Convert original arguments to
1054 the original *restype_ptr when mixing binary and decimal float.
1055
1f8a09d2
GA
10562022-02-14 Richard Biener <rguenther@suse.de>
1057
1058 PR c/104505
1059 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1060 internal function calls.
1061
e8d68f0a
GA
10622022-02-11 Richard Biener <rguenther@suse.de>
1063
1064 * c-attribs.cc (c_common_attribute_table): Add entry for
1065 vector_mask.
1066 (handle_vector_mask_attribute): New.
1067
a645583d
GA
10682022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1069
1070 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1071 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1072 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1073
3adf509f
GA
10742022-02-09 Jason Merrill <jason@redhat.com>
1075
1076 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1077 of __cpp_constexpr and __cpp_concepts for C++20.
1078
bb99171b
GA
10792022-01-24 Marek Polacek <polacek@redhat.com>
1080
1081 PR preprocessor/104030
1082 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1083
9dd44357
GA
10842022-01-21 Jakub Jelinek <jakub@redhat.com>
1085
1086 PR c++/104148
1087 * c-common.h (check_function_arguments_recurse): Add for_format
1088 arg.
1089 * c-common.cc (check_function_nonnull): Pass false to
1090 check_function_arguments_recurse's last argument.
1091 (check_function_arguments_recurse): Add for_format argument,
1092 if true, don't stop on warning_suppressed_p.
1093 * c-format.cc (check_format_info): Pass true to
1094 check_function_arguments_recurse's last argument.
1095
fe1ad141
GA
10962022-01-19 David Malcolm <dmalcolm@redhat.com>
1097
1098 * c-common.cc (c_common_c_tests): Rename to...
1099 (c_common_cc_tests): ...this.
1100 (c_family_tests): Update calls for .c to .cc renaming.
1101 * c-common.h (c_format_c_tests): Rename to...
1102 (c_format_cc_tests): ...this.
1103 (c_indentation_c_tests): Rename to...
1104 (c_indentation_cc_tests): ...this.
1105 (c_pretty_print_c_tests): Rename to...
1106 (c_pretty_print_cc_tests): ...this.
1107 * c-format.cc (c_format_c_tests): Rename to...
1108 (c_format_cc_tests): ...this.
1109 * c-indentation.cc (c_indentation_c_tests): Rename to...
1110 (c_indentation_cc_tests): ...this.
1111 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1112 (c_pretty_print_cc_tests): ...this.
1113
fc829782
GA
11142022-01-17 Martin Liska <mliska@suse.cz>
1115
1116 * c-ada-spec.cc: Rename .c names to .cc.
1117 * c-ada-spec.h: Likewise.
1118 * c-common.cc (c_build_vec_convert): Likewise.
1119 (warning_candidate_p): Likewise.
1120 * c-common.h (enum rid): Likewise.
1121 (build_real_imag_expr): Likewise.
1122 (finish_label_address_expr): Likewise.
1123 (c_get_substring_location): Likewise.
1124 (c_build_bind_expr): Likewise.
1125 (conflict_marker_get_final_tok_kind): Likewise.
1126 (c_parse_error): Likewise.
1127 (check_missing_format_attribute): Likewise.
1128 (invalid_array_size_error): Likewise.
1129 (warn_for_multistatement_macros): Likewise.
1130 (build_attr_access_from_parms): Likewise.
1131 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1132 * c-format.cc: Likewise.
1133 * c-gimplify.cc (c_gimplify_expr): Likewise.
1134 * c-indentation.h: Likewise.
1135 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1136 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1137 * c-opts.cc (c_common_post_options): Likewise.
1138 (set_std_cxx23): Likewise.
1139 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1140 * c-pretty-print.h: Likewise.
1141
11422022-01-17 Martin Liska <mliska@suse.cz>
1143
1144 * c-ada-spec.c: Moved to...
1145 * c-ada-spec.cc: ...here.
1146 * c-attribs.c: Moved to...
1147 * c-attribs.cc: ...here.
1148 * c-common.c: Moved to...
1149 * c-common.cc: ...here.
1150 * c-cppbuiltin.c: Moved to...
1151 * c-cppbuiltin.cc: ...here.
1152 * c-dump.c: Moved to...
1153 * c-dump.cc: ...here.
1154 * c-format.c: Moved to...
1155 * c-format.cc: ...here.
1156 * c-gimplify.c: Moved to...
1157 * c-gimplify.cc: ...here.
1158 * c-indentation.c: Moved to...
1159 * c-indentation.cc: ...here.
1160 * c-lex.c: Moved to...
1161 * c-lex.cc: ...here.
1162 * c-omp.c: Moved to...
1163 * c-omp.cc: ...here.
1164 * c-opts.c: Moved to...
1165 * c-opts.cc: ...here.
1166 * c-pch.c: Moved to...
1167 * c-pch.cc: ...here.
1168 * c-ppoutput.c: Moved to...
1169 * c-ppoutput.cc: ...here.
1170 * c-pragma.c: Moved to...
1171 * c-pragma.cc: ...here.
1172 * c-pretty-print.c: Moved to...
1173 * c-pretty-print.cc: ...here.
1174 * c-semantics.c: Moved to...
1175 * c-semantics.cc: ...here.
1176 * c-ubsan.c: Moved to...
1177 * c-ubsan.cc: ...here.
1178 * c-warn.c: Moved to...
1179 * c-warn.cc: ...here.
1180 * cppspec.c: Moved to...
1181 * cppspec.cc: ...here.
1182 * stub-objc.c: Moved to...
1183 * stub-objc.cc: ...here.
1184
9248ee41
GA
11852022-01-15 Martin Sebor <msebor@redhat.com>
1186
1187 PR c/63272
1188 * c.opt (-Wdangling-pointer): New option.
1189
11902022-01-15 Martin Sebor <msebor@redhat.com>
1191
1192 PR tree-optimization/80532
1193 * c.opt (-Wuse-after-free): New options.
1194
617db51d
GA
11952022-01-14 David Malcolm <dmalcolm@redhat.com>
1196
1197 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1198 (handle_tainted_args_attribute): New.
1199
ad3f0d08
GA
12002022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1201 Jason Merrill <jason@redhat.com>
1202
1203 PR c++/70417
1204 * c.opt: Added -Wmissing-template-keyword.
1205
12062022-01-13 Richard Biener <rguenther@suse.de>
1207
1208 PR c/104002
1209 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1210
02a8a01b
GA
12112022-01-12 Martin Liska <mliska@suse.cz>
1212
1213 PR target/103804
1214 * c-attribs.c (handle_optimize_attribute): Do not call
1215 cl_optimization_compare if we seen an error.
1216
01a254e3
GA
12172022-01-11 Jakub Jelinek <jakub@redhat.com>
1218
1219 PR c/101537
1220 PR c/103881
1221 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1222 and BIT_XOR_EXPR.
1223
d9450aa0
GA
12242022-01-10 Richard Biener <rguenther@suse.de>
1225
1226 PR middle-end/101530
1227 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1228 in a TARGET_EXPR to force a temporary.
1229
11ce8d04
GA
12302022-01-06 Marek Polacek <polacek@redhat.com>
1231
1232 PR c++/103758
1233 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1234 diagnostic messages.
1235 (handle_pragma_diagnostic): Likewise.
1236
a4ae8c37
GA
12372022-01-03 Marek Polacek <polacek@redhat.com>
1238
1239 PR c++/103758
1240 * c-format.c (check_tokens): Accept "decl-specifier*".
1241
12422022-01-03 Jakub Jelinek <jakub@redhat.com>
1243
1244 PR c++/103600
1245 * c-attribs.c (handle_non_overlapping_attribute): New function.
1246 (c_common_attribute_table): Add "non overlapping" attribute.
1247
84790a9d
GA
12482021-12-30 Jakub Jelinek <jakub@redhat.com>
1249
1250 PR c++/103012
1251 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1252 cpp_define_unused/cpp_undef calls with forced token locations
1253 BUILTINS_LOCATION.
1254
d1e111da
GA
12552021-12-27 Patrick Palka <ppalka@redhat.com>
1256
1257 PR c++/103700
1258 * c-common.c (pointer_int_sum): When quiet, return
1259 error_mark_node for an incomplete pointed-to type and don't
1260 call size_in_bytes_loc.
1261
2554e2da
GA
12622021-12-17 Jason Merrill <jason@redhat.com>
1263
1264 PR c++/103681
1265 * c-opts.c (c_common_post_options): Update defaults.
1266
774269aa
GA
12672021-12-16 Martin Liska <mliska@suse.cz>
1268
1269 PR target/103709
1270 * c-pragma.c (handle_pragma_pop_options): Do not check
1271 global options modification when an error is seen in parsing
1272 of options (pragmas or attributes).
1273
c8dcf64b
GA
12742021-12-12 Jonathan Wakely <jwakely@redhat.com>
1275
1276 * known-headers.cc: Define INCLUDE_MEMORY instead of
1277 INCLUDE_UNIQUE_PTR.
1278 * name-hint.h: Likewise.
1279 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1280
4b4839e3
GA
12812021-12-09 Jakub Jelinek <jakub@redhat.com>
1282
1283 PR pch/71934
1284 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1285 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1286
03a9bd05
GA
12872021-12-03 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR pch/71934
1290 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1291 (pch_init): Don't initialize v.pch_init.
1292 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1293
40fa651e
GA
12942021-12-01 Jason Merrill <jason@redhat.com>
1295
1296 PR c++/103310
1297 * c.opt: Add -fconstexpr-fp-except.
1298
87cd82c8
GA
12992021-11-29 Richard Biener <rguenther@suse.de>
1300
1301 * c-format.c (check_format_string): Remove spurious
1302 gcc_unreachable.
1303
13042021-11-29 Richard Biener <rguenther@suse.de>
1305
1306 * c-opts.c (c_common_post_options): Remove unreachable return.
1307 * c-pragma.c (handle_pragma_target): Likewise.
1308 (handle_pragma_optimize): Likewise.
1309
091ccc06
GA
13102021-11-25 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c++/102611
1313 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1314 default for C++23 regardless of warn_deprecated.
1315 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1316 __cpp_multidimensional_subscript=202110L for C++23.
1317
e1d43592
GA
13182021-11-23 Martin Sebor <msebor@redhat.com>
1319
1320 PR middle-end/88232
1321 * c.opt: Add -Winfinite-recursion.
1322
9c077398
GA
13232021-11-19 Martin Sebor <msebor@redhat.com>
1324
1325 PR c++/33925
1326 PR c/102867
1327 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1328 and improve handling tof defined symbols.
1329
13302021-11-19 Martin Liska <mliska@suse.cz>
1331
1332 Revert:
1333 2021-11-18 Martin Liska <mliska@suse.cz>
1334
1335 * c-gimplify.c (genericize_c_loop): Use option directly.
1336
483092d3
GA
13372021-11-18 Matthias Kretz <m.kretz@gsi.de>
1338
1339 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1340 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1341
13422021-11-18 Martin Liska <mliska@suse.cz>
1343
1344 * c-gimplify.c (genericize_c_loop): Use option directly.
1345
280d2838
GA
13462021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1347
1348 PR c/91038
1349 PR c/29970
1350 * c-common.c (pointer_int_sum): Make sure pointer expressions
1351 are evaluated first when the size expression depends on for
1352 variably-modified types.
1353
13542021-11-17 Marek Polacek <polacek@redhat.com>
1355
1356 PR preprocessor/103026
1357 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1358
6b1695f4
GA
13592021-11-16 Jason Merrill <jason@redhat.com>
1360
1361 * c-common.c (release_tree_vector): Only cache vecs smaller than
1362 16 elements.
1363
e2b57363
GA
13642021-11-15 Jason Merrill <jason@redhat.com>
1365
1366 * c.opt: Add -fimplicit-constexpr.
1367 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1368 * c-opts.c (c_common_post_options): Disable below C++14.
1369
13702021-11-15 Jakub Jelinek <jakub@redhat.com>
1371
1372 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1373 Duplicate to both OMP_TARGET and OMP_TEAMS.
1374
8d36a0d2
GA
13752021-11-10 Marek Polacek <polacek@redhat.com>
1376
1377 PR c++/101940
1378 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1379 ignored_attributes.
1380
c9b1334e
GA
13812021-11-09 David Malcolm <dmalcolm@redhat.com>
1382
1383 * c-pragma.c (GCC_BAD_AT): New macro.
1384 (GCC_BAD2_AT): New macro.
1385 (handle_pragma_pack): Use the location of the pertinent token when
1386 issuing diagnostics about invalid constants/actions, and trailing
1387 junk.
1388 (handle_pragma_target): Likewise for non-string "GCC option".
1389 (handle_pragma_message): Likewise for trailing junk.
1390
18ae471f
GA
13912021-11-03 Joseph Myers <joseph@codesourcery.com>
1392
1393 PR c/103031
1394 * c-common.c (convert_and_check): Add argument init_const. Call
1395 convert_init if init_const.
1396 * c-common.h (convert_and_check): Update prototype.
1397 (convert_init): New prototype.
1398
cf82e8d9
GA
13992021-11-01 David Malcolm <dmalcolm@redhat.com>
1400
1401 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1402 CPP_OTHER tokens, set the "escape on output" flag.
1403
04a2cf3f
GA
14042021-10-27 Jakub Jelinek <jakub@redhat.com>
1405
1406 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1407 POINTER_PLUS_EXPR.
1408 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1409 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1410
14112021-10-27 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR c++/102854
1414 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1415 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1416 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1417 conversions temporarily clear the 3rd bit from d->kind while walking
1418 subtrees.
1419 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1420 if possibly non-rectangular.
1421
ae5c5406
GA
14222021-10-21 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR middle-end/64888
1425 * c-omp.c (c_omp_predefined_variable): Return true also for
1426 ubsan_create_data created artificial variables.
1427
5d5885c9
GA
14282021-10-14 Joseph Myers <joseph@codesourcery.com>
1429
1430 * c-format.c (printf_length_specs, scanf_length_specs)
1431 (print_char_table, scan_char_table): Support DFP formats for C2X.
1432 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1433 (T2X_D32, T2X_D64, T2X_D128): New macros.
1434
14352021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1436
1437 * c-omp.c (c_omp_check_context_selector): Rename to
1438 omp_check_context_selector and move to omp-general.c.
1439 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1440 move to omp-general.c.
1441
52055987
GA
14422021-10-12 Joseph Myers <joseph@codesourcery.com>
1443
1444 * c-format.c (print_char_table): Add %b and %B formats.
1445 (scan_char_table): Add %b format.
1446 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1447 (T2X_UPD, T2X_UIM): New macros.
1448
14492021-10-12 Jakub Jelinek <jakub@redhat.com>
1450
1451 * c-omp.c (c_finish_omp_atomic): Use
1452 clear_padding_type_may_have_padding_p.
1453
ce6eec39
GA
14542021-10-08 Martin Liska <mliska@suse.cz>
1455
1456 * c-opts.c (c_common_post_options): Use new macro
1457 OPTION_SET_P.
1458
50e20ee6
GA
14592021-10-07 Martin Liska <mliska@suse.cz>
1460
1461 * c-common.c (parse_optimize_options): Make
1462 save_opt_decoded_options a pointer type.
1463
57c7ec62
GA
14642021-10-06 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR tree-optimization/102571
1467 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1468 padding, but the non-padding bits are contiguous set of bytes
1469 by adjusting the memcmp call arguments instead of emitting
1470 __builtin_clear_padding and then comparing all the type's bytes.
1471
14722021-10-06 Jakub Jelinek <jakub@redhat.com>
1473
1474 PR c++/102612
1475 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1476 __cpp_constexpr to 202110L rather than 201907L.
1477
da9c5f78
GA
14782021-10-04 Marek Polacek <polacek@redhat.com>
1479
1480 PR c++/97573
1481 * c-common.h (do_warn_array_compare): Declare.
1482 * c-warn.c (do_warn_array_compare): New.
1483 * c.opt (Warray-compare): New option.
1484
e3e07b89
GA
14852021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1486
1487 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1488 NULL, this is not needed.
1489
9d116bcc
GA
14902021-10-01 Martin Sebor <msebor@redhat.com>
1491
1492 PR c/102103
1493 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1494 Check and perform warning suppression.
1495 (c_common_truthvalue_conversion): Enhance warning suppression.
1496
14972021-10-01 Martin Liska <mliska@suse.cz>
1498
1499 PR target/102552
1500 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1501 used for program name, so merged_decoded_options should also
1502 respect that.
9d116bcc
GA
1503
15042021-10-01 Jakub Jelinek <jakub@redhat.com>
1505 Richard Biener <rguenther@suse.de>
1506
1507 PR sanitizer/102515
1508 * c-ubsan.c (ubsan_instrument_division): Check the right
1509 flag_sanitize_recover bit, depending on which sanitization
1510 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1511 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1512 and SANITIZE_DIVIDE is enabled, neither check is known
1513 to be false and flag_sanitize_recover bits for those two
1514 aren't the same, emit both __ubsan_handle_divrem_overflow
1515 and __ubsan_handle_divrem_overflow_abort calls.
1516
15172021-10-01 Martin Liska <mliska@suse.cz>
1518
1519 * c-common.c (parse_optimize_options): Combine optimize
1520 options with what was provided on the command line.
1521
15222021-10-01 Jakub Jelinek <jakub@redhat.com>
1523
1524 * c-omp.c (c_omp_split_clauses): Also copy
1525 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1526
cf966403
GA
15272021-09-27 Martin Liska <mliska@suse.cz>
1528
1529 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1530 x_flag_default_complex_method.
cf966403 1531
e4777439
GA
15322021-09-22 Jakub Jelinek <jakub@redhat.com>
1533
1534 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1535
62498024
GA
15362021-09-20 Matthias Kretz <m.kretz@gsi.de>
1537
1538 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1539 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1540 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1541 __ROUNDING_MATH__ according to the new optimization flags.
1542
cf74e7b5
GA
15432021-09-18 Jakub Jelinek <jakub@redhat.com>
1544
1545 * c-omp.c (c_omp_split_clauses): Split order clause also to
1546 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1547
0a4cb439
GA
15482021-09-17 Jakub Jelinek <jakub@redhat.com>
1549
1550 * c-omp.c (c_finish_omp_atomic): Avoid creating
1551 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1552 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1553 had NULL initializer. When omitting operands after v = x,
1554 use type of v rather than type of x. Fix type of vtmp
1555 TARGET_EXPR.
1556
07985c47
GA
15572021-09-13 Jason Merrill <jason@redhat.com>
1558
1559 * c.opt: Add -Winterference-size.
1560 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1561 and __GCC_CONSTRUCTIVE_SIZE.
1562
a26206ec
GA
15632021-09-10 Jakub Jelinek <jakub@redhat.com>
1564
1565 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1566 * c-omp.c: Include gimple-fold.h.
1567 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1568 OpenMP 5.1 atomics.
1569
f84e2f0b
GA
15702021-09-09 qing zhao <qing.zhao@oracle.com>
1571
1572 * c-attribs.c (handle_uninitialized_attribute): New function.
1573 (c_common_attribute_table): Add "uninitialized" attribute.
1574
b6db7cd4
GA
15752021-09-08 liuhongt <hongtao.liu@intel.com>
1576
1577 * c-common.c (excess_precision_mode_join): Update below comments.
1578 (c_ts18661_flt_eval_method): Set excess_precision_type to
1579 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1580 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1581 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1582 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1583
b2748138
GA
15842021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1585
1586 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1587
7b739540
GA
15882021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1589
1590 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1591 and -gnatwu warning for the package specification.
1592
e11c6046
GA
15932021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1594
1595 * c-attribs.c (handle_unavailable_attribute): New.
1596
1e2f030b
GA
15972021-08-30 Jason Merrill <jason@redhat.com>
1598
1599 * c.opt: Add -Wmissing-requires.
1600
85d77ac4
GA
16012021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1602
1603 PR other/93067
1604 * c-opts.c (c_common_input_charset_cb): New function.
1605 (c_common_post_options): Call new function
1606 diagnostic_initialize_input_context().
1607
7c9e1645
GA
16082021-08-20 Tobias Burnus <tobias@codesourcery.com>
1609
1610 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1611 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1612 "di" and "u", respecitively; fill with BADLEN to match
1613 size of 'types'.
1614 (get_init_dynamic_hwi): Split off from ...
1615 (init_dynamic_diag_info): ... here. Call it.
1616 (init_dynamic_gfc_info): Call it.
1617
16182021-08-20 Jakub Jelinek <jakub@redhat.com>
1619
1620 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1621 * c-pragma.c (omp_pragmas): Add error directive.
1622 * c-omp.c (omp_directives): Uncomment error directive entry.
1623
6e529985
GA
16242021-08-18 Jakub Jelinek <jakub@redhat.com>
1625
1626 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1627 * c-pragma.c (omp_pragmas): Add nothing directive.
1628 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1629
2d14d64b
GA
16302021-08-17 Jakub Jelinek <jakub@redhat.com>
1631
1632 PR c++/101539
1633 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1634 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1635
16362021-08-17 Matt Jacobson <mhjacobson@me.com>
1637
1638 * c-opts.c (c_common_post_options): Default to
1639 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1640
16412021-08-17 Jakub Jelinek <jakub@redhat.com>
1642
1643 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1644 * c-pragma.c (omp_pragmas): Add scope construct.
1645 * c-omp.c (omp_directives): Uncomment scope directive entry.
1646
9d1d9fc8
GA
16472021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1648
1649 * c-cppbuiltin.c (c_cpp_builtins): Define
1650 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1651
72be20e2
GA
16522021-08-12 Jakub Jelinek <jakub@redhat.com>
1653
1654 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1655 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1656 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1657 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1658 enumerator.
1659 (c_finish_omp_masked): Declare.
1660 * c-omp.c (c_finish_omp_masked): New function.
1661 (c_omp_split_clauses): Handle combined masked constructs.
1662
4d17ca1b
GA
16632021-07-30 Jakub Jelinek <jakub@redhat.com>
1664
1665 PR c++/101539
1666 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1667 * c-common.c (c_common_reswords): Add
1668 __is_pointer_interconvertible_base_of.
1669
16702021-07-29 Richard Biener <rguenther@suse.de>
1671
1672 PR c/101512
1673 * c-common.c (c_common_mark_addressable_vec): Look through
1674 C_MAYBE_CONST_EXPR even if not at the toplevel.
1675
af3f12e6
GA
16762021-07-27 Martin Sebor <msebor@redhat.com>
1677
1678 PR c/101585
1679 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1680
ead235f6
GA
16812021-07-23 Jakub Jelinek <jakub@redhat.com>
1682
1683 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1684 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1685 and later.
1686
16872021-07-23 Jakub Jelinek <jakub@redhat.com>
1688
1689 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1690 PRAGMA_OMP__LAST_ enumerators.
1691
419c6c68
GA
16922021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1693 Joseph Myers <joseph@codesourcery.com>
1694 Cesar Philippidis <cesar@codesourcery.com>
1695
1696 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1697
92d45509
GA
16982021-07-20 Martin Sebor <msebor@redhat.com>
1699
1700 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1701 by-const-reference.
1702 * c-common.h (c_build_shufflevector): Same.
1703
87277b6a
GA
17042021-07-16 Andrew Pinski <apinski@marvell.com>
1705
1706 PR c/101453
1707 * c-common.c (parse_optimize_options): Use the correct
1708 size for buffer.
1709
d97d71a1
GA
17102021-07-15 Martin Sebor <msebor@redhat.com>
1711
1712 PR c/101289
1713 PR c/97548
1714 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1715
c4fee1c6
GA
17162021-07-14 Jason Merrill <jason@redhat.com>
1717
1718 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1719
6fba0eea
GA
17202021-07-06 Martin Sebor <msebor@redhat.com>
1721
1722 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1723 (gcc_cdiag_char_table): Same.
1724 (gcc_cxxdiag_char_table): Same.
6fba0eea 1725
7a60a6e8
GA
17262021-07-02 Jakub Jelinek <jakub@redhat.com>
1727
1728 * c-common.h (enum c_omp_directive_kind): New enum.
1729 (struct c_omp_directive): New type.
1730 (c_omp_categorize_directive): Declare.
1731 * c-omp.c (omp_directives): New variable.
1732 (c_omp_categorize_directive): New function.
1733
bea7c16a
GA
17342021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1735
1736 * c-ada-spec.c (packed_layout): New global variable.
1737 (dump_ada_declaration): Set it upon seeing a packed record type.
1738 Do not put the "aliased" keyword if it is set.
1739 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1740
17412021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1742
1743 * c-ada-spec.c (check_name): Rename into...
1744 (check_type_name_conflict): ...this. Minor tweak.
1745 (dump_ada_function_declaration): Adjust to above renaming.
1746 (dump_ada_array_domains): Fix oversight.
1747 (dump_ada_declaration): Call check_type_name_conflict for variables.
1748
90708f87
GA
17492021-06-25 Martin Sebor <msebor@redhat.com>
1750
1751 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1752 (c_common_truthvalue_conversion): Replace direct uses of
1753 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1754 copy_no_warning.
1755 (check_function_arguments_recurse): Same.
1756 * c-gimplify.c (c_gimplify_expr): Same.
1757 * c-warn.c (overflow_warning): Same.
1758 (warn_logical_operator): Same.
1759 (warn_if_unused_value): Same.
1760 (do_warn_unused_parameter): Same.
1761
9aa8327e
GA
17622021-06-24 Jakub Jelinek <jakub@redhat.com>
1763
1764 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1765 C_ORT_OMP_TARGET.
1766 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1767 combined target constructs also add map (always, tofrom:) clause.
1768
ede6c356
GA
17692021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1770
1771 * c-attribs.c (common_handle_aligned_attribute): Remove short
1772 circuit and dead code.
1773
8dc48181
GA
17742021-06-14 Jonathan Wakely <jwakely@redhat.com>
1775
1776 PR c++/101052
1777 * known-headers.cc (get_stdlib_header_for_name): Add known
1778 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1779 exit, and getenv.
1780
8b8c3912
GA
17812021-06-12 Jason Merrill <jason@redhat.com>
1782
1783 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1784
f16f65f8
GA
17852021-06-11 Jakub Jelinek <jakub@redhat.com>
1786
1787 PR c++/100974
1788 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1789 -std=c++2b for P1938R3 consteval if support.
1790
4f625f47
GA
17912021-06-09 Jason Merrill <jason@redhat.com>
1792
1793 PR c++/100879
1794 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1795 warning.
1796
438aac59
GA
17972021-06-07 Martin Liska <mliska@suse.cz>
1798
1799 * c-target.def: Split long lines and replace them
1800 with '\n\'.
1801
600f90cb
GA
18022021-06-04 Martin Sebor <msebor@redhat.com>
1803
1804 PR c/100783
1805 * c-attribs.c (positional_argument): Bail on erroneous types.
1806
18072021-06-04 Martin Sebor <msebor@redhat.com>
1808
1809 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1810 for element presence.
1811
440c8a0a
GA
18122021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1813
1814 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1815 (dump_ada_decl_name): Likewise.
1816 (dump_anonymous_type_name): Remove parent parameter and adjust.
1817 (dump_sloc): Minor tweak.
1818 (dump_ada_array_type): Remove type parameter and adjust.
1819 (dump_ada_enum_type): Remove parent parameter and adjust.
1820 (dump_ada_node): Adjust calls to above functions.
1821 (dumped_anonymous_types): New global variable.
1822 (dump_nested_types_1): Rename into...
1823 (dump_nested_types): ...this.
1824 (dump_nested_type): Remove parent and dumped_types parameters.
1825 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1826 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1827 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1828
18292021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1830
1831 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1832 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1833
18342021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1835
1836 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1837 (htable_t): New typedef.
1838 (overloaded_names): Use it.
1839 (add_name): New function.
1840 (init_overloaded_names): Use add_name to populate the table and add
1841 special cases for sigaction and stat.
1842 (overloaded_name_p): Rename into...
1843 (overloading_index): ...this. Do not initialize overloaded_names table
1844 here. Return the index or zero.
1845 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1846 but add an overloading suffix instead.
1847 (dump_ada_specs): Initialize overloaded_names tables here.
1848
b75978d1
GA
18492021-06-01 Martin Liska <mliska@suse.cz>
1850
1851 PR other/100759
1852 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1853 to a situation where we are not in processing of an optimize
1854 pragma.
1855 * c-pragma.c (handle_pragma_pop_options): Restore target
1856 options.
1857
ee682192
GA
18582021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1859
1860 PR testsuite/100749
1861 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1862
18632021-05-31 Richard Biener <rguenther@suse.de>
1864
1865 PR c++/88601
1866 * c-common.c: Include tree-vector-builder.h and
1867 vec-perm-indices.h.
1868 (c_common_reswords): Add __builtin_shufflevector.
1869 (c_build_shufflevector): New funtion.
1870 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1871 (c_build_shufflevector): Declare.
1872
48166757
GA
18732021-05-28 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR middle-end/99928
1876 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1877 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1878
18792021-05-28 Tobias Burnus <tobias@codesourcery.com>
1880
1881 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1882
2bc6dace
GA
18832021-05-25 Martin Liska <mliska@suse.cz>
1884
1885 PR tree-optimization/92860
1886 PR target/99592
1887 * c-attribs.c (handle_optimize_attribute): Save target node
1888 before calling parse_optimize_options and save it in case
1889 it changes.
1890 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1891 (handle_pragma_pop_options): Likewise here.
1892
18932021-05-25 Martin Liska <mliska@suse.cz>
1894
1895 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1896
18972021-05-25 Jakub Jelinek <jakub@redhat.com>
1898
1899 PR middle-end/99928
1900 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1901 combined with simd and not with taskloop or for.
1902
2832d51b
GA
19032021-05-21 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR middle-end/99928
1906 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1907 on firstprivate clause copy going to target construct, and for
1908 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1909
ea34e2ed
GA
19102021-05-20 Jonathan Wakely <jwakely@redhat.com>
1911
1912 * c.opt (Wc++11-extensions, Wc++14-extensions)
1913 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1914 options.
1915
19162021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1917
1918 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1919
19202021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1921
1922 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1923 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1924 (pch_init): Renamed member.
1925 (c_common_valid_pch): Adjust access to debug_type_names.
1926
65f32e5d
GA
19272021-05-19 Martin Sebor <msebor@redhat.com>
1928
1929 PR c/100619
1930 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1931 bounds.
1932
a8daf9a1
GA
19332021-05-18 Richard Biener <rguenther@suse.de>
1934
1935 PR c/100547
1936 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1937 Reword existing nunit diagnostic.
1938
a7ffc1ef
GA
19392021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1940
1941 * c-common.c (braced_list_to_string): Return CTOR unchanged
1942 if host and target character sizes don't match.
1943
87a7d10c
GA
19442021-05-14 Martin Liska <mliska@suse.cz>
1945
1946 * c.opt: Add Warning keyword for 2 options.
1947
f9af11c7
GA
19482021-05-13 Martin Liska <mliska@suse.cz>
1949
1950 PR middle-end/100504
1951 * c-attribs.c (handle_target_clones_attribute): Expect a string
1952 argument to target_clone argument.
1953
037e3661
GA
19542021-05-11 Joseph Myers <joseph@codesourcery.com>
1955
1956 * c-lex.c (interpret_float): Handle digit separators for C2X.
1957
aa891c56
GA
19582021-05-10 Martin Liska <mliska@suse.cz>
1959
1960 * c-ada-spec.c (print_destructor): Use startswith
1961 function instead of strncmp.
1962 (dump_ada_declaration): Likewise.
1963 * c-common.c (disable_builtin_function): Likewise.
1964 (def_builtin_1): Likewise.
1965 * c-format.c (check_tokens): Likewise.
1966 (check_plain): Likewise.
1967 (convert_format_name_to_system_name): Likewise.
1968
e4ff4ffb
GA
19692021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1970
1971 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1972 complex divide
1973
c0fa3f2f
GA
19742021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1975 Nathan Sidwell <nathan@codesourcery.com>
1976 Tom de Vries <vries@codesourcery.com>
1977 Julian Brown <julian@codesourcery.com>
1978 Kwok Cheung Yeung <kcy@codesourcery.com>
1979
1980 * c.opt (Wopenacc-parallelism): New.
1981
6e81e015
GA
19822021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1983
1984 * c.opt (fopenacc-kernels=): Remove.
1985
019a9220
GA
19862021-04-08 Jakub Jelinek <jakub@redhat.com>
1987
1988 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1989 occured -> occurred.
1990 (check_alignment_of_packed_member): Fix a comment typo,
1991 memeber -> member.
1992 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1993 and onless -> unless.
1994 (warn_parm_array_mismatch): Fix comment typos, declaratation
1995 -> declaration and woud -> would. Fix up comment indentation.
1996
19972021-04-08 Martin Sebor <msebor@redhat.com>
1998
1999 PR middle-end/99883
2000 * c.opt (Wmismatched-new-delete): Correct spelling.
2001
b1da9916
GA
20022021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2003
2004 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2005 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2006 enumeral types use again the type name for the enumeration constants.
2007 (dump_ada_node): Adjust call to dump_ada_enum_type.
2008 (dump_nested_type): Likewise.
2009
f1607029
GA
20102021-04-01 Jason Merrill <jason@redhat.com>
2011
2012 PR c++/98481
2013 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2014
4493b1c1
GA
20152021-03-25 Jakub Jelinek <jakub@redhat.com>
2016
2017 PR c++/99565
2018 * c-warn.c (do_warn_duplicated_branches): Pass also
2019 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2020
6af7b307
GA
20212021-03-20 Jakub Jelinek <jakub@redhat.com>
2022
2023 PR debug/99230
2024 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2025
ceae9533
GA
20262021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2027
2028 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2029 after entering the separate class package, if any.
2030
67f10d28
GA
20312021-03-04 Richard Biener <rguenther@suse.de>
2032
2033 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2034 Handle ERROR_MARK.
2035
20362021-03-04 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR c/99325
2039 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2040 (token_streamer::stream) Likewise.
2041 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2042 UNKNOWN_LOCATION.
2043
f3641ac7
GA
20442021-03-03 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR c/99324
2047 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2048 instead of mark_addressable. Fix a comment typo -
2049 neutrallly -> neutrally.
2050
2c83c3fb
GA
20512021-02-28 Jakub Jelinek <jakub@redhat.com>
2052
2053 PR c/99304
2054 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2055 message - refernced -> referenced. Remove superfluous space before
2056 closing paren of function calls.
2057
daa68844
GA
20582021-02-25 Nathan Sidwell <nathan@acm.org>
2059
2060 PR c++/99166
2061 * c.opt (-flang-info-module-cmi): Renamed option.
2062
50352c6c
GA
20632021-02-19 Nathan Sidwell <nathan@acm.org>
2064
2065 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2066
bf81237e
GA
20672021-02-18 H.J. Lu <hjl.tools@gmail.com>
2068
2069 PR target/99113
2070 * c-attribs.c (c_common_attribute_table): Add the "retain"
2071 attribute.
2072 (handle_retain_attribute): New function.
2073
0e804ce3
GA
20742021-02-16 Marek Polacek <polacek@redhat.com>
2075
2076 PR c++/99062
2077 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2078 alignment argument is non-negative. Tweak a warning message.
2079
fab095da
GA
20802021-02-12 Martin Sebor <msebor@redhat.com>
2081
2082 PR c/99055
2083 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2084 print_generic_expr_to_str.
2085
4b37c3ea
GA
20862021-02-10 Richard Biener <rguenther@suse.de>
2087
2088 * c-common.c (parse_optimize_options): Free decoded_options.
2089
a19dd5e6
GA
20902021-02-04 emsr <3dw4rd@verizon.net>
2091
2092 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2093
9faaa807
GA
20942021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2095
2096 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2097 * c-lex.c (interpret_integer): Set node type for size literal.
2098
85d04a2e
GA
20992021-01-28 Jakub Jelinek <jakub@redhat.com>
2100
2101 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2102 draft from description.
2103 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2104
e62bb7f0
GA
21052021-01-26 Paul Fee <paul.f.fee@gmail.com>
2106
2107 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2108 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2109 and -std=gnu++2b
2110 * c-opts.c (set_std_cxx23): New.
2111 (c_common_handle_option): Set options when -std=c++23 is enabled.
2112 (c_common_post_options): Adjust comments.
2113 (set_std_cxx20): Likewise.
2114
161e4c08
GA
21152021-01-25 Martin Sebor <msebor@redhat.com>
2116
2117 PR c++/98646
2118 * c-common.c (check_nonnull_arg): Adjust warning text.
2119
4c9bcd5c
GA
21202021-01-17 Martin Sebor <msebor@redhat.com>
2121
2122 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2123 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2124
59cf67d1
GA
21252021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2126
2127 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2128 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2129
2f7f0d32
GA
21302021-01-15 Jakub Jelinek <jakub@redhat.com>
2131
2132 PR tree-optimization/98597
2133 * c-pretty-print.c: Include options.h.
2134 (c_fold_indirect_ref_for_warn): New function.
2135 (print_mem_ref): Use it. If it returns something that has compatible
2136 type and is TBAA compatible with zero offset, print it and return,
2137 otherwise print it using offsetof syntax or array ref syntax. Fix up
2138 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2139 argument has pointer to array type. Print pointers using the standard
2140 formatting.
2141
6851dda2
GA
21422021-01-12 Martin Sebor <msebor@redhat.com>
2143
2144 PR c/98597
2145 PR c/98592
2146 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2147 has pointer type. Remove redundant code. Avoid calling
2148 gimple_canonical_types_compatible_p.
2149
7d187e4f
GA
21502021-01-07 Martin Sebor <msebor@redhat.com>
2151
2152 PR middle-end/98578
2153 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2154 Avoid assuming acces type's size is constant. Correct condition
2155 guarding the printing of a parenthesis.
2156
942ae5be
GA
21572021-01-06 Martin Sebor <msebor@redhat.com>
2158
2159 PR c++/95768
2160 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2161 SSA_NAMEs print VLA names and GIMPLE defining statements.
2162 (print_mem_ref): New function.
2163 (c_pretty_printer::unary_expression): Call it.
2164
21652021-01-06 Richard Biener <rguenther@suse.de>
2166
2167 PR tree-optimization/95582
2168 * c-attribs.c (c_common_attribute_table): Add entry for
2169 signed_bool_precision.
2170 (handle_signed_bool_precision_attribute): New.
2171
8daa719b
GA
21722020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2173
2174 * c.opt: Add -stdlib= option and enumerations for
2175 libstdc++ and libc++.
2176
eefe499f
GA
21772020-12-16 Martin Liska <mliska@suse.cz>
2178
2179 * c.opt: Remove usage of Report.
2180
d52945ce
GA
21812020-12-14 Martin Sebor <msebor@redhat.com>
2182
2183 PR middle-end/98166
2184 PR c++/57111
2185 PR middle-end/98160
2186 * c-attribs.c (maybe_add_noinline): New function.
2187 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2188 Implicitly add attribute noinline to functions not declared inline
2189 and warn on those.
2190
ca2bd949
GA
21912020-12-09 Tobias Burnus <tobias@codesourcery.com>
2192
2193 * c-pragma.c (omp_pragmas): Add 'allocate'.
2194 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2195
f6e8e279
GA
21962020-12-08 Jakub Jelinek <jakub@redhat.com>
2197
2198 PR c++/98187
2199 * c-pragma.c (omp_pragmas): Remove "master".
2200 (omp_pragmas_simd): Add "master".
2201
bc8a7013
GA
22022020-12-07 Marek Polacek <polacek@redhat.com>
2203
2204 PR c++/98126
2205 * c-common.c (verify_tree_lim_r): New function.
2206 (verify_sequence_points): Use it. Use nullptr instead of 0.
2207
b8dd0ef7
GA
22082020-12-03 Martin Sebor <msebor@redhat.com>
2209
2210 PR c++/90629
2211 PR middle-end/94527
2212 * c-attribs.c (handle_dealloc_attribute): New function.
2213 (handle_malloc_attribute): Handle argument forms of attribute.
2214 * c.opt (-Wmismatched-dealloc): New option.
2215 (-Wmismatched-new-delete): New option.
2216
22172020-12-03 Jakub Jelinek <jakub@redhat.com>
2218
2219 PR libstdc++/93121
2220 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2221 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2222
e0f5e792
GA
22232020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2224
2225 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2226 {__GNUC_EXECUTION_CHARSET_NAME} and
2227 _WIDE_EXECUTION_CHARSET_NAME} macros.
2228
22292020-12-01 Nathan Sidwell <nathan@acm.org>
2230
2231 * c-common.c (module, import, export): New internal tokens (with
2232 trailing space).
2233 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2234 them.
2235 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2236 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2237
22382020-12-01 Nathan Sidwell <nathan@acm.org>
2239
2240 * c-opts.c (c_common_init_options): Ask for module dependencies.
2241 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2242 * c-pch.c (c_common_valid_pch): ... does not play with C++
2243 modules.
2244 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2245 options.
2246 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2247 (fmodule-only, fmodule-mapper, fmodule-lazy)
2248 (fmodule-version-ignore, Winvalid-imported-macros)
2249 (flang-info-include-translate, flang-info-include-translate-not):
2250 New options
2251
5fbf0ecb
GA
22522020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2253
2254 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2255 (dump_ada_structure): Also deal with convention, unchecked union and
2256 bit-field for nested types. In the latter case, print an Alignment
2257 aspect along with the Pack aspect.
2258
360258da
GA
22592020-11-25 Martin Sebor <msebor@redhat.com>
2260
2261 PR bootstrap/94982
2262 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2263 -Wformat-diag.
2264
1e2c9a27
GA
22652020-11-24 Martin Sebor <msebor@redhat.com>
2266
2267 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2268
8e6198d0
GA
22692020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2270
2271 * c-attribs.c (handle_special_var_sec_attribute): New.
2272 (handle_noinit_attribute): Remove.
2273 (attr_noinit_exclusions): Rename to...
2274 (attr_section_exclusions): ...this, and add "persistent" attribute
2275 exclusion.
2276 (c_common_attribute_table): Add "persistent" attribute.
2277
7a97e2fc
GA
22782020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2279
2280 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2281 Treat opaque types like other types.
2282 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2283 supported types.
2284
82e5048e
GA
22852020-11-20 Martin Sebor <msebor@redhat.com>
2286
2287 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2288 with fewer arguments.
2289
22902020-11-20 Martin Sebor <msebor@redhat.com>
2291
2292 PR middle-end/97879
2293 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2294 Error out on invalid modes.
2295
22962020-11-20 Jakub Jelinek <jakub@redhat.com>
2297
2298 PR libstdc++/88101
2299 * c-common.c (check_builtin_function_arguments): Handle
2300 BUILT_IN_CLEAR_PADDING.
2301
25bb75f8
GA
23022020-11-18 Nathan Sidwell <nathan@acm.org>
2303
2304 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2305
4dabb037
GA
23062020-11-17 Nathan Sidwell <nathan@acm.org>
2307
2308 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2309 after newly-added CTI_MODULE_HWM.
2310
23112020-11-17 Joseph Myers <joseph@codesourcery.com>
2312
2313 * c-cppbuiltin.c (builtin_define_float_constants): Define
2314 "*_IS_IEC_60559__" macros.
2315
23162020-11-17 Nathan Sidwell <nathan@acm.org>
2317
2318 * c-lex.c: #include "langhooks.h".
2319 (cb_undef): Maybe call preprocess_undef lang hook.
2320 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2321 lang hook.
2322 (push_command_line_include): Maybe call preprocess_main_file lang
2323 hook.
2324 (cb_file_change): Likewise.
2325 * c-ppoutput.c: #include "langhooks.h.
2326 (scan_translation_unit): Maybe call preprocess_token lang hook.
2327 (class do_streamer): New, derive from token_streamer.
2328 (directives_only_cb): Data pointer is do_streamer, call
2329 preprocess_token lang hook.
2330 (scan_translation_unit_directives_only): Use do_streamer.
2331 (print_line_1): Move src_line recording to after string output.
2332 (cb_undef): Maybe call preprocess_undef lang hook.
2333
23342020-11-17 Nathan Sidwell <nathan@acm.org>
2335
2336 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2337 code duplicating that functionality.
2338
23392020-11-17 Jakub Jelinek <jakub@redhat.com>
2340
2341 PR c/90628
2342 * c-common.c (check_builtin_function_arguments)
2343 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2344 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2345 for more builtins and argument positions.
2346
29c5d9ce
GA
23472020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2348
2349 PR objc/97854
2350 * stub-objc.c: Include c-common.h to declare enum rid.
2351
77f67db2
GA
23522020-11-13 Jakub Jelinek <jakub@redhat.com>
2353
2354 PR c++/63287
2355 * c-cppbuiltin.c: Include configargs.h.
2356 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2357 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2358 "single".
2359
23602020-11-13 Gergö Barany <gergo@codesourcery.com>
2361 Thomas Schwinge <thomas@codesourcery.com>
2362
2363 * c.opt (fopenacc-kernels): Add.
2364
23652020-11-13 Jason Merrill <jason@redhat.com>
2366
2367 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2368
23692020-11-13 Piotr H. Dabrowski <phd@phd.re>
2370
2371 PR c++/91318
2372 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2373
23742020-11-13 Martin Liska <mliska@suse.cz>
2375
2376 * c-attribs.c (build_attr_access_from_parms): Format properly.
2377
23782020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2379
2380 PR objc/90707
2381 * c-common.c (c_common_reswords): null_unspecified, nullable,
2382 nonnull, null_resettable: New keywords.
2383 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2384 RID_NONNULL, RID_NULL_RESETTABLE: New.
2385 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2386 ranges accepted for property attributes.
2387 * c-attribs.c (handle_objc_nullability_attribute): New.
2388 * c-objc.h (enum objc_property_attribute_group): Add
2389 OBJC_PROPATTR_GROUP_NULLABLE.
2390 (enum objc_property_attribute_kind):Add
2391 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2392 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2393
23942020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2395
2396 PR objc/77404
2397 * c-attribs.c (handle_objc_root_class_attribute): New
2398 * c-objc.h (objc_start_class_interface): Add a location
2399 value for the position of the class name.
2400 * c.opt: Add Wobjc-root-class.
2401 * stub-objc.c (objc_start_class_interface): Add a location
2402 value for the position of the class name.
2403
a5a11525
GA
24042020-11-12 Joseph Myers <joseph@codesourcery.com>
2405
2406 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2407 Allow scope for C. Handle standard attributes for C. Do not
2408 accept unscoped attributes if std_syntax and not handled as
2409 standard attributes.
2410 * c-common.h (c_common_has_attribute): Update prototype.
2411
24122020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2413
2414 PR pch/86674
2415 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2416 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2417
0f5f9ed5
GA
24182020-11-11 Patrick Palka <ppalka@redhat.com>
2419
2420 PR c++/88115
2421 * c-opts.c (c_common_post_options): Update latest_abi_version.
2422
bb622641
GA
24232020-11-10 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR c/97748
2426 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2427 to false.
2428 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2429 recursively and just return true instead of warning if it is true.
2430 Handle COMPLEX_EXPR.
2431
24322020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2433
2434 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2435 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2436 (c_omp_adjust_map_clauses): New function.
2437
2bee28dd
GA
24382020-11-09 Marek Polacek <polacek@redhat.com>
2439
2440 DR 1914
2441 * c-common.c (attribute_fallthrough_p): Tweak the warning
2442 message.
2443
24442020-11-09 Patrick Palka <ppalka@redhat.com>
2445
2446 * c-pragma.c (handle_pragma_diagnostic): Split the
2447 unknown-option -Wpragmas diagnostic into a warning and a
2448 subsequent note containing a spelling suggestion. Avoid
2449 computing the suggestion if -Wpragmas warnings are being
2450 suppressed.
2451
24522020-11-09 Patrick Palka <ppalka@redhat.com>
2453
2454 PR testsuite/97117
2455 * c-indentation.c (get_visual_column): Remove location_t
2456 parameter. Move the column-tracking diagnostic code from here
2457 to ...
2458 (should_warn_for_misleading_indentation): ... here, before the
2459 early exit for when the loci are not all distinct. Don't pass a
2460 location_t argument to get_visual_column.
2461 (assert_get_visual_column_succeeds): Don't pass a location_t
2462 argument to get_visual_column.
2463 (assert_get_visual_column_fails): Likewise.
2464
fb95de7a
GA
24652020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2466
2467 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2468 of keywords accepted in @property attribute contexts.
2469 * c-objc.h (enum objc_property_attribute_group): Add
2470 OBJC_PROPATTR_GROUP_CLASS.
2471 (enum objc_property_attribute_kind): Add
2472 OBJC_PROPERTY_ATTR_CLASS.
2473
2da7ee05
GA
24742020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2475
2476 * c-common.c (c_common_reswords): Add 'atomic' property
2477 attribute.
2478 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2479 property attributes.
2480
24812020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2482
2483 * c-attribs.c (handle_nsobject_attribute): New.
2484 * c.opt: Add WNSObject-attribute.
2485
44cab2d8
GA
24862020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2487
2488 * c-objc.h (enum objc_property_attribute_group): New
2489 (enum objc_property_attribute_kind): New.
2490 (OBJC_PROPATTR_GROUP_MASK): New.
2491 (struct property_attribute_info): Small class encapsulating
2492 parser output from property attributes.
2493 (objc_prop_attr_kind_for_rid): New
2494 (objc_add_property_declaration): Simplify interface.
2495 * stub-objc.c (enum rid): Dummy type.
2496 (objc_add_property_declaration): Simplify interface.
2497 (objc_prop_attr_kind_for_rid): New.
2498
24992020-11-06 Nathan Sidwell <nathan@acm.org>
2500
2501 * c-ada-spec.c (collect_ada_nodes): Rename
2502 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2503 (collect_ada_node): Likewise.
2504 (dump_forward_type): Likewise.
2505 * c-common.c (set_underlying_type): Rename
2506 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2507 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2508
25092020-11-06 Jakub Jelinek <jakub@redhat.com>
2510
2511 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2512
0cfd9109
GA
25132020-11-05 Marek Polacek <polacek@redhat.com>
2514
2515 PR c++/97675
2516 * c.opt (Wexceptions): New option.
2517
25182020-11-05 Marek Polacek <polacek@redhat.com>
2519
2520 PR c++/25814
2521 * c.opt (Wvexing-parse): New option.
2522
35c125cb
GA
25232020-11-04 Jakub Jelinek <jakub@redhat.com>
2524
2525 PR c++/97670
2526 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2527 underlying decl to clear in the allocate_head bitmap.
2528
25292020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2530
2531 * c-objc.h (objc_non_constant_expr_p): New.
2532 * stub-objc.c (objc_non_constant_expr_p): New.
2533
fd2325ea
GA
25342020-11-03 Nathan Sidwell <nathan@acm.org>
2535
2536 * c.opt (MQ,MT): Reword description to be make-agnostic.
2537
88ce3d5f
GA
25382020-11-02 Nathan Sidwell <nathan@acm.org>
2539
2540 * c-opts.c (c_common_post_options): Move var decl to its
2541 initialization point.
2542
25432020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2544
2545 * c-lex.c (c_lex_with_flags): When combining '@' with a
2546 keyword for Objective-C, combine the location ranges too.
2547
25482020-10-30 Qing Zhao <qing.zhao@oracle.com>
2549 H.J.Lu <hjl.tools@gmail.com>
2550
2551 * c-attribs.c (c_common_attribute_table): Add new attribute
2552 zero_call_used_regs.
2553 (handle_zero_call_used_regs_attribute): New function.
2554
e93aae4a
GA
25552020-10-28 Marek Polacek <polacek@redhat.com>
2556
2557 PR c++/97573
2558 * c-opts.c (c_common_post_options): In C++20, turn on
2559 -Wdeprecated-enum-enum-conversion and
2560 -Wdeprecated-enum-float-conversion.
2561 * c.opt (Wdeprecated-enum-enum-conversion,
2562 Wdeprecated-enum-float-conversion): New options.
2563 (Wenum-conversion): Allow for C++ too.
2564
25652020-10-28 Jakub Jelinek <jakub@redhat.com>
2566
2567 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2568 * c-omp.c: Include bitmap.h.
2569 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2570
f19e7c8d
GA
25712020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2572
2573 * c-common.c (__is_nothrow_assignable): New.
2574 (__is_nothrow_constructible): Likewise.
2575 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2576 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2577
efe71fcc
GA
25782020-10-23 Jan Hubicka <hubicka@ucw.cz>
2579
2580 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2581
25822020-10-23 Marek Polacek <polacek@redhat.com>
2583
2584 PR c++/91741
2585 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2586 (c_common_init_ts): Likewise.
2587 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2588 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2589 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2590 (maybe_warn_sizeof_array_div): New function.
2591 * c.opt (Wsizeof-array-div): New option.
2592
25932020-10-23 Martin Sebor <msebor@redhat.com>
2594
2595 PR c/97463
2596 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2597
56ddd5e2
GA
25982020-10-22 Martin Liska <mliska@suse.cz>
2599
2600 PR c/94722
2601 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2602 (handle_stack_protect_attribute): Add error message for a
2603 no_stack_protector function.
2604
26052020-10-22 Martin Liska <mliska@suse.cz>
2606
2607 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2608
26092020-10-22 Jan Hubicka <hubicka@ucw.cz>
2610
2611 * c-gimplify.c: Include tree-nested.h
2612 (c_genericize): Update for new nested function info.
2613
b2698c21
GA
26142020-10-14 Martin Sebor <msebor@redhat.com>
2615
2616 PR c/97413
2617 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2618 bounds in an extra list.
2619
7e9282ae
GA
26202020-10-05 Richard Biener <rguenther@suse.de>
2621 Jakub Jelinek <jakub@redhat.com>
2622
2623 PR c++/97197
2624 * c-pretty-print.c: Include langhooks.h.
2625 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2626 expression.
2627 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2628 unary_expression.
2629 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2630
660bfe61
GA
26312020-09-30 Martin Sebor <msebor@redhat.com>
2632
2633 PR middle-end/97189
2634 * c-attribs.c (append_access_attr): Use the function declaration
2635 location for a warning about an attribute access argument.
2636
93bca37c
GA
26372020-09-29 Marek Polacek <polacek@redhat.com>
2638
2639 PR c++/94695
2640 * c.opt (Wrange-loop-construct): New option.
2641
82b77dee
GA
26422020-09-23 Martin Sebor <msebor@redhat.com>
2643
2644 PR c/97131
2645 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2646
26472020-09-23 Marek Polacek <polacek@redhat.com>
2648
2649 PR c/97125
2650 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2651 after loops and other structured control constructs have been lowered.
2652
521d2711
GA
26532020-09-22 Jakub Jelinek <jakub@redhat.com>
2654
2655 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2656 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2657
44135373
GA
26582020-09-21 Marek Polacek <polacek@redhat.com>
2659
2660 * c.opt (Wctad-maybe-unsupported): New option.
2661
2fe5b7d1
GA
26622020-09-19 Martin Sebor <msebor@redhat.com>
2663
2664 PR c/50584
2665 * c-common.h (warn_parm_array_mismatch): Declare new function.
2666 (has_attribute): Move declaration of an existing function.
2667 (build_attr_access_from_parms): Declare new function.
2668 * c-warn.c (parm_array_as_string): Define new function.
2669 (plus_one): Define new function.
2670 (warn_parm_ptrarray_mismatch): Define new function.
2671 (warn_parm_array_mismatch): Define new function.
2672 (vla_bound_parm_decl): New function.
2673 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2674 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2675 qualifiers here...
2676 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2677 them in brackets here. Also print [static]. Strip extraneous
2678 expressions from VLA bounds.
2679
26802020-09-19 Martin Sebor <msebor@redhat.com>
2681
2682 PR c/50584
2683 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2684 (handle_argspec_attribute): New function.
2685 (get_argument, get_argument_type): New functions.
2686 (append_access_attrs): Add overload. Handle internal attribute
2687 representation in addition to external.
2688 (handle_access_attribute): Handle internal attribute representation
2689 in addition to external.
2690 (build_attr_access_from_parms): New function.
2691
26922020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2693
2694 * c-gimplify.c (genericize_c_loop): Rewrite to match
2695 c_finish_loop in c-typeck.c.
2696
26972020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2698
2699 * c-common.c (c_block_may_fallthrough): New, split from
2700 cxx_block_may_fallthrough in the cp front end.
2701 (c_common_init_ts): Move handling of loop and switch-related
2702 statements here from the cp front end.
2703 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2704 cp front end.
2705 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2706 * c-common.h (c_block_may_fallthru): Declare.
2707 (bc_state_t): Move here from cp front end.
2708 (save_bc_state, restore_bc_state): Declare.
2709 (c_genericize_control_stmt): Declare.
2710 (WHILE_COND, WHILE_BODY): Likewise.
2711 (DO_COND, DO_BODY): Likewise.
2712 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2713 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2714 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2715 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2716 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2717 * c-dump.c (dump_stmt): Copy from cp front end.
2718 (c_dump_tree): Move code to handle structured loop and switch
2719 tree nodes here from cp front end.
2720 * c-gimplify.c: Adjust includes.
2721 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2722 cp front end.
2723 (save_bc_state, restore_bc_state): New functions using old code
2724 from cp front end.
2725 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2726 (genericize_c_loop): Move from cp front end.
2727 (genericize_for_stmt, genericize_while_stmt): Likewise.
2728 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2729 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2730 (genericize_omp_for_stmt): Likewise.
2731 (c_genericize_control_stmt): New function using code split from
2732 cp front end.
2733 (c_genericize_control_r): New.
2734 (c_genericize): Call walk_tree with c_genericize_control_r.
2735 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2736 structured loop and switch tree nodes here from cp front end.
2737
2aad20c0
GA
27382020-09-17 Patrick Palka <ppalka@redhat.com>
2739
2740 PR c/80076
2741 * c-indentation.c (should_warn_for_misleading_indentation): Move
2742 declarations of local variables closer to their first use.
2743 Handle virtual token locations by resolving them to their
2744 respective macro expansion points. If all three tokens are
2745 produced from the same macro expansion, then instead use their
2746 loci within the macro definition.
2747
ecde1b0a
GA
27482020-09-16 Martin Sebor <msebor@redhat.com>
2749
2750 PR c/78666
2751 PR c/96126
2752 * c-attribs.c (validate_attr_args): New function.
2753 (validate_attr_arg): Same.
2754 (handle_section_attribute): Call it. Introduce a local variable.
2755 (handle_alloc_size_attribute): Same.
2756 (handle_alloc_align_attribute): Same.
2757
50a71cd0
GA
27582020-09-14 Jakub Jelinek <jakub@redhat.com>
2759
2760 * c-attribs.c (handle_optimize_attribute): Adjust
2761 cl_optimization_save, cl_optimization_restore and
2762 build_optimization_node callers.
2763 * c-pragma.c (handle_pragma_optimize): Adjust
2764 build_optimization_node caller.
2765 (handle_pragma_push_options): Adjust
2766 build_optimization_node and build_target_option_node callers.
2767 (handle_pragma_pop_options, handle_pragma_reset_options):
2768 Adjust cl_optimization_restore callers.
2769
8f7ea26a
GA
27702020-08-28 Martin Sebor <msebor@redhat.com>
2771
2772 * c.opt (Wstringop-overread): New option.
2773
a6493809
GA
27742020-08-11 Jakub Jelinek <jakub@redhat.com>
2775
2776 PR c/96545
2777 * c-common.c (get_atomic_generic_size): Require that first argument's
2778 type points to a complete type and use tree_fits_uhwi_p instead of
2779 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2780
48cc2e46
GA
27812020-07-31 Martin Sebor <msebor@redhat.com>
2782
2783 PR c++/96003
2784 * c-common.c (check_function_arguments_recurse): Return early when
2785 no-warning bit is set.
2786
27872020-07-31 Richard Biener <rguenther@suse.de>
2788
2789 PR debug/96383
2790 * c-common.h (c_common_finalize_early_debug): Declare.
2791 * c-common.c: Include debug.h.
2792 (c_common_finalize_early_debug): finalize_early_debug langhook
2793 implementation generating debug for extern declarations.
2794
e71dab87
GA
27952020-07-27 Nathan Sidwell <nathan@acm.org>
2796
2797 * c-common.c (try_to_locate_new_include_insertion_point): Use
2798 strcmp, not pointer equality.
2799
ae2e0bc1
GA
28002020-07-25 Martin Sebor <msebor@redhat.com>
2801
2802 PR c++/96310
2803 * c-common.c (check_nonnull_arg): Print note only when warning was
2804 issued.
2805
3ea9abca
GA
28062020-07-22 Tobias Burnus <tobias@codesourcery.com>
2807
2808 * c-omp.c (c_finish_omp_critical): Check for no name but
2809 nonzero hint provided.
2810
0933f508
GA
28112020-07-20 Jason Merrill <jason@redhat.com>
2812
2813 * c-cppbuiltin.c (c_cpp_builtins): Update
2814 __cpp_nontype_template_args for C++20.
2815
28162020-07-20 Martin Sebor <msebor@redhat.com>
2817
2818 PR c/96249
2819 * c.opt: Remove stray text.
2820
8ca07a30
GA
28212020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2822
2823 PR other/86904
2824 * c-indentation.c (should_warn_for_misleading_indentation): Get
2825 global tabstop from the new source.
2826 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2827 is now a common option.
2828 * c.opt: Likewise.
2829
a82c4c4c 28302020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2831
2832 * c.opt (Wscalar-storage-order): Add explicit variable.
2833
f60ee68d
GA
28342020-07-07 Nathan Sidwell <nathan@acm.org>
2835
2836 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2837 cpp_read_main_file.
2838 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2839 maps. Force token position to line_table's highest line.
2840 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2841 (cb_define): Always increment source line.
2842
4077d74c
GA
28432020-07-06 Martin Sebor <msebor@redhat.com>
2844
2845 PR c++/95984
2846 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2847 to stub lambda objects with null this pointer.
2848 (check_nonnull_arg): Handle C++ nullptr.
2849
b5f24739
GA
28502020-07-02 Jason Merrill <jason@redhat.com>
2851 Jakub Jelinek <jakub@redhat.com>
2852
2853 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2854
46fbb6c6
GA
28552020-06-30 Jakub Jelinek <jakub@redhat.com>
2856
2857 PR c++/95963
2858 * c-common.c (check_function_arguments_recurse): Don't crash on
2859 calls to internal functions.
2860
69273534
GA
28612020-06-28 Martin Sebor <msebor@redhat.com>
2862
2863 PR c++/86568
2864 * c-common.c (struct nonnull_arg_ctx): Add members.
2865 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2866 C++ member functions specially. Consider the this pointer implicitly
2867 nonnull.
2868 (check_nonnull_arg): Use location of argument when available.
2869 (check_function_arguments): Use nonnull_arg_ctx as argument.
2870
9a33c41f
GA
28712020-06-27 Jakub Jelinek <jakub@redhat.com>
2872
2873 PR middle-end/95903
2874 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2875 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2876 smaller precision intop operands separately.
2877
c9c05f73
GA
28782020-06-26 Marek Polacek <polacek@redhat.com>
2879
2880 * c-opts.c (c_common_init_options): Default to gnu++17.
2881
aff95ee7
GA
28822020-06-17 Jonathan Wakely <jwakely@redhat.com>
2883
bd0a89dc 2884 PR c/95378
aff95ee7
GA
2885 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2886 pointer arguments.
2887
56638b9b
GA
28882020-06-16 Jakub Jelinek <jakub@redhat.com>
2889
2890 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2891 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2892 idx members.
2893 (c_omp_is_loop_iterator): New function.
2894 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2895 if outer loop iterator is present. Perform duplicate checking through
2896 hash_set in the function rather than expecting caller to do that.
2897 Pass NULL instead of d->ppset to walk_tree_1.
2898 (c_omp_check_nonrect_loop_iv): New function.
2899 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2900 non-rectangular loop forms, diagnose multiple associated loops with
2901 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2902 (c_omp_check_loop_iv_exprs): Likewise.
2903
ec6ffbb9
GA
29042020-06-10 Martin Liska <mliska@suse.cz>
2905
2906 PR tree-optimization/92860
2907 * c-attribs.c (handle_optimize_attribute):
2908 Save global options and compare it after parsing of function
2909 attribute.
2910 * c-pragma.c (opt_stack::saved_global_options): New field.
2911 (handle_pragma_push_options): Save global_options.
2912 (handle_pragma_pop_options): Compare them after pop.
2913
b952c2cf
GA
29142020-06-09 Jakub Jelinek <jakub@redhat.com>
2915
2916 PR c/95580
2917 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2918 case when MEM_REF's first argument has type pointer to incomplete type.
2919
1a59f3db
GA
29202020-06-05 Jason Merrill <jason@redhat.com>
2921
2922 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2923 operand to POINTER_PLUS_EXPR.
2924
3add3425
GA
29252020-06-04 Martin Sebor <msebor@redhat.com>
2926
2927 PR middle-end/10138
2928 PR middle-end/95136
2929 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2930 (handle_access_attribute): Same.
2931
9a5b7438
GA
29322020-06-03 Mark Wielaard <mark@klomp.org>
2933
2934 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2935 New function.
2936 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2937 New function declaration.
2938
29392020-06-03 Mark Wielaard <mark@klomp.org>
2940
2941 * known-headers.cc (get_string_macro_hint): New function.
2942 (get_stdlib_header_for_name): Use get_string_macro_hint.
2943 (get_c_stdlib_header_for_string_macro_name): New function.
2944 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2945 New function declaration.
2946
29472020-06-03 Tobias Burnus <tobias@codesourcery.com>
2948
2949 * c-common.h (c_omp_predetermined_mapping): Declare.
2950 * c-omp.c (c_omp_predetermined_mapping): New.
2951
af114c38
MW
29522020-05-22 Mark Wielaard <mark@klomp.org>
2953
2954 * known-headers.cc (get_stdlib_header_for_name): Add a new
2955 stdlib_hint array for stdbool and stdint.
2956
45c50b6a
MW
29572020-05-22 Mark Wielaard <mark@klomp.org>
2958
2959 * known-headers.cc (get_stdlib_header_for_name): Return
2960 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2961 flag_isoc99.
2962
c22027a0
NS
29632020-05-20 Nathan Sidwell <nathan@acm.org>
2964
38a4db21
NS
2965 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2966
c22027a0
NS
2967 * c-common.c (try_to_locate_new_include_insertion_point): Use
2968 strcmp to compare filenames.
2969 * c-lex.c (init_c_lex): Move declaration to initialization.
2970 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2971 deferred count loop.
2972
29f0e90d
JM
29732020-05-15 Jason Merrill <jason@redhat.com>
2974
2975 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2976
b04445d4
JM
29772020-05-13 Jason Merrill <jason@redhat.com>
2978
2979 * c.opt (std=c++20): Make c++2a the alias.
2980 (std=gnu++20): Likewise.
2981 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2982 * c-opts.c: Adjust.
2983 * c-cppbuiltin.c: Adjust.
2984 * c-ubsan.c: Adjust.
2985 * c-warn.c: Adjust.
2986
11dd3be5
EB
29872020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2988
2989 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2990
b224c376
NS
29912020-05-08 Nathan Sidwell <nathan@acm.org>
2992
2993 Reimplement directives only processing.
2994 * c-ppoutput.c (token_streamer): Ne.
2995 (directives_only_cb): New. Swallow ...
2996 (print_lines_directives_only): ... this.
2997 (scan_translation_unit_directives_only): Reimplment using the
2998 published interface.
2999
f1d94677
MP
30002020-05-07 Marek Polacek <polacek@redhat.com>
3001
3002 * c-format.c (badwords): Add "nonstatic".
3003
9b95bb52
JJ
3004202-05-07 Jakub Jelinek <jakub@redhat.com>
3005
3006 PR c/94968
3007 * c-common.c (speculation_safe_value_resolve_params): Return false if
3008 error_operand_p (val2).
3009 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3010 Remove extraneous semicolon.
3011
530b4409 30122020-05-06 qing zhao <qing.zhao@oracle.com>
3013
3014 PR c/94230
3015 * c-indentation.c (get_visual_column): Add a hint to use the new
3016 -flarge-source-files option.
3017
b776bdca
SSF
30182020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3019
3020 * c-attribs.c (handle_vector_size_attribute): Add attribute
3021 nonnull for argument args in order to silence warning of
3022 uninitialized variable usage. Since this is local to the
3023 compilation unit and thus cannot be checked at call sides by the
3024 compiler, added an assert statement in order to verify this.
3025
6607bdd9
L
30262020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3027
3028 PR target/93492
3029 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3030 value to USHRT_MAX (65535).
3031
691eeb65
JJ
30322020-04-29 Jakub Jelinek <jakub@redhat.com>
3033
3034 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3035
26d76be7
JJ
30362020-04-27 Jakub Jelinek <jakub@redhat.com>
3037
3038 PR c/94755
3039 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3040 fncode == BUILT_IN_NONE before initialization of first_param.
3041
7291b2ed
MP
30422020-04-23 Marek Polacek <polacek@redhat.com>
3043
3044 PR c++/94733
3045 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3046 TREE_PURPOSE.
3047
58a29af8
PP
30482020-04-14 Patrick Palka <ppalka@redhat.com>
3049
3050 PR c++/85278
3051 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3052 ampersand if it's an rvalue reference type.
3053
09f04139
MS
30542020-04-13 Martin Sebor <msebor@redhat.com>
3055
3056 PR c/92326
3057 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3058 printing array bound for flexible array members.
3059
ee26baf4
IS
30602020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3061
3062 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3063 define, per n4861.
3064
75efe9cb
RB
30652020-04-02 Richard Biener <rguenther@suse.de>
3066
3067 PR c/94392
3068 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3069 for -O2 and C++11 or newer.
3070
75defde9
PP
30712020-03-28 Patrick Palka <ppalka@redhat.com>
3072
3073 * c.opt: Add -fconcepts-diagnostics-depth.
3074
52f24a9e
MS
30752020-03-27 Martin Sebor <msebor@redhat.com>
3076
3077 PR c++/94346
3078 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3079 to decl_attributes. Make handling of different kinds of entities
3080 more robust.
3081
ccacf77b
MS
30822020-03-27 Martin Sebor <msebor@redhat.com>
3083
3084 PR c++/94098
3085 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3086 here.
3087
ca6c7225
JJ
30882020-03-23 Jakub Jelinek <jakub@redhat.com>
3089
3090 PR c++/91993
3091 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3092 result being COMPOUND_EXPRs, skip to ultimate rhs.
3093
1aa22b19
RS
30942020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3095
3096 PR middle-end/94072
3097 * c-common.c (c_common_type_for_mode): Before using a registered
3098 built-in type, check that the vectorness of the type matches
3099 the vectorness of the mode.
3100
700d4cb0
JJ
31012020-03-17 Jakub Jelinek <jakub@redhat.com>
3102
3103 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3104 issue in a diagnostic message.
3105
b408e010
LH
31062020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3107
3108 * c.opt: Avoid redundancy in the help text.
3109
e78e50d5
MP
31102020-03-02 Marek Polacek <polacek@redhat.com>
3111
3112 PR c++/93958 - add missing -std=gnu++20.
3113 * c.opt: Add -std=gnu++20.
3114
649e1741
MS
31152020-03-01 Martin Sebor <msebor@redhat.com>
3116
3117 PR c++/92721
3118 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3119 (handle_access_attribute): Same.
3120
7b60f3ba
JJ
31212020-02-25 Jakub Jelinek <jakub@redhat.com>
3122
3123 PR c/93858
3124 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3125 "did you mean" hint in diagnostics.
3126
fb260504
JM
31272020-02-15 Jason Merrill <jason@redhat.com>
3128
3129 * c.opt: Add -std=c++20.
3130
1d757b09
EB
31312020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3132
3133 * c-ada-spec.c: Include bitmap.h.
3134 (dump_ada_double_name): Rename into...
3135 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3136 (dump_ada_array_type): Adjust to above renaming. Robustify.
3137 (dump_nested_types_1): New function copied from... Add dumped_types
3138 parameter and pass it down to dump_nested_type.
3139 (dump_nested_types): ...this. Remove parent parameter. Just call
3140 dump_nested_types_1 on an automatic bitmap.
3141 (dump_nested_type): Add dumped_types parameter.
3142 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3143 Adjust recursive calls and adjust to above renaming.
3144 (dump_ada_declaration): Adjust call to dump_nested_types.
3145 Tidy up and adjust to above renaming.
3146 (dump_ada_specs): Initialize and release bitmap obstack.
3147
0cc575e4
MS
31482020-02-10 Martin Sebor <msebor@redhat.com>
3149
3150 PR c/93640
3151 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3152
a59aa302
JJ
31532020-02-10 Jakub Jelinek <jakub@redhat.com>
3154
3155 PR other/93641
3156 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3157 Remove useless extra test.
3158
e464fc90
TB
31592020-02-03 Julian Brown <julian@codesourcery.com>
3160 Tobias Burnus <tobias@codesourcery.com>
3161
3162 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3163
e3b6c052
JM
31642020-01-29 Jason Merrill <jason@redhat.com>
3165
3166 PR c++/89357
3167 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3168
6d00f052
JM
31692020-01-23 Jason Merrill <jason@redhat.com>
3170
3171 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3172
8a990ffa
MS
31732020-01-23 Martin Sebor <msebor@redhat.com>
3174
3175 PR c/84919
3176 * c-common.c (check_function_arguments): Avoid overlap checking
3177 of sprintf functions.
3178
55b7df8b
JM
31792020-01-22 Jason Merrill <jason@redhat.com>
3180
3181 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3182 PR c++/40752
3183 * c-warn.c (conversion_warning): Check operands only after checking
3184 the whole expression. Don't check second operand of + for sign.
3185
c77074d0
JM
31862020-01-21 Jason Merrill <jason@redhat.com>
3187 Manuel López-Ibáñez <manu@gcc.gnu.org>
3188
3189 PR c++/40752 - useless -Wconversion with short +=.
3190 * c.opt (-Warith-conversion): New.
3191 * c-warn.c (conversion_warning): Recurse for operands of
3192 operators. Only warn about the whole expression with
3193 -Warith-conversion.
3194
731dbfc3
JM
31952020-01-21 Jason Merrill <jason@redhat.com>
3196
3197 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3198 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3199
ad1a3914
NS
32002020-01-20 Nathan Sidwell <nathan@acm.org>
3201
3202 PR preprocessor/80005
3203 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3204
49789fd0
IS
32052020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3206
3207 * c-common.c (co_await, co_yield, co_return): New.
3208 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3209 RID_CO_RETURN): New enumeration values.
3210 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3211 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3212 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3213 * c.opt (fcoroutines): New command-line switch.
3214
4bc1899b
DM
32152020-01-10 David Malcolm <dmalcolm@redhat.com>
3216
3217 * c-format.c (local_event_ptr_node): New.
3218 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3219 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3220 * c-format.h (T_EVENT_PTR): New define.
3221
f25e33fa
MS
32222020-01-10 Martin Sebor <msebor@redhat.com>
3223
3224 PR c/93132
3225 * c-attribs.c (append_access_attrs): Validate against the translated
3226 access string rather than the human-readable representation.
3227
8d9254fc
JJ
32282020-01-01 Jakub Jelinek <jakub@redhat.com>
3229
3230 Update copyright years.
3231
39292e25
EB
32322019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3233
3234 * c-ada-spec.h (decl_sloc): Delete.
3235 * c-ada-spec.c (decl_sloc): Make static.
3236
519d7496
JB
32372019-12-19 Julian Brown <julian@codesourcery.com>
3238
3239 * c-common.h (c_omp_map_clause_name): Add prototype.
3240 * c-omp.c (c_omp_map_clause_name): New function.
3241 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3242 PRAGMA_OACC_CLAUSE_DETACH.
3243
a6163563
JB
32442019-12-19 Julian Brown <julian@codesourcery.com>
3245 Maciej W. Rozycki <macro@codesourcery.com>
3246 Tobias Burnus <tobias@codesourcery.com>
3247 Thomas Schwinge <thomas@codesourcery.com>
3248
3249 * c-pragma.h (pragma_omp_clause): Add
3250 PRAGMA_OACC_CLAUSE_NO_CREATE.
3251
e8f1ade2
MS
32522019-12-17 Martin Sebor <msebor@redhat.com>
3253
3254 PR c++/61339
3255 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3256
368877a1
DM
32572019-12-11 David Malcolm <dmalcolm@redhat.com>
3258
3259 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3260 implementation.
3261 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3262
d68f5d45
DM
32632019-12-09 David Malcolm <dmalcolm@redhat.com>
3264
3265 * c-format.c (range_label_for_format_type_mismatch::get_text):
3266 Replace label_text ctor called with true with label_text::take.
3267
d3e28653
DM
32682019-12-09 David Malcolm <dmalcolm@redhat.com>
3269
3270 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3271 initial newline from expected outputs.
3272 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3273 call to diagnostic_show_locus.
3274
abd6d8cc
JJ
32752019-12-06 Jakub Jelinek <jakub@redhat.com>
3276
3277 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3278 now.
3279
7906797e
MP
32802019-12-05 Marek Polacek <polacek@redhat.com>
3281 Jakub Jelinek <jakub@redhat.com>
3282
3283 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3284 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3285
5c04da88
MP
32862019-12-05 Marek Polacek <polacek@redhat.com>
3287
3288 PR c++/92271 - make __is_same alias for __is_same_as.
3289 * c-common.c: Add __is_same, an alias for __is_same_as.
3290
43aae289
MP
32912019-12-03 Marek Polacek <polacek@redhat.com>
3292
3293 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3294 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3295 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3296
d7ddfbcb
JH
32972019-11-30 Jan Hubicka <hubicka@ucw.cz>
3298
3299 * c-attribs.c (handle_symver_attribute): New function
3300 (c_common_attributes): Add symver.
3301
65ef05d0
RS
33022019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3303
3304 * c-common.c (pointer_int_sum): Use verify_type_context to check
3305 whether the target allows pointer arithmetic for the types involved.
3306 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3307 to check whether the target allows sizeof and alignof operations
3308 for the types involved.
3309
1a291106
JM
33102019-11-27 Jason Merrill <jason@redhat.com>
3311
3312 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3313
05d6cb1a
JJ
33142019-11-26 Jakub Jelinek <jakub@redhat.com>
3315
3316 PR c++/61414
3317 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3318 ENUMERAL_TYPEs.
3319
5b8d9367
JM
33202019-11-25 Joseph Myers <joseph@codesourcery.com>
3321
3322 PR c/91985
3323 * c-common.c (c_common_type_for_mode): Handle decimal
3324 floating-point types being NULL_TREE.
3325 * c-format.c (get_format_for_type_1): Handle specified types being
3326 NULL_TREE.
3327 * c-lex.c (interpret_float): Give an error for decimal
3328 floating-point constants when decimal floating-point not
3329 supported.
3330
1fbf51cb
JJ
33312019-11-23 Jakub Jelinek <jakub@redhat.com>
3332
3333 PR middle-end/83859
3334 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3335 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3336 group warning with inform together.
3337 (handle_access_attribute): Formatting fix.
3338
761df906
JJ
33392019-11-22 Jakub Jelinek <jakub@redhat.com>
3340
bdaf8be1
JJ
3341 PR c/90677
3342 * c-common.h (identifier_global_tag): Declare.
3343 * c-format.c (get_pointer_to_named_type): Renamed to ...
3344 (get_named_type): ... this. Use identifier_global_tag instead of
3345 identifier_global_value, handle the return value being a TYPE_P.
3346 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3347 to call get_named_type instead. Formatting fixes.
3348
c2ecce6d 3349 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3350 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3351 and __cpp_generic_lambdas for -std=c++2a. Define
3352 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3353 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3354 __cpp_concepts for -std=c++2a.
3355
54aa6b58
MS
33562019-11-22 Martin Sebor <msebor@redhat.com>
3357
3358 PR middle-end/83859
3359 * c-attribs.c (handle_access_attribute): New function.
3360 (c_common_attribute_table): Add new attribute.
3361 (get_argument_type): New function.
3362 (append_access_attrs): New function.
3363 (get_nonnull_operand): Rename...
3364 (get_attribute_operand): ...to this.
3365 * c-common.c (get_nonnull_operand): Rename...
3366 (get_attribute_operand): ...to this.
3367
6c80b1b5
JM
33682019-11-21 Joseph Myers <joseph@codesourcery.com>
3369
3370 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3371 of warning.
3372
192961ff
JM
33732019-11-19 Joseph Myers <joseph@codesourcery.com>
3374
3375 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3376 warning for standard attributes mixed with fallthrough attributes.
3377
f8aea5e3
JM
33782019-11-15 Joseph Myers <joseph@codesourcery.com>
3379
3380 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3381 * c-common.h (handle_fallthrough_attribute): Declare.
3382
2cc94aa8
JM
33832019-11-15 Joseph Myers <joseph@codesourcery.com>
3384
3385 * c-attribs.c (handle_deprecated_attribute): Remove static.
3386 * c-common.h (handle_deprecated_attribute): Declare.
3387
7c5890cc
JM
33882019-11-14 Joseph Myers <joseph@codesourcery.com>
3389
3390 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3391 char for C.
3392
b2417b59
JJ
33932019-11-14 Jakub Jelinek <jakub@redhat.com>
3394
d0ec7c93
JJ
3395 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3396 valid vendors.
3397
b2417b59
JJ
3398 * c-omp.c (c_omp_check_context_selector): Handle name lists
3399 containing string literals. Don't diagnose atomic_default_mem_order
3400 with multiple props.
3401
00be2a5f
JM
34022019-11-13 Joseph Myers <joseph@codesourcery.com>
3403
3404 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3405 NORM_MAX constants. Update call to get_max_float.
3406 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3407 constants.
3408
2dbad62d
EB
34092019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3410
3411 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3412 (dump_forward_type): Do not generate a declaration for function types.
3413 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3414 of the component type if it is declared in another file.
3415
6ed76044
ML
34162019-11-12 Martin Liska <mliska@suse.cz>
3417
3418 * c-opts.c (c_common_post_options):
3419 Use SET_OPTION_IF_UNSET.
3420
62aee289
MR
34212019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3422 Frederik Harwath <frederik@codesourcery.com>
3423
3424 gcc/c-family/
3425 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3426 constant.
3427 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3428
f486280c
RS
34292019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3430
3431 * c-common.h (gnu_vector_type_p): New function.
3432 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3433 vectors to satisfy gnu_vector_type_p.
3434 (c_build_vec_convert): Likewise __builtin_convertvector.
3435 (convert_vector_to_array_for_subscript): Likewise when applying
3436 implicit vector to array conversion.
3437 (scalar_to_vector): Likewise when converting vector-scalar
3438 operations to vector-vector operations.
3439
017c6491
JM
34402019-11-08 Joseph Myers <joseph@codesourcery.com>
3441
3442 * c.opt (Wold-style-definition): Initialize to -1.
3443 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3444 to flag_isoc2x if not set explicitly.
3445
c01bd174
JM
34462019-11-07 Joseph Myers <joseph@codesourcery.com>
3447
3448 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3449
0df65305
JM
34502019-11-05 Jason Merrill <jason@redhat.com>
3451
3452 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3453 -fconcepts.
3454
e0c866dd
KK
34552019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3456
3457 * c-opts.c (c_common_post_options): Update
3458 latest_abi_version.
3459
f968ef9b
JJ
34602019-11-02 Jakub Jelinek <jakub@redhat.com>
3461
d0c464d2
JJ
3462 * c-common.h (c_omp_get_context_selector): Remove.
3463 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3464 and renamed to omp_get_context_selector.
3465
917dd789
JJ
3466 * c-omp.c (c_omp_mark_declare_variant): Use
3467 omp_context_selector_set_compare.
3468
f968ef9b
JJ
3469 PR c++/88335 - Implement P1073R3: Immediate functions
3470 * c-common.h (enum rid): Add RID_CONSTEVAL.
3471 * c-common.c (c_common_reswords): Add consteval.
3472
5f6705b7
JJ
34732019-11-01 Martin Sebor <msebor@redhat.com>
3474
3475 PR middle-end/91679
3476 PR middle-end/91647
3477 PR middle-end/91463
3478 PR middle-end/92312
3479 * c-pretty-print.c (direct_abstract_declarator): Print
3480 bound in zero-length arrays.
3481 * c.opt (-Wzero-length-bounds): New option.
3482
43f1814c
NS
34832019-10-30 Nathan Sidwell <nathan@acm.org>
3484
3485 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3486 macros.
3487
ad1539d5
MS
34882019-10-28 Martin Sebor <msebor@redhat.com>
3489
3490 PR c/66970
3491 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3492 even when only preprocessing.
3493 * c-common.h (names_builtin_p): Declare new function.
3494 * c-lex.c (init_c_lex): Set has_builtin.
3495 (c_common_has_builtin): Define a new function.
3496 * c-ppoutput.c (init_pp_output): Set has_builtin.
3497
135df52c
JJ
34982019-10-24 Jakub Jelinek <jakub@redhat.com>
3499
3500 * c-common.h (c_omp_context_selector_matches): Remove.
3501 * c-omp.c (c_omp_context_selector_matches): Remove.
3502 * c-attribs.c (c_common_attribute_table): Add
3503 "omp declare target {host,nohost,block}" attributes.
3504
8ad0c477
JM
35052019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3506
3507 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3508
56898e43
RS
35092019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3510
3511 * c-common.h (user_facing_original_type_p): Declare.
3512 * c-common.c: Include c-spellcheck.h.
3513 (user_facing_original_type_p): New function.
3514
20de9568
JJ
35152019-10-12 Jakub Jelinek <jakub@redhat.com>
3516
3517 * c-common.h (c_omp_mark_declare_variant,
3518 c_omp_context_selector_matches): Declare.
3519 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3520 and hsa-common.h.
3521 (c_omp_get_context_selector): Support second argument NULL.
3522 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3523 functions.
3524 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3525 attribute, add "omp declare variant base" and
3526 "omp declare variant variant" attributes.
3527
175a85b2
JM
35282019-10-11 Joseph Myers <joseph@codesourcery.com>
3529
3530 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3531 CppReason(CPP_W_C11_C2X_COMPAT).
3532
fe2bc27c
JM
35332019-10-11 Joseph Myers <joseph@codesourcery.com>
3534
3535 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3536 _Decimal64 and _Decimal128.
3537
27dfdc0f
JM
35382019-10-10 Joseph Myers <joseph@codesourcery.com>
3539
3540 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3541 types if DFP not supported.
3542
94e7f906
JJ
35432019-10-10 Jakub Jelinek <jakub@redhat.com>
3544
3545 * c-common.h (c_omp_check_context_selector,
3546 c_omp_get_context_selector): Declare.
3547 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3548 in diagnostic message.
3549 (c_omp_check_context_selector, c_omp_get_context_selector): New
3550 functions.
3551 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3552 attribute.
3553 (handle_omp_declare_variant_attribute): New function.
3554
a7160771
MS
35552019-10-09 Martin Sebor <msebor@redhat.com>
3556
3557 PR tree-optimization/90879
3558 * c.opt (-Wstring-compare): New option.
3559
cb57504a
JM
35602019-10-08 Andrew Sutton <asutton@lock3software.com>
3561 Jason Merrill <jason@redhat.com>
3562
3563 Update the concepts implementation to conform to the C++20
3564 specification, improve compile times, and generally clean up
3565 the implementation.
3566
3567 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3568 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3569 * c.opt: Add -Wconcepts-ts.
3570 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3571 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3572 (set_std_cxx2a): Enable concepts by default.
3573
fbb2a6dc
JM
35742019-10-08 Joseph Myers <joseph@codesourcery.com>
3575
3576 * c-opts.c (c_common_post_options): Set
3577 -fno-fp-int-builtin-inexact for C2X.
3578
8e007055
JJ
35792019-10-05 Jakub Jelinek <jakub@redhat.com>
3580
3581 PR c++/91369 - Implement P0784R7: constexpr new
3582 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3583 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3584
843f104d
JM
35852019-10-04 Joseph Myers <joseph@codesourcery.com>
3586
3587 PR c/82752
3588 * c-format.c (C_STD_VER): Handle C2x.
3589 (C_STD_NAME): Likewise.
3590 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3591 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3592 modifier allowed and 'p' flag.
3593 * c-format.h (enum format_std_version): Add STD_C2X.
3594 (struct format_char_info): Mention 'p' in comment on flags2.
3595
e9c9a142
DM
35962019-10-01 David Malcolm <dmalcolm@redhat.com>
3597
3598 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3599 calling diagnostic_show_locus, rather than destroying it afterwards.
3600
7552c36a
JJ
36012019-10-01 Jakub Jelinek <jakub@redhat.com>
3602
3603 PR c++/91925
3604 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3605 with NULL DECL_FIELD_OFFSET.
3606
8209db25
RS
36072019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3608
3609 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3610 has a type name, use it in preference to the __vector syntax.
3611
9343bf99
RS
36122019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3613
3614 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3615 two spaces between a comma and "...".
3616
59bc434a
JJ
36172019-09-27 Jakub Jelinek <jakub@redhat.com>
3618
3619 PR c++/88203
3620 * c-common.h (c_omp_predefined_variable): Declare.
3621 * c-omp.c (c_omp_predefined_variable): New function.
3622 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3623 for predefined variables.
3624
c6447c20
RS
36252019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3626
3627 * c-common.h (build_function_call_vec): Take the original
3628 function decl as an optional final parameter.
3629 (check_builtin_function_arguments): Take the original function decl.
3630 * c-common.c (check_builtin_function_arguments): Likewise.
3631 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3632 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3633
c4438114
JM
36342019-09-15 Jason Merrill <jason@redhat.com>
3635
3636 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3637 fold_for_warn in "|| mask" warning.
3638
68a57628
ML
36392019-09-10 Martin Liska <mliska@suse.cz>
3640
3641 * c.opt: Use newly added WarnRemoved.
3642
f48ef52e
ML
36432019-09-09 Martin Liska <mliska@suse.cz>
3644
3645 * c.opt: Update comment of removed
3646 options that are preserved only for backward
3647 compatibility.
3648
67f6e649
ML
36492019-09-06 Martin Liska <mliska@suse.cz>
3650
3651 PR c++/91125
3652 * c-common.c: Remove definition of flag_use_repository.
3653 * c-common.h: Likewise.
3654 * c-opts.c (c_common_handle_option):
3655 Do not handle OPT_frepo option.
3656 * c.opt: Mark the option with Deprecated.
3657
db9d2274
MP
36582019-09-04 Marek Polacek <polacek@redhat.com>
3659
3660 * c.opt (fdeduce-init-list): Ignored.
3661
68e2c199
PK
36622019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3663
3664 PR c/78736
3665 * c.opt (Wenum-conversion): New option.
3666
7a4418a5
JL
36672019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3668
3669 * c-attribs.c (handle_section_attribute): Call the
3670 handle_generic_attribute target hook after performing target
3671 independent processing.
3672 (handle_noinit_attribute): Likewise.
3673
5f76ab15
ILT
36742019-09-03 Ian Lance Taylor <iant@golang.org>
3675
3676 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3677 when using -fgo-dump-spec.
3678
ae0d3f6a
ML
36792019-09-02 Martin Liska <mliska@suse.cz>
3680
3681 PR c++/91155
3682 * c-common.c (fname_as_string): Use cxx_printable_name for
3683 __PRETTY_FUNCTION__ same as was used before r265711.
3684
8a902edb
MP
36852019-08-28 Marek Polacek <polacek@redhat.com>
3686
3687 Implement P1152R4: Deprecating some uses of volatile.
3688 PR c++/91361
3689 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3690 default for C++2a, unless -Wno-deprecated.
3691 * c.opt (Wvolatile): New warning.
3692
4742dbe7
MP
36932019-08-28 Marek Polacek <polacek@redhat.com>
3694
3695 PR c++/91360 - Implement C++20 P1143R2: constinit.
3696 * c-common.c (c_common_reswords): Add constinit and __constinit.
3697 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3698 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3699 RID_LAST_CXX20.
3700 (D_CXX20): Define.
3701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3702 * c-format.c (cxx_keywords): Add "constinit".
3703 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3704
6a074892
JJ
37052019-08-27 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR c++/91415
3708 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3709 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3710 like COMPOUND_EXPR rather than normal expression.
3711
22f8849d
IS
37122019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3713
3714 PR pch/61250
3715 * c-lex.c (c_lex_with_flags): Don't call
3716 c_common_no_more_pch () from here.
3717
df375b03
JJ
37182019-08-23 Jakub Jelinek <jakub@redhat.com>
3719
3720 PR middle-end/91283
3721 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3722 instead of flag_excess_precision_cmdline.
3723 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3724 * c-opts.c (c_common_post_options): Likewise.
3725
14b7950f
MS
37262019-08-22 Martin Sebor <msebor@redhat.com>
3727
3728 PR middle-end/91490
3729 * c-common.c (braced_list_to_string): Add argument and overload.
3730 Handle flexible length arrays and unions.
3731
8bb2ee59
EB
37322019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3733
3734 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3735 function declarations where arguments are missing. Rename variables.
3736
21c1e205
RB
37372019-08-15 Richard Biener <rguenther@suse.de>
3738
3739 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3740 enabled, define __SIZETYPE__.
3741
f0033821
CL
37422019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3743
3744 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3745 exclusion with "section" attribute.
3746 (attr_noinit_exclusions): New table.
3747 (handle_noinit_attribute): New function.
3748
4d732405
RS
37492019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3750
3751 PR middle-end/91421
3752 * c-common.c (resolve_overloaded_builtin): Use
3753 copy_decl_built_in_function.
3754
51ad8481
MS
37552019-08-13 Martin Sebor <msebor@redhat.com>
3756
3757 PR c/80619
3758 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3759 (asm_fprintf_length_spec): Same.
3760 * c-format.h (format_lengths): Add FMT_LEN_w.
3761
77eb117f
JJ
37622019-08-10 Jakub Jelinek <jakub@redhat.com>
3763
3764 * c-pragma.h (enum pragma_omp_clause): Add
3765 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3766
398e3feb
JJ
37672019-08-07 Jakub Jelinek <jakub@redhat.com>
3768
3769 * c-pragma.h (enum pragma_omp_clause): Add
3770 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3771 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3772 enumeration value.
3773
ab574db6
MP
37742019-08-05 Marek Polacek <polacek@redhat.com>
3775
3776 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3777 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3778 default for C++2a, unless -Wno-deprecated.
3779 * c.opt (Wcomma-subscript): New warning.
3780
554a530f
JJ
37812019-07-20 Jakub Jelinek <jakub@redhat.com>
3782
3783 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3784 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3785 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3786 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3787 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3788 constructs with the loop construct.
3789
1a888209
JJ
37902019-07-13 Jakub Jelinek <jakub@redhat.com>
3791
3792 PR c/91149
3793 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3794 OMP_CLAUSE_REDUCTION_TASK handling.
3795
1fdd6f04
JJ
37962019-07-12 Jakub Jelinek <jakub@redhat.com>
3797
3798 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3799 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3800
99b1c316
MS
38012019-07-09 Martin Sebor <msebor@redhat.com>
3802
3803 PR c++/61339
1fdd6f04 3804 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3805 and others to class.
3806 * c-pretty-print.h: Same.
3807
6c1dae73
MS
38082019-07-09 Martin Sebor <msebor@redhat.com>
3809
3810 PR c++/61339
3811 * c-format.c (check_argument_type): Change class-key from class to
3812 struct and vice versa to match convention and avoid -Wclass-is-pod
3813 and -Wstruct-no-pod.
3814 * c-pretty-print.h: Same.
3815
8ba6ea87
ML
38162019-07-03 Martin Liska <mliska@suse.cz>
3817
3818 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3819 dead assignemts.
3820
83eb9522
JJ
38212019-07-03 Jakub Jelinek <jakub@redhat.com>
3822
3823 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3824 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3825 with OMP_PARALLEL.
3826
1c6ffbab
QZ
38272019-07-02 qing zhao <qing.zhao@oracle.com>
3828
3829 PR preprocessor/90581
3830 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3831 * c.opt: Add new option -fmax-include-depth.
3832
7ffc7de5
JM
38332019-06-26 Jason Merrill <jason@redhat.com>
3834
3835 PR c++/55442 - memory-hog with highly recursive constexpr.
3836 * c.opt (fconstexpr-loop-limit): New.
3837
361af3e4
JJ
38382019-06-25 Jakub Jelinek <jakub@redhat.com>
3839
3840 PR sanitizer/90954
3841 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3842 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3843
ab20d992
JJ
38442019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3845
3846 * c-common.c (c_common_nodes_and_builtins): Define
3847 alternate "__intN__" name for "__intN" types.
3848
f4af4019
JH
38492019-06-24 Jan Hubicka <jh@suse.cz>
3850
3851 * c-common.c (braced_lists_to_strings): Check that
3852 type is array or integer prior checking string flag.
3853
da9e9b57
MB
38542019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3855
3856 PR c++/90875 - added -Wswitch-outside-range option
3857 * c.opt (Wswitch-outside-range): Added new option.
3858 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3859
3f3d6a6f
MP
38602019-06-21 Marek Polacek <polacek@redhat.com>
3861
3862 PR c++/90953 - ICE with -Wmissing-format-attribute.
3863 * c-common.c (check_function_arguments_recurse): Use
3864 get_attribute_name.
3865 (check_missing_format_attribute): Likewise.
3866
1bf32c11
MP
38672019-06-19 Marek Polacek <polacek@redhat.com>
3868
3869 PR c++/60364 - noreturn after first decl not diagnosed.
3870 * c-attribs.c (handle_noreturn_attribute): No longer static.
3871 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3872 Declare.
3873 * c-format.c (check_function_format): Use get_attribute_name.
3874
a04c0734
MS
38752019-06-19 Martin Sebor <msebor@redhat.com>
3876
3877 PR translation/90156
3878 * c-format.c (function_format_info::format_type): Adjust type.
3879 (function_format_info::is_raw): New member.
3880 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3881 (decode_format_attr): Adjust call to decode_format_type.
3882 Avoid a redundant call to convert_format_name_to_system_name.
3883 Avoid abbreviating the word "arguments" in a diagnostic.
3884 (format_warning_substr): New function.
3885 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3886 (finish_dollar_format_checking): Same.
3887 (check_format_info): Same.
3888 (struct baltoks_t): New.
3889 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3890 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3891 functions.
3892 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3893 maybe_diag_unbalanced_tokens.
3894 (handle_format_attribute): Spell out the word "arguments" in
3895 a diagnostic.
3896
d3786ebb
MB
38972019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3898
3899 PR c++/90449 - add -Winaccessible-base option.
3900 * c.opt (Winaccessible-base): New option.
3901
bf38f7e9
JJ
39022019-06-10 Jakub Jelinek <jakub@redhat.com>
3903
3904 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3905 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3906 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3907 combined/composite constructs where it is not allowed. Copy over
3908 OMP_CLAUSE_REDUCTION_INSCAN.
3909
0ecf545c
MS
39102019-06-05 Martin Sebor <msebor@redhat.com>
3911
3912 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3913 (handle_alias_ifunc_attribute): Same.
3914 (handle_copy_attribute): Same.
3915 (handle_weakref_attribute): Same.
3916 (handle_nonnull_attribute): Same.
3917 * c-warn.c (warn_for_sign_compare): Same.
3918 (warn_for_restrict): Same.
3919 * c.opt: Same.
3920
36b34127
MS
39212019-06-05 Martin Sebor <msebor@redhat.com>
3922
3923 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3924 * c.opt (-Wformat-diag): Remove a spurious period.
3925
357a352f
JJ
39262019-05-29 Jakub Jelinek <jakub@redhat.com>
3927
3928 PR c/90628
3929 * c-common.c (check_builtin_function_arguments)
3930 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3931 as last argument.
3932
2b8235ea
EB
39332019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3934
3935 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3936
6d86ddc4
ML
39372019-05-22 Martin Liska <mliska@suse.cz>
3938
3939 PR lto/90500
3940 * c-attribs.c (handle_copy_attribute): Do not copy
3941 target_clones attribute.
3942
419ba5b9
EB
39432019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3944
3945 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3946 * c-ada-spec.c (print_assignment_operator): New function.
3947 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3948 assignment operators declared as methods and filter out the others.
3949
e03436e7
TS
39502019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3951
3952 PR c/89433
3953 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3954 "omp declare target".
3955
a9c697b8
MS
39562019-05-16 Martin Sebor <msebor@redhat.com>
3957
ab20d992
JJ
3958 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3959 keywords, operators, and types in diagnostics.
3960 (handle_scalar_storage_order_attribute): Same.
3961 (handle_mode_attribute): Same.
3962 (handle_visibility_attribute): Same.
3963 (handle_assume_aligned_attribute): Same.
3964 (handle_no_split_stack_attribute): Same.
3965 * c-common.c (shorten_compare): Same.
3966 (c_common_truthvalue_conversion): Same.
3967 (cb_get_source_date_epoch): Same.
3968 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3969 in diagnostics.
3970 (interpret_float): Same.
3971 * c-omp.c (c_finish_omp_for): Same.
3972 * c-opts.c (c_common_post_options): Same.
3973 * c-pch.c (c_common_pch_pragma): Same.
3974 * c-pragma.c (pop_alignment): Same.
3975 (handle_pragma_pack): Same.
3976 (apply_pragma_weak): Same.
3977 (handle_pragma_weak): Same.
3978 (handle_pragma_scalar_storage_order): Same.
3979 (handle_pragma_redefine_extname): Same.
3980 (add_to_renaming_pragma_list): Same.
3981 (maybe_apply_renaming_pragma): Same.
3982 (push_visibility): Same.
3983 (handle_pragma_visibility): Same.
3984 (handle_pragma_optimize): Same.
3985 (handle_pragma_message): Same.
3986 * c-warn.c (warn_for_omitted_condop): Same.
3987 (lvalue_error): Same.
a9c697b8 3988
6b943512
RB
39892019-05-15 Richard Biener <rguenther@suse.de>
3990
3991 PR c/90474
3992 * c-common.c (c_common_mark_addressable_vec): Also mark
3993 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3994 c_mark_addressable.
ab20d992 3995
b744fc85
NS
39962019-05-06 Nathan Sidwell <nathan@acm.org>
3997
3998 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3999
598f50d7
NS
40002019-04-30 Nathan Sidwell <nathan@acm.org>
4001
4002 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4003
5bcc5a3b
ML
40042019-04-30 Martin Liska <mliska@suse.cz>
4005
4006 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4007 for unknown options.
4008
e78a87f7
RS
40092019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4010
4011 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4012 the pointer target rather than the pointer itself.
4013
c280b7ee
JJ
40142019-04-19 Jakub Jelinek <jakub@redhat.com>
4015
4016 PR c/89888
4017 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4018 arguments.
4019 (c_do_switch_warnings): Remove outside_range_p argument.
4020 * c-common.c (check_case_bounds): Removed.
4021 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4022 Don't call check_case_bounds. Fold low_value as well as high_value.
4023 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4024 Check for case labels outside of range of original type here and
4025 adjust them.
4026
8e8225e6
JJ
40272019-04-12 Jakub Jelinek <jakub@redhat.com>
4028
63b8a166
JJ
4029 PR translation/90041
4030 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4031 in the Warn diagnostics.
4032
8e8225e6
JJ
4033 PR c/89946
4034 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4035 function comment. Warn if arguments of the attribute are not positive
4036 integer constants.
4037
53a3f614
EB
40382019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4039
4040 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4041 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4042
22be5873
EB
40432019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4044
4045 * c-ada-spec.c (is_float128): New predicate extracted from...
4046 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4047 <REAL_TYPE>: ...here. Call it.
4048
34facf20
DM
40492019-04-05 David Malcolm <dmalcolm@redhat.com>
4050
4051 PR c/89985
4052 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4053 auto_diagnostic_group. Guard inform calls by result of
4054 warning_at call.
4055
05564120
MP
40562019-04-05 Marek Polacek <polacek@redhat.com>
4057
ab20d992 4058 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
4059 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4060 of RHS.
4061
7a506c3c
JM
40622019-04-03 Jason Merrill <jason@redhat.com>
4063
4064 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4065 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4066
ddeae8c8
MS
40672019-04-01 Martin Sebor <msebor@redhat.com>
4068
4069 PR c/89685
4070 * c-attribs.c (handle_copy_attribute): Handle references and
4071 non-constant expressions.
4072
a15ffa22
JJ
40732019-03-22 Jakub Jelinek <jakub@redhat.com>
4074
4075 PR c++/87481
4076 * c.opt (-fconstexpr-ops-limit=): New option.
4077
36a3a7a3
JJ
40782019-03-21 Jakub Jelinek <jakub@redhat.com>
4079
4080 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4081 template param.
4082
bec1da64
MS
40832019-03-19 Martin Sebor <msebor@redhat.com>
4084
4085 PR tree-optimization/89688
4086 * c-common.c (braced_list_to_string): Make static.
4087 (braced_lists_to_strings): Define new function.
4088 * c-common.h (braced_list_to_string): Remove.
4089 (braced_lists_to_strings): Declare.
4090
1fe61adf
ML
40912019-03-12 Martin Liska <mliska@suse.cz>
4092
4093 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4094
93964ebd
ML
40952019-03-11 Martin Liska <mliska@suse.cz>
4096
4097 * c-opts.c (c_common_post_options): Wrap apostrophes
4098 in gcc internal format with %'.
4099
a3f9f006
ML
41002019-03-11 Martin Liska <mliska@suse.cz>
4101
4102 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4103 in a string format message and fix GNU coding style.
4104 * c-common.c (vector_types_convertible_p): Likewise.
4105 (c_build_vec_perm_expr): Likewise.
4106 * c-indentation.c (get_visual_column): Likewise.
4107 * c-opts.c (c_common_handle_option): Likewise.
4108 (c_common_post_options): Likewise.
4109 (sanitize_cpp_opts): Likewise.
4110 * c-pch.c (c_common_pch_pragma): Likewise.
4111 * c-pragma.c (handle_pragma_pack): Likewise.
4112
1db01ff9
JJ
41132019-03-08 Jakub Jelinek <jakub@redhat.com>
4114
4115 PR tree-optimization/89550
4116 * c-common.c (c_common_truthvalue_conversion): Only set
4117 TREE_NO_WARNING if warning_at returned true.
4118 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4119
ba790e6f
JJ
41202019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4121 Martin Sebor <msebor@gmail.com>
4122
4123 * c.opt (Wmissing-attributes): Clean up doc string.
4124
7da73ba7
JJ
41252019-02-25 Jakub Jelinek <jakub@redhat.com>
4126
4127 PR c/89495
4128 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4129 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4130 checking.
4131
921bb9d1
RB
41322019-02-22 Richard Biener <rguenther@suse.de>
4133
4134 * c-pch.c (no_checksum): Remove.
4135 (pch_init): Remove assertion that executable_checksum is not
4136 all zero.
4137 (c_common_valid_pch): Likewise.
4138
e2ebb05c
MS
41392019-02-18 Martin Sebor <msebor@redhat.com>
4140
4141 PR middle-end/89294
4142 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4143
3fe53000
DM
41442019-02-16 David Malcolm <dmalcolm@redhat.com>
4145
4146 PR c++/88680
4147 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4148 implementing -Wtype-limits.
4149
28a8cef1
MS
41502019-02-11 Martin Sebor <msebor@redhat.com>
4151
4152 PR c++/87996
4153 * c-common.c (invalid_array_size_error): New function.
4154 (valid_array_size_p): Call it. Handle size as well as type.
4155 * c-common.h (valid_constant_size_p): New function.
4156 (enum cst_size_error): New type.
4157
ec2be203
DM
41582019-01-31 David Malcolm <dmalcolm@redhat.com>
4159
4160 PR c/89122
4161 * known-headers.cc (get_stdlib_header_for_name): Add
4162 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4163
8936f047
JJ
41642019-01-31 Jakub Jelinek <jakub@redhat.com>
4165
4166 PR libstdc++/88170
4167 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4168 a C cast in pp_c_flag_gnu_v3 mode.
4169
6a335b96
JJ
41702019-01-29 Jakub Jelinek <jakub@redhat.com>
4171
4172 PR c/86125
4173 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4174 builtin_structptr_types types even for C.
4175
2a06eba5
BE
41762019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4177
4178 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4179 when rhs is of array type correctly. Fix handling of nested structures.
4180 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4181 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4182 type casts within nested compound expressions.
4183
18a23298
JJ
41842019-01-22 Jakub Jelinek <jakub@redhat.com>
4185
4186 PR middle-end/88968
4187 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4188 variable after using BIT_FIELD_REF.
4189
420183d9
L
41902019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4191
4192 PR c/51628
4193 PR c/88664
4194 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4195 Remove the boolean argument.
4196 * c-warn.c (check_address_of_packed_member): Renamed to ...
4197 (check_address_or_pointer_of_packed_member): This. Also
4198 warn pointer conversion.
4199 (check_and_warn_address_of_packed_member): Renamed to ...
4200 (check_and_warn_address_or_pointer_of_packed_member): This.
4201 Also warn pointer conversion.
4202 (warn_for_address_or_pointer_of_packed_member): Remove the
4203 boolean argument. Don't check pointer conversion here.
4204
99063eee
RS
42052019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4206
4207 PR inline-asm/52813
4208 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4209
a30d0196
JJ
42102019-01-14 Jakub Jelinek <jakub@redhat.com>
4211
4212 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4213 and __cpp_nontype_template_parameter_auto. Add a comment that
4214 __cpp_template_auto is deprecated.
4215
2d91f79d
TH
42162019-01-14 Tom Honermann <tom@honermann.net>
4217
4218 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4219 * c-common.c (c_common_reswords): Add char8_t.
4220 (fix_string_type): Use char8_t for the type of u8 string literals.
4221 (c_common_get_alias_set): char8_t doesn't alias.
4222 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4223 C++.
4224 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4225 (keyword_begins_type_specifier): Add RID_CHAR8.
4226 * c-common.h (rid): Add RID_CHAR8.
4227 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4228 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4229 Define char8_type_node and char8_array_type_node.
4230 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4231 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4232 (c_cpp_builtins): Predefine __cpp_char8_t.
4233 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4234 CPP_UTF8STRING.
4235 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4236 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4237 targeting C++2a.
4238 * c.opt: Add the -fchar8_t command line option.
4239
23db6ced
MS
42402019-01-14 Martin Sebor <msebor@redhat.com>
4241
4242 PR target/88638
4243 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4244 and issue errors if it fails.
4245 * c-common.h (valid_format_string_type_p): Declare.
4246 * c-format.c (valid_stringptr_type_p): Rename...
4247 (valid_format_string_type_p): ...to this and make extern.
4248 (handle_format_arg_attribute): Adjust to new name.
4249 (check_format_string): Same.
4250
234c3818
L
42512019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4252
4253 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4254 Replace "may may" with "may" in warning message.
4255
d8fcab68
JJ
42562019-01-07 Jakub Jelinek <jakub@redhat.com>
4257
4258 PR c++/85052
4259 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4260 (c_build_vec_convert): Declare.
4261 * c-common.c (c_build_vec_convert): New function.
4262
29d24852
MS
42632019-01-04 Martin Sebor <msebor@redhat.com>
4264
4265 PR c/88546
4266 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4267 Handle C++ empty throw specification and C11 _Noreturn.
4268 (has_attribute): Also handle C11 _Noreturn.
4269
9069a4c9
MS
42702019-01-04 Martin Sebor <msebor@redhat.com>
4271
4272 PR c/88363
4273 * c-attribs.c (positional_argument): Also accept enumerated types.
4274
a5544970
JJ
42752019-01-01 Jakub Jelinek <jakub@redhat.com>
4276
4277 Update copyright years.
4278
da77eace
L
42792018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4280
4281 PR c/51628
4282 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4283 * c-warn.c (check_alignment_of_packed_member): New function.
4284 (check_address_of_packed_member): Likewise.
4285 (check_and_warn_address_of_packed_member): Likewise.
4286 (warn_for_address_or_pointer_of_packed_member): Likewise.
4287 * c.opt: Add -Wno-address-of-packed-member.
4288
573767d4
DM
42892018-12-20 David Malcolm <dmalcolm@redhat.com>
4290
4291 PR c++/87504
4292 * c-warn.c (get_outermost_macro_expansion): New function.
4293 (spelled_the_same_p): Use it to unwind the macro expansions, and
4294 compare the outermost macro in each nested expansion, rather than
4295 the innermost.
4296
a14feb3c
DM
42972018-12-19 David Malcolm <dmalcolm@redhat.com>
4298
4299 PR c++/87504
4300 * c-common.h (warn_tautological_cmp): Convert 1st param from
4301 location_t to const op_location_t &.
4302 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4303 when testing for INTEGER_CST.
4304 (warn_tautological_bitwise_comparison): Convert 1st param from
4305 location_t to const op_location_t &; use it to build a
4306 binary_op_rich_location, and use this.
4307 (spelled_the_same_p): New function.
4308 (warn_tautological_cmp): Convert 1st param from location_t to
4309 const op_location_t &. Warn for macro expansions if
4310 spelled_the_same_p. Use binary_op_rich_location.
4311
dfd7fdca
DM
43122018-12-19 David Malcolm <dmalcolm@redhat.com>
4313
4314 PR c++/43064
4315 PR c++/43486
4316 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4317 (verify_tree): Handle location wrappers.
4318 (c_common_truthvalue_conversion): Strip any location wrapper.
4319 Handle CONST_DECL.
4320 (fold_offsetof): Strip any location wrapper.
4321 (complete_array_type): Likewise for initial_value.
4322 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4323 index before checking for INTEGER_CST.
4324 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4325 print parentheses around location wrappers.
4326 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4327 before checking for INTEGER_CST.
4328 (warn_tautological_bitwise_comparison): Call
4329 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4330 before checking for INTEGER_CST.
4331 (readonly_error): Strip any location wrapper.
4332 (warn_array_subscript_with_type_char): Strip location wrappers
4333 before checking for INTEGER_CST. Use the location of the index if
4334 available.
4335
5c8b3702
JM
43362018-12-06 Jason Merrill <jason@redhat.com>
4337
4338 PR c++/88136 - -Wdeprecated-copy false positives
4339 * c.opt (Wdeprecated-copy-dtor): New.
4340 (Wdeprecated-copy): Move to -Wextra.
4341
673670da
MS
43422018-11-29 Martin Sebor <msebor@redhat.com>
4343
4344 PR c/88172
4345 PR testsuite/88208
4346 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4347 alignments to values less than the target requires.
4348 (has_attribute): For attribute aligned consider both the attribute
4349 and the alignment bits.
4350 * c-common.c (c_init_attributes): Optionally issue a warning for
4351 zero alignment.
4352
04864ec8
MS
43532018-11-28 Martin Sebor <msebor@redhat.com>
4354
4355 PR c/88065
4356 PR c/87297
4357 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4358 or destination is an error.
4359
ace83db0
JJ
43602018-11-28 Jakub Jelinek <jakub@redhat.com>
4361
4362 PR c++/88215
4363 * c-ubsan.c: Include langhooks.h.
4364 (ubsan_instrument_division): Change gcc_assert that main variants
4365 of op0 and op1 types are equal to gcc_checking_assert that the
4366 main variants are compatible types.
4367
da193a27
EB
43682018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4369
4370 * c-ada-spec.c: Include stringpool.h.
4371 (has_static_fields): Return false for incomplete types.
4372 (is_tagged_type): Likewise.
4373 (has_nontrivial_methods): Likewise.
4374 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4375 (struct overloaded_name_hash): New structure.
4376 (struct overloaded_name_hasher): Likewise.
4377 (overloaded_names): New global variable.
4378 (init_overloaded_names): New static function.
4379 (overloaded_name_p): New predicate.
4380 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4381 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4382 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4383 Remove always-true condition and dump forward types.
4384 (dump_ada_specs): Delete overloaded_names.
4385
98f08eb8
MS
43862018-11-20 Martin Sebor <msebor@redhat.com>
4387
4388 * c-attribs.c (type_for_vector_size): New function.
4389 (type_valid_for_vector_size): Same.
4390 (handle_vector_size_attribute): Move code to the functions above
4391 and call them.
4392 (validate_attribute, has_attribute): New functions.
4393 * c-common.h (has_attribute): Declare.
4394 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4395 * c-common.c (c_common_resword): Same.
4396
2674fa47
JM
43972018-11-16 Jason Merrill <jason@redhat.com>
4398
4399 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4400 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4401
258b3854
JJ
44022018-11-16 Jakub Jelinek <jakub@redhat.com>
4403
4404 PR middle-end/87854
4405 * c-common.c (fix_string_type): Reject string literals larger than
4406 TYPE_MAX_VALUE (ssizetype) bytes.
4407
1d249509
MS
44082018-11-15 Martin Sebor <msebor@redhat.com>
4409
4410 PR c++/87541
4411 PR c++/87542
4412 * c-attribs.c (positional_argument): New function.
4413 (handle_alloc_size_attribute): Use it and simplify.
4414 (handle_alloc_align_attribute): Same.
4415 (handle_assume_aligned_attribute): Same.
4416 (handle_nonnull_attribute): Same.
4417 * c-common.c (check_function_arguments): Pass fntype to
4418 check_function_format.
4419 * c-common.h (check_function_format): Add an argument.
4420 (PosArgFlags, positional_argument): Declare new type and function.
4421 * c-format.c (decode_format_attr): Add arguments.
4422 (check_format_string, get_constant): Same.
4423 (convert_format_name_to_system_name): Adjust.
4424
478dd60d
DM
44252018-11-15 David Malcolm <dmalcolm@redhat.com>
4426
4427 PR other/19165
4428 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4429
8cca0163
JJ
44302018-11-14 Jakub Jelinek <jakub@redhat.com>
4431
8ee09943
JJ
4432 P1236R1 - Signed integers are two's complement
4433 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4434 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4435 with in-range second operand well defined for -std=c++2a.
4436
8cca0163
JJ
4437 PR other/88007
4438 * c-common.c (parse_optimize_options): Allocate option string from
4439 opts_obstack rather than as GC memory. Move the allocation after
4440 warning for invalid option.
4441
620e594b
DM
44422018-11-13 David Malcolm <dmalcolm@redhat.com>
4443
4444 * c-common.c (c_get_substring_location): Update for renaming of
4445 get_source_location_for_substring to get_location_within_string.
4446 * c-lex.c: Replace "source_location" with "location_t".
4447 * c-opts.c: Likewise.
4448 * c-ppoutput.c: Likewise.
4449
f9731de3
MS
44502018-11-13 Martin Sebor <msebor@redhat.com>
4451
4452 PR middle-end/81824
4453 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4454 (handle_tls_model_attribute): Improve diagnostics.
4455
e4bd6d5e
JM
44562018-11-12 Jason Merrill <jason@redhat.com>
4457
a6bb6b07
JM
4458 * c-cppbuiltin.c (c_cpp_builtins): Define
4459 __cpp_impl_destroying_delete.
4460
e4bd6d5e
JM
4461 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4462 __cpp_conditional_explicit.
4463
79a2c428
MS
44642018-11-09 Martin Sebor <msebor@redhat.com>
4465
4466 PR middle-end/81824
4467 * c-attribs.c (handle_copy_attribute): New function.
4468
4c7bd361
MS
44692018-11-09 Martin Sebor <msebor@redhat.com>
4470
4471 PR c/87795
4472 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4473
28567c40
JJ
44742018-11-08 Jakub Jelinek <jakub@redhat.com>
4475
4476 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4477 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4478 enum omp_memory_order MEMORY_ORDER.
4479 (c_finish_omp_flush): Add MO argument.
4480 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4481 (c_finish_omp_for): Add FINAL_P argument.
4482 * c-omp.c: Include memmodel.h.
4483 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4484 OMP_TASKGROUP_CLAUSES to it.
4485 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4486 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4487 instead of OMP_ATOMIC_SEQ_CST.
4488 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4489 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4490 __atomic_thread_fence call with the given value.
4491 (check_omp_for_incr_expr): Formatting fixes.
4492 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4493 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4494 is not constant expression 1 or -1. Transform NE_EXPR loops
4495 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4496 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4497 loops too.
4498 (c_omp_split_clauses): Add support for combined
4499 #pragma omp parallel master and
4500 #pragma omp {,parallel }master taskloop{, simd} constructs.
4501 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4502 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4503 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4504 (c_omp_predetermined_sharing): Don't return
4505 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4506 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4507 PRAGMA_OMP_REQUIRES.
4508 * c-pragma.h (enum pragma_kind): Likewise.
4509 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4510 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4511
204839e7
DM
45122018-11-08 David Malcolm <dmalcolm@redhat.com>
4513
4514 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4515
d8010ee4
DM
45162018-11-08 David Malcolm <dmalcolm@redhat.com>
4517
4518 * c-format.c (local_cgraph_node_ptr_node): New variable.
4519 (gcc_dump_printf_char_table): Add entry for %C.
4520 (get_pointer_to_named_type): New function, taken from the handling
4521 code for "gimple *" from...
4522 (init_dynamic_diag_info): ...here. Add handling for
4523 "cgraph_node *".
4524 * c-format.h (T_CGRAPH_NODE): New.
4525
4be5c72c
JM
45262018-10-19 Jason Merrill <jason@redhat.com>
4527
4528 * c-cppbuiltin.c (c_cpp_builtins): Add
4529 __cpp_nontype_template_parameter_class.
4530
f3f6029d
NS
45312018-10-31 Nathan Sidwell <nathan@acm.org>
4532
ab5324fb
NS
4533 * c-opts.c (c_finish_options): Force command line macro
4534 location. Refactor to avoid repeating main debug hook.
4535 (push_command_line_include): Clarify comment.
4536
f3f6029d
NS
4537 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4538
91e3ec29
MS
45392018-10-30 Martin Sebor <msebor@redhat.com>
4540
4541 PR middle-end/87041
4542 * c-format.c (check_format_types): Avoid diagnosing null pointer
4543 arguments to printf-family of functions.
4544
b5ff4f5c
MP
45452018-10-30 Marek Polacek <polacek@redhat.com>
4546
4547 Implement P0892R2, explicit(bool).
4548 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4549
7e2de6df
DM
45502018-10-29 David Malcolm <dmalcolm@redhat.com>
4551
4552 * name-hint.h (name_hint::take_deferred): New member function.
4553
b2bf438c
DM
45542018-10-29 David Malcolm <dmalcolm@redhat.com>
4555
4556 PR c++/56856
4557 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4558 argument.
4559 (check_function_restrict): Rename param "argarray" to
4560 "unfolded_argarray", and make a copy named "argarray", calling
4561 fold_for_warn on each argument.
4562 (check_function_arguments): Add note about responsibility for
4563 folding the arguments.
4564
9f936c86
JM
45652018-10-17 Joseph Myers <joseph@codesourcery.com>
4566
4567 * c-common.c (flag_isoc2x): New variable.
4568 * c-common.h (clk_c): Update comment to reference C2X.
4569 (flag_isoc99, flag_isoc11): Update comments to reference future
4570 standard versions in general.
4571 (flag_isoc2x): Declare.
4572 * c-opts.c (set_std_c2x): New function.
4573 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4574 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4575 flag_isoc2x to 0.
4576 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4577
7a8a92c4
JM
45782018-10-17 Joseph Myers <joseph@codesourcery.com>
4579
4580 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4581 (std=iso9899:2018): Document C17 as published in 2018.
4582
4dc003ff
CL
45832018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4584
4585 PR c++/87364
4586 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4587
79371671
WW
45882018-10-11 Will Wray <wjwray@gmail.com>
4589
4590 PR c++/87364
4591 * c-pretty-print.h (pp_c_type_cast): Prototype.
4592 (pp_c_integer_constant): Likewise.
4593 * c-pretty-print.c (pp_c_type_cast): No longer static.
4594 (pp_c_integer_constant): Likewise.
4595 (pp_c_enumeration_constant): Fix loop termination when finding
4596 name of constant. No longer returns a value. Call
4597 pp_c_integer_constant.
4598 (c_pretty_printer::constant): Update for changes to
4599 pp_c_enumeration_constant.
4600
46c62690
JJ
46012018-10-11 Jakub Jelinek <jakub@redhat.com>
4602
4603 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4604 for no_unique_address.
4605
c24300ba
DM
46062018-10-09 David Malcolm <dmalcolm@redhat.com>
4607
4608 * c-common.c (c_option_controlling_cpp_error): Rename to...
4609 (c_option_controlling_cpp_diagnostic): ...this, and convert
4610 "reason" from int to enum.
4611 (c_cpp_error): Rename to...
4612 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4613 * c-common.h (c_cpp_error): Rename to...
4614 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4615 * c-opts.c (c_common_init_options): Update for renaming.
4616
8656dafa
RS
46172018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4618
4619 PR c/87286
4620 * c-common.c (vector_types_compatible_elements_p): Use
4621 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4622
8cff0652
VK
46232018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4624
4625 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4626 to generate constructor destructor priority warning.
4627 * c.opt (-Wprio-ctor-dtor): New option.
4628
bedf03a2
JM
46292018-10-01 Jason Merrill <jason@redhat.com>
4630
4631 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4632
6cc430c1
EB
46332018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4634
4635 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4636 (dump_ada_node): Add const keyword.
4637
87677ac7
ML
46382018-09-25 Martin Liska <mliska@suse.cz>
4639
4640 * c-common.c (c_common_truthvalue_conversion):
4641 Remove Pascal from documentation.
4642
518196cb
EB
46432018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4644
4645 * c-ada-spec.c: Include diagnostic.h.
4646 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4647
a599af84
MP
46482018-09-19 Marek Polacek <polacek@redhat.com>
4649
4650 * c.opt (Wclass-conversion): New.
4651
9c4a4b3c
DM
46522018-09-17 David Malcolm <dmalcolm@redhat.com>
4653
4654 * c-format.c (range_label_for_format_type_mismatch::get_text):
4655 Update for new param.
4656
c896ecfe
DM
46572018-09-17 David Malcolm <dmalcolm@redhat.com>
4658
4659 * c-format.c (format_warning_at_char): Update for introduction of
4660 format_string_diagnostic_t.
4661 (format_type_warning): Likewise.
4662
80c6d1f4
MJ
46632018-09-17 Martin Jambor <mjambor@suse.cz>
4664
4665 PR c/63886
4666 * c.opt (Wabsolute-value): New.
4667
6d900107
BE
46682018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4669
4670 * c-common.c (complete_flexible_array_elts): New helper function.
4671 * c-common.h (complete_flexible_array_elts): Declare.
4672
b5764229
BE
46732018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4674
4675 * c-common.c (braced_list_to_string): Remove eval parameter.
4676 Add some more checks. Always create zero-terminated STRING_CST.
4677 * c-common.h (braced_list_to_string): Adjust prototype.
4678
85204e23
DM
46792018-08-27 David Malcolm <dmalcolm@redhat.com>
4680
4681 PR 87091
4682 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4683 to a tri-state.
4684 (maybe_suggest_missing_token_insertion): Likewise.
4685 (maybe_add_include_fixit): Add param "override_location". If set,
4686 and source-printing is enabled, then override the rich_location's
4687 primary location with that of the insertion point for the fix-it
4688 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4689 * c-common.h (extern void maybe_add_include_fixit): Add bool
4690 param.
4691 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4692 for conversion of show_caret_p to a tri-state.
4693 * c-warn.c (warn_for_restrict): Likewise.
4694 * known-headers.cc
4695 (suggest_missing_header::~suggest_missing_header): Update call to
4696 maybe_add_include_fixit to suggest overriding the location, as it
4697 is for a note.
4698
3d78e008
ML
46992018-08-27 Martin Liska <mliska@suse.cz>
4700
4701 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4702 fndecl_built_in_p and remove check for FUNCTION_DECL if
4703 possible.
3d78e008
ML
4704 (check_builtin_function_arguments): Likewise.
4705 (reject_gcc_builtin): Likewise.
4706 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4707
b5be6d0c
MP
47082018-08-26 Marek Polacek <polacek@redhat.com>
4709
4710 PR c++/87029, Implement -Wredundant-move.
4711 * c.opt (Wredundant-move): New option.
4712
79ca9c35
MP
47132018-08-21 Marek Polacek <polacek@redhat.com>
4714
4715 PR c++/86981, Implement -Wpessimizing-move.
4716 * c.opt (Wpessimizing-move): New option.
4717
097f82ec
DM
47182018-08-20 David Malcolm <dmalcolm@redhat.com>
4719
4720 PR other/84889
4721 * c-attribs.c (common_handle_aligned_attribute): Add
4722 auto_diagnostic_group instance.
4723 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4724 * c-opts.c (c_common_post_options): Likewise.
4725 * c-warn.c (warn_logical_not_parentheses): Likewise.
4726 (warn_duplicated_cond_add_or_warn): Likewise.
4727 (warn_for_multistatement_macros): Likewise.
4728
3fb558b1
NS
47292018-08-20 Nathan Sidwell <nathan@acm.org>
4730
4731 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4732 access.
4733
800c0e98
NS
47342018-08-17 Nathan Sidwell <nathan@acm.org>
4735
4736 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4737 field.
4738 (laxy_hex_fp_value_count): Make unsigned.
4739 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4740 manipulate the macro.
4741 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4742 cpp_define_lazily.
4743
6f795a92
DM
47442018-08-17 David Malcolm <dmalcolm@redhat.com>
4745
4746 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4747 (gcc_dump_printf_length_specs): New.
4748 (gcc_dump_printf_flag_pairs): New.
4749 (gcc_dump_printf_flag_specs): New.
4750 (gcc_dump_printf_char_table): New.
4751 (format_types_orig): Add entry for "gcc_dump_printf".
4752 (init_dynamic_diag_info): Set up length_char_specs and
4753 conversion_specs for gcc_dump_printf_format_type.
4754 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4755
c5d725c0
NS
47562018-08-17 Nathan Sidwell <nathan@acm.org>
4757
10f04917
NS
4758 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4759
c5d725c0
NS
4760 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4761 * c-cppbuiltin.c: Likewise.
4762
c0c12356
ML
47632018-08-17 Martin Liska <mliska@suse.cz>
4764
4765 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4766 Ignore/Deprecated flag. Warning is done automatically for
4767 Deprecated flags.
c0c12356 4768
10fcc142
DM
47692018-08-16 David Malcolm <dmalcolm@redhat.com>
4770
4771 PR c++/70693
4772 * c-common.c (selftest::c_family_tests): Call
4773 selftest::c_indentation_c_tests.
4774 * c-common.h (selftest::c_indentation_c_tests): New decl.
4775 * c-indentation.c: Include "selftest.h".
4776 (next_tab_stop): Add "tab_width" param, rather than accessing
4777 cpp_opts.
4778 (get_visual_column): Likewise. Clarify comment. Bulletproof
4779 against reading past the end of the line.
4780 (get_first_nws_vis_column): Add "tab_width" param.
4781 (detect_intervening_unindent): Likewise.
4782 (should_warn_for_misleading_indentation): Read tab width from
4783 cpp_opts and pass around.
4784 (selftest::test_next_tab_stop): New test.
4785 (selftest::assert_get_visual_column_succeeds): New function.
4786 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4787 (selftest::assert_get_visual_column_fails): New function.
4788 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4789 (selftest::test_get_visual_column): New test.
4790 (selftest::c_indentation_c_tests): New function.
4791
3f6677f4
NS
47922018-08-16 Nathan Sidwell <nathan@acm.org>
4793
4794 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4795 (store_ada_macro): Likewise.
4796 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4797 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4798
96e6ae57
DM
47992018-08-15 David Malcolm <dmalcolm@redhat.com>
4800
4801 * c-format.c: Include "selftest-diagnostic.h" and
4802 "gcc-rich-location.h".
4803 (format_warning_at_char): Pass NULL for new label params of
4804 format_warning_va.
4805 (class indirection_suffix): New class.
4806 (class range_label_for_format_type_mismatch): New class.
4807 (format_type_warning): Move logic for generating "*" suffix to
4808 class indirection_suffix. Create "fmt_label" and "param_label"
4809 to show their types, and pass them to the
4810 format_warning_at_substring calls.
4811 (selftest::test_type_mismatch_range_labels): New test.
4812 (selftest::c_format_c_tests): Call it.
4813
23aa9f7c
MS
48142018-08-13 Martin Sebor <msebor@redhat.com>
4815
4816 PR tree-optimization/71625
4817 * c-common.c (braced_list_to_string): New function.
4818 * c-common.h (braced_list_to_string): Declare it.
4819
f10a9135
NS
48202018-08-08 Nathan Sidwell <nathan@acm.org>
4821
4822 * c-common.c (try_to_locate_new_include_inertion_point): Use
4823 linemap_included_from_linemap.
4824 * c-lex.c (fe_file_change): Use linemap_included_from.
4825 * c-ppoutput.c (pp_file_change): Likewise.
4826
8a45b051
MS
48272018-08-01 Martin Sebor <msebor@redhat.com>
4828
4829 PR tree-optimization/86650
ab20d992 4830 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4831 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4832 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4833 * c-format.h (T89_G): Update to be "gimple *" rather than
4834 "gcall *".
4835 (local_gcall_ptr_node): Rename...
4836 (local_gimple_ptr_node): ...to this.
4837
e540ccc0
DM
48382018-07-31 David Malcolm <dmalcolm@redhat.com>
4839
4840 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4841 table entries for gcc_diag_char_table, and the 'Z' entry from
4842 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4843 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4844 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4845 adding missing "Z" for this table. Remove erroneous "G" and "K"
4846 entries.
4847 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4848 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4849 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4850
425fc685
RE
48512018-07-31 Richard Earnshaw <rearnsha@arm.com>
4852
4853 * c-common.c (speculation_safe_resolve_call): New function.
4854 (speculation_safe_resolve_params): New function.
4855 (speculation_safe_resolve_return): New function.
4856 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4857 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4858 __HAVE_SPECULATION_SAFE_VALUE.
4859
181463c2
DM
48602018-07-20 David Malcolm <dmalcolm@redhat.com>
4861
4862 * c-common.c (c_cpp_error): Remove redundant "line_table"
4863 parameter from call to rich_location::set_range.
4864 (maybe_suggest_missing_token_insertion): Likewise.
4865
0d7f9065
MS
48662018-07-20 Martin Sebor <msebor@redhat.com>
4867
4868 PR middle-end/82063
ab20d992 4869 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4870
00abf86c
MS
48712018-07-20 Martin Sebor <msebor@redhat.com>
4872
4873 PR middle-end/82063
4874 * c-common.h (c_common_handle_option): Change function argument
4875 to HOST_WIDE_INT.
4876 * c-opts.c (c_common_init_options): Same.
4877 (c_common_handle_option): Same. Remove special handling of
4878 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4879 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4880 options to take a HOST_WIDE_INT argument and accept a byte-size
4881 suffix. Initialize.
4882 (-Wvla-larger-than): Same.
4883 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4884 (-Wno-vla-larger-than): Same.
4885
9b452033
JJ
48862018-07-12 Jakub Jelinek <jakub@redhat.com>
4887
4888 * c-attribs.c (c_common_attribute_table): Add
4889 "omp declare target implicit" attribute.
4890
cd0762f3
RB
48912018-07-12 Richard Biener <rguenther@suse.de>
4892
4893 PR c/86453
4894 * c-attribs.c (handle_packed_attribute): Do not build a variant
4895 type with TYPE_PACKED, instead ignore the attribute if we may
4896 not apply to the original type.
4897
0b27c3ed
JJ
48982018-07-10 Jakub Jelinek <jakub@redhat.com>
4899
4900 PR c++/86443
4901 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4902 to contain TREE_LIST for both the original class iterator and the
4903 "last" helper var.
4904
e730a0ef
EB
49052018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4906
4907 * c-ada-spec.c (to_ada_name): Remove index parameter.
4908 (pp_ada_tree_identifier): Likewise.
4909 (dump_ada_macros): Adjust call to to_ada_name.
4910 (struct overloaded_name_hash): Delete.
4911 (struct overloaded_name_hasher): Likewise.
4912 (overloaded_names): Likewise.
4913 (compute_overloading_index): Likewise.
4914 (dump_ada_decl_name): Do not call compute_overloading_index and
4915 adjust calls to pp_ada_tree_identifier.
4916 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4917 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4918 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4919 (dump_ada_enum_type): Remove type and display_convention parameters.
4920 Adjust calls to pp_ada_tree_identifier.
4921 (dump_ada_node): Likewise and for dump_ada_structure.
4922 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4923 and tidy up.
4924 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4925 syntax.
4926 (print_constructor): Adjust call to pp_ada_tree_identifier.
4927 (print_destructor): Likewise.
4928 (dump_ada_declaration): Switch to aspect syntax.
4929 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4930 parameter with nested parameter.
4931 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4932 (dump_ada_specs): Do not delete overloaded_names table.
4933
8de583fc
PB
49342018-07-06 Peter Bergner <bergner@linux.ibm.com>
4935
4936 PR target/86324
e730a0ef 4937 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4938 target hook.
4939
09cff37b
NS
49402018-07-05 Nathan Sidwell <nathan@acm.org>
4941
4942 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4943 NO_IMPLICIT_EXTERN_C.
4944
98086b2b
ML
49452018-06-28 Martin Liska <mliska@suse.cz>
4946
4947 * cppspec.c: Include opt-suggestions.h.
4948
ab20d992
JJ
49492018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4950 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4951 Cesar Philippidis <cesar@codesourcery.com>
4952
4953 * c-pragma.h (enum pragma_omp_clause): Add
4954 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4955 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4956
f41b7612
JJ
49572018-06-20 Jakub Jelinek <jakub@redhat.com>
4958
4959 PR c++/86210
4960 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4961 comment.
4962
4252ccd7
MS
49632018-06-18 Martin Sebor <msebor@redhat.com>
4964
4965 PR middle-end/85602
4966 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4967 nonstring.
4968
e197e64e
KV
49692018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4970
4971 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4972
34a7a230
JM
49732018-06-13 Jason Merrill <jason@redhat.com>
4974
5cef3733
JM
4975 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4976 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4977 handling.
4978
34a7a230
JM
4979 PR c++/86094 - wrong code with defaulted move ctor.
4980 * c-opts.c (c_common_post_options): Bump the current ABI version to
4981 13. Set warn_abi_version and flag_abi_compat_version to the current
4982 version rather than 0. Fix defaulting flag_abi_compat_version from
4983 warn_abi_version.
4984
bb0f14ae
MS
49852018-06-12 Martin Sebor <msebor@redhat.com>
4986
4987 PR c/85931
4988 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4989 sizeof source and destination yields the same value.
4990
3713f2e2
ML
49912018-06-12 Martin Liska <mliska@suse.cz>
4992
4993 * c.opt: Make MPX-related options as Deprecated.
4994
4af78ef8
DM
49952018-06-08 David Malcolm <dmalcolm@redhat.com>
4996
4997 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4998 rather than 0.
4999
31db0fe0
ML
50002018-06-08 Martin Liska <mliska@suse.cz>
5001
5002 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5003 for MPX (macros, related functions, fields in cgraph_node, ...).
5004 (handle_bnd_legacy): Likewise.
5005 (handle_bnd_instrument): Likewise.
5006 * c.opt: Likewise.
5007
fe16acf2
JJ
50082018-06-06 Jakub Jelinek <jakub@redhat.com>
5009
5010 PR c++/86068
5011 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5012 __cpp_transactional_memory to 201500 instead of 210500.
5013
4dbdb49b
JM
50142018-06-06 Jason Merrill <jason@redhat.com>
5015
5016 PR c++/85710 - ICE with -Wmemset-elt-size.
5017 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5018
f8ad043f
JM
50192018-06-01 Jason Merrill <jason@redhat.com>
5020
5021 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5022 201703.
5023
abc24d93
EB
50242018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5025
5026 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5027 declaration for a typedef independently of whether the declaration of
5028 the subtype is generated.
5029
d258f4aa
MS
50302018-05-31 Martin Sebor <msebor@redhat.com>
5031
5032 PR c/82063
5033 * c.opt (-Wno-alloc-size-larger-than): New option.
5034
b67b9225
DP
50352018-04-22 David Pagan <dave.pagan@oracle.com>
5036
5037 PR c/55976
5038 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 5039 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
5040 differentiate between default (no option), -Wreturn-type, and
5041 -Wno-return-type.
5042
04eb9c55
JM
50432018-05-29 Jason Merrill <jason@redhat.com>
5044
5045 * c.opt (Winit-list-lifetime): New flag.
5046
b0c31bc6
BE
50472018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5048
5049 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5050 splay_tree_delete_pointers.
5051
44284983
JJ
50522018-05-26 Jakub Jelinek <jakub@redhat.com>
5053
5054 PR bootstrap/85921
5055 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5056 noinline variable to workaround broken kernel headers.
5057
b46b715d
JM
50582018-05-18 Jason Merrill <jason@redhat.com>
5059
5060 * c.opt (Wdeprecated-copy): New flag.
5061
40659769
ML
50622018-05-17 Martin Liska <mliska@suse.cz>
5063
5064 * c-warn.c (overflow_warning): Do not use
5065 space in between 'G_' and '('.
5066
403962ea
JM
50672018-05-09 Jason Merrill <jason@redhat.com>
5068
5069 * c-common.c (valid_array_size_p): Add complain parameter.
5070 * c-common.h: ...which defaults to true.
5071
1c9ee609
JJ
50722018-05-11 Jakub Jelinek <jakub@redhat.com>
5073
5074 PR c/85696
5075 * c-omp.c (c_omp_predetermined_sharing): Return
5076 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5077
19916065
ML
50782018-05-11 Martin Liska <mliska@suse.cz>
5079
92a285c1 5080 PR sanitizer/85556
19916065
ML
5081 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5082 TREE_LIST values.
5083
79e7b1fe
JJ
50842018-05-10 Jakub Jelinek <jakub@redhat.com>
5085
5086 PR c++/85662
5087 * c-common.h (fold_offsetof_1): Removed.
5088 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5089 CTX argument defaulted to ERROR_MARK.
5090 * c-common.c (fold_offsetof_1): Renamed to ...
5091 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5092 argument, convert the pointer constant to TYPE and use size_binop
5093 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5094 a pointer type. Adjust recursive calls.
5095
86c12f76
EB
50962018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5097
5098 PR c++/85400
5099 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5100
ee336e84
NS
51012018-05-07 Nathan Sidwell <nathan@acm.org>
5102
5103 * c.opt (ffor-scope): Remove functionality, issue warning.
5104
6c072e21
NS
51052018-05-03 Nathan Sidwell <nathan@acm.org>
5106
5107 * c.opt (ffriend-injection): Remove functionality, issue warning.
5108
2cc7d3a7
DM
51092018-05-01 David Malcolm <dmalcolm@redhat.com>
5110
5111 PR c/84258
5112 * c-format.c (struct format_check_results): Add field
5113 "number_non_char".
5114 (check_format_info): Initialize it, and warn if encountered.
5115 (check_format_arg): Distinguish between wide char and
5116 everything else when detecting arrays of non-char.
5117
7761dfbe
DM
51182018-04-30 David Malcolm <dmalcolm@redhat.com>
5119
5120 * c-format.c (get_corrected_substring): Update for
5121 location_get_source_line returning a char_span. Use a char_span
5122 when handling the prefix of the correction.
5123 * c-indentation.c (get_visual_column): Update for
5124 location_get_source_line returning a char_span.
5125 (get_first_nws_vis_column): Likewise.
5126
62e98ef1
DM
51272018-03-29 David Malcolm <dmalcolm@redhat.com>
5128
5129 PR c++/84269
5130 * known-headers.cc (get_stdlib_header_for_name): Add various names
5131 from <assert.h>, <string.h>, and <memory.h>; add more names from
5132 <stdio.h>.
5133
a7dea617
JJ
51342018-03-27 Jakub Jelinek <jakub@redhat.com>
5135
5136 PR c++/85061
5137 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5138 get_base_address of the second operand is a VAR_P, rather than the
5139 operand itself, and use gcc_checking_assert instead of gcc_assert.
5140
889a3a30
MP
51412018-03-23 Marek Polacek <polacek@redhat.com>
5142
5143 PR c++/85045
5144 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5145 <case RDIV_EXPR>: Tweak condition.
5146
452154b9
EB
51472018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5148
5149 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5150
63ecb626
JJ
51512018-03-16 Jakub Jelinek <jakub@redhat.com>
5152
ce811fc4
JJ
5153 PR c/84909
5154 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5155 diagnostics.
5156
63ecb626
JJ
5157 PR c/84910
5158 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5159 diagnostics.
5160
a1295eec
RB
51612018-03-16 Richard Biener <rguenther@suse.de>
5162
5163 PR c/84873
5164 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5165 unshare the possibly folded expression.
5166
919674fb
RB
51672018-03-15 Richard Biener <rguenther@suse.de>
5168
5169 PR c/84873
5170 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5171
f99309b2
MS
51722018-03-13 Martin Sebor <msebor@redhat.com>
5173
5174 PR tree-optimization/84725
5175 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5176 with all three narrow character types, including their qualified forms.
5177
e9b9fa4c
MS
51782018-03-12 Martin Sebor <msebor@redhat.com>
5179
5180 PR tree-optimization/83456
ab20d992 5181 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5182 Restore checking of bounded built-in functions.
5183 (check_function_arguments): Also return the result
5184 of warn_for_restrict.
ab20d992
JJ
5185 * c-common.c (check_function_restrict): Return bool.
5186 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5187
0805d020
MP
51882018-03-02 Marek Polacek <polacek@redhat.com>
5189
5190 PR c++/84171
5191 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5192 is erroneous.
5193
ed2a2f08
TS
51942018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5195
5196 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5197 function".
5198
90abdde0
MP
51992018-03-01 Marek Polacek <polacek@redhat.com>
5200
5201 PR c++/84639
5202 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5203 alignment in computation.
5204
c6db43fa
EB
52052018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5206
5207 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5208 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5209
9e25c7ed
EB
52102018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5211
5212 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5213 (is_char_array): Take a type instead of a declaration.
5214 (dump_ada_array_type): Likewise.
5215 (is_simple_enum): Minor tweak.
5216 (dump_ada_enum_type): New function extracted from...
5217 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5218 <INTEGER_TYPE>: Remove unreachable code.
5219 <RECORD_TYPE>: Likewise. Minor tweaks.
5220 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5221 <ENUMERAL_TYPE>: New case.
5222 <RECORD_TYPE>: Factor out common code.
5223 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5224 Minor tweaks. Deal with enumeral types.
5225 (dump_ada_structure): Minor tweaks.
5226
09de3550
EB
52272018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5228
5229 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5230 address for incomplete structures.
5231 (dump_forward_type): Do not bail out for incomplete structures.
5232 (dump_ada_declaration): Do not special-case incomplete structures
5233 for subtypes. Dump them as null records for types.
5234
095d8d4b
EB
52352018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5236
5237 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5238 (is_char_array): Fix formatting.
5239 (dump_template_types): Likewise.
5240 (dump_generic_ada_node): Rename into...
5241 (dump_ada_node): ...this.
5242 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5243 incomplete structures and not for empty structures. Do not use it
5244 when forward declarations are needed.
5245 (dump_forward_type): New function.
5246 (dump_nested_types): Remove FORWARD parameter. Do not consider
5247 TREE_VISITED and do not generate a forward declaration. Only dump
5248 original nested types for nested declaration.
5249 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5250 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5251 <RECORD_TYPE>: Do not consider TREE_VISITED.
5252 (dump_ada_declaration): Use booleans and fix formatting throughout.
5253 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5254 Call dump_forward_type instead of dump_nested_types for a typedef.
5255 Remove superfluous check and adjust call to dump_nested_types.
5256 <POINTER_TYPE>: Call dump_forward_type and fall through.
5257 (dump_ada_struct_decl): Rename into...
5258 (dump_ada_structure): ...this. Do not special-case empty structures.
5259
d4cfd486
MS
52602018-02-27 Martin Sebor <msebor@redhat.com>
5261
5262 PR c++/83871
5263 * c.opt (-Wmissing-attributes): New option.
5264
b22dbd03
ML
52652018-02-21 Martin Liska <mliska@suse.cz>
5266
5267 * c.opt (Wcatch-value=): Add IntegerRange.
5268
883dfe2a
JM
52692018-02-15 Jason Merrill <jason@redhat.com>
5270
5271 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5272
0444aa9c
NS
52732018-02-09 Nathan Sidwell <nathan@acm.org>
5274
5275 PR c/84293
5276 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5277 arg.
5278 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5279 arg. Adjust.
5280
cea71f0a
MS
52812018-02-09 Martin Sebor <msebor@redhat.com>
5282
5283 PR lto/84212
5284 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5285 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5286 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5287 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5288 (-Wuninitialized): Same.
5289
8c8b7be5
EB
52902018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5291
5292 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5293 keyword for components.
5294
7c30b12a
PC
52952018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5296
5297 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5298
eece7fe5
JK
52992018-02-02 Julia Koval <julia.koval@intel.com>
5300
5301 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5302
7d07a93a
MP
53032018-01-29 Marek Polacek <polacek@redhat.com>
5304
5305 PR c/83966
5306 * c-format.c (check_function_format): Check current_function_decl.
5307
53723269
JJ
53082018-01-27 Jakub Jelinek <jakub@redhat.com>
5309
5310 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5311 argument.
5312 (LAZY_HEX_FP_VALUES_CNT): Define.
5313 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5314 values rather than just 12.
5315 (builtin_define_with_hex_fp_value): Likewise.
5316
7365279f
BK
53172018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5318
92a285c1
ML
5319 PR other/70268
5320 * c.opt (-fmacro-prefix-map): New option.
5321 * c-opts.c (c_common_handle_option): Handle it.
5322 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5323 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5324
bb9869d5
DM
53252018-01-17 David Malcolm <dmalcolm@redhat.com>
5326
5327 PR c++/83814
5328 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5329
68dc87c3
EB
53302018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5331
5332 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5333 Skip 'f' and 'F' characters if it is true.
5334 (store_ada_macro): Minor tweak.
5335 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5336 <CPP_WSTRING>: Likewise.
5337 <CPP_STRING>: Output '&' in the buffer if not the first string.
5338 <CPP_NUMBER>: Adjust calls to dump_number.
5339
9a004410
DM
53402018-01-10 David Malcolm <dmalcolm@redhat.com>
5341
5342 PR c++/43486
5343 * c-common.c: Include "selftest.h".
5344 (get_atomic_generic_size): Perform the test for integral type
5345 before the range test for any integer constant, fixing indentation
5346 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5347 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5348 (selftest::test_fold_for_warn): New function.
5349 (selftest::c_common_c_tests): New function.
5350 (selftest::c_family_tests): Call it, and
5351 selftest::c_pretty_print_c_tests.
5352 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5353 * c-format.c (check_format_arg): Convert VAR_P check to a
5354 fold_for_warn.
5355 * c-pretty-print.c: Include "selftest.h".
5356 (pp_c_cast_expression): Don't print casts for location wrappers.
5357 (selftest::assert_c_pretty_printer_output): New function.
5358 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5359 (selftest::test_location_wrappers): New function.
5360 (selftest::c_pretty_print_c_tests): New function.
5361 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5362
5c0caeb3
RS
53632018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5364 Alan Hayward <alan.hayward@arm.com>
5365 David Sherwood <david.sherwood@arm.com>
5366
5367 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5368
73a699ae
RS
53692018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5370 Alan Hayward <alan.hayward@arm.com>
5371 David Sherwood <david.sherwood@arm.com>
5372
5373 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5374 as polynomial.
5375
928686b1
RS
53762018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5377 Alan Hayward <alan.hayward@arm.com>
5378 David Sherwood <david.sherwood@arm.com>
5379
5380 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5381 (convert_vector_to_array_for_subscript): Handle polynomial
5382 TYPE_VECTOR_SUBPARTS.
5383 (c_common_type_for_mode): Check valid_vector_subparts_p.
5384 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5385 VECTOR_CST_NELTS.
5386
85ec4feb
JJ
53872018-01-03 Jakub Jelinek <jakub@redhat.com>
5388
5389 Update copyright years.
5390
170a8bd6 53912017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5392 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5393
5394 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5395 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5396
ab20d992 53972017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5398
5399 PR debug/83527
5400 PR debug/83419
5401 * c-semantics.c (only_debug_stmts_after_p): New.
5402 (pop_stmt_list): Clear side effects in debug-only stmt list.
5403 Check for single nondebug stmt followed by debug stmts only.
5404
c12d20d4
AO
54052017-12-21 Alexandre Oliva <aoliva@redhat.com>
5406
5407 PR debug/83419
5408 * c-semantics.c (pop_stmt_list): Propagate side effects from
5409 single nondebug stmt to container list.
5410
01512446
JJ
54112017-12-19 Jakub Jelinek <jakub@redhat.com>
5412
5413 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5414 conditions with typical order conditions.
5415
82cfbd01
MP
54162017-12-18 Marek Polacek <polacek@redhat.com>
5417
5418 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5419 not in effect.
5420
99da11ec
MS
54212017-12-17 Martin Sebor <msebor@redhat.com>
5422
5423 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5424 an error for attribute warn_if_not_aligned.
5425
cc8bea0a
MS
54262017-12-16 Martin Sebor <msebor@redhat.com>
5427
5428 PR tree-optimization/78918
5429 * c-common.c (check_function_restrict): Avoid checking built-ins.
5430 * c.opt (-Wrestrict): Include in -Wall.
5431
4849deb1
JJ
54322017-12-15 Jakub Jelinek <jakub@redhat.com>
5433
5434 * c-attribs.c (c_common_attribute_table,
5435 c_common_format_attribute_table): Swap affects_type_identity
5436 and handler fields, adjust comments.
5437
c65e18d3
BE
54382017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5439
5440 * c.opt (Wcast-function-type): New warning option.
5441 * c-lex.c (get_fileinfo): Avoid warning.
5442 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5443
2004617a
QZ
54442017-12-14 Qing Zhao <qing.zhao@oracle.com>
5445
7365279f 5446 PR middle_end/79538
2004617a
QZ
5447 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5448 Adjust the size of buf1 and buf2, add a new buf to avoid
5449 format-overflow warning.
5450
ab20d992 54512017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5452
5453 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5454 subsequent statement list.
5455
5d9ae53d
MS
54562017-12-07 Martin Sebor <msebor@redhat.com>
5457
5458 PR c/81544
5459 PR c/81566
5460 * c-attribs.c (attr_aligned_exclusions): New array.
5461 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5462 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5463 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5464 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5465 (attr_warn_unused_result_exclusions): Same.
5466 (handle_hot_attribute, handle_cold_attribute): Simplify.
5467 (handle_const_attribute): Warn on function returning void.
5468 (handle_pure_attribute): Same.
5469 (handle_aligned_attribute): Diagnose conflicting attribute
5470 specifications.
5471 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5472
c79144f8
DM
54732017-12-06 David Malcolm <dmalcolm@redhat.com>
5474
5475 PR c/83236
5476 * c-common.c (selftest::c_family_tests): Call
5477 selftest::c_spellcheck_cc_tests.
5478 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5479 * c-spellcheck.cc: Include "selftest.h".
5480 (name_reserved_for_implementation_p): New function.
5481 (should_suggest_as_macro_p): New function.
5482 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5483 should_suggest_as_macro_p and call it.
5484 (selftest::test_name_reserved_for_implementation_p): New function.
5485 (selftest::c_spellcheck_cc_tests): New function.
5486 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5487
613bc14f
DM
54882017-12-06 David Malcolm <dmalcolm@redhat.com>
5489
5490 * c-spellcheck.cc: New file, taken from macro-handling code in
5491 spellcheck-tree.c.
5492 * c-spellcheck.h: New file, taken from macro-handling code in
5493 spellcheck-tree.h.
5494
e76c7157
JJ
54952017-12-01 Jakub Jelinek <jakub@redhat.com>
5496
5497 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5498 attribute.
5499 (handle_simd_attribute): Don't check for "cilk simd function"
5500 attribute. Reindent, formatting changes.
5501
b0da4034
JK
55022017-11-30 Julia Koval <julia.koval@intel.com>
5503
5504 * c-common.h (inv_list): Remove.
5505
058f0b9e
JJ
55062017-11-28 Jakub Jelinek <jakub@redhat.com>
5507
5508 PR sanitizer/81275
5509 * c-common.c (c_switch_covers_all_cases_p_1,
5510 c_switch_covers_all_cases_p): New functions.
5511 * c-common.h (c_switch_covers_all_cases_p): Declare.
5512
5e9d6aa4 55132017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5514 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5515
5516 * array-notation-common.c: Delete.
5517 * c-cilkplus.c: Ditto.
5518 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5519 * c-common.def (ARRAY_NOTATION_REF): Remove.
5520 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5521 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5522 c_validate_cilk_plus_loop, cilkplus_an_parts,
5523 cilk_ignorable_spawn_rhs_op,
5524 cilk_recognize_spawn): Remove.
5525 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5526 * c-omp.c: Remove CILK_SIMD check.
5527 * c-pragma.c: Ditto.
5528 * c-pragma.h: Remove CILK related pragmas.
5529 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5530 ARRAY_NOTATION_REF condition.
5531 (c_pretty_printer::expression): Ditto.
5532 * c.opt (fcilkplus): Remove.
5533 * cilk.c: Delete.
5534
1af4ebf5
MG
55352017-11-21 Marc Glisse <marc.glisse@inria.fr>
5536
5537 * c-pretty-print.c (pp_c_additive_expression,
5538 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5539
d44ed508
JJ
55402017-11-21 Jakub Jelinek <jakub@redhat.com>
5541
7d2f0f9b
JJ
5542 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5543
d44ed508
JJ
5544 PR c++/83059
5545 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5546 instead of tree_to_uhwi, formatting fix.
5547
26edace6
DM
55482017-11-20 David Malcolm <dmalcolm@redhat.com>
5549
5550 PR c/81404
5551 * known-headers.cc: New file, based on material from c/c-decl.c.
5552 (suggest_missing_header): Copied as-is.
5553 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5554 heavily edited to add C++ support. Add some knowledge about
5555 <limits.h>, <stdint.h>, and <wchar.h>.
5556 * known-headers.h: Likewise.
5557
6c7a259b
DM
55582017-11-20 David Malcolm <dmalcolm@redhat.com>
5559
5560 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5561 (lookup_name_fuzzy): Likewise. Convert return type from
5562 const char * to name_hint. Add location_t param.
5563 * name-hint.h: New header.
5564
f9c59f7e
JJ
55652017-11-19 Jakub Jelinek <jakub@redhat.com>
5566
5567 PR c/66618
5568 PR c/69960
5569 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5570
1e39313a
JM
55712017-11-16 Joseph Myers <joseph@codesourcery.com>
5572
5573 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5574 expected publication date of C17.
5575 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5576
3ca0dc60
JM
55772017-11-15 Joseph Myers <joseph@codesourcery.com>
5578
5579 PR c/81156
5580 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5581 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5582
025d57f0
MS
55832017-11-10 Martin Sebor <msebor@redhat.com>
5584
5585 PR c/81117
5586 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5587 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5588 * c.opt (-Wstringop-truncation): New option.
5589
1b6fa695
ML
55902017-11-06 Martin Liska <mliska@suse.cz>
5591
5592 PR middle-end/82404
5593 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5594 FE.
5595 * c.opt: Set default value of warn_return_type.
5596
64a5912c
DM
55972017-10-31 David Malcolm <dmalcolm@redhat.com>
5598
5599 * c-common.c (binary_op_error): Update for renaming of
5600 error_at_rich_loc.
5601 (c_parse_error): Likewise.
5602 * c-warn.c (warn_logical_not_parentheses): Likewise for
5603 renaming of inform_at_rich_loc.
5604 (warn_for_restrict): Likewise for renaming of
5605 warning_at_rich_loc_n.
5606
c76dc9c3
JM
56072017-10-30 Joseph Myers <joseph@codesourcery.com>
5608
5609 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5610 * c-opts.c (set_std_c17): New function.
5611 (c_common_init_options): Use gnu17 as default C version.
5612 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5613
ee5fd23a
MM
56142017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5615
5616 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5617 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5618 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5619 __FP_FAST_FMA<N>X.
5620
d1047465
MP
56212017-10-23 Marek Polacek <polacek@redhat.com>
5622
5623 PR c/82681
5624 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5625
9e878cf1
EB
56262017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5627
5628 * c-common.c (check_builtin_function_arguments): Also check arguments
5629 of __builtin_alloca_with_align_and_max.
5630
89b6abbb
DM
56312017-10-17 David Malcolm <dmalcolm@redhat.com>
5632
5633 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5634 rather than NULL to format_warning_va.
5635 (check_format_types): Likewise when calling format_type_warning.
5636 Remove code to extract source_ranges and source_range * in favor
5637 of just a location_t.
5638 (format_type_warning): Convert source_range * param to a
5639 location_t.
5640
39382c09
JJ
56412017-10-13 Jakub Jelinek <jakub@redhat.com>
5642
5643 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5644 [LR]SHIFT_EXPR.
5645
62e1c678
DM
56462017-10-12 David Malcolm <dmalcolm@redhat.com>
5647
5648 * c-common.c (enum missing_token_insertion_kind): New enum.
5649 (get_missing_token_insertion_kind): New function.
5650 (maybe_suggest_missing_token_insertion): New function.
5651 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5652
b90c9338
NS
56532017-10-11 Nathan Sidwell <nathan@acm.org>
5654
5655 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5656 (c_common_handle_option): Update incpath_kind names.
5657
3a266bcd
ML
56582017-10-11 Martin Liska <mliska@suse.cz>
5659
5660 PR sanitizer/82490
5661 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5662 Wattributes warning.
5663
8e6cdc90
RS
56642017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5665
5666 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5667 operating on trees as wide_ints.
5668 * c-common.c (pointer_int_sum): Likewise.
5669 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5670 * c-warn.c (match_case_to_enum_1): Likewise.
5671 (c_do_switch_warnings): Likewise.
5672 (maybe_warn_shift_overflow): Likewise.
5673
802b38c9
JJ
56742017-10-10 Jakub Jelinek <jakub@redhat.com>
5675
5676 PR c/82437
5677 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5678 instead of wide_int::from.
5679
4e34b338
JJ
56802017-10-06 Jakub Jelinek <jakub@redhat.com>
5681
5682 PR c/82437
5683 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5684 using to_widest use wide_int with the larger of the two precisions.
5685
4bc4b2b4
BE
56862017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5687
5688 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5689 functions.
5690
a1488398
RS
56912017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5692
5693 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5694 when combining the original unconverted comparison operands.
5695
01c9fb68
JJ
56962017-09-29 Jakub Jelinek <jakub@redhat.com>
5697
5698 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5699 attribute.
5700
6e3e8419
EB
57012017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5702
5703 * c-ada-spec.c (to_ada_name): Add index parameter.
5704 (pp_ada_tree_identifier): Likewise.
5705 (dump_ada_macros): Adjust call to to_ada_name.
5706 (struct overloaded_name_hash): New type.
5707 (struct overloaded_name_hasher): Likewise.
5708 (overloaded_names): New hash table.
5709 (compute_overloading_index): New function.
5710 (dump_ada_decl_name): Call it and pass the result to
5711 pp_ada_tree_identifier.
5712 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5713 (dump_ada_function_declaration): Likewise.
5714 (dump_generic_ada_node): Likewise.
5715 (print_constructor): Likewise.
5716 (print_destructor): Likewise.
5717 (dump_ada_specs): Delete overloaded_names table.
5718
79310774
EB
57192017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5720
5721 * c-ada-spec.c (max_ada_macros): Move around.
5722 (store_ada_macro_index): Likewise.
5723 (source_file): Rename into...
5724 (macro_source_file): ...this.
5725 (count_ada_macro): Move around.
5726 (store_ada_macro): Likewise.
5727 (compare_macro): Likewise.
5728 (print_ada_macros): Merge in...
5729 (dump_ada_macros): ...this.
5730 (source_file_base): Rename into...
5731 (current_source_file): ...this.
5732 (print_comment): Move around.
5733 (dump_ada_nodes): Call dump_ada_declaration directly.
5734 (struct with): Change type of limited field to bool.
5735 (append_withs): Change type of limited_access parameter to bool.
5736 (pp_ada_tree_identifie): Likewise.
5737 (dump_ada_decl_nam): Likewise.
5738 (dump_generic_ada_node): Likewise. Do not print the return type.
5739 (to_ada_name): Change type of space_found parameter to bool.
5740 (dump_ada_function_declaration): Return void and change type of
5741 parameters to bool. Also print the return type for a function.
5742 (print_ada_methods): Rename into...
5743 (dump_ada_methods): ...this.
5744 (print_ada_declaration): Rename into ...
5745 (dump_ada_declaration): ...this. Do not print the return type.
5746 (print_ada_struct_decl): Rename into...
5747 (dump_ada_struct_decl): ...this.
5748
7d386d45
JJ
57492017-09-29 Jakub Jelinek <jakub@redhat.com>
5750
5751 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5752 rather than DECL_INITIAL.
5753 (common_handle_aligned_attribute): Likewise.
5754
ab20d992 57552017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5756
5757 * c.opt (gen-decls): Add RejectNegative.
5758
026a79f7
AS
57592017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5760 Jakub Jelinek <jakub@redhat.com>
5761
5762 Add support for -std=c++2a.
5763 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5764 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5765 * c-opts.c (set_std_cxx2a): New.
5766 (c_common_handle_option): Set options when -std=c++2a is enabled.
5767 (c_common_post_options): Adjust comments.
5768 (set_std_cxx14, set_std_cxx17): Likewise.
5769
4a8ca690
EB
57702017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5771
5772 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5773 message for non-uniform endianness and issue a warning in C++.
5774
7b936140
JJ
57752017-09-15 Jakub Jelinek <jakub@redhat.com>
5776
5777 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5778 (Wc++17-compat): Change from undocumented alias to option.
5779 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5780 change C++1z to C++17 in description.
5781 (std=c++1z, std=gnu++1z): Change from option to undocumented
5782 deprecated alias.
5783 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5784 Adjust description.
5785 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5786 * c-opts.c (set_std_cxx1z): Rename to ...
5787 (set_std_cxx17): ... this.
5788 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5789 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5790 caller.
7b936140
JJ
5791 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5792 comments.
5793
12263f13
L
57942017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5795
5796 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5797 function alignment if warn_if_not_aligned_p is true.
5798
6836632e
NS
57992017-09-12 Nathan Sidwell <nathan@acm.org>
5800
5801 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5802 resort_sorted_fields): Move to c/c-decl.c.
5803 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5804 (struct sorted_fields_type): Move to c/c-lang.h.
5805
019bf9ad
JW
58062017-09-09 Jonathan Wakely <jwakely@redhat.com>
5807
5808 PR c++/81852
5809 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5810
bc7fe952
MP
58112017-09-04 Marek Polacek <polacek@redhat.com>
5812
5813 PR c/81783
5814 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5815 (warn_tautological_cmp): Call it.
5816
ab20d992 58172017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5818
5819 * c-opts.c (c_common_finish): Write dependency information even if
5820 there are errors.
5821
d2e05fcb
JJ
58222017-09-01 Jakub Jelinek <jakub@redhat.com>
5823
5824 PR c/81887
5825 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5826 (omp_pragmas_simd): ... here.
5827 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5828 create new clauses list containing just simd clause.
5829
18e2a8b8
RS
58302017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5831 Alan Hayward <alan.hayward@arm.com>
5832 David Sherwood <david.sherwood@arm.com>
5833
5834 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5835 into scalar_mode_supported_p call.
5836 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5837
16d22000
RS
58382017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5839 Alan Hayward <alan.hayward@arm.com>
5840 David Sherwood <david.sherwood@arm.com>
5841
5842 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5843 for the mode iterator.
5844
b397965c
RS
58452017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5846 Alan Hayward <alan.hayward@arm.com>
5847 David Sherwood <david.sherwood@arm.com>
5848
5849 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5850 * c-common.c (c_build_vec_perm_expr): Likewise.
5851
357b7604
RS
58522017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5853 Alan Hayward <alan.hayward@arm.com>
5854 David Sherwood <david.sherwood@arm.com>
5855
5856 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5857
e05c94ba
RS
58582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5859 Alan Hayward <alan.hayward@arm.com>
5860 David Sherwood <david.sherwood@arm.com>
5861
5862 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5863 before calling targetm.addr_space.valid_pointer_mode.
5864
5c20c4af
RS
58652017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5866 Alan Hayward <alan.hayward@arm.com>
5867 David Sherwood <david.sherwood@arm.com>
5868
5869 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5870
c94843d2 58712017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5872 Alan Hayward <alan.hayward@arm.com>
5873 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5874
5875 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5876 iterators.
5877 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5878
4e10a5a7
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-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5884 case statements.
5885
130fcab0
ML
58862017-08-29 Martin Liska <mliska@suse.cz>
5887
5888 PR other/39851
5889 * c-common.c (parse_optimize_options): Add argument to function
5890 call.
5891 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5892
14e18d71
DM
58932017-08-24 David Malcolm <dmalcolm@redhat.com>
5894
5895 * c-lex.c (interpret_float): Use token location
5896 when building an EXCESS_PRECISION_EXPR.
5897
2f687306
DM
58982017-08-21 David Malcolm <dmalcolm@redhat.com>
5899
5900 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5901 it to check_function_format.
5902 * c-common.h (check_function_arguments): Add vec<location_t> *
5903 param.
5904 (check_function_format): Likewise.
5905 * c-format.c (struct format_check_context): Add field "arglocs".
5906 (check_function_format): Add param "arglocs"; pass it to
5907 check_format_info.
ab20d992 5908 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5909 new field of format_ctx.
5910 (check_format_arg): Pass format_ctx->arglocs to new param of
5911 check_format_info_main.
5912 (class argument_parser): New field "arglocs".
5913 (argument_parser::argument_parser): Add "arglocs_" param and use
5914 it to initialize new field.
5915 (argument_parser::check_argument_type): Pass new arglocs field to
5916 check_format_types.
5917 (check_format_info_main): Add param "arglocs", and use it when
5918 constructing arg_parser.
5919 (check_format_types): Add param "arglocs"; use it if non-NULL when
5920 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5921
00aa1fa2
L
59222017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5923
5924 PR c/53037
5925 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5926 (c_common_attribute_table): Add warn_if_not_aligned.
5927 (handle_aligned_attribute): Renamed to ...
5928 (common_handle_aligned_attribute): Remove argument, name, and add
5929 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5930 (handle_aligned_attribute): New.
5931 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5932
27be025d
MS
59332017-08-14 Martin Sebor <msebor@redhat.com>
5934
5935 PR c/81117
5936 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5937 (handle_nonstring_attribute): New function.
5938
da67acb9
MS
59392017-08-14 Martin Sebor <msebor@redhat.com>
5940
5941 PR c/81117
5942 * c-format.h (T89_G): New macro.
5943 * c-format.c (local_gcall_ptr_node): New variable.
5944 (init_dynamic_diag_info): Initialize it.
5945
a8b522b4
ML
59462017-08-11 Martin Liska <mliska@suse.cz>
5947
5948 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5949 TARGET_SUPPORTS_ALIASES.
5950
32129a17
DM
59512017-08-10 David Malcolm <dmalcolm@redhat.com>
5952
5953 * c-common.c (c_parse_error): Add rich_location * param, using it
5954 rather implicitly using input_location.
5955 * c-common.h (c_parse_error): Add rich_location * param.
5956
30af3a2b
MP
59572017-08-09 Marek Polacek <polacek@redhat.com>
5958
5959 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5960 (c_common_truthvalue_conversion): Likewise.
5961 * c-omp.c (c_finish_omp_atomic): Likewise.
5962 * c-common.h (build_binary_op): Update declaration.
5963
314e6352
ML
59642017-08-08 Martin Liska <mliska@suse.cz>
5965
5966 * c-ada-spec.c: Include header files.
5967 * c-ubsan.c: Likewise.
5968 * c-warn.c: Likewise.
5969
56b5041c
JJ
59702017-08-07 Jakub Jelinek <jakub@redhat.com>
5971
5972 PR c/69389
5973 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5974
db440138
EB
59752017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5976
5977 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5978 (print_ada_methods): Likewise.
5979 (print_ada_declaration): Likewise.
5980
577eec56
ML
59812017-08-07 Martin Liska <mliska@suse.cz>
5982
5983 * array-notation-common.c: Add new includes.
5984 * c-format.c( handle_format_attribute): Canonicalize a format
5985 function name.
5986 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5987 attribute.
5988 * c-pretty-print.c: Add new include.
5989
b854df3c
EB
59902017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5991
5992 * c-ada-spec.c (has_static_fields): Look only into variables.
5993 (print_constructor): Add TYPE parameter and use it for the name.
5994 (print_destructor): Likewise.
5995 (print_ada_declaration): Adjust to new constructor/destructor names.
5996 Adjust calls to print_constructor and print_destructor.
5997 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5998 Look only into variables in the final loop.
5999
9f2cb25e
EB
60002017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6001
6002 * c-ada-spec.c (has_static_fields): Look only into fields.
6003 (dump_generic_ada_node): Small tweak.
6004 (dump_nested_types): Look only into fields.
6005 (print_ada_declaration): Look only into methods. Small tweak.
6006 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6007
f4bcd9eb
EB
60082017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6009
6010 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6011 (dump_ada_function_declaration): Likewise.
6012 (dump_generic_ada_node): Likewise.
6013 (print_ada_declaration): Add support for const-qualified variables.
6014
f34ebeb2
ML
60152017-07-31 Martin Liska <mliska@suse.cz>
6016
6017 PR sanitize/81530
6018 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6019 Guard condition with flag_sanitize_p also with current_function_decl
6020 non-null equality.
6021 (ubsan_maybe_instrument_reference_or_call): Likewise.
6022
218e5d04
UB
60232017-07-30 Uros Bizjak <ubizjak@gmail.com>
6024
6025 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6026
942047f2
EB
60272017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6028
6029 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6030 for enumeral types.
6031 (print_ada_declaration): Add missing guard for record types.
6032
a40ff0ae
JJ
60332017-07-27 Jakub Jelinek <jakub@redhat.com>
6034
6035 PR c/45784
6036 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6037 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6038 new COMPOUND_EXPRs around the rhs of the comparison.
6039
06bd22f6
MP
60402017-07-27 Marek Polacek <polacek@redhat.com>
6041
6042 PR c/81417
6043 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6044 the types.
6045
036ea399
JJ
60462017-07-27 Jakub Jelinek <jakub@redhat.com>
6047
6048 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6049 (handle_noipa_attribute): New function.
6050
417ca011
TD
60512017-07-07 Torsten Duwe <duwe@suse.de>
6052
6053 * c-attribs.c (c_common_attribute_table): Add entry for
6054 "patchable_function_entry".
6055
5aaa8fb4
NS
60562017-07-20 Nathan Sidwell <nathan@acm.org>
6057
6058 Remove TYPE_METHODS.
6059 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6060 dump_ada_template, print_ada_methods,
6061 print_ada_declaration): Member fns are on TYPE_FIELDS.
6062
ff22eb12
NS
60632017-07-18 Nathan Sidwell <nathan@acm.org>
6064
6065 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6066
eea77d1f
DM
60672017-07-14 David Malcolm <dmalcolm@redhat.com>
6068
6069 * c-common.c (try_to_locate_new_include_insertion_point): New
6070 function.
6071 (per_file_includes_t): New typedef.
6072 (added_includes_t): New typedef.
6073 (added_includes): New variable.
6074 (maybe_add_include_fixit): New function.
6075 * c-common.h (maybe_add_include_fixit): New decl.
6076
281ac396
MS
60772017-07-10 Martin Sebor <msebor@redhat.com>
6078
6079 PR other/81345
6080 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6081
b6f43128
DM
60822017-07-06 David Malcolm <dmalcolm@redhat.com>
6083
6084 * c-common.c (selftest::c_family_tests): New.
6085 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6086 (selftest::c_family_tests): New decl.
6087
efbf55b0
MP
60882017-07-04 Marek Polacek <polacek@redhat.com>
6089
6090 PR c/81231
6091 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6092 types.
6093
6c86bd88
MP
60942017-07-04 Marek Polacek <polacek@redhat.com>
6095
6096 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6097
17a7218b
ML
60982017-06-28 Martin Liska <mliska@suse.cz>
6099
6100 PR ipa/81128
6101 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6102 to a function declaration.
6103
63010089
ML
61042017-06-28 Martin Liska <mliska@suse.cz>
6105
6106 PR driver/79659
6107 * c.opt: Add IntegerRange to various options.
6108
3e2becc4
MP
61092017-06-26 Marek Polacek <polacek@redhat.com>
6110
6111 PR c/80116
6112 * c-common.h (warn_for_multistatement_macros): Declare.
6113 * c-warn.c: Include "c-family/c-indentation.h".
6114 (warn_for_multistatement_macros): New function.
6115 * c.opt (Wmultistatement-macros): New option.
6116 * c-indentation.c (guard_tinfo_to_string): No longer static.
6117 Change the parameter type to "enum rid". Handle RID_SWITCH.
6118 * c-indentation.h (guard_tinfo_to_string): Declare.
6119
2db9b7cd
MG
61202017-06-23 Marc Glisse <marc.glisse@inria.fr>
6121
6122 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6123
c3684b7b
MS
61242017-06-15 Martin Sebor <msebor@redhat.com>
6125
6126 PR c++/80560
6127 * c.opt (-Wclass-memaccess): New option.
6128
e72c4afd
BK
61292017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6130
6131 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6132
8a516588
MP
61332017-06-13 Marek Polacek <polacek@redhat.com>
6134
6135 PR objc/80949
6136 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6137 branches is null.
6138
45b2222a
ML
61392017-06-13 Martin Liska <mliska@suse.cz>
6140
6141 PR sanitize/78204
6142 * c-attribs.c (add_no_sanitize_value): New function.
6143 (handle_no_sanitize_attribute): Likewise.
6144 (handle_no_sanitize_address_attribute): Use the function.
6145 (handle_no_sanitize_thread_attribute): New function.
6146 (handle_no_address_safety_analysis_attribute): Use
6147 add_no_sanitize_value.
6148 (handle_no_sanitize_undefined_attribute): Likewise.
6149 * c-common.h: Declare new functions.
6150 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6151 (ubsan_instrument_shift): Likewise.
6152 (ubsan_instrument_bounds): Likewise.
6153 (ubsan_maybe_instrument_array_ref): Likewise.
6154 (ubsan_maybe_instrument_reference_or_call): Likewise.
6155
a01f151f
JM
61562017-06-11 Jason Merrill <jason@redhat.com>
6157
6158 * c-ada-spec.c, c-pragma.c: Use id_equal.
6159
3de4ac6d
MP
61602017-06-04 Marek Polacek <polacek@redhat.com>
6161
6162 PR c/80919
6163 * c-format.c (matching_type_p): Return false if any of the types
6164 requires structural equality.
6165
2474f48f
MS
61662017-06-02 Martin Sebor <msebor@redhat.com>
6167
6168 PR c/80892
6169 * c-warn.c (conversion_warning): Use -Wconversion for integer
6170 conversion and -Wfloat-conversion for floating one.
6171
40ffd95f
BE
61722017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6173
6174 * c.opt (Wsizeof-pointer-div): New warning option.
6175
3fa4634c
VR
61762017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6177
6178 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6179 (Wcatch-value=1): Enable by -Wall.
6180
f012c8ef
DM
61812017-05-30 David Malcolm <dmalcolm@redhat.com>
6182
6183 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6184 format_chars.
6185 * c.opt (fdiagnostics-show-template-tree): New option.
6186 (felide-type): New option.
6187
63dbcd13
VR
61882017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6189
6190 * c.opt (Wcatch-value=): New C++ warning flag.
6191
be136b5c
NS
61922017-05-24 Nathan Sidwell <nathan@acm.org>
6193
6194 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6195 const casts to avoid warning.
6196
3cd211af
MS
61972017-05-24 Martin Sebor <msebor@redhat.com>
6198
6199 PR c/80731
6200 * c-common.h (unsafe_conversion_p): Add a function argument.
6201 * c-common.c (unsafe_conversion_p): Same.
6202 Add type names and values to diagnostics.
6203 (scalar_to_vector): Adjust.
6204 * c-warn.c (constant_expression_error): Add a function argument.
6205 Add type names and values to diagnostics.
6206 (conversion_warning): Add a function argument.
6207 Add type names and values to diagnostics.
6208 (warnings_for_convert_and_check): Same.
6209
1ff7be5a
JM
62102017-05-19 Jason Merrill <jason@redhat.com>
6211
6212 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6213 enumerators.
6214
ff502317
BE
62152017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6216
6217 * c-format.c (locus): Move out of function scope,
6218 add GTY attribute.
6219
2a8a8d7b
NS
62202017-05-19 Nathan Sidwell <nathan@acm.org>
6221
6222 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6223 (c_common_parse_file): Remove class dump handling.
6224 (get_dump_info): Likewise.
6225
39aac208
RB
62262017-05-19 Richard Biener <rguenther@suse.de>
6227
6228 PR c++/80593
6229 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6230 to alias-set zero memory.
6231
6ecd2339
BE
62322017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6233
6234 * c-format.c (local_tree_type_node): Add GTY attribute.
6235
6574d78e
MP
62362017-05-18 Marek Polacek <polacek@redhat.com>
6237
6238 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6239 (c_common_fixed_point_type_for_size): Likewise.
6240 (c_common_type_for_mode): Likewise.
6241 (shorten_compare): Likewise.
6242 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6243 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6244
e3455240
MP
62452017-05-18 Marek Polacek <polacek@redhat.com>
6246
6247 * c-common.c (self_promoting_args_p): Change the return type to bool.
6248 Use false/true instead of 0/1.
6249 * c-common.h (self_promoting_args_p): Update.
6250
3fa8871b
MP
62512017-05-17 Marek Polacek <polacek@redhat.com>
6252
6253 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6254 * c-warn.c: Likewise.
6255
b42cc3ca
VV
62562017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6257
6258 Implement new C++ intrinsics __is_assignable and __is_constructible.
6259 * c-common.c (__is_assignable, __is_constructible): New.
6260 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6261
1a817418
ML
62622017-05-17 Martin Liska <mliska@suse.cz>
6263
6264 * c-common.h: Introduce dump_flags_t type and
6265 use it instead of int type.
6266 * c-gimplify.c (c_genericize): Likewise.
6267 * c-opts.c: Likewise.
6268
b2fa0a8b
MP
62692017-05-17 Marek Polacek <polacek@redhat.com>
6270
6271 * c-common.c (c_save_expr): Remove.
6272 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6273 * c-common.h (c_save_expr): Remove declaration.
6274
31c2d57d
VR
62752017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6276
6277 PR c/35441
6278 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6279 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6280 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6281 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6282 RDIV_EXPR.
6283 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6284
684f84de
MP
62852017-05-09 Marek Polacek <polacek@redhat.com>
6286
6287 PR c/80525
6288 * c-warn.c (unwrap_c_maybe_const): New.
6289 (warn_logical_operator): Call it.
6290
641da50a
NS
62912017-05-09 Nathan Sidwell <nathan@acm.org>
6292
6293 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6294 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6295
631238ac
MS
62962017-05-08 Martin Sebor <msebor@redhat.com>
6297
6298 PR translation/80280
6299 * c-format.h (struct format_flag_spec): Add new member.
6300 (T89_T): New macro.
6301 * c-format.c (local_tree_type_node): New global.
6302 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6303 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6304 (strfmon_flag_specs): Likewise.
6305 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6306 with distinct quoting properties.
6307 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6308 (flag_chars_t::validate): Add argument and handle bad quoting.
6309 (check_format_info_main): Handle quoting problems.
6310 (init_dynamic_diag_info): Simplify.
6311
49f0c04c
JM
63122017-05-08 Jason Merrill <jason@redhat.com>
6313
6314 * c-opts.c (c_common_post_options): Update defaults for
6315 flag_abi_version and flag_abi_compat_version.
6316
56d35585
DM
63172017-05-05 David Malcolm <dmalcolm@redhat.com>
6318
6319 * c-common.c (c_cpp_error): Replace report_diagnostic
6320 with diagnostic_report_diagnostic.
6321
0f2c4a8f
MS
63222017-05-04 Martin Sebor <msebor@redhat.com>
6323
6324 PR translation/80280
6325 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6326 (handle_weakref_attribute): Same.
6327
6fe63fb4
NS
63282017-05-03 Nathan Sidwell <nathan@acm.org>
6329
6330 Canonicalize canonical type hashing
6331 * c-common.c (complete_array_type): Use type_hash_canon.
6332
815d9cc6
XR
63332017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6334
92a285c1 6335 PR c++/80038
815d9cc6
XR
6336 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6337 prototype.
6338 (cilk_install_body_pedigree_operations): Likewise.
6339 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6340 detatched.
6341 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6342 (cilk_install_body_pedigree_operations): Likewise.
6343 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6344 unwrapping.
6345
f8a36447
JJ
63462017-04-27 Jakub Jelinek <jakub@redhat.com>
6347
6348 PR c++/80534
6349 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6350 flag on non-aggregate element types.
6351
7c145456
BE
63522017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6353
6354 * c-common.c (c_type_hasher, type_hash_table): Remove.
6355 (c_common_get_alias_set): Remove unreachable code.
6356 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6357
c3cbcd45
VR
63582017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6359
6360 * c.opt (Wextra-semi): New C++ warning flag.
6361
8a59d466
JJ
63622017-04-20 Jakub Jelinek <jakub@redhat.com>
6363
6364 PR middle-end/80423
6365 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6366
8487c9a5
JJ
63672017-04-18 Jakub Jelinek <jakub@redhat.com>
6368
6369 PR middle-end/79788
6370 PR middle-end/80375
6371 * c-common.c (c_common_type_for_mode): Don't handle
6372 widest_*_literal_type_node here.
6373 c_common_signed_or_unsigned_type): Likewise.
6374 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6375 to *intTI_type_node or *intDI_type_node depending on whether
6376 TImode is supported by the target or not.
6377
3ee0fb02
ML
63782017-04-10 Martin Liska <mliska@suse.cz>
6379
6380 PR sanitizer/80350
6381 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6382 doing an UBSAN check.
6383
5764ee3c
JW
63842017-04-03 Jonathan Wakely <jwakely@redhat.com>
6385
6386 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6387
6f3af356
JJ
63882017-03-31 Jakub Jelinek <jakub@redhat.com>
6389
6390 PR c++/79572
6391 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6392 tree *.
6393 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6394 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6395 REFERENCE_TYPE.
6396
f6a7a9d5
DM
63972017-03-31 David Malcolm <dmalcolm@redhat.com>
6398
6399 PR documentation/78732
6400 * c.opt (Wendif-labels): Fix description to refer to
6401 #else rather than #elif.
6402
af88f557
JJ
64032017-03-31 Jakub Jelinek <jakub@redhat.com>
6404
6405 PR libstdc++/80251
6406 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6407 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6408
a9e4a1a5
JJ
64092017-03-27 Jakub Jelinek <jakub@redhat.com>
6410
6411 PR middle-end/80162
6412 * c-common.c (c_common_mark_addressable_vec): Don't set
6413 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6414
3f01b620
MS
64152017-03-21 Martin Sebor <msebor@redhat.com>
6416
6417 PR c++/79548
6418 * c-common.c (set_underlying_type): Mark type used only when
6419 original del is declared unused.
6420
2f6f187a
DM
64212017-03-10 David Malcolm <dmalcolm@redhat.com>
6422
6423 PR translation/79848
6424 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6425 "%qs".
6426
a02fa805
DM
64272017-03-10 David Malcolm <dmalcolm@redhat.com>
6428
6429 PR c/79921
6430 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6431 from inform's message, so that xgettext can locate it.
6432
822a132c
MP
64332017-03-09 Marek Polacek <polacek@redhat.com>
6434
6435 PR c++/79962
6436 PR c++/79984
6437 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6438 conversion to the attribute list.
6439
bba81f1c
ML
64402017-03-09 Martin Liska <mliska@suse.cz>
6441
6442 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6443
108154ff
JM
64442017-03-03 Jason Merrill <jason@redhat.com>
6445
6446 * c.opt (Wnoexcept-type): New.
6447
eb0e7c34
RB
64482017-03-02 Richard Biener <rguenther@suse.de>
6449
6450 PR c/79756
6451 * c-common.c (c_common_mark_addressable_vec): Look through
6452 C_MAYBE_CONST_EXPR.
6453
9453ba0a
ML
64542017-02-28 Martin Liska <mliska@suse.cz>
6455
6456 * c.opt: Replace space with tabular for options of <number>
6457 type.
6458
6a825afe
ML
64592017-02-28 Martin Liska <mliska@suse.cz>
6460
6461 * c.opt: Fix --help=option -Q for options which are of
6462 an enum type.
6463
4227c9ad
JJ
64642017-02-24 Jakub Jelinek <jakub@redhat.com>
6465
6466 PR c++/79588
6467 * c-common.c (check_function_restrict): New function.
6468 (check_function_arguments): Add FNDECL argument. Call
6469 check_function_restrict if -Wrestrict.
6470 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6471 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6472 * c-common.h (check_function_arguments): Add FNDECL argument.
6473 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6474
59909673
EB
64752017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6476
6477 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6478 treatment of parameters with pointer-to-tagged type and tidy up.
6479 (print_ada_methods): Remove the special treatment of C++ static member
6480 functions.
6481
54dcd526
ML
64822017-02-22 Martin Liska <mliska@suse.cz>
6483
6484 * c.opt: Replace inequality signs with square brackets
6485 for -Wnornalized.
6486
00bc9de3
JJ
64872017-02-21 Jakub Jelinek <jakub@redhat.com>
6488
6489 PR c++/79641
6490 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6491 preserve quals.
6492
97fcf744
JM
64932017-02-17 Joseph Myers <joseph@codesourcery.com>
6494
6495 * c-cppbuiltin.c (builtin_define_float_constants): Define
6496 __DECIMAL_DIG__ to the value for long double.
6497
c7545f1c
MP
64982017-02-15 Marek Polacek <polacek@redhat.com>
6499
6500 PR c/79515
6501 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6502 conversion has occured.
6503
c2e84327
DM
65042017-01-24 David Malcolm <dmalcolm@redhat.com>
6505
6506 * c-common.c (c_common_reswords): Add "__RTL".
6507 * c-common.h (enum rid): Add RID_RTL.
6508
2ebd93e1
MP
65092017-01-20 Marek Polacek <polacek@redhat.com>
6510
6511 PR c/64279
6512 * c-common.h (do_warn_duplicated_branches_r): Declare.
6513 * c-gimplify.c (c_genericize): Walk the function tree calling
6514 do_warn_duplicated_branches_r.
6515 * c-warn.c (expr_from_macro_expansion_r): New.
6516 (do_warn_duplicated_branches): New.
6517 (do_warn_duplicated_branches_r): New.
6518 * c.opt (Wduplicated-branches): New option.
6519
0d80ab91
DM
65202017-01-17 David Malcolm <dmalcolm@redhat.com>
6521
6522 PR c++/71497
6523 * c-indentation.c (warn_for_misleading_indentation): Use the past
6524 subjunctive in the note.
6525
7f991c36
AH
65262017-01-17 Aldy Hernandez <aldyh@redhat.com>
6527
6528 PR c/79116
6529 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6530 start type to integer_type.
6531
1c70261c
JJ
65322017-01-16 Jakub Jelinek <jakub@redhat.com>
6533
6534 PR driver/49726
6535 * c.opt (gen-decls): Add Driver flag.
6536
1ddca3f3
PC
65372017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6538
6539 Revert:
6540 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6541
6542 PR c++/71737
6543 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6544
7d2f3f1d
PC
65452017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6546
6547 PR c++/71737
6548 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6549
bce6f760
MS
65502017-01-12 Martin Sebor <msebor@redhat.com>
6551
6552 (-Wformat-overflow): ...to this.
6553
bf5fbf46
MS
65542017-01-11 Martin Sebor <msebor@redhat.com>
6555
6556 PR c/78768
6557 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6558 Also enable for LTO.
6559
e363df3f
JM
65602017-01-10 Jason Merrill <jason@redhat.com>
6561
6562 Implement P0195R2, C++17 variadic using.
6563 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6564
bd2c6270
JJ
65652017-01-09 Jakub Jelinek <jakub@redhat.com>
6566
6567 PR translation/79019
6568 PR translation/79020
6569 * c.opt (Wnormalized=): Fix typo in description.
6570
efcc8d38
MS
65712017-01-08 Martin Sebor <msebor@redhat.com>
6572
6573 PR middle-end/77708
6574 * c.opt (-Wformat-truncation): New option.
6575
ab20d992 65762017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6577
6578 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6579 value to unsigned short to fit in 4 hex digits without
6580 warnings.
6581
4e89adf9
EB
65822017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6583
6584 * c.opt (fsso-struct): Add 'native' value.
6585
cd445b54
ML
65862017-01-05 Martin Liska <mliska@suse.cz>
6587
6588 PR pch/78970
6589 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6590 header.
6591
a9342885
MP
65922017-01-04 Marek Polacek <polacek@redhat.com>
6593
6594 PR c++/64767
6595 * c.opt (Wpointer-compare): New option.
6596
fc73e60c
JJ
65972017-01-04 Jakub Jelinek <jakub@redhat.com>
6598
6599 PR driver/78957
6600 * c.opt (fsso-struct=): Add RejectNegative.
6601
cbe34bb5
JJ
66022017-01-01 Jakub Jelinek <jakub@redhat.com>
6603
6604 Update copyright years.
6605
d4a6c0ea
ML
66062016-12-29 Martin Liska <mliska@suse.cz>
6607
6608 PR c/78933
6609 * c.opt (strong-eval-order): Add RejectNegative keyword.
6610
67a5ad7c
JM
66112016-12-22 Jason Merrill <jason@redhat.com>
6612
6613 Implement P0522R0, matching of template template arguments.
6614 * c-cppbuiltin.c (c_cpp_builtins): Define
6615 __cpp_template_template_args.
6616
0dba7960
JJ
66172016-12-21 Jakub Jelinek <jakub@redhat.com>
6618
6619 PR bootstrap/78817
6620 * c-common.c (struct nonnull_arg_ctx): New type.
6621 (check_function_nonnull): Return bool instead of void. Use
6622 nonnull_arg_ctx as context rather than just location_t.
6623 (check_nonnull_arg): Adjust for the new context type, set
6624 warned_p to true if a warning has been diagnosed.
6625 (check_function_arguments): Return bool instead of void.
6626 * c-common.h (check_function_arguments): Adjust prototype.
6627
31bfc9b9
JM
66282016-12-21 Jason Merrill <jason@redhat.com>
6629
6630 * c.opt (-fnew-ttp-matching): New flag.
6631 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6632
629b3d75
MJ
66332016-12-14 Martin Jambor <mjambor@suse.cz>
6634
6635 * c-omp.c: Include omp-general.h instead of omp-low.h.
6636 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6637 name.
6638
474da67e
MS
66392016-12-14 Martin Sebor <msebor@redhat.com>
6640
6641 PR c/17308
6642 * c-common.c (check_nonnull_arg): Disable when optimization
6643 is enabled.
6644
fe366b87
MP
66452016-12-12 Marek Polacek <polacek@redhat.com>
6646
6647 PR c++/78647
6648 * c-common.c (attribute_fallthrough_p): Return false for
6649 error_mark_node.
6650
8bd9f164
MS
66512016-12-08 Martin Sebor <msebor@redhat.com>
6652
6653 PR c/78284
6654 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6655
060162e0
MS
66562016-12-08 Martin Sebor <msebor@redhat.com>
6657
6658 PR c/78165
92a285c1
ML
6659 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6660 suffix.
060162e0 6661
ee92e7ba
MS
66622016-12-07 Martin Sebor <msebor@redhat.com>
6663
6664 PR c/53562
6665 PR middle-end/77784
6666 PR middle-end/78149
6667 PR middle-end/78138
6668 * c.opt (-Wstringop-overflow): New option.
6669
84b0769e
MO
66702016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6671
6672 * c-attribs.c (asan odr indicator): New attribute.
6673 (handle_asan_odr_indicator_attribute): New function.
6674
7fa6a965
PK
66752016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6676
6677 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6678 ptrdiff_type_node;
6679
56d8ffc1
JG
66802016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6681
6682 * c-common.c (excess_precision_mode_join): New.
6683 (c_ts18661_flt_eval_method): New.
6684 (c_c11_flt_eval_method): Likewise.
6685 (c_flt_eval_method): Likewise.
6686 * c-common.h (excess_precision_mode_join): New.
6687 (c_flt_eval_method): Likewise.
6688 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6689 (cpp_iec_559_value): Call it.
6690 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6691 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6692 __FLT_EVAL_METHOD_TS_18661_3__.
6693
04f0fcf7
JG
66942016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6695
6696 * c-opts.c (c_common_post_options): Add logic to handle the default
6697 case for -fpermitted-flt-eval-methods.
6698
fb2675cb
PB
66992016-11-23 Paolo Bonzini <bonzini@gnu.org>
6700
6701 * c.opt (Wexpansion-to-defined): New.
6702
ec1c5694
JJ
67032016-11-23 Jakub Jelinek <jakub@redhat.com>
6704
6705 PR target/78451
6706 * c-pragma.c (handle_pragma_target): Don't replace
6707 current_target_pragma, but chainon the new args to the current one.
6708
730c9e75
NS
67092016-11-22 Nathan Sidwell <nathan@acm.org>
6710
6711 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6712 indentation and formatting.
730c9e75 6713
89990732
MS
67142016-11-21 Martin Sebor <msebor@redhat.com>
6715
6716 * c.opt (-fprintf-return-value): Enable by default.
6717
48330c93
BE
67182016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6719
6720 PR c++/71973
6721 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6722 * c-common.c (c_common_nodes_and_builtins): Initialize
6723 const_tm_ptr_type_node.
6724
0d939c95
MP
67252016-11-16 Marek Polacek <polacek@redhat.com>
6726
6727 PR c/78285
6728 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6729
8e745a17
JJ
67302016-11-14 Jakub Jelinek <jakub@redhat.com>
6731
6732 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6733
1ee62b92 67342016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6735 Richard Biener <rguenther@suse.de>
6736
6737 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6738 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6739 * c.opt (fgimple): New option.
1ee62b92 6740
22b15758
UB
67412016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6742
6743 PR c/35503
6744 * c-common.h (warn_for_restrict): Declare.
6745 * c-warn.c: Include gcc-rich-location.h.
6746 (warn_for_restrict): New function.
6747 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6748 (gcc_cdiag_char_table): Likewise.
6749 (gcc_cxxdiag_char_table): Likewise.
6750 * c.opt (Wrestrict): New option.
6751
4be719cd
EB
67522016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6753
6754 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6755 for nested types only if the type is a record or union and dump SLOC.
6756
4a826ca6
JM
67572016-11-09 Jason Merrill <jason@redhat.com>
6758
6759 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6760
2e955d50
JJ
67612016-11-09 Jakub Jelinek <jakub@redhat.com>
6762
6763 * c-ubsan.c (ubsan_instrument_shift): Handle split
6764 -fsanitize=shift-base and -fsanitize=shift-exponent.
6765
51dc6603
JM
67662016-11-07 Jason Merrill <jason@redhat.com>
6767
6768 * c.opt (Wc++1z-compat): New.
6769 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6770
6dc4a604
ML
67712016-11-07 Martin Liska <mliska@suse.cz>
6772
6773 * c-warn.c (warn_for_unused_label): Save all labels used
6774 in goto or in &label.
6775
b302001e
JM
67762016-11-03 Jason Merrill <jason@redhat.com>
6777
6778 * c-cppbuiltin.c (c_cpp_builtins): Correct
6779 __cpp_inheriting_constructors.
6780
31f7f784
JM
67812016-11-01 Jason Merrill <jason@redhat.com>
6782
2bc78e3c
JM
6783 * c-cppbuiltin.c (c_cpp_builtins): Update
6784 __cpp_inheriting_constructors.
6785
31f7f784
JM
6786 * c.opt (-fnew-inheriting-ctors): New.
6787 * c-opts.c: Default to on for ABI 11+.
6788
dcb466ec
JJ
67892016-10-31 Jakub Jelinek <jakub@redhat.com>
6790
6791 PR c++/77948
6792 * c.opt (fext-numeric-literals): Add Var and Init.
6793 * c-opts.c (c_common_handle_option): Don't clear
6794 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6795 (c_common_post_options): Clear it here if not set
6796 explicitly.
6797
52e1b91e
AH
67982016-10-28 Aldy Hernandez <aldyh@redhat.com>
6799
6800 PR debug/77773
6801 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6802 if NULL.
6803
e16f1cc7
JJ
68042016-10-25 Jakub Jelinek <jakub@redhat.com>
6805
6806 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6807 * c-common.c (c_common_reswords): Add __builtin_launder.
6808
f8348061
BE
68092016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6810
6811 * c-common.c (c_common_truthvalue_conversion): Warn for
6812 multiplications in boolean context. Fix the quoting of '<<' and '<'
6813 in the shift warning.
6814
eff89e01
BE
68152016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6816
6817 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6818
24bc7bf4
JM
68192016-10-20 Jason Merrill <jason@redhat.com>
6820
6821 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6822
4c712374
BE
68232016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6824
6825 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6826 integer shift ops in boolean context.
6827
68282016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6829
6830 * c.opt (Walloca): New.
6831 (Walloca-larger-than=): New.
6832 (Wvla-larger-than=): New.
6833
8fa18c06
MP
68342016-10-17 Marek Polacek <polacek@redhat.com>
6835
6836 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6837 Return immediately when finding a match.
6838 (warn_tautological_cmp): Remove a boolean variable that is no longer
6839 needed.
6840
b12b1915
MP
68412016-10-17 Marek Polacek <polacek@redhat.com>
6842
6843 * c-attribs.c: New file.
6844 * c-common.c: Move attributes handling to c-attribs.c.
6845 (get_nonnull_operand): No longer static.
6846 * c-common.h: Move the declarations from c-attribs.c to its own section.
6847
2045acd9
JM
68482016-10-14 Jason Merrill <jason@redhat.com>
6849
6850 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6851 and __cpp_deduction_guides.
6852
14a2c9aa
JM
68532016-10-13 Jason Merrill <jason@redhat.com>
6854
6855 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6856
4d0cdd0c
TP
68572016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6858
6859 * c-cppbuiltin.c: Include memmodel.h.
6860 * c-opts.c: Likewise.
6861 * c-pragma.c: Likewise.
6862 * c-warn.c: Likewise.
6863
70f6d5e1
JJ
68642016-10-12 Jakub Jelinek <jakub@redhat.com>
6865
6866 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6867 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6868 * c-opts.c (sanitize_cpp_opts): Initialize
6869 cpp_opts->cpp_warn_implicit_fallthrough.
6870
78f61294
MP
68712016-10-11 Marek Polacek <polacek@redhat.com>
6872
6873 * c-common.c (warning_candidate_p): Change the return type to bool
6874 and return true/false instead of 1/0.
6875 (vector_mode_valid_p): Likewise.
6876
038b5cc0
MP
68772016-10-11 Marek Polacek <polacek@redhat.com>
6878
6879 * c-common.c (fold_for_warn): No longer static.
6880 (bool_promoted_to_int_p): Likewise.
6881 (c_common_get_narrower): Likewise.
6882 (constant_expression_warning): Move to c-warn.c.
6883 (constant_expression_error): Likewise.
6884 (overflow_warning): Likewise.
6885 (warn_logical_operator): Likewise.
6886 (find_array_ref_with_const_idx_r): Likewise.
6887 (warn_tautological_cmp): Likewise.
6888 (expr_has_boolean_operands_p): Likewise.
6889 (warn_logical_not_parentheses): Likewise.
6890 (warn_if_unused_value): Likewise.
6891 (strict_aliasing_warning): Likewise.
6892 (sizeof_pointer_memaccess_warning): Likewise.
6893 (check_main_parameter_types): Likewise.
6894 (conversion_warning): Likewise.
6895 (warnings_for_convert_and_check): Likewise.
6896 (match_case_to_enum_1): Likewise.
6897 (match_case_to_enum): Likewise.
6898 (c_do_switch_warnings): Likewise.
6899 (warn_for_omitted_condop): Likewise.
6900 (readonly_error): Likewise.
6901 (lvalue_error): Likewise.
6902 (invalid_indirection_error): Likewise.
6903 (warn_array_subscript_with_type_char): Likewise.
6904 (warn_about_parentheses): Likewise.
6905 (warn_for_unused_label): Likewise.
6906 (warn_for_div_by_zero): Likewise.
6907 (warn_for_memset): Likewise.
6908 (warn_for_sign_compare): Likewise.
6909 (do_warn_double_promotion): Likewise.
6910 (do_warn_unused_parameter): Likewise.
6911 (record_locally_defined_typedef): Likewise.
6912 (maybe_record_typedef_use): Likewise.
6913 (maybe_warn_unused_local_typedefs): Likewise.
6914 (maybe_warn_bool_compare): Likewise.
6915 (maybe_warn_shift_overflow): Likewise.
6916 (warn_duplicated_cond_add_or_warn): Likewise.
6917 (diagnose_mismatched_attributes): Likewise.
6918 * c-common.h: Move the declarations from c-warn.c to its own section.
6919 * c-warn.c: New file.
6920
627be19f
JM
69212016-10-08 Jason Merrill <jason@redhat.com>
6922
6923 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6924 into COND_EXPR in C++.
6925
7bad794a
JJ
69262016-10-08 Jakub Jelinek <jakub@redhat.com>
6927
6928 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6929 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6930 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6931
be845b04
JJ
69322016-10-07 Jakub Jelinek <jakub@redhat.com>
6933
6934 Implement LWG2296 helper intrinsic
6935 * c-common.h (enum rid): Add RID_ADDRESSOF.
6936 * c-common.c (c_common_reswords): Add __builtin_addressof.
6937
c09c4992
BE
69382016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6939
6940 PR c++/77700
6941 * c-common.c (c_common_truthvalue_conversion): Warn also for
6942 suspicious enum values in boolean context.
6943
342cfb3e
JJ
69442016-10-06 Jakub Jelinek <jakub@redhat.com>
6945
6946 Implement P0258R2 - helper for C++17
6947 std::has_unique_object_representations trait
6948 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6949 * c-common.c (c_common_reswords): Add
6950 __has_unique_object_representations.
6951
2e69f143
JJ
69522016-10-05 Jakub Jelinek <jakub@redhat.com>
6953
6954 PR sanitizer/66343
6955 * c-ubsan.c (ubsan_instrument_return): Don't call
6956 initialize_sanitizer_builtins here.
6957
700fff34
BE
69582016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6959
6960 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6961 conditional expression in boolean context when only one arm is
6962 non-boolean.
6963
9563bfcd
JJ
69642016-10-05 Jakub Jelinek <jakub@redhat.com>
6965
04a32443
JJ
6966 PR sanitizer/77823
6967 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6968 is not integral.
6969
9563bfcd
JJ
6970 * c-common.c (c_common_reswords): Update comment for C++11.
6971
f1644724
JM
69722016-10-04 Jason Merrill <jason@redhat.com>
6973
6974 * c-common.c (make_tree_vector_from_ctor): New.
6975 * c-common.h: Declare it.
6976
5a79befb
JJ
69772016-10-04 Jakub Jelinek <jakub@redhat.com>
6978
6979 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6980 __LIBGCC_JCR_SECTION_NAME__.
6981
1633d3b9
BE
69822016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6983
6984 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6985 left shift in boolean context.
6986
a2c6e7f2
JJ
69872016-09-29 Jakub Jelinek <jakub@redhat.com>
6988
6989 Implement P0001R1 - C++17 removal of register storage class specifier
6990 * c.opt (Wregister): New warning.
6991 * c-opts.c (c_common_post_options): Enable -Wregister by
6992 default for C++17.
6993
75304c87
JG
69942016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6995
6996 * c-opts.c (c_common_post_options): Remove special case for
6997 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6998 in C++.
6999
bbfac6da
JJ
70002016-09-27 Jakub Jelinek <jakub@redhat.com>
7001
6e39060a
JJ
7002 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7003 -std=c++1z.
7004
bbfac6da
JJ
7005 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7006
e73cf9a2
TP
70072016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7008
7009 * c-common.c: Include memmodel.h.
7010
c6147dc4
MP
70112016-09-26 Marek Polacek <polacek@redhat.com>
7012
7013 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7014
81fea426
MP
70152016-09-26 Marek Polacek <polacek@redhat.com>
7016
7017 PR c/7652
7018 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7019 (handle_fallthrough_attribute): New function.
7020 (attribute_fallthrough_p): New function.
7021 * c-common.h (attribute_fallthrough_p): Declare.
7022
9a2300e9
MP
70232016-09-24 Marek Polacek <polacek@redhat.com>
7024
7025 PR c/77490
7026 * c.opt (Wbool-operation): New.
7027
a09e9e35
BE
70282016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7029
7030 * c-common.c (c_common_truthvalue_conversion): Inhibit
7031 Wint-in-bool-context warning with from_macro_definition_at.
7032 Mention the expression will always evaluate to true.
7033
d43b4ccc
MS
70342016-09-21 Martin Sebor <msebor@redhat.com>
7035
7036 PR bootstrap/77676
7037 * c.opt (fprintf-return-value): Temporarily initialize to zero
7038 to unblock bootstrap failures.
7039
2e1c20b1
JJ
70402016-09-21 Jakub Jelinek <jakub@redhat.com>
7041
7042 PR c++/77651
7043 * c.opt (Waligned-new=): Add RejectNegative.
7044 (faligned-new=): Likewise. Spelling fix - change
7045 aligned_new_threshhold to aligned_new_threshold.
7046 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7047 to aligned_new_threshold.
7048
88d0c3f0
MS
70492016-09-20 Martin Sebor <msebor@redhat.com>
7050
7051 PR middle-end/49905
7052 * c.opt: Add -Wformat-length and -fprintf-return-value.
7053
144a96e4
BE
70542016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7055
7056 PR c++/77434
7057 * c.opt (Wint-in-bool-context): New warning.
7058 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7059 constants in boolean context.
7060
63012d9a
JM
70612016-09-19 Joseph Myers <joseph@codesourcery.com>
7062
7063 * c-common.c (max_align_t_align): Also consider alignment of
7064 float128_type_node.
7065
931388ce
JM
70662016-09-15 Jason Merrill <jason@redhat.com>
7067
7068 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7069 DECL_EXTERNAL.
7070
38711381
JM
70712016-09-14 Jason Merrill <jason@redhat.com>
7072
7073 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7074 limit FIELD_DECL, either.
7075
e51fbec3
MP
70762016-09-14 Marek Polacek <polacek@redhat.com>
7077
7078 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7079 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7080 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7081
254830ba
DM
70822016-09-13 David Malcolm <dmalcolm@redhat.com>
7083
7084 * c-common.c (warn_logical_not_parentheses): Replace
7085 rich_location::add_fixit_insert calls with add_fixit_insert_before
7086 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7087
42763690
JM
70882016-09-13 Jason Merrill <jason@redhat.com>
7089 Tom de Vries <tom@codesourcery.com>
7090
7091 PR c++/77427
7092 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7093
9453eee9
JM
70942016-09-13 Jason Merrill <jason@redhat.com>
7095
7096 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7097 limit types at all.
7098
e96809e3
JM
70992016-09-12 Jason Merrill <jason@redhat.com>
7100
7101 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7102 bit/byte confusion, allow large alignment for types.
7103
54dcdb88
BE
71042016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7105
7106 PR c++/77496
7107 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7108
d1463eb9
DM
71092016-09-12 David Malcolm <dmalcolm@redhat.com>
7110
7111 PR c/72858
7112 * c-format.c (argument_parser::check_argument_type): Add params
7113 "type_start" and "conversion_char". Use the former to generate
7114 offset_to_type_start and pass it and conversion_char to
7115 check_format_types.
7116 (check_format_info_main): Capture the start of the type
7117 information as "type_start", and pass it an format_char
7118 to arg_parser.check_argument_type.
7119 (check_format_types): Provide an example in the leading comment.
7120 Add params "offset_to_type_start" and "conversion_char"; pass
7121 them to format_type_warning calls.
7122 (test_get_modifier_for_format_len): Likewise.
7123 (matching_type_p): New function.
7124 (get_format_for_type): Add param "conversion_char" and move
7125 implementation into...
7126 (get_format_for_type_1): ...new function, called twice.
7127 Use new function matching_type_p rather than checking for
7128 TYPE_CANONICAL equality.
7129 (get_corrected_substring): New function.
7130 (format_type_warning): Provide an example in the leading comment.
7131 Add params "offset_to_type_start" and "conversion_char". Replace
7132 call to get_format_for_type with call to get_corrected_substring
7133 and move rejection of hints for widths/precisions there.
7134 (assert_format_for_type_streq): Add param "conversion_char".
7135 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7136 (test_get_format_for_type_printf): Add conversion chars to the
7137 tests, adding coverage for various combinations of integer
7138 vs double conversions, and for preserving octal and hexadecimal
7139 conversions.
7140 (test_get_format_for_type_scanf): Add conversion chars to the
7141 tests.
7142
5b28efbb
TV
71432016-09-10 Tom de Vries <tom@codesourcery.com>
7144
7145 PR C/71602
7146 * c-common.c (build_va_arg): Handle more strict
7147 targetm.canonical_va_list_type. Replace first argument type error with
7148 assert.
7149
3f0177e7
MS
71502016-09-09 Martin Sebor <msebor@redhat.com>
7151
7152 PR c/77520
7153 PR c/77521
7154 * c-format.c (argument_parser::find_format_char_info): Use %qc
7155 format directive unconditionally.
7156
af63ba4b
JM
71572016-09-09 Jason Merrill <jason@redhat.com>
7158
7159 Implement C++17 new of over-aligned types.
7160 * c.opt: Add -faligned-new and -Waligned-new.
7161 * c-common.c (max_align_t_align): Split out from...
7162 (cxx_fundamental_alignment_p): ...here.
7163 * c-common.h: Declare it.
7164 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7165
c65248cb
JM
71662016-09-09 Joseph Myers <joseph@codesourcery.com>
7167
7168 * c-cppbuiltin.c (builtin_define_type_width): New function.
7169 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7170 macros.
7171
e5106e27
DM
71722016-09-07 David Malcolm <dmalcolm@redhat.com>
7173
7174 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7175 a POINTER_TYPE.
7176 (substring_loc::get_location): Move to substring-locations.c,
7177 keeping implementation as...
7178 (c_get_substring_location): New function, from the above, reworked
7179 to use accessors rather than member lookup.
7180 * c-common.h (class substring_loc): Move to substring-locations.h,
7181 replacing with a forward decl.
7182 (c_get_substring_location): New decl.
7183 * c-format.c: Include "substring-locations.h".
7184 (format_warning_va): Move to substring-locations.c.
7185 (format_warning_at_substring): Likewise.
7186
ab20d992 71872016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7188
7189 PR c/77336
7190 * c-format.c (check_function_format): Avoid issuing warnings for
7191 functions unless they call format functions with non-constant
7192 format strings.
7193
b772a565
RB
71942016-09-06 Richard Biener <rguenther@suse.de>
7195
7196 PR c/77450
7197 * c-common.c (c_common_mark_addressable_vec): Handle
7198 COMPOUND_LITERAL_EXPR.
7199
25ff5dd3
MP
72002016-09-05 Marek Polacek <polacek@redhat.com>
7201
7202 PR c/77423
7203 * c-common.c (bool_promoted_to_int_p): New function.
7204 (expr_has_boolean_operands_p): New function.
7205 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7206 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7207
21234eb5
TV
72082016-09-04 Tom de Vries <tom@codesourcery.com>
7209
7210 revert:
7211 2016-08-29 Tom de Vries <tom@codesourcery.com>
7212
7213 * c-common.c (build_va_arg): Replace first argument type error
7214 with assert.
7215
9dc5773f
JJ
72162016-09-02 Jakub Jelinek <jakub@redhat.com>
7217
7218 PR c/65467
7219 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7220 (c_finish_omp_for): Reject _Atomic qualified iterators.
7221
72222016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7223
7224 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7225 size to guarantee it fits the output of the formatted function
7226 regardless of its arguments.
7227
295844f6
MP
72282016-09-01 Marek Polacek <polacek@redhat.com>
7229
7230 PR c/7652
7231 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7232 FALLTHRU comments.
7233
3d06b6f2
MP
72342016-08-29 Marek Polacek <polacek@redhat.com>
7235
7236 PR c/77292
7237 * c-common.c (warn_logical_not_parentheses): Don't warn for
7238 a comparison or a logical operator.
7239
34cedad5
TV
72402016-08-29 Tom de Vries <tom@codesourcery.com>
7241
7242 * c-common.c (build_va_arg): Fix type comparison assert.
7243
f162d717
TV
72442016-08-29 Tom de Vries <tom@codesourcery.com>
7245
7246 * c-common.c (build_va_arg): Replace first argument type error
7247 with assert.
7248
ba9bbd6f
TV
72492016-08-29 Tom de Vries <tom@codesourcery.com>
7250
7251 PR c/77398
7252 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7253 with error_mark_node as va_list instead of with illegal va_list.
7254
ebef225f
MP
72552016-08-25 Marek Polacek <polacek@redhat.com>
7256 David Malcolm <dmalcolm@redhat.com>
7257
7258 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7259 * c-common.h (warn_logical_not_parentheses): Update declaration.
7260
b00e6e75
MP
72612016-08-22 Marek Polacek <polacek@redhat.com>
7262
7263 PR c++/77321
7264 * c-common.c (warn_for_memset): Check type for null.
7265
6dc198e3
JM
72662016-08-22 Joseph Myers <joseph@codesourcery.com>
7267
14ec014e 7268 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7269 _FloatNx types for suffixes for built-in functions.
7270
c65699ef
JM
72712016-08-19 Joseph Myers <joseph@codesourcery.com>
7272
7273 PR c/32187
7274 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7275 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7276 (RID_FLOAT128X): New enum rid values.
7277 (CASE_RID_FLOATN_NX): New macro.
7278 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7279 keywords.
7280 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7281 corresponding complex types.
7282 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7283 _FloatNx and corresponding complex types.
7284 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7285 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7286 and _FloatNx types for the widest type for determining
7287 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7288 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7289 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7290 and _FloatNx types.
7291 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7292 constants.
7293 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7294 _FloatNx types.
7295
cc015f3a
DM
72962016-08-18 David Malcolm <dmalcolm@redhat.com>
7297
7298 * c-opts.c (c_diagnostic_finalizer): Update for change to
7299 diagnostic_show_locus.
7300
cb18fd07
DM
73012016-08-18 David Malcolm <dmalcolm@redhat.com>
7302
7303 * c-common.c: Include "spellcheck.h".
7304 (cb_get_suggestion): New function.
7305 * c-common.h (cb_get_suggestion): New decl.
7306 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7307 cb_get_suggestion.
7308
a76989dc
MP
73092016-08-18 Marek Polacek <polacek@redhat.com>
7310
7311 PR c/71514
7312 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7313 and pointer-to-VLA.
7314
65e736c0
DM
73152016-08-16 David Malcolm <dmalcolm@redhat.com>
7316
7317 PR c/72857
7318 * c-common.c (substring_loc::get_range): Rename to...
7319 (substring_loc::get_location): ...this, converting param from a
7320 source_range * to a location_t *. Call
7321 get_source_location_for_substring rather than
7322 get_source_range_for_substring, and pass in m_caret_idx.
7323 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7324 (substring_loc::get_range): Replace with...
7325 (substring_loc::get_location): ...this.
7326 (substring_loc::set_caret_index): New method.
7327 (substring_loc): Add field m_caret_idx.
7328 * c-format.c (format_warning_va): Update for above changes.
7329 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7330 clashing with type name.
7331 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7332 (check_argument_type): Likewise.
7333 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7334 Use a copy when emitting warnings, setting the caret index from TYPE.
7335
7e1dde14 73362016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7337 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7338
7339 * c-ada-spec.c (dump_number): New function.
7340 (handle_escape_character): Likewise.
7341 (print_ada_macros): Add handling of constant integers and strings.
7342
191816a3
MP
73432016-08-12 Marek Polacek <polacek@redhat.com>
7344
7345 PR c/7652
7346 * c-common.c (scalar_to_vector): Adjust fall through comment.
7347 * c-opts.c (c_common_handle_option): Likewise.
7348 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7349 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7350 fall through comment.
7351 * cilk.c (extract_free_variables): Add FALLTHRU.
7352
452df4a4
JM
73532016-08-10 Jason Merrill <jason@redhat.com>
7354
7355 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7356
f3365c12
JM
73572016-08-09 Jason Merrill <jason@redhat.com>
7358
7359 * c-common.c (c_common_attribute_table): vector_size affects type
7360 identity.
7361
f0bc3323
MP
73622016-08-09 Marek Polacek <polacek@redhat.com>
7363
7364 PR c/7652
7365 * c-ada-spec.c (dump_generic_ada_node): Add return.
7366
98e5a19a
JM
73672016-08-09 Jason Merrill <jason@redhat.com>
7368
7369 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7370 C++17 constexpr lambdas.
7371
895aa8e1
DM
73722016-08-08 David Malcolm <dmalcolm@redhat.com>
7373
7374 PR c/64955
7375 * c-common.h (selftest::c_format_c_tests): New declaration.
7376 (selftest::run_c_tests): New declaration.
7377 * c-format.c: Include "selftest.h.
7378 (format_warning_va): Add param "corrected_substring" and use
7379 it to add a replacement fix-it hint.
7380 (format_warning_at_substring): Likewise.
7381 (format_warning_at_char): Update for new param of
7382 format_warning_va.
7383 (argument_parser::check_argument_type): Pass "fki" to
7384 check_format_types.
7385 (check_format_types): Add param "fki" and pass it to
7386 format_type_warning.
7387 (deref_n_times): New function.
7388 (get_modifier_for_format_len): New function.
7389 (selftest::test_get_modifier_for_format_len): New function.
7390 (get_format_for_type): New function.
7391 (format_type_warning): Add param "fki" and use it to attempt
7392 to provide hints for argument types when calling
7393 format_warning_at_substring.
7394 (selftest::get_info): New function.
7395 (selftest::assert_format_for_type_streq): New function.
7396 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7397 (selftest::test_get_format_for_type_printf): New function.
7398 (selftest::test_get_format_for_type_scanf): New function.
7399 (selftest::c_format_c_tests): New function.
7400
e52ed3fe
DM
74012016-08-08 David Malcolm <dmalcolm@redhat.com>
7402
7403 PR c/52952
7404 * c-format.c: Include "diagnostic.h".
7405 (location_column_from_byte_offset): Delete.
7406 (location_from_offset): Delete.
7407 (format_warning_va): New function.
7408 (format_warning_at_substring): New function.
7409 (format_warning_at_char): New function.
7410 (check_format_arg): Capture location of format_tree and pass to
7411 check_format_info_main.
7412 (argument_parser): Add fields "start_of_this_format" and
7413 "format_string_cst".
7414 (flag_chars_t::validate): Add param "format_string_cst". Convert
7415 warning_at call using location_from_offset to call to
7416 format_warning_at_char.
7417 (argument_parser::argument_parser): Add param "format_string_cst_"
7418 and use use it to initialize field "format_string_cst".
7419 Initialize new field "start_of_this_format".
7420 (argument_parser::read_format_flags): Convert warning_at call
7421 using location_from_offset to a call to format_warning_at_char.
7422 (argument_parser::read_any_format_left_precision): Likewise.
7423 (argument_parser::read_any_format_precision): Likewise.
7424 (argument_parser::read_any_other_modifier): Likewise.
7425 (argument_parser::find_format_char_info): Likewise, in three places.
7426 (argument_parser::parse_any_scan_set): Likewise, in one place.
7427 (argument_parser::handle_conversions): Likewise, in two places.
7428 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7429 and use it to make a substring_loc. Pass the latter to
7430 check_format_types.
7431 (check_format_info_main): Add params "fmt_param_loc" and
7432 "format_string_cst". Convert warning_at calls using
7433 location_from_offset to calls to format_warning_at_char. Pass the
7434 new params to the arg_parser ctor. Pass "format_string_cst" to
7435 flag_chars.validate. Pass "fmt_param_loc" to
7436 arg_parser.check_argument_type.
7437 (check_format_types): Convert first param from a location_t
7438 to a const substring_loc & and rename to "fmt_loc". Attempt
7439 to extract the range of the relevant parameter and pass it
7440 to format_type_warning.
7441 (format_type_warning): Convert first param from a location_t
7442 to a const substring_loc & and rename to "fmt_loc". Add
7443 params "param_range" and "type". Replace calls to warning_at
7444 with calls to format_warning_at_substring.
7445
1c4d457e
DM
74462016-08-08 David Malcolm <dmalcolm@redhat.com>
7447
7448 * c-format.c (class flag_chars_t): New class.
7449 (struct length_modifier): New struct.
7450 (class argument_parser): New class.
7451 (flag_chars_t::flag_chars_t): New ctor.
7452 (flag_chars_t::has_char_p): New method.
7453 (flag_chars_t::add_char): New method.
7454 (flag_chars_t::validate): New method.
7455 (flag_chars_t::get_alloc_flag): New method.
7456 (flag_chars_t::assignment_suppression_p): New method.
7457 (argument_parser::argument_parser): New ctor.
7458 (argument_parser::read_any_dollar): New method.
7459 (argument_parser::read_format_flags): New method.
7460 (argument_parser::read_any_format_width): New method.
7461 (argument_parser::read_any_format_left_precision): New method.
7462 (argument_parser::read_any_format_precision): New method.
7463 (argument_parser::handle_alloc_chars): New method.
7464 (argument_parser::read_any_length_modifier): New method.
7465 (argument_parser::read_any_other_modifier): New method.
7466 (argument_parser::find_format_char_info): New method.
7467 (argument_parser::validate_flag_pairs): New method.
7468 (argument_parser::give_y2k_warnings): New method.
7469 (argument_parser::parse_any_scan_set): New method.
7470 (argument_parser::handle_conversions): New method.
7471 (argument_parser::check_argument_type): New method.
7472 (check_format_info_main): Introduce classes argument_parser
7473 and flag_chars_t, moving the code within the loop into methods
7474 of these classes. Make various locals "const".
7475
88fa5555
DM
74762016-08-05 David Malcolm <dmalcolm@redhat.com>
7477
7478 * c-common.c: Include "substring-locations.h".
7479 (get_cpp_ttype_from_string_type): New function.
7480 (g_string_concat_db): New global.
7481 (substring_loc::get_range): New method.
7482 * c-common.h (g_string_concat_db): New declaration.
7483 (class substring_loc): New class.
7484 * c-lex.c (lex_string): When concatenating strings, capture the
7485 locations of all tokens using a new obstack, and record the
7486 concatenation locations within g_string_concat_db.
7487 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7488 on the ggc-heap.
7489
78169471
MP
74902016-07-29 Marek Polacek <polacek@redhat.com>
7491
638fc14f
MP
7492 PR c/71926
7493 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7494 parentheses warning.
7495
78169471
MP
7496 PR c/71574
7497 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7498
1225d6b1
ML
74992016-07-28 Martin Liska <mliska@suse.cz>
7500
7501 PR gcov-profile/68025
7502 * c-common.c (handle_no_profile_instrument_function_attribute):
7503
ec1e2a40
BE
75042016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7505
7506 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7507 BITS_PER_UNIT_LOG.
7508
5ec2cd9f
JM
75092016-07-25 Jason Merrill <jason@redhat.com>
7510
7511 PR c++/65970
7512 * c.opt (fconstexpr-loop-limit): New.
7513
9dc5773f 75142016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7515
7516 PR c++/71675
7517 * c-common.c (resolve_overloaded_builtin): Avoid converting
7518 __atomic_compare_exchange_n return type to that of what its
7519 first argument points to.
7520
e3fe09c1
UB
75212016-07-22 Uros Bizjak <ubizjak@gmail.com>
7522
7523 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7524 ~(unsigned HOST_WIDE_INT) 0.
7525
bc91c436
ML
75262016-07-22 Martin Liska <mliska@suse.cz>
7527
7528 PR gcov-profile/69028
7529 PR gcov-profile/62047
7530 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7531 to the current_function_decl.
7532
451dcc66
JM
75332016-07-21 Jason Merrill <jason@redhat.com>
7534
7535 PR c++/65168
7536 * c-common.c (c_common_truthvalue_conversion): Check
7537 c_inhibit_evaluation_warnings for warning about address of
7538 reference.
7539
de6a69ee
DM
75402016-07-20 David Malcolm <dmalcolm@redhat.com>
7541
7542 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7543 const char *.
7544
d022c55a
JM
75452016-07-15 Jason Merrill <jason@redhat.com>
7546
7547 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7548
ddbbcb19
JJ
75492016-07-15 Jakub Jelinek <jakub@redhat.com>
7550
7551 PR c/71858
7552 * c-common.h (enum lookup_name_fuzzy_kind): Add
7553 FUZZY_LOOKUP_FUNCTION_NAME.
7554
d0cf395a
JM
75552016-07-08 Jason Merrill <jason@redhat.com>
7556
7557 P0145: Refining Expression Order for C++.
7558 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7559 * c-opts.c: Adjust.
7560
98d44e93
MT
75612016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7562
7563 PR c++/71214
7564 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7565
f9d8d994
TS
75662016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7567
7568 * c-pragma.h (enum pragma_kind): Rename
7569 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7570 users.
7571
4aa83879
RB
75722016-06-29 Richard Biener <rguenther@suse.de>
7573
7574 PR middle-end/71002
7575 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7576
a25bd9e6
JM
75772016-06-24 Jason Merrill <jason@redhat.com>
7578
7579 P0145R2: Refining Expression Order for C++.
7580 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7581 MODIFY_EXPR.
7582
a86451b9
JJ
75832016-06-24 Jakub Jelinek <jakub@redhat.com>
7584
7585 * c-common.c (check_builtin_function_arguments): Require last
7586 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7587 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7588 if the last argument is pointer to enumerated or boolean type.
7589
1a4f11c8
DM
75902016-06-22 David Malcolm <dmalcolm@redhat.com>
7591
7592 PR c/70339
7593 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7594 (lookup_name_fuzzy): New prototype.
7595
fe55692c
JDA
75962016-06-21 John David Anglin <danglin@gcc.gnu.org>
7597
7598 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7599
4eb24e01
JM
76002016-06-14 Jason Merrill <jason@redhat.com>
7601
7602 P0145R2: Refining Expression Order for C++.
7603 * c.opt (fargs-in-order): New.
7604 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7605
ef7cf206
JJ
76062016-06-13 Jakub Jelinek <jakub@redhat.com>
7607
0dda258b
JJ
7608 PR sanitizer/71498
7609 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7610 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7611
ef7cf206
JJ
7612 PR preprocessor/71183
7613 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7614 to cb_get_source_date_epoch.
7615
50b15873
JJ
76162016-06-10 Jakub Jelinek <jakub@redhat.com>
7617
7618 PR c/68657
7619 * c.opt (Wpsabi): Add Warning flag.
7620
4d926e34
MS
76212016-06-10 Martin Sebor <msebor@redhat.com>
7622
7623 PR c/71392
14ec014e 7624 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7625 the nonnull attribute in type-generic builtins.
7626
e01b4e16
MS
76272016-06-09 Martin Sebor <msebor@redhat.com>
7628
7629 PR c/70883
7630 * c-common.c (builtin_function_validate_nargs): Make text of error
7631 message consistent with others like it.
7632
44a845ca
MS
76332016-06-08 Martin Sebor <msebor@redhat.com>
7634 Jakub Jelinek <jakub@redhat.com>
7635
7636 PR c++/70507
7637 PR c/68120
7638 * c-common.c (check_builtin_function_arguments): Handle
7639 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7640
a80a7051
RB
76412016-06-08 Richard Biener <rguenther@suse.de>
7642
7643 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7644
bfd67b47
RB
76452016-06-07 Richard Biener <rguenther@suse.de>
7646
7647 PR c/61564
7648 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7649 options and warn about others.
7650
15c98b2e
ES
76512016-06-01 Eduard Sanou <dhole@openmailbox.org>
7652
7653 * c-common.c (get_source_date_epoch): Rename to
7654 cb_get_source_date_epoch.
7655 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7656 message when the parsing fails. Use error_at instead of fatal_error.
7657 * c-common.h (get_source_date_epoch): Rename to
7658 cb_get_source_date_epoch.
7659 * c-common.h (cb_get_source_date_epoch): Prototype.
7660 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7661 * c-common.h (c_omp_region_type): Remove trailing comma.
7662 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7663 * c-lex.c (c_lex_with_flags): Remove initialization of
7664 pfile->source_date_epoch.
7665
00631022
JJ
76662016-05-30 Jakub Jelinek <jakub@redhat.com>
7667
7668 PR c++/71349
7669 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7670 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7671 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7672 instead of C_OMP_CLAUSE_SPLIT_FOR.
7673
f17a223d
RB
76742016-05-24 Richard Biener <rguenther@suse.de>
7675
7676 PR middle-end/70434
7677 PR c/69504
7678 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7679 (convert_vector_to_array_for_subscript): ... this.
7680 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7681 VIEW_CONVERT_EXPR to an array type. Rename to ...
7682 (convert_vector_to_array_for_subscript): ... this.
7683
4f2e1536
MP
76842016-05-12 Marek Polacek <polacek@redhat.com>
7685
7686 PR c/70756
7687 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7688 size_in_bytes and pass LOC to it.
7689
d6e83a8d
MM
76902016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7691
7692 PR c/43651
7693 * c.opt (Wduplicate-decl-specifier): New option.
7694
5c3a10fb
MP
76952016-05-11 Marek Polacek <polacek@redhat.com>
7696
7697 PR c++/71024
7698 * c-common.c (diagnose_mismatched_attributes): New function.
7699 * c-common.h (diagnose_mismatched_attributes): Declare.
7700
deef7113
MP
77012016-05-04 Marek Polacek <polacek@redhat.com>
7702
7703 * c.opt (Wdangling-else): New option.
7704
79ce98bc
MP
77052016-05-03 Marek Polacek <polacek@redhat.com>
7706
7707 PR c/70859
7708 * c-common.c (builtin_function_validate_nargs): Add location
7709 parameter. Use it.
7710 (check_builtin_function_arguments): Add location and arguments
7711 parameters. Use them.
7712 * c-common.h (check_builtin_function_arguments): Update declaration.
7713
381cdae4
RB
77142016-05-03 Richard Biener <rguenther@suse.de>
7715
7716 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7717 allow call args to gimplify to SSA names.
7718
1d793c34
MP
77192016-05-03 Marek Polacek <polacek@redhat.com>
7720
7721 * c-common.h (enum c_omp_region_type): Remove stray comma.
7722
77886428
CP
77232016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7724
7725 * c-common.h (enum c_omp_region_type): Define.
7726
697e0b28
RS
77272016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7728
7729 * c-common.c (shorten_compare): Use wi::to_wide.
7730
e7ff0319
CP
77312016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7732
7733 PR middle-end/70626
7734 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7735 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7736 reduction clauses in acc parallel loops.
7737
2fff3db8
MP
77382016-04-29 Marek Polacek <polacek@redhat.com>
7739
7740 PR c/70852
7741 * c-common.c (warn_for_memset): Check domain before accessing it.
7742
509063eb
DV
77432016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7744
7745 PR/69089
7746 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7747 "aligned" attribute.
7748
b632761d
JM
77492016-04-28 Jason Merrill <jason@redhat.com>
7750
7751 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7752
174f6622
ES
77532016-04-28 Eduard Sanou <dhole@openmailbox.org>
7754 Matthias Klose <doko@debian.org>
7755
7756 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7757 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7758 handling.
7759 * c-common.h (get_source_date_epoch): Prototype.
7760 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7761
6bc2bb18
RB
77622015-04-27 Ryan Burn <contact@rnburn.com>
7763
7764 PR c++/69024
7765 PR c++/68997
7766 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7767 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7768 external linkage.
7769 (cilk_detect_and_unwrap): Corresponding changes.
7770 (extract_free_variables): Don't extract free variables from
7771 AGGR_INIT_EXPR slot.
7772 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7773 (cilk_recognize_spawn): Likewise.
7774
c1e1f433
BS
77752016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7776
7777 * c.opt (Wmemset-elt-size): New option.
7778 * c-common.c (warn_for_memset): New function.
7779 * c-common.h (warn_for_memset): Declare.
7780
d067e05f
JM
77812016-04-25 Jason Merrill <jason@redhat.com>
7782
7783 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7784 No longer static.
7785 * c-common.h: Declare it.
7786 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7787
9aa36ae5
JM
77882016-04-22 Jason Merrill <jason@redhat.com>
7789
7790 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7791
477d4906
IV
77922016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7793
7794 PR c++/69363
7795 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7796 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7797
fe37c7af
MM
77982016-04-18 Michael Matz <matz@suse.de>
7799
7800 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7801 and SET_DECL_ALIGN.
7802
23f2660f
EB
78032016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7804
7805 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7806 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7807 to incomplete types.
7808 (dump_nested_type): Remove redundant tests and tidy up.
7809 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7810 a type which is the typedef of an original type.
7811
1e77281b
MP
78122016-04-15 Marek Polacek <polacek@redhat.com>
7813
7814 PR c/70651
7815 * c-common.c (build_va_arg): Change two asserts into errors and return
7816 error_mark_node.
7817
b3a77f21
MP
78182016-04-13 Marek Polacek <polacek@redhat.com>
7819
7820 PR c++/70639
7821 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7822 for switch statements, too.
7823
322b8466
JM
78242016-03-28 Jason Merrill <jason@redhat.com>
7825
7826 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7827
fbdb6baf
MP
78282016-03-23 Marek Polacek <polacek@redhat.com>
7829
7830 PR c++/69884
7831 * c.opt (Wignored-attributes): New option.
7832
5c240f4d
DM
78332016-03-22 David Malcolm <dmalcolm@redhat.com>
7834
7835 PR c/69993
7836 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7837 diagnostic text, reversing the order of the warning and note so
7838 that they appear in source order.
7839
14ba7b28
MP
78402016-03-17 Marek Polacek <polacek@redhat.com>
7841
7842 PR c/69407
7843 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7844 operations.
7845
08a1cadc
JM
78462016-03-14 Jason Merrill <jason@redhat.com>
7847
2aaeea19
JM
7848 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7849
08a1cadc
JM
7850 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7851
c06d25bb
RB
78522016-03-09 Richard Biener <rguenther@suse.de>
7853
7854 PR c/70143
7855 * c-common.c (strict_aliasing_warning): Add back
7856 alias_sets_conflict_p check.
7857
80aac5c8
JM
78582016-03-08 Jason Merrill <jason@redhat.com>
7859
7860 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7861
64b23c13
DM
78622016-03-04 David Malcolm <dmalcolm@redhat.com>
7863
7864 PR c/68187
7865 * c-indentation.c (get_visual_column): Move code to determine next
7866 tab stop to...
7867 (next_tab_stop): ...this new function.
7868 (line_contains_hash_if): Delete function.
7869 (detect_preprocessor_logic): Delete function.
7870 (get_first_nws_vis_column): New function.
7871 (detect_intervening_unindent): New function.
7872 (should_warn_for_misleading_indentation): Replace call to
7873 detect_preprocessor_logic with a call to
7874 detect_intervening_unindent.
7875
729526f5
DM
78762016-03-04 David Malcolm <dmalcolm@redhat.com>
7877
7878 PR c/68187
7879 * c-indentation.c (should_warn_for_misleading_indentation): When
7880 suppressing warnings about cases where the guard and body are on
7881 the same column, only use the first non-whitespace column in place
7882 of the guard token column when dealing with "else" clauses.
7883 When rejecting aligned BODY and NEXT, loosen the requirement
7884 from equality with the first non-whitespace of guard to simply
7885 that they not be indented relative to it.
7886
e9a35493
RB
78872016-03-04 Richard Biener <rguenther@suse.de>
7888
7889 PR c++/70054
7890 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7891 instead of alias_sets_conflict_p.
7892
1be56bc5
MP
78932016-03-01 Marek Polacek <polacek@redhat.com>
7894
7895 PR c++/69795
7896 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7897 any DECL.
7898
35886f0b
MS
78992016-02-22 Martin Sebor <msebor@redhat.com>
7900
7901 PR middle-end/69780
7902 * c-common.c (check_builtin_function_arguments): Validate and
7903 reject invalid arguments to __builtin_alloca_with_align.
7904
4246c8da
MW
79052016-02-20 Mark Wielaard <mjw@redhat.com>
7906
7907 PR c/28901
7908 * c.opt (Wunused-const-variable): Turn into Alias for...
7909 (Wunused-const-variable=): New option.
7910
268be88c
BE
79112016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7912
7913 PR c++/69865
7914 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7915 here...
7916 (c_common_init_options): ...to here.
7917 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7918
871b3f47
JJ
79192016-02-19 Jakub Jelinek <jakub@redhat.com>
7920
7921 PR c++/69826
7922 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7923 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7924 flag_preprocess_only.
7925
bf14eba2
JJ
79262016-02-16 Jakub Jelinek <jakub@redhat.com>
7927
7928 PR c/69835
7929 * c.opt (Wnonnull-compare): Enable for -Wall.
7930
ba6b3795
JJ
79312016-02-15 Jakub Jelinek <jakub@redhat.com>
7932
7933 PR c++/69797
7934 * c-common.c (sync_resolve_size): Diagnose too few arguments
7935 even when params is non-NULL empty vector.
7936
a011cd92
BS
79372016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7938
7939 PR target/60410
7940 * c.opt (fshort-double): Remove.
7941
46cb9332
MS
79422016-02-05 Martin Sebor <msebor@redhat.com>
7943
7944 PR c++/69662
7945 * c.opt (Warning options): Update -Wplacement-new to take
7946 an optional argument.
7947
e1b81f2b
JJ
79482016-02-01 Jakub Jelinek <jakub@redhat.com>
7949
7950 PR preprocessor/69543
7951 PR c/69558
7952 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7953 instead of loc to control_warning_option.
7954
b6adbb9f
NS
79552016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7956
7957 * c.opt (fopenacc-dim=): New option.
7958
5d70666e
RB
79592016-01-27 Ryan Burn <contact@rnburn.com>
7960
7961 PR cilkplus/69267
7962 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7963 gimplify_arg. Removed superfluous post_p argument.
7964 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7965 superfluous post_p argument.
7966 * c-gimplify.c (c_gimplify_expr): Likewise.
7967
01e1dea3
DM
79682016-01-26 David Malcolm <dmalcolm@redhat.com>
7969
7970 PR other/69006
7971 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7972 pp_newline_and_flush with pp_flush.
7973
9f04a53e
MS
79742016-01-20 Martin Sebor <msebor@redhat.com>
7975
7976 PR c/69405
7977 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7978 an incompatible argument when the argument isn't a valid tree node.
7979
7f26f7df
JM
79802016-01-18 Jason Merrill <jason@redhat.com>
7981
7982 PR c++/68767
7983 * c-common.c (check_function_arguments_recurse): Fold the whole
7984 COND_EXPR, not just the condition.
7985
f62bf092
TV
79862016-01-18 Tom de Vries <tom@codesourcery.com>
7987
7988 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7989 classify as loop clause.
7990
e0a575ff
JJ
79912016-01-15 Jakub Jelinek <jakub@redhat.com>
7992
7993 PR bootstrap/68271
7994 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7995 C++ FE no longer has limit on number of pragmas.
7996
79972015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7998
7999 PR c++/69048
8000 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 8001 to add missing cleanup point.
b6e3db06 8002
c7df95d8
DM
80032016-01-14 David Malcolm <dmalcolm@redhat.com>
8004
8005 PR c++/68819
8006 * c-indentation.c (get_visual_column): Add location_t param.
8007 Handle the column number being zero by effectively disabling the
8008 warning, with an "inform".
8009 (should_warn_for_misleading_indentation): Add location_t argument
8010 for all uses of get_visual_column.
8011
21efdd80
PP
80122016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8013
8014 PR c++/69029
8015 * c-indentation.c (should_warn_for_misleading_indentation):
8016 Don't warn about do-while statements.
8017
7a127fa7
MS
80182016-01-07 Martin Sebor <msebor@redhat.com>
8019
8020 PR c/68966
8021 * c-common.c (sync_resolve_size): Reject first argument when it's
8022 a pointer to _Bool.
8023
c589e975
DM
80242016-01-05 David Malcolm <dmalcolm@redhat.com>
8025
8026 PR c/69122
8027 * c-indentation.c (get_visual_column): Remove default argument.
8028 (should_warn_for_misleading_indentation): For the multiline case,
8029 update call to get_visual_column for next_stmt_exploc so that it
8030 captures the location of the first non-whitespace character in the
8031 relevant line. Don't issue warnings if there is non-whitespace
8032 before the next statement.
8033
818ab71a
JJ
80342016-01-04 Jakub Jelinek <jakub@redhat.com>
8035
8036 Update copyright years.
8037
745e411d
DM
80382015-12-21 David Malcolm <dmalcolm@redhat.com>
8039
8040 * c-common.c (binary_op_error): Convert first param from
8041 location_t to rich_location * and use it when emitting an error.
8042 * c-common.h (binary_op_error): Convert first param from
8043 location_t to rich_location *.
8044
de67c4c3
DM
80452015-12-16 David Malcolm <dmalcolm@redhat.com>
8046
8047 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8048 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8049
4a38b02b
IV
80502015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8051
8052 * c-common.c (c_common_attribute_table): Handle "omp declare target
8053 link" attribute.
8054
54d62f51
JJ
80552015-12-14 Jakub Jelinek <jakub@redhat.com>
8056
8057 PR c/68833
8058 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8059
8d4227c8
TB
80602014-12-12 Tobias Burnus <burnus@net-b.de>
8061
8062 PR fortran/68815
8063 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8064 specifiers (%d, %i,%u and %c).
8065
f6069ccc
DM
80662015-12-10 David Malcolm <dmalcolm@redhat.com>
8067
8068 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8069
63bbf46d
JJ
80702015-12-08 Jakub Jelinek <jakub@redhat.com>
8071
8072 PR c/48088
8073 PR c/68657
8074 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8075 * c-pragma.c (handle_pragma_diagnostic): Adjust
8076 control_warning_option caller.
8077
f79520bb
DM
80782015-12-07 David Malcolm <dmalcolm@redhat.com>
8079
8080 * c-common.c (c_cpp_error): Update for change to
8081 rich_location::set_range.
8082
b3d5bc62
JJ
80832015-12-04 Paolo Bonzini <bonzini@gnu.org>
8084
8085 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8086 shifting 1 out of the sign bit.
8087
80882015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8089
8090 * c-common.c (c_common_attribute_table[]): Update max arguments
8091 count for "simd" attribute.
8092 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8093
6eb4a537
JJ
80942015-12-03 Jakub Jelinek <jakub@redhat.com>
8095
8096 PR preprocessor/57580
8097 * c-ppoutput.c (print): Change printed field to bool.
8098 Move src_file last for smaller padding.
8099 (init_pp_output): Set print.printed to false instead of 0.
8100 (scan_translation_unit): Fix up formatting. Set print.printed
8101 to true after printing something other than newline.
8102 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8103 (maybe_print_line_1): Set print.printed to false instead of 0.
8104 (print_line_1): Likewise.
8105 (do_line_change): Set print.printed to true instead of 1.
8106 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8107 dump_macro): Set print.printed to false after printing newline.
8108
4250754e
JM
81092015-12-02 Jason Merrill <jason@redhat.com>
8110
f479b43d
JM
8111 * c-common.c (fold_for_warn): New.
8112 (warn_logical_operator, warn_tautological_cmp)
8113 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8114
4250754e
JM
8115 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8116 (c_fully_fold_internal, decl_constant_value_for_optimization):
8117 Move to c/c-fold.c.
8118 * c-common.h: Don't declare decl_constant_value_for_optimization.
8119
e9e32ee6
JM
81202015-12-02 Joseph Myers <joseph@codesourcery.com>
8121
8122 PR c/68162
8123 * c-common.h (c_build_qualified_type): Add extra default
8124 arguments.
8125
37d5ad46
JB
81262015-12-01 Julian Brown <julian@codesourcery.com>
8127 Cesar Philippidis <cesar@codesourcery.com>
8128 James Norris <James_Norris@mentor.com>
8129
8130 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8131 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8132 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8133
f07862c7
EB
81342015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8135
8136 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8137 (decl_sloc_common): Delete and move bulk of processing to...
8138 (decl_sloc): ...here.
8139 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8140 (dump_ada_double_name): Remove S parameter and compute the suffix.
8141 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8142 element type and deal with an anonymous one.
8143 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8144 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8145 and remove reference to QUAL_UNION_TYPE.
8146 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8147 (dump_nested_type): ...here. New function extracted from above.
8148 Generate a full declaration for anonymous element type of arrays.
8149 (print_ada_declaration): Really skip anonymous declarations. Remove
8150 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8151 Clean up processing of declarations of array types and objects.
8152 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8153 Remove obsolete code and tidy up.
8154
75c8aac3
JH
81552015-11-29 Jan Hubicka <hubicka@ucw.cz>
8156
8157 PR c/67581
8158 * c-common.c (handle_transparent_union_attribute): Update
8159 also type variants.
8160
b58d3df2
ML
81612015-11-27 Martin Liska <mliska@suse.cz>
8162
8163 PR c++/68312
8164 * array-notation-common.c (cilkplus_extract_an_triplets):
8165 Release vector of vectors.
8166 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8167
89a01fcf
EB
81682015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8169
8170 PR c++/68527
8171 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8172 (print_ada_struct_decl): Likewise.
8173
cc5c5226
IZ
81742015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8175
8176 PR c++/68001
8177 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8178 * cilk.c (recognize_spawn): Determine location in a more precise
8179 way.
8180
269adb9d
JM
81812015-11-19 Jason Merrill <jason@redhat.com>
8182
8183 * c-common.c (shorten_compare): But look through macros from
8184 system headers.
8185
d0eccfcd
JM
81862015-11-18 Jason Merrill <jason@redhat.com>
8187
8188 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8189 non-constant operand comes from a macro.
8190
3e44547c
JM
81912015-11-17 Jason Merrill <jason@redhat.com>
8192
8193 PR bootstrap/68346
8194 * c-common.c (warn_tautological_cmp): Fold before checking for
8195 constants.
8196
0f62c7a0
MP
81972015-11-16 Marek Polacek <polacek@redhat.com>
8198
8199 PR c++/68362
8200 * c-common.c (check_case_bounds): Fold low and high cases.
8201
a868811e
MP
82022015-11-16 Marek Polacek <polacek@redhat.com>
8203
8204 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8205 * c-common.c (c_common_get_alias_set): Likewise.
8206 (handle_visibility_attribute): Likewise.
8207
fff77217
KY
82082015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8209
8210 * c-common.c (handle_simd_attribute): New.
8211 (struct attribute_spec): Add entry for "simd".
8212 (handle_simd_attribute): New.
8213
269e63b7
KT
82142015-11-13 Kai Tietz <ktietz70@googlemail.com>
8215
8216 * c-lex.c (interpret_float): Use fold_convert.
8217
ebedc9a3
DM
82182015-11-13 David Malcolm <dmalcolm@redhat.com>
8219
8220 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8221 and store it on the result.
8222 * c-opts.c (c_common_init_options): Set
8223 global_dc->colorize_source_p.
8224
6e232ba4
JN
82252015-11-12 James Norris <jnorris@codesourcery.com>
8226 Joseph Myers <joseph@codesourcery.com>
8227
7365279f 8228 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8229 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8230 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8231 PRAGMA_OACC_CLAUSE_LINK.
8232
e78bede6
MP
82332015-11-11 Marek Polacek <polacek@redhat.com>
8234
8235 PR c/68107
8236 PR c++/68266
8237 * c-common.c (valid_array_size_p): New function.
8238 * c-common.h (valid_array_size_p): Declare.
8239
3f8257db 82402015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8241
8242 PR bootstrap/68271
8243 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8244
69f293c9
AM
82452015-11-11 Andrew MacLeod <amacleod@redhat.com>
8246
8247 * array-notation-common.c: Remove unused header files.
8248 * c-ada-spec.c: Likewise.
8249 * c-cilkplus.c: Likewise.
8250 * c-common.c: Likewise.
8251 * c-cppbuiltin.c: Likewise.
8252 * c-dump.c: Likewise.
8253 * c-format.c: Likewise.
8254 * c-gimplify.c: Likewise.
8255 * c-indentation.c: Likewise.
8256 * c-lex.c: Likewise.
8257 * c-omp.c: Likewise.
8258 * c-opts.c: Likewise.
8259 * c-pch.c: Likewise.
8260 * c-ppoutput.c: Likewise.
8261 * c-pragma.c: Likewise.
8262 * c-pretty-print.c: Likewise.
8263 * c-semantics.c: Likewise.
8264 * c-ubsan.c: Likewise.
8265 * cilk.c: Likewise.
8266 * stub-objc.c: Likewise.
8267
3a40d81d
NS
82682015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8269 Cesar Philippidis <cesar@codesourcery.com>
8270 James Norris <jnorris@codesourcery.com>
8271 Julian Brown <julian@codesourcery.com>
8272 Nathan Sidwell <nathan@codesourcery.com>
8273
8274 * c-pragma.c (oacc_pragmas): Add "routine".
8275 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8276
ee45a32d
EB
82772015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8278
8279 * c-common.c (c_common_attributes): Add scalar_storage_order.
8280 (handle_scalar_storage_order_attribute): New function.
8281 * c-pragma.c (global_sso): New variable.
8282 (maybe_apply_pragma_scalar_storage_order): New function.
8283 (handle_pragma_scalar_storage_order): Likewise.
8284 (init_pragma): Register scalar_storage_order.
8285 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8286 * c.opt (Wscalar-storage-order): New warning.
8287 (fsso-struct=): New option.
8288
eb11eb15
MS
82892015-11-08 Martin Sebor <msebor@redhat.com>
8290
8291 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8292
0aad0198
RS
82932015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8294
8295 * c-common.c: Don't undef DEF_BUILTIN.
8296
8a645150
DM
82972015-11-06 David Malcolm <dmalcolm@redhat.com>
8298
8299 * c-common.c (c_cpp_error): Convert parameter from location_t to
8300 rich_location *. Eliminate the "column_override" parameter and
8301 the call to diagnostic_override_column.
8302 Update the "done_lexing" clause to set range 0
8303 on the rich_location, rather than overwriting a location_t.
8304 * c-common.h (c_cpp_error): Convert parameter from location_t to
8305 rich_location *. Eliminate the "column_override" parameter.
8306
7a5e4956
CP
83072015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8308 Thomas Schwinge <thomas@codesourcery.com>
8309 James Norris <jnorris@codesourcery.com>
8310
8311 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8312 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8313 clauses with parallel and kernels and loops.
8314 * c-pragma.h (enum pragma_omp_clause): Add entries for
8315 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8316 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8317 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8318 INDEPENDENT,SEQ}.
8319 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8320
e2f5cc96
MS
83212015-11-05 Martin Sebor <msebor@redhat.com>
8322
8323 PR c++/67942
8324 * c.opt (-Wplacement-new): New option.
8325
e01d41e5
JJ
83262015-11-05 Jakub Jelinek <jakub@redhat.com>
8327
8328 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8329 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8330 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8331 save_expr or create_tmp_var* if TEST is true.
8332 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8333 Don't call add_stmt here.
8334 (struct c_omp_check_loop_iv_data): New type.
8335 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8336 c_omp_check_loop_iv_exprs): New functions.
8337 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8338 distribute.
8339 (c_omp_declare_simd_clauses_to_numbers): Change
8340 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8341 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8342 from numbers to PARM_DECLs.
8343
595278be
MM
83442015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8345
8346 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8347 flag_checking.
8348
3f8257db 83492015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8350
8351 PR c++-common/67882
b3d5bc62
JJ
8352 * c-common.h (fold_offsetof_1): Add argument.
8353 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8354 offsetof expressions that reference elements past the end of
8355 an array.
8356
4bf9e5a8
TS
83572015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8358 Chung-Lin Tang <cltang@codesourcery.com>
8359
8360 * c-pragma.c (oacc_pragmas): Add "atomic".
8361 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8362
3b1661a9
ES
83632015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8364
8365 * c-common.c (handle_target_clones_attribute): New.
8366 (c_common_attribute_table): Add handle_target_clones_attribute.
8367 (handle_always_inline_attribute): Add check on target_clones attribute.
8368 (handle_target_attribute): Ditto.
8369
2adfab87
AM
83702015-10-29 Andrew MacLeod <amacleod@redhat.com>
8371
8372 * array-notation-common.c: Reorder #include's and remove duplicates.
8373 * c-ada-spec.c: Likewise.
8374 * c-cilkplus.c: Likewise.
8375 * c-common.c: Likewise.
8376 * c-cppbuiltin.c: Likewise.
8377 * c-dump.c: Likewise.
8378 * c-format.c: Likewise.
8379 * c-gimplify.c: Likewise.
8380 * c-indentation.c: Likewise.
8381 * c-lex.c: Likewise.
8382 * c-omp.c: Likewise.
8383 * c-opts.c: Likewise.
8384 * c-pch.c: Likewise.
8385 * c-ppoutput.c: Likewise.
8386 * c-pragma.c: Likewise.
8387 * c-pretty-print.c: Likewise.
8388 * c-semantics.c: Likewise.
8389 * c-ubsan.c: Likewise.
8390 * cilk.c: Likewise.
8391 * stub-objc.c: Likewise.
8392
d90ec4f2
JM
83932015-10-28 Jason Merrill <jason@redhat.com>
8394
8395 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8396
88bae6f4
TS
83972015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8398 James Norris <jnorris@codesourcery.com>
8399 Cesar Philippidis <cesar@codesourcery.com>
8400
8401 PR c/64765
8402 PR c/64880
8403 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8404 * c-omp.c (c_oacc_split_loop_clauses): New function.
8405
b1726d6c
MS
84062015-10-21 Martin Sebor <msebor@redhat.com>
8407
8408 PR driver/68043
8409 * c.opt: End each sentence that describes an option with a period.
8410
fa60eeb9
MP
84112015-10-20 Marek Polacek <polacek@redhat.com>
8412
8413 * array-notation-common.c (is_cilkplus_vector_p): Define.
8414 * c-common.h (is_cilkplus_vector_p): Declare.
8415
95979049
MP
84162015-10-20 Marek Polacek <polacek@redhat.com>
8417
8418 * c.opt (std=gnu++11): Do not describe as experimental.
8419 (std=gnu++14): Likewise.
8420
2a9fb712
JM
84212015-10-19 Jason Merrill <jason@redhat.com>
8422
8423 * c-cppbuiltin.c (c_cpp_builtins): Define
8424 __cpp_nontype_template_args.
8425
13b380a3
JM
84262015-10-19 Jason Merrill <jason@redhat.com>
8427
8428 * c-cppbuiltin.c (c_cpp_builtins): Define
8429 __cpp_enumerator_attributes, __cpp_fold_expressions,
8430 __cpp_unicode_characters.
8431
d9a6bd32
JJ
84322015-10-13 Jakub Jelinek <jakub@redhat.com>
8433 Aldy Hernandez <aldyh@redhat.com>
8434
8435 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8436 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8437 (c_define_builtins): Likewise.
8438 * c-common.h (enum c_omp_clause_split): Add
8439 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8440 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8441 (c_finish_omp_for): Add ORIG_DECLV argument.
8442 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8443 201511 instead of 201307.
8444 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8445 OMP_CRITICAL_CLAUSES to it.
8446 (c_finish_omp_ordered): Add CLAUSES argument, set
8447 OMP_ORDERED_CLAUSES to it.
8448 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8449 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8450 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8451 constructs and new OpenMP 4.5 clauses. Clear
8452 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8453 verification code.
8454 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8455 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8456 (enum pragma_omp_clause): Add
8457 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8458 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8459
624d31fe
RS
84602015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8461
8462 * c-lex.c (interpret_float): Use real_equal instead of
8463 REAL_VALUES_EQUAL.
8464
b8fd7909
JM
84652015-10-04 Jason Merrill <jason@redhat.com>
8466
8467 Implement N4514, C++ Extensions for Transactional Memory.
8468 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8469 (c_common_attribute_table): Add transaction_safe_dynamic.
8470 transaction_safe now affects type identity.
8471 (handle_tm_attribute): Handle transaction_safe_dynamic.
8472 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8473 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8474 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8475 (D_TRANSMEM): New.
8476 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8477 * c-pretty-print.c (pp_c_attributes_display): Don't print
8478 transaction_safe in C++.
8479
12651878
MP
84802015-10-02 Marek Polacek <polacek@redhat.com>
8481
8482 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8483
3e3b8d63
MP
84842015-10-02 Marek Polacek <polacek@redhat.com>
8485
8486 PR c/64249
8487 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8488 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8489 * c.opt (Wduplicated-cond): New option.
8490
0d1a8f75
JM
84912015-10-01 Joseph Myers <joseph@codesourcery.com>
8492
8493 * c.opt (std=c11): Do not describe as experimental.
8494 (std=gnu11): Likewise.
8495 (std=iso9899:2011): Likewise.
8496
3e32ee19
NS
84972015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8498
8499 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8500 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8501
974348ee
MP
85022015-09-25 Marek Polacek <polacek@redhat.com>
8503
8504 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8505 (ubsan_instrument_shift): Likewise.
8506
15dbc1a6
MP
85072015-09-25 Marek Polacek <polacek@redhat.com>
8508
8509 PR sanitizer/64906
8510 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8511
6b95d7cc
PP
85122015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8513
8514 * c-indentation.c (should_warn_for_misleading_indentation):
8515 Compare next_stmt_vis_column with guard_line_first_nws instead
8516 of with guard_line_vis_column.
8517
c1822f9c
MLI
85182015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8519
8520 PR c/49654
8521 PR c/49655
8522 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8523 options and options not valid for the current language.
8524
d5398058
PP
85252015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8526
8527 * c-indentation.c (should_warn_for_misleading_indentation):
8528 Float out and consolidate the calls to get_visual_column that
8529 are passed guard_exploc as an argument. Compare
8530 next_stmt_vis_column with guard_line_first_nws instead of with
8531 body_line_first_nws.
8532
6b333269
NS
85332015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8534
8535 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8536 Wnamespaces): New C++ warnings.
8537
a75f1574
JM
85382015-09-22 Jason Merrill <jason@redhat.com>
8539
8540 * c-common.h (abi_compat_version_crosses): New.
8541 (warn_abi_version): Declare.
8542 * c-common.c: Define it.
8543 * c-opts.c (c_common_post_options): Handle it.
8544 flag_abi_compat_version defaults to 8.
8545
bdaaa8b7
VV
85462015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8547
8548 Complete the implementation of N4230, Nested namespace definition.
8549 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8550 __cpp_nested_namespace_definitions.
8551
eaa797e8
MLI
85522015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8553
8554 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8555
c4914de6
MLI
85562015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8557
8558 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8559 when warning.
8560 * c-pragma.h (pragma_lex): Add optional loc argument.
8561
fcb87c50
MM
85622015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8563
8564 * c-format.c (check_format_arg): Adjust to use common block size in all
8565 object pools.
8566
31bdd08a
DM
85672015-09-15 David Malcolm <dmalcolm@redhat.com>
8568
8569 * c-format.c (location_from_offset): Update for change in
8570 signature of location_get_source_line.
8571 * c-indentation.c (get_visual_column): Likewise.
8572 (line_contains_hash_if): Likewise.
8573
aa9f4b4c
MP
85742015-09-14 Marek Polacek <polacek@redhat.com>
8575
8576 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8577 setting various warnings.
8578
aa256c4a
MP
85792015-09-14 Marek Polacek <polacek@redhat.com>
8580
8581 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8582 a negative value.
8583
0f876f22
MW
85842015-09-11 Mark Wielaard <mjw@redhat.com>
8585
8586 PR c/28901
8587 * c.opt (Wunused-variable): Option from common.opt.
8588 (Wunused-const-variable): New option.
8589
273aa49e
PC
85902015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8591
8592 PR c++/53184
8593 * c.opt ([Wsubobject-linkage]): Add.
8594
1807ffc1
MS
85952015-09-03 Martin Sebor <msebor@redhat.com>
8596
8597 PR c/66516
8598 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8599 functions.
8600 * c-common.c (reject_gcc_builtin): Define.
8601
38942840
BI
86022015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8603
8604 PR middle-end/60586
8605 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8606 prototype.
8607 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8608 cilk_gimplify_call_params_in_spawned_fn.
8609 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8610 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8611 unwrapping.
8612
c316b5e4
MP
86132015-08-25 Marek Polacek <polacek@redhat.com>
8614
8615 PR middle-end/67330
8616 * c-common.c (handle_weak_attribute): Don't check whether the
8617 visibility can be changed here.
8618
584a7c46
MLI
86192015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8620
8621 * c-lex.c (c_lex_with_flags): Use explicit locations.
8622
a79683d5
TS
86232015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8624
8625 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8626 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8627
61717a45
FXC
86282015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8629
8630 PR middle-end/36757
8631 * c-common.c (check_builtin_function_arguments): Add check
8632 for BUILT_IN_SIGNBIT argument.
8633
329524f5
PC
86342015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8635
8636 PR c++/67160
8637 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8638 in c++1z mode.
8639
4ee55665
MP
86402015-08-17 Marek Polacek <polacek@redhat.com>
8641
8642 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8643 with whitespaces before qualifier names.
8644
b893e375
MP
86452015-08-12 Marek Polacek <polacek@redhat.com>
8646
8647 PR c++/55095
8648 * c-common.c (maybe_warn_shift_overflow): Properly handle
8649 left-shifting 1 into the sign bit.
8650
c2d89095
MLI
86512015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8652
8653 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8654
971e17ff
AS
86552015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8656 Braden Obrzut <admin@maniacsvault.net>
8657 Jason Merrill <jason@redhat.com>
8658
8659 Add C++ Concepts TS support.
8660 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8661 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8662 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8663 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8664 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8665 * c.opt (fconcepts): New.
8666
b3d5bc62
JJ
86672015-08-02 Martin Sebor <msebor@redhat.com>
8668
8669 * c.opt (-Wframe-address): New warning option.
8670
8ebca419
PP
86712015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8672
8673 * c-indentation.c (should_warn_for_misleading_indentation):
8674 Improve heuristics.
8675
1a1e101f
PP
86762015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8677
8678 * c-indentation.c (get_visual_column): Add parameter first_nws,
8679 use it. Update comment documenting the function.
8680 (is_first_nonwhitespace_on_line): Remove.
8681 (should_warn_for_misleading_indentation): Replace usage of
8682 of is_first_nonwhitespace_on_line with get_visual_column.
8683
992118a1
PP
86842015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8685
8686 * c-indentation.h (struct token_indent_info): Define.
8687 (get_token_indent_info): Define.
8688 (warn_for_misleading_information): Declare.
8689 * c-common.h (warn_for_misleading_information): Remove.
8690 * c-identation.c (warn_for_misleading_indentation):
8691 Change declaration to take three token_indent_infos. Adjust
8692 accordingly.
8693 * c-identation.c (should_warn_for_misleading_indentation):
8694 Likewise. Bail out early if the body is a compound statement.
8695 (guard_tinfo_to_string): Define.
8696
e8fa3817
JM
86972015-07-30 Jason Merrill <jason@redhat.com>
8698
8699 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8700 '*' for reference decay.
8701
173864e8
MP
87022015-07-30 Marek Polacek <polacek@redhat.com>
8703
8704 * c-common.c (warn_tautological_cmp): Bail for float types.
8705
f2afe6dd
MP
87062015-07-27 Marek Polacek <polacek@redhat.com>
8707
8708 PR bootstrap/67030
8709 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8710
05b28fd6
MP
87112015-07-27 Marek Polacek <polacek@redhat.com>
8712
8713 PR c++/66555
8714 PR c/54979
8715 * c-common.c (find_array_ref_with_const_idx_r): New function.
8716 (warn_tautological_cmp): New function.
8717 * c-common.h (warn_tautological_cmp): Declare.
8718 * c.opt (Wtautological-compare): New option.
8719
5a5062b8
MP
87202015-07-23 Marek Polacek <polacek@redhat.com>
8721
8722 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8723 (ubsan_instrument_shift): Likewise.
8724
dc891fe7
MP
87252015-07-23 Marek Polacek <polacek@redhat.com>
8726
8727 PR sanitizer/66908
8728 * c-ubsan.c: Include gimplify.h.
8729 (ubsan_instrument_division): Unshare OP0 and OP1.
8730 (ubsan_instrument_shift): Likewise.
8731
451b5e48
MP
87322015-07-20 Marek Polacek <polacek@redhat.com>
8733 Richard Sandiford <richard.sandiford@arm.com>
8734
8735 PR c++/55095
8736 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8737 Use EXPR_LOC_OR_LOC.
8738 (maybe_warn_shift_overflow): New function.
8739 * c-common.h (maybe_warn_shift_overflow): Declare.
8740 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8741 * c.opt (Wshift-overflow): New option.
8742
fb0b2914
ML
87432015-07-16 Martin Liska <mliska@suse.cz>
8744
8745 * c-format.c (static void check_format_info_main): Use
8746 object_allocator instead of pool_allocator.
8747 (check_format_arg): Likewise.
8748 (check_format_info_main): Likewise.
8749
903f5c23
AM
87502015-07-15 Andrew MacLeod <amacleod@redhat.com>
8751
8752 * c-opts.c: Remove multiline #include comment.
8753
026c3cfd
AH
87542015-07-12 Aldy Hernandez <aldyh@redhat.com>
8755
8756 * c-common.c: Fix double word typos.
8757
bb49ee66
EB
87582015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8759
8760 * c-ada-spec.h (cpp_operation): Revert latest change.
8761 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8762 constructors and destructors.
8763
1916bcb5
AM
87642015-07-09 Andrew MacLeod <amacleod@redhat.com>
8765
8766 * c-common.h: Adjust includes for flags.h changes.
8767 * stub-objc.c: Likewise.
026c3cfd 8768
a9dcd529
EB
87692015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8770
8771 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8772 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8773
b03b462f
JJ
87742015-07-08 Jakub Jelinek <jakub@redhat.com>
8775
8776 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8777 are to be removed, return NULL rather than original clauses list.
8778
c7131fb2
AM
87792015-07-07 Andrew MacLeod <amacleod@redhat.com>
8780
8781 * array-notation-common.c: Adjust includes.
8782 * c-ada-spec.c: Likewise.
8783 * c-cilkplus.c: Likewise.
8784 * c-common.h: Likewise.
8785 * c-cppbuiltin.c: Likewise.
8786 * c-dump.c: Likewise.
8787 * c-format.c: Likewise.
8788 * c-gimplify.c: Likewise.
8789 * c-indentation.c: Likewise.
8790 * c-lex.c: Likewise.
8791 * c-omp.c: Likewise.
8792 * c-opts.c: Likewise.
8793 * c-pch.c: Likewise.
8794 * c-ppoutput.c: Likewise.
8795 * c-pragma.c: Likewise.
8796 * c-pretty-print.c: Likewise.
8797 * c-semantics.c: Likewise.
8798 * c-ubsan.c: Likewise.
8799 * cilk.c: Likewise.
8800 * stub-objc.c: Likewise.
8801
2a7fb83f
EB
88022015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8803
8804 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8805 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8806
a03c9bf1
JM
88072015-07-01 Jason Merrill <jason@redhat.com>
8808
36a85135
JM
8809 * c-common.h (D_CXX11): Rename from D_CXX0X.
8810 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8811 * c-common.c: Adjust.
8812
e7fa68d5
JM
8813 * c-opts.c (c_common_post_options): Default to C++14.
8814
a03c9bf1
JM
8815 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8816
fe95b036
ESR
88172015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8818
8819 Implement N4197 - Adding u8 character literals
b3d5bc62 8820 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8821 CPP_CHAR.
b3d5bc62 8822 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8823 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8824 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8825 and CPP_UTF8CHAR tokens.
8826 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8827
da2e71c9
MLI
88282015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8829
8830 PR fortran/66605
8831 * c-common.c (do_warn_unused_parameter): Move here.
8832 * c-common.h (do_warn_unused_parameter): Declare.
8833
b155cfd9
MP
88342015-06-29 Marek Polacek <polacek@redhat.com>
8835
8836 PR c/66322
8837 * c-common.c (check_case_bounds): Add bool * parameter. Set
8838 OUTSIDE_RANGE_P.
8839 (c_add_case_label): Add bool * parameter. Pass it down to
8840 check_case_bounds.
8841 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8842 warning here.
8843 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8844 declarations.
8845
31521951
MP
88462015-06-27 Marek Polacek <polacek@redhat.com>
8847
8848 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8849 or VECTOR_INTEGER_TYPE_P throughout.
8850 * c-gimplify.c: Likewise.
8851
22d03525
MP
88522015-06-26 Marek Polacek <polacek@redhat.com>
8853
8854 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8855 * c-common.c (c_fully_fold_internal): Likewise.
8856 (c_alignof_expr): Likewise.
8857 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8858 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8859 * cilk.c (create_parm_list): Likewise.
22d03525 8860
af05e6e5
MP
88612015-06-26 Marek Polacek <polacek@redhat.com>
8862
8863 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8864
f0889939
AM
88652015-06-25 Andrew MacLeod <amacleod@redhat.com>
8866
8867 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8868 * c-gimplify.c: Likewise.
8869 * c-pragma.c: Likewise.
8870 * c-ubsan.c: Likewise.
8871 * cilk.c: Likewise.
8872
ca752f39
RS
88732015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8874
8875 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8876 ggc_hasher.
8877
16a16ec7
AM
88782015-06-25 Andrew MacLeod <amacleod@redhat.com>
8879
8880 * cilk.c: Move calls.h after tm.h in the include chain.
8881
0ae9bd27
MP
88822015-06-25 Marek Polacek <polacek@redhat.com>
8883
8884 * array-notation-common.c: Use VAR_P throughout.
8885 * c-ada-spec.c: Likewise.
8886 * c-common.c: Likewise.
8887 * c-format.c: Likewise.
8888 * c-gimplify.c: Likewise.
8889 * c-omp.c: Likewise.
8890 * c-pragma.c: Likewise.
8891 * c-pretty-print.c: Likewise.
8892 * cilk.c: Likewise.
8893
62f9079a
MP
88942015-06-25 Marek Polacek <polacek@redhat.com>
8895
8896 * cilk.c (extract_free_variables): Use is_global_var.
8897
0fa16060
RS
88982015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8899
8900 * c-common.c: Don't include target-def.h.
8901
a68ae2e1
MP
89022015-06-23 Marek Polacek <polacek@redhat.com>
8903
8904 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8905 when comparing INTEGER_CSTs.
8906
c6a2f2d9
PMR
89072015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8908
8909 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8910 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8911 (dump_ada_template): Skip partially specialized types.
8912
6b4db501
MM
89132015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8914
8915 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8916 swapping.
8917
abb226c9
AM
89182015-06-17 Andrew MacLeod <amacleod@redhat.com>
8919
8920 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8921 * c-ada-spec.c: Likewise.
8922 * c-cilkplus.c: Likewise.
8923 * c-common.c: Likewise.
8924 * c-common.h: Likewise.
8925 * c-cppbuiltin.c: Likewise.
8926 * c-dump.c: Likewise.
8927 * c-format.c: Likewise.
8928 * c-gimplify.c: Likewise.
8929 * c-indentation.c: Likewise.
8930 * c-lex.c: Likewise.
8931 * c-omp.c: Likewise.
8932 * c-opts.c: Likewise.
8933 * c-pch.c: Likewise.
8934 * c-ppoutput.c: Likewise.
8935 * c-pragma.c: Likewise.
8936 * c-pretty-print.c: Likewise.
8937 * c-semantics.c: Likewise.
8938 * c-ubsan.c: Likewise.
8939 * cilk.c: Likewise.
8940 * stub-objc.c: Likewise.
8941
076fecad
PP
89422015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8943
8944 PR c++/65168
8945 * c-common.c (c_common_truthvalue_conversion): Warn when
8946 converting an address of a reference to a truth value.
8947
13fdf2e2
AM
89482015-06-08 Andrew MacLeod <amacleod@redhat.com>
8949
8950 * array-notation-common.c : Adjust include files.
8951 * c-ada-spec.c : Likewise.
8952 * c-cilkplus.c : Likewise.
8953 * c-common.c : Likewise.
8954 * c-common.h : Likewise.
8955 * c-cppbuiltin.c : Likewise.
8956 * c-dump.c : Likewise.
8957 * c-format.c : Likewise.
8958 * c-gimplify.c : Likewise.
8959 * c-indentation.c : Likewise.
8960 * c-lex.c : Likewise.
8961 * c-omp.c : Likewise.
8962 * c-opts.c : Likewise.
8963 * c-pch.c : Likewise.
8964 * c-ppoutput.c : Likewise.
8965 * c-pragma.c : Likewise.
8966 * c-pretty-print.c : Likewise.
8967 * c-semantics.c : Likewise.
8968 * c-ubsan.c : Likewise.
8969 * cilk.c : Likewise.
8970 * stub-objc.c : Likewise.
8971
a1661b90
MP
89722015-06-08 Marek Polacek <polacek@redhat.com>
8973
8974 PR c/66415
8975 * c-format.c (location_from_offset): Return LOC if LINE is null.
8976
d7438551
AH
89772015-06-05 Aldy Hernandez <aldyh@redhat.com>
8978
8979 * c-common.h (c_parse_final_cleanups): New prototype.
8980 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8981
b3d5bc62
JJ
89822015-06-04 Sriraman Tallam <tmsriram@google.com>
8983
8984 * c-common.c (noplt): New attribute.
8985 (handle_noplt_attribute): New handler.
8986
ecb9f223
AM
89872015-06-04 Andrew MacLeod <amacleod@redhat.com>
8988
8989 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8990 * c-ada-spec.c: Likewise.
8991 * c-cilkplus.c: Likewise.
8992 * c-common.c: Likewise.
8993 * c-common.h: Likewise.
8994 * c-cppbuiltin.c: Likewise.
8995 * c-dump.c: Likewise.
8996 * c-format.c: Likewise.
8997 * c-gimplify.c: Likewise.
8998 * c-indentation.c: Likewise.
8999 * c-lex.c: Likewise.
9000 * c-omp.c: Likewise.
9001 * c-opts.c: Likewise.
9002 * c-pch.c: Likewise.
9003 * c-ppoutput.c: Likewise.
9004 * c-pragma.c: Likewise.
9005 * c-pretty-print.c: Likewise.
9006 * c-semantics.c: Likewise.
9007 * c-ubsan.c: Likewise.
9008 * cilk.c: Likewise.
9009 * stub-objc.c: Likewise.
9010
6ac48155
DM
90112015-06-02 David Malcolm <dmalcolm@redhat.com>
9012
9013 PR c/66220:
9014 * c-indentation.c (should_warn_for_misleading_indentation): Use
9015 expand_location rather than expand_location_to_spelling_point.
9016 Don't warn if the guarding statement is more indented than the
9017 next/body stmts.
9018
773ce42e
DM
90192015-06-02 David Malcolm <dmalcolm@redhat.com>
9020
9021 * c-indentation.c (warn_for_misleading_indentation): Bail out
9022 immediately if -Wmisleading-indentation isn't enabled.
9023
4fef8379
ML
90242015-06-01 Martin Liska <mliska@suse.cz>
9025
9026 * c-format.c (check_format_arg):Use new type-based pool allocator.
9027 (check_format_info_main) Likewise.
9028
1edfb384
EB
90292015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9030
9031 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9032 (has_nontrivial_methods): Likewise.
9033
9677ef52
MP
90342015-05-25 Marek Polacek <polacek@redhat.com>
9035
9036 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9037
fd5c817a
MP
90382015-05-22 Marek Polacek <polacek@redhat.com>
9039
9040 PR c/47043
9041 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9042
a2f45fe6 90432015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
9044
9045 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9046 STACK_GROWS_DOWNWARD.
9047
a2f45fe6 90482015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
9049
9050 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9051 STACK_GROWS_DOWNWARD rather than if it is defined.
9052
0fee2ac2 90532015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 9054
0fee2ac2
MLI
9055 PR c/52952
9056 * c-format.c (location_column_from_byte_offset): New.
9057 (location_from_offset): New.
9058 (struct format_wanted_type): Add offset_loc field.
9059 (check_format_info): Move handling of location for extra arguments
9060 closer to the point of warning.
9061 (check_format_info_main): Pass the result of location_from_offset
9062 to warning_at.
9063 (format_type_warning): Pass the result of location_from_offset
9064 to warning_at.
9065
cf4ef6f7
MP
90662015-05-20 Marek Polacek <polacek@redhat.com>
9067
9068 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9069
3a65ee74
MP
90702015-05-20 Marek Polacek <polacek@redhat.com>
9071
9072 * c-ada-spec.c (dump_sloc): Use DECL_P.
9073
21b634ae
MP
90742015-05-20 Marek Polacek <polacek@redhat.com>
9075
9076 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9077 * c-common.c: Likewise.
9078
0e50b624
DM
90792015-05-19 David Malcolm <dmalcolm@redhat.com>
9080
9081 * c-common.h (fe_file_change): Strengthen param from
9082 const line_map * to const line_map_ordinary *.
9083 (pp_file_change): Likewise.
9084 * c-lex.c (fe_file_change): Likewise.
9085 (cb_define): Use linemap_check_ordinary when invoking
9086 SOURCE_LINE.
9087 (cb_undef): Likewise.
9088 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9089 invoking cb_file_change.
9090 (c_finish_options): Likewise.
9091 (push_command_line_include): Likewise.
9092 (cb_file_change): Strengthen param "new_map" from
9093 const line_map * to const line_map_ordinary *.
9094 * c-ppoutput.c (cb_define): Likewise for local "map".
9095 (pp_file_change): Likewise for param "map" and local "from".
9096
fab27f52
MM
90972015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9098
9099 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9100
2fe1d762
TV
91012015-05-18 Tom de Vries <tom@codesourcery.com>
9102
9103 * c-common.c (build_va_arg_1): New function.
9104 (build_va_arg): Add address operator to va_list operand if necessary.
9105
7a37fa90
MM
91062015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9107
9108 PR c/48956
9109 * c-common.c (int_safely_convertible_to_real_p): Define.
9110 (unsafe_conversion_p): Check conversions involving complex types.
9111 (conversion_warning): Add new warning message for conversions which
9112 discard imaginary component.
9113 * c-common.h: (enum conversion_safety): Add new enumerator for such
9114 conversions.
9115
3aa3c9fc
MP
91162015-05-14 Marek Polacek <polacek@redhat.com>
9117
9118 PR c/66066
9119 PR c/66127
9120 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9121 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9122 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9123 use it. If FOR_INT_CONST, require that all evaluated operands be
9124 INTEGER_CSTs.
9125
c3388e62
DM
91262015-05-12 David Malcolm <dmalcolm@redhat.com>
9127
9128 * c-common.h (warn_for_misleading_indentation): New prototype.
9129 * c-indentation.c: New file.
9130 * c.opt (Wmisleading-indentation): New option.
9131
c7b38fd5
TV
91322015-05-12 Tom de Vries <tom@codesourcery.com>
9133
9134 PR tree-optimization/66010
9135 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9136
381bf11e
JM
91372015-05-09 Jason Merrill <jason@redhat.com>
9138
edff0c06
JM
9139 * c-opts.c (c_common_post_options): Also clear
9140 cpp_opts->cpp_warn_cxx11_compat.
9141
129211bc
JM
9142 * c-common.h (enum cxx_dialect): Add cxx_unset.
9143 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9144 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9145
381bf11e
JM
9146 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9147 (std=gnu++0x): Mark as Undocumented.
9148 (std=gnu++1y): Add deprecated message.
9149
fe191308
JM
91502015-05-08 Jason Merrill <jason@redhat.com>
9151
765189ff
JM
9152 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9153 * c-opts.c: Adjust.
9154
fe191308
JM
9155 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9156
755e528f
MP
91572015-05-08 Marek Polacek <polacek@redhat.com>
9158
9159 PR c/64918
9160 * c.opt (Woverride-init-side-effects): New option.
9161
0173bd2a
MP
91622015-05-07 Marek Polacek <polacek@redhat.com>
9163
9164 PR c/65179
9165 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9166 negative value.
9167 * c.opt (Wshift-negative-value): New option.
9168 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9169 when -Wextra and C99/C++11 mode.
9170
e0f0d3b9
MP
91712015-05-07 Marek Polacek <polacek@redhat.com>
9172 Martin Uecker <uecker@eecs.berkeley.edu>
9173
9174 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9175 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9176
8243e2a9
JM
91772015-05-05 Jason Merrill <jason@redhat.com>
9178
9179 * c.opt (Wterminate): New.
9180
577cd070
MP
91812015-04-30 Marek Polacek <polacek@redhat.com>
9182
9183 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9184 require that the non-constant be of a boolean type.
9185
0373796b
JT
91862015-04-29 Josh Triplett <josh@joshtriplett.org>
9187
e0f0d3b9
MP
9188 * c-common.c (handle_section_attribute): Refactor to reduce
9189 nesting and distinguish between error cases.
0373796b 9190
716c0ba6
MP
91912015-04-29 Marek Polacek <polacek@redhat.com>
9192
9193 PR c/64610
9194 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9195 with 0/1.
9196
8848828b
JJ
91972015-04-29 Jakub Jelinek <jakub@redhat.com>
9198
9199 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9200 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9201 HOST_BITS_PER_WIDE_INT.
9202
ecd0e562
TV
92032015-04-28 Tom de Vries <tom@codesourcery.com>
9204
9205 PR tree-optimization/65887
9206 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9207
2a877204 92082015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9209 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9210
9211 * c-ada-spec.c (in_function): Delete.
9212 (dump_generic_ada_node): Do not change in_function and remove the
9213 redundant code dealing with it.
9214 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9215 (print_ada_methods): Output the static member functions in a nested
9216 package after the regular methods as well as associated renamings.
9217
4853031e
MP
92182015-04-24 Marek Polacek <polacek@redhat.com>
9219
9220 PR c/65830
9221 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9222 and OPT_Wshift_count_overflow.
9223
8c2b7f79
MP
9224 PR c/63357
9225 * c-common.c (warn_logical_operator): Warn if the operands have the
9226 same expressions.
9227
b8787813
MP
92282015-04-24 Marek Polacek <polacek@redhat.com>
9229
9230 PR c/61534
9231 * c-common.c (warn_logical_operator): Bail if either operand comes
9232 from a macro expansion.
9233
8fba1830
BRF
92342015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9235
9236 PR target/55143
9237 * c-common.c (c_default_pointer_mode): Add definition.
9238 * c-common.h (c_default_pointer_mode): Add declaration.
9239
17958621
JJ
92402015-03-11 Jakub Jelinek <jakub@redhat.com>
9241
9242 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9243 on record_builtin_type argument.
9244
7ccb1a11
JJ
92452015-03-10 Jakub Jelinek <jakub@redhat.com>
9246
9247 PR c/65120
9248 * c-common.c (warn_logical_not_parentheses): Don't warn for
9249 !x == 0 or !x != 0.
9250
04fd785e
MP
92512015-03-07 Marek Polacek <polacek@redhat.com>
9252
9253 PR sanitizer/65280
9254 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9255 before trying to figure out whether we have a flexible array member.
9256
a4e26206 92572015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9258 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9259
9260 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9261
0d2489f4
EB
92622015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9263
9264 PR ada/65319
9265 * c-ada-spec.c (print_destructor): Remove obsolete code.
9266
83ed54d7
EB
92672015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9268
9269 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9270 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9271 DECL_TEMPLATE_RESULT emulations.
9272 (dump_ada_template)): Add guard for TYPE_METHODS.
9273
7631f0e2
MP
92742015-02-27 Marek Polacek <polacek@redhat.com>
9275
9276 PR c/65040
9277 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9278
d1783ae5
KT
92792015-02-27 Kai Tietz <ktietz@redhat.com>
9280
9281 PR c/35330
9282 * c-pragma.c (handle_pragma_weak): Do not try to create
9283 weak/alias of declarations not being function, or variable
9284 declarations.
9285
56a9f6bc
TS
92862015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9287
9288 PR libgomp/64625
9289 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9290 Remove macros.
9291 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9292
3d5cb23d
MP
92932015-02-16 Marek Polacek <polacek@redhat.com>
9294
9295 PR c/65066
9296 * c-format.c (check_format_types): Handle null param.
9297
fa008882
MP
92982015-02-13 Marek Polacek <polacek@redhat.com>
9299
9300 PR c/65040
9301 * c-format.c (check_format_types): Don't warn about different
9302 signedness if the original value is in the range of WANTED_TYPE.
9303
785f21af
JM
93042015-02-12 Jason Merrill <jason@redhat.com>
9305
9306 PR c++/64956
9307 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9308 to the current highest version.
9309 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9310
4886ec8e
JJ
93112015-02-04 Jakub Jelinek <jakub@redhat.com>
9312
9313 PR c/64824
9314 PR c/64868
9315 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9316 instead of RDIV_EXPR. Use build_binary_op instead of
9317 build2_loc.
9318
40fecdd6
JM
93192015-01-30 Joseph Myers <joseph@codesourcery.com>
9320
9321 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9322 to pass input_location as first argument.
9323
a0c88d06
TV
93242015-01-23 Tom de Vries <tom@codesourcery.com>
9325
9326 PR libgomp/64672
9327 * c.opt (fopenacc): Mark as LTO option.
9328
1506ae0e
TV
93292015-01-23 Tom de Vries <tom@codesourcery.com>
9330
9331 PR libgomp/64707
9332 * c.opt (fopenmp): Mark as LTO option.
9333
31be63ab
JJ
93342015-01-21 Jakub Jelinek <jakub@redhat.com>
9335
9336 PR c/63307
b1726d6c 9337 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9338 (compare_decls): Fix up formatting.
9339
93402015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9341
9342 PR c/63307
9343 * cilk.c: Include vec.h.
9344 (struct cilk_decls): New structure.
9345 (wrapper_parm_cb): Split this function to...
9346 (fill_decls_vec): ...this...
9347 (create_parm_list): ...and this.
9348 (compare_decls): New function.
9349 (for_local_cb): Remove.
9350 (wrapper_local_cb): Ditto.
9351 (build_wrapper_type): For now first traverse and fill vector of
9352 declarations then sort it and then deal with sorted vector.
9353 (cilk_outline): Ditto.
9354 (declare_one_free_variable): Ditto.
9355
6875457f
JM
93562015-01-21 Jason Merrill <jason@redhat.com>
9357
9358 PR c++/64629
9359 * c-format.c (check_format_arg): Call decl_constant_value.
9360
185c9e56
ML
93612015-01-19 Martin Liska <mliska@suse.cz>
9362
9363 * c-common.c (handle_noicf_attribute): New function.
9364
41dbbb37
TS
93652015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9366 Bernd Schmidt <bernds@codesourcery.com>
9367 James Norris <jnorris@codesourcery.com>
9368 Cesar Philippidis <cesar@codesourcery.com>
9369 Ilmir Usmanov <i.usmanov@samsung.com>
9370 Jakub Jelinek <jakub@redhat.com>
9371
9372 * c.opt (fopenacc): New option.
9373 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9374 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9375 New macros.
9376 * c-common.h (c_finish_oacc_wait): New prototype.
9377 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9378 (c_finish_oacc_wait): New function.
9379 * c-pragma.c (oacc_pragmas): New variable.
9380 (c_pp_lookup_pragma, init_pragma): Handle it.
9381 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9382 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9383 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9384 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9385 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9386 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9387 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9388 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9389 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9390 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9391 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9392 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9393 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9394 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9395 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9396 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9397 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9398 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9399 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9400 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9401 PRAGMA_OACC_CLAUSE_WORKER.
9402
3f8257db 94032015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9404
9405 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9406 for the new option fstack-protector_explicit.
9407 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9408 (handle_stack_protect_attribute): New function.
9409
3f8257db 94102015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9411
9412 * c.opt: New option -Warray-bounds=.
9413
adfac8df
JJ
94142015-01-09 Michael Collison <michael.collison@linaro.org>
9415
9416 * array-notation-common.c: Include hash-set.h, machmode.h,
9417 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9418 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9419 * c-ada-spec.c: Ditto.
9420 * c-cilkplus.c: Ditto.
9421 * c-common.c: Include input.h due to flattening of tree.h.
9422 Define macro GCC_C_COMMON_C.
9423 * c-common.h: Flatten tree.h header files into c-common.h.
9424 Remove include of tree-core.h.
9425 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9426 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9427 fold-const.h, wide-int.h, and inchash.h due to
9428 flattening of tree.h.
9429 * c-dump.c: Ditto.
9430 * c-format.c: Flatten tree.h header files into c-common.h.
9431 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9432 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9433 fold-const.h, wide-int.h, and inchash.h due to
9434 flattening of tree.h.
9435 * c-dump.c: Include hash-set.h, machmode.h,
9436 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9437 fold-const.h, wide-int.h, and inchash.h due to
9438 flattening of tree.h.
9439 * c-format.c: Include hash-set.h, machmode.h,
9440 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9441 fold-const.h, wide-int.h, inchash.h and real.h due to
9442 flattening of tree.h.
9443 * c-gimplify.c: Include hash-set.h, machmode.h,
9444 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9445 fold-const.h, wide-int.h, and inchash.h due to
9446 flattening of tree.h.
9447 * cilk.c: Ditto.
9448 * c-lex.c: Ditto.
9449 * c-omp.c: Ditto.
9450 * c-opts.c: Ditto.
9451 * c-pch.c: Ditto.
9452 * c-ppoutput.c: Ditto.
9453 * c-pragma.c: Ditto.
9454 * c-pretty-print.c: Ditto.
9455 * c-semantics.c: Ditto.
9456 * c-ubsan.c: Ditto.
9457 * stub-objc.c: Ditto.
9458
f5481fc4
JM
94592015-01-08 Jason Merrill <jason@redhat.com>
9460
9461 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9462 do_ubsan_in_current_function.
9463 (ubsan_maybe_instrument_reference_or_call): Likewise.
9464 * c-ubsan.h: Declare it.
9465
de35aa66
MS
94662015-01-08 Mike Stump <mikestump@comcast.net>
9467
9468 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9469
4a9a42ab
MP
94702015-01-07 Marek Polacek <polacek@redhat.com>
9471
9472 PR c/64440
9473 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9474 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9475
2f42e5de
TS
94762015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9477
9478 PR c++/31397
9479 * c.opt (Wsuggest-override): New option.
9480
5624e564
JJ
94812015-01-05 Jakub Jelinek <jakub@redhat.com>
9482
9483 Update copyright years.
9484
5bd012f8
MP
94852015-01-05 Marek Polacek <polacek@redhat.com>
9486
9487 PR c/64423
9488 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9489 parameter. Use it.
9490 * c-common.h (warn_array_subscript_with_type_char): Update
9491 declaration.
9492
a7fa8d18
ESR
94932014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9494
9495 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9496 Control macro with flag_sized_deallocation.
9497
3f8257db 94982014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9499
9500 * c.opt (Wdiscarded-array-qualifiers): New option.
9501
1f8d3e84
JJ
95022014-12-19 Jakub Jelinek <jakub@redhat.com>
9503
9504 PR preprocessor/63831
9505 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9506 and __has_cpp_attribute here.
9507 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9508 c_common_has_attribute.
9509 * c-common.h (c_common_has_attribute): New prototype.
9510 * c-lex.c (init_c_lex): Set cb->has_attribute to
9511 c_common_has_attribute instead of cb_has_attribute.
9512 (get_token_no_padding): New function.
9513 (cb_has_attribute): Renamed to ...
9514 (c_common_has_attribute): ... this. No longer static. Use
9515 get_token_no_padding, require ()s, don't build TREE_LIST
9516 unnecessarily, fix up formatting, adjust diagnostics, call
9517 init_attributes.
9518
20b06add
JM
95192014-12-15 Jason Merrill <jason@redhat.com>
9520
9521 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9522 (-Wsized-deallocation): New.
9523 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9524 to on in C++14 and up.
9525
94a073b2
JM
95262014-12-11 Jason Merrill <jason@redhat.com>
9527
acaa5911
JM
9528 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9529
94a073b2
JM
9530 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9531 we aren't complaining about VLAs.
9532
7fb66c15
MP
95332014-12-06 Marek Polacek <polacek@redhat.com>
9534
9535 PR tree-optimization/64183
9536 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9537 shift-expression if it is integer_type_node. Use types_compatible_p.
9538
b731b390
JJ
95392014-11-29 Jakub Jelinek <jakub@redhat.com>
9540
9541 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9542 last argument from create_tmp_var_raw and create_tmp_var calls.
9543 * cilk.c (gimplify_cilk_spawn): Likewise.
9544 * c-omp.c (c_finish_omp_atomic): Likewise.
9545
6a4da643
MP
95462014-11-28 Marek Polacek <polacek@redhat.com>
9547
9548 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9549 instead of unsigned_type_node.
9550
541e35a6
MP
95512014-11-28 Marek Polacek <polacek@redhat.com>
9552
9553 PR c/63862
9554 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9555 to op1_utype.
9556 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9557 expression to unsigned_type_node.
9558
dcc97066
MW
95592014-11-20 Mark Wielaard <mjw@redhat.com>
9560
9561 PR debug/38757
9562 * c-opts.c (set_std_c89): Set lang_hooks.name.
9563 (set_std_c99): Likewise.
9564 (set_std_c11): Likewise.
9565 (set_std_cxx98): Likewise.
9566 (set_std_cxx11): Likewise.
9567 (set_std_cxx14): Likewise.
9568 (set_std_cxx1z): Likewise.
9569
aa7da51a
JJ
95702014-11-21 Jakub Jelinek <jakub@redhat.com>
9571
9572 PR target/63764
9573 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9574 return type to bool.
009a3480 9575 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9576 (convert_vector_to_pointer_for_subscript): Change return type to
9577 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9578 and copy it into a TARGET_EXPR and use that instead of *vecp
9579 directly.
9580
538dd0b7
DM
95812014-11-19 David Malcolm <dmalcolm@redhat.com>
9582
9583 Merger of git branch "gimple-classes-v2-option-3".
9584 * ChangeLog.gimple-classes: New.
9585 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9586 from being just a vec<gimple> to a vec<gbind *>.
9587
c39a5e99
JJ
95882014-11-18 Jakub Jelinek <jakub@redhat.com>
9589
9590 PR sanitizer/63813
9591 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9592 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9593 get_pointer_alignment for non-pointers. Use ptype, or if it is
9594 reference type, corresponding pointer type, as type of kind
9595 argument.
9596 (ubsan_maybe_instrument_reference,
9597 ubsan_maybe_instrument_member_call): Adjust callers.
9598
8537a4a9
MP
95992014-11-15 Marek Polacek <polacek@redhat.com>
9600
9601 PR middle-end/63884
9602 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9603 for NULL fndecl.
9604 (extract_array_notation_exprs): Return for NULL node.
9605
2079956a
JM
96062014-11-12 Joseph Myers <joseph@codesourcery.com>
9607
9608 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9609 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9610
1304953e
JJ
96112014-11-12 Jakub Jelinek <jakub@redhat.com>
9612
9613 PR c/59708
9614 * c-common.c (check_builtin_function_arguments): Handle
9615 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9616
e5e44252
AK
96172014-11-10 Andi Kleen <ak@linux.intel.com>
9618
9619 PR c/60804
9620 * c-common.h (check_no_cilk): Declare.
9621 * cilk.c (get_error_location): New function.
9622 (check_no_cilk): Dito.
9623
e64b984d
AK
96242014-11-10 Andi Kleen <ak@linux.intel.com>
9625
9626 * cilk.c (recognize_spawn): Use expression location
9627 for error message.
9628
13c21655
PC
96292014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9630
9631 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9632
42fd12b1
ESR
96332014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9634
9635 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9636 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9637 (__cpp_range_based_for, __cpp_initializer_lists,
9638 __cpp_delegating_constructors, __cpp_nsdmi,
9639 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9640 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9641 __has_cpp_attribute.
9642 * c-lex.c (cb_has_attribute): New callback CPP function;
9643 (init_c_lex): Set has_attribute callback.
9644
6f450181
RB
96452014-11-04 Richard Biener <rguenther@suse.de>
9646
9647 * c-common.c (shorten_compare): Do not shorten mixed
9648 DFP and non-DFP compares.
9649
26f0e1d6
ESR
96502014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9651
9652 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9653 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9654 Commentary and rearrangement of tests.
9655 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9656 Commentary and rearrangement of tests.
ab20d992 9657 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9658 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9659
ef4bddc2
RS
96602014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9661
9662 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9663 enum from machine_mode.
9664
c582198b
AM
96652014-10-28 Andrew MacLeod <amacleod@redhat.com>
9666
adfac8df
JJ
9667 * c-common.c: Adjust include files.
9668 * c-gimplify.c: Ditto.
9669 * cilk.c: Ditto.
9670 * c-pragma.c: Ditto.
9671 * c-ubsan.c: Ditto.
c582198b 9672
60393bbc
AM
96732014-10-27 Andrew MacLeod <amacleod@redhat.com>
9674
9675 * c-gimplify.c: Adjust include files.
9676
d723bb7c
MLI
96772014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9678
9679 PR c++/53061
9680 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9681 c_common_initialize_diagnostics.
9682 * c-common.h: Likewise.
9683
90f3520e
MP
96842014-10-24 Marek Polacek <polacek@redhat.com>
9685
9686 PR c/56980
9687 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9688 print "struct"/"union"/"enum" for typedefed names.
9689
59d7607a
MP
96902014-10-23 Marek Polacek <polacek@redhat.com>
9691
9692 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9693 in unsigned type.
9694
d95a2703
JJ
96952014-10-22 Jakub Jelinek <jakub@redhat.com>
9696 Yury Gribov <y.gribov@samsung.com>
9697
9698 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9699 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9700 instead of flag_sanitize_recover as bool flag.
9701
8e6ef852
KY
97022014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9703
9704 * cilk.c: Revert previous change.
9705
948cf550
IZ
97062014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9707
9708 PR c/63307
9709 * cilk.c: Include vec.h.
9710 (struct cilk_decls): New structure.
9711 (wrapper_parm_cb): Split this function to...
9712 (fill_decls_vec): ...this...
9713 (create_parm_list): ...and this.
9714 (compare_decls): New function.
9715 (for_local_cb): Remove.
9716 (wrapper_local_cb): Ditto.
9717 (build_wrapper_type): For now first traverse and fill vector of
9718 declarations then sort it and then deal with sorted vector.
9719 (cilk_outline): Ditto.
9720 (declare_one_free_variable): Ditto.
9721
92574c7c
MP
97222014-10-17 Marek Polacek <polacek@redhat.com>
9723
9724 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9725 * c.opt (Wimplicit-int): Initialize to -1.
9726
83685514
AM
97272014-10-16 Andrew MacLeod <amacleod@redhat.com>
9728
9729 * c-pragma.c: Adjust include files.
9730 * c-semantics.c: Likewise.
9731
5b8300ea
DD
97322014-10-16 DJ Delorie <dj@redhat.com>
9733
9734 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9735 multiples of bytes.
9736
5f83e90b
JM
97372014-10-14 Jason Merrill <jason@redhat.com>
9738
9739 PR c++/63455
9740 * c-common.h (CPP_PREPARSED_EXPR): New.
9741 (N_CP_TTYPES): Adjust.
9742
d73326ca
MP
97432014-10-15 Marek Polacek <polacek@redhat.com>
9744
9745 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9746
78a7c317
DD
97472014-10-14 DJ Delorie <dj@redhat.com>
9748
9749 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9750 types, not just __int128.
9751 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9752 types, not just __int128.
9753 (cpp_atomic_builtins): Round pointer sizes up.
9754 (type_suffix): Use type precision, not specific types.
9755 * c-common.c (c_common_reswords): Remove __int128 special case.
9756 (c_common_type_for_size): Check for all __intN types, not just
9757 __int128.
9758 (c_common_type_for_mode): Likewise.
9759 (c_common_signed_or_unsigned_type): Likewise.
9760 (c_build_bitfield_integer_type): Likewise.
9761 (c_common_nodes_and_builtins): Likewise.
9762 (keyword_begins_type_specifier): Likewise.
9763 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9764 __intN variants.
9765
2a22f99c
TS
97662014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9767
9768 * c-common.c: Use hash_table instead of hashtab.
9769
2a8ef767
ESR
97702014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9771
adfac8df 9772 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9773 C++11 section.
9774
3c9aabbd
MG
97752014-10-03 Marc Glisse <marc.glisse@inria.fr>
9776
9777 PR c++/54427
9778 PR c++/57198
9779 PR c++/58845
9780 * c-common.c (warn_logical_operator): Punt for vectors.
9781
a15f7cb8
ESR
97822014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9783
9784 Implement SD-6: SG10 Feature Test Recommendations
9785 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9786 macros and the __has_header macro.
9787
8d0cf15e
JM
97882014-09-30 Jason Merrill <jason@redhat.com>
9789
dd5d5481
JM
9790 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9791 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9792 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9793
b752325e
JM
9794 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9795 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9796
8d0cf15e
JM
9797 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9798 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9799
083e891e
MP
98002014-09-24 Marek Polacek <polacek@redhat.com>
9801
9802 PR c/61405
9803 PR c/53874
9804 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9805
7861b648
AK
98062014-09-23 Andi Kleen <ak@linux.intel.com>
9807
9808 * c-common.c (handle_no_reorder_attribute): New function.
9809 (c_common_attribute_table): Add no_reorder attribute.
9810
9a79452d
JM
98112014-09-22 Joseph Myers <joseph@codesourcery.com>
9812
9813 * c-cppbuiltin.c (c_cpp_builtins): Define
9814 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9815 modes.
9816
dd69f047
JM
98172014-09-18 Joseph Myers <joseph@codesourcery.com>
9818
9819 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9820 for supported floating-point modes.
9821
737a4826
MLI
98222014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9823
9824 * c.opt (Wpsabi): Use LangEnabledBy.
9825 * c-opts.c (c_common_handle_option): Do not handle here.
9826
8cc4b7a2
JM
98272014-09-12 Joseph Myers <joseph@codesourcery.com>
9828
9829 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9830 macros for floating-point modes.
9831
179b5a55
MG
98322014-09-11 Marc Glisse <marc.glisse@inria.fr>
9833
9834 PR target/58757
9835 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9836 __*_DENORM_MIN__ without denormals.
9837
570a11fe
JJ
98382014-09-10 Jakub Jelinek <jakub@redhat.com>
9839
9840 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9841 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9842 ubsan_create_data callers.
9843 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9844 index is constant or BIT_AND_EXPR with constant mask and is
9845 small enough for the bound.
9846 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9847 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9848
b559c810
MLI
98492014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9850
9851 * c.opt: Add CppReason to various flags.
9852 (Wdate-time): Re-sort.
9853 * c-common.c: Include c-common.h earlier.
9854 (struct reason_option_codes_t): Delete.
9855 (c_option_controlling_cpp_error): Prefix global type and struct
9856 with cpp_.
9857
1ef33fd4
MLI
98582014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9859
9860 * c.opt (Wnormalized): New.
9861 (Wnormalized=): Use Enum and Reject Negative.
9862 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9863
66bb34c0
JM
98642014-09-08 Joseph Myers <joseph@codesourcery.com>
9865
9866 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9867 digits of floating-point modes if -fbuilding-libgcc.
9868
53d68b9f
JM
98692014-09-05 Joseph Myers <joseph@codesourcery.com>
9870
9871 * c-cppbuiltin.c (c_cpp_builtins): Also define
9872 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9873 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9874 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9875 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9876 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9877 __LIBGCC_STACK_GROWS_DOWNWARD__,
9878 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9879 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9880 __LIBGCC_DWARF_FRAME_REGISTERS__,
9881 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9882 __LIBGCC_STACK_POINTER_REGNUM__ and
9883 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9884 (builtin_define_with_value): Handle backslash-escaping in string
9885 macro values.
9886
f65586dc
RB
98872014-09-05 Richard Biener <rguenther@suse.de>
9888
9889 PR middle-end/63148
9890 * c-format.c (check_format_arg): Properly handle
9891 effectively signed POINTER_PLUS_EXPR offset.
9892
2b71f4a4
MLI
98932014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9894
9895 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9896 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9897 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9898 and Init.
9899 * c-opts.c (c_common_handle_option): Do not handle here.
9900 (sanitize_cpp_opts): Likewise.
9901 * c-common.c (struct reason_option_codes_t): Handle
9902 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9903
d2e4feca
MP
99042014-09-03 Marek Polacek <polacek@redhat.com>
9905
9906 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9907
9a771876
JJ
99082014-09-02 Jakub Jelinek <jakub@redhat.com>
9909 Balaji V. Iyer <balaji.v.iyer@intel.com>
9910 Igor Zamyatin <igor.zamyatin@intel.com>
9911
9912 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9913 * c-common.c (c_common_reswords): Added _Cilk_for.
9914 * c-common.h (enum rid): Added RID_CILK_FOR.
9915 (cilk_for_number_of_iterations): Add declaration.
9916 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9917 CILK_FOR.
9918 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9919 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9920
81b5d104
MLI
99212014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9922
9923 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9924 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9925 Wundef): Use CPP, Var and Init.
9926 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9927
b753b37b
MLI
99282014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9929
9930 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9931 * c-opts.c (c_common_handle_option): Do not handle here.
9932
028aee17
JM
99332014-08-25 Jason Merrill <jason@redhat.com>
9934
9935 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9936 -std=c++14 and -std=gnu++14, rather than the reverse.
9937 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9938 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9939 * c-common.h (cxx_dialect): Remove cxx1y.
9940
e4276ba5
ESR
99412014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9942
9943 * c-common.h (enum cxx_dialect): Add cxx14.
9944 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9945 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9946 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9947
a545cacd
JM
99482014-08-22 Jason Merrill <jason@redhat.com>
9949
9950 * c.opt (std=gnu++17): Fix alias.
9951
59ea0364
MP
99522014-08-22 Marek Polacek <polacek@redhat.com>
9953
9954 PR c++/62199
9955 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9956 check for vector types. Drop LHS argument.
9957 * c-common.h (warn_logical_not_parentheses): Adjust.
9958
596e808c
MLI
99592014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9960
9961 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9962 (Wmultichar): Likewise.
9963 (Wdate-time): Use C-family languages instead of Common. Use CPP
9964 and Var.
9965 * c-opts.c (c_common_handle_option): Do not handle the above
9966 options here.
9967 (sanitize_cpp_opts): Likewise.
9968
18767f65
MLI
99692014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9970
9971 PR fortran/44054
9972 * c-opts.c: Include tree-diagnostics.h.
9973 (c_diagnostic_finalizer): New.
9974 (c_common_initialize_diagnostics): Use it.
9975
b4413594
MLI
99762014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9977
9978 PR preprocessor/51303
9979 * c-common.c (struct reason_option_codes_t option_codes):
9980 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9981
43f9a13c
MLI
99822014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9983
9984 PR c/60975
9985 PR c/53063
9986 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9987 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9988 (c_common_post_options): Call init_global_opts_from_cpp.
9989 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9990
04159acf
MP
99912014-08-19 Marek Polacek <polacek@redhat.com>
9992
9993 PR c++/62153
9994 * c-common.c (maybe_warn_bool_compare): New function.
9995 * c-common.h (maybe_warn_bool_compare): Declare.
9996 * c.opt (Wbool-compare): New option.
9997
35aff4fb
MP
99982014-08-19 Marek Polacek <polacek@redhat.com>
9999
10000 * c.opt (Wc99-c11-compat): New option.
10001
177cce46
MP
100022014-08-19 Marek Polacek <polacek@redhat.com>
10003
10004 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10005 to warn_c90_c99_compat.
10006 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10007 to -1.
10008
6ae9194f
MLI
100092014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10010 Steven Bosscher <steven@gcc.gnu.org>
10011
10012 PR c/52952
10013 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10014 format_check_results.
10015 (check_function_format): Use true and add comment for boolean
10016 argument.
10017 (finish_dollar_format_checking): Use explicit location when warning.
10018 (check_format_info): Likewise.
10019 (check_format_arg): Set extra_arg_loc and format_string_loc.
10020 (check_format_info_main): Use explicit location when warning.
10021 (check_format_types): Pass explicit location.
10022 (format_type_warning): Likewise.
10023
8e54f6d3
MLI
100242014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10025
10026 PR fortran/44054
10027 * c-format.c: Handle Fortran flags.
10028
cd4e76fc
IZ
100292014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10030
10031 PR other/61962
10032 * array-notation-common.c (find_rank): Added handling for other
10033 types of references.
10034
f3bede71
MP
100352014-08-10 Marek Polacek <polacek@redhat.com>
10036
10037 PR c/51849
10038 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10039 * c.opt (Wc90-c99-compat): Add option.
10040
9f25a338
TS
100412014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10042
10043 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10044
62e4eb35
MP
100452014-08-03 Marek Polacek <polacek@redhat.com>
10046
ab20d992 10047 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
10048 (c_add_case_label): Pass loc to check_case_value.
10049
b787e7a2
TS
100502014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10051
10052 * cilk.c: Use hash_map instead of pointer_map.
10053
6e2830c3
TS
100542014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10055
10056 * c-gimplify.c: Use hash_set instead of pointer_set.
10057
a7ee52fb
IZ
100582014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10059
10060 PR middle-end/61455
10061 * array-notation-common.c (extract_array_notation_exprs): Handling
10062 of DECL_EXPR added.
10063
944fa280
JJ
100642014-08-01 Jakub Jelinek <jakub@redhat.com>
10065
10066 * c-common.h (min_align_of_type): Removed prototype.
10067 * c-common.c (min_align_of_type): Removed.
10068 * c-ubsan.h (ubsan_maybe_instrument_reference,
10069 ubsan_maybe_instrument_member_call): New prototypes.
10070 * c-ubsan.c: Include stor-layout.h and builtins.h.
10071 (ubsan_maybe_instrument_reference_or_call,
10072 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10073 functions.
10074
b4dfdc11
MG
100752014-07-31 Marc Glisse <marc.glisse@inria.fr>
10076
10077 PR c++/60517
10078 * c.opt (-Wreturn-local-addr): Move to common.opt.
10079
a41844e5
JM
100802014-07-30 Jason Merrill <jason@redhat.com>
10081
10082 PR c++/61659
10083 PR c++/61687
10084 Revert:
10085 * c.opt (-fuse-all-virtuals): New.
10086
976d5a22
TT
100872014-07-30 Tom Tromey <tromey@redhat.com>
10088
10089 PR c/59855
10090 * c.opt (Wdesignated-init): New option.
10091 * c-common.c (c_common_attribute_table): Add "designated_init".
10092 (handle_designated_init): New function.
10093
cdc94aca
MP
100942014-07-24 Marek Polacek <polacek@redhat.com>
10095
10096 PR c/57653
10097 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10098
f41373b6
DS
100992014-07-16 Dodji Seketeli <dodji@redhat.com>
10100
10101 PR preprocessor/60723 - missing system-ness marks for macro tokens
10102 * c-ppoutput.c (struct print::prev_was_system_token): New data
10103 member.
10104 (init_pp_output): Initialize it.
10105 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10106 (do_line_change): Return a flag saying if a line marker was
10107 emitted or not.
10108 (scan_translation_unit): Detect if the system-ness of the token we
10109 are about to emit is different from the one of the previously
10110 emitted token. If so, emit a line marker. Avoid emitting useless
10111 adjacent line markers. Avoid emitting line markers for tokens
10112 originating from the expansion of built-in macros.
10113 (scan_translation_unit_directives_only): Adjust.
10114
4d661eaa
MP
101152014-07-15 Marek Polacek <polacek@redhat.com>
10116
10117 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10118 TYPE_MAX_VALUE is NULL.
10119
b108f48f
JJ
101202014-07-14 Jakub Jelinek <jakub@redhat.com>
10121
10122 PR middle-end/61294
10123 * c.opt (Wmemset-transposed-args): New warning.
10124
c0221884
JM
101252014-07-10 Jason Merrill <jason@redhat.com>
10126
10127 PR c++/61659
10128 PR c++/61687
10129 * c.opt (-fuse-all-virtuals): New.
10130
63dfbb95
RB
101312014-07-09 Richard Biener <rguenther@suse.de>
10132
10133 PR c-family/61741
10134 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10135 using unsigned arithmetic if overflow does not wrap instead of
10136 if overflow is undefined.
10137
773ec47f
MP
101382014-07-06 Marek Polacek <polacek@redhat.com>
10139
10140 PR c/6940
10141 * c.opt (Wsizeof-array-argument): New option.
10142
00a7ba58
JJ
101432014-07-03 Jakub Jelinek <jakub@redhat.com>
10144
b1726d6c 10145 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10146 comments->count <= 1, as comments->entries might be NULL.
10147
52ec0ea3
MP
101482014-07-01 Marek Polacek <polacek@redhat.com>
10149
10150 * c.opt (Wint-conversion): New option.
10151
d5c3d343
MP
101522014-07-01 Marek Polacek <polacek@redhat.com>
10153
10154 PR c/58286
10155 * c.opt (Wincompatible-pointer-types): New option.
10156
6e7ceb17
PC
101572014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10158
10159 PR c++/51400
10160 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10161 Do not discard TYPE_QUALS of type.
10162
da73100b
JM
101632014-06-26 Jason Merrill <jason@redhat.com>
10164
10165 * c-common.h (enum cxx_dialect): Add cxx1z.
10166 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10167 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10168
08eedf75
TJ
101692014-06-26 Teresa Johnson <tejohnson@google.com>
10170
10171 * c-common.h (get_dump_info): Declare.
10172 * c-gimplify.c (c_genericize): Use saved dump files.
10173 * c-opts.c (c_common_parse_file): Begin and end dumps
10174 once around parsing invocation.
10175 (get_dump_info): New function.
10176
7b56b2f8
MP
101772014-06-23 Marek Polacek <polacek@redhat.com>
10178 Andrew MacLeod <amacleod@redhat.com>
10179
10180 PR c/61553
10181 * c-common.c (get_atomic_generic_size): Don't segfault if the
10182 type doesn't have a size.
10183
0e37a2f3
MP
101842014-06-20 Marek Polacek <polacek@redhat.com>
10185
10186 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10187 (ubsan_walk_array_refs_r): New function.
10188 (c_genericize): Instrument array bounds.
10189 * c-ubsan.c: Include "internal-fn.h".
10190 (ubsan_instrument_division): Mark instrumented arrays as having
10191 side effects. Adjust ubsan_type_descriptor call.
10192 (ubsan_instrument_shift): Likewise.
10193 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10194 (ubsan_instrument_bounds): New function.
10195 (ubsan_array_ref_instrumented_p): New function.
10196 (ubsan_maybe_instrument_array_ref): New function.
10197 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10198 (ubsan_array_ref_instrumented_p): Declare.
10199 (ubsan_maybe_instrument_array_ref): Declare.
10200
102012014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10202
10203 PR lto/61123
10204 * c.opt (fshort-enums): Add to LTO.
10205 * c.opt (fshort-wchar): Likewise.
10206
5c3d09f7
MP
102072014-06-16 Marek Polacek <polacek@redhat.com>
10208
10209 PR c/60439
10210 * c.opt (Wswitch-bool): Add Var.
10211
9cf32741
JJ
102122014-06-12 Jakub Jelinek <jakub@redhat.com>
10213
10214 PR middle-end/61486
10215 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10216 #pragma omp target teams or
10217 #pragma omp {,target }teams distribute simd.
10218
62984918
JM
102192014-06-12 Jason Merrill <jason@redhat.com>
10220
10221 * c.opt (Wabi=, fabi-compat-version): New.
10222 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10223 (c_common_post_options): Handle flag_abi_compat_version default.
10224 Disallow -fabi-compat-version=1.
10225 * c-common.h (abi_version_crosses): New.
10226
f961457f
JH
102272014-06-11 Jan Hubicka <hubicka@ucw.cz>
10228
adfac8df 10229 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10230 section names that are no longer trees.
10231
92d28cbb
JJ
102322014-06-10 Jakub Jelinek <jakub@redhat.com>
10233
10234 PR fortran/60928
10235 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10236 (omp_pragmas): ... back here.
10237
742938c9
MP
102382014-06-05 Marek Polacek <polacek@redhat.com>
10239
10240 PR c/49706
10241 * c-common.c (warn_logical_not_parentheses): New function.
10242 * c-common.h (warn_logical_not_parentheses): Declare.
10243 * c.opt (Wlogical-not-parentheses): New option.
10244
9d548dfb
MP
102452014-06-04 Marek Polacek <polacek@redhat.com>
10246
10247 PR c/30020
10248 * c-common.c (check_case_bounds): Add location parameter.
10249 Use it.
10250 (c_add_case_label): Pass loc to check_case_bounds.
10251
fedfecef
MP
102522014-06-03 Marek Polacek <polacek@redhat.com>
10253
10254 PR c/60439
10255 * c.opt (Wswitch-bool): New option.
10256
f6a7cffc
TS
102572014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10258
040d18b6
TS
10259 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10260 Remove prototypes.
10261 (record_types_used_by_current_var_decl): Move prototype to where
10262 it belongs.
10263
f6a7cffc
TS
10264 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10265 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10266 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10267
632f2871
RS
102682014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10269
10270 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10271 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10272 void_zero_node.
10273 * c-pretty-print.c (pp_c_void_constant): New function.
10274 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10275 (c_pretty_printer::expression): Handle VOID_CST.
10276 * cilk.c (extract_free_variables): Likewise.
10277 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10278 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10279
766090c2
TS
102802014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10281
10282 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10283 * c-pragma.c (push_alignment): Adjust.
10284 (handle_pragma_push_options): Likewise.
10285
661a0813
MP
102862014-05-09 Marek Polacek <polacek@redhat.com>
10287
10288 PR c/50459
10289 * c-common.c (check_user_alignment): Return -1 if alignment is error
10290 node.
10291 (handle_aligned_attribute): Don't call default_conversion on
10292 FUNCTION_DECLs.
10293 (handle_vector_size_attribute): Likewise.
10294 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10295 (handle_sentinel_attribute): Call default_conversion and allow even
10296 integral types as an argument.
10297
2793eeab
MP
102982014-05-08 Marek Polacek <polacek@redhat.com>
10299
10300 PR c/61053
10301 * c-common.c (min_align_of_type): New function factored out from...
10302 (c_sizeof_or_alignof_type): ...here.
10303 * c-common.h (min_align_of_type): Declare.
10304
f827930a
MP
103052014-05-08 Marek Polacek <polacek@redhat.com>
10306
10307 PR c/61077
10308 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10309 parameter type of main.
10310
ca49b74e
DD
103112014-05-07 DJ Delorie <dj@redhat.com>
10312
10313 * c-cppbuiltin.c (print_bits_of_hex): New.
10314 (builtin_define_type_minmax): Print values using hex so as not to
10315 require a pre-computed list of string values.
10316
1d60af08
KZ
103172014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10318 Mike Stump <mikestump@comcast.net>
10319 Richard Sandiford <rdsandiford@googlemail.com>
10320
10321 * c-ada-spec.c: Include wide-int.h.
10322 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10323 (dump_generic_ada_node): Use wide-int interfaces.
10324 * c-common.c: Include wide-int-print.h.
10325 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10326 (pointer_int_sum): Use wide-int interfaces.
10327 (c_common_nodes_and_builtins): Use make_int_cst.
10328 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10329 (handle_alloc_size_attribute): Use wide-int interfaces.
10330 (get_nonnull_operand): Likewise.
10331 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10332 * c-lex.c: Include wide-int.h.
10333 (narrowest_unsigned_type): Take a widest_int rather than two
10334 HOST_WIDE_INTs.
10335 (narrowest_signed_type): Likewise.
10336 (interpret_integer): Update accordingly. Use wide-int interfaces.
10337 (lex_charconst): Use wide-int interfaces.
10338 * c-pretty-print.c: Include wide-int.h.
10339 (pp_c_integer_constant): Use wide-int interfaces.
10340 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10341 INT_CST_LT_UNSIGNED.
10342
b15458be
RB
103432014-05-06 Richard Biener <rguenther@suse.de>
10344
10345 * c-opts.c (c_common_post_options): For -freestanding,
10346 -fno-hosted and -fno-builtin disable pattern recognition
10347 if not enabled explicitely.
10348
6577374e
MP
103492014-05-02 Marek Polacek <polacek@redhat.com>
10350
10351 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10352
d00887e8
MP
103532014-05-01 Marek Polacek <polacek@redhat.com>
10354
10355 PR c/43245
10356 * c.opt (Wdiscarded-qualifiers): Add.
10357
f8ed5150
MP
103582014-04-30 Marek Polacek <polacek@redhat.com>
10359
10360 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10361 INT_MIN / -1 sanitization only for integer types.
10362
45484dcf
MP
103632014-04-25 Marek Polacek <polacek@redhat.com>
10364
10365 PR c/18079
10366 * c-common.c (handle_noinline_attribute): Warn if the attribute
10367 conflicts with always_inline attribute.
10368 (handle_always_inline_attribute): Warn if the attribute conflicts
10369 with noinline attribute.
10370
38e514c0
MP
103712014-04-25 Marek Polacek <polacek@redhat.com>
10372
10373 PR c/60156
10374 * c-common.c (check_main_parameter_types): Warn about variadic main.
10375
44875f92
MS
103762014-04-24 Mike Stump <mikestump@comcast.net>
10377
10378 * c.opt (Wshadow-ivar): Default to on.
10379
dcaaa5a0
DP
103802014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10381
10382 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10383
c07d7c02
MP
103842014-04-23 Marek Polacek <polacek@redhat.com>
10385
10386 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10387
1c33c9b7
JJ
103882014-04-22 Jakub Jelinek <jakub@redhat.com>
10389
10390 PR sanitizer/60275
10391 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10392 if flag_sanitize_undefined_trap_on_error.
10393 (ubsan_instrument_division, ubsan_instrument_shift,
10394 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10395 if !flag_sanitize_recover.
10396
793c625f
MG
103972014-04-22 Marc Glisse <marc.glisse@inria.fr>
10398
10399 PR libstdc++/43622
10400 * c-common.c (registered_builtin_types): Make non-static.
10401 * c-common.h (registered_builtin_types): Declare.
10402
b0f1bf36 104032014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10404 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10405
10406 PR c/60819
10407 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10408 apply may-alias the scalar pointer type when applicable.
10409
3b07fa4a
IZ
104102014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10411
10412 PR middle-end/60467
10413 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10414 as possible argument for Cilk_spawn.
10415
cbbd2b1c
TB
104162014-04-11 Tobias Burnus <burnus@net-b.de>
10417
10418 PR c/60194
10419 * c.opt (Wformat-signedness): Add
10420 * c-format.c(check_format_types): Use it.
10421
6415bd5d
JM
104222014-04-11 Jason Merrill <jason@redhat.com>
10423
10424 PR c++/57926
10425 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10426 default_conversion for an array argument.
10427
6525783a
MP
104282014-04-08 Marek Polacek <polacek@redhat.com>
10429
10430 PR sanitizer/60745
10431 * c-ubsan.c: Include asan.h.
10432 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10433
880a467b
NS
104342014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10435
10436 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10437
7b59ff2d
MP
104382014-04-02 Marek Polacek <polacek@redhat.com>
10439
10440 * c-common.h (c_expand_expr): Remove declaration.
10441
8edbfaa6
JJ
104422014-03-28 Jakub Jelinek <jakub@redhat.com>
10443
10444 PR c++/60689
10445 * c-common.c (add_atomic_size_parameter): When creating new
10446 params vector, push the size argument first.
10447
07d72e1d
JJ
104482014-03-26 Jakub Jelinek <jakub@redhat.com>
10449
10450 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10451 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10452 ubsan_create_data callers.
10453
b35e0fa0
JJ
104542014-03-22 Jakub Jelinek <jakub@redhat.com>
10455
10456 PR debug/60603
10457 * c-opts.c (c_finish_options): Restore cb_file_change call to
10458 <built-in>.
10459
39a1ebb3
JJ
104602014-03-13 Jakub Jelinek <jakub@redhat.com>
10461
10462 PR middle-end/36282
10463 * c-pragma.c (apply_pragma_weak): Only look at
10464 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10465 DECL_ASSEMBLER_NAME_SET_P (decl).
10466 (maybe_apply_pending_pragma_weaks): Exit early if
10467 vec_safe_is_empty (pending_weaks) rather than only when
10468 !pending_weaks.
10469 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10470 set assembler name back to NULL afterwards.
10471
a07f6ed2
JM
104722014-03-11 Jason Merrill <jason@redhat.com>
10473
10474 * c.opt: Add -std=gnu++14.
10475
75b107f5
IB
104762014-03-11 Ian Bolton <ian.bolton@arm.com>
10477
10478 * c-opts.c (c_common_post_options): Don't override
10479 -ffp-contract=fast if unsafe-math-optimizations is on.
10480
f42c637e
PM
104812014-03-08 Paulo Matos <paulo@matos-sorge.com>
10482
22b15758 10483 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10484
70e24808
JM
104852014-03-07 Jason Merrill <jason@redhat.com>
10486
10487 * c.opt: Add -std=c++14.
10488
3af9c5e9
MP
104892014-03-06 Marek Polacek <polacek@redhat.com>
10490
10491 PR c/60197
10492 * cilk.c (contains_cilk_spawn_stmt): New function.
10493 (contains_cilk_spawn_stmt_walker): Likewise.
10494 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10495 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10496
b3bdf019
JJ
104972014-03-03 Jakub Jelinek <jakub@redhat.com>
10498
10499 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10500 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10501 even when flag_preprocess_only.
10502
ca7e759d
JM
105032014-02-26 Jason Merrill <jason@redhat.com>
10504
10505 PR c++/59231
10506 PR c++/11586
10507 * c-common.c (shorten_compare): Don't check
10508 c_inhibit_evaluation_warnings.
10509
28e41874
JJ
105102014-02-19 Jakub Jelinek <jakub@redhat.com>
10511
cca615af
JJ
10512 PR c/37743
10513 * c-common.c (c_common_nodes_and_builtins): When initializing
10514 c_uint{16,32,64}_type_node, also set corresponding
10515 uint{16,32,64}_type_node to the same value.
10516
28e41874
JJ
10517 PR c++/60267
10518 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10519 for PRAGMA_IVDEP if flag_preprocess_only.
10520
c2bf53a1
JJ
105212014-02-12 Jakub Jelinek <jakub@redhat.com>
10522
10523 PR c/60101
10524 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10525 if false, add ADD itself, rather than vice versa.
10526 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10527 copy. For SAVE_EXPR, only call merge_tlist once.
10528
8fcbce72
JJ
105292014-02-08 Jakub Jelinek <jakub@redhat.com>
10530
10531 PR middle-end/60092
10532 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10533 and tree_to_uhwi.
10534 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10535 functions.
10536 (c_common_attribute_table): Add alloc_align and assume_aligned
10537 attributes.
10538
0a756a3f
MP
105392014-02-06 Marek Polacek <polacek@redhat.com>
10540
10541 PR c/60087
10542 * c-common.c (warn_for_sign_compare): Call warning_at with location
10543 instead of warning.
10544
7ec4847a
MP
105452014-02-05 Marek Polacek <polacek@redhat.com>
10546
10547 PR c/53123
10548 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10549 statement.
10550
66f20604
MP
105512014-02-04 Marek Polacek <polacek@redhat.com>
10552
10553 PR c/60036
10554 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10555 SAVE_EXPR.
10556
5d77fb19
MG
105572014-02-03 Marc Glisse <marc.glisse@inria.fr>
10558
10559 PR c++/53017
10560 PR c++/59211
10561 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10562 handle_vector_size_attribute, handle_nonnull_attribute): Call
10563 default_conversion on the attribute argument.
10564 (handle_nonnull_attribute): Increment the argument number.
10565
81e5eca8
MP
105662014-01-31 Marek Polacek <polacek@redhat.com>
10567
10568 PR c/59963
10569 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10570 build_function_call_vec.
10571 (resolve_overloaded_builtin): Likewise.
10572 * c-common.h (build_function_call_vec): Adjust declaration.
10573
68fca595
MP
105742014-01-30 Marek Polacek <polacek@redhat.com>
10575
10576 PR c/59940
10577 * c-common.h (unsafe_conversion_p): Adjust declaration.
10578 (warnings_for_convert_and_check): Likewise.
10579 (convert_and_check): Likewise.
10580 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10581 expansion_point_location_if_in_system_header on it.
10582 (warnings_for_convert_and_check): Add location parameter. Call
10583 expansion_point_location_if_in_system_header on it. Use it.
10584 (convert_and_check): Add location parameter. Use it.
10585 (conversion_warning): Likewise.
10586 (c_add_case_label): Adjust convert_and_check calls.
10587 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10588
b72271b9
BI
105892014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10590
10591 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10592 flag_cilkplus.
10593 * c-pragma.c (init_pragma): Likewise.
10594 * c.opt: Likewise.
10595
393e8e8b
MP
105962014-01-23 Marek Polacek <polacek@redhat.com>
10597
10598 PR c/59846
10599 * c-common.c (shorten_compare): Add location_t parameter.
10600 * c-common.h (shorten_binary_op): Adjust declaration.
10601
f04dda30
MP
106022014-01-23 Marek Polacek <polacek@redhat.com>
10603
10604 PR c/58346
10605 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10606 * c-common.h: Declare it.
10607
621955cb
EB
106082014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10609
10610 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10611 * c-ada-spec.c (dump_ads): Likewise.
10612 (cpp_check): Likewise.
10613 (dump_ada_specs): Likewise.
10614
106152014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10616
10617 PR c++/49718
10618 * c-common.c (handle_no_instrument_function_attribute): Allow
10619 no_instrument_function attribute in class member
10620 definition/declaration.
10621
241f845a
JJ
106222014-01-15 Jakub Jelinek <jakub@redhat.com>
10623
10624 PR c/58943
10625 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10626 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10627 being COMPOUND_EXPR.
10628 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10629 operand a SAVE_EXPR and second MODIFY_EXPR.
10630
e83b8e2e
JJ
106312014-01-09 Jakub Jelinek <jakub@redhat.com>
10632
10633 PR target/58115
10634 * c-pch.c (c_common_write_pch): Call
10635 prepare_target_option_nodes_for_pch.
10636
23a5b65a
RS
106372014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10638
10639 Update copyright years
10640
f9030485
RS
106412014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10642
10643 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10644 the copyright notice.
10645
f2aa696b
EB
106462013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10647
10648 * c-ada-spec.c (print_constructor): New function.
10649 (print_destructor): Retrieve the origin of the destructor.
10650 (print_ada_declaration): Revamp handling of constructors/destructors.
10651
3f8257db 106522013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10653 Bill Maddox <maddox@google.com>
10654 Jason Merrill <jason@redhat.com>
10655
10656 * c.opt: Add -fdeclone-ctor-dtor.
10657 * c-opts.c (c_common_post_options): Default to on iff -Os.
10658
41958c28
BI
106592013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10660
10661 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10662 attribute.
10663 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10664 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10665 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10666 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10667 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10668 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10669 PRAGMA_CILK_CLAUSE_UNIFORM.
10670
b1726d6c 10671
12893402
BI
106722013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10673
10674 * cilk.c (cilk_outline): Made this function non-static.
10675 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10676 (create_cilk_wrapper): Added a new parameter: a function pointer.
10677 (c_install_body_w_frame_cleanup): Remove
10678 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10679 * c-common.h (cilk_outline): New prototype.
10680 (gimplify_cilk_spawn): Removed two parameters.
10681 (cilk_install_body_with_frame_cleanup): New prototype.
10682 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10683 CILK_SPAWN_STMT case.
10684
085b42ed
BS
106852013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10686
2ce064c3
BS
10687 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10688
085b42ed
BS
10689 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10690 (int_array_type_node): Remove.
10691 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10692
9e36c9ed
MP
106932013-12-05 Marek Polacek <polacek@redhat.com>
10694
10695 PR c/52023
10696 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10697 [ADJUST_FIELD_ALIGN].
10698
296674db
JM
106992013-12-04 Joseph Myers <joseph@codesourcery.com>
10700
10701 PR c/52023
10702 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10703 and check field alignment if set.
10704 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10705 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10706
b1726d6c 107072013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10708 Marek Polacek <polacek@redhat.com>
10709
10710 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10711 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10712
d7947e19
L
107132013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10714
10715 PR c/59309
10716 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10717 arguments.
10718
fad7652e
JJ
107192013-11-29 Jakub Jelinek <jakub@redhat.com>
10720
10721 PR c/59280
10722 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10723 goto invalid. If it is error_mark_node, don't issue further
10724 diagnostics.
10725
8b5e1202
SO
107262013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10727
10728 * c.opt (Wopenmp-simd): New.
10729
0a508bb6
JJ
107302013-11-22 Jakub Jelinek <jakub@redhat.com>
10731
10732 * c-ubsan.h (ubsan_instrument_return): New prototype.
10733 * c-ubsan.c (ubsan_instrument_return): New function.
10734
2fb9a547
AM
107352013-11-22 Andrew MacLeod <amacleod@redhat.com>
10736
10737 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10738 * c-gimplify.c: Likewise.
10739 * cilk.c: Likewise.
2fb9a547 10740
8400e75e
DM
107412013-11-22 David Malcolm <dmalcolm@redhat.com>
10742
10743 * c-common.c (unsafe_conversion_p): Remove use of
10744 EXPR_LOC_OR_HERE macro.
10745 (conversion_warning): Likewise.
10746 (warnings_for_convert_and_check): Likewise.
10747 (warn_for_collisions_1): Likewise.
10748 (shorten_compare): Likewise, and remove use of in_system_header
10749 macro, using the location from the former.
10750 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10751 (cb_def_pragma): Remove use of in_system_header macro.
10752 (lex_string): Likewise.
10753 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10754
eb1ce453
KZ
107552013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10756 Mike Stump <mikestump@comcast.net>
10757 Richard Sandiford <rdsandiford@googlemail.com>
10758
10759 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10760 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10761 tree_fits_shwi_p or tree_fits_uhwi_p.
10762 (dump_generic_ada_node): Likewise.
10763 * c-format.c (check_format_arg): Likewise.
10764 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10765
6b3b8c27
KZ
107662013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10767
10768 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10769
49b0aa18
JC
107702013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10771
10772 PR c/53001
10773 * c-common.c (unsafe_conversion_p): Make this function
10774 return an enumeration with more detail.
10775 (conversion_warning): Use the new return type of
10776 unsafe_conversion_p to separately warn either about conversions
10777 that lower floating point number precision or about the other
10778 kinds of conversions.
10779 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10780 (unsafe_conversion_p): switching return type to
10781 conversion_safety enumeration.
49b0aa18
JC
10782 * c.opt: Adding new warning -Wfloat-conversion and
10783 enabling it with -Wconversion.
10784
b826515a
BS
107852013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10786
8e745a17
JJ
10787 * c-opts.c: Include plugin.h.
10788 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10789
b9a55b13
MP
107902013-11-19 Marek Polacek <polacek@redhat.com>
10791
10792 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10793 call.
10794 (ubsan_instrument_shift): Likewise.
10795 (ubsan_instrument_vla): Likewise.
10796
7d362f6c
RS
107972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10798
10799 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10800 cast to unsigned type.
10801
386b1f1f
RS
108022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10803
10804 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10805 tree_low_cst.
10806 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10807 rather than tree_low_cst.
10808
ae7e9ddd
RS
108092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10810
10811 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10812 tree_to_uhwi throughout.
10813
9439e9a1
RS
108142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10815
10816 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10817 tree_low_cst (..., 0) with tree_to_shwi throughout.
10818
cc269bb6
RS
108192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10820
10821 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10822 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10823
9541ffee
RS
108242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10825
10826 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10827 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10828
c02065fc
AH
108292013-11-15 Aldy Hernandez <aldyh@redhat.com>
10830
10831 * c-cilkplus.c: New file.
10832 * c-common.c (readonly_error): Add location argument.
10833 * c-common.h (readonly_error): Same.
10834 (c_finish_cilk_clauses): Protoize.
10835 (c_check_cilk_loop): Same.
10836 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10837 Do not fail on error_mark_node.
10838 Abstract increment canonicalization to here...
10839 (c_omp_for_incr_canonicalize_ptr): New.
10840 c-pragma.c (init_pragma): Register "simd" pragma.
10841 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10842 (enum pragma_cilk_clause): New.
10843
9cc65f15
RS
108442013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10845
10846 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10847 wchar_type and host_integerp checks.
10848
18f429e2
AM
108492013-11-14 Andrew MacLeod <amacleod@redhat.com>
10850
10851 * c-common.c: Likewise.
10852 * c-gimplify.c: Likewise.
10853 * cilk.c: Likewise.
10854
d8a2d370
DN
108552013-11-14 Diego Novillo <dnovillo@google.com>
10856
10857 * c-common.c: Include fold-const.h.
10858 Include stor-layout.h.
10859 Include calls.h.
10860 Include stringpool.h.
10861 Include attribs.h.
10862 Include varasm.h.
10863 Include trans-mem.h.
10864 * c-cppbuiltin.c: Include stor-layout.h.
10865 Include stringpool.h.
10866 * c-format.c: Include stringpool.h.
10867 * c-lex.c: Include stringpool.h.
10868 Include stor-layout.h.
10869 * c-pragma.c: Include stringpool.h.
10870 Include attribs.h.
10871 Include varasm.h.
10872 Include gcc-symtab.h.
10873 * c-pretty-print.c: Include stor-layout.h.
10874 Include attribs.h.
10875 * cilk.c: Include stringpool.h.
10876 Include calls.h.
10877
38b7bc7f
JM
108782013-11-13 Joseph Myers <joseph@codesourcery.com>
10879
10880 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10881 * c-common.c (c_common_reswords): Add __auto_type.
10882 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10883
45b0be94
AM
108842013-11-12 Andrew MacLeod <amacleod@redhat.com>
10885
18f429e2
AM
10886 * c-common.c: Include gimplify.h.
10887 * c-gimplify.c: Likewise.
10888 * cilk.c: Likewise.
10889 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10890 * c-ubsan.c: Don't include gimple.h.
45b0be94 10891
582d9b50
JM
108922013-11-12 Joseph Myers <joseph@codesourcery.com>
10893
10894 * c-common.c (c_common_reswords): Add _Thread_local.
10895
6b28e197
JM
108962013-11-09 Joseph Myers <joseph@codesourcery.com>
10897
10898 * c-common.c (atomic_size_supported_p): New function.
10899 (resolve_overloaded_atomic_exchange)
10900 (resolve_overloaded_atomic_compare_exchange)
10901 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10902 Use it instead of comparing size with a local list of sizes.
10903
267bac10
JM
109042013-11-07 Andrew MacLeod <amacleod@redhat.com>
10905 Joseph Myers <joseph@codesourcery.com>
10906
10907 * c-common.h (enum rid): Add RID_ATOMIC.
10908 * c-common.c (c_common_reswords): Add _Atomic.
10909 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10910 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10911 * c-format.c (check_format_types): Check for extra _Atomic
10912 qualifiers in format argument.
10913 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10914 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10915
5157b91e
TB
109162013-11-06 Tobias Burnus <burnus@net-b.de>
10917
10918 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10919
6dbe0958
JM
109202013-11-06 Joseph Myers <joseph@codesourcery.com>
10921
10922 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10923 standards modes.
10924 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10925 to mean lack of IEEE 754 support.
10926
e8ff5196
TB
109272013-11-05 Tobias Burnus <burnus@net-b.de>
10928
10929 * c.opt (-Wdate-time): New option
10930 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10931
254a0760
JM
109322013-11-05 Joseph Myers <joseph@codesourcery.com>
10933
10934 * c-cppbuiltin.c (cpp_iec_559_value): Test
10935 flag_excess_precision_cmdline not flag_excess_precision.
10936
6d7f7e0a
TB
109372013-11-05 Tobias Burnus <burnus@net-b.de>
10938
10939 * c.opt (fopenmp-simd): New option.
10940 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10941 (omp_pragmas): ... this new struct.
10942 (c_pp_lookup_pragma): Also walk omp_pragmas.
10943 (init_pragma): Init pragmas for -fopenmp-simd.
10944
55a7f02f
MP
109452013-11-04 Marek Polacek <polacek@redhat.com>
10946
10947 PR c++/58979
10948 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10949
9193fb05
JM
109502013-11-04 Joseph Myers <joseph@codesourcery.com>
10951
10952 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10953 New functions.
10954 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10955
94159ecf
EB
109562013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10957
10958 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10959 (dump_ada_specs): Adjust prototype of second callback.
10960 * c-ada-spec.c (cpp_check): New global variable.
10961 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10962 (print_generic_ada_decl): Likewise.
10963 (has_static_fields): Change return type to bool and add guard.
10964 (has_nontrivial_methods): New predicate.
10965 (is_tagged_type): Change return type to bool.
10966 (separate_class_package): Call has_nontrivial_methods.
10967 (pp_ada_tree_identifier): Minor tweaks.
10968 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10969 (dump_ada_array_domains): Likewise.
10970 (dump_ada_array_type): Likewise.
10971 (dump_template_types): Remove cpp_check parameter and do not pass it to
10972 dump_generic_ada_node.
10973 (dump_ada_template): Likewise.
10974 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10975 recursively.
10976 (print_ada_methods): Change return type to integer. Remove cpp_check
10977 parameter and do not pass it down.
10978 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10979 dump_generic_ada_node.
10980 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10981 accessing methods.
10982 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10983 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10984 value of print_ada_methods.
10985 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10986 Set cpp_check to it before invoking dump_ada_nodes.
10987 (dump_ada_specs): Likewise.
10988
b906f4ca
MP
109892013-11-03 Marek Polacek <polacek@redhat.com>
10990
10991 * c-ubsan.c: Don't include hash-table.h.
10992 (ubsan_instrument_vla): New function.
10993 * c-ubsan.h: Declare it.
10994
5e20cdc9
DM
109952013-10-31 David Malcolm <dmalcolm@redhat.com>
10996
10997 Automated part of renaming of symtab_node_base to symtab_node.
10998
10999 Patch autogenerated by rename_symtab.py from
11000 https://github.com/davidmalcolm/gcc-refactoring-scripts
11001 revision 58bb219cc090b2f4516a9297d868c245495ee622
11002
11003 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11004 symtab_node_base to symtab_node.
11005
7057e645
ESR
110062013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11007
8e745a17 11008 Implement C++14 digit separators.
7057e645
ESR
11009 * c-lex.c (interpret_float): Remove digit separators from scratch string
11010 before building real literal.
11011
193ea7bc
JJ
110122013-10-30 Jakub Jelinek <jakub@redhat.com>
11013
11014 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11015
939b37da
BI
110162013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11017
11018 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11019 fields.
11020 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11021 enabled.
11022 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11023 (insert_cilk_frame): New prototype.
11024 (cilk_init_builtins): Likewise.
11025 (gimplify_cilk_spawn): Likewise.
11026 (c_cilk_install_body_w_frame_cleanup): Likewise.
11027 (cilk_detect_spawn_and_unwrap): Likewise.
11028 (cilk_set_spawn_marker): Likewise.
11029 (build_cilk_sync): Likewise.
11030 (build_cilk_spawn): Likewise.
11031 * cilk.c: New file.
11032
67348ccc
DM
110332013-10-29 David Malcolm <dmalcolm@redhat.com>
11034
11035 Patch autogenerated by refactor_symtab.py from
11036 https://github.com/davidmalcolm/gcc-refactoring-scripts
11037 revision 58bb219cc090b2f4516a9297d868c245495ee622
11038
11039 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11040 to a true class hierarchy.
11041 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11042
d570872d
RS
110432013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11044
11045 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11046
98906124
JL
110472013-10-26 Jeff Law <law@redhat.com>
11048
adfac8df
JJ
11049 * c-common.c (c_define_builtins): Remove mudflap support.
11050 * c.opt: Ignore and warn for mudflap options.
98906124 11051
d73749df 110522013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
11053
11054 PR other/33426
11055 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11056 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11057
3f04b1bb
JM
110582013-10-23 Jason Merrill <jason@redhat.com>
11059
11060 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11061
acf0174b
JJ
110622013-10-11 Jakub Jelinek <jakub@redhat.com>
11063
acd15a28
JJ
11064 * c-common.h (omp_clause_mask::operator !=): New method.
11065 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11066 instead of if (mask & something) tests everywhere.
11067
acf0174b
JJ
11068 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11069 201307 instead of 201107.
11070 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11071 (c_common_attribute_table): Add "omp declare target" and
11072 "omp declare simd" attributes.
11073 (handle_omp_declare_target_attribute,
11074 handle_omp_declare_simd_attribute): New functions.
11075 * c-omp.c: Include c-pragma.h.
11076 (c_finish_omp_taskgroup): New function.
11077 (c_finish_omp_atomic): Add swapped argument, if true,
11078 build the operation first with rhs, lhs arguments and use NOP_EXPR
11079 build_modify_expr.
11080 (c_finish_omp_for): Add code argument, pass it down to make_code.
11081 (c_omp_split_clauses): New function.
11082 (c_split_parallel_clauses): Removed.
11083 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11084 c_omp_declare_simd_clauses_to_decls): New functions.
11085 * c-common.h (omp_clause_mask): New type.
11086 (OMP_CLAUSE_MASK_1): Define.
11087 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11088 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11089 omp_clause_mask::operator |, omp_clause_mask::operator &,
11090 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11091 omp_clause_mask::operator ==): New methods.
11092 (enum c_omp_clause_split): New.
11093 (c_finish_omp_taskgroup): New prototype.
11094 (c_finish_omp_atomic): Add swapped argument.
11095 (c_finish_omp_for): Add code argument.
11096 (c_omp_split_clauses): New prototype.
11097 (c_split_parallel_clauses): Removed.
11098 (c_omp_declare_simd_clauses_to_numbers,
11099 c_omp_declare_simd_clauses_to_decls): New prototypes.
11100 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11101 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11102 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11103 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11104 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11105 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11106 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11107 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11108 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11109 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11110 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11111 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11112 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11113 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11114 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11115 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11116 PRAGMA_OMP_CLAUSE_UNIFORM.
11117
826cacfe
MG
111182013-10-09 Marc Glisse <marc.glisse@inria.fr>
11119
11120 PR tree-optimization/20318
11121 * c-common.c (handle_returns_nonnull_attribute): New function.
11122 (c_common_attribute_table): Add returns_nonnull.
11123
2284b034
MG
111242013-10-03 Marc Glisse <marc.glisse@inria.fr>
11125
11126 PR c++/19476
11127 * c.opt (fcheck-new): Move to common.opt.
11128
b56e9788
MP
111292013-09-25 Marek Polacek <polacek@redhat.com>
11130 Jakub Jelinek <jakub@redhat.com>
11131
11132 PR sanitizer/58413
11133 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11134 an expression if we can prove it is correct.
11135 (ubsan_instrument_division): Likewise. Remove unnecessary
11136 check.
11137
ce6923c5
MP
111382013-09-18 Marek Polacek <polacek@redhat.com>
11139
11140 PR sanitizer/58411
11141 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11142 Declare it.
11143 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11144
fb5610fb
IS
111452013-09-14 Iain Sandoe <iain@codesourcery.com>
11146
11147 PR target/48094
11148 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11149 fobjc-gc, freplace-objc-classes): Accept for LTO.
11150
88b0e79e
JC
111512013-09-13 Jacek Caban <jacek@codeweavers.com>
11152
11153 * c-target.def: New hook
11154
c9b0866a
PC
111552013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11156
11157 PR c++/43452
11158 * c.opt (Wdelete-incomplete): Add.
11159
0af94e6f
JR
111602013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11161
11162 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11163 (vector_types_compatible_elements_p): New function.
11164 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11165 declaration.
11166 (vector_types_compatible_elements_p): Declare.
11167
7c26172c
GDR
111682013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11169
11170 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11171 a virtual member function.
11172 (pp_simple_type_specifier): Remove.
11173 (pp_c_type_specifier): Likewise.
11174 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11175 Rename from pp_c_type_specifier. Adjust.
11176 (c_pretty_printer::c_pretty_printer): Do not assign to
11177 simple_type_specifier.
11178
20059c8b
GDR
111792013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11180
11181 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11182 member function.
11183 (c_pretty_printer::storage_class_specifier): Likewise.
11184 (c_pretty_printer::initializer): Likewise.
11185 (pp_declaration): Remove.
11186 (pp_declaration_specifiers): Likewise.
11187 (pp_abstract_declarator): Likewise.
11188 (pp_declarator): Likewise.
11189 (pp_type_id): Likewise.
11190 (pp_statement): Likewise.
11191 (pp_constant): Likewise.
11192 (pp_id_expression): Likewise.
11193 (pp_primary_expression): Likewise.
11194 (pp_unary_expression): Likewise.
11195 (pp_multiplicative_expression): Likewise.
11196 (pp_conditional_expression): Likewise.
11197 (pp_assignment_expression): Likewise.
11198 (pp_expression): Likewise.
11199 (pp_c_type_id): Likewise.
11200 (pp_c_storage_class_specifier): Likewise.
11201 * c-pretty-print.c (pp_c_type_cast): Tidy.
11202 (pp_c_pointer): Likewise.
11203 (pp_c_type_specifier): Likewise.
11204 (pp_c_parameter_type_list): Likewise.
11205 (pp_c_function_definition): Likewise.
11206 (pp_c_init_declarator): Likewise.
11207 (pp_c_initializer_list): Likewise.
11208 (pp_c_constructor_elts): Likewise.
11209 (c_pretty_printer::direct_abstract_declarator): Likewise.
11210 (c_pretty_printer::declaration_specifiers): Likewise.
11211 (c_pretty_printer::primary_expression): Likewise.
11212 (c_pretty_printer::postfix_expression): Likewise.
11213 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11214 (c_pretty_printer::storage_class_specifier): Rename from
11215 pp_c_storage_class_specifier.
11216 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11217 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11218 storage_class_specifier, initializer, offset_list, flags.
11219
de5a5fa1
MP
112202013-08-30 Marek Polacek <polacek@redhat.com>
11221
11222 * c-ubsan.c: New file.
11223 * c-ubsan.h: New file.
11224
8f0e4d72
GDR
112252013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11226
11227 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11228 member function.
11229 (c_pretty_printer::declaration_specifiers): Likewise.
11230 (c_pretty_printer::declarator): Likewise.
11231 (c_pretty_printer::abstract_declarator): Likewise.
11232 (c_pretty_printer::direct_abstract_declarator): Likewise.
11233 (c_pretty_printer::direct_declarator): Likewise.
11234 (c_pretty_printer::function_specifier): Likewise.
11235 (pp_declaration): Adjust.
11236 (pp_declaration_specifiers): Likewise.
11237 (pp_abstract_declarator): Likewise.
11238 (pp_direct_declarator): Likewise.
11239 (pp_function_specifier): Likewise.
11240 (pp_direct_abstract_declarator): Remove as unused.
11241 (pp_c_declaration): Remove.
11242 (pp_c_declaration_specifiers): Likewise.
11243 (pp_c_declarator): Likewise.
11244 (pp_c_direct_declarator): Likewise.
11245 (pp_c_function_specifier): Likewise.
11246 (pp_c_direct_abstract_declarator): Likewise.
11247 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11248 from pp_c_abstract_declarator. Adjust.
ab20d992 11249 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11250 pp_c_direct_abstract_declarator. Adjust.
11251 (c_pretty_printer::function_specifier): Rename from
11252 pp_c_function_specifier. Adjust.
11253 (c_pretty_printer::declaration_specifiers): Rename from
11254 pp_c_declaration_specifiers. Adjust.
11255 (c_pretty_printer::direct_declarator): Rename from
11256 pp_c_direct_declarator. Adjust.
11257 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11258 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11259 (c_pretty_printer::c_pretty_printer): Do not assign to
11260 declaration, declaration_specifiers, declarator,
11261 direct_declarator, direct_abstract_declarator, function_specifier.
11262
00d34d3a
GDR
112632013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11264
11265 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11266 virtual member function.
11267 (c_pretty_printer::multiplicative_expression): Likewise.
11268 (c_pretty_printer::conditional_expression): Likewise.
11269 (c_pretty_printer::assignment_expression): Likewise.
11270 (c_pretty_printer::expression): Likewise.
11271 (pp_unary_expression): Adjust.
11272 (pp_multiplicative_expression): Likewise.
11273 (pp_assignment_expression): Likewise.
11274 (pp_conditional_expression): Likewise.
11275 (pp_expression): Likewise.
11276 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11277 from pp_c_unary_expression. Adjust.
11278 (c_pretty_printer::multiplicative_expression): Rename from
11279 pp_c_multiplicative_expression. Adjust.
11280 (c_pretty_printer::conditional_expression): Rename from
11281 pp_c_conditional_expression. Adjust.
11282 (c_pretty_printer::assignment_expression): Rename from
11283 pp_c_assignment_expression. Adjust.
11284 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11285 (c_pretty_printer::c_pretty_printer): Do not assign to
11286 unary_expression, multiplicative_expression,
11287 conditional_expression, expression.
11288
fb22178f
GDR
112892013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11290
11291 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11292 virtual member function.
11293 (pp_postfix_expression): Adjust.
11294 (pp_c_postfix_expression): Remove.
11295 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11296 from pp_c_postfix_expression. Adjust.
11297 (c_pretty_printer::c_pretty_printer): Do not assign to
11298 postfix_expression.
11299
7ecc2600
GDR
113002013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11301
11302 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11303 virtua member function.
11304 (pp_primary_expression): Adjust.
11305 (pp_c_primary_expression): Remove.
11306 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11307 from pp_c_primary_expression. Adjust.
11308 (pp_c_initializer_list): Use pp_primary_expression.
11309 (c_pretty_printer::c_pretty_printer): Do not assign to
11310 primary_expression.
11311
0691175f
GDR
113122013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11313
11314 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11315 * c-pretty-print.c (M_): Remove.
11316 (c_pretty_printer::translate_string): Define.
11317 (pp_c_type_specifier): Use it.
11318 (pp_c_primary_expression): Likewise.
11319 (pp_c_expression): Likewise.
11320
66dfe4c4
GDR
113212013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11322
11323 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11324 virtual function.
11325 (pp_c_id_expression): Remove.
11326 (pp_id_expression): Adjust.
11327 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11328 pp_c_id_expression. Adjust.
11329 (pp_c_postfix_expression): Use pp_id_expression.
11330 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11331
ca43e9d5
GDR
113322013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11333
11334 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11335 member function.
11336 (pp_constant): Adjust.
11337 (pp_c_constant): Remove.
11338 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11339 pp_c_constant. Adjust.
11340 (pp_c_constant)
11341 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11342 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11343
da6ca2b5
GDR
113442013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11345
11346 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11347 (c_pretty_printer::c_pretty_printer): Declare.
11348 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11349 c_pretty_printer_init. Adjust.
11350 (print_c_tree): Do not call c_pretty_printer_init.
11351 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11352
65a372f4
AC
113532013-08-09 Arnaud Charlet <charlet@adacore.com>
11354
11355 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11356
fd9b0f32
PC
113572013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11358
11359 PR c++/58080
11360 * c-common.c (pointer_int_sum): Add bool parameter.
11361 * c-common.h (pointer_int_sum): Adjust declaration.
11362
e0aec1e9
GDR
113632013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11364
11365 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11366 c_pretty_printer variable.
11367
b066401f
GDR
113682013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11369
11370 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11371 (pp_base): Remove.
11372 (pp_c_base): Likewise. Adjust users.
11373 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11374 (pp_c_whitespace): Do not call pp_base.
11375 (pp_c_left_paren): Likewise.
11376 (pp_c_right_paren): Likewise.
11377 (pp_c_left_brace): Likewise.
11378 (pp_c_right_brace): Likewise.
11379 (pp_c_left_bracket): Likewise.
11380 (pp_c_right_bracket): Likewise.
11381 (pp_c_dot): Likewise.
11382 (pp_c_ampersand): Likewise.
11383 (pp_c_star): Likewise.
11384 (pp_c_arrow): Likewise.
11385 (pp_c_semicolon): Likewise.
11386 (pp_c_complement): Likewise.
11387 (pp_c_exclamation): Likewise.
11388 (pp_c_direct_declarator): Likewise.
11389 (pp_c_ws_string): Likewise.
11390 (pp_c_identifier): Likewise.
11391 (pp_c_statement): Likewise.
11392 (print_c_tree): Likewise.
11393
65e5a578
ESR
113942013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11395
11396 PR c++/58072
11397 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11398 provide useful error strings.
11399
137a1a27
GDR
114002013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11401
11402 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11403 printer functions instead of pp_string or operators and punctuators.
11404 (dump_generic_ada_node): Likewise.
11405 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11406 (pp_c_relational_expression): Likewise.
11407 (pp_c_logical_or_expression): Likewise.
11408
07838b13
GDR
114092013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11410
11411 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11412 functions instead of pp_character.
11413 (pp_ada_tree_identifier): Likewise.
11414 (dump_ada_double_name): Likewise.
11415 (dump_ada_function_declaration): Likewise.
11416 (dump_ada_array_domains): Likewise.
11417 (dump_template_types): Likewise.
11418 (dump_generic_ada_node): Likewise.
11419 (print_ada_declaration): Likewise.
11420 (print_ada_struct_decl): Likewise.
11421 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11422
433cc7b0
TT
114232013-07-23 Tom Tromey <tromey@redhat.com>
11424
11425 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11426 * c-common.c (c_common_reswords): Add _Generic.
11427
688010ba
OB
114282013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11429
11430 * c-common.c: Fix typos.
11431 * c-common.h: Likewise.
11432
2a99e5e6
LL
114332013-07-13 Lubos Lunak <l.lunak@suse.cz>
11434
11435 PR c++/55203
11436 * c-common.c (c_common_attribute_table): Add warn_unused.
11437 (handle_warn_unused_attribute): New.
11438
c26302d5
JJ
114392013-07-10 Jakub Jelinek <jakub@redhat.com>
11440
11441 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11442 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11443
dfeadaa0
PC
114442013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11445
11446 PR c++/57869
11447 * c.opt: Add Wconditionally-supported.
11448
6a2fa4b2
GS
114492013-07-08 Graham Stott <graham.stott@btinternet.com>
11450
adfac8df 11451 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11452 unused variables l_length and l_node.
11453
ecdbd01a 114542013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11455
11456 PR c/57821
11457 * c-common.c (complete_array_type): Delay folding first index
11458 like other indices. When folding, check for index overflow.
11459
bedc293e
MG
114602013-06-27 Marc Glisse <marc.glisse@inria.fr>
11461
11462 PR c++/57509
11463 * c-common.h (c_build_vec_perm_expr): New complain argument.
11464 * c-common.c (c_build_vec_perm_expr): Likewise.
11465 Use save_expr also in C++.
11466
604b2bfc
GDR
114672013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11468
11469 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11470 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11471 * c-opts.c (c_common_post_options): Likewise.
11472
dfeadaa0 114732013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11474
11475 * array-notation-common.c (length_mismatch_in_expr): Changed the
11476 parameter type's from a dynamic array to a vec_tree. Also removed
11477 the size parameters.
11478 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11479 the change above.
11480
2ce86d2e
BI
114812013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11482
11483 * c-common.h (struct cilkplus_an_parts): New structure.
11484 (struct cilkplus_an_loop_parts): Likewise.
11485 (cilkplus_extract_an_triplets): New prototype.
11486 (fix_sec_implicit_args): Likewise.
11487 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11488 (fix_sec_implicit_args): Likewise.
604b2bfc 11489
07a6825b
BI
114902013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11491
11492 * array-notation-common.c (find_inv_trees): Removed an unwanted
11493 typecasting.
11494 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11495 enum rid to enum tree_code.
11496
08346abd
JH
114972013-06-11 Jan Hubicka <jh@suse.cz>
11498
11499 * c-common.c (handle_alias_ifunc_attribute): Do not set
11500 DECL_EXTERNAL for weakref variables.
11501 * c-pragma.c (handle_pragma_weak): Make sure aliases
11502 are not declared as external.
11503
d60f1706
BI
115042013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11505
11506 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11507 function from c/c-array-notation.c.
11508 (is_cilkplus_reduce_builtin): Likewise.
11509 (find_rank): Likewise.
11510 (extract_array_notation_exprs): Likewise.
11511 (replace_array_notations): Likewise.
11512 (find_inv_trees): Likewise.
11513 (replace_inv_trees): Likewise.
11514 (contains_array_notation_expr): Likewise.
11515 (find_correct_array_notation_type): Likewise.
11516 * c-common.h (struct inv_list): Moved this struct from the file
11517 c/c-array-notation.c and added a new field called additional tcodes.
11518 (length_mismatch_in_expr_p): New prototype.
11519 (is_cilkplus_reduce_builtin): Likewise.
11520 (find_rank): Likewise.
11521 (extract_array_notation_exprs): Likewise.
11522 (replace_array_notation): Likewise.
11523 (find_inv_trees): Likewise.
11524 (replace_inv_trees): Likewise.
11525 (find_correct_array_notation_type): Likewise.
dfeadaa0 11526
36536d79
BI
115272013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11528
11529 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11530 function array_notation_init_builtins is called.
11531 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11532 * c-common.def (ARRAY_NOTATION_REF): New tree.
11533 * c-common.h (build_array_notation_expr): New function declaration.
11534 (build_array_notation_ref): Likewise.
11535 (extract_sec_implicit_index_arg): New extern declaration.
11536 (is_sec_implicit_index_fn): Likewise.
11537 (ARRAY_NOTATION_CHECK): New define.
11538 (ARRAY_NOTATION_ARRAY): Likewise.
11539 (ARRAY_NOTATION_START): Likewise.
11540 (ARRAY_NOTATION_LENGTH): Likewise.
11541 (ARRAY_NOTATION_STRIDE): Likewise.
11542 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11543 ARRAY_NOTATION_REF.
11544 (pp_c_expression): Likewise.
11545 * c.opt (flag_enable_cilkplus): New flag.
11546 * array-notation-common.c: New file.
11547
f7716d57
JJ
115482013-05-14 Jakub Jelinek <jakub@redhat.com>
11549
11550 PR c++/57274
11551 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11552
a5e0cd1d
MG
115532013-05-10 Marc Glisse <marc.glisse@inria.fr>
11554
11555 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11556 vectors.
11557
f6bc1c4a
HS
115582013-05-07 Han Shen <shenhan@google.com>
11559
11560 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11561
3f12f6e9
SKS
115622013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11563
11564 * c-common.c (check_user_alignment): Emit error for negative values.
11565
61949153
PC
115662013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11567
11568 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11569
e93e18e9
PC
115702013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11571
11572 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11573 __GXX_EXPERIMENTAL_CXX1Y__.
11574
44d90fe1 115752013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11576 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11577
11578 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11579 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11580 to simply use OPT_Wpointer_arith.
11581 (c_sizeof_or_alignof_type): Likewise.
11582
13f39b2e
PC
115832013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11584
11585 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11586
4b84d650
JJ
115872013-04-12 Jakub Jelinek <jakub@redhat.com>
11588
11589 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11590 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11591 specifiers.
11592
fb037b5d
SB
115932013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11594
11595 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11596
4e856798
PC
115972013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11598
11599 * c-common.c (pointer_int_sum): Remove dead code.
11600
4b1baac8
RS
116012013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11602
11603 PR middle-end/56524
11604 * c-common.c (handle_optimize_attribute): Don't call
11605 save_optabs_if_changed.
11606
0b50e654
JJ
116072013-03-05 Jakub Jelinek <jakub@redhat.com>
11608
11609 PR middle-end/56461
11610 * c-pch.c (pch_init): Free target_validity at the end.
11611
48c41403
JJ
116122013-03-04 Jakub Jelinek <jakub@redhat.com>
11613
11614 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11615
e664c61c
KS
116162013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11617 Jakub Jelinek <jakub@redhat.com>
11618
11619 PR sanitizer/56454
11620 * c-common.c (handle_no_sanitize_address_attribute): New function.
11621 (c_common_attribute_table): Add no_sanitize_address attribute.
11622 (handle_no_address_safety_analysis_attribute): Add
11623 no_sanitize_address attribute, not no_address_safety_analysis
11624 attribute.
11625
a475fd3d 116262013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11627
11628 PR target/52555
11629 * c-common.c (handle_optimize_attribute): Call
11630 save_optabs_if_changed.
11631
f6007d99
JJ
116322013-02-18 Jakub Jelinek <jakub@redhat.com>
11633 Steven Bosscher <steven@gcc.gnu.org>
11634
11635 PR pch/54117
11636 * c-opts.c (c_common_post_options): If debug info is enabled
11637 and non-dwarf*, refuse to load PCH files and when writing PCH
11638 file warn.
11639
cf35e2b1
JJ
116402013-02-05 Jakub Jelinek <jakub@redhat.com>
11641
11642 PR middle-end/56167
11643 * c-common.c (handle_error_attribute): Fix condition.
11644
32887460
JJ
116452013-01-30 Jakub Jelinek <jakub@redhat.com>
11646
11647 PR c++/55742
11648 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11649
5af057d8
JM
116502013-01-18 Jason Merrill <jason@redhat.com>
11651
11652 PR target/54908
11653 * c.opt (-fextern-tls-init): New.
11654 * c-opts.c (c_common_post_options): Handle it.
11655
cc83c823
JJ
116562013-01-09 Jakub Jelinek <jakub@redhat.com>
11657
11658 PR c/48418
11659 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11660 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11661 and is either negative or bigger or equal to type precision
11662 of the first operand.
11663
a859517f
MP
116642012-12-03 Marek Polacek <polacek@redhat.com>
11665
11666 PR c/55570
11667 * c-common.c (check_user_alignment): Swap order of tests,
11668 check TREE_CODE first.
11669
2d7aa578
ESR
116702012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11671
11672 PR c++/52654
11673 * c-common.h (overflow_type): New enum.
11674 (build_userdef_literal): Add overflow_type argument.
11675 (tree_userdef_literal): Add overflow_type.
11676 (USERDEF_LITERAL_OVERFLOW): New access macro.
11677 * c-common.c (build_userdef_literal): Add overflow_type
11678 argument.
11679 * c-lex.c (c_lex_with_flags): Add overflow_type to
11680 build_userdef_literal calls.
11681 (interpret_integer, interpret_float): Add overflow_type argument.
11682
cc3c4f62
RB
116832012-11-28 Richard Biener <rguenther@suse.de>
11684
11685 PR c/35634
11686 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11687 here and use a type with proper overflow behavior for types that would
11688 need to be promoted for the arithmetic.
11689
77bc5132
JJ
116902012-11-23 Jakub Jelinek <jakub@redhat.com>
11691
11692 PR sanitizer/55435
11693 * c-common.c (handle_no_address_safety_analysis_attribute): New
11694 function.
11695 (c_common_attribute_table): Add no_address_safety_analysis.
11696
5dc99c46
SB
116972012-11-16 Simon Baldwin <simonb@google.com>
11698
11699 * c.opt: Add f[no-]canonical-system-headers.
11700 * c-opts.c (c_common_handle_option): Handle
11701 OPT_fcanonical_system_headers.
11702
a4a0016d
ESR
117032012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11704
11705 PR c++/54413
11706 * c-opts.c (c_common_handle_option): Set new flags.
11707 * c.opt: Describe new flags.
11708
7dbb85a7
JM
117092012-11-09 Jason Merrill <jason@redhat.com>
11710
11711 * c.opt (Wabi-tag): New.
11712
ad7bac31
AK
117132012-11-09 Andi Kleen <ak@linux.intel.com>
11714
11715 PR 55139
11716 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11717 MEMMODEL_MASK
ad7bac31 11718
7332899a
MLI
117192012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11720
11721 PR c/53063
11722 * c.opt (Wformat): Make it Alias Wformat=1.
11723 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11724 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11725 LangEnabledBy.
11726 (Wformat=): RejectNegative. Use LangEnabledBy.
11727 (Wnonnull): Use LangEnabledBy.
11728 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11729 * c-format.c (set_Wformat): Delete.
11730 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11731 (maybe_read_dollar_number): Likewise.
11732 (avoid_dollar_number): Likewise.
11733 (finish_dollar_format_checking): Likewise.
11734 (check_format_info): Likewise.
11735 (check_format_info_main): Likewise.
11736 (check_format_types): Likewise.
11737 (format_type_warning): Likewise.
11738 * c-common.c (int): Likewise.
11739 (check_function_sentinel): Likewise.
8e745a17 11740 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11741
34a180a6
MLI
117422012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11743
11744 PR c/53063
11745 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11746 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11747 Use LangEnabledBy.
11748 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11749 common.opt.
11750 (Wvariadic-macros): Init(1).
11751 * c-opts.c (c_common_handle_option): Do not handle them
11752 explicitly.
11753 (c_common_post_options): Likewise.
11754 (sanitize_cpp_opts): warn_unused_macros is now
11755 cpp_warn_unused_macros.
11756 (push_command_line_include): Likewise.
11757 * c-common.c (warn_unknown_pragmas): Do not define.
11758 * c-common.h (warn_unknown_pragmas): Do not declare.
11759
3f46d6a5
MLI
117602012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11761
11762 PR c/51294
11763 * c-common.c (conversion_warning): Handle conditional expressions.
11764
880661a4
JW
117652012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11766
11767 PR c++/54930
11768 * c.opt (Wreturn_local_addr): Define new option.
11769
4514a96b
JM
117702012-10-25 Jason Merrill <jason@redhat.com>
11771
f14edc1a
JM
11772 * c.opt (Wvirtual-move-assign): New.
11773
4514a96b
JM
11774 * c.opt (Winherited-variadic-ctor): New.
11775
93100c6b
MG
117762012-10-25 Marc Glisse <marc.glisse@inria.fr>
11777
11778 PR c++/54427
11779 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11780
1efcb8c6
JM
117812012-10-23 Joseph Myers <joseph@codesourcery.com>
11782
11783 * c-common.h (pch_cpp_save_state): Declare.
11784 * c-target.def (c_preinclude): New hook.
11785 * c-opts.c (done_preinclude): New.
11786 (push_command_line_include): Handle default preincluded header.
11787 (cb_file_change): Call pch_cpp_save_state when calling
11788 push_command_line_include.
11789 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11790 (pch_cpp_save_state): New.
11791 (pch_init): Call pch_cpp_save_state conditionally, instead of
11792 calling cpp_save_state.
11793
4a0ae68e
MLI
117942012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11795
11796 PR c/53063
11797 PR c/40989
11798 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11799 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11800 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11801 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11802 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11803 * c-opts.c (c_common_handle_option): Remove explicit handling from
11804 here.
11805 (c_common_post_options): Likewise.
11806
67e4210b
EB
118072012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11808
11809 * c-ada-spec.c (LOCATION_COL): Delete.
11810 (compare_location): New function.
11811 (compare_node): Use it.
11812 (compare_comment): Likewise.
11813
65d4f2cd
MLI
118142012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11815
11816 PR c/53063
11817 PR c/40989
11818 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11819 * c-opts.c (c_common_handle_option): Do not set them here. Add
11820 comment.
11821 (c_common_post_options): Likewise.
11822
909881cb
EB
118232012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11824
11825 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11826 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11827 Remove POINTER_TYPE handling, add large unsigned handling and use
11828 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11829
3a785c97
JJ
118302012-10-12 Jakub Jelinek <jakub@redhat.com>
11831
11832 PR c/54381
11833 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11834 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11835 locs and array of 3 trees instead of just single loc and single
11836 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11837 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11838 For *cmp* builtins that take two sources strings report warnings
11839 about first and second source, not about destination and source.
11840
5e54f81d
MG
118412012-10-12 Marc Glisse <marc.glisse@inria.fr>
11842
11843 PR c++/53055
11844 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11845
f5b02f1e
EB
118462012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11847
11848 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11849 declaring something coming from another file.
11850
b46dbc6c
AC
118512012-10-10 Arnaud Charlet <charlet@adacore.com>
11852
f5b02f1e 11853 PR ada/54845
b46dbc6c
AC
11854 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11855
5d9de0d0
PC
118562012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11857
11858 PR c++/54194
11859 * c-common.c (warn_about_parentheses): Add location_t parameter;
11860 use EXPR_LOC_OR_LOC.
11861 * c-common.h: Update declaration.
11862
a212e43f
MG
118632012-10-09 Marc Glisse <marc.glisse@inria.fr>
11864
11865 PR c++/54427
11866 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11867 more operations. Make error messages optional.
11868 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11869 (scalar_to_vector): Declare.
11870
b1db7f91
JM
118712012-10-08 Jason Merrill <jason@redhat.com>
11872
11873 * c-common.c (c_common_reswords): Add thread_local.
11874
e28d52cf
DS
118752012-10-08 Dodji Seketeli <dodji@redhat.com>
11876
11877 PR c++/53528 C++11 attribute support
11878 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11879 new functions.
11880 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11881 static function.
11882 (handle_aligned_attribute): In choose strictest alignment
11883 among many. Use new check_cxx_fundamental_alignment_constraints.
11884 (handle_transparent_union_attribute): In c++11 attribute syntax,
11885 don't look through typedefs.
11886
3b78de56
AC
118872012-10-04 Arnaud Charlet <charlet@adacore.com>
11888
11889 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11890 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11891 out of dumpfile.h.
11892
6040bb5f
DC
118932012-09-25 Dehao Chen <dehao@google.com>
11894
11895 PR middle-end/54645
3b78de56 11896 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11897 map when read in the pch.
11898
3f8257db 118992012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11900
11901 * c-ada-spec.c: Style fixes.
11902
3f8257db 119032012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11904
11905 * c.opt (-fada-spec-parent): Define new command line switch.
11906 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11907 is specified, generate binding spec as a child of the specified unit.
11908
0ccb505d
PC
119092012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11910 Manuel López-Ibáñez <manu@gcc.gnu.org>
11911
11912 PR c++/53210
11913 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11914
c583af79
AC
119152012-08-23 Arnaud Charlet <charlet@adacore.com>
11916
11917 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11918 for pointers, and add missing Convention C pragma.
11919 (print_ada_struct_decl): Add missing aliased keyword.
11920 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11921
1a4049e7
JJ
119222012-08-17 Jakub Jelinek <jakub@redhat.com>
11923
11924 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11925 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11926 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11927 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11928 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11929
70b5e7dc
RG
119302012-08-10 Richard Guenther <rguenther@suse.de>
11931
11932 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11933
f8923f7e
SB
119342012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11935
11936 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11937 instead of separate pp_newline and pp_flush.
11938 (print_c_tree): Likewise.
11939
e45abe1f
RH
119402012-07-26 Richard Henderson <rth@redhat.com>
11941
11942 * c-common.c (handle_hot_attribute): Allow labels.
11943 (handle_cold_attribute): Likewise.
11944
332f1d24
JJ
119452012-07-20 Jakub Jelinek <jakub@redhat.com>
11946
11947 PR c++/28656
11948 * c-common.c (check_function_nonnull): Handle multiple nonnull
11949 attributes properly.
11950
7ee2468b
SB
119512012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11952
11953 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11954 * c-ada-spec.c: Likewise.
11955 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11956
ee7b28eb
SB
119572012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11958
11959 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11960 Remove code conditional on it.
11961
6bdf3519
SB
119622012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11963
11964 * c-gimplify.c: Do not include basic-block.h.
11965 * c-common.c: Do not include linfuncs.h.
11966
532aafad
SB
119672012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11968
11969 * c-common.h: Include tree.h.
11970
8d0d1915
JM
119712012-07-02 Jason Merrill <jason@redhat.com>
11972
11973 PR c++/53524
11974 * c-common.c (get_priority): Call default_conversion.
11975
fbc873ad
UB
119762012-07-01 Uros Bizjak <ubizjak@gmail.com>
11977
11978 * c-pch.c (c_common_write_pch): Remove unused variables.
11979
d4a10d0a
SB
119802012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11981
11982 * cppspec.c: Moved from gcc/ to here.
11983
6f3a2e23
KT
119842012-06-27 Kai Tietz <ktietz@redhat.com>
11985
11986 PR preprocessor/37215
11987 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11988
8ca92d04
SB
119892012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11990
11991 * c-common.h (c_common_print_pch_checksum): Remove.
11992 * c-pch.c: Do not include output.h.
11993 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11994 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11995 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11996 (struct c_pch_header): Remove.
11997 (get_ident): Update gpch version.
11998 (pch_init): Do not print executable_checksum to asm_out_file.
11999 Do not fail if there is no asm_out_file to read back from. Set
12000 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12001 (c_common_write_pch): Verify that nothing was written to asm_out_file
12002 since pch_init was called. Do not write a c_pch_header, and do not
12003 copy from asm_out_file to the PCH.
12004 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12005 the content of asm_out_file from the PCH.
12006 (c_common_print_pch_checksum): Remove.
12007 * c-opts.c (c_common_init): Print out executable_checksum directly.
12008
70f42967
SB
120092012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12010
12011 * c-target.def (objc_declare_unresolved_class_reference,
12012 objc_declare_class_definition): Add new hooks.
12013
a8781821
SB
120142012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12015
12016 * c-lex.c: Do not include output.h.
12017 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12018 Remove uses of ASM_OUTPUT_IDENT.
12019
9e1a8dd1
RR
120202012-06-15 Marc Glisse <marc.glisse@inria.fr>
12021
12022 PR c++/51033
12023 * c-common.h (c_build_vec_perm_expr): Move decl here.
12024 * c-common.c (c_build_vec_perm_expr): Move definition
12025 here.
12026
6f07a821
SB
120272012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12028
12029 * c.opt (fconserve-space): Turn into a no-op.
12030
9faeb493 120312012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
12032
12033 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12034 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12035 both the start and end of the function.
12036
a4b7d13c
SB
120372012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12038
12039 * c-common.c: Do not include output.h.
12040 * c-pragma.c: Likewise.
12041
c265f413
SA
120422012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12043
12044 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12045 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12046 (lang_decl_name): Handle namespace decls.
12047
be7a421e
SB
120482012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12049
12050 * c-ada-spec.c: Do not include output.h.
12051 * c-semantics.c: Likewise.
12052
65de6659
JM
120532012-05-29 Joseph Myers <joseph@codesourcery.com>
12054
12055 * c-common.c: Fix typo.
12056
ca5f4331
MM
120572012-05-29 Michael Matz <matz@suse.de>
12058
12059 * c-common.h (c_expand_decl): Remove prototype.
12060
4f7f7aca
MLI
120612012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12062
12063 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12064 * c-opts.c (c_common_handle_option): Remove code handling
12065 warn_missing_braces.
12066
4a792f9b
PC
120672012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12068
12069 PR c++/25137
12070 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12071 -Wmissing_braces.
12072
650dc14a
DS
120732012-05-22 Dodji Seketeli <dodji@redhat.com>
12074
12075 PR c++/53322
12076 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12077
9b095bf1
MLI
120782012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12079
12080 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12081 * c-opts.c (c_common_handle_option): Do not handle explicitly
12082 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12083
0b2c4be5
DS
120842012-05-16 Dodji Seketeli <dodji@redhat.com>
12085
12086 PR preprocessor/7263
ab20d992 12087 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
12088 to cpp_classify_number. For diagnostics, use the precise location
12089 instead of the global input_location.
12090
a1bde5af
PC
120912012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12092
d02924ef 12093 PR c++/11856
a1bde5af
PC
12094 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12095
d1ede5f4
BS
120962012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12097
a1bde5af 12098 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 12099
f2bc201f
MLI
121002012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12101
12102 PR 53063
12103 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12104 Wreorder): Use LangEnabledBy.
12105 * c-opts.c (c_common_handle_option): Do not enable them
12106 explicitly. Call lang-specific generated functions.
12107 (c_common_post_options): Do not set them here.
12108
95744782
MLI
121092012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12110
12111 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12112 Wmissing-field-initializers,Wmissing-parameter-type,
12113 Wold-style-declaration,Woverride-init): Use EnabledBy.
12114 * c-opts.c (c_common_post_options): Do not set here explicitly.
12115
7d5a5747
MLI
121162012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12117
12118 PR 53063
12119 * c-opts.c (c_common_handle_option): Use handle_generated_option
12120 to enable sub-options.
12121
5a3c9cf2
PC
121222012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12123
12124 PR c++/53158
12125 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12126
3ac8781c
RG
121272012-05-10 Richard Guenther <rguenther@suse.de>
12128
12129 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12130 adjust commentary about TYPE_IS_SIZETYPE types.
12131
1e537948
MLI
121322012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12133
12134 PR c++/53261
12135 * c-common.c (warn_logical_operator): Check that argument of
12136 integer_zerop is not NULL.
12137
f2c4a785
MLI
121382012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12139
12140 PR c/43772
12141 * c-common.c (warn_logical_operator): Do not warn if either side
12142 is already true or false.
12143
50f305ca
MLI
121442012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12145
12146 PR c/51712
12147 * c-common.c (expr_original_type): New.
12148 (shorten_compare): Do not warn for enumeration types.
12149
0c3641b0
MLI
121502012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12151
12152 * c.opt (fpermissive): Add Var(flag_permissive).
12153
7edaa4d2
MG
121542012-04-30 Marc Glisse <marc.glisse@inria.fr>
12155
12156 PR c++/51033
12157 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12158 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12159
b9c8da34
DS
121602012-04-30 Dodji Seketeli <dodji@redhat.com>
12161
12162 Add -Wvarargs option
ab20d992 12163 * c.opt (Wvarargs): Define new option.
b9c8da34 12164
e6c69da0
MLI
121652012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12166
12167 * c-common.c (check_function_arguments): Replace
12168 Wmissing-format-attribute with Wsuggest-attribute=format.
12169
90137d8f
MLI
121702012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12171
12172 * c.opt (Wsuggest-attribute=format): New. Alias of
12173 Wmissing-format-attribute.
12174 * c-format.c (decode_format_type): Replace
12175 Wmissing-format-attribute with Wsuggest-attribute=format.
12176 (check_function_format): Likewise.
12177
9faeb493 121782012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12179
12180 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12181 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12182 * c.opt: Add Wliteral-suffix.
12183
c1771a20
MLI
121842012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12185
12186 PR c/44774
12187 * c.opt (Wpedantic): New.
12188 (pedantic): Alias Wpedantic.
12189 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12190 (c_common_post_options): Likewise.
12191 (sanitize_cpp_opts): Likewise.
12192 * c-lex.c (interpret_float): Likewise.
12193 * c-format.c (check_format_types): Likewise.
12194 * c-common.c (pointer_int_sum): Likewise.
12195 (c_sizeof_or_alignof_type): Likewise.
12196 (c_add_case_label): Likewise.
12197 (c_do_switch_warnings): Likewise.
12198 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12199
04b391c1
JM
122002012-04-15 Jason Merrill <jason@redhat.com>
12201
12202 PR c++/52818
12203 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12204 (C_STD_NAME): Distinguish between C++98 and C++11.
12205
ac868f29
EB
122062012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12207
12208 PR target/52624
12209 * c-common.h (uint16_type_node): Rename into...
12210 (c_uint16_type_node): ...this.
12211 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12212 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12213
fd4116f4
MLI
122142012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12215
12216 * c-common.c (warn_if_unused_value): Move definition to here.
12217 * c-common.h (warn_if_unused_value): Move declaration to here.
12218
573ac65e
WB
122192012-03-23 William Bader <williambader@hotmail.com>
12220
12221 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12222
552b8185
JM
122232012-03-20 Jason Merrill <jason@redhat.com>
12224
12225 * c-common.h (enum cxx_dialect): Add cxx1y.
12226 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12227 test.
12228 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12229 * c-opts.c (c_common_post_options): Likewise.
12230 (set_std_cxx1y): New.
12231 (c_common_handle_option): Call it.
12232 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12233
04398fa8
PC
122342012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12235
12236 PR c++/14710
12237 * c.opt ([Wuseless-cast]): Add.
12238
d2a12ae7
RG
122392012-03-16 Richard Guenther <rguenther@suse.de>
12240
12241 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12242
a12bf402
MLI
122432012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12244
12245 PR c++/44783
12246 * c.opt (ftemplate-backtrace-limit) Add.
12247
5c30094f
RO
122482012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12249
12250 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12251 handling.
12252 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12253 (init_pragma): Don't register extern_prefix.
12254
21fa2faf
RG
122552012-03-12 Richard Guenther <rguenther@suse.de>
12256
12257 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12258 (builtin_type_for_size): Likewise.
12259
e3793c6f
JJ
122602012-02-13 Jakub Jelinek <jakub@redhat.com>
12261
12262 PR c++/52215
12263 * c-common.c (sync_resolve_params): Don't decide whether to convert
12264 or not based on TYPE_SIZE comparison, convert whenever arg_type
12265 is unsigned INTEGER_TYPE.
12266
93286335
PC
122672012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12268
12269 PR c/52118
12270 * c.opt ([Wunused-local-typedefs]): Fix description.
12271
7a421706
MS
122722012-01-24 Mike Stump <mikestump@comcast.net>
12273
12274 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12275 exactly.
12276
ba9b1f11
RG
122772012-01-18 Richard Guenther <rguenther@suse.de>
12278
12279 * c-opts.c (c_common_post_options): Reset LTO flags if
12280 we are about to generate a PCH.
12281
465406be
PC
122822012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12283
12284 PR c++/51777
12285 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12286 use pp_unsigned_wide_integer.
12287
aee15221
RG
122882012-01-10 Richard Guenther <rguenther@suse.de>
12289
12290 PR middle-end/51806
12291 * c-opts.c (c_common_handle_option): Move -Werror handling
12292 to language independent code.
12293
5720c0dc
RG
122942012-01-05 Richard Guenther <rguenther@suse.de>
12295
12296 PR middle-end/51764
12297 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12298 from common.opt.
12299
73ac190a
PC
123002011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12301
12302 PR c++/51316
12303 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12304 of array types with an unknown bound.
12305
48b0b196
JM
123062011-12-20 Joseph Myers <joseph@codesourcery.com>
12307
12308 * c-common.c (flag_isoc99): Update comment to refer to C11.
12309 (flag_isoc1x): Change to flag_isoc11.
12310 * c-common.h (flag_isoc99): Update comment to refer to C11.
12311 (flag_isoc1x): Change to flag_isoc11.
12312 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12313 C11.
12314 * c-opts.c (set_std_c1x): Change to set_std_c11.
12315 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12316 Call set_std_c11.
12317 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12318 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12319 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12320 standard.
12321 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12322 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12323 (std=gnu1x): Make alias of std=gnu11.
12324
d58d6eb5
JM
123252011-12-19 Jason Merrill <jason@redhat.com>
12326
12327 PR c++/51228
12328 * c-common.c (handle_transparent_union_attribute): Check the first
12329 field if the type is complete.
12330
b3908fcc
JW
123312011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12332
12333 PR libstdc++/51365
12334 * c-common.c (RID_IS_FINAL): Add.
12335 * c-common.h (RID_IS_FINAL): Add.
12336
fea3ca91
IS
123372011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12338
12339 * c.opt (fgnu-runtime): Provide full description.
12340 (fnext-runtime): Likewise.
12341 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12342
62bad7cd
AM
123432011-11-28 Andrew MacLeod <amacleod@redhat.com>
12344
12345 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12346 predefines in one place. Add LOCK_FREE predefines.
12347 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12348 new func.
12349
c466c4ff
AM
123502011-11-24 Andrew MacLeod <amacleod@redhat.com>
12351
12352 PR c/51256
9faeb493 12353 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12354 conditions
9faeb493
UB
12355 (resolve_overloaded_atomic_exchange,
12356 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12357 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12358 error_mark_node for error conditions.
9faeb493 12359
a5952633
RG
123602011-11-08 Richard Guenther <rguenther@suse.de>
12361
12362 PR middle-end/51010
ab20d992 12363 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12364
0a35513e
AH
123652011-11-07 Richard Henderson <rth@redhat.com>
12366 Aldy Hernandez <aldyh@redhat.com>
12367 Torvald Riegel <triegel@redhat.com>
12368
12369 Merged from transactional-memory.
12370
12371 * c-common.c (handle_tm_wrap_attribute,
12372 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12373 (struct c_common_reswords): Added __transaction* keywords.
12374 (struct c_common_attribute_table): Added transaction* and tm_regparm
12375 attributes.
12376 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12377 masks.
12378 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12379 find_tm_attribute): Declare.
12380
6d87092d
JM
123812011-11-07 Jason Merrill <jason@redhat.com>
12382
12383 PR c++/35688
12384 * c-common.c, c-common.h: Revert yesterday's changes.
12385
8e7860a1
JM
123862011-11-06 Jason Merrill <jason@redhat.com>
12387
12388 PR c++/35688
12389 * c-common.c (decl_has_visibility_attr): Split out from...
12390 (c_determine_visibility): ...here.
12391 * c-common.h: Declare it.
12392
d19fa6b5
JM
123932011-11-06 Joseph Myers <joseph@codesourcery.com>
12394
12395 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12396 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12397 type.
12398 (check_user_alignment): New. Split out of
12399 handle_aligned_attribute. Disallow integer constants with
12400 noninteger types. Conditionally allow zero.
12401 (handle_aligned_attribute): Use check_user_alignment.
12402 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12403
86951993
AM
124042011-11-06 Andrew MacLeod <amacleod@redhat.com>
12405 Richard Henderson <rth@redhat.com>
12406
12407 Merged from cxx-mem-model.
12408
12409 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12410 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12411 parameters that are the same type size.
12412 (get_atomic_generic_size): New. Find size of generic
12413 atomic function parameters and do typechecking.
12414 (add_atomic_size_parameter): New. Insert size into parameter list.
12415 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12416 either __atomic_exchange_n or external library call.
9faeb493 12417 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12418 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12419 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12420 __atomic_load_n or an external library call.
12421 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12422 __atomic_store_n or an external library call.
12423 (resolve_overloaded_builtin): Handle new __atomic builtins.
12424
cf9e9959
EB
124252011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12426
12427 PR c++/50608
12428 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12429 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12430 <INDIRECT_REF>: Return the argument.
12431 <ARRAY_REF>: Remove special code for negative offset.
12432 Call fold_build_pointer_plus instead of size_binop.
12433 (fold_offsetof): Remove STOP_REF argument and adjust.
12434 * c-common.h (fold_offsetof_1): Declare.
12435 (fold_offsetof): Remove STOP_REF argument.
12436
25339f10
JM
124372011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12438
12439 PR c++/50810
12440 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12441 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12442 Wnarrowing for C++0x and C++98.
12443 * c.opt ([Wnarrowing]): Update.
12444
89401152
PC
124452011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12446
12447 PR c++/44277
12448 * c.opt: Add Wzero-as-null-pointer-constant.
12449
97e3ad20
JM
124502011-10-31 Jason Merrill <jason@redhat.com>
12451
15694fdd
JM
12452 * c.opt (-fdeduce-init-list): Off by default.
12453
97e3ad20
JM
12454 PR c++/50920
12455 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12456 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12457 and -Wc++11-compat.
12458 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12459
fb9120e3
RAV
124602011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12461
12462 PR c++/30066
12463 * c.opt (fvisibility-inlines-hidden): Description change.
12464
3ce4f9e4
ESR
124652011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12466
12467 Implement C++11 user-defined literals.
12468 * c-common.c (build_userdef_literal): New.
12469 * c-common.def: New tree code.
12470 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12471 * c-lex.c (interpret_float): Add suffix parm.
12472 (c_lex_with_flags): Build literal tokens.
12473
5f53c243
PC
124742011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12475
12476 PR c++/50841
12477 Revert:
12478 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12479
12480 PR c++/50810
12481 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12482 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12483 Wnarrowing for C++0x and C++98.
12484 * c.opt ([Wnarrowing]): Update.
12485
263734e1
PC
124862011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12487
12488 PR c++/50810
12489 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12490 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12491 Wnarrowing for C++0x and C++98.
12492 * c.opt ([Wnarrowing]): Update.
12493
d2e312d7
PC
124942011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12495
12496 PR c++/45385
12497 * c-common.c (conversion_warning): Remove code looking for
12498 artificial operands.
12499
d17687f6
DS
125002011-10-18 Dodji Seketeli <dodji@redhat.com>
12501
12502 PR bootstrap/50760
12503 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12504 !NO_IMPLICIT_EXTERN_C.
d17687f6 12505
fc8396e9
PC
125062011-10-17 Michael Spertus <mike_spertus@symantec.com>
12507
12508 * c-common.c (c_common_reswords): Add __bases,
12509 __direct_bases.
12510 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12511
125122011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12513
12514 PR c++/50757
12515 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12516
847e697a
TT
125172011-10-15 Tom Tromey <tromey@redhat.com>
12518 Dodji Seketeli <dodji@redhat.com>
12519
12520 * c.opt (fdebug-cpp): New option.
12521 * c-opts.c (c_common_handle_option): Handle the option.
12522 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12523 output stream in parameter. Factorized from ...
12524 (maybe_print_line): ... this. Dump location debug information when
12525 -fdebug-cpp is in effect.
12526 (print_line_1): New static function. Takes an output stream in
12527 parameter. Factorized from ...
12528 (print_line): ... here. Dump location information when -fdebug-cpp
12529 is in effect.
12530 (scan_translation_unit): Dump location information when
12531 -fdebug-cpp is in effect.
12532
92582b75
TT
125332011-10-15 Tom Tromey <tromey@redhat.com>
12534 Dodji Seketeli <dodji@redhat.com>
12535
12536 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12537 without argument.
12538 * c-opts.c (c_common_handle_option)<case
12539 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12540 cases. Handle -ftrack-macro-expansion with and without argument.
12541
46427374
TT
125422011-10-15 Tom Tromey <tromey@redhat.com>
12543 Dodji Seketeli <dodji@redhat.com>
12544
12545 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12546 (print_line, cb_define, do_line_change): Adjust to avoid touching
12547 the internals of struct line_map. Use the public API instead.
12548 * c-pch.c (c_common_read_pch): Likewise.
12549 * c-lex.c (fe_file_change): Likewise.
12550
fc8396e9
PC
125512011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12552
12553 PR c++/17212
12554 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12555
125562011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12557
12558 PR c++/33067
12559 * c-pretty-print.c (pp_c_floating_constant): Output
12560 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12561
e79983f4
MM
125622011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12563
12564 * c-common.c (def_builtin_1): Delete old interface with two
12565 parallel arrays to hold standard builtin declarations, and replace
12566 it with a function based interface that can support creating
12567 builtins on the fly in the future. Change all uses, and poison
12568 the old names. Make sure 0 is not a legitimate builtin index.
12569 * c-omp.c (c_finish_omp_barrier): Ditto.
12570 (c_finish_omp_taskwait): Ditto.
12571 (c_finish_omp_flush): Ditto.
12572
6637388f
TG
125732011-10-11 Tristan Gingold <gingold@adacore.com>
12574
12575 * c.opt: (fallow-parameterless-variadic-functions): New.
12576
3797cb21
DS
125772011-09-08 Dodji Seketeli <dodji@redhat.com>
12578
12579 PR c++/33255 - Support -Wunused-local-typedefs warning
12580 * c-common.h (struct c_language_function::local_typedefs): New
12581 field.
9faeb493
UB
12582 (record_locally_defined_typedef, maybe_record_typedef_use)
12583 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12584 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12585 (maybe_record_typedef_use)
12586 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12587 * c.opt: Declare new -Wunused-local-typedefs flag.
12588
693ddb1b
EB
125892011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12590
12591 PR middle-end/50266
12592 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12593 computations.
12594
830c740f
RG
125952011-09-05 Richard Guenther <rguenther@suse.de>
12596
12597 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12598 of integer_minus_one_node for empty array upper bounds.
12599
892a371f
DS
126002011-08-28 Dodji Seketeli <dodji@redhat.com>
12601
12602 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12603 it's the first time it's being called on this main TU.
12604
0e3fdb48
RB
126052011-08-24 Richard Guenther <rguenther@suse.de>
12606
12607 PR c/49396
12608 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12609
126102011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12611
12612 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12613 defined in cpp_init_builtins and c_cpp_builtins.
12614
d4a83c10
JM
126152011-08-19 Joseph Myers <joseph@codesourcery.com>
12616
12617 * c-common.c (c_common_reswords): Add __builtin_complex.
12618 * c-common.h (RID_BUILTIN_COMPLEX): New.
12619
bbceee64
JM
126202011-08-18 Joseph Myers <joseph@codesourcery.com>
12621
12622 * c-common.c (c_common_reswords): Add _Noreturn.
12623 (keyword_is_function_specifier): Handle RID_NORETURN.
12624 * c-common.h (RID_NORETURN): New.
12625
3f8257db 126262011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12627
12628 * c-common.c (unsafe_conversion_p): New function. Check if it is
12629 unsafe to convert an expression to the type.
12630 (conversion_warning): Adjust, use unsafe_conversion_p.
12631 * c-common.h (unsafe_conversion_p): New function declaration.
12632
20906c66
JJ
126332011-08-02 Jakub Jelinek <jakub@redhat.com>
12634
12635 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12636 (c_finish_omp_taskyield): New prototype.
12637 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12638 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12639 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12640 or RHS1 have side-effects, evaluate those too in the right spot,
12641 if it is a decl and LHS is also a decl, error out if they
12642 aren't the same.
12643 (c_finish_omp_taskyield): New function.
12644 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12645 * c-pragma.c (omp_pragmas): Add taskyield.
12646 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12647 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12648 PRAGMA_OMP_CLAUSE_MERGEABLE.
12649
770e5a2e
DS
126502011-07-25 Dodji Seketeli <dodji@redhat.com>
12651
12652 * c-common.h (set_underlying_type): Remove parm name from
12653 declaration.
12654
1baae426
RG
126552011-07-25 Romain Geissler <romain.geissler@gmail.com>
12656
12657 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12658
fcb21722
JM
126592011-07-22 Jason Merrill <jason@redhat.com>
12660
76f86d00
JM
12661 PR c++/49793
12662 * c.opt (Wnarrowing): New.
12663
3a636414
JM
12664 PR c++/30112
12665 * c-common.h: Declare c_linkage_bindings.
12666 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12667
fcb21722
JM
12668 PR c++/49813
12669 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12670 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12671 as flag_isoc99 for 'restrict'.
12672 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12673
02614448
ILT
126742011-07-21 Ian Lance Taylor <iant@google.com>
12675
12676 PR middle-end/49705
12677 * c-common.c (c_disable_warnings): New static function.
12678 (c_enable_warnings): New static function.
12679 (c_fully_fold_internal): Change local unused_p to bool. Call
12680 c_disable_warnings and c_enable_warnings rather than change
12681 c_inhibit_evaluation_warnings.
12682
34429675
JM
126832011-07-20 Jason Merrill <jason@redhat.com>
12684
12685 PR c++/6709 (DR 743)
12686 PR c++/42603 (DR 950)
12687 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12688 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12689 (CPP_DECLTYPE): New.
12690 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12691
5d49b6a7
RG
126922011-07-19 Richard Guenther <rguenther@suse.de>
12693
12694 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12695 * c-omp.c (c_finish_omp_for): Likewise.
12696
e84a58ff
EB
126972011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12698
12699 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12700 body on the next line.
12701
329af3c7
JM
127022011-07-08 Jason Merrill <jason@redhat.com>
12703
4063e61b
JM
12704 PR c++/45437
12705 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12706
329af3c7
JM
12707 PR c++/49673
12708 * c-common.c (c_apply_type_quals_to_decl): Don't check
12709 TYPE_NEEDS_CONSTRUCTING.
12710
1a072294
RG
127112011-07-06 Richard Guenther <rguenther@suse.de>
12712
12713 * c-common.c (c_common_nodes_and_builtins):
12714 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12715
fce5dddd
RG
127162011-07-05 Richard Guenther <rguenther@suse.de>
12717
12718 * c-common.c (c_common_nodes_and_builtins): Build all common
12719 tree nodes first.
12720
45d439ac
JJ
127212011-06-27 Jakub Jelinek <jakub@redhat.com>
12722
56300785
JJ
12723 * c-common.h (c_tree_chain_next): New static inline function.
12724
45d439ac
JJ
12725 * c-common.c (check_builtin_function_arguments): Handle
12726 BUILT_IN_ASSUME_ALIGNED.
12727
e0a8ecf2
AM
127282011-06-21 Andrew MacLeod <amacleod@redhat.com>
12729
12730 * c-common.c: Add sync_ or SYNC__ to builtin names.
12731 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12732
127332011-06-20 Pierre Vittet <piervit@pvittet.com>
12734
12735 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12736 handler.
12737 (gen_pragma_handler): New union.
12738 (internal_pragma_handler): New type.
12739 (c_register_pragma_with_data)
12740 (c_register_pragma_with_expansion_and_data): New functions.
12741
12742 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12743 (c_register_pragma, c_register_pragma_with_expansion)
12744 (c_invoke_pragma_handler): Changed to work with
12745 internal_pragma_handler.
12746 (c_register_pragma_with_data)
12747 (c_register_pragma_with_expansion_and_data): New functions.
12748
677f3fa8
JM
127492011-06-14 Joseph Myers <joseph@codesourcery.com>
12750
12751 * c-common.c: Include common/common-target.h.
12752 (handle_section_attribute): Use
12753 targetm_common.have_named_sections.
12754 * c-cppbuiltin.c: Include common/common-target.h.
12755 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12756
d7fc8c14
RG
127572011-06-10 Richard Guenther <rguenther@suse.de>
12758
12759 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12760 to print a IDENTIFIER_NODE.
12761
10e48e39
RO
127622011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12763 Joseph Myers <joseph@codesourcery.com>
12764
12765 * c.opt (fbuilding-libgcc): New option.
12766 * c-cppbuiltin.c (c_cpp_builtins): Define
12767 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12768
6976ae51
JM
127692011-06-07 Jason Merrill <jason@redhat.com>
12770
3ff60975
JM
12771 * c-common.c (max_tinst_depth): Lower default to 900.
12772
6976ae51
JM
12773 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12774
009db074
RG
127752011-06-07 Richard Guenther <rguenther@suse.de>
12776
12777 * c-common.c (c_common_nodes_and_builtins): Do not set
12778 size_type_node or call set_sizetype.
12779
b4592b92
DS
127802011-06-07 Dodji Seketeli <dodji@redhat.com>
12781
12782 PR debug/49130
12783 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12784 type when using pointer comparison to compare types.
b4592b92 12785
014ab419
JW
127862011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12787
12788 * c.opt: Add -Wdelete-non-virtual-dtor.
12789 * c-opts.c (c_common_handle_option): Include it in -Wall.
12790
4f60111f
NF
127912011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12792
12793 PR bootstrap/49190
12794
12795 Revert:
12796 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12797
12798 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12799 not tree_common.
12800
4cc4f2f4
JJ
128012011-05-27 Jakub Jelinek <jakub@redhat.com>
12802
12803 PR c++/49165
12804 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12805 C++ don't call c_common_truthvalue_conversion on void type arms.
12806
38e01f9e
NF
128072011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12808
12809 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12810 (stmt_list_stack): Define.
12811 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12812 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12813
92e948a8
NF
128142011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12815
12816 * c-common.c (warning_candidate_p): Check for BLOCKs.
12817
a2fc3e63
NF
128182011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12819
12820 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12821 not tree_common.
12822
0957c029
JJ
128232011-05-25 Jakub Jelinek <jakub@redhat.com>
12824
12825 * c-common.c (def_fn_type): Remove extra va_end.
12826
828fb3ba
JM
128272011-05-23 Jason Merrill <jason@redhat.com>
12828
12829 PR c++/48106
12830 * c-common.c (c_common_get_narrower): New.
12831 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12832
dde05067
NF
128332011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12834
12835 * c-common.h (check_function_arguments): Tweak prototype of
12836 check_function_arguments.
12837 * c-common.c (check_function_arguments): Likewise. Adjust
12838 calls to check_function_nonnull, check_function_format, and
12839 check_function_sentinel.
12840 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12841 separate attributes and typelist arguments. Use
12842 FOREACH_FUNCTION_ARGS to iterate over argument types.
12843
3c0d13bf
PC
128442011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12845
12846 * c-common.c (c_common_reswords): Reorder.
12847 * c-common.h (rid): Likewise.
12848
8242dd04
NF
128492011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12850
12851 * c-common.c (def_fn_type): Don't call build_function_type, call
12852 build_function_type_array or build_varargs_function_type_array
12853 instead.
12854 (c_common_nodes_and_builtins): Likewise.
12855
3d528853
NF
128562011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12857
12858 * c-common.c (c_add_case_label): Omit the loc argument to
12859 build_case_label.
12860 * c-common.h (build_case_label): Remove.
12861 * c-semantics.c (build_case_label): Remove.
12862
a04a722b
JM
128632011-05-05 Joseph Myers <joseph@codesourcery.com>
12864
12865 * c-objc.h (objc_start_method_definition): Update prototype.
12866 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12867
e19a18d4
NF
128682011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12869
12870 * c-common.c (check_main_parameter_types): Reindent. Don't use
12871 TYPE_ARG_TYPES directly.
12872 (handle_nonnull_attribute): Likewise.
12873 (sync_resolve_params): Likewise.
12874 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12875 to check_format_string.
12876 (handle_format_attribute): Likewise.
12877 (check_format_string): Take a function type to examine instead of
12878 a type list. Use a function_arg_iterator to step through argument
12879 types.
12880
c62c040f
RG
128812011-05-04 Richard Guenther <rguenther@suse.de>
12882
12883 * c-common.c (fix_string_type): Use size_int for index type bounds.
12884 (start_fname_decls): Do not pass NULL to build_int_cst.
12885 (c_init_attributes): Likewise.
12886 * c-lex.c (c_lex_with_flags): Likewise.
12887
c12ff9d8
JM
128882011-04-27 Jason Merrill <jason@redhat.com>
12889
12890 * c-common.c (make_tree_vector_from_list): New.
12891 * c-common.h: Declare it.
12892
304dfbe3
RG
128932011-04-26 Richard Guenther <rguenther@suse.de>
12894
12895 PR preprocessor/48248
12896 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12897 for output size with -P.
12898
3c0d13bf
PC
128992011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12900
12901 * c-common.c (struct c_common_resword): Add __underlying_type.
12902 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12903
04695783
JM
129042011-04-20 Jim Meyering <meyering@redhat.com>
12905
12906 * c-format.c (init_dollar_format_checking): Remove useless
12907 if-before-free.
12908
0dc33c3c
NP
129092011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12910
12911 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12912 (objc_detect_field_duplicates): New.
0dc33c3c 12913 * stub-objc.c: Likewise.
3c0d13bf 12914
c59633d9
NP
129152011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12916
12917 * stub-objc.c (objc_declare_protocols): Renamed to
12918 objc_declare_protocol.
12919 * c-objc.h: Likewise.
3c0d13bf 12920
32dabdaf
NP
129212011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12922
12923 * stub-objc.c (objc_declare_class): Updated argument name.
12924
81f653d6
NF
129252011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12926
12927 * c-common.h (c_common_init_ts): Declare.
12928 * c-common.c (c_common_init_ts): Define.
12929
eb345401
NP
129302011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12931
12932 * c-objc.h (objc_build_message_expr): Updated prototype.
12933 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12934
a358e188
MJ
129352011-04-12 Martin Jambor <mjambor@suse.cz>
12936
12937 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12938 of cgraph_node.
12939
e6313a78
RG
129402011-04-11 Richard Guenther <rguenther@suse.de>
12941
12942 * c-common.c (complete_array_type): Build a range type of
12943 proper type.
12944
dcf0c47e
NF
129452011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12946
12947 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12948 (handle_type_generic_attribute): Likewise.
12949
1ee44b26
JM
129502011-04-07 Jason Merrill <jason@redhat.com>
12951
12952 PR c++/48450
12953 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12954 conversion from C++0x scoped enum.
12955
acce4e77
JM
129562011-04-06 Joseph Myers <joseph@codesourcery.com>
12957
12958 * c-target-def.h: New file.
12959 * c-target.def: New file.
12960 * c-target.h: New file.
12961 * c-common.c (targetcm): Don't define here.
12962 * c-common.h (default_handle_c_option): Declare.
12963 * c-format.c: Include c-target.h instead of target.h.
12964 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12965 include tm.h.
12966 (default_handle_c_option): Move from targhooks.c.
12967
e2eefb55
JJ
129682011-03-29 Jakub Jelinek <jakub@redhat.com>
12969
12970 PR preprocessor/48248
12971 * c-ppoutput.c (print): Add src_file field.
12972 (init_pp_output): Initialize it.
12973 (maybe_print_line): Don't optimize by adding up to 8 newlines
12974 if map->to_file and print.src_file are different file.
12975 (print_line): Update print.src_file.
12976
ba78087b
KT
129772011-03-25 Kai Tietz <ktietz@redhat.com>
12978
12979 * c-ada-spec.c (compare_comment): Use filename_cmp
12980 instead of strcmp for filename.
12981
0edf1bb2
JL
129822011-03-25 Jeff Law <law@redhat.com>
12983
adfac8df 12984 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12985
c7dc8804
JM
129862011-03-25 Jason Merrill <jason@redhat.com>
12987
12988 * c.opt: Add -std=c++03.
12989
d1d879b1
EB
129902011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12991
12992 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12993
3f8257db 129942011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12995
12996 PR target/12171
5050afdf
KT
12997 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12998 Display allowed attributes for function pointer types.
12999 (pp_c_attributes_display): New function to display
13000 attributes having affects_type_identity flag set to true.
13001 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13002
62d784f7
KT
13003 * c-common.c (c_common_attribute_table):
13004 Add new element.
13005 (c_common_format_attribute_table): Likewise.
13006
82d37118
JM
130072011-03-18 Jason Merrill <jason@redhat.com>
13008
49a000c3
JM
13009 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13010 * c-common.h: Don't declare it here.
13011 * c-common.c: Or define it here.
13012 * c-opts.c (c_common_handle_option): Or set it here.
13013
82d37118
JM
13014 PR c++/35315
13015 * c-common.c (handle_transparent_union_attribute): Don't
13016 make a duplicate type in C++.
13017
17bc631c
JM
130182011-03-15 Jason Merrill <jason@redhat.com>
13019
13020 * c-common.c (max_constexpr_depth): New.
13021 * c-common.h: Declare it.
13022 * c-opts.c (c_common_handle_option): Set it.
13023 * c.opt (fconstexpr-depth): New option.
13024
1b9b91a6
JM
130252011-03-11 Jason Merrill <jason@redhat.com>
13026
f231b5ff
JM
13027 * c-common.c (attribute_takes_identifier_p): Add missing const.
13028
1b9b91a6
JM
13029 PR c++/46803
13030 * c-common.c (attribute_takes_identifier_p): Assume that an
13031 unknown attribute takes an identifier.
13032
a19e4d44
NF
130332011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13034
13035 PR c/47786
13036 * c-common.c (c_type_hash): Call list_length instead of iterating
13037 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13038
982d62f6
JJ
130392011-02-19 Jakub Jelinek <jakub@redhat.com>
13040
13041 PR c/47809
13042 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13043
0a256240
NP
130442011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13045
13046 * c.opt (fobjc-abi-version=) New.
13047 (fobjc-nilcheck): New.
13048
ba9e6dd5
NF
130492011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13050
13051 PR c++/46890
13052 * c-common.h (keyword_is_decl_specifier): Declare.
13053 * c-common.c (keyword_is_decl_specifier): Define.
13054 (keyword_is_function_specifier): New function.
13055
7273813a
JJ
130562011-01-26 Jakub Jelinek <jakub@redhat.com>
13057
13058 PR c/47473
13059 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13060 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13061 REAL_TYPE.
13062
908ef79b
AC
130632011-01-26 Arnaud Charlet <charlet@adacore.com>
13064
13065 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13066
237e9384
JJ
130672011-01-26 Jakub Jelinek <jakub@redhat.com>
13068
13069 PR pch/47430
13070 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13071 after init_c_lex if pch_file is set.
13072
47ea1edf
DK
130732011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13074
d4dba752 13075 PR c++/43601
47ea1edf
DK
13076 * c.opt (-fkeep-inline-dllexport): New switch.
13077
2aa9c6ae
RG
130782011-01-12 Richard Guenther <rguenther@suse.de>
13079
13080 PR middle-end/32511
13081 * c-common.c (handle_weak_attribute): Warn instead of error
13082 on declaring an inline function weak.
13083
7bd11157
TT
130842011-01-05 Tom Tromey <tromey@redhat.com>
13085
13086 * c-common.h (lvalue_error): Update.
13087 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13088 not error.
13089
0e66e494 130902010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 13091
b4f588c4
NP
13092 PR objc/47075
13093 * c-objc.h (objc_finish_message_expr): Added argument to
13094 prototype.
13095
f4da8dce
NF
130962010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13097
13098 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13099 Use prototype_p.
13100
46270f14
NP
131012010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13102
13103 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 13104 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 13105
4816c593
NF
131062010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13107
13108 * c-common.h (readonly_error): Declare.
13109 * c-common.c (readonly_error): Define.
13110
7a6daeb0
NF
131112010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13112
13113 * c-common.h (invalid_indirection_error): Declare.
13114 * c-common.c (invalid_indirection_error): Define.
13115
892f6119
RG
131162010-12-03 Richard Guenther <rguenther@suse.de>
13117
13118 PR c/46745
13119 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13120 (pp_c_unary_expression): Likewise.
13121 (pp_c_expression): Likewise.
13122
6c39e757
NP
131232010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13124
13125 * c-common.h (objc_finish_function): New.
13126 (objc_non_volatilized_type): Removed.
13127 (objc_type_quals_match): Removed.
13128 * stub-objc.c (objc_finish_function): New.
13129 (objc_non_volatilized_type): Removed.
13130 (objc_type_quals_match): Removed.
9faeb493 13131
7c475d11
JM
131322010-11-30 Joseph Myers <joseph@codesourcery.com>
13133
13134 * c-common.h (parse_optimize_options): Declare.
13135 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13136 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13137
71f3e391
JM
131382010-11-29 Joseph Myers <joseph@codesourcery.com>
13139
13140 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13141 GET_ENVIRONMENT.
13142 * c-pch.c (O_BINARY): Don't define here.
13143 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13144
d5fabb58
JM
131452010-11-25 Joseph Myers <joseph@codesourcery.com>
13146
13147 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13148 targetm.except_unwind_info.
13149
299404a1
JM
131502010-11-23 Joseph Myers <joseph@codesourcery.com>
13151
13152 * c-opts.c (c_common_handle_option): Pass location to
13153 set_struct_debug_option.
13154
c98cd5bf
JM
131552010-11-23 Joseph Myers <joseph@codesourcery.com>
13156
13157 * c-common.c (visibility_options): Move from ../opts.c.
13158 * c-common.h (struct visibility_flags, visibility_options):
13159 Declare here.
13160 * c-opts.c (finish_options): Rename to c_finish_options.
13161 (c_common_init): Update call to finish_options.
13162
a9546771
NP
131632010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13164
13165 PR objc/34033
13166 * c-lex.c (lex_string): Check that each string in an Objective-C
13167 string concat sequence starts with either one or zero '@', and
13168 that there are no spurious '@' signs at the end.
13169
24a57808
JM
131702010-11-20 Joseph Myers <joseph@codesourcery.com>
13171
13172 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13173 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13174 HANDLE_PRAGMA_VISIBILITY.
13175 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13176 HANDLE_PRAGMA_VISIBILITY): Don't define.
13177 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13178
a9aa2c3a
NF
131792010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13180
13181 PR c++/16189
13182 PR c++/36888
13183 PR c++/45331
13184 * c-common.h (keyword_begins_type_specifier): Declare.
13185 (keyword_is_storage_class_specifier): Declare.
13186 (keyword_is_type_qualifier): Declare.
13187 * c-common.c (keyword_begins_type_specifier): New function.
13188 (keyword_is_storage_class_specifier): New function.
13189 (keyword_is_type_qualifier): Declare.
13190
5386338c
JM
131912010-11-19 Joseph Myers <joseph@codesourcery.com>
13192
13193 PR c/46547
13194 * c-common.c (in_late_binary_op): Define.
13195 (c_common_truthvalue_conversion): Check in_late_binary_op before
13196 calling c_save_expr.
13197 * c-common.h (in_late_binary_op): Declare.
13198
69ccdddb
JM
131992010-11-19 Joseph Myers <joseph@codesourcery.com>
13200
13201 * c-opts.c (c_common_handle_option): Update calls to
13202 set_struct_debug_option.
13203
6b192a09
NP
132042010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13205
13206 * c-common.h (objc_declare_protocols): Added additional argument.
13207 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13208
fb52b50a
NF
132092010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13210
13211 PR c/33193
13212 * c-common.h (build_real_imag_expr): Declare.
13213 * c-semantics.c (build_real_imag_expr): Define.
13214
b37421c6
JM
132152010-11-17 Joseph Myers <joseph@codesourcery.com>
13216
13217 * c-opts.c (c_common_parse_file): Take no arguments.
13218 * c-common.h (c_common_parse_file): Update prototype.
13219
07078664
JJ
132202010-11-16 Jakub Jelinek <jakub@redhat.com>
13221
13222 PR c++/46401
13223 * c-common.c (warning_candidate_p): Don't track non-const calls
13224 or STRING_CSTs.
13225
c6a13190
ILT
132262010-11-15 Ian Lance Taylor <iant@google.com>
13227
13228 * c-lex.c (init_c_lex): Set macro debug callbacks if
13229 flag_dump_go_spec is set.
13230
925e8657
NP
132312010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13232
13233 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13234 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13235
bb0a9581
NF
132362010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13237
13238 PR preprocessor/45038
13239 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13240 dialects.
13241
c5fa0890
JM
132422010-11-12 Joseph Myers <joseph@codesourcery.com>
13243
13244 * c-common.h (c_family_lang_mask): Declare.
13245 * c-opts.c (c_family_lang_mask): Make extern.
13246 * c-pragma.c (handle_pragma_diagnostic): Use
13247 control_warning_option.
13248
a4d8c676
JM
132492010-11-12 Joseph Myers <joseph@codesourcery.com>
13250
13251 * c-common.c (parse_optimize_options): Update call to
13252 decode_options.
13253 * c-common.h (c_common_handle_option): Update prototype.
13254 * c-opts.c (c_common_handle_option): Take location_t parameter and
13255 pass it to other functions.
13256
f954bd2c
JM
132572010-11-11 Joseph Myers <joseph@codesourcery.com>
13258
13259 * c-opts.c (warning_as_error_callback): Remove.
13260 (c_common_initialize_diagnostics): Don't call
13261 register_warning_as_error_callback.
13262 (c_common_handle_option): Handle -Werror=normalized= here.
13263
d8a07487
JM
132642010-11-10 Joseph Myers <joseph@codesourcery.com>
13265
13266 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13267 in diagnostic.
13268 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13269 letter.
13270 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13271 Remove trailing '.' from diagnostics.
13272 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13273
d5478783
JM
132742010-11-10 Joseph Myers <joseph@codesourcery.com>
13275
13276 * c-common.c (parse_optimize_options): Pass global_dc to
13277 decode_options.
13278 * c-opts.c (c_common_handle_option): Pass &global_options to
13279 set_Wstrict_aliasing.
13280 * c.opt (v): Don't mark Common or document here.
13281
91ebb981
IS
132822010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13283
13284 PR target/44981
13285 * c-format.c (format_type): New type gcc_objc_string_format_type.
13286 (valid_stringptr_type_p): New.
13287 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13288 (check_format_string): Pass expected type, use
91ebb981
IS
13289 valid_stringptr_type_p (), check that the format string types are
13290 consistent with the format specification.
13291 (decode_format_attr): Warn if NSString is used outside objective-c.
13292 (format_types_orig): Add NSString.
13293 (format_name): New.
13294 (format_flags): New.
13295 (check_format_arg): Handle format strings requiring an external parser.
13296 first_target_format_type: New variable.
13297 (handle_format_attribute): Set up first_target_format_type, pass the
13298 expected format arg string type to check_format_string().
ab20d992 13299 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13300 * stub-objc.c (objc_string_ref_type_p): New.
13301 (objc_check_format_arg): New.
13302
bede2adc
NP
133032010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13304
9faeb493 13305 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13306 * c-common.h (objc_build_class_component_ref): New.
13307 * stub-objc.c (objc_build_class_component_ref): New.
13308
9a179d01
NP
133092010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13310
13311 * c.opt (Wproperty-assign-default): New option.
13312
22d8d616
NP
133132010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13314
13315 Implemented -fobjc-std=objc1 flag.
13316 * c.opt (fobjc-std=objc1): New option.
13317
2debdb4f
NP
133182010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13319
13320 Implemented format and noreturn attributes for Objective-C methods.
13321 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13322 attribute for Objective-C methods.
13323
ec52b111
JM
133242010-10-31 Jason Merrill <jason@redhat.com>
13325
13326 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13327 EXPR_LOC_OR_HERE.
13328
46a88c12
NP
133292010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13330
13331 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13332 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13333 (objc_add_property_declaration): Removed arguments for copies and
13334 ivar.
13335 (objc_build_getter_call): Renamed to
13336 objc_maybe_build_component_ref.
13337 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13338 (objc_is_property_ref): New.
13339 * c-common.c (c_common_reswords): Removed copies and ivar.
13340 * stub-objc.c (objc_add_property_declaration): Removed arguments
13341 for copies and ivar.
13342 (objc_build_getter_call): Renamed to
13343 objc_maybe_build_component_ref.
13344 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13345 (objc_is_property_ref): New.
9faeb493 13346
1e4bf85b
AC
133472010-10-29 Arnaud Charlet <charlet@adacore.com>
13348 Matthew Gingell <gingell@adacore.com>
13349
13350 * c-ada-spec.c (separate_class_package): New function.
13351 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13352 name of their enclosing package.
13353 (print_ada_declaration): Use separate_class_package.
13354
81f0bab2
JM
133552010-10-27 Jason Merrill <jason@redhat.com>
13356
2b08f2c5
JM
13357 * c-common.c (c_common_reswords): Add __is_literal_type.
13358 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13359
81f0bab2
JM
13360 * c-common.c (check_case_value): Remove special C++ code.
13361
200290f2
NP
133622010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13363
13364 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13365 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13366 and RID_LAST_PATTR.
13367 (objc_add_property_declaration): Added additional arguments.
13368 (objc_property_attribute_kind): Removed.
13369 (objc_set_property_attr): Removed.
13370 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13371 copy and nonatomic.
13372 * stub-objc.c (objc_add_property_declaration): Added additional
13373 arguments.
13374 (objc_set_property_attr): Removed.
9faeb493 13375
f614132b
NP
133762010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13377
13378 * c-common.h (objc_add_property_variable): Renamed to
13379 objc_add_property_declaration. Added location argument.
13380 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13381
b8a18805
NP
133822010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13383
13384 * c-common.h (objc_maybe_printable_name): New.
13385 * stub-objc.c (objc_maybe_printable_name): New.
13386
3f8257db
JJ
133872010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13388 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13389
13390 * c-common.h (c_common_mark_addressable_vec): Declare.
13391 * c-common.c (c_common_mark_addressable_vec): New function.
13392
249a82c4
NP
133932010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13394
13395 * c-common.h (objc_set_method_type): Removed.
13396 (objc_add_method_declaration): Added boolean argument.
13397 (objc_start_method_definition): Same change.
13398 (objc_build_method_signature): Same change.
13399 * stub-objc.c (objc_set_method_type): Removed.
13400 (objc_add_method_declaration): Added boolean argument.
13401 (objc_start_method_definition): Same change.
13402 (objc_build_method_signature): Same change.
13403
977e30bc
NP
134042010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13405
13406 * c-common.h (finish_file): Removed.
13407 (objc_write_global_declarations): New.
13408 * c-opts.c (c_common_parse_file): Do not call finish_file.
13409 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13410
da57d1b9
NP
134112010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13412
13413 Implemented parsing @synthesize and @dynamic for
13414 Objective-C/Objective-C++.
13415 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13416 (objc_add_synthesize_declaration): New.
13417 (objc_add_dynamic_declaration): New.
13418 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13419 * stub-objc.c (objc_add_synthesize_declaration): New.
13420 (objc_add_dynamic_declaration): New.
9faeb493 13421
0069111f
MM
134222010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13423
13424 PR target/46041
13425 * c-cppbuiltin.c (mode_has_fma): Move function here from
13426 builtins.c. Don't use the fma optab, instead just use the
13427 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13428 using -save-temps.
13429
e426b47b
NP
134302010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13431
13432 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13433
3f8257db 13434 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13435
9faeb493 13436 Radar 4330422
e426b47b
NP
13437 * c-common.h (objc_non_volatilized_type): New declaration
13438 * stub-objc.c (objc_non_volatilized_type): New stub.
13439
90fbfdc3
NP
134402010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13441
e426b47b 13442 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13443
ab20d992 13444 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13445
9faeb493 13446 Radar 4133425
90fbfdc3 13447 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13448 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13449
c37d8c30
IS
134502010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13451
13452 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13453 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13454 (objc_ivar_visibility_kind): New enum.
13455 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13456 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13457 visibility enum.
13458
1b1562a5
MM
134592010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13460
13461 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13462 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13463 has the appropriate fma builtins.
13464 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13465
668ea4b1
IS
134662010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13467
1b1562a5 13468 merge from FSF apple 'trunk' branch.
3f8257db 13469 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13470
668ea4b1
IS
13471 Radars 4436866, 4505126, 4506903, 4517826
13472 * c-common.c (c_common_resword): Define @property and its attributes.
13473 * c-common.h: Define property attribute enum entries.
13474 (OBJC_IS_PATTR_KEYWORD): New.
13475 (objc_property_attribute_kind): New enum.
13476 Declare objc_set_property_attr (), objc_add_property_variable (),
13477 objc_build_getter_call () and objc_build_setter_call ().
13478 * stub-objc.c (objc_set_property_attr): New stub.
13479 (objc_add_property_variable): Likewise.
13480 (objc_build_getter_call): Likewise.
13481 (objc_build_setter_call) Likewise.
1b1562a5 13482
a1178b30
IS
134832010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13484
1b1562a5 13485 merge from FSF apple 'trunk' branch.
ab20d992 13486 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13487
13488 Radar 3803157 (method attributes)
13489 * c-common.c (handle_deprecated_attribute): Recognize
13490 objc methods as valid declarations.
13491 * c-common.h: Declare objc_method_decl ().
1b1562a5 13492 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13493
a75bfaa6
JM
134942010-10-08 Joseph Myers <joseph@codesourcery.com>
13495
13496 * c-common.c (parse_optimize_options): Call
13497 decode_cmdline_options_to_array_default_mask before
13498 decode_options. Update arguments to decode_options.
13499 * c-common.h (c_common_init_options_struct): Declare.
13500 * c-opts.c (c_common_init_options_struct): New. Split out from
13501 c_common_init_options.
13502
f05b9d93
NP
135032010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13504
13505 Implemented fast enumeration for Objective-C.
13506 * c-common.h (objc_finish_foreach_loop): New.
13507 * stub-objc.c (objc_finish_foreach_loop): New.
13508
1ebe4b4f
JM
135092010-10-05 Joseph Myers <joseph@codesourcery.com>
13510
13511 * c-common.h (struct diagnostic_context): Don't declare here.
13512 (c_common_initialize_diagnostics): Declare using
13513 diagnostic_context typedef.
13514 * c-opts.c (c_common_handle_option): Pass global_dc to
13515 handle_generated_option.
13516
d4d24ba4
JM
135172010-10-04 Joseph Myers <joseph@codesourcery.com>
13518
13519 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13520 handle_generated_option.
13521
478a1c5b
ILT
135222010-10-03 Ian Lance Taylor <iant@google.com>
13523
13524 * c.opt (-fplan9-extensions): New option.
13525
82a1c2fe
FXC
135262010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13527
13528 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13529 Remove.
13530 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13531 of duplicating code.
13532
92902b1b
IS
135332010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13534
13535 * c-common.c: Add two new entries for @optional
13536 and @required keywords.
13537
13538 merge from FSF 'apple/trunk' branch.
3f8257db 13539 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13540
13541 Radar 4386773
13542 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13543 objective-c keywords.
13544 (objc_set_method_opt): New declaration.
13545 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13546
46625112
JM
135472010-09-30 Joseph Myers <joseph@codesourcery.com>
13548
13549 * c-common.c (handle_optimize_attribute): Pass &global_options to
13550 cl_optimization_save and cl_optimization_restore.
13551 * c-opts.c (c_common_handle_option): Pass &global_options to
13552 handle_generated_option.
13553 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13554 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13555 &global_options to cl_optimization_restore.
13556
49b91f05
NP
135572010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13558
13559 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13560 Objective-C/Objective-C++ keywords.
13561
13ed556f 135622010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13563
9faeb493
UB
13564 Merge from 'apple/trunk' branch on FSF servers.
13565
3f8257db 13566 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13567
13568 Radar 4281748
13569 * c-common.h (objc_check_global_decl): New declaration.
13570 * stub-objc.c (objc_check_global_decl): New stub.
13571
f0036cca
JM
135722010-09-29 Joseph Myers <joseph@codesourcery.com>
13573
13574 * c.opt: Don't use VarExists.
13575
e3339d0f
JM
135762010-09-29 Joseph Myers <joseph@codesourcery.com>
13577
13578 * c-common.c (c_cpp_error): Update names of diagnostic_context
13579 members.
13580 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13581 cl_optimization members.
13582 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13583 sanitize_cpp_opts, finish_options): Update names of cpp_options
13584 members.
13585
1973201f
NP
135862010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13587
13588 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13589 (objc_is_reserved_word): Removed.
13590 * c-common.c: Updated comments.
13591 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13592 objc_is_reserved_word.
13593 * stub-objc.c (objc_is_reserved_word): Removed.
13594
f7e71da5
IS
135952010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13596
9faeb493 13597 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13598 include attributes.
13599 (objc_start_method_definition): Likewise.
13600 (objc_build_keyword_decl): Likewise.
13601 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13602 (objc_start_method_definition): Likewise.
13603 (objc_build_keyword_decl): Likewise.
13604
c165dca7
IS
136052010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13606
13607 * c-common.h (objc_start_class_interface): Adjust prototype.
13608 (objc_start_category_interface): Likewise.
13609 (objc_start_protocol): Likewise.
13610 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13611 (objc_start_class_interface): Likewise.
13612 (objc_start_category_interface): Likewise.
13613
7458026b
ILT
136142010-09-27 Ian Lance Taylor <iant@google.com>
13615
13616 * c-common.c (c_common_attribute_table): Add no_split_stack.
13617 (handle_no_split_stack_attribute): New static function.
13618
b581b85b
NP
136192010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13620
9faeb493 13621 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13622
3f8257db 13623 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13624
9faeb493 13625 Radar 4229905
b581b85b
NP
13626 * c-common.h (objc_have_common_type): New declaration.
13627 * stub-objc.c (objc_have_common_type): New stub.
13628
13629 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13630
13631 Radar 4154928
13632 * c-common.h (objc_common_type): New prototype.
9faeb493 13633 * stub-objc.c (objc_common_type): New stub.
b581b85b 13634
46a4da10
JH
136352010-09-24 Jan Hubicka <jh@suse.cz>
13636
13637 * c-common.c (handle_leaf_attribute): New function.
13638 (struct attribute_spec c_common_att): Add leaf.
13639
e200444e
JM
136402010-09-22 Joseph Myers <joseph@codesourcery.com>
13641
13642 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13643 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13644 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13645 -include-barrier, -include-directory, -include-directory=,
13646 -include-directory-after, -include-directory-after=,
13647 -include-prefix, -include-prefix=, -include-with-prefix,
13648 -include-with-prefix=, -include-with-prefix-after,
13649 -include-with-prefix-after=, -include-with-prefix-before,
13650 -include-with-prefix-before=, -no-integrated-cpp,
13651 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13652 -output=, -pedantic, -pedantic-errors, -preprocess,
13653 -print-missing-file-dependencies, -trace-includes, -traditional,
13654 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13655 -user-dependencies, -verbose, -write-dependencies,
13656 -write-user-dependencies, no-integrated-cpp, traditional): New.
13657
29a80ea6
NP
136582010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13659
13660 PR objc/23710
ac1fc2fc
NP
13661 * c-common.h (objc_start_method_definition): Return bool instead
13662 of void.
13663 * stub-objc.c (objc_start_method_definition): Return bool instead
13664 of void.
13665
136662010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13667
13668 PR objc/25965
13669 * c-common.h (objc_get_interface_ivars): New declaration.
13670 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13671
de621752
ILT
136722010-09-15 Ian Lance Taylor <iant@google.com>
13673
13674 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13675 messages. Remove period at end of warning message.
de621752 13676
ba885ec5
NS
136772010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13678
13679 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13680 (handle_alias_attribute): ... here.
13681 (handle_ifunc_attribute): New.
13682
c5ee1358
MM
136832010-09-06 Mark Mitchell <mark@codesourcery.com>
13684
13685 * c-common.h (do_warn_double_promotion): Declare.
13686 * c-common.c (do_warn_double_promotion): Define.
13687
0a0b3574
MM
136882010-09-05 Mark Mitchell <mark@codesourcery.com>
13689
13690 * c.opt (Wdouble-promotion): New.
13691
d1779886
JM
136922010-09-02 Joseph Myers <joseph@codesourcery.com>
13693
13694 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13695 fvtable-thunks, fxref): Mark no longer supported in help text.
13696
2d2bd949
JM
136972010-09-02 Joseph Myers <joseph@codesourcery.com>
13698
13699 * c.opt (Wimport, fall-virtual, falt-external-templates,
13700 fdefault-inline, fenum-int-equiv, fexternal-templates,
13701 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13702 fname-mangling-version-, fnew-abi, fnonnull-objects,
13703 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13704 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13705 applicable.
13706 (fhandle-exceptions): Mark with Alias and Warn.
13707 * c-opts.c (c_common_handle_option): Don't handle options marked
13708 as ignored.
13709
5de8299c
JM
137102010-09-02 Joseph Myers <joseph@codesourcery.com>
13711
13712 * c.opt (Wcomments, Werror-implicit-function-declaration,
13713 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13714 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13715 aliases.
13716 * c-common.c (option_codes): Use OPT_Wcomment instead of
13717 OPT_Wcomments.
13718 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13719 Don't handle options marked as aliases.
13720
0ceb0201
RG
137212010-08-25 Richard Guenther <rguenther@suse.de>
13722
13723 * c-common.c (c_common_get_alias_set): Remove special
13724 handling for pointers.
13725
ac47786e
NF
137262010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13727
13728 * c-common.c: Use FOR_EACH_VEC_ELT.
13729 * c-gimplify.c: Likewise.
13730 * c-pragma.c: Likewise.
13731
c878765b
JM
137322010-08-16 Joseph Myers <joseph@codesourcery.com>
13733
13734 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13735 RejectDriver.
13736 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13737 RejectDriver.
13738 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13739 instead of OPT_MDX and OPT_MMDX.
13740
603349bf
JM
137412010-08-16 Joseph Myers <joseph@codesourcery.com>
13742
13743 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13744
644fa7ac
JM
137452010-08-12 Joseph Myers <joseph@codesourcery.com>
13746
13747 * c.opt (MD, MMD): Change to MDX and MMDX.
13748 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13749
481e1176
JM
137502010-08-11 Joseph Myers <joseph@codesourcery.com>
13751
13752 * c-opts.c (c_common_handle_option): Call handle_generated_option
13753 instead of handle_option.
13754
ac8dc9f7
NF
137552010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13756
13757 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13758 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13759
4f8c876d
NF
137602010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13761
13762 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13763 (pending_redefine_extname): Change type to a VEC.
13764 (add_to_renaming_pragma_list): Update for new type of
13765 pending_redefine_extname.
ac8dc9f7 13766 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13767
3b0c690e
AC
137682010-08-04 Arnaud Charlet <charlet@adacore.com>
13769
13770 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13771 visited.
13772 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13773 decide whether a type has already been declared/seen.
13774 Do not go to the original type.
13775 (dump_nested_types): New parameter forward.
13776 Generate forward declaration if needed and mark type as visited.
13777 (print_ada_declaration): Call dump_nested_types if not already done.
13778 Mark types as visited.
13779
1890bccc
JM
137802010-08-03 Joseph Myers <joseph@codesourcery.com>
13781
13782 * c.opt (-print-pch-checksum): Remove option.
13783 * c-opts.c (c_common_handle_option): Don't handle
13784 OPT_print_pch_checksum.
13785
5f20c657
JM
137862010-07-27 Joseph Myers <joseph@codesourcery.com>
13787
13788 * c-common.h (c_common_handle_option): Update prototype and return
13789 value type.
13790 * c-opts.c (c_common_handle_option): Update prototype and return
13791 value type. Update calls to handle_option and
13792 enable_warning_as_error.
13793
f551f80c
JJ
137942010-07-27 Jakub Jelinek <jakub@redhat.com>
13795
13796 PR c/45079
13797 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13798
61ff2bdc
JM
137992010-07-27 Joseph Myers <joseph@codesourcery.com>
13800
13801 * c-common.h (c_common_missing_argument): Remove.
13802 * c-opts.c (c_common_missing_argument): Remove.
13803 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13804 idirafter, imacros, include, isysroot, isystem, iquote): Add
13805 MissingArgError.
13806 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13807
7a9bf9a4
JM
138082010-07-27 Joseph Myers <joseph@codesourcery.com>
13809
13810 * c-common.h (c_common_option_lang_mask,
13811 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13812 New.
13813 (c_common_init_options): Update prototype.
13814 * c-opts.c (c_common_option_lang_mask): New.
13815 (c_common_initialize_diagnostics): Split out of
13816 c_common_init_options.
13817 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13818 New.
13819 (c_common_init_options): Update prototype. Use decoded options in
13820 search for -lang-asm.
13821
910ad8de
NF
138222010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13823
13824 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13825 * c-format.c: Likewise.
13826
718f9c0f
MLI
138272010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13828
13829 * c-common.h: Include diagnostic-core.h. Error if already
13830 included.
13831 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13832
4d451982
MLI
138332010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13834
adfac8df 13835 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13836 Do not include expr.h
13837 (vector_mode_valid_p): Move here.
13838
119fe915
SB
138392010-06-21 DJ Delorie <dj@redhat.com>
13840
13841 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13842 allow these pragmas anywhere.
13843
138442010-06-14 Jakub Jelinek <jakub@redhat.com>
13845
13846 PR bootstrap/44509
13847 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13848 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13849 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13850 ggc_strdup instead of xstrdup.
13851
138522010-06-10 Jakub Jelinek <jakub@redhat.com>
13853
13854 * c-cppbuiltin.c: Include cpp-id-data.h.
13855 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13856 (lazy_hex_fp_value): New function.
13857 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13858
6662d794
MLI
138592010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13860
13861 * c-gimplify.c: Do not include tree-flow.h
13862
38f8b050
JR
138632010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13864
13865 PR other/44034
13866 * c-common.c: Rename targetm member:
13867 targetm.enum_va_list -> targetm.enum_va_list_p
13868
9589f23e
AS
138692010-06-28 Anatoly Sokolov <aesok@post.ru>
13870
13871 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13872
3b06d379
SB
138732010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13874
13875 * c-cppbuiltin.c: Do not include except.h.
13876
d166d4c3
AK
138772010-06-24 Andi Kleen <ak@linux.intel.com>
13878
9faeb493
UB
13879 * c-common.c (warn_for_omitted_condop): New.
13880 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13881
70cb8be6
JM
138822010-06-21 Joseph Myers <joseph@codesourcery.com>
13883
13884 * c.opt (lang-objc): Remove.
13885 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13886
a4c97feb
JR
138872010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13888
13889 * c-opts.c: Include "tm_p.h".
13890
6e2f1956
JM
138912010-06-20 Joseph Myers <joseph@codesourcery.com>
13892
13893 * c-common.c (parse_optimize_options): Update call to
13894 decode_options.
13895
bc87224e
NF
138962010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13897
13898 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13899 new type of types_used_by_cur_var_decl.
13900
b49cf425
JR
139012010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13902
13903 PR bootstrap/44512
13904 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13905 for C++ standard compliance.
13906
59f9c2ed
JM
139072010-06-16 Jason Merrill <jason@redhat.com>
13908
13909 * c.opt: Add -Wnoexcept.
13910
33766b66
RG
139112010-06-16 Richard Guenther <rguenther@suse.de>
13912
13913 PR c/44555
13914 * c-common.c (c_common_truthvalue_conversion): Remove
13915 premature and wrong optimization concering ADDR_EXPRs.
13916
eff7e30c
AC
139172010-06-15 Arnaud Charlet <charlet@adacore.com>
13918
13919 * c-ada-spec.c (dump_sloc): Remove column info.
13920 (is_simple_enum): New function.
13921 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13922 enum types when relevant.
13923
6312e84d
MLI
139242010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13925
9faeb493 13926 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13927 location.
13928
1cb42611
JM
139292010-06-10 Joseph Myers <joseph@codesourcery.com>
13930
13931 * c-opts.c (c_common_handle_option): Don't handle
13932 OPT_fshow_column.
13933
a9429e29
LB
139342010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13935
13936 * c-pragma.c (push_alignment): Use typed GC allocation.
13937 (handle_pragma_push_options): Likewise.
13938
13939 * c-common.c (parse_optimize_options): Likewise.
13940
13941 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13942 option.
13943
5498f011
JM
139442010-06-07 Joseph Myers <joseph@codesourcery.com>
13945
13946 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13947 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13948 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13949 flag_signed_bitfields, warn_strict_null_sentinel,
13950 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13951 flag_gen_declaration, flag_no_gnu_keywords,
13952 flag_implement_inlines, flag_implicit_templates,
13953 flag_implicit_inline_templates, flag_optional_diags,
13954 flag_elide_constructors, flag_default_inline, flag_rtti,
13955 flag_conserve_space, flag_access_control, flag_check_new,
13956 flag_new_for_scope, flag_weak, flag_working_directory,
13957 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13958 flag_enforce_eh_specs, flag_threadsafe_statics,
13959 flag_pretty_templates): Remove.
13960 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13961 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13962 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13963 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13964 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13965 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13966 flag_no_gnu_keywords, flag_implement_inlines,
13967 flag_implicit_templates, flag_implicit_inline_templates,
13968 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13969 flag_rtti, flag_conserve_space, flag_access_control,
13970 flag_check_new, flag_new_for_scope, flag_weak,
13971 flag_working_directory, flag_use_cxa_atexit,
13972 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13973 flag_threadsafe_statics, flag_pretty_templates,
13974 warn_strict_null_sentinel): Remove.
13975 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13976 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13977 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13978 fimplicit-inline-templates, fimplicit-templates,
13979 flax-vector-conversions, fms-extensions, fnil-receivers,
13980 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13981 frtti, fshort-double, fshort-enums, fshort-wchar,
13982 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13983 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13984 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13985 gen-decls, undef): Use Var.
13986 (fdefault-inline, foptional-diags): Document as doing nothing.
13987 * c-opts.c (c_common_handle_option): Remove cases for options now
13988 using Var. Mark ignored options as such.
13989
39dabefd
SB
139902010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13991
9faeb493 13992 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13993 * c-common.def: Likewise.
13994 * c-common.h: Likewise.
13995 * c-cppbuiltin.c: Likewise.
13996 * c-dump.c: Likewise.
13997 * c-format.c: Likewise.
13998 * c-format.h : Likewise.
13999 * c-gimplify.c: Likewise.
14000 * c-lex.c: Likewise.
14001 * c-omp.c: Likewise.
14002 * c.opt: Likewise.
14003 * c-opts.c: Likewise.
14004 * c-pch.c: Likewise.
14005 * c-ppoutput.c: Likewise.
14006 * c-pragma.c: Likewise.
14007 * c-pragma.h: Likewise.
14008 * c-pretty-print.c: Likewise.
14009 * c-pretty-print.h: Likewise.
14010 * c-semantics.c: Likewise.
14011 * stub-objc.c: Likewise.
14012
14013 * c-common.c: Include gt-c-family-c-common.h.
14014 * c-pragma.c: Include gt-c-family-c-pragma.h.
14015\f
68127a8e 14016Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
14017
14018Copying and distribution of this file, with or without modification,
14019are permitted in any medium without royalty provided the copyright
14020notice and this notice are preserved.