]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
14bfda60
GA
12023-06-29 Qing Zhao <qing.zhao@oracle.com>
2
3 PR c/77650
4 * c.opt: New option -Wflex-array-member-not-at-end.
5
5f590ee3
GA
62023-06-28 Jason Merrill <jason@redhat.com>
7
8 PR c++/110344
9 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
10
267e1fea
GA
112023-06-26 Richard Biener <rguenther@suse.de>
12
13 * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
14 operations.
15
6f78df4c
GA
162023-06-23 Marek Polacek <polacek@redhat.com>
17
18 * c-common.h (cxx_dialect): Add cxx26 as a dialect.
19 * c-opts.cc (set_std_cxx26): New.
20 (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
21 enabled.
22 (c_common_post_options): Adjust comments.
23 * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
24 and -std=gnu++2c.
25 (std=c++2b): Mark as Undocumented.
26 (std=c++23): No longer Undocumented.
27
80e9ca0e
GA
282023-06-21 Alexander Monakov <amonakov@ispras.ru>
29
30 * c-gimplify.cc (fma_supported_p): New helper.
31 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
32 contraction.
33
f10a4ce0
GA
342023-06-16 Alex Coplan <alex.coplan@arm.com>
35
36 * c.opt (Welaborated-enum-base): New.
37
532fb120
GA
382023-06-13 David Malcolm <dmalcolm@redhat.com>
39
40 PR c/84890
41 * known-headers.cc
42 (suggest_missing_header::~suggest_missing_header): Reword note to
43 avoid negative tone of "forgetting".
44
8c5b1365
GA
452023-06-07 Jason Merrill <jason@redhat.com>
46
47 PR c++/58487
48 * c.opt: Add -Wnrvo.
49
6e6bb373
GA
502023-05-26 Martin Uecker <uecker@tugraz.at>
51
52 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
53 record all parameters.
54
b2776076
GA
552023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
56
57 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
58 (dump_ada_declaration): Ditto.
59 (dump_ada_structure): Ditto.
60 * c-common.cc (unsafe_conversion_p): Ditto.
61 (shorten_compare): Ditto.
62 (pointer_int_sum): Ditto.
63 (c_common_truthvalue_conversion): Ditto.
64 (scalar_to_vector): Ditto.
65 * c-common.h (gnu_vector_type_p): Ditto.
66 * c-omp.cc (c_omp_depend_t_p): Ditto.
67 (c_omp_split_clauses): Ditto.
68 * c-ubsan.cc (ubsan_instrument_division): Ditto.
69 * c-warn.cc (conversion_warning): Ditto.
70 (warnings_for_convert_and_check): Ditto.
71
ff2dcddf
GA
722023-05-18 Joseph Myers <joseph@codesourcery.com>
73
74 * c-format.cc (print_char_table): Handle %B like %b.
75
3427b51b
GA
762023-05-15 Joseph Myers <joseph@codesourcery.com>
77
78 * c-lex.cc (c_common_has_attribute): Use 202311 as
79 __has_c_attribute return for all C2x attributes.
80
812023-05-15 Patrick Palka <ppalka@redhat.com>
82
83 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
84 for C++23.
85
1fc8da95
GA
862023-05-01 Marek Polacek <polacek@redhat.com>
87
88 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
89
579cdc1e
GA
902023-03-28 David Malcolm <dmalcolm@redhat.com>
91
92 PR c/107002
93 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
94 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
95 Reject cases where involving macro expansions.
96
972023-03-28 Jason Merrill <jason@redhat.com>
98
99 PR c++/107163
100 * c-common.cc (verify_tree): Don't use sequenced handling
101 for COMPONENT_REF.
102
454a4d50
GA
1032023-03-17 Jakub Jelinek <jakub@redhat.com>
104
105 PR c/109151
106 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
107 types rather than just INTEGER_TYPE.
108
c8065441
GA
1092023-03-10 Marek Polacek <polacek@redhat.com>
110
111 PR sanitizer/108060
112 PR sanitizer/109050
113 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
114 the RHS before the LHS.
115
2858bf16
GA
1162023-03-04 Jakub Jelinek <jakub@redhat.com>
117
118 PR c/107465
119 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
120 above innermost zero extension of BIT_NOT_EXPR result.
121
1222023-03-04 Jakub Jelinek <jakub@redhat.com>
123
124 PR c/107465
125 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
126 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
127 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
128 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
129 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
130 from narrower unsigned, fix up computation of mask for the constant
131 cases and for unsigned other operand case handle differently
132 BIT_NOT_EXPR result being sign vs. zero extended.
133
1342023-03-04 Jakub Jelinek <jakub@redhat.com>
135
136 PR c/107846
137 * c-warn.cc: Include langhooks.h.
138 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
139 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
140 is narrower than type0 and unsigned, use wi::min_precision with
141 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
142
2aa6673e
GA
1432023-03-03 Alexandre Oliva <oliva@adacore.com>
144
145 * c-common.cc (c_common_nodes_and_builtins): Take
146 wchar_type_node for wint_type_node when aliased.
147 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
148 wchar_t, to the underlying type rather than wchar_t in
149 non-C++.
150 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
151
6f9e2f14
GA
1522023-02-28 Marek Polacek <polacek@redhat.com>
153
154 PR c++/107938
155 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
156 POINTER_TYPE_P.
157
1582023-02-28 Jakub Jelinek <jakub@redhat.com>
159
160 PR sanitizer/108894
161 * c-common.h (c_strict_flex_array_level_of): Declare.
162 * c-common.cc (c_strict_flex_array_level_of): New function,
163 moved and renamed from c-decl.cc's strict_flex_array_level_of.
164 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
165 C check c_strict_flex_array_level_of whether a trailing array
166 should be treated as flexible member like. Handle C [0] arrays.
167 Add 1 + index_off_by_one rather than index_off_by_one to bounds
168 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
169 bounds comparison.
170
e2b20ed3
GA
1712023-02-23 Jakub Jelinek <jakub@redhat.com>
172
173 PR translation/108890
174 * c.opt (fcontracts): Fix description.
175
b6f98991
GA
1762023-02-22 Marek Polacek <polacek@redhat.com>
177
178 PR c/108880
179 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
180 pset to walk_tree_1.
181 (c_genericize): Call walk_tree with an explicit pset.
182
0263e9d5
GA
1832023-02-18 Martin Uecker <uecker@tugraz.at>
184
185 PR c/105660
186 * c-attribs.cc (append_access_attr): Use order of arguments when
187 construction string.
188 (append_access_attr_idxs): Rename and make static.
189 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
190
88cc4495
GA
1912023-02-16 Patrick Palka <ppalka@redhat.com>
192
193 * c-common.h: Mechanically drop static from static inline
194 functions via s/^static inline/inline/g.
195
0a251e74
GA
1962023-02-01 Jason Merrill <jason@redhat.com>
197
198 * c.opt: Add -Wno-changes-meaning.
199
317525b0
GA
2002023-01-31 Marek Polacek <polacek@redhat.com>
201
202 PR c++/107593
203 PR c++/108597
204 * c-common.h (instantiation_dependent_expression_p): Declare.
205 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
206 is dependent, invalidate the chain.
207
2371d100
GA
2082023-01-26 Marek Polacek <polacek@redhat.com>
209
210 PR c++/105300
211 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
212
9f98cfa5
GA
2132023-01-18 Marek Polacek <polacek@redhat.com>
214
215 PR c/108424
216 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
217
5013c3bb
GA
2182023-01-14 Jakub Jelinek <jakub@redhat.com>
219
220 PR c++/108365
221 * c-common.h (may_shorten_divmod): New static inline function.
222
2232023-01-13 Eric Botcazou <ebotcazou@adacore.com>
224
225 * c-ada-spec.cc (is_float32): New function.
226 (is_float64): Likewise.
227 (is_float128): Tweak.
228 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
229
81ed98bc
GA
2302023-01-12 Lewis Hyatt <lhyatt@gmail.com>
231
232 PR preprocessor/108244
233 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
234 deferred pragmas if -fdirectives-only.
235 (init_pragma): Likewise.
236
84723aca
GA
2372023-01-09 Martin Liska <mliska@suse.cz>
238
239 PR c/107993
240 * c-attribs.cc (handle_target_clones_attribute): Check for
241 string constant for all target_clone attribute values.
242
0f8fbb57
GA
2432023-01-03 Florian Weimer <fweimer@redhat.com>
244
245 * c-cppbuiltin.cc (c_cpp_builtins): Define
246 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
247
2482023-01-03 Florian Weimer <fweimer@redhat.com>
249
250 Revert:
251 2023-01-03 Florian Weimer <fweimer@redhat.com>
252
253 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
254 Define if constant is known.
255
2562023-01-03 Florian Weimer <fweimer@redhat.com>
257
258 Revert:
259 2023-01-02 Florian Weimer <fweimer@redhat.com>
260
261 * c-cppbuiltin.cc (c_cpp_builtins): Define
262 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
263
fee53a31
GA
2642023-01-02 Florian Weimer <fweimer@redhat.com>
265
266 * c-cppbuiltin.cc (c_cpp_builtins): Define
267 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
268
2692023-01-02 Florian Weimer <fweimer@redhat.com>
270
271 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
272 Define if constant is known.
273
d2ef2327
GA
2742022-12-19 Marek Polacek <polacek@redhat.com>
275
276 PR c/98487
277 * c-format.cc (check_function_format): Use get_attribute_name.
278
5fb1e674
GA
2792022-12-16 Qing Zhao <qing.zhao@oracle.com>
280
281 * c.opt (Wstrict-flex-arrays): New option.
282
596dbfff
GA
2832022-12-02 Andrew MacLeod <amacleod@redhat.com>
284
285 * c-attribs.cc (handle_deprecated_attribute): Use type when
286 using TYPE_NAME.
287
b35680ec
GA
2882022-12-02 Jakub Jelinek <jakub@redhat.com>
289
290 PR c++/84469
291 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
292 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
293 to any of the structured binding decls.
294
6eea85a9
GA
2952022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
296 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
297
298 PR driver/107787
299 * c-common.cc (fold_offsetof,
300 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
301 instead of OPT_Warray_bounds.
302
9a1b4f1d
GA
3032022-11-24 Jakub Jelinek <jakub@redhat.com>
304
305 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
306 with a dot.
307
8761284f
GA
3082022-11-23 Andrew Pinski <apinski@marvell.com>
309 Jakub Jelinek <jakub@redhat.com>
310
311 PR c/107127
312 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
313 instead of walk_tree for c_genericize_control_r.
314
3152022-11-23 Jakub Jelinek <jakub@redhat.com>
316
317 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
318 fcontract-role=, fcontract-semantic=): Add RejectNegative.
319 (fcontract-build-level=): Terminate description with dot.
320
fb98ede8
GA
3212022-11-19 Jakub Jelinek <jakub@redhat.com>
322
323 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
324 value from 202207L to 202211L.
325
3262022-11-19 Jeff Chapman II <jchapman@lock3software.com>
327 Andrew Sutton <asutton@lock3software.com>
328 Andrew Marmaduke <amarmaduke@lock3software.com>
329 Michael Lopez <mlopez@lock3software.com>
330 Jason Merrill <jason@redhat.com>
331
332 * c.opt: Add contracts flags.
333 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
334 macros.
335
80909529
GA
3362022-11-16 Marek Polacek <polacek@redhat.com>
337
338 PR c++/106649
339 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
340 C++23.
341 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
342 depending on cxx_dialect.
343 * c.opt (Winvalid-constexpr): New option.
344
3452022-11-16 Jakub Jelinek <jakub@redhat.com>
346
347 * c-common.def (CONCEPT_DECL): New tree, moved here from
348 cp-tree.def.
349 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
350 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
351 attribute on CONCEPT_DECL.
352
cdc34229
GA
3532022-11-15 Lewis Hyatt <lhyatt@gmail.com>
354
355 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
356 than a hard-coded string.
357
83d400bd
GA
3582022-11-15 Jakub Jelinek <jakub@redhat.com>
359
360 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
361 __cpp_multidimensional_subscript macro value to 202211L.
362
3632022-11-15 Patrick Palka <ppalka@redhat.com>
364
365 PR c++/107638
366 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
367 iff SUPPORTS_INIT_PRIORITY.
368
3692022-11-14 Martin Liska <mliska@suse.cz>
370
371 Revert:
372 2022-11-09 Martin Liska <mliska@suse.cz>
373
374 * c-target.def: Port to RST.
375
30d77d49
GA
3762022-11-12 Joseph Myers <joseph@codesourcery.com>
377
378 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
379
5b6ce16a
GA
3802022-11-11 Jonathan Wakely <jwakely@redhat.com>
381
382 PR c/85487
383 * c-pragma.cc (handle_pragma_ignore): New function.
384 (init_pragma): Register region and endregion pragmas.
385
1cdfd0e5
GA
3862022-11-09 Martin Liska <mliska@suse.cz>
387
388 * c-target.def: Port to RST.
389
05788e9b
GA
3902022-11-05 Lewis Hyatt <lhyatt@gmail.com>
391
392 PR preprocessor/55971
393 * c-ppoutput.cc (adjust_for_newlines): Update comment.
394
d29260ce
GA
3952022-11-03 Jason Merrill <jason@redhat.com>
396
397 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
398 -fconcepts-ts before C++20.
399
3055829a
GA
4002022-10-28 Joseph Myers <joseph@codesourcery.com>
401
402 * c-common.cc (def_fn_type): Call build_function_type for
403 zero-argument variable-argument function.
404 (c_common_nodes_and_builtins): Build default_function_type with
405 build_function_type.
406 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
407 option.
408
4092022-10-28 Joseph Myers <joseph@codesourcery.com>
410
411 PR c/61469
412 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
413 New. Moved from cp/cp-tree.h.
414 * c-warn.cc (warnings_for_convert_and_check): Do not consider
415 conversions to enum with underlying type bool to overflow.
416
486a5037
GA
4172022-10-26 Marek Polacek <polacek@redhat.com>
418
419 PR c++/106393
420 * c.opt (Wdangling-reference): New.
421
87f9c4a4
GA
4222022-10-19 Joseph Myers <joseph@codesourcery.com>
423
424 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
425 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
426 and FMT_LEN_wf64.
427 (NOARGUMENTS, NOLENGTHS): Update definitions.
428 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
429 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
430 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
431 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
432 (T_UF64, T2X_UF64): New macros.
433 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
434 and wfN length modifiers.
435 (print_char_table, scan_char_table): Add entries using wN and wfN
436 length modifiers.
437
21de009f
GA
4382022-10-18 Joseph Myers <joseph@codesourcery.com>
439
440 PR c/36113
441 * c-common.cc (c_common_type_for_size): Add fallback to
442 widest_unsigned_literal_type_node or
443 widest_integer_literal_type_node for precision that may not
444 exactly match the precision of those types.
445
baeec7cc
GA
4462022-10-14 Jakub Jelinek <jakub@redhat.com>
447
448 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
449 predefine __BFLT16_*__ macros and for C++23 also
450 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
451 macros for -fbuilding-libgcc.
452 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
453
4542022-10-14 Jakub Jelinek <jakub@redhat.com>
455
456 PR middle-end/323
457 PR c++/107097
458 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
459 the tree being specific to C/ObjC.
460 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
461 in C++ the same as in C.
462 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
463 even for C++.
464
621a911d
GA
4652022-10-13 Joseph Myers <joseph@codesourcery.com>
466
467 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
468 value 2 for *_IS_IEC_60559.
469
781f477a
GA
4702022-10-12 Lewis Hyatt <lhyatt@gmail.com>
471
472 PR preprocessor/60014
473 PR preprocessor/60723
474 * c-ppoutput.cc (class token_streamer): Remove member
475 line_marker_emitted to...
476 (token_streamer::stream): ...a local variable here. Set
477 print.prev_was_system_token on all code paths.
478
27bfe54e
GA
4792022-10-10 Nathan Sidwell <nathan@acm.org>
480
481 * c-opts.cc (c_common_post_options): Bump abi to 18.
482
4832022-10-10 Marek Polacek <polacek@redhat.com>
484
485 PR c++/106937
486 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
487 attributes here.
488 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
489 attributes here.
490 (pp_c_attributes): Remove.
491 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
492 get_attribute_name. Don't print a trailing space when printing the
493 [[]] form.
494 * c-pretty-print.h (pp_c_attributes): Remove.
495
9ff6c33e
GA
4962022-10-07 Qing Zhao <qing.zhao@oracle.com>
497
498 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
499 (c_common_attribute_table): New item for strict_flex_array.
500 * c.opt: (fstrict-flex-arrays): New option.
501 (fstrict-flex-arrays=): New option.
502
5032022-10-07 Martin Liska <mliska@suse.cz>
504
505 * name-hint.h: Use std::move.
506
5072022-10-07 Jakub Jelinek <jakub@redhat.com>
508
509 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
510 only in gnu namespace or as standard attribute, treat fallthrough
511 attributes in other namespaces like any other unknown attribute.
512
629d04d3
GA
5132022-10-06 Joseph Myers <joseph@codesourcery.com>
514
515 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
516 typeof_unqual.
517 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
518 (D_EXT11): New macro. Values of subsequent macros updated.
519
5202022-10-06 Jakub Jelinek <jakub@redhat.com>
521
522 PR c++/106654
523 * c-attribs.cc (handle_assume_attribute): New function.
524 (c_common_attribute_table): Add entry for assume attribute.
525 * c-lex.cc (c_common_has_attribute): Handle
526 __have_cpp_attribute (assume).
527
85872a69
GA
5282022-10-04 Jakub Jelinek <jakub@redhat.com>
529
530 * c-omp.cc (c_omp_directives): Uncomment begin declare target
531 entry.
532
69fd6dcc
GA
5332022-10-03 Patrick Palka <ppalka@redhat.com>
534
535 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
536 RID_IS_SAME_AS.
537
5382022-10-03 Joseph Myers <joseph@codesourcery.com>
539
540 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
541 special-case __*_EPSILON__ setting for IBM long double for C2x.
542
3a221b73
GA
5432022-09-30 Patrick Palka <ppalka@redhat.com>
544
545 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
546 C++ traits.
547 * c-common.h (enum rid): Likewise.
548
bbdcdf5c
GA
5492022-09-29 Joseph Myers <joseph@codesourcery.com>
550
551 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
552 C.
553
5542022-09-29 Patrick Palka <ppalka@redhat.com>
555
556 * c-common.cc (c_common_reswords): Add __remove_cv,
557 __remove_reference and __remove_cvref.
558 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
559 and RID_REMOVE_CVREF.
560
1f16a020
GA
5612022-09-27 Marek Polacek <polacek@redhat.com>
562
563 PR c++/101165
564 PR c++/106882
565 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
566
5672022-09-27 Marek Polacek <polacek@redhat.com>
568
569 * c-format.cc (c_keywords): Drop nothrow.
570
5712022-09-27 Jakub Jelinek <jakub@redhat.com>
572
573 PR c++/106651
574 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
575 __cpp_static_call_operator=202207L for C++23.
576
5772022-09-27 Jakub Jelinek <jakub@redhat.com>
578
579 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
580 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
581 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
582 * c-pragma.cc (omp_pragmas): Add assumes and begin.
583 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
584 (omp_pragmas_simd): Add assume.
585 * c-common.h (c_omp_directives): Declare.
586 * c-omp.cc (omp_directives): Rename to ...
587 (c_omp_directives): ... this. No longer static. Uncomment
588 assume, assumes, begin assumes and end assumes entries.
589 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
590 to PRAGMA_OMP_END.
591 (c_omp_categorize_directive): Adjust for omp_directives to
592 c_omp_directives renaming.
593
5942022-09-27 Jakub Jelinek <jakub@redhat.com>
595
596 PR c++/106652
597 PR c++/85518
598 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
599 _Float{32,64,128}x flags from D_CONLY to 0.
600 (shorten_binary_op): Punt if common_type returns error_mark_node.
601 (shorten_compare): Likewise.
602 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
603 and _Float{32,64,128}x builtin types if available. For C++
604 clear float128t_type_node.
605 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
606 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
607 * c-lex.cc (interpret_float): For q/Q suffixes prefer
608 float128t_type_node over float128_type_node. Allow
609 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
610 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
611 with pedwarn. Don't call excess_precision_type for C++.
612
220c4d8e
GA
6132022-09-26 Marek Polacek <polacek@redhat.com>
614
615 PR c++/106656
616 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
617 for C++20.
618
4afaeaab
GA
6192022-09-23 Marek Polacek <polacek@redhat.com>
620
621 PR c++/106784
622 * c-common.cc (c_common_reswords): Add __is_convertible and
623 __is_nothrow_convertible.
624 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
625 RID_IS_NOTHROW_CONVERTIBLE.
626
279c6715
GA
6272022-09-22 David Malcolm <dmalcolm@redhat.com>
628
629 PR c/106830
630 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
631 values that don't fit in uhwi.
632
d0fc05e8
GA
6332022-09-15 Richard Biener <rguenther@suse.de>
634
635 * c-common.h (build_void_list_node): Remove.
636 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
637 void_list_node.
638
861d1a11
GA
6392022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
640
641 * c-format.cc (convert_format_name_to_system_name): Fix warning.
642
fe2a8ce9
GA
6432022-09-07 Joseph Myers <joseph@codesourcery.com>
644
645 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
646 for alignas, alignof, bool, false, static_assert, thread_local and
647 true.
648
6492022-09-07 Jakub Jelinek <jakub@redhat.com>
650
651 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
652 " in comments" from description.
653 (Wunicode): New option.
654
25aeb922
GA
6552022-09-06 Jakub Jelinek <jakub@redhat.com>
656
657 PR c/106836
658 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
659
83f2f228
GA
6602022-09-03 Jakub Jelinek <jakub@redhat.com>
661
662 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
663 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
664 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
665 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
666
c64b0947
GA
6672022-09-02 David Malcolm <dmalcolm@redhat.com>
668
669 PR c/90885
670 * c-common.h (check_for_xor_used_as_pow): New decl.
671 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
672 * c-warn.cc (check_for_xor_used_as_pow): New.
673 * c.opt (Wxor-used-as-pow): New.
674
bb0a1556
GA
6752022-09-01 Jason Merrill <jason@redhat.com>
676
677 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
678 char8_t.
679 (braced_list_to_string): Check for char-sized elements.
680
6812022-09-01 Jakub Jelinek <jakub@redhat.com>
682
683 PR c++/106655
684 * c.opt (-Winvalid-utf8): New warning.
685 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
686 Set cpp_opts->cpp_input_charset_explicit.
687 (c_common_post_options): If -finput-charset=UTF-8 is explicit
688 in C++23, enable -Winvalid-utf8 by default and if -pedantic
689 or -pedantic-errors, make it a pedwarn.
690
542c60c4
GA
6912022-08-31 Joseph Myers <joseph@codesourcery.com>
692
693 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
694 for LABEL_DECL.
695 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
696 decl_attributes.
697 * c-common.h (do_case, c_add_case_label): Update declarations.
698 * c-lex.cc (c_common_has_attribute): For C, produce a result of
699 201910 for fallthrough and 202106 for maybe_unused.
700
16f542d6
GA
7012022-08-26 Marek Polacek <polacek@redhat.com>
702
703 PR c++/81159
704 * c.opt (Wself-move): New option.
705
7062022-08-26 Jakub Jelinek <jakub@redhat.com>
707
708 * c-common.cc (check_builtin_function_arguments): Handle
709 BUILT_IN_ISSIGNALING.
710
7112022-08-26 Jakub Jelinek <jakub@redhat.com>
712
713 PR c++/106648
714 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
715 __cpp_named_character_escapes to 202207L.
716
5d4389dc
GA
7172022-08-25 Marek Polacek <polacek@redhat.com>
718
719 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
720 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
721 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
722 (struct c_common_resword): Resize the disable member.
723 (D_C2X): Add.
724 (nullptr_node): Define.
725 (nullptr_type_node): Define.
726 (NULLPTR_TYPE_P): Define.
727 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
728 NULLPTR_TYPE.
729 (c_pretty_printer::direct_abstract_declarator): Likewise.
730 (c_pretty_printer::constant): Likewise.
731
47a61e65
GA
7322022-08-16 Tom Honermann <tom@honermann.net>
733
734 PR c++/106423
735 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
736 diagnostics in C++20 and later.
737 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
738
5cd525f0
GA
7392022-08-11 Marek Polacek <polacek@redhat.com>
740
741 PR middle-end/102633
742 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
743 suppress_warning here.
744
5f17badb
GA
7452022-08-08 Tom Honermann <tom@honermann.net>
746
747 PR preprocessor/106426
748 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
749 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
750
7512022-08-08 Tom Honermann <tom@honermann.net>
752
753 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
754 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
755 enabled.
756 * c-opts.cc (c_common_post_options): Set flag_char8_t if
757 targeting C2x.
758
4a7274dd
GA
7592022-07-31 Lewis Hyatt <lhyatt@gmail.com>
760
761 PR c++/66290
762 * c-common.h: Rename global done_lexing to
763 override_libcpp_locations.
764 * c-common.cc (c_cpp_diagnostic): Likewise.
765 * c-opts.cc (c_common_finish): Set override_libcpp_locations
766 (formerly done_lexing) immediately prior to calling cpp_finish ().
767
1e2c5f4c
GA
7682022-07-27 Lewis Hyatt <lhyatt@gmail.com>
769
770 * c-ppoutput.cc (token_streamer::stream): Update input_location
771 prior to streaming each token.
772
0e6fa997
GA
7732022-07-23 Immad Mir <mirimmad@outlook.com>
774
775 * c-attribs.cc: (c_common_attribute_table): add three new attributes
776 namely: fd_arg, fd_arg_read and fd_arg_write.
777 (handle_fd_arg_attribute): New.
778
bdc7b765
GA
7792022-07-15 Marek Polacek <polacek@redhat.com>
780
781 PR c++/104477
782 * c-common.cc (c_common_reswords): Add
783 __reference_constructs_from_temporary and
784 __reference_converts_from_temporary.
785 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
786 RID_REF_CONVERTS_FROM_TEMPORARY.
787
7882022-07-15 Jonathan Wakely <jwakely@redhat.com>
789
790 * c-format.cc (class range_label_for_format_type_mismatch):
791 Adjust to new label_text API.
792
c72d4714
GA
7932022-07-11 Lewis Hyatt <lhyatt@gmail.com>
794
795 PR preprocessor/106252
796 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
797 option argument prior to verifying the option was found.
798
6345c414
GA
7992022-07-07 David Malcolm <dmalcolm@redhat.com>
800
801 * c-format.cc (range_label_for_format_type_mismatch::get_text):
802 Update for removal of label_text::maybe_free in favor of automatic
803 memory management.
804
4bc92c3b
GA
8052022-07-06 Lewis Hyatt <lhyatt@gmail.com>
806
807 PR preprocessor/53920
808 PR c++/53431
809 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
810 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
811 (c_pp_stream_token): Declare.
812 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
813 pragmas to...
814 (should_output_pragmas): ...here. New function.
815 (token_streamer::stream): Support handling early pragmas.
816 (do_line_change): Likewise.
817 (c_pp_stream_token): New function.
818 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
819 (pragma_diagnostic_lex_normal): New function. Moved logic for
820 interpreting GCC diagnostic pragmas here.
821 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
822 directly from libcpp.
823 (handle_pragma_diagnostic): Refactor into helper function...
824 (handle_pragma_diagnostic_impl): ...here. New function.
825 (handle_pragma_diagnostic_early): New function.
826 (handle_pragma_diagnostic_early_pp): New function.
827 (struct pragma_ns_name): Renamed to...
828 (struct pragma_pp_data): ...this. Add new "early_handler" member.
829 (c_register_pragma_1): Support early pragmas in the preprocessor.
830 (c_register_pragma_with_early_handler): New function.
831 (c_register_pragma): Support the new early handlers in struct
832 internal_pragma_handler.
833 (c_register_pragma_with_data): Likewise.
834 (c_register_pragma_with_expansion): Likewise.
835 (c_register_pragma_with_expansion_and_data): Likewise.
836 (c_invoke_early_pragma_handler): New function.
837 (c_pp_invoke_early_pragma_handler): New function.
838 (init_pragma): Add early pragma support for diagnostic pragmas.
839 * c-pragma.h (struct internal_pragma_handler): Add new early handler
840 members.
841 (c_register_pragma_with_early_handler): Declare.
842 (c_invoke_early_pragma_handler): Declare.
843 (c_pp_invoke_early_pragma_handler): Declare.
844
d1f3a3ff
GA
8452022-07-05 Marek Polacek <polacek@redhat.com>
846
847 PR c++/105626
848 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
849 u8 strings.
850
ed974488
GA
8512022-07-01 Marek Polacek <polacek@redhat.com>
852
853 PR c++/106111
854 * c-common.h (enum rid): Update RID_LAST_CXX20.
855
976196b3
GA
8562022-06-30 Jonathan Wakely <jwakely@redhat.com>
857
858 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
859 names.
860
84c2131d
GA
8612022-06-24 Jason Merrill <jason@redhat.com>
862
863 PR c++/87729
864 PR c++/20423
865 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
866
4390e7bf
GA
8672022-06-18 Jakub Jelinek <jakub@redhat.com>
868
869 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
870 Use flag_sanitize_trap & SANITIZE_??? instead of
871 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
872 and flag_sanitize_trap differs for them, emit __builtin_trap only
873 for the comparison where trap is requested.
874 (ubsan_instrument_vla, ubsan_instrument_return): Use
875 lag_sanitize_trap & SANITIZE_??? instead of
876 flag_sanitize_undefined_trap_on_error.
877
c3642271
GA
8782022-06-13 Jason Merrill <jason@redhat.com>
879
880 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
881
d9176e64
GA
8822022-05-27 Marek Polacek <polacek@redhat.com>
883
884 PR c/90658
885 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
886
8872022-05-27 Jakub Jelinek <jakub@redhat.com>
888
889 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
890
57f2ce6a
GA
8912022-05-20 David Malcolm <dmalcolm@redhat.com>
892
893 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
894 and "override".
895 * c-pretty-print.h: Likewise.
896
1cda629f
GA
8972022-05-18 Marek Polacek <polacek@redhat.com>
898
899 PR c/105131
900 * c.opt (Wenum-int-mismatch): New.
901
9022022-05-18 Marek Polacek <polacek@redhat.com>
903
904 PR c++/105497
905 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
906 enumerator when it was marked with attribute unused.
907
9082022-05-18 Eric Botcazou <ebotcazou@adacore.com>
909
910 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
911 floating-point complex types.
912 <POINTER_TYPE>: Do not use limited_with clause if the designated
913 type is a scalar type.
914
3d9439b1
GA
9152022-05-17 Jakub Jelinek <jakub@redhat.com>
916
917 * c-omp.cc (c_finish_omp_depobj): Handle
918 OMP_CLAUSE_DEPEND_INOUTSET.
919
702bd11f
GA
9202022-05-16 Jason Merrill <jason@redhat.com>
921
922 PR c/105492
923 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
924 here.
925
9262022-05-16 Martin Liska <mliska@suse.cz>
927
928 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
929 (c_common_nodes_and_builtins): Likewise.
930 * c-format.cc (check_tokens): Likewise.
931 (check_plain): Likewise.
932 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
933 (init_pragma): Likewise.
934 * known-headers.cc (get_string_macro_hint): Likewise.
935 (get_stdlib_header_for_name): Likewise.
936 * c-attribs.cc: Likewise.
937
9df4ffe4
GA
9382022-05-13 Richard Biener <rguenther@suse.de>
939
940 * c-omp.cc: Remove gimple-fold.h include.
941
49ace834
GA
9422022-05-12 Jakub Jelinek <jakub@redhat.com>
943
944 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
945 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
946 if null_pointer_node.
947
d0d513b5
GA
9482022-05-11 Martin Liska <mliska@suse.cz>
949
950 PR target/105355
951 * c-opts.cc (c_common_handle_option): Change option name.
952 * c.opt: Remove Joined and use Separate option.
953
bd022ff9
GA
9542022-05-09 Alex Coplan <alex.coplan@arm.com>
955
956 * c-common.h (get_dump_info): Delete.
957 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
958 from the global dump_manager instead of the (now obsolete)
959 get_dump_info.
960 * c-opts.cc (original_dump_file): Delete.
961 (original_dump_flags): Delete.
962 (c_common_parse_file): Switch to using global dump_manager to
963 manage the original dump file; fix leak of dump file.
964 (get_dump_info): Delete.
965
a1947c92
GA
9662022-05-07 Marek Polacek <polacek@redhat.com>
967
968 PR c++/101833
969 PR c++/47634
970 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
971 with FN being either a function declaration or function type. Use
972 maybe_adjust_arg_pos_for_attribute.
973 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
974 check_function_format.
975 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
976 (positional_argument): Adjust.
977 * c-format.cc (get_constant): Rename to ...
978 (validate_constant): ... this. Take EXPR by reference. Return bool
979 instead of tree.
980 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
981 return value of validate_constant.
982 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
983 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
984 (check_function_format): Adjust a parameter name.
985 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
986
3e7db517
GA
9872022-05-04 Marek Polacek <polacek@redhat.com>
988
989 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
990 char to int.
991
95874f95
GA
9922022-04-30 Jason Merrill <jason@redhat.com>
993
994 PR c/100545
995 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
996 and typedef.
997 * c-common.cc (set_underlying_type): Add assert.
998
01ad093b
GA
9992022-04-26 Patrick Palka <ppalka@redhat.com>
1000
1001 PR c++/105304
1002 * c-common.cc (verify_tree) [restart]: Move up to before the
1003 NULL test.
1004
da066c42
GA
10052022-04-11 Jakub Jelinek <jakub@redhat.com>
1006
1007 PR c++/105186
1008 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1009 and __int%d__ builtin types, initialize corresponding ridpointers
1010 entry.
1011
150ab50f
GA
10122022-03-30 Marek Polacek <polacek@redhat.com>
1013
1014 PR c++/101030
1015 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1016 conversion_warning when OP1 is null.
1017
10182022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1019
1020 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1021 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1022 option properties.
1023
10242022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1025
1026 * c.opt (Wuse-after-free): Remove.
1027
10282022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1029
1030 * c.opt (Warray-bounds): Remove.
1031
d2906412
GA
10322022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1033
1034 * c.opt: Properly quote comment.
1035
31e989a2
GA
10362022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1037
1038 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1039 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1040 the referenced type instead. Deal with the anonymous original type
1041 of a typedef'ed type. In the actual access case, follow the chain
1042 of external subtypes.
1043 <TYPE_DECL>: Tidy up control flow.
1044
d156bb87
GA
10452022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1046
1047 * c-ada-spec.cc: Change array length
1048
d7f00da1
GA
10492022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1050
1051 * c-common.cc (c_family_tests): Call the new tests.
1052 * c-common.h (c_diagnostic_tests): Declare.
1053 (c_opt_problem_cc_tests): Likewise.
1054
10552022-03-19 Jakub Jelinek <jakub@redhat.com>
1056
1057 PR c++/101515
1058 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1059 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1060 be printed.
1061
9fc8f278
GA
10622022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1063 Roger Sayle <roger@nextmovesoftware.com>
1064
1065 PR c/98198
1066 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1067
10682022-03-16 Patrick Palka <ppalka@redhat.com>
1069
1070 PR c++/96780
1071 * c.opt: Add -ffold-simple-inlines.
1072
b9756c08
GA
10732022-03-13 Tobias Burnus <tobias@codesourcery.com>
1074
1075 * c-target.def (check_string_object_format_arg): Fix description typo.
1076
57eeedda
GA
10772022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1078
1079 PR other/65095
1080 * c-common.h (c_omp_map_clause_name): Remove.
1081 * c-omp.cc (c_omp_map_clause_name): Remove.
1082
8cc4f9cd
GA
10832022-03-09 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c/104711
1086 * c-opts.cc (c_common_post_options): Don't enable
1087 -Wshift-negative-value from -Wextra for C++20 or later.
1088 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1089 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1090 instead of TYPE_UNSIGNED.
1091
e6533e2e
GA
10922022-03-07 Jakub Jelinek <jakub@redhat.com>
1093
1094 * c-attribs.cc: Fix up duplicated word issue in a comment.
1095
12d4552e
GA
10962022-03-01 Martin Liska <mliska@suse.cz>
1097
1098 PR ipa/104533
1099 * c-attribs.cc (handle_target_clones_attribute): Use
1100 get_target_clone_attr_len and report warning soon.
1101
0bdb0498
GA
11022022-02-17 Jonathan Wakely <jwakely@redhat.com>
1103
1104 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1105 (handle_pragma_weak): Likewise.
1106 (handle_pragma_scalar_storage_order): Likewise.
1107 (handle_pragma_redefine_extname): Likewise.
1108 (handle_pragma_visibility): Likewise.
1109 (handle_pragma_diagnostic): Likewise.
1110 (handle_pragma_target): Likewise.
1111 (handle_pragma_optimize): Likewise.
1112 (handle_pragma_push_options): Likewise.
1113 (handle_pragma_pop_options): Likewise.
1114 (handle_pragma_reset_options): Likewise.
1115 (handle_pragma_message): Likewise.
1116 (handle_pragma_float_const_decimal64): Likewise.
1117
cb3afcd2
GA
11182022-02-16 Jakub Jelinek <jakub@redhat.com>
1119
1120 PR c/104531
1121 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1122 build_binary_op with LT_EXPR and only if that doesn't return
1123 error_mark_node call build_modify_expr.
1124
11252022-02-16 Jakub Jelinek <jakub@redhat.com>
1126
1127 PR c/104510
1128 * c-common.cc (shorten_compare): Convert original arguments to
1129 the original *restype_ptr when mixing binary and decimal float.
1130
1f8a09d2
GA
11312022-02-14 Richard Biener <rguenther@suse.de>
1132
1133 PR c/104505
1134 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1135 internal function calls.
1136
e8d68f0a
GA
11372022-02-11 Richard Biener <rguenther@suse.de>
1138
1139 * c-attribs.cc (c_common_attribute_table): Add entry for
1140 vector_mask.
1141 (handle_vector_mask_attribute): New.
1142
a645583d
GA
11432022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1144
1145 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1146 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1147 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1148
3adf509f
GA
11492022-02-09 Jason Merrill <jason@redhat.com>
1150
1151 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1152 of __cpp_constexpr and __cpp_concepts for C++20.
1153
bb99171b
GA
11542022-01-24 Marek Polacek <polacek@redhat.com>
1155
1156 PR preprocessor/104030
1157 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1158
9dd44357
GA
11592022-01-21 Jakub Jelinek <jakub@redhat.com>
1160
1161 PR c++/104148
1162 * c-common.h (check_function_arguments_recurse): Add for_format
1163 arg.
1164 * c-common.cc (check_function_nonnull): Pass false to
1165 check_function_arguments_recurse's last argument.
1166 (check_function_arguments_recurse): Add for_format argument,
1167 if true, don't stop on warning_suppressed_p.
1168 * c-format.cc (check_format_info): Pass true to
1169 check_function_arguments_recurse's last argument.
1170
fe1ad141
GA
11712022-01-19 David Malcolm <dmalcolm@redhat.com>
1172
1173 * c-common.cc (c_common_c_tests): Rename to...
1174 (c_common_cc_tests): ...this.
1175 (c_family_tests): Update calls for .c to .cc renaming.
1176 * c-common.h (c_format_c_tests): Rename to...
1177 (c_format_cc_tests): ...this.
1178 (c_indentation_c_tests): Rename to...
1179 (c_indentation_cc_tests): ...this.
1180 (c_pretty_print_c_tests): Rename to...
1181 (c_pretty_print_cc_tests): ...this.
1182 * c-format.cc (c_format_c_tests): Rename to...
1183 (c_format_cc_tests): ...this.
1184 * c-indentation.cc (c_indentation_c_tests): Rename to...
1185 (c_indentation_cc_tests): ...this.
1186 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1187 (c_pretty_print_cc_tests): ...this.
1188
fc829782
GA
11892022-01-17 Martin Liska <mliska@suse.cz>
1190
1191 * c-ada-spec.cc: Rename .c names to .cc.
1192 * c-ada-spec.h: Likewise.
1193 * c-common.cc (c_build_vec_convert): Likewise.
1194 (warning_candidate_p): Likewise.
1195 * c-common.h (enum rid): Likewise.
1196 (build_real_imag_expr): Likewise.
1197 (finish_label_address_expr): Likewise.
1198 (c_get_substring_location): Likewise.
1199 (c_build_bind_expr): Likewise.
1200 (conflict_marker_get_final_tok_kind): Likewise.
1201 (c_parse_error): Likewise.
1202 (check_missing_format_attribute): Likewise.
1203 (invalid_array_size_error): Likewise.
1204 (warn_for_multistatement_macros): Likewise.
1205 (build_attr_access_from_parms): Likewise.
1206 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1207 * c-format.cc: Likewise.
1208 * c-gimplify.cc (c_gimplify_expr): Likewise.
1209 * c-indentation.h: Likewise.
1210 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1211 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1212 * c-opts.cc (c_common_post_options): Likewise.
1213 (set_std_cxx23): Likewise.
1214 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1215 * c-pretty-print.h: Likewise.
1216
12172022-01-17 Martin Liska <mliska@suse.cz>
1218
1219 * c-ada-spec.c: Moved to...
1220 * c-ada-spec.cc: ...here.
1221 * c-attribs.c: Moved to...
1222 * c-attribs.cc: ...here.
1223 * c-common.c: Moved to...
1224 * c-common.cc: ...here.
1225 * c-cppbuiltin.c: Moved to...
1226 * c-cppbuiltin.cc: ...here.
1227 * c-dump.c: Moved to...
1228 * c-dump.cc: ...here.
1229 * c-format.c: Moved to...
1230 * c-format.cc: ...here.
1231 * c-gimplify.c: Moved to...
1232 * c-gimplify.cc: ...here.
1233 * c-indentation.c: Moved to...
1234 * c-indentation.cc: ...here.
1235 * c-lex.c: Moved to...
1236 * c-lex.cc: ...here.
1237 * c-omp.c: Moved to...
1238 * c-omp.cc: ...here.
1239 * c-opts.c: Moved to...
1240 * c-opts.cc: ...here.
1241 * c-pch.c: Moved to...
1242 * c-pch.cc: ...here.
1243 * c-ppoutput.c: Moved to...
1244 * c-ppoutput.cc: ...here.
1245 * c-pragma.c: Moved to...
1246 * c-pragma.cc: ...here.
1247 * c-pretty-print.c: Moved to...
1248 * c-pretty-print.cc: ...here.
1249 * c-semantics.c: Moved to...
1250 * c-semantics.cc: ...here.
1251 * c-ubsan.c: Moved to...
1252 * c-ubsan.cc: ...here.
1253 * c-warn.c: Moved to...
1254 * c-warn.cc: ...here.
1255 * cppspec.c: Moved to...
1256 * cppspec.cc: ...here.
1257 * stub-objc.c: Moved to...
1258 * stub-objc.cc: ...here.
1259
9248ee41
GA
12602022-01-15 Martin Sebor <msebor@redhat.com>
1261
1262 PR c/63272
1263 * c.opt (-Wdangling-pointer): New option.
1264
12652022-01-15 Martin Sebor <msebor@redhat.com>
1266
1267 PR tree-optimization/80532
1268 * c.opt (-Wuse-after-free): New options.
1269
617db51d
GA
12702022-01-14 David Malcolm <dmalcolm@redhat.com>
1271
1272 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1273 (handle_tainted_args_attribute): New.
1274
ad3f0d08
GA
12752022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1276 Jason Merrill <jason@redhat.com>
1277
1278 PR c++/70417
1279 * c.opt: Added -Wmissing-template-keyword.
1280
12812022-01-13 Richard Biener <rguenther@suse.de>
1282
1283 PR c/104002
1284 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1285
02a8a01b
GA
12862022-01-12 Martin Liska <mliska@suse.cz>
1287
1288 PR target/103804
1289 * c-attribs.c (handle_optimize_attribute): Do not call
1290 cl_optimization_compare if we seen an error.
1291
01a254e3
GA
12922022-01-11 Jakub Jelinek <jakub@redhat.com>
1293
1294 PR c/101537
1295 PR c/103881
1296 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1297 and BIT_XOR_EXPR.
1298
d9450aa0
GA
12992022-01-10 Richard Biener <rguenther@suse.de>
1300
1301 PR middle-end/101530
1302 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1303 in a TARGET_EXPR to force a temporary.
1304
11ce8d04
GA
13052022-01-06 Marek Polacek <polacek@redhat.com>
1306
1307 PR c++/103758
1308 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1309 diagnostic messages.
1310 (handle_pragma_diagnostic): Likewise.
1311
a4ae8c37
GA
13122022-01-03 Marek Polacek <polacek@redhat.com>
1313
1314 PR c++/103758
1315 * c-format.c (check_tokens): Accept "decl-specifier*".
1316
13172022-01-03 Jakub Jelinek <jakub@redhat.com>
1318
1319 PR c++/103600
1320 * c-attribs.c (handle_non_overlapping_attribute): New function.
1321 (c_common_attribute_table): Add "non overlapping" attribute.
1322
84790a9d
GA
13232021-12-30 Jakub Jelinek <jakub@redhat.com>
1324
1325 PR c++/103012
1326 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1327 cpp_define_unused/cpp_undef calls with forced token locations
1328 BUILTINS_LOCATION.
1329
d1e111da
GA
13302021-12-27 Patrick Palka <ppalka@redhat.com>
1331
1332 PR c++/103700
1333 * c-common.c (pointer_int_sum): When quiet, return
1334 error_mark_node for an incomplete pointed-to type and don't
1335 call size_in_bytes_loc.
1336
2554e2da
GA
13372021-12-17 Jason Merrill <jason@redhat.com>
1338
1339 PR c++/103681
1340 * c-opts.c (c_common_post_options): Update defaults.
1341
774269aa
GA
13422021-12-16 Martin Liska <mliska@suse.cz>
1343
1344 PR target/103709
1345 * c-pragma.c (handle_pragma_pop_options): Do not check
1346 global options modification when an error is seen in parsing
1347 of options (pragmas or attributes).
1348
c8dcf64b
GA
13492021-12-12 Jonathan Wakely <jwakely@redhat.com>
1350
1351 * known-headers.cc: Define INCLUDE_MEMORY instead of
1352 INCLUDE_UNIQUE_PTR.
1353 * name-hint.h: Likewise.
1354 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1355
4b4839e3
GA
13562021-12-09 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR pch/71934
1359 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1360 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1361
03a9bd05
GA
13622021-12-03 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR pch/71934
1365 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1366 (pch_init): Don't initialize v.pch_init.
1367 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1368
40fa651e
GA
13692021-12-01 Jason Merrill <jason@redhat.com>
1370
1371 PR c++/103310
1372 * c.opt: Add -fconstexpr-fp-except.
1373
87cd82c8
GA
13742021-11-29 Richard Biener <rguenther@suse.de>
1375
1376 * c-format.c (check_format_string): Remove spurious
1377 gcc_unreachable.
1378
13792021-11-29 Richard Biener <rguenther@suse.de>
1380
1381 * c-opts.c (c_common_post_options): Remove unreachable return.
1382 * c-pragma.c (handle_pragma_target): Likewise.
1383 (handle_pragma_optimize): Likewise.
1384
091ccc06
GA
13852021-11-25 Jakub Jelinek <jakub@redhat.com>
1386
1387 PR c++/102611
1388 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1389 default for C++23 regardless of warn_deprecated.
1390 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1391 __cpp_multidimensional_subscript=202110L for C++23.
1392
e1d43592
GA
13932021-11-23 Martin Sebor <msebor@redhat.com>
1394
1395 PR middle-end/88232
1396 * c.opt: Add -Winfinite-recursion.
1397
9c077398
GA
13982021-11-19 Martin Sebor <msebor@redhat.com>
1399
1400 PR c++/33925
1401 PR c/102867
1402 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1403 and improve handling tof defined symbols.
1404
14052021-11-19 Martin Liska <mliska@suse.cz>
1406
1407 Revert:
1408 2021-11-18 Martin Liska <mliska@suse.cz>
1409
1410 * c-gimplify.c (genericize_c_loop): Use option directly.
1411
483092d3
GA
14122021-11-18 Matthias Kretz <m.kretz@gsi.de>
1413
1414 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1415 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1416
14172021-11-18 Martin Liska <mliska@suse.cz>
1418
1419 * c-gimplify.c (genericize_c_loop): Use option directly.
1420
280d2838
GA
14212021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1422
1423 PR c/91038
1424 PR c/29970
1425 * c-common.c (pointer_int_sum): Make sure pointer expressions
1426 are evaluated first when the size expression depends on for
1427 variably-modified types.
1428
14292021-11-17 Marek Polacek <polacek@redhat.com>
1430
1431 PR preprocessor/103026
1432 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1433
6b1695f4
GA
14342021-11-16 Jason Merrill <jason@redhat.com>
1435
1436 * c-common.c (release_tree_vector): Only cache vecs smaller than
1437 16 elements.
1438
e2b57363
GA
14392021-11-15 Jason Merrill <jason@redhat.com>
1440
1441 * c.opt: Add -fimplicit-constexpr.
1442 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1443 * c-opts.c (c_common_post_options): Disable below C++14.
1444
14452021-11-15 Jakub Jelinek <jakub@redhat.com>
1446
1447 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1448 Duplicate to both OMP_TARGET and OMP_TEAMS.
1449
8d36a0d2
GA
14502021-11-10 Marek Polacek <polacek@redhat.com>
1451
1452 PR c++/101940
1453 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1454 ignored_attributes.
1455
c9b1334e
GA
14562021-11-09 David Malcolm <dmalcolm@redhat.com>
1457
1458 * c-pragma.c (GCC_BAD_AT): New macro.
1459 (GCC_BAD2_AT): New macro.
1460 (handle_pragma_pack): Use the location of the pertinent token when
1461 issuing diagnostics about invalid constants/actions, and trailing
1462 junk.
1463 (handle_pragma_target): Likewise for non-string "GCC option".
1464 (handle_pragma_message): Likewise for trailing junk.
1465
18ae471f
GA
14662021-11-03 Joseph Myers <joseph@codesourcery.com>
1467
1468 PR c/103031
1469 * c-common.c (convert_and_check): Add argument init_const. Call
1470 convert_init if init_const.
1471 * c-common.h (convert_and_check): Update prototype.
1472 (convert_init): New prototype.
1473
cf82e8d9
GA
14742021-11-01 David Malcolm <dmalcolm@redhat.com>
1475
1476 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1477 CPP_OTHER tokens, set the "escape on output" flag.
1478
04a2cf3f
GA
14792021-10-27 Jakub Jelinek <jakub@redhat.com>
1480
1481 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1482 POINTER_PLUS_EXPR.
1483 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1484 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1485
14862021-10-27 Jakub Jelinek <jakub@redhat.com>
1487
1488 PR c++/102854
1489 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1490 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1491 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1492 conversions temporarily clear the 3rd bit from d->kind while walking
1493 subtrees.
1494 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1495 if possibly non-rectangular.
1496
ae5c5406
GA
14972021-10-21 Jakub Jelinek <jakub@redhat.com>
1498
1499 PR middle-end/64888
1500 * c-omp.c (c_omp_predefined_variable): Return true also for
1501 ubsan_create_data created artificial variables.
1502
5d5885c9
GA
15032021-10-14 Joseph Myers <joseph@codesourcery.com>
1504
1505 * c-format.c (printf_length_specs, scanf_length_specs)
1506 (print_char_table, scan_char_table): Support DFP formats for C2X.
1507 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1508 (T2X_D32, T2X_D64, T2X_D128): New macros.
1509
15102021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1511
1512 * c-omp.c (c_omp_check_context_selector): Rename to
1513 omp_check_context_selector and move to omp-general.c.
1514 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1515 move to omp-general.c.
1516
52055987
GA
15172021-10-12 Joseph Myers <joseph@codesourcery.com>
1518
1519 * c-format.c (print_char_table): Add %b and %B formats.
1520 (scan_char_table): Add %b format.
1521 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1522 (T2X_UPD, T2X_UIM): New macros.
1523
15242021-10-12 Jakub Jelinek <jakub@redhat.com>
1525
1526 * c-omp.c (c_finish_omp_atomic): Use
1527 clear_padding_type_may_have_padding_p.
1528
ce6eec39
GA
15292021-10-08 Martin Liska <mliska@suse.cz>
1530
1531 * c-opts.c (c_common_post_options): Use new macro
1532 OPTION_SET_P.
1533
50e20ee6
GA
15342021-10-07 Martin Liska <mliska@suse.cz>
1535
1536 * c-common.c (parse_optimize_options): Make
1537 save_opt_decoded_options a pointer type.
1538
57c7ec62
GA
15392021-10-06 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR tree-optimization/102571
1542 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1543 padding, but the non-padding bits are contiguous set of bytes
1544 by adjusting the memcmp call arguments instead of emitting
1545 __builtin_clear_padding and then comparing all the type's bytes.
1546
15472021-10-06 Jakub Jelinek <jakub@redhat.com>
1548
1549 PR c++/102612
1550 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1551 __cpp_constexpr to 202110L rather than 201907L.
1552
da9c5f78
GA
15532021-10-04 Marek Polacek <polacek@redhat.com>
1554
1555 PR c++/97573
1556 * c-common.h (do_warn_array_compare): Declare.
1557 * c-warn.c (do_warn_array_compare): New.
1558 * c.opt (Warray-compare): New option.
1559
e3e07b89
GA
15602021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1561
1562 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1563 NULL, this is not needed.
1564
9d116bcc
GA
15652021-10-01 Martin Sebor <msebor@redhat.com>
1566
1567 PR c/102103
1568 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1569 Check and perform warning suppression.
1570 (c_common_truthvalue_conversion): Enhance warning suppression.
1571
15722021-10-01 Martin Liska <mliska@suse.cz>
1573
1574 PR target/102552
1575 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1576 used for program name, so merged_decoded_options should also
1577 respect that.
9d116bcc
GA
1578
15792021-10-01 Jakub Jelinek <jakub@redhat.com>
1580 Richard Biener <rguenther@suse.de>
1581
1582 PR sanitizer/102515
1583 * c-ubsan.c (ubsan_instrument_division): Check the right
1584 flag_sanitize_recover bit, depending on which sanitization
1585 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1586 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1587 and SANITIZE_DIVIDE is enabled, neither check is known
1588 to be false and flag_sanitize_recover bits for those two
1589 aren't the same, emit both __ubsan_handle_divrem_overflow
1590 and __ubsan_handle_divrem_overflow_abort calls.
1591
15922021-10-01 Martin Liska <mliska@suse.cz>
1593
1594 * c-common.c (parse_optimize_options): Combine optimize
1595 options with what was provided on the command line.
1596
15972021-10-01 Jakub Jelinek <jakub@redhat.com>
1598
1599 * c-omp.c (c_omp_split_clauses): Also copy
1600 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1601
cf966403
GA
16022021-09-27 Martin Liska <mliska@suse.cz>
1603
1604 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1605 x_flag_default_complex_method.
cf966403 1606
e4777439
GA
16072021-09-22 Jakub Jelinek <jakub@redhat.com>
1608
1609 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1610
62498024
GA
16112021-09-20 Matthias Kretz <m.kretz@gsi.de>
1612
1613 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1614 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1615 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1616 __ROUNDING_MATH__ according to the new optimization flags.
1617
cf74e7b5
GA
16182021-09-18 Jakub Jelinek <jakub@redhat.com>
1619
1620 * c-omp.c (c_omp_split_clauses): Split order clause also to
1621 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1622
0a4cb439
GA
16232021-09-17 Jakub Jelinek <jakub@redhat.com>
1624
1625 * c-omp.c (c_finish_omp_atomic): Avoid creating
1626 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1627 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1628 had NULL initializer. When omitting operands after v = x,
1629 use type of v rather than type of x. Fix type of vtmp
1630 TARGET_EXPR.
1631
07985c47
GA
16322021-09-13 Jason Merrill <jason@redhat.com>
1633
1634 * c.opt: Add -Winterference-size.
1635 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1636 and __GCC_CONSTRUCTIVE_SIZE.
1637
a26206ec
GA
16382021-09-10 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1641 * c-omp.c: Include gimple-fold.h.
1642 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1643 OpenMP 5.1 atomics.
1644
f84e2f0b
GA
16452021-09-09 qing zhao <qing.zhao@oracle.com>
1646
1647 * c-attribs.c (handle_uninitialized_attribute): New function.
1648 (c_common_attribute_table): Add "uninitialized" attribute.
1649
b6db7cd4
GA
16502021-09-08 liuhongt <hongtao.liu@intel.com>
1651
1652 * c-common.c (excess_precision_mode_join): Update below comments.
1653 (c_ts18661_flt_eval_method): Set excess_precision_type to
1654 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1655 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1656 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1657 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1658
b2748138
GA
16592021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1660
1661 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1662
7b739540
GA
16632021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1664
1665 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1666 and -gnatwu warning for the package specification.
1667
e11c6046
GA
16682021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1669
1670 * c-attribs.c (handle_unavailable_attribute): New.
1671
1e2f030b
GA
16722021-08-30 Jason Merrill <jason@redhat.com>
1673
1674 * c.opt: Add -Wmissing-requires.
1675
85d77ac4
GA
16762021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1677
1678 PR other/93067
1679 * c-opts.c (c_common_input_charset_cb): New function.
1680 (c_common_post_options): Call new function
1681 diagnostic_initialize_input_context().
1682
7c9e1645
GA
16832021-08-20 Tobias Burnus <tobias@codesourcery.com>
1684
1685 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1686 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1687 "di" and "u", respecitively; fill with BADLEN to match
1688 size of 'types'.
1689 (get_init_dynamic_hwi): Split off from ...
1690 (init_dynamic_diag_info): ... here. Call it.
1691 (init_dynamic_gfc_info): Call it.
1692
16932021-08-20 Jakub Jelinek <jakub@redhat.com>
1694
1695 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1696 * c-pragma.c (omp_pragmas): Add error directive.
1697 * c-omp.c (omp_directives): Uncomment error directive entry.
1698
6e529985
GA
16992021-08-18 Jakub Jelinek <jakub@redhat.com>
1700
1701 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1702 * c-pragma.c (omp_pragmas): Add nothing directive.
1703 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1704
2d14d64b
GA
17052021-08-17 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR c++/101539
1708 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1709 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1710
17112021-08-17 Matt Jacobson <mhjacobson@me.com>
1712
1713 * c-opts.c (c_common_post_options): Default to
1714 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1715
17162021-08-17 Jakub Jelinek <jakub@redhat.com>
1717
1718 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1719 * c-pragma.c (omp_pragmas): Add scope construct.
1720 * c-omp.c (omp_directives): Uncomment scope directive entry.
1721
9d1d9fc8
GA
17222021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1723
1724 * c-cppbuiltin.c (c_cpp_builtins): Define
1725 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1726
72be20e2
GA
17272021-08-12 Jakub Jelinek <jakub@redhat.com>
1728
1729 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1730 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1731 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1732 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1733 enumerator.
1734 (c_finish_omp_masked): Declare.
1735 * c-omp.c (c_finish_omp_masked): New function.
1736 (c_omp_split_clauses): Handle combined masked constructs.
1737
4d17ca1b
GA
17382021-07-30 Jakub Jelinek <jakub@redhat.com>
1739
1740 PR c++/101539
1741 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1742 * c-common.c (c_common_reswords): Add
1743 __is_pointer_interconvertible_base_of.
1744
17452021-07-29 Richard Biener <rguenther@suse.de>
1746
1747 PR c/101512
1748 * c-common.c (c_common_mark_addressable_vec): Look through
1749 C_MAYBE_CONST_EXPR even if not at the toplevel.
1750
af3f12e6
GA
17512021-07-27 Martin Sebor <msebor@redhat.com>
1752
1753 PR c/101585
1754 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1755
ead235f6
GA
17562021-07-23 Jakub Jelinek <jakub@redhat.com>
1757
1758 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1759 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1760 and later.
1761
17622021-07-23 Jakub Jelinek <jakub@redhat.com>
1763
1764 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1765 PRAGMA_OMP__LAST_ enumerators.
1766
419c6c68
GA
17672021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1768 Joseph Myers <joseph@codesourcery.com>
1769 Cesar Philippidis <cesar@codesourcery.com>
1770
1771 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1772
92d45509
GA
17732021-07-20 Martin Sebor <msebor@redhat.com>
1774
1775 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1776 by-const-reference.
1777 * c-common.h (c_build_shufflevector): Same.
1778
87277b6a
GA
17792021-07-16 Andrew Pinski <apinski@marvell.com>
1780
1781 PR c/101453
1782 * c-common.c (parse_optimize_options): Use the correct
1783 size for buffer.
1784
d97d71a1
GA
17852021-07-15 Martin Sebor <msebor@redhat.com>
1786
1787 PR c/101289
1788 PR c/97548
1789 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1790
c4fee1c6
GA
17912021-07-14 Jason Merrill <jason@redhat.com>
1792
1793 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1794
6fba0eea
GA
17952021-07-06 Martin Sebor <msebor@redhat.com>
1796
1797 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1798 (gcc_cdiag_char_table): Same.
1799 (gcc_cxxdiag_char_table): Same.
6fba0eea 1800
7a60a6e8
GA
18012021-07-02 Jakub Jelinek <jakub@redhat.com>
1802
1803 * c-common.h (enum c_omp_directive_kind): New enum.
1804 (struct c_omp_directive): New type.
1805 (c_omp_categorize_directive): Declare.
1806 * c-omp.c (omp_directives): New variable.
1807 (c_omp_categorize_directive): New function.
1808
bea7c16a
GA
18092021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1810
1811 * c-ada-spec.c (packed_layout): New global variable.
1812 (dump_ada_declaration): Set it upon seeing a packed record type.
1813 Do not put the "aliased" keyword if it is set.
1814 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1815
18162021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1817
1818 * c-ada-spec.c (check_name): Rename into...
1819 (check_type_name_conflict): ...this. Minor tweak.
1820 (dump_ada_function_declaration): Adjust to above renaming.
1821 (dump_ada_array_domains): Fix oversight.
1822 (dump_ada_declaration): Call check_type_name_conflict for variables.
1823
90708f87
GA
18242021-06-25 Martin Sebor <msebor@redhat.com>
1825
1826 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1827 (c_common_truthvalue_conversion): Replace direct uses of
1828 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1829 copy_no_warning.
1830 (check_function_arguments_recurse): Same.
1831 * c-gimplify.c (c_gimplify_expr): Same.
1832 * c-warn.c (overflow_warning): Same.
1833 (warn_logical_operator): Same.
1834 (warn_if_unused_value): Same.
1835 (do_warn_unused_parameter): Same.
1836
9aa8327e
GA
18372021-06-24 Jakub Jelinek <jakub@redhat.com>
1838
1839 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1840 C_ORT_OMP_TARGET.
1841 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1842 combined target constructs also add map (always, tofrom:) clause.
1843
ede6c356
GA
18442021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1845
1846 * c-attribs.c (common_handle_aligned_attribute): Remove short
1847 circuit and dead code.
1848
8dc48181
GA
18492021-06-14 Jonathan Wakely <jwakely@redhat.com>
1850
1851 PR c++/101052
1852 * known-headers.cc (get_stdlib_header_for_name): Add known
1853 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1854 exit, and getenv.
1855
8b8c3912
GA
18562021-06-12 Jason Merrill <jason@redhat.com>
1857
1858 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1859
f16f65f8
GA
18602021-06-11 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR c++/100974
1863 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1864 -std=c++2b for P1938R3 consteval if support.
1865
4f625f47
GA
18662021-06-09 Jason Merrill <jason@redhat.com>
1867
1868 PR c++/100879
1869 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1870 warning.
1871
438aac59
GA
18722021-06-07 Martin Liska <mliska@suse.cz>
1873
1874 * c-target.def: Split long lines and replace them
1875 with '\n\'.
1876
600f90cb
GA
18772021-06-04 Martin Sebor <msebor@redhat.com>
1878
1879 PR c/100783
1880 * c-attribs.c (positional_argument): Bail on erroneous types.
1881
18822021-06-04 Martin Sebor <msebor@redhat.com>
1883
1884 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1885 for element presence.
1886
440c8a0a
GA
18872021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1888
1889 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1890 (dump_ada_decl_name): Likewise.
1891 (dump_anonymous_type_name): Remove parent parameter and adjust.
1892 (dump_sloc): Minor tweak.
1893 (dump_ada_array_type): Remove type parameter and adjust.
1894 (dump_ada_enum_type): Remove parent parameter and adjust.
1895 (dump_ada_node): Adjust calls to above functions.
1896 (dumped_anonymous_types): New global variable.
1897 (dump_nested_types_1): Rename into...
1898 (dump_nested_types): ...this.
1899 (dump_nested_type): Remove parent and dumped_types parameters.
1900 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1901 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1902 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1903
19042021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1905
1906 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1907 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1908
19092021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1910
1911 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1912 (htable_t): New typedef.
1913 (overloaded_names): Use it.
1914 (add_name): New function.
1915 (init_overloaded_names): Use add_name to populate the table and add
1916 special cases for sigaction and stat.
1917 (overloaded_name_p): Rename into...
1918 (overloading_index): ...this. Do not initialize overloaded_names table
1919 here. Return the index or zero.
1920 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1921 but add an overloading suffix instead.
1922 (dump_ada_specs): Initialize overloaded_names tables here.
1923
b75978d1
GA
19242021-06-01 Martin Liska <mliska@suse.cz>
1925
1926 PR other/100759
1927 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1928 to a situation where we are not in processing of an optimize
1929 pragma.
1930 * c-pragma.c (handle_pragma_pop_options): Restore target
1931 options.
1932
ee682192
GA
19332021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1934
1935 PR testsuite/100749
1936 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1937
19382021-05-31 Richard Biener <rguenther@suse.de>
1939
1940 PR c++/88601
1941 * c-common.c: Include tree-vector-builder.h and
1942 vec-perm-indices.h.
1943 (c_common_reswords): Add __builtin_shufflevector.
1944 (c_build_shufflevector): New funtion.
1945 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1946 (c_build_shufflevector): Declare.
1947
48166757
GA
19482021-05-28 Jakub Jelinek <jakub@redhat.com>
1949
1950 PR middle-end/99928
1951 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1952 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1953
19542021-05-28 Tobias Burnus <tobias@codesourcery.com>
1955
1956 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1957
2bc6dace
GA
19582021-05-25 Martin Liska <mliska@suse.cz>
1959
1960 PR tree-optimization/92860
1961 PR target/99592
1962 * c-attribs.c (handle_optimize_attribute): Save target node
1963 before calling parse_optimize_options and save it in case
1964 it changes.
1965 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1966 (handle_pragma_pop_options): Likewise here.
1967
19682021-05-25 Martin Liska <mliska@suse.cz>
1969
1970 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1971
19722021-05-25 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR middle-end/99928
1975 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1976 combined with simd and not with taskloop or for.
1977
2832d51b
GA
19782021-05-21 Jakub Jelinek <jakub@redhat.com>
1979
1980 PR middle-end/99928
1981 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1982 on firstprivate clause copy going to target construct, and for
1983 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1984
ea34e2ed
GA
19852021-05-20 Jonathan Wakely <jwakely@redhat.com>
1986
1987 * c.opt (Wc++11-extensions, Wc++14-extensions)
1988 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1989 options.
1990
19912021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1992
1993 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1994
19952021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1996
1997 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1998 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1999 (pch_init): Renamed member.
2000 (c_common_valid_pch): Adjust access to debug_type_names.
2001
65f32e5d
GA
20022021-05-19 Martin Sebor <msebor@redhat.com>
2003
2004 PR c/100619
2005 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2006 bounds.
2007
a8daf9a1
GA
20082021-05-18 Richard Biener <rguenther@suse.de>
2009
2010 PR c/100547
2011 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2012 Reword existing nunit diagnostic.
2013
a7ffc1ef
GA
20142021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
2015
2016 * c-common.c (braced_list_to_string): Return CTOR unchanged
2017 if host and target character sizes don't match.
2018
87a7d10c
GA
20192021-05-14 Martin Liska <mliska@suse.cz>
2020
2021 * c.opt: Add Warning keyword for 2 options.
2022
f9af11c7
GA
20232021-05-13 Martin Liska <mliska@suse.cz>
2024
2025 PR middle-end/100504
2026 * c-attribs.c (handle_target_clones_attribute): Expect a string
2027 argument to target_clone argument.
2028
037e3661
GA
20292021-05-11 Joseph Myers <joseph@codesourcery.com>
2030
2031 * c-lex.c (interpret_float): Handle digit separators for C2X.
2032
aa891c56
GA
20332021-05-10 Martin Liska <mliska@suse.cz>
2034
2035 * c-ada-spec.c (print_destructor): Use startswith
2036 function instead of strncmp.
2037 (dump_ada_declaration): Likewise.
2038 * c-common.c (disable_builtin_function): Likewise.
2039 (def_builtin_1): Likewise.
2040 * c-format.c (check_tokens): Likewise.
2041 (check_plain): Likewise.
2042 (convert_format_name_to_system_name): Likewise.
2043
e4ff4ffb
GA
20442021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2045
2046 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2047 complex divide
2048
c0fa3f2f
GA
20492021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2050 Nathan Sidwell <nathan@codesourcery.com>
2051 Tom de Vries <vries@codesourcery.com>
2052 Julian Brown <julian@codesourcery.com>
2053 Kwok Cheung Yeung <kcy@codesourcery.com>
2054
2055 * c.opt (Wopenacc-parallelism): New.
2056
6e81e015
GA
20572021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2058
2059 * c.opt (fopenacc-kernels=): Remove.
2060
019a9220
GA
20612021-04-08 Jakub Jelinek <jakub@redhat.com>
2062
2063 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2064 occured -> occurred.
2065 (check_alignment_of_packed_member): Fix a comment typo,
2066 memeber -> member.
2067 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2068 and onless -> unless.
2069 (warn_parm_array_mismatch): Fix comment typos, declaratation
2070 -> declaration and woud -> would. Fix up comment indentation.
2071
20722021-04-08 Martin Sebor <msebor@redhat.com>
2073
2074 PR middle-end/99883
2075 * c.opt (Wmismatched-new-delete): Correct spelling.
2076
b1da9916
GA
20772021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2078
2079 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2080 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2081 enumeral types use again the type name for the enumeration constants.
2082 (dump_ada_node): Adjust call to dump_ada_enum_type.
2083 (dump_nested_type): Likewise.
2084
f1607029
GA
20852021-04-01 Jason Merrill <jason@redhat.com>
2086
2087 PR c++/98481
2088 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2089
4493b1c1
GA
20902021-03-25 Jakub Jelinek <jakub@redhat.com>
2091
2092 PR c++/99565
2093 * c-warn.c (do_warn_duplicated_branches): Pass also
2094 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2095
6af7b307
GA
20962021-03-20 Jakub Jelinek <jakub@redhat.com>
2097
2098 PR debug/99230
2099 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2100
ceae9533
GA
21012021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2102
2103 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2104 after entering the separate class package, if any.
2105
67f10d28
GA
21062021-03-04 Richard Biener <rguenther@suse.de>
2107
2108 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2109 Handle ERROR_MARK.
2110
21112021-03-04 Jakub Jelinek <jakub@redhat.com>
2112
2113 PR c/99325
2114 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2115 (token_streamer::stream) Likewise.
2116 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2117 UNKNOWN_LOCATION.
2118
f3641ac7
GA
21192021-03-03 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR c/99324
2122 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2123 instead of mark_addressable. Fix a comment typo -
2124 neutrallly -> neutrally.
2125
2c83c3fb
GA
21262021-02-28 Jakub Jelinek <jakub@redhat.com>
2127
2128 PR c/99304
2129 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2130 message - refernced -> referenced. Remove superfluous space before
2131 closing paren of function calls.
2132
daa68844
GA
21332021-02-25 Nathan Sidwell <nathan@acm.org>
2134
2135 PR c++/99166
2136 * c.opt (-flang-info-module-cmi): Renamed option.
2137
50352c6c
GA
21382021-02-19 Nathan Sidwell <nathan@acm.org>
2139
2140 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2141
bf81237e
GA
21422021-02-18 H.J. Lu <hjl.tools@gmail.com>
2143
2144 PR target/99113
2145 * c-attribs.c (c_common_attribute_table): Add the "retain"
2146 attribute.
2147 (handle_retain_attribute): New function.
2148
0e804ce3
GA
21492021-02-16 Marek Polacek <polacek@redhat.com>
2150
2151 PR c++/99062
2152 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2153 alignment argument is non-negative. Tweak a warning message.
2154
fab095da
GA
21552021-02-12 Martin Sebor <msebor@redhat.com>
2156
2157 PR c/99055
2158 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2159 print_generic_expr_to_str.
2160
4b37c3ea
GA
21612021-02-10 Richard Biener <rguenther@suse.de>
2162
2163 * c-common.c (parse_optimize_options): Free decoded_options.
2164
a19dd5e6
GA
21652021-02-04 emsr <3dw4rd@verizon.net>
2166
2167 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2168
9faaa807
GA
21692021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2170
2171 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2172 * c-lex.c (interpret_integer): Set node type for size literal.
2173
85d04a2e
GA
21742021-01-28 Jakub Jelinek <jakub@redhat.com>
2175
2176 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2177 draft from description.
2178 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2179
e62bb7f0
GA
21802021-01-26 Paul Fee <paul.f.fee@gmail.com>
2181
2182 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2183 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2184 and -std=gnu++2b
2185 * c-opts.c (set_std_cxx23): New.
2186 (c_common_handle_option): Set options when -std=c++23 is enabled.
2187 (c_common_post_options): Adjust comments.
2188 (set_std_cxx20): Likewise.
2189
161e4c08
GA
21902021-01-25 Martin Sebor <msebor@redhat.com>
2191
2192 PR c++/98646
2193 * c-common.c (check_nonnull_arg): Adjust warning text.
2194
4c9bcd5c
GA
21952021-01-17 Martin Sebor <msebor@redhat.com>
2196
2197 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2198 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2199
59cf67d1
GA
22002021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2201
2202 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2203 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2204
2f7f0d32
GA
22052021-01-15 Jakub Jelinek <jakub@redhat.com>
2206
2207 PR tree-optimization/98597
2208 * c-pretty-print.c: Include options.h.
2209 (c_fold_indirect_ref_for_warn): New function.
2210 (print_mem_ref): Use it. If it returns something that has compatible
2211 type and is TBAA compatible with zero offset, print it and return,
2212 otherwise print it using offsetof syntax or array ref syntax. Fix up
2213 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2214 argument has pointer to array type. Print pointers using the standard
2215 formatting.
2216
6851dda2
GA
22172021-01-12 Martin Sebor <msebor@redhat.com>
2218
2219 PR c/98597
2220 PR c/98592
2221 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2222 has pointer type. Remove redundant code. Avoid calling
2223 gimple_canonical_types_compatible_p.
2224
7d187e4f
GA
22252021-01-07 Martin Sebor <msebor@redhat.com>
2226
2227 PR middle-end/98578
2228 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2229 Avoid assuming acces type's size is constant. Correct condition
2230 guarding the printing of a parenthesis.
2231
942ae5be
GA
22322021-01-06 Martin Sebor <msebor@redhat.com>
2233
2234 PR c++/95768
2235 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2236 SSA_NAMEs print VLA names and GIMPLE defining statements.
2237 (print_mem_ref): New function.
2238 (c_pretty_printer::unary_expression): Call it.
2239
22402021-01-06 Richard Biener <rguenther@suse.de>
2241
2242 PR tree-optimization/95582
2243 * c-attribs.c (c_common_attribute_table): Add entry for
2244 signed_bool_precision.
2245 (handle_signed_bool_precision_attribute): New.
2246
8daa719b
GA
22472020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2248
2249 * c.opt: Add -stdlib= option and enumerations for
2250 libstdc++ and libc++.
2251
eefe499f
GA
22522020-12-16 Martin Liska <mliska@suse.cz>
2253
2254 * c.opt: Remove usage of Report.
2255
d52945ce
GA
22562020-12-14 Martin Sebor <msebor@redhat.com>
2257
2258 PR middle-end/98166
2259 PR c++/57111
2260 PR middle-end/98160
2261 * c-attribs.c (maybe_add_noinline): New function.
2262 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2263 Implicitly add attribute noinline to functions not declared inline
2264 and warn on those.
2265
ca2bd949
GA
22662020-12-09 Tobias Burnus <tobias@codesourcery.com>
2267
2268 * c-pragma.c (omp_pragmas): Add 'allocate'.
2269 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2270
f6e8e279
GA
22712020-12-08 Jakub Jelinek <jakub@redhat.com>
2272
2273 PR c++/98187
2274 * c-pragma.c (omp_pragmas): Remove "master".
2275 (omp_pragmas_simd): Add "master".
2276
bc8a7013
GA
22772020-12-07 Marek Polacek <polacek@redhat.com>
2278
2279 PR c++/98126
2280 * c-common.c (verify_tree_lim_r): New function.
2281 (verify_sequence_points): Use it. Use nullptr instead of 0.
2282
b8dd0ef7
GA
22832020-12-03 Martin Sebor <msebor@redhat.com>
2284
2285 PR c++/90629
2286 PR middle-end/94527
2287 * c-attribs.c (handle_dealloc_attribute): New function.
2288 (handle_malloc_attribute): Handle argument forms of attribute.
2289 * c.opt (-Wmismatched-dealloc): New option.
2290 (-Wmismatched-new-delete): New option.
2291
22922020-12-03 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR libstdc++/93121
2295 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2296 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2297
e0f5e792
GA
22982020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2299
2300 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2301 {__GNUC_EXECUTION_CHARSET_NAME} and
2302 _WIDE_EXECUTION_CHARSET_NAME} macros.
2303
23042020-12-01 Nathan Sidwell <nathan@acm.org>
2305
2306 * c-common.c (module, import, export): New internal tokens (with
2307 trailing space).
2308 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2309 them.
2310 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2311 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2312
23132020-12-01 Nathan Sidwell <nathan@acm.org>
2314
2315 * c-opts.c (c_common_init_options): Ask for module dependencies.
2316 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2317 * c-pch.c (c_common_valid_pch): ... does not play with C++
2318 modules.
2319 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2320 options.
2321 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2322 (fmodule-only, fmodule-mapper, fmodule-lazy)
2323 (fmodule-version-ignore, Winvalid-imported-macros)
2324 (flang-info-include-translate, flang-info-include-translate-not):
2325 New options
2326
5fbf0ecb
GA
23272020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2328
2329 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2330 (dump_ada_structure): Also deal with convention, unchecked union and
2331 bit-field for nested types. In the latter case, print an Alignment
2332 aspect along with the Pack aspect.
2333
360258da
GA
23342020-11-25 Martin Sebor <msebor@redhat.com>
2335
2336 PR bootstrap/94982
2337 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2338 -Wformat-diag.
2339
1e2c9a27
GA
23402020-11-24 Martin Sebor <msebor@redhat.com>
2341
2342 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2343
8e6198d0
GA
23442020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2345
2346 * c-attribs.c (handle_special_var_sec_attribute): New.
2347 (handle_noinit_attribute): Remove.
2348 (attr_noinit_exclusions): Rename to...
2349 (attr_section_exclusions): ...this, and add "persistent" attribute
2350 exclusion.
2351 (c_common_attribute_table): Add "persistent" attribute.
2352
7a97e2fc
GA
23532020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2354
2355 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2356 Treat opaque types like other types.
2357 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2358 supported types.
2359
82e5048e
GA
23602020-11-20 Martin Sebor <msebor@redhat.com>
2361
2362 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2363 with fewer arguments.
2364
23652020-11-20 Martin Sebor <msebor@redhat.com>
2366
2367 PR middle-end/97879
2368 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2369 Error out on invalid modes.
2370
23712020-11-20 Jakub Jelinek <jakub@redhat.com>
2372
2373 PR libstdc++/88101
2374 * c-common.c (check_builtin_function_arguments): Handle
2375 BUILT_IN_CLEAR_PADDING.
2376
25bb75f8
GA
23772020-11-18 Nathan Sidwell <nathan@acm.org>
2378
2379 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2380
4dabb037
GA
23812020-11-17 Nathan Sidwell <nathan@acm.org>
2382
2383 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2384 after newly-added CTI_MODULE_HWM.
2385
23862020-11-17 Joseph Myers <joseph@codesourcery.com>
2387
2388 * c-cppbuiltin.c (builtin_define_float_constants): Define
2389 "*_IS_IEC_60559__" macros.
2390
23912020-11-17 Nathan Sidwell <nathan@acm.org>
2392
2393 * c-lex.c: #include "langhooks.h".
2394 (cb_undef): Maybe call preprocess_undef lang hook.
2395 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2396 lang hook.
2397 (push_command_line_include): Maybe call preprocess_main_file lang
2398 hook.
2399 (cb_file_change): Likewise.
2400 * c-ppoutput.c: #include "langhooks.h.
2401 (scan_translation_unit): Maybe call preprocess_token lang hook.
2402 (class do_streamer): New, derive from token_streamer.
2403 (directives_only_cb): Data pointer is do_streamer, call
2404 preprocess_token lang hook.
2405 (scan_translation_unit_directives_only): Use do_streamer.
2406 (print_line_1): Move src_line recording to after string output.
2407 (cb_undef): Maybe call preprocess_undef lang hook.
2408
24092020-11-17 Nathan Sidwell <nathan@acm.org>
2410
2411 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2412 code duplicating that functionality.
2413
24142020-11-17 Jakub Jelinek <jakub@redhat.com>
2415
2416 PR c/90628
2417 * c-common.c (check_builtin_function_arguments)
2418 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2419 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2420 for more builtins and argument positions.
2421
29c5d9ce
GA
24222020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2423
2424 PR objc/97854
2425 * stub-objc.c: Include c-common.h to declare enum rid.
2426
77f67db2
GA
24272020-11-13 Jakub Jelinek <jakub@redhat.com>
2428
2429 PR c++/63287
2430 * c-cppbuiltin.c: Include configargs.h.
2431 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2432 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2433 "single".
2434
24352020-11-13 Gergö Barany <gergo@codesourcery.com>
2436 Thomas Schwinge <thomas@codesourcery.com>
2437
2438 * c.opt (fopenacc-kernels): Add.
2439
24402020-11-13 Jason Merrill <jason@redhat.com>
2441
2442 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2443
24442020-11-13 Piotr H. Dabrowski <phd@phd.re>
2445
2446 PR c++/91318
2447 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2448
24492020-11-13 Martin Liska <mliska@suse.cz>
2450
2451 * c-attribs.c (build_attr_access_from_parms): Format properly.
2452
24532020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2454
2455 PR objc/90707
2456 * c-common.c (c_common_reswords): null_unspecified, nullable,
2457 nonnull, null_resettable: New keywords.
2458 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2459 RID_NONNULL, RID_NULL_RESETTABLE: New.
2460 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2461 ranges accepted for property attributes.
2462 * c-attribs.c (handle_objc_nullability_attribute): New.
2463 * c-objc.h (enum objc_property_attribute_group): Add
2464 OBJC_PROPATTR_GROUP_NULLABLE.
2465 (enum objc_property_attribute_kind):Add
2466 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2467 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2468
24692020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2470
2471 PR objc/77404
2472 * c-attribs.c (handle_objc_root_class_attribute): New
2473 * c-objc.h (objc_start_class_interface): Add a location
2474 value for the position of the class name.
2475 * c.opt: Add Wobjc-root-class.
2476 * stub-objc.c (objc_start_class_interface): Add a location
2477 value for the position of the class name.
2478
a5a11525
GA
24792020-11-12 Joseph Myers <joseph@codesourcery.com>
2480
2481 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2482 Allow scope for C. Handle standard attributes for C. Do not
2483 accept unscoped attributes if std_syntax and not handled as
2484 standard attributes.
2485 * c-common.h (c_common_has_attribute): Update prototype.
2486
24872020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2488
2489 PR pch/86674
2490 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2491 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2492
0f5f9ed5
GA
24932020-11-11 Patrick Palka <ppalka@redhat.com>
2494
2495 PR c++/88115
2496 * c-opts.c (c_common_post_options): Update latest_abi_version.
2497
bb622641
GA
24982020-11-10 Jakub Jelinek <jakub@redhat.com>
2499
2500 PR c/97748
2501 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2502 to false.
2503 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2504 recursively and just return true instead of warning if it is true.
2505 Handle COMPLEX_EXPR.
2506
25072020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2508
2509 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2510 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2511 (c_omp_adjust_map_clauses): New function.
2512
2bee28dd
GA
25132020-11-09 Marek Polacek <polacek@redhat.com>
2514
2515 DR 1914
2516 * c-common.c (attribute_fallthrough_p): Tweak the warning
2517 message.
2518
25192020-11-09 Patrick Palka <ppalka@redhat.com>
2520
2521 * c-pragma.c (handle_pragma_diagnostic): Split the
2522 unknown-option -Wpragmas diagnostic into a warning and a
2523 subsequent note containing a spelling suggestion. Avoid
2524 computing the suggestion if -Wpragmas warnings are being
2525 suppressed.
2526
25272020-11-09 Patrick Palka <ppalka@redhat.com>
2528
2529 PR testsuite/97117
2530 * c-indentation.c (get_visual_column): Remove location_t
2531 parameter. Move the column-tracking diagnostic code from here
2532 to ...
2533 (should_warn_for_misleading_indentation): ... here, before the
2534 early exit for when the loci are not all distinct. Don't pass a
2535 location_t argument to get_visual_column.
2536 (assert_get_visual_column_succeeds): Don't pass a location_t
2537 argument to get_visual_column.
2538 (assert_get_visual_column_fails): Likewise.
2539
fb95de7a
GA
25402020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2541
2542 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2543 of keywords accepted in @property attribute contexts.
2544 * c-objc.h (enum objc_property_attribute_group): Add
2545 OBJC_PROPATTR_GROUP_CLASS.
2546 (enum objc_property_attribute_kind): Add
2547 OBJC_PROPERTY_ATTR_CLASS.
2548
2da7ee05
GA
25492020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2550
2551 * c-common.c (c_common_reswords): Add 'atomic' property
2552 attribute.
2553 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2554 property attributes.
2555
25562020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2557
2558 * c-attribs.c (handle_nsobject_attribute): New.
2559 * c.opt: Add WNSObject-attribute.
2560
44cab2d8
GA
25612020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2562
2563 * c-objc.h (enum objc_property_attribute_group): New
2564 (enum objc_property_attribute_kind): New.
2565 (OBJC_PROPATTR_GROUP_MASK): New.
2566 (struct property_attribute_info): Small class encapsulating
2567 parser output from property attributes.
2568 (objc_prop_attr_kind_for_rid): New
2569 (objc_add_property_declaration): Simplify interface.
2570 * stub-objc.c (enum rid): Dummy type.
2571 (objc_add_property_declaration): Simplify interface.
2572 (objc_prop_attr_kind_for_rid): New.
2573
25742020-11-06 Nathan Sidwell <nathan@acm.org>
2575
2576 * c-ada-spec.c (collect_ada_nodes): Rename
2577 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2578 (collect_ada_node): Likewise.
2579 (dump_forward_type): Likewise.
2580 * c-common.c (set_underlying_type): Rename
2581 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2582 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2583
25842020-11-06 Jakub Jelinek <jakub@redhat.com>
2585
2586 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2587
0cfd9109
GA
25882020-11-05 Marek Polacek <polacek@redhat.com>
2589
2590 PR c++/97675
2591 * c.opt (Wexceptions): New option.
2592
25932020-11-05 Marek Polacek <polacek@redhat.com>
2594
2595 PR c++/25814
2596 * c.opt (Wvexing-parse): New option.
2597
35c125cb
GA
25982020-11-04 Jakub Jelinek <jakub@redhat.com>
2599
2600 PR c++/97670
2601 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2602 underlying decl to clear in the allocate_head bitmap.
2603
26042020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2605
2606 * c-objc.h (objc_non_constant_expr_p): New.
2607 * stub-objc.c (objc_non_constant_expr_p): New.
2608
fd2325ea
GA
26092020-11-03 Nathan Sidwell <nathan@acm.org>
2610
2611 * c.opt (MQ,MT): Reword description to be make-agnostic.
2612
88ce3d5f
GA
26132020-11-02 Nathan Sidwell <nathan@acm.org>
2614
2615 * c-opts.c (c_common_post_options): Move var decl to its
2616 initialization point.
2617
26182020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2619
2620 * c-lex.c (c_lex_with_flags): When combining '@' with a
2621 keyword for Objective-C, combine the location ranges too.
2622
26232020-10-30 Qing Zhao <qing.zhao@oracle.com>
2624 H.J.Lu <hjl.tools@gmail.com>
2625
2626 * c-attribs.c (c_common_attribute_table): Add new attribute
2627 zero_call_used_regs.
2628 (handle_zero_call_used_regs_attribute): New function.
2629
e93aae4a
GA
26302020-10-28 Marek Polacek <polacek@redhat.com>
2631
2632 PR c++/97573
2633 * c-opts.c (c_common_post_options): In C++20, turn on
2634 -Wdeprecated-enum-enum-conversion and
2635 -Wdeprecated-enum-float-conversion.
2636 * c.opt (Wdeprecated-enum-enum-conversion,
2637 Wdeprecated-enum-float-conversion): New options.
2638 (Wenum-conversion): Allow for C++ too.
2639
26402020-10-28 Jakub Jelinek <jakub@redhat.com>
2641
2642 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2643 * c-omp.c: Include bitmap.h.
2644 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2645
f19e7c8d
GA
26462020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2647
2648 * c-common.c (__is_nothrow_assignable): New.
2649 (__is_nothrow_constructible): Likewise.
2650 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2651 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2652
efe71fcc
GA
26532020-10-23 Jan Hubicka <hubicka@ucw.cz>
2654
2655 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2656
26572020-10-23 Marek Polacek <polacek@redhat.com>
2658
2659 PR c++/91741
2660 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2661 (c_common_init_ts): Likewise.
2662 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2663 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2664 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2665 (maybe_warn_sizeof_array_div): New function.
2666 * c.opt (Wsizeof-array-div): New option.
2667
26682020-10-23 Martin Sebor <msebor@redhat.com>
2669
2670 PR c/97463
2671 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2672
56ddd5e2
GA
26732020-10-22 Martin Liska <mliska@suse.cz>
2674
2675 PR c/94722
2676 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2677 (handle_stack_protect_attribute): Add error message for a
2678 no_stack_protector function.
2679
26802020-10-22 Martin Liska <mliska@suse.cz>
2681
2682 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2683
26842020-10-22 Jan Hubicka <hubicka@ucw.cz>
2685
2686 * c-gimplify.c: Include tree-nested.h
2687 (c_genericize): Update for new nested function info.
2688
b2698c21
GA
26892020-10-14 Martin Sebor <msebor@redhat.com>
2690
2691 PR c/97413
2692 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2693 bounds in an extra list.
2694
7e9282ae
GA
26952020-10-05 Richard Biener <rguenther@suse.de>
2696 Jakub Jelinek <jakub@redhat.com>
2697
2698 PR c++/97197
2699 * c-pretty-print.c: Include langhooks.h.
2700 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2701 expression.
2702 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2703 unary_expression.
2704 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2705
660bfe61
GA
27062020-09-30 Martin Sebor <msebor@redhat.com>
2707
2708 PR middle-end/97189
2709 * c-attribs.c (append_access_attr): Use the function declaration
2710 location for a warning about an attribute access argument.
2711
93bca37c
GA
27122020-09-29 Marek Polacek <polacek@redhat.com>
2713
2714 PR c++/94695
2715 * c.opt (Wrange-loop-construct): New option.
2716
82b77dee
GA
27172020-09-23 Martin Sebor <msebor@redhat.com>
2718
2719 PR c/97131
2720 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2721
27222020-09-23 Marek Polacek <polacek@redhat.com>
2723
2724 PR c/97125
2725 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2726 after loops and other structured control constructs have been lowered.
2727
521d2711
GA
27282020-09-22 Jakub Jelinek <jakub@redhat.com>
2729
2730 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2731 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2732
44135373
GA
27332020-09-21 Marek Polacek <polacek@redhat.com>
2734
2735 * c.opt (Wctad-maybe-unsupported): New option.
2736
2fe5b7d1
GA
27372020-09-19 Martin Sebor <msebor@redhat.com>
2738
2739 PR c/50584
2740 * c-common.h (warn_parm_array_mismatch): Declare new function.
2741 (has_attribute): Move declaration of an existing function.
2742 (build_attr_access_from_parms): Declare new function.
2743 * c-warn.c (parm_array_as_string): Define new function.
2744 (plus_one): Define new function.
2745 (warn_parm_ptrarray_mismatch): Define new function.
2746 (warn_parm_array_mismatch): Define new function.
2747 (vla_bound_parm_decl): New function.
2748 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2749 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2750 qualifiers here...
2751 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2752 them in brackets here. Also print [static]. Strip extraneous
2753 expressions from VLA bounds.
2754
27552020-09-19 Martin Sebor <msebor@redhat.com>
2756
2757 PR c/50584
2758 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2759 (handle_argspec_attribute): New function.
2760 (get_argument, get_argument_type): New functions.
2761 (append_access_attrs): Add overload. Handle internal attribute
2762 representation in addition to external.
2763 (handle_access_attribute): Handle internal attribute representation
2764 in addition to external.
2765 (build_attr_access_from_parms): New function.
2766
27672020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2768
2769 * c-gimplify.c (genericize_c_loop): Rewrite to match
2770 c_finish_loop in c-typeck.c.
2771
27722020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2773
2774 * c-common.c (c_block_may_fallthrough): New, split from
2775 cxx_block_may_fallthrough in the cp front end.
2776 (c_common_init_ts): Move handling of loop and switch-related
2777 statements here from the cp front end.
2778 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2779 cp front end.
2780 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2781 * c-common.h (c_block_may_fallthru): Declare.
2782 (bc_state_t): Move here from cp front end.
2783 (save_bc_state, restore_bc_state): Declare.
2784 (c_genericize_control_stmt): Declare.
2785 (WHILE_COND, WHILE_BODY): Likewise.
2786 (DO_COND, DO_BODY): Likewise.
2787 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2788 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2789 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2790 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2791 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2792 * c-dump.c (dump_stmt): Copy from cp front end.
2793 (c_dump_tree): Move code to handle structured loop and switch
2794 tree nodes here from cp front end.
2795 * c-gimplify.c: Adjust includes.
2796 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2797 cp front end.
2798 (save_bc_state, restore_bc_state): New functions using old code
2799 from cp front end.
2800 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2801 (genericize_c_loop): Move from cp front end.
2802 (genericize_for_stmt, genericize_while_stmt): Likewise.
2803 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2804 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2805 (genericize_omp_for_stmt): Likewise.
2806 (c_genericize_control_stmt): New function using code split from
2807 cp front end.
2808 (c_genericize_control_r): New.
2809 (c_genericize): Call walk_tree with c_genericize_control_r.
2810 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2811 structured loop and switch tree nodes here from cp front end.
2812
2aad20c0
GA
28132020-09-17 Patrick Palka <ppalka@redhat.com>
2814
2815 PR c/80076
2816 * c-indentation.c (should_warn_for_misleading_indentation): Move
2817 declarations of local variables closer to their first use.
2818 Handle virtual token locations by resolving them to their
2819 respective macro expansion points. If all three tokens are
2820 produced from the same macro expansion, then instead use their
2821 loci within the macro definition.
2822
ecde1b0a
GA
28232020-09-16 Martin Sebor <msebor@redhat.com>
2824
2825 PR c/78666
2826 PR c/96126
2827 * c-attribs.c (validate_attr_args): New function.
2828 (validate_attr_arg): Same.
2829 (handle_section_attribute): Call it. Introduce a local variable.
2830 (handle_alloc_size_attribute): Same.
2831 (handle_alloc_align_attribute): Same.
2832
50a71cd0
GA
28332020-09-14 Jakub Jelinek <jakub@redhat.com>
2834
2835 * c-attribs.c (handle_optimize_attribute): Adjust
2836 cl_optimization_save, cl_optimization_restore and
2837 build_optimization_node callers.
2838 * c-pragma.c (handle_pragma_optimize): Adjust
2839 build_optimization_node caller.
2840 (handle_pragma_push_options): Adjust
2841 build_optimization_node and build_target_option_node callers.
2842 (handle_pragma_pop_options, handle_pragma_reset_options):
2843 Adjust cl_optimization_restore callers.
2844
8f7ea26a
GA
28452020-08-28 Martin Sebor <msebor@redhat.com>
2846
2847 * c.opt (Wstringop-overread): New option.
2848
a6493809
GA
28492020-08-11 Jakub Jelinek <jakub@redhat.com>
2850
2851 PR c/96545
2852 * c-common.c (get_atomic_generic_size): Require that first argument's
2853 type points to a complete type and use tree_fits_uhwi_p instead of
2854 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2855
48cc2e46
GA
28562020-07-31 Martin Sebor <msebor@redhat.com>
2857
2858 PR c++/96003
2859 * c-common.c (check_function_arguments_recurse): Return early when
2860 no-warning bit is set.
2861
28622020-07-31 Richard Biener <rguenther@suse.de>
2863
2864 PR debug/96383
2865 * c-common.h (c_common_finalize_early_debug): Declare.
2866 * c-common.c: Include debug.h.
2867 (c_common_finalize_early_debug): finalize_early_debug langhook
2868 implementation generating debug for extern declarations.
2869
e71dab87
GA
28702020-07-27 Nathan Sidwell <nathan@acm.org>
2871
2872 * c-common.c (try_to_locate_new_include_insertion_point): Use
2873 strcmp, not pointer equality.
2874
ae2e0bc1
GA
28752020-07-25 Martin Sebor <msebor@redhat.com>
2876
2877 PR c++/96310
2878 * c-common.c (check_nonnull_arg): Print note only when warning was
2879 issued.
2880
3ea9abca
GA
28812020-07-22 Tobias Burnus <tobias@codesourcery.com>
2882
2883 * c-omp.c (c_finish_omp_critical): Check for no name but
2884 nonzero hint provided.
2885
0933f508
GA
28862020-07-20 Jason Merrill <jason@redhat.com>
2887
2888 * c-cppbuiltin.c (c_cpp_builtins): Update
2889 __cpp_nontype_template_args for C++20.
2890
28912020-07-20 Martin Sebor <msebor@redhat.com>
2892
2893 PR c/96249
2894 * c.opt: Remove stray text.
2895
8ca07a30
GA
28962020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2897
2898 PR other/86904
2899 * c-indentation.c (should_warn_for_misleading_indentation): Get
2900 global tabstop from the new source.
2901 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2902 is now a common option.
2903 * c.opt: Likewise.
2904
a82c4c4c 29052020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2906
2907 * c.opt (Wscalar-storage-order): Add explicit variable.
2908
f60ee68d
GA
29092020-07-07 Nathan Sidwell <nathan@acm.org>
2910
2911 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2912 cpp_read_main_file.
2913 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2914 maps. Force token position to line_table's highest line.
2915 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2916 (cb_define): Always increment source line.
2917
4077d74c
GA
29182020-07-06 Martin Sebor <msebor@redhat.com>
2919
2920 PR c++/95984
2921 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2922 to stub lambda objects with null this pointer.
2923 (check_nonnull_arg): Handle C++ nullptr.
2924
b5f24739
GA
29252020-07-02 Jason Merrill <jason@redhat.com>
2926 Jakub Jelinek <jakub@redhat.com>
2927
2928 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2929
46fbb6c6
GA
29302020-06-30 Jakub Jelinek <jakub@redhat.com>
2931
2932 PR c++/95963
2933 * c-common.c (check_function_arguments_recurse): Don't crash on
2934 calls to internal functions.
2935
69273534
GA
29362020-06-28 Martin Sebor <msebor@redhat.com>
2937
2938 PR c++/86568
2939 * c-common.c (struct nonnull_arg_ctx): Add members.
2940 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2941 C++ member functions specially. Consider the this pointer implicitly
2942 nonnull.
2943 (check_nonnull_arg): Use location of argument when available.
2944 (check_function_arguments): Use nonnull_arg_ctx as argument.
2945
9a33c41f
GA
29462020-06-27 Jakub Jelinek <jakub@redhat.com>
2947
2948 PR middle-end/95903
2949 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2950 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2951 smaller precision intop operands separately.
2952
c9c05f73
GA
29532020-06-26 Marek Polacek <polacek@redhat.com>
2954
2955 * c-opts.c (c_common_init_options): Default to gnu++17.
2956
aff95ee7
GA
29572020-06-17 Jonathan Wakely <jwakely@redhat.com>
2958
bd0a89dc 2959 PR c/95378
aff95ee7
GA
2960 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2961 pointer arguments.
2962
56638b9b
GA
29632020-06-16 Jakub Jelinek <jakub@redhat.com>
2964
2965 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2966 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2967 idx members.
2968 (c_omp_is_loop_iterator): New function.
2969 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2970 if outer loop iterator is present. Perform duplicate checking through
2971 hash_set in the function rather than expecting caller to do that.
2972 Pass NULL instead of d->ppset to walk_tree_1.
2973 (c_omp_check_nonrect_loop_iv): New function.
2974 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2975 non-rectangular loop forms, diagnose multiple associated loops with
2976 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2977 (c_omp_check_loop_iv_exprs): Likewise.
2978
ec6ffbb9
GA
29792020-06-10 Martin Liska <mliska@suse.cz>
2980
2981 PR tree-optimization/92860
2982 * c-attribs.c (handle_optimize_attribute):
2983 Save global options and compare it after parsing of function
2984 attribute.
2985 * c-pragma.c (opt_stack::saved_global_options): New field.
2986 (handle_pragma_push_options): Save global_options.
2987 (handle_pragma_pop_options): Compare them after pop.
2988
b952c2cf
GA
29892020-06-09 Jakub Jelinek <jakub@redhat.com>
2990
2991 PR c/95580
2992 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2993 case when MEM_REF's first argument has type pointer to incomplete type.
2994
1a59f3db
GA
29952020-06-05 Jason Merrill <jason@redhat.com>
2996
2997 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2998 operand to POINTER_PLUS_EXPR.
2999
3add3425
GA
30002020-06-04 Martin Sebor <msebor@redhat.com>
3001
3002 PR middle-end/10138
3003 PR middle-end/95136
3004 * c-attribs.c (append_access_attrs): Handle attr_access::none.
3005 (handle_access_attribute): Same.
3006
9a5b7438
GA
30072020-06-03 Mark Wielaard <mark@klomp.org>
3008
3009 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3010 New function.
3011 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3012 New function declaration.
3013
30142020-06-03 Mark Wielaard <mark@klomp.org>
3015
3016 * known-headers.cc (get_string_macro_hint): New function.
3017 (get_stdlib_header_for_name): Use get_string_macro_hint.
3018 (get_c_stdlib_header_for_string_macro_name): New function.
3019 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3020 New function declaration.
3021
30222020-06-03 Tobias Burnus <tobias@codesourcery.com>
3023
3024 * c-common.h (c_omp_predetermined_mapping): Declare.
3025 * c-omp.c (c_omp_predetermined_mapping): New.
3026
af114c38
MW
30272020-05-22 Mark Wielaard <mark@klomp.org>
3028
3029 * known-headers.cc (get_stdlib_header_for_name): Add a new
3030 stdlib_hint array for stdbool and stdint.
3031
45c50b6a
MW
30322020-05-22 Mark Wielaard <mark@klomp.org>
3033
3034 * known-headers.cc (get_stdlib_header_for_name): Return
3035 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3036 flag_isoc99.
3037
c22027a0
NS
30382020-05-20 Nathan Sidwell <nathan@acm.org>
3039
38a4db21
NS
3040 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3041
c22027a0
NS
3042 * c-common.c (try_to_locate_new_include_insertion_point): Use
3043 strcmp to compare filenames.
3044 * c-lex.c (init_c_lex): Move declaration to initialization.
3045 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3046 deferred count loop.
3047
29f0e90d
JM
30482020-05-15 Jason Merrill <jason@redhat.com>
3049
3050 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3051
b04445d4
JM
30522020-05-13 Jason Merrill <jason@redhat.com>
3053
3054 * c.opt (std=c++20): Make c++2a the alias.
3055 (std=gnu++20): Likewise.
3056 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3057 * c-opts.c: Adjust.
3058 * c-cppbuiltin.c: Adjust.
3059 * c-ubsan.c: Adjust.
3060 * c-warn.c: Adjust.
3061
11dd3be5
EB
30622020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3063
3064 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3065
b224c376
NS
30662020-05-08 Nathan Sidwell <nathan@acm.org>
3067
3068 Reimplement directives only processing.
3069 * c-ppoutput.c (token_streamer): Ne.
3070 (directives_only_cb): New. Swallow ...
3071 (print_lines_directives_only): ... this.
3072 (scan_translation_unit_directives_only): Reimplment using the
3073 published interface.
3074
f1d94677
MP
30752020-05-07 Marek Polacek <polacek@redhat.com>
3076
3077 * c-format.c (badwords): Add "nonstatic".
3078
9b95bb52
JJ
3079202-05-07 Jakub Jelinek <jakub@redhat.com>
3080
3081 PR c/94968
3082 * c-common.c (speculation_safe_value_resolve_params): Return false if
3083 error_operand_p (val2).
3084 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3085 Remove extraneous semicolon.
3086
530b4409 30872020-05-06 qing zhao <qing.zhao@oracle.com>
3088
3089 PR c/94230
3090 * c-indentation.c (get_visual_column): Add a hint to use the new
3091 -flarge-source-files option.
3092
b776bdca
SSF
30932020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3094
3095 * c-attribs.c (handle_vector_size_attribute): Add attribute
3096 nonnull for argument args in order to silence warning of
3097 uninitialized variable usage. Since this is local to the
3098 compilation unit and thus cannot be checked at call sides by the
3099 compiler, added an assert statement in order to verify this.
3100
6607bdd9
L
31012020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3102
3103 PR target/93492
3104 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3105 value to USHRT_MAX (65535).
3106
691eeb65
JJ
31072020-04-29 Jakub Jelinek <jakub@redhat.com>
3108
3109 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3110
26d76be7
JJ
31112020-04-27 Jakub Jelinek <jakub@redhat.com>
3112
3113 PR c/94755
3114 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3115 fncode == BUILT_IN_NONE before initialization of first_param.
3116
7291b2ed
MP
31172020-04-23 Marek Polacek <polacek@redhat.com>
3118
3119 PR c++/94733
3120 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3121 TREE_PURPOSE.
3122
58a29af8
PP
31232020-04-14 Patrick Palka <ppalka@redhat.com>
3124
3125 PR c++/85278
3126 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3127 ampersand if it's an rvalue reference type.
3128
09f04139
MS
31292020-04-13 Martin Sebor <msebor@redhat.com>
3130
3131 PR c/92326
3132 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3133 printing array bound for flexible array members.
3134
ee26baf4
IS
31352020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3136
3137 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3138 define, per n4861.
3139
75efe9cb
RB
31402020-04-02 Richard Biener <rguenther@suse.de>
3141
3142 PR c/94392
3143 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3144 for -O2 and C++11 or newer.
3145
75defde9
PP
31462020-03-28 Patrick Palka <ppalka@redhat.com>
3147
3148 * c.opt: Add -fconcepts-diagnostics-depth.
3149
52f24a9e
MS
31502020-03-27 Martin Sebor <msebor@redhat.com>
3151
3152 PR c++/94346
3153 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3154 to decl_attributes. Make handling of different kinds of entities
3155 more robust.
3156
ccacf77b
MS
31572020-03-27 Martin Sebor <msebor@redhat.com>
3158
3159 PR c++/94098
3160 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3161 here.
3162
ca6c7225
JJ
31632020-03-23 Jakub Jelinek <jakub@redhat.com>
3164
3165 PR c++/91993
3166 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3167 result being COMPOUND_EXPRs, skip to ultimate rhs.
3168
1aa22b19
RS
31692020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3170
3171 PR middle-end/94072
3172 * c-common.c (c_common_type_for_mode): Before using a registered
3173 built-in type, check that the vectorness of the type matches
3174 the vectorness of the mode.
3175
700d4cb0
JJ
31762020-03-17 Jakub Jelinek <jakub@redhat.com>
3177
3178 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3179 issue in a diagnostic message.
3180
b408e010
LH
31812020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3182
3183 * c.opt: Avoid redundancy in the help text.
3184
e78e50d5
MP
31852020-03-02 Marek Polacek <polacek@redhat.com>
3186
3187 PR c++/93958 - add missing -std=gnu++20.
3188 * c.opt: Add -std=gnu++20.
3189
649e1741
MS
31902020-03-01 Martin Sebor <msebor@redhat.com>
3191
3192 PR c++/92721
3193 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3194 (handle_access_attribute): Same.
3195
7b60f3ba
JJ
31962020-02-25 Jakub Jelinek <jakub@redhat.com>
3197
3198 PR c/93858
3199 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3200 "did you mean" hint in diagnostics.
3201
fb260504
JM
32022020-02-15 Jason Merrill <jason@redhat.com>
3203
3204 * c.opt: Add -std=c++20.
3205
1d757b09
EB
32062020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3207
3208 * c-ada-spec.c: Include bitmap.h.
3209 (dump_ada_double_name): Rename into...
3210 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3211 (dump_ada_array_type): Adjust to above renaming. Robustify.
3212 (dump_nested_types_1): New function copied from... Add dumped_types
3213 parameter and pass it down to dump_nested_type.
3214 (dump_nested_types): ...this. Remove parent parameter. Just call
3215 dump_nested_types_1 on an automatic bitmap.
3216 (dump_nested_type): Add dumped_types parameter.
3217 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3218 Adjust recursive calls and adjust to above renaming.
3219 (dump_ada_declaration): Adjust call to dump_nested_types.
3220 Tidy up and adjust to above renaming.
3221 (dump_ada_specs): Initialize and release bitmap obstack.
3222
0cc575e4
MS
32232020-02-10 Martin Sebor <msebor@redhat.com>
3224
3225 PR c/93640
3226 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3227
a59aa302
JJ
32282020-02-10 Jakub Jelinek <jakub@redhat.com>
3229
3230 PR other/93641
3231 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3232 Remove useless extra test.
3233
e464fc90
TB
32342020-02-03 Julian Brown <julian@codesourcery.com>
3235 Tobias Burnus <tobias@codesourcery.com>
3236
3237 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3238
e3b6c052
JM
32392020-01-29 Jason Merrill <jason@redhat.com>
3240
3241 PR c++/89357
3242 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3243
6d00f052
JM
32442020-01-23 Jason Merrill <jason@redhat.com>
3245
3246 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3247
8a990ffa
MS
32482020-01-23 Martin Sebor <msebor@redhat.com>
3249
3250 PR c/84919
3251 * c-common.c (check_function_arguments): Avoid overlap checking
3252 of sprintf functions.
3253
55b7df8b
JM
32542020-01-22 Jason Merrill <jason@redhat.com>
3255
3256 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3257 PR c++/40752
3258 * c-warn.c (conversion_warning): Check operands only after checking
3259 the whole expression. Don't check second operand of + for sign.
3260
c77074d0
JM
32612020-01-21 Jason Merrill <jason@redhat.com>
3262 Manuel López-Ibáñez <manu@gcc.gnu.org>
3263
3264 PR c++/40752 - useless -Wconversion with short +=.
3265 * c.opt (-Warith-conversion): New.
3266 * c-warn.c (conversion_warning): Recurse for operands of
3267 operators. Only warn about the whole expression with
3268 -Warith-conversion.
3269
731dbfc3
JM
32702020-01-21 Jason Merrill <jason@redhat.com>
3271
3272 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3273 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3274
ad1a3914
NS
32752020-01-20 Nathan Sidwell <nathan@acm.org>
3276
3277 PR preprocessor/80005
3278 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3279
49789fd0
IS
32802020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3281
3282 * c-common.c (co_await, co_yield, co_return): New.
3283 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3284 RID_CO_RETURN): New enumeration values.
3285 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3286 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3287 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3288 * c.opt (fcoroutines): New command-line switch.
3289
4bc1899b
DM
32902020-01-10 David Malcolm <dmalcolm@redhat.com>
3291
3292 * c-format.c (local_event_ptr_node): New.
3293 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3294 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3295 * c-format.h (T_EVENT_PTR): New define.
3296
f25e33fa
MS
32972020-01-10 Martin Sebor <msebor@redhat.com>
3298
3299 PR c/93132
3300 * c-attribs.c (append_access_attrs): Validate against the translated
3301 access string rather than the human-readable representation.
3302
8d9254fc
JJ
33032020-01-01 Jakub Jelinek <jakub@redhat.com>
3304
3305 Update copyright years.
3306
39292e25
EB
33072019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3308
3309 * c-ada-spec.h (decl_sloc): Delete.
3310 * c-ada-spec.c (decl_sloc): Make static.
3311
519d7496
JB
33122019-12-19 Julian Brown <julian@codesourcery.com>
3313
3314 * c-common.h (c_omp_map_clause_name): Add prototype.
3315 * c-omp.c (c_omp_map_clause_name): New function.
3316 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3317 PRAGMA_OACC_CLAUSE_DETACH.
3318
a6163563
JB
33192019-12-19 Julian Brown <julian@codesourcery.com>
3320 Maciej W. Rozycki <macro@codesourcery.com>
3321 Tobias Burnus <tobias@codesourcery.com>
3322 Thomas Schwinge <thomas@codesourcery.com>
3323
3324 * c-pragma.h (pragma_omp_clause): Add
3325 PRAGMA_OACC_CLAUSE_NO_CREATE.
3326
e8f1ade2
MS
33272019-12-17 Martin Sebor <msebor@redhat.com>
3328
3329 PR c++/61339
3330 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3331
368877a1
DM
33322019-12-11 David Malcolm <dmalcolm@redhat.com>
3333
3334 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3335 implementation.
3336 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3337
d68f5d45
DM
33382019-12-09 David Malcolm <dmalcolm@redhat.com>
3339
3340 * c-format.c (range_label_for_format_type_mismatch::get_text):
3341 Replace label_text ctor called with true with label_text::take.
3342
d3e28653
DM
33432019-12-09 David Malcolm <dmalcolm@redhat.com>
3344
3345 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3346 initial newline from expected outputs.
3347 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3348 call to diagnostic_show_locus.
3349
abd6d8cc
JJ
33502019-12-06 Jakub Jelinek <jakub@redhat.com>
3351
3352 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3353 now.
3354
7906797e
MP
33552019-12-05 Marek Polacek <polacek@redhat.com>
3356 Jakub Jelinek <jakub@redhat.com>
3357
3358 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3359 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3360
5c04da88
MP
33612019-12-05 Marek Polacek <polacek@redhat.com>
3362
3363 PR c++/92271 - make __is_same alias for __is_same_as.
3364 * c-common.c: Add __is_same, an alias for __is_same_as.
3365
43aae289
MP
33662019-12-03 Marek Polacek <polacek@redhat.com>
3367
3368 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3369 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3370 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3371
d7ddfbcb
JH
33722019-11-30 Jan Hubicka <hubicka@ucw.cz>
3373
3374 * c-attribs.c (handle_symver_attribute): New function
3375 (c_common_attributes): Add symver.
3376
65ef05d0
RS
33772019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3378
3379 * c-common.c (pointer_int_sum): Use verify_type_context to check
3380 whether the target allows pointer arithmetic for the types involved.
3381 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3382 to check whether the target allows sizeof and alignof operations
3383 for the types involved.
3384
1a291106
JM
33852019-11-27 Jason Merrill <jason@redhat.com>
3386
3387 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3388
05d6cb1a
JJ
33892019-11-26 Jakub Jelinek <jakub@redhat.com>
3390
3391 PR c++/61414
3392 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3393 ENUMERAL_TYPEs.
3394
5b8d9367
JM
33952019-11-25 Joseph Myers <joseph@codesourcery.com>
3396
3397 PR c/91985
3398 * c-common.c (c_common_type_for_mode): Handle decimal
3399 floating-point types being NULL_TREE.
3400 * c-format.c (get_format_for_type_1): Handle specified types being
3401 NULL_TREE.
3402 * c-lex.c (interpret_float): Give an error for decimal
3403 floating-point constants when decimal floating-point not
3404 supported.
3405
1fbf51cb
JJ
34062019-11-23 Jakub Jelinek <jakub@redhat.com>
3407
3408 PR middle-end/83859
3409 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3410 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3411 group warning with inform together.
3412 (handle_access_attribute): Formatting fix.
3413
761df906
JJ
34142019-11-22 Jakub Jelinek <jakub@redhat.com>
3415
bdaf8be1
JJ
3416 PR c/90677
3417 * c-common.h (identifier_global_tag): Declare.
3418 * c-format.c (get_pointer_to_named_type): Renamed to ...
3419 (get_named_type): ... this. Use identifier_global_tag instead of
3420 identifier_global_value, handle the return value being a TYPE_P.
3421 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3422 to call get_named_type instead. Formatting fixes.
3423
c2ecce6d 3424 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3425 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3426 and __cpp_generic_lambdas for -std=c++2a. Define
3427 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3428 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3429 __cpp_concepts for -std=c++2a.
3430
54aa6b58
MS
34312019-11-22 Martin Sebor <msebor@redhat.com>
3432
3433 PR middle-end/83859
3434 * c-attribs.c (handle_access_attribute): New function.
3435 (c_common_attribute_table): Add new attribute.
3436 (get_argument_type): New function.
3437 (append_access_attrs): New function.
3438 (get_nonnull_operand): Rename...
3439 (get_attribute_operand): ...to this.
3440 * c-common.c (get_nonnull_operand): Rename...
3441 (get_attribute_operand): ...to this.
3442
6c80b1b5
JM
34432019-11-21 Joseph Myers <joseph@codesourcery.com>
3444
3445 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3446 of warning.
3447
192961ff
JM
34482019-11-19 Joseph Myers <joseph@codesourcery.com>
3449
3450 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3451 warning for standard attributes mixed with fallthrough attributes.
3452
f8aea5e3
JM
34532019-11-15 Joseph Myers <joseph@codesourcery.com>
3454
3455 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3456 * c-common.h (handle_fallthrough_attribute): Declare.
3457
2cc94aa8
JM
34582019-11-15 Joseph Myers <joseph@codesourcery.com>
3459
3460 * c-attribs.c (handle_deprecated_attribute): Remove static.
3461 * c-common.h (handle_deprecated_attribute): Declare.
3462
7c5890cc
JM
34632019-11-14 Joseph Myers <joseph@codesourcery.com>
3464
3465 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3466 char for C.
3467
b2417b59
JJ
34682019-11-14 Jakub Jelinek <jakub@redhat.com>
3469
d0ec7c93
JJ
3470 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3471 valid vendors.
3472
b2417b59
JJ
3473 * c-omp.c (c_omp_check_context_selector): Handle name lists
3474 containing string literals. Don't diagnose atomic_default_mem_order
3475 with multiple props.
3476
00be2a5f
JM
34772019-11-13 Joseph Myers <joseph@codesourcery.com>
3478
3479 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3480 NORM_MAX constants. Update call to get_max_float.
3481 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3482 constants.
3483
2dbad62d
EB
34842019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3485
3486 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3487 (dump_forward_type): Do not generate a declaration for function types.
3488 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3489 of the component type if it is declared in another file.
3490
6ed76044
ML
34912019-11-12 Martin Liska <mliska@suse.cz>
3492
3493 * c-opts.c (c_common_post_options):
3494 Use SET_OPTION_IF_UNSET.
3495
62aee289
MR
34962019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3497 Frederik Harwath <frederik@codesourcery.com>
3498
3499 gcc/c-family/
3500 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3501 constant.
3502 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3503
f486280c
RS
35042019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3505
3506 * c-common.h (gnu_vector_type_p): New function.
3507 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3508 vectors to satisfy gnu_vector_type_p.
3509 (c_build_vec_convert): Likewise __builtin_convertvector.
3510 (convert_vector_to_array_for_subscript): Likewise when applying
3511 implicit vector to array conversion.
3512 (scalar_to_vector): Likewise when converting vector-scalar
3513 operations to vector-vector operations.
3514
017c6491
JM
35152019-11-08 Joseph Myers <joseph@codesourcery.com>
3516
3517 * c.opt (Wold-style-definition): Initialize to -1.
3518 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3519 to flag_isoc2x if not set explicitly.
3520
c01bd174
JM
35212019-11-07 Joseph Myers <joseph@codesourcery.com>
3522
3523 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3524
0df65305
JM
35252019-11-05 Jason Merrill <jason@redhat.com>
3526
3527 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3528 -fconcepts.
3529
e0c866dd
KK
35302019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3531
3532 * c-opts.c (c_common_post_options): Update
3533 latest_abi_version.
3534
f968ef9b
JJ
35352019-11-02 Jakub Jelinek <jakub@redhat.com>
3536
d0c464d2
JJ
3537 * c-common.h (c_omp_get_context_selector): Remove.
3538 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3539 and renamed to omp_get_context_selector.
3540
917dd789
JJ
3541 * c-omp.c (c_omp_mark_declare_variant): Use
3542 omp_context_selector_set_compare.
3543
f968ef9b
JJ
3544 PR c++/88335 - Implement P1073R3: Immediate functions
3545 * c-common.h (enum rid): Add RID_CONSTEVAL.
3546 * c-common.c (c_common_reswords): Add consteval.
3547
5f6705b7
JJ
35482019-11-01 Martin Sebor <msebor@redhat.com>
3549
3550 PR middle-end/91679
3551 PR middle-end/91647
3552 PR middle-end/91463
3553 PR middle-end/92312
3554 * c-pretty-print.c (direct_abstract_declarator): Print
3555 bound in zero-length arrays.
3556 * c.opt (-Wzero-length-bounds): New option.
3557
43f1814c
NS
35582019-10-30 Nathan Sidwell <nathan@acm.org>
3559
3560 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3561 macros.
3562
ad1539d5
MS
35632019-10-28 Martin Sebor <msebor@redhat.com>
3564
3565 PR c/66970
3566 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3567 even when only preprocessing.
3568 * c-common.h (names_builtin_p): Declare new function.
3569 * c-lex.c (init_c_lex): Set has_builtin.
3570 (c_common_has_builtin): Define a new function.
3571 * c-ppoutput.c (init_pp_output): Set has_builtin.
3572
135df52c
JJ
35732019-10-24 Jakub Jelinek <jakub@redhat.com>
3574
3575 * c-common.h (c_omp_context_selector_matches): Remove.
3576 * c-omp.c (c_omp_context_selector_matches): Remove.
3577 * c-attribs.c (c_common_attribute_table): Add
3578 "omp declare target {host,nohost,block}" attributes.
3579
8ad0c477
JM
35802019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3581
3582 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3583
56898e43
RS
35842019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3585
3586 * c-common.h (user_facing_original_type_p): Declare.
3587 * c-common.c: Include c-spellcheck.h.
3588 (user_facing_original_type_p): New function.
3589
20de9568
JJ
35902019-10-12 Jakub Jelinek <jakub@redhat.com>
3591
3592 * c-common.h (c_omp_mark_declare_variant,
3593 c_omp_context_selector_matches): Declare.
3594 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3595 and hsa-common.h.
3596 (c_omp_get_context_selector): Support second argument NULL.
3597 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3598 functions.
3599 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3600 attribute, add "omp declare variant base" and
3601 "omp declare variant variant" attributes.
3602
175a85b2
JM
36032019-10-11 Joseph Myers <joseph@codesourcery.com>
3604
3605 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3606 CppReason(CPP_W_C11_C2X_COMPAT).
3607
fe2bc27c
JM
36082019-10-11 Joseph Myers <joseph@codesourcery.com>
3609
3610 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3611 _Decimal64 and _Decimal128.
3612
27dfdc0f
JM
36132019-10-10 Joseph Myers <joseph@codesourcery.com>
3614
3615 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3616 types if DFP not supported.
3617
94e7f906
JJ
36182019-10-10 Jakub Jelinek <jakub@redhat.com>
3619
3620 * c-common.h (c_omp_check_context_selector,
3621 c_omp_get_context_selector): Declare.
3622 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3623 in diagnostic message.
3624 (c_omp_check_context_selector, c_omp_get_context_selector): New
3625 functions.
3626 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3627 attribute.
3628 (handle_omp_declare_variant_attribute): New function.
3629
a7160771
MS
36302019-10-09 Martin Sebor <msebor@redhat.com>
3631
3632 PR tree-optimization/90879
3633 * c.opt (-Wstring-compare): New option.
3634
cb57504a
JM
36352019-10-08 Andrew Sutton <asutton@lock3software.com>
3636 Jason Merrill <jason@redhat.com>
3637
3638 Update the concepts implementation to conform to the C++20
3639 specification, improve compile times, and generally clean up
3640 the implementation.
3641
3642 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3643 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3644 * c.opt: Add -Wconcepts-ts.
3645 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3646 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3647 (set_std_cxx2a): Enable concepts by default.
3648
fbb2a6dc
JM
36492019-10-08 Joseph Myers <joseph@codesourcery.com>
3650
3651 * c-opts.c (c_common_post_options): Set
3652 -fno-fp-int-builtin-inexact for C2X.
3653
8e007055
JJ
36542019-10-05 Jakub Jelinek <jakub@redhat.com>
3655
3656 PR c++/91369 - Implement P0784R7: constexpr new
3657 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3658 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3659
843f104d
JM
36602019-10-04 Joseph Myers <joseph@codesourcery.com>
3661
3662 PR c/82752
3663 * c-format.c (C_STD_VER): Handle C2x.
3664 (C_STD_NAME): Likewise.
3665 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3666 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3667 modifier allowed and 'p' flag.
3668 * c-format.h (enum format_std_version): Add STD_C2X.
3669 (struct format_char_info): Mention 'p' in comment on flags2.
3670
e9c9a142
DM
36712019-10-01 David Malcolm <dmalcolm@redhat.com>
3672
3673 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3674 calling diagnostic_show_locus, rather than destroying it afterwards.
3675
7552c36a
JJ
36762019-10-01 Jakub Jelinek <jakub@redhat.com>
3677
3678 PR c++/91925
3679 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3680 with NULL DECL_FIELD_OFFSET.
3681
8209db25
RS
36822019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3683
3684 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3685 has a type name, use it in preference to the __vector syntax.
3686
9343bf99
RS
36872019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3688
3689 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3690 two spaces between a comma and "...".
3691
59bc434a
JJ
36922019-09-27 Jakub Jelinek <jakub@redhat.com>
3693
3694 PR c++/88203
3695 * c-common.h (c_omp_predefined_variable): Declare.
3696 * c-omp.c (c_omp_predefined_variable): New function.
3697 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3698 for predefined variables.
3699
c6447c20
RS
37002019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3701
3702 * c-common.h (build_function_call_vec): Take the original
3703 function decl as an optional final parameter.
3704 (check_builtin_function_arguments): Take the original function decl.
3705 * c-common.c (check_builtin_function_arguments): Likewise.
3706 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3707 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3708
c4438114
JM
37092019-09-15 Jason Merrill <jason@redhat.com>
3710
3711 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3712 fold_for_warn in "|| mask" warning.
3713
68a57628
ML
37142019-09-10 Martin Liska <mliska@suse.cz>
3715
3716 * c.opt: Use newly added WarnRemoved.
3717
f48ef52e
ML
37182019-09-09 Martin Liska <mliska@suse.cz>
3719
3720 * c.opt: Update comment of removed
3721 options that are preserved only for backward
3722 compatibility.
3723
67f6e649
ML
37242019-09-06 Martin Liska <mliska@suse.cz>
3725
3726 PR c++/91125
3727 * c-common.c: Remove definition of flag_use_repository.
3728 * c-common.h: Likewise.
3729 * c-opts.c (c_common_handle_option):
3730 Do not handle OPT_frepo option.
3731 * c.opt: Mark the option with Deprecated.
3732
db9d2274
MP
37332019-09-04 Marek Polacek <polacek@redhat.com>
3734
3735 * c.opt (fdeduce-init-list): Ignored.
3736
68e2c199
PK
37372019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3738
3739 PR c/78736
3740 * c.opt (Wenum-conversion): New option.
3741
7a4418a5
JL
37422019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3743
3744 * c-attribs.c (handle_section_attribute): Call the
3745 handle_generic_attribute target hook after performing target
3746 independent processing.
3747 (handle_noinit_attribute): Likewise.
3748
5f76ab15
ILT
37492019-09-03 Ian Lance Taylor <iant@golang.org>
3750
3751 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3752 when using -fgo-dump-spec.
3753
ae0d3f6a
ML
37542019-09-02 Martin Liska <mliska@suse.cz>
3755
3756 PR c++/91155
3757 * c-common.c (fname_as_string): Use cxx_printable_name for
3758 __PRETTY_FUNCTION__ same as was used before r265711.
3759
8a902edb
MP
37602019-08-28 Marek Polacek <polacek@redhat.com>
3761
3762 Implement P1152R4: Deprecating some uses of volatile.
3763 PR c++/91361
3764 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3765 default for C++2a, unless -Wno-deprecated.
3766 * c.opt (Wvolatile): New warning.
3767
4742dbe7
MP
37682019-08-28 Marek Polacek <polacek@redhat.com>
3769
3770 PR c++/91360 - Implement C++20 P1143R2: constinit.
3771 * c-common.c (c_common_reswords): Add constinit and __constinit.
3772 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3773 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3774 RID_LAST_CXX20.
3775 (D_CXX20): Define.
3776 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3777 * c-format.c (cxx_keywords): Add "constinit".
3778 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3779
6a074892
JJ
37802019-08-27 Jakub Jelinek <jakub@redhat.com>
3781
3782 PR c++/91415
3783 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3784 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3785 like COMPOUND_EXPR rather than normal expression.
3786
22f8849d
IS
37872019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3788
3789 PR pch/61250
3790 * c-lex.c (c_lex_with_flags): Don't call
3791 c_common_no_more_pch () from here.
3792
df375b03
JJ
37932019-08-23 Jakub Jelinek <jakub@redhat.com>
3794
3795 PR middle-end/91283
3796 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3797 instead of flag_excess_precision_cmdline.
3798 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3799 * c-opts.c (c_common_post_options): Likewise.
3800
14b7950f
MS
38012019-08-22 Martin Sebor <msebor@redhat.com>
3802
3803 PR middle-end/91490
3804 * c-common.c (braced_list_to_string): Add argument and overload.
3805 Handle flexible length arrays and unions.
3806
8bb2ee59
EB
38072019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3808
3809 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3810 function declarations where arguments are missing. Rename variables.
3811
21c1e205
RB
38122019-08-15 Richard Biener <rguenther@suse.de>
3813
3814 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3815 enabled, define __SIZETYPE__.
3816
f0033821
CL
38172019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3818
3819 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3820 exclusion with "section" attribute.
3821 (attr_noinit_exclusions): New table.
3822 (handle_noinit_attribute): New function.
3823
4d732405
RS
38242019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3825
3826 PR middle-end/91421
3827 * c-common.c (resolve_overloaded_builtin): Use
3828 copy_decl_built_in_function.
3829
51ad8481
MS
38302019-08-13 Martin Sebor <msebor@redhat.com>
3831
3832 PR c/80619
3833 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3834 (asm_fprintf_length_spec): Same.
3835 * c-format.h (format_lengths): Add FMT_LEN_w.
3836
77eb117f
JJ
38372019-08-10 Jakub Jelinek <jakub@redhat.com>
3838
3839 * c-pragma.h (enum pragma_omp_clause): Add
3840 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3841
398e3feb
JJ
38422019-08-07 Jakub Jelinek <jakub@redhat.com>
3843
3844 * c-pragma.h (enum pragma_omp_clause): Add
3845 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3846 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3847 enumeration value.
3848
ab574db6
MP
38492019-08-05 Marek Polacek <polacek@redhat.com>
3850
3851 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3852 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3853 default for C++2a, unless -Wno-deprecated.
3854 * c.opt (Wcomma-subscript): New warning.
3855
554a530f
JJ
38562019-07-20 Jakub Jelinek <jakub@redhat.com>
3857
3858 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3859 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3860 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3861 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3862 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3863 constructs with the loop construct.
3864
1a888209
JJ
38652019-07-13 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR c/91149
3868 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3869 OMP_CLAUSE_REDUCTION_TASK handling.
3870
1fdd6f04
JJ
38712019-07-12 Jakub Jelinek <jakub@redhat.com>
3872
3873 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3874 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3875
99b1c316
MS
38762019-07-09 Martin Sebor <msebor@redhat.com>
3877
3878 PR c++/61339
1fdd6f04 3879 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3880 and others to class.
3881 * c-pretty-print.h: Same.
3882
6c1dae73
MS
38832019-07-09 Martin Sebor <msebor@redhat.com>
3884
3885 PR c++/61339
3886 * c-format.c (check_argument_type): Change class-key from class to
3887 struct and vice versa to match convention and avoid -Wclass-is-pod
3888 and -Wstruct-no-pod.
3889 * c-pretty-print.h: Same.
3890
8ba6ea87
ML
38912019-07-03 Martin Liska <mliska@suse.cz>
3892
3893 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3894 dead assignemts.
3895
83eb9522
JJ
38962019-07-03 Jakub Jelinek <jakub@redhat.com>
3897
3898 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3899 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3900 with OMP_PARALLEL.
3901
1c6ffbab
QZ
39022019-07-02 qing zhao <qing.zhao@oracle.com>
3903
3904 PR preprocessor/90581
3905 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3906 * c.opt: Add new option -fmax-include-depth.
3907
7ffc7de5
JM
39082019-06-26 Jason Merrill <jason@redhat.com>
3909
3910 PR c++/55442 - memory-hog with highly recursive constexpr.
3911 * c.opt (fconstexpr-loop-limit): New.
3912
361af3e4
JJ
39132019-06-25 Jakub Jelinek <jakub@redhat.com>
3914
3915 PR sanitizer/90954
3916 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3917 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3918
ab20d992
JJ
39192019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3920
3921 * c-common.c (c_common_nodes_and_builtins): Define
3922 alternate "__intN__" name for "__intN" types.
3923
f4af4019
JH
39242019-06-24 Jan Hubicka <jh@suse.cz>
3925
3926 * c-common.c (braced_lists_to_strings): Check that
3927 type is array or integer prior checking string flag.
3928
da9e9b57
MB
39292019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3930
3931 PR c++/90875 - added -Wswitch-outside-range option
3932 * c.opt (Wswitch-outside-range): Added new option.
3933 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3934
3f3d6a6f
MP
39352019-06-21 Marek Polacek <polacek@redhat.com>
3936
3937 PR c++/90953 - ICE with -Wmissing-format-attribute.
3938 * c-common.c (check_function_arguments_recurse): Use
3939 get_attribute_name.
3940 (check_missing_format_attribute): Likewise.
3941
1bf32c11
MP
39422019-06-19 Marek Polacek <polacek@redhat.com>
3943
3944 PR c++/60364 - noreturn after first decl not diagnosed.
3945 * c-attribs.c (handle_noreturn_attribute): No longer static.
3946 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3947 Declare.
3948 * c-format.c (check_function_format): Use get_attribute_name.
3949
a04c0734
MS
39502019-06-19 Martin Sebor <msebor@redhat.com>
3951
3952 PR translation/90156
3953 * c-format.c (function_format_info::format_type): Adjust type.
3954 (function_format_info::is_raw): New member.
3955 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3956 (decode_format_attr): Adjust call to decode_format_type.
3957 Avoid a redundant call to convert_format_name_to_system_name.
3958 Avoid abbreviating the word "arguments" in a diagnostic.
3959 (format_warning_substr): New function.
3960 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3961 (finish_dollar_format_checking): Same.
3962 (check_format_info): Same.
3963 (struct baltoks_t): New.
3964 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3965 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3966 functions.
3967 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3968 maybe_diag_unbalanced_tokens.
3969 (handle_format_attribute): Spell out the word "arguments" in
3970 a diagnostic.
3971
d3786ebb
MB
39722019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3973
3974 PR c++/90449 - add -Winaccessible-base option.
3975 * c.opt (Winaccessible-base): New option.
3976
bf38f7e9
JJ
39772019-06-10 Jakub Jelinek <jakub@redhat.com>
3978
3979 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3980 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3981 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3982 combined/composite constructs where it is not allowed. Copy over
3983 OMP_CLAUSE_REDUCTION_INSCAN.
3984
0ecf545c
MS
39852019-06-05 Martin Sebor <msebor@redhat.com>
3986
3987 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3988 (handle_alias_ifunc_attribute): Same.
3989 (handle_copy_attribute): Same.
3990 (handle_weakref_attribute): Same.
3991 (handle_nonnull_attribute): Same.
3992 * c-warn.c (warn_for_sign_compare): Same.
3993 (warn_for_restrict): Same.
3994 * c.opt: Same.
3995
36b34127
MS
39962019-06-05 Martin Sebor <msebor@redhat.com>
3997
3998 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3999 * c.opt (-Wformat-diag): Remove a spurious period.
4000
357a352f
JJ
40012019-05-29 Jakub Jelinek <jakub@redhat.com>
4002
4003 PR c/90628
4004 * c-common.c (check_builtin_function_arguments)
4005 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4006 as last argument.
4007
2b8235ea
EB
40082019-05-23 Eric Botcazou <ebotcazou@adacore.com>
4009
4010 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4011
6d86ddc4
ML
40122019-05-22 Martin Liska <mliska@suse.cz>
4013
4014 PR lto/90500
4015 * c-attribs.c (handle_copy_attribute): Do not copy
4016 target_clones attribute.
4017
419ba5b9
EB
40182019-05-21 Eric Botcazou <ebotcazou@adacore.com>
4019
4020 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4021 * c-ada-spec.c (print_assignment_operator): New function.
4022 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4023 assignment operators declared as methods and filter out the others.
4024
e03436e7
TS
40252019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4026
4027 PR c/89433
4028 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4029 "omp declare target".
4030
a9c697b8
MS
40312019-05-16 Martin Sebor <msebor@redhat.com>
4032
ab20d992
JJ
4033 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4034 keywords, operators, and types in diagnostics.
4035 (handle_scalar_storage_order_attribute): Same.
4036 (handle_mode_attribute): Same.
4037 (handle_visibility_attribute): Same.
4038 (handle_assume_aligned_attribute): Same.
4039 (handle_no_split_stack_attribute): Same.
4040 * c-common.c (shorten_compare): Same.
4041 (c_common_truthvalue_conversion): Same.
4042 (cb_get_source_date_epoch): Same.
4043 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4044 in diagnostics.
4045 (interpret_float): Same.
4046 * c-omp.c (c_finish_omp_for): Same.
4047 * c-opts.c (c_common_post_options): Same.
4048 * c-pch.c (c_common_pch_pragma): Same.
4049 * c-pragma.c (pop_alignment): Same.
4050 (handle_pragma_pack): Same.
4051 (apply_pragma_weak): Same.
4052 (handle_pragma_weak): Same.
4053 (handle_pragma_scalar_storage_order): Same.
4054 (handle_pragma_redefine_extname): Same.
4055 (add_to_renaming_pragma_list): Same.
4056 (maybe_apply_renaming_pragma): Same.
4057 (push_visibility): Same.
4058 (handle_pragma_visibility): Same.
4059 (handle_pragma_optimize): Same.
4060 (handle_pragma_message): Same.
4061 * c-warn.c (warn_for_omitted_condop): Same.
4062 (lvalue_error): Same.
a9c697b8 4063
6b943512
RB
40642019-05-15 Richard Biener <rguenther@suse.de>
4065
4066 PR c/90474
4067 * c-common.c (c_common_mark_addressable_vec): Also mark
4068 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4069 c_mark_addressable.
ab20d992 4070
b744fc85
NS
40712019-05-06 Nathan Sidwell <nathan@acm.org>
4072
4073 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4074
598f50d7
NS
40752019-04-30 Nathan Sidwell <nathan@acm.org>
4076
4077 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4078
5bcc5a3b
ML
40792019-04-30 Martin Liska <mliska@suse.cz>
4080
4081 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4082 for unknown options.
4083
e78a87f7
RS
40842019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4085
4086 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4087 the pointer target rather than the pointer itself.
4088
c280b7ee
JJ
40892019-04-19 Jakub Jelinek <jakub@redhat.com>
4090
4091 PR c/89888
4092 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4093 arguments.
4094 (c_do_switch_warnings): Remove outside_range_p argument.
4095 * c-common.c (check_case_bounds): Removed.
4096 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4097 Don't call check_case_bounds. Fold low_value as well as high_value.
4098 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4099 Check for case labels outside of range of original type here and
4100 adjust them.
4101
8e8225e6
JJ
41022019-04-12 Jakub Jelinek <jakub@redhat.com>
4103
63b8a166
JJ
4104 PR translation/90041
4105 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4106 in the Warn diagnostics.
4107
8e8225e6
JJ
4108 PR c/89946
4109 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4110 function comment. Warn if arguments of the attribute are not positive
4111 integer constants.
4112
53a3f614
EB
41132019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4114
4115 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4116 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4117
22be5873
EB
41182019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4119
4120 * c-ada-spec.c (is_float128): New predicate extracted from...
4121 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4122 <REAL_TYPE>: ...here. Call it.
4123
34facf20
DM
41242019-04-05 David Malcolm <dmalcolm@redhat.com>
4125
4126 PR c/89985
4127 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4128 auto_diagnostic_group. Guard inform calls by result of
4129 warning_at call.
4130
05564120
MP
41312019-04-05 Marek Polacek <polacek@redhat.com>
4132
ab20d992 4133 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
4134 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4135 of RHS.
4136
7a506c3c
JM
41372019-04-03 Jason Merrill <jason@redhat.com>
4138
4139 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4140 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4141
ddeae8c8
MS
41422019-04-01 Martin Sebor <msebor@redhat.com>
4143
4144 PR c/89685
4145 * c-attribs.c (handle_copy_attribute): Handle references and
4146 non-constant expressions.
4147
a15ffa22
JJ
41482019-03-22 Jakub Jelinek <jakub@redhat.com>
4149
4150 PR c++/87481
4151 * c.opt (-fconstexpr-ops-limit=): New option.
4152
36a3a7a3
JJ
41532019-03-21 Jakub Jelinek <jakub@redhat.com>
4154
4155 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4156 template param.
4157
bec1da64
MS
41582019-03-19 Martin Sebor <msebor@redhat.com>
4159
4160 PR tree-optimization/89688
4161 * c-common.c (braced_list_to_string): Make static.
4162 (braced_lists_to_strings): Define new function.
4163 * c-common.h (braced_list_to_string): Remove.
4164 (braced_lists_to_strings): Declare.
4165
1fe61adf
ML
41662019-03-12 Martin Liska <mliska@suse.cz>
4167
4168 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4169
93964ebd
ML
41702019-03-11 Martin Liska <mliska@suse.cz>
4171
4172 * c-opts.c (c_common_post_options): Wrap apostrophes
4173 in gcc internal format with %'.
4174
a3f9f006
ML
41752019-03-11 Martin Liska <mliska@suse.cz>
4176
4177 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4178 in a string format message and fix GNU coding style.
4179 * c-common.c (vector_types_convertible_p): Likewise.
4180 (c_build_vec_perm_expr): Likewise.
4181 * c-indentation.c (get_visual_column): Likewise.
4182 * c-opts.c (c_common_handle_option): Likewise.
4183 (c_common_post_options): Likewise.
4184 (sanitize_cpp_opts): Likewise.
4185 * c-pch.c (c_common_pch_pragma): Likewise.
4186 * c-pragma.c (handle_pragma_pack): Likewise.
4187
1db01ff9
JJ
41882019-03-08 Jakub Jelinek <jakub@redhat.com>
4189
4190 PR tree-optimization/89550
4191 * c-common.c (c_common_truthvalue_conversion): Only set
4192 TREE_NO_WARNING if warning_at returned true.
4193 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4194
ba790e6f
JJ
41952019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4196 Martin Sebor <msebor@gmail.com>
4197
4198 * c.opt (Wmissing-attributes): Clean up doc string.
4199
7da73ba7
JJ
42002019-02-25 Jakub Jelinek <jakub@redhat.com>
4201
4202 PR c/89495
4203 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4204 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4205 checking.
4206
921bb9d1
RB
42072019-02-22 Richard Biener <rguenther@suse.de>
4208
4209 * c-pch.c (no_checksum): Remove.
4210 (pch_init): Remove assertion that executable_checksum is not
4211 all zero.
4212 (c_common_valid_pch): Likewise.
4213
e2ebb05c
MS
42142019-02-18 Martin Sebor <msebor@redhat.com>
4215
4216 PR middle-end/89294
4217 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4218
3fe53000
DM
42192019-02-16 David Malcolm <dmalcolm@redhat.com>
4220
4221 PR c++/88680
4222 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4223 implementing -Wtype-limits.
4224
28a8cef1
MS
42252019-02-11 Martin Sebor <msebor@redhat.com>
4226
4227 PR c++/87996
4228 * c-common.c (invalid_array_size_error): New function.
4229 (valid_array_size_p): Call it. Handle size as well as type.
4230 * c-common.h (valid_constant_size_p): New function.
4231 (enum cst_size_error): New type.
4232
ec2be203
DM
42332019-01-31 David Malcolm <dmalcolm@redhat.com>
4234
4235 PR c/89122
4236 * known-headers.cc (get_stdlib_header_for_name): Add
4237 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4238
8936f047
JJ
42392019-01-31 Jakub Jelinek <jakub@redhat.com>
4240
4241 PR libstdc++/88170
4242 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4243 a C cast in pp_c_flag_gnu_v3 mode.
4244
6a335b96
JJ
42452019-01-29 Jakub Jelinek <jakub@redhat.com>
4246
4247 PR c/86125
4248 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4249 builtin_structptr_types types even for C.
4250
2a06eba5
BE
42512019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4252
4253 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4254 when rhs is of array type correctly. Fix handling of nested structures.
4255 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4256 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4257 type casts within nested compound expressions.
4258
18a23298
JJ
42592019-01-22 Jakub Jelinek <jakub@redhat.com>
4260
4261 PR middle-end/88968
4262 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4263 variable after using BIT_FIELD_REF.
4264
420183d9
L
42652019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4266
4267 PR c/51628
4268 PR c/88664
4269 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4270 Remove the boolean argument.
4271 * c-warn.c (check_address_of_packed_member): Renamed to ...
4272 (check_address_or_pointer_of_packed_member): This. Also
4273 warn pointer conversion.
4274 (check_and_warn_address_of_packed_member): Renamed to ...
4275 (check_and_warn_address_or_pointer_of_packed_member): This.
4276 Also warn pointer conversion.
4277 (warn_for_address_or_pointer_of_packed_member): Remove the
4278 boolean argument. Don't check pointer conversion here.
4279
99063eee
RS
42802019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4281
4282 PR inline-asm/52813
4283 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4284
a30d0196
JJ
42852019-01-14 Jakub Jelinek <jakub@redhat.com>
4286
4287 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4288 and __cpp_nontype_template_parameter_auto. Add a comment that
4289 __cpp_template_auto is deprecated.
4290
2d91f79d
TH
42912019-01-14 Tom Honermann <tom@honermann.net>
4292
4293 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4294 * c-common.c (c_common_reswords): Add char8_t.
4295 (fix_string_type): Use char8_t for the type of u8 string literals.
4296 (c_common_get_alias_set): char8_t doesn't alias.
4297 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4298 C++.
4299 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4300 (keyword_begins_type_specifier): Add RID_CHAR8.
4301 * c-common.h (rid): Add RID_CHAR8.
4302 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4303 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4304 Define char8_type_node and char8_array_type_node.
4305 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4306 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4307 (c_cpp_builtins): Predefine __cpp_char8_t.
4308 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4309 CPP_UTF8STRING.
4310 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4311 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4312 targeting C++2a.
4313 * c.opt: Add the -fchar8_t command line option.
4314
23db6ced
MS
43152019-01-14 Martin Sebor <msebor@redhat.com>
4316
4317 PR target/88638
4318 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4319 and issue errors if it fails.
4320 * c-common.h (valid_format_string_type_p): Declare.
4321 * c-format.c (valid_stringptr_type_p): Rename...
4322 (valid_format_string_type_p): ...to this and make extern.
4323 (handle_format_arg_attribute): Adjust to new name.
4324 (check_format_string): Same.
4325
234c3818
L
43262019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4327
4328 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4329 Replace "may may" with "may" in warning message.
4330
d8fcab68
JJ
43312019-01-07 Jakub Jelinek <jakub@redhat.com>
4332
4333 PR c++/85052
4334 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4335 (c_build_vec_convert): Declare.
4336 * c-common.c (c_build_vec_convert): New function.
4337
29d24852
MS
43382019-01-04 Martin Sebor <msebor@redhat.com>
4339
4340 PR c/88546
4341 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4342 Handle C++ empty throw specification and C11 _Noreturn.
4343 (has_attribute): Also handle C11 _Noreturn.
4344
9069a4c9
MS
43452019-01-04 Martin Sebor <msebor@redhat.com>
4346
4347 PR c/88363
4348 * c-attribs.c (positional_argument): Also accept enumerated types.
4349
a5544970
JJ
43502019-01-01 Jakub Jelinek <jakub@redhat.com>
4351
4352 Update copyright years.
4353
da77eace
L
43542018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4355
4356 PR c/51628
4357 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4358 * c-warn.c (check_alignment_of_packed_member): New function.
4359 (check_address_of_packed_member): Likewise.
4360 (check_and_warn_address_of_packed_member): Likewise.
4361 (warn_for_address_or_pointer_of_packed_member): Likewise.
4362 * c.opt: Add -Wno-address-of-packed-member.
4363
573767d4
DM
43642018-12-20 David Malcolm <dmalcolm@redhat.com>
4365
4366 PR c++/87504
4367 * c-warn.c (get_outermost_macro_expansion): New function.
4368 (spelled_the_same_p): Use it to unwind the macro expansions, and
4369 compare the outermost macro in each nested expansion, rather than
4370 the innermost.
4371
a14feb3c
DM
43722018-12-19 David Malcolm <dmalcolm@redhat.com>
4373
4374 PR c++/87504
4375 * c-common.h (warn_tautological_cmp): Convert 1st param from
4376 location_t to const op_location_t &.
4377 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4378 when testing for INTEGER_CST.
4379 (warn_tautological_bitwise_comparison): Convert 1st param from
4380 location_t to const op_location_t &; use it to build a
4381 binary_op_rich_location, and use this.
4382 (spelled_the_same_p): New function.
4383 (warn_tautological_cmp): Convert 1st param from location_t to
4384 const op_location_t &. Warn for macro expansions if
4385 spelled_the_same_p. Use binary_op_rich_location.
4386
dfd7fdca
DM
43872018-12-19 David Malcolm <dmalcolm@redhat.com>
4388
4389 PR c++/43064
4390 PR c++/43486
4391 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4392 (verify_tree): Handle location wrappers.
4393 (c_common_truthvalue_conversion): Strip any location wrapper.
4394 Handle CONST_DECL.
4395 (fold_offsetof): Strip any location wrapper.
4396 (complete_array_type): Likewise for initial_value.
4397 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4398 index before checking for INTEGER_CST.
4399 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4400 print parentheses around location wrappers.
4401 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4402 before checking for INTEGER_CST.
4403 (warn_tautological_bitwise_comparison): Call
4404 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4405 before checking for INTEGER_CST.
4406 (readonly_error): Strip any location wrapper.
4407 (warn_array_subscript_with_type_char): Strip location wrappers
4408 before checking for INTEGER_CST. Use the location of the index if
4409 available.
4410
5c8b3702
JM
44112018-12-06 Jason Merrill <jason@redhat.com>
4412
4413 PR c++/88136 - -Wdeprecated-copy false positives
4414 * c.opt (Wdeprecated-copy-dtor): New.
4415 (Wdeprecated-copy): Move to -Wextra.
4416
673670da
MS
44172018-11-29 Martin Sebor <msebor@redhat.com>
4418
4419 PR c/88172
4420 PR testsuite/88208
4421 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4422 alignments to values less than the target requires.
4423 (has_attribute): For attribute aligned consider both the attribute
4424 and the alignment bits.
4425 * c-common.c (c_init_attributes): Optionally issue a warning for
4426 zero alignment.
4427
04864ec8
MS
44282018-11-28 Martin Sebor <msebor@redhat.com>
4429
4430 PR c/88065
4431 PR c/87297
4432 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4433 or destination is an error.
4434
ace83db0
JJ
44352018-11-28 Jakub Jelinek <jakub@redhat.com>
4436
4437 PR c++/88215
4438 * c-ubsan.c: Include langhooks.h.
4439 (ubsan_instrument_division): Change gcc_assert that main variants
4440 of op0 and op1 types are equal to gcc_checking_assert that the
4441 main variants are compatible types.
4442
da193a27
EB
44432018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4444
4445 * c-ada-spec.c: Include stringpool.h.
4446 (has_static_fields): Return false for incomplete types.
4447 (is_tagged_type): Likewise.
4448 (has_nontrivial_methods): Likewise.
4449 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4450 (struct overloaded_name_hash): New structure.
4451 (struct overloaded_name_hasher): Likewise.
4452 (overloaded_names): New global variable.
4453 (init_overloaded_names): New static function.
4454 (overloaded_name_p): New predicate.
4455 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4456 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4457 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4458 Remove always-true condition and dump forward types.
4459 (dump_ada_specs): Delete overloaded_names.
4460
98f08eb8
MS
44612018-11-20 Martin Sebor <msebor@redhat.com>
4462
4463 * c-attribs.c (type_for_vector_size): New function.
4464 (type_valid_for_vector_size): Same.
4465 (handle_vector_size_attribute): Move code to the functions above
4466 and call them.
4467 (validate_attribute, has_attribute): New functions.
4468 * c-common.h (has_attribute): Declare.
4469 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4470 * c-common.c (c_common_resword): Same.
4471
2674fa47
JM
44722018-11-16 Jason Merrill <jason@redhat.com>
4473
4474 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4475 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4476
258b3854
JJ
44772018-11-16 Jakub Jelinek <jakub@redhat.com>
4478
4479 PR middle-end/87854
4480 * c-common.c (fix_string_type): Reject string literals larger than
4481 TYPE_MAX_VALUE (ssizetype) bytes.
4482
1d249509
MS
44832018-11-15 Martin Sebor <msebor@redhat.com>
4484
4485 PR c++/87541
4486 PR c++/87542
4487 * c-attribs.c (positional_argument): New function.
4488 (handle_alloc_size_attribute): Use it and simplify.
4489 (handle_alloc_align_attribute): Same.
4490 (handle_assume_aligned_attribute): Same.
4491 (handle_nonnull_attribute): Same.
4492 * c-common.c (check_function_arguments): Pass fntype to
4493 check_function_format.
4494 * c-common.h (check_function_format): Add an argument.
4495 (PosArgFlags, positional_argument): Declare new type and function.
4496 * c-format.c (decode_format_attr): Add arguments.
4497 (check_format_string, get_constant): Same.
4498 (convert_format_name_to_system_name): Adjust.
4499
478dd60d
DM
45002018-11-15 David Malcolm <dmalcolm@redhat.com>
4501
4502 PR other/19165
4503 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4504
8cca0163
JJ
45052018-11-14 Jakub Jelinek <jakub@redhat.com>
4506
8ee09943
JJ
4507 P1236R1 - Signed integers are two's complement
4508 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4509 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4510 with in-range second operand well defined for -std=c++2a.
4511
8cca0163
JJ
4512 PR other/88007
4513 * c-common.c (parse_optimize_options): Allocate option string from
4514 opts_obstack rather than as GC memory. Move the allocation after
4515 warning for invalid option.
4516
620e594b
DM
45172018-11-13 David Malcolm <dmalcolm@redhat.com>
4518
4519 * c-common.c (c_get_substring_location): Update for renaming of
4520 get_source_location_for_substring to get_location_within_string.
4521 * c-lex.c: Replace "source_location" with "location_t".
4522 * c-opts.c: Likewise.
4523 * c-ppoutput.c: Likewise.
4524
f9731de3
MS
45252018-11-13 Martin Sebor <msebor@redhat.com>
4526
4527 PR middle-end/81824
4528 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4529 (handle_tls_model_attribute): Improve diagnostics.
4530
e4bd6d5e
JM
45312018-11-12 Jason Merrill <jason@redhat.com>
4532
a6bb6b07
JM
4533 * c-cppbuiltin.c (c_cpp_builtins): Define
4534 __cpp_impl_destroying_delete.
4535
e4bd6d5e
JM
4536 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4537 __cpp_conditional_explicit.
4538
79a2c428
MS
45392018-11-09 Martin Sebor <msebor@redhat.com>
4540
4541 PR middle-end/81824
4542 * c-attribs.c (handle_copy_attribute): New function.
4543
4c7bd361
MS
45442018-11-09 Martin Sebor <msebor@redhat.com>
4545
4546 PR c/87795
4547 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4548
28567c40
JJ
45492018-11-08 Jakub Jelinek <jakub@redhat.com>
4550
4551 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4552 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4553 enum omp_memory_order MEMORY_ORDER.
4554 (c_finish_omp_flush): Add MO argument.
4555 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4556 (c_finish_omp_for): Add FINAL_P argument.
4557 * c-omp.c: Include memmodel.h.
4558 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4559 OMP_TASKGROUP_CLAUSES to it.
4560 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4561 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4562 instead of OMP_ATOMIC_SEQ_CST.
4563 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4564 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4565 __atomic_thread_fence call with the given value.
4566 (check_omp_for_incr_expr): Formatting fixes.
4567 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4568 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4569 is not constant expression 1 or -1. Transform NE_EXPR loops
4570 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4571 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4572 loops too.
4573 (c_omp_split_clauses): Add support for combined
4574 #pragma omp parallel master and
4575 #pragma omp {,parallel }master taskloop{, simd} constructs.
4576 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4577 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4578 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4579 (c_omp_predetermined_sharing): Don't return
4580 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4581 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4582 PRAGMA_OMP_REQUIRES.
4583 * c-pragma.h (enum pragma_kind): Likewise.
4584 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4585 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4586
204839e7
DM
45872018-11-08 David Malcolm <dmalcolm@redhat.com>
4588
4589 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4590
d8010ee4
DM
45912018-11-08 David Malcolm <dmalcolm@redhat.com>
4592
4593 * c-format.c (local_cgraph_node_ptr_node): New variable.
4594 (gcc_dump_printf_char_table): Add entry for %C.
4595 (get_pointer_to_named_type): New function, taken from the handling
4596 code for "gimple *" from...
4597 (init_dynamic_diag_info): ...here. Add handling for
4598 "cgraph_node *".
4599 * c-format.h (T_CGRAPH_NODE): New.
4600
4be5c72c
JM
46012018-10-19 Jason Merrill <jason@redhat.com>
4602
4603 * c-cppbuiltin.c (c_cpp_builtins): Add
4604 __cpp_nontype_template_parameter_class.
4605
f3f6029d
NS
46062018-10-31 Nathan Sidwell <nathan@acm.org>
4607
ab5324fb
NS
4608 * c-opts.c (c_finish_options): Force command line macro
4609 location. Refactor to avoid repeating main debug hook.
4610 (push_command_line_include): Clarify comment.
4611
f3f6029d
NS
4612 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4613
91e3ec29
MS
46142018-10-30 Martin Sebor <msebor@redhat.com>
4615
4616 PR middle-end/87041
4617 * c-format.c (check_format_types): Avoid diagnosing null pointer
4618 arguments to printf-family of functions.
4619
b5ff4f5c
MP
46202018-10-30 Marek Polacek <polacek@redhat.com>
4621
4622 Implement P0892R2, explicit(bool).
4623 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4624
7e2de6df
DM
46252018-10-29 David Malcolm <dmalcolm@redhat.com>
4626
4627 * name-hint.h (name_hint::take_deferred): New member function.
4628
b2bf438c
DM
46292018-10-29 David Malcolm <dmalcolm@redhat.com>
4630
4631 PR c++/56856
4632 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4633 argument.
4634 (check_function_restrict): Rename param "argarray" to
4635 "unfolded_argarray", and make a copy named "argarray", calling
4636 fold_for_warn on each argument.
4637 (check_function_arguments): Add note about responsibility for
4638 folding the arguments.
4639
9f936c86
JM
46402018-10-17 Joseph Myers <joseph@codesourcery.com>
4641
4642 * c-common.c (flag_isoc2x): New variable.
4643 * c-common.h (clk_c): Update comment to reference C2X.
4644 (flag_isoc99, flag_isoc11): Update comments to reference future
4645 standard versions in general.
4646 (flag_isoc2x): Declare.
4647 * c-opts.c (set_std_c2x): New function.
4648 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4649 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4650 flag_isoc2x to 0.
4651 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4652
7a8a92c4
JM
46532018-10-17 Joseph Myers <joseph@codesourcery.com>
4654
4655 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4656 (std=iso9899:2018): Document C17 as published in 2018.
4657
4dc003ff
CL
46582018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4659
4660 PR c++/87364
4661 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4662
79371671
WW
46632018-10-11 Will Wray <wjwray@gmail.com>
4664
4665 PR c++/87364
4666 * c-pretty-print.h (pp_c_type_cast): Prototype.
4667 (pp_c_integer_constant): Likewise.
4668 * c-pretty-print.c (pp_c_type_cast): No longer static.
4669 (pp_c_integer_constant): Likewise.
4670 (pp_c_enumeration_constant): Fix loop termination when finding
4671 name of constant. No longer returns a value. Call
4672 pp_c_integer_constant.
4673 (c_pretty_printer::constant): Update for changes to
4674 pp_c_enumeration_constant.
4675
46c62690
JJ
46762018-10-11 Jakub Jelinek <jakub@redhat.com>
4677
4678 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4679 for no_unique_address.
4680
c24300ba
DM
46812018-10-09 David Malcolm <dmalcolm@redhat.com>
4682
4683 * c-common.c (c_option_controlling_cpp_error): Rename to...
4684 (c_option_controlling_cpp_diagnostic): ...this, and convert
4685 "reason" from int to enum.
4686 (c_cpp_error): Rename to...
4687 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4688 * c-common.h (c_cpp_error): Rename to...
4689 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4690 * c-opts.c (c_common_init_options): Update for renaming.
4691
8656dafa
RS
46922018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4693
4694 PR c/87286
4695 * c-common.c (vector_types_compatible_elements_p): Use
4696 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4697
8cff0652
VK
46982018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4699
4700 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4701 to generate constructor destructor priority warning.
4702 * c.opt (-Wprio-ctor-dtor): New option.
4703
bedf03a2
JM
47042018-10-01 Jason Merrill <jason@redhat.com>
4705
4706 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4707
6cc430c1
EB
47082018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4709
4710 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4711 (dump_ada_node): Add const keyword.
4712
87677ac7
ML
47132018-09-25 Martin Liska <mliska@suse.cz>
4714
4715 * c-common.c (c_common_truthvalue_conversion):
4716 Remove Pascal from documentation.
4717
518196cb
EB
47182018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4719
4720 * c-ada-spec.c: Include diagnostic.h.
4721 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4722
a599af84
MP
47232018-09-19 Marek Polacek <polacek@redhat.com>
4724
4725 * c.opt (Wclass-conversion): New.
4726
9c4a4b3c
DM
47272018-09-17 David Malcolm <dmalcolm@redhat.com>
4728
4729 * c-format.c (range_label_for_format_type_mismatch::get_text):
4730 Update for new param.
4731
c896ecfe
DM
47322018-09-17 David Malcolm <dmalcolm@redhat.com>
4733
4734 * c-format.c (format_warning_at_char): Update for introduction of
4735 format_string_diagnostic_t.
4736 (format_type_warning): Likewise.
4737
80c6d1f4
MJ
47382018-09-17 Martin Jambor <mjambor@suse.cz>
4739
4740 PR c/63886
4741 * c.opt (Wabsolute-value): New.
4742
6d900107
BE
47432018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4744
4745 * c-common.c (complete_flexible_array_elts): New helper function.
4746 * c-common.h (complete_flexible_array_elts): Declare.
4747
b5764229
BE
47482018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4749
4750 * c-common.c (braced_list_to_string): Remove eval parameter.
4751 Add some more checks. Always create zero-terminated STRING_CST.
4752 * c-common.h (braced_list_to_string): Adjust prototype.
4753
85204e23
DM
47542018-08-27 David Malcolm <dmalcolm@redhat.com>
4755
4756 PR 87091
4757 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4758 to a tri-state.
4759 (maybe_suggest_missing_token_insertion): Likewise.
4760 (maybe_add_include_fixit): Add param "override_location". If set,
4761 and source-printing is enabled, then override the rich_location's
4762 primary location with that of the insertion point for the fix-it
4763 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4764 * c-common.h (extern void maybe_add_include_fixit): Add bool
4765 param.
4766 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4767 for conversion of show_caret_p to a tri-state.
4768 * c-warn.c (warn_for_restrict): Likewise.
4769 * known-headers.cc
4770 (suggest_missing_header::~suggest_missing_header): Update call to
4771 maybe_add_include_fixit to suggest overriding the location, as it
4772 is for a note.
4773
3d78e008
ML
47742018-08-27 Martin Liska <mliska@suse.cz>
4775
4776 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4777 fndecl_built_in_p and remove check for FUNCTION_DECL if
4778 possible.
3d78e008
ML
4779 (check_builtin_function_arguments): Likewise.
4780 (reject_gcc_builtin): Likewise.
4781 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4782
b5be6d0c
MP
47832018-08-26 Marek Polacek <polacek@redhat.com>
4784
4785 PR c++/87029, Implement -Wredundant-move.
4786 * c.opt (Wredundant-move): New option.
4787
79ca9c35
MP
47882018-08-21 Marek Polacek <polacek@redhat.com>
4789
4790 PR c++/86981, Implement -Wpessimizing-move.
4791 * c.opt (Wpessimizing-move): New option.
4792
097f82ec
DM
47932018-08-20 David Malcolm <dmalcolm@redhat.com>
4794
4795 PR other/84889
4796 * c-attribs.c (common_handle_aligned_attribute): Add
4797 auto_diagnostic_group instance.
4798 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4799 * c-opts.c (c_common_post_options): Likewise.
4800 * c-warn.c (warn_logical_not_parentheses): Likewise.
4801 (warn_duplicated_cond_add_or_warn): Likewise.
4802 (warn_for_multistatement_macros): Likewise.
4803
3fb558b1
NS
48042018-08-20 Nathan Sidwell <nathan@acm.org>
4805
4806 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4807 access.
4808
800c0e98
NS
48092018-08-17 Nathan Sidwell <nathan@acm.org>
4810
4811 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4812 field.
4813 (laxy_hex_fp_value_count): Make unsigned.
4814 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4815 manipulate the macro.
4816 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4817 cpp_define_lazily.
4818
6f795a92
DM
48192018-08-17 David Malcolm <dmalcolm@redhat.com>
4820
4821 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4822 (gcc_dump_printf_length_specs): New.
4823 (gcc_dump_printf_flag_pairs): New.
4824 (gcc_dump_printf_flag_specs): New.
4825 (gcc_dump_printf_char_table): New.
4826 (format_types_orig): Add entry for "gcc_dump_printf".
4827 (init_dynamic_diag_info): Set up length_char_specs and
4828 conversion_specs for gcc_dump_printf_format_type.
4829 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4830
c5d725c0
NS
48312018-08-17 Nathan Sidwell <nathan@acm.org>
4832
10f04917
NS
4833 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4834
c5d725c0
NS
4835 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4836 * c-cppbuiltin.c: Likewise.
4837
c0c12356
ML
48382018-08-17 Martin Liska <mliska@suse.cz>
4839
4840 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4841 Ignore/Deprecated flag. Warning is done automatically for
4842 Deprecated flags.
c0c12356 4843
10fcc142
DM
48442018-08-16 David Malcolm <dmalcolm@redhat.com>
4845
4846 PR c++/70693
4847 * c-common.c (selftest::c_family_tests): Call
4848 selftest::c_indentation_c_tests.
4849 * c-common.h (selftest::c_indentation_c_tests): New decl.
4850 * c-indentation.c: Include "selftest.h".
4851 (next_tab_stop): Add "tab_width" param, rather than accessing
4852 cpp_opts.
4853 (get_visual_column): Likewise. Clarify comment. Bulletproof
4854 against reading past the end of the line.
4855 (get_first_nws_vis_column): Add "tab_width" param.
4856 (detect_intervening_unindent): Likewise.
4857 (should_warn_for_misleading_indentation): Read tab width from
4858 cpp_opts and pass around.
4859 (selftest::test_next_tab_stop): New test.
4860 (selftest::assert_get_visual_column_succeeds): New function.
4861 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4862 (selftest::assert_get_visual_column_fails): New function.
4863 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4864 (selftest::test_get_visual_column): New test.
4865 (selftest::c_indentation_c_tests): New function.
4866
3f6677f4
NS
48672018-08-16 Nathan Sidwell <nathan@acm.org>
4868
4869 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4870 (store_ada_macro): Likewise.
4871 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4872 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4873
96e6ae57
DM
48742018-08-15 David Malcolm <dmalcolm@redhat.com>
4875
4876 * c-format.c: Include "selftest-diagnostic.h" and
4877 "gcc-rich-location.h".
4878 (format_warning_at_char): Pass NULL for new label params of
4879 format_warning_va.
4880 (class indirection_suffix): New class.
4881 (class range_label_for_format_type_mismatch): New class.
4882 (format_type_warning): Move logic for generating "*" suffix to
4883 class indirection_suffix. Create "fmt_label" and "param_label"
4884 to show their types, and pass them to the
4885 format_warning_at_substring calls.
4886 (selftest::test_type_mismatch_range_labels): New test.
4887 (selftest::c_format_c_tests): Call it.
4888
23aa9f7c
MS
48892018-08-13 Martin Sebor <msebor@redhat.com>
4890
4891 PR tree-optimization/71625
4892 * c-common.c (braced_list_to_string): New function.
4893 * c-common.h (braced_list_to_string): Declare it.
4894
f10a9135
NS
48952018-08-08 Nathan Sidwell <nathan@acm.org>
4896
4897 * c-common.c (try_to_locate_new_include_inertion_point): Use
4898 linemap_included_from_linemap.
4899 * c-lex.c (fe_file_change): Use linemap_included_from.
4900 * c-ppoutput.c (pp_file_change): Likewise.
4901
8a45b051
MS
49022018-08-01 Martin Sebor <msebor@redhat.com>
4903
4904 PR tree-optimization/86650
ab20d992 4905 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4906 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4907 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4908 * c-format.h (T89_G): Update to be "gimple *" rather than
4909 "gcall *".
4910 (local_gcall_ptr_node): Rename...
4911 (local_gimple_ptr_node): ...to this.
4912
e540ccc0
DM
49132018-07-31 David Malcolm <dmalcolm@redhat.com>
4914
4915 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4916 table entries for gcc_diag_char_table, and the 'Z' entry from
4917 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4918 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4919 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4920 adding missing "Z" for this table. Remove erroneous "G" and "K"
4921 entries.
4922 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4923 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4924 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4925
425fc685
RE
49262018-07-31 Richard Earnshaw <rearnsha@arm.com>
4927
4928 * c-common.c (speculation_safe_resolve_call): New function.
4929 (speculation_safe_resolve_params): New function.
4930 (speculation_safe_resolve_return): New function.
4931 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4932 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4933 __HAVE_SPECULATION_SAFE_VALUE.
4934
181463c2
DM
49352018-07-20 David Malcolm <dmalcolm@redhat.com>
4936
4937 * c-common.c (c_cpp_error): Remove redundant "line_table"
4938 parameter from call to rich_location::set_range.
4939 (maybe_suggest_missing_token_insertion): Likewise.
4940
0d7f9065
MS
49412018-07-20 Martin Sebor <msebor@redhat.com>
4942
4943 PR middle-end/82063
ab20d992 4944 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4945
00abf86c
MS
49462018-07-20 Martin Sebor <msebor@redhat.com>
4947
4948 PR middle-end/82063
4949 * c-common.h (c_common_handle_option): Change function argument
4950 to HOST_WIDE_INT.
4951 * c-opts.c (c_common_init_options): Same.
4952 (c_common_handle_option): Same. Remove special handling of
4953 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4954 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4955 options to take a HOST_WIDE_INT argument and accept a byte-size
4956 suffix. Initialize.
4957 (-Wvla-larger-than): Same.
4958 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4959 (-Wno-vla-larger-than): Same.
4960
9b452033
JJ
49612018-07-12 Jakub Jelinek <jakub@redhat.com>
4962
4963 * c-attribs.c (c_common_attribute_table): Add
4964 "omp declare target implicit" attribute.
4965
cd0762f3
RB
49662018-07-12 Richard Biener <rguenther@suse.de>
4967
4968 PR c/86453
4969 * c-attribs.c (handle_packed_attribute): Do not build a variant
4970 type with TYPE_PACKED, instead ignore the attribute if we may
4971 not apply to the original type.
4972
0b27c3ed
JJ
49732018-07-10 Jakub Jelinek <jakub@redhat.com>
4974
4975 PR c++/86443
4976 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4977 to contain TREE_LIST for both the original class iterator and the
4978 "last" helper var.
4979
e730a0ef
EB
49802018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4981
4982 * c-ada-spec.c (to_ada_name): Remove index parameter.
4983 (pp_ada_tree_identifier): Likewise.
4984 (dump_ada_macros): Adjust call to to_ada_name.
4985 (struct overloaded_name_hash): Delete.
4986 (struct overloaded_name_hasher): Likewise.
4987 (overloaded_names): Likewise.
4988 (compute_overloading_index): Likewise.
4989 (dump_ada_decl_name): Do not call compute_overloading_index and
4990 adjust calls to pp_ada_tree_identifier.
4991 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4992 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4993 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4994 (dump_ada_enum_type): Remove type and display_convention parameters.
4995 Adjust calls to pp_ada_tree_identifier.
4996 (dump_ada_node): Likewise and for dump_ada_structure.
4997 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4998 and tidy up.
4999 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5000 syntax.
5001 (print_constructor): Adjust call to pp_ada_tree_identifier.
5002 (print_destructor): Likewise.
5003 (dump_ada_declaration): Switch to aspect syntax.
5004 (dump_ada_structure): Likewise and tidy up. Replace display_convention
5005 parameter with nested parameter.
5006 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5007 (dump_ada_specs): Do not delete overloaded_names table.
5008
8de583fc
PB
50092018-07-06 Peter Bergner <bergner@linux.ibm.com>
5010
5011 PR target/86324
e730a0ef 5012 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
5013 target hook.
5014
09cff37b
NS
50152018-07-05 Nathan Sidwell <nathan@acm.org>
5016
5017 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5018 NO_IMPLICIT_EXTERN_C.
5019
98086b2b
ML
50202018-06-28 Martin Liska <mliska@suse.cz>
5021
5022 * cppspec.c: Include opt-suggestions.h.
5023
ab20d992
JJ
50242018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5025 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
5026 Cesar Philippidis <cesar@codesourcery.com>
5027
5028 * c-pragma.h (enum pragma_omp_clause): Add
5029 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5030 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5031
f41b7612
JJ
50322018-06-20 Jakub Jelinek <jakub@redhat.com>
5033
5034 PR c++/86210
5035 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5036 comment.
5037
4252ccd7
MS
50382018-06-18 Martin Sebor <msebor@redhat.com>
5039
5040 PR middle-end/85602
5041 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5042 nonstring.
5043
e197e64e
KV
50442018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5045
5046 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5047
34a7a230
JM
50482018-06-13 Jason Merrill <jason@redhat.com>
5049
5cef3733
JM
5050 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5051 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5052 handling.
5053
34a7a230
JM
5054 PR c++/86094 - wrong code with defaulted move ctor.
5055 * c-opts.c (c_common_post_options): Bump the current ABI version to
5056 13. Set warn_abi_version and flag_abi_compat_version to the current
5057 version rather than 0. Fix defaulting flag_abi_compat_version from
5058 warn_abi_version.
5059
bb0f14ae
MS
50602018-06-12 Martin Sebor <msebor@redhat.com>
5061
5062 PR c/85931
5063 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5064 sizeof source and destination yields the same value.
5065
3713f2e2
ML
50662018-06-12 Martin Liska <mliska@suse.cz>
5067
5068 * c.opt: Make MPX-related options as Deprecated.
5069
4af78ef8
DM
50702018-06-08 David Malcolm <dmalcolm@redhat.com>
5071
5072 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5073 rather than 0.
5074
31db0fe0
ML
50752018-06-08 Martin Liska <mliska@suse.cz>
5076
5077 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5078 for MPX (macros, related functions, fields in cgraph_node, ...).
5079 (handle_bnd_legacy): Likewise.
5080 (handle_bnd_instrument): Likewise.
5081 * c.opt: Likewise.
5082
fe16acf2
JJ
50832018-06-06 Jakub Jelinek <jakub@redhat.com>
5084
5085 PR c++/86068
5086 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5087 __cpp_transactional_memory to 201500 instead of 210500.
5088
4dbdb49b
JM
50892018-06-06 Jason Merrill <jason@redhat.com>
5090
5091 PR c++/85710 - ICE with -Wmemset-elt-size.
5092 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5093
f8ad043f
JM
50942018-06-01 Jason Merrill <jason@redhat.com>
5095
5096 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5097 201703.
5098
abc24d93
EB
50992018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5100
5101 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5102 declaration for a typedef independently of whether the declaration of
5103 the subtype is generated.
5104
d258f4aa
MS
51052018-05-31 Martin Sebor <msebor@redhat.com>
5106
5107 PR c/82063
5108 * c.opt (-Wno-alloc-size-larger-than): New option.
5109
b67b9225
DP
51102018-04-22 David Pagan <dave.pagan@oracle.com>
5111
5112 PR c/55976
5113 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 5114 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
5115 differentiate between default (no option), -Wreturn-type, and
5116 -Wno-return-type.
5117
04eb9c55
JM
51182018-05-29 Jason Merrill <jason@redhat.com>
5119
5120 * c.opt (Winit-list-lifetime): New flag.
5121
b0c31bc6
BE
51222018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5123
5124 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5125 splay_tree_delete_pointers.
5126
44284983
JJ
51272018-05-26 Jakub Jelinek <jakub@redhat.com>
5128
5129 PR bootstrap/85921
5130 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5131 noinline variable to workaround broken kernel headers.
5132
b46b715d
JM
51332018-05-18 Jason Merrill <jason@redhat.com>
5134
5135 * c.opt (Wdeprecated-copy): New flag.
5136
40659769
ML
51372018-05-17 Martin Liska <mliska@suse.cz>
5138
5139 * c-warn.c (overflow_warning): Do not use
5140 space in between 'G_' and '('.
5141
403962ea
JM
51422018-05-09 Jason Merrill <jason@redhat.com>
5143
5144 * c-common.c (valid_array_size_p): Add complain parameter.
5145 * c-common.h: ...which defaults to true.
5146
1c9ee609
JJ
51472018-05-11 Jakub Jelinek <jakub@redhat.com>
5148
5149 PR c/85696
5150 * c-omp.c (c_omp_predetermined_sharing): Return
5151 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5152
19916065
ML
51532018-05-11 Martin Liska <mliska@suse.cz>
5154
92a285c1 5155 PR sanitizer/85556
19916065
ML
5156 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5157 TREE_LIST values.
5158
79e7b1fe
JJ
51592018-05-10 Jakub Jelinek <jakub@redhat.com>
5160
5161 PR c++/85662
5162 * c-common.h (fold_offsetof_1): Removed.
5163 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5164 CTX argument defaulted to ERROR_MARK.
5165 * c-common.c (fold_offsetof_1): Renamed to ...
5166 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5167 argument, convert the pointer constant to TYPE and use size_binop
5168 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5169 a pointer type. Adjust recursive calls.
5170
86c12f76
EB
51712018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5172
5173 PR c++/85400
5174 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5175
ee336e84
NS
51762018-05-07 Nathan Sidwell <nathan@acm.org>
5177
5178 * c.opt (ffor-scope): Remove functionality, issue warning.
5179
6c072e21
NS
51802018-05-03 Nathan Sidwell <nathan@acm.org>
5181
5182 * c.opt (ffriend-injection): Remove functionality, issue warning.
5183
2cc7d3a7
DM
51842018-05-01 David Malcolm <dmalcolm@redhat.com>
5185
5186 PR c/84258
5187 * c-format.c (struct format_check_results): Add field
5188 "number_non_char".
5189 (check_format_info): Initialize it, and warn if encountered.
5190 (check_format_arg): Distinguish between wide char and
5191 everything else when detecting arrays of non-char.
5192
7761dfbe
DM
51932018-04-30 David Malcolm <dmalcolm@redhat.com>
5194
5195 * c-format.c (get_corrected_substring): Update for
5196 location_get_source_line returning a char_span. Use a char_span
5197 when handling the prefix of the correction.
5198 * c-indentation.c (get_visual_column): Update for
5199 location_get_source_line returning a char_span.
5200 (get_first_nws_vis_column): Likewise.
5201
62e98ef1
DM
52022018-03-29 David Malcolm <dmalcolm@redhat.com>
5203
5204 PR c++/84269
5205 * known-headers.cc (get_stdlib_header_for_name): Add various names
5206 from <assert.h>, <string.h>, and <memory.h>; add more names from
5207 <stdio.h>.
5208
a7dea617
JJ
52092018-03-27 Jakub Jelinek <jakub@redhat.com>
5210
5211 PR c++/85061
5212 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5213 get_base_address of the second operand is a VAR_P, rather than the
5214 operand itself, and use gcc_checking_assert instead of gcc_assert.
5215
889a3a30
MP
52162018-03-23 Marek Polacek <polacek@redhat.com>
5217
5218 PR c++/85045
5219 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5220 <case RDIV_EXPR>: Tweak condition.
5221
452154b9
EB
52222018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5223
5224 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5225
63ecb626
JJ
52262018-03-16 Jakub Jelinek <jakub@redhat.com>
5227
ce811fc4
JJ
5228 PR c/84909
5229 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5230 diagnostics.
5231
63ecb626
JJ
5232 PR c/84910
5233 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5234 diagnostics.
5235
a1295eec
RB
52362018-03-16 Richard Biener <rguenther@suse.de>
5237
5238 PR c/84873
5239 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5240 unshare the possibly folded expression.
5241
919674fb
RB
52422018-03-15 Richard Biener <rguenther@suse.de>
5243
5244 PR c/84873
5245 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5246
f99309b2
MS
52472018-03-13 Martin Sebor <msebor@redhat.com>
5248
5249 PR tree-optimization/84725
5250 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5251 with all three narrow character types, including their qualified forms.
5252
e9b9fa4c
MS
52532018-03-12 Martin Sebor <msebor@redhat.com>
5254
5255 PR tree-optimization/83456
ab20d992 5256 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5257 Restore checking of bounded built-in functions.
5258 (check_function_arguments): Also return the result
5259 of warn_for_restrict.
ab20d992
JJ
5260 * c-common.c (check_function_restrict): Return bool.
5261 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5262
0805d020
MP
52632018-03-02 Marek Polacek <polacek@redhat.com>
5264
5265 PR c++/84171
5266 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5267 is erroneous.
5268
ed2a2f08
TS
52692018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5270
5271 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5272 function".
5273
90abdde0
MP
52742018-03-01 Marek Polacek <polacek@redhat.com>
5275
5276 PR c++/84639
5277 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5278 alignment in computation.
5279
c6db43fa
EB
52802018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5281
5282 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5283 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5284
9e25c7ed
EB
52852018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5286
5287 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5288 (is_char_array): Take a type instead of a declaration.
5289 (dump_ada_array_type): Likewise.
5290 (is_simple_enum): Minor tweak.
5291 (dump_ada_enum_type): New function extracted from...
5292 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5293 <INTEGER_TYPE>: Remove unreachable code.
5294 <RECORD_TYPE>: Likewise. Minor tweaks.
5295 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5296 <ENUMERAL_TYPE>: New case.
5297 <RECORD_TYPE>: Factor out common code.
5298 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5299 Minor tweaks. Deal with enumeral types.
5300 (dump_ada_structure): Minor tweaks.
5301
09de3550
EB
53022018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5303
5304 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5305 address for incomplete structures.
5306 (dump_forward_type): Do not bail out for incomplete structures.
5307 (dump_ada_declaration): Do not special-case incomplete structures
5308 for subtypes. Dump them as null records for types.
5309
095d8d4b
EB
53102018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5311
5312 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5313 (is_char_array): Fix formatting.
5314 (dump_template_types): Likewise.
5315 (dump_generic_ada_node): Rename into...
5316 (dump_ada_node): ...this.
5317 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5318 incomplete structures and not for empty structures. Do not use it
5319 when forward declarations are needed.
5320 (dump_forward_type): New function.
5321 (dump_nested_types): Remove FORWARD parameter. Do not consider
5322 TREE_VISITED and do not generate a forward declaration. Only dump
5323 original nested types for nested declaration.
5324 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5325 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5326 <RECORD_TYPE>: Do not consider TREE_VISITED.
5327 (dump_ada_declaration): Use booleans and fix formatting throughout.
5328 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5329 Call dump_forward_type instead of dump_nested_types for a typedef.
5330 Remove superfluous check and adjust call to dump_nested_types.
5331 <POINTER_TYPE>: Call dump_forward_type and fall through.
5332 (dump_ada_struct_decl): Rename into...
5333 (dump_ada_structure): ...this. Do not special-case empty structures.
5334
d4cfd486
MS
53352018-02-27 Martin Sebor <msebor@redhat.com>
5336
5337 PR c++/83871
5338 * c.opt (-Wmissing-attributes): New option.
5339
b22dbd03
ML
53402018-02-21 Martin Liska <mliska@suse.cz>
5341
5342 * c.opt (Wcatch-value=): Add IntegerRange.
5343
883dfe2a
JM
53442018-02-15 Jason Merrill <jason@redhat.com>
5345
5346 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5347
0444aa9c
NS
53482018-02-09 Nathan Sidwell <nathan@acm.org>
5349
5350 PR c/84293
5351 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5352 arg.
5353 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5354 arg. Adjust.
5355
cea71f0a
MS
53562018-02-09 Martin Sebor <msebor@redhat.com>
5357
5358 PR lto/84212
5359 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5360 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5361 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5362 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5363 (-Wuninitialized): Same.
5364
8c8b7be5
EB
53652018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5366
5367 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5368 keyword for components.
5369
7c30b12a
PC
53702018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5371
5372 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5373
eece7fe5
JK
53742018-02-02 Julia Koval <julia.koval@intel.com>
5375
5376 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5377
7d07a93a
MP
53782018-01-29 Marek Polacek <polacek@redhat.com>
5379
5380 PR c/83966
5381 * c-format.c (check_function_format): Check current_function_decl.
5382
53723269
JJ
53832018-01-27 Jakub Jelinek <jakub@redhat.com>
5384
5385 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5386 argument.
5387 (LAZY_HEX_FP_VALUES_CNT): Define.
5388 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5389 values rather than just 12.
5390 (builtin_define_with_hex_fp_value): Likewise.
5391
7365279f
BK
53922018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5393
92a285c1
ML
5394 PR other/70268
5395 * c.opt (-fmacro-prefix-map): New option.
5396 * c-opts.c (c_common_handle_option): Handle it.
5397 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5398 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5399
bb9869d5
DM
54002018-01-17 David Malcolm <dmalcolm@redhat.com>
5401
5402 PR c++/83814
5403 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5404
68dc87c3
EB
54052018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5406
5407 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5408 Skip 'f' and 'F' characters if it is true.
5409 (store_ada_macro): Minor tweak.
5410 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5411 <CPP_WSTRING>: Likewise.
5412 <CPP_STRING>: Output '&' in the buffer if not the first string.
5413 <CPP_NUMBER>: Adjust calls to dump_number.
5414
9a004410
DM
54152018-01-10 David Malcolm <dmalcolm@redhat.com>
5416
5417 PR c++/43486
5418 * c-common.c: Include "selftest.h".
5419 (get_atomic_generic_size): Perform the test for integral type
5420 before the range test for any integer constant, fixing indentation
5421 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5422 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5423 (selftest::test_fold_for_warn): New function.
5424 (selftest::c_common_c_tests): New function.
5425 (selftest::c_family_tests): Call it, and
5426 selftest::c_pretty_print_c_tests.
5427 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5428 * c-format.c (check_format_arg): Convert VAR_P check to a
5429 fold_for_warn.
5430 * c-pretty-print.c: Include "selftest.h".
5431 (pp_c_cast_expression): Don't print casts for location wrappers.
5432 (selftest::assert_c_pretty_printer_output): New function.
5433 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5434 (selftest::test_location_wrappers): New function.
5435 (selftest::c_pretty_print_c_tests): New function.
5436 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5437
5c0caeb3
RS
54382018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5439 Alan Hayward <alan.hayward@arm.com>
5440 David Sherwood <david.sherwood@arm.com>
5441
5442 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5443
73a699ae
RS
54442018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5445 Alan Hayward <alan.hayward@arm.com>
5446 David Sherwood <david.sherwood@arm.com>
5447
5448 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5449 as polynomial.
5450
928686b1
RS
54512018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5452 Alan Hayward <alan.hayward@arm.com>
5453 David Sherwood <david.sherwood@arm.com>
5454
5455 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5456 (convert_vector_to_array_for_subscript): Handle polynomial
5457 TYPE_VECTOR_SUBPARTS.
5458 (c_common_type_for_mode): Check valid_vector_subparts_p.
5459 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5460 VECTOR_CST_NELTS.
5461
85ec4feb
JJ
54622018-01-03 Jakub Jelinek <jakub@redhat.com>
5463
5464 Update copyright years.
5465
170a8bd6 54662017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5467 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5468
5469 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5470 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5471
ab20d992 54722017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5473
5474 PR debug/83527
5475 PR debug/83419
5476 * c-semantics.c (only_debug_stmts_after_p): New.
5477 (pop_stmt_list): Clear side effects in debug-only stmt list.
5478 Check for single nondebug stmt followed by debug stmts only.
5479
c12d20d4
AO
54802017-12-21 Alexandre Oliva <aoliva@redhat.com>
5481
5482 PR debug/83419
5483 * c-semantics.c (pop_stmt_list): Propagate side effects from
5484 single nondebug stmt to container list.
5485
01512446
JJ
54862017-12-19 Jakub Jelinek <jakub@redhat.com>
5487
5488 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5489 conditions with typical order conditions.
5490
82cfbd01
MP
54912017-12-18 Marek Polacek <polacek@redhat.com>
5492
5493 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5494 not in effect.
5495
99da11ec
MS
54962017-12-17 Martin Sebor <msebor@redhat.com>
5497
5498 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5499 an error for attribute warn_if_not_aligned.
5500
cc8bea0a
MS
55012017-12-16 Martin Sebor <msebor@redhat.com>
5502
5503 PR tree-optimization/78918
5504 * c-common.c (check_function_restrict): Avoid checking built-ins.
5505 * c.opt (-Wrestrict): Include in -Wall.
5506
4849deb1
JJ
55072017-12-15 Jakub Jelinek <jakub@redhat.com>
5508
5509 * c-attribs.c (c_common_attribute_table,
5510 c_common_format_attribute_table): Swap affects_type_identity
5511 and handler fields, adjust comments.
5512
c65e18d3
BE
55132017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5514
5515 * c.opt (Wcast-function-type): New warning option.
5516 * c-lex.c (get_fileinfo): Avoid warning.
5517 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5518
2004617a
QZ
55192017-12-14 Qing Zhao <qing.zhao@oracle.com>
5520
7365279f 5521 PR middle_end/79538
2004617a
QZ
5522 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5523 Adjust the size of buf1 and buf2, add a new buf to avoid
5524 format-overflow warning.
5525
ab20d992 55262017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5527
5528 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5529 subsequent statement list.
5530
5d9ae53d
MS
55312017-12-07 Martin Sebor <msebor@redhat.com>
5532
5533 PR c/81544
5534 PR c/81566
5535 * c-attribs.c (attr_aligned_exclusions): New array.
5536 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5537 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5538 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5539 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5540 (attr_warn_unused_result_exclusions): Same.
5541 (handle_hot_attribute, handle_cold_attribute): Simplify.
5542 (handle_const_attribute): Warn on function returning void.
5543 (handle_pure_attribute): Same.
5544 (handle_aligned_attribute): Diagnose conflicting attribute
5545 specifications.
5546 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5547
c79144f8
DM
55482017-12-06 David Malcolm <dmalcolm@redhat.com>
5549
5550 PR c/83236
5551 * c-common.c (selftest::c_family_tests): Call
5552 selftest::c_spellcheck_cc_tests.
5553 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5554 * c-spellcheck.cc: Include "selftest.h".
5555 (name_reserved_for_implementation_p): New function.
5556 (should_suggest_as_macro_p): New function.
5557 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5558 should_suggest_as_macro_p and call it.
5559 (selftest::test_name_reserved_for_implementation_p): New function.
5560 (selftest::c_spellcheck_cc_tests): New function.
5561 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5562
613bc14f
DM
55632017-12-06 David Malcolm <dmalcolm@redhat.com>
5564
5565 * c-spellcheck.cc: New file, taken from macro-handling code in
5566 spellcheck-tree.c.
5567 * c-spellcheck.h: New file, taken from macro-handling code in
5568 spellcheck-tree.h.
5569
e76c7157
JJ
55702017-12-01 Jakub Jelinek <jakub@redhat.com>
5571
5572 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5573 attribute.
5574 (handle_simd_attribute): Don't check for "cilk simd function"
5575 attribute. Reindent, formatting changes.
5576
b0da4034
JK
55772017-11-30 Julia Koval <julia.koval@intel.com>
5578
5579 * c-common.h (inv_list): Remove.
5580
058f0b9e
JJ
55812017-11-28 Jakub Jelinek <jakub@redhat.com>
5582
5583 PR sanitizer/81275
5584 * c-common.c (c_switch_covers_all_cases_p_1,
5585 c_switch_covers_all_cases_p): New functions.
5586 * c-common.h (c_switch_covers_all_cases_p): Declare.
5587
5e9d6aa4 55882017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5589 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5590
5591 * array-notation-common.c: Delete.
5592 * c-cilkplus.c: Ditto.
5593 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5594 * c-common.def (ARRAY_NOTATION_REF): Remove.
5595 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5596 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5597 c_validate_cilk_plus_loop, cilkplus_an_parts,
5598 cilk_ignorable_spawn_rhs_op,
5599 cilk_recognize_spawn): Remove.
5600 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5601 * c-omp.c: Remove CILK_SIMD check.
5602 * c-pragma.c: Ditto.
5603 * c-pragma.h: Remove CILK related pragmas.
5604 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5605 ARRAY_NOTATION_REF condition.
5606 (c_pretty_printer::expression): Ditto.
5607 * c.opt (fcilkplus): Remove.
5608 * cilk.c: Delete.
5609
1af4ebf5
MG
56102017-11-21 Marc Glisse <marc.glisse@inria.fr>
5611
5612 * c-pretty-print.c (pp_c_additive_expression,
5613 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5614
d44ed508
JJ
56152017-11-21 Jakub Jelinek <jakub@redhat.com>
5616
7d2f0f9b
JJ
5617 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5618
d44ed508
JJ
5619 PR c++/83059
5620 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5621 instead of tree_to_uhwi, formatting fix.
5622
26edace6
DM
56232017-11-20 David Malcolm <dmalcolm@redhat.com>
5624
5625 PR c/81404
5626 * known-headers.cc: New file, based on material from c/c-decl.c.
5627 (suggest_missing_header): Copied as-is.
5628 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5629 heavily edited to add C++ support. Add some knowledge about
5630 <limits.h>, <stdint.h>, and <wchar.h>.
5631 * known-headers.h: Likewise.
5632
6c7a259b
DM
56332017-11-20 David Malcolm <dmalcolm@redhat.com>
5634
5635 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5636 (lookup_name_fuzzy): Likewise. Convert return type from
5637 const char * to name_hint. Add location_t param.
5638 * name-hint.h: New header.
5639
f9c59f7e
JJ
56402017-11-19 Jakub Jelinek <jakub@redhat.com>
5641
5642 PR c/66618
5643 PR c/69960
5644 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5645
1e39313a
JM
56462017-11-16 Joseph Myers <joseph@codesourcery.com>
5647
5648 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5649 expected publication date of C17.
5650 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5651
3ca0dc60
JM
56522017-11-15 Joseph Myers <joseph@codesourcery.com>
5653
5654 PR c/81156
5655 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5656 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5657
025d57f0
MS
56582017-11-10 Martin Sebor <msebor@redhat.com>
5659
5660 PR c/81117
5661 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5662 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5663 * c.opt (-Wstringop-truncation): New option.
5664
1b6fa695
ML
56652017-11-06 Martin Liska <mliska@suse.cz>
5666
5667 PR middle-end/82404
5668 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5669 FE.
5670 * c.opt: Set default value of warn_return_type.
5671
64a5912c
DM
56722017-10-31 David Malcolm <dmalcolm@redhat.com>
5673
5674 * c-common.c (binary_op_error): Update for renaming of
5675 error_at_rich_loc.
5676 (c_parse_error): Likewise.
5677 * c-warn.c (warn_logical_not_parentheses): Likewise for
5678 renaming of inform_at_rich_loc.
5679 (warn_for_restrict): Likewise for renaming of
5680 warning_at_rich_loc_n.
5681
c76dc9c3
JM
56822017-10-30 Joseph Myers <joseph@codesourcery.com>
5683
5684 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5685 * c-opts.c (set_std_c17): New function.
5686 (c_common_init_options): Use gnu17 as default C version.
5687 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5688
ee5fd23a
MM
56892017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5690
5691 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5692 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5693 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5694 __FP_FAST_FMA<N>X.
5695
d1047465
MP
56962017-10-23 Marek Polacek <polacek@redhat.com>
5697
5698 PR c/82681
5699 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5700
9e878cf1
EB
57012017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5702
5703 * c-common.c (check_builtin_function_arguments): Also check arguments
5704 of __builtin_alloca_with_align_and_max.
5705
89b6abbb
DM
57062017-10-17 David Malcolm <dmalcolm@redhat.com>
5707
5708 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5709 rather than NULL to format_warning_va.
5710 (check_format_types): Likewise when calling format_type_warning.
5711 Remove code to extract source_ranges and source_range * in favor
5712 of just a location_t.
5713 (format_type_warning): Convert source_range * param to a
5714 location_t.
5715
39382c09
JJ
57162017-10-13 Jakub Jelinek <jakub@redhat.com>
5717
5718 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5719 [LR]SHIFT_EXPR.
5720
62e1c678
DM
57212017-10-12 David Malcolm <dmalcolm@redhat.com>
5722
5723 * c-common.c (enum missing_token_insertion_kind): New enum.
5724 (get_missing_token_insertion_kind): New function.
5725 (maybe_suggest_missing_token_insertion): New function.
5726 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5727
b90c9338
NS
57282017-10-11 Nathan Sidwell <nathan@acm.org>
5729
5730 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5731 (c_common_handle_option): Update incpath_kind names.
5732
3a266bcd
ML
57332017-10-11 Martin Liska <mliska@suse.cz>
5734
5735 PR sanitizer/82490
5736 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5737 Wattributes warning.
5738
8e6cdc90
RS
57392017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5740
5741 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5742 operating on trees as wide_ints.
5743 * c-common.c (pointer_int_sum): Likewise.
5744 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5745 * c-warn.c (match_case_to_enum_1): Likewise.
5746 (c_do_switch_warnings): Likewise.
5747 (maybe_warn_shift_overflow): Likewise.
5748
802b38c9
JJ
57492017-10-10 Jakub Jelinek <jakub@redhat.com>
5750
5751 PR c/82437
5752 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5753 instead of wide_int::from.
5754
4e34b338
JJ
57552017-10-06 Jakub Jelinek <jakub@redhat.com>
5756
5757 PR c/82437
5758 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5759 using to_widest use wide_int with the larger of the two precisions.
5760
4bc4b2b4
BE
57612017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5762
5763 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5764 functions.
5765
a1488398
RS
57662017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5767
5768 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5769 when combining the original unconverted comparison operands.
5770
01c9fb68
JJ
57712017-09-29 Jakub Jelinek <jakub@redhat.com>
5772
5773 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5774 attribute.
5775
6e3e8419
EB
57762017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5777
5778 * c-ada-spec.c (to_ada_name): Add index parameter.
5779 (pp_ada_tree_identifier): Likewise.
5780 (dump_ada_macros): Adjust call to to_ada_name.
5781 (struct overloaded_name_hash): New type.
5782 (struct overloaded_name_hasher): Likewise.
5783 (overloaded_names): New hash table.
5784 (compute_overloading_index): New function.
5785 (dump_ada_decl_name): Call it and pass the result to
5786 pp_ada_tree_identifier.
5787 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5788 (dump_ada_function_declaration): Likewise.
5789 (dump_generic_ada_node): Likewise.
5790 (print_constructor): Likewise.
5791 (print_destructor): Likewise.
5792 (dump_ada_specs): Delete overloaded_names table.
5793
79310774
EB
57942017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5795
5796 * c-ada-spec.c (max_ada_macros): Move around.
5797 (store_ada_macro_index): Likewise.
5798 (source_file): Rename into...
5799 (macro_source_file): ...this.
5800 (count_ada_macro): Move around.
5801 (store_ada_macro): Likewise.
5802 (compare_macro): Likewise.
5803 (print_ada_macros): Merge in...
5804 (dump_ada_macros): ...this.
5805 (source_file_base): Rename into...
5806 (current_source_file): ...this.
5807 (print_comment): Move around.
5808 (dump_ada_nodes): Call dump_ada_declaration directly.
5809 (struct with): Change type of limited field to bool.
5810 (append_withs): Change type of limited_access parameter to bool.
5811 (pp_ada_tree_identifie): Likewise.
5812 (dump_ada_decl_nam): Likewise.
5813 (dump_generic_ada_node): Likewise. Do not print the return type.
5814 (to_ada_name): Change type of space_found parameter to bool.
5815 (dump_ada_function_declaration): Return void and change type of
5816 parameters to bool. Also print the return type for a function.
5817 (print_ada_methods): Rename into...
5818 (dump_ada_methods): ...this.
5819 (print_ada_declaration): Rename into ...
5820 (dump_ada_declaration): ...this. Do not print the return type.
5821 (print_ada_struct_decl): Rename into...
5822 (dump_ada_struct_decl): ...this.
5823
7d386d45
JJ
58242017-09-29 Jakub Jelinek <jakub@redhat.com>
5825
5826 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5827 rather than DECL_INITIAL.
5828 (common_handle_aligned_attribute): Likewise.
5829
ab20d992 58302017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5831
5832 * c.opt (gen-decls): Add RejectNegative.
5833
026a79f7
AS
58342017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5835 Jakub Jelinek <jakub@redhat.com>
5836
5837 Add support for -std=c++2a.
5838 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5839 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5840 * c-opts.c (set_std_cxx2a): New.
5841 (c_common_handle_option): Set options when -std=c++2a is enabled.
5842 (c_common_post_options): Adjust comments.
5843 (set_std_cxx14, set_std_cxx17): Likewise.
5844
4a8ca690
EB
58452017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5846
5847 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5848 message for non-uniform endianness and issue a warning in C++.
5849
7b936140
JJ
58502017-09-15 Jakub Jelinek <jakub@redhat.com>
5851
5852 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5853 (Wc++17-compat): Change from undocumented alias to option.
5854 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5855 change C++1z to C++17 in description.
5856 (std=c++1z, std=gnu++1z): Change from option to undocumented
5857 deprecated alias.
5858 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5859 Adjust description.
5860 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5861 * c-opts.c (set_std_cxx1z): Rename to ...
5862 (set_std_cxx17): ... this.
5863 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5864 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5865 caller.
7b936140
JJ
5866 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5867 comments.
5868
12263f13
L
58692017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5870
5871 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5872 function alignment if warn_if_not_aligned_p is true.
5873
6836632e
NS
58742017-09-12 Nathan Sidwell <nathan@acm.org>
5875
5876 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5877 resort_sorted_fields): Move to c/c-decl.c.
5878 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5879 (struct sorted_fields_type): Move to c/c-lang.h.
5880
019bf9ad
JW
58812017-09-09 Jonathan Wakely <jwakely@redhat.com>
5882
5883 PR c++/81852
5884 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5885
bc7fe952
MP
58862017-09-04 Marek Polacek <polacek@redhat.com>
5887
5888 PR c/81783
5889 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5890 (warn_tautological_cmp): Call it.
5891
ab20d992 58922017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5893
5894 * c-opts.c (c_common_finish): Write dependency information even if
5895 there are errors.
5896
d2e05fcb
JJ
58972017-09-01 Jakub Jelinek <jakub@redhat.com>
5898
5899 PR c/81887
5900 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5901 (omp_pragmas_simd): ... here.
5902 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5903 create new clauses list containing just simd clause.
5904
18e2a8b8
RS
59052017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5906 Alan Hayward <alan.hayward@arm.com>
5907 David Sherwood <david.sherwood@arm.com>
5908
5909 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5910 into scalar_mode_supported_p call.
5911 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5912
16d22000
RS
59132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5914 Alan Hayward <alan.hayward@arm.com>
5915 David Sherwood <david.sherwood@arm.com>
5916
5917 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5918 for the mode iterator.
5919
b397965c
RS
59202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5921 Alan Hayward <alan.hayward@arm.com>
5922 David Sherwood <david.sherwood@arm.com>
5923
5924 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5925 * c-common.c (c_build_vec_perm_expr): Likewise.
5926
357b7604
RS
59272017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5928 Alan Hayward <alan.hayward@arm.com>
5929 David Sherwood <david.sherwood@arm.com>
5930
5931 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5932
e05c94ba
RS
59332017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5934 Alan Hayward <alan.hayward@arm.com>
5935 David Sherwood <david.sherwood@arm.com>
5936
5937 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5938 before calling targetm.addr_space.valid_pointer_mode.
5939
5c20c4af
RS
59402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5941 Alan Hayward <alan.hayward@arm.com>
5942 David Sherwood <david.sherwood@arm.com>
5943
5944 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5945
c94843d2 59462017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5947 Alan Hayward <alan.hayward@arm.com>
5948 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5949
5950 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5951 iterators.
5952 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5953
4e10a5a7
RS
59542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5955 Alan Hayward <alan.hayward@arm.com>
5956 David Sherwood <david.sherwood@arm.com>
5957
5958 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5959 case statements.
5960
130fcab0
ML
59612017-08-29 Martin Liska <mliska@suse.cz>
5962
5963 PR other/39851
5964 * c-common.c (parse_optimize_options): Add argument to function
5965 call.
5966 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5967
14e18d71
DM
59682017-08-24 David Malcolm <dmalcolm@redhat.com>
5969
5970 * c-lex.c (interpret_float): Use token location
5971 when building an EXCESS_PRECISION_EXPR.
5972
2f687306
DM
59732017-08-21 David Malcolm <dmalcolm@redhat.com>
5974
5975 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5976 it to check_function_format.
5977 * c-common.h (check_function_arguments): Add vec<location_t> *
5978 param.
5979 (check_function_format): Likewise.
5980 * c-format.c (struct format_check_context): Add field "arglocs".
5981 (check_function_format): Add param "arglocs"; pass it to
5982 check_format_info.
ab20d992 5983 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5984 new field of format_ctx.
5985 (check_format_arg): Pass format_ctx->arglocs to new param of
5986 check_format_info_main.
5987 (class argument_parser): New field "arglocs".
5988 (argument_parser::argument_parser): Add "arglocs_" param and use
5989 it to initialize new field.
5990 (argument_parser::check_argument_type): Pass new arglocs field to
5991 check_format_types.
5992 (check_format_info_main): Add param "arglocs", and use it when
5993 constructing arg_parser.
5994 (check_format_types): Add param "arglocs"; use it if non-NULL when
5995 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5996
00aa1fa2
L
59972017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5998
5999 PR c/53037
6000 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6001 (c_common_attribute_table): Add warn_if_not_aligned.
6002 (handle_aligned_attribute): Renamed to ...
6003 (common_handle_aligned_attribute): Remove argument, name, and add
6004 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
6005 (handle_aligned_attribute): New.
6006 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6007
27be025d
MS
60082017-08-14 Martin Sebor <msebor@redhat.com>
6009
6010 PR c/81117
6011 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6012 (handle_nonstring_attribute): New function.
6013
da67acb9
MS
60142017-08-14 Martin Sebor <msebor@redhat.com>
6015
6016 PR c/81117
6017 * c-format.h (T89_G): New macro.
6018 * c-format.c (local_gcall_ptr_node): New variable.
6019 (init_dynamic_diag_info): Initialize it.
6020
a8b522b4
ML
60212017-08-11 Martin Liska <mliska@suse.cz>
6022
6023 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6024 TARGET_SUPPORTS_ALIASES.
6025
32129a17
DM
60262017-08-10 David Malcolm <dmalcolm@redhat.com>
6027
6028 * c-common.c (c_parse_error): Add rich_location * param, using it
6029 rather implicitly using input_location.
6030 * c-common.h (c_parse_error): Add rich_location * param.
6031
30af3a2b
MP
60322017-08-09 Marek Polacek <polacek@redhat.com>
6033
6034 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6035 (c_common_truthvalue_conversion): Likewise.
6036 * c-omp.c (c_finish_omp_atomic): Likewise.
6037 * c-common.h (build_binary_op): Update declaration.
6038
314e6352
ML
60392017-08-08 Martin Liska <mliska@suse.cz>
6040
6041 * c-ada-spec.c: Include header files.
6042 * c-ubsan.c: Likewise.
6043 * c-warn.c: Likewise.
6044
56b5041c
JJ
60452017-08-07 Jakub Jelinek <jakub@redhat.com>
6046
6047 PR c/69389
6048 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6049
db440138
EB
60502017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6051
6052 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6053 (print_ada_methods): Likewise.
6054 (print_ada_declaration): Likewise.
6055
577eec56
ML
60562017-08-07 Martin Liska <mliska@suse.cz>
6057
6058 * array-notation-common.c: Add new includes.
6059 * c-format.c( handle_format_attribute): Canonicalize a format
6060 function name.
6061 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6062 attribute.
6063 * c-pretty-print.c: Add new include.
6064
b854df3c
EB
60652017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6066
6067 * c-ada-spec.c (has_static_fields): Look only into variables.
6068 (print_constructor): Add TYPE parameter and use it for the name.
6069 (print_destructor): Likewise.
6070 (print_ada_declaration): Adjust to new constructor/destructor names.
6071 Adjust calls to print_constructor and print_destructor.
6072 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6073 Look only into variables in the final loop.
6074
9f2cb25e
EB
60752017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6076
6077 * c-ada-spec.c (has_static_fields): Look only into fields.
6078 (dump_generic_ada_node): Small tweak.
6079 (dump_nested_types): Look only into fields.
6080 (print_ada_declaration): Look only into methods. Small tweak.
6081 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6082
f4bcd9eb
EB
60832017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6084
6085 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6086 (dump_ada_function_declaration): Likewise.
6087 (dump_generic_ada_node): Likewise.
6088 (print_ada_declaration): Add support for const-qualified variables.
6089
f34ebeb2
ML
60902017-07-31 Martin Liska <mliska@suse.cz>
6091
6092 PR sanitize/81530
6093 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6094 Guard condition with flag_sanitize_p also with current_function_decl
6095 non-null equality.
6096 (ubsan_maybe_instrument_reference_or_call): Likewise.
6097
218e5d04
UB
60982017-07-30 Uros Bizjak <ubizjak@gmail.com>
6099
6100 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6101
942047f2
EB
61022017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6103
6104 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6105 for enumeral types.
6106 (print_ada_declaration): Add missing guard for record types.
6107
a40ff0ae
JJ
61082017-07-27 Jakub Jelinek <jakub@redhat.com>
6109
6110 PR c/45784
6111 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6112 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6113 new COMPOUND_EXPRs around the rhs of the comparison.
6114
06bd22f6
MP
61152017-07-27 Marek Polacek <polacek@redhat.com>
6116
6117 PR c/81417
6118 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6119 the types.
6120
036ea399
JJ
61212017-07-27 Jakub Jelinek <jakub@redhat.com>
6122
6123 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6124 (handle_noipa_attribute): New function.
6125
417ca011
TD
61262017-07-07 Torsten Duwe <duwe@suse.de>
6127
6128 * c-attribs.c (c_common_attribute_table): Add entry for
6129 "patchable_function_entry".
6130
5aaa8fb4
NS
61312017-07-20 Nathan Sidwell <nathan@acm.org>
6132
6133 Remove TYPE_METHODS.
6134 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6135 dump_ada_template, print_ada_methods,
6136 print_ada_declaration): Member fns are on TYPE_FIELDS.
6137
ff22eb12
NS
61382017-07-18 Nathan Sidwell <nathan@acm.org>
6139
6140 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6141
eea77d1f
DM
61422017-07-14 David Malcolm <dmalcolm@redhat.com>
6143
6144 * c-common.c (try_to_locate_new_include_insertion_point): New
6145 function.
6146 (per_file_includes_t): New typedef.
6147 (added_includes_t): New typedef.
6148 (added_includes): New variable.
6149 (maybe_add_include_fixit): New function.
6150 * c-common.h (maybe_add_include_fixit): New decl.
6151
281ac396
MS
61522017-07-10 Martin Sebor <msebor@redhat.com>
6153
6154 PR other/81345
6155 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6156
b6f43128
DM
61572017-07-06 David Malcolm <dmalcolm@redhat.com>
6158
6159 * c-common.c (selftest::c_family_tests): New.
6160 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6161 (selftest::c_family_tests): New decl.
6162
efbf55b0
MP
61632017-07-04 Marek Polacek <polacek@redhat.com>
6164
6165 PR c/81231
6166 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6167 types.
6168
6c86bd88
MP
61692017-07-04 Marek Polacek <polacek@redhat.com>
6170
6171 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6172
17a7218b
ML
61732017-06-28 Martin Liska <mliska@suse.cz>
6174
6175 PR ipa/81128
6176 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6177 to a function declaration.
6178
63010089
ML
61792017-06-28 Martin Liska <mliska@suse.cz>
6180
6181 PR driver/79659
6182 * c.opt: Add IntegerRange to various options.
6183
3e2becc4
MP
61842017-06-26 Marek Polacek <polacek@redhat.com>
6185
6186 PR c/80116
6187 * c-common.h (warn_for_multistatement_macros): Declare.
6188 * c-warn.c: Include "c-family/c-indentation.h".
6189 (warn_for_multistatement_macros): New function.
6190 * c.opt (Wmultistatement-macros): New option.
6191 * c-indentation.c (guard_tinfo_to_string): No longer static.
6192 Change the parameter type to "enum rid". Handle RID_SWITCH.
6193 * c-indentation.h (guard_tinfo_to_string): Declare.
6194
2db9b7cd
MG
61952017-06-23 Marc Glisse <marc.glisse@inria.fr>
6196
6197 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6198
c3684b7b
MS
61992017-06-15 Martin Sebor <msebor@redhat.com>
6200
6201 PR c++/80560
6202 * c.opt (-Wclass-memaccess): New option.
6203
e72c4afd
BK
62042017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6205
6206 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6207
8a516588
MP
62082017-06-13 Marek Polacek <polacek@redhat.com>
6209
6210 PR objc/80949
6211 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6212 branches is null.
6213
45b2222a
ML
62142017-06-13 Martin Liska <mliska@suse.cz>
6215
6216 PR sanitize/78204
6217 * c-attribs.c (add_no_sanitize_value): New function.
6218 (handle_no_sanitize_attribute): Likewise.
6219 (handle_no_sanitize_address_attribute): Use the function.
6220 (handle_no_sanitize_thread_attribute): New function.
6221 (handle_no_address_safety_analysis_attribute): Use
6222 add_no_sanitize_value.
6223 (handle_no_sanitize_undefined_attribute): Likewise.
6224 * c-common.h: Declare new functions.
6225 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6226 (ubsan_instrument_shift): Likewise.
6227 (ubsan_instrument_bounds): Likewise.
6228 (ubsan_maybe_instrument_array_ref): Likewise.
6229 (ubsan_maybe_instrument_reference_or_call): Likewise.
6230
a01f151f
JM
62312017-06-11 Jason Merrill <jason@redhat.com>
6232
6233 * c-ada-spec.c, c-pragma.c: Use id_equal.
6234
3de4ac6d
MP
62352017-06-04 Marek Polacek <polacek@redhat.com>
6236
6237 PR c/80919
6238 * c-format.c (matching_type_p): Return false if any of the types
6239 requires structural equality.
6240
2474f48f
MS
62412017-06-02 Martin Sebor <msebor@redhat.com>
6242
6243 PR c/80892
6244 * c-warn.c (conversion_warning): Use -Wconversion for integer
6245 conversion and -Wfloat-conversion for floating one.
6246
40ffd95f
BE
62472017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6248
6249 * c.opt (Wsizeof-pointer-div): New warning option.
6250
3fa4634c
VR
62512017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6252
6253 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6254 (Wcatch-value=1): Enable by -Wall.
6255
f012c8ef
DM
62562017-05-30 David Malcolm <dmalcolm@redhat.com>
6257
6258 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6259 format_chars.
6260 * c.opt (fdiagnostics-show-template-tree): New option.
6261 (felide-type): New option.
6262
63dbcd13
VR
62632017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6264
6265 * c.opt (Wcatch-value=): New C++ warning flag.
6266
be136b5c
NS
62672017-05-24 Nathan Sidwell <nathan@acm.org>
6268
6269 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6270 const casts to avoid warning.
6271
3cd211af
MS
62722017-05-24 Martin Sebor <msebor@redhat.com>
6273
6274 PR c/80731
6275 * c-common.h (unsafe_conversion_p): Add a function argument.
6276 * c-common.c (unsafe_conversion_p): Same.
6277 Add type names and values to diagnostics.
6278 (scalar_to_vector): Adjust.
6279 * c-warn.c (constant_expression_error): Add a function argument.
6280 Add type names and values to diagnostics.
6281 (conversion_warning): Add a function argument.
6282 Add type names and values to diagnostics.
6283 (warnings_for_convert_and_check): Same.
6284
1ff7be5a
JM
62852017-05-19 Jason Merrill <jason@redhat.com>
6286
6287 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6288 enumerators.
6289
ff502317
BE
62902017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6291
6292 * c-format.c (locus): Move out of function scope,
6293 add GTY attribute.
6294
2a8a8d7b
NS
62952017-05-19 Nathan Sidwell <nathan@acm.org>
6296
6297 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6298 (c_common_parse_file): Remove class dump handling.
6299 (get_dump_info): Likewise.
6300
39aac208
RB
63012017-05-19 Richard Biener <rguenther@suse.de>
6302
6303 PR c++/80593
6304 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6305 to alias-set zero memory.
6306
6ecd2339
BE
63072017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6308
6309 * c-format.c (local_tree_type_node): Add GTY attribute.
6310
6574d78e
MP
63112017-05-18 Marek Polacek <polacek@redhat.com>
6312
6313 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6314 (c_common_fixed_point_type_for_size): Likewise.
6315 (c_common_type_for_mode): Likewise.
6316 (shorten_compare): Likewise.
6317 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6318 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6319
e3455240
MP
63202017-05-18 Marek Polacek <polacek@redhat.com>
6321
6322 * c-common.c (self_promoting_args_p): Change the return type to bool.
6323 Use false/true instead of 0/1.
6324 * c-common.h (self_promoting_args_p): Update.
6325
3fa8871b
MP
63262017-05-17 Marek Polacek <polacek@redhat.com>
6327
6328 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6329 * c-warn.c: Likewise.
6330
b42cc3ca
VV
63312017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6332
6333 Implement new C++ intrinsics __is_assignable and __is_constructible.
6334 * c-common.c (__is_assignable, __is_constructible): New.
6335 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6336
1a817418
ML
63372017-05-17 Martin Liska <mliska@suse.cz>
6338
6339 * c-common.h: Introduce dump_flags_t type and
6340 use it instead of int type.
6341 * c-gimplify.c (c_genericize): Likewise.
6342 * c-opts.c: Likewise.
6343
b2fa0a8b
MP
63442017-05-17 Marek Polacek <polacek@redhat.com>
6345
6346 * c-common.c (c_save_expr): Remove.
6347 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6348 * c-common.h (c_save_expr): Remove declaration.
6349
31c2d57d
VR
63502017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6351
6352 PR c/35441
6353 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6354 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6355 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6356 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6357 RDIV_EXPR.
6358 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6359
684f84de
MP
63602017-05-09 Marek Polacek <polacek@redhat.com>
6361
6362 PR c/80525
6363 * c-warn.c (unwrap_c_maybe_const): New.
6364 (warn_logical_operator): Call it.
6365
641da50a
NS
63662017-05-09 Nathan Sidwell <nathan@acm.org>
6367
6368 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6369 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6370
631238ac
MS
63712017-05-08 Martin Sebor <msebor@redhat.com>
6372
6373 PR translation/80280
6374 * c-format.h (struct format_flag_spec): Add new member.
6375 (T89_T): New macro.
6376 * c-format.c (local_tree_type_node): New global.
6377 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6378 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6379 (strfmon_flag_specs): Likewise.
6380 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6381 with distinct quoting properties.
6382 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6383 (flag_chars_t::validate): Add argument and handle bad quoting.
6384 (check_format_info_main): Handle quoting problems.
6385 (init_dynamic_diag_info): Simplify.
6386
49f0c04c
JM
63872017-05-08 Jason Merrill <jason@redhat.com>
6388
6389 * c-opts.c (c_common_post_options): Update defaults for
6390 flag_abi_version and flag_abi_compat_version.
6391
56d35585
DM
63922017-05-05 David Malcolm <dmalcolm@redhat.com>
6393
6394 * c-common.c (c_cpp_error): Replace report_diagnostic
6395 with diagnostic_report_diagnostic.
6396
0f2c4a8f
MS
63972017-05-04 Martin Sebor <msebor@redhat.com>
6398
6399 PR translation/80280
6400 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6401 (handle_weakref_attribute): Same.
6402
6fe63fb4
NS
64032017-05-03 Nathan Sidwell <nathan@acm.org>
6404
6405 Canonicalize canonical type hashing
6406 * c-common.c (complete_array_type): Use type_hash_canon.
6407
815d9cc6
XR
64082017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6409
92a285c1 6410 PR c++/80038
815d9cc6
XR
6411 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6412 prototype.
6413 (cilk_install_body_pedigree_operations): Likewise.
6414 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6415 detatched.
6416 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6417 (cilk_install_body_pedigree_operations): Likewise.
6418 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6419 unwrapping.
6420
f8a36447
JJ
64212017-04-27 Jakub Jelinek <jakub@redhat.com>
6422
6423 PR c++/80534
6424 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6425 flag on non-aggregate element types.
6426
7c145456
BE
64272017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6428
6429 * c-common.c (c_type_hasher, type_hash_table): Remove.
6430 (c_common_get_alias_set): Remove unreachable code.
6431 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6432
c3cbcd45
VR
64332017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6434
6435 * c.opt (Wextra-semi): New C++ warning flag.
6436
8a59d466
JJ
64372017-04-20 Jakub Jelinek <jakub@redhat.com>
6438
6439 PR middle-end/80423
6440 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6441
8487c9a5
JJ
64422017-04-18 Jakub Jelinek <jakub@redhat.com>
6443
6444 PR middle-end/79788
6445 PR middle-end/80375
6446 * c-common.c (c_common_type_for_mode): Don't handle
6447 widest_*_literal_type_node here.
6448 c_common_signed_or_unsigned_type): Likewise.
6449 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6450 to *intTI_type_node or *intDI_type_node depending on whether
6451 TImode is supported by the target or not.
6452
3ee0fb02
ML
64532017-04-10 Martin Liska <mliska@suse.cz>
6454
6455 PR sanitizer/80350
6456 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6457 doing an UBSAN check.
6458
5764ee3c
JW
64592017-04-03 Jonathan Wakely <jwakely@redhat.com>
6460
6461 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6462
6f3af356
JJ
64632017-03-31 Jakub Jelinek <jakub@redhat.com>
6464
6465 PR c++/79572
6466 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6467 tree *.
6468 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6469 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6470 REFERENCE_TYPE.
6471
f6a7a9d5
DM
64722017-03-31 David Malcolm <dmalcolm@redhat.com>
6473
6474 PR documentation/78732
6475 * c.opt (Wendif-labels): Fix description to refer to
6476 #else rather than #elif.
6477
af88f557
JJ
64782017-03-31 Jakub Jelinek <jakub@redhat.com>
6479
6480 PR libstdc++/80251
6481 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6482 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6483
a9e4a1a5
JJ
64842017-03-27 Jakub Jelinek <jakub@redhat.com>
6485
6486 PR middle-end/80162
6487 * c-common.c (c_common_mark_addressable_vec): Don't set
6488 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6489
3f01b620
MS
64902017-03-21 Martin Sebor <msebor@redhat.com>
6491
6492 PR c++/79548
6493 * c-common.c (set_underlying_type): Mark type used only when
6494 original del is declared unused.
6495
2f6f187a
DM
64962017-03-10 David Malcolm <dmalcolm@redhat.com>
6497
6498 PR translation/79848
6499 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6500 "%qs".
6501
a02fa805
DM
65022017-03-10 David Malcolm <dmalcolm@redhat.com>
6503
6504 PR c/79921
6505 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6506 from inform's message, so that xgettext can locate it.
6507
822a132c
MP
65082017-03-09 Marek Polacek <polacek@redhat.com>
6509
6510 PR c++/79962
6511 PR c++/79984
6512 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6513 conversion to the attribute list.
6514
bba81f1c
ML
65152017-03-09 Martin Liska <mliska@suse.cz>
6516
6517 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6518
108154ff
JM
65192017-03-03 Jason Merrill <jason@redhat.com>
6520
6521 * c.opt (Wnoexcept-type): New.
6522
eb0e7c34
RB
65232017-03-02 Richard Biener <rguenther@suse.de>
6524
6525 PR c/79756
6526 * c-common.c (c_common_mark_addressable_vec): Look through
6527 C_MAYBE_CONST_EXPR.
6528
9453ba0a
ML
65292017-02-28 Martin Liska <mliska@suse.cz>
6530
6531 * c.opt: Replace space with tabular for options of <number>
6532 type.
6533
6a825afe
ML
65342017-02-28 Martin Liska <mliska@suse.cz>
6535
6536 * c.opt: Fix --help=option -Q for options which are of
6537 an enum type.
6538
4227c9ad
JJ
65392017-02-24 Jakub Jelinek <jakub@redhat.com>
6540
6541 PR c++/79588
6542 * c-common.c (check_function_restrict): New function.
6543 (check_function_arguments): Add FNDECL argument. Call
6544 check_function_restrict if -Wrestrict.
6545 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6546 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6547 * c-common.h (check_function_arguments): Add FNDECL argument.
6548 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6549
59909673
EB
65502017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6551
6552 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6553 treatment of parameters with pointer-to-tagged type and tidy up.
6554 (print_ada_methods): Remove the special treatment of C++ static member
6555 functions.
6556
54dcd526
ML
65572017-02-22 Martin Liska <mliska@suse.cz>
6558
6559 * c.opt: Replace inequality signs with square brackets
6560 for -Wnornalized.
6561
00bc9de3
JJ
65622017-02-21 Jakub Jelinek <jakub@redhat.com>
6563
6564 PR c++/79641
6565 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6566 preserve quals.
6567
97fcf744
JM
65682017-02-17 Joseph Myers <joseph@codesourcery.com>
6569
6570 * c-cppbuiltin.c (builtin_define_float_constants): Define
6571 __DECIMAL_DIG__ to the value for long double.
6572
c7545f1c
MP
65732017-02-15 Marek Polacek <polacek@redhat.com>
6574
6575 PR c/79515
6576 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6577 conversion has occured.
6578
c2e84327
DM
65792017-01-24 David Malcolm <dmalcolm@redhat.com>
6580
6581 * c-common.c (c_common_reswords): Add "__RTL".
6582 * c-common.h (enum rid): Add RID_RTL.
6583
2ebd93e1
MP
65842017-01-20 Marek Polacek <polacek@redhat.com>
6585
6586 PR c/64279
6587 * c-common.h (do_warn_duplicated_branches_r): Declare.
6588 * c-gimplify.c (c_genericize): Walk the function tree calling
6589 do_warn_duplicated_branches_r.
6590 * c-warn.c (expr_from_macro_expansion_r): New.
6591 (do_warn_duplicated_branches): New.
6592 (do_warn_duplicated_branches_r): New.
6593 * c.opt (Wduplicated-branches): New option.
6594
0d80ab91
DM
65952017-01-17 David Malcolm <dmalcolm@redhat.com>
6596
6597 PR c++/71497
6598 * c-indentation.c (warn_for_misleading_indentation): Use the past
6599 subjunctive in the note.
6600
7f991c36
AH
66012017-01-17 Aldy Hernandez <aldyh@redhat.com>
6602
6603 PR c/79116
6604 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6605 start type to integer_type.
6606
1c70261c
JJ
66072017-01-16 Jakub Jelinek <jakub@redhat.com>
6608
6609 PR driver/49726
6610 * c.opt (gen-decls): Add Driver flag.
6611
1ddca3f3
PC
66122017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6613
6614 Revert:
6615 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6616
6617 PR c++/71737
6618 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6619
7d2f3f1d
PC
66202017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6621
6622 PR c++/71737
6623 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6624
bce6f760
MS
66252017-01-12 Martin Sebor <msebor@redhat.com>
6626
6627 (-Wformat-overflow): ...to this.
6628
bf5fbf46
MS
66292017-01-11 Martin Sebor <msebor@redhat.com>
6630
6631 PR c/78768
6632 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6633 Also enable for LTO.
6634
e363df3f
JM
66352017-01-10 Jason Merrill <jason@redhat.com>
6636
6637 Implement P0195R2, C++17 variadic using.
6638 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6639
bd2c6270
JJ
66402017-01-09 Jakub Jelinek <jakub@redhat.com>
6641
6642 PR translation/79019
6643 PR translation/79020
6644 * c.opt (Wnormalized=): Fix typo in description.
6645
efcc8d38
MS
66462017-01-08 Martin Sebor <msebor@redhat.com>
6647
6648 PR middle-end/77708
6649 * c.opt (-Wformat-truncation): New option.
6650
ab20d992 66512017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6652
6653 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6654 value to unsigned short to fit in 4 hex digits without
6655 warnings.
6656
4e89adf9
EB
66572017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6658
6659 * c.opt (fsso-struct): Add 'native' value.
6660
cd445b54
ML
66612017-01-05 Martin Liska <mliska@suse.cz>
6662
6663 PR pch/78970
6664 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6665 header.
6666
a9342885
MP
66672017-01-04 Marek Polacek <polacek@redhat.com>
6668
6669 PR c++/64767
6670 * c.opt (Wpointer-compare): New option.
6671
fc73e60c
JJ
66722017-01-04 Jakub Jelinek <jakub@redhat.com>
6673
6674 PR driver/78957
6675 * c.opt (fsso-struct=): Add RejectNegative.
6676
cbe34bb5
JJ
66772017-01-01 Jakub Jelinek <jakub@redhat.com>
6678
6679 Update copyright years.
6680
d4a6c0ea
ML
66812016-12-29 Martin Liska <mliska@suse.cz>
6682
6683 PR c/78933
6684 * c.opt (strong-eval-order): Add RejectNegative keyword.
6685
67a5ad7c
JM
66862016-12-22 Jason Merrill <jason@redhat.com>
6687
6688 Implement P0522R0, matching of template template arguments.
6689 * c-cppbuiltin.c (c_cpp_builtins): Define
6690 __cpp_template_template_args.
6691
0dba7960
JJ
66922016-12-21 Jakub Jelinek <jakub@redhat.com>
6693
6694 PR bootstrap/78817
6695 * c-common.c (struct nonnull_arg_ctx): New type.
6696 (check_function_nonnull): Return bool instead of void. Use
6697 nonnull_arg_ctx as context rather than just location_t.
6698 (check_nonnull_arg): Adjust for the new context type, set
6699 warned_p to true if a warning has been diagnosed.
6700 (check_function_arguments): Return bool instead of void.
6701 * c-common.h (check_function_arguments): Adjust prototype.
6702
31bfc9b9
JM
67032016-12-21 Jason Merrill <jason@redhat.com>
6704
6705 * c.opt (-fnew-ttp-matching): New flag.
6706 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6707
629b3d75
MJ
67082016-12-14 Martin Jambor <mjambor@suse.cz>
6709
6710 * c-omp.c: Include omp-general.h instead of omp-low.h.
6711 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6712 name.
6713
474da67e
MS
67142016-12-14 Martin Sebor <msebor@redhat.com>
6715
6716 PR c/17308
6717 * c-common.c (check_nonnull_arg): Disable when optimization
6718 is enabled.
6719
fe366b87
MP
67202016-12-12 Marek Polacek <polacek@redhat.com>
6721
6722 PR c++/78647
6723 * c-common.c (attribute_fallthrough_p): Return false for
6724 error_mark_node.
6725
8bd9f164
MS
67262016-12-08 Martin Sebor <msebor@redhat.com>
6727
6728 PR c/78284
6729 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6730
060162e0
MS
67312016-12-08 Martin Sebor <msebor@redhat.com>
6732
6733 PR c/78165
92a285c1
ML
6734 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6735 suffix.
060162e0 6736
ee92e7ba
MS
67372016-12-07 Martin Sebor <msebor@redhat.com>
6738
6739 PR c/53562
6740 PR middle-end/77784
6741 PR middle-end/78149
6742 PR middle-end/78138
6743 * c.opt (-Wstringop-overflow): New option.
6744
84b0769e
MO
67452016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6746
6747 * c-attribs.c (asan odr indicator): New attribute.
6748 (handle_asan_odr_indicator_attribute): New function.
6749
7fa6a965
PK
67502016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6751
6752 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6753 ptrdiff_type_node;
6754
56d8ffc1
JG
67552016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6756
6757 * c-common.c (excess_precision_mode_join): New.
6758 (c_ts18661_flt_eval_method): New.
6759 (c_c11_flt_eval_method): Likewise.
6760 (c_flt_eval_method): Likewise.
6761 * c-common.h (excess_precision_mode_join): New.
6762 (c_flt_eval_method): Likewise.
6763 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6764 (cpp_iec_559_value): Call it.
6765 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6766 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6767 __FLT_EVAL_METHOD_TS_18661_3__.
6768
04f0fcf7
JG
67692016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6770
6771 * c-opts.c (c_common_post_options): Add logic to handle the default
6772 case for -fpermitted-flt-eval-methods.
6773
fb2675cb
PB
67742016-11-23 Paolo Bonzini <bonzini@gnu.org>
6775
6776 * c.opt (Wexpansion-to-defined): New.
6777
ec1c5694
JJ
67782016-11-23 Jakub Jelinek <jakub@redhat.com>
6779
6780 PR target/78451
6781 * c-pragma.c (handle_pragma_target): Don't replace
6782 current_target_pragma, but chainon the new args to the current one.
6783
730c9e75
NS
67842016-11-22 Nathan Sidwell <nathan@acm.org>
6785
6786 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6787 indentation and formatting.
730c9e75 6788
89990732
MS
67892016-11-21 Martin Sebor <msebor@redhat.com>
6790
6791 * c.opt (-fprintf-return-value): Enable by default.
6792
48330c93
BE
67932016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6794
6795 PR c++/71973
6796 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6797 * c-common.c (c_common_nodes_and_builtins): Initialize
6798 const_tm_ptr_type_node.
6799
0d939c95
MP
68002016-11-16 Marek Polacek <polacek@redhat.com>
6801
6802 PR c/78285
6803 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6804
8e745a17
JJ
68052016-11-14 Jakub Jelinek <jakub@redhat.com>
6806
6807 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6808
1ee62b92 68092016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6810 Richard Biener <rguenther@suse.de>
6811
6812 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6813 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6814 * c.opt (fgimple): New option.
1ee62b92 6815
22b15758
UB
68162016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6817
6818 PR c/35503
6819 * c-common.h (warn_for_restrict): Declare.
6820 * c-warn.c: Include gcc-rich-location.h.
6821 (warn_for_restrict): New function.
6822 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6823 (gcc_cdiag_char_table): Likewise.
6824 (gcc_cxxdiag_char_table): Likewise.
6825 * c.opt (Wrestrict): New option.
6826
4be719cd
EB
68272016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6828
6829 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6830 for nested types only if the type is a record or union and dump SLOC.
6831
4a826ca6
JM
68322016-11-09 Jason Merrill <jason@redhat.com>
6833
6834 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6835
2e955d50
JJ
68362016-11-09 Jakub Jelinek <jakub@redhat.com>
6837
6838 * c-ubsan.c (ubsan_instrument_shift): Handle split
6839 -fsanitize=shift-base and -fsanitize=shift-exponent.
6840
51dc6603
JM
68412016-11-07 Jason Merrill <jason@redhat.com>
6842
6843 * c.opt (Wc++1z-compat): New.
6844 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6845
6dc4a604
ML
68462016-11-07 Martin Liska <mliska@suse.cz>
6847
6848 * c-warn.c (warn_for_unused_label): Save all labels used
6849 in goto or in &label.
6850
b302001e
JM
68512016-11-03 Jason Merrill <jason@redhat.com>
6852
6853 * c-cppbuiltin.c (c_cpp_builtins): Correct
6854 __cpp_inheriting_constructors.
6855
31f7f784
JM
68562016-11-01 Jason Merrill <jason@redhat.com>
6857
2bc78e3c
JM
6858 * c-cppbuiltin.c (c_cpp_builtins): Update
6859 __cpp_inheriting_constructors.
6860
31f7f784
JM
6861 * c.opt (-fnew-inheriting-ctors): New.
6862 * c-opts.c: Default to on for ABI 11+.
6863
dcb466ec
JJ
68642016-10-31 Jakub Jelinek <jakub@redhat.com>
6865
6866 PR c++/77948
6867 * c.opt (fext-numeric-literals): Add Var and Init.
6868 * c-opts.c (c_common_handle_option): Don't clear
6869 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6870 (c_common_post_options): Clear it here if not set
6871 explicitly.
6872
52e1b91e
AH
68732016-10-28 Aldy Hernandez <aldyh@redhat.com>
6874
6875 PR debug/77773
6876 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6877 if NULL.
6878
e16f1cc7
JJ
68792016-10-25 Jakub Jelinek <jakub@redhat.com>
6880
6881 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6882 * c-common.c (c_common_reswords): Add __builtin_launder.
6883
f8348061
BE
68842016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6885
6886 * c-common.c (c_common_truthvalue_conversion): Warn for
6887 multiplications in boolean context. Fix the quoting of '<<' and '<'
6888 in the shift warning.
6889
eff89e01
BE
68902016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6891
6892 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6893
24bc7bf4
JM
68942016-10-20 Jason Merrill <jason@redhat.com>
6895
6896 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6897
4c712374
BE
68982016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6899
6900 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6901 integer shift ops in boolean context.
6902
69032016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6904
6905 * c.opt (Walloca): New.
6906 (Walloca-larger-than=): New.
6907 (Wvla-larger-than=): New.
6908
8fa18c06
MP
69092016-10-17 Marek Polacek <polacek@redhat.com>
6910
6911 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6912 Return immediately when finding a match.
6913 (warn_tautological_cmp): Remove a boolean variable that is no longer
6914 needed.
6915
b12b1915
MP
69162016-10-17 Marek Polacek <polacek@redhat.com>
6917
6918 * c-attribs.c: New file.
6919 * c-common.c: Move attributes handling to c-attribs.c.
6920 (get_nonnull_operand): No longer static.
6921 * c-common.h: Move the declarations from c-attribs.c to its own section.
6922
2045acd9
JM
69232016-10-14 Jason Merrill <jason@redhat.com>
6924
6925 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6926 and __cpp_deduction_guides.
6927
14a2c9aa
JM
69282016-10-13 Jason Merrill <jason@redhat.com>
6929
6930 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6931
4d0cdd0c
TP
69322016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6933
6934 * c-cppbuiltin.c: Include memmodel.h.
6935 * c-opts.c: Likewise.
6936 * c-pragma.c: Likewise.
6937 * c-warn.c: Likewise.
6938
70f6d5e1
JJ
69392016-10-12 Jakub Jelinek <jakub@redhat.com>
6940
6941 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6942 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6943 * c-opts.c (sanitize_cpp_opts): Initialize
6944 cpp_opts->cpp_warn_implicit_fallthrough.
6945
78f61294
MP
69462016-10-11 Marek Polacek <polacek@redhat.com>
6947
6948 * c-common.c (warning_candidate_p): Change the return type to bool
6949 and return true/false instead of 1/0.
6950 (vector_mode_valid_p): Likewise.
6951
038b5cc0
MP
69522016-10-11 Marek Polacek <polacek@redhat.com>
6953
6954 * c-common.c (fold_for_warn): No longer static.
6955 (bool_promoted_to_int_p): Likewise.
6956 (c_common_get_narrower): Likewise.
6957 (constant_expression_warning): Move to c-warn.c.
6958 (constant_expression_error): Likewise.
6959 (overflow_warning): Likewise.
6960 (warn_logical_operator): Likewise.
6961 (find_array_ref_with_const_idx_r): Likewise.
6962 (warn_tautological_cmp): Likewise.
6963 (expr_has_boolean_operands_p): Likewise.
6964 (warn_logical_not_parentheses): Likewise.
6965 (warn_if_unused_value): Likewise.
6966 (strict_aliasing_warning): Likewise.
6967 (sizeof_pointer_memaccess_warning): Likewise.
6968 (check_main_parameter_types): Likewise.
6969 (conversion_warning): Likewise.
6970 (warnings_for_convert_and_check): Likewise.
6971 (match_case_to_enum_1): Likewise.
6972 (match_case_to_enum): Likewise.
6973 (c_do_switch_warnings): Likewise.
6974 (warn_for_omitted_condop): Likewise.
6975 (readonly_error): Likewise.
6976 (lvalue_error): Likewise.
6977 (invalid_indirection_error): Likewise.
6978 (warn_array_subscript_with_type_char): Likewise.
6979 (warn_about_parentheses): Likewise.
6980 (warn_for_unused_label): Likewise.
6981 (warn_for_div_by_zero): Likewise.
6982 (warn_for_memset): Likewise.
6983 (warn_for_sign_compare): Likewise.
6984 (do_warn_double_promotion): Likewise.
6985 (do_warn_unused_parameter): Likewise.
6986 (record_locally_defined_typedef): Likewise.
6987 (maybe_record_typedef_use): Likewise.
6988 (maybe_warn_unused_local_typedefs): Likewise.
6989 (maybe_warn_bool_compare): Likewise.
6990 (maybe_warn_shift_overflow): Likewise.
6991 (warn_duplicated_cond_add_or_warn): Likewise.
6992 (diagnose_mismatched_attributes): Likewise.
6993 * c-common.h: Move the declarations from c-warn.c to its own section.
6994 * c-warn.c: New file.
6995
627be19f
JM
69962016-10-08 Jason Merrill <jason@redhat.com>
6997
6998 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6999 into COND_EXPR in C++.
7000
7bad794a
JJ
70012016-10-08 Jakub Jelinek <jakub@redhat.com>
7002
7003 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7004 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7005 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7006
be845b04
JJ
70072016-10-07 Jakub Jelinek <jakub@redhat.com>
7008
7009 Implement LWG2296 helper intrinsic
7010 * c-common.h (enum rid): Add RID_ADDRESSOF.
7011 * c-common.c (c_common_reswords): Add __builtin_addressof.
7012
c09c4992
BE
70132016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
7014
7015 PR c++/77700
7016 * c-common.c (c_common_truthvalue_conversion): Warn also for
7017 suspicious enum values in boolean context.
7018
342cfb3e
JJ
70192016-10-06 Jakub Jelinek <jakub@redhat.com>
7020
7021 Implement P0258R2 - helper for C++17
7022 std::has_unique_object_representations trait
7023 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7024 * c-common.c (c_common_reswords): Add
7025 __has_unique_object_representations.
7026
2e69f143
JJ
70272016-10-05 Jakub Jelinek <jakub@redhat.com>
7028
7029 PR sanitizer/66343
7030 * c-ubsan.c (ubsan_instrument_return): Don't call
7031 initialize_sanitizer_builtins here.
7032
700fff34
BE
70332016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7034
7035 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7036 conditional expression in boolean context when only one arm is
7037 non-boolean.
7038
9563bfcd
JJ
70392016-10-05 Jakub Jelinek <jakub@redhat.com>
7040
04a32443
JJ
7041 PR sanitizer/77823
7042 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7043 is not integral.
7044
9563bfcd
JJ
7045 * c-common.c (c_common_reswords): Update comment for C++11.
7046
f1644724
JM
70472016-10-04 Jason Merrill <jason@redhat.com>
7048
7049 * c-common.c (make_tree_vector_from_ctor): New.
7050 * c-common.h: Declare it.
7051
5a79befb
JJ
70522016-10-04 Jakub Jelinek <jakub@redhat.com>
7053
7054 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7055 __LIBGCC_JCR_SECTION_NAME__.
7056
1633d3b9
BE
70572016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7058
7059 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7060 left shift in boolean context.
7061
a2c6e7f2
JJ
70622016-09-29 Jakub Jelinek <jakub@redhat.com>
7063
7064 Implement P0001R1 - C++17 removal of register storage class specifier
7065 * c.opt (Wregister): New warning.
7066 * c-opts.c (c_common_post_options): Enable -Wregister by
7067 default for C++17.
7068
75304c87
JG
70692016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7070
7071 * c-opts.c (c_common_post_options): Remove special case for
7072 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7073 in C++.
7074
bbfac6da
JJ
70752016-09-27 Jakub Jelinek <jakub@redhat.com>
7076
6e39060a
JJ
7077 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7078 -std=c++1z.
7079
bbfac6da
JJ
7080 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7081
e73cf9a2
TP
70822016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7083
7084 * c-common.c: Include memmodel.h.
7085
c6147dc4
MP
70862016-09-26 Marek Polacek <polacek@redhat.com>
7087
7088 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7089
81fea426
MP
70902016-09-26 Marek Polacek <polacek@redhat.com>
7091
7092 PR c/7652
7093 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7094 (handle_fallthrough_attribute): New function.
7095 (attribute_fallthrough_p): New function.
7096 * c-common.h (attribute_fallthrough_p): Declare.
7097
9a2300e9
MP
70982016-09-24 Marek Polacek <polacek@redhat.com>
7099
7100 PR c/77490
7101 * c.opt (Wbool-operation): New.
7102
a09e9e35
BE
71032016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7104
7105 * c-common.c (c_common_truthvalue_conversion): Inhibit
7106 Wint-in-bool-context warning with from_macro_definition_at.
7107 Mention the expression will always evaluate to true.
7108
d43b4ccc
MS
71092016-09-21 Martin Sebor <msebor@redhat.com>
7110
7111 PR bootstrap/77676
7112 * c.opt (fprintf-return-value): Temporarily initialize to zero
7113 to unblock bootstrap failures.
7114
2e1c20b1
JJ
71152016-09-21 Jakub Jelinek <jakub@redhat.com>
7116
7117 PR c++/77651
7118 * c.opt (Waligned-new=): Add RejectNegative.
7119 (faligned-new=): Likewise. Spelling fix - change
7120 aligned_new_threshhold to aligned_new_threshold.
7121 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7122 to aligned_new_threshold.
7123
88d0c3f0
MS
71242016-09-20 Martin Sebor <msebor@redhat.com>
7125
7126 PR middle-end/49905
7127 * c.opt: Add -Wformat-length and -fprintf-return-value.
7128
144a96e4
BE
71292016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7130
7131 PR c++/77434
7132 * c.opt (Wint-in-bool-context): New warning.
7133 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7134 constants in boolean context.
7135
63012d9a
JM
71362016-09-19 Joseph Myers <joseph@codesourcery.com>
7137
7138 * c-common.c (max_align_t_align): Also consider alignment of
7139 float128_type_node.
7140
931388ce
JM
71412016-09-15 Jason Merrill <jason@redhat.com>
7142
7143 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7144 DECL_EXTERNAL.
7145
38711381
JM
71462016-09-14 Jason Merrill <jason@redhat.com>
7147
7148 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7149 limit FIELD_DECL, either.
7150
e51fbec3
MP
71512016-09-14 Marek Polacek <polacek@redhat.com>
7152
7153 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7154 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7155 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7156
254830ba
DM
71572016-09-13 David Malcolm <dmalcolm@redhat.com>
7158
7159 * c-common.c (warn_logical_not_parentheses): Replace
7160 rich_location::add_fixit_insert calls with add_fixit_insert_before
7161 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7162
42763690
JM
71632016-09-13 Jason Merrill <jason@redhat.com>
7164 Tom de Vries <tom@codesourcery.com>
7165
7166 PR c++/77427
7167 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7168
9453eee9
JM
71692016-09-13 Jason Merrill <jason@redhat.com>
7170
7171 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7172 limit types at all.
7173
e96809e3
JM
71742016-09-12 Jason Merrill <jason@redhat.com>
7175
7176 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7177 bit/byte confusion, allow large alignment for types.
7178
54dcdb88
BE
71792016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7180
7181 PR c++/77496
7182 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7183
d1463eb9
DM
71842016-09-12 David Malcolm <dmalcolm@redhat.com>
7185
7186 PR c/72858
7187 * c-format.c (argument_parser::check_argument_type): Add params
7188 "type_start" and "conversion_char". Use the former to generate
7189 offset_to_type_start and pass it and conversion_char to
7190 check_format_types.
7191 (check_format_info_main): Capture the start of the type
7192 information as "type_start", and pass it an format_char
7193 to arg_parser.check_argument_type.
7194 (check_format_types): Provide an example in the leading comment.
7195 Add params "offset_to_type_start" and "conversion_char"; pass
7196 them to format_type_warning calls.
7197 (test_get_modifier_for_format_len): Likewise.
7198 (matching_type_p): New function.
7199 (get_format_for_type): Add param "conversion_char" and move
7200 implementation into...
7201 (get_format_for_type_1): ...new function, called twice.
7202 Use new function matching_type_p rather than checking for
7203 TYPE_CANONICAL equality.
7204 (get_corrected_substring): New function.
7205 (format_type_warning): Provide an example in the leading comment.
7206 Add params "offset_to_type_start" and "conversion_char". Replace
7207 call to get_format_for_type with call to get_corrected_substring
7208 and move rejection of hints for widths/precisions there.
7209 (assert_format_for_type_streq): Add param "conversion_char".
7210 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7211 (test_get_format_for_type_printf): Add conversion chars to the
7212 tests, adding coverage for various combinations of integer
7213 vs double conversions, and for preserving octal and hexadecimal
7214 conversions.
7215 (test_get_format_for_type_scanf): Add conversion chars to the
7216 tests.
7217
5b28efbb
TV
72182016-09-10 Tom de Vries <tom@codesourcery.com>
7219
7220 PR C/71602
7221 * c-common.c (build_va_arg): Handle more strict
7222 targetm.canonical_va_list_type. Replace first argument type error with
7223 assert.
7224
3f0177e7
MS
72252016-09-09 Martin Sebor <msebor@redhat.com>
7226
7227 PR c/77520
7228 PR c/77521
7229 * c-format.c (argument_parser::find_format_char_info): Use %qc
7230 format directive unconditionally.
7231
af63ba4b
JM
72322016-09-09 Jason Merrill <jason@redhat.com>
7233
7234 Implement C++17 new of over-aligned types.
7235 * c.opt: Add -faligned-new and -Waligned-new.
7236 * c-common.c (max_align_t_align): Split out from...
7237 (cxx_fundamental_alignment_p): ...here.
7238 * c-common.h: Declare it.
7239 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7240
c65248cb
JM
72412016-09-09 Joseph Myers <joseph@codesourcery.com>
7242
7243 * c-cppbuiltin.c (builtin_define_type_width): New function.
7244 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7245 macros.
7246
e5106e27
DM
72472016-09-07 David Malcolm <dmalcolm@redhat.com>
7248
7249 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7250 a POINTER_TYPE.
7251 (substring_loc::get_location): Move to substring-locations.c,
7252 keeping implementation as...
7253 (c_get_substring_location): New function, from the above, reworked
7254 to use accessors rather than member lookup.
7255 * c-common.h (class substring_loc): Move to substring-locations.h,
7256 replacing with a forward decl.
7257 (c_get_substring_location): New decl.
7258 * c-format.c: Include "substring-locations.h".
7259 (format_warning_va): Move to substring-locations.c.
7260 (format_warning_at_substring): Likewise.
7261
ab20d992 72622016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7263
7264 PR c/77336
7265 * c-format.c (check_function_format): Avoid issuing warnings for
7266 functions unless they call format functions with non-constant
7267 format strings.
7268
b772a565
RB
72692016-09-06 Richard Biener <rguenther@suse.de>
7270
7271 PR c/77450
7272 * c-common.c (c_common_mark_addressable_vec): Handle
7273 COMPOUND_LITERAL_EXPR.
7274
25ff5dd3
MP
72752016-09-05 Marek Polacek <polacek@redhat.com>
7276
7277 PR c/77423
7278 * c-common.c (bool_promoted_to_int_p): New function.
7279 (expr_has_boolean_operands_p): New function.
7280 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7281 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7282
21234eb5
TV
72832016-09-04 Tom de Vries <tom@codesourcery.com>
7284
7285 revert:
7286 2016-08-29 Tom de Vries <tom@codesourcery.com>
7287
7288 * c-common.c (build_va_arg): Replace first argument type error
7289 with assert.
7290
9dc5773f
JJ
72912016-09-02 Jakub Jelinek <jakub@redhat.com>
7292
7293 PR c/65467
7294 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7295 (c_finish_omp_for): Reject _Atomic qualified iterators.
7296
72972016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7298
7299 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7300 size to guarantee it fits the output of the formatted function
7301 regardless of its arguments.
7302
295844f6
MP
73032016-09-01 Marek Polacek <polacek@redhat.com>
7304
7305 PR c/7652
7306 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7307 FALLTHRU comments.
7308
3d06b6f2
MP
73092016-08-29 Marek Polacek <polacek@redhat.com>
7310
7311 PR c/77292
7312 * c-common.c (warn_logical_not_parentheses): Don't warn for
7313 a comparison or a logical operator.
7314
34cedad5
TV
73152016-08-29 Tom de Vries <tom@codesourcery.com>
7316
7317 * c-common.c (build_va_arg): Fix type comparison assert.
7318
f162d717
TV
73192016-08-29 Tom de Vries <tom@codesourcery.com>
7320
7321 * c-common.c (build_va_arg): Replace first argument type error
7322 with assert.
7323
ba9bbd6f
TV
73242016-08-29 Tom de Vries <tom@codesourcery.com>
7325
7326 PR c/77398
7327 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7328 with error_mark_node as va_list instead of with illegal va_list.
7329
ebef225f
MP
73302016-08-25 Marek Polacek <polacek@redhat.com>
7331 David Malcolm <dmalcolm@redhat.com>
7332
7333 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7334 * c-common.h (warn_logical_not_parentheses): Update declaration.
7335
b00e6e75
MP
73362016-08-22 Marek Polacek <polacek@redhat.com>
7337
7338 PR c++/77321
7339 * c-common.c (warn_for_memset): Check type for null.
7340
6dc198e3
JM
73412016-08-22 Joseph Myers <joseph@codesourcery.com>
7342
14ec014e 7343 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7344 _FloatNx types for suffixes for built-in functions.
7345
c65699ef
JM
73462016-08-19 Joseph Myers <joseph@codesourcery.com>
7347
7348 PR c/32187
7349 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7350 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7351 (RID_FLOAT128X): New enum rid values.
7352 (CASE_RID_FLOATN_NX): New macro.
7353 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7354 keywords.
7355 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7356 corresponding complex types.
7357 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7358 _FloatNx and corresponding complex types.
7359 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7360 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7361 and _FloatNx types for the widest type for determining
7362 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7363 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7364 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7365 and _FloatNx types.
7366 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7367 constants.
7368 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7369 _FloatNx types.
7370
cc015f3a
DM
73712016-08-18 David Malcolm <dmalcolm@redhat.com>
7372
7373 * c-opts.c (c_diagnostic_finalizer): Update for change to
7374 diagnostic_show_locus.
7375
cb18fd07
DM
73762016-08-18 David Malcolm <dmalcolm@redhat.com>
7377
7378 * c-common.c: Include "spellcheck.h".
7379 (cb_get_suggestion): New function.
7380 * c-common.h (cb_get_suggestion): New decl.
7381 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7382 cb_get_suggestion.
7383
a76989dc
MP
73842016-08-18 Marek Polacek <polacek@redhat.com>
7385
7386 PR c/71514
7387 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7388 and pointer-to-VLA.
7389
65e736c0
DM
73902016-08-16 David Malcolm <dmalcolm@redhat.com>
7391
7392 PR c/72857
7393 * c-common.c (substring_loc::get_range): Rename to...
7394 (substring_loc::get_location): ...this, converting param from a
7395 source_range * to a location_t *. Call
7396 get_source_location_for_substring rather than
7397 get_source_range_for_substring, and pass in m_caret_idx.
7398 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7399 (substring_loc::get_range): Replace with...
7400 (substring_loc::get_location): ...this.
7401 (substring_loc::set_caret_index): New method.
7402 (substring_loc): Add field m_caret_idx.
7403 * c-format.c (format_warning_va): Update for above changes.
7404 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7405 clashing with type name.
7406 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7407 (check_argument_type): Likewise.
7408 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7409 Use a copy when emitting warnings, setting the caret index from TYPE.
7410
7e1dde14 74112016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7412 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7413
7414 * c-ada-spec.c (dump_number): New function.
7415 (handle_escape_character): Likewise.
7416 (print_ada_macros): Add handling of constant integers and strings.
7417
191816a3
MP
74182016-08-12 Marek Polacek <polacek@redhat.com>
7419
7420 PR c/7652
7421 * c-common.c (scalar_to_vector): Adjust fall through comment.
7422 * c-opts.c (c_common_handle_option): Likewise.
7423 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7424 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7425 fall through comment.
7426 * cilk.c (extract_free_variables): Add FALLTHRU.
7427
452df4a4
JM
74282016-08-10 Jason Merrill <jason@redhat.com>
7429
7430 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7431
f3365c12
JM
74322016-08-09 Jason Merrill <jason@redhat.com>
7433
7434 * c-common.c (c_common_attribute_table): vector_size affects type
7435 identity.
7436
f0bc3323
MP
74372016-08-09 Marek Polacek <polacek@redhat.com>
7438
7439 PR c/7652
7440 * c-ada-spec.c (dump_generic_ada_node): Add return.
7441
98e5a19a
JM
74422016-08-09 Jason Merrill <jason@redhat.com>
7443
7444 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7445 C++17 constexpr lambdas.
7446
895aa8e1
DM
74472016-08-08 David Malcolm <dmalcolm@redhat.com>
7448
7449 PR c/64955
7450 * c-common.h (selftest::c_format_c_tests): New declaration.
7451 (selftest::run_c_tests): New declaration.
7452 * c-format.c: Include "selftest.h.
7453 (format_warning_va): Add param "corrected_substring" and use
7454 it to add a replacement fix-it hint.
7455 (format_warning_at_substring): Likewise.
7456 (format_warning_at_char): Update for new param of
7457 format_warning_va.
7458 (argument_parser::check_argument_type): Pass "fki" to
7459 check_format_types.
7460 (check_format_types): Add param "fki" and pass it to
7461 format_type_warning.
7462 (deref_n_times): New function.
7463 (get_modifier_for_format_len): New function.
7464 (selftest::test_get_modifier_for_format_len): New function.
7465 (get_format_for_type): New function.
7466 (format_type_warning): Add param "fki" and use it to attempt
7467 to provide hints for argument types when calling
7468 format_warning_at_substring.
7469 (selftest::get_info): New function.
7470 (selftest::assert_format_for_type_streq): New function.
7471 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7472 (selftest::test_get_format_for_type_printf): New function.
7473 (selftest::test_get_format_for_type_scanf): New function.
7474 (selftest::c_format_c_tests): New function.
7475
e52ed3fe
DM
74762016-08-08 David Malcolm <dmalcolm@redhat.com>
7477
7478 PR c/52952
7479 * c-format.c: Include "diagnostic.h".
7480 (location_column_from_byte_offset): Delete.
7481 (location_from_offset): Delete.
7482 (format_warning_va): New function.
7483 (format_warning_at_substring): New function.
7484 (format_warning_at_char): New function.
7485 (check_format_arg): Capture location of format_tree and pass to
7486 check_format_info_main.
7487 (argument_parser): Add fields "start_of_this_format" and
7488 "format_string_cst".
7489 (flag_chars_t::validate): Add param "format_string_cst". Convert
7490 warning_at call using location_from_offset to call to
7491 format_warning_at_char.
7492 (argument_parser::argument_parser): Add param "format_string_cst_"
7493 and use use it to initialize field "format_string_cst".
7494 Initialize new field "start_of_this_format".
7495 (argument_parser::read_format_flags): Convert warning_at call
7496 using location_from_offset to a call to format_warning_at_char.
7497 (argument_parser::read_any_format_left_precision): Likewise.
7498 (argument_parser::read_any_format_precision): Likewise.
7499 (argument_parser::read_any_other_modifier): Likewise.
7500 (argument_parser::find_format_char_info): Likewise, in three places.
7501 (argument_parser::parse_any_scan_set): Likewise, in one place.
7502 (argument_parser::handle_conversions): Likewise, in two places.
7503 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7504 and use it to make a substring_loc. Pass the latter to
7505 check_format_types.
7506 (check_format_info_main): Add params "fmt_param_loc" and
7507 "format_string_cst". Convert warning_at calls using
7508 location_from_offset to calls to format_warning_at_char. Pass the
7509 new params to the arg_parser ctor. Pass "format_string_cst" to
7510 flag_chars.validate. Pass "fmt_param_loc" to
7511 arg_parser.check_argument_type.
7512 (check_format_types): Convert first param from a location_t
7513 to a const substring_loc & and rename to "fmt_loc". Attempt
7514 to extract the range of the relevant parameter and pass it
7515 to format_type_warning.
7516 (format_type_warning): Convert first param from a location_t
7517 to a const substring_loc & and rename to "fmt_loc". Add
7518 params "param_range" and "type". Replace calls to warning_at
7519 with calls to format_warning_at_substring.
7520
1c4d457e
DM
75212016-08-08 David Malcolm <dmalcolm@redhat.com>
7522
7523 * c-format.c (class flag_chars_t): New class.
7524 (struct length_modifier): New struct.
7525 (class argument_parser): New class.
7526 (flag_chars_t::flag_chars_t): New ctor.
7527 (flag_chars_t::has_char_p): New method.
7528 (flag_chars_t::add_char): New method.
7529 (flag_chars_t::validate): New method.
7530 (flag_chars_t::get_alloc_flag): New method.
7531 (flag_chars_t::assignment_suppression_p): New method.
7532 (argument_parser::argument_parser): New ctor.
7533 (argument_parser::read_any_dollar): New method.
7534 (argument_parser::read_format_flags): New method.
7535 (argument_parser::read_any_format_width): New method.
7536 (argument_parser::read_any_format_left_precision): New method.
7537 (argument_parser::read_any_format_precision): New method.
7538 (argument_parser::handle_alloc_chars): New method.
7539 (argument_parser::read_any_length_modifier): New method.
7540 (argument_parser::read_any_other_modifier): New method.
7541 (argument_parser::find_format_char_info): New method.
7542 (argument_parser::validate_flag_pairs): New method.
7543 (argument_parser::give_y2k_warnings): New method.
7544 (argument_parser::parse_any_scan_set): New method.
7545 (argument_parser::handle_conversions): New method.
7546 (argument_parser::check_argument_type): New method.
7547 (check_format_info_main): Introduce classes argument_parser
7548 and flag_chars_t, moving the code within the loop into methods
7549 of these classes. Make various locals "const".
7550
88fa5555
DM
75512016-08-05 David Malcolm <dmalcolm@redhat.com>
7552
7553 * c-common.c: Include "substring-locations.h".
7554 (get_cpp_ttype_from_string_type): New function.
7555 (g_string_concat_db): New global.
7556 (substring_loc::get_range): New method.
7557 * c-common.h (g_string_concat_db): New declaration.
7558 (class substring_loc): New class.
7559 * c-lex.c (lex_string): When concatenating strings, capture the
7560 locations of all tokens using a new obstack, and record the
7561 concatenation locations within g_string_concat_db.
7562 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7563 on the ggc-heap.
7564
78169471
MP
75652016-07-29 Marek Polacek <polacek@redhat.com>
7566
638fc14f
MP
7567 PR c/71926
7568 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7569 parentheses warning.
7570
78169471
MP
7571 PR c/71574
7572 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7573
1225d6b1
ML
75742016-07-28 Martin Liska <mliska@suse.cz>
7575
7576 PR gcov-profile/68025
7577 * c-common.c (handle_no_profile_instrument_function_attribute):
7578
ec1e2a40
BE
75792016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7580
7581 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7582 BITS_PER_UNIT_LOG.
7583
5ec2cd9f
JM
75842016-07-25 Jason Merrill <jason@redhat.com>
7585
7586 PR c++/65970
7587 * c.opt (fconstexpr-loop-limit): New.
7588
9dc5773f 75892016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7590
7591 PR c++/71675
7592 * c-common.c (resolve_overloaded_builtin): Avoid converting
7593 __atomic_compare_exchange_n return type to that of what its
7594 first argument points to.
7595
e3fe09c1
UB
75962016-07-22 Uros Bizjak <ubizjak@gmail.com>
7597
7598 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7599 ~(unsigned HOST_WIDE_INT) 0.
7600
bc91c436
ML
76012016-07-22 Martin Liska <mliska@suse.cz>
7602
7603 PR gcov-profile/69028
7604 PR gcov-profile/62047
7605 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7606 to the current_function_decl.
7607
451dcc66
JM
76082016-07-21 Jason Merrill <jason@redhat.com>
7609
7610 PR c++/65168
7611 * c-common.c (c_common_truthvalue_conversion): Check
7612 c_inhibit_evaluation_warnings for warning about address of
7613 reference.
7614
de6a69ee
DM
76152016-07-20 David Malcolm <dmalcolm@redhat.com>
7616
7617 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7618 const char *.
7619
d022c55a
JM
76202016-07-15 Jason Merrill <jason@redhat.com>
7621
7622 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7623
ddbbcb19
JJ
76242016-07-15 Jakub Jelinek <jakub@redhat.com>
7625
7626 PR c/71858
7627 * c-common.h (enum lookup_name_fuzzy_kind): Add
7628 FUZZY_LOOKUP_FUNCTION_NAME.
7629
d0cf395a
JM
76302016-07-08 Jason Merrill <jason@redhat.com>
7631
7632 P0145: Refining Expression Order for C++.
7633 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7634 * c-opts.c: Adjust.
7635
98d44e93
MT
76362016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7637
7638 PR c++/71214
7639 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7640
f9d8d994
TS
76412016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7642
7643 * c-pragma.h (enum pragma_kind): Rename
7644 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7645 users.
7646
4aa83879
RB
76472016-06-29 Richard Biener <rguenther@suse.de>
7648
7649 PR middle-end/71002
7650 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7651
a25bd9e6
JM
76522016-06-24 Jason Merrill <jason@redhat.com>
7653
7654 P0145R2: Refining Expression Order for C++.
7655 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7656 MODIFY_EXPR.
7657
a86451b9
JJ
76582016-06-24 Jakub Jelinek <jakub@redhat.com>
7659
7660 * c-common.c (check_builtin_function_arguments): Require last
7661 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7662 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7663 if the last argument is pointer to enumerated or boolean type.
7664
1a4f11c8
DM
76652016-06-22 David Malcolm <dmalcolm@redhat.com>
7666
7667 PR c/70339
7668 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7669 (lookup_name_fuzzy): New prototype.
7670
fe55692c
JDA
76712016-06-21 John David Anglin <danglin@gcc.gnu.org>
7672
7673 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7674
4eb24e01
JM
76752016-06-14 Jason Merrill <jason@redhat.com>
7676
7677 P0145R2: Refining Expression Order for C++.
7678 * c.opt (fargs-in-order): New.
7679 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7680
ef7cf206
JJ
76812016-06-13 Jakub Jelinek <jakub@redhat.com>
7682
0dda258b
JJ
7683 PR sanitizer/71498
7684 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7685 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7686
ef7cf206
JJ
7687 PR preprocessor/71183
7688 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7689 to cb_get_source_date_epoch.
7690
50b15873
JJ
76912016-06-10 Jakub Jelinek <jakub@redhat.com>
7692
7693 PR c/68657
7694 * c.opt (Wpsabi): Add Warning flag.
7695
4d926e34
MS
76962016-06-10 Martin Sebor <msebor@redhat.com>
7697
7698 PR c/71392
14ec014e 7699 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7700 the nonnull attribute in type-generic builtins.
7701
e01b4e16
MS
77022016-06-09 Martin Sebor <msebor@redhat.com>
7703
7704 PR c/70883
7705 * c-common.c (builtin_function_validate_nargs): Make text of error
7706 message consistent with others like it.
7707
44a845ca
MS
77082016-06-08 Martin Sebor <msebor@redhat.com>
7709 Jakub Jelinek <jakub@redhat.com>
7710
7711 PR c++/70507
7712 PR c/68120
7713 * c-common.c (check_builtin_function_arguments): Handle
7714 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7715
a80a7051
RB
77162016-06-08 Richard Biener <rguenther@suse.de>
7717
7718 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7719
bfd67b47
RB
77202016-06-07 Richard Biener <rguenther@suse.de>
7721
7722 PR c/61564
7723 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7724 options and warn about others.
7725
15c98b2e
ES
77262016-06-01 Eduard Sanou <dhole@openmailbox.org>
7727
7728 * c-common.c (get_source_date_epoch): Rename to
7729 cb_get_source_date_epoch.
7730 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7731 message when the parsing fails. Use error_at instead of fatal_error.
7732 * c-common.h (get_source_date_epoch): Rename to
7733 cb_get_source_date_epoch.
7734 * c-common.h (cb_get_source_date_epoch): Prototype.
7735 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7736 * c-common.h (c_omp_region_type): Remove trailing comma.
7737 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7738 * c-lex.c (c_lex_with_flags): Remove initialization of
7739 pfile->source_date_epoch.
7740
00631022
JJ
77412016-05-30 Jakub Jelinek <jakub@redhat.com>
7742
7743 PR c++/71349
7744 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7745 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7746 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7747 instead of C_OMP_CLAUSE_SPLIT_FOR.
7748
f17a223d
RB
77492016-05-24 Richard Biener <rguenther@suse.de>
7750
7751 PR middle-end/70434
7752 PR c/69504
7753 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7754 (convert_vector_to_array_for_subscript): ... this.
7755 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7756 VIEW_CONVERT_EXPR to an array type. Rename to ...
7757 (convert_vector_to_array_for_subscript): ... this.
7758
4f2e1536
MP
77592016-05-12 Marek Polacek <polacek@redhat.com>
7760
7761 PR c/70756
7762 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7763 size_in_bytes and pass LOC to it.
7764
d6e83a8d
MM
77652016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7766
7767 PR c/43651
7768 * c.opt (Wduplicate-decl-specifier): New option.
7769
5c3a10fb
MP
77702016-05-11 Marek Polacek <polacek@redhat.com>
7771
7772 PR c++/71024
7773 * c-common.c (diagnose_mismatched_attributes): New function.
7774 * c-common.h (diagnose_mismatched_attributes): Declare.
7775
deef7113
MP
77762016-05-04 Marek Polacek <polacek@redhat.com>
7777
7778 * c.opt (Wdangling-else): New option.
7779
79ce98bc
MP
77802016-05-03 Marek Polacek <polacek@redhat.com>
7781
7782 PR c/70859
7783 * c-common.c (builtin_function_validate_nargs): Add location
7784 parameter. Use it.
7785 (check_builtin_function_arguments): Add location and arguments
7786 parameters. Use them.
7787 * c-common.h (check_builtin_function_arguments): Update declaration.
7788
381cdae4
RB
77892016-05-03 Richard Biener <rguenther@suse.de>
7790
7791 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7792 allow call args to gimplify to SSA names.
7793
1d793c34
MP
77942016-05-03 Marek Polacek <polacek@redhat.com>
7795
7796 * c-common.h (enum c_omp_region_type): Remove stray comma.
7797
77886428
CP
77982016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7799
7800 * c-common.h (enum c_omp_region_type): Define.
7801
697e0b28
RS
78022016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7803
7804 * c-common.c (shorten_compare): Use wi::to_wide.
7805
e7ff0319
CP
78062016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7807
7808 PR middle-end/70626
7809 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7810 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7811 reduction clauses in acc parallel loops.
7812
2fff3db8
MP
78132016-04-29 Marek Polacek <polacek@redhat.com>
7814
7815 PR c/70852
7816 * c-common.c (warn_for_memset): Check domain before accessing it.
7817
509063eb
DV
78182016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7819
7820 PR/69089
7821 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7822 "aligned" attribute.
7823
b632761d
JM
78242016-04-28 Jason Merrill <jason@redhat.com>
7825
7826 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7827
174f6622
ES
78282016-04-28 Eduard Sanou <dhole@openmailbox.org>
7829 Matthias Klose <doko@debian.org>
7830
7831 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7832 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7833 handling.
7834 * c-common.h (get_source_date_epoch): Prototype.
7835 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7836
6bc2bb18
RB
78372015-04-27 Ryan Burn <contact@rnburn.com>
7838
7839 PR c++/69024
7840 PR c++/68997
7841 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7842 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7843 external linkage.
7844 (cilk_detect_and_unwrap): Corresponding changes.
7845 (extract_free_variables): Don't extract free variables from
7846 AGGR_INIT_EXPR slot.
7847 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7848 (cilk_recognize_spawn): Likewise.
7849
c1e1f433
BS
78502016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7851
7852 * c.opt (Wmemset-elt-size): New option.
7853 * c-common.c (warn_for_memset): New function.
7854 * c-common.h (warn_for_memset): Declare.
7855
d067e05f
JM
78562016-04-25 Jason Merrill <jason@redhat.com>
7857
7858 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7859 No longer static.
7860 * c-common.h: Declare it.
7861 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7862
9aa36ae5
JM
78632016-04-22 Jason Merrill <jason@redhat.com>
7864
7865 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7866
477d4906
IV
78672016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7868
7869 PR c++/69363
7870 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7871 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7872
fe37c7af
MM
78732016-04-18 Michael Matz <matz@suse.de>
7874
7875 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7876 and SET_DECL_ALIGN.
7877
23f2660f
EB
78782016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7879
7880 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7881 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7882 to incomplete types.
7883 (dump_nested_type): Remove redundant tests and tidy up.
7884 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7885 a type which is the typedef of an original type.
7886
1e77281b
MP
78872016-04-15 Marek Polacek <polacek@redhat.com>
7888
7889 PR c/70651
7890 * c-common.c (build_va_arg): Change two asserts into errors and return
7891 error_mark_node.
7892
b3a77f21
MP
78932016-04-13 Marek Polacek <polacek@redhat.com>
7894
7895 PR c++/70639
7896 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7897 for switch statements, too.
7898
322b8466
JM
78992016-03-28 Jason Merrill <jason@redhat.com>
7900
7901 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7902
fbdb6baf
MP
79032016-03-23 Marek Polacek <polacek@redhat.com>
7904
7905 PR c++/69884
7906 * c.opt (Wignored-attributes): New option.
7907
5c240f4d
DM
79082016-03-22 David Malcolm <dmalcolm@redhat.com>
7909
7910 PR c/69993
7911 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7912 diagnostic text, reversing the order of the warning and note so
7913 that they appear in source order.
7914
14ba7b28
MP
79152016-03-17 Marek Polacek <polacek@redhat.com>
7916
7917 PR c/69407
7918 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7919 operations.
7920
08a1cadc
JM
79212016-03-14 Jason Merrill <jason@redhat.com>
7922
2aaeea19
JM
7923 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7924
08a1cadc
JM
7925 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7926
c06d25bb
RB
79272016-03-09 Richard Biener <rguenther@suse.de>
7928
7929 PR c/70143
7930 * c-common.c (strict_aliasing_warning): Add back
7931 alias_sets_conflict_p check.
7932
80aac5c8
JM
79332016-03-08 Jason Merrill <jason@redhat.com>
7934
7935 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7936
64b23c13
DM
79372016-03-04 David Malcolm <dmalcolm@redhat.com>
7938
7939 PR c/68187
7940 * c-indentation.c (get_visual_column): Move code to determine next
7941 tab stop to...
7942 (next_tab_stop): ...this new function.
7943 (line_contains_hash_if): Delete function.
7944 (detect_preprocessor_logic): Delete function.
7945 (get_first_nws_vis_column): New function.
7946 (detect_intervening_unindent): New function.
7947 (should_warn_for_misleading_indentation): Replace call to
7948 detect_preprocessor_logic with a call to
7949 detect_intervening_unindent.
7950
729526f5
DM
79512016-03-04 David Malcolm <dmalcolm@redhat.com>
7952
7953 PR c/68187
7954 * c-indentation.c (should_warn_for_misleading_indentation): When
7955 suppressing warnings about cases where the guard and body are on
7956 the same column, only use the first non-whitespace column in place
7957 of the guard token column when dealing with "else" clauses.
7958 When rejecting aligned BODY and NEXT, loosen the requirement
7959 from equality with the first non-whitespace of guard to simply
7960 that they not be indented relative to it.
7961
e9a35493
RB
79622016-03-04 Richard Biener <rguenther@suse.de>
7963
7964 PR c++/70054
7965 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7966 instead of alias_sets_conflict_p.
7967
1be56bc5
MP
79682016-03-01 Marek Polacek <polacek@redhat.com>
7969
7970 PR c++/69795
7971 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7972 any DECL.
7973
35886f0b
MS
79742016-02-22 Martin Sebor <msebor@redhat.com>
7975
7976 PR middle-end/69780
7977 * c-common.c (check_builtin_function_arguments): Validate and
7978 reject invalid arguments to __builtin_alloca_with_align.
7979
4246c8da
MW
79802016-02-20 Mark Wielaard <mjw@redhat.com>
7981
7982 PR c/28901
7983 * c.opt (Wunused-const-variable): Turn into Alias for...
7984 (Wunused-const-variable=): New option.
7985
268be88c
BE
79862016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7987
7988 PR c++/69865
7989 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7990 here...
7991 (c_common_init_options): ...to here.
7992 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7993
871b3f47
JJ
79942016-02-19 Jakub Jelinek <jakub@redhat.com>
7995
7996 PR c++/69826
7997 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7998 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7999 flag_preprocess_only.
8000
bf14eba2
JJ
80012016-02-16 Jakub Jelinek <jakub@redhat.com>
8002
8003 PR c/69835
8004 * c.opt (Wnonnull-compare): Enable for -Wall.
8005
ba6b3795
JJ
80062016-02-15 Jakub Jelinek <jakub@redhat.com>
8007
8008 PR c++/69797
8009 * c-common.c (sync_resolve_size): Diagnose too few arguments
8010 even when params is non-NULL empty vector.
8011
a011cd92
BS
80122016-02-08 Bernd Schmidt <bschmidt@redhat.com>
8013
8014 PR target/60410
8015 * c.opt (fshort-double): Remove.
8016
46cb9332
MS
80172016-02-05 Martin Sebor <msebor@redhat.com>
8018
8019 PR c++/69662
8020 * c.opt (Warning options): Update -Wplacement-new to take
8021 an optional argument.
8022
e1b81f2b
JJ
80232016-02-01 Jakub Jelinek <jakub@redhat.com>
8024
8025 PR preprocessor/69543
8026 PR c/69558
8027 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8028 instead of loc to control_warning_option.
8029
b6adbb9f
NS
80302016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8031
8032 * c.opt (fopenacc-dim=): New option.
8033
5d70666e
RB
80342016-01-27 Ryan Burn <contact@rnburn.com>
8035
8036 PR cilkplus/69267
8037 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8038 gimplify_arg. Removed superfluous post_p argument.
8039 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8040 superfluous post_p argument.
8041 * c-gimplify.c (c_gimplify_expr): Likewise.
8042
01e1dea3
DM
80432016-01-26 David Malcolm <dmalcolm@redhat.com>
8044
8045 PR other/69006
8046 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8047 pp_newline_and_flush with pp_flush.
8048
9f04a53e
MS
80492016-01-20 Martin Sebor <msebor@redhat.com>
8050
8051 PR c/69405
8052 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8053 an incompatible argument when the argument isn't a valid tree node.
8054
7f26f7df
JM
80552016-01-18 Jason Merrill <jason@redhat.com>
8056
8057 PR c++/68767
8058 * c-common.c (check_function_arguments_recurse): Fold the whole
8059 COND_EXPR, not just the condition.
8060
f62bf092
TV
80612016-01-18 Tom de Vries <tom@codesourcery.com>
8062
8063 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8064 classify as loop clause.
8065
e0a575ff
JJ
80662016-01-15 Jakub Jelinek <jakub@redhat.com>
8067
8068 PR bootstrap/68271
8069 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8070 C++ FE no longer has limit on number of pragmas.
8071
80722015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
8073
8074 PR c++/69048
8075 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 8076 to add missing cleanup point.
b6e3db06 8077
c7df95d8
DM
80782016-01-14 David Malcolm <dmalcolm@redhat.com>
8079
8080 PR c++/68819
8081 * c-indentation.c (get_visual_column): Add location_t param.
8082 Handle the column number being zero by effectively disabling the
8083 warning, with an "inform".
8084 (should_warn_for_misleading_indentation): Add location_t argument
8085 for all uses of get_visual_column.
8086
21efdd80
PP
80872016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8088
8089 PR c++/69029
8090 * c-indentation.c (should_warn_for_misleading_indentation):
8091 Don't warn about do-while statements.
8092
7a127fa7
MS
80932016-01-07 Martin Sebor <msebor@redhat.com>
8094
8095 PR c/68966
8096 * c-common.c (sync_resolve_size): Reject first argument when it's
8097 a pointer to _Bool.
8098
c589e975
DM
80992016-01-05 David Malcolm <dmalcolm@redhat.com>
8100
8101 PR c/69122
8102 * c-indentation.c (get_visual_column): Remove default argument.
8103 (should_warn_for_misleading_indentation): For the multiline case,
8104 update call to get_visual_column for next_stmt_exploc so that it
8105 captures the location of the first non-whitespace character in the
8106 relevant line. Don't issue warnings if there is non-whitespace
8107 before the next statement.
8108
818ab71a
JJ
81092016-01-04 Jakub Jelinek <jakub@redhat.com>
8110
8111 Update copyright years.
8112
745e411d
DM
81132015-12-21 David Malcolm <dmalcolm@redhat.com>
8114
8115 * c-common.c (binary_op_error): Convert first param from
8116 location_t to rich_location * and use it when emitting an error.
8117 * c-common.h (binary_op_error): Convert first param from
8118 location_t to rich_location *.
8119
de67c4c3
DM
81202015-12-16 David Malcolm <dmalcolm@redhat.com>
8121
8122 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8123 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8124
4a38b02b
IV
81252015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8126
8127 * c-common.c (c_common_attribute_table): Handle "omp declare target
8128 link" attribute.
8129
54d62f51
JJ
81302015-12-14 Jakub Jelinek <jakub@redhat.com>
8131
8132 PR c/68833
8133 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8134
8d4227c8
TB
81352014-12-12 Tobias Burnus <burnus@net-b.de>
8136
8137 PR fortran/68815
8138 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8139 specifiers (%d, %i,%u and %c).
8140
f6069ccc
DM
81412015-12-10 David Malcolm <dmalcolm@redhat.com>
8142
8143 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8144
63bbf46d
JJ
81452015-12-08 Jakub Jelinek <jakub@redhat.com>
8146
8147 PR c/48088
8148 PR c/68657
8149 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8150 * c-pragma.c (handle_pragma_diagnostic): Adjust
8151 control_warning_option caller.
8152
f79520bb
DM
81532015-12-07 David Malcolm <dmalcolm@redhat.com>
8154
8155 * c-common.c (c_cpp_error): Update for change to
8156 rich_location::set_range.
8157
b3d5bc62
JJ
81582015-12-04 Paolo Bonzini <bonzini@gnu.org>
8159
8160 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8161 shifting 1 out of the sign bit.
8162
81632015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8164
8165 * c-common.c (c_common_attribute_table[]): Update max arguments
8166 count for "simd" attribute.
8167 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8168
6eb4a537
JJ
81692015-12-03 Jakub Jelinek <jakub@redhat.com>
8170
8171 PR preprocessor/57580
8172 * c-ppoutput.c (print): Change printed field to bool.
8173 Move src_file last for smaller padding.
8174 (init_pp_output): Set print.printed to false instead of 0.
8175 (scan_translation_unit): Fix up formatting. Set print.printed
8176 to true after printing something other than newline.
8177 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8178 (maybe_print_line_1): Set print.printed to false instead of 0.
8179 (print_line_1): Likewise.
8180 (do_line_change): Set print.printed to true instead of 1.
8181 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8182 dump_macro): Set print.printed to false after printing newline.
8183
4250754e
JM
81842015-12-02 Jason Merrill <jason@redhat.com>
8185
f479b43d
JM
8186 * c-common.c (fold_for_warn): New.
8187 (warn_logical_operator, warn_tautological_cmp)
8188 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8189
4250754e
JM
8190 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8191 (c_fully_fold_internal, decl_constant_value_for_optimization):
8192 Move to c/c-fold.c.
8193 * c-common.h: Don't declare decl_constant_value_for_optimization.
8194
e9e32ee6
JM
81952015-12-02 Joseph Myers <joseph@codesourcery.com>
8196
8197 PR c/68162
8198 * c-common.h (c_build_qualified_type): Add extra default
8199 arguments.
8200
37d5ad46
JB
82012015-12-01 Julian Brown <julian@codesourcery.com>
8202 Cesar Philippidis <cesar@codesourcery.com>
8203 James Norris <James_Norris@mentor.com>
8204
8205 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8206 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8207 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8208
f07862c7
EB
82092015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8210
8211 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8212 (decl_sloc_common): Delete and move bulk of processing to...
8213 (decl_sloc): ...here.
8214 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8215 (dump_ada_double_name): Remove S parameter and compute the suffix.
8216 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8217 element type and deal with an anonymous one.
8218 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8219 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8220 and remove reference to QUAL_UNION_TYPE.
8221 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8222 (dump_nested_type): ...here. New function extracted from above.
8223 Generate a full declaration for anonymous element type of arrays.
8224 (print_ada_declaration): Really skip anonymous declarations. Remove
8225 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8226 Clean up processing of declarations of array types and objects.
8227 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8228 Remove obsolete code and tidy up.
8229
75c8aac3
JH
82302015-11-29 Jan Hubicka <hubicka@ucw.cz>
8231
8232 PR c/67581
8233 * c-common.c (handle_transparent_union_attribute): Update
8234 also type variants.
8235
b58d3df2
ML
82362015-11-27 Martin Liska <mliska@suse.cz>
8237
8238 PR c++/68312
8239 * array-notation-common.c (cilkplus_extract_an_triplets):
8240 Release vector of vectors.
8241 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8242
89a01fcf
EB
82432015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8244
8245 PR c++/68527
8246 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8247 (print_ada_struct_decl): Likewise.
8248
cc5c5226
IZ
82492015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8250
8251 PR c++/68001
8252 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8253 * cilk.c (recognize_spawn): Determine location in a more precise
8254 way.
8255
269adb9d
JM
82562015-11-19 Jason Merrill <jason@redhat.com>
8257
8258 * c-common.c (shorten_compare): But look through macros from
8259 system headers.
8260
d0eccfcd
JM
82612015-11-18 Jason Merrill <jason@redhat.com>
8262
8263 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8264 non-constant operand comes from a macro.
8265
3e44547c
JM
82662015-11-17 Jason Merrill <jason@redhat.com>
8267
8268 PR bootstrap/68346
8269 * c-common.c (warn_tautological_cmp): Fold before checking for
8270 constants.
8271
0f62c7a0
MP
82722015-11-16 Marek Polacek <polacek@redhat.com>
8273
8274 PR c++/68362
8275 * c-common.c (check_case_bounds): Fold low and high cases.
8276
a868811e
MP
82772015-11-16 Marek Polacek <polacek@redhat.com>
8278
8279 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8280 * c-common.c (c_common_get_alias_set): Likewise.
8281 (handle_visibility_attribute): Likewise.
8282
fff77217
KY
82832015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8284
8285 * c-common.c (handle_simd_attribute): New.
8286 (struct attribute_spec): Add entry for "simd".
8287 (handle_simd_attribute): New.
8288
269e63b7
KT
82892015-11-13 Kai Tietz <ktietz70@googlemail.com>
8290
8291 * c-lex.c (interpret_float): Use fold_convert.
8292
ebedc9a3
DM
82932015-11-13 David Malcolm <dmalcolm@redhat.com>
8294
8295 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8296 and store it on the result.
8297 * c-opts.c (c_common_init_options): Set
8298 global_dc->colorize_source_p.
8299
6e232ba4
JN
83002015-11-12 James Norris <jnorris@codesourcery.com>
8301 Joseph Myers <joseph@codesourcery.com>
8302
7365279f 8303 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8304 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8305 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8306 PRAGMA_OACC_CLAUSE_LINK.
8307
e78bede6
MP
83082015-11-11 Marek Polacek <polacek@redhat.com>
8309
8310 PR c/68107
8311 PR c++/68266
8312 * c-common.c (valid_array_size_p): New function.
8313 * c-common.h (valid_array_size_p): Declare.
8314
3f8257db 83152015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8316
8317 PR bootstrap/68271
8318 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8319
69f293c9
AM
83202015-11-11 Andrew MacLeod <amacleod@redhat.com>
8321
8322 * array-notation-common.c: Remove unused header files.
8323 * c-ada-spec.c: Likewise.
8324 * c-cilkplus.c: Likewise.
8325 * c-common.c: Likewise.
8326 * c-cppbuiltin.c: Likewise.
8327 * c-dump.c: Likewise.
8328 * c-format.c: Likewise.
8329 * c-gimplify.c: Likewise.
8330 * c-indentation.c: Likewise.
8331 * c-lex.c: Likewise.
8332 * c-omp.c: Likewise.
8333 * c-opts.c: Likewise.
8334 * c-pch.c: Likewise.
8335 * c-ppoutput.c: Likewise.
8336 * c-pragma.c: Likewise.
8337 * c-pretty-print.c: Likewise.
8338 * c-semantics.c: Likewise.
8339 * c-ubsan.c: Likewise.
8340 * cilk.c: Likewise.
8341 * stub-objc.c: Likewise.
8342
3a40d81d
NS
83432015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8344 Cesar Philippidis <cesar@codesourcery.com>
8345 James Norris <jnorris@codesourcery.com>
8346 Julian Brown <julian@codesourcery.com>
8347 Nathan Sidwell <nathan@codesourcery.com>
8348
8349 * c-pragma.c (oacc_pragmas): Add "routine".
8350 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8351
ee45a32d
EB
83522015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8353
8354 * c-common.c (c_common_attributes): Add scalar_storage_order.
8355 (handle_scalar_storage_order_attribute): New function.
8356 * c-pragma.c (global_sso): New variable.
8357 (maybe_apply_pragma_scalar_storage_order): New function.
8358 (handle_pragma_scalar_storage_order): Likewise.
8359 (init_pragma): Register scalar_storage_order.
8360 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8361 * c.opt (Wscalar-storage-order): New warning.
8362 (fsso-struct=): New option.
8363
eb11eb15
MS
83642015-11-08 Martin Sebor <msebor@redhat.com>
8365
8366 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8367
0aad0198
RS
83682015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8369
8370 * c-common.c: Don't undef DEF_BUILTIN.
8371
8a645150
DM
83722015-11-06 David Malcolm <dmalcolm@redhat.com>
8373
8374 * c-common.c (c_cpp_error): Convert parameter from location_t to
8375 rich_location *. Eliminate the "column_override" parameter and
8376 the call to diagnostic_override_column.
8377 Update the "done_lexing" clause to set range 0
8378 on the rich_location, rather than overwriting a location_t.
8379 * c-common.h (c_cpp_error): Convert parameter from location_t to
8380 rich_location *. Eliminate the "column_override" parameter.
8381
7a5e4956
CP
83822015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8383 Thomas Schwinge <thomas@codesourcery.com>
8384 James Norris <jnorris@codesourcery.com>
8385
8386 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8387 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8388 clauses with parallel and kernels and loops.
8389 * c-pragma.h (enum pragma_omp_clause): Add entries for
8390 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8391 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8392 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8393 INDEPENDENT,SEQ}.
8394 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8395
e2f5cc96
MS
83962015-11-05 Martin Sebor <msebor@redhat.com>
8397
8398 PR c++/67942
8399 * c.opt (-Wplacement-new): New option.
8400
e01d41e5
JJ
84012015-11-05 Jakub Jelinek <jakub@redhat.com>
8402
8403 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8404 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8405 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8406 save_expr or create_tmp_var* if TEST is true.
8407 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8408 Don't call add_stmt here.
8409 (struct c_omp_check_loop_iv_data): New type.
8410 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8411 c_omp_check_loop_iv_exprs): New functions.
8412 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8413 distribute.
8414 (c_omp_declare_simd_clauses_to_numbers): Change
8415 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8416 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8417 from numbers to PARM_DECLs.
8418
595278be
MM
84192015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8420
8421 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8422 flag_checking.
8423
3f8257db 84242015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8425
8426 PR c++-common/67882
b3d5bc62
JJ
8427 * c-common.h (fold_offsetof_1): Add argument.
8428 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8429 offsetof expressions that reference elements past the end of
8430 an array.
8431
4bf9e5a8
TS
84322015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8433 Chung-Lin Tang <cltang@codesourcery.com>
8434
8435 * c-pragma.c (oacc_pragmas): Add "atomic".
8436 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8437
3b1661a9
ES
84382015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8439
8440 * c-common.c (handle_target_clones_attribute): New.
8441 (c_common_attribute_table): Add handle_target_clones_attribute.
8442 (handle_always_inline_attribute): Add check on target_clones attribute.
8443 (handle_target_attribute): Ditto.
8444
2adfab87
AM
84452015-10-29 Andrew MacLeod <amacleod@redhat.com>
8446
8447 * array-notation-common.c: Reorder #include's and remove duplicates.
8448 * c-ada-spec.c: Likewise.
8449 * c-cilkplus.c: Likewise.
8450 * c-common.c: Likewise.
8451 * c-cppbuiltin.c: Likewise.
8452 * c-dump.c: Likewise.
8453 * c-format.c: Likewise.
8454 * c-gimplify.c: Likewise.
8455 * c-indentation.c: Likewise.
8456 * c-lex.c: Likewise.
8457 * c-omp.c: Likewise.
8458 * c-opts.c: Likewise.
8459 * c-pch.c: Likewise.
8460 * c-ppoutput.c: Likewise.
8461 * c-pragma.c: Likewise.
8462 * c-pretty-print.c: Likewise.
8463 * c-semantics.c: Likewise.
8464 * c-ubsan.c: Likewise.
8465 * cilk.c: Likewise.
8466 * stub-objc.c: Likewise.
8467
d90ec4f2
JM
84682015-10-28 Jason Merrill <jason@redhat.com>
8469
8470 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8471
88bae6f4
TS
84722015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8473 James Norris <jnorris@codesourcery.com>
8474 Cesar Philippidis <cesar@codesourcery.com>
8475
8476 PR c/64765
8477 PR c/64880
8478 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8479 * c-omp.c (c_oacc_split_loop_clauses): New function.
8480
b1726d6c
MS
84812015-10-21 Martin Sebor <msebor@redhat.com>
8482
8483 PR driver/68043
8484 * c.opt: End each sentence that describes an option with a period.
8485
fa60eeb9
MP
84862015-10-20 Marek Polacek <polacek@redhat.com>
8487
8488 * array-notation-common.c (is_cilkplus_vector_p): Define.
8489 * c-common.h (is_cilkplus_vector_p): Declare.
8490
95979049
MP
84912015-10-20 Marek Polacek <polacek@redhat.com>
8492
8493 * c.opt (std=gnu++11): Do not describe as experimental.
8494 (std=gnu++14): Likewise.
8495
2a9fb712
JM
84962015-10-19 Jason Merrill <jason@redhat.com>
8497
8498 * c-cppbuiltin.c (c_cpp_builtins): Define
8499 __cpp_nontype_template_args.
8500
13b380a3
JM
85012015-10-19 Jason Merrill <jason@redhat.com>
8502
8503 * c-cppbuiltin.c (c_cpp_builtins): Define
8504 __cpp_enumerator_attributes, __cpp_fold_expressions,
8505 __cpp_unicode_characters.
8506
d9a6bd32
JJ
85072015-10-13 Jakub Jelinek <jakub@redhat.com>
8508 Aldy Hernandez <aldyh@redhat.com>
8509
8510 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8511 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8512 (c_define_builtins): Likewise.
8513 * c-common.h (enum c_omp_clause_split): Add
8514 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8515 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8516 (c_finish_omp_for): Add ORIG_DECLV argument.
8517 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8518 201511 instead of 201307.
8519 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8520 OMP_CRITICAL_CLAUSES to it.
8521 (c_finish_omp_ordered): Add CLAUSES argument, set
8522 OMP_ORDERED_CLAUSES to it.
8523 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8524 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8525 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8526 constructs and new OpenMP 4.5 clauses. Clear
8527 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8528 verification code.
8529 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8530 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8531 (enum pragma_omp_clause): Add
8532 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8533 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8534
624d31fe
RS
85352015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8536
8537 * c-lex.c (interpret_float): Use real_equal instead of
8538 REAL_VALUES_EQUAL.
8539
b8fd7909
JM
85402015-10-04 Jason Merrill <jason@redhat.com>
8541
8542 Implement N4514, C++ Extensions for Transactional Memory.
8543 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8544 (c_common_attribute_table): Add transaction_safe_dynamic.
8545 transaction_safe now affects type identity.
8546 (handle_tm_attribute): Handle transaction_safe_dynamic.
8547 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8548 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8549 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8550 (D_TRANSMEM): New.
8551 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8552 * c-pretty-print.c (pp_c_attributes_display): Don't print
8553 transaction_safe in C++.
8554
12651878
MP
85552015-10-02 Marek Polacek <polacek@redhat.com>
8556
8557 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8558
3e3b8d63
MP
85592015-10-02 Marek Polacek <polacek@redhat.com>
8560
8561 PR c/64249
8562 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8563 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8564 * c.opt (Wduplicated-cond): New option.
8565
0d1a8f75
JM
85662015-10-01 Joseph Myers <joseph@codesourcery.com>
8567
8568 * c.opt (std=c11): Do not describe as experimental.
8569 (std=gnu11): Likewise.
8570 (std=iso9899:2011): Likewise.
8571
3e32ee19
NS
85722015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8573
8574 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8575 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8576
974348ee
MP
85772015-09-25 Marek Polacek <polacek@redhat.com>
8578
8579 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8580 (ubsan_instrument_shift): Likewise.
8581
15dbc1a6
MP
85822015-09-25 Marek Polacek <polacek@redhat.com>
8583
8584 PR sanitizer/64906
8585 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8586
6b95d7cc
PP
85872015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8588
8589 * c-indentation.c (should_warn_for_misleading_indentation):
8590 Compare next_stmt_vis_column with guard_line_first_nws instead
8591 of with guard_line_vis_column.
8592
c1822f9c
MLI
85932015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8594
8595 PR c/49654
8596 PR c/49655
8597 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8598 options and options not valid for the current language.
8599
d5398058
PP
86002015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8601
8602 * c-indentation.c (should_warn_for_misleading_indentation):
8603 Float out and consolidate the calls to get_visual_column that
8604 are passed guard_exploc as an argument. Compare
8605 next_stmt_vis_column with guard_line_first_nws instead of with
8606 body_line_first_nws.
8607
6b333269
NS
86082015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8609
8610 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8611 Wnamespaces): New C++ warnings.
8612
a75f1574
JM
86132015-09-22 Jason Merrill <jason@redhat.com>
8614
8615 * c-common.h (abi_compat_version_crosses): New.
8616 (warn_abi_version): Declare.
8617 * c-common.c: Define it.
8618 * c-opts.c (c_common_post_options): Handle it.
8619 flag_abi_compat_version defaults to 8.
8620
bdaaa8b7
VV
86212015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8622
8623 Complete the implementation of N4230, Nested namespace definition.
8624 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8625 __cpp_nested_namespace_definitions.
8626
eaa797e8
MLI
86272015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8628
8629 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8630
c4914de6
MLI
86312015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8632
8633 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8634 when warning.
8635 * c-pragma.h (pragma_lex): Add optional loc argument.
8636
fcb87c50
MM
86372015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8638
8639 * c-format.c (check_format_arg): Adjust to use common block size in all
8640 object pools.
8641
31bdd08a
DM
86422015-09-15 David Malcolm <dmalcolm@redhat.com>
8643
8644 * c-format.c (location_from_offset): Update for change in
8645 signature of location_get_source_line.
8646 * c-indentation.c (get_visual_column): Likewise.
8647 (line_contains_hash_if): Likewise.
8648
aa9f4b4c
MP
86492015-09-14 Marek Polacek <polacek@redhat.com>
8650
8651 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8652 setting various warnings.
8653
aa256c4a
MP
86542015-09-14 Marek Polacek <polacek@redhat.com>
8655
8656 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8657 a negative value.
8658
0f876f22
MW
86592015-09-11 Mark Wielaard <mjw@redhat.com>
8660
8661 PR c/28901
8662 * c.opt (Wunused-variable): Option from common.opt.
8663 (Wunused-const-variable): New option.
8664
273aa49e
PC
86652015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8666
8667 PR c++/53184
8668 * c.opt ([Wsubobject-linkage]): Add.
8669
1807ffc1
MS
86702015-09-03 Martin Sebor <msebor@redhat.com>
8671
8672 PR c/66516
8673 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8674 functions.
8675 * c-common.c (reject_gcc_builtin): Define.
8676
38942840
BI
86772015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8678
8679 PR middle-end/60586
8680 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8681 prototype.
8682 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8683 cilk_gimplify_call_params_in_spawned_fn.
8684 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8685 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8686 unwrapping.
8687
c316b5e4
MP
86882015-08-25 Marek Polacek <polacek@redhat.com>
8689
8690 PR middle-end/67330
8691 * c-common.c (handle_weak_attribute): Don't check whether the
8692 visibility can be changed here.
8693
584a7c46
MLI
86942015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8695
8696 * c-lex.c (c_lex_with_flags): Use explicit locations.
8697
a79683d5
TS
86982015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8699
8700 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8701 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8702
61717a45
FXC
87032015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8704
8705 PR middle-end/36757
8706 * c-common.c (check_builtin_function_arguments): Add check
8707 for BUILT_IN_SIGNBIT argument.
8708
329524f5
PC
87092015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8710
8711 PR c++/67160
8712 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8713 in c++1z mode.
8714
4ee55665
MP
87152015-08-17 Marek Polacek <polacek@redhat.com>
8716
8717 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8718 with whitespaces before qualifier names.
8719
b893e375
MP
87202015-08-12 Marek Polacek <polacek@redhat.com>
8721
8722 PR c++/55095
8723 * c-common.c (maybe_warn_shift_overflow): Properly handle
8724 left-shifting 1 into the sign bit.
8725
c2d89095
MLI
87262015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8727
8728 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8729
971e17ff
AS
87302015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8731 Braden Obrzut <admin@maniacsvault.net>
8732 Jason Merrill <jason@redhat.com>
8733
8734 Add C++ Concepts TS support.
8735 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8736 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8737 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8738 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8739 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8740 * c.opt (fconcepts): New.
8741
b3d5bc62
JJ
87422015-08-02 Martin Sebor <msebor@redhat.com>
8743
8744 * c.opt (-Wframe-address): New warning option.
8745
8ebca419
PP
87462015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8747
8748 * c-indentation.c (should_warn_for_misleading_indentation):
8749 Improve heuristics.
8750
1a1e101f
PP
87512015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8752
8753 * c-indentation.c (get_visual_column): Add parameter first_nws,
8754 use it. Update comment documenting the function.
8755 (is_first_nonwhitespace_on_line): Remove.
8756 (should_warn_for_misleading_indentation): Replace usage of
8757 of is_first_nonwhitespace_on_line with get_visual_column.
8758
992118a1
PP
87592015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8760
8761 * c-indentation.h (struct token_indent_info): Define.
8762 (get_token_indent_info): Define.
8763 (warn_for_misleading_information): Declare.
8764 * c-common.h (warn_for_misleading_information): Remove.
8765 * c-identation.c (warn_for_misleading_indentation):
8766 Change declaration to take three token_indent_infos. Adjust
8767 accordingly.
8768 * c-identation.c (should_warn_for_misleading_indentation):
8769 Likewise. Bail out early if the body is a compound statement.
8770 (guard_tinfo_to_string): Define.
8771
e8fa3817
JM
87722015-07-30 Jason Merrill <jason@redhat.com>
8773
8774 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8775 '*' for reference decay.
8776
173864e8
MP
87772015-07-30 Marek Polacek <polacek@redhat.com>
8778
8779 * c-common.c (warn_tautological_cmp): Bail for float types.
8780
f2afe6dd
MP
87812015-07-27 Marek Polacek <polacek@redhat.com>
8782
8783 PR bootstrap/67030
8784 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8785
05b28fd6
MP
87862015-07-27 Marek Polacek <polacek@redhat.com>
8787
8788 PR c++/66555
8789 PR c/54979
8790 * c-common.c (find_array_ref_with_const_idx_r): New function.
8791 (warn_tautological_cmp): New function.
8792 * c-common.h (warn_tautological_cmp): Declare.
8793 * c.opt (Wtautological-compare): New option.
8794
5a5062b8
MP
87952015-07-23 Marek Polacek <polacek@redhat.com>
8796
8797 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8798 (ubsan_instrument_shift): Likewise.
8799
dc891fe7
MP
88002015-07-23 Marek Polacek <polacek@redhat.com>
8801
8802 PR sanitizer/66908
8803 * c-ubsan.c: Include gimplify.h.
8804 (ubsan_instrument_division): Unshare OP0 and OP1.
8805 (ubsan_instrument_shift): Likewise.
8806
451b5e48
MP
88072015-07-20 Marek Polacek <polacek@redhat.com>
8808 Richard Sandiford <richard.sandiford@arm.com>
8809
8810 PR c++/55095
8811 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8812 Use EXPR_LOC_OR_LOC.
8813 (maybe_warn_shift_overflow): New function.
8814 * c-common.h (maybe_warn_shift_overflow): Declare.
8815 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8816 * c.opt (Wshift-overflow): New option.
8817
fb0b2914
ML
88182015-07-16 Martin Liska <mliska@suse.cz>
8819
8820 * c-format.c (static void check_format_info_main): Use
8821 object_allocator instead of pool_allocator.
8822 (check_format_arg): Likewise.
8823 (check_format_info_main): Likewise.
8824
903f5c23
AM
88252015-07-15 Andrew MacLeod <amacleod@redhat.com>
8826
8827 * c-opts.c: Remove multiline #include comment.
8828
026c3cfd
AH
88292015-07-12 Aldy Hernandez <aldyh@redhat.com>
8830
8831 * c-common.c: Fix double word typos.
8832
bb49ee66
EB
88332015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8834
8835 * c-ada-spec.h (cpp_operation): Revert latest change.
8836 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8837 constructors and destructors.
8838
1916bcb5
AM
88392015-07-09 Andrew MacLeod <amacleod@redhat.com>
8840
8841 * c-common.h: Adjust includes for flags.h changes.
8842 * stub-objc.c: Likewise.
026c3cfd 8843
a9dcd529
EB
88442015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8845
8846 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8847 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8848
b03b462f
JJ
88492015-07-08 Jakub Jelinek <jakub@redhat.com>
8850
8851 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8852 are to be removed, return NULL rather than original clauses list.
8853
c7131fb2
AM
88542015-07-07 Andrew MacLeod <amacleod@redhat.com>
8855
8856 * array-notation-common.c: Adjust includes.
8857 * c-ada-spec.c: Likewise.
8858 * c-cilkplus.c: Likewise.
8859 * c-common.h: Likewise.
8860 * c-cppbuiltin.c: Likewise.
8861 * c-dump.c: Likewise.
8862 * c-format.c: Likewise.
8863 * c-gimplify.c: Likewise.
8864 * c-indentation.c: Likewise.
8865 * c-lex.c: Likewise.
8866 * c-omp.c: Likewise.
8867 * c-opts.c: Likewise.
8868 * c-pch.c: Likewise.
8869 * c-ppoutput.c: Likewise.
8870 * c-pragma.c: Likewise.
8871 * c-pretty-print.c: Likewise.
8872 * c-semantics.c: Likewise.
8873 * c-ubsan.c: Likewise.
8874 * cilk.c: Likewise.
8875 * stub-objc.c: Likewise.
8876
2a7fb83f
EB
88772015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8878
8879 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8880 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8881
a03c9bf1
JM
88822015-07-01 Jason Merrill <jason@redhat.com>
8883
36a85135
JM
8884 * c-common.h (D_CXX11): Rename from D_CXX0X.
8885 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8886 * c-common.c: Adjust.
8887
e7fa68d5
JM
8888 * c-opts.c (c_common_post_options): Default to C++14.
8889
a03c9bf1
JM
8890 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8891
fe95b036
ESR
88922015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8893
8894 Implement N4197 - Adding u8 character literals
b3d5bc62 8895 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8896 CPP_CHAR.
b3d5bc62 8897 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8898 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8899 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8900 and CPP_UTF8CHAR tokens.
8901 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8902
da2e71c9
MLI
89032015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8904
8905 PR fortran/66605
8906 * c-common.c (do_warn_unused_parameter): Move here.
8907 * c-common.h (do_warn_unused_parameter): Declare.
8908
b155cfd9
MP
89092015-06-29 Marek Polacek <polacek@redhat.com>
8910
8911 PR c/66322
8912 * c-common.c (check_case_bounds): Add bool * parameter. Set
8913 OUTSIDE_RANGE_P.
8914 (c_add_case_label): Add bool * parameter. Pass it down to
8915 check_case_bounds.
8916 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8917 warning here.
8918 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8919 declarations.
8920
31521951
MP
89212015-06-27 Marek Polacek <polacek@redhat.com>
8922
8923 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8924 or VECTOR_INTEGER_TYPE_P throughout.
8925 * c-gimplify.c: Likewise.
8926
22d03525
MP
89272015-06-26 Marek Polacek <polacek@redhat.com>
8928
8929 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8930 * c-common.c (c_fully_fold_internal): Likewise.
8931 (c_alignof_expr): Likewise.
8932 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8933 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8934 * cilk.c (create_parm_list): Likewise.
22d03525 8935
af05e6e5
MP
89362015-06-26 Marek Polacek <polacek@redhat.com>
8937
8938 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8939
f0889939
AM
89402015-06-25 Andrew MacLeod <amacleod@redhat.com>
8941
8942 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8943 * c-gimplify.c: Likewise.
8944 * c-pragma.c: Likewise.
8945 * c-ubsan.c: Likewise.
8946 * cilk.c: Likewise.
8947
ca752f39
RS
89482015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8949
8950 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8951 ggc_hasher.
8952
16a16ec7
AM
89532015-06-25 Andrew MacLeod <amacleod@redhat.com>
8954
8955 * cilk.c: Move calls.h after tm.h in the include chain.
8956
0ae9bd27
MP
89572015-06-25 Marek Polacek <polacek@redhat.com>
8958
8959 * array-notation-common.c: Use VAR_P throughout.
8960 * c-ada-spec.c: Likewise.
8961 * c-common.c: Likewise.
8962 * c-format.c: Likewise.
8963 * c-gimplify.c: Likewise.
8964 * c-omp.c: Likewise.
8965 * c-pragma.c: Likewise.
8966 * c-pretty-print.c: Likewise.
8967 * cilk.c: Likewise.
8968
62f9079a
MP
89692015-06-25 Marek Polacek <polacek@redhat.com>
8970
8971 * cilk.c (extract_free_variables): Use is_global_var.
8972
0fa16060
RS
89732015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8974
8975 * c-common.c: Don't include target-def.h.
8976
a68ae2e1
MP
89772015-06-23 Marek Polacek <polacek@redhat.com>
8978
8979 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8980 when comparing INTEGER_CSTs.
8981
c6a2f2d9
PMR
89822015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8983
8984 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8985 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8986 (dump_ada_template): Skip partially specialized types.
8987
6b4db501
MM
89882015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8989
8990 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8991 swapping.
8992
abb226c9
AM
89932015-06-17 Andrew MacLeod <amacleod@redhat.com>
8994
8995 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8996 * c-ada-spec.c: Likewise.
8997 * c-cilkplus.c: Likewise.
8998 * c-common.c: Likewise.
8999 * c-common.h: Likewise.
9000 * c-cppbuiltin.c: Likewise.
9001 * c-dump.c: Likewise.
9002 * c-format.c: Likewise.
9003 * c-gimplify.c: Likewise.
9004 * c-indentation.c: Likewise.
9005 * c-lex.c: Likewise.
9006 * c-omp.c: Likewise.
9007 * c-opts.c: Likewise.
9008 * c-pch.c: Likewise.
9009 * c-ppoutput.c: Likewise.
9010 * c-pragma.c: Likewise.
9011 * c-pretty-print.c: Likewise.
9012 * c-semantics.c: Likewise.
9013 * c-ubsan.c: Likewise.
9014 * cilk.c: Likewise.
9015 * stub-objc.c: Likewise.
9016
076fecad
PP
90172015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
9018
9019 PR c++/65168
9020 * c-common.c (c_common_truthvalue_conversion): Warn when
9021 converting an address of a reference to a truth value.
9022
13fdf2e2
AM
90232015-06-08 Andrew MacLeod <amacleod@redhat.com>
9024
9025 * array-notation-common.c : Adjust include files.
9026 * c-ada-spec.c : Likewise.
9027 * c-cilkplus.c : Likewise.
9028 * c-common.c : Likewise.
9029 * c-common.h : Likewise.
9030 * c-cppbuiltin.c : Likewise.
9031 * c-dump.c : Likewise.
9032 * c-format.c : Likewise.
9033 * c-gimplify.c : Likewise.
9034 * c-indentation.c : Likewise.
9035 * c-lex.c : Likewise.
9036 * c-omp.c : Likewise.
9037 * c-opts.c : Likewise.
9038 * c-pch.c : Likewise.
9039 * c-ppoutput.c : Likewise.
9040 * c-pragma.c : Likewise.
9041 * c-pretty-print.c : Likewise.
9042 * c-semantics.c : Likewise.
9043 * c-ubsan.c : Likewise.
9044 * cilk.c : Likewise.
9045 * stub-objc.c : Likewise.
9046
a1661b90
MP
90472015-06-08 Marek Polacek <polacek@redhat.com>
9048
9049 PR c/66415
9050 * c-format.c (location_from_offset): Return LOC if LINE is null.
9051
d7438551
AH
90522015-06-05 Aldy Hernandez <aldyh@redhat.com>
9053
9054 * c-common.h (c_parse_final_cleanups): New prototype.
9055 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9056
b3d5bc62
JJ
90572015-06-04 Sriraman Tallam <tmsriram@google.com>
9058
9059 * c-common.c (noplt): New attribute.
9060 (handle_noplt_attribute): New handler.
9061
ecb9f223
AM
90622015-06-04 Andrew MacLeod <amacleod@redhat.com>
9063
9064 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9065 * c-ada-spec.c: Likewise.
9066 * c-cilkplus.c: Likewise.
9067 * c-common.c: Likewise.
9068 * c-common.h: Likewise.
9069 * c-cppbuiltin.c: Likewise.
9070 * c-dump.c: Likewise.
9071 * c-format.c: Likewise.
9072 * c-gimplify.c: Likewise.
9073 * c-indentation.c: Likewise.
9074 * c-lex.c: Likewise.
9075 * c-omp.c: Likewise.
9076 * c-opts.c: Likewise.
9077 * c-pch.c: Likewise.
9078 * c-ppoutput.c: Likewise.
9079 * c-pragma.c: Likewise.
9080 * c-pretty-print.c: Likewise.
9081 * c-semantics.c: Likewise.
9082 * c-ubsan.c: Likewise.
9083 * cilk.c: Likewise.
9084 * stub-objc.c: Likewise.
9085
6ac48155
DM
90862015-06-02 David Malcolm <dmalcolm@redhat.com>
9087
9088 PR c/66220:
9089 * c-indentation.c (should_warn_for_misleading_indentation): Use
9090 expand_location rather than expand_location_to_spelling_point.
9091 Don't warn if the guarding statement is more indented than the
9092 next/body stmts.
9093
773ce42e
DM
90942015-06-02 David Malcolm <dmalcolm@redhat.com>
9095
9096 * c-indentation.c (warn_for_misleading_indentation): Bail out
9097 immediately if -Wmisleading-indentation isn't enabled.
9098
4fef8379
ML
90992015-06-01 Martin Liska <mliska@suse.cz>
9100
9101 * c-format.c (check_format_arg):Use new type-based pool allocator.
9102 (check_format_info_main) Likewise.
9103
1edfb384
EB
91042015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9105
9106 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9107 (has_nontrivial_methods): Likewise.
9108
9677ef52
MP
91092015-05-25 Marek Polacek <polacek@redhat.com>
9110
9111 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9112
fd5c817a
MP
91132015-05-22 Marek Polacek <polacek@redhat.com>
9114
9115 PR c/47043
9116 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9117
a2f45fe6 91182015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
9119
9120 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9121 STACK_GROWS_DOWNWARD.
9122
a2f45fe6 91232015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
9124
9125 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9126 STACK_GROWS_DOWNWARD rather than if it is defined.
9127
0fee2ac2 91282015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 9129
0fee2ac2
MLI
9130 PR c/52952
9131 * c-format.c (location_column_from_byte_offset): New.
9132 (location_from_offset): New.
9133 (struct format_wanted_type): Add offset_loc field.
9134 (check_format_info): Move handling of location for extra arguments
9135 closer to the point of warning.
9136 (check_format_info_main): Pass the result of location_from_offset
9137 to warning_at.
9138 (format_type_warning): Pass the result of location_from_offset
9139 to warning_at.
9140
cf4ef6f7
MP
91412015-05-20 Marek Polacek <polacek@redhat.com>
9142
9143 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9144
3a65ee74
MP
91452015-05-20 Marek Polacek <polacek@redhat.com>
9146
9147 * c-ada-spec.c (dump_sloc): Use DECL_P.
9148
21b634ae
MP
91492015-05-20 Marek Polacek <polacek@redhat.com>
9150
9151 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9152 * c-common.c: Likewise.
9153
0e50b624
DM
91542015-05-19 David Malcolm <dmalcolm@redhat.com>
9155
9156 * c-common.h (fe_file_change): Strengthen param from
9157 const line_map * to const line_map_ordinary *.
9158 (pp_file_change): Likewise.
9159 * c-lex.c (fe_file_change): Likewise.
9160 (cb_define): Use linemap_check_ordinary when invoking
9161 SOURCE_LINE.
9162 (cb_undef): Likewise.
9163 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9164 invoking cb_file_change.
9165 (c_finish_options): Likewise.
9166 (push_command_line_include): Likewise.
9167 (cb_file_change): Strengthen param "new_map" from
9168 const line_map * to const line_map_ordinary *.
9169 * c-ppoutput.c (cb_define): Likewise for local "map".
9170 (pp_file_change): Likewise for param "map" and local "from".
9171
fab27f52
MM
91722015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9173
9174 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9175
2fe1d762
TV
91762015-05-18 Tom de Vries <tom@codesourcery.com>
9177
9178 * c-common.c (build_va_arg_1): New function.
9179 (build_va_arg): Add address operator to va_list operand if necessary.
9180
7a37fa90
MM
91812015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9182
9183 PR c/48956
9184 * c-common.c (int_safely_convertible_to_real_p): Define.
9185 (unsafe_conversion_p): Check conversions involving complex types.
9186 (conversion_warning): Add new warning message for conversions which
9187 discard imaginary component.
9188 * c-common.h: (enum conversion_safety): Add new enumerator for such
9189 conversions.
9190
3aa3c9fc
MP
91912015-05-14 Marek Polacek <polacek@redhat.com>
9192
9193 PR c/66066
9194 PR c/66127
9195 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9196 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9197 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9198 use it. If FOR_INT_CONST, require that all evaluated operands be
9199 INTEGER_CSTs.
9200
c3388e62
DM
92012015-05-12 David Malcolm <dmalcolm@redhat.com>
9202
9203 * c-common.h (warn_for_misleading_indentation): New prototype.
9204 * c-indentation.c: New file.
9205 * c.opt (Wmisleading-indentation): New option.
9206
c7b38fd5
TV
92072015-05-12 Tom de Vries <tom@codesourcery.com>
9208
9209 PR tree-optimization/66010
9210 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9211
381bf11e
JM
92122015-05-09 Jason Merrill <jason@redhat.com>
9213
edff0c06
JM
9214 * c-opts.c (c_common_post_options): Also clear
9215 cpp_opts->cpp_warn_cxx11_compat.
9216
129211bc
JM
9217 * c-common.h (enum cxx_dialect): Add cxx_unset.
9218 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9219 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9220
381bf11e
JM
9221 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9222 (std=gnu++0x): Mark as Undocumented.
9223 (std=gnu++1y): Add deprecated message.
9224
fe191308
JM
92252015-05-08 Jason Merrill <jason@redhat.com>
9226
765189ff
JM
9227 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9228 * c-opts.c: Adjust.
9229
fe191308
JM
9230 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9231
755e528f
MP
92322015-05-08 Marek Polacek <polacek@redhat.com>
9233
9234 PR c/64918
9235 * c.opt (Woverride-init-side-effects): New option.
9236
0173bd2a
MP
92372015-05-07 Marek Polacek <polacek@redhat.com>
9238
9239 PR c/65179
9240 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9241 negative value.
9242 * c.opt (Wshift-negative-value): New option.
9243 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9244 when -Wextra and C99/C++11 mode.
9245
e0f0d3b9
MP
92462015-05-07 Marek Polacek <polacek@redhat.com>
9247 Martin Uecker <uecker@eecs.berkeley.edu>
9248
9249 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9250 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9251
8243e2a9
JM
92522015-05-05 Jason Merrill <jason@redhat.com>
9253
9254 * c.opt (Wterminate): New.
9255
577cd070
MP
92562015-04-30 Marek Polacek <polacek@redhat.com>
9257
9258 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9259 require that the non-constant be of a boolean type.
9260
0373796b
JT
92612015-04-29 Josh Triplett <josh@joshtriplett.org>
9262
e0f0d3b9
MP
9263 * c-common.c (handle_section_attribute): Refactor to reduce
9264 nesting and distinguish between error cases.
0373796b 9265
716c0ba6
MP
92662015-04-29 Marek Polacek <polacek@redhat.com>
9267
9268 PR c/64610
9269 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9270 with 0/1.
9271
8848828b
JJ
92722015-04-29 Jakub Jelinek <jakub@redhat.com>
9273
9274 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9275 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9276 HOST_BITS_PER_WIDE_INT.
9277
ecd0e562
TV
92782015-04-28 Tom de Vries <tom@codesourcery.com>
9279
9280 PR tree-optimization/65887
9281 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9282
2a877204 92832015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9284 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9285
9286 * c-ada-spec.c (in_function): Delete.
9287 (dump_generic_ada_node): Do not change in_function and remove the
9288 redundant code dealing with it.
9289 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9290 (print_ada_methods): Output the static member functions in a nested
9291 package after the regular methods as well as associated renamings.
9292
4853031e
MP
92932015-04-24 Marek Polacek <polacek@redhat.com>
9294
9295 PR c/65830
9296 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9297 and OPT_Wshift_count_overflow.
9298
8c2b7f79
MP
9299 PR c/63357
9300 * c-common.c (warn_logical_operator): Warn if the operands have the
9301 same expressions.
9302
b8787813
MP
93032015-04-24 Marek Polacek <polacek@redhat.com>
9304
9305 PR c/61534
9306 * c-common.c (warn_logical_operator): Bail if either operand comes
9307 from a macro expansion.
9308
8fba1830
BRF
93092015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9310
9311 PR target/55143
9312 * c-common.c (c_default_pointer_mode): Add definition.
9313 * c-common.h (c_default_pointer_mode): Add declaration.
9314
17958621
JJ
93152015-03-11 Jakub Jelinek <jakub@redhat.com>
9316
9317 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9318 on record_builtin_type argument.
9319
7ccb1a11
JJ
93202015-03-10 Jakub Jelinek <jakub@redhat.com>
9321
9322 PR c/65120
9323 * c-common.c (warn_logical_not_parentheses): Don't warn for
9324 !x == 0 or !x != 0.
9325
04fd785e
MP
93262015-03-07 Marek Polacek <polacek@redhat.com>
9327
9328 PR sanitizer/65280
9329 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9330 before trying to figure out whether we have a flexible array member.
9331
a4e26206 93322015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9333 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9334
9335 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9336
0d2489f4
EB
93372015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9338
9339 PR ada/65319
9340 * c-ada-spec.c (print_destructor): Remove obsolete code.
9341
83ed54d7
EB
93422015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9343
9344 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9345 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9346 DECL_TEMPLATE_RESULT emulations.
9347 (dump_ada_template)): Add guard for TYPE_METHODS.
9348
7631f0e2
MP
93492015-02-27 Marek Polacek <polacek@redhat.com>
9350
9351 PR c/65040
9352 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9353
d1783ae5
KT
93542015-02-27 Kai Tietz <ktietz@redhat.com>
9355
9356 PR c/35330
9357 * c-pragma.c (handle_pragma_weak): Do not try to create
9358 weak/alias of declarations not being function, or variable
9359 declarations.
9360
56a9f6bc
TS
93612015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9362
9363 PR libgomp/64625
9364 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9365 Remove macros.
9366 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9367
3d5cb23d
MP
93682015-02-16 Marek Polacek <polacek@redhat.com>
9369
9370 PR c/65066
9371 * c-format.c (check_format_types): Handle null param.
9372
fa008882
MP
93732015-02-13 Marek Polacek <polacek@redhat.com>
9374
9375 PR c/65040
9376 * c-format.c (check_format_types): Don't warn about different
9377 signedness if the original value is in the range of WANTED_TYPE.
9378
785f21af
JM
93792015-02-12 Jason Merrill <jason@redhat.com>
9380
9381 PR c++/64956
9382 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9383 to the current highest version.
9384 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9385
4886ec8e
JJ
93862015-02-04 Jakub Jelinek <jakub@redhat.com>
9387
9388 PR c/64824
9389 PR c/64868
9390 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9391 instead of RDIV_EXPR. Use build_binary_op instead of
9392 build2_loc.
9393
40fecdd6
JM
93942015-01-30 Joseph Myers <joseph@codesourcery.com>
9395
9396 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9397 to pass input_location as first argument.
9398
a0c88d06
TV
93992015-01-23 Tom de Vries <tom@codesourcery.com>
9400
9401 PR libgomp/64672
9402 * c.opt (fopenacc): Mark as LTO option.
9403
1506ae0e
TV
94042015-01-23 Tom de Vries <tom@codesourcery.com>
9405
9406 PR libgomp/64707
9407 * c.opt (fopenmp): Mark as LTO option.
9408
31be63ab
JJ
94092015-01-21 Jakub Jelinek <jakub@redhat.com>
9410
9411 PR c/63307
b1726d6c 9412 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9413 (compare_decls): Fix up formatting.
9414
94152015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9416
9417 PR c/63307
9418 * cilk.c: Include vec.h.
9419 (struct cilk_decls): New structure.
9420 (wrapper_parm_cb): Split this function to...
9421 (fill_decls_vec): ...this...
9422 (create_parm_list): ...and this.
9423 (compare_decls): New function.
9424 (for_local_cb): Remove.
9425 (wrapper_local_cb): Ditto.
9426 (build_wrapper_type): For now first traverse and fill vector of
9427 declarations then sort it and then deal with sorted vector.
9428 (cilk_outline): Ditto.
9429 (declare_one_free_variable): Ditto.
9430
6875457f
JM
94312015-01-21 Jason Merrill <jason@redhat.com>
9432
9433 PR c++/64629
9434 * c-format.c (check_format_arg): Call decl_constant_value.
9435
185c9e56
ML
94362015-01-19 Martin Liska <mliska@suse.cz>
9437
9438 * c-common.c (handle_noicf_attribute): New function.
9439
41dbbb37
TS
94402015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9441 Bernd Schmidt <bernds@codesourcery.com>
9442 James Norris <jnorris@codesourcery.com>
9443 Cesar Philippidis <cesar@codesourcery.com>
9444 Ilmir Usmanov <i.usmanov@samsung.com>
9445 Jakub Jelinek <jakub@redhat.com>
9446
9447 * c.opt (fopenacc): New option.
9448 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9449 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9450 New macros.
9451 * c-common.h (c_finish_oacc_wait): New prototype.
9452 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9453 (c_finish_oacc_wait): New function.
9454 * c-pragma.c (oacc_pragmas): New variable.
9455 (c_pp_lookup_pragma, init_pragma): Handle it.
9456 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9457 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9458 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9459 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9460 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9461 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9462 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9463 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9464 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9465 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9466 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9467 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9468 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9469 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9470 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9471 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9472 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9473 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9474 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9475 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9476 PRAGMA_OACC_CLAUSE_WORKER.
9477
3f8257db 94782015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9479
9480 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9481 for the new option fstack-protector_explicit.
9482 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9483 (handle_stack_protect_attribute): New function.
9484
3f8257db 94852015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9486
9487 * c.opt: New option -Warray-bounds=.
9488
adfac8df
JJ
94892015-01-09 Michael Collison <michael.collison@linaro.org>
9490
9491 * array-notation-common.c: Include hash-set.h, machmode.h,
9492 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9493 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9494 * c-ada-spec.c: Ditto.
9495 * c-cilkplus.c: Ditto.
9496 * c-common.c: Include input.h due to flattening of tree.h.
9497 Define macro GCC_C_COMMON_C.
9498 * c-common.h: Flatten tree.h header files into c-common.h.
9499 Remove include of tree-core.h.
9500 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9501 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9502 fold-const.h, wide-int.h, and inchash.h due to
9503 flattening of tree.h.
9504 * c-dump.c: Ditto.
9505 * c-format.c: Flatten tree.h header files into c-common.h.
9506 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9507 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9508 fold-const.h, wide-int.h, and inchash.h due to
9509 flattening of tree.h.
9510 * c-dump.c: Include hash-set.h, machmode.h,
9511 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9512 fold-const.h, wide-int.h, and inchash.h due to
9513 flattening of tree.h.
9514 * c-format.c: Include hash-set.h, machmode.h,
9515 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9516 fold-const.h, wide-int.h, inchash.h and real.h due to
9517 flattening of tree.h.
9518 * c-gimplify.c: Include hash-set.h, machmode.h,
9519 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9520 fold-const.h, wide-int.h, and inchash.h due to
9521 flattening of tree.h.
9522 * cilk.c: Ditto.
9523 * c-lex.c: Ditto.
9524 * c-omp.c: Ditto.
9525 * c-opts.c: Ditto.
9526 * c-pch.c: Ditto.
9527 * c-ppoutput.c: Ditto.
9528 * c-pragma.c: Ditto.
9529 * c-pretty-print.c: Ditto.
9530 * c-semantics.c: Ditto.
9531 * c-ubsan.c: Ditto.
9532 * stub-objc.c: Ditto.
9533
f5481fc4
JM
95342015-01-08 Jason Merrill <jason@redhat.com>
9535
9536 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9537 do_ubsan_in_current_function.
9538 (ubsan_maybe_instrument_reference_or_call): Likewise.
9539 * c-ubsan.h: Declare it.
9540
de35aa66
MS
95412015-01-08 Mike Stump <mikestump@comcast.net>
9542
9543 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9544
4a9a42ab
MP
95452015-01-07 Marek Polacek <polacek@redhat.com>
9546
9547 PR c/64440
9548 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9549 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9550
2f42e5de
TS
95512015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9552
9553 PR c++/31397
9554 * c.opt (Wsuggest-override): New option.
9555
5624e564
JJ
95562015-01-05 Jakub Jelinek <jakub@redhat.com>
9557
9558 Update copyright years.
9559
5bd012f8
MP
95602015-01-05 Marek Polacek <polacek@redhat.com>
9561
9562 PR c/64423
9563 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9564 parameter. Use it.
9565 * c-common.h (warn_array_subscript_with_type_char): Update
9566 declaration.
9567
a7fa8d18
ESR
95682014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9569
9570 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9571 Control macro with flag_sized_deallocation.
9572
3f8257db 95732014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9574
9575 * c.opt (Wdiscarded-array-qualifiers): New option.
9576
1f8d3e84
JJ
95772014-12-19 Jakub Jelinek <jakub@redhat.com>
9578
9579 PR preprocessor/63831
9580 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9581 and __has_cpp_attribute here.
9582 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9583 c_common_has_attribute.
9584 * c-common.h (c_common_has_attribute): New prototype.
9585 * c-lex.c (init_c_lex): Set cb->has_attribute to
9586 c_common_has_attribute instead of cb_has_attribute.
9587 (get_token_no_padding): New function.
9588 (cb_has_attribute): Renamed to ...
9589 (c_common_has_attribute): ... this. No longer static. Use
9590 get_token_no_padding, require ()s, don't build TREE_LIST
9591 unnecessarily, fix up formatting, adjust diagnostics, call
9592 init_attributes.
9593
20b06add
JM
95942014-12-15 Jason Merrill <jason@redhat.com>
9595
9596 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9597 (-Wsized-deallocation): New.
9598 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9599 to on in C++14 and up.
9600
94a073b2
JM
96012014-12-11 Jason Merrill <jason@redhat.com>
9602
acaa5911
JM
9603 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9604
94a073b2
JM
9605 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9606 we aren't complaining about VLAs.
9607
7fb66c15
MP
96082014-12-06 Marek Polacek <polacek@redhat.com>
9609
9610 PR tree-optimization/64183
9611 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9612 shift-expression if it is integer_type_node. Use types_compatible_p.
9613
b731b390
JJ
96142014-11-29 Jakub Jelinek <jakub@redhat.com>
9615
9616 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9617 last argument from create_tmp_var_raw and create_tmp_var calls.
9618 * cilk.c (gimplify_cilk_spawn): Likewise.
9619 * c-omp.c (c_finish_omp_atomic): Likewise.
9620
6a4da643
MP
96212014-11-28 Marek Polacek <polacek@redhat.com>
9622
9623 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9624 instead of unsigned_type_node.
9625
541e35a6
MP
96262014-11-28 Marek Polacek <polacek@redhat.com>
9627
9628 PR c/63862
9629 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9630 to op1_utype.
9631 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9632 expression to unsigned_type_node.
9633
dcc97066
MW
96342014-11-20 Mark Wielaard <mjw@redhat.com>
9635
9636 PR debug/38757
9637 * c-opts.c (set_std_c89): Set lang_hooks.name.
9638 (set_std_c99): Likewise.
9639 (set_std_c11): Likewise.
9640 (set_std_cxx98): Likewise.
9641 (set_std_cxx11): Likewise.
9642 (set_std_cxx14): Likewise.
9643 (set_std_cxx1z): Likewise.
9644
aa7da51a
JJ
96452014-11-21 Jakub Jelinek <jakub@redhat.com>
9646
9647 PR target/63764
9648 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9649 return type to bool.
009a3480 9650 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9651 (convert_vector_to_pointer_for_subscript): Change return type to
9652 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9653 and copy it into a TARGET_EXPR and use that instead of *vecp
9654 directly.
9655
538dd0b7
DM
96562014-11-19 David Malcolm <dmalcolm@redhat.com>
9657
9658 Merger of git branch "gimple-classes-v2-option-3".
9659 * ChangeLog.gimple-classes: New.
9660 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9661 from being just a vec<gimple> to a vec<gbind *>.
9662
c39a5e99
JJ
96632014-11-18 Jakub Jelinek <jakub@redhat.com>
9664
9665 PR sanitizer/63813
9666 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9667 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9668 get_pointer_alignment for non-pointers. Use ptype, or if it is
9669 reference type, corresponding pointer type, as type of kind
9670 argument.
9671 (ubsan_maybe_instrument_reference,
9672 ubsan_maybe_instrument_member_call): Adjust callers.
9673
8537a4a9
MP
96742014-11-15 Marek Polacek <polacek@redhat.com>
9675
9676 PR middle-end/63884
9677 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9678 for NULL fndecl.
9679 (extract_array_notation_exprs): Return for NULL node.
9680
2079956a
JM
96812014-11-12 Joseph Myers <joseph@codesourcery.com>
9682
9683 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9684 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9685
1304953e
JJ
96862014-11-12 Jakub Jelinek <jakub@redhat.com>
9687
9688 PR c/59708
9689 * c-common.c (check_builtin_function_arguments): Handle
9690 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9691
e5e44252
AK
96922014-11-10 Andi Kleen <ak@linux.intel.com>
9693
9694 PR c/60804
9695 * c-common.h (check_no_cilk): Declare.
9696 * cilk.c (get_error_location): New function.
9697 (check_no_cilk): Dito.
9698
e64b984d
AK
96992014-11-10 Andi Kleen <ak@linux.intel.com>
9700
9701 * cilk.c (recognize_spawn): Use expression location
9702 for error message.
9703
13c21655
PC
97042014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9705
9706 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9707
42fd12b1
ESR
97082014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9709
9710 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9711 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9712 (__cpp_range_based_for, __cpp_initializer_lists,
9713 __cpp_delegating_constructors, __cpp_nsdmi,
9714 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9715 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9716 __has_cpp_attribute.
9717 * c-lex.c (cb_has_attribute): New callback CPP function;
9718 (init_c_lex): Set has_attribute callback.
9719
6f450181
RB
97202014-11-04 Richard Biener <rguenther@suse.de>
9721
9722 * c-common.c (shorten_compare): Do not shorten mixed
9723 DFP and non-DFP compares.
9724
26f0e1d6
ESR
97252014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9726
9727 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9728 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9729 Commentary and rearrangement of tests.
9730 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9731 Commentary and rearrangement of tests.
ab20d992 9732 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9733 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9734
ef4bddc2
RS
97352014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9736
9737 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9738 enum from machine_mode.
9739
c582198b
AM
97402014-10-28 Andrew MacLeod <amacleod@redhat.com>
9741
adfac8df
JJ
9742 * c-common.c: Adjust include files.
9743 * c-gimplify.c: Ditto.
9744 * cilk.c: Ditto.
9745 * c-pragma.c: Ditto.
9746 * c-ubsan.c: Ditto.
c582198b 9747
60393bbc
AM
97482014-10-27 Andrew MacLeod <amacleod@redhat.com>
9749
9750 * c-gimplify.c: Adjust include files.
9751
d723bb7c
MLI
97522014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9753
9754 PR c++/53061
9755 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9756 c_common_initialize_diagnostics.
9757 * c-common.h: Likewise.
9758
90f3520e
MP
97592014-10-24 Marek Polacek <polacek@redhat.com>
9760
9761 PR c/56980
9762 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9763 print "struct"/"union"/"enum" for typedefed names.
9764
59d7607a
MP
97652014-10-23 Marek Polacek <polacek@redhat.com>
9766
9767 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9768 in unsigned type.
9769
d95a2703
JJ
97702014-10-22 Jakub Jelinek <jakub@redhat.com>
9771 Yury Gribov <y.gribov@samsung.com>
9772
9773 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9774 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9775 instead of flag_sanitize_recover as bool flag.
9776
8e6ef852
KY
97772014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9778
9779 * cilk.c: Revert previous change.
9780
948cf550
IZ
97812014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9782
9783 PR c/63307
9784 * cilk.c: Include vec.h.
9785 (struct cilk_decls): New structure.
9786 (wrapper_parm_cb): Split this function to...
9787 (fill_decls_vec): ...this...
9788 (create_parm_list): ...and this.
9789 (compare_decls): New function.
9790 (for_local_cb): Remove.
9791 (wrapper_local_cb): Ditto.
9792 (build_wrapper_type): For now first traverse and fill vector of
9793 declarations then sort it and then deal with sorted vector.
9794 (cilk_outline): Ditto.
9795 (declare_one_free_variable): Ditto.
9796
92574c7c
MP
97972014-10-17 Marek Polacek <polacek@redhat.com>
9798
9799 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9800 * c.opt (Wimplicit-int): Initialize to -1.
9801
83685514
AM
98022014-10-16 Andrew MacLeod <amacleod@redhat.com>
9803
9804 * c-pragma.c: Adjust include files.
9805 * c-semantics.c: Likewise.
9806
5b8300ea
DD
98072014-10-16 DJ Delorie <dj@redhat.com>
9808
9809 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9810 multiples of bytes.
9811
5f83e90b
JM
98122014-10-14 Jason Merrill <jason@redhat.com>
9813
9814 PR c++/63455
9815 * c-common.h (CPP_PREPARSED_EXPR): New.
9816 (N_CP_TTYPES): Adjust.
9817
d73326ca
MP
98182014-10-15 Marek Polacek <polacek@redhat.com>
9819
9820 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9821
78a7c317
DD
98222014-10-14 DJ Delorie <dj@redhat.com>
9823
9824 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9825 types, not just __int128.
9826 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9827 types, not just __int128.
9828 (cpp_atomic_builtins): Round pointer sizes up.
9829 (type_suffix): Use type precision, not specific types.
9830 * c-common.c (c_common_reswords): Remove __int128 special case.
9831 (c_common_type_for_size): Check for all __intN types, not just
9832 __int128.
9833 (c_common_type_for_mode): Likewise.
9834 (c_common_signed_or_unsigned_type): Likewise.
9835 (c_build_bitfield_integer_type): Likewise.
9836 (c_common_nodes_and_builtins): Likewise.
9837 (keyword_begins_type_specifier): Likewise.
9838 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9839 __intN variants.
9840
2a22f99c
TS
98412014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9842
9843 * c-common.c: Use hash_table instead of hashtab.
9844
2a8ef767
ESR
98452014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9846
adfac8df 9847 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9848 C++11 section.
9849
3c9aabbd
MG
98502014-10-03 Marc Glisse <marc.glisse@inria.fr>
9851
9852 PR c++/54427
9853 PR c++/57198
9854 PR c++/58845
9855 * c-common.c (warn_logical_operator): Punt for vectors.
9856
a15f7cb8
ESR
98572014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9858
9859 Implement SD-6: SG10 Feature Test Recommendations
9860 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9861 macros and the __has_header macro.
9862
8d0cf15e
JM
98632014-09-30 Jason Merrill <jason@redhat.com>
9864
dd5d5481
JM
9865 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9866 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9867 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9868
b752325e
JM
9869 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9870 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9871
8d0cf15e
JM
9872 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9873 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9874
083e891e
MP
98752014-09-24 Marek Polacek <polacek@redhat.com>
9876
9877 PR c/61405
9878 PR c/53874
9879 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9880
7861b648
AK
98812014-09-23 Andi Kleen <ak@linux.intel.com>
9882
9883 * c-common.c (handle_no_reorder_attribute): New function.
9884 (c_common_attribute_table): Add no_reorder attribute.
9885
9a79452d
JM
98862014-09-22 Joseph Myers <joseph@codesourcery.com>
9887
9888 * c-cppbuiltin.c (c_cpp_builtins): Define
9889 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9890 modes.
9891
dd69f047
JM
98922014-09-18 Joseph Myers <joseph@codesourcery.com>
9893
9894 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9895 for supported floating-point modes.
9896
737a4826
MLI
98972014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9898
9899 * c.opt (Wpsabi): Use LangEnabledBy.
9900 * c-opts.c (c_common_handle_option): Do not handle here.
9901
8cc4b7a2
JM
99022014-09-12 Joseph Myers <joseph@codesourcery.com>
9903
9904 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9905 macros for floating-point modes.
9906
179b5a55
MG
99072014-09-11 Marc Glisse <marc.glisse@inria.fr>
9908
9909 PR target/58757
9910 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9911 __*_DENORM_MIN__ without denormals.
9912
570a11fe
JJ
99132014-09-10 Jakub Jelinek <jakub@redhat.com>
9914
9915 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9916 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9917 ubsan_create_data callers.
9918 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9919 index is constant or BIT_AND_EXPR with constant mask and is
9920 small enough for the bound.
9921 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9922 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9923
b559c810
MLI
99242014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9925
9926 * c.opt: Add CppReason to various flags.
9927 (Wdate-time): Re-sort.
9928 * c-common.c: Include c-common.h earlier.
9929 (struct reason_option_codes_t): Delete.
9930 (c_option_controlling_cpp_error): Prefix global type and struct
9931 with cpp_.
9932
1ef33fd4
MLI
99332014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9934
9935 * c.opt (Wnormalized): New.
9936 (Wnormalized=): Use Enum and Reject Negative.
9937 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9938
66bb34c0
JM
99392014-09-08 Joseph Myers <joseph@codesourcery.com>
9940
9941 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9942 digits of floating-point modes if -fbuilding-libgcc.
9943
53d68b9f
JM
99442014-09-05 Joseph Myers <joseph@codesourcery.com>
9945
9946 * c-cppbuiltin.c (c_cpp_builtins): Also define
9947 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9948 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9949 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9950 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9951 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9952 __LIBGCC_STACK_GROWS_DOWNWARD__,
9953 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9954 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9955 __LIBGCC_DWARF_FRAME_REGISTERS__,
9956 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9957 __LIBGCC_STACK_POINTER_REGNUM__ and
9958 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9959 (builtin_define_with_value): Handle backslash-escaping in string
9960 macro values.
9961
f65586dc
RB
99622014-09-05 Richard Biener <rguenther@suse.de>
9963
9964 PR middle-end/63148
9965 * c-format.c (check_format_arg): Properly handle
9966 effectively signed POINTER_PLUS_EXPR offset.
9967
2b71f4a4
MLI
99682014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9969
9970 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9971 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9972 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9973 and Init.
9974 * c-opts.c (c_common_handle_option): Do not handle here.
9975 (sanitize_cpp_opts): Likewise.
9976 * c-common.c (struct reason_option_codes_t): Handle
9977 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9978
d2e4feca
MP
99792014-09-03 Marek Polacek <polacek@redhat.com>
9980
9981 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9982
9a771876
JJ
99832014-09-02 Jakub Jelinek <jakub@redhat.com>
9984 Balaji V. Iyer <balaji.v.iyer@intel.com>
9985 Igor Zamyatin <igor.zamyatin@intel.com>
9986
9987 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9988 * c-common.c (c_common_reswords): Added _Cilk_for.
9989 * c-common.h (enum rid): Added RID_CILK_FOR.
9990 (cilk_for_number_of_iterations): Add declaration.
9991 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9992 CILK_FOR.
9993 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9994 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9995
81b5d104
MLI
99962014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9997
9998 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9999 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10000 Wundef): Use CPP, Var and Init.
10001 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10002
b753b37b
MLI
100032014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10004
10005 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10006 * c-opts.c (c_common_handle_option): Do not handle here.
10007
028aee17
JM
100082014-08-25 Jason Merrill <jason@redhat.com>
10009
10010 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10011 -std=c++14 and -std=gnu++14, rather than the reverse.
10012 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10013 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10014 * c-common.h (cxx_dialect): Remove cxx1y.
10015
e4276ba5
ESR
100162014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
10017
10018 * c-common.h (enum cxx_dialect): Add cxx14.
10019 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10020 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10021 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10022
a545cacd
JM
100232014-08-22 Jason Merrill <jason@redhat.com>
10024
10025 * c.opt (std=gnu++17): Fix alias.
10026
59ea0364
MP
100272014-08-22 Marek Polacek <polacek@redhat.com>
10028
10029 PR c++/62199
10030 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10031 check for vector types. Drop LHS argument.
10032 * c-common.h (warn_logical_not_parentheses): Adjust.
10033
596e808c
MLI
100342014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10035
10036 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10037 (Wmultichar): Likewise.
10038 (Wdate-time): Use C-family languages instead of Common. Use CPP
10039 and Var.
10040 * c-opts.c (c_common_handle_option): Do not handle the above
10041 options here.
10042 (sanitize_cpp_opts): Likewise.
10043
18767f65
MLI
100442014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10045
10046 PR fortran/44054
10047 * c-opts.c: Include tree-diagnostics.h.
10048 (c_diagnostic_finalizer): New.
10049 (c_common_initialize_diagnostics): Use it.
10050
b4413594
MLI
100512014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10052
10053 PR preprocessor/51303
10054 * c-common.c (struct reason_option_codes_t option_codes):
10055 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10056
43f9a13c
MLI
100572014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10058
10059 PR c/60975
10060 PR c/53063
10061 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10062 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10063 (c_common_post_options): Call init_global_opts_from_cpp.
10064 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10065
04159acf
MP
100662014-08-19 Marek Polacek <polacek@redhat.com>
10067
10068 PR c++/62153
10069 * c-common.c (maybe_warn_bool_compare): New function.
10070 * c-common.h (maybe_warn_bool_compare): Declare.
10071 * c.opt (Wbool-compare): New option.
10072
35aff4fb
MP
100732014-08-19 Marek Polacek <polacek@redhat.com>
10074
10075 * c.opt (Wc99-c11-compat): New option.
10076
177cce46
MP
100772014-08-19 Marek Polacek <polacek@redhat.com>
10078
10079 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10080 to warn_c90_c99_compat.
10081 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10082 to -1.
10083
6ae9194f
MLI
100842014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10085 Steven Bosscher <steven@gcc.gnu.org>
10086
10087 PR c/52952
10088 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10089 format_check_results.
10090 (check_function_format): Use true and add comment for boolean
10091 argument.
10092 (finish_dollar_format_checking): Use explicit location when warning.
10093 (check_format_info): Likewise.
10094 (check_format_arg): Set extra_arg_loc and format_string_loc.
10095 (check_format_info_main): Use explicit location when warning.
10096 (check_format_types): Pass explicit location.
10097 (format_type_warning): Likewise.
10098
8e54f6d3
MLI
100992014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10100
10101 PR fortran/44054
10102 * c-format.c: Handle Fortran flags.
10103
cd4e76fc
IZ
101042014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10105
10106 PR other/61962
10107 * array-notation-common.c (find_rank): Added handling for other
10108 types of references.
10109
f3bede71
MP
101102014-08-10 Marek Polacek <polacek@redhat.com>
10111
10112 PR c/51849
10113 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10114 * c.opt (Wc90-c99-compat): Add option.
10115
9f25a338
TS
101162014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10117
10118 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10119
62e4eb35
MP
101202014-08-03 Marek Polacek <polacek@redhat.com>
10121
ab20d992 10122 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
10123 (c_add_case_label): Pass loc to check_case_value.
10124
b787e7a2
TS
101252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10126
10127 * cilk.c: Use hash_map instead of pointer_map.
10128
6e2830c3
TS
101292014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10130
10131 * c-gimplify.c: Use hash_set instead of pointer_set.
10132
a7ee52fb
IZ
101332014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10134
10135 PR middle-end/61455
10136 * array-notation-common.c (extract_array_notation_exprs): Handling
10137 of DECL_EXPR added.
10138
944fa280
JJ
101392014-08-01 Jakub Jelinek <jakub@redhat.com>
10140
10141 * c-common.h (min_align_of_type): Removed prototype.
10142 * c-common.c (min_align_of_type): Removed.
10143 * c-ubsan.h (ubsan_maybe_instrument_reference,
10144 ubsan_maybe_instrument_member_call): New prototypes.
10145 * c-ubsan.c: Include stor-layout.h and builtins.h.
10146 (ubsan_maybe_instrument_reference_or_call,
10147 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10148 functions.
10149
b4dfdc11
MG
101502014-07-31 Marc Glisse <marc.glisse@inria.fr>
10151
10152 PR c++/60517
10153 * c.opt (-Wreturn-local-addr): Move to common.opt.
10154
a41844e5
JM
101552014-07-30 Jason Merrill <jason@redhat.com>
10156
10157 PR c++/61659
10158 PR c++/61687
10159 Revert:
10160 * c.opt (-fuse-all-virtuals): New.
10161
976d5a22
TT
101622014-07-30 Tom Tromey <tromey@redhat.com>
10163
10164 PR c/59855
10165 * c.opt (Wdesignated-init): New option.
10166 * c-common.c (c_common_attribute_table): Add "designated_init".
10167 (handle_designated_init): New function.
10168
cdc94aca
MP
101692014-07-24 Marek Polacek <polacek@redhat.com>
10170
10171 PR c/57653
10172 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10173
f41373b6
DS
101742014-07-16 Dodji Seketeli <dodji@redhat.com>
10175
10176 PR preprocessor/60723 - missing system-ness marks for macro tokens
10177 * c-ppoutput.c (struct print::prev_was_system_token): New data
10178 member.
10179 (init_pp_output): Initialize it.
10180 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10181 (do_line_change): Return a flag saying if a line marker was
10182 emitted or not.
10183 (scan_translation_unit): Detect if the system-ness of the token we
10184 are about to emit is different from the one of the previously
10185 emitted token. If so, emit a line marker. Avoid emitting useless
10186 adjacent line markers. Avoid emitting line markers for tokens
10187 originating from the expansion of built-in macros.
10188 (scan_translation_unit_directives_only): Adjust.
10189
4d661eaa
MP
101902014-07-15 Marek Polacek <polacek@redhat.com>
10191
10192 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10193 TYPE_MAX_VALUE is NULL.
10194
b108f48f
JJ
101952014-07-14 Jakub Jelinek <jakub@redhat.com>
10196
10197 PR middle-end/61294
10198 * c.opt (Wmemset-transposed-args): New warning.
10199
c0221884
JM
102002014-07-10 Jason Merrill <jason@redhat.com>
10201
10202 PR c++/61659
10203 PR c++/61687
10204 * c.opt (-fuse-all-virtuals): New.
10205
63dfbb95
RB
102062014-07-09 Richard Biener <rguenther@suse.de>
10207
10208 PR c-family/61741
10209 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10210 using unsigned arithmetic if overflow does not wrap instead of
10211 if overflow is undefined.
10212
773ec47f
MP
102132014-07-06 Marek Polacek <polacek@redhat.com>
10214
10215 PR c/6940
10216 * c.opt (Wsizeof-array-argument): New option.
10217
00a7ba58
JJ
102182014-07-03 Jakub Jelinek <jakub@redhat.com>
10219
b1726d6c 10220 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10221 comments->count <= 1, as comments->entries might be NULL.
10222
52ec0ea3
MP
102232014-07-01 Marek Polacek <polacek@redhat.com>
10224
10225 * c.opt (Wint-conversion): New option.
10226
d5c3d343
MP
102272014-07-01 Marek Polacek <polacek@redhat.com>
10228
10229 PR c/58286
10230 * c.opt (Wincompatible-pointer-types): New option.
10231
6e7ceb17
PC
102322014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10233
10234 PR c++/51400
10235 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10236 Do not discard TYPE_QUALS of type.
10237
da73100b
JM
102382014-06-26 Jason Merrill <jason@redhat.com>
10239
10240 * c-common.h (enum cxx_dialect): Add cxx1z.
10241 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10242 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10243
08eedf75
TJ
102442014-06-26 Teresa Johnson <tejohnson@google.com>
10245
10246 * c-common.h (get_dump_info): Declare.
10247 * c-gimplify.c (c_genericize): Use saved dump files.
10248 * c-opts.c (c_common_parse_file): Begin and end dumps
10249 once around parsing invocation.
10250 (get_dump_info): New function.
10251
7b56b2f8
MP
102522014-06-23 Marek Polacek <polacek@redhat.com>
10253 Andrew MacLeod <amacleod@redhat.com>
10254
10255 PR c/61553
10256 * c-common.c (get_atomic_generic_size): Don't segfault if the
10257 type doesn't have a size.
10258
0e37a2f3
MP
102592014-06-20 Marek Polacek <polacek@redhat.com>
10260
10261 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10262 (ubsan_walk_array_refs_r): New function.
10263 (c_genericize): Instrument array bounds.
10264 * c-ubsan.c: Include "internal-fn.h".
10265 (ubsan_instrument_division): Mark instrumented arrays as having
10266 side effects. Adjust ubsan_type_descriptor call.
10267 (ubsan_instrument_shift): Likewise.
10268 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10269 (ubsan_instrument_bounds): New function.
10270 (ubsan_array_ref_instrumented_p): New function.
10271 (ubsan_maybe_instrument_array_ref): New function.
10272 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10273 (ubsan_array_ref_instrumented_p): Declare.
10274 (ubsan_maybe_instrument_array_ref): Declare.
10275
102762014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10277
10278 PR lto/61123
10279 * c.opt (fshort-enums): Add to LTO.
10280 * c.opt (fshort-wchar): Likewise.
10281
5c3d09f7
MP
102822014-06-16 Marek Polacek <polacek@redhat.com>
10283
10284 PR c/60439
10285 * c.opt (Wswitch-bool): Add Var.
10286
9cf32741
JJ
102872014-06-12 Jakub Jelinek <jakub@redhat.com>
10288
10289 PR middle-end/61486
10290 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10291 #pragma omp target teams or
10292 #pragma omp {,target }teams distribute simd.
10293
62984918
JM
102942014-06-12 Jason Merrill <jason@redhat.com>
10295
10296 * c.opt (Wabi=, fabi-compat-version): New.
10297 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10298 (c_common_post_options): Handle flag_abi_compat_version default.
10299 Disallow -fabi-compat-version=1.
10300 * c-common.h (abi_version_crosses): New.
10301
f961457f
JH
103022014-06-11 Jan Hubicka <hubicka@ucw.cz>
10303
adfac8df 10304 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10305 section names that are no longer trees.
10306
92d28cbb
JJ
103072014-06-10 Jakub Jelinek <jakub@redhat.com>
10308
10309 PR fortran/60928
10310 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10311 (omp_pragmas): ... back here.
10312
742938c9
MP
103132014-06-05 Marek Polacek <polacek@redhat.com>
10314
10315 PR c/49706
10316 * c-common.c (warn_logical_not_parentheses): New function.
10317 * c-common.h (warn_logical_not_parentheses): Declare.
10318 * c.opt (Wlogical-not-parentheses): New option.
10319
9d548dfb
MP
103202014-06-04 Marek Polacek <polacek@redhat.com>
10321
10322 PR c/30020
10323 * c-common.c (check_case_bounds): Add location parameter.
10324 Use it.
10325 (c_add_case_label): Pass loc to check_case_bounds.
10326
fedfecef
MP
103272014-06-03 Marek Polacek <polacek@redhat.com>
10328
10329 PR c/60439
10330 * c.opt (Wswitch-bool): New option.
10331
f6a7cffc
TS
103322014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10333
040d18b6
TS
10334 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10335 Remove prototypes.
10336 (record_types_used_by_current_var_decl): Move prototype to where
10337 it belongs.
10338
f6a7cffc
TS
10339 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10340 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10341 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10342
632f2871
RS
103432014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10344
10345 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10346 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10347 void_zero_node.
10348 * c-pretty-print.c (pp_c_void_constant): New function.
10349 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10350 (c_pretty_printer::expression): Handle VOID_CST.
10351 * cilk.c (extract_free_variables): Likewise.
10352 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10353 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10354
766090c2
TS
103552014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10356
10357 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10358 * c-pragma.c (push_alignment): Adjust.
10359 (handle_pragma_push_options): Likewise.
10360
661a0813
MP
103612014-05-09 Marek Polacek <polacek@redhat.com>
10362
10363 PR c/50459
10364 * c-common.c (check_user_alignment): Return -1 if alignment is error
10365 node.
10366 (handle_aligned_attribute): Don't call default_conversion on
10367 FUNCTION_DECLs.
10368 (handle_vector_size_attribute): Likewise.
10369 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10370 (handle_sentinel_attribute): Call default_conversion and allow even
10371 integral types as an argument.
10372
2793eeab
MP
103732014-05-08 Marek Polacek <polacek@redhat.com>
10374
10375 PR c/61053
10376 * c-common.c (min_align_of_type): New function factored out from...
10377 (c_sizeof_or_alignof_type): ...here.
10378 * c-common.h (min_align_of_type): Declare.
10379
f827930a
MP
103802014-05-08 Marek Polacek <polacek@redhat.com>
10381
10382 PR c/61077
10383 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10384 parameter type of main.
10385
ca49b74e
DD
103862014-05-07 DJ Delorie <dj@redhat.com>
10387
10388 * c-cppbuiltin.c (print_bits_of_hex): New.
10389 (builtin_define_type_minmax): Print values using hex so as not to
10390 require a pre-computed list of string values.
10391
1d60af08
KZ
103922014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10393 Mike Stump <mikestump@comcast.net>
10394 Richard Sandiford <rdsandiford@googlemail.com>
10395
10396 * c-ada-spec.c: Include wide-int.h.
10397 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10398 (dump_generic_ada_node): Use wide-int interfaces.
10399 * c-common.c: Include wide-int-print.h.
10400 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10401 (pointer_int_sum): Use wide-int interfaces.
10402 (c_common_nodes_and_builtins): Use make_int_cst.
10403 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10404 (handle_alloc_size_attribute): Use wide-int interfaces.
10405 (get_nonnull_operand): Likewise.
10406 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10407 * c-lex.c: Include wide-int.h.
10408 (narrowest_unsigned_type): Take a widest_int rather than two
10409 HOST_WIDE_INTs.
10410 (narrowest_signed_type): Likewise.
10411 (interpret_integer): Update accordingly. Use wide-int interfaces.
10412 (lex_charconst): Use wide-int interfaces.
10413 * c-pretty-print.c: Include wide-int.h.
10414 (pp_c_integer_constant): Use wide-int interfaces.
10415 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10416 INT_CST_LT_UNSIGNED.
10417
b15458be
RB
104182014-05-06 Richard Biener <rguenther@suse.de>
10419
10420 * c-opts.c (c_common_post_options): For -freestanding,
10421 -fno-hosted and -fno-builtin disable pattern recognition
10422 if not enabled explicitely.
10423
6577374e
MP
104242014-05-02 Marek Polacek <polacek@redhat.com>
10425
10426 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10427
d00887e8
MP
104282014-05-01 Marek Polacek <polacek@redhat.com>
10429
10430 PR c/43245
10431 * c.opt (Wdiscarded-qualifiers): Add.
10432
f8ed5150
MP
104332014-04-30 Marek Polacek <polacek@redhat.com>
10434
10435 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10436 INT_MIN / -1 sanitization only for integer types.
10437
45484dcf
MP
104382014-04-25 Marek Polacek <polacek@redhat.com>
10439
10440 PR c/18079
10441 * c-common.c (handle_noinline_attribute): Warn if the attribute
10442 conflicts with always_inline attribute.
10443 (handle_always_inline_attribute): Warn if the attribute conflicts
10444 with noinline attribute.
10445
38e514c0
MP
104462014-04-25 Marek Polacek <polacek@redhat.com>
10447
10448 PR c/60156
10449 * c-common.c (check_main_parameter_types): Warn about variadic main.
10450
44875f92
MS
104512014-04-24 Mike Stump <mikestump@comcast.net>
10452
10453 * c.opt (Wshadow-ivar): Default to on.
10454
dcaaa5a0
DP
104552014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10456
10457 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10458
c07d7c02
MP
104592014-04-23 Marek Polacek <polacek@redhat.com>
10460
10461 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10462
1c33c9b7
JJ
104632014-04-22 Jakub Jelinek <jakub@redhat.com>
10464
10465 PR sanitizer/60275
10466 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10467 if flag_sanitize_undefined_trap_on_error.
10468 (ubsan_instrument_division, ubsan_instrument_shift,
10469 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10470 if !flag_sanitize_recover.
10471
793c625f
MG
104722014-04-22 Marc Glisse <marc.glisse@inria.fr>
10473
10474 PR libstdc++/43622
10475 * c-common.c (registered_builtin_types): Make non-static.
10476 * c-common.h (registered_builtin_types): Declare.
10477
b0f1bf36 104782014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10479 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10480
10481 PR c/60819
10482 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10483 apply may-alias the scalar pointer type when applicable.
10484
3b07fa4a
IZ
104852014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10486
10487 PR middle-end/60467
10488 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10489 as possible argument for Cilk_spawn.
10490
cbbd2b1c
TB
104912014-04-11 Tobias Burnus <burnus@net-b.de>
10492
10493 PR c/60194
10494 * c.opt (Wformat-signedness): Add
10495 * c-format.c(check_format_types): Use it.
10496
6415bd5d
JM
104972014-04-11 Jason Merrill <jason@redhat.com>
10498
10499 PR c++/57926
10500 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10501 default_conversion for an array argument.
10502
6525783a
MP
105032014-04-08 Marek Polacek <polacek@redhat.com>
10504
10505 PR sanitizer/60745
10506 * c-ubsan.c: Include asan.h.
10507 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10508
880a467b
NS
105092014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10510
10511 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10512
7b59ff2d
MP
105132014-04-02 Marek Polacek <polacek@redhat.com>
10514
10515 * c-common.h (c_expand_expr): Remove declaration.
10516
8edbfaa6
JJ
105172014-03-28 Jakub Jelinek <jakub@redhat.com>
10518
10519 PR c++/60689
10520 * c-common.c (add_atomic_size_parameter): When creating new
10521 params vector, push the size argument first.
10522
07d72e1d
JJ
105232014-03-26 Jakub Jelinek <jakub@redhat.com>
10524
10525 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10526 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10527 ubsan_create_data callers.
10528
b35e0fa0
JJ
105292014-03-22 Jakub Jelinek <jakub@redhat.com>
10530
10531 PR debug/60603
10532 * c-opts.c (c_finish_options): Restore cb_file_change call to
10533 <built-in>.
10534
39a1ebb3
JJ
105352014-03-13 Jakub Jelinek <jakub@redhat.com>
10536
10537 PR middle-end/36282
10538 * c-pragma.c (apply_pragma_weak): Only look at
10539 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10540 DECL_ASSEMBLER_NAME_SET_P (decl).
10541 (maybe_apply_pending_pragma_weaks): Exit early if
10542 vec_safe_is_empty (pending_weaks) rather than only when
10543 !pending_weaks.
10544 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10545 set assembler name back to NULL afterwards.
10546
a07f6ed2
JM
105472014-03-11 Jason Merrill <jason@redhat.com>
10548
10549 * c.opt: Add -std=gnu++14.
10550
75b107f5
IB
105512014-03-11 Ian Bolton <ian.bolton@arm.com>
10552
10553 * c-opts.c (c_common_post_options): Don't override
10554 -ffp-contract=fast if unsafe-math-optimizations is on.
10555
f42c637e
PM
105562014-03-08 Paulo Matos <paulo@matos-sorge.com>
10557
22b15758 10558 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10559
70e24808
JM
105602014-03-07 Jason Merrill <jason@redhat.com>
10561
10562 * c.opt: Add -std=c++14.
10563
3af9c5e9
MP
105642014-03-06 Marek Polacek <polacek@redhat.com>
10565
10566 PR c/60197
10567 * cilk.c (contains_cilk_spawn_stmt): New function.
10568 (contains_cilk_spawn_stmt_walker): Likewise.
10569 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10570 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10571
b3bdf019
JJ
105722014-03-03 Jakub Jelinek <jakub@redhat.com>
10573
10574 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10575 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10576 even when flag_preprocess_only.
10577
ca7e759d
JM
105782014-02-26 Jason Merrill <jason@redhat.com>
10579
10580 PR c++/59231
10581 PR c++/11586
10582 * c-common.c (shorten_compare): Don't check
10583 c_inhibit_evaluation_warnings.
10584
28e41874
JJ
105852014-02-19 Jakub Jelinek <jakub@redhat.com>
10586
cca615af
JJ
10587 PR c/37743
10588 * c-common.c (c_common_nodes_and_builtins): When initializing
10589 c_uint{16,32,64}_type_node, also set corresponding
10590 uint{16,32,64}_type_node to the same value.
10591
28e41874
JJ
10592 PR c++/60267
10593 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10594 for PRAGMA_IVDEP if flag_preprocess_only.
10595
c2bf53a1
JJ
105962014-02-12 Jakub Jelinek <jakub@redhat.com>
10597
10598 PR c/60101
10599 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10600 if false, add ADD itself, rather than vice versa.
10601 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10602 copy. For SAVE_EXPR, only call merge_tlist once.
10603
8fcbce72
JJ
106042014-02-08 Jakub Jelinek <jakub@redhat.com>
10605
10606 PR middle-end/60092
10607 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10608 and tree_to_uhwi.
10609 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10610 functions.
10611 (c_common_attribute_table): Add alloc_align and assume_aligned
10612 attributes.
10613
0a756a3f
MP
106142014-02-06 Marek Polacek <polacek@redhat.com>
10615
10616 PR c/60087
10617 * c-common.c (warn_for_sign_compare): Call warning_at with location
10618 instead of warning.
10619
7ec4847a
MP
106202014-02-05 Marek Polacek <polacek@redhat.com>
10621
10622 PR c/53123
10623 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10624 statement.
10625
66f20604
MP
106262014-02-04 Marek Polacek <polacek@redhat.com>
10627
10628 PR c/60036
10629 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10630 SAVE_EXPR.
10631
5d77fb19
MG
106322014-02-03 Marc Glisse <marc.glisse@inria.fr>
10633
10634 PR c++/53017
10635 PR c++/59211
10636 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10637 handle_vector_size_attribute, handle_nonnull_attribute): Call
10638 default_conversion on the attribute argument.
10639 (handle_nonnull_attribute): Increment the argument number.
10640
81e5eca8
MP
106412014-01-31 Marek Polacek <polacek@redhat.com>
10642
10643 PR c/59963
10644 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10645 build_function_call_vec.
10646 (resolve_overloaded_builtin): Likewise.
10647 * c-common.h (build_function_call_vec): Adjust declaration.
10648
68fca595
MP
106492014-01-30 Marek Polacek <polacek@redhat.com>
10650
10651 PR c/59940
10652 * c-common.h (unsafe_conversion_p): Adjust declaration.
10653 (warnings_for_convert_and_check): Likewise.
10654 (convert_and_check): Likewise.
10655 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10656 expansion_point_location_if_in_system_header on it.
10657 (warnings_for_convert_and_check): Add location parameter. Call
10658 expansion_point_location_if_in_system_header on it. Use it.
10659 (convert_and_check): Add location parameter. Use it.
10660 (conversion_warning): Likewise.
10661 (c_add_case_label): Adjust convert_and_check calls.
10662 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10663
b72271b9
BI
106642014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10665
10666 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10667 flag_cilkplus.
10668 * c-pragma.c (init_pragma): Likewise.
10669 * c.opt: Likewise.
10670
393e8e8b
MP
106712014-01-23 Marek Polacek <polacek@redhat.com>
10672
10673 PR c/59846
10674 * c-common.c (shorten_compare): Add location_t parameter.
10675 * c-common.h (shorten_binary_op): Adjust declaration.
10676
f04dda30
MP
106772014-01-23 Marek Polacek <polacek@redhat.com>
10678
10679 PR c/58346
10680 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10681 * c-common.h: Declare it.
10682
621955cb
EB
106832014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10684
10685 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10686 * c-ada-spec.c (dump_ads): Likewise.
10687 (cpp_check): Likewise.
10688 (dump_ada_specs): Likewise.
10689
106902014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10691
10692 PR c++/49718
10693 * c-common.c (handle_no_instrument_function_attribute): Allow
10694 no_instrument_function attribute in class member
10695 definition/declaration.
10696
241f845a
JJ
106972014-01-15 Jakub Jelinek <jakub@redhat.com>
10698
10699 PR c/58943
10700 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10701 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10702 being COMPOUND_EXPR.
10703 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10704 operand a SAVE_EXPR and second MODIFY_EXPR.
10705
e83b8e2e
JJ
107062014-01-09 Jakub Jelinek <jakub@redhat.com>
10707
10708 PR target/58115
10709 * c-pch.c (c_common_write_pch): Call
10710 prepare_target_option_nodes_for_pch.
10711
23a5b65a
RS
107122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10713
10714 Update copyright years
10715
f9030485
RS
107162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10717
10718 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10719 the copyright notice.
10720
f2aa696b
EB
107212013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10722
10723 * c-ada-spec.c (print_constructor): New function.
10724 (print_destructor): Retrieve the origin of the destructor.
10725 (print_ada_declaration): Revamp handling of constructors/destructors.
10726
3f8257db 107272013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10728 Bill Maddox <maddox@google.com>
10729 Jason Merrill <jason@redhat.com>
10730
10731 * c.opt: Add -fdeclone-ctor-dtor.
10732 * c-opts.c (c_common_post_options): Default to on iff -Os.
10733
41958c28
BI
107342013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10735
10736 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10737 attribute.
10738 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10739 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10740 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10741 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10742 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10743 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10744 PRAGMA_CILK_CLAUSE_UNIFORM.
10745
b1726d6c 10746
12893402
BI
107472013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10748
10749 * cilk.c (cilk_outline): Made this function non-static.
10750 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10751 (create_cilk_wrapper): Added a new parameter: a function pointer.
10752 (c_install_body_w_frame_cleanup): Remove
10753 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10754 * c-common.h (cilk_outline): New prototype.
10755 (gimplify_cilk_spawn): Removed two parameters.
10756 (cilk_install_body_with_frame_cleanup): New prototype.
10757 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10758 CILK_SPAWN_STMT case.
10759
085b42ed
BS
107602013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10761
2ce064c3
BS
10762 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10763
085b42ed
BS
10764 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10765 (int_array_type_node): Remove.
10766 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10767
9e36c9ed
MP
107682013-12-05 Marek Polacek <polacek@redhat.com>
10769
10770 PR c/52023
10771 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10772 [ADJUST_FIELD_ALIGN].
10773
296674db
JM
107742013-12-04 Joseph Myers <joseph@codesourcery.com>
10775
10776 PR c/52023
10777 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10778 and check field alignment if set.
10779 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10780 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10781
b1726d6c 107822013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10783 Marek Polacek <polacek@redhat.com>
10784
10785 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10786 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10787
d7947e19
L
107882013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10789
10790 PR c/59309
10791 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10792 arguments.
10793
fad7652e
JJ
107942013-11-29 Jakub Jelinek <jakub@redhat.com>
10795
10796 PR c/59280
10797 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10798 goto invalid. If it is error_mark_node, don't issue further
10799 diagnostics.
10800
8b5e1202
SO
108012013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10802
10803 * c.opt (Wopenmp-simd): New.
10804
0a508bb6
JJ
108052013-11-22 Jakub Jelinek <jakub@redhat.com>
10806
10807 * c-ubsan.h (ubsan_instrument_return): New prototype.
10808 * c-ubsan.c (ubsan_instrument_return): New function.
10809
2fb9a547
AM
108102013-11-22 Andrew MacLeod <amacleod@redhat.com>
10811
10812 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10813 * c-gimplify.c: Likewise.
10814 * cilk.c: Likewise.
2fb9a547 10815
8400e75e
DM
108162013-11-22 David Malcolm <dmalcolm@redhat.com>
10817
10818 * c-common.c (unsafe_conversion_p): Remove use of
10819 EXPR_LOC_OR_HERE macro.
10820 (conversion_warning): Likewise.
10821 (warnings_for_convert_and_check): Likewise.
10822 (warn_for_collisions_1): Likewise.
10823 (shorten_compare): Likewise, and remove use of in_system_header
10824 macro, using the location from the former.
10825 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10826 (cb_def_pragma): Remove use of in_system_header macro.
10827 (lex_string): Likewise.
10828 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10829
eb1ce453
KZ
108302013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10831 Mike Stump <mikestump@comcast.net>
10832 Richard Sandiford <rdsandiford@googlemail.com>
10833
10834 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10835 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10836 tree_fits_shwi_p or tree_fits_uhwi_p.
10837 (dump_generic_ada_node): Likewise.
10838 * c-format.c (check_format_arg): Likewise.
10839 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10840
6b3b8c27
KZ
108412013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10842
10843 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10844
49b0aa18
JC
108452013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10846
10847 PR c/53001
10848 * c-common.c (unsafe_conversion_p): Make this function
10849 return an enumeration with more detail.
10850 (conversion_warning): Use the new return type of
10851 unsafe_conversion_p to separately warn either about conversions
10852 that lower floating point number precision or about the other
10853 kinds of conversions.
10854 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10855 (unsafe_conversion_p): switching return type to
10856 conversion_safety enumeration.
49b0aa18
JC
10857 * c.opt: Adding new warning -Wfloat-conversion and
10858 enabling it with -Wconversion.
10859
b826515a
BS
108602013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10861
8e745a17
JJ
10862 * c-opts.c: Include plugin.h.
10863 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10864
b9a55b13
MP
108652013-11-19 Marek Polacek <polacek@redhat.com>
10866
10867 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10868 call.
10869 (ubsan_instrument_shift): Likewise.
10870 (ubsan_instrument_vla): Likewise.
10871
7d362f6c
RS
108722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10873
10874 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10875 cast to unsigned type.
10876
386b1f1f
RS
108772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10878
10879 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10880 tree_low_cst.
10881 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10882 rather than tree_low_cst.
10883
ae7e9ddd
RS
108842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10885
10886 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10887 tree_to_uhwi throughout.
10888
9439e9a1
RS
108892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10890
10891 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10892 tree_low_cst (..., 0) with tree_to_shwi throughout.
10893
cc269bb6
RS
108942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10895
10896 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10897 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10898
9541ffee
RS
108992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10900
10901 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10902 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10903
c02065fc
AH
109042013-11-15 Aldy Hernandez <aldyh@redhat.com>
10905
10906 * c-cilkplus.c: New file.
10907 * c-common.c (readonly_error): Add location argument.
10908 * c-common.h (readonly_error): Same.
10909 (c_finish_cilk_clauses): Protoize.
10910 (c_check_cilk_loop): Same.
10911 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10912 Do not fail on error_mark_node.
10913 Abstract increment canonicalization to here...
10914 (c_omp_for_incr_canonicalize_ptr): New.
10915 c-pragma.c (init_pragma): Register "simd" pragma.
10916 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10917 (enum pragma_cilk_clause): New.
10918
9cc65f15
RS
109192013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10920
10921 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10922 wchar_type and host_integerp checks.
10923
18f429e2
AM
109242013-11-14 Andrew MacLeod <amacleod@redhat.com>
10925
10926 * c-common.c: Likewise.
10927 * c-gimplify.c: Likewise.
10928 * cilk.c: Likewise.
10929
d8a2d370
DN
109302013-11-14 Diego Novillo <dnovillo@google.com>
10931
10932 * c-common.c: Include fold-const.h.
10933 Include stor-layout.h.
10934 Include calls.h.
10935 Include stringpool.h.
10936 Include attribs.h.
10937 Include varasm.h.
10938 Include trans-mem.h.
10939 * c-cppbuiltin.c: Include stor-layout.h.
10940 Include stringpool.h.
10941 * c-format.c: Include stringpool.h.
10942 * c-lex.c: Include stringpool.h.
10943 Include stor-layout.h.
10944 * c-pragma.c: Include stringpool.h.
10945 Include attribs.h.
10946 Include varasm.h.
10947 Include gcc-symtab.h.
10948 * c-pretty-print.c: Include stor-layout.h.
10949 Include attribs.h.
10950 * cilk.c: Include stringpool.h.
10951 Include calls.h.
10952
38b7bc7f
JM
109532013-11-13 Joseph Myers <joseph@codesourcery.com>
10954
10955 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10956 * c-common.c (c_common_reswords): Add __auto_type.
10957 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10958
45b0be94
AM
109592013-11-12 Andrew MacLeod <amacleod@redhat.com>
10960
18f429e2
AM
10961 * c-common.c: Include gimplify.h.
10962 * c-gimplify.c: Likewise.
10963 * cilk.c: Likewise.
10964 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10965 * c-ubsan.c: Don't include gimple.h.
45b0be94 10966
582d9b50
JM
109672013-11-12 Joseph Myers <joseph@codesourcery.com>
10968
10969 * c-common.c (c_common_reswords): Add _Thread_local.
10970
6b28e197
JM
109712013-11-09 Joseph Myers <joseph@codesourcery.com>
10972
10973 * c-common.c (atomic_size_supported_p): New function.
10974 (resolve_overloaded_atomic_exchange)
10975 (resolve_overloaded_atomic_compare_exchange)
10976 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10977 Use it instead of comparing size with a local list of sizes.
10978
267bac10
JM
109792013-11-07 Andrew MacLeod <amacleod@redhat.com>
10980 Joseph Myers <joseph@codesourcery.com>
10981
10982 * c-common.h (enum rid): Add RID_ATOMIC.
10983 * c-common.c (c_common_reswords): Add _Atomic.
10984 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10985 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10986 * c-format.c (check_format_types): Check for extra _Atomic
10987 qualifiers in format argument.
10988 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10989 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10990
5157b91e
TB
109912013-11-06 Tobias Burnus <burnus@net-b.de>
10992
10993 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10994
6dbe0958
JM
109952013-11-06 Joseph Myers <joseph@codesourcery.com>
10996
10997 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10998 standards modes.
10999 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11000 to mean lack of IEEE 754 support.
11001
e8ff5196
TB
110022013-11-05 Tobias Burnus <burnus@net-b.de>
11003
11004 * c.opt (-Wdate-time): New option
11005 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11006
254a0760
JM
110072013-11-05 Joseph Myers <joseph@codesourcery.com>
11008
11009 * c-cppbuiltin.c (cpp_iec_559_value): Test
11010 flag_excess_precision_cmdline not flag_excess_precision.
11011
6d7f7e0a
TB
110122013-11-05 Tobias Burnus <burnus@net-b.de>
11013
11014 * c.opt (fopenmp-simd): New option.
11015 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11016 (omp_pragmas): ... this new struct.
11017 (c_pp_lookup_pragma): Also walk omp_pragmas.
11018 (init_pragma): Init pragmas for -fopenmp-simd.
11019
55a7f02f
MP
110202013-11-04 Marek Polacek <polacek@redhat.com>
11021
11022 PR c++/58979
11023 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11024
9193fb05
JM
110252013-11-04 Joseph Myers <joseph@codesourcery.com>
11026
11027 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11028 New functions.
11029 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11030
94159ecf
EB
110312013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11032
11033 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11034 (dump_ada_specs): Adjust prototype of second callback.
11035 * c-ada-spec.c (cpp_check): New global variable.
11036 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11037 (print_generic_ada_decl): Likewise.
11038 (has_static_fields): Change return type to bool and add guard.
11039 (has_nontrivial_methods): New predicate.
11040 (is_tagged_type): Change return type to bool.
11041 (separate_class_package): Call has_nontrivial_methods.
11042 (pp_ada_tree_identifier): Minor tweaks.
11043 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11044 (dump_ada_array_domains): Likewise.
11045 (dump_ada_array_type): Likewise.
11046 (dump_template_types): Remove cpp_check parameter and do not pass it to
11047 dump_generic_ada_node.
11048 (dump_ada_template): Likewise.
11049 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11050 recursively.
11051 (print_ada_methods): Change return type to integer. Remove cpp_check
11052 parameter and do not pass it down.
11053 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11054 dump_generic_ada_node.
11055 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11056 accessing methods.
11057 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11058 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11059 value of print_ada_methods.
11060 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11061 Set cpp_check to it before invoking dump_ada_nodes.
11062 (dump_ada_specs): Likewise.
11063
b906f4ca
MP
110642013-11-03 Marek Polacek <polacek@redhat.com>
11065
11066 * c-ubsan.c: Don't include hash-table.h.
11067 (ubsan_instrument_vla): New function.
11068 * c-ubsan.h: Declare it.
11069
5e20cdc9
DM
110702013-10-31 David Malcolm <dmalcolm@redhat.com>
11071
11072 Automated part of renaming of symtab_node_base to symtab_node.
11073
11074 Patch autogenerated by rename_symtab.py from
11075 https://github.com/davidmalcolm/gcc-refactoring-scripts
11076 revision 58bb219cc090b2f4516a9297d868c245495ee622
11077
11078 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11079 symtab_node_base to symtab_node.
11080
7057e645
ESR
110812013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11082
8e745a17 11083 Implement C++14 digit separators.
7057e645
ESR
11084 * c-lex.c (interpret_float): Remove digit separators from scratch string
11085 before building real literal.
11086
193ea7bc
JJ
110872013-10-30 Jakub Jelinek <jakub@redhat.com>
11088
11089 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11090
939b37da
BI
110912013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11092
11093 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11094 fields.
11095 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11096 enabled.
11097 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11098 (insert_cilk_frame): New prototype.
11099 (cilk_init_builtins): Likewise.
11100 (gimplify_cilk_spawn): Likewise.
11101 (c_cilk_install_body_w_frame_cleanup): Likewise.
11102 (cilk_detect_spawn_and_unwrap): Likewise.
11103 (cilk_set_spawn_marker): Likewise.
11104 (build_cilk_sync): Likewise.
11105 (build_cilk_spawn): Likewise.
11106 * cilk.c: New file.
11107
67348ccc
DM
111082013-10-29 David Malcolm <dmalcolm@redhat.com>
11109
11110 Patch autogenerated by refactor_symtab.py from
11111 https://github.com/davidmalcolm/gcc-refactoring-scripts
11112 revision 58bb219cc090b2f4516a9297d868c245495ee622
11113
11114 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11115 to a true class hierarchy.
11116 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11117
d570872d
RS
111182013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11119
11120 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11121
98906124
JL
111222013-10-26 Jeff Law <law@redhat.com>
11123
adfac8df
JJ
11124 * c-common.c (c_define_builtins): Remove mudflap support.
11125 * c.opt: Ignore and warn for mudflap options.
98906124 11126
d73749df 111272013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
11128
11129 PR other/33426
11130 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11131 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11132
3f04b1bb
JM
111332013-10-23 Jason Merrill <jason@redhat.com>
11134
11135 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11136
acf0174b
JJ
111372013-10-11 Jakub Jelinek <jakub@redhat.com>
11138
acd15a28
JJ
11139 * c-common.h (omp_clause_mask::operator !=): New method.
11140 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11141 instead of if (mask & something) tests everywhere.
11142
acf0174b
JJ
11143 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11144 201307 instead of 201107.
11145 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11146 (c_common_attribute_table): Add "omp declare target" and
11147 "omp declare simd" attributes.
11148 (handle_omp_declare_target_attribute,
11149 handle_omp_declare_simd_attribute): New functions.
11150 * c-omp.c: Include c-pragma.h.
11151 (c_finish_omp_taskgroup): New function.
11152 (c_finish_omp_atomic): Add swapped argument, if true,
11153 build the operation first with rhs, lhs arguments and use NOP_EXPR
11154 build_modify_expr.
11155 (c_finish_omp_for): Add code argument, pass it down to make_code.
11156 (c_omp_split_clauses): New function.
11157 (c_split_parallel_clauses): Removed.
11158 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11159 c_omp_declare_simd_clauses_to_decls): New functions.
11160 * c-common.h (omp_clause_mask): New type.
11161 (OMP_CLAUSE_MASK_1): Define.
11162 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11163 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11164 omp_clause_mask::operator |, omp_clause_mask::operator &,
11165 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11166 omp_clause_mask::operator ==): New methods.
11167 (enum c_omp_clause_split): New.
11168 (c_finish_omp_taskgroup): New prototype.
11169 (c_finish_omp_atomic): Add swapped argument.
11170 (c_finish_omp_for): Add code argument.
11171 (c_omp_split_clauses): New prototype.
11172 (c_split_parallel_clauses): Removed.
11173 (c_omp_declare_simd_clauses_to_numbers,
11174 c_omp_declare_simd_clauses_to_decls): New prototypes.
11175 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11176 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11177 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11178 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11179 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11180 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11181 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11182 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11183 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11184 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11185 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11186 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11187 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11188 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11189 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11190 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11191 PRAGMA_OMP_CLAUSE_UNIFORM.
11192
826cacfe
MG
111932013-10-09 Marc Glisse <marc.glisse@inria.fr>
11194
11195 PR tree-optimization/20318
11196 * c-common.c (handle_returns_nonnull_attribute): New function.
11197 (c_common_attribute_table): Add returns_nonnull.
11198
2284b034
MG
111992013-10-03 Marc Glisse <marc.glisse@inria.fr>
11200
11201 PR c++/19476
11202 * c.opt (fcheck-new): Move to common.opt.
11203
b56e9788
MP
112042013-09-25 Marek Polacek <polacek@redhat.com>
11205 Jakub Jelinek <jakub@redhat.com>
11206
11207 PR sanitizer/58413
11208 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11209 an expression if we can prove it is correct.
11210 (ubsan_instrument_division): Likewise. Remove unnecessary
11211 check.
11212
ce6923c5
MP
112132013-09-18 Marek Polacek <polacek@redhat.com>
11214
11215 PR sanitizer/58411
11216 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11217 Declare it.
11218 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11219
fb5610fb
IS
112202013-09-14 Iain Sandoe <iain@codesourcery.com>
11221
11222 PR target/48094
11223 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11224 fobjc-gc, freplace-objc-classes): Accept for LTO.
11225
88b0e79e
JC
112262013-09-13 Jacek Caban <jacek@codeweavers.com>
11227
11228 * c-target.def: New hook
11229
c9b0866a
PC
112302013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11231
11232 PR c++/43452
11233 * c.opt (Wdelete-incomplete): Add.
11234
0af94e6f
JR
112352013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11236
11237 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11238 (vector_types_compatible_elements_p): New function.
11239 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11240 declaration.
11241 (vector_types_compatible_elements_p): Declare.
11242
7c26172c
GDR
112432013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11244
11245 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11246 a virtual member function.
11247 (pp_simple_type_specifier): Remove.
11248 (pp_c_type_specifier): Likewise.
11249 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11250 Rename from pp_c_type_specifier. Adjust.
11251 (c_pretty_printer::c_pretty_printer): Do not assign to
11252 simple_type_specifier.
11253
20059c8b
GDR
112542013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11255
11256 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11257 member function.
11258 (c_pretty_printer::storage_class_specifier): Likewise.
11259 (c_pretty_printer::initializer): Likewise.
11260 (pp_declaration): Remove.
11261 (pp_declaration_specifiers): Likewise.
11262 (pp_abstract_declarator): Likewise.
11263 (pp_declarator): Likewise.
11264 (pp_type_id): Likewise.
11265 (pp_statement): Likewise.
11266 (pp_constant): Likewise.
11267 (pp_id_expression): Likewise.
11268 (pp_primary_expression): Likewise.
11269 (pp_unary_expression): Likewise.
11270 (pp_multiplicative_expression): Likewise.
11271 (pp_conditional_expression): Likewise.
11272 (pp_assignment_expression): Likewise.
11273 (pp_expression): Likewise.
11274 (pp_c_type_id): Likewise.
11275 (pp_c_storage_class_specifier): Likewise.
11276 * c-pretty-print.c (pp_c_type_cast): Tidy.
11277 (pp_c_pointer): Likewise.
11278 (pp_c_type_specifier): Likewise.
11279 (pp_c_parameter_type_list): Likewise.
11280 (pp_c_function_definition): Likewise.
11281 (pp_c_init_declarator): Likewise.
11282 (pp_c_initializer_list): Likewise.
11283 (pp_c_constructor_elts): Likewise.
11284 (c_pretty_printer::direct_abstract_declarator): Likewise.
11285 (c_pretty_printer::declaration_specifiers): Likewise.
11286 (c_pretty_printer::primary_expression): Likewise.
11287 (c_pretty_printer::postfix_expression): Likewise.
11288 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11289 (c_pretty_printer::storage_class_specifier): Rename from
11290 pp_c_storage_class_specifier.
11291 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11292 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11293 storage_class_specifier, initializer, offset_list, flags.
11294
de5a5fa1
MP
112952013-08-30 Marek Polacek <polacek@redhat.com>
11296
11297 * c-ubsan.c: New file.
11298 * c-ubsan.h: New file.
11299
8f0e4d72
GDR
113002013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11301
11302 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11303 member function.
11304 (c_pretty_printer::declaration_specifiers): Likewise.
11305 (c_pretty_printer::declarator): Likewise.
11306 (c_pretty_printer::abstract_declarator): Likewise.
11307 (c_pretty_printer::direct_abstract_declarator): Likewise.
11308 (c_pretty_printer::direct_declarator): Likewise.
11309 (c_pretty_printer::function_specifier): Likewise.
11310 (pp_declaration): Adjust.
11311 (pp_declaration_specifiers): Likewise.
11312 (pp_abstract_declarator): Likewise.
11313 (pp_direct_declarator): Likewise.
11314 (pp_function_specifier): Likewise.
11315 (pp_direct_abstract_declarator): Remove as unused.
11316 (pp_c_declaration): Remove.
11317 (pp_c_declaration_specifiers): Likewise.
11318 (pp_c_declarator): Likewise.
11319 (pp_c_direct_declarator): Likewise.
11320 (pp_c_function_specifier): Likewise.
11321 (pp_c_direct_abstract_declarator): Likewise.
11322 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11323 from pp_c_abstract_declarator. Adjust.
ab20d992 11324 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11325 pp_c_direct_abstract_declarator. Adjust.
11326 (c_pretty_printer::function_specifier): Rename from
11327 pp_c_function_specifier. Adjust.
11328 (c_pretty_printer::declaration_specifiers): Rename from
11329 pp_c_declaration_specifiers. Adjust.
11330 (c_pretty_printer::direct_declarator): Rename from
11331 pp_c_direct_declarator. Adjust.
11332 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11333 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11334 (c_pretty_printer::c_pretty_printer): Do not assign to
11335 declaration, declaration_specifiers, declarator,
11336 direct_declarator, direct_abstract_declarator, function_specifier.
11337
00d34d3a
GDR
113382013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11339
11340 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11341 virtual member function.
11342 (c_pretty_printer::multiplicative_expression): Likewise.
11343 (c_pretty_printer::conditional_expression): Likewise.
11344 (c_pretty_printer::assignment_expression): Likewise.
11345 (c_pretty_printer::expression): Likewise.
11346 (pp_unary_expression): Adjust.
11347 (pp_multiplicative_expression): Likewise.
11348 (pp_assignment_expression): Likewise.
11349 (pp_conditional_expression): Likewise.
11350 (pp_expression): Likewise.
11351 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11352 from pp_c_unary_expression. Adjust.
11353 (c_pretty_printer::multiplicative_expression): Rename from
11354 pp_c_multiplicative_expression. Adjust.
11355 (c_pretty_printer::conditional_expression): Rename from
11356 pp_c_conditional_expression. Adjust.
11357 (c_pretty_printer::assignment_expression): Rename from
11358 pp_c_assignment_expression. Adjust.
11359 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11360 (c_pretty_printer::c_pretty_printer): Do not assign to
11361 unary_expression, multiplicative_expression,
11362 conditional_expression, expression.
11363
fb22178f
GDR
113642013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11365
11366 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11367 virtual member function.
11368 (pp_postfix_expression): Adjust.
11369 (pp_c_postfix_expression): Remove.
11370 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11371 from pp_c_postfix_expression. Adjust.
11372 (c_pretty_printer::c_pretty_printer): Do not assign to
11373 postfix_expression.
11374
7ecc2600
GDR
113752013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11376
11377 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11378 virtua member function.
11379 (pp_primary_expression): Adjust.
11380 (pp_c_primary_expression): Remove.
11381 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11382 from pp_c_primary_expression. Adjust.
11383 (pp_c_initializer_list): Use pp_primary_expression.
11384 (c_pretty_printer::c_pretty_printer): Do not assign to
11385 primary_expression.
11386
0691175f
GDR
113872013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11388
11389 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11390 * c-pretty-print.c (M_): Remove.
11391 (c_pretty_printer::translate_string): Define.
11392 (pp_c_type_specifier): Use it.
11393 (pp_c_primary_expression): Likewise.
11394 (pp_c_expression): Likewise.
11395
66dfe4c4
GDR
113962013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11397
11398 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11399 virtual function.
11400 (pp_c_id_expression): Remove.
11401 (pp_id_expression): Adjust.
11402 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11403 pp_c_id_expression. Adjust.
11404 (pp_c_postfix_expression): Use pp_id_expression.
11405 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11406
ca43e9d5
GDR
114072013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11408
11409 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11410 member function.
11411 (pp_constant): Adjust.
11412 (pp_c_constant): Remove.
11413 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11414 pp_c_constant. Adjust.
11415 (pp_c_constant)
11416 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11417 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11418
da6ca2b5
GDR
114192013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11420
11421 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11422 (c_pretty_printer::c_pretty_printer): Declare.
11423 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11424 c_pretty_printer_init. Adjust.
11425 (print_c_tree): Do not call c_pretty_printer_init.
11426 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11427
65a372f4
AC
114282013-08-09 Arnaud Charlet <charlet@adacore.com>
11429
11430 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11431
fd9b0f32
PC
114322013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11433
11434 PR c++/58080
11435 * c-common.c (pointer_int_sum): Add bool parameter.
11436 * c-common.h (pointer_int_sum): Adjust declaration.
11437
e0aec1e9
GDR
114382013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11439
11440 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11441 c_pretty_printer variable.
11442
b066401f
GDR
114432013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11444
11445 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11446 (pp_base): Remove.
11447 (pp_c_base): Likewise. Adjust users.
11448 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11449 (pp_c_whitespace): Do not call pp_base.
11450 (pp_c_left_paren): Likewise.
11451 (pp_c_right_paren): Likewise.
11452 (pp_c_left_brace): Likewise.
11453 (pp_c_right_brace): Likewise.
11454 (pp_c_left_bracket): Likewise.
11455 (pp_c_right_bracket): Likewise.
11456 (pp_c_dot): Likewise.
11457 (pp_c_ampersand): Likewise.
11458 (pp_c_star): Likewise.
11459 (pp_c_arrow): Likewise.
11460 (pp_c_semicolon): Likewise.
11461 (pp_c_complement): Likewise.
11462 (pp_c_exclamation): Likewise.
11463 (pp_c_direct_declarator): Likewise.
11464 (pp_c_ws_string): Likewise.
11465 (pp_c_identifier): Likewise.
11466 (pp_c_statement): Likewise.
11467 (print_c_tree): Likewise.
11468
65e5a578
ESR
114692013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11470
11471 PR c++/58072
11472 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11473 provide useful error strings.
11474
137a1a27
GDR
114752013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11476
11477 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11478 printer functions instead of pp_string or operators and punctuators.
11479 (dump_generic_ada_node): Likewise.
11480 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11481 (pp_c_relational_expression): Likewise.
11482 (pp_c_logical_or_expression): Likewise.
11483
07838b13
GDR
114842013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11485
11486 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11487 functions instead of pp_character.
11488 (pp_ada_tree_identifier): Likewise.
11489 (dump_ada_double_name): Likewise.
11490 (dump_ada_function_declaration): Likewise.
11491 (dump_ada_array_domains): Likewise.
11492 (dump_template_types): Likewise.
11493 (dump_generic_ada_node): Likewise.
11494 (print_ada_declaration): Likewise.
11495 (print_ada_struct_decl): Likewise.
11496 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11497
433cc7b0
TT
114982013-07-23 Tom Tromey <tromey@redhat.com>
11499
11500 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11501 * c-common.c (c_common_reswords): Add _Generic.
11502
688010ba
OB
115032013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11504
11505 * c-common.c: Fix typos.
11506 * c-common.h: Likewise.
11507
2a99e5e6
LL
115082013-07-13 Lubos Lunak <l.lunak@suse.cz>
11509
11510 PR c++/55203
11511 * c-common.c (c_common_attribute_table): Add warn_unused.
11512 (handle_warn_unused_attribute): New.
11513
c26302d5
JJ
115142013-07-10 Jakub Jelinek <jakub@redhat.com>
11515
11516 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11517 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11518
dfeadaa0
PC
115192013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11520
11521 PR c++/57869
11522 * c.opt: Add Wconditionally-supported.
11523
6a2fa4b2
GS
115242013-07-08 Graham Stott <graham.stott@btinternet.com>
11525
adfac8df 11526 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11527 unused variables l_length and l_node.
11528
ecdbd01a 115292013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11530
11531 PR c/57821
11532 * c-common.c (complete_array_type): Delay folding first index
11533 like other indices. When folding, check for index overflow.
11534
bedc293e
MG
115352013-06-27 Marc Glisse <marc.glisse@inria.fr>
11536
11537 PR c++/57509
11538 * c-common.h (c_build_vec_perm_expr): New complain argument.
11539 * c-common.c (c_build_vec_perm_expr): Likewise.
11540 Use save_expr also in C++.
11541
604b2bfc
GDR
115422013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11543
11544 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11545 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11546 * c-opts.c (c_common_post_options): Likewise.
11547
dfeadaa0 115482013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11549
11550 * array-notation-common.c (length_mismatch_in_expr): Changed the
11551 parameter type's from a dynamic array to a vec_tree. Also removed
11552 the size parameters.
11553 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11554 the change above.
11555
2ce86d2e
BI
115562013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11557
11558 * c-common.h (struct cilkplus_an_parts): New structure.
11559 (struct cilkplus_an_loop_parts): Likewise.
11560 (cilkplus_extract_an_triplets): New prototype.
11561 (fix_sec_implicit_args): Likewise.
11562 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11563 (fix_sec_implicit_args): Likewise.
604b2bfc 11564
07a6825b
BI
115652013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11566
11567 * array-notation-common.c (find_inv_trees): Removed an unwanted
11568 typecasting.
11569 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11570 enum rid to enum tree_code.
11571
08346abd
JH
115722013-06-11 Jan Hubicka <jh@suse.cz>
11573
11574 * c-common.c (handle_alias_ifunc_attribute): Do not set
11575 DECL_EXTERNAL for weakref variables.
11576 * c-pragma.c (handle_pragma_weak): Make sure aliases
11577 are not declared as external.
11578
d60f1706
BI
115792013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11580
11581 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11582 function from c/c-array-notation.c.
11583 (is_cilkplus_reduce_builtin): Likewise.
11584 (find_rank): Likewise.
11585 (extract_array_notation_exprs): Likewise.
11586 (replace_array_notations): Likewise.
11587 (find_inv_trees): Likewise.
11588 (replace_inv_trees): Likewise.
11589 (contains_array_notation_expr): Likewise.
11590 (find_correct_array_notation_type): Likewise.
11591 * c-common.h (struct inv_list): Moved this struct from the file
11592 c/c-array-notation.c and added a new field called additional tcodes.
11593 (length_mismatch_in_expr_p): New prototype.
11594 (is_cilkplus_reduce_builtin): Likewise.
11595 (find_rank): Likewise.
11596 (extract_array_notation_exprs): Likewise.
11597 (replace_array_notation): Likewise.
11598 (find_inv_trees): Likewise.
11599 (replace_inv_trees): Likewise.
11600 (find_correct_array_notation_type): Likewise.
dfeadaa0 11601
36536d79
BI
116022013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11603
11604 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11605 function array_notation_init_builtins is called.
11606 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11607 * c-common.def (ARRAY_NOTATION_REF): New tree.
11608 * c-common.h (build_array_notation_expr): New function declaration.
11609 (build_array_notation_ref): Likewise.
11610 (extract_sec_implicit_index_arg): New extern declaration.
11611 (is_sec_implicit_index_fn): Likewise.
11612 (ARRAY_NOTATION_CHECK): New define.
11613 (ARRAY_NOTATION_ARRAY): Likewise.
11614 (ARRAY_NOTATION_START): Likewise.
11615 (ARRAY_NOTATION_LENGTH): Likewise.
11616 (ARRAY_NOTATION_STRIDE): Likewise.
11617 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11618 ARRAY_NOTATION_REF.
11619 (pp_c_expression): Likewise.
11620 * c.opt (flag_enable_cilkplus): New flag.
11621 * array-notation-common.c: New file.
11622
f7716d57
JJ
116232013-05-14 Jakub Jelinek <jakub@redhat.com>
11624
11625 PR c++/57274
11626 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11627
a5e0cd1d
MG
116282013-05-10 Marc Glisse <marc.glisse@inria.fr>
11629
11630 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11631 vectors.
11632
f6bc1c4a
HS
116332013-05-07 Han Shen <shenhan@google.com>
11634
11635 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11636
3f12f6e9
SKS
116372013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11638
11639 * c-common.c (check_user_alignment): Emit error for negative values.
11640
61949153
PC
116412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11642
11643 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11644
e93e18e9
PC
116452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11646
11647 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11648 __GXX_EXPERIMENTAL_CXX1Y__.
11649
44d90fe1 116502013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11651 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11652
11653 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11654 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11655 to simply use OPT_Wpointer_arith.
11656 (c_sizeof_or_alignof_type): Likewise.
11657
13f39b2e
PC
116582013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11659
11660 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11661
4b84d650
JJ
116622013-04-12 Jakub Jelinek <jakub@redhat.com>
11663
11664 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11665 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11666 specifiers.
11667
fb037b5d
SB
116682013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11669
11670 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11671
4e856798
PC
116722013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11673
11674 * c-common.c (pointer_int_sum): Remove dead code.
11675
4b1baac8
RS
116762013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11677
11678 PR middle-end/56524
11679 * c-common.c (handle_optimize_attribute): Don't call
11680 save_optabs_if_changed.
11681
0b50e654
JJ
116822013-03-05 Jakub Jelinek <jakub@redhat.com>
11683
11684 PR middle-end/56461
11685 * c-pch.c (pch_init): Free target_validity at the end.
11686
48c41403
JJ
116872013-03-04 Jakub Jelinek <jakub@redhat.com>
11688
11689 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11690
e664c61c
KS
116912013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11692 Jakub Jelinek <jakub@redhat.com>
11693
11694 PR sanitizer/56454
11695 * c-common.c (handle_no_sanitize_address_attribute): New function.
11696 (c_common_attribute_table): Add no_sanitize_address attribute.
11697 (handle_no_address_safety_analysis_attribute): Add
11698 no_sanitize_address attribute, not no_address_safety_analysis
11699 attribute.
11700
a475fd3d 117012013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11702
11703 PR target/52555
11704 * c-common.c (handle_optimize_attribute): Call
11705 save_optabs_if_changed.
11706
f6007d99
JJ
117072013-02-18 Jakub Jelinek <jakub@redhat.com>
11708 Steven Bosscher <steven@gcc.gnu.org>
11709
11710 PR pch/54117
11711 * c-opts.c (c_common_post_options): If debug info is enabled
11712 and non-dwarf*, refuse to load PCH files and when writing PCH
11713 file warn.
11714
cf35e2b1
JJ
117152013-02-05 Jakub Jelinek <jakub@redhat.com>
11716
11717 PR middle-end/56167
11718 * c-common.c (handle_error_attribute): Fix condition.
11719
32887460
JJ
117202013-01-30 Jakub Jelinek <jakub@redhat.com>
11721
11722 PR c++/55742
11723 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11724
5af057d8
JM
117252013-01-18 Jason Merrill <jason@redhat.com>
11726
11727 PR target/54908
11728 * c.opt (-fextern-tls-init): New.
11729 * c-opts.c (c_common_post_options): Handle it.
11730
cc83c823
JJ
117312013-01-09 Jakub Jelinek <jakub@redhat.com>
11732
11733 PR c/48418
11734 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11735 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11736 and is either negative or bigger or equal to type precision
11737 of the first operand.
11738
a859517f
MP
117392012-12-03 Marek Polacek <polacek@redhat.com>
11740
11741 PR c/55570
11742 * c-common.c (check_user_alignment): Swap order of tests,
11743 check TREE_CODE first.
11744
2d7aa578
ESR
117452012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11746
11747 PR c++/52654
11748 * c-common.h (overflow_type): New enum.
11749 (build_userdef_literal): Add overflow_type argument.
11750 (tree_userdef_literal): Add overflow_type.
11751 (USERDEF_LITERAL_OVERFLOW): New access macro.
11752 * c-common.c (build_userdef_literal): Add overflow_type
11753 argument.
11754 * c-lex.c (c_lex_with_flags): Add overflow_type to
11755 build_userdef_literal calls.
11756 (interpret_integer, interpret_float): Add overflow_type argument.
11757
cc3c4f62
RB
117582012-11-28 Richard Biener <rguenther@suse.de>
11759
11760 PR c/35634
11761 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11762 here and use a type with proper overflow behavior for types that would
11763 need to be promoted for the arithmetic.
11764
77bc5132
JJ
117652012-11-23 Jakub Jelinek <jakub@redhat.com>
11766
11767 PR sanitizer/55435
11768 * c-common.c (handle_no_address_safety_analysis_attribute): New
11769 function.
11770 (c_common_attribute_table): Add no_address_safety_analysis.
11771
5dc99c46
SB
117722012-11-16 Simon Baldwin <simonb@google.com>
11773
11774 * c.opt: Add f[no-]canonical-system-headers.
11775 * c-opts.c (c_common_handle_option): Handle
11776 OPT_fcanonical_system_headers.
11777
a4a0016d
ESR
117782012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11779
11780 PR c++/54413
11781 * c-opts.c (c_common_handle_option): Set new flags.
11782 * c.opt: Describe new flags.
11783
7dbb85a7
JM
117842012-11-09 Jason Merrill <jason@redhat.com>
11785
11786 * c.opt (Wabi-tag): New.
11787
ad7bac31
AK
117882012-11-09 Andi Kleen <ak@linux.intel.com>
11789
11790 PR 55139
11791 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11792 MEMMODEL_MASK
ad7bac31 11793
7332899a
MLI
117942012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11795
11796 PR c/53063
11797 * c.opt (Wformat): Make it Alias Wformat=1.
11798 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11799 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11800 LangEnabledBy.
11801 (Wformat=): RejectNegative. Use LangEnabledBy.
11802 (Wnonnull): Use LangEnabledBy.
11803 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11804 * c-format.c (set_Wformat): Delete.
11805 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11806 (maybe_read_dollar_number): Likewise.
11807 (avoid_dollar_number): Likewise.
11808 (finish_dollar_format_checking): Likewise.
11809 (check_format_info): Likewise.
11810 (check_format_info_main): Likewise.
11811 (check_format_types): Likewise.
11812 (format_type_warning): Likewise.
11813 * c-common.c (int): Likewise.
11814 (check_function_sentinel): Likewise.
8e745a17 11815 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11816
34a180a6
MLI
118172012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11818
11819 PR c/53063
11820 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11821 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11822 Use LangEnabledBy.
11823 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11824 common.opt.
11825 (Wvariadic-macros): Init(1).
11826 * c-opts.c (c_common_handle_option): Do not handle them
11827 explicitly.
11828 (c_common_post_options): Likewise.
11829 (sanitize_cpp_opts): warn_unused_macros is now
11830 cpp_warn_unused_macros.
11831 (push_command_line_include): Likewise.
11832 * c-common.c (warn_unknown_pragmas): Do not define.
11833 * c-common.h (warn_unknown_pragmas): Do not declare.
11834
3f46d6a5
MLI
118352012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11836
11837 PR c/51294
11838 * c-common.c (conversion_warning): Handle conditional expressions.
11839
880661a4
JW
118402012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11841
11842 PR c++/54930
11843 * c.opt (Wreturn_local_addr): Define new option.
11844
4514a96b
JM
118452012-10-25 Jason Merrill <jason@redhat.com>
11846
f14edc1a
JM
11847 * c.opt (Wvirtual-move-assign): New.
11848
4514a96b
JM
11849 * c.opt (Winherited-variadic-ctor): New.
11850
93100c6b
MG
118512012-10-25 Marc Glisse <marc.glisse@inria.fr>
11852
11853 PR c++/54427
11854 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11855
1efcb8c6
JM
118562012-10-23 Joseph Myers <joseph@codesourcery.com>
11857
11858 * c-common.h (pch_cpp_save_state): Declare.
11859 * c-target.def (c_preinclude): New hook.
11860 * c-opts.c (done_preinclude): New.
11861 (push_command_line_include): Handle default preincluded header.
11862 (cb_file_change): Call pch_cpp_save_state when calling
11863 push_command_line_include.
11864 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11865 (pch_cpp_save_state): New.
11866 (pch_init): Call pch_cpp_save_state conditionally, instead of
11867 calling cpp_save_state.
11868
4a0ae68e
MLI
118692012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11870
11871 PR c/53063
11872 PR c/40989
11873 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11874 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11875 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11876 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11877 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11878 * c-opts.c (c_common_handle_option): Remove explicit handling from
11879 here.
11880 (c_common_post_options): Likewise.
11881
67e4210b
EB
118822012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11883
11884 * c-ada-spec.c (LOCATION_COL): Delete.
11885 (compare_location): New function.
11886 (compare_node): Use it.
11887 (compare_comment): Likewise.
11888
65d4f2cd
MLI
118892012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11890
11891 PR c/53063
11892 PR c/40989
11893 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11894 * c-opts.c (c_common_handle_option): Do not set them here. Add
11895 comment.
11896 (c_common_post_options): Likewise.
11897
909881cb
EB
118982012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11899
11900 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11901 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11902 Remove POINTER_TYPE handling, add large unsigned handling and use
11903 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11904
3a785c97
JJ
119052012-10-12 Jakub Jelinek <jakub@redhat.com>
11906
11907 PR c/54381
11908 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11909 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11910 locs and array of 3 trees instead of just single loc and single
11911 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11912 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11913 For *cmp* builtins that take two sources strings report warnings
11914 about first and second source, not about destination and source.
11915
5e54f81d
MG
119162012-10-12 Marc Glisse <marc.glisse@inria.fr>
11917
11918 PR c++/53055
11919 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11920
f5b02f1e
EB
119212012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11922
11923 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11924 declaring something coming from another file.
11925
b46dbc6c
AC
119262012-10-10 Arnaud Charlet <charlet@adacore.com>
11927
f5b02f1e 11928 PR ada/54845
b46dbc6c
AC
11929 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11930
5d9de0d0
PC
119312012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11932
11933 PR c++/54194
11934 * c-common.c (warn_about_parentheses): Add location_t parameter;
11935 use EXPR_LOC_OR_LOC.
11936 * c-common.h: Update declaration.
11937
a212e43f
MG
119382012-10-09 Marc Glisse <marc.glisse@inria.fr>
11939
11940 PR c++/54427
11941 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11942 more operations. Make error messages optional.
11943 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11944 (scalar_to_vector): Declare.
11945
b1db7f91
JM
119462012-10-08 Jason Merrill <jason@redhat.com>
11947
11948 * c-common.c (c_common_reswords): Add thread_local.
11949
e28d52cf
DS
119502012-10-08 Dodji Seketeli <dodji@redhat.com>
11951
11952 PR c++/53528 C++11 attribute support
11953 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11954 new functions.
11955 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11956 static function.
11957 (handle_aligned_attribute): In choose strictest alignment
11958 among many. Use new check_cxx_fundamental_alignment_constraints.
11959 (handle_transparent_union_attribute): In c++11 attribute syntax,
11960 don't look through typedefs.
11961
3b78de56
AC
119622012-10-04 Arnaud Charlet <charlet@adacore.com>
11963
11964 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11965 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11966 out of dumpfile.h.
11967
6040bb5f
DC
119682012-09-25 Dehao Chen <dehao@google.com>
11969
11970 PR middle-end/54645
3b78de56 11971 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11972 map when read in the pch.
11973
3f8257db 119742012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11975
11976 * c-ada-spec.c: Style fixes.
11977
3f8257db 119782012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11979
11980 * c.opt (-fada-spec-parent): Define new command line switch.
11981 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11982 is specified, generate binding spec as a child of the specified unit.
11983
0ccb505d
PC
119842012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11985 Manuel López-Ibáñez <manu@gcc.gnu.org>
11986
11987 PR c++/53210
11988 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11989
c583af79
AC
119902012-08-23 Arnaud Charlet <charlet@adacore.com>
11991
11992 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11993 for pointers, and add missing Convention C pragma.
11994 (print_ada_struct_decl): Add missing aliased keyword.
11995 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11996
1a4049e7
JJ
119972012-08-17 Jakub Jelinek <jakub@redhat.com>
11998
11999 * c-common.c (sizeof_pointer_memaccess_warning): New function.
12000 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12001 * c-opts.c (c_common_handle_option): Enable it for -Wall.
12002 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12003 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12004
70b5e7dc
RG
120052012-08-10 Richard Guenther <rguenther@suse.de>
12006
12007 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12008
f8923f7e
SB
120092012-08-07 Steven Bosscher <steven@gcc.gnu.org>
12010
12011 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12012 instead of separate pp_newline and pp_flush.
12013 (print_c_tree): Likewise.
12014
e45abe1f
RH
120152012-07-26 Richard Henderson <rth@redhat.com>
12016
12017 * c-common.c (handle_hot_attribute): Allow labels.
12018 (handle_cold_attribute): Likewise.
12019
332f1d24
JJ
120202012-07-20 Jakub Jelinek <jakub@redhat.com>
12021
12022 PR c++/28656
12023 * c-common.c (check_function_nonnull): Handle multiple nonnull
12024 attributes properly.
12025
7ee2468b
SB
120262012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12027
12028 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12029 * c-ada-spec.c: Likewise.
12030 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12031
ee7b28eb
SB
120322012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12033
12034 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12035 Remove code conditional on it.
12036
6bdf3519
SB
120372012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12038
12039 * c-gimplify.c: Do not include basic-block.h.
12040 * c-common.c: Do not include linfuncs.h.
12041
532aafad
SB
120422012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12043
12044 * c-common.h: Include tree.h.
12045
8d0d1915
JM
120462012-07-02 Jason Merrill <jason@redhat.com>
12047
12048 PR c++/53524
12049 * c-common.c (get_priority): Call default_conversion.
12050
fbc873ad
UB
120512012-07-01 Uros Bizjak <ubizjak@gmail.com>
12052
12053 * c-pch.c (c_common_write_pch): Remove unused variables.
12054
d4a10d0a
SB
120552012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12056
12057 * cppspec.c: Moved from gcc/ to here.
12058
6f3a2e23
KT
120592012-06-27 Kai Tietz <ktietz@redhat.com>
12060
12061 PR preprocessor/37215
12062 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12063
8ca92d04
SB
120642012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12065
12066 * c-common.h (c_common_print_pch_checksum): Remove.
12067 * c-pch.c: Do not include output.h.
12068 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12069 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12070 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12071 (struct c_pch_header): Remove.
12072 (get_ident): Update gpch version.
12073 (pch_init): Do not print executable_checksum to asm_out_file.
12074 Do not fail if there is no asm_out_file to read back from. Set
12075 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12076 (c_common_write_pch): Verify that nothing was written to asm_out_file
12077 since pch_init was called. Do not write a c_pch_header, and do not
12078 copy from asm_out_file to the PCH.
12079 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12080 the content of asm_out_file from the PCH.
12081 (c_common_print_pch_checksum): Remove.
12082 * c-opts.c (c_common_init): Print out executable_checksum directly.
12083
70f42967
SB
120842012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12085
12086 * c-target.def (objc_declare_unresolved_class_reference,
12087 objc_declare_class_definition): Add new hooks.
12088
a8781821
SB
120892012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12090
12091 * c-lex.c: Do not include output.h.
12092 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12093 Remove uses of ASM_OUTPUT_IDENT.
12094
9e1a8dd1
RR
120952012-06-15 Marc Glisse <marc.glisse@inria.fr>
12096
12097 PR c++/51033
12098 * c-common.h (c_build_vec_perm_expr): Move decl here.
12099 * c-common.c (c_build_vec_perm_expr): Move definition
12100 here.
12101
6f07a821
SB
121022012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12103
12104 * c.opt (fconserve-space): Turn into a no-op.
12105
9faeb493 121062012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
12107
12108 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12109 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12110 both the start and end of the function.
12111
a4b7d13c
SB
121122012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12113
12114 * c-common.c: Do not include output.h.
12115 * c-pragma.c: Likewise.
12116
c265f413
SA
121172012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12118
12119 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12120 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12121 (lang_decl_name): Handle namespace decls.
12122
be7a421e
SB
121232012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12124
12125 * c-ada-spec.c: Do not include output.h.
12126 * c-semantics.c: Likewise.
12127
65de6659
JM
121282012-05-29 Joseph Myers <joseph@codesourcery.com>
12129
12130 * c-common.c: Fix typo.
12131
ca5f4331
MM
121322012-05-29 Michael Matz <matz@suse.de>
12133
12134 * c-common.h (c_expand_decl): Remove prototype.
12135
4f7f7aca
MLI
121362012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12137
12138 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12139 * c-opts.c (c_common_handle_option): Remove code handling
12140 warn_missing_braces.
12141
4a792f9b
PC
121422012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12143
12144 PR c++/25137
12145 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12146 -Wmissing_braces.
12147
650dc14a
DS
121482012-05-22 Dodji Seketeli <dodji@redhat.com>
12149
12150 PR c++/53322
12151 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12152
9b095bf1
MLI
121532012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12154
12155 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12156 * c-opts.c (c_common_handle_option): Do not handle explicitly
12157 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12158
0b2c4be5
DS
121592012-05-16 Dodji Seketeli <dodji@redhat.com>
12160
12161 PR preprocessor/7263
ab20d992 12162 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
12163 to cpp_classify_number. For diagnostics, use the precise location
12164 instead of the global input_location.
12165
a1bde5af
PC
121662012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12167
d02924ef 12168 PR c++/11856
a1bde5af
PC
12169 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12170
d1ede5f4
BS
121712012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12172
a1bde5af 12173 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 12174
f2bc201f
MLI
121752012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12176
12177 PR 53063
12178 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12179 Wreorder): Use LangEnabledBy.
12180 * c-opts.c (c_common_handle_option): Do not enable them
12181 explicitly. Call lang-specific generated functions.
12182 (c_common_post_options): Do not set them here.
12183
95744782
MLI
121842012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12185
12186 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12187 Wmissing-field-initializers,Wmissing-parameter-type,
12188 Wold-style-declaration,Woverride-init): Use EnabledBy.
12189 * c-opts.c (c_common_post_options): Do not set here explicitly.
12190
7d5a5747
MLI
121912012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12192
12193 PR 53063
12194 * c-opts.c (c_common_handle_option): Use handle_generated_option
12195 to enable sub-options.
12196
5a3c9cf2
PC
121972012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12198
12199 PR c++/53158
12200 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12201
3ac8781c
RG
122022012-05-10 Richard Guenther <rguenther@suse.de>
12203
12204 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12205 adjust commentary about TYPE_IS_SIZETYPE types.
12206
1e537948
MLI
122072012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12208
12209 PR c++/53261
12210 * c-common.c (warn_logical_operator): Check that argument of
12211 integer_zerop is not NULL.
12212
f2c4a785
MLI
122132012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12214
12215 PR c/43772
12216 * c-common.c (warn_logical_operator): Do not warn if either side
12217 is already true or false.
12218
50f305ca
MLI
122192012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12220
12221 PR c/51712
12222 * c-common.c (expr_original_type): New.
12223 (shorten_compare): Do not warn for enumeration types.
12224
0c3641b0
MLI
122252012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12226
12227 * c.opt (fpermissive): Add Var(flag_permissive).
12228
7edaa4d2
MG
122292012-04-30 Marc Glisse <marc.glisse@inria.fr>
12230
12231 PR c++/51033
12232 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12233 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12234
b9c8da34
DS
122352012-04-30 Dodji Seketeli <dodji@redhat.com>
12236
12237 Add -Wvarargs option
ab20d992 12238 * c.opt (Wvarargs): Define new option.
b9c8da34 12239
e6c69da0
MLI
122402012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12241
12242 * c-common.c (check_function_arguments): Replace
12243 Wmissing-format-attribute with Wsuggest-attribute=format.
12244
90137d8f
MLI
122452012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12246
12247 * c.opt (Wsuggest-attribute=format): New. Alias of
12248 Wmissing-format-attribute.
12249 * c-format.c (decode_format_type): Replace
12250 Wmissing-format-attribute with Wsuggest-attribute=format.
12251 (check_function_format): Likewise.
12252
9faeb493 122532012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12254
12255 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12256 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12257 * c.opt: Add Wliteral-suffix.
12258
c1771a20
MLI
122592012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12260
12261 PR c/44774
12262 * c.opt (Wpedantic): New.
12263 (pedantic): Alias Wpedantic.
12264 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12265 (c_common_post_options): Likewise.
12266 (sanitize_cpp_opts): Likewise.
12267 * c-lex.c (interpret_float): Likewise.
12268 * c-format.c (check_format_types): Likewise.
12269 * c-common.c (pointer_int_sum): Likewise.
12270 (c_sizeof_or_alignof_type): Likewise.
12271 (c_add_case_label): Likewise.
12272 (c_do_switch_warnings): Likewise.
12273 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12274
04b391c1
JM
122752012-04-15 Jason Merrill <jason@redhat.com>
12276
12277 PR c++/52818
12278 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12279 (C_STD_NAME): Distinguish between C++98 and C++11.
12280
ac868f29
EB
122812012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12282
12283 PR target/52624
12284 * c-common.h (uint16_type_node): Rename into...
12285 (c_uint16_type_node): ...this.
12286 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12287 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12288
fd4116f4
MLI
122892012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12290
12291 * c-common.c (warn_if_unused_value): Move definition to here.
12292 * c-common.h (warn_if_unused_value): Move declaration to here.
12293
573ac65e
WB
122942012-03-23 William Bader <williambader@hotmail.com>
12295
12296 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12297
552b8185
JM
122982012-03-20 Jason Merrill <jason@redhat.com>
12299
12300 * c-common.h (enum cxx_dialect): Add cxx1y.
12301 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12302 test.
12303 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12304 * c-opts.c (c_common_post_options): Likewise.
12305 (set_std_cxx1y): New.
12306 (c_common_handle_option): Call it.
12307 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12308
04398fa8
PC
123092012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12310
12311 PR c++/14710
12312 * c.opt ([Wuseless-cast]): Add.
12313
d2a12ae7
RG
123142012-03-16 Richard Guenther <rguenther@suse.de>
12315
12316 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12317
a12bf402
MLI
123182012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12319
12320 PR c++/44783
12321 * c.opt (ftemplate-backtrace-limit) Add.
12322
5c30094f
RO
123232012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12324
12325 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12326 handling.
12327 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12328 (init_pragma): Don't register extern_prefix.
12329
21fa2faf
RG
123302012-03-12 Richard Guenther <rguenther@suse.de>
12331
12332 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12333 (builtin_type_for_size): Likewise.
12334
e3793c6f
JJ
123352012-02-13 Jakub Jelinek <jakub@redhat.com>
12336
12337 PR c++/52215
12338 * c-common.c (sync_resolve_params): Don't decide whether to convert
12339 or not based on TYPE_SIZE comparison, convert whenever arg_type
12340 is unsigned INTEGER_TYPE.
12341
93286335
PC
123422012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12343
12344 PR c/52118
12345 * c.opt ([Wunused-local-typedefs]): Fix description.
12346
7a421706
MS
123472012-01-24 Mike Stump <mikestump@comcast.net>
12348
12349 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12350 exactly.
12351
ba9b1f11
RG
123522012-01-18 Richard Guenther <rguenther@suse.de>
12353
12354 * c-opts.c (c_common_post_options): Reset LTO flags if
12355 we are about to generate a PCH.
12356
465406be
PC
123572012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12358
12359 PR c++/51777
12360 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12361 use pp_unsigned_wide_integer.
12362
aee15221
RG
123632012-01-10 Richard Guenther <rguenther@suse.de>
12364
12365 PR middle-end/51806
12366 * c-opts.c (c_common_handle_option): Move -Werror handling
12367 to language independent code.
12368
5720c0dc
RG
123692012-01-05 Richard Guenther <rguenther@suse.de>
12370
12371 PR middle-end/51764
12372 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12373 from common.opt.
12374
73ac190a
PC
123752011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12376
12377 PR c++/51316
12378 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12379 of array types with an unknown bound.
12380
48b0b196
JM
123812011-12-20 Joseph Myers <joseph@codesourcery.com>
12382
12383 * c-common.c (flag_isoc99): Update comment to refer to C11.
12384 (flag_isoc1x): Change to flag_isoc11.
12385 * c-common.h (flag_isoc99): Update comment to refer to C11.
12386 (flag_isoc1x): Change to flag_isoc11.
12387 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12388 C11.
12389 * c-opts.c (set_std_c1x): Change to set_std_c11.
12390 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12391 Call set_std_c11.
12392 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12393 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12394 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12395 standard.
12396 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12397 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12398 (std=gnu1x): Make alias of std=gnu11.
12399
d58d6eb5
JM
124002011-12-19 Jason Merrill <jason@redhat.com>
12401
12402 PR c++/51228
12403 * c-common.c (handle_transparent_union_attribute): Check the first
12404 field if the type is complete.
12405
b3908fcc
JW
124062011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12407
12408 PR libstdc++/51365
12409 * c-common.c (RID_IS_FINAL): Add.
12410 * c-common.h (RID_IS_FINAL): Add.
12411
fea3ca91
IS
124122011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12413
12414 * c.opt (fgnu-runtime): Provide full description.
12415 (fnext-runtime): Likewise.
12416 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12417
62bad7cd
AM
124182011-11-28 Andrew MacLeod <amacleod@redhat.com>
12419
12420 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12421 predefines in one place. Add LOCK_FREE predefines.
12422 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12423 new func.
12424
c466c4ff
AM
124252011-11-24 Andrew MacLeod <amacleod@redhat.com>
12426
12427 PR c/51256
9faeb493 12428 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12429 conditions
9faeb493
UB
12430 (resolve_overloaded_atomic_exchange,
12431 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12432 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12433 error_mark_node for error conditions.
9faeb493 12434
a5952633
RG
124352011-11-08 Richard Guenther <rguenther@suse.de>
12436
12437 PR middle-end/51010
ab20d992 12438 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12439
0a35513e
AH
124402011-11-07 Richard Henderson <rth@redhat.com>
12441 Aldy Hernandez <aldyh@redhat.com>
12442 Torvald Riegel <triegel@redhat.com>
12443
12444 Merged from transactional-memory.
12445
12446 * c-common.c (handle_tm_wrap_attribute,
12447 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12448 (struct c_common_reswords): Added __transaction* keywords.
12449 (struct c_common_attribute_table): Added transaction* and tm_regparm
12450 attributes.
12451 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12452 masks.
12453 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12454 find_tm_attribute): Declare.
12455
6d87092d
JM
124562011-11-07 Jason Merrill <jason@redhat.com>
12457
12458 PR c++/35688
12459 * c-common.c, c-common.h: Revert yesterday's changes.
12460
8e7860a1
JM
124612011-11-06 Jason Merrill <jason@redhat.com>
12462
12463 PR c++/35688
12464 * c-common.c (decl_has_visibility_attr): Split out from...
12465 (c_determine_visibility): ...here.
12466 * c-common.h: Declare it.
12467
d19fa6b5
JM
124682011-11-06 Joseph Myers <joseph@codesourcery.com>
12469
12470 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12471 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12472 type.
12473 (check_user_alignment): New. Split out of
12474 handle_aligned_attribute. Disallow integer constants with
12475 noninteger types. Conditionally allow zero.
12476 (handle_aligned_attribute): Use check_user_alignment.
12477 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12478
86951993
AM
124792011-11-06 Andrew MacLeod <amacleod@redhat.com>
12480 Richard Henderson <rth@redhat.com>
12481
12482 Merged from cxx-mem-model.
12483
12484 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12485 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12486 parameters that are the same type size.
12487 (get_atomic_generic_size): New. Find size of generic
12488 atomic function parameters and do typechecking.
12489 (add_atomic_size_parameter): New. Insert size into parameter list.
12490 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12491 either __atomic_exchange_n or external library call.
9faeb493 12492 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12493 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12494 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12495 __atomic_load_n or an external library call.
12496 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12497 __atomic_store_n or an external library call.
12498 (resolve_overloaded_builtin): Handle new __atomic builtins.
12499
cf9e9959
EB
125002011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12501
12502 PR c++/50608
12503 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12504 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12505 <INDIRECT_REF>: Return the argument.
12506 <ARRAY_REF>: Remove special code for negative offset.
12507 Call fold_build_pointer_plus instead of size_binop.
12508 (fold_offsetof): Remove STOP_REF argument and adjust.
12509 * c-common.h (fold_offsetof_1): Declare.
12510 (fold_offsetof): Remove STOP_REF argument.
12511
25339f10
JM
125122011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12513
12514 PR c++/50810
12515 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12516 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12517 Wnarrowing for C++0x and C++98.
12518 * c.opt ([Wnarrowing]): Update.
12519
89401152
PC
125202011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12521
12522 PR c++/44277
12523 * c.opt: Add Wzero-as-null-pointer-constant.
12524
97e3ad20
JM
125252011-10-31 Jason Merrill <jason@redhat.com>
12526
15694fdd
JM
12527 * c.opt (-fdeduce-init-list): Off by default.
12528
97e3ad20
JM
12529 PR c++/50920
12530 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12531 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12532 and -Wc++11-compat.
12533 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12534
fb9120e3
RAV
125352011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12536
12537 PR c++/30066
12538 * c.opt (fvisibility-inlines-hidden): Description change.
12539
3ce4f9e4
ESR
125402011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12541
12542 Implement C++11 user-defined literals.
12543 * c-common.c (build_userdef_literal): New.
12544 * c-common.def: New tree code.
12545 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12546 * c-lex.c (interpret_float): Add suffix parm.
12547 (c_lex_with_flags): Build literal tokens.
12548
5f53c243
PC
125492011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12550
12551 PR c++/50841
12552 Revert:
12553 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12554
12555 PR c++/50810
12556 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12557 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12558 Wnarrowing for C++0x and C++98.
12559 * c.opt ([Wnarrowing]): Update.
12560
263734e1
PC
125612011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12562
12563 PR c++/50810
12564 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12565 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12566 Wnarrowing for C++0x and C++98.
12567 * c.opt ([Wnarrowing]): Update.
12568
d2e312d7
PC
125692011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12570
12571 PR c++/45385
12572 * c-common.c (conversion_warning): Remove code looking for
12573 artificial operands.
12574
d17687f6
DS
125752011-10-18 Dodji Seketeli <dodji@redhat.com>
12576
12577 PR bootstrap/50760
12578 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12579 !NO_IMPLICIT_EXTERN_C.
d17687f6 12580
fc8396e9
PC
125812011-10-17 Michael Spertus <mike_spertus@symantec.com>
12582
12583 * c-common.c (c_common_reswords): Add __bases,
12584 __direct_bases.
12585 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12586
125872011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12588
12589 PR c++/50757
12590 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12591
847e697a
TT
125922011-10-15 Tom Tromey <tromey@redhat.com>
12593 Dodji Seketeli <dodji@redhat.com>
12594
12595 * c.opt (fdebug-cpp): New option.
12596 * c-opts.c (c_common_handle_option): Handle the option.
12597 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12598 output stream in parameter. Factorized from ...
12599 (maybe_print_line): ... this. Dump location debug information when
12600 -fdebug-cpp is in effect.
12601 (print_line_1): New static function. Takes an output stream in
12602 parameter. Factorized from ...
12603 (print_line): ... here. Dump location information when -fdebug-cpp
12604 is in effect.
12605 (scan_translation_unit): Dump location information when
12606 -fdebug-cpp is in effect.
12607
92582b75
TT
126082011-10-15 Tom Tromey <tromey@redhat.com>
12609 Dodji Seketeli <dodji@redhat.com>
12610
12611 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12612 without argument.
12613 * c-opts.c (c_common_handle_option)<case
12614 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12615 cases. Handle -ftrack-macro-expansion with and without argument.
12616
46427374
TT
126172011-10-15 Tom Tromey <tromey@redhat.com>
12618 Dodji Seketeli <dodji@redhat.com>
12619
12620 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12621 (print_line, cb_define, do_line_change): Adjust to avoid touching
12622 the internals of struct line_map. Use the public API instead.
12623 * c-pch.c (c_common_read_pch): Likewise.
12624 * c-lex.c (fe_file_change): Likewise.
12625
fc8396e9
PC
126262011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12627
12628 PR c++/17212
12629 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12630
126312011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12632
12633 PR c++/33067
12634 * c-pretty-print.c (pp_c_floating_constant): Output
12635 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12636
e79983f4
MM
126372011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12638
12639 * c-common.c (def_builtin_1): Delete old interface with two
12640 parallel arrays to hold standard builtin declarations, and replace
12641 it with a function based interface that can support creating
12642 builtins on the fly in the future. Change all uses, and poison
12643 the old names. Make sure 0 is not a legitimate builtin index.
12644 * c-omp.c (c_finish_omp_barrier): Ditto.
12645 (c_finish_omp_taskwait): Ditto.
12646 (c_finish_omp_flush): Ditto.
12647
6637388f
TG
126482011-10-11 Tristan Gingold <gingold@adacore.com>
12649
12650 * c.opt: (fallow-parameterless-variadic-functions): New.
12651
3797cb21
DS
126522011-09-08 Dodji Seketeli <dodji@redhat.com>
12653
12654 PR c++/33255 - Support -Wunused-local-typedefs warning
12655 * c-common.h (struct c_language_function::local_typedefs): New
12656 field.
9faeb493
UB
12657 (record_locally_defined_typedef, maybe_record_typedef_use)
12658 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12659 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12660 (maybe_record_typedef_use)
12661 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12662 * c.opt: Declare new -Wunused-local-typedefs flag.
12663
693ddb1b
EB
126642011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12665
12666 PR middle-end/50266
12667 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12668 computations.
12669
830c740f
RG
126702011-09-05 Richard Guenther <rguenther@suse.de>
12671
12672 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12673 of integer_minus_one_node for empty array upper bounds.
12674
892a371f
DS
126752011-08-28 Dodji Seketeli <dodji@redhat.com>
12676
12677 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12678 it's the first time it's being called on this main TU.
12679
0e3fdb48
RB
126802011-08-24 Richard Guenther <rguenther@suse.de>
12681
12682 PR c/49396
12683 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12684
126852011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12686
12687 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12688 defined in cpp_init_builtins and c_cpp_builtins.
12689
d4a83c10
JM
126902011-08-19 Joseph Myers <joseph@codesourcery.com>
12691
12692 * c-common.c (c_common_reswords): Add __builtin_complex.
12693 * c-common.h (RID_BUILTIN_COMPLEX): New.
12694
bbceee64
JM
126952011-08-18 Joseph Myers <joseph@codesourcery.com>
12696
12697 * c-common.c (c_common_reswords): Add _Noreturn.
12698 (keyword_is_function_specifier): Handle RID_NORETURN.
12699 * c-common.h (RID_NORETURN): New.
12700
3f8257db 127012011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12702
12703 * c-common.c (unsafe_conversion_p): New function. Check if it is
12704 unsafe to convert an expression to the type.
12705 (conversion_warning): Adjust, use unsafe_conversion_p.
12706 * c-common.h (unsafe_conversion_p): New function declaration.
12707
20906c66
JJ
127082011-08-02 Jakub Jelinek <jakub@redhat.com>
12709
12710 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12711 (c_finish_omp_taskyield): New prototype.
12712 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12713 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12714 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12715 or RHS1 have side-effects, evaluate those too in the right spot,
12716 if it is a decl and LHS is also a decl, error out if they
12717 aren't the same.
12718 (c_finish_omp_taskyield): New function.
12719 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12720 * c-pragma.c (omp_pragmas): Add taskyield.
12721 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12722 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12723 PRAGMA_OMP_CLAUSE_MERGEABLE.
12724
770e5a2e
DS
127252011-07-25 Dodji Seketeli <dodji@redhat.com>
12726
12727 * c-common.h (set_underlying_type): Remove parm name from
12728 declaration.
12729
1baae426
RG
127302011-07-25 Romain Geissler <romain.geissler@gmail.com>
12731
12732 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12733
fcb21722
JM
127342011-07-22 Jason Merrill <jason@redhat.com>
12735
76f86d00
JM
12736 PR c++/49793
12737 * c.opt (Wnarrowing): New.
12738
3a636414
JM
12739 PR c++/30112
12740 * c-common.h: Declare c_linkage_bindings.
12741 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12742
fcb21722
JM
12743 PR c++/49813
12744 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12745 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12746 as flag_isoc99 for 'restrict'.
12747 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12748
02614448
ILT
127492011-07-21 Ian Lance Taylor <iant@google.com>
12750
12751 PR middle-end/49705
12752 * c-common.c (c_disable_warnings): New static function.
12753 (c_enable_warnings): New static function.
12754 (c_fully_fold_internal): Change local unused_p to bool. Call
12755 c_disable_warnings and c_enable_warnings rather than change
12756 c_inhibit_evaluation_warnings.
12757
34429675
JM
127582011-07-20 Jason Merrill <jason@redhat.com>
12759
12760 PR c++/6709 (DR 743)
12761 PR c++/42603 (DR 950)
12762 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12763 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12764 (CPP_DECLTYPE): New.
12765 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12766
5d49b6a7
RG
127672011-07-19 Richard Guenther <rguenther@suse.de>
12768
12769 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12770 * c-omp.c (c_finish_omp_for): Likewise.
12771
e84a58ff
EB
127722011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12773
12774 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12775 body on the next line.
12776
329af3c7
JM
127772011-07-08 Jason Merrill <jason@redhat.com>
12778
4063e61b
JM
12779 PR c++/45437
12780 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12781
329af3c7
JM
12782 PR c++/49673
12783 * c-common.c (c_apply_type_quals_to_decl): Don't check
12784 TYPE_NEEDS_CONSTRUCTING.
12785
1a072294
RG
127862011-07-06 Richard Guenther <rguenther@suse.de>
12787
12788 * c-common.c (c_common_nodes_and_builtins):
12789 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12790
fce5dddd
RG
127912011-07-05 Richard Guenther <rguenther@suse.de>
12792
12793 * c-common.c (c_common_nodes_and_builtins): Build all common
12794 tree nodes first.
12795
45d439ac
JJ
127962011-06-27 Jakub Jelinek <jakub@redhat.com>
12797
56300785
JJ
12798 * c-common.h (c_tree_chain_next): New static inline function.
12799
45d439ac
JJ
12800 * c-common.c (check_builtin_function_arguments): Handle
12801 BUILT_IN_ASSUME_ALIGNED.
12802
e0a8ecf2
AM
128032011-06-21 Andrew MacLeod <amacleod@redhat.com>
12804
12805 * c-common.c: Add sync_ or SYNC__ to builtin names.
12806 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12807
128082011-06-20 Pierre Vittet <piervit@pvittet.com>
12809
12810 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12811 handler.
12812 (gen_pragma_handler): New union.
12813 (internal_pragma_handler): New type.
12814 (c_register_pragma_with_data)
12815 (c_register_pragma_with_expansion_and_data): New functions.
12816
12817 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12818 (c_register_pragma, c_register_pragma_with_expansion)
12819 (c_invoke_pragma_handler): Changed to work with
12820 internal_pragma_handler.
12821 (c_register_pragma_with_data)
12822 (c_register_pragma_with_expansion_and_data): New functions.
12823
677f3fa8
JM
128242011-06-14 Joseph Myers <joseph@codesourcery.com>
12825
12826 * c-common.c: Include common/common-target.h.
12827 (handle_section_attribute): Use
12828 targetm_common.have_named_sections.
12829 * c-cppbuiltin.c: Include common/common-target.h.
12830 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12831
d7fc8c14
RG
128322011-06-10 Richard Guenther <rguenther@suse.de>
12833
12834 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12835 to print a IDENTIFIER_NODE.
12836
10e48e39
RO
128372011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12838 Joseph Myers <joseph@codesourcery.com>
12839
12840 * c.opt (fbuilding-libgcc): New option.
12841 * c-cppbuiltin.c (c_cpp_builtins): Define
12842 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12843
6976ae51
JM
128442011-06-07 Jason Merrill <jason@redhat.com>
12845
3ff60975
JM
12846 * c-common.c (max_tinst_depth): Lower default to 900.
12847
6976ae51
JM
12848 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12849
009db074
RG
128502011-06-07 Richard Guenther <rguenther@suse.de>
12851
12852 * c-common.c (c_common_nodes_and_builtins): Do not set
12853 size_type_node or call set_sizetype.
12854
b4592b92
DS
128552011-06-07 Dodji Seketeli <dodji@redhat.com>
12856
12857 PR debug/49130
12858 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12859 type when using pointer comparison to compare types.
b4592b92 12860
014ab419
JW
128612011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12862
12863 * c.opt: Add -Wdelete-non-virtual-dtor.
12864 * c-opts.c (c_common_handle_option): Include it in -Wall.
12865
4f60111f
NF
128662011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12867
12868 PR bootstrap/49190
12869
12870 Revert:
12871 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12872
12873 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12874 not tree_common.
12875
4cc4f2f4
JJ
128762011-05-27 Jakub Jelinek <jakub@redhat.com>
12877
12878 PR c++/49165
12879 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12880 C++ don't call c_common_truthvalue_conversion on void type arms.
12881
38e01f9e
NF
128822011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12883
12884 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12885 (stmt_list_stack): Define.
12886 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12887 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12888
92e948a8
NF
128892011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12890
12891 * c-common.c (warning_candidate_p): Check for BLOCKs.
12892
a2fc3e63
NF
128932011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12894
12895 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12896 not tree_common.
12897
0957c029
JJ
128982011-05-25 Jakub Jelinek <jakub@redhat.com>
12899
12900 * c-common.c (def_fn_type): Remove extra va_end.
12901
828fb3ba
JM
129022011-05-23 Jason Merrill <jason@redhat.com>
12903
12904 PR c++/48106
12905 * c-common.c (c_common_get_narrower): New.
12906 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12907
dde05067
NF
129082011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12909
12910 * c-common.h (check_function_arguments): Tweak prototype of
12911 check_function_arguments.
12912 * c-common.c (check_function_arguments): Likewise. Adjust
12913 calls to check_function_nonnull, check_function_format, and
12914 check_function_sentinel.
12915 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12916 separate attributes and typelist arguments. Use
12917 FOREACH_FUNCTION_ARGS to iterate over argument types.
12918
3c0d13bf
PC
129192011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12920
12921 * c-common.c (c_common_reswords): Reorder.
12922 * c-common.h (rid): Likewise.
12923
8242dd04
NF
129242011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12925
12926 * c-common.c (def_fn_type): Don't call build_function_type, call
12927 build_function_type_array or build_varargs_function_type_array
12928 instead.
12929 (c_common_nodes_and_builtins): Likewise.
12930
3d528853
NF
129312011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12932
12933 * c-common.c (c_add_case_label): Omit the loc argument to
12934 build_case_label.
12935 * c-common.h (build_case_label): Remove.
12936 * c-semantics.c (build_case_label): Remove.
12937
a04a722b
JM
129382011-05-05 Joseph Myers <joseph@codesourcery.com>
12939
12940 * c-objc.h (objc_start_method_definition): Update prototype.
12941 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12942
e19a18d4
NF
129432011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12944
12945 * c-common.c (check_main_parameter_types): Reindent. Don't use
12946 TYPE_ARG_TYPES directly.
12947 (handle_nonnull_attribute): Likewise.
12948 (sync_resolve_params): Likewise.
12949 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12950 to check_format_string.
12951 (handle_format_attribute): Likewise.
12952 (check_format_string): Take a function type to examine instead of
12953 a type list. Use a function_arg_iterator to step through argument
12954 types.
12955
c62c040f
RG
129562011-05-04 Richard Guenther <rguenther@suse.de>
12957
12958 * c-common.c (fix_string_type): Use size_int for index type bounds.
12959 (start_fname_decls): Do not pass NULL to build_int_cst.
12960 (c_init_attributes): Likewise.
12961 * c-lex.c (c_lex_with_flags): Likewise.
12962
c12ff9d8
JM
129632011-04-27 Jason Merrill <jason@redhat.com>
12964
12965 * c-common.c (make_tree_vector_from_list): New.
12966 * c-common.h: Declare it.
12967
304dfbe3
RG
129682011-04-26 Richard Guenther <rguenther@suse.de>
12969
12970 PR preprocessor/48248
12971 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12972 for output size with -P.
12973
3c0d13bf
PC
129742011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12975
12976 * c-common.c (struct c_common_resword): Add __underlying_type.
12977 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12978
04695783
JM
129792011-04-20 Jim Meyering <meyering@redhat.com>
12980
12981 * c-format.c (init_dollar_format_checking): Remove useless
12982 if-before-free.
12983
0dc33c3c
NP
129842011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12985
12986 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12987 (objc_detect_field_duplicates): New.
0dc33c3c 12988 * stub-objc.c: Likewise.
3c0d13bf 12989
c59633d9
NP
129902011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12991
12992 * stub-objc.c (objc_declare_protocols): Renamed to
12993 objc_declare_protocol.
12994 * c-objc.h: Likewise.
3c0d13bf 12995
32dabdaf
NP
129962011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12997
12998 * stub-objc.c (objc_declare_class): Updated argument name.
12999
81f653d6
NF
130002011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13001
13002 * c-common.h (c_common_init_ts): Declare.
13003 * c-common.c (c_common_init_ts): Define.
13004
eb345401
NP
130052011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
13006
13007 * c-objc.h (objc_build_message_expr): Updated prototype.
13008 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 13009
a358e188
MJ
130102011-04-12 Martin Jambor <mjambor@suse.cz>
13011
13012 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13013 of cgraph_node.
13014
e6313a78
RG
130152011-04-11 Richard Guenther <rguenther@suse.de>
13016
13017 * c-common.c (complete_array_type): Build a range type of
13018 proper type.
13019
dcf0c47e
NF
130202011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13021
13022 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13023 (handle_type_generic_attribute): Likewise.
13024
1ee44b26
JM
130252011-04-07 Jason Merrill <jason@redhat.com>
13026
13027 PR c++/48450
13028 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13029 conversion from C++0x scoped enum.
13030
acce4e77
JM
130312011-04-06 Joseph Myers <joseph@codesourcery.com>
13032
13033 * c-target-def.h: New file.
13034 * c-target.def: New file.
13035 * c-target.h: New file.
13036 * c-common.c (targetcm): Don't define here.
13037 * c-common.h (default_handle_c_option): Declare.
13038 * c-format.c: Include c-target.h instead of target.h.
13039 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13040 include tm.h.
13041 (default_handle_c_option): Move from targhooks.c.
13042
e2eefb55
JJ
130432011-03-29 Jakub Jelinek <jakub@redhat.com>
13044
13045 PR preprocessor/48248
13046 * c-ppoutput.c (print): Add src_file field.
13047 (init_pp_output): Initialize it.
13048 (maybe_print_line): Don't optimize by adding up to 8 newlines
13049 if map->to_file and print.src_file are different file.
13050 (print_line): Update print.src_file.
13051
ba78087b
KT
130522011-03-25 Kai Tietz <ktietz@redhat.com>
13053
13054 * c-ada-spec.c (compare_comment): Use filename_cmp
13055 instead of strcmp for filename.
13056
0edf1bb2
JL
130572011-03-25 Jeff Law <law@redhat.com>
13058
adfac8df 13059 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 13060
c7dc8804
JM
130612011-03-25 Jason Merrill <jason@redhat.com>
13062
13063 * c.opt: Add -std=c++03.
13064
d1d879b1
EB
130652011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13066
13067 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13068
3f8257db 130692011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
13070
13071 PR target/12171
5050afdf
KT
13072 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13073 Display allowed attributes for function pointer types.
13074 (pp_c_attributes_display): New function to display
13075 attributes having affects_type_identity flag set to true.
13076 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13077
62d784f7
KT
13078 * c-common.c (c_common_attribute_table):
13079 Add new element.
13080 (c_common_format_attribute_table): Likewise.
13081
82d37118
JM
130822011-03-18 Jason Merrill <jason@redhat.com>
13083
49a000c3
JM
13084 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13085 * c-common.h: Don't declare it here.
13086 * c-common.c: Or define it here.
13087 * c-opts.c (c_common_handle_option): Or set it here.
13088
82d37118
JM
13089 PR c++/35315
13090 * c-common.c (handle_transparent_union_attribute): Don't
13091 make a duplicate type in C++.
13092
17bc631c
JM
130932011-03-15 Jason Merrill <jason@redhat.com>
13094
13095 * c-common.c (max_constexpr_depth): New.
13096 * c-common.h: Declare it.
13097 * c-opts.c (c_common_handle_option): Set it.
13098 * c.opt (fconstexpr-depth): New option.
13099
1b9b91a6
JM
131002011-03-11 Jason Merrill <jason@redhat.com>
13101
f231b5ff
JM
13102 * c-common.c (attribute_takes_identifier_p): Add missing const.
13103
1b9b91a6
JM
13104 PR c++/46803
13105 * c-common.c (attribute_takes_identifier_p): Assume that an
13106 unknown attribute takes an identifier.
13107
a19e4d44
NF
131082011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13109
13110 PR c/47786
13111 * c-common.c (c_type_hash): Call list_length instead of iterating
13112 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13113
982d62f6
JJ
131142011-02-19 Jakub Jelinek <jakub@redhat.com>
13115
13116 PR c/47809
13117 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13118
0a256240
NP
131192011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13120
13121 * c.opt (fobjc-abi-version=) New.
13122 (fobjc-nilcheck): New.
13123
ba9e6dd5
NF
131242011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13125
13126 PR c++/46890
13127 * c-common.h (keyword_is_decl_specifier): Declare.
13128 * c-common.c (keyword_is_decl_specifier): Define.
13129 (keyword_is_function_specifier): New function.
13130
7273813a
JJ
131312011-01-26 Jakub Jelinek <jakub@redhat.com>
13132
13133 PR c/47473
13134 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13135 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13136 REAL_TYPE.
13137
908ef79b
AC
131382011-01-26 Arnaud Charlet <charlet@adacore.com>
13139
13140 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13141
237e9384
JJ
131422011-01-26 Jakub Jelinek <jakub@redhat.com>
13143
13144 PR pch/47430
13145 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13146 after init_c_lex if pch_file is set.
13147
47ea1edf
DK
131482011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13149
d4dba752 13150 PR c++/43601
47ea1edf
DK
13151 * c.opt (-fkeep-inline-dllexport): New switch.
13152
2aa9c6ae
RG
131532011-01-12 Richard Guenther <rguenther@suse.de>
13154
13155 PR middle-end/32511
13156 * c-common.c (handle_weak_attribute): Warn instead of error
13157 on declaring an inline function weak.
13158
7bd11157
TT
131592011-01-05 Tom Tromey <tromey@redhat.com>
13160
13161 * c-common.h (lvalue_error): Update.
13162 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13163 not error.
13164
0e66e494 131652010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 13166
b4f588c4
NP
13167 PR objc/47075
13168 * c-objc.h (objc_finish_message_expr): Added argument to
13169 prototype.
13170
f4da8dce
NF
131712010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13172
13173 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13174 Use prototype_p.
13175
46270f14
NP
131762010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13177
13178 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 13179 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 13180
4816c593
NF
131812010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13182
13183 * c-common.h (readonly_error): Declare.
13184 * c-common.c (readonly_error): Define.
13185
7a6daeb0
NF
131862010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13187
13188 * c-common.h (invalid_indirection_error): Declare.
13189 * c-common.c (invalid_indirection_error): Define.
13190
892f6119
RG
131912010-12-03 Richard Guenther <rguenther@suse.de>
13192
13193 PR c/46745
13194 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13195 (pp_c_unary_expression): Likewise.
13196 (pp_c_expression): Likewise.
13197
6c39e757
NP
131982010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13199
13200 * c-common.h (objc_finish_function): New.
13201 (objc_non_volatilized_type): Removed.
13202 (objc_type_quals_match): Removed.
13203 * stub-objc.c (objc_finish_function): New.
13204 (objc_non_volatilized_type): Removed.
13205 (objc_type_quals_match): Removed.
9faeb493 13206
7c475d11
JM
132072010-11-30 Joseph Myers <joseph@codesourcery.com>
13208
13209 * c-common.h (parse_optimize_options): Declare.
13210 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13211 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13212
71f3e391
JM
132132010-11-29 Joseph Myers <joseph@codesourcery.com>
13214
13215 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13216 GET_ENVIRONMENT.
13217 * c-pch.c (O_BINARY): Don't define here.
13218 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13219
d5fabb58
JM
132202010-11-25 Joseph Myers <joseph@codesourcery.com>
13221
13222 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13223 targetm.except_unwind_info.
13224
299404a1
JM
132252010-11-23 Joseph Myers <joseph@codesourcery.com>
13226
13227 * c-opts.c (c_common_handle_option): Pass location to
13228 set_struct_debug_option.
13229
c98cd5bf
JM
132302010-11-23 Joseph Myers <joseph@codesourcery.com>
13231
13232 * c-common.c (visibility_options): Move from ../opts.c.
13233 * c-common.h (struct visibility_flags, visibility_options):
13234 Declare here.
13235 * c-opts.c (finish_options): Rename to c_finish_options.
13236 (c_common_init): Update call to finish_options.
13237
a9546771
NP
132382010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13239
13240 PR objc/34033
13241 * c-lex.c (lex_string): Check that each string in an Objective-C
13242 string concat sequence starts with either one or zero '@', and
13243 that there are no spurious '@' signs at the end.
13244
24a57808
JM
132452010-11-20 Joseph Myers <joseph@codesourcery.com>
13246
13247 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13248 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13249 HANDLE_PRAGMA_VISIBILITY.
13250 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13251 HANDLE_PRAGMA_VISIBILITY): Don't define.
13252 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13253
a9aa2c3a
NF
132542010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13255
13256 PR c++/16189
13257 PR c++/36888
13258 PR c++/45331
13259 * c-common.h (keyword_begins_type_specifier): Declare.
13260 (keyword_is_storage_class_specifier): Declare.
13261 (keyword_is_type_qualifier): Declare.
13262 * c-common.c (keyword_begins_type_specifier): New function.
13263 (keyword_is_storage_class_specifier): New function.
13264 (keyword_is_type_qualifier): Declare.
13265
5386338c
JM
132662010-11-19 Joseph Myers <joseph@codesourcery.com>
13267
13268 PR c/46547
13269 * c-common.c (in_late_binary_op): Define.
13270 (c_common_truthvalue_conversion): Check in_late_binary_op before
13271 calling c_save_expr.
13272 * c-common.h (in_late_binary_op): Declare.
13273
69ccdddb
JM
132742010-11-19 Joseph Myers <joseph@codesourcery.com>
13275
13276 * c-opts.c (c_common_handle_option): Update calls to
13277 set_struct_debug_option.
13278
6b192a09
NP
132792010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13280
13281 * c-common.h (objc_declare_protocols): Added additional argument.
13282 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13283
fb52b50a
NF
132842010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13285
13286 PR c/33193
13287 * c-common.h (build_real_imag_expr): Declare.
13288 * c-semantics.c (build_real_imag_expr): Define.
13289
b37421c6
JM
132902010-11-17 Joseph Myers <joseph@codesourcery.com>
13291
13292 * c-opts.c (c_common_parse_file): Take no arguments.
13293 * c-common.h (c_common_parse_file): Update prototype.
13294
07078664
JJ
132952010-11-16 Jakub Jelinek <jakub@redhat.com>
13296
13297 PR c++/46401
13298 * c-common.c (warning_candidate_p): Don't track non-const calls
13299 or STRING_CSTs.
13300
c6a13190
ILT
133012010-11-15 Ian Lance Taylor <iant@google.com>
13302
13303 * c-lex.c (init_c_lex): Set macro debug callbacks if
13304 flag_dump_go_spec is set.
13305
925e8657
NP
133062010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13307
13308 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13309 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13310
bb0a9581
NF
133112010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13312
13313 PR preprocessor/45038
13314 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13315 dialects.
13316
c5fa0890
JM
133172010-11-12 Joseph Myers <joseph@codesourcery.com>
13318
13319 * c-common.h (c_family_lang_mask): Declare.
13320 * c-opts.c (c_family_lang_mask): Make extern.
13321 * c-pragma.c (handle_pragma_diagnostic): Use
13322 control_warning_option.
13323
a4d8c676
JM
133242010-11-12 Joseph Myers <joseph@codesourcery.com>
13325
13326 * c-common.c (parse_optimize_options): Update call to
13327 decode_options.
13328 * c-common.h (c_common_handle_option): Update prototype.
13329 * c-opts.c (c_common_handle_option): Take location_t parameter and
13330 pass it to other functions.
13331
f954bd2c
JM
133322010-11-11 Joseph Myers <joseph@codesourcery.com>
13333
13334 * c-opts.c (warning_as_error_callback): Remove.
13335 (c_common_initialize_diagnostics): Don't call
13336 register_warning_as_error_callback.
13337 (c_common_handle_option): Handle -Werror=normalized= here.
13338
d8a07487
JM
133392010-11-10 Joseph Myers <joseph@codesourcery.com>
13340
13341 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13342 in diagnostic.
13343 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13344 letter.
13345 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13346 Remove trailing '.' from diagnostics.
13347 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13348
d5478783
JM
133492010-11-10 Joseph Myers <joseph@codesourcery.com>
13350
13351 * c-common.c (parse_optimize_options): Pass global_dc to
13352 decode_options.
13353 * c-opts.c (c_common_handle_option): Pass &global_options to
13354 set_Wstrict_aliasing.
13355 * c.opt (v): Don't mark Common or document here.
13356
91ebb981
IS
133572010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13358
13359 PR target/44981
13360 * c-format.c (format_type): New type gcc_objc_string_format_type.
13361 (valid_stringptr_type_p): New.
13362 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13363 (check_format_string): Pass expected type, use
91ebb981
IS
13364 valid_stringptr_type_p (), check that the format string types are
13365 consistent with the format specification.
13366 (decode_format_attr): Warn if NSString is used outside objective-c.
13367 (format_types_orig): Add NSString.
13368 (format_name): New.
13369 (format_flags): New.
13370 (check_format_arg): Handle format strings requiring an external parser.
13371 first_target_format_type: New variable.
13372 (handle_format_attribute): Set up first_target_format_type, pass the
13373 expected format arg string type to check_format_string().
ab20d992 13374 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13375 * stub-objc.c (objc_string_ref_type_p): New.
13376 (objc_check_format_arg): New.
13377
bede2adc
NP
133782010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13379
9faeb493 13380 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13381 * c-common.h (objc_build_class_component_ref): New.
13382 * stub-objc.c (objc_build_class_component_ref): New.
13383
9a179d01
NP
133842010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13385
13386 * c.opt (Wproperty-assign-default): New option.
13387
22d8d616
NP
133882010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13389
13390 Implemented -fobjc-std=objc1 flag.
13391 * c.opt (fobjc-std=objc1): New option.
13392
2debdb4f
NP
133932010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13394
13395 Implemented format and noreturn attributes for Objective-C methods.
13396 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13397 attribute for Objective-C methods.
13398
ec52b111
JM
133992010-10-31 Jason Merrill <jason@redhat.com>
13400
13401 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13402 EXPR_LOC_OR_HERE.
13403
46a88c12
NP
134042010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13405
13406 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13407 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13408 (objc_add_property_declaration): Removed arguments for copies and
13409 ivar.
13410 (objc_build_getter_call): Renamed to
13411 objc_maybe_build_component_ref.
13412 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13413 (objc_is_property_ref): New.
13414 * c-common.c (c_common_reswords): Removed copies and ivar.
13415 * stub-objc.c (objc_add_property_declaration): Removed arguments
13416 for copies and ivar.
13417 (objc_build_getter_call): Renamed to
13418 objc_maybe_build_component_ref.
13419 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13420 (objc_is_property_ref): New.
9faeb493 13421
1e4bf85b
AC
134222010-10-29 Arnaud Charlet <charlet@adacore.com>
13423 Matthew Gingell <gingell@adacore.com>
13424
13425 * c-ada-spec.c (separate_class_package): New function.
13426 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13427 name of their enclosing package.
13428 (print_ada_declaration): Use separate_class_package.
13429
81f0bab2
JM
134302010-10-27 Jason Merrill <jason@redhat.com>
13431
2b08f2c5
JM
13432 * c-common.c (c_common_reswords): Add __is_literal_type.
13433 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13434
81f0bab2
JM
13435 * c-common.c (check_case_value): Remove special C++ code.
13436
200290f2
NP
134372010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13438
13439 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13440 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13441 and RID_LAST_PATTR.
13442 (objc_add_property_declaration): Added additional arguments.
13443 (objc_property_attribute_kind): Removed.
13444 (objc_set_property_attr): Removed.
13445 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13446 copy and nonatomic.
13447 * stub-objc.c (objc_add_property_declaration): Added additional
13448 arguments.
13449 (objc_set_property_attr): Removed.
9faeb493 13450
f614132b
NP
134512010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13452
13453 * c-common.h (objc_add_property_variable): Renamed to
13454 objc_add_property_declaration. Added location argument.
13455 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13456
b8a18805
NP
134572010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13458
13459 * c-common.h (objc_maybe_printable_name): New.
13460 * stub-objc.c (objc_maybe_printable_name): New.
13461
3f8257db
JJ
134622010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13463 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13464
13465 * c-common.h (c_common_mark_addressable_vec): Declare.
13466 * c-common.c (c_common_mark_addressable_vec): New function.
13467
249a82c4
NP
134682010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13469
13470 * c-common.h (objc_set_method_type): Removed.
13471 (objc_add_method_declaration): Added boolean argument.
13472 (objc_start_method_definition): Same change.
13473 (objc_build_method_signature): Same change.
13474 * stub-objc.c (objc_set_method_type): Removed.
13475 (objc_add_method_declaration): Added boolean argument.
13476 (objc_start_method_definition): Same change.
13477 (objc_build_method_signature): Same change.
13478
977e30bc
NP
134792010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13480
13481 * c-common.h (finish_file): Removed.
13482 (objc_write_global_declarations): New.
13483 * c-opts.c (c_common_parse_file): Do not call finish_file.
13484 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13485
da57d1b9
NP
134862010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13487
13488 Implemented parsing @synthesize and @dynamic for
13489 Objective-C/Objective-C++.
13490 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13491 (objc_add_synthesize_declaration): New.
13492 (objc_add_dynamic_declaration): New.
13493 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13494 * stub-objc.c (objc_add_synthesize_declaration): New.
13495 (objc_add_dynamic_declaration): New.
9faeb493 13496
0069111f
MM
134972010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13498
13499 PR target/46041
13500 * c-cppbuiltin.c (mode_has_fma): Move function here from
13501 builtins.c. Don't use the fma optab, instead just use the
13502 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13503 using -save-temps.
13504
e426b47b
NP
135052010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13506
13507 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13508
3f8257db 13509 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13510
9faeb493 13511 Radar 4330422
e426b47b
NP
13512 * c-common.h (objc_non_volatilized_type): New declaration
13513 * stub-objc.c (objc_non_volatilized_type): New stub.
13514
90fbfdc3
NP
135152010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13516
e426b47b 13517 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13518
ab20d992 13519 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13520
9faeb493 13521 Radar 4133425
90fbfdc3 13522 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13523 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13524
c37d8c30
IS
135252010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13526
13527 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13528 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13529 (objc_ivar_visibility_kind): New enum.
13530 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13531 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13532 visibility enum.
13533
1b1562a5
MM
135342010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13535
13536 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13537 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13538 has the appropriate fma builtins.
13539 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13540
668ea4b1
IS
135412010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13542
1b1562a5 13543 merge from FSF apple 'trunk' branch.
3f8257db 13544 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13545
668ea4b1
IS
13546 Radars 4436866, 4505126, 4506903, 4517826
13547 * c-common.c (c_common_resword): Define @property and its attributes.
13548 * c-common.h: Define property attribute enum entries.
13549 (OBJC_IS_PATTR_KEYWORD): New.
13550 (objc_property_attribute_kind): New enum.
13551 Declare objc_set_property_attr (), objc_add_property_variable (),
13552 objc_build_getter_call () and objc_build_setter_call ().
13553 * stub-objc.c (objc_set_property_attr): New stub.
13554 (objc_add_property_variable): Likewise.
13555 (objc_build_getter_call): Likewise.
13556 (objc_build_setter_call) Likewise.
1b1562a5 13557
a1178b30
IS
135582010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13559
1b1562a5 13560 merge from FSF apple 'trunk' branch.
ab20d992 13561 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13562
13563 Radar 3803157 (method attributes)
13564 * c-common.c (handle_deprecated_attribute): Recognize
13565 objc methods as valid declarations.
13566 * c-common.h: Declare objc_method_decl ().
1b1562a5 13567 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13568
a75bfaa6
JM
135692010-10-08 Joseph Myers <joseph@codesourcery.com>
13570
13571 * c-common.c (parse_optimize_options): Call
13572 decode_cmdline_options_to_array_default_mask before
13573 decode_options. Update arguments to decode_options.
13574 * c-common.h (c_common_init_options_struct): Declare.
13575 * c-opts.c (c_common_init_options_struct): New. Split out from
13576 c_common_init_options.
13577
f05b9d93
NP
135782010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13579
13580 Implemented fast enumeration for Objective-C.
13581 * c-common.h (objc_finish_foreach_loop): New.
13582 * stub-objc.c (objc_finish_foreach_loop): New.
13583
1ebe4b4f
JM
135842010-10-05 Joseph Myers <joseph@codesourcery.com>
13585
13586 * c-common.h (struct diagnostic_context): Don't declare here.
13587 (c_common_initialize_diagnostics): Declare using
13588 diagnostic_context typedef.
13589 * c-opts.c (c_common_handle_option): Pass global_dc to
13590 handle_generated_option.
13591
d4d24ba4
JM
135922010-10-04 Joseph Myers <joseph@codesourcery.com>
13593
13594 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13595 handle_generated_option.
13596
478a1c5b
ILT
135972010-10-03 Ian Lance Taylor <iant@google.com>
13598
13599 * c.opt (-fplan9-extensions): New option.
13600
82a1c2fe
FXC
136012010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13602
13603 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13604 Remove.
13605 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13606 of duplicating code.
13607
92902b1b
IS
136082010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13609
13610 * c-common.c: Add two new entries for @optional
13611 and @required keywords.
13612
13613 merge from FSF 'apple/trunk' branch.
3f8257db 13614 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13615
13616 Radar 4386773
13617 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13618 objective-c keywords.
13619 (objc_set_method_opt): New declaration.
13620 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13621
46625112
JM
136222010-09-30 Joseph Myers <joseph@codesourcery.com>
13623
13624 * c-common.c (handle_optimize_attribute): Pass &global_options to
13625 cl_optimization_save and cl_optimization_restore.
13626 * c-opts.c (c_common_handle_option): Pass &global_options to
13627 handle_generated_option.
13628 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13629 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13630 &global_options to cl_optimization_restore.
13631
49b91f05
NP
136322010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13633
13634 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13635 Objective-C/Objective-C++ keywords.
13636
13ed556f 136372010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13638
9faeb493
UB
13639 Merge from 'apple/trunk' branch on FSF servers.
13640
3f8257db 13641 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13642
13643 Radar 4281748
13644 * c-common.h (objc_check_global_decl): New declaration.
13645 * stub-objc.c (objc_check_global_decl): New stub.
13646
f0036cca
JM
136472010-09-29 Joseph Myers <joseph@codesourcery.com>
13648
13649 * c.opt: Don't use VarExists.
13650
e3339d0f
JM
136512010-09-29 Joseph Myers <joseph@codesourcery.com>
13652
13653 * c-common.c (c_cpp_error): Update names of diagnostic_context
13654 members.
13655 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13656 cl_optimization members.
13657 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13658 sanitize_cpp_opts, finish_options): Update names of cpp_options
13659 members.
13660
1973201f
NP
136612010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13662
13663 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13664 (objc_is_reserved_word): Removed.
13665 * c-common.c: Updated comments.
13666 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13667 objc_is_reserved_word.
13668 * stub-objc.c (objc_is_reserved_word): Removed.
13669
f7e71da5
IS
136702010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13671
9faeb493 13672 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13673 include attributes.
13674 (objc_start_method_definition): Likewise.
13675 (objc_build_keyword_decl): Likewise.
13676 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13677 (objc_start_method_definition): Likewise.
13678 (objc_build_keyword_decl): Likewise.
13679
c165dca7
IS
136802010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13681
13682 * c-common.h (objc_start_class_interface): Adjust prototype.
13683 (objc_start_category_interface): Likewise.
13684 (objc_start_protocol): Likewise.
13685 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13686 (objc_start_class_interface): Likewise.
13687 (objc_start_category_interface): Likewise.
13688
7458026b
ILT
136892010-09-27 Ian Lance Taylor <iant@google.com>
13690
13691 * c-common.c (c_common_attribute_table): Add no_split_stack.
13692 (handle_no_split_stack_attribute): New static function.
13693
b581b85b
NP
136942010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13695
9faeb493 13696 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13697
3f8257db 13698 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13699
9faeb493 13700 Radar 4229905
b581b85b
NP
13701 * c-common.h (objc_have_common_type): New declaration.
13702 * stub-objc.c (objc_have_common_type): New stub.
13703
13704 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13705
13706 Radar 4154928
13707 * c-common.h (objc_common_type): New prototype.
9faeb493 13708 * stub-objc.c (objc_common_type): New stub.
b581b85b 13709
46a4da10
JH
137102010-09-24 Jan Hubicka <jh@suse.cz>
13711
13712 * c-common.c (handle_leaf_attribute): New function.
13713 (struct attribute_spec c_common_att): Add leaf.
13714
e200444e
JM
137152010-09-22 Joseph Myers <joseph@codesourcery.com>
13716
13717 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13718 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13719 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13720 -include-barrier, -include-directory, -include-directory=,
13721 -include-directory-after, -include-directory-after=,
13722 -include-prefix, -include-prefix=, -include-with-prefix,
13723 -include-with-prefix=, -include-with-prefix-after,
13724 -include-with-prefix-after=, -include-with-prefix-before,
13725 -include-with-prefix-before=, -no-integrated-cpp,
13726 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13727 -output=, -pedantic, -pedantic-errors, -preprocess,
13728 -print-missing-file-dependencies, -trace-includes, -traditional,
13729 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13730 -user-dependencies, -verbose, -write-dependencies,
13731 -write-user-dependencies, no-integrated-cpp, traditional): New.
13732
29a80ea6
NP
137332010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13734
13735 PR objc/23710
ac1fc2fc
NP
13736 * c-common.h (objc_start_method_definition): Return bool instead
13737 of void.
13738 * stub-objc.c (objc_start_method_definition): Return bool instead
13739 of void.
13740
137412010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13742
13743 PR objc/25965
13744 * c-common.h (objc_get_interface_ivars): New declaration.
13745 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13746
de621752
ILT
137472010-09-15 Ian Lance Taylor <iant@google.com>
13748
13749 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13750 messages. Remove period at end of warning message.
de621752 13751
ba885ec5
NS
137522010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13753
13754 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13755 (handle_alias_attribute): ... here.
13756 (handle_ifunc_attribute): New.
13757
c5ee1358
MM
137582010-09-06 Mark Mitchell <mark@codesourcery.com>
13759
13760 * c-common.h (do_warn_double_promotion): Declare.
13761 * c-common.c (do_warn_double_promotion): Define.
13762
0a0b3574
MM
137632010-09-05 Mark Mitchell <mark@codesourcery.com>
13764
13765 * c.opt (Wdouble-promotion): New.
13766
d1779886
JM
137672010-09-02 Joseph Myers <joseph@codesourcery.com>
13768
13769 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13770 fvtable-thunks, fxref): Mark no longer supported in help text.
13771
2d2bd949
JM
137722010-09-02 Joseph Myers <joseph@codesourcery.com>
13773
13774 * c.opt (Wimport, fall-virtual, falt-external-templates,
13775 fdefault-inline, fenum-int-equiv, fexternal-templates,
13776 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13777 fname-mangling-version-, fnew-abi, fnonnull-objects,
13778 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13779 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13780 applicable.
13781 (fhandle-exceptions): Mark with Alias and Warn.
13782 * c-opts.c (c_common_handle_option): Don't handle options marked
13783 as ignored.
13784
5de8299c
JM
137852010-09-02 Joseph Myers <joseph@codesourcery.com>
13786
13787 * c.opt (Wcomments, Werror-implicit-function-declaration,
13788 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13789 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13790 aliases.
13791 * c-common.c (option_codes): Use OPT_Wcomment instead of
13792 OPT_Wcomments.
13793 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13794 Don't handle options marked as aliases.
13795
0ceb0201
RG
137962010-08-25 Richard Guenther <rguenther@suse.de>
13797
13798 * c-common.c (c_common_get_alias_set): Remove special
13799 handling for pointers.
13800
ac47786e
NF
138012010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13802
13803 * c-common.c: Use FOR_EACH_VEC_ELT.
13804 * c-gimplify.c: Likewise.
13805 * c-pragma.c: Likewise.
13806
c878765b
JM
138072010-08-16 Joseph Myers <joseph@codesourcery.com>
13808
13809 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13810 RejectDriver.
13811 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13812 RejectDriver.
13813 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13814 instead of OPT_MDX and OPT_MMDX.
13815
603349bf
JM
138162010-08-16 Joseph Myers <joseph@codesourcery.com>
13817
13818 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13819
644fa7ac
JM
138202010-08-12 Joseph Myers <joseph@codesourcery.com>
13821
13822 * c.opt (MD, MMD): Change to MDX and MMDX.
13823 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13824
481e1176
JM
138252010-08-11 Joseph Myers <joseph@codesourcery.com>
13826
13827 * c-opts.c (c_common_handle_option): Call handle_generated_option
13828 instead of handle_option.
13829
ac8dc9f7
NF
138302010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13831
13832 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13833 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13834
4f8c876d
NF
138352010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13836
13837 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13838 (pending_redefine_extname): Change type to a VEC.
13839 (add_to_renaming_pragma_list): Update for new type of
13840 pending_redefine_extname.
ac8dc9f7 13841 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13842
3b0c690e
AC
138432010-08-04 Arnaud Charlet <charlet@adacore.com>
13844
13845 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13846 visited.
13847 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13848 decide whether a type has already been declared/seen.
13849 Do not go to the original type.
13850 (dump_nested_types): New parameter forward.
13851 Generate forward declaration if needed and mark type as visited.
13852 (print_ada_declaration): Call dump_nested_types if not already done.
13853 Mark types as visited.
13854
1890bccc
JM
138552010-08-03 Joseph Myers <joseph@codesourcery.com>
13856
13857 * c.opt (-print-pch-checksum): Remove option.
13858 * c-opts.c (c_common_handle_option): Don't handle
13859 OPT_print_pch_checksum.
13860
5f20c657
JM
138612010-07-27 Joseph Myers <joseph@codesourcery.com>
13862
13863 * c-common.h (c_common_handle_option): Update prototype and return
13864 value type.
13865 * c-opts.c (c_common_handle_option): Update prototype and return
13866 value type. Update calls to handle_option and
13867 enable_warning_as_error.
13868
f551f80c
JJ
138692010-07-27 Jakub Jelinek <jakub@redhat.com>
13870
13871 PR c/45079
13872 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13873
61ff2bdc
JM
138742010-07-27 Joseph Myers <joseph@codesourcery.com>
13875
13876 * c-common.h (c_common_missing_argument): Remove.
13877 * c-opts.c (c_common_missing_argument): Remove.
13878 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13879 idirafter, imacros, include, isysroot, isystem, iquote): Add
13880 MissingArgError.
13881 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13882
7a9bf9a4
JM
138832010-07-27 Joseph Myers <joseph@codesourcery.com>
13884
13885 * c-common.h (c_common_option_lang_mask,
13886 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13887 New.
13888 (c_common_init_options): Update prototype.
13889 * c-opts.c (c_common_option_lang_mask): New.
13890 (c_common_initialize_diagnostics): Split out of
13891 c_common_init_options.
13892 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13893 New.
13894 (c_common_init_options): Update prototype. Use decoded options in
13895 search for -lang-asm.
13896
910ad8de
NF
138972010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13898
13899 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13900 * c-format.c: Likewise.
13901
718f9c0f
MLI
139022010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13903
13904 * c-common.h: Include diagnostic-core.h. Error if already
13905 included.
13906 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13907
4d451982
MLI
139082010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13909
adfac8df 13910 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13911 Do not include expr.h
13912 (vector_mode_valid_p): Move here.
13913
119fe915
SB
139142010-06-21 DJ Delorie <dj@redhat.com>
13915
13916 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13917 allow these pragmas anywhere.
13918
139192010-06-14 Jakub Jelinek <jakub@redhat.com>
13920
13921 PR bootstrap/44509
13922 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13923 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13924 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13925 ggc_strdup instead of xstrdup.
13926
139272010-06-10 Jakub Jelinek <jakub@redhat.com>
13928
13929 * c-cppbuiltin.c: Include cpp-id-data.h.
13930 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13931 (lazy_hex_fp_value): New function.
13932 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13933
6662d794
MLI
139342010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13935
13936 * c-gimplify.c: Do not include tree-flow.h
13937
38f8b050
JR
139382010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13939
13940 PR other/44034
13941 * c-common.c: Rename targetm member:
13942 targetm.enum_va_list -> targetm.enum_va_list_p
13943
9589f23e
AS
139442010-06-28 Anatoly Sokolov <aesok@post.ru>
13945
13946 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13947
3b06d379
SB
139482010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13949
13950 * c-cppbuiltin.c: Do not include except.h.
13951
d166d4c3
AK
139522010-06-24 Andi Kleen <ak@linux.intel.com>
13953
9faeb493
UB
13954 * c-common.c (warn_for_omitted_condop): New.
13955 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13956
70cb8be6
JM
139572010-06-21 Joseph Myers <joseph@codesourcery.com>
13958
13959 * c.opt (lang-objc): Remove.
13960 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13961
a4c97feb
JR
139622010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13963
13964 * c-opts.c: Include "tm_p.h".
13965
6e2f1956
JM
139662010-06-20 Joseph Myers <joseph@codesourcery.com>
13967
13968 * c-common.c (parse_optimize_options): Update call to
13969 decode_options.
13970
bc87224e
NF
139712010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13972
13973 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13974 new type of types_used_by_cur_var_decl.
13975
b49cf425
JR
139762010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13977
13978 PR bootstrap/44512
13979 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13980 for C++ standard compliance.
13981
59f9c2ed
JM
139822010-06-16 Jason Merrill <jason@redhat.com>
13983
13984 * c.opt: Add -Wnoexcept.
13985
33766b66
RG
139862010-06-16 Richard Guenther <rguenther@suse.de>
13987
13988 PR c/44555
13989 * c-common.c (c_common_truthvalue_conversion): Remove
13990 premature and wrong optimization concering ADDR_EXPRs.
13991
eff7e30c
AC
139922010-06-15 Arnaud Charlet <charlet@adacore.com>
13993
13994 * c-ada-spec.c (dump_sloc): Remove column info.
13995 (is_simple_enum): New function.
13996 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13997 enum types when relevant.
13998
6312e84d
MLI
139992010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
14000
9faeb493 14001 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
14002 location.
14003
1cb42611
JM
140042010-06-10 Joseph Myers <joseph@codesourcery.com>
14005
14006 * c-opts.c (c_common_handle_option): Don't handle
14007 OPT_fshow_column.
14008
a9429e29
LB
140092010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
14010
14011 * c-pragma.c (push_alignment): Use typed GC allocation.
14012 (handle_pragma_push_options): Likewise.
14013
14014 * c-common.c (parse_optimize_options): Likewise.
14015
14016 * c-common.h (struct sorted_fields_type): Add variable_size GTY
14017 option.
14018
5498f011
JM
140192010-06-07 Joseph Myers <joseph@codesourcery.com>
14020
14021 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14022 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14023 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14024 flag_signed_bitfields, warn_strict_null_sentinel,
14025 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14026 flag_gen_declaration, flag_no_gnu_keywords,
14027 flag_implement_inlines, flag_implicit_templates,
14028 flag_implicit_inline_templates, flag_optional_diags,
14029 flag_elide_constructors, flag_default_inline, flag_rtti,
14030 flag_conserve_space, flag_access_control, flag_check_new,
14031 flag_new_for_scope, flag_weak, flag_working_directory,
14032 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14033 flag_enforce_eh_specs, flag_threadsafe_statics,
14034 flag_pretty_templates): Remove.
14035 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14036 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14037 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14038 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14039 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14040 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14041 flag_no_gnu_keywords, flag_implement_inlines,
14042 flag_implicit_templates, flag_implicit_inline_templates,
14043 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14044 flag_rtti, flag_conserve_space, flag_access_control,
14045 flag_check_new, flag_new_for_scope, flag_weak,
14046 flag_working_directory, flag_use_cxa_atexit,
14047 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14048 flag_threadsafe_statics, flag_pretty_templates,
14049 warn_strict_null_sentinel): Remove.
14050 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14051 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14052 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14053 fimplicit-inline-templates, fimplicit-templates,
14054 flax-vector-conversions, fms-extensions, fnil-receivers,
14055 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14056 frtti, fshort-double, fshort-enums, fshort-wchar,
14057 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14058 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14059 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14060 gen-decls, undef): Use Var.
14061 (fdefault-inline, foptional-diags): Document as doing nothing.
14062 * c-opts.c (c_common_handle_option): Remove cases for options now
14063 using Var. Mark ignored options as such.
14064
39dabefd
SB
140652010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14066
9faeb493 14067 * c-common.c: Moved to here from parent directory.
39dabefd
SB
14068 * c-common.def: Likewise.
14069 * c-common.h: Likewise.
14070 * c-cppbuiltin.c: Likewise.
14071 * c-dump.c: Likewise.
14072 * c-format.c: Likewise.
14073 * c-format.h : Likewise.
14074 * c-gimplify.c: Likewise.
14075 * c-lex.c: Likewise.
14076 * c-omp.c: Likewise.
14077 * c.opt: Likewise.
14078 * c-opts.c: Likewise.
14079 * c-pch.c: Likewise.
14080 * c-ppoutput.c: Likewise.
14081 * c-pragma.c: Likewise.
14082 * c-pragma.h: Likewise.
14083 * c-pretty-print.c: Likewise.
14084 * c-pretty-print.h: Likewise.
14085 * c-semantics.c: Likewise.
14086 * stub-objc.c: Likewise.
14087
14088 * c-common.c: Include gt-c-family-c-common.h.
14089 * c-pragma.c: Include gt-c-family-c-pragma.h.
14090\f
68127a8e 14091Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
14092
14093Copying and distribution of this file, with or without modification,
14094are permitted in any medium without royalty provided the copyright
14095notice and this notice are preserved.