]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/ChangeLog
9e4c877974a0a6b2d0fd5db29673c93ef63890af
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
1 2023-05-26 Martin Uecker <uecker@tugraz.at>
2
3 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
4 record all parameters.
5
6 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7
8 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
9 (dump_ada_declaration): Ditto.
10 (dump_ada_structure): Ditto.
11 * c-common.cc (unsafe_conversion_p): Ditto.
12 (shorten_compare): Ditto.
13 (pointer_int_sum): Ditto.
14 (c_common_truthvalue_conversion): Ditto.
15 (scalar_to_vector): Ditto.
16 * c-common.h (gnu_vector_type_p): Ditto.
17 * c-omp.cc (c_omp_depend_t_p): Ditto.
18 (c_omp_split_clauses): Ditto.
19 * c-ubsan.cc (ubsan_instrument_division): Ditto.
20 * c-warn.cc (conversion_warning): Ditto.
21 (warnings_for_convert_and_check): Ditto.
22
23 2023-05-18 Joseph Myers <joseph@codesourcery.com>
24
25 * c-format.cc (print_char_table): Handle %B like %b.
26
27 2023-05-15 Joseph Myers <joseph@codesourcery.com>
28
29 * c-lex.cc (c_common_has_attribute): Use 202311 as
30 __has_c_attribute return for all C2x attributes.
31
32 2023-05-15 Patrick Palka <ppalka@redhat.com>
33
34 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
35 for C++23.
36
37 2023-05-01 Marek Polacek <polacek@redhat.com>
38
39 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
40
41 2023-03-28 David Malcolm <dmalcolm@redhat.com>
42
43 PR c/107002
44 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
45 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
46 Reject cases where involving macro expansions.
47
48 2023-03-28 Jason Merrill <jason@redhat.com>
49
50 PR c++/107163
51 * c-common.cc (verify_tree): Don't use sequenced handling
52 for COMPONENT_REF.
53
54 2023-03-17 Jakub Jelinek <jakub@redhat.com>
55
56 PR c/109151
57 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
58 types rather than just INTEGER_TYPE.
59
60 2023-03-10 Marek Polacek <polacek@redhat.com>
61
62 PR sanitizer/108060
63 PR sanitizer/109050
64 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
65 the RHS before the LHS.
66
67 2023-03-04 Jakub Jelinek <jakub@redhat.com>
68
69 PR c/107465
70 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
71 above innermost zero extension of BIT_NOT_EXPR result.
72
73 2023-03-04 Jakub Jelinek <jakub@redhat.com>
74
75 PR c/107465
76 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
77 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
78 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
79 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
80 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
81 from narrower unsigned, fix up computation of mask for the constant
82 cases and for unsigned other operand case handle differently
83 BIT_NOT_EXPR result being sign vs. zero extended.
84
85 2023-03-04 Jakub Jelinek <jakub@redhat.com>
86
87 PR c/107846
88 * c-warn.cc: Include langhooks.h.
89 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
90 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
91 is narrower than type0 and unsigned, use wi::min_precision with
92 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
93
94 2023-03-03 Alexandre Oliva <oliva@adacore.com>
95
96 * c-common.cc (c_common_nodes_and_builtins): Take
97 wchar_type_node for wint_type_node when aliased.
98 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
99 wchar_t, to the underlying type rather than wchar_t in
100 non-C++.
101 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
102
103 2023-02-28 Marek Polacek <polacek@redhat.com>
104
105 PR c++/107938
106 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
107 POINTER_TYPE_P.
108
109 2023-02-28 Jakub Jelinek <jakub@redhat.com>
110
111 PR sanitizer/108894
112 * c-common.h (c_strict_flex_array_level_of): Declare.
113 * c-common.cc (c_strict_flex_array_level_of): New function,
114 moved and renamed from c-decl.cc's strict_flex_array_level_of.
115 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
116 C check c_strict_flex_array_level_of whether a trailing array
117 should be treated as flexible member like. Handle C [0] arrays.
118 Add 1 + index_off_by_one rather than index_off_by_one to bounds
119 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
120 bounds comparison.
121
122 2023-02-23 Jakub Jelinek <jakub@redhat.com>
123
124 PR translation/108890
125 * c.opt (fcontracts): Fix description.
126
127 2023-02-22 Marek Polacek <polacek@redhat.com>
128
129 PR c/108880
130 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
131 pset to walk_tree_1.
132 (c_genericize): Call walk_tree with an explicit pset.
133
134 2023-02-18 Martin Uecker <uecker@tugraz.at>
135
136 PR c/105660
137 * c-attribs.cc (append_access_attr): Use order of arguments when
138 construction string.
139 (append_access_attr_idxs): Rename and make static.
140 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
141
142 2023-02-16 Patrick Palka <ppalka@redhat.com>
143
144 * c-common.h: Mechanically drop static from static inline
145 functions via s/^static inline/inline/g.
146
147 2023-02-01 Jason Merrill <jason@redhat.com>
148
149 * c.opt: Add -Wno-changes-meaning.
150
151 2023-01-31 Marek Polacek <polacek@redhat.com>
152
153 PR c++/107593
154 PR c++/108597
155 * c-common.h (instantiation_dependent_expression_p): Declare.
156 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
157 is dependent, invalidate the chain.
158
159 2023-01-26 Marek Polacek <polacek@redhat.com>
160
161 PR c++/105300
162 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
163
164 2023-01-18 Marek Polacek <polacek@redhat.com>
165
166 PR c/108424
167 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
168
169 2023-01-14 Jakub Jelinek <jakub@redhat.com>
170
171 PR c++/108365
172 * c-common.h (may_shorten_divmod): New static inline function.
173
174 2023-01-13 Eric Botcazou <ebotcazou@adacore.com>
175
176 * c-ada-spec.cc (is_float32): New function.
177 (is_float64): Likewise.
178 (is_float128): Tweak.
179 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
180
181 2023-01-12 Lewis Hyatt <lhyatt@gmail.com>
182
183 PR preprocessor/108244
184 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
185 deferred pragmas if -fdirectives-only.
186 (init_pragma): Likewise.
187
188 2023-01-09 Martin Liska <mliska@suse.cz>
189
190 PR c/107993
191 * c-attribs.cc (handle_target_clones_attribute): Check for
192 string constant for all target_clone attribute values.
193
194 2023-01-03 Florian Weimer <fweimer@redhat.com>
195
196 * c-cppbuiltin.cc (c_cpp_builtins): Define
197 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
198
199 2023-01-03 Florian Weimer <fweimer@redhat.com>
200
201 Revert:
202 2023-01-03 Florian Weimer <fweimer@redhat.com>
203
204 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
205 Define if constant is known.
206
207 2023-01-03 Florian Weimer <fweimer@redhat.com>
208
209 Revert:
210 2023-01-02 Florian Weimer <fweimer@redhat.com>
211
212 * c-cppbuiltin.cc (c_cpp_builtins): Define
213 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
214
215 2023-01-02 Florian Weimer <fweimer@redhat.com>
216
217 * c-cppbuiltin.cc (c_cpp_builtins): Define
218 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
219
220 2023-01-02 Florian Weimer <fweimer@redhat.com>
221
222 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
223 Define if constant is known.
224
225 2022-12-19 Marek Polacek <polacek@redhat.com>
226
227 PR c/98487
228 * c-format.cc (check_function_format): Use get_attribute_name.
229
230 2022-12-16 Qing Zhao <qing.zhao@oracle.com>
231
232 * c.opt (Wstrict-flex-arrays): New option.
233
234 2022-12-02 Andrew MacLeod <amacleod@redhat.com>
235
236 * c-attribs.cc (handle_deprecated_attribute): Use type when
237 using TYPE_NAME.
238
239 2022-12-02 Jakub Jelinek <jakub@redhat.com>
240
241 PR c++/84469
242 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
243 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
244 to any of the structured binding decls.
245
246 2022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
247 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
248
249 PR driver/107787
250 * c-common.cc (fold_offsetof,
251 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
252 instead of OPT_Warray_bounds.
253
254 2022-11-24 Jakub Jelinek <jakub@redhat.com>
255
256 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
257 with a dot.
258
259 2022-11-23 Andrew Pinski <apinski@marvell.com>
260 Jakub Jelinek <jakub@redhat.com>
261
262 PR c/107127
263 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
264 instead of walk_tree for c_genericize_control_r.
265
266 2022-11-23 Jakub Jelinek <jakub@redhat.com>
267
268 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
269 fcontract-role=, fcontract-semantic=): Add RejectNegative.
270 (fcontract-build-level=): Terminate description with dot.
271
272 2022-11-19 Jakub Jelinek <jakub@redhat.com>
273
274 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
275 value from 202207L to 202211L.
276
277 2022-11-19 Jeff Chapman II <jchapman@lock3software.com>
278 Andrew Sutton <asutton@lock3software.com>
279 Andrew Marmaduke <amarmaduke@lock3software.com>
280 Michael Lopez <mlopez@lock3software.com>
281 Jason Merrill <jason@redhat.com>
282
283 * c.opt: Add contracts flags.
284 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
285 macros.
286
287 2022-11-16 Marek Polacek <polacek@redhat.com>
288
289 PR c++/106649
290 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
291 C++23.
292 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
293 depending on cxx_dialect.
294 * c.opt (Winvalid-constexpr): New option.
295
296 2022-11-16 Jakub Jelinek <jakub@redhat.com>
297
298 * c-common.def (CONCEPT_DECL): New tree, moved here from
299 cp-tree.def.
300 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
301 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
302 attribute on CONCEPT_DECL.
303
304 2022-11-15 Lewis Hyatt <lhyatt@gmail.com>
305
306 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
307 than a hard-coded string.
308
309 2022-11-15 Jakub Jelinek <jakub@redhat.com>
310
311 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
312 __cpp_multidimensional_subscript macro value to 202211L.
313
314 2022-11-15 Patrick Palka <ppalka@redhat.com>
315
316 PR c++/107638
317 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
318 iff SUPPORTS_INIT_PRIORITY.
319
320 2022-11-14 Martin Liska <mliska@suse.cz>
321
322 Revert:
323 2022-11-09 Martin Liska <mliska@suse.cz>
324
325 * c-target.def: Port to RST.
326
327 2022-11-12 Joseph Myers <joseph@codesourcery.com>
328
329 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
330
331 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
332
333 PR c/85487
334 * c-pragma.cc (handle_pragma_ignore): New function.
335 (init_pragma): Register region and endregion pragmas.
336
337 2022-11-09 Martin Liska <mliska@suse.cz>
338
339 * c-target.def: Port to RST.
340
341 2022-11-05 Lewis Hyatt <lhyatt@gmail.com>
342
343 PR preprocessor/55971
344 * c-ppoutput.cc (adjust_for_newlines): Update comment.
345
346 2022-11-03 Jason Merrill <jason@redhat.com>
347
348 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
349 -fconcepts-ts before C++20.
350
351 2022-10-28 Joseph Myers <joseph@codesourcery.com>
352
353 * c-common.cc (def_fn_type): Call build_function_type for
354 zero-argument variable-argument function.
355 (c_common_nodes_and_builtins): Build default_function_type with
356 build_function_type.
357 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
358 option.
359
360 2022-10-28 Joseph Myers <joseph@codesourcery.com>
361
362 PR c/61469
363 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
364 New. Moved from cp/cp-tree.h.
365 * c-warn.cc (warnings_for_convert_and_check): Do not consider
366 conversions to enum with underlying type bool to overflow.
367
368 2022-10-26 Marek Polacek <polacek@redhat.com>
369
370 PR c++/106393
371 * c.opt (Wdangling-reference): New.
372
373 2022-10-19 Joseph Myers <joseph@codesourcery.com>
374
375 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
376 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
377 and FMT_LEN_wf64.
378 (NOARGUMENTS, NOLENGTHS): Update definitions.
379 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
380 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
381 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
382 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
383 (T_UF64, T2X_UF64): New macros.
384 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
385 and wfN length modifiers.
386 (print_char_table, scan_char_table): Add entries using wN and wfN
387 length modifiers.
388
389 2022-10-18 Joseph Myers <joseph@codesourcery.com>
390
391 PR c/36113
392 * c-common.cc (c_common_type_for_size): Add fallback to
393 widest_unsigned_literal_type_node or
394 widest_integer_literal_type_node for precision that may not
395 exactly match the precision of those types.
396
397 2022-10-14 Jakub Jelinek <jakub@redhat.com>
398
399 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
400 predefine __BFLT16_*__ macros and for C++23 also
401 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
402 macros for -fbuilding-libgcc.
403 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
404
405 2022-10-14 Jakub Jelinek <jakub@redhat.com>
406
407 PR middle-end/323
408 PR c++/107097
409 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
410 the tree being specific to C/ObjC.
411 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
412 in C++ the same as in C.
413 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
414 even for C++.
415
416 2022-10-13 Joseph Myers <joseph@codesourcery.com>
417
418 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
419 value 2 for *_IS_IEC_60559.
420
421 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
422
423 PR preprocessor/60014
424 PR preprocessor/60723
425 * c-ppoutput.cc (class token_streamer): Remove member
426 line_marker_emitted to...
427 (token_streamer::stream): ...a local variable here. Set
428 print.prev_was_system_token on all code paths.
429
430 2022-10-10 Nathan Sidwell <nathan@acm.org>
431
432 * c-opts.cc (c_common_post_options): Bump abi to 18.
433
434 2022-10-10 Marek Polacek <polacek@redhat.com>
435
436 PR c++/106937
437 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
438 attributes here.
439 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
440 attributes here.
441 (pp_c_attributes): Remove.
442 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
443 get_attribute_name. Don't print a trailing space when printing the
444 [[]] form.
445 * c-pretty-print.h (pp_c_attributes): Remove.
446
447 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
448
449 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
450 (c_common_attribute_table): New item for strict_flex_array.
451 * c.opt: (fstrict-flex-arrays): New option.
452 (fstrict-flex-arrays=): New option.
453
454 2022-10-07 Martin Liska <mliska@suse.cz>
455
456 * name-hint.h: Use std::move.
457
458 2022-10-07 Jakub Jelinek <jakub@redhat.com>
459
460 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
461 only in gnu namespace or as standard attribute, treat fallthrough
462 attributes in other namespaces like any other unknown attribute.
463
464 2022-10-06 Joseph Myers <joseph@codesourcery.com>
465
466 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
467 typeof_unqual.
468 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
469 (D_EXT11): New macro. Values of subsequent macros updated.
470
471 2022-10-06 Jakub Jelinek <jakub@redhat.com>
472
473 PR c++/106654
474 * c-attribs.cc (handle_assume_attribute): New function.
475 (c_common_attribute_table): Add entry for assume attribute.
476 * c-lex.cc (c_common_has_attribute): Handle
477 __have_cpp_attribute (assume).
478
479 2022-10-04 Jakub Jelinek <jakub@redhat.com>
480
481 * c-omp.cc (c_omp_directives): Uncomment begin declare target
482 entry.
483
484 2022-10-03 Patrick Palka <ppalka@redhat.com>
485
486 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
487 RID_IS_SAME_AS.
488
489 2022-10-03 Joseph Myers <joseph@codesourcery.com>
490
491 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
492 special-case __*_EPSILON__ setting for IBM long double for C2x.
493
494 2022-09-30 Patrick Palka <ppalka@redhat.com>
495
496 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
497 C++ traits.
498 * c-common.h (enum rid): Likewise.
499
500 2022-09-29 Joseph Myers <joseph@codesourcery.com>
501
502 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
503 C.
504
505 2022-09-29 Patrick Palka <ppalka@redhat.com>
506
507 * c-common.cc (c_common_reswords): Add __remove_cv,
508 __remove_reference and __remove_cvref.
509 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
510 and RID_REMOVE_CVREF.
511
512 2022-09-27 Marek Polacek <polacek@redhat.com>
513
514 PR c++/101165
515 PR c++/106882
516 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
517
518 2022-09-27 Marek Polacek <polacek@redhat.com>
519
520 * c-format.cc (c_keywords): Drop nothrow.
521
522 2022-09-27 Jakub Jelinek <jakub@redhat.com>
523
524 PR c++/106651
525 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
526 __cpp_static_call_operator=202207L for C++23.
527
528 2022-09-27 Jakub Jelinek <jakub@redhat.com>
529
530 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
531 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
532 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
533 * c-pragma.cc (omp_pragmas): Add assumes and begin.
534 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
535 (omp_pragmas_simd): Add assume.
536 * c-common.h (c_omp_directives): Declare.
537 * c-omp.cc (omp_directives): Rename to ...
538 (c_omp_directives): ... this. No longer static. Uncomment
539 assume, assumes, begin assumes and end assumes entries.
540 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
541 to PRAGMA_OMP_END.
542 (c_omp_categorize_directive): Adjust for omp_directives to
543 c_omp_directives renaming.
544
545 2022-09-27 Jakub Jelinek <jakub@redhat.com>
546
547 PR c++/106652
548 PR c++/85518
549 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
550 _Float{32,64,128}x flags from D_CONLY to 0.
551 (shorten_binary_op): Punt if common_type returns error_mark_node.
552 (shorten_compare): Likewise.
553 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
554 and _Float{32,64,128}x builtin types if available. For C++
555 clear float128t_type_node.
556 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
557 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
558 * c-lex.cc (interpret_float): For q/Q suffixes prefer
559 float128t_type_node over float128_type_node. Allow
560 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
561 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
562 with pedwarn. Don't call excess_precision_type for C++.
563
564 2022-09-26 Marek Polacek <polacek@redhat.com>
565
566 PR c++/106656
567 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
568 for C++20.
569
570 2022-09-23 Marek Polacek <polacek@redhat.com>
571
572 PR c++/106784
573 * c-common.cc (c_common_reswords): Add __is_convertible and
574 __is_nothrow_convertible.
575 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
576 RID_IS_NOTHROW_CONVERTIBLE.
577
578 2022-09-22 David Malcolm <dmalcolm@redhat.com>
579
580 PR c/106830
581 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
582 values that don't fit in uhwi.
583
584 2022-09-15 Richard Biener <rguenther@suse.de>
585
586 * c-common.h (build_void_list_node): Remove.
587 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
588 void_list_node.
589
590 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
591
592 * c-format.cc (convert_format_name_to_system_name): Fix warning.
593
594 2022-09-07 Joseph Myers <joseph@codesourcery.com>
595
596 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
597 for alignas, alignof, bool, false, static_assert, thread_local and
598 true.
599
600 2022-09-07 Jakub Jelinek <jakub@redhat.com>
601
602 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
603 " in comments" from description.
604 (Wunicode): New option.
605
606 2022-09-06 Jakub Jelinek <jakub@redhat.com>
607
608 PR c/106836
609 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
610
611 2022-09-03 Jakub Jelinek <jakub@redhat.com>
612
613 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
614 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
615 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
616 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
617
618 2022-09-02 David Malcolm <dmalcolm@redhat.com>
619
620 PR c/90885
621 * c-common.h (check_for_xor_used_as_pow): New decl.
622 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
623 * c-warn.cc (check_for_xor_used_as_pow): New.
624 * c.opt (Wxor-used-as-pow): New.
625
626 2022-09-01 Jason Merrill <jason@redhat.com>
627
628 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
629 char8_t.
630 (braced_list_to_string): Check for char-sized elements.
631
632 2022-09-01 Jakub Jelinek <jakub@redhat.com>
633
634 PR c++/106655
635 * c.opt (-Winvalid-utf8): New warning.
636 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
637 Set cpp_opts->cpp_input_charset_explicit.
638 (c_common_post_options): If -finput-charset=UTF-8 is explicit
639 in C++23, enable -Winvalid-utf8 by default and if -pedantic
640 or -pedantic-errors, make it a pedwarn.
641
642 2022-08-31 Joseph Myers <joseph@codesourcery.com>
643
644 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
645 for LABEL_DECL.
646 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
647 decl_attributes.
648 * c-common.h (do_case, c_add_case_label): Update declarations.
649 * c-lex.cc (c_common_has_attribute): For C, produce a result of
650 201910 for fallthrough and 202106 for maybe_unused.
651
652 2022-08-26 Marek Polacek <polacek@redhat.com>
653
654 PR c++/81159
655 * c.opt (Wself-move): New option.
656
657 2022-08-26 Jakub Jelinek <jakub@redhat.com>
658
659 * c-common.cc (check_builtin_function_arguments): Handle
660 BUILT_IN_ISSIGNALING.
661
662 2022-08-26 Jakub Jelinek <jakub@redhat.com>
663
664 PR c++/106648
665 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
666 __cpp_named_character_escapes to 202207L.
667
668 2022-08-25 Marek Polacek <polacek@redhat.com>
669
670 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
671 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
672 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
673 (struct c_common_resword): Resize the disable member.
674 (D_C2X): Add.
675 (nullptr_node): Define.
676 (nullptr_type_node): Define.
677 (NULLPTR_TYPE_P): Define.
678 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
679 NULLPTR_TYPE.
680 (c_pretty_printer::direct_abstract_declarator): Likewise.
681 (c_pretty_printer::constant): Likewise.
682
683 2022-08-16 Tom Honermann <tom@honermann.net>
684
685 PR c++/106423
686 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
687 diagnostics in C++20 and later.
688 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
689
690 2022-08-11 Marek Polacek <polacek@redhat.com>
691
692 PR middle-end/102633
693 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
694 suppress_warning here.
695
696 2022-08-08 Tom Honermann <tom@honermann.net>
697
698 PR preprocessor/106426
699 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
700 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
701
702 2022-08-08 Tom Honermann <tom@honermann.net>
703
704 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
705 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
706 enabled.
707 * c-opts.cc (c_common_post_options): Set flag_char8_t if
708 targeting C2x.
709
710 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
711
712 PR c++/66290
713 * c-common.h: Rename global done_lexing to
714 override_libcpp_locations.
715 * c-common.cc (c_cpp_diagnostic): Likewise.
716 * c-opts.cc (c_common_finish): Set override_libcpp_locations
717 (formerly done_lexing) immediately prior to calling cpp_finish ().
718
719 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
720
721 * c-ppoutput.cc (token_streamer::stream): Update input_location
722 prior to streaming each token.
723
724 2022-07-23 Immad Mir <mirimmad@outlook.com>
725
726 * c-attribs.cc: (c_common_attribute_table): add three new attributes
727 namely: fd_arg, fd_arg_read and fd_arg_write.
728 (handle_fd_arg_attribute): New.
729
730 2022-07-15 Marek Polacek <polacek@redhat.com>
731
732 PR c++/104477
733 * c-common.cc (c_common_reswords): Add
734 __reference_constructs_from_temporary and
735 __reference_converts_from_temporary.
736 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
737 RID_REF_CONVERTS_FROM_TEMPORARY.
738
739 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
740
741 * c-format.cc (class range_label_for_format_type_mismatch):
742 Adjust to new label_text API.
743
744 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
745
746 PR preprocessor/106252
747 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
748 option argument prior to verifying the option was found.
749
750 2022-07-07 David Malcolm <dmalcolm@redhat.com>
751
752 * c-format.cc (range_label_for_format_type_mismatch::get_text):
753 Update for removal of label_text::maybe_free in favor of automatic
754 memory management.
755
756 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
757
758 PR preprocessor/53920
759 PR c++/53431
760 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
761 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
762 (c_pp_stream_token): Declare.
763 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
764 pragmas to...
765 (should_output_pragmas): ...here. New function.
766 (token_streamer::stream): Support handling early pragmas.
767 (do_line_change): Likewise.
768 (c_pp_stream_token): New function.
769 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
770 (pragma_diagnostic_lex_normal): New function. Moved logic for
771 interpreting GCC diagnostic pragmas here.
772 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
773 directly from libcpp.
774 (handle_pragma_diagnostic): Refactor into helper function...
775 (handle_pragma_diagnostic_impl): ...here. New function.
776 (handle_pragma_diagnostic_early): New function.
777 (handle_pragma_diagnostic_early_pp): New function.
778 (struct pragma_ns_name): Renamed to...
779 (struct pragma_pp_data): ...this. Add new "early_handler" member.
780 (c_register_pragma_1): Support early pragmas in the preprocessor.
781 (c_register_pragma_with_early_handler): New function.
782 (c_register_pragma): Support the new early handlers in struct
783 internal_pragma_handler.
784 (c_register_pragma_with_data): Likewise.
785 (c_register_pragma_with_expansion): Likewise.
786 (c_register_pragma_with_expansion_and_data): Likewise.
787 (c_invoke_early_pragma_handler): New function.
788 (c_pp_invoke_early_pragma_handler): New function.
789 (init_pragma): Add early pragma support for diagnostic pragmas.
790 * c-pragma.h (struct internal_pragma_handler): Add new early handler
791 members.
792 (c_register_pragma_with_early_handler): Declare.
793 (c_invoke_early_pragma_handler): Declare.
794 (c_pp_invoke_early_pragma_handler): Declare.
795
796 2022-07-05 Marek Polacek <polacek@redhat.com>
797
798 PR c++/105626
799 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
800 u8 strings.
801
802 2022-07-01 Marek Polacek <polacek@redhat.com>
803
804 PR c++/106111
805 * c-common.h (enum rid): Update RID_LAST_CXX20.
806
807 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
808
809 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
810 names.
811
812 2022-06-24 Jason Merrill <jason@redhat.com>
813
814 PR c++/87729
815 PR c++/20423
816 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
817
818 2022-06-18 Jakub Jelinek <jakub@redhat.com>
819
820 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
821 Use flag_sanitize_trap & SANITIZE_??? instead of
822 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
823 and flag_sanitize_trap differs for them, emit __builtin_trap only
824 for the comparison where trap is requested.
825 (ubsan_instrument_vla, ubsan_instrument_return): Use
826 lag_sanitize_trap & SANITIZE_??? instead of
827 flag_sanitize_undefined_trap_on_error.
828
829 2022-06-13 Jason Merrill <jason@redhat.com>
830
831 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
832
833 2022-05-27 Marek Polacek <polacek@redhat.com>
834
835 PR c/90658
836 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
837
838 2022-05-27 Jakub Jelinek <jakub@redhat.com>
839
840 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
841
842 2022-05-20 David Malcolm <dmalcolm@redhat.com>
843
844 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
845 and "override".
846 * c-pretty-print.h: Likewise.
847
848 2022-05-18 Marek Polacek <polacek@redhat.com>
849
850 PR c/105131
851 * c.opt (Wenum-int-mismatch): New.
852
853 2022-05-18 Marek Polacek <polacek@redhat.com>
854
855 PR c++/105497
856 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
857 enumerator when it was marked with attribute unused.
858
859 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
860
861 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
862 floating-point complex types.
863 <POINTER_TYPE>: Do not use limited_with clause if the designated
864 type is a scalar type.
865
866 2022-05-17 Jakub Jelinek <jakub@redhat.com>
867
868 * c-omp.cc (c_finish_omp_depobj): Handle
869 OMP_CLAUSE_DEPEND_INOUTSET.
870
871 2022-05-16 Jason Merrill <jason@redhat.com>
872
873 PR c/105492
874 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
875 here.
876
877 2022-05-16 Martin Liska <mliska@suse.cz>
878
879 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
880 (c_common_nodes_and_builtins): Likewise.
881 * c-format.cc (check_tokens): Likewise.
882 (check_plain): Likewise.
883 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
884 (init_pragma): Likewise.
885 * known-headers.cc (get_string_macro_hint): Likewise.
886 (get_stdlib_header_for_name): Likewise.
887 * c-attribs.cc: Likewise.
888
889 2022-05-13 Richard Biener <rguenther@suse.de>
890
891 * c-omp.cc: Remove gimple-fold.h include.
892
893 2022-05-12 Jakub Jelinek <jakub@redhat.com>
894
895 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
896 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
897 if null_pointer_node.
898
899 2022-05-11 Martin Liska <mliska@suse.cz>
900
901 PR target/105355
902 * c-opts.cc (c_common_handle_option): Change option name.
903 * c.opt: Remove Joined and use Separate option.
904
905 2022-05-09 Alex Coplan <alex.coplan@arm.com>
906
907 * c-common.h (get_dump_info): Delete.
908 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
909 from the global dump_manager instead of the (now obsolete)
910 get_dump_info.
911 * c-opts.cc (original_dump_file): Delete.
912 (original_dump_flags): Delete.
913 (c_common_parse_file): Switch to using global dump_manager to
914 manage the original dump file; fix leak of dump file.
915 (get_dump_info): Delete.
916
917 2022-05-07 Marek Polacek <polacek@redhat.com>
918
919 PR c++/101833
920 PR c++/47634
921 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
922 with FN being either a function declaration or function type. Use
923 maybe_adjust_arg_pos_for_attribute.
924 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
925 check_function_format.
926 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
927 (positional_argument): Adjust.
928 * c-format.cc (get_constant): Rename to ...
929 (validate_constant): ... this. Take EXPR by reference. Return bool
930 instead of tree.
931 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
932 return value of validate_constant.
933 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
934 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
935 (check_function_format): Adjust a parameter name.
936 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
937
938 2022-05-04 Marek Polacek <polacek@redhat.com>
939
940 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
941 char to int.
942
943 2022-04-30 Jason Merrill <jason@redhat.com>
944
945 PR c/100545
946 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
947 and typedef.
948 * c-common.cc (set_underlying_type): Add assert.
949
950 2022-04-26 Patrick Palka <ppalka@redhat.com>
951
952 PR c++/105304
953 * c-common.cc (verify_tree) [restart]: Move up to before the
954 NULL test.
955
956 2022-04-11 Jakub Jelinek <jakub@redhat.com>
957
958 PR c++/105186
959 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
960 and __int%d__ builtin types, initialize corresponding ridpointers
961 entry.
962
963 2022-03-30 Marek Polacek <polacek@redhat.com>
964
965 PR c++/101030
966 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
967 conversion_warning when OP1 is null.
968
969 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
970
971 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
972 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
973 option properties.
974
975 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
976
977 * c.opt (Wuse-after-free): Remove.
978
979 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
980
981 * c.opt (Warray-bounds): Remove.
982
983 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
984
985 * c.opt: Properly quote comment.
986
987 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
988
989 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
990 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
991 the referenced type instead. Deal with the anonymous original type
992 of a typedef'ed type. In the actual access case, follow the chain
993 of external subtypes.
994 <TYPE_DECL>: Tidy up control flow.
995
996 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
997
998 * c-ada-spec.cc: Change array length
999
1000 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1001
1002 * c-common.cc (c_family_tests): Call the new tests.
1003 * c-common.h (c_diagnostic_tests): Declare.
1004 (c_opt_problem_cc_tests): Likewise.
1005
1006 2022-03-19 Jakub Jelinek <jakub@redhat.com>
1007
1008 PR c++/101515
1009 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1010 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1011 be printed.
1012
1013 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1014 Roger Sayle <roger@nextmovesoftware.com>
1015
1016 PR c/98198
1017 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1018
1019 2022-03-16 Patrick Palka <ppalka@redhat.com>
1020
1021 PR c++/96780
1022 * c.opt: Add -ffold-simple-inlines.
1023
1024 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
1025
1026 * c-target.def (check_string_object_format_arg): Fix description typo.
1027
1028 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1029
1030 PR other/65095
1031 * c-common.h (c_omp_map_clause_name): Remove.
1032 * c-omp.cc (c_omp_map_clause_name): Remove.
1033
1034 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c/104711
1037 * c-opts.cc (c_common_post_options): Don't enable
1038 -Wshift-negative-value from -Wextra for C++20 or later.
1039 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1040 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1041 instead of TYPE_UNSIGNED.
1042
1043 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1044
1045 * c-attribs.cc: Fix up duplicated word issue in a comment.
1046
1047 2022-03-01 Martin Liska <mliska@suse.cz>
1048
1049 PR ipa/104533
1050 * c-attribs.cc (handle_target_clones_attribute): Use
1051 get_target_clone_attr_len and report warning soon.
1052
1053 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1054
1055 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1056 (handle_pragma_weak): Likewise.
1057 (handle_pragma_scalar_storage_order): Likewise.
1058 (handle_pragma_redefine_extname): Likewise.
1059 (handle_pragma_visibility): Likewise.
1060 (handle_pragma_diagnostic): Likewise.
1061 (handle_pragma_target): Likewise.
1062 (handle_pragma_optimize): Likewise.
1063 (handle_pragma_push_options): Likewise.
1064 (handle_pragma_pop_options): Likewise.
1065 (handle_pragma_reset_options): Likewise.
1066 (handle_pragma_message): Likewise.
1067 (handle_pragma_float_const_decimal64): Likewise.
1068
1069 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1070
1071 PR c/104531
1072 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1073 build_binary_op with LT_EXPR and only if that doesn't return
1074 error_mark_node call build_modify_expr.
1075
1076 2022-02-16 Jakub Jelinek <jakub@redhat.com>
1077
1078 PR c/104510
1079 * c-common.cc (shorten_compare): Convert original arguments to
1080 the original *restype_ptr when mixing binary and decimal float.
1081
1082 2022-02-14 Richard Biener <rguenther@suse.de>
1083
1084 PR c/104505
1085 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1086 internal function calls.
1087
1088 2022-02-11 Richard Biener <rguenther@suse.de>
1089
1090 * c-attribs.cc (c_common_attribute_table): Add entry for
1091 vector_mask.
1092 (handle_vector_mask_attribute): New.
1093
1094 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1095
1096 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1097 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1098 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1099
1100 2022-02-09 Jason Merrill <jason@redhat.com>
1101
1102 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1103 of __cpp_constexpr and __cpp_concepts for C++20.
1104
1105 2022-01-24 Marek Polacek <polacek@redhat.com>
1106
1107 PR preprocessor/104030
1108 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1109
1110 2022-01-21 Jakub Jelinek <jakub@redhat.com>
1111
1112 PR c++/104148
1113 * c-common.h (check_function_arguments_recurse): Add for_format
1114 arg.
1115 * c-common.cc (check_function_nonnull): Pass false to
1116 check_function_arguments_recurse's last argument.
1117 (check_function_arguments_recurse): Add for_format argument,
1118 if true, don't stop on warning_suppressed_p.
1119 * c-format.cc (check_format_info): Pass true to
1120 check_function_arguments_recurse's last argument.
1121
1122 2022-01-19 David Malcolm <dmalcolm@redhat.com>
1123
1124 * c-common.cc (c_common_c_tests): Rename to...
1125 (c_common_cc_tests): ...this.
1126 (c_family_tests): Update calls for .c to .cc renaming.
1127 * c-common.h (c_format_c_tests): Rename to...
1128 (c_format_cc_tests): ...this.
1129 (c_indentation_c_tests): Rename to...
1130 (c_indentation_cc_tests): ...this.
1131 (c_pretty_print_c_tests): Rename to...
1132 (c_pretty_print_cc_tests): ...this.
1133 * c-format.cc (c_format_c_tests): Rename to...
1134 (c_format_cc_tests): ...this.
1135 * c-indentation.cc (c_indentation_c_tests): Rename to...
1136 (c_indentation_cc_tests): ...this.
1137 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1138 (c_pretty_print_cc_tests): ...this.
1139
1140 2022-01-17 Martin Liska <mliska@suse.cz>
1141
1142 * c-ada-spec.cc: Rename .c names to .cc.
1143 * c-ada-spec.h: Likewise.
1144 * c-common.cc (c_build_vec_convert): Likewise.
1145 (warning_candidate_p): Likewise.
1146 * c-common.h (enum rid): Likewise.
1147 (build_real_imag_expr): Likewise.
1148 (finish_label_address_expr): Likewise.
1149 (c_get_substring_location): Likewise.
1150 (c_build_bind_expr): Likewise.
1151 (conflict_marker_get_final_tok_kind): Likewise.
1152 (c_parse_error): Likewise.
1153 (check_missing_format_attribute): Likewise.
1154 (invalid_array_size_error): Likewise.
1155 (warn_for_multistatement_macros): Likewise.
1156 (build_attr_access_from_parms): Likewise.
1157 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1158 * c-format.cc: Likewise.
1159 * c-gimplify.cc (c_gimplify_expr): Likewise.
1160 * c-indentation.h: Likewise.
1161 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1162 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1163 * c-opts.cc (c_common_post_options): Likewise.
1164 (set_std_cxx23): Likewise.
1165 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1166 * c-pretty-print.h: Likewise.
1167
1168 2022-01-17 Martin Liska <mliska@suse.cz>
1169
1170 * c-ada-spec.c: Moved to...
1171 * c-ada-spec.cc: ...here.
1172 * c-attribs.c: Moved to...
1173 * c-attribs.cc: ...here.
1174 * c-common.c: Moved to...
1175 * c-common.cc: ...here.
1176 * c-cppbuiltin.c: Moved to...
1177 * c-cppbuiltin.cc: ...here.
1178 * c-dump.c: Moved to...
1179 * c-dump.cc: ...here.
1180 * c-format.c: Moved to...
1181 * c-format.cc: ...here.
1182 * c-gimplify.c: Moved to...
1183 * c-gimplify.cc: ...here.
1184 * c-indentation.c: Moved to...
1185 * c-indentation.cc: ...here.
1186 * c-lex.c: Moved to...
1187 * c-lex.cc: ...here.
1188 * c-omp.c: Moved to...
1189 * c-omp.cc: ...here.
1190 * c-opts.c: Moved to...
1191 * c-opts.cc: ...here.
1192 * c-pch.c: Moved to...
1193 * c-pch.cc: ...here.
1194 * c-ppoutput.c: Moved to...
1195 * c-ppoutput.cc: ...here.
1196 * c-pragma.c: Moved to...
1197 * c-pragma.cc: ...here.
1198 * c-pretty-print.c: Moved to...
1199 * c-pretty-print.cc: ...here.
1200 * c-semantics.c: Moved to...
1201 * c-semantics.cc: ...here.
1202 * c-ubsan.c: Moved to...
1203 * c-ubsan.cc: ...here.
1204 * c-warn.c: Moved to...
1205 * c-warn.cc: ...here.
1206 * cppspec.c: Moved to...
1207 * cppspec.cc: ...here.
1208 * stub-objc.c: Moved to...
1209 * stub-objc.cc: ...here.
1210
1211 2022-01-15 Martin Sebor <msebor@redhat.com>
1212
1213 PR c/63272
1214 * c.opt (-Wdangling-pointer): New option.
1215
1216 2022-01-15 Martin Sebor <msebor@redhat.com>
1217
1218 PR tree-optimization/80532
1219 * c.opt (-Wuse-after-free): New options.
1220
1221 2022-01-14 David Malcolm <dmalcolm@redhat.com>
1222
1223 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1224 (handle_tainted_args_attribute): New.
1225
1226 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1227 Jason Merrill <jason@redhat.com>
1228
1229 PR c++/70417
1230 * c.opt: Added -Wmissing-template-keyword.
1231
1232 2022-01-13 Richard Biener <rguenther@suse.de>
1233
1234 PR c/104002
1235 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1236
1237 2022-01-12 Martin Liska <mliska@suse.cz>
1238
1239 PR target/103804
1240 * c-attribs.c (handle_optimize_attribute): Do not call
1241 cl_optimization_compare if we seen an error.
1242
1243 2022-01-11 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR c/101537
1246 PR c/103881
1247 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1248 and BIT_XOR_EXPR.
1249
1250 2022-01-10 Richard Biener <rguenther@suse.de>
1251
1252 PR middle-end/101530
1253 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1254 in a TARGET_EXPR to force a temporary.
1255
1256 2022-01-06 Marek Polacek <polacek@redhat.com>
1257
1258 PR c++/103758
1259 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1260 diagnostic messages.
1261 (handle_pragma_diagnostic): Likewise.
1262
1263 2022-01-03 Marek Polacek <polacek@redhat.com>
1264
1265 PR c++/103758
1266 * c-format.c (check_tokens): Accept "decl-specifier*".
1267
1268 2022-01-03 Jakub Jelinek <jakub@redhat.com>
1269
1270 PR c++/103600
1271 * c-attribs.c (handle_non_overlapping_attribute): New function.
1272 (c_common_attribute_table): Add "non overlapping" attribute.
1273
1274 2021-12-30 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c++/103012
1277 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1278 cpp_define_unused/cpp_undef calls with forced token locations
1279 BUILTINS_LOCATION.
1280
1281 2021-12-27 Patrick Palka <ppalka@redhat.com>
1282
1283 PR c++/103700
1284 * c-common.c (pointer_int_sum): When quiet, return
1285 error_mark_node for an incomplete pointed-to type and don't
1286 call size_in_bytes_loc.
1287
1288 2021-12-17 Jason Merrill <jason@redhat.com>
1289
1290 PR c++/103681
1291 * c-opts.c (c_common_post_options): Update defaults.
1292
1293 2021-12-16 Martin Liska <mliska@suse.cz>
1294
1295 PR target/103709
1296 * c-pragma.c (handle_pragma_pop_options): Do not check
1297 global options modification when an error is seen in parsing
1298 of options (pragmas or attributes).
1299
1300 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1301
1302 * known-headers.cc: Define INCLUDE_MEMORY instead of
1303 INCLUDE_UNIQUE_PTR.
1304 * name-hint.h: Likewise.
1305 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1306
1307 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1308
1309 PR pch/71934
1310 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1311 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1312
1313 2021-12-03 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR pch/71934
1316 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1317 (pch_init): Don't initialize v.pch_init.
1318 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1319
1320 2021-12-01 Jason Merrill <jason@redhat.com>
1321
1322 PR c++/103310
1323 * c.opt: Add -fconstexpr-fp-except.
1324
1325 2021-11-29 Richard Biener <rguenther@suse.de>
1326
1327 * c-format.c (check_format_string): Remove spurious
1328 gcc_unreachable.
1329
1330 2021-11-29 Richard Biener <rguenther@suse.de>
1331
1332 * c-opts.c (c_common_post_options): Remove unreachable return.
1333 * c-pragma.c (handle_pragma_target): Likewise.
1334 (handle_pragma_optimize): Likewise.
1335
1336 2021-11-25 Jakub Jelinek <jakub@redhat.com>
1337
1338 PR c++/102611
1339 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1340 default for C++23 regardless of warn_deprecated.
1341 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1342 __cpp_multidimensional_subscript=202110L for C++23.
1343
1344 2021-11-23 Martin Sebor <msebor@redhat.com>
1345
1346 PR middle-end/88232
1347 * c.opt: Add -Winfinite-recursion.
1348
1349 2021-11-19 Martin Sebor <msebor@redhat.com>
1350
1351 PR c++/33925
1352 PR c/102867
1353 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1354 and improve handling tof defined symbols.
1355
1356 2021-11-19 Martin Liska <mliska@suse.cz>
1357
1358 Revert:
1359 2021-11-18 Martin Liska <mliska@suse.cz>
1360
1361 * c-gimplify.c (genericize_c_loop): Use option directly.
1362
1363 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1364
1365 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1366 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1367
1368 2021-11-18 Martin Liska <mliska@suse.cz>
1369
1370 * c-gimplify.c (genericize_c_loop): Use option directly.
1371
1372 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1373
1374 PR c/91038
1375 PR c/29970
1376 * c-common.c (pointer_int_sum): Make sure pointer expressions
1377 are evaluated first when the size expression depends on for
1378 variably-modified types.
1379
1380 2021-11-17 Marek Polacek <polacek@redhat.com>
1381
1382 PR preprocessor/103026
1383 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1384
1385 2021-11-16 Jason Merrill <jason@redhat.com>
1386
1387 * c-common.c (release_tree_vector): Only cache vecs smaller than
1388 16 elements.
1389
1390 2021-11-15 Jason Merrill <jason@redhat.com>
1391
1392 * c.opt: Add -fimplicit-constexpr.
1393 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1394 * c-opts.c (c_common_post_options): Disable below C++14.
1395
1396 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1397
1398 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1399 Duplicate to both OMP_TARGET and OMP_TEAMS.
1400
1401 2021-11-10 Marek Polacek <polacek@redhat.com>
1402
1403 PR c++/101940
1404 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1405 ignored_attributes.
1406
1407 2021-11-09 David Malcolm <dmalcolm@redhat.com>
1408
1409 * c-pragma.c (GCC_BAD_AT): New macro.
1410 (GCC_BAD2_AT): New macro.
1411 (handle_pragma_pack): Use the location of the pertinent token when
1412 issuing diagnostics about invalid constants/actions, and trailing
1413 junk.
1414 (handle_pragma_target): Likewise for non-string "GCC option".
1415 (handle_pragma_message): Likewise for trailing junk.
1416
1417 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1418
1419 PR c/103031
1420 * c-common.c (convert_and_check): Add argument init_const. Call
1421 convert_init if init_const.
1422 * c-common.h (convert_and_check): Update prototype.
1423 (convert_init): New prototype.
1424
1425 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1426
1427 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1428 CPP_OTHER tokens, set the "escape on output" flag.
1429
1430 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1431
1432 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1433 POINTER_PLUS_EXPR.
1434 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1435 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1436
1437 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1438
1439 PR c++/102854
1440 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1441 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1442 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1443 conversions temporarily clear the 3rd bit from d->kind while walking
1444 subtrees.
1445 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1446 if possibly non-rectangular.
1447
1448 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1449
1450 PR middle-end/64888
1451 * c-omp.c (c_omp_predefined_variable): Return true also for
1452 ubsan_create_data created artificial variables.
1453
1454 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1455
1456 * c-format.c (printf_length_specs, scanf_length_specs)
1457 (print_char_table, scan_char_table): Support DFP formats for C2X.
1458 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1459 (T2X_D32, T2X_D64, T2X_D128): New macros.
1460
1461 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1462
1463 * c-omp.c (c_omp_check_context_selector): Rename to
1464 omp_check_context_selector and move to omp-general.c.
1465 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1466 move to omp-general.c.
1467
1468 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1469
1470 * c-format.c (print_char_table): Add %b and %B formats.
1471 (scan_char_table): Add %b format.
1472 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1473 (T2X_UPD, T2X_UIM): New macros.
1474
1475 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1476
1477 * c-omp.c (c_finish_omp_atomic): Use
1478 clear_padding_type_may_have_padding_p.
1479
1480 2021-10-08 Martin Liska <mliska@suse.cz>
1481
1482 * c-opts.c (c_common_post_options): Use new macro
1483 OPTION_SET_P.
1484
1485 2021-10-07 Martin Liska <mliska@suse.cz>
1486
1487 * c-common.c (parse_optimize_options): Make
1488 save_opt_decoded_options a pointer type.
1489
1490 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR tree-optimization/102571
1493 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1494 padding, but the non-padding bits are contiguous set of bytes
1495 by adjusting the memcmp call arguments instead of emitting
1496 __builtin_clear_padding and then comparing all the type's bytes.
1497
1498 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c++/102612
1501 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1502 __cpp_constexpr to 202110L rather than 201907L.
1503
1504 2021-10-04 Marek Polacek <polacek@redhat.com>
1505
1506 PR c++/97573
1507 * c-common.h (do_warn_array_compare): Declare.
1508 * c-warn.c (do_warn_array_compare): New.
1509 * c.opt (Warray-compare): New option.
1510
1511 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1512
1513 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1514 NULL, this is not needed.
1515
1516 2021-10-01 Martin Sebor <msebor@redhat.com>
1517
1518 PR c/102103
1519 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1520 Check and perform warning suppression.
1521 (c_common_truthvalue_conversion): Enhance warning suppression.
1522
1523 2021-10-01 Martin Liska <mliska@suse.cz>
1524
1525 PR target/102552
1526 * c-common.c (parse_optimize_options): decoded_options[0] is
1527 used for program name, so merged_decoded_options should also
1528 respect that.
1529
1530 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1531 Richard Biener <rguenther@suse.de>
1532
1533 PR sanitizer/102515
1534 * c-ubsan.c (ubsan_instrument_division): Check the right
1535 flag_sanitize_recover bit, depending on which sanitization
1536 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1537 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1538 and SANITIZE_DIVIDE is enabled, neither check is known
1539 to be false and flag_sanitize_recover bits for those two
1540 aren't the same, emit both __ubsan_handle_divrem_overflow
1541 and __ubsan_handle_divrem_overflow_abort calls.
1542
1543 2021-10-01 Martin Liska <mliska@suse.cz>
1544
1545 * c-common.c (parse_optimize_options): Combine optimize
1546 options with what was provided on the command line.
1547
1548 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1549
1550 * c-omp.c (c_omp_split_clauses): Also copy
1551 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1552
1553 2021-09-27 Martin Liska <mliska@suse.cz>
1554
1555 * c-opts.c (c_common_init_options_struct): Set also
1556 x_flag_default_complex_method.
1557
1558 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1559
1560 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1561
1562 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1563
1564 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1565 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1566 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1567 __ROUNDING_MATH__ according to the new optimization flags.
1568
1569 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1570
1571 * c-omp.c (c_omp_split_clauses): Split order clause also to
1572 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1573
1574 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1575
1576 * c-omp.c (c_finish_omp_atomic): Avoid creating
1577 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1578 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1579 had NULL initializer. When omitting operands after v = x,
1580 use type of v rather than type of x. Fix type of vtmp
1581 TARGET_EXPR.
1582
1583 2021-09-13 Jason Merrill <jason@redhat.com>
1584
1585 * c.opt: Add -Winterference-size.
1586 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1587 and __GCC_CONSTRUCTIVE_SIZE.
1588
1589 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1590
1591 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1592 * c-omp.c: Include gimple-fold.h.
1593 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1594 OpenMP 5.1 atomics.
1595
1596 2021-09-09 qing zhao <qing.zhao@oracle.com>
1597
1598 * c-attribs.c (handle_uninitialized_attribute): New function.
1599 (c_common_attribute_table): Add "uninitialized" attribute.
1600
1601 2021-09-08 liuhongt <hongtao.liu@intel.com>
1602
1603 * c-common.c (excess_precision_mode_join): Update below comments.
1604 (c_ts18661_flt_eval_method): Set excess_precision_type to
1605 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1606 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1607 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1608 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1609
1610 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1611
1612 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1613
1614 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1615
1616 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1617 and -gnatwu warning for the package specification.
1618
1619 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1620
1621 * c-attribs.c (handle_unavailable_attribute): New.
1622
1623 2021-08-30 Jason Merrill <jason@redhat.com>
1624
1625 * c.opt: Add -Wmissing-requires.
1626
1627 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1628
1629 PR other/93067
1630 * c-opts.c (c_common_input_charset_cb): New function.
1631 (c_common_post_options): Call new function
1632 diagnostic_initialize_input_context().
1633
1634 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1635
1636 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1637 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1638 "di" and "u", respecitively; fill with BADLEN to match
1639 size of 'types'.
1640 (get_init_dynamic_hwi): Split off from ...
1641 (init_dynamic_diag_info): ... here. Call it.
1642 (init_dynamic_gfc_info): Call it.
1643
1644 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1645
1646 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1647 * c-pragma.c (omp_pragmas): Add error directive.
1648 * c-omp.c (omp_directives): Uncomment error directive entry.
1649
1650 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1651
1652 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1653 * c-pragma.c (omp_pragmas): Add nothing directive.
1654 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1655
1656 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1657
1658 PR c++/101539
1659 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1660 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1661
1662 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1663
1664 * c-opts.c (c_common_post_options): Default to
1665 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1666
1667 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1668
1669 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1670 * c-pragma.c (omp_pragmas): Add scope construct.
1671 * c-omp.c (omp_directives): Uncomment scope directive entry.
1672
1673 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1674
1675 * c-cppbuiltin.c (c_cpp_builtins): Define
1676 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1677
1678 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1679
1680 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1681 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1682 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1683 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1684 enumerator.
1685 (c_finish_omp_masked): Declare.
1686 * c-omp.c (c_finish_omp_masked): New function.
1687 (c_omp_split_clauses): Handle combined masked constructs.
1688
1689 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1690
1691 PR c++/101539
1692 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1693 * c-common.c (c_common_reswords): Add
1694 __is_pointer_interconvertible_base_of.
1695
1696 2021-07-29 Richard Biener <rguenther@suse.de>
1697
1698 PR c/101512
1699 * c-common.c (c_common_mark_addressable_vec): Look through
1700 C_MAYBE_CONST_EXPR even if not at the toplevel.
1701
1702 2021-07-27 Martin Sebor <msebor@redhat.com>
1703
1704 PR c/101585
1705 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1706
1707 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1708
1709 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1710 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1711 and later.
1712
1713 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1714
1715 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1716 PRAGMA_OMP__LAST_ enumerators.
1717
1718 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1719 Joseph Myers <joseph@codesourcery.com>
1720 Cesar Philippidis <cesar@codesourcery.com>
1721
1722 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1723
1724 2021-07-20 Martin Sebor <msebor@redhat.com>
1725
1726 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1727 by-const-reference.
1728 * c-common.h (c_build_shufflevector): Same.
1729
1730 2021-07-16 Andrew Pinski <apinski@marvell.com>
1731
1732 PR c/101453
1733 * c-common.c (parse_optimize_options): Use the correct
1734 size for buffer.
1735
1736 2021-07-15 Martin Sebor <msebor@redhat.com>
1737
1738 PR c/101289
1739 PR c/97548
1740 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1741
1742 2021-07-14 Jason Merrill <jason@redhat.com>
1743
1744 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1745
1746 2021-07-06 Martin Sebor <msebor@redhat.com>
1747
1748 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1749 (gcc_cdiag_char_table): Same.
1750 (gcc_cxxdiag_char_table): Same.
1751
1752 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1753
1754 * c-common.h (enum c_omp_directive_kind): New enum.
1755 (struct c_omp_directive): New type.
1756 (c_omp_categorize_directive): Declare.
1757 * c-omp.c (omp_directives): New variable.
1758 (c_omp_categorize_directive): New function.
1759
1760 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1761
1762 * c-ada-spec.c (packed_layout): New global variable.
1763 (dump_ada_declaration): Set it upon seeing a packed record type.
1764 Do not put the "aliased" keyword if it is set.
1765 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1766
1767 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1768
1769 * c-ada-spec.c (check_name): Rename into...
1770 (check_type_name_conflict): ...this. Minor tweak.
1771 (dump_ada_function_declaration): Adjust to above renaming.
1772 (dump_ada_array_domains): Fix oversight.
1773 (dump_ada_declaration): Call check_type_name_conflict for variables.
1774
1775 2021-06-25 Martin Sebor <msebor@redhat.com>
1776
1777 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1778 (c_common_truthvalue_conversion): Replace direct uses of
1779 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1780 copy_no_warning.
1781 (check_function_arguments_recurse): Same.
1782 * c-gimplify.c (c_gimplify_expr): Same.
1783 * c-warn.c (overflow_warning): Same.
1784 (warn_logical_operator): Same.
1785 (warn_if_unused_value): Same.
1786 (do_warn_unused_parameter): Same.
1787
1788 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1789
1790 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1791 C_ORT_OMP_TARGET.
1792 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1793 combined target constructs also add map (always, tofrom:) clause.
1794
1795 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1796
1797 * c-attribs.c (common_handle_aligned_attribute): Remove short
1798 circuit and dead code.
1799
1800 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1801
1802 PR c++/101052
1803 * known-headers.cc (get_stdlib_header_for_name): Add known
1804 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1805 exit, and getenv.
1806
1807 2021-06-12 Jason Merrill <jason@redhat.com>
1808
1809 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1810
1811 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR c++/100974
1814 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1815 -std=c++2b for P1938R3 consteval if support.
1816
1817 2021-06-09 Jason Merrill <jason@redhat.com>
1818
1819 PR c++/100879
1820 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1821 warning.
1822
1823 2021-06-07 Martin Liska <mliska@suse.cz>
1824
1825 * c-target.def: Split long lines and replace them
1826 with '\n\'.
1827
1828 2021-06-04 Martin Sebor <msebor@redhat.com>
1829
1830 PR c/100783
1831 * c-attribs.c (positional_argument): Bail on erroneous types.
1832
1833 2021-06-04 Martin Sebor <msebor@redhat.com>
1834
1835 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1836 for element presence.
1837
1838 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1839
1840 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1841 (dump_ada_decl_name): Likewise.
1842 (dump_anonymous_type_name): Remove parent parameter and adjust.
1843 (dump_sloc): Minor tweak.
1844 (dump_ada_array_type): Remove type parameter and adjust.
1845 (dump_ada_enum_type): Remove parent parameter and adjust.
1846 (dump_ada_node): Adjust calls to above functions.
1847 (dumped_anonymous_types): New global variable.
1848 (dump_nested_types_1): Rename into...
1849 (dump_nested_types): ...this.
1850 (dump_nested_type): Remove parent and dumped_types parameters.
1851 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1852 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1853 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1854
1855 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1856
1857 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1858 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1859
1860 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1861
1862 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1863 (htable_t): New typedef.
1864 (overloaded_names): Use it.
1865 (add_name): New function.
1866 (init_overloaded_names): Use add_name to populate the table and add
1867 special cases for sigaction and stat.
1868 (overloaded_name_p): Rename into...
1869 (overloading_index): ...this. Do not initialize overloaded_names table
1870 here. Return the index or zero.
1871 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1872 but add an overloading suffix instead.
1873 (dump_ada_specs): Initialize overloaded_names tables here.
1874
1875 2021-06-01 Martin Liska <mliska@suse.cz>
1876
1877 PR other/100759
1878 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1879 to a situation where we are not in processing of an optimize
1880 pragma.
1881 * c-pragma.c (handle_pragma_pop_options): Restore target
1882 options.
1883
1884 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1885
1886 PR testsuite/100749
1887 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1888
1889 2021-05-31 Richard Biener <rguenther@suse.de>
1890
1891 PR c++/88601
1892 * c-common.c: Include tree-vector-builder.h and
1893 vec-perm-indices.h.
1894 (c_common_reswords): Add __builtin_shufflevector.
1895 (c_build_shufflevector): New funtion.
1896 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1897 (c_build_shufflevector): Declare.
1898
1899 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1900
1901 PR middle-end/99928
1902 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1903 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1904
1905 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1906
1907 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1908
1909 2021-05-25 Martin Liska <mliska@suse.cz>
1910
1911 PR tree-optimization/92860
1912 PR target/99592
1913 * c-attribs.c (handle_optimize_attribute): Save target node
1914 before calling parse_optimize_options and save it in case
1915 it changes.
1916 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1917 (handle_pragma_pop_options): Likewise here.
1918
1919 2021-05-25 Martin Liska <mliska@suse.cz>
1920
1921 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1922
1923 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1924
1925 PR middle-end/99928
1926 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1927 combined with simd and not with taskloop or for.
1928
1929 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1930
1931 PR middle-end/99928
1932 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1933 on firstprivate clause copy going to target construct, and for
1934 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1935
1936 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1937
1938 * c.opt (Wc++11-extensions, Wc++14-extensions)
1939 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1940 options.
1941
1942 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1943
1944 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1945
1946 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1947
1948 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1949 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1950 (pch_init): Renamed member.
1951 (c_common_valid_pch): Adjust access to debug_type_names.
1952
1953 2021-05-19 Martin Sebor <msebor@redhat.com>
1954
1955 PR c/100619
1956 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1957 bounds.
1958
1959 2021-05-18 Richard Biener <rguenther@suse.de>
1960
1961 PR c/100547
1962 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1963 Reword existing nunit diagnostic.
1964
1965 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1966
1967 * c-common.c (braced_list_to_string): Return CTOR unchanged
1968 if host and target character sizes don't match.
1969
1970 2021-05-14 Martin Liska <mliska@suse.cz>
1971
1972 * c.opt: Add Warning keyword for 2 options.
1973
1974 2021-05-13 Martin Liska <mliska@suse.cz>
1975
1976 PR middle-end/100504
1977 * c-attribs.c (handle_target_clones_attribute): Expect a string
1978 argument to target_clone argument.
1979
1980 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1981
1982 * c-lex.c (interpret_float): Handle digit separators for C2X.
1983
1984 2021-05-10 Martin Liska <mliska@suse.cz>
1985
1986 * c-ada-spec.c (print_destructor): Use startswith
1987 function instead of strncmp.
1988 (dump_ada_declaration): Likewise.
1989 * c-common.c (disable_builtin_function): Likewise.
1990 (def_builtin_1): Likewise.
1991 * c-format.c (check_tokens): Likewise.
1992 (check_plain): Likewise.
1993 (convert_format_name_to_system_name): Likewise.
1994
1995 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1996
1997 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1998 complex divide
1999
2000 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2001 Nathan Sidwell <nathan@codesourcery.com>
2002 Tom de Vries <vries@codesourcery.com>
2003 Julian Brown <julian@codesourcery.com>
2004 Kwok Cheung Yeung <kcy@codesourcery.com>
2005
2006 * c.opt (Wopenacc-parallelism): New.
2007
2008 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2009
2010 * c.opt (fopenacc-kernels=): Remove.
2011
2012 2021-04-08 Jakub Jelinek <jakub@redhat.com>
2013
2014 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2015 occured -> occurred.
2016 (check_alignment_of_packed_member): Fix a comment typo,
2017 memeber -> member.
2018 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2019 and onless -> unless.
2020 (warn_parm_array_mismatch): Fix comment typos, declaratation
2021 -> declaration and woud -> would. Fix up comment indentation.
2022
2023 2021-04-08 Martin Sebor <msebor@redhat.com>
2024
2025 PR middle-end/99883
2026 * c.opt (Wmismatched-new-delete): Correct spelling.
2027
2028 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2029
2030 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2031 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2032 enumeral types use again the type name for the enumeration constants.
2033 (dump_ada_node): Adjust call to dump_ada_enum_type.
2034 (dump_nested_type): Likewise.
2035
2036 2021-04-01 Jason Merrill <jason@redhat.com>
2037
2038 PR c++/98481
2039 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2040
2041 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2042
2043 PR c++/99565
2044 * c-warn.c (do_warn_duplicated_branches): Pass also
2045 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2046
2047 2021-03-20 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR debug/99230
2050 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2051
2052 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2053
2054 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2055 after entering the separate class package, if any.
2056
2057 2021-03-04 Richard Biener <rguenther@suse.de>
2058
2059 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2060 Handle ERROR_MARK.
2061
2062 2021-03-04 Jakub Jelinek <jakub@redhat.com>
2063
2064 PR c/99325
2065 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2066 (token_streamer::stream) Likewise.
2067 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2068 UNKNOWN_LOCATION.
2069
2070 2021-03-03 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c/99324
2073 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2074 instead of mark_addressable. Fix a comment typo -
2075 neutrallly -> neutrally.
2076
2077 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2078
2079 PR c/99304
2080 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2081 message - refernced -> referenced. Remove superfluous space before
2082 closing paren of function calls.
2083
2084 2021-02-25 Nathan Sidwell <nathan@acm.org>
2085
2086 PR c++/99166
2087 * c.opt (-flang-info-module-cmi): Renamed option.
2088
2089 2021-02-19 Nathan Sidwell <nathan@acm.org>
2090
2091 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2092
2093 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
2094
2095 PR target/99113
2096 * c-attribs.c (c_common_attribute_table): Add the "retain"
2097 attribute.
2098 (handle_retain_attribute): New function.
2099
2100 2021-02-16 Marek Polacek <polacek@redhat.com>
2101
2102 PR c++/99062
2103 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2104 alignment argument is non-negative. Tweak a warning message.
2105
2106 2021-02-12 Martin Sebor <msebor@redhat.com>
2107
2108 PR c/99055
2109 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2110 print_generic_expr_to_str.
2111
2112 2021-02-10 Richard Biener <rguenther@suse.de>
2113
2114 * c-common.c (parse_optimize_options): Free decoded_options.
2115
2116 2021-02-04 emsr <3dw4rd@verizon.net>
2117
2118 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2119
2120 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2121
2122 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2123 * c-lex.c (interpret_integer): Set node type for size literal.
2124
2125 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2126
2127 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2128 draft from description.
2129 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2130
2131 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
2132
2133 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2134 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2135 and -std=gnu++2b
2136 * c-opts.c (set_std_cxx23): New.
2137 (c_common_handle_option): Set options when -std=c++23 is enabled.
2138 (c_common_post_options): Adjust comments.
2139 (set_std_cxx20): Likewise.
2140
2141 2021-01-25 Martin Sebor <msebor@redhat.com>
2142
2143 PR c++/98646
2144 * c-common.c (check_nonnull_arg): Adjust warning text.
2145
2146 2021-01-17 Martin Sebor <msebor@redhat.com>
2147
2148 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2149 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2150
2151 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2152
2153 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2154 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2155
2156 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2157
2158 PR tree-optimization/98597
2159 * c-pretty-print.c: Include options.h.
2160 (c_fold_indirect_ref_for_warn): New function.
2161 (print_mem_ref): Use it. If it returns something that has compatible
2162 type and is TBAA compatible with zero offset, print it and return,
2163 otherwise print it using offsetof syntax or array ref syntax. Fix up
2164 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2165 argument has pointer to array type. Print pointers using the standard
2166 formatting.
2167
2168 2021-01-12 Martin Sebor <msebor@redhat.com>
2169
2170 PR c/98597
2171 PR c/98592
2172 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2173 has pointer type. Remove redundant code. Avoid calling
2174 gimple_canonical_types_compatible_p.
2175
2176 2021-01-07 Martin Sebor <msebor@redhat.com>
2177
2178 PR middle-end/98578
2179 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2180 Avoid assuming acces type's size is constant. Correct condition
2181 guarding the printing of a parenthesis.
2182
2183 2021-01-06 Martin Sebor <msebor@redhat.com>
2184
2185 PR c++/95768
2186 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2187 SSA_NAMEs print VLA names and GIMPLE defining statements.
2188 (print_mem_ref): New function.
2189 (c_pretty_printer::unary_expression): Call it.
2190
2191 2021-01-06 Richard Biener <rguenther@suse.de>
2192
2193 PR tree-optimization/95582
2194 * c-attribs.c (c_common_attribute_table): Add entry for
2195 signed_bool_precision.
2196 (handle_signed_bool_precision_attribute): New.
2197
2198 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2199
2200 * c.opt: Add -stdlib= option and enumerations for
2201 libstdc++ and libc++.
2202
2203 2020-12-16 Martin Liska <mliska@suse.cz>
2204
2205 * c.opt: Remove usage of Report.
2206
2207 2020-12-14 Martin Sebor <msebor@redhat.com>
2208
2209 PR middle-end/98166
2210 PR c++/57111
2211 PR middle-end/98160
2212 * c-attribs.c (maybe_add_noinline): New function.
2213 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2214 Implicitly add attribute noinline to functions not declared inline
2215 and warn on those.
2216
2217 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2218
2219 * c-pragma.c (omp_pragmas): Add 'allocate'.
2220 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2221
2222 2020-12-08 Jakub Jelinek <jakub@redhat.com>
2223
2224 PR c++/98187
2225 * c-pragma.c (omp_pragmas): Remove "master".
2226 (omp_pragmas_simd): Add "master".
2227
2228 2020-12-07 Marek Polacek <polacek@redhat.com>
2229
2230 PR c++/98126
2231 * c-common.c (verify_tree_lim_r): New function.
2232 (verify_sequence_points): Use it. Use nullptr instead of 0.
2233
2234 2020-12-03 Martin Sebor <msebor@redhat.com>
2235
2236 PR c++/90629
2237 PR middle-end/94527
2238 * c-attribs.c (handle_dealloc_attribute): New function.
2239 (handle_malloc_attribute): Handle argument forms of attribute.
2240 * c.opt (-Wmismatched-dealloc): New option.
2241 (-Wmismatched-new-delete): New option.
2242
2243 2020-12-03 Jakub Jelinek <jakub@redhat.com>
2244
2245 PR libstdc++/93121
2246 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2247 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2248
2249 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2250
2251 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2252 {__GNUC_EXECUTION_CHARSET_NAME} and
2253 _WIDE_EXECUTION_CHARSET_NAME} macros.
2254
2255 2020-12-01 Nathan Sidwell <nathan@acm.org>
2256
2257 * c-common.c (module, import, export): New internal tokens (with
2258 trailing space).
2259 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2260 them.
2261 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2262 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2263
2264 2020-12-01 Nathan Sidwell <nathan@acm.org>
2265
2266 * c-opts.c (c_common_init_options): Ask for module dependencies.
2267 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2268 * c-pch.c (c_common_valid_pch): ... does not play with C++
2269 modules.
2270 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2271 options.
2272 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2273 (fmodule-only, fmodule-mapper, fmodule-lazy)
2274 (fmodule-version-ignore, Winvalid-imported-macros)
2275 (flang-info-include-translate, flang-info-include-translate-not):
2276 New options
2277
2278 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2279
2280 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2281 (dump_ada_structure): Also deal with convention, unchecked union and
2282 bit-field for nested types. In the latter case, print an Alignment
2283 aspect along with the Pack aspect.
2284
2285 2020-11-25 Martin Sebor <msebor@redhat.com>
2286
2287 PR bootstrap/94982
2288 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2289 -Wformat-diag.
2290
2291 2020-11-24 Martin Sebor <msebor@redhat.com>
2292
2293 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2294
2295 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2296
2297 * c-attribs.c (handle_special_var_sec_attribute): New.
2298 (handle_noinit_attribute): Remove.
2299 (attr_noinit_exclusions): Rename to...
2300 (attr_section_exclusions): ...this, and add "persistent" attribute
2301 exclusion.
2302 (c_common_attribute_table): Add "persistent" attribute.
2303
2304 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2305
2306 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2307 Treat opaque types like other types.
2308 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2309 supported types.
2310
2311 2020-11-20 Martin Sebor <msebor@redhat.com>
2312
2313 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2314 with fewer arguments.
2315
2316 2020-11-20 Martin Sebor <msebor@redhat.com>
2317
2318 PR middle-end/97879
2319 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2320 Error out on invalid modes.
2321
2322 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2323
2324 PR libstdc++/88101
2325 * c-common.c (check_builtin_function_arguments): Handle
2326 BUILT_IN_CLEAR_PADDING.
2327
2328 2020-11-18 Nathan Sidwell <nathan@acm.org>
2329
2330 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2331
2332 2020-11-17 Nathan Sidwell <nathan@acm.org>
2333
2334 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2335 after newly-added CTI_MODULE_HWM.
2336
2337 2020-11-17 Joseph Myers <joseph@codesourcery.com>
2338
2339 * c-cppbuiltin.c (builtin_define_float_constants): Define
2340 "*_IS_IEC_60559__" macros.
2341
2342 2020-11-17 Nathan Sidwell <nathan@acm.org>
2343
2344 * c-lex.c: #include "langhooks.h".
2345 (cb_undef): Maybe call preprocess_undef lang hook.
2346 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2347 lang hook.
2348 (push_command_line_include): Maybe call preprocess_main_file lang
2349 hook.
2350 (cb_file_change): Likewise.
2351 * c-ppoutput.c: #include "langhooks.h.
2352 (scan_translation_unit): Maybe call preprocess_token lang hook.
2353 (class do_streamer): New, derive from token_streamer.
2354 (directives_only_cb): Data pointer is do_streamer, call
2355 preprocess_token lang hook.
2356 (scan_translation_unit_directives_only): Use do_streamer.
2357 (print_line_1): Move src_line recording to after string output.
2358 (cb_undef): Maybe call preprocess_undef lang hook.
2359
2360 2020-11-17 Nathan Sidwell <nathan@acm.org>
2361
2362 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2363 code duplicating that functionality.
2364
2365 2020-11-17 Jakub Jelinek <jakub@redhat.com>
2366
2367 PR c/90628
2368 * c-common.c (check_builtin_function_arguments)
2369 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2370 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2371 for more builtins and argument positions.
2372
2373 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2374
2375 PR objc/97854
2376 * stub-objc.c: Include c-common.h to declare enum rid.
2377
2378 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2379
2380 PR c++/63287
2381 * c-cppbuiltin.c: Include configargs.h.
2382 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2383 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2384 "single".
2385
2386 2020-11-13 Gergö Barany <gergo@codesourcery.com>
2387 Thomas Schwinge <thomas@codesourcery.com>
2388
2389 * c.opt (fopenacc-kernels): Add.
2390
2391 2020-11-13 Jason Merrill <jason@redhat.com>
2392
2393 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2394
2395 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
2396
2397 PR c++/91318
2398 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2399
2400 2020-11-13 Martin Liska <mliska@suse.cz>
2401
2402 * c-attribs.c (build_attr_access_from_parms): Format properly.
2403
2404 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2405
2406 PR objc/90707
2407 * c-common.c (c_common_reswords): null_unspecified, nullable,
2408 nonnull, null_resettable: New keywords.
2409 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2410 RID_NONNULL, RID_NULL_RESETTABLE: New.
2411 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2412 ranges accepted for property attributes.
2413 * c-attribs.c (handle_objc_nullability_attribute): New.
2414 * c-objc.h (enum objc_property_attribute_group): Add
2415 OBJC_PROPATTR_GROUP_NULLABLE.
2416 (enum objc_property_attribute_kind):Add
2417 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2418 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2419
2420 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2421
2422 PR objc/77404
2423 * c-attribs.c (handle_objc_root_class_attribute): New
2424 * c-objc.h (objc_start_class_interface): Add a location
2425 value for the position of the class name.
2426 * c.opt: Add Wobjc-root-class.
2427 * stub-objc.c (objc_start_class_interface): Add a location
2428 value for the position of the class name.
2429
2430 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2431
2432 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2433 Allow scope for C. Handle standard attributes for C. Do not
2434 accept unscoped attributes if std_syntax and not handled as
2435 standard attributes.
2436 * c-common.h (c_common_has_attribute): Update prototype.
2437
2438 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2439
2440 PR pch/86674
2441 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2442 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2443
2444 2020-11-11 Patrick Palka <ppalka@redhat.com>
2445
2446 PR c++/88115
2447 * c-opts.c (c_common_post_options): Update latest_abi_version.
2448
2449 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2450
2451 PR c/97748
2452 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2453 to false.
2454 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2455 recursively and just return true instead of warning if it is true.
2456 Handle COMPLEX_EXPR.
2457
2458 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2459
2460 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2461 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2462 (c_omp_adjust_map_clauses): New function.
2463
2464 2020-11-09 Marek Polacek <polacek@redhat.com>
2465
2466 DR 1914
2467 * c-common.c (attribute_fallthrough_p): Tweak the warning
2468 message.
2469
2470 2020-11-09 Patrick Palka <ppalka@redhat.com>
2471
2472 * c-pragma.c (handle_pragma_diagnostic): Split the
2473 unknown-option -Wpragmas diagnostic into a warning and a
2474 subsequent note containing a spelling suggestion. Avoid
2475 computing the suggestion if -Wpragmas warnings are being
2476 suppressed.
2477
2478 2020-11-09 Patrick Palka <ppalka@redhat.com>
2479
2480 PR testsuite/97117
2481 * c-indentation.c (get_visual_column): Remove location_t
2482 parameter. Move the column-tracking diagnostic code from here
2483 to ...
2484 (should_warn_for_misleading_indentation): ... here, before the
2485 early exit for when the loci are not all distinct. Don't pass a
2486 location_t argument to get_visual_column.
2487 (assert_get_visual_column_succeeds): Don't pass a location_t
2488 argument to get_visual_column.
2489 (assert_get_visual_column_fails): Likewise.
2490
2491 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2492
2493 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2494 of keywords accepted in @property attribute contexts.
2495 * c-objc.h (enum objc_property_attribute_group): Add
2496 OBJC_PROPATTR_GROUP_CLASS.
2497 (enum objc_property_attribute_kind): Add
2498 OBJC_PROPERTY_ATTR_CLASS.
2499
2500 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2501
2502 * c-common.c (c_common_reswords): Add 'atomic' property
2503 attribute.
2504 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2505 property attributes.
2506
2507 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2508
2509 * c-attribs.c (handle_nsobject_attribute): New.
2510 * c.opt: Add WNSObject-attribute.
2511
2512 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2513
2514 * c-objc.h (enum objc_property_attribute_group): New
2515 (enum objc_property_attribute_kind): New.
2516 (OBJC_PROPATTR_GROUP_MASK): New.
2517 (struct property_attribute_info): Small class encapsulating
2518 parser output from property attributes.
2519 (objc_prop_attr_kind_for_rid): New
2520 (objc_add_property_declaration): Simplify interface.
2521 * stub-objc.c (enum rid): Dummy type.
2522 (objc_add_property_declaration): Simplify interface.
2523 (objc_prop_attr_kind_for_rid): New.
2524
2525 2020-11-06 Nathan Sidwell <nathan@acm.org>
2526
2527 * c-ada-spec.c (collect_ada_nodes): Rename
2528 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2529 (collect_ada_node): Likewise.
2530 (dump_forward_type): Likewise.
2531 * c-common.c (set_underlying_type): Rename
2532 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2533 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2534
2535 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2536
2537 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2538
2539 2020-11-05 Marek Polacek <polacek@redhat.com>
2540
2541 PR c++/97675
2542 * c.opt (Wexceptions): New option.
2543
2544 2020-11-05 Marek Polacek <polacek@redhat.com>
2545
2546 PR c++/25814
2547 * c.opt (Wvexing-parse): New option.
2548
2549 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2550
2551 PR c++/97670
2552 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2553 underlying decl to clear in the allocate_head bitmap.
2554
2555 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2556
2557 * c-objc.h (objc_non_constant_expr_p): New.
2558 * stub-objc.c (objc_non_constant_expr_p): New.
2559
2560 2020-11-03 Nathan Sidwell <nathan@acm.org>
2561
2562 * c.opt (MQ,MT): Reword description to be make-agnostic.
2563
2564 2020-11-02 Nathan Sidwell <nathan@acm.org>
2565
2566 * c-opts.c (c_common_post_options): Move var decl to its
2567 initialization point.
2568
2569 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2570
2571 * c-lex.c (c_lex_with_flags): When combining '@' with a
2572 keyword for Objective-C, combine the location ranges too.
2573
2574 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2575 H.J.Lu <hjl.tools@gmail.com>
2576
2577 * c-attribs.c (c_common_attribute_table): Add new attribute
2578 zero_call_used_regs.
2579 (handle_zero_call_used_regs_attribute): New function.
2580
2581 2020-10-28 Marek Polacek <polacek@redhat.com>
2582
2583 PR c++/97573
2584 * c-opts.c (c_common_post_options): In C++20, turn on
2585 -Wdeprecated-enum-enum-conversion and
2586 -Wdeprecated-enum-float-conversion.
2587 * c.opt (Wdeprecated-enum-enum-conversion,
2588 Wdeprecated-enum-float-conversion): New options.
2589 (Wenum-conversion): Allow for C++ too.
2590
2591 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2592
2593 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2594 * c-omp.c: Include bitmap.h.
2595 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2596
2597 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2598
2599 * c-common.c (__is_nothrow_assignable): New.
2600 (__is_nothrow_constructible): Likewise.
2601 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2602 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2603
2604 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2605
2606 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2607
2608 2020-10-23 Marek Polacek <polacek@redhat.com>
2609
2610 PR c++/91741
2611 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2612 (c_common_init_ts): Likewise.
2613 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2614 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2615 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2616 (maybe_warn_sizeof_array_div): New function.
2617 * c.opt (Wsizeof-array-div): New option.
2618
2619 2020-10-23 Martin Sebor <msebor@redhat.com>
2620
2621 PR c/97463
2622 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2623
2624 2020-10-22 Martin Liska <mliska@suse.cz>
2625
2626 PR c/94722
2627 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2628 (handle_stack_protect_attribute): Add error message for a
2629 no_stack_protector function.
2630
2631 2020-10-22 Martin Liska <mliska@suse.cz>
2632
2633 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2634
2635 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2636
2637 * c-gimplify.c: Include tree-nested.h
2638 (c_genericize): Update for new nested function info.
2639
2640 2020-10-14 Martin Sebor <msebor@redhat.com>
2641
2642 PR c/97413
2643 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2644 bounds in an extra list.
2645
2646 2020-10-05 Richard Biener <rguenther@suse.de>
2647 Jakub Jelinek <jakub@redhat.com>
2648
2649 PR c++/97197
2650 * c-pretty-print.c: Include langhooks.h.
2651 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2652 expression.
2653 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2654 unary_expression.
2655 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2656
2657 2020-09-30 Martin Sebor <msebor@redhat.com>
2658
2659 PR middle-end/97189
2660 * c-attribs.c (append_access_attr): Use the function declaration
2661 location for a warning about an attribute access argument.
2662
2663 2020-09-29 Marek Polacek <polacek@redhat.com>
2664
2665 PR c++/94695
2666 * c.opt (Wrange-loop-construct): New option.
2667
2668 2020-09-23 Martin Sebor <msebor@redhat.com>
2669
2670 PR c/97131
2671 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2672
2673 2020-09-23 Marek Polacek <polacek@redhat.com>
2674
2675 PR c/97125
2676 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2677 after loops and other structured control constructs have been lowered.
2678
2679 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2680
2681 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2682 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2683
2684 2020-09-21 Marek Polacek <polacek@redhat.com>
2685
2686 * c.opt (Wctad-maybe-unsupported): New option.
2687
2688 2020-09-19 Martin Sebor <msebor@redhat.com>
2689
2690 PR c/50584
2691 * c-common.h (warn_parm_array_mismatch): Declare new function.
2692 (has_attribute): Move declaration of an existing function.
2693 (build_attr_access_from_parms): Declare new function.
2694 * c-warn.c (parm_array_as_string): Define new function.
2695 (plus_one): Define new function.
2696 (warn_parm_ptrarray_mismatch): Define new function.
2697 (warn_parm_array_mismatch): Define new function.
2698 (vla_bound_parm_decl): New function.
2699 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2700 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2701 qualifiers here...
2702 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2703 them in brackets here. Also print [static]. Strip extraneous
2704 expressions from VLA bounds.
2705
2706 2020-09-19 Martin Sebor <msebor@redhat.com>
2707
2708 PR c/50584
2709 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2710 (handle_argspec_attribute): New function.
2711 (get_argument, get_argument_type): New functions.
2712 (append_access_attrs): Add overload. Handle internal attribute
2713 representation in addition to external.
2714 (handle_access_attribute): Handle internal attribute representation
2715 in addition to external.
2716 (build_attr_access_from_parms): New function.
2717
2718 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2719
2720 * c-gimplify.c (genericize_c_loop): Rewrite to match
2721 c_finish_loop in c-typeck.c.
2722
2723 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2724
2725 * c-common.c (c_block_may_fallthrough): New, split from
2726 cxx_block_may_fallthrough in the cp front end.
2727 (c_common_init_ts): Move handling of loop and switch-related
2728 statements here from the cp front end.
2729 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2730 cp front end.
2731 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2732 * c-common.h (c_block_may_fallthru): Declare.
2733 (bc_state_t): Move here from cp front end.
2734 (save_bc_state, restore_bc_state): Declare.
2735 (c_genericize_control_stmt): Declare.
2736 (WHILE_COND, WHILE_BODY): Likewise.
2737 (DO_COND, DO_BODY): Likewise.
2738 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2739 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2740 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2741 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2742 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2743 * c-dump.c (dump_stmt): Copy from cp front end.
2744 (c_dump_tree): Move code to handle structured loop and switch
2745 tree nodes here from cp front end.
2746 * c-gimplify.c: Adjust includes.
2747 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2748 cp front end.
2749 (save_bc_state, restore_bc_state): New functions using old code
2750 from cp front end.
2751 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2752 (genericize_c_loop): Move from cp front end.
2753 (genericize_for_stmt, genericize_while_stmt): Likewise.
2754 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2755 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2756 (genericize_omp_for_stmt): Likewise.
2757 (c_genericize_control_stmt): New function using code split from
2758 cp front end.
2759 (c_genericize_control_r): New.
2760 (c_genericize): Call walk_tree with c_genericize_control_r.
2761 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2762 structured loop and switch tree nodes here from cp front end.
2763
2764 2020-09-17 Patrick Palka <ppalka@redhat.com>
2765
2766 PR c/80076
2767 * c-indentation.c (should_warn_for_misleading_indentation): Move
2768 declarations of local variables closer to their first use.
2769 Handle virtual token locations by resolving them to their
2770 respective macro expansion points. If all three tokens are
2771 produced from the same macro expansion, then instead use their
2772 loci within the macro definition.
2773
2774 2020-09-16 Martin Sebor <msebor@redhat.com>
2775
2776 PR c/78666
2777 PR c/96126
2778 * c-attribs.c (validate_attr_args): New function.
2779 (validate_attr_arg): Same.
2780 (handle_section_attribute): Call it. Introduce a local variable.
2781 (handle_alloc_size_attribute): Same.
2782 (handle_alloc_align_attribute): Same.
2783
2784 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2785
2786 * c-attribs.c (handle_optimize_attribute): Adjust
2787 cl_optimization_save, cl_optimization_restore and
2788 build_optimization_node callers.
2789 * c-pragma.c (handle_pragma_optimize): Adjust
2790 build_optimization_node caller.
2791 (handle_pragma_push_options): Adjust
2792 build_optimization_node and build_target_option_node callers.
2793 (handle_pragma_pop_options, handle_pragma_reset_options):
2794 Adjust cl_optimization_restore callers.
2795
2796 2020-08-28 Martin Sebor <msebor@redhat.com>
2797
2798 * c.opt (Wstringop-overread): New option.
2799
2800 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2801
2802 PR c/96545
2803 * c-common.c (get_atomic_generic_size): Require that first argument's
2804 type points to a complete type and use tree_fits_uhwi_p instead of
2805 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2806
2807 2020-07-31 Martin Sebor <msebor@redhat.com>
2808
2809 PR c++/96003
2810 * c-common.c (check_function_arguments_recurse): Return early when
2811 no-warning bit is set.
2812
2813 2020-07-31 Richard Biener <rguenther@suse.de>
2814
2815 PR debug/96383
2816 * c-common.h (c_common_finalize_early_debug): Declare.
2817 * c-common.c: Include debug.h.
2818 (c_common_finalize_early_debug): finalize_early_debug langhook
2819 implementation generating debug for extern declarations.
2820
2821 2020-07-27 Nathan Sidwell <nathan@acm.org>
2822
2823 * c-common.c (try_to_locate_new_include_insertion_point): Use
2824 strcmp, not pointer equality.
2825
2826 2020-07-25 Martin Sebor <msebor@redhat.com>
2827
2828 PR c++/96310
2829 * c-common.c (check_nonnull_arg): Print note only when warning was
2830 issued.
2831
2832 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2833
2834 * c-omp.c (c_finish_omp_critical): Check for no name but
2835 nonzero hint provided.
2836
2837 2020-07-20 Jason Merrill <jason@redhat.com>
2838
2839 * c-cppbuiltin.c (c_cpp_builtins): Update
2840 __cpp_nontype_template_args for C++20.
2841
2842 2020-07-20 Martin Sebor <msebor@redhat.com>
2843
2844 PR c/96249
2845 * c.opt: Remove stray text.
2846
2847 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2848
2849 PR other/86904
2850 * c-indentation.c (should_warn_for_misleading_indentation): Get
2851 global tabstop from the new source.
2852 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2853 is now a common option.
2854 * c.opt: Likewise.
2855
2856 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2857
2858 * c.opt (Wscalar-storage-order): Add explicit variable.
2859
2860 2020-07-07 Nathan Sidwell <nathan@acm.org>
2861
2862 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2863 cpp_read_main_file.
2864 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2865 maps. Force token position to line_table's highest line.
2866 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2867 (cb_define): Always increment source line.
2868
2869 2020-07-06 Martin Sebor <msebor@redhat.com>
2870
2871 PR c++/95984
2872 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2873 to stub lambda objects with null this pointer.
2874 (check_nonnull_arg): Handle C++ nullptr.
2875
2876 2020-07-02 Jason Merrill <jason@redhat.com>
2877 Jakub Jelinek <jakub@redhat.com>
2878
2879 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2880
2881 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2882
2883 PR c++/95963
2884 * c-common.c (check_function_arguments_recurse): Don't crash on
2885 calls to internal functions.
2886
2887 2020-06-28 Martin Sebor <msebor@redhat.com>
2888
2889 PR c++/86568
2890 * c-common.c (struct nonnull_arg_ctx): Add members.
2891 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2892 C++ member functions specially. Consider the this pointer implicitly
2893 nonnull.
2894 (check_nonnull_arg): Use location of argument when available.
2895 (check_function_arguments): Use nonnull_arg_ctx as argument.
2896
2897 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2898
2899 PR middle-end/95903
2900 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2901 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2902 smaller precision intop operands separately.
2903
2904 2020-06-26 Marek Polacek <polacek@redhat.com>
2905
2906 * c-opts.c (c_common_init_options): Default to gnu++17.
2907
2908 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2909
2910 PR c/95378
2911 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2912 pointer arguments.
2913
2914 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2915
2916 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2917 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2918 idx members.
2919 (c_omp_is_loop_iterator): New function.
2920 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2921 if outer loop iterator is present. Perform duplicate checking through
2922 hash_set in the function rather than expecting caller to do that.
2923 Pass NULL instead of d->ppset to walk_tree_1.
2924 (c_omp_check_nonrect_loop_iv): New function.
2925 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2926 non-rectangular loop forms, diagnose multiple associated loops with
2927 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2928 (c_omp_check_loop_iv_exprs): Likewise.
2929
2930 2020-06-10 Martin Liska <mliska@suse.cz>
2931
2932 PR tree-optimization/92860
2933 * c-attribs.c (handle_optimize_attribute):
2934 Save global options and compare it after parsing of function
2935 attribute.
2936 * c-pragma.c (opt_stack::saved_global_options): New field.
2937 (handle_pragma_push_options): Save global_options.
2938 (handle_pragma_pop_options): Compare them after pop.
2939
2940 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2941
2942 PR c/95580
2943 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2944 case when MEM_REF's first argument has type pointer to incomplete type.
2945
2946 2020-06-05 Jason Merrill <jason@redhat.com>
2947
2948 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2949 operand to POINTER_PLUS_EXPR.
2950
2951 2020-06-04 Martin Sebor <msebor@redhat.com>
2952
2953 PR middle-end/10138
2954 PR middle-end/95136
2955 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2956 (handle_access_attribute): Same.
2957
2958 2020-06-03 Mark Wielaard <mark@klomp.org>
2959
2960 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2961 New function.
2962 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2963 New function declaration.
2964
2965 2020-06-03 Mark Wielaard <mark@klomp.org>
2966
2967 * known-headers.cc (get_string_macro_hint): New function.
2968 (get_stdlib_header_for_name): Use get_string_macro_hint.
2969 (get_c_stdlib_header_for_string_macro_name): New function.
2970 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2971 New function declaration.
2972
2973 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2974
2975 * c-common.h (c_omp_predetermined_mapping): Declare.
2976 * c-omp.c (c_omp_predetermined_mapping): New.
2977
2978 2020-05-22 Mark Wielaard <mark@klomp.org>
2979
2980 * known-headers.cc (get_stdlib_header_for_name): Add a new
2981 stdlib_hint array for stdbool and stdint.
2982
2983 2020-05-22 Mark Wielaard <mark@klomp.org>
2984
2985 * known-headers.cc (get_stdlib_header_for_name): Return
2986 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2987 flag_isoc99.
2988
2989 2020-05-20 Nathan Sidwell <nathan@acm.org>
2990
2991 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2992
2993 * c-common.c (try_to_locate_new_include_insertion_point): Use
2994 strcmp to compare filenames.
2995 * c-lex.c (init_c_lex): Move declaration to initialization.
2996 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2997 deferred count loop.
2998
2999 2020-05-15 Jason Merrill <jason@redhat.com>
3000
3001 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3002
3003 2020-05-13 Jason Merrill <jason@redhat.com>
3004
3005 * c.opt (std=c++20): Make c++2a the alias.
3006 (std=gnu++20): Likewise.
3007 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3008 * c-opts.c: Adjust.
3009 * c-cppbuiltin.c: Adjust.
3010 * c-ubsan.c: Adjust.
3011 * c-warn.c: Adjust.
3012
3013 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3014
3015 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3016
3017 2020-05-08 Nathan Sidwell <nathan@acm.org>
3018
3019 Reimplement directives only processing.
3020 * c-ppoutput.c (token_streamer): Ne.
3021 (directives_only_cb): New. Swallow ...
3022 (print_lines_directives_only): ... this.
3023 (scan_translation_unit_directives_only): Reimplment using the
3024 published interface.
3025
3026 2020-05-07 Marek Polacek <polacek@redhat.com>
3027
3028 * c-format.c (badwords): Add "nonstatic".
3029
3030 202-05-07 Jakub Jelinek <jakub@redhat.com>
3031
3032 PR c/94968
3033 * c-common.c (speculation_safe_value_resolve_params): Return false if
3034 error_operand_p (val2).
3035 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3036 Remove extraneous semicolon.
3037
3038 2020-05-06 qing zhao <qing.zhao@oracle.com>
3039
3040 PR c/94230
3041 * c-indentation.c (get_visual_column): Add a hint to use the new
3042 -flarge-source-files option.
3043
3044 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3045
3046 * c-attribs.c (handle_vector_size_attribute): Add attribute
3047 nonnull for argument args in order to silence warning of
3048 uninitialized variable usage. Since this is local to the
3049 compilation unit and thus cannot be checked at call sides by the
3050 compiler, added an assert statement in order to verify this.
3051
3052 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3053
3054 PR target/93492
3055 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3056 value to USHRT_MAX (65535).
3057
3058 2020-04-29 Jakub Jelinek <jakub@redhat.com>
3059
3060 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3061
3062 2020-04-27 Jakub Jelinek <jakub@redhat.com>
3063
3064 PR c/94755
3065 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3066 fncode == BUILT_IN_NONE before initialization of first_param.
3067
3068 2020-04-23 Marek Polacek <polacek@redhat.com>
3069
3070 PR c++/94733
3071 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3072 TREE_PURPOSE.
3073
3074 2020-04-14 Patrick Palka <ppalka@redhat.com>
3075
3076 PR c++/85278
3077 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3078 ampersand if it's an rvalue reference type.
3079
3080 2020-04-13 Martin Sebor <msebor@redhat.com>
3081
3082 PR c/92326
3083 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3084 printing array bound for flexible array members.
3085
3086 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3087
3088 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3089 define, per n4861.
3090
3091 2020-04-02 Richard Biener <rguenther@suse.de>
3092
3093 PR c/94392
3094 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3095 for -O2 and C++11 or newer.
3096
3097 2020-03-28 Patrick Palka <ppalka@redhat.com>
3098
3099 * c.opt: Add -fconcepts-diagnostics-depth.
3100
3101 2020-03-27 Martin Sebor <msebor@redhat.com>
3102
3103 PR c++/94346
3104 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3105 to decl_attributes. Make handling of different kinds of entities
3106 more robust.
3107
3108 2020-03-27 Martin Sebor <msebor@redhat.com>
3109
3110 PR c++/94098
3111 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3112 here.
3113
3114 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3115
3116 PR c++/91993
3117 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3118 result being COMPOUND_EXPRs, skip to ultimate rhs.
3119
3120 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3121
3122 PR middle-end/94072
3123 * c-common.c (c_common_type_for_mode): Before using a registered
3124 built-in type, check that the vectorness of the type matches
3125 the vectorness of the mode.
3126
3127 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3128
3129 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3130 issue in a diagnostic message.
3131
3132 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3133
3134 * c.opt: Avoid redundancy in the help text.
3135
3136 2020-03-02 Marek Polacek <polacek@redhat.com>
3137
3138 PR c++/93958 - add missing -std=gnu++20.
3139 * c.opt: Add -std=gnu++20.
3140
3141 2020-03-01 Martin Sebor <msebor@redhat.com>
3142
3143 PR c++/92721
3144 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3145 (handle_access_attribute): Same.
3146
3147 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3148
3149 PR c/93858
3150 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3151 "did you mean" hint in diagnostics.
3152
3153 2020-02-15 Jason Merrill <jason@redhat.com>
3154
3155 * c.opt: Add -std=c++20.
3156
3157 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3158
3159 * c-ada-spec.c: Include bitmap.h.
3160 (dump_ada_double_name): Rename into...
3161 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3162 (dump_ada_array_type): Adjust to above renaming. Robustify.
3163 (dump_nested_types_1): New function copied from... Add dumped_types
3164 parameter and pass it down to dump_nested_type.
3165 (dump_nested_types): ...this. Remove parent parameter. Just call
3166 dump_nested_types_1 on an automatic bitmap.
3167 (dump_nested_type): Add dumped_types parameter.
3168 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3169 Adjust recursive calls and adjust to above renaming.
3170 (dump_ada_declaration): Adjust call to dump_nested_types.
3171 Tidy up and adjust to above renaming.
3172 (dump_ada_specs): Initialize and release bitmap obstack.
3173
3174 2020-02-10 Martin Sebor <msebor@redhat.com>
3175
3176 PR c/93640
3177 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3178
3179 2020-02-10 Jakub Jelinek <jakub@redhat.com>
3180
3181 PR other/93641
3182 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3183 Remove useless extra test.
3184
3185 2020-02-03 Julian Brown <julian@codesourcery.com>
3186 Tobias Burnus <tobias@codesourcery.com>
3187
3188 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3189
3190 2020-01-29 Jason Merrill <jason@redhat.com>
3191
3192 PR c++/89357
3193 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3194
3195 2020-01-23 Jason Merrill <jason@redhat.com>
3196
3197 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3198
3199 2020-01-23 Martin Sebor <msebor@redhat.com>
3200
3201 PR c/84919
3202 * c-common.c (check_function_arguments): Avoid overlap checking
3203 of sprintf functions.
3204
3205 2020-01-22 Jason Merrill <jason@redhat.com>
3206
3207 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3208 PR c++/40752
3209 * c-warn.c (conversion_warning): Check operands only after checking
3210 the whole expression. Don't check second operand of + for sign.
3211
3212 2020-01-21 Jason Merrill <jason@redhat.com>
3213 Manuel López-Ibáñez <manu@gcc.gnu.org>
3214
3215 PR c++/40752 - useless -Wconversion with short +=.
3216 * c.opt (-Warith-conversion): New.
3217 * c-warn.c (conversion_warning): Recurse for operands of
3218 operators. Only warn about the whole expression with
3219 -Warith-conversion.
3220
3221 2020-01-21 Jason Merrill <jason@redhat.com>
3222
3223 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3224 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3225
3226 2020-01-20 Nathan Sidwell <nathan@acm.org>
3227
3228 PR preprocessor/80005
3229 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3230
3231 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3232
3233 * c-common.c (co_await, co_yield, co_return): New.
3234 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3235 RID_CO_RETURN): New enumeration values.
3236 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3237 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3238 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3239 * c.opt (fcoroutines): New command-line switch.
3240
3241 2020-01-10 David Malcolm <dmalcolm@redhat.com>
3242
3243 * c-format.c (local_event_ptr_node): New.
3244 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3245 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3246 * c-format.h (T_EVENT_PTR): New define.
3247
3248 2020-01-10 Martin Sebor <msebor@redhat.com>
3249
3250 PR c/93132
3251 * c-attribs.c (append_access_attrs): Validate against the translated
3252 access string rather than the human-readable representation.
3253
3254 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3255
3256 Update copyright years.
3257
3258 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3259
3260 * c-ada-spec.h (decl_sloc): Delete.
3261 * c-ada-spec.c (decl_sloc): Make static.
3262
3263 2019-12-19 Julian Brown <julian@codesourcery.com>
3264
3265 * c-common.h (c_omp_map_clause_name): Add prototype.
3266 * c-omp.c (c_omp_map_clause_name): New function.
3267 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3268 PRAGMA_OACC_CLAUSE_DETACH.
3269
3270 2019-12-19 Julian Brown <julian@codesourcery.com>
3271 Maciej W. Rozycki <macro@codesourcery.com>
3272 Tobias Burnus <tobias@codesourcery.com>
3273 Thomas Schwinge <thomas@codesourcery.com>
3274
3275 * c-pragma.h (pragma_omp_clause): Add
3276 PRAGMA_OACC_CLAUSE_NO_CREATE.
3277
3278 2019-12-17 Martin Sebor <msebor@redhat.com>
3279
3280 PR c++/61339
3281 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3282
3283 2019-12-11 David Malcolm <dmalcolm@redhat.com>
3284
3285 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3286 implementation.
3287 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3288
3289 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3290
3291 * c-format.c (range_label_for_format_type_mismatch::get_text):
3292 Replace label_text ctor called with true with label_text::take.
3293
3294 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3295
3296 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3297 initial newline from expected outputs.
3298 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3299 call to diagnostic_show_locus.
3300
3301 2019-12-06 Jakub Jelinek <jakub@redhat.com>
3302
3303 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3304 now.
3305
3306 2019-12-05 Marek Polacek <polacek@redhat.com>
3307 Jakub Jelinek <jakub@redhat.com>
3308
3309 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3310 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3311
3312 2019-12-05 Marek Polacek <polacek@redhat.com>
3313
3314 PR c++/92271 - make __is_same alias for __is_same_as.
3315 * c-common.c: Add __is_same, an alias for __is_same_as.
3316
3317 2019-12-03 Marek Polacek <polacek@redhat.com>
3318
3319 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3320 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3321 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3322
3323 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
3324
3325 * c-attribs.c (handle_symver_attribute): New function
3326 (c_common_attributes): Add symver.
3327
3328 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3329
3330 * c-common.c (pointer_int_sum): Use verify_type_context to check
3331 whether the target allows pointer arithmetic for the types involved.
3332 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3333 to check whether the target allows sizeof and alignof operations
3334 for the types involved.
3335
3336 2019-11-27 Jason Merrill <jason@redhat.com>
3337
3338 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3339
3340 2019-11-26 Jakub Jelinek <jakub@redhat.com>
3341
3342 PR c++/61414
3343 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3344 ENUMERAL_TYPEs.
3345
3346 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3347
3348 PR c/91985
3349 * c-common.c (c_common_type_for_mode): Handle decimal
3350 floating-point types being NULL_TREE.
3351 * c-format.c (get_format_for_type_1): Handle specified types being
3352 NULL_TREE.
3353 * c-lex.c (interpret_float): Give an error for decimal
3354 floating-point constants when decimal floating-point not
3355 supported.
3356
3357 2019-11-23 Jakub Jelinek <jakub@redhat.com>
3358
3359 PR middle-end/83859
3360 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3361 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3362 group warning with inform together.
3363 (handle_access_attribute): Formatting fix.
3364
3365 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3366
3367 PR c/90677
3368 * c-common.h (identifier_global_tag): Declare.
3369 * c-format.c (get_pointer_to_named_type): Renamed to ...
3370 (get_named_type): ... this. Use identifier_global_tag instead of
3371 identifier_global_value, handle the return value being a TYPE_P.
3372 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3373 to call get_named_type instead. Formatting fixes.
3374
3375 Implement P1902R1, Missing feature-test macros 2017-2019.
3376 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3377 and __cpp_generic_lambdas for -std=c++2a. Define
3378 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3379 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3380 __cpp_concepts for -std=c++2a.
3381
3382 2019-11-22 Martin Sebor <msebor@redhat.com>
3383
3384 PR middle-end/83859
3385 * c-attribs.c (handle_access_attribute): New function.
3386 (c_common_attribute_table): Add new attribute.
3387 (get_argument_type): New function.
3388 (append_access_attrs): New function.
3389 (get_nonnull_operand): Rename...
3390 (get_attribute_operand): ...to this.
3391 * c-common.c (get_nonnull_operand): Rename...
3392 (get_attribute_operand): ...to this.
3393
3394 2019-11-21 Joseph Myers <joseph@codesourcery.com>
3395
3396 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3397 of warning.
3398
3399 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3400
3401 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3402 warning for standard attributes mixed with fallthrough attributes.
3403
3404 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3405
3406 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3407 * c-common.h (handle_fallthrough_attribute): Declare.
3408
3409 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3410
3411 * c-attribs.c (handle_deprecated_attribute): Remove static.
3412 * c-common.h (handle_deprecated_attribute): Declare.
3413
3414 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3415
3416 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3417 char for C.
3418
3419 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3420
3421 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3422 valid vendors.
3423
3424 * c-omp.c (c_omp_check_context_selector): Handle name lists
3425 containing string literals. Don't diagnose atomic_default_mem_order
3426 with multiple props.
3427
3428 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3429
3430 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3431 NORM_MAX constants. Update call to get_max_float.
3432 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3433 constants.
3434
3435 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3436
3437 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3438 (dump_forward_type): Do not generate a declaration for function types.
3439 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3440 of the component type if it is declared in another file.
3441
3442 2019-11-12 Martin Liska <mliska@suse.cz>
3443
3444 * c-opts.c (c_common_post_options):
3445 Use SET_OPTION_IF_UNSET.
3446
3447 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3448 Frederik Harwath <frederik@codesourcery.com>
3449
3450 gcc/c-family/
3451 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3452 constant.
3453 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3454
3455 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3456
3457 * c-common.h (gnu_vector_type_p): New function.
3458 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3459 vectors to satisfy gnu_vector_type_p.
3460 (c_build_vec_convert): Likewise __builtin_convertvector.
3461 (convert_vector_to_array_for_subscript): Likewise when applying
3462 implicit vector to array conversion.
3463 (scalar_to_vector): Likewise when converting vector-scalar
3464 operations to vector-vector operations.
3465
3466 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3467
3468 * c.opt (Wold-style-definition): Initialize to -1.
3469 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3470 to flag_isoc2x if not set explicitly.
3471
3472 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3473
3474 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3475
3476 2019-11-05 Jason Merrill <jason@redhat.com>
3477
3478 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3479 -fconcepts.
3480
3481 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3482
3483 * c-opts.c (c_common_post_options): Update
3484 latest_abi_version.
3485
3486 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3487
3488 * c-common.h (c_omp_get_context_selector): Remove.
3489 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3490 and renamed to omp_get_context_selector.
3491
3492 * c-omp.c (c_omp_mark_declare_variant): Use
3493 omp_context_selector_set_compare.
3494
3495 PR c++/88335 - Implement P1073R3: Immediate functions
3496 * c-common.h (enum rid): Add RID_CONSTEVAL.
3497 * c-common.c (c_common_reswords): Add consteval.
3498
3499 2019-11-01 Martin Sebor <msebor@redhat.com>
3500
3501 PR middle-end/91679
3502 PR middle-end/91647
3503 PR middle-end/91463
3504 PR middle-end/92312
3505 * c-pretty-print.c (direct_abstract_declarator): Print
3506 bound in zero-length arrays.
3507 * c.opt (-Wzero-length-bounds): New option.
3508
3509 2019-10-30 Nathan Sidwell <nathan@acm.org>
3510
3511 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3512 macros.
3513
3514 2019-10-28 Martin Sebor <msebor@redhat.com>
3515
3516 PR c/66970
3517 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3518 even when only preprocessing.
3519 * c-common.h (names_builtin_p): Declare new function.
3520 * c-lex.c (init_c_lex): Set has_builtin.
3521 (c_common_has_builtin): Define a new function.
3522 * c-ppoutput.c (init_pp_output): Set has_builtin.
3523
3524 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3525
3526 * c-common.h (c_omp_context_selector_matches): Remove.
3527 * c-omp.c (c_omp_context_selector_matches): Remove.
3528 * c-attribs.c (c_common_attribute_table): Add
3529 "omp declare target {host,nohost,block}" attributes.
3530
3531 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3532
3533 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3534
3535 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3536
3537 * c-common.h (user_facing_original_type_p): Declare.
3538 * c-common.c: Include c-spellcheck.h.
3539 (user_facing_original_type_p): New function.
3540
3541 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3542
3543 * c-common.h (c_omp_mark_declare_variant,
3544 c_omp_context_selector_matches): Declare.
3545 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3546 and hsa-common.h.
3547 (c_omp_get_context_selector): Support second argument NULL.
3548 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3549 functions.
3550 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3551 attribute, add "omp declare variant base" and
3552 "omp declare variant variant" attributes.
3553
3554 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3555
3556 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3557 CppReason(CPP_W_C11_C2X_COMPAT).
3558
3559 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3560
3561 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3562 _Decimal64 and _Decimal128.
3563
3564 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3565
3566 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3567 types if DFP not supported.
3568
3569 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3570
3571 * c-common.h (c_omp_check_context_selector,
3572 c_omp_get_context_selector): Declare.
3573 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3574 in diagnostic message.
3575 (c_omp_check_context_selector, c_omp_get_context_selector): New
3576 functions.
3577 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3578 attribute.
3579 (handle_omp_declare_variant_attribute): New function.
3580
3581 2019-10-09 Martin Sebor <msebor@redhat.com>
3582
3583 PR tree-optimization/90879
3584 * c.opt (-Wstring-compare): New option.
3585
3586 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3587 Jason Merrill <jason@redhat.com>
3588
3589 Update the concepts implementation to conform to the C++20
3590 specification, improve compile times, and generally clean up
3591 the implementation.
3592
3593 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3594 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3595 * c.opt: Add -Wconcepts-ts.
3596 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3597 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3598 (set_std_cxx2a): Enable concepts by default.
3599
3600 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3601
3602 * c-opts.c (c_common_post_options): Set
3603 -fno-fp-int-builtin-inexact for C2X.
3604
3605 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3606
3607 PR c++/91369 - Implement P0784R7: constexpr new
3608 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3609 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3610
3611 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3612
3613 PR c/82752
3614 * c-format.c (C_STD_VER): Handle C2x.
3615 (C_STD_NAME): Likewise.
3616 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3617 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3618 modifier allowed and 'p' flag.
3619 * c-format.h (enum format_std_version): Add STD_C2X.
3620 (struct format_char_info): Mention 'p' in comment on flags2.
3621
3622 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3623
3624 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3625 calling diagnostic_show_locus, rather than destroying it afterwards.
3626
3627 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3628
3629 PR c++/91925
3630 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3631 with NULL DECL_FIELD_OFFSET.
3632
3633 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3634
3635 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3636 has a type name, use it in preference to the __vector syntax.
3637
3638 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3639
3640 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3641 two spaces between a comma and "...".
3642
3643 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3644
3645 PR c++/88203
3646 * c-common.h (c_omp_predefined_variable): Declare.
3647 * c-omp.c (c_omp_predefined_variable): New function.
3648 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3649 for predefined variables.
3650
3651 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3652
3653 * c-common.h (build_function_call_vec): Take the original
3654 function decl as an optional final parameter.
3655 (check_builtin_function_arguments): Take the original function decl.
3656 * c-common.c (check_builtin_function_arguments): Likewise.
3657 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3658 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3659
3660 2019-09-15 Jason Merrill <jason@redhat.com>
3661
3662 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3663 fold_for_warn in "|| mask" warning.
3664
3665 2019-09-10 Martin Liska <mliska@suse.cz>
3666
3667 * c.opt: Use newly added WarnRemoved.
3668
3669 2019-09-09 Martin Liska <mliska@suse.cz>
3670
3671 * c.opt: Update comment of removed
3672 options that are preserved only for backward
3673 compatibility.
3674
3675 2019-09-06 Martin Liska <mliska@suse.cz>
3676
3677 PR c++/91125
3678 * c-common.c: Remove definition of flag_use_repository.
3679 * c-common.h: Likewise.
3680 * c-opts.c (c_common_handle_option):
3681 Do not handle OPT_frepo option.
3682 * c.opt: Mark the option with Deprecated.
3683
3684 2019-09-04 Marek Polacek <polacek@redhat.com>
3685
3686 * c.opt (fdeduce-init-list): Ignored.
3687
3688 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3689
3690 PR c/78736
3691 * c.opt (Wenum-conversion): New option.
3692
3693 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3694
3695 * c-attribs.c (handle_section_attribute): Call the
3696 handle_generic_attribute target hook after performing target
3697 independent processing.
3698 (handle_noinit_attribute): Likewise.
3699
3700 2019-09-03 Ian Lance Taylor <iant@golang.org>
3701
3702 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3703 when using -fgo-dump-spec.
3704
3705 2019-09-02 Martin Liska <mliska@suse.cz>
3706
3707 PR c++/91155
3708 * c-common.c (fname_as_string): Use cxx_printable_name for
3709 __PRETTY_FUNCTION__ same as was used before r265711.
3710
3711 2019-08-28 Marek Polacek <polacek@redhat.com>
3712
3713 Implement P1152R4: Deprecating some uses of volatile.
3714 PR c++/91361
3715 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3716 default for C++2a, unless -Wno-deprecated.
3717 * c.opt (Wvolatile): New warning.
3718
3719 2019-08-28 Marek Polacek <polacek@redhat.com>
3720
3721 PR c++/91360 - Implement C++20 P1143R2: constinit.
3722 * c-common.c (c_common_reswords): Add constinit and __constinit.
3723 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3724 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3725 RID_LAST_CXX20.
3726 (D_CXX20): Define.
3727 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3728 * c-format.c (cxx_keywords): Add "constinit".
3729 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3730
3731 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3732
3733 PR c++/91415
3734 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3735 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3736 like COMPOUND_EXPR rather than normal expression.
3737
3738 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3739
3740 PR pch/61250
3741 * c-lex.c (c_lex_with_flags): Don't call
3742 c_common_no_more_pch () from here.
3743
3744 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3745
3746 PR middle-end/91283
3747 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3748 instead of flag_excess_precision_cmdline.
3749 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3750 * c-opts.c (c_common_post_options): Likewise.
3751
3752 2019-08-22 Martin Sebor <msebor@redhat.com>
3753
3754 PR middle-end/91490
3755 * c-common.c (braced_list_to_string): Add argument and overload.
3756 Handle flexible length arrays and unions.
3757
3758 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3759
3760 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3761 function declarations where arguments are missing. Rename variables.
3762
3763 2019-08-15 Richard Biener <rguenther@suse.de>
3764
3765 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3766 enabled, define __SIZETYPE__.
3767
3768 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3769
3770 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3771 exclusion with "section" attribute.
3772 (attr_noinit_exclusions): New table.
3773 (handle_noinit_attribute): New function.
3774
3775 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3776
3777 PR middle-end/91421
3778 * c-common.c (resolve_overloaded_builtin): Use
3779 copy_decl_built_in_function.
3780
3781 2019-08-13 Martin Sebor <msebor@redhat.com>
3782
3783 PR c/80619
3784 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3785 (asm_fprintf_length_spec): Same.
3786 * c-format.h (format_lengths): Add FMT_LEN_w.
3787
3788 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3789
3790 * c-pragma.h (enum pragma_omp_clause): Add
3791 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3792
3793 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3794
3795 * c-pragma.h (enum pragma_omp_clause): Add
3796 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3797 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3798 enumeration value.
3799
3800 2019-08-05 Marek Polacek <polacek@redhat.com>
3801
3802 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3803 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3804 default for C++2a, unless -Wno-deprecated.
3805 * c.opt (Wcomma-subscript): New warning.
3806
3807 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3808
3809 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3810 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3811 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3812 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3813 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3814 constructs with the loop construct.
3815
3816 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3817
3818 PR c/91149
3819 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3820 OMP_CLAUSE_REDUCTION_TASK handling.
3821
3822 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3823
3824 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3825 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3826
3827 2019-07-09 Martin Sebor <msebor@redhat.com>
3828
3829 PR c++/61339
3830 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3831 and others to class.
3832 * c-pretty-print.h: Same.
3833
3834 2019-07-09 Martin Sebor <msebor@redhat.com>
3835
3836 PR c++/61339
3837 * c-format.c (check_argument_type): Change class-key from class to
3838 struct and vice versa to match convention and avoid -Wclass-is-pod
3839 and -Wstruct-no-pod.
3840 * c-pretty-print.h: Same.
3841
3842 2019-07-03 Martin Liska <mliska@suse.cz>
3843
3844 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3845 dead assignemts.
3846
3847 2019-07-03 Jakub Jelinek <jakub@redhat.com>
3848
3849 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3850 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3851 with OMP_PARALLEL.
3852
3853 2019-07-02 qing zhao <qing.zhao@oracle.com>
3854
3855 PR preprocessor/90581
3856 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3857 * c.opt: Add new option -fmax-include-depth.
3858
3859 2019-06-26 Jason Merrill <jason@redhat.com>
3860
3861 PR c++/55442 - memory-hog with highly recursive constexpr.
3862 * c.opt (fconstexpr-loop-limit): New.
3863
3864 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3865
3866 PR sanitizer/90954
3867 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3868 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3869
3870 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3871
3872 * c-common.c (c_common_nodes_and_builtins): Define
3873 alternate "__intN__" name for "__intN" types.
3874
3875 2019-06-24 Jan Hubicka <jh@suse.cz>
3876
3877 * c-common.c (braced_lists_to_strings): Check that
3878 type is array or integer prior checking string flag.
3879
3880 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3881
3882 PR c++/90875 - added -Wswitch-outside-range option
3883 * c.opt (Wswitch-outside-range): Added new option.
3884 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3885
3886 2019-06-21 Marek Polacek <polacek@redhat.com>
3887
3888 PR c++/90953 - ICE with -Wmissing-format-attribute.
3889 * c-common.c (check_function_arguments_recurse): Use
3890 get_attribute_name.
3891 (check_missing_format_attribute): Likewise.
3892
3893 2019-06-19 Marek Polacek <polacek@redhat.com>
3894
3895 PR c++/60364 - noreturn after first decl not diagnosed.
3896 * c-attribs.c (handle_noreturn_attribute): No longer static.
3897 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3898 Declare.
3899 * c-format.c (check_function_format): Use get_attribute_name.
3900
3901 2019-06-19 Martin Sebor <msebor@redhat.com>
3902
3903 PR translation/90156
3904 * c-format.c (function_format_info::format_type): Adjust type.
3905 (function_format_info::is_raw): New member.
3906 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3907 (decode_format_attr): Adjust call to decode_format_type.
3908 Avoid a redundant call to convert_format_name_to_system_name.
3909 Avoid abbreviating the word "arguments" in a diagnostic.
3910 (format_warning_substr): New function.
3911 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3912 (finish_dollar_format_checking): Same.
3913 (check_format_info): Same.
3914 (struct baltoks_t): New.
3915 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3916 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3917 functions.
3918 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3919 maybe_diag_unbalanced_tokens.
3920 (handle_format_attribute): Spell out the word "arguments" in
3921 a diagnostic.
3922
3923 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3924
3925 PR c++/90449 - add -Winaccessible-base option.
3926 * c.opt (Winaccessible-base): New option.
3927
3928 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3929
3930 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3931 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3932 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3933 combined/composite constructs where it is not allowed. Copy over
3934 OMP_CLAUSE_REDUCTION_INSCAN.
3935
3936 2019-06-05 Martin Sebor <msebor@redhat.com>
3937
3938 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3939 (handle_alias_ifunc_attribute): Same.
3940 (handle_copy_attribute): Same.
3941 (handle_weakref_attribute): Same.
3942 (handle_nonnull_attribute): Same.
3943 * c-warn.c (warn_for_sign_compare): Same.
3944 (warn_for_restrict): Same.
3945 * c.opt: Same.
3946
3947 2019-06-05 Martin Sebor <msebor@redhat.com>
3948
3949 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3950 * c.opt (-Wformat-diag): Remove a spurious period.
3951
3952 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3953
3954 PR c/90628
3955 * c-common.c (check_builtin_function_arguments)
3956 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3957 as last argument.
3958
3959 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3960
3961 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3962
3963 2019-05-22 Martin Liska <mliska@suse.cz>
3964
3965 PR lto/90500
3966 * c-attribs.c (handle_copy_attribute): Do not copy
3967 target_clones attribute.
3968
3969 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3970
3971 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3972 * c-ada-spec.c (print_assignment_operator): New function.
3973 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3974 assignment operators declared as methods and filter out the others.
3975
3976 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3977
3978 PR c/89433
3979 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3980 "omp declare target".
3981
3982 2019-05-16 Martin Sebor <msebor@redhat.com>
3983
3984 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3985 keywords, operators, and types in diagnostics.
3986 (handle_scalar_storage_order_attribute): Same.
3987 (handle_mode_attribute): Same.
3988 (handle_visibility_attribute): Same.
3989 (handle_assume_aligned_attribute): Same.
3990 (handle_no_split_stack_attribute): Same.
3991 * c-common.c (shorten_compare): Same.
3992 (c_common_truthvalue_conversion): Same.
3993 (cb_get_source_date_epoch): Same.
3994 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3995 in diagnostics.
3996 (interpret_float): Same.
3997 * c-omp.c (c_finish_omp_for): Same.
3998 * c-opts.c (c_common_post_options): Same.
3999 * c-pch.c (c_common_pch_pragma): Same.
4000 * c-pragma.c (pop_alignment): Same.
4001 (handle_pragma_pack): Same.
4002 (apply_pragma_weak): Same.
4003 (handle_pragma_weak): Same.
4004 (handle_pragma_scalar_storage_order): Same.
4005 (handle_pragma_redefine_extname): Same.
4006 (add_to_renaming_pragma_list): Same.
4007 (maybe_apply_renaming_pragma): Same.
4008 (push_visibility): Same.
4009 (handle_pragma_visibility): Same.
4010 (handle_pragma_optimize): Same.
4011 (handle_pragma_message): Same.
4012 * c-warn.c (warn_for_omitted_condop): Same.
4013 (lvalue_error): Same.
4014
4015 2019-05-15 Richard Biener <rguenther@suse.de>
4016
4017 PR c/90474
4018 * c-common.c (c_common_mark_addressable_vec): Also mark
4019 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4020 c_mark_addressable.
4021
4022 2019-05-06 Nathan Sidwell <nathan@acm.org>
4023
4024 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4025
4026 2019-04-30 Nathan Sidwell <nathan@acm.org>
4027
4028 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4029
4030 2019-04-30 Martin Liska <mliska@suse.cz>
4031
4032 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4033 for unknown options.
4034
4035 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4036
4037 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4038 the pointer target rather than the pointer itself.
4039
4040 2019-04-19 Jakub Jelinek <jakub@redhat.com>
4041
4042 PR c/89888
4043 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4044 arguments.
4045 (c_do_switch_warnings): Remove outside_range_p argument.
4046 * c-common.c (check_case_bounds): Removed.
4047 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4048 Don't call check_case_bounds. Fold low_value as well as high_value.
4049 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4050 Check for case labels outside of range of original type here and
4051 adjust them.
4052
4053 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4054
4055 PR translation/90041
4056 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4057 in the Warn diagnostics.
4058
4059 PR c/89946
4060 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4061 function comment. Warn if arguments of the attribute are not positive
4062 integer constants.
4063
4064 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4065
4066 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4067 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4068
4069 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4070
4071 * c-ada-spec.c (is_float128): New predicate extracted from...
4072 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4073 <REAL_TYPE>: ...here. Call it.
4074
4075 2019-04-05 David Malcolm <dmalcolm@redhat.com>
4076
4077 PR c/89985
4078 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4079 auto_diagnostic_group. Guard inform calls by result of
4080 warning_at call.
4081
4082 2019-04-05 Marek Polacek <polacek@redhat.com>
4083
4084 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
4085 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4086 of RHS.
4087
4088 2019-04-03 Jason Merrill <jason@redhat.com>
4089
4090 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4091 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4092
4093 2019-04-01 Martin Sebor <msebor@redhat.com>
4094
4095 PR c/89685
4096 * c-attribs.c (handle_copy_attribute): Handle references and
4097 non-constant expressions.
4098
4099 2019-03-22 Jakub Jelinek <jakub@redhat.com>
4100
4101 PR c++/87481
4102 * c.opt (-fconstexpr-ops-limit=): New option.
4103
4104 2019-03-21 Jakub Jelinek <jakub@redhat.com>
4105
4106 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4107 template param.
4108
4109 2019-03-19 Martin Sebor <msebor@redhat.com>
4110
4111 PR tree-optimization/89688
4112 * c-common.c (braced_list_to_string): Make static.
4113 (braced_lists_to_strings): Define new function.
4114 * c-common.h (braced_list_to_string): Remove.
4115 (braced_lists_to_strings): Declare.
4116
4117 2019-03-12 Martin Liska <mliska@suse.cz>
4118
4119 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4120
4121 2019-03-11 Martin Liska <mliska@suse.cz>
4122
4123 * c-opts.c (c_common_post_options): Wrap apostrophes
4124 in gcc internal format with %'.
4125
4126 2019-03-11 Martin Liska <mliska@suse.cz>
4127
4128 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4129 in a string format message and fix GNU coding style.
4130 * c-common.c (vector_types_convertible_p): Likewise.
4131 (c_build_vec_perm_expr): Likewise.
4132 * c-indentation.c (get_visual_column): Likewise.
4133 * c-opts.c (c_common_handle_option): Likewise.
4134 (c_common_post_options): Likewise.
4135 (sanitize_cpp_opts): Likewise.
4136 * c-pch.c (c_common_pch_pragma): Likewise.
4137 * c-pragma.c (handle_pragma_pack): Likewise.
4138
4139 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4140
4141 PR tree-optimization/89550
4142 * c-common.c (c_common_truthvalue_conversion): Only set
4143 TREE_NO_WARNING if warning_at returned true.
4144 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4145
4146 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4147 Martin Sebor <msebor@gmail.com>
4148
4149 * c.opt (Wmissing-attributes): Clean up doc string.
4150
4151 2019-02-25 Jakub Jelinek <jakub@redhat.com>
4152
4153 PR c/89495
4154 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4155 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4156 checking.
4157
4158 2019-02-22 Richard Biener <rguenther@suse.de>
4159
4160 * c-pch.c (no_checksum): Remove.
4161 (pch_init): Remove assertion that executable_checksum is not
4162 all zero.
4163 (c_common_valid_pch): Likewise.
4164
4165 2019-02-18 Martin Sebor <msebor@redhat.com>
4166
4167 PR middle-end/89294
4168 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4169
4170 2019-02-16 David Malcolm <dmalcolm@redhat.com>
4171
4172 PR c++/88680
4173 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4174 implementing -Wtype-limits.
4175
4176 2019-02-11 Martin Sebor <msebor@redhat.com>
4177
4178 PR c++/87996
4179 * c-common.c (invalid_array_size_error): New function.
4180 (valid_array_size_p): Call it. Handle size as well as type.
4181 * c-common.h (valid_constant_size_p): New function.
4182 (enum cst_size_error): New type.
4183
4184 2019-01-31 David Malcolm <dmalcolm@redhat.com>
4185
4186 PR c/89122
4187 * known-headers.cc (get_stdlib_header_for_name): Add
4188 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4189
4190 2019-01-31 Jakub Jelinek <jakub@redhat.com>
4191
4192 PR libstdc++/88170
4193 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4194 a C cast in pp_c_flag_gnu_v3 mode.
4195
4196 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4197
4198 PR c/86125
4199 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4200 builtin_structptr_types types even for C.
4201
4202 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4203
4204 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4205 when rhs is of array type correctly. Fix handling of nested structures.
4206 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4207 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4208 type casts within nested compound expressions.
4209
4210 2019-01-22 Jakub Jelinek <jakub@redhat.com>
4211
4212 PR middle-end/88968
4213 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4214 variable after using BIT_FIELD_REF.
4215
4216 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4217
4218 PR c/51628
4219 PR c/88664
4220 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4221 Remove the boolean argument.
4222 * c-warn.c (check_address_of_packed_member): Renamed to ...
4223 (check_address_or_pointer_of_packed_member): This. Also
4224 warn pointer conversion.
4225 (check_and_warn_address_of_packed_member): Renamed to ...
4226 (check_and_warn_address_or_pointer_of_packed_member): This.
4227 Also warn pointer conversion.
4228 (warn_for_address_or_pointer_of_packed_member): Remove the
4229 boolean argument. Don't check pointer conversion here.
4230
4231 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4232
4233 PR inline-asm/52813
4234 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4235
4236 2019-01-14 Jakub Jelinek <jakub@redhat.com>
4237
4238 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4239 and __cpp_nontype_template_parameter_auto. Add a comment that
4240 __cpp_template_auto is deprecated.
4241
4242 2019-01-14 Tom Honermann <tom@honermann.net>
4243
4244 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4245 * c-common.c (c_common_reswords): Add char8_t.
4246 (fix_string_type): Use char8_t for the type of u8 string literals.
4247 (c_common_get_alias_set): char8_t doesn't alias.
4248 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4249 C++.
4250 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4251 (keyword_begins_type_specifier): Add RID_CHAR8.
4252 * c-common.h (rid): Add RID_CHAR8.
4253 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4254 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4255 Define char8_type_node and char8_array_type_node.
4256 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4257 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4258 (c_cpp_builtins): Predefine __cpp_char8_t.
4259 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4260 CPP_UTF8STRING.
4261 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4262 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4263 targeting C++2a.
4264 * c.opt: Add the -fchar8_t command line option.
4265
4266 2019-01-14 Martin Sebor <msebor@redhat.com>
4267
4268 PR target/88638
4269 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4270 and issue errors if it fails.
4271 * c-common.h (valid_format_string_type_p): Declare.
4272 * c-format.c (valid_stringptr_type_p): Rename...
4273 (valid_format_string_type_p): ...to this and make extern.
4274 (handle_format_arg_attribute): Adjust to new name.
4275 (check_format_string): Same.
4276
4277 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4278
4279 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4280 Replace "may may" with "may" in warning message.
4281
4282 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4283
4284 PR c++/85052
4285 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4286 (c_build_vec_convert): Declare.
4287 * c-common.c (c_build_vec_convert): New function.
4288
4289 2019-01-04 Martin Sebor <msebor@redhat.com>
4290
4291 PR c/88546
4292 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4293 Handle C++ empty throw specification and C11 _Noreturn.
4294 (has_attribute): Also handle C11 _Noreturn.
4295
4296 2019-01-04 Martin Sebor <msebor@redhat.com>
4297
4298 PR c/88363
4299 * c-attribs.c (positional_argument): Also accept enumerated types.
4300
4301 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4302
4303 Update copyright years.
4304
4305 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4306
4307 PR c/51628
4308 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4309 * c-warn.c (check_alignment_of_packed_member): New function.
4310 (check_address_of_packed_member): Likewise.
4311 (check_and_warn_address_of_packed_member): Likewise.
4312 (warn_for_address_or_pointer_of_packed_member): Likewise.
4313 * c.opt: Add -Wno-address-of-packed-member.
4314
4315 2018-12-20 David Malcolm <dmalcolm@redhat.com>
4316
4317 PR c++/87504
4318 * c-warn.c (get_outermost_macro_expansion): New function.
4319 (spelled_the_same_p): Use it to unwind the macro expansions, and
4320 compare the outermost macro in each nested expansion, rather than
4321 the innermost.
4322
4323 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4324
4325 PR c++/87504
4326 * c-common.h (warn_tautological_cmp): Convert 1st param from
4327 location_t to const op_location_t &.
4328 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4329 when testing for INTEGER_CST.
4330 (warn_tautological_bitwise_comparison): Convert 1st param from
4331 location_t to const op_location_t &; use it to build a
4332 binary_op_rich_location, and use this.
4333 (spelled_the_same_p): New function.
4334 (warn_tautological_cmp): Convert 1st param from location_t to
4335 const op_location_t &. Warn for macro expansions if
4336 spelled_the_same_p. Use binary_op_rich_location.
4337
4338 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4339
4340 PR c++/43064
4341 PR c++/43486
4342 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4343 (verify_tree): Handle location wrappers.
4344 (c_common_truthvalue_conversion): Strip any location wrapper.
4345 Handle CONST_DECL.
4346 (fold_offsetof): Strip any location wrapper.
4347 (complete_array_type): Likewise for initial_value.
4348 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4349 index before checking for INTEGER_CST.
4350 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4351 print parentheses around location wrappers.
4352 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4353 before checking for INTEGER_CST.
4354 (warn_tautological_bitwise_comparison): Call
4355 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4356 before checking for INTEGER_CST.
4357 (readonly_error): Strip any location wrapper.
4358 (warn_array_subscript_with_type_char): Strip location wrappers
4359 before checking for INTEGER_CST. Use the location of the index if
4360 available.
4361
4362 2018-12-06 Jason Merrill <jason@redhat.com>
4363
4364 PR c++/88136 - -Wdeprecated-copy false positives
4365 * c.opt (Wdeprecated-copy-dtor): New.
4366 (Wdeprecated-copy): Move to -Wextra.
4367
4368 2018-11-29 Martin Sebor <msebor@redhat.com>
4369
4370 PR c/88172
4371 PR testsuite/88208
4372 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4373 alignments to values less than the target requires.
4374 (has_attribute): For attribute aligned consider both the attribute
4375 and the alignment bits.
4376 * c-common.c (c_init_attributes): Optionally issue a warning for
4377 zero alignment.
4378
4379 2018-11-28 Martin Sebor <msebor@redhat.com>
4380
4381 PR c/88065
4382 PR c/87297
4383 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4384 or destination is an error.
4385
4386 2018-11-28 Jakub Jelinek <jakub@redhat.com>
4387
4388 PR c++/88215
4389 * c-ubsan.c: Include langhooks.h.
4390 (ubsan_instrument_division): Change gcc_assert that main variants
4391 of op0 and op1 types are equal to gcc_checking_assert that the
4392 main variants are compatible types.
4393
4394 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4395
4396 * c-ada-spec.c: Include stringpool.h.
4397 (has_static_fields): Return false for incomplete types.
4398 (is_tagged_type): Likewise.
4399 (has_nontrivial_methods): Likewise.
4400 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4401 (struct overloaded_name_hash): New structure.
4402 (struct overloaded_name_hasher): Likewise.
4403 (overloaded_names): New global variable.
4404 (init_overloaded_names): New static function.
4405 (overloaded_name_p): New predicate.
4406 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4407 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4408 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4409 Remove always-true condition and dump forward types.
4410 (dump_ada_specs): Delete overloaded_names.
4411
4412 2018-11-20 Martin Sebor <msebor@redhat.com>
4413
4414 * c-attribs.c (type_for_vector_size): New function.
4415 (type_valid_for_vector_size): Same.
4416 (handle_vector_size_attribute): Move code to the functions above
4417 and call them.
4418 (validate_attribute, has_attribute): New functions.
4419 * c-common.h (has_attribute): Declare.
4420 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4421 * c-common.c (c_common_resword): Same.
4422
4423 2018-11-16 Jason Merrill <jason@redhat.com>
4424
4425 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4426 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4427
4428 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4429
4430 PR middle-end/87854
4431 * c-common.c (fix_string_type): Reject string literals larger than
4432 TYPE_MAX_VALUE (ssizetype) bytes.
4433
4434 2018-11-15 Martin Sebor <msebor@redhat.com>
4435
4436 PR c++/87541
4437 PR c++/87542
4438 * c-attribs.c (positional_argument): New function.
4439 (handle_alloc_size_attribute): Use it and simplify.
4440 (handle_alloc_align_attribute): Same.
4441 (handle_assume_aligned_attribute): Same.
4442 (handle_nonnull_attribute): Same.
4443 * c-common.c (check_function_arguments): Pass fntype to
4444 check_function_format.
4445 * c-common.h (check_function_format): Add an argument.
4446 (PosArgFlags, positional_argument): Declare new type and function.
4447 * c-format.c (decode_format_attr): Add arguments.
4448 (check_format_string, get_constant): Same.
4449 (convert_format_name_to_system_name): Adjust.
4450
4451 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4452
4453 PR other/19165
4454 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4455
4456 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4457
4458 P1236R1 - Signed integers are two's complement
4459 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4460 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4461 with in-range second operand well defined for -std=c++2a.
4462
4463 PR other/88007
4464 * c-common.c (parse_optimize_options): Allocate option string from
4465 opts_obstack rather than as GC memory. Move the allocation after
4466 warning for invalid option.
4467
4468 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4469
4470 * c-common.c (c_get_substring_location): Update for renaming of
4471 get_source_location_for_substring to get_location_within_string.
4472 * c-lex.c: Replace "source_location" with "location_t".
4473 * c-opts.c: Likewise.
4474 * c-ppoutput.c: Likewise.
4475
4476 2018-11-13 Martin Sebor <msebor@redhat.com>
4477
4478 PR middle-end/81824
4479 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4480 (handle_tls_model_attribute): Improve diagnostics.
4481
4482 2018-11-12 Jason Merrill <jason@redhat.com>
4483
4484 * c-cppbuiltin.c (c_cpp_builtins): Define
4485 __cpp_impl_destroying_delete.
4486
4487 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4488 __cpp_conditional_explicit.
4489
4490 2018-11-09 Martin Sebor <msebor@redhat.com>
4491
4492 PR middle-end/81824
4493 * c-attribs.c (handle_copy_attribute): New function.
4494
4495 2018-11-09 Martin Sebor <msebor@redhat.com>
4496
4497 PR c/87795
4498 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4499
4500 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4501
4502 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4503 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4504 enum omp_memory_order MEMORY_ORDER.
4505 (c_finish_omp_flush): Add MO argument.
4506 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4507 (c_finish_omp_for): Add FINAL_P argument.
4508 * c-omp.c: Include memmodel.h.
4509 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4510 OMP_TASKGROUP_CLAUSES to it.
4511 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4512 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4513 instead of OMP_ATOMIC_SEQ_CST.
4514 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4515 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4516 __atomic_thread_fence call with the given value.
4517 (check_omp_for_incr_expr): Formatting fixes.
4518 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4519 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4520 is not constant expression 1 or -1. Transform NE_EXPR loops
4521 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4522 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4523 loops too.
4524 (c_omp_split_clauses): Add support for combined
4525 #pragma omp parallel master and
4526 #pragma omp {,parallel }master taskloop{, simd} constructs.
4527 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4528 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4529 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4530 (c_omp_predetermined_sharing): Don't return
4531 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4532 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4533 PRAGMA_OMP_REQUIRES.
4534 * c-pragma.h (enum pragma_kind): Likewise.
4535 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4536 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4537
4538 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4539
4540 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4541
4542 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4543
4544 * c-format.c (local_cgraph_node_ptr_node): New variable.
4545 (gcc_dump_printf_char_table): Add entry for %C.
4546 (get_pointer_to_named_type): New function, taken from the handling
4547 code for "gimple *" from...
4548 (init_dynamic_diag_info): ...here. Add handling for
4549 "cgraph_node *".
4550 * c-format.h (T_CGRAPH_NODE): New.
4551
4552 2018-10-19 Jason Merrill <jason@redhat.com>
4553
4554 * c-cppbuiltin.c (c_cpp_builtins): Add
4555 __cpp_nontype_template_parameter_class.
4556
4557 2018-10-31 Nathan Sidwell <nathan@acm.org>
4558
4559 * c-opts.c (c_finish_options): Force command line macro
4560 location. Refactor to avoid repeating main debug hook.
4561 (push_command_line_include): Clarify comment.
4562
4563 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4564
4565 2018-10-30 Martin Sebor <msebor@redhat.com>
4566
4567 PR middle-end/87041
4568 * c-format.c (check_format_types): Avoid diagnosing null pointer
4569 arguments to printf-family of functions.
4570
4571 2018-10-30 Marek Polacek <polacek@redhat.com>
4572
4573 Implement P0892R2, explicit(bool).
4574 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4575
4576 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4577
4578 * name-hint.h (name_hint::take_deferred): New member function.
4579
4580 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4581
4582 PR c++/56856
4583 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4584 argument.
4585 (check_function_restrict): Rename param "argarray" to
4586 "unfolded_argarray", and make a copy named "argarray", calling
4587 fold_for_warn on each argument.
4588 (check_function_arguments): Add note about responsibility for
4589 folding the arguments.
4590
4591 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4592
4593 * c-common.c (flag_isoc2x): New variable.
4594 * c-common.h (clk_c): Update comment to reference C2X.
4595 (flag_isoc99, flag_isoc11): Update comments to reference future
4596 standard versions in general.
4597 (flag_isoc2x): Declare.
4598 * c-opts.c (set_std_c2x): New function.
4599 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4600 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4601 flag_isoc2x to 0.
4602 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4603
4604 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4605
4606 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4607 (std=iso9899:2018): Document C17 as published in 2018.
4608
4609 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4610
4611 PR c++/87364
4612 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4613
4614 2018-10-11 Will Wray <wjwray@gmail.com>
4615
4616 PR c++/87364
4617 * c-pretty-print.h (pp_c_type_cast): Prototype.
4618 (pp_c_integer_constant): Likewise.
4619 * c-pretty-print.c (pp_c_type_cast): No longer static.
4620 (pp_c_integer_constant): Likewise.
4621 (pp_c_enumeration_constant): Fix loop termination when finding
4622 name of constant. No longer returns a value. Call
4623 pp_c_integer_constant.
4624 (c_pretty_printer::constant): Update for changes to
4625 pp_c_enumeration_constant.
4626
4627 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4628
4629 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4630 for no_unique_address.
4631
4632 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4633
4634 * c-common.c (c_option_controlling_cpp_error): Rename to...
4635 (c_option_controlling_cpp_diagnostic): ...this, and convert
4636 "reason" from int to enum.
4637 (c_cpp_error): Rename to...
4638 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4639 * c-common.h (c_cpp_error): Rename to...
4640 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4641 * c-opts.c (c_common_init_options): Update for renaming.
4642
4643 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4644
4645 PR c/87286
4646 * c-common.c (vector_types_compatible_elements_p): Use
4647 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4648
4649 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4650
4651 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4652 to generate constructor destructor priority warning.
4653 * c.opt (-Wprio-ctor-dtor): New option.
4654
4655 2018-10-01 Jason Merrill <jason@redhat.com>
4656
4657 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4658
4659 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4660
4661 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4662 (dump_ada_node): Add const keyword.
4663
4664 2018-09-25 Martin Liska <mliska@suse.cz>
4665
4666 * c-common.c (c_common_truthvalue_conversion):
4667 Remove Pascal from documentation.
4668
4669 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4670
4671 * c-ada-spec.c: Include diagnostic.h.
4672 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4673
4674 2018-09-19 Marek Polacek <polacek@redhat.com>
4675
4676 * c.opt (Wclass-conversion): New.
4677
4678 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4679
4680 * c-format.c (range_label_for_format_type_mismatch::get_text):
4681 Update for new param.
4682
4683 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4684
4685 * c-format.c (format_warning_at_char): Update for introduction of
4686 format_string_diagnostic_t.
4687 (format_type_warning): Likewise.
4688
4689 2018-09-17 Martin Jambor <mjambor@suse.cz>
4690
4691 PR c/63886
4692 * c.opt (Wabsolute-value): New.
4693
4694 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4695
4696 * c-common.c (complete_flexible_array_elts): New helper function.
4697 * c-common.h (complete_flexible_array_elts): Declare.
4698
4699 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4700
4701 * c-common.c (braced_list_to_string): Remove eval parameter.
4702 Add some more checks. Always create zero-terminated STRING_CST.
4703 * c-common.h (braced_list_to_string): Adjust prototype.
4704
4705 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4706
4707 PR 87091
4708 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4709 to a tri-state.
4710 (maybe_suggest_missing_token_insertion): Likewise.
4711 (maybe_add_include_fixit): Add param "override_location". If set,
4712 and source-printing is enabled, then override the rich_location's
4713 primary location with that of the insertion point for the fix-it
4714 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4715 * c-common.h (extern void maybe_add_include_fixit): Add bool
4716 param.
4717 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4718 for conversion of show_caret_p to a tri-state.
4719 * c-warn.c (warn_for_restrict): Likewise.
4720 * known-headers.cc
4721 (suggest_missing_header::~suggest_missing_header): Update call to
4722 maybe_add_include_fixit to suggest overriding the location, as it
4723 is for a note.
4724
4725 2018-08-27 Martin Liska <mliska@suse.cz>
4726
4727 * c-common.c (check_function_restrict): Use new function
4728 fndecl_built_in_p and remove check for FUNCTION_DECL if
4729 possible.
4730 (check_builtin_function_arguments): Likewise.
4731 (reject_gcc_builtin): Likewise.
4732 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4733
4734 2018-08-26 Marek Polacek <polacek@redhat.com>
4735
4736 PR c++/87029, Implement -Wredundant-move.
4737 * c.opt (Wredundant-move): New option.
4738
4739 2018-08-21 Marek Polacek <polacek@redhat.com>
4740
4741 PR c++/86981, Implement -Wpessimizing-move.
4742 * c.opt (Wpessimizing-move): New option.
4743
4744 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4745
4746 PR other/84889
4747 * c-attribs.c (common_handle_aligned_attribute): Add
4748 auto_diagnostic_group instance.
4749 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4750 * c-opts.c (c_common_post_options): Likewise.
4751 * c-warn.c (warn_logical_not_parentheses): Likewise.
4752 (warn_duplicated_cond_add_or_warn): Likewise.
4753 (warn_for_multistatement_macros): Likewise.
4754
4755 2018-08-20 Nathan Sidwell <nathan@acm.org>
4756
4757 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4758 access.
4759
4760 2018-08-17 Nathan Sidwell <nathan@acm.org>
4761
4762 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4763 field.
4764 (laxy_hex_fp_value_count): Make unsigned.
4765 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4766 manipulate the macro.
4767 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4768 cpp_define_lazily.
4769
4770 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4771
4772 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4773 (gcc_dump_printf_length_specs): New.
4774 (gcc_dump_printf_flag_pairs): New.
4775 (gcc_dump_printf_flag_specs): New.
4776 (gcc_dump_printf_char_table): New.
4777 (format_types_orig): Add entry for "gcc_dump_printf".
4778 (init_dynamic_diag_info): Set up length_char_specs and
4779 conversion_specs for gcc_dump_printf_format_type.
4780 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4781
4782 2018-08-17 Nathan Sidwell <nathan@acm.org>
4783
4784 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4785
4786 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4787 * c-cppbuiltin.c: Likewise.
4788
4789 2018-08-17 Martin Liska <mliska@suse.cz>
4790
4791 * c.opt: Remove Warn, Init and Report for options with
4792 Ignore/Deprecated flag. Warning is done automatically for
4793 Deprecated flags.
4794
4795 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4796
4797 PR c++/70693
4798 * c-common.c (selftest::c_family_tests): Call
4799 selftest::c_indentation_c_tests.
4800 * c-common.h (selftest::c_indentation_c_tests): New decl.
4801 * c-indentation.c: Include "selftest.h".
4802 (next_tab_stop): Add "tab_width" param, rather than accessing
4803 cpp_opts.
4804 (get_visual_column): Likewise. Clarify comment. Bulletproof
4805 against reading past the end of the line.
4806 (get_first_nws_vis_column): Add "tab_width" param.
4807 (detect_intervening_unindent): Likewise.
4808 (should_warn_for_misleading_indentation): Read tab width from
4809 cpp_opts and pass around.
4810 (selftest::test_next_tab_stop): New test.
4811 (selftest::assert_get_visual_column_succeeds): New function.
4812 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4813 (selftest::assert_get_visual_column_fails): New function.
4814 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4815 (selftest::test_get_visual_column): New test.
4816 (selftest::c_indentation_c_tests): New function.
4817
4818 2018-08-16 Nathan Sidwell <nathan@acm.org>
4819
4820 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4821 (store_ada_macro): Likewise.
4822 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4823 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4824
4825 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4826
4827 * c-format.c: Include "selftest-diagnostic.h" and
4828 "gcc-rich-location.h".
4829 (format_warning_at_char): Pass NULL for new label params of
4830 format_warning_va.
4831 (class indirection_suffix): New class.
4832 (class range_label_for_format_type_mismatch): New class.
4833 (format_type_warning): Move logic for generating "*" suffix to
4834 class indirection_suffix. Create "fmt_label" and "param_label"
4835 to show their types, and pass them to the
4836 format_warning_at_substring calls.
4837 (selftest::test_type_mismatch_range_labels): New test.
4838 (selftest::c_format_c_tests): Call it.
4839
4840 2018-08-13 Martin Sebor <msebor@redhat.com>
4841
4842 PR tree-optimization/71625
4843 * c-common.c (braced_list_to_string): New function.
4844 * c-common.h (braced_list_to_string): Declare it.
4845
4846 2018-08-08 Nathan Sidwell <nathan@acm.org>
4847
4848 * c-common.c (try_to_locate_new_include_inertion_point): Use
4849 linemap_included_from_linemap.
4850 * c-lex.c (fe_file_change): Use linemap_included_from.
4851 * c-ppoutput.c (pp_file_change): Likewise.
4852
4853 2018-08-01 Martin Sebor <msebor@redhat.com>
4854
4855 PR tree-optimization/86650
4856 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
4857 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4858 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4859 * c-format.h (T89_G): Update to be "gimple *" rather than
4860 "gcall *".
4861 (local_gcall_ptr_node): Rename...
4862 (local_gimple_ptr_node): ...to this.
4863
4864 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4865
4866 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4867 table entries for gcc_diag_char_table, and the 'Z' entry from
4868 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4869 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4870 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4871 adding missing "Z" for this table. Remove erroneous "G" and "K"
4872 entries.
4873 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4874 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4875 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4876
4877 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4878
4879 * c-common.c (speculation_safe_resolve_call): New function.
4880 (speculation_safe_resolve_params): New function.
4881 (speculation_safe_resolve_return): New function.
4882 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4883 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4884 __HAVE_SPECULATION_SAFE_VALUE.
4885
4886 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4887
4888 * c-common.c (c_cpp_error): Remove redundant "line_table"
4889 parameter from call to rich_location::set_range.
4890 (maybe_suggest_missing_token_insertion): Likewise.
4891
4892 2018-07-20 Martin Sebor <msebor@redhat.com>
4893
4894 PR middle-end/82063
4895 * c.opt (-Warray-bounds): Remove redundant -Wall.
4896
4897 2018-07-20 Martin Sebor <msebor@redhat.com>
4898
4899 PR middle-end/82063
4900 * c-common.h (c_common_handle_option): Change function argument
4901 to HOST_WIDE_INT.
4902 * c-opts.c (c_common_init_options): Same.
4903 (c_common_handle_option): Same. Remove special handling of
4904 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4905 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4906 options to take a HOST_WIDE_INT argument and accept a byte-size
4907 suffix. Initialize.
4908 (-Wvla-larger-than): Same.
4909 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4910 (-Wno-vla-larger-than): Same.
4911
4912 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4913
4914 * c-attribs.c (c_common_attribute_table): Add
4915 "omp declare target implicit" attribute.
4916
4917 2018-07-12 Richard Biener <rguenther@suse.de>
4918
4919 PR c/86453
4920 * c-attribs.c (handle_packed_attribute): Do not build a variant
4921 type with TYPE_PACKED, instead ignore the attribute if we may
4922 not apply to the original type.
4923
4924 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4925
4926 PR c++/86443
4927 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4928 to contain TREE_LIST for both the original class iterator and the
4929 "last" helper var.
4930
4931 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4932
4933 * c-ada-spec.c (to_ada_name): Remove index parameter.
4934 (pp_ada_tree_identifier): Likewise.
4935 (dump_ada_macros): Adjust call to to_ada_name.
4936 (struct overloaded_name_hash): Delete.
4937 (struct overloaded_name_hasher): Likewise.
4938 (overloaded_names): Likewise.
4939 (compute_overloading_index): Likewise.
4940 (dump_ada_decl_name): Do not call compute_overloading_index and
4941 adjust calls to pp_ada_tree_identifier.
4942 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4943 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4944 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4945 (dump_ada_enum_type): Remove type and display_convention parameters.
4946 Adjust calls to pp_ada_tree_identifier.
4947 (dump_ada_node): Likewise and for dump_ada_structure.
4948 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4949 and tidy up.
4950 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4951 syntax.
4952 (print_constructor): Adjust call to pp_ada_tree_identifier.
4953 (print_destructor): Likewise.
4954 (dump_ada_declaration): Switch to aspect syntax.
4955 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4956 parameter with nested parameter.
4957 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4958 (dump_ada_specs): Do not delete overloaded_names table.
4959
4960 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4961
4962 PR target/86324
4963 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4964 target hook.
4965
4966 2018-07-05 Nathan Sidwell <nathan@acm.org>
4967
4968 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4969 NO_IMPLICIT_EXTERN_C.
4970
4971 2018-06-28 Martin Liska <mliska@suse.cz>
4972
4973 * cppspec.c: Include opt-suggestions.h.
4974
4975 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4976 Thomas Schwinge <thomas@codesourcery.com>
4977 Cesar Philippidis <cesar@codesourcery.com>
4978
4979 * c-pragma.h (enum pragma_omp_clause): Add
4980 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4981 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4982
4983 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4984
4985 PR c++/86210
4986 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4987 comment.
4988
4989 2018-06-18 Martin Sebor <msebor@redhat.com>
4990
4991 PR middle-end/85602
4992 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4993 nonstring.
4994
4995 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4996
4997 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4998
4999 2018-06-13 Jason Merrill <jason@redhat.com>
5000
5001 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5002 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5003 handling.
5004
5005 PR c++/86094 - wrong code with defaulted move ctor.
5006 * c-opts.c (c_common_post_options): Bump the current ABI version to
5007 13. Set warn_abi_version and flag_abi_compat_version to the current
5008 version rather than 0. Fix defaulting flag_abi_compat_version from
5009 warn_abi_version.
5010
5011 2018-06-12 Martin Sebor <msebor@redhat.com>
5012
5013 PR c/85931
5014 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5015 sizeof source and destination yields the same value.
5016
5017 2018-06-12 Martin Liska <mliska@suse.cz>
5018
5019 * c.opt: Make MPX-related options as Deprecated.
5020
5021 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5022
5023 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5024 rather than 0.
5025
5026 2018-06-08 Martin Liska <mliska@suse.cz>
5027
5028 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5029 for MPX (macros, related functions, fields in cgraph_node, ...).
5030 (handle_bnd_legacy): Likewise.
5031 (handle_bnd_instrument): Likewise.
5032 * c.opt: Likewise.
5033
5034 2018-06-06 Jakub Jelinek <jakub@redhat.com>
5035
5036 PR c++/86068
5037 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5038 __cpp_transactional_memory to 201500 instead of 210500.
5039
5040 2018-06-06 Jason Merrill <jason@redhat.com>
5041
5042 PR c++/85710 - ICE with -Wmemset-elt-size.
5043 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5044
5045 2018-06-01 Jason Merrill <jason@redhat.com>
5046
5047 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5048 201703.
5049
5050 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5051
5052 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5053 declaration for a typedef independently of whether the declaration of
5054 the subtype is generated.
5055
5056 2018-05-31 Martin Sebor <msebor@redhat.com>
5057
5058 PR c/82063
5059 * c.opt (-Wno-alloc-size-larger-than): New option.
5060
5061 2018-04-22 David Pagan <dave.pagan@oracle.com>
5062
5063 PR c/55976
5064 * c-opts.c (c_common_post_options): Set default for warn_return_type
5065 for C++/C++ with ObjC extensions only. For C, makes it possible to
5066 differentiate between default (no option), -Wreturn-type, and
5067 -Wno-return-type.
5068
5069 2018-05-29 Jason Merrill <jason@redhat.com>
5070
5071 * c.opt (Winit-list-lifetime): New flag.
5072
5073 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5074
5075 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5076 splay_tree_delete_pointers.
5077
5078 2018-05-26 Jakub Jelinek <jakub@redhat.com>
5079
5080 PR bootstrap/85921
5081 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5082 noinline variable to workaround broken kernel headers.
5083
5084 2018-05-18 Jason Merrill <jason@redhat.com>
5085
5086 * c.opt (Wdeprecated-copy): New flag.
5087
5088 2018-05-17 Martin Liska <mliska@suse.cz>
5089
5090 * c-warn.c (overflow_warning): Do not use
5091 space in between 'G_' and '('.
5092
5093 2018-05-09 Jason Merrill <jason@redhat.com>
5094
5095 * c-common.c (valid_array_size_p): Add complain parameter.
5096 * c-common.h: ...which defaults to true.
5097
5098 2018-05-11 Jakub Jelinek <jakub@redhat.com>
5099
5100 PR c/85696
5101 * c-omp.c (c_omp_predetermined_sharing): Return
5102 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5103
5104 2018-05-11 Martin Liska <mliska@suse.cz>
5105
5106 PR sanitizer/85556
5107 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5108 TREE_LIST values.
5109
5110 2018-05-10 Jakub Jelinek <jakub@redhat.com>
5111
5112 PR c++/85662
5113 * c-common.h (fold_offsetof_1): Removed.
5114 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5115 CTX argument defaulted to ERROR_MARK.
5116 * c-common.c (fold_offsetof_1): Renamed to ...
5117 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5118 argument, convert the pointer constant to TYPE and use size_binop
5119 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5120 a pointer type. Adjust recursive calls.
5121
5122 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5123
5124 PR c++/85400
5125 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5126
5127 2018-05-07 Nathan Sidwell <nathan@acm.org>
5128
5129 * c.opt (ffor-scope): Remove functionality, issue warning.
5130
5131 2018-05-03 Nathan Sidwell <nathan@acm.org>
5132
5133 * c.opt (ffriend-injection): Remove functionality, issue warning.
5134
5135 2018-05-01 David Malcolm <dmalcolm@redhat.com>
5136
5137 PR c/84258
5138 * c-format.c (struct format_check_results): Add field
5139 "number_non_char".
5140 (check_format_info): Initialize it, and warn if encountered.
5141 (check_format_arg): Distinguish between wide char and
5142 everything else when detecting arrays of non-char.
5143
5144 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5145
5146 * c-format.c (get_corrected_substring): Update for
5147 location_get_source_line returning a char_span. Use a char_span
5148 when handling the prefix of the correction.
5149 * c-indentation.c (get_visual_column): Update for
5150 location_get_source_line returning a char_span.
5151 (get_first_nws_vis_column): Likewise.
5152
5153 2018-03-29 David Malcolm <dmalcolm@redhat.com>
5154
5155 PR c++/84269
5156 * known-headers.cc (get_stdlib_header_for_name): Add various names
5157 from <assert.h>, <string.h>, and <memory.h>; add more names from
5158 <stdio.h>.
5159
5160 2018-03-27 Jakub Jelinek <jakub@redhat.com>
5161
5162 PR c++/85061
5163 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5164 get_base_address of the second operand is a VAR_P, rather than the
5165 operand itself, and use gcc_checking_assert instead of gcc_assert.
5166
5167 2018-03-23 Marek Polacek <polacek@redhat.com>
5168
5169 PR c++/85045
5170 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5171 <case RDIV_EXPR>: Tweak condition.
5172
5173 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5174
5175 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5176
5177 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5178
5179 PR c/84909
5180 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5181 diagnostics.
5182
5183 PR c/84910
5184 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5185 diagnostics.
5186
5187 2018-03-16 Richard Biener <rguenther@suse.de>
5188
5189 PR c/84873
5190 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5191 unshare the possibly folded expression.
5192
5193 2018-03-15 Richard Biener <rguenther@suse.de>
5194
5195 PR c/84873
5196 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5197
5198 2018-03-13 Martin Sebor <msebor@redhat.com>
5199
5200 PR tree-optimization/84725
5201 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5202 with all three narrow character types, including their qualified forms.
5203
5204 2018-03-12 Martin Sebor <msebor@redhat.com>
5205
5206 PR tree-optimization/83456
5207 * c-common.c (check_function_restrict): Return bool.
5208 Restore checking of bounded built-in functions.
5209 (check_function_arguments): Also return the result
5210 of warn_for_restrict.
5211 * c-common.c (check_function_restrict): Return bool.
5212 * c-warn.c (warn_for_restrict): Return bool.
5213
5214 2018-03-02 Marek Polacek <polacek@redhat.com>
5215
5216 PR c++/84171
5217 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5218 is erroneous.
5219
5220 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5221
5222 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5223 function".
5224
5225 2018-03-01 Marek Polacek <polacek@redhat.com>
5226
5227 PR c++/84639
5228 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5229 alignment in computation.
5230
5231 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5232
5233 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5234 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5235
5236 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5237
5238 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5239 (is_char_array): Take a type instead of a declaration.
5240 (dump_ada_array_type): Likewise.
5241 (is_simple_enum): Minor tweak.
5242 (dump_ada_enum_type): New function extracted from...
5243 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5244 <INTEGER_TYPE>: Remove unreachable code.
5245 <RECORD_TYPE>: Likewise. Minor tweaks.
5246 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5247 <ENUMERAL_TYPE>: New case.
5248 <RECORD_TYPE>: Factor out common code.
5249 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5250 Minor tweaks. Deal with enumeral types.
5251 (dump_ada_structure): Minor tweaks.
5252
5253 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5254
5255 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5256 address for incomplete structures.
5257 (dump_forward_type): Do not bail out for incomplete structures.
5258 (dump_ada_declaration): Do not special-case incomplete structures
5259 for subtypes. Dump them as null records for types.
5260
5261 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5262
5263 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5264 (is_char_array): Fix formatting.
5265 (dump_template_types): Likewise.
5266 (dump_generic_ada_node): Rename into...
5267 (dump_ada_node): ...this.
5268 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5269 incomplete structures and not for empty structures. Do not use it
5270 when forward declarations are needed.
5271 (dump_forward_type): New function.
5272 (dump_nested_types): Remove FORWARD parameter. Do not consider
5273 TREE_VISITED and do not generate a forward declaration. Only dump
5274 original nested types for nested declaration.
5275 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5276 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5277 <RECORD_TYPE>: Do not consider TREE_VISITED.
5278 (dump_ada_declaration): Use booleans and fix formatting throughout.
5279 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5280 Call dump_forward_type instead of dump_nested_types for a typedef.
5281 Remove superfluous check and adjust call to dump_nested_types.
5282 <POINTER_TYPE>: Call dump_forward_type and fall through.
5283 (dump_ada_struct_decl): Rename into...
5284 (dump_ada_structure): ...this. Do not special-case empty structures.
5285
5286 2018-02-27 Martin Sebor <msebor@redhat.com>
5287
5288 PR c++/83871
5289 * c.opt (-Wmissing-attributes): New option.
5290
5291 2018-02-21 Martin Liska <mliska@suse.cz>
5292
5293 * c.opt (Wcatch-value=): Add IntegerRange.
5294
5295 2018-02-15 Jason Merrill <jason@redhat.com>
5296
5297 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5298
5299 2018-02-09 Nathan Sidwell <nathan@acm.org>
5300
5301 PR c/84293
5302 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5303 arg.
5304 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5305 arg. Adjust.
5306
5307 2018-02-09 Martin Sebor <msebor@redhat.com>
5308
5309 PR lto/84212
5310 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5311 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5312 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5313 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5314 (-Wuninitialized): Same.
5315
5316 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5317
5318 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5319 keyword for components.
5320
5321 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5322
5323 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5324
5325 2018-02-02 Julia Koval <julia.koval@intel.com>
5326
5327 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5328
5329 2018-01-29 Marek Polacek <polacek@redhat.com>
5330
5331 PR c/83966
5332 * c-format.c (check_function_format): Check current_function_decl.
5333
5334 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5335
5336 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5337 argument.
5338 (LAZY_HEX_FP_VALUES_CNT): Define.
5339 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5340 values rather than just 12.
5341 (builtin_define_with_hex_fp_value): Likewise.
5342
5343 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5344
5345 PR other/70268
5346 * c.opt (-fmacro-prefix-map): New option.
5347 * c-opts.c (c_common_handle_option): Handle it.
5348 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5349 * c-ppoutput.c (init_pp_output): Likewise.
5350
5351 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5352
5353 PR c++/83814
5354 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5355
5356 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5357
5358 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5359 Skip 'f' and 'F' characters if it is true.
5360 (store_ada_macro): Minor tweak.
5361 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5362 <CPP_WSTRING>: Likewise.
5363 <CPP_STRING>: Output '&' in the buffer if not the first string.
5364 <CPP_NUMBER>: Adjust calls to dump_number.
5365
5366 2018-01-10 David Malcolm <dmalcolm@redhat.com>
5367
5368 PR c++/43486
5369 * c-common.c: Include "selftest.h".
5370 (get_atomic_generic_size): Perform the test for integral type
5371 before the range test for any integer constant, fixing indentation
5372 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5373 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5374 (selftest::test_fold_for_warn): New function.
5375 (selftest::c_common_c_tests): New function.
5376 (selftest::c_family_tests): Call it, and
5377 selftest::c_pretty_print_c_tests.
5378 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5379 * c-format.c (check_format_arg): Convert VAR_P check to a
5380 fold_for_warn.
5381 * c-pretty-print.c: Include "selftest.h".
5382 (pp_c_cast_expression): Don't print casts for location wrappers.
5383 (selftest::assert_c_pretty_printer_output): New function.
5384 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5385 (selftest::test_location_wrappers): New function.
5386 (selftest::c_pretty_print_c_tests): New function.
5387 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5388
5389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5390 Alan Hayward <alan.hayward@arm.com>
5391 David Sherwood <david.sherwood@arm.com>
5392
5393 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5394
5395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5396 Alan Hayward <alan.hayward@arm.com>
5397 David Sherwood <david.sherwood@arm.com>
5398
5399 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5400 as polynomial.
5401
5402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5403 Alan Hayward <alan.hayward@arm.com>
5404 David Sherwood <david.sherwood@arm.com>
5405
5406 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5407 (convert_vector_to_array_for_subscript): Handle polynomial
5408 TYPE_VECTOR_SUBPARTS.
5409 (c_common_type_for_mode): Check valid_vector_subparts_p.
5410 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5411 VECTOR_CST_NELTS.
5412
5413 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5414
5415 Update copyright years.
5416
5417 2017-12-22 Mike Stump <mikestump@comcast.net>
5418 Eric Botcazou <ebotcazou@adacore.com>
5419
5420 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5421 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5422
5423 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5424
5425 PR debug/83527
5426 PR debug/83419
5427 * c-semantics.c (only_debug_stmts_after_p): New.
5428 (pop_stmt_list): Clear side effects in debug-only stmt list.
5429 Check for single nondebug stmt followed by debug stmts only.
5430
5431 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5432
5433 PR debug/83419
5434 * c-semantics.c (pop_stmt_list): Propagate side effects from
5435 single nondebug stmt to container list.
5436
5437 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5438
5439 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5440 conditions with typical order conditions.
5441
5442 2017-12-18 Marek Polacek <polacek@redhat.com>
5443
5444 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5445 not in effect.
5446
5447 2017-12-17 Martin Sebor <msebor@redhat.com>
5448
5449 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5450 an error for attribute warn_if_not_aligned.
5451
5452 2017-12-16 Martin Sebor <msebor@redhat.com>
5453
5454 PR tree-optimization/78918
5455 * c-common.c (check_function_restrict): Avoid checking built-ins.
5456 * c.opt (-Wrestrict): Include in -Wall.
5457
5458 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5459
5460 * c-attribs.c (c_common_attribute_table,
5461 c_common_format_attribute_table): Swap affects_type_identity
5462 and handler fields, adjust comments.
5463
5464 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5465
5466 * c.opt (Wcast-function-type): New warning option.
5467 * c-lex.c (get_fileinfo): Avoid warning.
5468 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5469
5470 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5471
5472 PR middle_end/79538
5473 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5474 Adjust the size of buf1 and buf2, add a new buf to avoid
5475 format-overflow warning.
5476
5477 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5478
5479 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5480 subsequent statement list.
5481
5482 2017-12-07 Martin Sebor <msebor@redhat.com>
5483
5484 PR c/81544
5485 PR c/81566
5486 * c-attribs.c (attr_aligned_exclusions): New array.
5487 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5488 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5489 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5490 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5491 (attr_warn_unused_result_exclusions): Same.
5492 (handle_hot_attribute, handle_cold_attribute): Simplify.
5493 (handle_const_attribute): Warn on function returning void.
5494 (handle_pure_attribute): Same.
5495 (handle_aligned_attribute): Diagnose conflicting attribute
5496 specifications.
5497 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5498
5499 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5500
5501 PR c/83236
5502 * c-common.c (selftest::c_family_tests): Call
5503 selftest::c_spellcheck_cc_tests.
5504 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5505 * c-spellcheck.cc: Include "selftest.h".
5506 (name_reserved_for_implementation_p): New function.
5507 (should_suggest_as_macro_p): New function.
5508 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5509 should_suggest_as_macro_p and call it.
5510 (selftest::test_name_reserved_for_implementation_p): New function.
5511 (selftest::c_spellcheck_cc_tests): New function.
5512 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5513
5514 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5515
5516 * c-spellcheck.cc: New file, taken from macro-handling code in
5517 spellcheck-tree.c.
5518 * c-spellcheck.h: New file, taken from macro-handling code in
5519 spellcheck-tree.h.
5520
5521 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5522
5523 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5524 attribute.
5525 (handle_simd_attribute): Don't check for "cilk simd function"
5526 attribute. Reindent, formatting changes.
5527
5528 2017-11-30 Julia Koval <julia.koval@intel.com>
5529
5530 * c-common.h (inv_list): Remove.
5531
5532 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5533
5534 PR sanitizer/81275
5535 * c-common.c (c_switch_covers_all_cases_p_1,
5536 c_switch_covers_all_cases_p): New functions.
5537 * c-common.h (c_switch_covers_all_cases_p): Declare.
5538
5539 2017-11-28 Julia Koval <julia.koval@intel.com>
5540 Sebastian Peryt <sebastian.peryt@intel.com>
5541
5542 * array-notation-common.c: Delete.
5543 * c-cilkplus.c: Ditto.
5544 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5545 * c-common.def (ARRAY_NOTATION_REF): Remove.
5546 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5547 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5548 c_validate_cilk_plus_loop, cilkplus_an_parts,
5549 cilk_ignorable_spawn_rhs_op,
5550 cilk_recognize_spawn): Remove.
5551 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5552 * c-omp.c: Remove CILK_SIMD check.
5553 * c-pragma.c: Ditto.
5554 * c-pragma.h: Remove CILK related pragmas.
5555 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5556 ARRAY_NOTATION_REF condition.
5557 (c_pretty_printer::expression): Ditto.
5558 * c.opt (fcilkplus): Remove.
5559 * cilk.c: Delete.
5560
5561 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5562
5563 * c-pretty-print.c (pp_c_additive_expression,
5564 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5565
5566 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5567
5568 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5569
5570 PR c++/83059
5571 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5572 instead of tree_to_uhwi, formatting fix.
5573
5574 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5575
5576 PR c/81404
5577 * known-headers.cc: New file, based on material from c/c-decl.c.
5578 (suggest_missing_header): Copied as-is.
5579 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5580 heavily edited to add C++ support. Add some knowledge about
5581 <limits.h>, <stdint.h>, and <wchar.h>.
5582 * known-headers.h: Likewise.
5583
5584 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5585
5586 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5587 (lookup_name_fuzzy): Likewise. Convert return type from
5588 const char * to name_hint. Add location_t param.
5589 * name-hint.h: New header.
5590
5591 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5592
5593 PR c/66618
5594 PR c/69960
5595 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5596
5597 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5598
5599 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5600 expected publication date of C17.
5601 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5602
5603 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5604
5605 PR c/81156
5606 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5607 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5608
5609 2017-11-10 Martin Sebor <msebor@redhat.com>
5610
5611 PR c/81117
5612 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5613 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5614 * c.opt (-Wstringop-truncation): New option.
5615
5616 2017-11-06 Martin Liska <mliska@suse.cz>
5617
5618 PR middle-end/82404
5619 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5620 FE.
5621 * c.opt: Set default value of warn_return_type.
5622
5623 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5624
5625 * c-common.c (binary_op_error): Update for renaming of
5626 error_at_rich_loc.
5627 (c_parse_error): Likewise.
5628 * c-warn.c (warn_logical_not_parentheses): Likewise for
5629 renaming of inform_at_rich_loc.
5630 (warn_for_restrict): Likewise for renaming of
5631 warning_at_rich_loc_n.
5632
5633 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5634
5635 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5636 * c-opts.c (set_std_c17): New function.
5637 (c_common_init_options): Use gnu17 as default C version.
5638 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5639
5640 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5641
5642 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5643 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5644 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5645 __FP_FAST_FMA<N>X.
5646
5647 2017-10-23 Marek Polacek <polacek@redhat.com>
5648
5649 PR c/82681
5650 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5651
5652 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5653
5654 * c-common.c (check_builtin_function_arguments): Also check arguments
5655 of __builtin_alloca_with_align_and_max.
5656
5657 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5658
5659 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5660 rather than NULL to format_warning_va.
5661 (check_format_types): Likewise when calling format_type_warning.
5662 Remove code to extract source_ranges and source_range * in favor
5663 of just a location_t.
5664 (format_type_warning): Convert source_range * param to a
5665 location_t.
5666
5667 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5668
5669 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5670 [LR]SHIFT_EXPR.
5671
5672 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5673
5674 * c-common.c (enum missing_token_insertion_kind): New enum.
5675 (get_missing_token_insertion_kind): New function.
5676 (maybe_suggest_missing_token_insertion): New function.
5677 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5678
5679 2017-10-11 Nathan Sidwell <nathan@acm.org>
5680
5681 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5682 (c_common_handle_option): Update incpath_kind names.
5683
5684 2017-10-11 Martin Liska <mliska@suse.cz>
5685
5686 PR sanitizer/82490
5687 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5688 Wattributes warning.
5689
5690 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5691
5692 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5693 operating on trees as wide_ints.
5694 * c-common.c (pointer_int_sum): Likewise.
5695 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5696 * c-warn.c (match_case_to_enum_1): Likewise.
5697 (c_do_switch_warnings): Likewise.
5698 (maybe_warn_shift_overflow): Likewise.
5699
5700 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5701
5702 PR c/82437
5703 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5704 instead of wide_int::from.
5705
5706 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5707
5708 PR c/82437
5709 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5710 using to_widest use wide_int with the larger of the two precisions.
5711
5712 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5713
5714 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5715 functions.
5716
5717 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5718
5719 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5720 when combining the original unconverted comparison operands.
5721
5722 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5723
5724 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5725 attribute.
5726
5727 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5728
5729 * c-ada-spec.c (to_ada_name): Add index parameter.
5730 (pp_ada_tree_identifier): Likewise.
5731 (dump_ada_macros): Adjust call to to_ada_name.
5732 (struct overloaded_name_hash): New type.
5733 (struct overloaded_name_hasher): Likewise.
5734 (overloaded_names): New hash table.
5735 (compute_overloading_index): New function.
5736 (dump_ada_decl_name): Call it and pass the result to
5737 pp_ada_tree_identifier.
5738 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5739 (dump_ada_function_declaration): Likewise.
5740 (dump_generic_ada_node): Likewise.
5741 (print_constructor): Likewise.
5742 (print_destructor): Likewise.
5743 (dump_ada_specs): Delete overloaded_names table.
5744
5745 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5746
5747 * c-ada-spec.c (max_ada_macros): Move around.
5748 (store_ada_macro_index): Likewise.
5749 (source_file): Rename into...
5750 (macro_source_file): ...this.
5751 (count_ada_macro): Move around.
5752 (store_ada_macro): Likewise.
5753 (compare_macro): Likewise.
5754 (print_ada_macros): Merge in...
5755 (dump_ada_macros): ...this.
5756 (source_file_base): Rename into...
5757 (current_source_file): ...this.
5758 (print_comment): Move around.
5759 (dump_ada_nodes): Call dump_ada_declaration directly.
5760 (struct with): Change type of limited field to bool.
5761 (append_withs): Change type of limited_access parameter to bool.
5762 (pp_ada_tree_identifie): Likewise.
5763 (dump_ada_decl_nam): Likewise.
5764 (dump_generic_ada_node): Likewise. Do not print the return type.
5765 (to_ada_name): Change type of space_found parameter to bool.
5766 (dump_ada_function_declaration): Return void and change type of
5767 parameters to bool. Also print the return type for a function.
5768 (print_ada_methods): Rename into...
5769 (dump_ada_methods): ...this.
5770 (print_ada_declaration): Rename into ...
5771 (dump_ada_declaration): ...this. Do not print the return type.
5772 (print_ada_struct_decl): Rename into...
5773 (dump_ada_struct_decl): ...this.
5774
5775 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5776
5777 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5778 rather than DECL_INITIAL.
5779 (common_handle_aligned_attribute): Likewise.
5780
5781 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5782
5783 * c.opt (gen-decls): Add RejectNegative.
5784
5785 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5786 Jakub Jelinek <jakub@redhat.com>
5787
5788 Add support for -std=c++2a.
5789 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5790 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5791 * c-opts.c (set_std_cxx2a): New.
5792 (c_common_handle_option): Set options when -std=c++2a is enabled.
5793 (c_common_post_options): Adjust comments.
5794 (set_std_cxx14, set_std_cxx17): Likewise.
5795
5796 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5797
5798 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5799 message for non-uniform endianness and issue a warning in C++.
5800
5801 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5802
5803 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5804 (Wc++17-compat): Change from undocumented alias to option.
5805 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5806 change C++1z to C++17 in description.
5807 (std=c++1z, std=gnu++1z): Change from option to undocumented
5808 deprecated alias.
5809 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5810 Adjust description.
5811 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5812 * c-opts.c (set_std_cxx1z): Rename to ...
5813 (set_std_cxx17): ... this.
5814 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5815 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5816 caller.
5817 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5818 comments.
5819
5820 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5821
5822 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5823 function alignment if warn_if_not_aligned_p is true.
5824
5825 2017-09-12 Nathan Sidwell <nathan@acm.org>
5826
5827 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5828 resort_sorted_fields): Move to c/c-decl.c.
5829 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5830 (struct sorted_fields_type): Move to c/c-lang.h.
5831
5832 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5833
5834 PR c++/81852
5835 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5836
5837 2017-09-04 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/81783
5840 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5841 (warn_tautological_cmp): Call it.
5842
5843 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5844
5845 * c-opts.c (c_common_finish): Write dependency information even if
5846 there are errors.
5847
5848 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5849
5850 PR c/81887
5851 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5852 (omp_pragmas_simd): ... here.
5853 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5854 create new clauses list containing just simd clause.
5855
5856 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5857 Alan Hayward <alan.hayward@arm.com>
5858 David Sherwood <david.sherwood@arm.com>
5859
5860 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5861 into scalar_mode_supported_p call.
5862 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5863
5864 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5865 Alan Hayward <alan.hayward@arm.com>
5866 David Sherwood <david.sherwood@arm.com>
5867
5868 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5869 for the mode iterator.
5870
5871 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5872 Alan Hayward <alan.hayward@arm.com>
5873 David Sherwood <david.sherwood@arm.com>
5874
5875 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5876 * c-common.c (c_build_vec_perm_expr): Likewise.
5877
5878 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5879 Alan Hayward <alan.hayward@arm.com>
5880 David Sherwood <david.sherwood@arm.com>
5881
5882 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5883
5884 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5885 Alan Hayward <alan.hayward@arm.com>
5886 David Sherwood <david.sherwood@arm.com>
5887
5888 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5889 before calling targetm.addr_space.valid_pointer_mode.
5890
5891 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5892 Alan Hayward <alan.hayward@arm.com>
5893 David Sherwood <david.sherwood@arm.com>
5894
5895 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5896
5897 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5898 Alan Hayward <alan.hayward@arm.com>
5899 David Sherwood <david.sherwood@arm.com>
5900
5901 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5902 iterators.
5903 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5904
5905 2017-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-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5910 case statements.
5911
5912 2017-08-29 Martin Liska <mliska@suse.cz>
5913
5914 PR other/39851
5915 * c-common.c (parse_optimize_options): Add argument to function
5916 call.
5917 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5918
5919 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5920
5921 * c-lex.c (interpret_float): Use token location
5922 when building an EXCESS_PRECISION_EXPR.
5923
5924 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5925
5926 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5927 it to check_function_format.
5928 * c-common.h (check_function_arguments): Add vec<location_t> *
5929 param.
5930 (check_function_format): Likewise.
5931 * c-format.c (struct format_check_context): Add field "arglocs".
5932 (check_function_format): Add param "arglocs"; pass it to
5933 check_format_info.
5934 (check_format_info): Add param "arglocs"; use it to initialize
5935 new field of format_ctx.
5936 (check_format_arg): Pass format_ctx->arglocs to new param of
5937 check_format_info_main.
5938 (class argument_parser): New field "arglocs".
5939 (argument_parser::argument_parser): Add "arglocs_" param and use
5940 it to initialize new field.
5941 (argument_parser::check_argument_type): Pass new arglocs field to
5942 check_format_types.
5943 (check_format_info_main): Add param "arglocs", and use it when
5944 constructing arg_parser.
5945 (check_format_types): Add param "arglocs"; use it if non-NULL when
5946 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5947
5948 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5949
5950 PR c/53037
5951 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5952 (c_common_attribute_table): Add warn_if_not_aligned.
5953 (handle_aligned_attribute): Renamed to ...
5954 (common_handle_aligned_attribute): Remove argument, name, and add
5955 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5956 (handle_aligned_attribute): New.
5957 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5958
5959 2017-08-14 Martin Sebor <msebor@redhat.com>
5960
5961 PR c/81117
5962 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5963 (handle_nonstring_attribute): New function.
5964
5965 2017-08-14 Martin Sebor <msebor@redhat.com>
5966
5967 PR c/81117
5968 * c-format.h (T89_G): New macro.
5969 * c-format.c (local_gcall_ptr_node): New variable.
5970 (init_dynamic_diag_info): Initialize it.
5971
5972 2017-08-11 Martin Liska <mliska@suse.cz>
5973
5974 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5975 TARGET_SUPPORTS_ALIASES.
5976
5977 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5978
5979 * c-common.c (c_parse_error): Add rich_location * param, using it
5980 rather implicitly using input_location.
5981 * c-common.h (c_parse_error): Add rich_location * param.
5982
5983 2017-08-09 Marek Polacek <polacek@redhat.com>
5984
5985 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5986 (c_common_truthvalue_conversion): Likewise.
5987 * c-omp.c (c_finish_omp_atomic): Likewise.
5988 * c-common.h (build_binary_op): Update declaration.
5989
5990 2017-08-08 Martin Liska <mliska@suse.cz>
5991
5992 * c-ada-spec.c: Include header files.
5993 * c-ubsan.c: Likewise.
5994 * c-warn.c: Likewise.
5995
5996 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5997
5998 PR c/69389
5999 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6000
6001 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6002
6003 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6004 (print_ada_methods): Likewise.
6005 (print_ada_declaration): Likewise.
6006
6007 2017-08-07 Martin Liska <mliska@suse.cz>
6008
6009 * array-notation-common.c: Add new includes.
6010 * c-format.c( handle_format_attribute): Canonicalize a format
6011 function name.
6012 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6013 attribute.
6014 * c-pretty-print.c: Add new include.
6015
6016 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6017
6018 * c-ada-spec.c (has_static_fields): Look only into variables.
6019 (print_constructor): Add TYPE parameter and use it for the name.
6020 (print_destructor): Likewise.
6021 (print_ada_declaration): Adjust to new constructor/destructor names.
6022 Adjust calls to print_constructor and print_destructor.
6023 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6024 Look only into variables in the final loop.
6025
6026 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6027
6028 * c-ada-spec.c (has_static_fields): Look only into fields.
6029 (dump_generic_ada_node): Small tweak.
6030 (dump_nested_types): Look only into fields.
6031 (print_ada_declaration): Look only into methods. Small tweak.
6032 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6033
6034 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6035
6036 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6037 (dump_ada_function_declaration): Likewise.
6038 (dump_generic_ada_node): Likewise.
6039 (print_ada_declaration): Add support for const-qualified variables.
6040
6041 2017-07-31 Martin Liska <mliska@suse.cz>
6042
6043 PR sanitize/81530
6044 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6045 Guard condition with flag_sanitize_p also with current_function_decl
6046 non-null equality.
6047 (ubsan_maybe_instrument_reference_or_call): Likewise.
6048
6049 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
6050
6051 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6052
6053 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6054
6055 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6056 for enumeral types.
6057 (print_ada_declaration): Add missing guard for record types.
6058
6059 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6060
6061 PR c/45784
6062 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6063 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6064 new COMPOUND_EXPRs around the rhs of the comparison.
6065
6066 2017-07-27 Marek Polacek <polacek@redhat.com>
6067
6068 PR c/81417
6069 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6070 the types.
6071
6072 2017-07-27 Jakub Jelinek <jakub@redhat.com>
6073
6074 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6075 (handle_noipa_attribute): New function.
6076
6077 2017-07-07 Torsten Duwe <duwe@suse.de>
6078
6079 * c-attribs.c (c_common_attribute_table): Add entry for
6080 "patchable_function_entry".
6081
6082 2017-07-20 Nathan Sidwell <nathan@acm.org>
6083
6084 Remove TYPE_METHODS.
6085 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6086 dump_ada_template, print_ada_methods,
6087 print_ada_declaration): Member fns are on TYPE_FIELDS.
6088
6089 2017-07-18 Nathan Sidwell <nathan@acm.org>
6090
6091 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6092
6093 2017-07-14 David Malcolm <dmalcolm@redhat.com>
6094
6095 * c-common.c (try_to_locate_new_include_insertion_point): New
6096 function.
6097 (per_file_includes_t): New typedef.
6098 (added_includes_t): New typedef.
6099 (added_includes): New variable.
6100 (maybe_add_include_fixit): New function.
6101 * c-common.h (maybe_add_include_fixit): New decl.
6102
6103 2017-07-10 Martin Sebor <msebor@redhat.com>
6104
6105 PR other/81345
6106 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6107
6108 2017-07-06 David Malcolm <dmalcolm@redhat.com>
6109
6110 * c-common.c (selftest::c_family_tests): New.
6111 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6112 (selftest::c_family_tests): New decl.
6113
6114 2017-07-04 Marek Polacek <polacek@redhat.com>
6115
6116 PR c/81231
6117 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6118 types.
6119
6120 2017-07-04 Marek Polacek <polacek@redhat.com>
6121
6122 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6123
6124 2017-06-28 Martin Liska <mliska@suse.cz>
6125
6126 PR ipa/81128
6127 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6128 to a function declaration.
6129
6130 2017-06-28 Martin Liska <mliska@suse.cz>
6131
6132 PR driver/79659
6133 * c.opt: Add IntegerRange to various options.
6134
6135 2017-06-26 Marek Polacek <polacek@redhat.com>
6136
6137 PR c/80116
6138 * c-common.h (warn_for_multistatement_macros): Declare.
6139 * c-warn.c: Include "c-family/c-indentation.h".
6140 (warn_for_multistatement_macros): New function.
6141 * c.opt (Wmultistatement-macros): New option.
6142 * c-indentation.c (guard_tinfo_to_string): No longer static.
6143 Change the parameter type to "enum rid". Handle RID_SWITCH.
6144 * c-indentation.h (guard_tinfo_to_string): Declare.
6145
6146 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
6147
6148 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6149
6150 2017-06-15 Martin Sebor <msebor@redhat.com>
6151
6152 PR c++/80560
6153 * c.opt (-Wclass-memaccess): New option.
6154
6155 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6156
6157 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6158
6159 2017-06-13 Marek Polacek <polacek@redhat.com>
6160
6161 PR objc/80949
6162 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6163 branches is null.
6164
6165 2017-06-13 Martin Liska <mliska@suse.cz>
6166
6167 PR sanitize/78204
6168 * c-attribs.c (add_no_sanitize_value): New function.
6169 (handle_no_sanitize_attribute): Likewise.
6170 (handle_no_sanitize_address_attribute): Use the function.
6171 (handle_no_sanitize_thread_attribute): New function.
6172 (handle_no_address_safety_analysis_attribute): Use
6173 add_no_sanitize_value.
6174 (handle_no_sanitize_undefined_attribute): Likewise.
6175 * c-common.h: Declare new functions.
6176 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6177 (ubsan_instrument_shift): Likewise.
6178 (ubsan_instrument_bounds): Likewise.
6179 (ubsan_maybe_instrument_array_ref): Likewise.
6180 (ubsan_maybe_instrument_reference_or_call): Likewise.
6181
6182 2017-06-11 Jason Merrill <jason@redhat.com>
6183
6184 * c-ada-spec.c, c-pragma.c: Use id_equal.
6185
6186 2017-06-04 Marek Polacek <polacek@redhat.com>
6187
6188 PR c/80919
6189 * c-format.c (matching_type_p): Return false if any of the types
6190 requires structural equality.
6191
6192 2017-06-02 Martin Sebor <msebor@redhat.com>
6193
6194 PR c/80892
6195 * c-warn.c (conversion_warning): Use -Wconversion for integer
6196 conversion and -Wfloat-conversion for floating one.
6197
6198 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6199
6200 * c.opt (Wsizeof-pointer-div): New warning option.
6201
6202 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6203
6204 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6205 (Wcatch-value=1): Enable by -Wall.
6206
6207 2017-05-30 David Malcolm <dmalcolm@redhat.com>
6208
6209 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6210 format_chars.
6211 * c.opt (fdiagnostics-show-template-tree): New option.
6212 (felide-type): New option.
6213
6214 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6215
6216 * c.opt (Wcatch-value=): New C++ warning flag.
6217
6218 2017-05-24 Nathan Sidwell <nathan@acm.org>
6219
6220 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6221 const casts to avoid warning.
6222
6223 2017-05-24 Martin Sebor <msebor@redhat.com>
6224
6225 PR c/80731
6226 * c-common.h (unsafe_conversion_p): Add a function argument.
6227 * c-common.c (unsafe_conversion_p): Same.
6228 Add type names and values to diagnostics.
6229 (scalar_to_vector): Adjust.
6230 * c-warn.c (constant_expression_error): Add a function argument.
6231 Add type names and values to diagnostics.
6232 (conversion_warning): Add a function argument.
6233 Add type names and values to diagnostics.
6234 (warnings_for_convert_and_check): Same.
6235
6236 2017-05-19 Jason Merrill <jason@redhat.com>
6237
6238 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6239 enumerators.
6240
6241 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6242
6243 * c-format.c (locus): Move out of function scope,
6244 add GTY attribute.
6245
6246 2017-05-19 Nathan Sidwell <nathan@acm.org>
6247
6248 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6249 (c_common_parse_file): Remove class dump handling.
6250 (get_dump_info): Likewise.
6251
6252 2017-05-19 Richard Biener <rguenther@suse.de>
6253
6254 PR c++/80593
6255 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6256 to alias-set zero memory.
6257
6258 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6259
6260 * c-format.c (local_tree_type_node): Add GTY attribute.
6261
6262 2017-05-18 Marek Polacek <polacek@redhat.com>
6263
6264 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6265 (c_common_fixed_point_type_for_size): Likewise.
6266 (c_common_type_for_mode): Likewise.
6267 (shorten_compare): Likewise.
6268 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6269 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6270
6271 2017-05-18 Marek Polacek <polacek@redhat.com>
6272
6273 * c-common.c (self_promoting_args_p): Change the return type to bool.
6274 Use false/true instead of 0/1.
6275 * c-common.h (self_promoting_args_p): Update.
6276
6277 2017-05-17 Marek Polacek <polacek@redhat.com>
6278
6279 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6280 * c-warn.c: Likewise.
6281
6282 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6283
6284 Implement new C++ intrinsics __is_assignable and __is_constructible.
6285 * c-common.c (__is_assignable, __is_constructible): New.
6286 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6287
6288 2017-05-17 Martin Liska <mliska@suse.cz>
6289
6290 * c-common.h: Introduce dump_flags_t type and
6291 use it instead of int type.
6292 * c-gimplify.c (c_genericize): Likewise.
6293 * c-opts.c: Likewise.
6294
6295 2017-05-17 Marek Polacek <polacek@redhat.com>
6296
6297 * c-common.c (c_save_expr): Remove.
6298 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6299 * c-common.h (c_save_expr): Remove declaration.
6300
6301 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6302
6303 PR c/35441
6304 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6305 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6306 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6307 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6308 RDIV_EXPR.
6309 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6310
6311 2017-05-09 Marek Polacek <polacek@redhat.com>
6312
6313 PR c/80525
6314 * c-warn.c (unwrap_c_maybe_const): New.
6315 (warn_logical_operator): Call it.
6316
6317 2017-05-09 Nathan Sidwell <nathan@acm.org>
6318
6319 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6320 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6321
6322 2017-05-08 Martin Sebor <msebor@redhat.com>
6323
6324 PR translation/80280
6325 * c-format.h (struct format_flag_spec): Add new member.
6326 (T89_T): New macro.
6327 * c-format.c (local_tree_type_node): New global.
6328 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6329 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6330 (strfmon_flag_specs): Likewise.
6331 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6332 with distinct quoting properties.
6333 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6334 (flag_chars_t::validate): Add argument and handle bad quoting.
6335 (check_format_info_main): Handle quoting problems.
6336 (init_dynamic_diag_info): Simplify.
6337
6338 2017-05-08 Jason Merrill <jason@redhat.com>
6339
6340 * c-opts.c (c_common_post_options): Update defaults for
6341 flag_abi_version and flag_abi_compat_version.
6342
6343 2017-05-05 David Malcolm <dmalcolm@redhat.com>
6344
6345 * c-common.c (c_cpp_error): Replace report_diagnostic
6346 with diagnostic_report_diagnostic.
6347
6348 2017-05-04 Martin Sebor <msebor@redhat.com>
6349
6350 PR translation/80280
6351 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6352 (handle_weakref_attribute): Same.
6353
6354 2017-05-03 Nathan Sidwell <nathan@acm.org>
6355
6356 Canonicalize canonical type hashing
6357 * c-common.c (complete_array_type): Use type_hash_canon.
6358
6359 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6360
6361 PR c++/80038
6362 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6363 prototype.
6364 (cilk_install_body_pedigree_operations): Likewise.
6365 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6366 detatched.
6367 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6368 (cilk_install_body_pedigree_operations): Likewise.
6369 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6370 unwrapping.
6371
6372 2017-04-27 Jakub Jelinek <jakub@redhat.com>
6373
6374 PR c++/80534
6375 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6376 flag on non-aggregate element types.
6377
6378 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6379
6380 * c-common.c (c_type_hasher, type_hash_table): Remove.
6381 (c_common_get_alias_set): Remove unreachable code.
6382 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6383
6384 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6385
6386 * c.opt (Wextra-semi): New C++ warning flag.
6387
6388 2017-04-20 Jakub Jelinek <jakub@redhat.com>
6389
6390 PR middle-end/80423
6391 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6392
6393 2017-04-18 Jakub Jelinek <jakub@redhat.com>
6394
6395 PR middle-end/79788
6396 PR middle-end/80375
6397 * c-common.c (c_common_type_for_mode): Don't handle
6398 widest_*_literal_type_node here.
6399 c_common_signed_or_unsigned_type): Likewise.
6400 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6401 to *intTI_type_node or *intDI_type_node depending on whether
6402 TImode is supported by the target or not.
6403
6404 2017-04-10 Martin Liska <mliska@suse.cz>
6405
6406 PR sanitizer/80350
6407 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6408 doing an UBSAN check.
6409
6410 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6411
6412 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6413
6414 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6415
6416 PR c++/79572
6417 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6418 tree *.
6419 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6420 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6421 REFERENCE_TYPE.
6422
6423 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6424
6425 PR documentation/78732
6426 * c.opt (Wendif-labels): Fix description to refer to
6427 #else rather than #elif.
6428
6429 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6430
6431 PR libstdc++/80251
6432 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6433 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6434
6435 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6436
6437 PR middle-end/80162
6438 * c-common.c (c_common_mark_addressable_vec): Don't set
6439 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6440
6441 2017-03-21 Martin Sebor <msebor@redhat.com>
6442
6443 PR c++/79548
6444 * c-common.c (set_underlying_type): Mark type used only when
6445 original del is declared unused.
6446
6447 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6448
6449 PR translation/79848
6450 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6451 "%qs".
6452
6453 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6454
6455 PR c/79921
6456 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6457 from inform's message, so that xgettext can locate it.
6458
6459 2017-03-09 Marek Polacek <polacek@redhat.com>
6460
6461 PR c++/79962
6462 PR c++/79984
6463 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6464 conversion to the attribute list.
6465
6466 2017-03-09 Martin Liska <mliska@suse.cz>
6467
6468 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6469
6470 2017-03-03 Jason Merrill <jason@redhat.com>
6471
6472 * c.opt (Wnoexcept-type): New.
6473
6474 2017-03-02 Richard Biener <rguenther@suse.de>
6475
6476 PR c/79756
6477 * c-common.c (c_common_mark_addressable_vec): Look through
6478 C_MAYBE_CONST_EXPR.
6479
6480 2017-02-28 Martin Liska <mliska@suse.cz>
6481
6482 * c.opt: Replace space with tabular for options of <number>
6483 type.
6484
6485 2017-02-28 Martin Liska <mliska@suse.cz>
6486
6487 * c.opt: Fix --help=option -Q for options which are of
6488 an enum type.
6489
6490 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6491
6492 PR c++/79588
6493 * c-common.c (check_function_restrict): New function.
6494 (check_function_arguments): Add FNDECL argument. Call
6495 check_function_restrict if -Wrestrict.
6496 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6497 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6498 * c-common.h (check_function_arguments): Add FNDECL argument.
6499 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6500
6501 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6502
6503 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6504 treatment of parameters with pointer-to-tagged type and tidy up.
6505 (print_ada_methods): Remove the special treatment of C++ static member
6506 functions.
6507
6508 2017-02-22 Martin Liska <mliska@suse.cz>
6509
6510 * c.opt: Replace inequality signs with square brackets
6511 for -Wnornalized.
6512
6513 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6514
6515 PR c++/79641
6516 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6517 preserve quals.
6518
6519 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6520
6521 * c-cppbuiltin.c (builtin_define_float_constants): Define
6522 __DECIMAL_DIG__ to the value for long double.
6523
6524 2017-02-15 Marek Polacek <polacek@redhat.com>
6525
6526 PR c/79515
6527 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6528 conversion has occured.
6529
6530 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6531
6532 * c-common.c (c_common_reswords): Add "__RTL".
6533 * c-common.h (enum rid): Add RID_RTL.
6534
6535 2017-01-20 Marek Polacek <polacek@redhat.com>
6536
6537 PR c/64279
6538 * c-common.h (do_warn_duplicated_branches_r): Declare.
6539 * c-gimplify.c (c_genericize): Walk the function tree calling
6540 do_warn_duplicated_branches_r.
6541 * c-warn.c (expr_from_macro_expansion_r): New.
6542 (do_warn_duplicated_branches): New.
6543 (do_warn_duplicated_branches_r): New.
6544 * c.opt (Wduplicated-branches): New option.
6545
6546 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6547
6548 PR c++/71497
6549 * c-indentation.c (warn_for_misleading_indentation): Use the past
6550 subjunctive in the note.
6551
6552 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6553
6554 PR c/79116
6555 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6556 start type to integer_type.
6557
6558 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6559
6560 PR driver/49726
6561 * c.opt (gen-decls): Add Driver flag.
6562
6563 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6564
6565 Revert:
6566 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6567
6568 PR c++/71737
6569 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6570
6571 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6572
6573 PR c++/71737
6574 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6575
6576 2017-01-12 Martin Sebor <msebor@redhat.com>
6577
6578 (-Wformat-overflow): ...to this.
6579
6580 2017-01-11 Martin Sebor <msebor@redhat.com>
6581
6582 PR c/78768
6583 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6584 Also enable for LTO.
6585
6586 2017-01-10 Jason Merrill <jason@redhat.com>
6587
6588 Implement P0195R2, C++17 variadic using.
6589 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6590
6591 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6592
6593 PR translation/79019
6594 PR translation/79020
6595 * c.opt (Wnormalized=): Fix typo in description.
6596
6597 2017-01-08 Martin Sebor <msebor@redhat.com>
6598
6599 PR middle-end/77708
6600 * c.opt (-Wformat-truncation): New option.
6601
6602 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6603
6604 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6605 value to unsigned short to fit in 4 hex digits without
6606 warnings.
6607
6608 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6609
6610 * c.opt (fsso-struct): Add 'native' value.
6611
6612 2017-01-05 Martin Liska <mliska@suse.cz>
6613
6614 PR pch/78970
6615 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6616 header.
6617
6618 2017-01-04 Marek Polacek <polacek@redhat.com>
6619
6620 PR c++/64767
6621 * c.opt (Wpointer-compare): New option.
6622
6623 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6624
6625 PR driver/78957
6626 * c.opt (fsso-struct=): Add RejectNegative.
6627
6628 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6629
6630 Update copyright years.
6631
6632 2016-12-29 Martin Liska <mliska@suse.cz>
6633
6634 PR c/78933
6635 * c.opt (strong-eval-order): Add RejectNegative keyword.
6636
6637 2016-12-22 Jason Merrill <jason@redhat.com>
6638
6639 Implement P0522R0, matching of template template arguments.
6640 * c-cppbuiltin.c (c_cpp_builtins): Define
6641 __cpp_template_template_args.
6642
6643 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6644
6645 PR bootstrap/78817
6646 * c-common.c (struct nonnull_arg_ctx): New type.
6647 (check_function_nonnull): Return bool instead of void. Use
6648 nonnull_arg_ctx as context rather than just location_t.
6649 (check_nonnull_arg): Adjust for the new context type, set
6650 warned_p to true if a warning has been diagnosed.
6651 (check_function_arguments): Return bool instead of void.
6652 * c-common.h (check_function_arguments): Adjust prototype.
6653
6654 2016-12-21 Jason Merrill <jason@redhat.com>
6655
6656 * c.opt (-fnew-ttp-matching): New flag.
6657 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6658
6659 2016-12-14 Martin Jambor <mjambor@suse.cz>
6660
6661 * c-omp.c: Include omp-general.h instead of omp-low.h.
6662 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6663 name.
6664
6665 2016-12-14 Martin Sebor <msebor@redhat.com>
6666
6667 PR c/17308
6668 * c-common.c (check_nonnull_arg): Disable when optimization
6669 is enabled.
6670
6671 2016-12-12 Marek Polacek <polacek@redhat.com>
6672
6673 PR c++/78647
6674 * c-common.c (attribute_fallthrough_p): Return false for
6675 error_mark_node.
6676
6677 2016-12-08 Martin Sebor <msebor@redhat.com>
6678
6679 PR c/78284
6680 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6681
6682 2016-12-08 Martin Sebor <msebor@redhat.com>
6683
6684 PR c/78165
6685 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6686 suffix.
6687
6688 2016-12-07 Martin Sebor <msebor@redhat.com>
6689
6690 PR c/53562
6691 PR middle-end/77784
6692 PR middle-end/78149
6693 PR middle-end/78138
6694 * c.opt (-Wstringop-overflow): New option.
6695
6696 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6697
6698 * c-attribs.c (asan odr indicator): New attribute.
6699 (handle_asan_odr_indicator_attribute): New function.
6700
6701 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6702
6703 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6704 ptrdiff_type_node;
6705
6706 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6707
6708 * c-common.c (excess_precision_mode_join): New.
6709 (c_ts18661_flt_eval_method): New.
6710 (c_c11_flt_eval_method): Likewise.
6711 (c_flt_eval_method): Likewise.
6712 * c-common.h (excess_precision_mode_join): New.
6713 (c_flt_eval_method): Likewise.
6714 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6715 (cpp_iec_559_value): Call it.
6716 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6717 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6718 __FLT_EVAL_METHOD_TS_18661_3__.
6719
6720 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6721
6722 * c-opts.c (c_common_post_options): Add logic to handle the default
6723 case for -fpermitted-flt-eval-methods.
6724
6725 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6726
6727 * c.opt (Wexpansion-to-defined): New.
6728
6729 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6730
6731 PR target/78451
6732 * c-pragma.c (handle_pragma_target): Don't replace
6733 current_target_pragma, but chainon the new args to the current one.
6734
6735 2016-11-22 Nathan Sidwell <nathan@acm.org>
6736
6737 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6738 indentation and formatting.
6739
6740 2016-11-21 Martin Sebor <msebor@redhat.com>
6741
6742 * c.opt (-fprintf-return-value): Enable by default.
6743
6744 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6745
6746 PR c++/71973
6747 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6748 * c-common.c (c_common_nodes_and_builtins): Initialize
6749 const_tm_ptr_type_node.
6750
6751 2016-11-16 Marek Polacek <polacek@redhat.com>
6752
6753 PR c/78285
6754 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6755
6756 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6757
6758 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6759
6760 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6761 Richard Biener <rguenther@suse.de>
6762
6763 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6764 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6765 * c.opt (fgimple): New option.
6766
6767 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6768
6769 PR c/35503
6770 * c-common.h (warn_for_restrict): Declare.
6771 * c-warn.c: Include gcc-rich-location.h.
6772 (warn_for_restrict): New function.
6773 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6774 (gcc_cdiag_char_table): Likewise.
6775 (gcc_cxxdiag_char_table): Likewise.
6776 * c.opt (Wrestrict): New option.
6777
6778 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6779
6780 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6781 for nested types only if the type is a record or union and dump SLOC.
6782
6783 2016-11-09 Jason Merrill <jason@redhat.com>
6784
6785 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6786
6787 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6788
6789 * c-ubsan.c (ubsan_instrument_shift): Handle split
6790 -fsanitize=shift-base and -fsanitize=shift-exponent.
6791
6792 2016-11-07 Jason Merrill <jason@redhat.com>
6793
6794 * c.opt (Wc++1z-compat): New.
6795 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6796
6797 2016-11-07 Martin Liska <mliska@suse.cz>
6798
6799 * c-warn.c (warn_for_unused_label): Save all labels used
6800 in goto or in &label.
6801
6802 2016-11-03 Jason Merrill <jason@redhat.com>
6803
6804 * c-cppbuiltin.c (c_cpp_builtins): Correct
6805 __cpp_inheriting_constructors.
6806
6807 2016-11-01 Jason Merrill <jason@redhat.com>
6808
6809 * c-cppbuiltin.c (c_cpp_builtins): Update
6810 __cpp_inheriting_constructors.
6811
6812 * c.opt (-fnew-inheriting-ctors): New.
6813 * c-opts.c: Default to on for ABI 11+.
6814
6815 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6816
6817 PR c++/77948
6818 * c.opt (fext-numeric-literals): Add Var and Init.
6819 * c-opts.c (c_common_handle_option): Don't clear
6820 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6821 (c_common_post_options): Clear it here if not set
6822 explicitly.
6823
6824 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6825
6826 PR debug/77773
6827 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6828 if NULL.
6829
6830 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6831
6832 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6833 * c-common.c (c_common_reswords): Add __builtin_launder.
6834
6835 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6836
6837 * c-common.c (c_common_truthvalue_conversion): Warn for
6838 multiplications in boolean context. Fix the quoting of '<<' and '<'
6839 in the shift warning.
6840
6841 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6842
6843 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6844
6845 2016-10-20 Jason Merrill <jason@redhat.com>
6846
6847 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6848
6849 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6850
6851 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6852 integer shift ops in boolean context.
6853
6854 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
6855
6856 * c.opt (Walloca): New.
6857 (Walloca-larger-than=): New.
6858 (Wvla-larger-than=): New.
6859
6860 2016-10-17 Marek Polacek <polacek@redhat.com>
6861
6862 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6863 Return immediately when finding a match.
6864 (warn_tautological_cmp): Remove a boolean variable that is no longer
6865 needed.
6866
6867 2016-10-17 Marek Polacek <polacek@redhat.com>
6868
6869 * c-attribs.c: New file.
6870 * c-common.c: Move attributes handling to c-attribs.c.
6871 (get_nonnull_operand): No longer static.
6872 * c-common.h: Move the declarations from c-attribs.c to its own section.
6873
6874 2016-10-14 Jason Merrill <jason@redhat.com>
6875
6876 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6877 and __cpp_deduction_guides.
6878
6879 2016-10-13 Jason Merrill <jason@redhat.com>
6880
6881 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6882
6883 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6884
6885 * c-cppbuiltin.c: Include memmodel.h.
6886 * c-opts.c: Likewise.
6887 * c-pragma.c: Likewise.
6888 * c-warn.c: Likewise.
6889
6890 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6891
6892 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6893 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6894 * c-opts.c (sanitize_cpp_opts): Initialize
6895 cpp_opts->cpp_warn_implicit_fallthrough.
6896
6897 2016-10-11 Marek Polacek <polacek@redhat.com>
6898
6899 * c-common.c (warning_candidate_p): Change the return type to bool
6900 and return true/false instead of 1/0.
6901 (vector_mode_valid_p): Likewise.
6902
6903 2016-10-11 Marek Polacek <polacek@redhat.com>
6904
6905 * c-common.c (fold_for_warn): No longer static.
6906 (bool_promoted_to_int_p): Likewise.
6907 (c_common_get_narrower): Likewise.
6908 (constant_expression_warning): Move to c-warn.c.
6909 (constant_expression_error): Likewise.
6910 (overflow_warning): Likewise.
6911 (warn_logical_operator): Likewise.
6912 (find_array_ref_with_const_idx_r): Likewise.
6913 (warn_tautological_cmp): Likewise.
6914 (expr_has_boolean_operands_p): Likewise.
6915 (warn_logical_not_parentheses): Likewise.
6916 (warn_if_unused_value): Likewise.
6917 (strict_aliasing_warning): Likewise.
6918 (sizeof_pointer_memaccess_warning): Likewise.
6919 (check_main_parameter_types): Likewise.
6920 (conversion_warning): Likewise.
6921 (warnings_for_convert_and_check): Likewise.
6922 (match_case_to_enum_1): Likewise.
6923 (match_case_to_enum): Likewise.
6924 (c_do_switch_warnings): Likewise.
6925 (warn_for_omitted_condop): Likewise.
6926 (readonly_error): Likewise.
6927 (lvalue_error): Likewise.
6928 (invalid_indirection_error): Likewise.
6929 (warn_array_subscript_with_type_char): Likewise.
6930 (warn_about_parentheses): Likewise.
6931 (warn_for_unused_label): Likewise.
6932 (warn_for_div_by_zero): Likewise.
6933 (warn_for_memset): Likewise.
6934 (warn_for_sign_compare): Likewise.
6935 (do_warn_double_promotion): Likewise.
6936 (do_warn_unused_parameter): Likewise.
6937 (record_locally_defined_typedef): Likewise.
6938 (maybe_record_typedef_use): Likewise.
6939 (maybe_warn_unused_local_typedefs): Likewise.
6940 (maybe_warn_bool_compare): Likewise.
6941 (maybe_warn_shift_overflow): Likewise.
6942 (warn_duplicated_cond_add_or_warn): Likewise.
6943 (diagnose_mismatched_attributes): Likewise.
6944 * c-common.h: Move the declarations from c-warn.c to its own section.
6945 * c-warn.c: New file.
6946
6947 2016-10-08 Jason Merrill <jason@redhat.com>
6948
6949 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6950 into COND_EXPR in C++.
6951
6952 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6953
6954 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6955 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6956 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6957
6958 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6959
6960 Implement LWG2296 helper intrinsic
6961 * c-common.h (enum rid): Add RID_ADDRESSOF.
6962 * c-common.c (c_common_reswords): Add __builtin_addressof.
6963
6964 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6965
6966 PR c++/77700
6967 * c-common.c (c_common_truthvalue_conversion): Warn also for
6968 suspicious enum values in boolean context.
6969
6970 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6971
6972 Implement P0258R2 - helper for C++17
6973 std::has_unique_object_representations trait
6974 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6975 * c-common.c (c_common_reswords): Add
6976 __has_unique_object_representations.
6977
6978 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6979
6980 PR sanitizer/66343
6981 * c-ubsan.c (ubsan_instrument_return): Don't call
6982 initialize_sanitizer_builtins here.
6983
6984 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6985
6986 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6987 conditional expression in boolean context when only one arm is
6988 non-boolean.
6989
6990 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6991
6992 PR sanitizer/77823
6993 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6994 is not integral.
6995
6996 * c-common.c (c_common_reswords): Update comment for C++11.
6997
6998 2016-10-04 Jason Merrill <jason@redhat.com>
6999
7000 * c-common.c (make_tree_vector_from_ctor): New.
7001 * c-common.h: Declare it.
7002
7003 2016-10-04 Jakub Jelinek <jakub@redhat.com>
7004
7005 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7006 __LIBGCC_JCR_SECTION_NAME__.
7007
7008 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7009
7010 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7011 left shift in boolean context.
7012
7013 2016-09-29 Jakub Jelinek <jakub@redhat.com>
7014
7015 Implement P0001R1 - C++17 removal of register storage class specifier
7016 * c.opt (Wregister): New warning.
7017 * c-opts.c (c_common_post_options): Enable -Wregister by
7018 default for C++17.
7019
7020 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7021
7022 * c-opts.c (c_common_post_options): Remove special case for
7023 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7024 in C++.
7025
7026 2016-09-27 Jakub Jelinek <jakub@redhat.com>
7027
7028 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7029 -std=c++1z.
7030
7031 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7032
7033 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7034
7035 * c-common.c: Include memmodel.h.
7036
7037 2016-09-26 Marek Polacek <polacek@redhat.com>
7038
7039 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7040
7041 2016-09-26 Marek Polacek <polacek@redhat.com>
7042
7043 PR c/7652
7044 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7045 (handle_fallthrough_attribute): New function.
7046 (attribute_fallthrough_p): New function.
7047 * c-common.h (attribute_fallthrough_p): Declare.
7048
7049 2016-09-24 Marek Polacek <polacek@redhat.com>
7050
7051 PR c/77490
7052 * c.opt (Wbool-operation): New.
7053
7054 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7055
7056 * c-common.c (c_common_truthvalue_conversion): Inhibit
7057 Wint-in-bool-context warning with from_macro_definition_at.
7058 Mention the expression will always evaluate to true.
7059
7060 2016-09-21 Martin Sebor <msebor@redhat.com>
7061
7062 PR bootstrap/77676
7063 * c.opt (fprintf-return-value): Temporarily initialize to zero
7064 to unblock bootstrap failures.
7065
7066 2016-09-21 Jakub Jelinek <jakub@redhat.com>
7067
7068 PR c++/77651
7069 * c.opt (Waligned-new=): Add RejectNegative.
7070 (faligned-new=): Likewise. Spelling fix - change
7071 aligned_new_threshhold to aligned_new_threshold.
7072 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7073 to aligned_new_threshold.
7074
7075 2016-09-20 Martin Sebor <msebor@redhat.com>
7076
7077 PR middle-end/49905
7078 * c.opt: Add -Wformat-length and -fprintf-return-value.
7079
7080 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7081
7082 PR c++/77434
7083 * c.opt (Wint-in-bool-context): New warning.
7084 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7085 constants in boolean context.
7086
7087 2016-09-19 Joseph Myers <joseph@codesourcery.com>
7088
7089 * c-common.c (max_align_t_align): Also consider alignment of
7090 float128_type_node.
7091
7092 2016-09-15 Jason Merrill <jason@redhat.com>
7093
7094 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7095 DECL_EXTERNAL.
7096
7097 2016-09-14 Jason Merrill <jason@redhat.com>
7098
7099 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7100 limit FIELD_DECL, either.
7101
7102 2016-09-14 Marek Polacek <polacek@redhat.com>
7103
7104 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7105 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7106 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7107
7108 2016-09-13 David Malcolm <dmalcolm@redhat.com>
7109
7110 * c-common.c (warn_logical_not_parentheses): Replace
7111 rich_location::add_fixit_insert calls with add_fixit_insert_before
7112 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7113
7114 2016-09-13 Jason Merrill <jason@redhat.com>
7115 Tom de Vries <tom@codesourcery.com>
7116
7117 PR c++/77427
7118 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7119
7120 2016-09-13 Jason Merrill <jason@redhat.com>
7121
7122 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7123 limit types at all.
7124
7125 2016-09-12 Jason Merrill <jason@redhat.com>
7126
7127 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7128 bit/byte confusion, allow large alignment for types.
7129
7130 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7131
7132 PR c++/77496
7133 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7134
7135 2016-09-12 David Malcolm <dmalcolm@redhat.com>
7136
7137 PR c/72858
7138 * c-format.c (argument_parser::check_argument_type): Add params
7139 "type_start" and "conversion_char". Use the former to generate
7140 offset_to_type_start and pass it and conversion_char to
7141 check_format_types.
7142 (check_format_info_main): Capture the start of the type
7143 information as "type_start", and pass it an format_char
7144 to arg_parser.check_argument_type.
7145 (check_format_types): Provide an example in the leading comment.
7146 Add params "offset_to_type_start" and "conversion_char"; pass
7147 them to format_type_warning calls.
7148 (test_get_modifier_for_format_len): Likewise.
7149 (matching_type_p): New function.
7150 (get_format_for_type): Add param "conversion_char" and move
7151 implementation into...
7152 (get_format_for_type_1): ...new function, called twice.
7153 Use new function matching_type_p rather than checking for
7154 TYPE_CANONICAL equality.
7155 (get_corrected_substring): New function.
7156 (format_type_warning): Provide an example in the leading comment.
7157 Add params "offset_to_type_start" and "conversion_char". Replace
7158 call to get_format_for_type with call to get_corrected_substring
7159 and move rejection of hints for widths/precisions there.
7160 (assert_format_for_type_streq): Add param "conversion_char".
7161 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7162 (test_get_format_for_type_printf): Add conversion chars to the
7163 tests, adding coverage for various combinations of integer
7164 vs double conversions, and for preserving octal and hexadecimal
7165 conversions.
7166 (test_get_format_for_type_scanf): Add conversion chars to the
7167 tests.
7168
7169 2016-09-10 Tom de Vries <tom@codesourcery.com>
7170
7171 PR C/71602
7172 * c-common.c (build_va_arg): Handle more strict
7173 targetm.canonical_va_list_type. Replace first argument type error with
7174 assert.
7175
7176 2016-09-09 Martin Sebor <msebor@redhat.com>
7177
7178 PR c/77520
7179 PR c/77521
7180 * c-format.c (argument_parser::find_format_char_info): Use %qc
7181 format directive unconditionally.
7182
7183 2016-09-09 Jason Merrill <jason@redhat.com>
7184
7185 Implement C++17 new of over-aligned types.
7186 * c.opt: Add -faligned-new and -Waligned-new.
7187 * c-common.c (max_align_t_align): Split out from...
7188 (cxx_fundamental_alignment_p): ...here.
7189 * c-common.h: Declare it.
7190 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7191
7192 2016-09-09 Joseph Myers <joseph@codesourcery.com>
7193
7194 * c-cppbuiltin.c (builtin_define_type_width): New function.
7195 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7196 macros.
7197
7198 2016-09-07 David Malcolm <dmalcolm@redhat.com>
7199
7200 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7201 a POINTER_TYPE.
7202 (substring_loc::get_location): Move to substring-locations.c,
7203 keeping implementation as...
7204 (c_get_substring_location): New function, from the above, reworked
7205 to use accessors rather than member lookup.
7206 * c-common.h (class substring_loc): Move to substring-locations.h,
7207 replacing with a forward decl.
7208 (c_get_substring_location): New decl.
7209 * c-format.c: Include "substring-locations.h".
7210 (format_warning_va): Move to substring-locations.c.
7211 (format_warning_at_substring): Likewise.
7212
7213 2016-09-06 Martin Sebor <msebor@redhat.com>
7214
7215 PR c/77336
7216 * c-format.c (check_function_format): Avoid issuing warnings for
7217 functions unless they call format functions with non-constant
7218 format strings.
7219
7220 2016-09-06 Richard Biener <rguenther@suse.de>
7221
7222 PR c/77450
7223 * c-common.c (c_common_mark_addressable_vec): Handle
7224 COMPOUND_LITERAL_EXPR.
7225
7226 2016-09-05 Marek Polacek <polacek@redhat.com>
7227
7228 PR c/77423
7229 * c-common.c (bool_promoted_to_int_p): New function.
7230 (expr_has_boolean_operands_p): New function.
7231 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7232 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7233
7234 2016-09-04 Tom de Vries <tom@codesourcery.com>
7235
7236 revert:
7237 2016-08-29 Tom de Vries <tom@codesourcery.com>
7238
7239 * c-common.c (build_va_arg): Replace first argument type error
7240 with assert.
7241
7242 2016-09-02 Jakub Jelinek <jakub@redhat.com>
7243
7244 PR c/65467
7245 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7246 (c_finish_omp_for): Reject _Atomic qualified iterators.
7247
7248 2016-09-01 Martin Sebor <msebor@redhat.com>
7249
7250 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7251 size to guarantee it fits the output of the formatted function
7252 regardless of its arguments.
7253
7254 2016-09-01 Marek Polacek <polacek@redhat.com>
7255
7256 PR c/7652
7257 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7258 FALLTHRU comments.
7259
7260 2016-08-29 Marek Polacek <polacek@redhat.com>
7261
7262 PR c/77292
7263 * c-common.c (warn_logical_not_parentheses): Don't warn for
7264 a comparison or a logical operator.
7265
7266 2016-08-29 Tom de Vries <tom@codesourcery.com>
7267
7268 * c-common.c (build_va_arg): Fix type comparison assert.
7269
7270 2016-08-29 Tom de Vries <tom@codesourcery.com>
7271
7272 * c-common.c (build_va_arg): Replace first argument type error
7273 with assert.
7274
7275 2016-08-29 Tom de Vries <tom@codesourcery.com>
7276
7277 PR c/77398
7278 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7279 with error_mark_node as va_list instead of with illegal va_list.
7280
7281 2016-08-25 Marek Polacek <polacek@redhat.com>
7282 David Malcolm <dmalcolm@redhat.com>
7283
7284 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7285 * c-common.h (warn_logical_not_parentheses): Update declaration.
7286
7287 2016-08-22 Marek Polacek <polacek@redhat.com>
7288
7289 PR c++/77321
7290 * c-common.c (warn_for_memset): Check type for null.
7291
7292 2016-08-22 Joseph Myers <joseph@codesourcery.com>
7293
7294 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
7295 _FloatNx types for suffixes for built-in functions.
7296
7297 2016-08-19 Joseph Myers <joseph@codesourcery.com>
7298
7299 PR c/32187
7300 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7301 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7302 (RID_FLOAT128X): New enum rid values.
7303 (CASE_RID_FLOATN_NX): New macro.
7304 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7305 keywords.
7306 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7307 corresponding complex types.
7308 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7309 _FloatNx and corresponding complex types.
7310 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7311 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7312 and _FloatNx types for the widest type for determining
7313 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7314 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7315 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7316 and _FloatNx types.
7317 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7318 constants.
7319 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7320 _FloatNx types.
7321
7322 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7323
7324 * c-opts.c (c_diagnostic_finalizer): Update for change to
7325 diagnostic_show_locus.
7326
7327 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7328
7329 * c-common.c: Include "spellcheck.h".
7330 (cb_get_suggestion): New function.
7331 * c-common.h (cb_get_suggestion): New decl.
7332 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7333 cb_get_suggestion.
7334
7335 2016-08-18 Marek Polacek <polacek@redhat.com>
7336
7337 PR c/71514
7338 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7339 and pointer-to-VLA.
7340
7341 2016-08-16 David Malcolm <dmalcolm@redhat.com>
7342
7343 PR c/72857
7344 * c-common.c (substring_loc::get_range): Rename to...
7345 (substring_loc::get_location): ...this, converting param from a
7346 source_range * to a location_t *. Call
7347 get_source_location_for_substring rather than
7348 get_source_range_for_substring, and pass in m_caret_idx.
7349 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7350 (substring_loc::get_range): Replace with...
7351 (substring_loc::get_location): ...this.
7352 (substring_loc::set_caret_index): New method.
7353 (substring_loc): Add field m_caret_idx.
7354 * c-format.c (format_warning_va): Update for above changes.
7355 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7356 clashing with type name.
7357 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7358 (check_argument_type): Likewise.
7359 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7360 Use a copy when emitting warnings, setting the caret index from TYPE.
7361
7362 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
7363 Arnaud Charlet <charlet@adacore.com>
7364
7365 * c-ada-spec.c (dump_number): New function.
7366 (handle_escape_character): Likewise.
7367 (print_ada_macros): Add handling of constant integers and strings.
7368
7369 2016-08-12 Marek Polacek <polacek@redhat.com>
7370
7371 PR c/7652
7372 * c-common.c (scalar_to_vector): Adjust fall through comment.
7373 * c-opts.c (c_common_handle_option): Likewise.
7374 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7375 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7376 fall through comment.
7377 * cilk.c (extract_free_variables): Add FALLTHRU.
7378
7379 2016-08-10 Jason Merrill <jason@redhat.com>
7380
7381 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7382
7383 2016-08-09 Jason Merrill <jason@redhat.com>
7384
7385 * c-common.c (c_common_attribute_table): vector_size affects type
7386 identity.
7387
7388 2016-08-09 Marek Polacek <polacek@redhat.com>
7389
7390 PR c/7652
7391 * c-ada-spec.c (dump_generic_ada_node): Add return.
7392
7393 2016-08-09 Jason Merrill <jason@redhat.com>
7394
7395 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7396 C++17 constexpr lambdas.
7397
7398 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7399
7400 PR c/64955
7401 * c-common.h (selftest::c_format_c_tests): New declaration.
7402 (selftest::run_c_tests): New declaration.
7403 * c-format.c: Include "selftest.h.
7404 (format_warning_va): Add param "corrected_substring" and use
7405 it to add a replacement fix-it hint.
7406 (format_warning_at_substring): Likewise.
7407 (format_warning_at_char): Update for new param of
7408 format_warning_va.
7409 (argument_parser::check_argument_type): Pass "fki" to
7410 check_format_types.
7411 (check_format_types): Add param "fki" and pass it to
7412 format_type_warning.
7413 (deref_n_times): New function.
7414 (get_modifier_for_format_len): New function.
7415 (selftest::test_get_modifier_for_format_len): New function.
7416 (get_format_for_type): New function.
7417 (format_type_warning): Add param "fki" and use it to attempt
7418 to provide hints for argument types when calling
7419 format_warning_at_substring.
7420 (selftest::get_info): New function.
7421 (selftest::assert_format_for_type_streq): New function.
7422 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7423 (selftest::test_get_format_for_type_printf): New function.
7424 (selftest::test_get_format_for_type_scanf): New function.
7425 (selftest::c_format_c_tests): New function.
7426
7427 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7428
7429 PR c/52952
7430 * c-format.c: Include "diagnostic.h".
7431 (location_column_from_byte_offset): Delete.
7432 (location_from_offset): Delete.
7433 (format_warning_va): New function.
7434 (format_warning_at_substring): New function.
7435 (format_warning_at_char): New function.
7436 (check_format_arg): Capture location of format_tree and pass to
7437 check_format_info_main.
7438 (argument_parser): Add fields "start_of_this_format" and
7439 "format_string_cst".
7440 (flag_chars_t::validate): Add param "format_string_cst". Convert
7441 warning_at call using location_from_offset to call to
7442 format_warning_at_char.
7443 (argument_parser::argument_parser): Add param "format_string_cst_"
7444 and use use it to initialize field "format_string_cst".
7445 Initialize new field "start_of_this_format".
7446 (argument_parser::read_format_flags): Convert warning_at call
7447 using location_from_offset to a call to format_warning_at_char.
7448 (argument_parser::read_any_format_left_precision): Likewise.
7449 (argument_parser::read_any_format_precision): Likewise.
7450 (argument_parser::read_any_other_modifier): Likewise.
7451 (argument_parser::find_format_char_info): Likewise, in three places.
7452 (argument_parser::parse_any_scan_set): Likewise, in one place.
7453 (argument_parser::handle_conversions): Likewise, in two places.
7454 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7455 and use it to make a substring_loc. Pass the latter to
7456 check_format_types.
7457 (check_format_info_main): Add params "fmt_param_loc" and
7458 "format_string_cst". Convert warning_at calls using
7459 location_from_offset to calls to format_warning_at_char. Pass the
7460 new params to the arg_parser ctor. Pass "format_string_cst" to
7461 flag_chars.validate. Pass "fmt_param_loc" to
7462 arg_parser.check_argument_type.
7463 (check_format_types): Convert first param from a location_t
7464 to a const substring_loc & and rename to "fmt_loc". Attempt
7465 to extract the range of the relevant parameter and pass it
7466 to format_type_warning.
7467 (format_type_warning): Convert first param from a location_t
7468 to a const substring_loc & and rename to "fmt_loc". Add
7469 params "param_range" and "type". Replace calls to warning_at
7470 with calls to format_warning_at_substring.
7471
7472 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7473
7474 * c-format.c (class flag_chars_t): New class.
7475 (struct length_modifier): New struct.
7476 (class argument_parser): New class.
7477 (flag_chars_t::flag_chars_t): New ctor.
7478 (flag_chars_t::has_char_p): New method.
7479 (flag_chars_t::add_char): New method.
7480 (flag_chars_t::validate): New method.
7481 (flag_chars_t::get_alloc_flag): New method.
7482 (flag_chars_t::assignment_suppression_p): New method.
7483 (argument_parser::argument_parser): New ctor.
7484 (argument_parser::read_any_dollar): New method.
7485 (argument_parser::read_format_flags): New method.
7486 (argument_parser::read_any_format_width): New method.
7487 (argument_parser::read_any_format_left_precision): New method.
7488 (argument_parser::read_any_format_precision): New method.
7489 (argument_parser::handle_alloc_chars): New method.
7490 (argument_parser::read_any_length_modifier): New method.
7491 (argument_parser::read_any_other_modifier): New method.
7492 (argument_parser::find_format_char_info): New method.
7493 (argument_parser::validate_flag_pairs): New method.
7494 (argument_parser::give_y2k_warnings): New method.
7495 (argument_parser::parse_any_scan_set): New method.
7496 (argument_parser::handle_conversions): New method.
7497 (argument_parser::check_argument_type): New method.
7498 (check_format_info_main): Introduce classes argument_parser
7499 and flag_chars_t, moving the code within the loop into methods
7500 of these classes. Make various locals "const".
7501
7502 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7503
7504 * c-common.c: Include "substring-locations.h".
7505 (get_cpp_ttype_from_string_type): New function.
7506 (g_string_concat_db): New global.
7507 (substring_loc::get_range): New method.
7508 * c-common.h (g_string_concat_db): New declaration.
7509 (class substring_loc): New class.
7510 * c-lex.c (lex_string): When concatenating strings, capture the
7511 locations of all tokens using a new obstack, and record the
7512 concatenation locations within g_string_concat_db.
7513 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7514 on the ggc-heap.
7515
7516 2016-07-29 Marek Polacek <polacek@redhat.com>
7517
7518 PR c/71926
7519 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7520 parentheses warning.
7521
7522 PR c/71574
7523 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7524
7525 2016-07-28 Martin Liska <mliska@suse.cz>
7526
7527 PR gcov-profile/68025
7528 * c-common.c (handle_no_profile_instrument_function_attribute):
7529
7530 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7531
7532 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7533 BITS_PER_UNIT_LOG.
7534
7535 2016-07-25 Jason Merrill <jason@redhat.com>
7536
7537 PR c++/65970
7538 * c.opt (fconstexpr-loop-limit): New.
7539
7540 2016-07-22 Martin Sebor <msebor@redhat.com>
7541
7542 PR c++/71675
7543 * c-common.c (resolve_overloaded_builtin): Avoid converting
7544 __atomic_compare_exchange_n return type to that of what its
7545 first argument points to.
7546
7547 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7548
7549 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7550 ~(unsigned HOST_WIDE_INT) 0.
7551
7552 2016-07-22 Martin Liska <mliska@suse.cz>
7553
7554 PR gcov-profile/69028
7555 PR gcov-profile/62047
7556 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7557 to the current_function_decl.
7558
7559 2016-07-21 Jason Merrill <jason@redhat.com>
7560
7561 PR c++/65168
7562 * c-common.c (c_common_truthvalue_conversion): Check
7563 c_inhibit_evaluation_warnings for warning about address of
7564 reference.
7565
7566 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7567
7568 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7569 const char *.
7570
7571 2016-07-15 Jason Merrill <jason@redhat.com>
7572
7573 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7574
7575 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7576
7577 PR c/71858
7578 * c-common.h (enum lookup_name_fuzzy_kind): Add
7579 FUZZY_LOOKUP_FUNCTION_NAME.
7580
7581 2016-07-08 Jason Merrill <jason@redhat.com>
7582
7583 P0145: Refining Expression Order for C++.
7584 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7585 * c-opts.c: Adjust.
7586
7587 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7588
7589 PR c++/71214
7590 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7591
7592 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7593
7594 * c-pragma.h (enum pragma_kind): Rename
7595 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7596 users.
7597
7598 2016-06-29 Richard Biener <rguenther@suse.de>
7599
7600 PR middle-end/71002
7601 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7602
7603 2016-06-24 Jason Merrill <jason@redhat.com>
7604
7605 P0145R2: Refining Expression Order for C++.
7606 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7607 MODIFY_EXPR.
7608
7609 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7610
7611 * c-common.c (check_builtin_function_arguments): Require last
7612 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7613 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7614 if the last argument is pointer to enumerated or boolean type.
7615
7616 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7617
7618 PR c/70339
7619 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7620 (lookup_name_fuzzy): New prototype.
7621
7622 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7623
7624 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7625
7626 2016-06-14 Jason Merrill <jason@redhat.com>
7627
7628 P0145R2: Refining Expression Order for C++.
7629 * c.opt (fargs-in-order): New.
7630 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7631
7632 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7633
7634 PR sanitizer/71498
7635 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7636 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7637
7638 PR preprocessor/71183
7639 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7640 to cb_get_source_date_epoch.
7641
7642 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7643
7644 PR c/68657
7645 * c.opt (Wpsabi): Add Warning flag.
7646
7647 2016-06-10 Martin Sebor <msebor@redhat.com>
7648
7649 PR c/71392
7650 * c-common.c (handle_nonnull_attribute): Accept
7651 the nonnull attribute in type-generic builtins.
7652
7653 2016-06-09 Martin Sebor <msebor@redhat.com>
7654
7655 PR c/70883
7656 * c-common.c (builtin_function_validate_nargs): Make text of error
7657 message consistent with others like it.
7658
7659 2016-06-08 Martin Sebor <msebor@redhat.com>
7660 Jakub Jelinek <jakub@redhat.com>
7661
7662 PR c++/70507
7663 PR c/68120
7664 * c-common.c (check_builtin_function_arguments): Handle
7665 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7666
7667 2016-06-08 Richard Biener <rguenther@suse.de>
7668
7669 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7670
7671 2016-06-07 Richard Biener <rguenther@suse.de>
7672
7673 PR c/61564
7674 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7675 options and warn about others.
7676
7677 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7678
7679 * c-common.c (get_source_date_epoch): Rename to
7680 cb_get_source_date_epoch.
7681 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7682 message when the parsing fails. Use error_at instead of fatal_error.
7683 * c-common.h (get_source_date_epoch): Rename to
7684 cb_get_source_date_epoch.
7685 * c-common.h (cb_get_source_date_epoch): Prototype.
7686 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7687 * c-common.h (c_omp_region_type): Remove trailing comma.
7688 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7689 * c-lex.c (c_lex_with_flags): Remove initialization of
7690 pfile->source_date_epoch.
7691
7692 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7693
7694 PR c++/71349
7695 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7696 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7697 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7698 instead of C_OMP_CLAUSE_SPLIT_FOR.
7699
7700 2016-05-24 Richard Biener <rguenther@suse.de>
7701
7702 PR middle-end/70434
7703 PR c/69504
7704 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7705 (convert_vector_to_array_for_subscript): ... this.
7706 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7707 VIEW_CONVERT_EXPR to an array type. Rename to ...
7708 (convert_vector_to_array_for_subscript): ... this.
7709
7710 2016-05-12 Marek Polacek <polacek@redhat.com>
7711
7712 PR c/70756
7713 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7714 size_in_bytes and pass LOC to it.
7715
7716 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7717
7718 PR c/43651
7719 * c.opt (Wduplicate-decl-specifier): New option.
7720
7721 2016-05-11 Marek Polacek <polacek@redhat.com>
7722
7723 PR c++/71024
7724 * c-common.c (diagnose_mismatched_attributes): New function.
7725 * c-common.h (diagnose_mismatched_attributes): Declare.
7726
7727 2016-05-04 Marek Polacek <polacek@redhat.com>
7728
7729 * c.opt (Wdangling-else): New option.
7730
7731 2016-05-03 Marek Polacek <polacek@redhat.com>
7732
7733 PR c/70859
7734 * c-common.c (builtin_function_validate_nargs): Add location
7735 parameter. Use it.
7736 (check_builtin_function_arguments): Add location and arguments
7737 parameters. Use them.
7738 * c-common.h (check_builtin_function_arguments): Update declaration.
7739
7740 2016-05-03 Richard Biener <rguenther@suse.de>
7741
7742 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7743 allow call args to gimplify to SSA names.
7744
7745 2016-05-03 Marek Polacek <polacek@redhat.com>
7746
7747 * c-common.h (enum c_omp_region_type): Remove stray comma.
7748
7749 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7750
7751 * c-common.h (enum c_omp_region_type): Define.
7752
7753 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7754
7755 * c-common.c (shorten_compare): Use wi::to_wide.
7756
7757 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7758
7759 PR middle-end/70626
7760 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7761 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7762 reduction clauses in acc parallel loops.
7763
7764 2016-04-29 Marek Polacek <polacek@redhat.com>
7765
7766 PR c/70852
7767 * c-common.c (warn_for_memset): Check domain before accessing it.
7768
7769 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7770
7771 PR/69089
7772 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7773 "aligned" attribute.
7774
7775 2016-04-28 Jason Merrill <jason@redhat.com>
7776
7777 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7778
7779 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7780 Matthias Klose <doko@debian.org>
7781
7782 * c-common.c (get_source_date_epoch): New function, gets the environment
7783 variable SOURCE_DATE_EPOCH and parses it as long long with error
7784 handling.
7785 * c-common.h (get_source_date_epoch): Prototype.
7786 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7787
7788 2015-04-27 Ryan Burn <contact@rnburn.com>
7789
7790 PR c++/69024
7791 PR c++/68997
7792 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7793 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7794 external linkage.
7795 (cilk_detect_and_unwrap): Corresponding changes.
7796 (extract_free_variables): Don't extract free variables from
7797 AGGR_INIT_EXPR slot.
7798 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7799 (cilk_recognize_spawn): Likewise.
7800
7801 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7802
7803 * c.opt (Wmemset-elt-size): New option.
7804 * c-common.c (warn_for_memset): New function.
7805 * c-common.h (warn_for_memset): Declare.
7806
7807 2016-04-25 Jason Merrill <jason@redhat.com>
7808
7809 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7810 No longer static.
7811 * c-common.h: Declare it.
7812 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7813
7814 2016-04-22 Jason Merrill <jason@redhat.com>
7815
7816 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7817
7818 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7819
7820 PR c++/69363
7821 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7822 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7823
7824 2016-04-18 Michael Matz <matz@suse.de>
7825
7826 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7827 and SET_DECL_ALIGN.
7828
7829 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7830
7831 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7832 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7833 to incomplete types.
7834 (dump_nested_type): Remove redundant tests and tidy up.
7835 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7836 a type which is the typedef of an original type.
7837
7838 2016-04-15 Marek Polacek <polacek@redhat.com>
7839
7840 PR c/70651
7841 * c-common.c (build_va_arg): Change two asserts into errors and return
7842 error_mark_node.
7843
7844 2016-04-13 Marek Polacek <polacek@redhat.com>
7845
7846 PR c++/70639
7847 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7848 for switch statements, too.
7849
7850 2016-03-28 Jason Merrill <jason@redhat.com>
7851
7852 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7853
7854 2016-03-23 Marek Polacek <polacek@redhat.com>
7855
7856 PR c++/69884
7857 * c.opt (Wignored-attributes): New option.
7858
7859 2016-03-22 David Malcolm <dmalcolm@redhat.com>
7860
7861 PR c/69993
7862 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7863 diagnostic text, reversing the order of the warning and note so
7864 that they appear in source order.
7865
7866 2016-03-17 Marek Polacek <polacek@redhat.com>
7867
7868 PR c/69407
7869 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7870 operations.
7871
7872 2016-03-14 Jason Merrill <jason@redhat.com>
7873
7874 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7875
7876 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7877
7878 2016-03-09 Richard Biener <rguenther@suse.de>
7879
7880 PR c/70143
7881 * c-common.c (strict_aliasing_warning): Add back
7882 alias_sets_conflict_p check.
7883
7884 2016-03-08 Jason Merrill <jason@redhat.com>
7885
7886 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7887
7888 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7889
7890 PR c/68187
7891 * c-indentation.c (get_visual_column): Move code to determine next
7892 tab stop to...
7893 (next_tab_stop): ...this new function.
7894 (line_contains_hash_if): Delete function.
7895 (detect_preprocessor_logic): Delete function.
7896 (get_first_nws_vis_column): New function.
7897 (detect_intervening_unindent): New function.
7898 (should_warn_for_misleading_indentation): Replace call to
7899 detect_preprocessor_logic with a call to
7900 detect_intervening_unindent.
7901
7902 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7903
7904 PR c/68187
7905 * c-indentation.c (should_warn_for_misleading_indentation): When
7906 suppressing warnings about cases where the guard and body are on
7907 the same column, only use the first non-whitespace column in place
7908 of the guard token column when dealing with "else" clauses.
7909 When rejecting aligned BODY and NEXT, loosen the requirement
7910 from equality with the first non-whitespace of guard to simply
7911 that they not be indented relative to it.
7912
7913 2016-03-04 Richard Biener <rguenther@suse.de>
7914
7915 PR c++/70054
7916 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7917 instead of alias_sets_conflict_p.
7918
7919 2016-03-01 Marek Polacek <polacek@redhat.com>
7920
7921 PR c++/69795
7922 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7923 any DECL.
7924
7925 2016-02-22 Martin Sebor <msebor@redhat.com>
7926
7927 PR middle-end/69780
7928 * c-common.c (check_builtin_function_arguments): Validate and
7929 reject invalid arguments to __builtin_alloca_with_align.
7930
7931 2016-02-20 Mark Wielaard <mjw@redhat.com>
7932
7933 PR c/28901
7934 * c.opt (Wunused-const-variable): Turn into Alias for...
7935 (Wunused-const-variable=): New option.
7936
7937 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7938
7939 PR c++/69865
7940 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7941 here...
7942 (c_common_init_options): ...to here.
7943 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7944
7945 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7946
7947 PR c++/69826
7948 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7949 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7950 flag_preprocess_only.
7951
7952 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7953
7954 PR c/69835
7955 * c.opt (Wnonnull-compare): Enable for -Wall.
7956
7957 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7958
7959 PR c++/69797
7960 * c-common.c (sync_resolve_size): Diagnose too few arguments
7961 even when params is non-NULL empty vector.
7962
7963 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7964
7965 PR target/60410
7966 * c.opt (fshort-double): Remove.
7967
7968 2016-02-05 Martin Sebor <msebor@redhat.com>
7969
7970 PR c++/69662
7971 * c.opt (Warning options): Update -Wplacement-new to take
7972 an optional argument.
7973
7974 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7975
7976 PR preprocessor/69543
7977 PR c/69558
7978 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7979 instead of loc to control_warning_option.
7980
7981 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7982
7983 * c.opt (fopenacc-dim=): New option.
7984
7985 2016-01-27 Ryan Burn <contact@rnburn.com>
7986
7987 PR cilkplus/69267
7988 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7989 gimplify_arg. Removed superfluous post_p argument.
7990 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7991 superfluous post_p argument.
7992 * c-gimplify.c (c_gimplify_expr): Likewise.
7993
7994 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7995
7996 PR other/69006
7997 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7998 pp_newline_and_flush with pp_flush.
7999
8000 2016-01-20 Martin Sebor <msebor@redhat.com>
8001
8002 PR c/69405
8003 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8004 an incompatible argument when the argument isn't a valid tree node.
8005
8006 2016-01-18 Jason Merrill <jason@redhat.com>
8007
8008 PR c++/68767
8009 * c-common.c (check_function_arguments_recurse): Fold the whole
8010 COND_EXPR, not just the condition.
8011
8012 2016-01-18 Tom de Vries <tom@codesourcery.com>
8013
8014 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8015 classify as loop clause.
8016
8017 2016-01-15 Jakub Jelinek <jakub@redhat.com>
8018
8019 PR bootstrap/68271
8020 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8021 C++ FE no longer has limit on number of pragmas.
8022
8023 2015-01-14 Ryan Burn <contact@rnburn.com>
8024
8025 PR c++/69048
8026 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
8027 to add missing cleanup point.
8028
8029 2016-01-14 David Malcolm <dmalcolm@redhat.com>
8030
8031 PR c++/68819
8032 * c-indentation.c (get_visual_column): Add location_t param.
8033 Handle the column number being zero by effectively disabling the
8034 warning, with an "inform".
8035 (should_warn_for_misleading_indentation): Add location_t argument
8036 for all uses of get_visual_column.
8037
8038 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8039
8040 PR c++/69029
8041 * c-indentation.c (should_warn_for_misleading_indentation):
8042 Don't warn about do-while statements.
8043
8044 2016-01-07 Martin Sebor <msebor@redhat.com>
8045
8046 PR c/68966
8047 * c-common.c (sync_resolve_size): Reject first argument when it's
8048 a pointer to _Bool.
8049
8050 2016-01-05 David Malcolm <dmalcolm@redhat.com>
8051
8052 PR c/69122
8053 * c-indentation.c (get_visual_column): Remove default argument.
8054 (should_warn_for_misleading_indentation): For the multiline case,
8055 update call to get_visual_column for next_stmt_exploc so that it
8056 captures the location of the first non-whitespace character in the
8057 relevant line. Don't issue warnings if there is non-whitespace
8058 before the next statement.
8059
8060 2016-01-04 Jakub Jelinek <jakub@redhat.com>
8061
8062 Update copyright years.
8063
8064 2015-12-21 David Malcolm <dmalcolm@redhat.com>
8065
8066 * c-common.c (binary_op_error): Convert first param from
8067 location_t to rich_location * and use it when emitting an error.
8068 * c-common.h (binary_op_error): Convert first param from
8069 location_t to rich_location *.
8070
8071 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8072
8073 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8074 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8075
8076 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8077
8078 * c-common.c (c_common_attribute_table): Handle "omp declare target
8079 link" attribute.
8080
8081 2015-12-14 Jakub Jelinek <jakub@redhat.com>
8082
8083 PR c/68833
8084 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8085
8086 2014-12-12 Tobias Burnus <burnus@net-b.de>
8087
8088 PR fortran/68815
8089 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8090 specifiers (%d, %i,%u and %c).
8091
8092 2015-12-10 David Malcolm <dmalcolm@redhat.com>
8093
8094 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8095
8096 2015-12-08 Jakub Jelinek <jakub@redhat.com>
8097
8098 PR c/48088
8099 PR c/68657
8100 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8101 * c-pragma.c (handle_pragma_diagnostic): Adjust
8102 control_warning_option caller.
8103
8104 2015-12-07 David Malcolm <dmalcolm@redhat.com>
8105
8106 * c-common.c (c_cpp_error): Update for change to
8107 rich_location::set_range.
8108
8109 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
8110
8111 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8112 shifting 1 out of the sign bit.
8113
8114 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8115
8116 * c-common.c (c_common_attribute_table[]): Update max arguments
8117 count for "simd" attribute.
8118 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8119
8120 2015-12-03 Jakub Jelinek <jakub@redhat.com>
8121
8122 PR preprocessor/57580
8123 * c-ppoutput.c (print): Change printed field to bool.
8124 Move src_file last for smaller padding.
8125 (init_pp_output): Set print.printed to false instead of 0.
8126 (scan_translation_unit): Fix up formatting. Set print.printed
8127 to true after printing something other than newline.
8128 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8129 (maybe_print_line_1): Set print.printed to false instead of 0.
8130 (print_line_1): Likewise.
8131 (do_line_change): Set print.printed to true instead of 1.
8132 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8133 dump_macro): Set print.printed to false after printing newline.
8134
8135 2015-12-02 Jason Merrill <jason@redhat.com>
8136
8137 * c-common.c (fold_for_warn): New.
8138 (warn_logical_operator, warn_tautological_cmp)
8139 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8140
8141 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8142 (c_fully_fold_internal, decl_constant_value_for_optimization):
8143 Move to c/c-fold.c.
8144 * c-common.h: Don't declare decl_constant_value_for_optimization.
8145
8146 2015-12-02 Joseph Myers <joseph@codesourcery.com>
8147
8148 PR c/68162
8149 * c-common.h (c_build_qualified_type): Add extra default
8150 arguments.
8151
8152 2015-12-01 Julian Brown <julian@codesourcery.com>
8153 Cesar Philippidis <cesar@codesourcery.com>
8154 James Norris <James_Norris@mentor.com>
8155
8156 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8157 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8158 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8159
8160 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8161
8162 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8163 (decl_sloc_common): Delete and move bulk of processing to...
8164 (decl_sloc): ...here.
8165 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8166 (dump_ada_double_name): Remove S parameter and compute the suffix.
8167 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8168 element type and deal with an anonymous one.
8169 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8170 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8171 and remove reference to QUAL_UNION_TYPE.
8172 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8173 (dump_nested_type): ...here. New function extracted from above.
8174 Generate a full declaration for anonymous element type of arrays.
8175 (print_ada_declaration): Really skip anonymous declarations. Remove
8176 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8177 Clean up processing of declarations of array types and objects.
8178 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8179 Remove obsolete code and tidy up.
8180
8181 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
8182
8183 PR c/67581
8184 * c-common.c (handle_transparent_union_attribute): Update
8185 also type variants.
8186
8187 2015-11-27 Martin Liska <mliska@suse.cz>
8188
8189 PR c++/68312
8190 * array-notation-common.c (cilkplus_extract_an_triplets):
8191 Release vector of vectors.
8192 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8193
8194 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8195
8196 PR c++/68527
8197 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8198 (print_ada_struct_decl): Likewise.
8199
8200 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8201
8202 PR c++/68001
8203 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8204 * cilk.c (recognize_spawn): Determine location in a more precise
8205 way.
8206
8207 2015-11-19 Jason Merrill <jason@redhat.com>
8208
8209 * c-common.c (shorten_compare): But look through macros from
8210 system headers.
8211
8212 2015-11-18 Jason Merrill <jason@redhat.com>
8213
8214 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8215 non-constant operand comes from a macro.
8216
8217 2015-11-17 Jason Merrill <jason@redhat.com>
8218
8219 PR bootstrap/68346
8220 * c-common.c (warn_tautological_cmp): Fold before checking for
8221 constants.
8222
8223 2015-11-16 Marek Polacek <polacek@redhat.com>
8224
8225 PR c++/68362
8226 * c-common.c (check_case_bounds): Fold low and high cases.
8227
8228 2015-11-16 Marek Polacek <polacek@redhat.com>
8229
8230 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8231 * c-common.c (c_common_get_alias_set): Likewise.
8232 (handle_visibility_attribute): Likewise.
8233
8234 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8235
8236 * c-common.c (handle_simd_attribute): New.
8237 (struct attribute_spec): Add entry for "simd".
8238 (handle_simd_attribute): New.
8239
8240 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
8241
8242 * c-lex.c (interpret_float): Use fold_convert.
8243
8244 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8245
8246 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8247 and store it on the result.
8248 * c-opts.c (c_common_init_options): Set
8249 global_dc->colorize_source_p.
8250
8251 2015-11-12 James Norris <jnorris@codesourcery.com>
8252 Joseph Myers <joseph@codesourcery.com>
8253
8254 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
8255 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8256 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8257 PRAGMA_OACC_CLAUSE_LINK.
8258
8259 2015-11-11 Marek Polacek <polacek@redhat.com>
8260
8261 PR c/68107
8262 PR c++/68266
8263 * c-common.c (valid_array_size_p): New function.
8264 * c-common.h (valid_array_size_p): Declare.
8265
8266 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
8267
8268 PR bootstrap/68271
8269 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8270
8271 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
8272
8273 * array-notation-common.c: Remove unused header files.
8274 * c-ada-spec.c: Likewise.
8275 * c-cilkplus.c: Likewise.
8276 * c-common.c: Likewise.
8277 * c-cppbuiltin.c: Likewise.
8278 * c-dump.c: Likewise.
8279 * c-format.c: Likewise.
8280 * c-gimplify.c: Likewise.
8281 * c-indentation.c: Likewise.
8282 * c-lex.c: Likewise.
8283 * c-omp.c: Likewise.
8284 * c-opts.c: Likewise.
8285 * c-pch.c: Likewise.
8286 * c-ppoutput.c: Likewise.
8287 * c-pragma.c: Likewise.
8288 * c-pretty-print.c: Likewise.
8289 * c-semantics.c: Likewise.
8290 * c-ubsan.c: Likewise.
8291 * cilk.c: Likewise.
8292 * stub-objc.c: Likewise.
8293
8294 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8295 Cesar Philippidis <cesar@codesourcery.com>
8296 James Norris <jnorris@codesourcery.com>
8297 Julian Brown <julian@codesourcery.com>
8298 Nathan Sidwell <nathan@codesourcery.com>
8299
8300 * c-pragma.c (oacc_pragmas): Add "routine".
8301 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8302
8303 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8304
8305 * c-common.c (c_common_attributes): Add scalar_storage_order.
8306 (handle_scalar_storage_order_attribute): New function.
8307 * c-pragma.c (global_sso): New variable.
8308 (maybe_apply_pragma_scalar_storage_order): New function.
8309 (handle_pragma_scalar_storage_order): Likewise.
8310 (init_pragma): Register scalar_storage_order.
8311 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8312 * c.opt (Wscalar-storage-order): New warning.
8313 (fsso-struct=): New option.
8314
8315 2015-11-08 Martin Sebor <msebor@redhat.com>
8316
8317 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8318
8319 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8320
8321 * c-common.c: Don't undef DEF_BUILTIN.
8322
8323 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8324
8325 * c-common.c (c_cpp_error): Convert parameter from location_t to
8326 rich_location *. Eliminate the "column_override" parameter and
8327 the call to diagnostic_override_column.
8328 Update the "done_lexing" clause to set range 0
8329 on the rich_location, rather than overwriting a location_t.
8330 * c-common.h (c_cpp_error): Convert parameter from location_t to
8331 rich_location *. Eliminate the "column_override" parameter.
8332
8333 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8334 Thomas Schwinge <thomas@codesourcery.com>
8335 James Norris <jnorris@codesourcery.com>
8336
8337 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8338 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8339 clauses with parallel and kernels and loops.
8340 * c-pragma.h (enum pragma_omp_clause): Add entries for
8341 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8342 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8343 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8344 INDEPENDENT,SEQ}.
8345 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8346
8347 2015-11-05 Martin Sebor <msebor@redhat.com>
8348
8349 PR c++/67942
8350 * c.opt (-Wplacement-new): New option.
8351
8352 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8353
8354 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8355 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8356 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8357 save_expr or create_tmp_var* if TEST is true.
8358 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8359 Don't call add_stmt here.
8360 (struct c_omp_check_loop_iv_data): New type.
8361 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8362 c_omp_check_loop_iv_exprs): New functions.
8363 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8364 distribute.
8365 (c_omp_declare_simd_clauses_to_numbers): Change
8366 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8367 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8368 from numbers to PARM_DECLs.
8369
8370 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8371
8372 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8373 flag_checking.
8374
8375 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
8376
8377 PR c++-common/67882
8378 * c-common.h (fold_offsetof_1): Add argument.
8379 * c-common.c (fold_offsetof_1): Diagnose more invalid
8380 offsetof expressions that reference elements past the end of
8381 an array.
8382
8383 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8384 Chung-Lin Tang <cltang@codesourcery.com>
8385
8386 * c-pragma.c (oacc_pragmas): Add "atomic".
8387 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8388
8389 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8390
8391 * c-common.c (handle_target_clones_attribute): New.
8392 (c_common_attribute_table): Add handle_target_clones_attribute.
8393 (handle_always_inline_attribute): Add check on target_clones attribute.
8394 (handle_target_attribute): Ditto.
8395
8396 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8397
8398 * array-notation-common.c: Reorder #include's and remove duplicates.
8399 * c-ada-spec.c: Likewise.
8400 * c-cilkplus.c: Likewise.
8401 * c-common.c: Likewise.
8402 * c-cppbuiltin.c: Likewise.
8403 * c-dump.c: Likewise.
8404 * c-format.c: Likewise.
8405 * c-gimplify.c: Likewise.
8406 * c-indentation.c: Likewise.
8407 * c-lex.c: Likewise.
8408 * c-omp.c: Likewise.
8409 * c-opts.c: Likewise.
8410 * c-pch.c: Likewise.
8411 * c-ppoutput.c: Likewise.
8412 * c-pragma.c: Likewise.
8413 * c-pretty-print.c: Likewise.
8414 * c-semantics.c: Likewise.
8415 * c-ubsan.c: Likewise.
8416 * cilk.c: Likewise.
8417 * stub-objc.c: Likewise.
8418
8419 2015-10-28 Jason Merrill <jason@redhat.com>
8420
8421 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8422
8423 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8424 James Norris <jnorris@codesourcery.com>
8425 Cesar Philippidis <cesar@codesourcery.com>
8426
8427 PR c/64765
8428 PR c/64880
8429 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8430 * c-omp.c (c_oacc_split_loop_clauses): New function.
8431
8432 2015-10-21 Martin Sebor <msebor@redhat.com>
8433
8434 PR driver/68043
8435 * c.opt: End each sentence that describes an option with a period.
8436
8437 2015-10-20 Marek Polacek <polacek@redhat.com>
8438
8439 * array-notation-common.c (is_cilkplus_vector_p): Define.
8440 * c-common.h (is_cilkplus_vector_p): Declare.
8441
8442 2015-10-20 Marek Polacek <polacek@redhat.com>
8443
8444 * c.opt (std=gnu++11): Do not describe as experimental.
8445 (std=gnu++14): Likewise.
8446
8447 2015-10-19 Jason Merrill <jason@redhat.com>
8448
8449 * c-cppbuiltin.c (c_cpp_builtins): Define
8450 __cpp_nontype_template_args.
8451
8452 2015-10-19 Jason Merrill <jason@redhat.com>
8453
8454 * c-cppbuiltin.c (c_cpp_builtins): Define
8455 __cpp_enumerator_attributes, __cpp_fold_expressions,
8456 __cpp_unicode_characters.
8457
8458 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8459 Aldy Hernandez <aldyh@redhat.com>
8460
8461 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8462 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8463 (c_define_builtins): Likewise.
8464 * c-common.h (enum c_omp_clause_split): Add
8465 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8466 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8467 (c_finish_omp_for): Add ORIG_DECLV argument.
8468 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8469 201511 instead of 201307.
8470 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8471 OMP_CRITICAL_CLAUSES to it.
8472 (c_finish_omp_ordered): Add CLAUSES argument, set
8473 OMP_ORDERED_CLAUSES to it.
8474 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8475 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8476 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8477 constructs and new OpenMP 4.5 clauses. Clear
8478 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8479 verification code.
8480 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8481 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8482 (enum pragma_omp_clause): Add
8483 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8484 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8485
8486 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8487
8488 * c-lex.c (interpret_float): Use real_equal instead of
8489 REAL_VALUES_EQUAL.
8490
8491 2015-10-04 Jason Merrill <jason@redhat.com>
8492
8493 Implement N4514, C++ Extensions for Transactional Memory.
8494 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8495 (c_common_attribute_table): Add transaction_safe_dynamic.
8496 transaction_safe now affects type identity.
8497 (handle_tm_attribute): Handle transaction_safe_dynamic.
8498 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8499 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8500 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8501 (D_TRANSMEM): New.
8502 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8503 * c-pretty-print.c (pp_c_attributes_display): Don't print
8504 transaction_safe in C++.
8505
8506 2015-10-02 Marek Polacek <polacek@redhat.com>
8507
8508 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8509
8510 2015-10-02 Marek Polacek <polacek@redhat.com>
8511
8512 PR c/64249
8513 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8514 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8515 * c.opt (Wduplicated-cond): New option.
8516
8517 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8518
8519 * c.opt (std=c11): Do not describe as experimental.
8520 (std=gnu11): Likewise.
8521 (std=iso9899:2011): Likewise.
8522
8523 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8524
8525 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8526 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8527
8528 2015-09-25 Marek Polacek <polacek@redhat.com>
8529
8530 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8531 (ubsan_instrument_shift): Likewise.
8532
8533 2015-09-25 Marek Polacek <polacek@redhat.com>
8534
8535 PR sanitizer/64906
8536 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8537
8538 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8539
8540 * c-indentation.c (should_warn_for_misleading_indentation):
8541 Compare next_stmt_vis_column with guard_line_first_nws instead
8542 of with guard_line_vis_column.
8543
8544 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8545
8546 PR c/49654
8547 PR c/49655
8548 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8549 options and options not valid for the current language.
8550
8551 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8552
8553 * c-indentation.c (should_warn_for_misleading_indentation):
8554 Float out and consolidate the calls to get_visual_column that
8555 are passed guard_exploc as an argument. Compare
8556 next_stmt_vis_column with guard_line_first_nws instead of with
8557 body_line_first_nws.
8558
8559 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8560
8561 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8562 Wnamespaces): New C++ warnings.
8563
8564 2015-09-22 Jason Merrill <jason@redhat.com>
8565
8566 * c-common.h (abi_compat_version_crosses): New.
8567 (warn_abi_version): Declare.
8568 * c-common.c: Define it.
8569 * c-opts.c (c_common_post_options): Handle it.
8570 flag_abi_compat_version defaults to 8.
8571
8572 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8573
8574 Complete the implementation of N4230, Nested namespace definition.
8575 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8576 __cpp_nested_namespace_definitions.
8577
8578 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8579
8580 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8581
8582 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8583
8584 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8585 when warning.
8586 * c-pragma.h (pragma_lex): Add optional loc argument.
8587
8588 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8589
8590 * c-format.c (check_format_arg): Adjust to use common block size in all
8591 object pools.
8592
8593 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8594
8595 * c-format.c (location_from_offset): Update for change in
8596 signature of location_get_source_line.
8597 * c-indentation.c (get_visual_column): Likewise.
8598 (line_contains_hash_if): Likewise.
8599
8600 2015-09-14 Marek Polacek <polacek@redhat.com>
8601
8602 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8603 setting various warnings.
8604
8605 2015-09-14 Marek Polacek <polacek@redhat.com>
8606
8607 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8608 a negative value.
8609
8610 2015-09-11 Mark Wielaard <mjw@redhat.com>
8611
8612 PR c/28901
8613 * c.opt (Wunused-variable): Option from common.opt.
8614 (Wunused-const-variable): New option.
8615
8616 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8617
8618 PR c++/53184
8619 * c.opt ([Wsubobject-linkage]): Add.
8620
8621 2015-09-03 Martin Sebor <msebor@redhat.com>
8622
8623 PR c/66516
8624 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8625 functions.
8626 * c-common.c (reject_gcc_builtin): Define.
8627
8628 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8629
8630 PR middle-end/60586
8631 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8632 prototype.
8633 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8634 cilk_gimplify_call_params_in_spawned_fn.
8635 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8636 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8637 unwrapping.
8638
8639 2015-08-25 Marek Polacek <polacek@redhat.com>
8640
8641 PR middle-end/67330
8642 * c-common.c (handle_weak_attribute): Don't check whether the
8643 visibility can be changed here.
8644
8645 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8646
8647 * c-lex.c (c_lex_with_flags): Use explicit locations.
8648
8649 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8650
8651 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8652 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8653
8654 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8655
8656 PR middle-end/36757
8657 * c-common.c (check_builtin_function_arguments): Add check
8658 for BUILT_IN_SIGNBIT argument.
8659
8660 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8661
8662 PR c++/67160
8663 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8664 in c++1z mode.
8665
8666 2015-08-17 Marek Polacek <polacek@redhat.com>
8667
8668 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8669 with whitespaces before qualifier names.
8670
8671 2015-08-12 Marek Polacek <polacek@redhat.com>
8672
8673 PR c++/55095
8674 * c-common.c (maybe_warn_shift_overflow): Properly handle
8675 left-shifting 1 into the sign bit.
8676
8677 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8678
8679 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8680
8681 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8682 Braden Obrzut <admin@maniacsvault.net>
8683 Jason Merrill <jason@redhat.com>
8684
8685 Add C++ Concepts TS support.
8686 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8687 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8688 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8689 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8690 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8691 * c.opt (fconcepts): New.
8692
8693 2015-08-02 Martin Sebor <msebor@redhat.com>
8694
8695 * c.opt (-Wframe-address): New warning option.
8696
8697 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8698
8699 * c-indentation.c (should_warn_for_misleading_indentation):
8700 Improve heuristics.
8701
8702 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8703
8704 * c-indentation.c (get_visual_column): Add parameter first_nws,
8705 use it. Update comment documenting the function.
8706 (is_first_nonwhitespace_on_line): Remove.
8707 (should_warn_for_misleading_indentation): Replace usage of
8708 of is_first_nonwhitespace_on_line with get_visual_column.
8709
8710 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8711
8712 * c-indentation.h (struct token_indent_info): Define.
8713 (get_token_indent_info): Define.
8714 (warn_for_misleading_information): Declare.
8715 * c-common.h (warn_for_misleading_information): Remove.
8716 * c-identation.c (warn_for_misleading_indentation):
8717 Change declaration to take three token_indent_infos. Adjust
8718 accordingly.
8719 * c-identation.c (should_warn_for_misleading_indentation):
8720 Likewise. Bail out early if the body is a compound statement.
8721 (guard_tinfo_to_string): Define.
8722
8723 2015-07-30 Jason Merrill <jason@redhat.com>
8724
8725 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8726 '*' for reference decay.
8727
8728 2015-07-30 Marek Polacek <polacek@redhat.com>
8729
8730 * c-common.c (warn_tautological_cmp): Bail for float types.
8731
8732 2015-07-27 Marek Polacek <polacek@redhat.com>
8733
8734 PR bootstrap/67030
8735 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8736
8737 2015-07-27 Marek Polacek <polacek@redhat.com>
8738
8739 PR c++/66555
8740 PR c/54979
8741 * c-common.c (find_array_ref_with_const_idx_r): New function.
8742 (warn_tautological_cmp): New function.
8743 * c-common.h (warn_tautological_cmp): Declare.
8744 * c.opt (Wtautological-compare): New option.
8745
8746 2015-07-23 Marek Polacek <polacek@redhat.com>
8747
8748 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8749 (ubsan_instrument_shift): Likewise.
8750
8751 2015-07-23 Marek Polacek <polacek@redhat.com>
8752
8753 PR sanitizer/66908
8754 * c-ubsan.c: Include gimplify.h.
8755 (ubsan_instrument_division): Unshare OP0 and OP1.
8756 (ubsan_instrument_shift): Likewise.
8757
8758 2015-07-20 Marek Polacek <polacek@redhat.com>
8759 Richard Sandiford <richard.sandiford@arm.com>
8760
8761 PR c++/55095
8762 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8763 Use EXPR_LOC_OR_LOC.
8764 (maybe_warn_shift_overflow): New function.
8765 * c-common.h (maybe_warn_shift_overflow): Declare.
8766 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8767 * c.opt (Wshift-overflow): New option.
8768
8769 2015-07-16 Martin Liska <mliska@suse.cz>
8770
8771 * c-format.c (static void check_format_info_main): Use
8772 object_allocator instead of pool_allocator.
8773 (check_format_arg): Likewise.
8774 (check_format_info_main): Likewise.
8775
8776 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8777
8778 * c-opts.c: Remove multiline #include comment.
8779
8780 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8781
8782 * c-common.c: Fix double word typos.
8783
8784 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8785
8786 * c-ada-spec.h (cpp_operation): Revert latest change.
8787 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8788 constructors and destructors.
8789
8790 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8791
8792 * c-common.h: Adjust includes for flags.h changes.
8793 * stub-objc.c: Likewise.
8794
8795 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8796
8797 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8798 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8799
8800 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8801
8802 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8803 are to be removed, return NULL rather than original clauses list.
8804
8805 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8806
8807 * array-notation-common.c: Adjust includes.
8808 * c-ada-spec.c: Likewise.
8809 * c-cilkplus.c: Likewise.
8810 * c-common.h: Likewise.
8811 * c-cppbuiltin.c: Likewise.
8812 * c-dump.c: Likewise.
8813 * c-format.c: Likewise.
8814 * c-gimplify.c: Likewise.
8815 * c-indentation.c: Likewise.
8816 * c-lex.c: Likewise.
8817 * c-omp.c: Likewise.
8818 * c-opts.c: Likewise.
8819 * c-pch.c: Likewise.
8820 * c-ppoutput.c: Likewise.
8821 * c-pragma.c: Likewise.
8822 * c-pretty-print.c: Likewise.
8823 * c-semantics.c: Likewise.
8824 * c-ubsan.c: Likewise.
8825 * cilk.c: Likewise.
8826 * stub-objc.c: Likewise.
8827
8828 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8829
8830 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8831 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8832
8833 2015-07-01 Jason Merrill <jason@redhat.com>
8834
8835 * c-common.h (D_CXX11): Rename from D_CXX0X.
8836 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8837 * c-common.c: Adjust.
8838
8839 * c-opts.c (c_common_post_options): Default to C++14.
8840
8841 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8842
8843 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8844
8845 Implement N4197 - Adding u8 character literals
8846 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
8847 CPP_CHAR.
8848 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
8849 CPP_UTF8CHAR_USERDEF tokens.
8850 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
8851 and CPP_UTF8CHAR tokens.
8852 (lex_charconst): Treat CPP_UTF8CHAR token.
8853
8854 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8855
8856 PR fortran/66605
8857 * c-common.c (do_warn_unused_parameter): Move here.
8858 * c-common.h (do_warn_unused_parameter): Declare.
8859
8860 2015-06-29 Marek Polacek <polacek@redhat.com>
8861
8862 PR c/66322
8863 * c-common.c (check_case_bounds): Add bool * parameter. Set
8864 OUTSIDE_RANGE_P.
8865 (c_add_case_label): Add bool * parameter. Pass it down to
8866 check_case_bounds.
8867 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8868 warning here.
8869 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8870 declarations.
8871
8872 2015-06-27 Marek Polacek <polacek@redhat.com>
8873
8874 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8875 or VECTOR_INTEGER_TYPE_P throughout.
8876 * c-gimplify.c: Likewise.
8877
8878 2015-06-26 Marek Polacek <polacek@redhat.com>
8879
8880 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8881 * c-common.c (c_fully_fold_internal): Likewise.
8882 (c_alignof_expr): Likewise.
8883 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8884 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8885 * cilk.c (create_parm_list): Likewise.
8886
8887 2015-06-26 Marek Polacek <polacek@redhat.com>
8888
8889 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8890
8891 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8892
8893 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8894 * c-gimplify.c: Likewise.
8895 * c-pragma.c: Likewise.
8896 * c-ubsan.c: Likewise.
8897 * cilk.c: Likewise.
8898
8899 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8900
8901 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8902 ggc_hasher.
8903
8904 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8905
8906 * cilk.c: Move calls.h after tm.h in the include chain.
8907
8908 2015-06-25 Marek Polacek <polacek@redhat.com>
8909
8910 * array-notation-common.c: Use VAR_P throughout.
8911 * c-ada-spec.c: Likewise.
8912 * c-common.c: Likewise.
8913 * c-format.c: Likewise.
8914 * c-gimplify.c: Likewise.
8915 * c-omp.c: Likewise.
8916 * c-pragma.c: Likewise.
8917 * c-pretty-print.c: Likewise.
8918 * cilk.c: Likewise.
8919
8920 2015-06-25 Marek Polacek <polacek@redhat.com>
8921
8922 * cilk.c (extract_free_variables): Use is_global_var.
8923
8924 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8925
8926 * c-common.c: Don't include target-def.h.
8927
8928 2015-06-23 Marek Polacek <polacek@redhat.com>
8929
8930 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8931 when comparing INTEGER_CSTs.
8932
8933 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8934
8935 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8936 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8937 (dump_ada_template): Skip partially specialized types.
8938
8939 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8940
8941 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8942 swapping.
8943
8944 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8945
8946 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8947 * c-ada-spec.c: Likewise.
8948 * c-cilkplus.c: Likewise.
8949 * c-common.c: Likewise.
8950 * c-common.h: Likewise.
8951 * c-cppbuiltin.c: Likewise.
8952 * c-dump.c: Likewise.
8953 * c-format.c: Likewise.
8954 * c-gimplify.c: Likewise.
8955 * c-indentation.c: Likewise.
8956 * c-lex.c: Likewise.
8957 * c-omp.c: Likewise.
8958 * c-opts.c: Likewise.
8959 * c-pch.c: Likewise.
8960 * c-ppoutput.c: Likewise.
8961 * c-pragma.c: Likewise.
8962 * c-pretty-print.c: Likewise.
8963 * c-semantics.c: Likewise.
8964 * c-ubsan.c: Likewise.
8965 * cilk.c: Likewise.
8966 * stub-objc.c: Likewise.
8967
8968 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8969
8970 PR c++/65168
8971 * c-common.c (c_common_truthvalue_conversion): Warn when
8972 converting an address of a reference to a truth value.
8973
8974 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8975
8976 * array-notation-common.c : Adjust include files.
8977 * c-ada-spec.c : Likewise.
8978 * c-cilkplus.c : Likewise.
8979 * c-common.c : Likewise.
8980 * c-common.h : Likewise.
8981 * c-cppbuiltin.c : Likewise.
8982 * c-dump.c : Likewise.
8983 * c-format.c : Likewise.
8984 * c-gimplify.c : Likewise.
8985 * c-indentation.c : Likewise.
8986 * c-lex.c : Likewise.
8987 * c-omp.c : Likewise.
8988 * c-opts.c : Likewise.
8989 * c-pch.c : Likewise.
8990 * c-ppoutput.c : Likewise.
8991 * c-pragma.c : Likewise.
8992 * c-pretty-print.c : Likewise.
8993 * c-semantics.c : Likewise.
8994 * c-ubsan.c : Likewise.
8995 * cilk.c : Likewise.
8996 * stub-objc.c : Likewise.
8997
8998 2015-06-08 Marek Polacek <polacek@redhat.com>
8999
9000 PR c/66415
9001 * c-format.c (location_from_offset): Return LOC if LINE is null.
9002
9003 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
9004
9005 * c-common.h (c_parse_final_cleanups): New prototype.
9006 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9007
9008 2015-06-04 Sriraman Tallam <tmsriram@google.com>
9009
9010 * c-common.c (noplt): New attribute.
9011 (handle_noplt_attribute): New handler.
9012
9013 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
9014
9015 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9016 * c-ada-spec.c: Likewise.
9017 * c-cilkplus.c: Likewise.
9018 * c-common.c: Likewise.
9019 * c-common.h: Likewise.
9020 * c-cppbuiltin.c: Likewise.
9021 * c-dump.c: Likewise.
9022 * c-format.c: Likewise.
9023 * c-gimplify.c: Likewise.
9024 * c-indentation.c: Likewise.
9025 * c-lex.c: Likewise.
9026 * c-omp.c: Likewise.
9027 * c-opts.c: Likewise.
9028 * c-pch.c: Likewise.
9029 * c-ppoutput.c: Likewise.
9030 * c-pragma.c: Likewise.
9031 * c-pretty-print.c: Likewise.
9032 * c-semantics.c: Likewise.
9033 * c-ubsan.c: Likewise.
9034 * cilk.c: Likewise.
9035 * stub-objc.c: Likewise.
9036
9037 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9038
9039 PR c/66220:
9040 * c-indentation.c (should_warn_for_misleading_indentation): Use
9041 expand_location rather than expand_location_to_spelling_point.
9042 Don't warn if the guarding statement is more indented than the
9043 next/body stmts.
9044
9045 2015-06-02 David Malcolm <dmalcolm@redhat.com>
9046
9047 * c-indentation.c (warn_for_misleading_indentation): Bail out
9048 immediately if -Wmisleading-indentation isn't enabled.
9049
9050 2015-06-01 Martin Liska <mliska@suse.cz>
9051
9052 * c-format.c (check_format_arg):Use new type-based pool allocator.
9053 (check_format_info_main) Likewise.
9054
9055 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9056
9057 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9058 (has_nontrivial_methods): Likewise.
9059
9060 2015-05-25 Marek Polacek <polacek@redhat.com>
9061
9062 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9063
9064 2015-05-22 Marek Polacek <polacek@redhat.com>
9065
9066 PR c/47043
9067 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9068
9069 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9070
9071 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9072 STACK_GROWS_DOWNWARD.
9073
9074 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
9075
9076 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9077 STACK_GROWS_DOWNWARD rather than if it is defined.
9078
9079 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9080
9081 PR c/52952
9082 * c-format.c (location_column_from_byte_offset): New.
9083 (location_from_offset): New.
9084 (struct format_wanted_type): Add offset_loc field.
9085 (check_format_info): Move handling of location for extra arguments
9086 closer to the point of warning.
9087 (check_format_info_main): Pass the result of location_from_offset
9088 to warning_at.
9089 (format_type_warning): Pass the result of location_from_offset
9090 to warning_at.
9091
9092 2015-05-20 Marek Polacek <polacek@redhat.com>
9093
9094 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9095
9096 2015-05-20 Marek Polacek <polacek@redhat.com>
9097
9098 * c-ada-spec.c (dump_sloc): Use DECL_P.
9099
9100 2015-05-20 Marek Polacek <polacek@redhat.com>
9101
9102 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9103 * c-common.c: Likewise.
9104
9105 2015-05-19 David Malcolm <dmalcolm@redhat.com>
9106
9107 * c-common.h (fe_file_change): Strengthen param from
9108 const line_map * to const line_map_ordinary *.
9109 (pp_file_change): Likewise.
9110 * c-lex.c (fe_file_change): Likewise.
9111 (cb_define): Use linemap_check_ordinary when invoking
9112 SOURCE_LINE.
9113 (cb_undef): Likewise.
9114 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9115 invoking cb_file_change.
9116 (c_finish_options): Likewise.
9117 (push_command_line_include): Likewise.
9118 (cb_file_change): Strengthen param "new_map" from
9119 const line_map * to const line_map_ordinary *.
9120 * c-ppoutput.c (cb_define): Likewise for local "map".
9121 (pp_file_change): Likewise for param "map" and local "from".
9122
9123 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9124
9125 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9126
9127 2015-05-18 Tom de Vries <tom@codesourcery.com>
9128
9129 * c-common.c (build_va_arg_1): New function.
9130 (build_va_arg): Add address operator to va_list operand if necessary.
9131
9132 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9133
9134 PR c/48956
9135 * c-common.c (int_safely_convertible_to_real_p): Define.
9136 (unsafe_conversion_p): Check conversions involving complex types.
9137 (conversion_warning): Add new warning message for conversions which
9138 discard imaginary component.
9139 * c-common.h: (enum conversion_safety): Add new enumerator for such
9140 conversions.
9141
9142 2015-05-14 Marek Polacek <polacek@redhat.com>
9143
9144 PR c/66066
9145 PR c/66127
9146 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9147 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9148 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9149 use it. If FOR_INT_CONST, require that all evaluated operands be
9150 INTEGER_CSTs.
9151
9152 2015-05-12 David Malcolm <dmalcolm@redhat.com>
9153
9154 * c-common.h (warn_for_misleading_indentation): New prototype.
9155 * c-indentation.c: New file.
9156 * c.opt (Wmisleading-indentation): New option.
9157
9158 2015-05-12 Tom de Vries <tom@codesourcery.com>
9159
9160 PR tree-optimization/66010
9161 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9162
9163 2015-05-09 Jason Merrill <jason@redhat.com>
9164
9165 * c-opts.c (c_common_post_options): Also clear
9166 cpp_opts->cpp_warn_cxx11_compat.
9167
9168 * c-common.h (enum cxx_dialect): Add cxx_unset.
9169 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9170 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9171
9172 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9173 (std=gnu++0x): Mark as Undocumented.
9174 (std=gnu++1y): Add deprecated message.
9175
9176 2015-05-08 Jason Merrill <jason@redhat.com>
9177
9178 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9179 * c-opts.c: Adjust.
9180
9181 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9182
9183 2015-05-08 Marek Polacek <polacek@redhat.com>
9184
9185 PR c/64918
9186 * c.opt (Woverride-init-side-effects): New option.
9187
9188 2015-05-07 Marek Polacek <polacek@redhat.com>
9189
9190 PR c/65179
9191 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9192 negative value.
9193 * c.opt (Wshift-negative-value): New option.
9194 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9195 when -Wextra and C99/C++11 mode.
9196
9197 2015-05-07 Marek Polacek <polacek@redhat.com>
9198 Martin Uecker <uecker@eecs.berkeley.edu>
9199
9200 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9201 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9202
9203 2015-05-05 Jason Merrill <jason@redhat.com>
9204
9205 * c.opt (Wterminate): New.
9206
9207 2015-04-30 Marek Polacek <polacek@redhat.com>
9208
9209 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9210 require that the non-constant be of a boolean type.
9211
9212 2015-04-29 Josh Triplett <josh@joshtriplett.org>
9213
9214 * c-common.c (handle_section_attribute): Refactor to reduce
9215 nesting and distinguish between error cases.
9216
9217 2015-04-29 Marek Polacek <polacek@redhat.com>
9218
9219 PR c/64610
9220 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9221 with 0/1.
9222
9223 2015-04-29 Jakub Jelinek <jakub@redhat.com>
9224
9225 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9226 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9227 HOST_BITS_PER_WIDE_INT.
9228
9229 2015-04-28 Tom de Vries <tom@codesourcery.com>
9230
9231 PR tree-optimization/65887
9232 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9233
9234 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
9235 Pierre-Marie de Rodat <derodat@adacore.com>
9236
9237 * c-ada-spec.c (in_function): Delete.
9238 (dump_generic_ada_node): Do not change in_function and remove the
9239 redundant code dealing with it.
9240 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9241 (print_ada_methods): Output the static member functions in a nested
9242 package after the regular methods as well as associated renamings.
9243
9244 2015-04-24 Marek Polacek <polacek@redhat.com>
9245
9246 PR c/65830
9247 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9248 and OPT_Wshift_count_overflow.
9249
9250 PR c/63357
9251 * c-common.c (warn_logical_operator): Warn if the operands have the
9252 same expressions.
9253
9254 2015-04-24 Marek Polacek <polacek@redhat.com>
9255
9256 PR c/61534
9257 * c-common.c (warn_logical_operator): Bail if either operand comes
9258 from a macro expansion.
9259
9260 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9261
9262 PR target/55143
9263 * c-common.c (c_default_pointer_mode): Add definition.
9264 * c-common.h (c_default_pointer_mode): Add declaration.
9265
9266 2015-03-11 Jakub Jelinek <jakub@redhat.com>
9267
9268 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9269 on record_builtin_type argument.
9270
9271 2015-03-10 Jakub Jelinek <jakub@redhat.com>
9272
9273 PR c/65120
9274 * c-common.c (warn_logical_not_parentheses): Don't warn for
9275 !x == 0 or !x != 0.
9276
9277 2015-03-07 Marek Polacek <polacek@redhat.com>
9278
9279 PR sanitizer/65280
9280 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9281 before trying to figure out whether we have a flexible array member.
9282
9283 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
9284 Jonathan Wakely <jwakely.gcc@gmail.com>
9285
9286 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9287
9288 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9289
9290 PR ada/65319
9291 * c-ada-spec.c (print_destructor): Remove obsolete code.
9292
9293 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9294
9295 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9296 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9297 DECL_TEMPLATE_RESULT emulations.
9298 (dump_ada_template)): Add guard for TYPE_METHODS.
9299
9300 2015-02-27 Marek Polacek <polacek@redhat.com>
9301
9302 PR c/65040
9303 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9304
9305 2015-02-27 Kai Tietz <ktietz@redhat.com>
9306
9307 PR c/35330
9308 * c-pragma.c (handle_pragma_weak): Do not try to create
9309 weak/alias of declarations not being function, or variable
9310 declarations.
9311
9312 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9313
9314 PR libgomp/64625
9315 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9316 Remove macros.
9317 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9318
9319 2015-02-16 Marek Polacek <polacek@redhat.com>
9320
9321 PR c/65066
9322 * c-format.c (check_format_types): Handle null param.
9323
9324 2015-02-13 Marek Polacek <polacek@redhat.com>
9325
9326 PR c/65040
9327 * c-format.c (check_format_types): Don't warn about different
9328 signedness if the original value is in the range of WANTED_TYPE.
9329
9330 2015-02-12 Jason Merrill <jason@redhat.com>
9331
9332 PR c++/64956
9333 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9334 to the current highest version.
9335 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9336
9337 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9338
9339 PR c/64824
9340 PR c/64868
9341 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9342 instead of RDIV_EXPR. Use build_binary_op instead of
9343 build2_loc.
9344
9345 2015-01-30 Joseph Myers <joseph@codesourcery.com>
9346
9347 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9348 to pass input_location as first argument.
9349
9350 2015-01-23 Tom de Vries <tom@codesourcery.com>
9351
9352 PR libgomp/64672
9353 * c.opt (fopenacc): Mark as LTO option.
9354
9355 2015-01-23 Tom de Vries <tom@codesourcery.com>
9356
9357 PR libgomp/64707
9358 * c.opt (fopenmp): Mark as LTO option.
9359
9360 2015-01-21 Jakub Jelinek <jakub@redhat.com>
9361
9362 PR c/63307
9363 * cilk.c (fill_decls_vec): Only put decls into vector v.
9364 (compare_decls): Fix up formatting.
9365
9366 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9367
9368 PR c/63307
9369 * cilk.c: Include vec.h.
9370 (struct cilk_decls): New structure.
9371 (wrapper_parm_cb): Split this function to...
9372 (fill_decls_vec): ...this...
9373 (create_parm_list): ...and this.
9374 (compare_decls): New function.
9375 (for_local_cb): Remove.
9376 (wrapper_local_cb): Ditto.
9377 (build_wrapper_type): For now first traverse and fill vector of
9378 declarations then sort it and then deal with sorted vector.
9379 (cilk_outline): Ditto.
9380 (declare_one_free_variable): Ditto.
9381
9382 2015-01-21 Jason Merrill <jason@redhat.com>
9383
9384 PR c++/64629
9385 * c-format.c (check_format_arg): Call decl_constant_value.
9386
9387 2015-01-19 Martin Liska <mliska@suse.cz>
9388
9389 * c-common.c (handle_noicf_attribute): New function.
9390
9391 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9392 Bernd Schmidt <bernds@codesourcery.com>
9393 James Norris <jnorris@codesourcery.com>
9394 Cesar Philippidis <cesar@codesourcery.com>
9395 Ilmir Usmanov <i.usmanov@samsung.com>
9396 Jakub Jelinek <jakub@redhat.com>
9397
9398 * c.opt (fopenacc): New option.
9399 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9400 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9401 New macros.
9402 * c-common.h (c_finish_oacc_wait): New prototype.
9403 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9404 (c_finish_oacc_wait): New function.
9405 * c-pragma.c (oacc_pragmas): New variable.
9406 (c_pp_lookup_pragma, init_pragma): Handle it.
9407 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9408 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9409 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9410 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9411 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9412 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9413 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9414 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9415 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9416 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9417 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9418 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9419 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9420 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9421 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9422 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9423 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9424 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9425 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9426 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9427 PRAGMA_OACC_CLAUSE_WORKER.
9428
9429 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9430
9431 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9432 for the new option fstack-protector_explicit.
9433 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9434 (handle_stack_protect_attribute): New function.
9435
9436 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9437
9438 * c.opt: New option -Warray-bounds=.
9439
9440 2015-01-09 Michael Collison <michael.collison@linaro.org>
9441
9442 * array-notation-common.c: Include hash-set.h, machmode.h,
9443 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9444 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9445 * c-ada-spec.c: Ditto.
9446 * c-cilkplus.c: Ditto.
9447 * c-common.c: Include input.h due to flattening of tree.h.
9448 Define macro GCC_C_COMMON_C.
9449 * c-common.h: Flatten tree.h header files into c-common.h.
9450 Remove include of tree-core.h.
9451 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9452 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9453 fold-const.h, wide-int.h, and inchash.h due to
9454 flattening of tree.h.
9455 * c-dump.c: Ditto.
9456 * c-format.c: Flatten tree.h header files into c-common.h.
9457 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9458 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9459 fold-const.h, wide-int.h, and inchash.h due to
9460 flattening of tree.h.
9461 * c-dump.c: Include hash-set.h, machmode.h,
9462 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9463 fold-const.h, wide-int.h, and inchash.h due to
9464 flattening of tree.h.
9465 * c-format.c: Include hash-set.h, machmode.h,
9466 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9467 fold-const.h, wide-int.h, inchash.h and real.h due to
9468 flattening of tree.h.
9469 * c-gimplify.c: Include hash-set.h, machmode.h,
9470 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9471 fold-const.h, wide-int.h, and inchash.h due to
9472 flattening of tree.h.
9473 * cilk.c: Ditto.
9474 * c-lex.c: Ditto.
9475 * c-omp.c: Ditto.
9476 * c-opts.c: Ditto.
9477 * c-pch.c: Ditto.
9478 * c-ppoutput.c: Ditto.
9479 * c-pragma.c: Ditto.
9480 * c-pretty-print.c: Ditto.
9481 * c-semantics.c: Ditto.
9482 * c-ubsan.c: Ditto.
9483 * stub-objc.c: Ditto.
9484
9485 2015-01-08 Jason Merrill <jason@redhat.com>
9486
9487 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9488 do_ubsan_in_current_function.
9489 (ubsan_maybe_instrument_reference_or_call): Likewise.
9490 * c-ubsan.h: Declare it.
9491
9492 2015-01-08 Mike Stump <mikestump@comcast.net>
9493
9494 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9495
9496 2015-01-07 Marek Polacek <polacek@redhat.com>
9497
9498 PR c/64440
9499 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9500 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9501
9502 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9503
9504 PR c++/31397
9505 * c.opt (Wsuggest-override): New option.
9506
9507 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9508
9509 Update copyright years.
9510
9511 2015-01-05 Marek Polacek <polacek@redhat.com>
9512
9513 PR c/64423
9514 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9515 parameter. Use it.
9516 * c-common.h (warn_array_subscript_with_type_char): Update
9517 declaration.
9518
9519 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9520
9521 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9522 Control macro with flag_sized_deallocation.
9523
9524 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9525
9526 * c.opt (Wdiscarded-array-qualifiers): New option.
9527
9528 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9529
9530 PR preprocessor/63831
9531 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9532 and __has_cpp_attribute here.
9533 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9534 c_common_has_attribute.
9535 * c-common.h (c_common_has_attribute): New prototype.
9536 * c-lex.c (init_c_lex): Set cb->has_attribute to
9537 c_common_has_attribute instead of cb_has_attribute.
9538 (get_token_no_padding): New function.
9539 (cb_has_attribute): Renamed to ...
9540 (c_common_has_attribute): ... this. No longer static. Use
9541 get_token_no_padding, require ()s, don't build TREE_LIST
9542 unnecessarily, fix up formatting, adjust diagnostics, call
9543 init_attributes.
9544
9545 2014-12-15 Jason Merrill <jason@redhat.com>
9546
9547 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9548 (-Wsized-deallocation): New.
9549 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9550 to on in C++14 and up.
9551
9552 2014-12-11 Jason Merrill <jason@redhat.com>
9553
9554 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9555
9556 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9557 we aren't complaining about VLAs.
9558
9559 2014-12-06 Marek Polacek <polacek@redhat.com>
9560
9561 PR tree-optimization/64183
9562 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9563 shift-expression if it is integer_type_node. Use types_compatible_p.
9564
9565 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9566
9567 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9568 last argument from create_tmp_var_raw and create_tmp_var calls.
9569 * cilk.c (gimplify_cilk_spawn): Likewise.
9570 * c-omp.c (c_finish_omp_atomic): Likewise.
9571
9572 2014-11-28 Marek Polacek <polacek@redhat.com>
9573
9574 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9575 instead of unsigned_type_node.
9576
9577 2014-11-28 Marek Polacek <polacek@redhat.com>
9578
9579 PR c/63862
9580 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9581 to op1_utype.
9582 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9583 expression to unsigned_type_node.
9584
9585 2014-11-20 Mark Wielaard <mjw@redhat.com>
9586
9587 PR debug/38757
9588 * c-opts.c (set_std_c89): Set lang_hooks.name.
9589 (set_std_c99): Likewise.
9590 (set_std_c11): Likewise.
9591 (set_std_cxx98): Likewise.
9592 (set_std_cxx11): Likewise.
9593 (set_std_cxx14): Likewise.
9594 (set_std_cxx1z): Likewise.
9595
9596 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9597
9598 PR target/63764
9599 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9600 return type to bool.
9601 * c-common.c: Include gimple-expr.h.
9602 (convert_vector_to_pointer_for_subscript): Change return type to
9603 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9604 and copy it into a TARGET_EXPR and use that instead of *vecp
9605 directly.
9606
9607 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9608
9609 Merger of git branch "gimple-classes-v2-option-3".
9610 * ChangeLog.gimple-classes: New.
9611 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9612 from being just a vec<gimple> to a vec<gbind *>.
9613
9614 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9615
9616 PR sanitizer/63813
9617 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9618 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9619 get_pointer_alignment for non-pointers. Use ptype, or if it is
9620 reference type, corresponding pointer type, as type of kind
9621 argument.
9622 (ubsan_maybe_instrument_reference,
9623 ubsan_maybe_instrument_member_call): Adjust callers.
9624
9625 2014-11-15 Marek Polacek <polacek@redhat.com>
9626
9627 PR middle-end/63884
9628 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9629 for NULL fndecl.
9630 (extract_array_notation_exprs): Return for NULL node.
9631
9632 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9633
9634 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9635 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9636
9637 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9638
9639 PR c/59708
9640 * c-common.c (check_builtin_function_arguments): Handle
9641 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9642
9643 2014-11-10 Andi Kleen <ak@linux.intel.com>
9644
9645 PR c/60804
9646 * c-common.h (check_no_cilk): Declare.
9647 * cilk.c (get_error_location): New function.
9648 (check_no_cilk): Dito.
9649
9650 2014-11-10 Andi Kleen <ak@linux.intel.com>
9651
9652 * cilk.c (recognize_spawn): Use expression location
9653 for error message.
9654
9655 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9656
9657 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9658
9659 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9660
9661 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9662 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9663 (__cpp_range_based_for, __cpp_initializer_lists,
9664 __cpp_delegating_constructors, __cpp_nsdmi,
9665 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9666 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9667 __has_cpp_attribute.
9668 * c-lex.c (cb_has_attribute): New callback CPP function;
9669 (init_c_lex): Set has_attribute callback.
9670
9671 2014-11-04 Richard Biener <rguenther@suse.de>
9672
9673 * c-common.c (shorten_compare): Do not shorten mixed
9674 DFP and non-DFP compares.
9675
9676 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9677
9678 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9679 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9680 Commentary and rearrangement of tests.
9681 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9682 Commentary and rearrangement of tests.
9683 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9684 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9685
9686 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9687
9688 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9689 enum from machine_mode.
9690
9691 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9692
9693 * c-common.c: Adjust include files.
9694 * c-gimplify.c: Ditto.
9695 * cilk.c: Ditto.
9696 * c-pragma.c: Ditto.
9697 * c-ubsan.c: Ditto.
9698
9699 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9700
9701 * c-gimplify.c: Adjust include files.
9702
9703 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9704
9705 PR c++/53061
9706 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9707 c_common_initialize_diagnostics.
9708 * c-common.h: Likewise.
9709
9710 2014-10-24 Marek Polacek <polacek@redhat.com>
9711
9712 PR c/56980
9713 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9714 print "struct"/"union"/"enum" for typedefed names.
9715
9716 2014-10-23 Marek Polacek <polacek@redhat.com>
9717
9718 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9719 in unsigned type.
9720
9721 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9722 Yury Gribov <y.gribov@samsung.com>
9723
9724 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9725 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9726 instead of flag_sanitize_recover as bool flag.
9727
9728 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9729
9730 * cilk.c: Revert previous change.
9731
9732 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9733
9734 PR c/63307
9735 * cilk.c: Include vec.h.
9736 (struct cilk_decls): New structure.
9737 (wrapper_parm_cb): Split this function to...
9738 (fill_decls_vec): ...this...
9739 (create_parm_list): ...and this.
9740 (compare_decls): New function.
9741 (for_local_cb): Remove.
9742 (wrapper_local_cb): Ditto.
9743 (build_wrapper_type): For now first traverse and fill vector of
9744 declarations then sort it and then deal with sorted vector.
9745 (cilk_outline): Ditto.
9746 (declare_one_free_variable): Ditto.
9747
9748 2014-10-17 Marek Polacek <polacek@redhat.com>
9749
9750 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9751 * c.opt (Wimplicit-int): Initialize to -1.
9752
9753 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9754
9755 * c-pragma.c: Adjust include files.
9756 * c-semantics.c: Likewise.
9757
9758 2014-10-16 DJ Delorie <dj@redhat.com>
9759
9760 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9761 multiples of bytes.
9762
9763 2014-10-14 Jason Merrill <jason@redhat.com>
9764
9765 PR c++/63455
9766 * c-common.h (CPP_PREPARSED_EXPR): New.
9767 (N_CP_TTYPES): Adjust.
9768
9769 2014-10-15 Marek Polacek <polacek@redhat.com>
9770
9771 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9772
9773 2014-10-14 DJ Delorie <dj@redhat.com>
9774
9775 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9776 types, not just __int128.
9777 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9778 types, not just __int128.
9779 (cpp_atomic_builtins): Round pointer sizes up.
9780 (type_suffix): Use type precision, not specific types.
9781 * c-common.c (c_common_reswords): Remove __int128 special case.
9782 (c_common_type_for_size): Check for all __intN types, not just
9783 __int128.
9784 (c_common_type_for_mode): Likewise.
9785 (c_common_signed_or_unsigned_type): Likewise.
9786 (c_build_bitfield_integer_type): Likewise.
9787 (c_common_nodes_and_builtins): Likewise.
9788 (keyword_begins_type_specifier): Likewise.
9789 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9790 __intN variants.
9791
9792 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9793
9794 * c-common.c: Use hash_table instead of hashtab.
9795
9796 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9797
9798 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9799 C++11 section.
9800
9801 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9802
9803 PR c++/54427
9804 PR c++/57198
9805 PR c++/58845
9806 * c-common.c (warn_logical_operator): Punt for vectors.
9807
9808 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9809
9810 Implement SD-6: SG10 Feature Test Recommendations
9811 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9812 macros and the __has_header macro.
9813
9814 2014-09-30 Jason Merrill <jason@redhat.com>
9815
9816 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9817 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9818 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9819
9820 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9821 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9822
9823 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9824 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9825
9826 2014-09-24 Marek Polacek <polacek@redhat.com>
9827
9828 PR c/61405
9829 PR c/53874
9830 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9831
9832 2014-09-23 Andi Kleen <ak@linux.intel.com>
9833
9834 * c-common.c (handle_no_reorder_attribute): New function.
9835 (c_common_attribute_table): Add no_reorder attribute.
9836
9837 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9838
9839 * c-cppbuiltin.c (c_cpp_builtins): Define
9840 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9841 modes.
9842
9843 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9844
9845 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9846 for supported floating-point modes.
9847
9848 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9849
9850 * c.opt (Wpsabi): Use LangEnabledBy.
9851 * c-opts.c (c_common_handle_option): Do not handle here.
9852
9853 2014-09-12 Joseph Myers <joseph@codesourcery.com>
9854
9855 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9856 macros for floating-point modes.
9857
9858 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
9859
9860 PR target/58757
9861 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9862 __*_DENORM_MIN__ without denormals.
9863
9864 2014-09-10 Jakub Jelinek <jakub@redhat.com>
9865
9866 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9867 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9868 ubsan_create_data callers.
9869 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9870 index is constant or BIT_AND_EXPR with constant mask and is
9871 small enough for the bound.
9872 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9873 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9874
9875 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9876
9877 * c.opt: Add CppReason to various flags.
9878 (Wdate-time): Re-sort.
9879 * c-common.c: Include c-common.h earlier.
9880 (struct reason_option_codes_t): Delete.
9881 (c_option_controlling_cpp_error): Prefix global type and struct
9882 with cpp_.
9883
9884 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9885
9886 * c.opt (Wnormalized): New.
9887 (Wnormalized=): Use Enum and Reject Negative.
9888 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9889
9890 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9891
9892 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9893 digits of floating-point modes if -fbuilding-libgcc.
9894
9895 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9896
9897 * c-cppbuiltin.c (c_cpp_builtins): Also define
9898 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9899 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9900 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9901 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9902 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9903 __LIBGCC_STACK_GROWS_DOWNWARD__,
9904 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9905 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9906 __LIBGCC_DWARF_FRAME_REGISTERS__,
9907 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9908 __LIBGCC_STACK_POINTER_REGNUM__ and
9909 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9910 (builtin_define_with_value): Handle backslash-escaping in string
9911 macro values.
9912
9913 2014-09-05 Richard Biener <rguenther@suse.de>
9914
9915 PR middle-end/63148
9916 * c-format.c (check_format_arg): Properly handle
9917 effectively signed POINTER_PLUS_EXPR offset.
9918
9919 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9920
9921 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9922 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9923 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9924 and Init.
9925 * c-opts.c (c_common_handle_option): Do not handle here.
9926 (sanitize_cpp_opts): Likewise.
9927 * c-common.c (struct reason_option_codes_t): Handle
9928 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9929
9930 2014-09-03 Marek Polacek <polacek@redhat.com>
9931
9932 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9933
9934 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9935 Balaji V. Iyer <balaji.v.iyer@intel.com>
9936 Igor Zamyatin <igor.zamyatin@intel.com>
9937
9938 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9939 * c-common.c (c_common_reswords): Added _Cilk_for.
9940 * c-common.h (enum rid): Added RID_CILK_FOR.
9941 (cilk_for_number_of_iterations): Add declaration.
9942 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9943 CILK_FOR.
9944 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9945 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9946
9947 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9948
9949 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9950 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9951 Wundef): Use CPP, Var and Init.
9952 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9953
9954 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9955
9956 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9957 * c-opts.c (c_common_handle_option): Do not handle here.
9958
9959 2014-08-25 Jason Merrill <jason@redhat.com>
9960
9961 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9962 -std=c++14 and -std=gnu++14, rather than the reverse.
9963 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9964 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9965 * c-common.h (cxx_dialect): Remove cxx1y.
9966
9967 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9968
9969 * c-common.h (enum cxx_dialect): Add cxx14.
9970 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9971 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9972 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9973
9974 2014-08-22 Jason Merrill <jason@redhat.com>
9975
9976 * c.opt (std=gnu++17): Fix alias.
9977
9978 2014-08-22 Marek Polacek <polacek@redhat.com>
9979
9980 PR c++/62199
9981 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9982 check for vector types. Drop LHS argument.
9983 * c-common.h (warn_logical_not_parentheses): Adjust.
9984
9985 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9986
9987 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9988 (Wmultichar): Likewise.
9989 (Wdate-time): Use C-family languages instead of Common. Use CPP
9990 and Var.
9991 * c-opts.c (c_common_handle_option): Do not handle the above
9992 options here.
9993 (sanitize_cpp_opts): Likewise.
9994
9995 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9996
9997 PR fortran/44054
9998 * c-opts.c: Include tree-diagnostics.h.
9999 (c_diagnostic_finalizer): New.
10000 (c_common_initialize_diagnostics): Use it.
10001
10002 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10003
10004 PR preprocessor/51303
10005 * c-common.c (struct reason_option_codes_t option_codes):
10006 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10007
10008 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10009
10010 PR c/60975
10011 PR c/53063
10012 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10013 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10014 (c_common_post_options): Call init_global_opts_from_cpp.
10015 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10016
10017 2014-08-19 Marek Polacek <polacek@redhat.com>
10018
10019 PR c++/62153
10020 * c-common.c (maybe_warn_bool_compare): New function.
10021 * c-common.h (maybe_warn_bool_compare): Declare.
10022 * c.opt (Wbool-compare): New option.
10023
10024 2014-08-19 Marek Polacek <polacek@redhat.com>
10025
10026 * c.opt (Wc99-c11-compat): New option.
10027
10028 2014-08-19 Marek Polacek <polacek@redhat.com>
10029
10030 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10031 to warn_c90_c99_compat.
10032 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10033 to -1.
10034
10035 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10036 Steven Bosscher <steven@gcc.gnu.org>
10037
10038 PR c/52952
10039 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10040 format_check_results.
10041 (check_function_format): Use true and add comment for boolean
10042 argument.
10043 (finish_dollar_format_checking): Use explicit location when warning.
10044 (check_format_info): Likewise.
10045 (check_format_arg): Set extra_arg_loc and format_string_loc.
10046 (check_format_info_main): Use explicit location when warning.
10047 (check_format_types): Pass explicit location.
10048 (format_type_warning): Likewise.
10049
10050 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10051
10052 PR fortran/44054
10053 * c-format.c: Handle Fortran flags.
10054
10055 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10056
10057 PR other/61962
10058 * array-notation-common.c (find_rank): Added handling for other
10059 types of references.
10060
10061 2014-08-10 Marek Polacek <polacek@redhat.com>
10062
10063 PR c/51849
10064 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10065 * c.opt (Wc90-c99-compat): Add option.
10066
10067 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10068
10069 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10070
10071 2014-08-03 Marek Polacek <polacek@redhat.com>
10072
10073 * c-common.c (check_case_value): Add location_t parameter. Use it.
10074 (c_add_case_label): Pass loc to check_case_value.
10075
10076 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10077
10078 * cilk.c: Use hash_map instead of pointer_map.
10079
10080 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10081
10082 * c-gimplify.c: Use hash_set instead of pointer_set.
10083
10084 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10085
10086 PR middle-end/61455
10087 * array-notation-common.c (extract_array_notation_exprs): Handling
10088 of DECL_EXPR added.
10089
10090 2014-08-01 Jakub Jelinek <jakub@redhat.com>
10091
10092 * c-common.h (min_align_of_type): Removed prototype.
10093 * c-common.c (min_align_of_type): Removed.
10094 * c-ubsan.h (ubsan_maybe_instrument_reference,
10095 ubsan_maybe_instrument_member_call): New prototypes.
10096 * c-ubsan.c: Include stor-layout.h and builtins.h.
10097 (ubsan_maybe_instrument_reference_or_call,
10098 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10099 functions.
10100
10101 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
10102
10103 PR c++/60517
10104 * c.opt (-Wreturn-local-addr): Move to common.opt.
10105
10106 2014-07-30 Jason Merrill <jason@redhat.com>
10107
10108 PR c++/61659
10109 PR c++/61687
10110 Revert:
10111 * c.opt (-fuse-all-virtuals): New.
10112
10113 2014-07-30 Tom Tromey <tromey@redhat.com>
10114
10115 PR c/59855
10116 * c.opt (Wdesignated-init): New option.
10117 * c-common.c (c_common_attribute_table): Add "designated_init".
10118 (handle_designated_init): New function.
10119
10120 2014-07-24 Marek Polacek <polacek@redhat.com>
10121
10122 PR c/57653
10123 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10124
10125 2014-07-16 Dodji Seketeli <dodji@redhat.com>
10126
10127 PR preprocessor/60723 - missing system-ness marks for macro tokens
10128 * c-ppoutput.c (struct print::prev_was_system_token): New data
10129 member.
10130 (init_pp_output): Initialize it.
10131 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10132 (do_line_change): Return a flag saying if a line marker was
10133 emitted or not.
10134 (scan_translation_unit): Detect if the system-ness of the token we
10135 are about to emit is different from the one of the previously
10136 emitted token. If so, emit a line marker. Avoid emitting useless
10137 adjacent line markers. Avoid emitting line markers for tokens
10138 originating from the expansion of built-in macros.
10139 (scan_translation_unit_directives_only): Adjust.
10140
10141 2014-07-15 Marek Polacek <polacek@redhat.com>
10142
10143 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10144 TYPE_MAX_VALUE is NULL.
10145
10146 2014-07-14 Jakub Jelinek <jakub@redhat.com>
10147
10148 PR middle-end/61294
10149 * c.opt (Wmemset-transposed-args): New warning.
10150
10151 2014-07-10 Jason Merrill <jason@redhat.com>
10152
10153 PR c++/61659
10154 PR c++/61687
10155 * c.opt (-fuse-all-virtuals): New.
10156
10157 2014-07-09 Richard Biener <rguenther@suse.de>
10158
10159 PR c-family/61741
10160 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10161 using unsigned arithmetic if overflow does not wrap instead of
10162 if overflow is undefined.
10163
10164 2014-07-06 Marek Polacek <polacek@redhat.com>
10165
10166 PR c/6940
10167 * c.opt (Wsizeof-array-argument): New option.
10168
10169 2014-07-03 Jakub Jelinek <jakub@redhat.com>
10170
10171 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
10172 comments->count <= 1, as comments->entries might be NULL.
10173
10174 2014-07-01 Marek Polacek <polacek@redhat.com>
10175
10176 * c.opt (Wint-conversion): New option.
10177
10178 2014-07-01 Marek Polacek <polacek@redhat.com>
10179
10180 PR c/58286
10181 * c.opt (Wincompatible-pointer-types): New option.
10182
10183 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10184
10185 PR c++/51400
10186 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10187 Do not discard TYPE_QUALS of type.
10188
10189 2014-06-26 Jason Merrill <jason@redhat.com>
10190
10191 * c-common.h (enum cxx_dialect): Add cxx1z.
10192 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10193 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10194
10195 2014-06-26 Teresa Johnson <tejohnson@google.com>
10196
10197 * c-common.h (get_dump_info): Declare.
10198 * c-gimplify.c (c_genericize): Use saved dump files.
10199 * c-opts.c (c_common_parse_file): Begin and end dumps
10200 once around parsing invocation.
10201 (get_dump_info): New function.
10202
10203 2014-06-23 Marek Polacek <polacek@redhat.com>
10204 Andrew MacLeod <amacleod@redhat.com>
10205
10206 PR c/61553
10207 * c-common.c (get_atomic_generic_size): Don't segfault if the
10208 type doesn't have a size.
10209
10210 2014-06-20 Marek Polacek <polacek@redhat.com>
10211
10212 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10213 (ubsan_walk_array_refs_r): New function.
10214 (c_genericize): Instrument array bounds.
10215 * c-ubsan.c: Include "internal-fn.h".
10216 (ubsan_instrument_division): Mark instrumented arrays as having
10217 side effects. Adjust ubsan_type_descriptor call.
10218 (ubsan_instrument_shift): Likewise.
10219 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10220 (ubsan_instrument_bounds): New function.
10221 (ubsan_array_ref_instrumented_p): New function.
10222 (ubsan_maybe_instrument_array_ref): New function.
10223 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10224 (ubsan_array_ref_instrumented_p): Declare.
10225 (ubsan_maybe_instrument_array_ref): Declare.
10226
10227 2014-06-20 Hale Wang <hale.wang@arm.com>
10228
10229 PR lto/61123
10230 * c.opt (fshort-enums): Add to LTO.
10231 * c.opt (fshort-wchar): Likewise.
10232
10233 2014-06-16 Marek Polacek <polacek@redhat.com>
10234
10235 PR c/60439
10236 * c.opt (Wswitch-bool): Add Var.
10237
10238 2014-06-12 Jakub Jelinek <jakub@redhat.com>
10239
10240 PR middle-end/61486
10241 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10242 #pragma omp target teams or
10243 #pragma omp {,target }teams distribute simd.
10244
10245 2014-06-12 Jason Merrill <jason@redhat.com>
10246
10247 * c.opt (Wabi=, fabi-compat-version): New.
10248 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10249 (c_common_post_options): Handle flag_abi_compat_version default.
10250 Disallow -fabi-compat-version=1.
10251 * c-common.h (abi_version_crosses): New.
10252
10253 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
10254
10255 * c-common.c (handle_section_attribute): Update handling for
10256 section names that are no longer trees.
10257
10258 2014-06-10 Jakub Jelinek <jakub@redhat.com>
10259
10260 PR fortran/60928
10261 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10262 (omp_pragmas): ... back here.
10263
10264 2014-06-05 Marek Polacek <polacek@redhat.com>
10265
10266 PR c/49706
10267 * c-common.c (warn_logical_not_parentheses): New function.
10268 * c-common.h (warn_logical_not_parentheses): Declare.
10269 * c.opt (Wlogical-not-parentheses): New option.
10270
10271 2014-06-04 Marek Polacek <polacek@redhat.com>
10272
10273 PR c/30020
10274 * c-common.c (check_case_bounds): Add location parameter.
10275 Use it.
10276 (c_add_case_label): Pass loc to check_case_bounds.
10277
10278 2014-06-03 Marek Polacek <polacek@redhat.com>
10279
10280 PR c/60439
10281 * c.opt (Wswitch-bool): New option.
10282
10283 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10284
10285 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10286 Remove prototypes.
10287 (record_types_used_by_current_var_decl): Move prototype to where
10288 it belongs.
10289
10290 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10291 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10292 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10293
10294 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10295
10296 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10297 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10298 void_zero_node.
10299 * c-pretty-print.c (pp_c_void_constant): New function.
10300 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10301 (c_pretty_printer::expression): Handle VOID_CST.
10302 * cilk.c (extract_free_variables): Likewise.
10303 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10304 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10305
10306 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10307
10308 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10309 * c-pragma.c (push_alignment): Adjust.
10310 (handle_pragma_push_options): Likewise.
10311
10312 2014-05-09 Marek Polacek <polacek@redhat.com>
10313
10314 PR c/50459
10315 * c-common.c (check_user_alignment): Return -1 if alignment is error
10316 node.
10317 (handle_aligned_attribute): Don't call default_conversion on
10318 FUNCTION_DECLs.
10319 (handle_vector_size_attribute): Likewise.
10320 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10321 (handle_sentinel_attribute): Call default_conversion and allow even
10322 integral types as an argument.
10323
10324 2014-05-08 Marek Polacek <polacek@redhat.com>
10325
10326 PR c/61053
10327 * c-common.c (min_align_of_type): New function factored out from...
10328 (c_sizeof_or_alignof_type): ...here.
10329 * c-common.h (min_align_of_type): Declare.
10330
10331 2014-05-08 Marek Polacek <polacek@redhat.com>
10332
10333 PR c/61077
10334 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10335 parameter type of main.
10336
10337 2014-05-07 DJ Delorie <dj@redhat.com>
10338
10339 * c-cppbuiltin.c (print_bits_of_hex): New.
10340 (builtin_define_type_minmax): Print values using hex so as not to
10341 require a pre-computed list of string values.
10342
10343 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10344 Mike Stump <mikestump@comcast.net>
10345 Richard Sandiford <rdsandiford@googlemail.com>
10346
10347 * c-ada-spec.c: Include wide-int.h.
10348 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10349 (dump_generic_ada_node): Use wide-int interfaces.
10350 * c-common.c: Include wide-int-print.h.
10351 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10352 (pointer_int_sum): Use wide-int interfaces.
10353 (c_common_nodes_and_builtins): Use make_int_cst.
10354 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10355 (handle_alloc_size_attribute): Use wide-int interfaces.
10356 (get_nonnull_operand): Likewise.
10357 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10358 * c-lex.c: Include wide-int.h.
10359 (narrowest_unsigned_type): Take a widest_int rather than two
10360 HOST_WIDE_INTs.
10361 (narrowest_signed_type): Likewise.
10362 (interpret_integer): Update accordingly. Use wide-int interfaces.
10363 (lex_charconst): Use wide-int interfaces.
10364 * c-pretty-print.c: Include wide-int.h.
10365 (pp_c_integer_constant): Use wide-int interfaces.
10366 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10367 INT_CST_LT_UNSIGNED.
10368
10369 2014-05-06 Richard Biener <rguenther@suse.de>
10370
10371 * c-opts.c (c_common_post_options): For -freestanding,
10372 -fno-hosted and -fno-builtin disable pattern recognition
10373 if not enabled explicitely.
10374
10375 2014-05-02 Marek Polacek <polacek@redhat.com>
10376
10377 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10378
10379 2014-05-01 Marek Polacek <polacek@redhat.com>
10380
10381 PR c/43245
10382 * c.opt (Wdiscarded-qualifiers): Add.
10383
10384 2014-04-30 Marek Polacek <polacek@redhat.com>
10385
10386 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10387 INT_MIN / -1 sanitization only for integer types.
10388
10389 2014-04-25 Marek Polacek <polacek@redhat.com>
10390
10391 PR c/18079
10392 * c-common.c (handle_noinline_attribute): Warn if the attribute
10393 conflicts with always_inline attribute.
10394 (handle_always_inline_attribute): Warn if the attribute conflicts
10395 with noinline attribute.
10396
10397 2014-04-25 Marek Polacek <polacek@redhat.com>
10398
10399 PR c/60156
10400 * c-common.c (check_main_parameter_types): Warn about variadic main.
10401
10402 2014-04-24 Mike Stump <mikestump@comcast.net>
10403
10404 * c.opt (Wshadow-ivar): Default to on.
10405
10406 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10407
10408 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10409
10410 2014-04-23 Marek Polacek <polacek@redhat.com>
10411
10412 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10413
10414 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10415
10416 PR sanitizer/60275
10417 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10418 if flag_sanitize_undefined_trap_on_error.
10419 (ubsan_instrument_division, ubsan_instrument_shift,
10420 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10421 if !flag_sanitize_recover.
10422
10423 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10424
10425 PR libstdc++/43622
10426 * c-common.c (registered_builtin_types): Make non-static.
10427 * c-common.h (registered_builtin_types): Declare.
10428
10429 2014-04-14 Richard Biener <rguenther@suse.de>
10430 Marc Glisse <marc.glisse@inria.fr>
10431
10432 PR c/60819
10433 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10434 apply may-alias the scalar pointer type when applicable.
10435
10436 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10437
10438 PR middle-end/60467
10439 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10440 as possible argument for Cilk_spawn.
10441
10442 2014-04-11 Tobias Burnus <burnus@net-b.de>
10443
10444 PR c/60194
10445 * c.opt (Wformat-signedness): Add
10446 * c-format.c(check_format_types): Use it.
10447
10448 2014-04-11 Jason Merrill <jason@redhat.com>
10449
10450 PR c++/57926
10451 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10452 default_conversion for an array argument.
10453
10454 2014-04-08 Marek Polacek <polacek@redhat.com>
10455
10456 PR sanitizer/60745
10457 * c-ubsan.c: Include asan.h.
10458 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10459
10460 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10461
10462 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10463
10464 2014-04-02 Marek Polacek <polacek@redhat.com>
10465
10466 * c-common.h (c_expand_expr): Remove declaration.
10467
10468 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10469
10470 PR c++/60689
10471 * c-common.c (add_atomic_size_parameter): When creating new
10472 params vector, push the size argument first.
10473
10474 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10475
10476 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10477 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10478 ubsan_create_data callers.
10479
10480 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10481
10482 PR debug/60603
10483 * c-opts.c (c_finish_options): Restore cb_file_change call to
10484 <built-in>.
10485
10486 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10487
10488 PR middle-end/36282
10489 * c-pragma.c (apply_pragma_weak): Only look at
10490 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10491 DECL_ASSEMBLER_NAME_SET_P (decl).
10492 (maybe_apply_pending_pragma_weaks): Exit early if
10493 vec_safe_is_empty (pending_weaks) rather than only when
10494 !pending_weaks.
10495 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10496 set assembler name back to NULL afterwards.
10497
10498 2014-03-11 Jason Merrill <jason@redhat.com>
10499
10500 * c.opt: Add -std=gnu++14.
10501
10502 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10503
10504 * c-opts.c (c_common_post_options): Don't override
10505 -ffp-contract=fast if unsafe-math-optimizations is on.
10506
10507 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10508
10509 * c.opt: Enable LTO FE for fshort-double.
10510
10511 2014-03-07 Jason Merrill <jason@redhat.com>
10512
10513 * c.opt: Add -std=c++14.
10514
10515 2014-03-06 Marek Polacek <polacek@redhat.com>
10516
10517 PR c/60197
10518 * cilk.c (contains_cilk_spawn_stmt): New function.
10519 (contains_cilk_spawn_stmt_walker): Likewise.
10520 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10521 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10522
10523 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10524
10525 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10526 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10527 even when flag_preprocess_only.
10528
10529 2014-02-26 Jason Merrill <jason@redhat.com>
10530
10531 PR c++/59231
10532 PR c++/11586
10533 * c-common.c (shorten_compare): Don't check
10534 c_inhibit_evaluation_warnings.
10535
10536 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10537
10538 PR c/37743
10539 * c-common.c (c_common_nodes_and_builtins): When initializing
10540 c_uint{16,32,64}_type_node, also set corresponding
10541 uint{16,32,64}_type_node to the same value.
10542
10543 PR c++/60267
10544 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10545 for PRAGMA_IVDEP if flag_preprocess_only.
10546
10547 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10548
10549 PR c/60101
10550 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10551 if false, add ADD itself, rather than vice versa.
10552 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10553 copy. For SAVE_EXPR, only call merge_tlist once.
10554
10555 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10556
10557 PR middle-end/60092
10558 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10559 and tree_to_uhwi.
10560 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10561 functions.
10562 (c_common_attribute_table): Add alloc_align and assume_aligned
10563 attributes.
10564
10565 2014-02-06 Marek Polacek <polacek@redhat.com>
10566
10567 PR c/60087
10568 * c-common.c (warn_for_sign_compare): Call warning_at with location
10569 instead of warning.
10570
10571 2014-02-05 Marek Polacek <polacek@redhat.com>
10572
10573 PR c/53123
10574 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10575 statement.
10576
10577 2014-02-04 Marek Polacek <polacek@redhat.com>
10578
10579 PR c/60036
10580 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10581 SAVE_EXPR.
10582
10583 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10584
10585 PR c++/53017
10586 PR c++/59211
10587 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10588 handle_vector_size_attribute, handle_nonnull_attribute): Call
10589 default_conversion on the attribute argument.
10590 (handle_nonnull_attribute): Increment the argument number.
10591
10592 2014-01-31 Marek Polacek <polacek@redhat.com>
10593
10594 PR c/59963
10595 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10596 build_function_call_vec.
10597 (resolve_overloaded_builtin): Likewise.
10598 * c-common.h (build_function_call_vec): Adjust declaration.
10599
10600 2014-01-30 Marek Polacek <polacek@redhat.com>
10601
10602 PR c/59940
10603 * c-common.h (unsafe_conversion_p): Adjust declaration.
10604 (warnings_for_convert_and_check): Likewise.
10605 (convert_and_check): Likewise.
10606 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10607 expansion_point_location_if_in_system_header on it.
10608 (warnings_for_convert_and_check): Add location parameter. Call
10609 expansion_point_location_if_in_system_header on it. Use it.
10610 (convert_and_check): Add location parameter. Use it.
10611 (conversion_warning): Likewise.
10612 (c_add_case_label): Adjust convert_and_check calls.
10613 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10614
10615 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10616
10617 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10618 flag_cilkplus.
10619 * c-pragma.c (init_pragma): Likewise.
10620 * c.opt: Likewise.
10621
10622 2014-01-23 Marek Polacek <polacek@redhat.com>
10623
10624 PR c/59846
10625 * c-common.c (shorten_compare): Add location_t parameter.
10626 * c-common.h (shorten_binary_op): Adjust declaration.
10627
10628 2014-01-23 Marek Polacek <polacek@redhat.com>
10629
10630 PR c/58346
10631 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10632 * c-common.h: Declare it.
10633
10634 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10635
10636 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10637 * c-ada-spec.c (dump_ads): Likewise.
10638 (cpp_check): Likewise.
10639 (dump_ada_specs): Likewise.
10640
10641 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10642
10643 PR c++/49718
10644 * c-common.c (handle_no_instrument_function_attribute): Allow
10645 no_instrument_function attribute in class member
10646 definition/declaration.
10647
10648 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10649
10650 PR c/58943
10651 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10652 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10653 being COMPOUND_EXPR.
10654 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10655 operand a SAVE_EXPR and second MODIFY_EXPR.
10656
10657 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10658
10659 PR target/58115
10660 * c-pch.c (c_common_write_pch): Call
10661 prepare_target_option_nodes_for_pch.
10662
10663 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10664
10665 Update copyright years
10666
10667 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10668
10669 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10670 the copyright notice.
10671
10672 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10673
10674 * c-ada-spec.c (print_constructor): New function.
10675 (print_destructor): Retrieve the origin of the destructor.
10676 (print_ada_declaration): Revamp handling of constructors/destructors.
10677
10678 2013-12-23 Stuart Hastings <stuart@apple.com>
10679 Bill Maddox <maddox@google.com>
10680 Jason Merrill <jason@redhat.com>
10681
10682 * c.opt: Add -fdeclone-ctor-dtor.
10683 * c-opts.c (c_common_post_options): Default to on iff -Os.
10684
10685 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10686
10687 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10688 attribute.
10689 * c-pragma.h (enum pragma_cilk_clause): Remove.
10690 (enum pragma_omp_clause): Added the following fields:
10691 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10692 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10693 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10694 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10695 PRAGMA_CILK_CLAUSE_UNIFORM.
10696
10697
10698 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10699
10700 * cilk.c (cilk_outline): Made this function non-static.
10701 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10702 (create_cilk_wrapper): Added a new parameter: a function pointer.
10703 (c_install_body_w_frame_cleanup): Remove
10704 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10705 * c-common.h (cilk_outline): New prototype.
10706 (gimplify_cilk_spawn): Removed two parameters.
10707 (cilk_install_body_with_frame_cleanup): New prototype.
10708 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10709 CILK_SPAWN_STMT case.
10710
10711 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10712
10713 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10714
10715 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10716 (int_array_type_node): Remove.
10717 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10718
10719 2013-12-05 Marek Polacek <polacek@redhat.com>
10720
10721 PR c/52023
10722 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10723 [ADJUST_FIELD_ALIGN].
10724
10725 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10726
10727 PR c/52023
10728 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10729 and check field alignment if set.
10730 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10731 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10732
10733 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10734 Marek Polacek <polacek@redhat.com>
10735
10736 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10737 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10738
10739 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10740
10741 PR c/59309
10742 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10743 arguments.
10744
10745 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10746
10747 PR c/59280
10748 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10749 goto invalid. If it is error_mark_node, don't issue further
10750 diagnostics.
10751
10752 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10753
10754 * c.opt (Wopenmp-simd): New.
10755
10756 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10757
10758 * c-ubsan.h (ubsan_instrument_return): New prototype.
10759 * c-ubsan.c (ubsan_instrument_return): New function.
10760
10761 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10762
10763 * c-common.c: Add required include files from gimple.h.
10764 * c-gimplify.c: Likewise.
10765 * cilk.c: Likewise.
10766
10767 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10768
10769 * c-common.c (unsafe_conversion_p): Remove use of
10770 EXPR_LOC_OR_HERE macro.
10771 (conversion_warning): Likewise.
10772 (warnings_for_convert_and_check): Likewise.
10773 (warn_for_collisions_1): Likewise.
10774 (shorten_compare): Likewise, and remove use of in_system_header
10775 macro, using the location from the former.
10776 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10777 (cb_def_pragma): Remove use of in_system_header macro.
10778 (lex_string): Likewise.
10779 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10780
10781 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10782 Mike Stump <mikestump@comcast.net>
10783 Richard Sandiford <rdsandiford@googlemail.com>
10784
10785 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10786 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10787 tree_fits_shwi_p or tree_fits_uhwi_p.
10788 (dump_generic_ada_node): Likewise.
10789 * c-format.c (check_format_arg): Likewise.
10790 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10791
10792 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10793
10794 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10795
10796 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10797
10798 PR c/53001
10799 * c-common.c (unsafe_conversion_p): Make this function
10800 return an enumeration with more detail.
10801 (conversion_warning): Use the new return type of
10802 unsafe_conversion_p to separately warn either about conversions
10803 that lower floating point number precision or about the other
10804 kinds of conversions.
10805 * c-common.h (enum conversion_safety): New enumeration.
10806 (unsafe_conversion_p): switching return type to
10807 conversion_safety enumeration.
10808 * c.opt: Adding new warning -Wfloat-conversion and
10809 enabling it with -Wconversion.
10810
10811 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10812
10813 * c-opts.c: Include plugin.h.
10814 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10815
10816 2013-11-19 Marek Polacek <polacek@redhat.com>
10817
10818 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10819 call.
10820 (ubsan_instrument_shift): Likewise.
10821 (ubsan_instrument_vla): Likewise.
10822
10823 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10824
10825 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10826 cast to unsigned type.
10827
10828 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10829
10830 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10831 tree_low_cst.
10832 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10833 rather than tree_low_cst.
10834
10835 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10836
10837 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10838 tree_to_uhwi throughout.
10839
10840 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10841
10842 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10843 tree_low_cst (..., 0) with tree_to_shwi throughout.
10844
10845 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10846
10847 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10848 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10849
10850 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10851
10852 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10853 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10854
10855 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10856
10857 * c-cilkplus.c: New file.
10858 * c-common.c (readonly_error): Add location argument.
10859 * c-common.h (readonly_error): Same.
10860 (c_finish_cilk_clauses): Protoize.
10861 (c_check_cilk_loop): Same.
10862 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10863 Do not fail on error_mark_node.
10864 Abstract increment canonicalization to here...
10865 (c_omp_for_incr_canonicalize_ptr): New.
10866 c-pragma.c (init_pragma): Register "simd" pragma.
10867 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10868 (enum pragma_cilk_clause): New.
10869
10870 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10871
10872 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10873 wchar_type and host_integerp checks.
10874
10875 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10876
10877 * c-common.c: Likewise.
10878 * c-gimplify.c: Likewise.
10879 * cilk.c: Likewise.
10880
10881 2013-11-14 Diego Novillo <dnovillo@google.com>
10882
10883 * c-common.c: Include fold-const.h.
10884 Include stor-layout.h.
10885 Include calls.h.
10886 Include stringpool.h.
10887 Include attribs.h.
10888 Include varasm.h.
10889 Include trans-mem.h.
10890 * c-cppbuiltin.c: Include stor-layout.h.
10891 Include stringpool.h.
10892 * c-format.c: Include stringpool.h.
10893 * c-lex.c: Include stringpool.h.
10894 Include stor-layout.h.
10895 * c-pragma.c: Include stringpool.h.
10896 Include attribs.h.
10897 Include varasm.h.
10898 Include gcc-symtab.h.
10899 * c-pretty-print.c: Include stor-layout.h.
10900 Include attribs.h.
10901 * cilk.c: Include stringpool.h.
10902 Include calls.h.
10903
10904 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10905
10906 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10907 * c-common.c (c_common_reswords): Add __auto_type.
10908 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10909
10910 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10911
10912 * c-common.c: Include gimplify.h.
10913 * c-gimplify.c: Likewise.
10914 * cilk.c: Likewise.
10915 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10916 * c-ubsan.c: Don't include gimple.h.
10917
10918 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10919
10920 * c-common.c (c_common_reswords): Add _Thread_local.
10921
10922 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10923
10924 * c-common.c (atomic_size_supported_p): New function.
10925 (resolve_overloaded_atomic_exchange)
10926 (resolve_overloaded_atomic_compare_exchange)
10927 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10928 Use it instead of comparing size with a local list of sizes.
10929
10930 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10931 Joseph Myers <joseph@codesourcery.com>
10932
10933 * c-common.h (enum rid): Add RID_ATOMIC.
10934 * c-common.c (c_common_reswords): Add _Atomic.
10935 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10936 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10937 * c-format.c (check_format_types): Check for extra _Atomic
10938 qualifiers in format argument.
10939 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10940 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10941
10942 2013-11-06 Tobias Burnus <burnus@net-b.de>
10943
10944 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10945
10946 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10947
10948 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10949 standards modes.
10950 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10951 to mean lack of IEEE 754 support.
10952
10953 2013-11-05 Tobias Burnus <burnus@net-b.de>
10954
10955 * c.opt (-Wdate-time): New option
10956 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10957
10958 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10959
10960 * c-cppbuiltin.c (cpp_iec_559_value): Test
10961 flag_excess_precision_cmdline not flag_excess_precision.
10962
10963 2013-11-05 Tobias Burnus <burnus@net-b.de>
10964
10965 * c.opt (fopenmp-simd): New option.
10966 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10967 (omp_pragmas): ... this new struct.
10968 (c_pp_lookup_pragma): Also walk omp_pragmas.
10969 (init_pragma): Init pragmas for -fopenmp-simd.
10970
10971 2013-11-04 Marek Polacek <polacek@redhat.com>
10972
10973 PR c++/58979
10974 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10975
10976 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10977
10978 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10979 New functions.
10980 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10981
10982 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10983
10984 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10985 (dump_ada_specs): Adjust prototype of second callback.
10986 * c-ada-spec.c (cpp_check): New global variable.
10987 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10988 (print_generic_ada_decl): Likewise.
10989 (has_static_fields): Change return type to bool and add guard.
10990 (has_nontrivial_methods): New predicate.
10991 (is_tagged_type): Change return type to bool.
10992 (separate_class_package): Call has_nontrivial_methods.
10993 (pp_ada_tree_identifier): Minor tweaks.
10994 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10995 (dump_ada_array_domains): Likewise.
10996 (dump_ada_array_type): Likewise.
10997 (dump_template_types): Remove cpp_check parameter and do not pass it to
10998 dump_generic_ada_node.
10999 (dump_ada_template): Likewise.
11000 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11001 recursively.
11002 (print_ada_methods): Change return type to integer. Remove cpp_check
11003 parameter and do not pass it down.
11004 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11005 dump_generic_ada_node.
11006 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11007 accessing methods.
11008 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11009 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11010 value of print_ada_methods.
11011 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11012 Set cpp_check to it before invoking dump_ada_nodes.
11013 (dump_ada_specs): Likewise.
11014
11015 2013-11-03 Marek Polacek <polacek@redhat.com>
11016
11017 * c-ubsan.c: Don't include hash-table.h.
11018 (ubsan_instrument_vla): New function.
11019 * c-ubsan.h: Declare it.
11020
11021 2013-10-31 David Malcolm <dmalcolm@redhat.com>
11022
11023 Automated part of renaming of symtab_node_base to symtab_node.
11024
11025 Patch autogenerated by rename_symtab.py from
11026 https://github.com/davidmalcolm/gcc-refactoring-scripts
11027 revision 58bb219cc090b2f4516a9297d868c245495ee622
11028
11029 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11030 symtab_node_base to symtab_node.
11031
11032 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11033
11034 Implement C++14 digit separators.
11035 * c-lex.c (interpret_float): Remove digit separators from scratch string
11036 before building real literal.
11037
11038 2013-10-30 Jakub Jelinek <jakub@redhat.com>
11039
11040 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11041
11042 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11043
11044 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11045 fields.
11046 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11047 enabled.
11048 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11049 (insert_cilk_frame): New prototype.
11050 (cilk_init_builtins): Likewise.
11051 (gimplify_cilk_spawn): Likewise.
11052 (c_cilk_install_body_w_frame_cleanup): Likewise.
11053 (cilk_detect_spawn_and_unwrap): Likewise.
11054 (cilk_set_spawn_marker): Likewise.
11055 (build_cilk_sync): Likewise.
11056 (build_cilk_spawn): Likewise.
11057 * cilk.c: New file.
11058
11059 2013-10-29 David Malcolm <dmalcolm@redhat.com>
11060
11061 Patch autogenerated by refactor_symtab.py from
11062 https://github.com/davidmalcolm/gcc-refactoring-scripts
11063 revision 58bb219cc090b2f4516a9297d868c245495ee622
11064
11065 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11066 to a true class hierarchy.
11067 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11068
11069 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11070
11071 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11072
11073 2013-10-26 Jeff Law <law@redhat.com>
11074
11075 * c-common.c (c_define_builtins): Remove mudflap support.
11076 * c.opt: Ignore and warn for mudflap options.
11077
11078 2013-10-24 Tobias Burnus <burnus@net-b.de>
11079
11080 PR other/33426
11081 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11082 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11083
11084 2013-10-23 Jason Merrill <jason@redhat.com>
11085
11086 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11087
11088 2013-10-11 Jakub Jelinek <jakub@redhat.com>
11089
11090 * c-common.h (omp_clause_mask::operator !=): New method.
11091 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11092 instead of if (mask & something) tests everywhere.
11093
11094 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11095 201307 instead of 201107.
11096 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11097 (c_common_attribute_table): Add "omp declare target" and
11098 "omp declare simd" attributes.
11099 (handle_omp_declare_target_attribute,
11100 handle_omp_declare_simd_attribute): New functions.
11101 * c-omp.c: Include c-pragma.h.
11102 (c_finish_omp_taskgroup): New function.
11103 (c_finish_omp_atomic): Add swapped argument, if true,
11104 build the operation first with rhs, lhs arguments and use NOP_EXPR
11105 build_modify_expr.
11106 (c_finish_omp_for): Add code argument, pass it down to make_code.
11107 (c_omp_split_clauses): New function.
11108 (c_split_parallel_clauses): Removed.
11109 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11110 c_omp_declare_simd_clauses_to_decls): New functions.
11111 * c-common.h (omp_clause_mask): New type.
11112 (OMP_CLAUSE_MASK_1): Define.
11113 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11114 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11115 omp_clause_mask::operator |, omp_clause_mask::operator &,
11116 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11117 omp_clause_mask::operator ==): New methods.
11118 (enum c_omp_clause_split): New.
11119 (c_finish_omp_taskgroup): New prototype.
11120 (c_finish_omp_atomic): Add swapped argument.
11121 (c_finish_omp_for): Add code argument.
11122 (c_omp_split_clauses): New prototype.
11123 (c_split_parallel_clauses): Removed.
11124 (c_omp_declare_simd_clauses_to_numbers,
11125 c_omp_declare_simd_clauses_to_decls): New prototypes.
11126 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11127 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11128 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11129 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11130 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11131 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11132 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11133 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11134 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11135 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11136 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11137 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11138 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11139 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11140 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11141 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11142 PRAGMA_OMP_CLAUSE_UNIFORM.
11143
11144 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
11145
11146 PR tree-optimization/20318
11147 * c-common.c (handle_returns_nonnull_attribute): New function.
11148 (c_common_attribute_table): Add returns_nonnull.
11149
11150 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
11151
11152 PR c++/19476
11153 * c.opt (fcheck-new): Move to common.opt.
11154
11155 2013-09-25 Marek Polacek <polacek@redhat.com>
11156 Jakub Jelinek <jakub@redhat.com>
11157
11158 PR sanitizer/58413
11159 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11160 an expression if we can prove it is correct.
11161 (ubsan_instrument_division): Likewise. Remove unnecessary
11162 check.
11163
11164 2013-09-18 Marek Polacek <polacek@redhat.com>
11165
11166 PR sanitizer/58411
11167 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11168 Declare it.
11169 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11170
11171 2013-09-14 Iain Sandoe <iain@codesourcery.com>
11172
11173 PR target/48094
11174 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11175 fobjc-gc, freplace-objc-classes): Accept for LTO.
11176
11177 2013-09-13 Jacek Caban <jacek@codeweavers.com>
11178
11179 * c-target.def: New hook
11180
11181 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11182
11183 PR c++/43452
11184 * c.opt (Wdelete-incomplete): Add.
11185
11186 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11187
11188 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11189 (vector_types_compatible_elements_p): New function.
11190 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11191 declaration.
11192 (vector_types_compatible_elements_p): Declare.
11193
11194 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11195
11196 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11197 a virtual member function.
11198 (pp_simple_type_specifier): Remove.
11199 (pp_c_type_specifier): Likewise.
11200 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11201 Rename from pp_c_type_specifier. Adjust.
11202 (c_pretty_printer::c_pretty_printer): Do not assign to
11203 simple_type_specifier.
11204
11205 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11206
11207 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11208 member function.
11209 (c_pretty_printer::storage_class_specifier): Likewise.
11210 (c_pretty_printer::initializer): Likewise.
11211 (pp_declaration): Remove.
11212 (pp_declaration_specifiers): Likewise.
11213 (pp_abstract_declarator): Likewise.
11214 (pp_declarator): Likewise.
11215 (pp_type_id): Likewise.
11216 (pp_statement): Likewise.
11217 (pp_constant): Likewise.
11218 (pp_id_expression): Likewise.
11219 (pp_primary_expression): Likewise.
11220 (pp_unary_expression): Likewise.
11221 (pp_multiplicative_expression): Likewise.
11222 (pp_conditional_expression): Likewise.
11223 (pp_assignment_expression): Likewise.
11224 (pp_expression): Likewise.
11225 (pp_c_type_id): Likewise.
11226 (pp_c_storage_class_specifier): Likewise.
11227 * c-pretty-print.c (pp_c_type_cast): Tidy.
11228 (pp_c_pointer): Likewise.
11229 (pp_c_type_specifier): Likewise.
11230 (pp_c_parameter_type_list): Likewise.
11231 (pp_c_function_definition): Likewise.
11232 (pp_c_init_declarator): Likewise.
11233 (pp_c_initializer_list): Likewise.
11234 (pp_c_constructor_elts): Likewise.
11235 (c_pretty_printer::direct_abstract_declarator): Likewise.
11236 (c_pretty_printer::declaration_specifiers): Likewise.
11237 (c_pretty_printer::primary_expression): Likewise.
11238 (c_pretty_printer::postfix_expression): Likewise.
11239 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11240 (c_pretty_printer::storage_class_specifier): Rename from
11241 pp_c_storage_class_specifier.
11242 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11243 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11244 storage_class_specifier, initializer, offset_list, flags.
11245
11246 2013-08-30 Marek Polacek <polacek@redhat.com>
11247
11248 * c-ubsan.c: New file.
11249 * c-ubsan.h: New file.
11250
11251 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11252
11253 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11254 member function.
11255 (c_pretty_printer::declaration_specifiers): Likewise.
11256 (c_pretty_printer::declarator): Likewise.
11257 (c_pretty_printer::abstract_declarator): Likewise.
11258 (c_pretty_printer::direct_abstract_declarator): Likewise.
11259 (c_pretty_printer::direct_declarator): Likewise.
11260 (c_pretty_printer::function_specifier): Likewise.
11261 (pp_declaration): Adjust.
11262 (pp_declaration_specifiers): Likewise.
11263 (pp_abstract_declarator): Likewise.
11264 (pp_direct_declarator): Likewise.
11265 (pp_function_specifier): Likewise.
11266 (pp_direct_abstract_declarator): Remove as unused.
11267 (pp_c_declaration): Remove.
11268 (pp_c_declaration_specifiers): Likewise.
11269 (pp_c_declarator): Likewise.
11270 (pp_c_direct_declarator): Likewise.
11271 (pp_c_function_specifier): Likewise.
11272 (pp_c_direct_abstract_declarator): Likewise.
11273 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11274 from pp_c_abstract_declarator. Adjust.
11275 (c_pretty_printer::direct_abstract_declarator): Rename from
11276 pp_c_direct_abstract_declarator. Adjust.
11277 (c_pretty_printer::function_specifier): Rename from
11278 pp_c_function_specifier. Adjust.
11279 (c_pretty_printer::declaration_specifiers): Rename from
11280 pp_c_declaration_specifiers. Adjust.
11281 (c_pretty_printer::direct_declarator): Rename from
11282 pp_c_direct_declarator. Adjust.
11283 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11284 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11285 (c_pretty_printer::c_pretty_printer): Do not assign to
11286 declaration, declaration_specifiers, declarator,
11287 direct_declarator, direct_abstract_declarator, function_specifier.
11288
11289 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11290
11291 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11292 virtual member function.
11293 (c_pretty_printer::multiplicative_expression): Likewise.
11294 (c_pretty_printer::conditional_expression): Likewise.
11295 (c_pretty_printer::assignment_expression): Likewise.
11296 (c_pretty_printer::expression): Likewise.
11297 (pp_unary_expression): Adjust.
11298 (pp_multiplicative_expression): Likewise.
11299 (pp_assignment_expression): Likewise.
11300 (pp_conditional_expression): Likewise.
11301 (pp_expression): Likewise.
11302 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11303 from pp_c_unary_expression. Adjust.
11304 (c_pretty_printer::multiplicative_expression): Rename from
11305 pp_c_multiplicative_expression. Adjust.
11306 (c_pretty_printer::conditional_expression): Rename from
11307 pp_c_conditional_expression. Adjust.
11308 (c_pretty_printer::assignment_expression): Rename from
11309 pp_c_assignment_expression. Adjust.
11310 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11311 (c_pretty_printer::c_pretty_printer): Do not assign to
11312 unary_expression, multiplicative_expression,
11313 conditional_expression, expression.
11314
11315 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11316
11317 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11318 virtual member function.
11319 (pp_postfix_expression): Adjust.
11320 (pp_c_postfix_expression): Remove.
11321 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11322 from pp_c_postfix_expression. Adjust.
11323 (c_pretty_printer::c_pretty_printer): Do not assign to
11324 postfix_expression.
11325
11326 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11327
11328 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11329 virtua member function.
11330 (pp_primary_expression): Adjust.
11331 (pp_c_primary_expression): Remove.
11332 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11333 from pp_c_primary_expression. Adjust.
11334 (pp_c_initializer_list): Use pp_primary_expression.
11335 (c_pretty_printer::c_pretty_printer): Do not assign to
11336 primary_expression.
11337
11338 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11339
11340 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11341 * c-pretty-print.c (M_): Remove.
11342 (c_pretty_printer::translate_string): Define.
11343 (pp_c_type_specifier): Use it.
11344 (pp_c_primary_expression): Likewise.
11345 (pp_c_expression): Likewise.
11346
11347 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11348
11349 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11350 virtual function.
11351 (pp_c_id_expression): Remove.
11352 (pp_id_expression): Adjust.
11353 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11354 pp_c_id_expression. Adjust.
11355 (pp_c_postfix_expression): Use pp_id_expression.
11356 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11357
11358 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11359
11360 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11361 member function.
11362 (pp_constant): Adjust.
11363 (pp_c_constant): Remove.
11364 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11365 pp_c_constant. Adjust.
11366 (pp_c_constant)
11367 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11368 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11369
11370 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11371
11372 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11373 (c_pretty_printer::c_pretty_printer): Declare.
11374 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11375 c_pretty_printer_init. Adjust.
11376 (print_c_tree): Do not call c_pretty_printer_init.
11377 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11378
11379 2013-08-09 Arnaud Charlet <charlet@adacore.com>
11380
11381 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11382
11383 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11384
11385 PR c++/58080
11386 * c-common.c (pointer_int_sum): Add bool parameter.
11387 * c-common.h (pointer_int_sum): Adjust declaration.
11388
11389 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11390
11391 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11392 c_pretty_printer variable.
11393
11394 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11395
11396 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11397 (pp_base): Remove.
11398 (pp_c_base): Likewise. Adjust users.
11399 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11400 (pp_c_whitespace): Do not call pp_base.
11401 (pp_c_left_paren): Likewise.
11402 (pp_c_right_paren): Likewise.
11403 (pp_c_left_brace): Likewise.
11404 (pp_c_right_brace): Likewise.
11405 (pp_c_left_bracket): Likewise.
11406 (pp_c_right_bracket): Likewise.
11407 (pp_c_dot): Likewise.
11408 (pp_c_ampersand): Likewise.
11409 (pp_c_star): Likewise.
11410 (pp_c_arrow): Likewise.
11411 (pp_c_semicolon): Likewise.
11412 (pp_c_complement): Likewise.
11413 (pp_c_exclamation): Likewise.
11414 (pp_c_direct_declarator): Likewise.
11415 (pp_c_ws_string): Likewise.
11416 (pp_c_identifier): Likewise.
11417 (pp_c_statement): Likewise.
11418 (print_c_tree): Likewise.
11419
11420 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11421
11422 PR c++/58072
11423 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11424 provide useful error strings.
11425
11426 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11427
11428 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11429 printer functions instead of pp_string or operators and punctuators.
11430 (dump_generic_ada_node): Likewise.
11431 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11432 (pp_c_relational_expression): Likewise.
11433 (pp_c_logical_or_expression): Likewise.
11434
11435 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11436
11437 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11438 functions instead of pp_character.
11439 (pp_ada_tree_identifier): Likewise.
11440 (dump_ada_double_name): Likewise.
11441 (dump_ada_function_declaration): Likewise.
11442 (dump_ada_array_domains): Likewise.
11443 (dump_template_types): Likewise.
11444 (dump_generic_ada_node): Likewise.
11445 (print_ada_declaration): Likewise.
11446 (print_ada_struct_decl): Likewise.
11447 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11448
11449 2013-07-23 Tom Tromey <tromey@redhat.com>
11450
11451 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11452 * c-common.c (c_common_reswords): Add _Generic.
11453
11454 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11455
11456 * c-common.c: Fix typos.
11457 * c-common.h: Likewise.
11458
11459 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11460
11461 PR c++/55203
11462 * c-common.c (c_common_attribute_table): Add warn_unused.
11463 (handle_warn_unused_attribute): New.
11464
11465 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11466
11467 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11468 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11469
11470 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11471
11472 PR c++/57869
11473 * c.opt: Add Wconditionally-supported.
11474
11475 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11476
11477 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11478 unused variables l_length and l_node.
11479
11480 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11481
11482 PR c/57821
11483 * c-common.c (complete_array_type): Delay folding first index
11484 like other indices. When folding, check for index overflow.
11485
11486 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11487
11488 PR c++/57509
11489 * c-common.h (c_build_vec_perm_expr): New complain argument.
11490 * c-common.c (c_build_vec_perm_expr): Likewise.
11491 Use save_expr also in C++.
11492
11493 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11494
11495 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11496 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11497 * c-opts.c (c_common_post_options): Likewise.
11498
11499 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11500
11501 * array-notation-common.c (length_mismatch_in_expr): Changed the
11502 parameter type's from a dynamic array to a vec_tree. Also removed
11503 the size parameters.
11504 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11505 the change above.
11506
11507 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11508
11509 * c-common.h (struct cilkplus_an_parts): New structure.
11510 (struct cilkplus_an_loop_parts): Likewise.
11511 (cilkplus_extract_an_triplets): New prototype.
11512 (fix_sec_implicit_args): Likewise.
11513 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11514 (fix_sec_implicit_args): Likewise.
11515
11516 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11517
11518 * array-notation-common.c (find_inv_trees): Removed an unwanted
11519 typecasting.
11520 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11521 enum rid to enum tree_code.
11522
11523 2013-06-11 Jan Hubicka <jh@suse.cz>
11524
11525 * c-common.c (handle_alias_ifunc_attribute): Do not set
11526 DECL_EXTERNAL for weakref variables.
11527 * c-pragma.c (handle_pragma_weak): Make sure aliases
11528 are not declared as external.
11529
11530 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11531
11532 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11533 function from c/c-array-notation.c.
11534 (is_cilkplus_reduce_builtin): Likewise.
11535 (find_rank): Likewise.
11536 (extract_array_notation_exprs): Likewise.
11537 (replace_array_notations): Likewise.
11538 (find_inv_trees): Likewise.
11539 (replace_inv_trees): Likewise.
11540 (contains_array_notation_expr): Likewise.
11541 (find_correct_array_notation_type): Likewise.
11542 * c-common.h (struct inv_list): Moved this struct from the file
11543 c/c-array-notation.c and added a new field called additional tcodes.
11544 (length_mismatch_in_expr_p): New prototype.
11545 (is_cilkplus_reduce_builtin): Likewise.
11546 (find_rank): Likewise.
11547 (extract_array_notation_exprs): Likewise.
11548 (replace_array_notation): Likewise.
11549 (find_inv_trees): Likewise.
11550 (replace_inv_trees): Likewise.
11551 (find_correct_array_notation_type): Likewise.
11552
11553 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11554
11555 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11556 function array_notation_init_builtins is called.
11557 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11558 * c-common.def (ARRAY_NOTATION_REF): New tree.
11559 * c-common.h (build_array_notation_expr): New function declaration.
11560 (build_array_notation_ref): Likewise.
11561 (extract_sec_implicit_index_arg): New extern declaration.
11562 (is_sec_implicit_index_fn): Likewise.
11563 (ARRAY_NOTATION_CHECK): New define.
11564 (ARRAY_NOTATION_ARRAY): Likewise.
11565 (ARRAY_NOTATION_START): Likewise.
11566 (ARRAY_NOTATION_LENGTH): Likewise.
11567 (ARRAY_NOTATION_STRIDE): Likewise.
11568 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11569 ARRAY_NOTATION_REF.
11570 (pp_c_expression): Likewise.
11571 * c.opt (flag_enable_cilkplus): New flag.
11572 * array-notation-common.c: New file.
11573
11574 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11575
11576 PR c++/57274
11577 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11578
11579 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11580
11581 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11582 vectors.
11583
11584 2013-05-07 Han Shen <shenhan@google.com>
11585
11586 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11587
11588 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11589
11590 * c-common.c (check_user_alignment): Emit error for negative values.
11591
11592 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11593
11594 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11595
11596 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11597
11598 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11599 __GXX_EXPERIMENTAL_CXX1Y__.
11600
11601 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11602 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11603
11604 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11605 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11606 to simply use OPT_Wpointer_arith.
11607 (c_sizeof_or_alignof_type): Likewise.
11608
11609 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11610
11611 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11612
11613 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11614
11615 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11616 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11617 specifiers.
11618
11619 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11620
11621 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11622
11623 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11624
11625 * c-common.c (pointer_int_sum): Remove dead code.
11626
11627 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11628
11629 PR middle-end/56524
11630 * c-common.c (handle_optimize_attribute): Don't call
11631 save_optabs_if_changed.
11632
11633 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11634
11635 PR middle-end/56461
11636 * c-pch.c (pch_init): Free target_validity at the end.
11637
11638 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11639
11640 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11641
11642 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11643 Jakub Jelinek <jakub@redhat.com>
11644
11645 PR sanitizer/56454
11646 * c-common.c (handle_no_sanitize_address_attribute): New function.
11647 (c_common_attribute_table): Add no_sanitize_address attribute.
11648 (handle_no_address_safety_analysis_attribute): Add
11649 no_sanitize_address attribute, not no_address_safety_analysis
11650 attribute.
11651
11652 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11653
11654 PR target/52555
11655 * c-common.c (handle_optimize_attribute): Call
11656 save_optabs_if_changed.
11657
11658 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11659 Steven Bosscher <steven@gcc.gnu.org>
11660
11661 PR pch/54117
11662 * c-opts.c (c_common_post_options): If debug info is enabled
11663 and non-dwarf*, refuse to load PCH files and when writing PCH
11664 file warn.
11665
11666 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11667
11668 PR middle-end/56167
11669 * c-common.c (handle_error_attribute): Fix condition.
11670
11671 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11672
11673 PR c++/55742
11674 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11675
11676 2013-01-18 Jason Merrill <jason@redhat.com>
11677
11678 PR target/54908
11679 * c.opt (-fextern-tls-init): New.
11680 * c-opts.c (c_common_post_options): Handle it.
11681
11682 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11683
11684 PR c/48418
11685 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11686 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11687 and is either negative or bigger or equal to type precision
11688 of the first operand.
11689
11690 2012-12-03 Marek Polacek <polacek@redhat.com>
11691
11692 PR c/55570
11693 * c-common.c (check_user_alignment): Swap order of tests,
11694 check TREE_CODE first.
11695
11696 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11697
11698 PR c++/52654
11699 * c-common.h (overflow_type): New enum.
11700 (build_userdef_literal): Add overflow_type argument.
11701 (tree_userdef_literal): Add overflow_type.
11702 (USERDEF_LITERAL_OVERFLOW): New access macro.
11703 * c-common.c (build_userdef_literal): Add overflow_type
11704 argument.
11705 * c-lex.c (c_lex_with_flags): Add overflow_type to
11706 build_userdef_literal calls.
11707 (interpret_integer, interpret_float): Add overflow_type argument.
11708
11709 2012-11-28 Richard Biener <rguenther@suse.de>
11710
11711 PR c/35634
11712 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11713 here and use a type with proper overflow behavior for types that would
11714 need to be promoted for the arithmetic.
11715
11716 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11717
11718 PR sanitizer/55435
11719 * c-common.c (handle_no_address_safety_analysis_attribute): New
11720 function.
11721 (c_common_attribute_table): Add no_address_safety_analysis.
11722
11723 2012-11-16 Simon Baldwin <simonb@google.com>
11724
11725 * c.opt: Add f[no-]canonical-system-headers.
11726 * c-opts.c (c_common_handle_option): Handle
11727 OPT_fcanonical_system_headers.
11728
11729 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11730
11731 PR c++/54413
11732 * c-opts.c (c_common_handle_option): Set new flags.
11733 * c.opt: Describe new flags.
11734
11735 2012-11-09 Jason Merrill <jason@redhat.com>
11736
11737 * c.opt (Wabi-tag): New.
11738
11739 2012-11-09 Andi Kleen <ak@linux.intel.com>
11740
11741 PR 55139
11742 * c-common.c (get_atomic_generic_size): Mask with
11743 MEMMODEL_MASK
11744
11745 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11746
11747 PR c/53063
11748 * c.opt (Wformat): Make it Alias Wformat=1.
11749 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11750 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11751 LangEnabledBy.
11752 (Wformat=): RejectNegative. Use LangEnabledBy.
11753 (Wnonnull): Use LangEnabledBy.
11754 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11755 * c-format.c (set_Wformat): Delete.
11756 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11757 (maybe_read_dollar_number): Likewise.
11758 (avoid_dollar_number): Likewise.
11759 (finish_dollar_format_checking): Likewise.
11760 (check_format_info): Likewise.
11761 (check_format_info_main): Likewise.
11762 (check_format_types): Likewise.
11763 (format_type_warning): Likewise.
11764 * c-common.c (int): Likewise.
11765 (check_function_sentinel): Likewise.
11766 * c-common.h (warn_format,set_Wformat): Do not declare here.
11767
11768 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11769
11770 PR c/53063
11771 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11772 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11773 Use LangEnabledBy.
11774 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11775 common.opt.
11776 (Wvariadic-macros): Init(1).
11777 * c-opts.c (c_common_handle_option): Do not handle them
11778 explicitly.
11779 (c_common_post_options): Likewise.
11780 (sanitize_cpp_opts): warn_unused_macros is now
11781 cpp_warn_unused_macros.
11782 (push_command_line_include): Likewise.
11783 * c-common.c (warn_unknown_pragmas): Do not define.
11784 * c-common.h (warn_unknown_pragmas): Do not declare.
11785
11786 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11787
11788 PR c/51294
11789 * c-common.c (conversion_warning): Handle conditional expressions.
11790
11791 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11792
11793 PR c++/54930
11794 * c.opt (Wreturn_local_addr): Define new option.
11795
11796 2012-10-25 Jason Merrill <jason@redhat.com>
11797
11798 * c.opt (Wvirtual-move-assign): New.
11799
11800 * c.opt (Winherited-variadic-ctor): New.
11801
11802 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11803
11804 PR c++/54427
11805 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11806
11807 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11808
11809 * c-common.h (pch_cpp_save_state): Declare.
11810 * c-target.def (c_preinclude): New hook.
11811 * c-opts.c (done_preinclude): New.
11812 (push_command_line_include): Handle default preincluded header.
11813 (cb_file_change): Call pch_cpp_save_state when calling
11814 push_command_line_include.
11815 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11816 (pch_cpp_save_state): New.
11817 (pch_init): Call pch_cpp_save_state conditionally, instead of
11818 calling cpp_save_state.
11819
11820 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11821
11822 PR c/53063
11823 PR c/40989
11824 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11825 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11826 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11827 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11828 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11829 * c-opts.c (c_common_handle_option): Remove explicit handling from
11830 here.
11831 (c_common_post_options): Likewise.
11832
11833 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11834
11835 * c-ada-spec.c (LOCATION_COL): Delete.
11836 (compare_location): New function.
11837 (compare_node): Use it.
11838 (compare_comment): Likewise.
11839
11840 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11841
11842 PR c/53063
11843 PR c/40989
11844 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11845 * c-opts.c (c_common_handle_option): Do not set them here. Add
11846 comment.
11847 (c_common_post_options): Likewise.
11848
11849 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11850
11851 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11852 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11853 Remove POINTER_TYPE handling, add large unsigned handling and use
11854 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11855
11856 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11857
11858 PR c/54381
11859 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11860 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11861 locs and array of 3 trees instead of just single loc and single
11862 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11863 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11864 For *cmp* builtins that take two sources strings report warnings
11865 about first and second source, not about destination and source.
11866
11867 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11868
11869 PR c++/53055
11870 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11871
11872 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11873
11874 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11875 declaring something coming from another file.
11876
11877 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11878
11879 PR ada/54845
11880 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11881
11882 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11883
11884 PR c++/54194
11885 * c-common.c (warn_about_parentheses): Add location_t parameter;
11886 use EXPR_LOC_OR_LOC.
11887 * c-common.h: Update declaration.
11888
11889 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11890
11891 PR c++/54427
11892 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11893 more operations. Make error messages optional.
11894 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11895 (scalar_to_vector): Declare.
11896
11897 2012-10-08 Jason Merrill <jason@redhat.com>
11898
11899 * c-common.c (c_common_reswords): Add thread_local.
11900
11901 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11902
11903 PR c++/53528 C++11 attribute support
11904 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11905 new functions.
11906 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11907 static function.
11908 (handle_aligned_attribute): In choose strictest alignment
11909 among many. Use new check_cxx_fundamental_alignment_constraints.
11910 (handle_transparent_union_attribute): In c++11 attribute syntax,
11911 don't look through typedefs.
11912
11913 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11914
11915 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11916 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11917 out of dumpfile.h.
11918
11919 2012-09-25 Dehao Chen <dehao@google.com>
11920
11921 PR middle-end/54645
11922 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11923 map when read in the pch.
11924
11925 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11926
11927 * c-ada-spec.c: Style fixes.
11928
11929 2012-09-18 Thomas Quinot <quinot@adacore.com>
11930
11931 * c.opt (-fada-spec-parent): Define new command line switch.
11932 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11933 is specified, generate binding spec as a child of the specified unit.
11934
11935 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11936 Manuel López-Ibáñez <manu@gcc.gnu.org>
11937
11938 PR c++/53210
11939 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11940
11941 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11942
11943 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11944 for pointers, and add missing Convention C pragma.
11945 (print_ada_struct_decl): Add missing aliased keyword.
11946 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11947
11948 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11949
11950 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11951 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11952 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11953 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11954 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11955
11956 2012-08-10 Richard Guenther <rguenther@suse.de>
11957
11958 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11959
11960 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11961
11962 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11963 instead of separate pp_newline and pp_flush.
11964 (print_c_tree): Likewise.
11965
11966 2012-07-26 Richard Henderson <rth@redhat.com>
11967
11968 * c-common.c (handle_hot_attribute): Allow labels.
11969 (handle_cold_attribute): Likewise.
11970
11971 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11972
11973 PR c++/28656
11974 * c-common.c (check_function_nonnull): Handle multiple nonnull
11975 attributes properly.
11976
11977 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11978
11979 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11980 * c-ada-spec.c: Likewise.
11981 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11982
11983 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11984
11985 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11986 Remove code conditional on it.
11987
11988 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11989
11990 * c-gimplify.c: Do not include basic-block.h.
11991 * c-common.c: Do not include linfuncs.h.
11992
11993 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11994
11995 * c-common.h: Include tree.h.
11996
11997 2012-07-02 Jason Merrill <jason@redhat.com>
11998
11999 PR c++/53524
12000 * c-common.c (get_priority): Call default_conversion.
12001
12002 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
12003
12004 * c-pch.c (c_common_write_pch): Remove unused variables.
12005
12006 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12007
12008 * cppspec.c: Moved from gcc/ to here.
12009
12010 2012-06-27 Kai Tietz <ktietz@redhat.com>
12011
12012 PR preprocessor/37215
12013 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12014
12015 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12016
12017 * c-common.h (c_common_print_pch_checksum): Remove.
12018 * c-pch.c: Do not include output.h.
12019 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12020 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12021 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12022 (struct c_pch_header): Remove.
12023 (get_ident): Update gpch version.
12024 (pch_init): Do not print executable_checksum to asm_out_file.
12025 Do not fail if there is no asm_out_file to read back from. Set
12026 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12027 (c_common_write_pch): Verify that nothing was written to asm_out_file
12028 since pch_init was called. Do not write a c_pch_header, and do not
12029 copy from asm_out_file to the PCH.
12030 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12031 the content of asm_out_file from the PCH.
12032 (c_common_print_pch_checksum): Remove.
12033 * c-opts.c (c_common_init): Print out executable_checksum directly.
12034
12035 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12036
12037 * c-target.def (objc_declare_unresolved_class_reference,
12038 objc_declare_class_definition): Add new hooks.
12039
12040 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12041
12042 * c-lex.c: Do not include output.h.
12043 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12044 Remove uses of ASM_OUTPUT_IDENT.
12045
12046 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
12047
12048 PR c++/51033
12049 * c-common.h (c_build_vec_perm_expr): Move decl here.
12050 * c-common.c (c_build_vec_perm_expr): Move definition
12051 here.
12052
12053 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12054
12055 * c.opt (fconserve-space): Turn into a no-op.
12056
12057 2012-06-04 Sterling Augustine <saugustine@google.com>
12058
12059 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12060 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12061 both the start and end of the function.
12062
12063 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12064
12065 * c-common.c: Do not include output.h.
12066 * c-pragma.c: Likewise.
12067
12068 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12069
12070 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12071 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12072 (lang_decl_name): Handle namespace decls.
12073
12074 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12075
12076 * c-ada-spec.c: Do not include output.h.
12077 * c-semantics.c: Likewise.
12078
12079 2012-05-29 Joseph Myers <joseph@codesourcery.com>
12080
12081 * c-common.c: Fix typo.
12082
12083 2012-05-29 Michael Matz <matz@suse.de>
12084
12085 * c-common.h (c_expand_decl): Remove prototype.
12086
12087 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12088
12089 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12090 * c-opts.c (c_common_handle_option): Remove code handling
12091 warn_missing_braces.
12092
12093 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12094
12095 PR c++/25137
12096 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12097 -Wmissing_braces.
12098
12099 2012-05-22 Dodji Seketeli <dodji@redhat.com>
12100
12101 PR c++/53322
12102 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12103
12104 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12105
12106 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12107 * c-opts.c (c_common_handle_option): Do not handle explicitly
12108 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12109
12110 2012-05-16 Dodji Seketeli <dodji@redhat.com>
12111
12112 PR preprocessor/7263
12113 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
12114 to cpp_classify_number. For diagnostics, use the precise location
12115 instead of the global input_location.
12116
12117 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12118
12119 PR c++/11856
12120 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12121
12122 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12123
12124 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
12125
12126 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12127
12128 PR 53063
12129 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12130 Wreorder): Use LangEnabledBy.
12131 * c-opts.c (c_common_handle_option): Do not enable them
12132 explicitly. Call lang-specific generated functions.
12133 (c_common_post_options): Do not set them here.
12134
12135 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12136
12137 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12138 Wmissing-field-initializers,Wmissing-parameter-type,
12139 Wold-style-declaration,Woverride-init): Use EnabledBy.
12140 * c-opts.c (c_common_post_options): Do not set here explicitly.
12141
12142 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12143
12144 PR 53063
12145 * c-opts.c (c_common_handle_option): Use handle_generated_option
12146 to enable sub-options.
12147
12148 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12149
12150 PR c++/53158
12151 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12152
12153 2012-05-10 Richard Guenther <rguenther@suse.de>
12154
12155 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12156 adjust commentary about TYPE_IS_SIZETYPE types.
12157
12158 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12159
12160 PR c++/53261
12161 * c-common.c (warn_logical_operator): Check that argument of
12162 integer_zerop is not NULL.
12163
12164 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12165
12166 PR c/43772
12167 * c-common.c (warn_logical_operator): Do not warn if either side
12168 is already true or false.
12169
12170 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12171
12172 PR c/51712
12173 * c-common.c (expr_original_type): New.
12174 (shorten_compare): Do not warn for enumeration types.
12175
12176 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12177
12178 * c.opt (fpermissive): Add Var(flag_permissive).
12179
12180 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
12181
12182 PR c++/51033
12183 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12184 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12185
12186 2012-04-30 Dodji Seketeli <dodji@redhat.com>
12187
12188 Add -Wvarargs option
12189 * c.opt (Wvarargs): Define new option.
12190
12191 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12192
12193 * c-common.c (check_function_arguments): Replace
12194 Wmissing-format-attribute with Wsuggest-attribute=format.
12195
12196 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12197
12198 * c.opt (Wsuggest-attribute=format): New. Alias of
12199 Wmissing-format-attribute.
12200 * c-format.c (decode_format_type): Replace
12201 Wmissing-format-attribute with Wsuggest-attribute=format.
12202 (check_function_format): Likewise.
12203
12204 2012-04-27 Ollie Wild <aaw@google.com>
12205
12206 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12207 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12208 * c.opt: Add Wliteral-suffix.
12209
12210 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12211
12212 PR c/44774
12213 * c.opt (Wpedantic): New.
12214 (pedantic): Alias Wpedantic.
12215 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12216 (c_common_post_options): Likewise.
12217 (sanitize_cpp_opts): Likewise.
12218 * c-lex.c (interpret_float): Likewise.
12219 * c-format.c (check_format_types): Likewise.
12220 * c-common.c (pointer_int_sum): Likewise.
12221 (c_sizeof_or_alignof_type): Likewise.
12222 (c_add_case_label): Likewise.
12223 (c_do_switch_warnings): Likewise.
12224 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12225
12226 2012-04-15 Jason Merrill <jason@redhat.com>
12227
12228 PR c++/52818
12229 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12230 (C_STD_NAME): Distinguish between C++98 and C++11.
12231
12232 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12233
12234 PR target/52624
12235 * c-common.h (uint16_type_node): Rename into...
12236 (c_uint16_type_node): ...this.
12237 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12238 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12239
12240 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12241
12242 * c-common.c (warn_if_unused_value): Move definition to here.
12243 * c-common.h (warn_if_unused_value): Move declaration to here.
12244
12245 2012-03-23 William Bader <williambader@hotmail.com>
12246
12247 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12248
12249 2012-03-20 Jason Merrill <jason@redhat.com>
12250
12251 * c-common.h (enum cxx_dialect): Add cxx1y.
12252 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12253 test.
12254 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12255 * c-opts.c (c_common_post_options): Likewise.
12256 (set_std_cxx1y): New.
12257 (c_common_handle_option): Call it.
12258 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12259
12260 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12261
12262 PR c++/14710
12263 * c.opt ([Wuseless-cast]): Add.
12264
12265 2012-03-16 Richard Guenther <rguenther@suse.de>
12266
12267 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12268
12269 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12270
12271 PR c++/44783
12272 * c.opt (ftemplate-backtrace-limit) Add.
12273
12274 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12275
12276 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12277 handling.
12278 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12279 (init_pragma): Don't register extern_prefix.
12280
12281 2012-03-12 Richard Guenther <rguenther@suse.de>
12282
12283 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12284 (builtin_type_for_size): Likewise.
12285
12286 2012-02-13 Jakub Jelinek <jakub@redhat.com>
12287
12288 PR c++/52215
12289 * c-common.c (sync_resolve_params): Don't decide whether to convert
12290 or not based on TYPE_SIZE comparison, convert whenever arg_type
12291 is unsigned INTEGER_TYPE.
12292
12293 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12294
12295 PR c/52118
12296 * c.opt ([Wunused-local-typedefs]): Fix description.
12297
12298 2012-01-24 Mike Stump <mikestump@comcast.net>
12299
12300 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12301 exactly.
12302
12303 2012-01-18 Richard Guenther <rguenther@suse.de>
12304
12305 * c-opts.c (c_common_post_options): Reset LTO flags if
12306 we are about to generate a PCH.
12307
12308 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12309
12310 PR c++/51777
12311 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12312 use pp_unsigned_wide_integer.
12313
12314 2012-01-10 Richard Guenther <rguenther@suse.de>
12315
12316 PR middle-end/51806
12317 * c-opts.c (c_common_handle_option): Move -Werror handling
12318 to language independent code.
12319
12320 2012-01-05 Richard Guenther <rguenther@suse.de>
12321
12322 PR middle-end/51764
12323 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12324 from common.opt.
12325
12326 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12327
12328 PR c++/51316
12329 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12330 of array types with an unknown bound.
12331
12332 2011-12-20 Joseph Myers <joseph@codesourcery.com>
12333
12334 * c-common.c (flag_isoc99): Update comment to refer to C11.
12335 (flag_isoc1x): Change to flag_isoc11.
12336 * c-common.h (flag_isoc99): Update comment to refer to C11.
12337 (flag_isoc1x): Change to flag_isoc11.
12338 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12339 C11.
12340 * c-opts.c (set_std_c1x): Change to set_std_c11.
12341 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12342 Call set_std_c11.
12343 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12344 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12345 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12346 standard.
12347 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12348 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12349 (std=gnu1x): Make alias of std=gnu11.
12350
12351 2011-12-19 Jason Merrill <jason@redhat.com>
12352
12353 PR c++/51228
12354 * c-common.c (handle_transparent_union_attribute): Check the first
12355 field if the type is complete.
12356
12357 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12358
12359 PR libstdc++/51365
12360 * c-common.c (RID_IS_FINAL): Add.
12361 * c-common.h (RID_IS_FINAL): Add.
12362
12363 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12364
12365 * c.opt (fgnu-runtime): Provide full description.
12366 (fnext-runtime): Likewise.
12367 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12368
12369 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
12370
12371 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12372 predefines in one place. Add LOCK_FREE predefines.
12373 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12374 new func.
12375
12376 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
12377
12378 PR c/51256
12379 * c-common.c (get_atomic_generic_size): Check for various error
12380 conditions
12381 (resolve_overloaded_atomic_exchange,
12382 resolve_overloaded_atomic_compare_exchange,
12383 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12384 error_mark_node for error conditions.
12385
12386 2011-11-08 Richard Guenther <rguenther@suse.de>
12387
12388 PR middle-end/51010
12389 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
12390
12391 2011-11-07 Richard Henderson <rth@redhat.com>
12392 Aldy Hernandez <aldyh@redhat.com>
12393 Torvald Riegel <triegel@redhat.com>
12394
12395 Merged from transactional-memory.
12396
12397 * c-common.c (handle_tm_wrap_attribute,
12398 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12399 (struct c_common_reswords): Added __transaction* keywords.
12400 (struct c_common_attribute_table): Added transaction* and tm_regparm
12401 attributes.
12402 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12403 masks.
12404 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12405 find_tm_attribute): Declare.
12406
12407 2011-11-07 Jason Merrill <jason@redhat.com>
12408
12409 PR c++/35688
12410 * c-common.c, c-common.h: Revert yesterday's changes.
12411
12412 2011-11-06 Jason Merrill <jason@redhat.com>
12413
12414 PR c++/35688
12415 * c-common.c (decl_has_visibility_attr): Split out from...
12416 (c_determine_visibility): ...here.
12417 * c-common.h: Declare it.
12418
12419 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12420
12421 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12422 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12423 type.
12424 (check_user_alignment): New. Split out of
12425 handle_aligned_attribute. Disallow integer constants with
12426 noninteger types. Conditionally allow zero.
12427 (handle_aligned_attribute): Use check_user_alignment.
12428 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12429
12430 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12431 Richard Henderson <rth@redhat.com>
12432
12433 Merged from cxx-mem-model.
12434
12435 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12436 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12437 parameters that are the same type size.
12438 (get_atomic_generic_size): New. Find size of generic
12439 atomic function parameters and do typechecking.
12440 (add_atomic_size_parameter): New. Insert size into parameter list.
12441 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12442 either __atomic_exchange_n or external library call.
12443 (resolve_overloaded_atomic_compare_exchange): Restructure
12444 __atomic_compare_exchange to either _n variant or external library call.
12445 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12446 __atomic_load_n or an external library call.
12447 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12448 __atomic_store_n or an external library call.
12449 (resolve_overloaded_builtin): Handle new __atomic builtins.
12450
12451 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12452
12453 PR c++/50608
12454 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12455 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12456 <INDIRECT_REF>: Return the argument.
12457 <ARRAY_REF>: Remove special code for negative offset.
12458 Call fold_build_pointer_plus instead of size_binop.
12459 (fold_offsetof): Remove STOP_REF argument and adjust.
12460 * c-common.h (fold_offsetof_1): Declare.
12461 (fold_offsetof): Remove STOP_REF argument.
12462
12463 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12464
12465 PR c++/50810
12466 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12467 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12468 Wnarrowing for C++0x and C++98.
12469 * c.opt ([Wnarrowing]): Update.
12470
12471 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12472
12473 PR c++/44277
12474 * c.opt: Add Wzero-as-null-pointer-constant.
12475
12476 2011-10-31 Jason Merrill <jason@redhat.com>
12477
12478 * c.opt (-fdeduce-init-list): Off by default.
12479
12480 PR c++/50920
12481 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12482 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12483 and -Wc++11-compat.
12484 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12485
12486 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12487
12488 PR c++/30066
12489 * c.opt (fvisibility-inlines-hidden): Description change.
12490
12491 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12492
12493 Implement C++11 user-defined literals.
12494 * c-common.c (build_userdef_literal): New.
12495 * c-common.def: New tree code.
12496 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12497 * c-lex.c (interpret_float): Add suffix parm.
12498 (c_lex_with_flags): Build literal tokens.
12499
12500 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12501
12502 PR c++/50841
12503 Revert:
12504 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12505
12506 PR c++/50810
12507 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12508 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12509 Wnarrowing for C++0x and C++98.
12510 * c.opt ([Wnarrowing]): Update.
12511
12512 2011-10-23 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
12520 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12521
12522 PR c++/45385
12523 * c-common.c (conversion_warning): Remove code looking for
12524 artificial operands.
12525
12526 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12527
12528 PR bootstrap/50760
12529 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12530 !NO_IMPLICIT_EXTERN_C.
12531
12532 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12533
12534 * c-common.c (c_common_reswords): Add __bases,
12535 __direct_bases.
12536 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12537
12538 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12539
12540 PR c++/50757
12541 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12542
12543 2011-10-15 Tom Tromey <tromey@redhat.com>
12544 Dodji Seketeli <dodji@redhat.com>
12545
12546 * c.opt (fdebug-cpp): New option.
12547 * c-opts.c (c_common_handle_option): Handle the option.
12548 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12549 output stream in parameter. Factorized from ...
12550 (maybe_print_line): ... this. Dump location debug information when
12551 -fdebug-cpp is in effect.
12552 (print_line_1): New static function. Takes an output stream in
12553 parameter. Factorized from ...
12554 (print_line): ... here. Dump location information when -fdebug-cpp
12555 is in effect.
12556 (scan_translation_unit): Dump location information when
12557 -fdebug-cpp is in effect.
12558
12559 2011-10-15 Tom Tromey <tromey@redhat.com>
12560 Dodji Seketeli <dodji@redhat.com>
12561
12562 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12563 without argument.
12564 * c-opts.c (c_common_handle_option)<case
12565 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12566 cases. Handle -ftrack-macro-expansion with and without argument.
12567
12568 2011-10-15 Tom Tromey <tromey@redhat.com>
12569 Dodji Seketeli <dodji@redhat.com>
12570
12571 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12572 (print_line, cb_define, do_line_change): Adjust to avoid touching
12573 the internals of struct line_map. Use the public API instead.
12574 * c-pch.c (c_common_read_pch): Likewise.
12575 * c-lex.c (fe_file_change): Likewise.
12576
12577 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12578
12579 PR c++/17212
12580 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12581
12582 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12583
12584 PR c++/33067
12585 * c-pretty-print.c (pp_c_floating_constant): Output
12586 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12587
12588 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12589
12590 * c-common.c (def_builtin_1): Delete old interface with two
12591 parallel arrays to hold standard builtin declarations, and replace
12592 it with a function based interface that can support creating
12593 builtins on the fly in the future. Change all uses, and poison
12594 the old names. Make sure 0 is not a legitimate builtin index.
12595 * c-omp.c (c_finish_omp_barrier): Ditto.
12596 (c_finish_omp_taskwait): Ditto.
12597 (c_finish_omp_flush): Ditto.
12598
12599 2011-10-11 Tristan Gingold <gingold@adacore.com>
12600
12601 * c.opt: (fallow-parameterless-variadic-functions): New.
12602
12603 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12604
12605 PR c++/33255 - Support -Wunused-local-typedefs warning
12606 * c-common.h (struct c_language_function::local_typedefs): New
12607 field.
12608 (record_locally_defined_typedef, maybe_record_typedef_use)
12609 (maybe_warn_unused_local_typedefs): Declare new functions.
12610 * c-common.c (record_locally_defined_typedef)
12611 (maybe_record_typedef_use)
12612 (maybe_warn_unused_local_typedefs): Define new functions.
12613 * c.opt: Declare new -Wunused-local-typedefs flag.
12614
12615 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12616
12617 PR middle-end/50266
12618 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12619 computations.
12620
12621 2011-09-05 Richard Guenther <rguenther@suse.de>
12622
12623 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12624 of integer_minus_one_node for empty array upper bounds.
12625
12626 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12627
12628 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12629 it's the first time it's being called on this main TU.
12630
12631 2011-08-24 Richard Guenther <rguenther@suse.de>
12632
12633 PR c/49396
12634 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12635
12636 2011-08-22 Gabriel Charette <gchare@google.com>
12637
12638 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12639 defined in cpp_init_builtins and c_cpp_builtins.
12640
12641 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12642
12643 * c-common.c (c_common_reswords): Add __builtin_complex.
12644 * c-common.h (RID_BUILTIN_COMPLEX): New.
12645
12646 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12647
12648 * c-common.c (c_common_reswords): Add _Noreturn.
12649 (keyword_is_function_specifier): Handle RID_NORETURN.
12650 * c-common.h (RID_NORETURN): New.
12651
12652 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12653
12654 * c-common.c (unsafe_conversion_p): New function. Check if it is
12655 unsafe to convert an expression to the type.
12656 (conversion_warning): Adjust, use unsafe_conversion_p.
12657 * c-common.h (unsafe_conversion_p): New function declaration.
12658
12659 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12660
12661 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12662 (c_finish_omp_taskyield): New prototype.
12663 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12664 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12665 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12666 or RHS1 have side-effects, evaluate those too in the right spot,
12667 if it is a decl and LHS is also a decl, error out if they
12668 aren't the same.
12669 (c_finish_omp_taskyield): New function.
12670 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12671 * c-pragma.c (omp_pragmas): Add taskyield.
12672 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12673 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12674 PRAGMA_OMP_CLAUSE_MERGEABLE.
12675
12676 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12677
12678 * c-common.h (set_underlying_type): Remove parm name from
12679 declaration.
12680
12681 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12682
12683 * c-pretty-print.h: Search c-common.h in c-family.
12684
12685 2011-07-22 Jason Merrill <jason@redhat.com>
12686
12687 PR c++/49793
12688 * c.opt (Wnarrowing): New.
12689
12690 PR c++/30112
12691 * c-common.h: Declare c_linkage_bindings.
12692 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12693
12694 PR c++/49813
12695 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12696 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12697 as flag_isoc99 for 'restrict'.
12698 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12699
12700 2011-07-21 Ian Lance Taylor <iant@google.com>
12701
12702 PR middle-end/49705
12703 * c-common.c (c_disable_warnings): New static function.
12704 (c_enable_warnings): New static function.
12705 (c_fully_fold_internal): Change local unused_p to bool. Call
12706 c_disable_warnings and c_enable_warnings rather than change
12707 c_inhibit_evaluation_warnings.
12708
12709 2011-07-20 Jason Merrill <jason@redhat.com>
12710
12711 PR c++/6709 (DR 743)
12712 PR c++/42603 (DR 950)
12713 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12714 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12715 (CPP_DECLTYPE): New.
12716 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12717
12718 2011-07-19 Richard Guenther <rguenther@suse.de>
12719
12720 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12721 * c-omp.c (c_finish_omp_for): Likewise.
12722
12723 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12724
12725 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12726 body on the next line.
12727
12728 2011-07-08 Jason Merrill <jason@redhat.com>
12729
12730 PR c++/45437
12731 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12732
12733 PR c++/49673
12734 * c-common.c (c_apply_type_quals_to_decl): Don't check
12735 TYPE_NEEDS_CONSTRUCTING.
12736
12737 2011-07-06 Richard Guenther <rguenther@suse.de>
12738
12739 * c-common.c (c_common_nodes_and_builtins):
12740 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12741
12742 2011-07-05 Richard Guenther <rguenther@suse.de>
12743
12744 * c-common.c (c_common_nodes_and_builtins): Build all common
12745 tree nodes first.
12746
12747 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12748
12749 * c-common.h (c_tree_chain_next): New static inline function.
12750
12751 * c-common.c (check_builtin_function_arguments): Handle
12752 BUILT_IN_ASSUME_ALIGNED.
12753
12754 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12755
12756 * c-common.c: Add sync_ or SYNC__ to builtin names.
12757 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12758
12759 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12760
12761 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12762 handler.
12763 (gen_pragma_handler): New union.
12764 (internal_pragma_handler): New type.
12765 (c_register_pragma_with_data)
12766 (c_register_pragma_with_expansion_and_data): New functions.
12767
12768 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12769 (c_register_pragma, c_register_pragma_with_expansion)
12770 (c_invoke_pragma_handler): Changed to work with
12771 internal_pragma_handler.
12772 (c_register_pragma_with_data)
12773 (c_register_pragma_with_expansion_and_data): New functions.
12774
12775 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12776
12777 * c-common.c: Include common/common-target.h.
12778 (handle_section_attribute): Use
12779 targetm_common.have_named_sections.
12780 * c-cppbuiltin.c: Include common/common-target.h.
12781 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12782
12783 2011-06-10 Richard Guenther <rguenther@suse.de>
12784
12785 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12786 to print a IDENTIFIER_NODE.
12787
12788 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12789 Joseph Myers <joseph@codesourcery.com>
12790
12791 * c.opt (fbuilding-libgcc): New option.
12792 * c-cppbuiltin.c (c_cpp_builtins): Define
12793 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12794
12795 2011-06-07 Jason Merrill <jason@redhat.com>
12796
12797 * c-common.c (max_tinst_depth): Lower default to 900.
12798
12799 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12800
12801 2011-06-07 Richard Guenther <rguenther@suse.de>
12802
12803 * c-common.c (c_common_nodes_and_builtins): Do not set
12804 size_type_node or call set_sizetype.
12805
12806 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12807
12808 PR debug/49130
12809 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12810 type when using pointer comparison to compare types.
12811
12812 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12813
12814 * c.opt: Add -Wdelete-non-virtual-dtor.
12815 * c-opts.c (c_common_handle_option): Include it in -Wall.
12816
12817 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12818
12819 PR bootstrap/49190
12820
12821 Revert:
12822 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12823
12824 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12825 not tree_common.
12826
12827 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12828
12829 PR c++/49165
12830 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12831 C++ don't call c_common_truthvalue_conversion on void type arms.
12832
12833 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12834
12835 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12836 (stmt_list_stack): Define.
12837 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12838 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12839
12840 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12841
12842 * c-common.c (warning_candidate_p): Check for BLOCKs.
12843
12844 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12845
12846 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12847 not tree_common.
12848
12849 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12850
12851 * c-common.c (def_fn_type): Remove extra va_end.
12852
12853 2011-05-23 Jason Merrill <jason@redhat.com>
12854
12855 PR c++/48106
12856 * c-common.c (c_common_get_narrower): New.
12857 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12858
12859 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12860
12861 * c-common.h (check_function_arguments): Tweak prototype of
12862 check_function_arguments.
12863 * c-common.c (check_function_arguments): Likewise. Adjust
12864 calls to check_function_nonnull, check_function_format, and
12865 check_function_sentinel.
12866 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12867 separate attributes and typelist arguments. Use
12868 FOREACH_FUNCTION_ARGS to iterate over argument types.
12869
12870 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12871
12872 * c-common.c (c_common_reswords): Reorder.
12873 * c-common.h (rid): Likewise.
12874
12875 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12876
12877 * c-common.c (def_fn_type): Don't call build_function_type, call
12878 build_function_type_array or build_varargs_function_type_array
12879 instead.
12880 (c_common_nodes_and_builtins): Likewise.
12881
12882 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12883
12884 * c-common.c (c_add_case_label): Omit the loc argument to
12885 build_case_label.
12886 * c-common.h (build_case_label): Remove.
12887 * c-semantics.c (build_case_label): Remove.
12888
12889 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12890
12891 * c-objc.h (objc_start_method_definition): Update prototype.
12892 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12893
12894 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12895
12896 * c-common.c (check_main_parameter_types): Reindent. Don't use
12897 TYPE_ARG_TYPES directly.
12898 (handle_nonnull_attribute): Likewise.
12899 (sync_resolve_params): Likewise.
12900 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12901 to check_format_string.
12902 (handle_format_attribute): Likewise.
12903 (check_format_string): Take a function type to examine instead of
12904 a type list. Use a function_arg_iterator to step through argument
12905 types.
12906
12907 2011-05-04 Richard Guenther <rguenther@suse.de>
12908
12909 * c-common.c (fix_string_type): Use size_int for index type bounds.
12910 (start_fname_decls): Do not pass NULL to build_int_cst.
12911 (c_init_attributes): Likewise.
12912 * c-lex.c (c_lex_with_flags): Likewise.
12913
12914 2011-04-27 Jason Merrill <jason@redhat.com>
12915
12916 * c-common.c (make_tree_vector_from_list): New.
12917 * c-common.h: Declare it.
12918
12919 2011-04-26 Richard Guenther <rguenther@suse.de>
12920
12921 PR preprocessor/48248
12922 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12923 for output size with -P.
12924
12925 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12926
12927 * c-common.c (struct c_common_resword): Add __underlying_type.
12928 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12929
12930 2011-04-20 Jim Meyering <meyering@redhat.com>
12931
12932 * c-format.c (init_dollar_format_checking): Remove useless
12933 if-before-free.
12934
12935 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12936
12937 * c-objc.h (objc_get_interface_ivars): Removed.
12938 (objc_detect_field_duplicates): New.
12939 * stub-objc.c: Likewise.
12940
12941 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12942
12943 * stub-objc.c (objc_declare_protocols): Renamed to
12944 objc_declare_protocol.
12945 * c-objc.h: Likewise.
12946
12947 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12948
12949 * stub-objc.c (objc_declare_class): Updated argument name.
12950
12951 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12952
12953 * c-common.h (c_common_init_ts): Declare.
12954 * c-common.c (c_common_init_ts): Define.
12955
12956 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12957
12958 * c-objc.h (objc_build_message_expr): Updated prototype.
12959 * stub-objc.c (objc_build_message_expr): Likewise.
12960
12961 2011-04-12 Martin Jambor <mjambor@suse.cz>
12962
12963 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12964 of cgraph_node.
12965
12966 2011-04-11 Richard Guenther <rguenther@suse.de>
12967
12968 * c-common.c (complete_array_type): Build a range type of
12969 proper type.
12970
12971 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12972
12973 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12974 (handle_type_generic_attribute): Likewise.
12975
12976 2011-04-07 Jason Merrill <jason@redhat.com>
12977
12978 PR c++/48450
12979 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12980 conversion from C++0x scoped enum.
12981
12982 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12983
12984 * c-target-def.h: New file.
12985 * c-target.def: New file.
12986 * c-target.h: New file.
12987 * c-common.c (targetcm): Don't define here.
12988 * c-common.h (default_handle_c_option): Declare.
12989 * c-format.c: Include c-target.h instead of target.h.
12990 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12991 include tm.h.
12992 (default_handle_c_option): Move from targhooks.c.
12993
12994 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12995
12996 PR preprocessor/48248
12997 * c-ppoutput.c (print): Add src_file field.
12998 (init_pp_output): Initialize it.
12999 (maybe_print_line): Don't optimize by adding up to 8 newlines
13000 if map->to_file and print.src_file are different file.
13001 (print_line): Update print.src_file.
13002
13003 2011-03-25 Kai Tietz <ktietz@redhat.com>
13004
13005 * c-ada-spec.c (compare_comment): Use filename_cmp
13006 instead of strcmp for filename.
13007
13008 2011-03-25 Jeff Law <law@redhat.com>
13009
13010 * c-common.c (def_fn_type): Add missing va_end.
13011
13012 2011-03-25 Jason Merrill <jason@redhat.com>
13013
13014 * c.opt: Add -std=c++03.
13015
13016 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13017
13018 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13019
13020 2011-03-17 Kai Tietz <ktietz@redhat.com>
13021
13022 PR target/12171
13023 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13024 Display allowed attributes for function pointer types.
13025 (pp_c_attributes_display): New function to display
13026 attributes having affects_type_identity flag set to true.
13027 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13028
13029 * c-common.c (c_common_attribute_table):
13030 Add new element.
13031 (c_common_format_attribute_table): Likewise.
13032
13033 2011-03-18 Jason Merrill <jason@redhat.com>
13034
13035 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13036 * c-common.h: Don't declare it here.
13037 * c-common.c: Or define it here.
13038 * c-opts.c (c_common_handle_option): Or set it here.
13039
13040 PR c++/35315
13041 * c-common.c (handle_transparent_union_attribute): Don't
13042 make a duplicate type in C++.
13043
13044 2011-03-15 Jason Merrill <jason@redhat.com>
13045
13046 * c-common.c (max_constexpr_depth): New.
13047 * c-common.h: Declare it.
13048 * c-opts.c (c_common_handle_option): Set it.
13049 * c.opt (fconstexpr-depth): New option.
13050
13051 2011-03-11 Jason Merrill <jason@redhat.com>
13052
13053 * c-common.c (attribute_takes_identifier_p): Add missing const.
13054
13055 PR c++/46803
13056 * c-common.c (attribute_takes_identifier_p): Assume that an
13057 unknown attribute takes an identifier.
13058
13059 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13060
13061 PR c/47786
13062 * c-common.c (c_type_hash): Call list_length instead of iterating
13063 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13064
13065 2011-02-19 Jakub Jelinek <jakub@redhat.com>
13066
13067 PR c/47809
13068 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13069
13070 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13071
13072 * c.opt (fobjc-abi-version=) New.
13073 (fobjc-nilcheck): New.
13074
13075 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13076
13077 PR c++/46890
13078 * c-common.h (keyword_is_decl_specifier): Declare.
13079 * c-common.c (keyword_is_decl_specifier): Define.
13080 (keyword_is_function_specifier): New function.
13081
13082 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13083
13084 PR c/47473
13085 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13086 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13087 REAL_TYPE.
13088
13089 2011-01-26 Arnaud Charlet <charlet@adacore.com>
13090
13091 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13092
13093 2011-01-26 Jakub Jelinek <jakub@redhat.com>
13094
13095 PR pch/47430
13096 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13097 after init_c_lex if pch_file is set.
13098
13099 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13100
13101 PR c++/43601
13102 * c.opt (-fkeep-inline-dllexport): New switch.
13103
13104 2011-01-12 Richard Guenther <rguenther@suse.de>
13105
13106 PR middle-end/32511
13107 * c-common.c (handle_weak_attribute): Warn instead of error
13108 on declaring an inline function weak.
13109
13110 2011-01-05 Tom Tromey <tromey@redhat.com>
13111
13112 * c-common.h (lvalue_error): Update.
13113 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13114 not error.
13115
13116 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
13117
13118 PR objc/47075
13119 * c-objc.h (objc_finish_message_expr): Added argument to
13120 prototype.
13121
13122 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13123
13124 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13125 Use prototype_p.
13126
13127 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13128
13129 * c-objc.h (objc_maybe_warn_exceptions): New.
13130 * stub-objc.c (objc_maybe_warn_exceptions): New.
13131
13132 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13133
13134 * c-common.h (readonly_error): Declare.
13135 * c-common.c (readonly_error): Define.
13136
13137 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13138
13139 * c-common.h (invalid_indirection_error): Declare.
13140 * c-common.c (invalid_indirection_error): Define.
13141
13142 2010-12-03 Richard Guenther <rguenther@suse.de>
13143
13144 PR c/46745
13145 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13146 (pp_c_unary_expression): Likewise.
13147 (pp_c_expression): Likewise.
13148
13149 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13150
13151 * c-common.h (objc_finish_function): New.
13152 (objc_non_volatilized_type): Removed.
13153 (objc_type_quals_match): Removed.
13154 * stub-objc.c (objc_finish_function): New.
13155 (objc_non_volatilized_type): Removed.
13156 (objc_type_quals_match): Removed.
13157
13158 2010-11-30 Joseph Myers <joseph@codesourcery.com>
13159
13160 * c-common.h (parse_optimize_options): Declare.
13161 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13162 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13163
13164 2010-11-29 Joseph Myers <joseph@codesourcery.com>
13165
13166 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13167 GET_ENVIRONMENT.
13168 * c-pch.c (O_BINARY): Don't define here.
13169 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13170
13171 2010-11-25 Joseph Myers <joseph@codesourcery.com>
13172
13173 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13174 targetm.except_unwind_info.
13175
13176 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13177
13178 * c-opts.c (c_common_handle_option): Pass location to
13179 set_struct_debug_option.
13180
13181 2010-11-23 Joseph Myers <joseph@codesourcery.com>
13182
13183 * c-common.c (visibility_options): Move from ../opts.c.
13184 * c-common.h (struct visibility_flags, visibility_options):
13185 Declare here.
13186 * c-opts.c (finish_options): Rename to c_finish_options.
13187 (c_common_init): Update call to finish_options.
13188
13189 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13190
13191 PR objc/34033
13192 * c-lex.c (lex_string): Check that each string in an Objective-C
13193 string concat sequence starts with either one or zero '@', and
13194 that there are no spurious '@' signs at the end.
13195
13196 2010-11-20 Joseph Myers <joseph@codesourcery.com>
13197
13198 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13199 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13200 HANDLE_PRAGMA_VISIBILITY.
13201 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13202 HANDLE_PRAGMA_VISIBILITY): Don't define.
13203 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13204
13205 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13206
13207 PR c++/16189
13208 PR c++/36888
13209 PR c++/45331
13210 * c-common.h (keyword_begins_type_specifier): Declare.
13211 (keyword_is_storage_class_specifier): Declare.
13212 (keyword_is_type_qualifier): Declare.
13213 * c-common.c (keyword_begins_type_specifier): New function.
13214 (keyword_is_storage_class_specifier): New function.
13215 (keyword_is_type_qualifier): Declare.
13216
13217 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13218
13219 PR c/46547
13220 * c-common.c (in_late_binary_op): Define.
13221 (c_common_truthvalue_conversion): Check in_late_binary_op before
13222 calling c_save_expr.
13223 * c-common.h (in_late_binary_op): Declare.
13224
13225 2010-11-19 Joseph Myers <joseph@codesourcery.com>
13226
13227 * c-opts.c (c_common_handle_option): Update calls to
13228 set_struct_debug_option.
13229
13230 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13231
13232 * c-common.h (objc_declare_protocols): Added additional argument.
13233 * stub-objc.c (objc_declare_protocol): Same change.
13234
13235 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13236
13237 PR c/33193
13238 * c-common.h (build_real_imag_expr): Declare.
13239 * c-semantics.c (build_real_imag_expr): Define.
13240
13241 2010-11-17 Joseph Myers <joseph@codesourcery.com>
13242
13243 * c-opts.c (c_common_parse_file): Take no arguments.
13244 * c-common.h (c_common_parse_file): Update prototype.
13245
13246 2010-11-16 Jakub Jelinek <jakub@redhat.com>
13247
13248 PR c++/46401
13249 * c-common.c (warning_candidate_p): Don't track non-const calls
13250 or STRING_CSTs.
13251
13252 2010-11-15 Ian Lance Taylor <iant@google.com>
13253
13254 * c-lex.c (init_c_lex): Set macro debug callbacks if
13255 flag_dump_go_spec is set.
13256
13257 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13258
13259 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13260 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13261
13262 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13263
13264 PR preprocessor/45038
13265 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13266 dialects.
13267
13268 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13269
13270 * c-common.h (c_family_lang_mask): Declare.
13271 * c-opts.c (c_family_lang_mask): Make extern.
13272 * c-pragma.c (handle_pragma_diagnostic): Use
13273 control_warning_option.
13274
13275 2010-11-12 Joseph Myers <joseph@codesourcery.com>
13276
13277 * c-common.c (parse_optimize_options): Update call to
13278 decode_options.
13279 * c-common.h (c_common_handle_option): Update prototype.
13280 * c-opts.c (c_common_handle_option): Take location_t parameter and
13281 pass it to other functions.
13282
13283 2010-11-11 Joseph Myers <joseph@codesourcery.com>
13284
13285 * c-opts.c (warning_as_error_callback): Remove.
13286 (c_common_initialize_diagnostics): Don't call
13287 register_warning_as_error_callback.
13288 (c_common_handle_option): Handle -Werror=normalized= here.
13289
13290 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13291
13292 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13293 in diagnostic.
13294 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13295 letter.
13296 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13297 Remove trailing '.' from diagnostics.
13298 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13299
13300 2010-11-10 Joseph Myers <joseph@codesourcery.com>
13301
13302 * c-common.c (parse_optimize_options): Pass global_dc to
13303 decode_options.
13304 * c-opts.c (c_common_handle_option): Pass &global_options to
13305 set_Wstrict_aliasing.
13306 * c.opt (v): Don't mark Common or document here.
13307
13308 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13309
13310 PR target/44981
13311 * c-format.c (format_type): New type gcc_objc_string_format_type.
13312 (valid_stringptr_type_p): New.
13313 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
13314 (check_format_string): Pass expected type, use
13315 valid_stringptr_type_p (), check that the format string types are
13316 consistent with the format specification.
13317 (decode_format_attr): Warn if NSString is used outside objective-c.
13318 (format_types_orig): Add NSString.
13319 (format_name): New.
13320 (format_flags): New.
13321 (check_format_arg): Handle format strings requiring an external parser.
13322 first_target_format_type: New variable.
13323 (handle_format_attribute): Set up first_target_format_type, pass the
13324 expected format arg string type to check_format_string().
13325 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
13326 * stub-objc.c (objc_string_ref_type_p): New.
13327 (objc_check_format_arg): New.
13328
13329 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13330
13331 Fixed using the Objective-C 2.0 dot-syntax with class names.
13332 * c-common.h (objc_build_class_component_ref): New.
13333 * stub-objc.c (objc_build_class_component_ref): New.
13334
13335 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13336
13337 * c.opt (Wproperty-assign-default): New option.
13338
13339 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13340
13341 Implemented -fobjc-std=objc1 flag.
13342 * c.opt (fobjc-std=objc1): New option.
13343
13344 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13345
13346 Implemented format and noreturn attributes for Objective-C methods.
13347 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13348 attribute for Objective-C methods.
13349
13350 2010-10-31 Jason Merrill <jason@redhat.com>
13351
13352 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13353 EXPR_LOC_OR_HERE.
13354
13355 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13356
13357 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13358 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13359 (objc_add_property_declaration): Removed arguments for copies and
13360 ivar.
13361 (objc_build_getter_call): Renamed to
13362 objc_maybe_build_component_ref.
13363 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13364 (objc_is_property_ref): New.
13365 * c-common.c (c_common_reswords): Removed copies and ivar.
13366 * stub-objc.c (objc_add_property_declaration): Removed arguments
13367 for copies and ivar.
13368 (objc_build_getter_call): Renamed to
13369 objc_maybe_build_component_ref.
13370 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13371 (objc_is_property_ref): New.
13372
13373 2010-10-29 Arnaud Charlet <charlet@adacore.com>
13374 Matthew Gingell <gingell@adacore.com>
13375
13376 * c-ada-spec.c (separate_class_package): New function.
13377 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13378 name of their enclosing package.
13379 (print_ada_declaration): Use separate_class_package.
13380
13381 2010-10-27 Jason Merrill <jason@redhat.com>
13382
13383 * c-common.c (c_common_reswords): Add __is_literal_type.
13384 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13385
13386 * c-common.c (check_case_value): Remove special C++ code.
13387
13388 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13389
13390 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13391 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13392 and RID_LAST_PATTR.
13393 (objc_add_property_declaration): Added additional arguments.
13394 (objc_property_attribute_kind): Removed.
13395 (objc_set_property_attr): Removed.
13396 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13397 copy and nonatomic.
13398 * stub-objc.c (objc_add_property_declaration): Added additional
13399 arguments.
13400 (objc_set_property_attr): Removed.
13401
13402 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13403
13404 * c-common.h (objc_add_property_variable): Renamed to
13405 objc_add_property_declaration. Added location argument.
13406 * stub-objc.c (objc_add_property_variable): Same change.
13407
13408 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13409
13410 * c-common.h (objc_maybe_printable_name): New.
13411 * stub-objc.c (objc_maybe_printable_name): New.
13412
13413 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13414 Andrew Pinski <pinskia@gmail.com>
13415
13416 * c-common.h (c_common_mark_addressable_vec): Declare.
13417 * c-common.c (c_common_mark_addressable_vec): New function.
13418
13419 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13420
13421 * c-common.h (objc_set_method_type): Removed.
13422 (objc_add_method_declaration): Added boolean argument.
13423 (objc_start_method_definition): Same change.
13424 (objc_build_method_signature): Same change.
13425 * stub-objc.c (objc_set_method_type): Removed.
13426 (objc_add_method_declaration): Added boolean argument.
13427 (objc_start_method_definition): Same change.
13428 (objc_build_method_signature): Same change.
13429
13430 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13431
13432 * c-common.h (finish_file): Removed.
13433 (objc_write_global_declarations): New.
13434 * c-opts.c (c_common_parse_file): Do not call finish_file.
13435 * stub-objc.c (objc_write_global_declarations): New.
13436
13437 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13438
13439 Implemented parsing @synthesize and @dynamic for
13440 Objective-C/Objective-C++.
13441 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13442 (objc_add_synthesize_declaration): New.
13443 (objc_add_dynamic_declaration): New.
13444 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13445 * stub-objc.c (objc_add_synthesize_declaration): New.
13446 (objc_add_dynamic_declaration): New.
13447
13448 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13449
13450 PR target/46041
13451 * c-cppbuiltin.c (mode_has_fma): Move function here from
13452 builtins.c. Don't use the fma optab, instead just use the
13453 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13454 using -save-temps.
13455
13456 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13457
13458 Merge from 'apple/trunk' branch on FSF servers.
13459
13460 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13461
13462 Radar 4330422
13463 * c-common.h (objc_non_volatilized_type): New declaration
13464 * stub-objc.c (objc_non_volatilized_type): New stub.
13465
13466 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13467
13468 Merge from 'apple/trunk' branch on FSF servers.
13469
13470 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13471
13472 Radar 4133425
13473 * c-common.h (objc_diagnose_private_ivar): New decl.
13474 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13475
13476 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13477
13478 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13479 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13480 (objc_ivar_visibility_kind): New enum.
13481 (objc_set_visibility): Adjust prototype to use visibility enum.
13482 * stub-objc.c (objc_set_visibility): Adjust stub to use
13483 visibility enum.
13484
13485 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13486
13487 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13488 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13489 has the appropriate fma builtins.
13490 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13491
13492 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13493
13494 merge from FSF apple 'trunk' branch.
13495 2006 Fariborz Jahanian <fjahanian@apple.com>
13496
13497 Radars 4436866, 4505126, 4506903, 4517826
13498 * c-common.c (c_common_resword): Define @property and its attributes.
13499 * c-common.h: Define property attribute enum entries.
13500 (OBJC_IS_PATTR_KEYWORD): New.
13501 (objc_property_attribute_kind): New enum.
13502 Declare objc_set_property_attr (), objc_add_property_variable (),
13503 objc_build_getter_call () and objc_build_setter_call ().
13504 * stub-objc.c (objc_set_property_attr): New stub.
13505 (objc_add_property_variable): Likewise.
13506 (objc_build_getter_call): Likewise.
13507 (objc_build_setter_call) Likewise.
13508
13509 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13510
13511 merge from FSF apple 'trunk' branch.
13512 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13513
13514 Radar 3803157 (method attributes)
13515 * c-common.c (handle_deprecated_attribute): Recognize
13516 objc methods as valid declarations.
13517 * c-common.h: Declare objc_method_decl ().
13518 * stub-objc.c (objc_method_decl): New stub.
13519
13520 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13521
13522 * c-common.c (parse_optimize_options): Call
13523 decode_cmdline_options_to_array_default_mask before
13524 decode_options. Update arguments to decode_options.
13525 * c-common.h (c_common_init_options_struct): Declare.
13526 * c-opts.c (c_common_init_options_struct): New. Split out from
13527 c_common_init_options.
13528
13529 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13530
13531 Implemented fast enumeration for Objective-C.
13532 * c-common.h (objc_finish_foreach_loop): New.
13533 * stub-objc.c (objc_finish_foreach_loop): New.
13534
13535 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13536
13537 * c-common.h (struct diagnostic_context): Don't declare here.
13538 (c_common_initialize_diagnostics): Declare using
13539 diagnostic_context typedef.
13540 * c-opts.c (c_common_handle_option): Pass global_dc to
13541 handle_generated_option.
13542
13543 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13544
13545 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13546 handle_generated_option.
13547
13548 2010-10-03 Ian Lance Taylor <iant@google.com>
13549
13550 * c.opt (-fplan9-extensions): New option.
13551
13552 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13553
13554 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13555 Remove.
13556 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13557 of duplicating code.
13558
13559 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13560
13561 * c-common.c: Add two new entries for @optional
13562 and @required keywords.
13563
13564 merge from FSF 'apple/trunk' branch.
13565 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13566
13567 Radar 4386773
13568 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13569 objective-c keywords.
13570 (objc_set_method_opt): New declaration.
13571 * stub-objc.c (objc_set_method_opt): New stub.
13572
13573 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13574
13575 * c-common.c (handle_optimize_attribute): Pass &global_options to
13576 cl_optimization_save and cl_optimization_restore.
13577 * c-opts.c (c_common_handle_option): Pass &global_options to
13578 handle_generated_option.
13579 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13580 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13581 &global_options to cl_optimization_restore.
13582
13583 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13584
13585 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13586 Objective-C/Objective-C++ keywords.
13587
13588 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13589
13590 Merge from 'apple/trunk' branch on FSF servers.
13591
13592 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13593
13594 Radar 4281748
13595 * c-common.h (objc_check_global_decl): New declaration.
13596 * stub-objc.c (objc_check_global_decl): New stub.
13597
13598 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13599
13600 * c.opt: Don't use VarExists.
13601
13602 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13603
13604 * c-common.c (c_cpp_error): Update names of diagnostic_context
13605 members.
13606 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13607 cl_optimization members.
13608 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13609 sanitize_cpp_opts, finish_options): Update names of cpp_options
13610 members.
13611
13612 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13613
13614 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13615 (objc_is_reserved_word): Removed.
13616 * c-common.c: Updated comments.
13617 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13618 objc_is_reserved_word.
13619 * stub-objc.c (objc_is_reserved_word): Removed.
13620
13621 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13622
13623 * c-common.h (objc_add_method_declaration): Adjust prototype to
13624 include attributes.
13625 (objc_start_method_definition): Likewise.
13626 (objc_build_keyword_decl): Likewise.
13627 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13628 (objc_start_method_definition): Likewise.
13629 (objc_build_keyword_decl): Likewise.
13630
13631 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13632
13633 * c-common.h (objc_start_class_interface): Adjust prototype.
13634 (objc_start_category_interface): Likewise.
13635 (objc_start_protocol): Likewise.
13636 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13637 (objc_start_class_interface): Likewise.
13638 (objc_start_category_interface): Likewise.
13639
13640 2010-09-27 Ian Lance Taylor <iant@google.com>
13641
13642 * c-common.c (c_common_attribute_table): Add no_split_stack.
13643 (handle_no_split_stack_attribute): New static function.
13644
13645 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13646
13647 Merge from 'apple/trunk' branch on FSF servers.
13648
13649 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13650
13651 Radar 4229905
13652 * c-common.h (objc_have_common_type): New declaration.
13653 * stub-objc.c (objc_have_common_type): New stub.
13654
13655 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13656
13657 Radar 4154928
13658 * c-common.h (objc_common_type): New prototype.
13659 * stub-objc.c (objc_common_type): New stub.
13660
13661 2010-09-24 Jan Hubicka <jh@suse.cz>
13662
13663 * c-common.c (handle_leaf_attribute): New function.
13664 (struct attribute_spec c_common_att): Add leaf.
13665
13666 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13667
13668 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13669 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13670 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13671 -include-barrier, -include-directory, -include-directory=,
13672 -include-directory-after, -include-directory-after=,
13673 -include-prefix, -include-prefix=, -include-with-prefix,
13674 -include-with-prefix=, -include-with-prefix-after,
13675 -include-with-prefix-after=, -include-with-prefix-before,
13676 -include-with-prefix-before=, -no-integrated-cpp,
13677 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13678 -output=, -pedantic, -pedantic-errors, -preprocess,
13679 -print-missing-file-dependencies, -trace-includes, -traditional,
13680 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13681 -user-dependencies, -verbose, -write-dependencies,
13682 -write-user-dependencies, no-integrated-cpp, traditional): New.
13683
13684 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13685
13686 PR objc/23710
13687 * c-common.h (objc_start_method_definition): Return bool instead
13688 of void.
13689 * stub-objc.c (objc_start_method_definition): Return bool instead
13690 of void.
13691
13692 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13693
13694 PR objc/25965
13695 * c-common.h (objc_get_interface_ivars): New declaration.
13696 * stub-objc.c (objc_get_interface_ivars): New stub.
13697
13698 2010-09-15 Ian Lance Taylor <iant@google.com>
13699
13700 * c-common.c (parse_optimize_options): Do not capitalize warning
13701 messages. Remove period at end of warning message.
13702
13703 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13704
13705 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13706 (handle_alias_attribute): ... here.
13707 (handle_ifunc_attribute): New.
13708
13709 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13710
13711 * c-common.h (do_warn_double_promotion): Declare.
13712 * c-common.c (do_warn_double_promotion): Define.
13713
13714 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13715
13716 * c.opt (Wdouble-promotion): New.
13717
13718 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13719
13720 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13721 fvtable-thunks, fxref): Mark no longer supported in help text.
13722
13723 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13724
13725 * c.opt (Wimport, fall-virtual, falt-external-templates,
13726 fdefault-inline, fenum-int-equiv, fexternal-templates,
13727 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13728 fname-mangling-version-, fnew-abi, fnonnull-objects,
13729 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13730 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13731 applicable.
13732 (fhandle-exceptions): Mark with Alias and Warn.
13733 * c-opts.c (c_common_handle_option): Don't handle options marked
13734 as ignored.
13735
13736 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13737
13738 * c.opt (Wcomments, Werror-implicit-function-declaration,
13739 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13740 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13741 aliases.
13742 * c-common.c (option_codes): Use OPT_Wcomment instead of
13743 OPT_Wcomments.
13744 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13745 Don't handle options marked as aliases.
13746
13747 2010-08-25 Richard Guenther <rguenther@suse.de>
13748
13749 * c-common.c (c_common_get_alias_set): Remove special
13750 handling for pointers.
13751
13752 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13753
13754 * c-common.c: Use FOR_EACH_VEC_ELT.
13755 * c-gimplify.c: Likewise.
13756 * c-pragma.c: Likewise.
13757
13758 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13759
13760 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13761 RejectDriver.
13762 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13763 RejectDriver.
13764 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13765 instead of OPT_MDX and OPT_MMDX.
13766
13767 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13768
13769 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13770
13771 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13772
13773 * c.opt (MD, MMD): Change to MDX and MMDX.
13774 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13775
13776 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13777
13778 * c-opts.c (c_common_handle_option): Call handle_generated_option
13779 instead of handle_option.
13780
13781 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13782
13783 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13784 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13785
13786 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13787
13788 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13789 (pending_redefine_extname): Change type to a VEC.
13790 (add_to_renaming_pragma_list): Update for new type of
13791 pending_redefine_extname.
13792 (maybe_apply_renaming_pragma): Likewise.
13793
13794 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13795
13796 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13797 visited.
13798 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13799 decide whether a type has already been declared/seen.
13800 Do not go to the original type.
13801 (dump_nested_types): New parameter forward.
13802 Generate forward declaration if needed and mark type as visited.
13803 (print_ada_declaration): Call dump_nested_types if not already done.
13804 Mark types as visited.
13805
13806 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13807
13808 * c.opt (-print-pch-checksum): Remove option.
13809 * c-opts.c (c_common_handle_option): Don't handle
13810 OPT_print_pch_checksum.
13811
13812 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13813
13814 * c-common.h (c_common_handle_option): Update prototype and return
13815 value type.
13816 * c-opts.c (c_common_handle_option): Update prototype and return
13817 value type. Update calls to handle_option and
13818 enable_warning_as_error.
13819
13820 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13821
13822 PR c/45079
13823 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13824
13825 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13826
13827 * c-common.h (c_common_missing_argument): Remove.
13828 * c-opts.c (c_common_missing_argument): Remove.
13829 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13830 idirafter, imacros, include, isysroot, isystem, iquote): Add
13831 MissingArgError.
13832 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13833
13834 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13835
13836 * c-common.h (c_common_option_lang_mask,
13837 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13838 New.
13839 (c_common_init_options): Update prototype.
13840 * c-opts.c (c_common_option_lang_mask): New.
13841 (c_common_initialize_diagnostics): Split out of
13842 c_common_init_options.
13843 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13844 New.
13845 (c_common_init_options): Update prototype. Use decoded options in
13846 search for -lang-asm.
13847
13848 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13849
13850 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13851 * c-format.c: Likewise.
13852
13853 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13854
13855 * c-common.h: Include diagnostic-core.h. Error if already
13856 included.
13857 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13858
13859 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13860
13861 * c-common.c (IN_GCC_FRONTEND): Do not undef.
13862 Do not include expr.h
13863 (vector_mode_valid_p): Move here.
13864
13865 2010-06-21 DJ Delorie <dj@redhat.com>
13866
13867 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13868 allow these pragmas anywhere.
13869
13870 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13871
13872 PR bootstrap/44509
13873 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13874 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13875 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13876 ggc_strdup instead of xstrdup.
13877
13878 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13879
13880 * c-cppbuiltin.c: Include cpp-id-data.h.
13881 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13882 (lazy_hex_fp_value): New function.
13883 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13884
13885 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13886
13887 * c-gimplify.c: Do not include tree-flow.h
13888
13889 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13890
13891 PR other/44034
13892 * c-common.c: Rename targetm member:
13893 targetm.enum_va_list -> targetm.enum_va_list_p
13894
13895 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13896
13897 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13898
13899 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13900
13901 * c-cppbuiltin.c: Do not include except.h.
13902
13903 2010-06-24 Andi Kleen <ak@linux.intel.com>
13904
13905 * c-common.c (warn_for_omitted_condop): New.
13906 * c-common.h (warn_for_omitted_condop): Add prototype.
13907
13908 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13909
13910 * c.opt (lang-objc): Remove.
13911 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13912
13913 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13914
13915 * c-opts.c: Include "tm_p.h".
13916
13917 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13918
13919 * c-common.c (parse_optimize_options): Update call to
13920 decode_options.
13921
13922 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13923
13924 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13925 new type of types_used_by_cur_var_decl.
13926
13927 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13928
13929 PR bootstrap/44512
13930 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13931 for C++ standard compliance.
13932
13933 2010-06-16 Jason Merrill <jason@redhat.com>
13934
13935 * c.opt: Add -Wnoexcept.
13936
13937 2010-06-16 Richard Guenther <rguenther@suse.de>
13938
13939 PR c/44555
13940 * c-common.c (c_common_truthvalue_conversion): Remove
13941 premature and wrong optimization concering ADDR_EXPRs.
13942
13943 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13944
13945 * c-ada-spec.c (dump_sloc): Remove column info.
13946 (is_simple_enum): New function.
13947 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13948 enum types when relevant.
13949
13950 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13951
13952 * c-common.c (conversion_warning): Warn at expression
13953 location.
13954
13955 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13956
13957 * c-opts.c (c_common_handle_option): Don't handle
13958 OPT_fshow_column.
13959
13960 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13961
13962 * c-pragma.c (push_alignment): Use typed GC allocation.
13963 (handle_pragma_push_options): Likewise.
13964
13965 * c-common.c (parse_optimize_options): Likewise.
13966
13967 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13968 option.
13969
13970 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13971
13972 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13973 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13974 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13975 flag_signed_bitfields, warn_strict_null_sentinel,
13976 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13977 flag_gen_declaration, flag_no_gnu_keywords,
13978 flag_implement_inlines, flag_implicit_templates,
13979 flag_implicit_inline_templates, flag_optional_diags,
13980 flag_elide_constructors, flag_default_inline, flag_rtti,
13981 flag_conserve_space, flag_access_control, flag_check_new,
13982 flag_new_for_scope, flag_weak, flag_working_directory,
13983 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13984 flag_enforce_eh_specs, flag_threadsafe_statics,
13985 flag_pretty_templates): Remove.
13986 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13987 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13988 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13989 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13990 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13991 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13992 flag_no_gnu_keywords, flag_implement_inlines,
13993 flag_implicit_templates, flag_implicit_inline_templates,
13994 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13995 flag_rtti, flag_conserve_space, flag_access_control,
13996 flag_check_new, flag_new_for_scope, flag_weak,
13997 flag_working_directory, flag_use_cxa_atexit,
13998 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13999 flag_threadsafe_statics, flag_pretty_templates,
14000 warn_strict_null_sentinel): Remove.
14001 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14002 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14003 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14004 fimplicit-inline-templates, fimplicit-templates,
14005 flax-vector-conversions, fms-extensions, fnil-receivers,
14006 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14007 frtti, fshort-double, fshort-enums, fshort-wchar,
14008 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14009 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14010 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14011 gen-decls, undef): Use Var.
14012 (fdefault-inline, foptional-diags): Document as doing nothing.
14013 * c-opts.c (c_common_handle_option): Remove cases for options now
14014 using Var. Mark ignored options as such.
14015
14016 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14017
14018 * c-common.c: Moved to here from parent directory.
14019 * c-common.def: Likewise.
14020 * c-common.h: Likewise.
14021 * c-cppbuiltin.c: Likewise.
14022 * c-dump.c: Likewise.
14023 * c-format.c: Likewise.
14024 * c-format.h : Likewise.
14025 * c-gimplify.c: Likewise.
14026 * c-lex.c: Likewise.
14027 * c-omp.c: Likewise.
14028 * c.opt: Likewise.
14029 * c-opts.c: Likewise.
14030 * c-pch.c: Likewise.
14031 * c-ppoutput.c: Likewise.
14032 * c-pragma.c: Likewise.
14033 * c-pragma.h: Likewise.
14034 * c-pretty-print.c: Likewise.
14035 * c-pretty-print.h: Likewise.
14036 * c-semantics.c: Likewise.
14037 * stub-objc.c: Likewise.
14038
14039 * c-common.c: Include gt-c-family-c-common.h.
14040 * c-pragma.c: Include gt-c-family-c-pragma.h.
14041 \f
14042 Copyright (C) 2010-2023 Free Software Foundation, Inc.
14043
14044 Copying and distribution of this file, with or without modification,
14045 are permitted in any medium without royalty provided the copyright
14046 notice and this notice are preserved.