]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
Add hppa*-*-* to dg-error targets at line 5
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
4907d220
GA
12023-09-20 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/111392
4 * c-omp.cc (c_omp_directives): Add commented out groupprivate
5 directive entry.
6
590a8bec
GA
72023-09-19 Ben Boeckel <ben.boeckel@kitware.com>
8
9 * c-opts.cc (c_common_handle_option): Add fdeps_file variable and
10 -fdeps-format=, -fdeps-file=, and -fdeps-target= parsing.
11 * c.opt: Add -fdeps-format=, -fdeps-file=, and -fdeps-target=
12 flags.
13
142023-09-19 Javier Martinez <javier.martinez.bugzilla@gmail.com>
15
16 * c-attribs.cc (handle_hot_attribute): remove warning on
17 RECORD_TYPE and UNION_TYPE when in c_dialect_xx.
18 (handle_cold_attribute): Likewise.
19
202023-09-19 Jakub Jelinek <jakub@redhat.com>
21
22 * c-common.cc (c_common_signed_or_unsigned_type): Return INTEGER_TYPE
23 for signed variant of unsigned _BitInt(1).
24
a134b6ce
GA
252023-09-06 Jakub Jelinek <jakub@redhat.com>
26
27 PR c/102989
28 * c-attribs.cc (type_valid_for_vector_size): Reject vector types
29 with BITINT_TYPE elements even if they have mode precision and
30 suitable size.
31
322023-09-06 Jakub Jelinek <jakub@redhat.com>
33
34 PR c/102989
35 * c-common.cc (c_common_reswords): Add _BitInt as keyword.
36 (unsafe_conversion_p): Handle BITINT_TYPE like INTEGER_TYPE.
37 (c_common_signed_or_unsigned_type): Handle BITINT_TYPE.
38 (c_common_truthvalue_conversion, c_common_get_alias_set,
39 check_builtin_function_arguments): Handle BITINT_TYPE like
40 INTEGER_TYPE.
41 (sync_resolve_size): Add ORIG_FORMAT argument. If
42 FETCH && !ORIG_FORMAT, type is BITINT_TYPE, return -1 if size isn't
43 one of 1, 2, 4, 8 or 16 or if it is 16 but TImode is not supported.
44 (atomic_bitint_fetch_using_cas_loop): New function.
45 (resolve_overloaded_builtin): Adjust sync_resolve_size caller. If
46 -1 is returned, use atomic_bitint_fetch_using_cas_loop to lower it.
47 Formatting fix.
48 (keyword_begins_type_specifier): Handle RID_BITINT.
49 * c-common.h (enum rid): Add RID_BITINT enumerator.
50 * c-cppbuiltin.cc (c_cpp_builtins): For C call
51 targetm.c.bitint_type_info and predefine __BITINT_MAXWIDTH__
52 and for -fbuilding-libgcc also __LIBGCC_BITINT_LIMB_WIDTH__ and
53 __LIBGCC_BITINT_ORDER__ macros if _BitInt is supported.
54 * c-lex.cc (interpret_integer): Handle CPP_N_BITINT.
55 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier,
56 c_pretty_printer::direct_abstract_declarator,
57 c_pretty_printer::direct_declarator, c_pretty_printer::declarator):
58 Handle BITINT_TYPE.
59 (pp_c_integer_constant): Handle printing of large precision wide_ints
60 which would buffer overflow digit_buffer.
61 * c-warn.cc (conversion_warning, warnings_for_convert_and_check,
62 warnings_for_convert_and_check): Handle BITINT_TYPE like
63 INTEGER_TYPE.
64
652023-09-06 Jakub Jelinek <jakub@redhat.com>
66
67 PR c/102989
68 * c-ubsan.cc (ubsan_instrument_shift): Use UBSAN_PRINT_FORCE_INT
69 for type0 type descriptor.
70
712023-09-06 Jakub Jelinek <jakub@redhat.com>
72
73 * c-lex.cc (interpret_float): For C diagnostics on FN and FNx suffixes
74 append " before C2X" to diagnostics text and follow behavior of
75 pedwarn_c11.
76
80907b03
GA
772023-09-01 Jakub Jelinek <jakub@redhat.com>
78
79 PR c++/111069
80 * c-opts.cc (c_common_post_options): Change latest_abi_version to 19.
81
65c36ecc
GA
822023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
83
84 * c.opt: Change spelling to macOS.
85
862023-08-31 Richard Biener <rguenther@suse.de>
87
88 PR middle-end/111253
89 * c-pretty-print.cc (c_pretty_printer::primary_expression):
90 Only dump gimple_assign_single_p SSA def RHS.
91
b8863640
GA
922023-08-25 Sandra Loosemore <sandra@codesourcery.com>
93
94 * c-common.h (c_omp_check_loop_binding_exprs): Declare.
95 * c-omp.cc: Include tree-iterator.h.
96 (find_binding_in_body): New.
97 (check_loop_binding_expr_r): New.
98 (LOCATION_OR): New.
99 (check_looop_binding_expr): New.
100 (c_omp_check_loop_binding_exprs): New.
101
1022023-08-25 Uros Bizjak <ubizjak@gmail.com>
103
104 * c-format.cc (read_any_format_width):
105 Rename TRUE/FALSE to true/false.
106
a7593210
GA
1072023-08-20 Martin Uecker <uecker@tugraz.at>
108
109 * c-format.cc: Fix identation.
110
1112023-08-20 Tomas Kalibera <tomas.kalibera@gmail.com>
112
113 PR c/95130
114 * c-format.cc: skip default format for printf symbol if
115 explicitly declared by prototype.
116
1eb2433f
GA
1172023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
118
119 PR c/106537
120 * c.opt (Wcompare-distinct-pointer-types): New option.
121
3cc78cf2
GA
1222023-08-14 Jason Merrill <jason@redhat.com>
123
124 * c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
125
886afed6
GA
1262023-08-11 Jakub Jelinek <jakub@redhat.com>
127
128 * c-common.cc (c_common_reswords): Add __typeof_unqual
129 and __typeof_unqual__ spellings of typeof_unqual.
130
1312023-08-11 Martin Uecker <uecker@tugraz.at>
132
133 PR c/84510
134 * c.opt: Enable warning for C and ObjC.
135
87b0749c
GA
1362023-08-05 Martin Uecker <uecker@tugraz.at>
137
138 PR c/98536
139 * c-warn.cc (warn_parm_array_mismatch): Do not warn if more
140 bounds are specified.
141
5b42ee2c
GA
1422023-08-04 Tamar Christina <tamar.christina@arm.com>
143
144 * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR.
145 * c-pragma.cc (init_pragma): Use it.
146
cf58b896
GA
1472023-08-01 Lewis Hyatt <lhyatt@gmail.com>
148
149 * c-common.h (c_init_preprocess): Declare new function.
150 * c-opts.cc (c_common_init): Call it.
151 * c-lex.cc (cb_def_pragma): Add a comment.
152 (get_token): New function wrapping cpp_get_token.
153 (c_lex_with_flags): Use the new wrapper function to support
154 obtaining tokens in preprocess_only mode.
155 (lex_string): Likewise.
156 * c-pragma.cc (pragma_diagnostic_lex_normal): Rename to...
157 (pragma_diagnostic_lex): ...this.
158 (pragma_diagnostic_lex_pp): Remove.
159 (handle_pragma_diagnostic_impl): Call pragma_diagnostic_lex () in
160 all modes.
161 (c_pp_invoke_early_pragma_handler): Adapt to support pragma_lex ()
162 usage.
163 * c-pragma.h (pragma_lex_discard_to_eol): Declare.
164
a2f31d79
GA
1652023-07-31 Hamza Mahfooz <someguy@effective-light.com>
166
167 PR c/65213
168 * c.opt (-Wmissing-variable-declarations): New option.
169
e2bf82d5
GA
1702023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
171
172 PR middle-end/77928
173 * c-common.cc (check_builtin_function_arguments):
174 Handle BUILT_IN_ISEQSIG.
175
5158918a
GA
1762023-07-05 Robin Dapp <rdapp@ventanamicro.com>
177 Juzhe-Zhong <juzhe.zhong@rivai.ai>
178
179 * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION.
180
14bfda60
GA
1812023-06-29 Qing Zhao <qing.zhao@oracle.com>
182
183 PR c/77650
184 * c.opt: New option -Wflex-array-member-not-at-end.
185
5f590ee3
GA
1862023-06-28 Jason Merrill <jason@redhat.com>
187
188 PR c++/110344
189 * c-cppbuiltin.cc (c_cpp_builtins): Update __cpp_constexpr.
190
267e1fea
GA
1912023-06-26 Richard Biener <rguenther@suse.de>
192
193 * c-common.cc (shorten_binary_op): Exit early for VECTOR_TYPE
194 operations.
195
6f78df4c
GA
1962023-06-23 Marek Polacek <polacek@redhat.com>
197
198 * c-common.h (cxx_dialect): Add cxx26 as a dialect.
199 * c-opts.cc (set_std_cxx26): New.
200 (c_common_handle_option): Set options when -std={c,gnu}++2{c,6} is
201 enabled.
202 (c_common_post_options): Adjust comments.
203 * c.opt: Add options for -std=c++26, std=c++2c, -std=gnu++26,
204 and -std=gnu++2c.
205 (std=c++2b): Mark as Undocumented.
206 (std=c++23): No longer Undocumented.
207
80e9ca0e
GA
2082023-06-21 Alexander Monakov <amonakov@ispras.ru>
209
210 * c-gimplify.cc (fma_supported_p): New helper.
211 (c_gimplify_expr) [PLUS_EXPR, MINUS_EXPR]: Implement FMA
212 contraction.
213
f10a4ce0
GA
2142023-06-16 Alex Coplan <alex.coplan@arm.com>
215
216 * c.opt (Welaborated-enum-base): New.
217
532fb120
GA
2182023-06-13 David Malcolm <dmalcolm@redhat.com>
219
220 PR c/84890
221 * known-headers.cc
222 (suggest_missing_header::~suggest_missing_header): Reword note to
223 avoid negative tone of "forgetting".
224
8c5b1365
GA
2252023-06-07 Jason Merrill <jason@redhat.com>
226
227 PR c++/58487
228 * c.opt: Add -Wnrvo.
229
6e6bb373
GA
2302023-05-26 Martin Uecker <uecker@tugraz.at>
231
232 * c-attribs.cc (build_attr_access_from_parms): Split loop to first
233 record all parameters.
234
b2776076
GA
2352023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
236
237 * c-ada-spec.cc (has_static_fields): Use _P() defines from tree.h.
238 (dump_ada_declaration): Ditto.
239 (dump_ada_structure): Ditto.
240 * c-common.cc (unsafe_conversion_p): Ditto.
241 (shorten_compare): Ditto.
242 (pointer_int_sum): Ditto.
243 (c_common_truthvalue_conversion): Ditto.
244 (scalar_to_vector): Ditto.
245 * c-common.h (gnu_vector_type_p): Ditto.
246 * c-omp.cc (c_omp_depend_t_p): Ditto.
247 (c_omp_split_clauses): Ditto.
248 * c-ubsan.cc (ubsan_instrument_division): Ditto.
249 * c-warn.cc (conversion_warning): Ditto.
250 (warnings_for_convert_and_check): Ditto.
251
ff2dcddf
GA
2522023-05-18 Joseph Myers <joseph@codesourcery.com>
253
254 * c-format.cc (print_char_table): Handle %B like %b.
255
3427b51b
GA
2562023-05-15 Joseph Myers <joseph@codesourcery.com>
257
258 * c-lex.cc (c_common_has_attribute): Use 202311 as
259 __has_c_attribute return for all C2x attributes.
260
2612023-05-15 Patrick Palka <ppalka@redhat.com>
262
263 * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
264 for C++23.
265
1fc8da95
GA
2662023-05-01 Marek Polacek <polacek@redhat.com>
267
268 * c-ubsan.cc (ubsan_maybe_instrument_array_ref): Don't copy_node.
269
579cdc1e
GA
2702023-03-28 David Malcolm <dmalcolm@redhat.com>
271
272 PR c/107002
273 * c-common.h (check_for_xor_used_as_pow): Add "rhs_loc" param.
274 * c-warn.cc (check_for_xor_used_as_pow): Add "rhs_loc" param.
275 Reject cases where involving macro expansions.
276
2772023-03-28 Jason Merrill <jason@redhat.com>
278
279 PR c++/107163
280 * c-common.cc (verify_tree): Don't use sequenced handling
281 for COMPONENT_REF.
282
454a4d50
GA
2832023-03-17 Jakub Jelinek <jakub@redhat.com>
284
285 PR c/109151
286 * c-ubsan.cc (ubsan_instrument_division): Handle all scalar integral
287 types rather than just INTEGER_TYPE.
288
c8065441
GA
2892023-03-10 Marek Polacek <polacek@redhat.com>
290
291 PR sanitizer/108060
292 PR sanitizer/109050
293 * c-gimplify.cc (ubsan_walk_array_refs_r): For a MODIFY_EXPR, instrument
294 the RHS before the LHS.
295
2858bf16
GA
2962023-03-04 Jakub Jelinek <jakub@redhat.com>
297
298 PR c/107465
299 * c-warn.cc (warn_for_sign_compare): Don't warn for unset bits
300 above innermost zero extension of BIT_NOT_EXPR result.
301
3022023-03-04 Jakub Jelinek <jakub@redhat.com>
303
304 PR c/107465
305 * c-warn.cc (warn_for_sign_compare): If c_common_get_narrower
306 doesn't return a narrower result, use TYPE_UNSIGNED to set unsignedp0
307 and unsignedp1. For the one BIT_NOT_EXPR case vs. one without,
308 only check for constant in the non-BIT_NOT_EXPR operand, use std::swap
309 to simplify the code, only warn if BIT_NOT_EXPR operand is extended
310 from narrower unsigned, fix up computation of mask for the constant
311 cases and for unsigned other operand case handle differently
312 BIT_NOT_EXPR result being sign vs. zero extended.
313
3142023-03-04 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/107846
317 * c-warn.cc: Include langhooks.h.
318 (maybe_warn_shift_overflow): Set type0 to what TREE_TYPE (op0)
319 promotes to rather than TREE_TYPE (op0) itself, if TREE_TYPE (op0)
320 is narrower than type0 and unsigned, use wi::min_precision with
321 UNSIGNED and fold_convert op0 to type0 before emitting the warning.
322
2aa6673e
GA
3232023-03-03 Alexandre Oliva <oliva@adacore.com>
324
325 * c-common.cc (c_common_nodes_and_builtins): Take
326 wchar_type_node for wint_type_node when aliased.
327 (c_stddef_cpp_builtins): Define __WINT_TYPE__, when aliased to
328 wchar_t, to the underlying type rather than wchar_t in
329 non-C++.
330 * c-cppbuiltin.cc (type_suffix): Handle wchar_type_node.
331
6f9e2f14
GA
3322023-02-28 Marek Polacek <polacek@redhat.com>
333
334 PR c++/107938
335 * c-warn.cc (check_address_or_pointer_of_packed_member): Check
336 POINTER_TYPE_P.
337
3382023-02-28 Jakub Jelinek <jakub@redhat.com>
339
340 PR sanitizer/108894
341 * c-common.h (c_strict_flex_array_level_of): Declare.
342 * c-common.cc (c_strict_flex_array_level_of): New function,
343 moved and renamed from c-decl.cc's strict_flex_array_level_of.
344 * c-ubsan.cc (ubsan_instrument_bounds): Fix comment typo. For
345 C check c_strict_flex_array_level_of whether a trailing array
346 should be treated as flexible member like. Handle C [0] arrays.
347 Add 1 + index_off_by_one rather than index_off_by_one to bounds
348 and use tree_int_cst_lt rather than tree_int_cst_le for idx vs.
349 bounds comparison.
350
e2b20ed3
GA
3512023-02-23 Jakub Jelinek <jakub@redhat.com>
352
353 PR translation/108890
354 * c.opt (fcontracts): Fix description.
355
b6f98991
GA
3562023-02-22 Marek Polacek <polacek@redhat.com>
357
358 PR c/108880
359 * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>: Pass
360 pset to walk_tree_1.
361 (c_genericize): Call walk_tree with an explicit pset.
362
0263e9d5
GA
3632023-02-18 Martin Uecker <uecker@tugraz.at>
364
365 PR c/105660
366 * c-attribs.cc (append_access_attr): Use order of arguments when
367 construction string.
368 (append_access_attr_idxs): Rename and make static.
369 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
370
88cc4495
GA
3712023-02-16 Patrick Palka <ppalka@redhat.com>
372
373 * c-common.h: Mechanically drop static from static inline
374 functions via s/^static inline/inline/g.
375
0a251e74
GA
3762023-02-01 Jason Merrill <jason@redhat.com>
377
378 * c.opt: Add -Wno-changes-meaning.
379
317525b0
GA
3802023-01-31 Marek Polacek <polacek@redhat.com>
381
382 PR c++/107593
383 PR c++/108597
384 * c-common.h (instantiation_dependent_expression_p): Declare.
385 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
386 is dependent, invalidate the chain.
387
2371d100
GA
3882023-01-26 Marek Polacek <polacek@redhat.com>
389
390 PR c++/105300
391 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
392
9f98cfa5
GA
3932023-01-18 Marek Polacek <polacek@redhat.com>
394
395 PR c/108424
396 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
397
5013c3bb
GA
3982023-01-14 Jakub Jelinek <jakub@redhat.com>
399
400 PR c++/108365
401 * c-common.h (may_shorten_divmod): New static inline function.
402
4032023-01-13 Eric Botcazou <ebotcazou@adacore.com>
404
405 * c-ada-spec.cc (is_float32): New function.
406 (is_float64): Likewise.
407 (is_float128): Tweak.
408 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
409
81ed98bc
GA
4102023-01-12 Lewis Hyatt <lhyatt@gmail.com>
411
412 PR preprocessor/108244
413 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
414 deferred pragmas if -fdirectives-only.
415 (init_pragma): Likewise.
416
84723aca
GA
4172023-01-09 Martin Liska <mliska@suse.cz>
418
419 PR c/107993
420 * c-attribs.cc (handle_target_clones_attribute): Check for
421 string constant for all target_clone attribute values.
422
0f8fbb57
GA
4232023-01-03 Florian Weimer <fweimer@redhat.com>
424
425 * c-cppbuiltin.cc (c_cpp_builtins): Define
426 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
427
4282023-01-03 Florian Weimer <fweimer@redhat.com>
429
430 Revert:
431 2023-01-03 Florian Weimer <fweimer@redhat.com>
432
433 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
434 Define if constant is known.
435
4362023-01-03 Florian Weimer <fweimer@redhat.com>
437
438 Revert:
439 2023-01-02 Florian Weimer <fweimer@redhat.com>
440
441 * c-cppbuiltin.cc (c_cpp_builtins): Define
442 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
443
fee53a31
GA
4442023-01-02 Florian Weimer <fweimer@redhat.com>
445
446 * c-cppbuiltin.cc (c_cpp_builtins): Define
447 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
448
4492023-01-02 Florian Weimer <fweimer@redhat.com>
450
451 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
452 Define if constant is known.
453
d2ef2327
GA
4542022-12-19 Marek Polacek <polacek@redhat.com>
455
456 PR c/98487
457 * c-format.cc (check_function_format): Use get_attribute_name.
458
5fb1e674
GA
4592022-12-16 Qing Zhao <qing.zhao@oracle.com>
460
461 * c.opt (Wstrict-flex-arrays): New option.
462
596dbfff
GA
4632022-12-02 Andrew MacLeod <amacleod@redhat.com>
464
465 * c-attribs.cc (handle_deprecated_attribute): Use type when
466 using TYPE_NAME.
467
b35680ec
GA
4682022-12-02 Jakub Jelinek <jakub@redhat.com>
469
470 PR c++/84469
471 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
472 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
473 to any of the structured binding decls.
474
6eea85a9
GA
4752022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
476 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
477
478 PR driver/107787
479 * c-common.cc (fold_offsetof,
480 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
481 instead of OPT_Warray_bounds.
482
9a1b4f1d
GA
4832022-11-24 Jakub Jelinek <jakub@redhat.com>
484
485 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
486 with a dot.
487
8761284f
GA
4882022-11-23 Andrew Pinski <apinski@marvell.com>
489 Jakub Jelinek <jakub@redhat.com>
490
491 PR c/107127
492 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
493 instead of walk_tree for c_genericize_control_r.
494
4952022-11-23 Jakub Jelinek <jakub@redhat.com>
496
497 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
498 fcontract-role=, fcontract-semantic=): Add RejectNegative.
499 (fcontract-build-level=): Terminate description with dot.
500
fb98ede8
GA
5012022-11-19 Jakub Jelinek <jakub@redhat.com>
502
503 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
504 value from 202207L to 202211L.
505
5062022-11-19 Jeff Chapman II <jchapman@lock3software.com>
507 Andrew Sutton <asutton@lock3software.com>
508 Andrew Marmaduke <amarmaduke@lock3software.com>
509 Michael Lopez <mlopez@lock3software.com>
510 Jason Merrill <jason@redhat.com>
511
512 * c.opt: Add contracts flags.
513 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
514 macros.
515
80909529
GA
5162022-11-16 Marek Polacek <polacek@redhat.com>
517
518 PR c++/106649
519 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
520 C++23.
521 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
522 depending on cxx_dialect.
523 * c.opt (Winvalid-constexpr): New option.
524
5252022-11-16 Jakub Jelinek <jakub@redhat.com>
526
527 * c-common.def (CONCEPT_DECL): New tree, moved here from
528 cp-tree.def.
529 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
530 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
531 attribute on CONCEPT_DECL.
532
cdc34229
GA
5332022-11-15 Lewis Hyatt <lhyatt@gmail.com>
534
535 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
536 than a hard-coded string.
537
83d400bd
GA
5382022-11-15 Jakub Jelinek <jakub@redhat.com>
539
540 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
541 __cpp_multidimensional_subscript macro value to 202211L.
542
5432022-11-15 Patrick Palka <ppalka@redhat.com>
544
545 PR c++/107638
546 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
547 iff SUPPORTS_INIT_PRIORITY.
548
5492022-11-14 Martin Liska <mliska@suse.cz>
550
551 Revert:
552 2022-11-09 Martin Liska <mliska@suse.cz>
553
554 * c-target.def: Port to RST.
555
30d77d49
GA
5562022-11-12 Joseph Myers <joseph@codesourcery.com>
557
558 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
559
5b6ce16a
GA
5602022-11-11 Jonathan Wakely <jwakely@redhat.com>
561
562 PR c/85487
563 * c-pragma.cc (handle_pragma_ignore): New function.
564 (init_pragma): Register region and endregion pragmas.
565
1cdfd0e5
GA
5662022-11-09 Martin Liska <mliska@suse.cz>
567
568 * c-target.def: Port to RST.
569
05788e9b
GA
5702022-11-05 Lewis Hyatt <lhyatt@gmail.com>
571
572 PR preprocessor/55971
573 * c-ppoutput.cc (adjust_for_newlines): Update comment.
574
d29260ce
GA
5752022-11-03 Jason Merrill <jason@redhat.com>
576
577 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
578 -fconcepts-ts before C++20.
579
3055829a
GA
5802022-10-28 Joseph Myers <joseph@codesourcery.com>
581
582 * c-common.cc (def_fn_type): Call build_function_type for
583 zero-argument variable-argument function.
584 (c_common_nodes_and_builtins): Build default_function_type with
585 build_function_type.
586 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
587 option.
588
5892022-10-28 Joseph Myers <joseph@codesourcery.com>
590
591 PR c/61469
592 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
593 New. Moved from cp/cp-tree.h.
594 * c-warn.cc (warnings_for_convert_and_check): Do not consider
595 conversions to enum with underlying type bool to overflow.
596
486a5037
GA
5972022-10-26 Marek Polacek <polacek@redhat.com>
598
599 PR c++/106393
600 * c.opt (Wdangling-reference): New.
601
87f9c4a4
GA
6022022-10-19 Joseph Myers <joseph@codesourcery.com>
603
604 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
605 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
606 and FMT_LEN_wf64.
607 (NOARGUMENTS, NOLENGTHS): Update definitions.
608 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
609 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
610 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
611 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
612 (T_UF64, T2X_UF64): New macros.
613 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
614 and wfN length modifiers.
615 (print_char_table, scan_char_table): Add entries using wN and wfN
616 length modifiers.
617
21de009f
GA
6182022-10-18 Joseph Myers <joseph@codesourcery.com>
619
620 PR c/36113
621 * c-common.cc (c_common_type_for_size): Add fallback to
622 widest_unsigned_literal_type_node or
623 widest_integer_literal_type_node for precision that may not
624 exactly match the precision of those types.
625
baeec7cc
GA
6262022-10-14 Jakub Jelinek <jakub@redhat.com>
627
628 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
629 predefine __BFLT16_*__ macros and for C++23 also
630 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
631 macros for -fbuilding-libgcc.
632 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
633
6342022-10-14 Jakub Jelinek <jakub@redhat.com>
635
636 PR middle-end/323
637 PR c++/107097
638 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
639 the tree being specific to C/ObjC.
640 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
641 in C++ the same as in C.
642 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
643 even for C++.
644
621a911d
GA
6452022-10-13 Joseph Myers <joseph@codesourcery.com>
646
647 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
648 value 2 for *_IS_IEC_60559.
649
781f477a
GA
6502022-10-12 Lewis Hyatt <lhyatt@gmail.com>
651
652 PR preprocessor/60014
653 PR preprocessor/60723
654 * c-ppoutput.cc (class token_streamer): Remove member
655 line_marker_emitted to...
656 (token_streamer::stream): ...a local variable here. Set
657 print.prev_was_system_token on all code paths.
658
27bfe54e
GA
6592022-10-10 Nathan Sidwell <nathan@acm.org>
660
661 * c-opts.cc (c_common_post_options): Bump abi to 18.
662
6632022-10-10 Marek Polacek <polacek@redhat.com>
664
665 PR c++/106937
666 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
667 attributes here.
668 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
669 attributes here.
670 (pp_c_attributes): Remove.
671 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
672 get_attribute_name. Don't print a trailing space when printing the
673 [[]] form.
674 * c-pretty-print.h (pp_c_attributes): Remove.
675
9ff6c33e
GA
6762022-10-07 Qing Zhao <qing.zhao@oracle.com>
677
678 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
679 (c_common_attribute_table): New item for strict_flex_array.
680 * c.opt: (fstrict-flex-arrays): New option.
681 (fstrict-flex-arrays=): New option.
682
6832022-10-07 Martin Liska <mliska@suse.cz>
684
685 * name-hint.h: Use std::move.
686
6872022-10-07 Jakub Jelinek <jakub@redhat.com>
688
689 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
690 only in gnu namespace or as standard attribute, treat fallthrough
691 attributes in other namespaces like any other unknown attribute.
692
629d04d3
GA
6932022-10-06 Joseph Myers <joseph@codesourcery.com>
694
695 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
696 typeof_unqual.
697 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
698 (D_EXT11): New macro. Values of subsequent macros updated.
699
7002022-10-06 Jakub Jelinek <jakub@redhat.com>
701
702 PR c++/106654
703 * c-attribs.cc (handle_assume_attribute): New function.
704 (c_common_attribute_table): Add entry for assume attribute.
705 * c-lex.cc (c_common_has_attribute): Handle
706 __have_cpp_attribute (assume).
707
85872a69
GA
7082022-10-04 Jakub Jelinek <jakub@redhat.com>
709
710 * c-omp.cc (c_omp_directives): Uncomment begin declare target
711 entry.
712
69fd6dcc
GA
7132022-10-03 Patrick Palka <ppalka@redhat.com>
714
715 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
716 RID_IS_SAME_AS.
717
7182022-10-03 Joseph Myers <joseph@codesourcery.com>
719
720 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
721 special-case __*_EPSILON__ setting for IBM long double for C2x.
722
3a221b73
GA
7232022-09-30 Patrick Palka <ppalka@redhat.com>
724
725 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
726 C++ traits.
727 * c-common.h (enum rid): Likewise.
728
bbdcdf5c
GA
7292022-09-29 Joseph Myers <joseph@codesourcery.com>
730
731 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
732 C.
733
7342022-09-29 Patrick Palka <ppalka@redhat.com>
735
736 * c-common.cc (c_common_reswords): Add __remove_cv,
737 __remove_reference and __remove_cvref.
738 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
739 and RID_REMOVE_CVREF.
740
1f16a020
GA
7412022-09-27 Marek Polacek <polacek@redhat.com>
742
743 PR c++/101165
744 PR c++/106882
745 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
746
7472022-09-27 Marek Polacek <polacek@redhat.com>
748
749 * c-format.cc (c_keywords): Drop nothrow.
750
7512022-09-27 Jakub Jelinek <jakub@redhat.com>
752
753 PR c++/106651
754 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
755 __cpp_static_call_operator=202207L for C++23.
756
7572022-09-27 Jakub Jelinek <jakub@redhat.com>
758
759 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
760 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
761 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
762 * c-pragma.cc (omp_pragmas): Add assumes and begin.
763 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
764 (omp_pragmas_simd): Add assume.
765 * c-common.h (c_omp_directives): Declare.
766 * c-omp.cc (omp_directives): Rename to ...
767 (c_omp_directives): ... this. No longer static. Uncomment
768 assume, assumes, begin assumes and end assumes entries.
769 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
770 to PRAGMA_OMP_END.
771 (c_omp_categorize_directive): Adjust for omp_directives to
772 c_omp_directives renaming.
773
7742022-09-27 Jakub Jelinek <jakub@redhat.com>
775
776 PR c++/106652
777 PR c++/85518
778 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
779 _Float{32,64,128}x flags from D_CONLY to 0.
780 (shorten_binary_op): Punt if common_type returns error_mark_node.
781 (shorten_compare): Likewise.
782 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
783 and _Float{32,64,128}x builtin types if available. For C++
784 clear float128t_type_node.
785 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
786 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
787 * c-lex.cc (interpret_float): For q/Q suffixes prefer
788 float128t_type_node over float128_type_node. Allow
789 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
790 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
791 with pedwarn. Don't call excess_precision_type for C++.
792
220c4d8e
GA
7932022-09-26 Marek Polacek <polacek@redhat.com>
794
795 PR c++/106656
796 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
797 for C++20.
798
4afaeaab
GA
7992022-09-23 Marek Polacek <polacek@redhat.com>
800
801 PR c++/106784
802 * c-common.cc (c_common_reswords): Add __is_convertible and
803 __is_nothrow_convertible.
804 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
805 RID_IS_NOTHROW_CONVERTIBLE.
806
279c6715
GA
8072022-09-22 David Malcolm <dmalcolm@redhat.com>
808
809 PR c/106830
810 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
811 values that don't fit in uhwi.
812
d0fc05e8
GA
8132022-09-15 Richard Biener <rguenther@suse.de>
814
815 * c-common.h (build_void_list_node): Remove.
816 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
817 void_list_node.
818
861d1a11
GA
8192022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
820
821 * c-format.cc (convert_format_name_to_system_name): Fix warning.
822
fe2a8ce9
GA
8232022-09-07 Joseph Myers <joseph@codesourcery.com>
824
825 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
826 for alignas, alignof, bool, false, static_assert, thread_local and
827 true.
828
8292022-09-07 Jakub Jelinek <jakub@redhat.com>
830
831 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
832 " in comments" from description.
833 (Wunicode): New option.
834
25aeb922
GA
8352022-09-06 Jakub Jelinek <jakub@redhat.com>
836
837 PR c/106836
838 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
839
83f2f228
GA
8402022-09-03 Jakub Jelinek <jakub@redhat.com>
841
842 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
843 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
844 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
845 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
846
c64b0947
GA
8472022-09-02 David Malcolm <dmalcolm@redhat.com>
848
849 PR c/90885
850 * c-common.h (check_for_xor_used_as_pow): New decl.
851 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
852 * c-warn.cc (check_for_xor_used_as_pow): New.
853 * c.opt (Wxor-used-as-pow): New.
854
bb0a1556
GA
8552022-09-01 Jason Merrill <jason@redhat.com>
856
857 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
858 char8_t.
859 (braced_list_to_string): Check for char-sized elements.
860
8612022-09-01 Jakub Jelinek <jakub@redhat.com>
862
863 PR c++/106655
864 * c.opt (-Winvalid-utf8): New warning.
865 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
866 Set cpp_opts->cpp_input_charset_explicit.
867 (c_common_post_options): If -finput-charset=UTF-8 is explicit
868 in C++23, enable -Winvalid-utf8 by default and if -pedantic
869 or -pedantic-errors, make it a pedwarn.
870
542c60c4
GA
8712022-08-31 Joseph Myers <joseph@codesourcery.com>
872
873 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
874 for LABEL_DECL.
875 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
876 decl_attributes.
877 * c-common.h (do_case, c_add_case_label): Update declarations.
878 * c-lex.cc (c_common_has_attribute): For C, produce a result of
879 201910 for fallthrough and 202106 for maybe_unused.
880
16f542d6
GA
8812022-08-26 Marek Polacek <polacek@redhat.com>
882
883 PR c++/81159
884 * c.opt (Wself-move): New option.
885
8862022-08-26 Jakub Jelinek <jakub@redhat.com>
887
888 * c-common.cc (check_builtin_function_arguments): Handle
889 BUILT_IN_ISSIGNALING.
890
8912022-08-26 Jakub Jelinek <jakub@redhat.com>
892
893 PR c++/106648
894 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
895 __cpp_named_character_escapes to 202207L.
896
5d4389dc
GA
8972022-08-25 Marek Polacek <polacek@redhat.com>
898
899 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
900 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
901 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
902 (struct c_common_resword): Resize the disable member.
903 (D_C2X): Add.
904 (nullptr_node): Define.
905 (nullptr_type_node): Define.
906 (NULLPTR_TYPE_P): Define.
907 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
908 NULLPTR_TYPE.
909 (c_pretty_printer::direct_abstract_declarator): Likewise.
910 (c_pretty_printer::constant): Likewise.
911
47a61e65
GA
9122022-08-16 Tom Honermann <tom@honermann.net>
913
914 PR c++/106423
915 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
916 diagnostics in C++20 and later.
917 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
918
5cd525f0
GA
9192022-08-11 Marek Polacek <polacek@redhat.com>
920
921 PR middle-end/102633
922 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
923 suppress_warning here.
924
5f17badb
GA
9252022-08-08 Tom Honermann <tom@honermann.net>
926
927 PR preprocessor/106426
928 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
929 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
930
9312022-08-08 Tom Honermann <tom@honermann.net>
932
933 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
934 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
935 enabled.
936 * c-opts.cc (c_common_post_options): Set flag_char8_t if
937 targeting C2x.
938
4a7274dd
GA
9392022-07-31 Lewis Hyatt <lhyatt@gmail.com>
940
941 PR c++/66290
942 * c-common.h: Rename global done_lexing to
943 override_libcpp_locations.
944 * c-common.cc (c_cpp_diagnostic): Likewise.
945 * c-opts.cc (c_common_finish): Set override_libcpp_locations
946 (formerly done_lexing) immediately prior to calling cpp_finish ().
947
1e2c5f4c
GA
9482022-07-27 Lewis Hyatt <lhyatt@gmail.com>
949
950 * c-ppoutput.cc (token_streamer::stream): Update input_location
951 prior to streaming each token.
952
0e6fa997
GA
9532022-07-23 Immad Mir <mirimmad@outlook.com>
954
955 * c-attribs.cc: (c_common_attribute_table): add three new attributes
956 namely: fd_arg, fd_arg_read and fd_arg_write.
957 (handle_fd_arg_attribute): New.
958
bdc7b765
GA
9592022-07-15 Marek Polacek <polacek@redhat.com>
960
961 PR c++/104477
962 * c-common.cc (c_common_reswords): Add
963 __reference_constructs_from_temporary and
964 __reference_converts_from_temporary.
965 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
966 RID_REF_CONVERTS_FROM_TEMPORARY.
967
9682022-07-15 Jonathan Wakely <jwakely@redhat.com>
969
970 * c-format.cc (class range_label_for_format_type_mismatch):
971 Adjust to new label_text API.
972
c72d4714
GA
9732022-07-11 Lewis Hyatt <lhyatt@gmail.com>
974
975 PR preprocessor/106252
976 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
977 option argument prior to verifying the option was found.
978
6345c414
GA
9792022-07-07 David Malcolm <dmalcolm@redhat.com>
980
981 * c-format.cc (range_label_for_format_type_mismatch::get_text):
982 Update for removal of label_text::maybe_free in favor of automatic
983 memory management.
984
4bc92c3b
GA
9852022-07-06 Lewis Hyatt <lhyatt@gmail.com>
986
987 PR preprocessor/53920
988 PR c++/53431
989 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
990 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
991 (c_pp_stream_token): Declare.
992 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
993 pragmas to...
994 (should_output_pragmas): ...here. New function.
995 (token_streamer::stream): Support handling early pragmas.
996 (do_line_change): Likewise.
997 (c_pp_stream_token): New function.
998 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
999 (pragma_diagnostic_lex_normal): New function. Moved logic for
1000 interpreting GCC diagnostic pragmas here.
1001 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
1002 directly from libcpp.
1003 (handle_pragma_diagnostic): Refactor into helper function...
1004 (handle_pragma_diagnostic_impl): ...here. New function.
1005 (handle_pragma_diagnostic_early): New function.
1006 (handle_pragma_diagnostic_early_pp): New function.
1007 (struct pragma_ns_name): Renamed to...
1008 (struct pragma_pp_data): ...this. Add new "early_handler" member.
1009 (c_register_pragma_1): Support early pragmas in the preprocessor.
1010 (c_register_pragma_with_early_handler): New function.
1011 (c_register_pragma): Support the new early handlers in struct
1012 internal_pragma_handler.
1013 (c_register_pragma_with_data): Likewise.
1014 (c_register_pragma_with_expansion): Likewise.
1015 (c_register_pragma_with_expansion_and_data): Likewise.
1016 (c_invoke_early_pragma_handler): New function.
1017 (c_pp_invoke_early_pragma_handler): New function.
1018 (init_pragma): Add early pragma support for diagnostic pragmas.
1019 * c-pragma.h (struct internal_pragma_handler): Add new early handler
1020 members.
1021 (c_register_pragma_with_early_handler): Declare.
1022 (c_invoke_early_pragma_handler): Declare.
1023 (c_pp_invoke_early_pragma_handler): Declare.
1024
d1f3a3ff
GA
10252022-07-05 Marek Polacek <polacek@redhat.com>
1026
1027 PR c++/105626
1028 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
1029 u8 strings.
1030
ed974488
GA
10312022-07-01 Marek Polacek <polacek@redhat.com>
1032
1033 PR c++/106111
1034 * c-common.h (enum rid): Update RID_LAST_CXX20.
1035
976196b3
GA
10362022-06-30 Jonathan Wakely <jwakely@redhat.com>
1037
1038 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
1039 names.
1040
84c2131d
GA
10412022-06-24 Jason Merrill <jason@redhat.com>
1042
1043 PR c++/87729
1044 PR c++/20423
1045 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
1046
4390e7bf
GA
10472022-06-18 Jakub Jelinek <jakub@redhat.com>
1048
1049 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
1050 Use flag_sanitize_trap & SANITIZE_??? instead of
1051 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
1052 and flag_sanitize_trap differs for them, emit __builtin_trap only
1053 for the comparison where trap is requested.
1054 (ubsan_instrument_vla, ubsan_instrument_return): Use
1055 lag_sanitize_trap & SANITIZE_??? instead of
1056 flag_sanitize_undefined_trap_on_error.
1057
c3642271
GA
10582022-06-13 Jason Merrill <jason@redhat.com>
1059
1060 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
1061
d9176e64
GA
10622022-05-27 Marek Polacek <polacek@redhat.com>
1063
1064 PR c/90658
1065 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
1066
10672022-05-27 Jakub Jelinek <jakub@redhat.com>
1068
1069 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
1070
57f2ce6a
GA
10712022-05-20 David Malcolm <dmalcolm@redhat.com>
1072
1073 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
1074 and "override".
1075 * c-pretty-print.h: Likewise.
1076
1cda629f
GA
10772022-05-18 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/105131
1080 * c.opt (Wenum-int-mismatch): New.
1081
10822022-05-18 Marek Polacek <polacek@redhat.com>
1083
1084 PR c++/105497
1085 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
1086 enumerator when it was marked with attribute unused.
1087
10882022-05-18 Eric Botcazou <ebotcazou@adacore.com>
1089
1090 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
1091 floating-point complex types.
1092 <POINTER_TYPE>: Do not use limited_with clause if the designated
1093 type is a scalar type.
1094
3d9439b1
GA
10952022-05-17 Jakub Jelinek <jakub@redhat.com>
1096
1097 * c-omp.cc (c_finish_omp_depobj): Handle
1098 OMP_CLAUSE_DEPEND_INOUTSET.
1099
702bd11f
GA
11002022-05-16 Jason Merrill <jason@redhat.com>
1101
1102 PR c/105492
1103 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
1104 here.
1105
11062022-05-16 Martin Liska <mliska@suse.cz>
1107
1108 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
1109 (c_common_nodes_and_builtins): Likewise.
1110 * c-format.cc (check_tokens): Likewise.
1111 (check_plain): Likewise.
1112 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
1113 (init_pragma): Likewise.
1114 * known-headers.cc (get_string_macro_hint): Likewise.
1115 (get_stdlib_header_for_name): Likewise.
1116 * c-attribs.cc: Likewise.
1117
9df4ffe4
GA
11182022-05-13 Richard Biener <rguenther@suse.de>
1119
1120 * c-omp.cc: Remove gimple-fold.h include.
1121
49ace834
GA
11222022-05-12 Jakub Jelinek <jakub@redhat.com>
1123
1124 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
1125 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
1126 if null_pointer_node.
1127
d0d513b5
GA
11282022-05-11 Martin Liska <mliska@suse.cz>
1129
1130 PR target/105355
1131 * c-opts.cc (c_common_handle_option): Change option name.
1132 * c.opt: Remove Joined and use Separate option.
1133
bd022ff9
GA
11342022-05-09 Alex Coplan <alex.coplan@arm.com>
1135
1136 * c-common.h (get_dump_info): Delete.
1137 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
1138 from the global dump_manager instead of the (now obsolete)
1139 get_dump_info.
1140 * c-opts.cc (original_dump_file): Delete.
1141 (original_dump_flags): Delete.
1142 (c_common_parse_file): Switch to using global dump_manager to
1143 manage the original dump file; fix leak of dump file.
1144 (get_dump_info): Delete.
1145
a1947c92
GA
11462022-05-07 Marek Polacek <polacek@redhat.com>
1147
1148 PR c++/101833
1149 PR c++/47634
1150 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
1151 with FN being either a function declaration or function type. Use
1152 maybe_adjust_arg_pos_for_attribute.
1153 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
1154 check_function_format.
1155 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
1156 (positional_argument): Adjust.
1157 * c-format.cc (get_constant): Rename to ...
1158 (validate_constant): ... this. Take EXPR by reference. Return bool
1159 instead of tree.
1160 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
1161 return value of validate_constant.
1162 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
1163 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
1164 (check_function_format): Adjust a parameter name.
1165 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
1166
3e7db517
GA
11672022-05-04 Marek Polacek <polacek@redhat.com>
1168
1169 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
1170 char to int.
1171
95874f95
GA
11722022-04-30 Jason Merrill <jason@redhat.com>
1173
1174 PR c/100545
1175 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
1176 and typedef.
1177 * c-common.cc (set_underlying_type): Add assert.
1178
01ad093b
GA
11792022-04-26 Patrick Palka <ppalka@redhat.com>
1180
1181 PR c++/105304
1182 * c-common.cc (verify_tree) [restart]: Move up to before the
1183 NULL test.
1184
da066c42
GA
11852022-04-11 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR c++/105186
1188 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
1189 and __int%d__ builtin types, initialize corresponding ridpointers
1190 entry.
1191
150ab50f
GA
11922022-03-30 Marek Polacek <polacek@redhat.com>
1193
1194 PR c++/101030
1195 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
1196 conversion_warning when OP1 is null.
1197
11982022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1199
1200 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
1201 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
1202 option properties.
1203
12042022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1205
1206 * c.opt (Wuse-after-free): Remove.
1207
12082022-03-30 Thomas Schwinge <thomas@codesourcery.com>
1209
1210 * c.opt (Warray-bounds): Remove.
1211
d2906412
GA
12122022-03-26 Thomas Schwinge <thomas@codesourcery.com>
1213
1214 * c.opt: Properly quote comment.
1215
31e989a2
GA
12162022-03-25 Eric Botcazou <ebotcazou@adacore.com>
1217
1218 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
1219 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
1220 the referenced type instead. Deal with the anonymous original type
1221 of a typedef'ed type. In the actual access case, follow the chain
1222 of external subtypes.
1223 <TYPE_DECL>: Tidy up control flow.
1224
d156bb87
GA
12252022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
1226
1227 * c-ada-spec.cc: Change array length
1228
d7f00da1
GA
12292022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
1230
1231 * c-common.cc (c_family_tests): Call the new tests.
1232 * c-common.h (c_diagnostic_tests): Declare.
1233 (c_opt_problem_cc_tests): Likewise.
1234
12352022-03-19 Jakub Jelinek <jakub@redhat.com>
1236
1237 PR c++/101515
1238 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
1239 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
1240 be printed.
1241
9fc8f278
GA
12422022-03-16 Christophe Lyon <christophe.lyon@arm.com>
1243 Roger Sayle <roger@nextmovesoftware.com>
1244
1245 PR c/98198
1246 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
1247
12482022-03-16 Patrick Palka <ppalka@redhat.com>
1249
1250 PR c++/96780
1251 * c.opt: Add -ffold-simple-inlines.
1252
b9756c08
GA
12532022-03-13 Tobias Burnus <tobias@codesourcery.com>
1254
1255 * c-target.def (check_string_object_format_arg): Fix description typo.
1256
57eeedda
GA
12572022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1258
1259 PR other/65095
1260 * c-common.h (c_omp_map_clause_name): Remove.
1261 * c-omp.cc (c_omp_map_clause_name): Remove.
1262
8cc4f9cd
GA
12632022-03-09 Jakub Jelinek <jakub@redhat.com>
1264
1265 PR c/104711
1266 * c-opts.cc (c_common_post_options): Don't enable
1267 -Wshift-negative-value from -Wextra for C++20 or later.
1268 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
1269 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
1270 instead of TYPE_UNSIGNED.
1271
e6533e2e
GA
12722022-03-07 Jakub Jelinek <jakub@redhat.com>
1273
1274 * c-attribs.cc: Fix up duplicated word issue in a comment.
1275
12d4552e
GA
12762022-03-01 Martin Liska <mliska@suse.cz>
1277
1278 PR ipa/104533
1279 * c-attribs.cc (handle_target_clones_attribute): Use
1280 get_target_clone_attr_len and report warning soon.
1281
0bdb0498
GA
12822022-02-17 Jonathan Wakely <jwakely@redhat.com>
1283
1284 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
1285 (handle_pragma_weak): Likewise.
1286 (handle_pragma_scalar_storage_order): Likewise.
1287 (handle_pragma_redefine_extname): Likewise.
1288 (handle_pragma_visibility): Likewise.
1289 (handle_pragma_diagnostic): Likewise.
1290 (handle_pragma_target): Likewise.
1291 (handle_pragma_optimize): Likewise.
1292 (handle_pragma_push_options): Likewise.
1293 (handle_pragma_pop_options): Likewise.
1294 (handle_pragma_reset_options): Likewise.
1295 (handle_pragma_message): Likewise.
1296 (handle_pragma_float_const_decimal64): Likewise.
1297
cb3afcd2
GA
12982022-02-16 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR c/104531
1301 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
1302 build_binary_op with LT_EXPR and only if that doesn't return
1303 error_mark_node call build_modify_expr.
1304
13052022-02-16 Jakub Jelinek <jakub@redhat.com>
1306
1307 PR c/104510
1308 * c-common.cc (shorten_compare): Convert original arguments to
1309 the original *restype_ptr when mixing binary and decimal float.
1310
1f8a09d2
GA
13112022-02-14 Richard Biener <rguenther@suse.de>
1312
1313 PR c/104505
1314 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
1315 internal function calls.
1316
e8d68f0a
GA
13172022-02-11 Richard Biener <rguenther@suse.de>
1318
1319 * c-attribs.cc (c_common_attribute_table): Add entry for
1320 vector_mask.
1321 (handle_vector_mask_attribute): New.
1322
a645583d
GA
13232022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1324
1325 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
1326 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
1327 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
1328
3adf509f
GA
13292022-02-09 Jason Merrill <jason@redhat.com>
1330
1331 * c-cppbuiltin.cc (c_cpp_builtins): Update values
1332 of __cpp_constexpr and __cpp_concepts for C++20.
1333
bb99171b
GA
13342022-01-24 Marek Polacek <polacek@redhat.com>
1335
1336 PR preprocessor/104030
1337 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
1338
9dd44357
GA
13392022-01-21 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c++/104148
1342 * c-common.h (check_function_arguments_recurse): Add for_format
1343 arg.
1344 * c-common.cc (check_function_nonnull): Pass false to
1345 check_function_arguments_recurse's last argument.
1346 (check_function_arguments_recurse): Add for_format argument,
1347 if true, don't stop on warning_suppressed_p.
1348 * c-format.cc (check_format_info): Pass true to
1349 check_function_arguments_recurse's last argument.
1350
fe1ad141
GA
13512022-01-19 David Malcolm <dmalcolm@redhat.com>
1352
1353 * c-common.cc (c_common_c_tests): Rename to...
1354 (c_common_cc_tests): ...this.
1355 (c_family_tests): Update calls for .c to .cc renaming.
1356 * c-common.h (c_format_c_tests): Rename to...
1357 (c_format_cc_tests): ...this.
1358 (c_indentation_c_tests): Rename to...
1359 (c_indentation_cc_tests): ...this.
1360 (c_pretty_print_c_tests): Rename to...
1361 (c_pretty_print_cc_tests): ...this.
1362 * c-format.cc (c_format_c_tests): Rename to...
1363 (c_format_cc_tests): ...this.
1364 * c-indentation.cc (c_indentation_c_tests): Rename to...
1365 (c_indentation_cc_tests): ...this.
1366 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1367 (c_pretty_print_cc_tests): ...this.
1368
fc829782
GA
13692022-01-17 Martin Liska <mliska@suse.cz>
1370
1371 * c-ada-spec.cc: Rename .c names to .cc.
1372 * c-ada-spec.h: Likewise.
1373 * c-common.cc (c_build_vec_convert): Likewise.
1374 (warning_candidate_p): Likewise.
1375 * c-common.h (enum rid): Likewise.
1376 (build_real_imag_expr): Likewise.
1377 (finish_label_address_expr): Likewise.
1378 (c_get_substring_location): Likewise.
1379 (c_build_bind_expr): Likewise.
1380 (conflict_marker_get_final_tok_kind): Likewise.
1381 (c_parse_error): Likewise.
1382 (check_missing_format_attribute): Likewise.
1383 (invalid_array_size_error): Likewise.
1384 (warn_for_multistatement_macros): Likewise.
1385 (build_attr_access_from_parms): Likewise.
1386 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1387 * c-format.cc: Likewise.
1388 * c-gimplify.cc (c_gimplify_expr): Likewise.
1389 * c-indentation.h: Likewise.
1390 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1391 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1392 * c-opts.cc (c_common_post_options): Likewise.
1393 (set_std_cxx23): Likewise.
1394 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1395 * c-pretty-print.h: Likewise.
1396
13972022-01-17 Martin Liska <mliska@suse.cz>
1398
1399 * c-ada-spec.c: Moved to...
1400 * c-ada-spec.cc: ...here.
1401 * c-attribs.c: Moved to...
1402 * c-attribs.cc: ...here.
1403 * c-common.c: Moved to...
1404 * c-common.cc: ...here.
1405 * c-cppbuiltin.c: Moved to...
1406 * c-cppbuiltin.cc: ...here.
1407 * c-dump.c: Moved to...
1408 * c-dump.cc: ...here.
1409 * c-format.c: Moved to...
1410 * c-format.cc: ...here.
1411 * c-gimplify.c: Moved to...
1412 * c-gimplify.cc: ...here.
1413 * c-indentation.c: Moved to...
1414 * c-indentation.cc: ...here.
1415 * c-lex.c: Moved to...
1416 * c-lex.cc: ...here.
1417 * c-omp.c: Moved to...
1418 * c-omp.cc: ...here.
1419 * c-opts.c: Moved to...
1420 * c-opts.cc: ...here.
1421 * c-pch.c: Moved to...
1422 * c-pch.cc: ...here.
1423 * c-ppoutput.c: Moved to...
1424 * c-ppoutput.cc: ...here.
1425 * c-pragma.c: Moved to...
1426 * c-pragma.cc: ...here.
1427 * c-pretty-print.c: Moved to...
1428 * c-pretty-print.cc: ...here.
1429 * c-semantics.c: Moved to...
1430 * c-semantics.cc: ...here.
1431 * c-ubsan.c: Moved to...
1432 * c-ubsan.cc: ...here.
1433 * c-warn.c: Moved to...
1434 * c-warn.cc: ...here.
1435 * cppspec.c: Moved to...
1436 * cppspec.cc: ...here.
1437 * stub-objc.c: Moved to...
1438 * stub-objc.cc: ...here.
1439
9248ee41
GA
14402022-01-15 Martin Sebor <msebor@redhat.com>
1441
1442 PR c/63272
1443 * c.opt (-Wdangling-pointer): New option.
1444
14452022-01-15 Martin Sebor <msebor@redhat.com>
1446
1447 PR tree-optimization/80532
1448 * c.opt (-Wuse-after-free): New options.
1449
617db51d
GA
14502022-01-14 David Malcolm <dmalcolm@redhat.com>
1451
1452 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1453 (handle_tainted_args_attribute): New.
1454
ad3f0d08
GA
14552022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1456 Jason Merrill <jason@redhat.com>
1457
1458 PR c++/70417
1459 * c.opt: Added -Wmissing-template-keyword.
1460
14612022-01-13 Richard Biener <rguenther@suse.de>
1462
1463 PR c/104002
1464 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1465
02a8a01b
GA
14662022-01-12 Martin Liska <mliska@suse.cz>
1467
1468 PR target/103804
1469 * c-attribs.c (handle_optimize_attribute): Do not call
1470 cl_optimization_compare if we seen an error.
1471
01a254e3
GA
14722022-01-11 Jakub Jelinek <jakub@redhat.com>
1473
1474 PR c/101537
1475 PR c/103881
1476 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1477 and BIT_XOR_EXPR.
1478
d9450aa0
GA
14792022-01-10 Richard Biener <rguenther@suse.de>
1480
1481 PR middle-end/101530
1482 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1483 in a TARGET_EXPR to force a temporary.
1484
11ce8d04
GA
14852022-01-06 Marek Polacek <polacek@redhat.com>
1486
1487 PR c++/103758
1488 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1489 diagnostic messages.
1490 (handle_pragma_diagnostic): Likewise.
1491
a4ae8c37
GA
14922022-01-03 Marek Polacek <polacek@redhat.com>
1493
1494 PR c++/103758
1495 * c-format.c (check_tokens): Accept "decl-specifier*".
1496
14972022-01-03 Jakub Jelinek <jakub@redhat.com>
1498
1499 PR c++/103600
1500 * c-attribs.c (handle_non_overlapping_attribute): New function.
1501 (c_common_attribute_table): Add "non overlapping" attribute.
1502
84790a9d
GA
15032021-12-30 Jakub Jelinek <jakub@redhat.com>
1504
1505 PR c++/103012
1506 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1507 cpp_define_unused/cpp_undef calls with forced token locations
1508 BUILTINS_LOCATION.
1509
d1e111da
GA
15102021-12-27 Patrick Palka <ppalka@redhat.com>
1511
1512 PR c++/103700
1513 * c-common.c (pointer_int_sum): When quiet, return
1514 error_mark_node for an incomplete pointed-to type and don't
1515 call size_in_bytes_loc.
1516
2554e2da
GA
15172021-12-17 Jason Merrill <jason@redhat.com>
1518
1519 PR c++/103681
1520 * c-opts.c (c_common_post_options): Update defaults.
1521
774269aa
GA
15222021-12-16 Martin Liska <mliska@suse.cz>
1523
1524 PR target/103709
1525 * c-pragma.c (handle_pragma_pop_options): Do not check
1526 global options modification when an error is seen in parsing
1527 of options (pragmas or attributes).
1528
c8dcf64b
GA
15292021-12-12 Jonathan Wakely <jwakely@redhat.com>
1530
1531 * known-headers.cc: Define INCLUDE_MEMORY instead of
1532 INCLUDE_UNIQUE_PTR.
1533 * name-hint.h: Likewise.
1534 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1535
4b4839e3
GA
15362021-12-09 Jakub Jelinek <jakub@redhat.com>
1537
1538 PR pch/71934
1539 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1540 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1541
03a9bd05
GA
15422021-12-03 Jakub Jelinek <jakub@redhat.com>
1543
1544 PR pch/71934
1545 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1546 (pch_init): Don't initialize v.pch_init.
1547 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1548
40fa651e
GA
15492021-12-01 Jason Merrill <jason@redhat.com>
1550
1551 PR c++/103310
1552 * c.opt: Add -fconstexpr-fp-except.
1553
87cd82c8
GA
15542021-11-29 Richard Biener <rguenther@suse.de>
1555
1556 * c-format.c (check_format_string): Remove spurious
1557 gcc_unreachable.
1558
15592021-11-29 Richard Biener <rguenther@suse.de>
1560
1561 * c-opts.c (c_common_post_options): Remove unreachable return.
1562 * c-pragma.c (handle_pragma_target): Likewise.
1563 (handle_pragma_optimize): Likewise.
1564
091ccc06
GA
15652021-11-25 Jakub Jelinek <jakub@redhat.com>
1566
1567 PR c++/102611
1568 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1569 default for C++23 regardless of warn_deprecated.
1570 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1571 __cpp_multidimensional_subscript=202110L for C++23.
1572
e1d43592
GA
15732021-11-23 Martin Sebor <msebor@redhat.com>
1574
1575 PR middle-end/88232
1576 * c.opt: Add -Winfinite-recursion.
1577
9c077398
GA
15782021-11-19 Martin Sebor <msebor@redhat.com>
1579
1580 PR c++/33925
1581 PR c/102867
1582 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1583 and improve handling tof defined symbols.
1584
15852021-11-19 Martin Liska <mliska@suse.cz>
1586
1587 Revert:
1588 2021-11-18 Martin Liska <mliska@suse.cz>
1589
1590 * c-gimplify.c (genericize_c_loop): Use option directly.
1591
483092d3
GA
15922021-11-18 Matthias Kretz <m.kretz@gsi.de>
1593
1594 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1595 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1596
15972021-11-18 Martin Liska <mliska@suse.cz>
1598
1599 * c-gimplify.c (genericize_c_loop): Use option directly.
1600
280d2838
GA
16012021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1602
1603 PR c/91038
1604 PR c/29970
1605 * c-common.c (pointer_int_sum): Make sure pointer expressions
1606 are evaluated first when the size expression depends on for
1607 variably-modified types.
1608
16092021-11-17 Marek Polacek <polacek@redhat.com>
1610
1611 PR preprocessor/103026
1612 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1613
6b1695f4
GA
16142021-11-16 Jason Merrill <jason@redhat.com>
1615
1616 * c-common.c (release_tree_vector): Only cache vecs smaller than
1617 16 elements.
1618
e2b57363
GA
16192021-11-15 Jason Merrill <jason@redhat.com>
1620
1621 * c.opt: Add -fimplicit-constexpr.
1622 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1623 * c-opts.c (c_common_post_options): Disable below C++14.
1624
16252021-11-15 Jakub Jelinek <jakub@redhat.com>
1626
1627 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1628 Duplicate to both OMP_TARGET and OMP_TEAMS.
1629
8d36a0d2
GA
16302021-11-10 Marek Polacek <polacek@redhat.com>
1631
1632 PR c++/101940
1633 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1634 ignored_attributes.
1635
c9b1334e
GA
16362021-11-09 David Malcolm <dmalcolm@redhat.com>
1637
1638 * c-pragma.c (GCC_BAD_AT): New macro.
1639 (GCC_BAD2_AT): New macro.
1640 (handle_pragma_pack): Use the location of the pertinent token when
1641 issuing diagnostics about invalid constants/actions, and trailing
1642 junk.
1643 (handle_pragma_target): Likewise for non-string "GCC option".
1644 (handle_pragma_message): Likewise for trailing junk.
1645
18ae471f
GA
16462021-11-03 Joseph Myers <joseph@codesourcery.com>
1647
1648 PR c/103031
1649 * c-common.c (convert_and_check): Add argument init_const. Call
1650 convert_init if init_const.
1651 * c-common.h (convert_and_check): Update prototype.
1652 (convert_init): New prototype.
1653
cf82e8d9
GA
16542021-11-01 David Malcolm <dmalcolm@redhat.com>
1655
1656 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1657 CPP_OTHER tokens, set the "escape on output" flag.
1658
04a2cf3f
GA
16592021-10-27 Jakub Jelinek <jakub@redhat.com>
1660
1661 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1662 POINTER_PLUS_EXPR.
1663 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1664 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1665
16662021-10-27 Jakub Jelinek <jakub@redhat.com>
1667
1668 PR c++/102854
1669 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1670 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1671 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1672 conversions temporarily clear the 3rd bit from d->kind while walking
1673 subtrees.
1674 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1675 if possibly non-rectangular.
1676
ae5c5406
GA
16772021-10-21 Jakub Jelinek <jakub@redhat.com>
1678
1679 PR middle-end/64888
1680 * c-omp.c (c_omp_predefined_variable): Return true also for
1681 ubsan_create_data created artificial variables.
1682
5d5885c9
GA
16832021-10-14 Joseph Myers <joseph@codesourcery.com>
1684
1685 * c-format.c (printf_length_specs, scanf_length_specs)
1686 (print_char_table, scan_char_table): Support DFP formats for C2X.
1687 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1688 (T2X_D32, T2X_D64, T2X_D128): New macros.
1689
16902021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1691
1692 * c-omp.c (c_omp_check_context_selector): Rename to
1693 omp_check_context_selector and move to omp-general.c.
1694 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1695 move to omp-general.c.
1696
52055987
GA
16972021-10-12 Joseph Myers <joseph@codesourcery.com>
1698
1699 * c-format.c (print_char_table): Add %b and %B formats.
1700 (scan_char_table): Add %b format.
1701 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1702 (T2X_UPD, T2X_UIM): New macros.
1703
17042021-10-12 Jakub Jelinek <jakub@redhat.com>
1705
1706 * c-omp.c (c_finish_omp_atomic): Use
1707 clear_padding_type_may_have_padding_p.
1708
ce6eec39
GA
17092021-10-08 Martin Liska <mliska@suse.cz>
1710
1711 * c-opts.c (c_common_post_options): Use new macro
1712 OPTION_SET_P.
1713
50e20ee6
GA
17142021-10-07 Martin Liska <mliska@suse.cz>
1715
1716 * c-common.c (parse_optimize_options): Make
1717 save_opt_decoded_options a pointer type.
1718
57c7ec62
GA
17192021-10-06 Jakub Jelinek <jakub@redhat.com>
1720
1721 PR tree-optimization/102571
1722 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1723 padding, but the non-padding bits are contiguous set of bytes
1724 by adjusting the memcmp call arguments instead of emitting
1725 __builtin_clear_padding and then comparing all the type's bytes.
1726
17272021-10-06 Jakub Jelinek <jakub@redhat.com>
1728
1729 PR c++/102612
1730 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1731 __cpp_constexpr to 202110L rather than 201907L.
1732
da9c5f78
GA
17332021-10-04 Marek Polacek <polacek@redhat.com>
1734
1735 PR c++/97573
1736 * c-common.h (do_warn_array_compare): Declare.
1737 * c-warn.c (do_warn_array_compare): New.
1738 * c.opt (Warray-compare): New option.
1739
e3e07b89
GA
17402021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1741
1742 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1743 NULL, this is not needed.
1744
9d116bcc
GA
17452021-10-01 Martin Sebor <msebor@redhat.com>
1746
1747 PR c/102103
1748 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1749 Check and perform warning suppression.
1750 (c_common_truthvalue_conversion): Enhance warning suppression.
1751
17522021-10-01 Martin Liska <mliska@suse.cz>
1753
1754 PR target/102552
1755 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1756 used for program name, so merged_decoded_options should also
1757 respect that.
9d116bcc
GA
1758
17592021-10-01 Jakub Jelinek <jakub@redhat.com>
1760 Richard Biener <rguenther@suse.de>
1761
1762 PR sanitizer/102515
1763 * c-ubsan.c (ubsan_instrument_division): Check the right
1764 flag_sanitize_recover bit, depending on which sanitization
1765 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1766 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1767 and SANITIZE_DIVIDE is enabled, neither check is known
1768 to be false and flag_sanitize_recover bits for those two
1769 aren't the same, emit both __ubsan_handle_divrem_overflow
1770 and __ubsan_handle_divrem_overflow_abort calls.
1771
17722021-10-01 Martin Liska <mliska@suse.cz>
1773
1774 * c-common.c (parse_optimize_options): Combine optimize
1775 options with what was provided on the command line.
1776
17772021-10-01 Jakub Jelinek <jakub@redhat.com>
1778
1779 * c-omp.c (c_omp_split_clauses): Also copy
1780 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1781
cf966403
GA
17822021-09-27 Martin Liska <mliska@suse.cz>
1783
1784 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1785 x_flag_default_complex_method.
cf966403 1786
e4777439
GA
17872021-09-22 Jakub Jelinek <jakub@redhat.com>
1788
1789 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1790
62498024
GA
17912021-09-20 Matthias Kretz <m.kretz@gsi.de>
1792
1793 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1794 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1795 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1796 __ROUNDING_MATH__ according to the new optimization flags.
1797
cf74e7b5
GA
17982021-09-18 Jakub Jelinek <jakub@redhat.com>
1799
1800 * c-omp.c (c_omp_split_clauses): Split order clause also to
1801 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1802
0a4cb439
GA
18032021-09-17 Jakub Jelinek <jakub@redhat.com>
1804
1805 * c-omp.c (c_finish_omp_atomic): Avoid creating
1806 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1807 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1808 had NULL initializer. When omitting operands after v = x,
1809 use type of v rather than type of x. Fix type of vtmp
1810 TARGET_EXPR.
1811
07985c47
GA
18122021-09-13 Jason Merrill <jason@redhat.com>
1813
1814 * c.opt: Add -Winterference-size.
1815 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1816 and __GCC_CONSTRUCTIVE_SIZE.
1817
a26206ec
GA
18182021-09-10 Jakub Jelinek <jakub@redhat.com>
1819
1820 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1821 * c-omp.c: Include gimple-fold.h.
1822 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1823 OpenMP 5.1 atomics.
1824
f84e2f0b
GA
18252021-09-09 qing zhao <qing.zhao@oracle.com>
1826
1827 * c-attribs.c (handle_uninitialized_attribute): New function.
1828 (c_common_attribute_table): Add "uninitialized" attribute.
1829
b6db7cd4
GA
18302021-09-08 liuhongt <hongtao.liu@intel.com>
1831
1832 * c-common.c (excess_precision_mode_join): Update below comments.
1833 (c_ts18661_flt_eval_method): Set excess_precision_type to
1834 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1835 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1836 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1837 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1838
b2748138
GA
18392021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1840
1841 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1842
7b739540
GA
18432021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1844
1845 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1846 and -gnatwu warning for the package specification.
1847
e11c6046
GA
18482021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1849
1850 * c-attribs.c (handle_unavailable_attribute): New.
1851
1e2f030b
GA
18522021-08-30 Jason Merrill <jason@redhat.com>
1853
1854 * c.opt: Add -Wmissing-requires.
1855
85d77ac4
GA
18562021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1857
1858 PR other/93067
1859 * c-opts.c (c_common_input_charset_cb): New function.
1860 (c_common_post_options): Call new function
1861 diagnostic_initialize_input_context().
1862
7c9e1645
GA
18632021-08-20 Tobias Burnus <tobias@codesourcery.com>
1864
1865 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1866 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1867 "di" and "u", respecitively; fill with BADLEN to match
1868 size of 'types'.
1869 (get_init_dynamic_hwi): Split off from ...
1870 (init_dynamic_diag_info): ... here. Call it.
1871 (init_dynamic_gfc_info): Call it.
1872
18732021-08-20 Jakub Jelinek <jakub@redhat.com>
1874
1875 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1876 * c-pragma.c (omp_pragmas): Add error directive.
1877 * c-omp.c (omp_directives): Uncomment error directive entry.
1878
6e529985
GA
18792021-08-18 Jakub Jelinek <jakub@redhat.com>
1880
1881 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1882 * c-pragma.c (omp_pragmas): Add nothing directive.
1883 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1884
2d14d64b
GA
18852021-08-17 Jakub Jelinek <jakub@redhat.com>
1886
1887 PR c++/101539
1888 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1889 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1890
18912021-08-17 Matt Jacobson <mhjacobson@me.com>
1892
1893 * c-opts.c (c_common_post_options): Default to
1894 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1895
18962021-08-17 Jakub Jelinek <jakub@redhat.com>
1897
1898 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1899 * c-pragma.c (omp_pragmas): Add scope construct.
1900 * c-omp.c (omp_directives): Uncomment scope directive entry.
1901
9d1d9fc8
GA
19022021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1903
1904 * c-cppbuiltin.c (c_cpp_builtins): Define
1905 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1906
72be20e2
GA
19072021-08-12 Jakub Jelinek <jakub@redhat.com>
1908
1909 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1910 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1911 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1912 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1913 enumerator.
1914 (c_finish_omp_masked): Declare.
1915 * c-omp.c (c_finish_omp_masked): New function.
1916 (c_omp_split_clauses): Handle combined masked constructs.
1917
4d17ca1b
GA
19182021-07-30 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR c++/101539
1921 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1922 * c-common.c (c_common_reswords): Add
1923 __is_pointer_interconvertible_base_of.
1924
19252021-07-29 Richard Biener <rguenther@suse.de>
1926
1927 PR c/101512
1928 * c-common.c (c_common_mark_addressable_vec): Look through
1929 C_MAYBE_CONST_EXPR even if not at the toplevel.
1930
af3f12e6
GA
19312021-07-27 Martin Sebor <msebor@redhat.com>
1932
1933 PR c/101585
1934 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1935
ead235f6
GA
19362021-07-23 Jakub Jelinek <jakub@redhat.com>
1937
1938 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1939 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1940 and later.
1941
19422021-07-23 Jakub Jelinek <jakub@redhat.com>
1943
1944 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1945 PRAGMA_OMP__LAST_ enumerators.
1946
419c6c68
GA
19472021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1948 Joseph Myers <joseph@codesourcery.com>
1949 Cesar Philippidis <cesar@codesourcery.com>
1950
1951 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1952
92d45509
GA
19532021-07-20 Martin Sebor <msebor@redhat.com>
1954
1955 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1956 by-const-reference.
1957 * c-common.h (c_build_shufflevector): Same.
1958
87277b6a
GA
19592021-07-16 Andrew Pinski <apinski@marvell.com>
1960
1961 PR c/101453
1962 * c-common.c (parse_optimize_options): Use the correct
1963 size for buffer.
1964
d97d71a1
GA
19652021-07-15 Martin Sebor <msebor@redhat.com>
1966
1967 PR c/101289
1968 PR c/97548
1969 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1970
c4fee1c6
GA
19712021-07-14 Jason Merrill <jason@redhat.com>
1972
1973 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1974
6fba0eea
GA
19752021-07-06 Martin Sebor <msebor@redhat.com>
1976
1977 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1978 (gcc_cdiag_char_table): Same.
1979 (gcc_cxxdiag_char_table): Same.
6fba0eea 1980
7a60a6e8
GA
19812021-07-02 Jakub Jelinek <jakub@redhat.com>
1982
1983 * c-common.h (enum c_omp_directive_kind): New enum.
1984 (struct c_omp_directive): New type.
1985 (c_omp_categorize_directive): Declare.
1986 * c-omp.c (omp_directives): New variable.
1987 (c_omp_categorize_directive): New function.
1988
bea7c16a
GA
19892021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1990
1991 * c-ada-spec.c (packed_layout): New global variable.
1992 (dump_ada_declaration): Set it upon seeing a packed record type.
1993 Do not put the "aliased" keyword if it is set.
1994 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1995
19962021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1997
1998 * c-ada-spec.c (check_name): Rename into...
1999 (check_type_name_conflict): ...this. Minor tweak.
2000 (dump_ada_function_declaration): Adjust to above renaming.
2001 (dump_ada_array_domains): Fix oversight.
2002 (dump_ada_declaration): Call check_type_name_conflict for variables.
2003
90708f87
GA
20042021-06-25 Martin Sebor <msebor@redhat.com>
2005
2006 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
2007 (c_common_truthvalue_conversion): Replace direct uses of
2008 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
2009 copy_no_warning.
2010 (check_function_arguments_recurse): Same.
2011 * c-gimplify.c (c_gimplify_expr): Same.
2012 * c-warn.c (overflow_warning): Same.
2013 (warn_logical_operator): Same.
2014 (warn_if_unused_value): Same.
2015 (do_warn_unused_parameter): Same.
2016
9aa8327e
GA
20172021-06-24 Jakub Jelinek <jakub@redhat.com>
2018
2019 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
2020 C_ORT_OMP_TARGET.
2021 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
2022 combined target constructs also add map (always, tofrom:) clause.
2023
ede6c356
GA
20242021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2025
2026 * c-attribs.c (common_handle_aligned_attribute): Remove short
2027 circuit and dead code.
2028
8dc48181
GA
20292021-06-14 Jonathan Wakely <jwakely@redhat.com>
2030
2031 PR c++/101052
2032 * known-headers.cc (get_stdlib_header_for_name): Add known
2033 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
2034 exit, and getenv.
2035
8b8c3912
GA
20362021-06-12 Jason Merrill <jason@redhat.com>
2037
2038 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
2039
f16f65f8
GA
20402021-06-11 Jakub Jelinek <jakub@redhat.com>
2041
2042 PR c++/100974
2043 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
2044 -std=c++2b for P1938R3 consteval if support.
2045
4f625f47
GA
20462021-06-09 Jason Merrill <jason@redhat.com>
2047
2048 PR c++/100879
2049 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
2050 warning.
2051
438aac59
GA
20522021-06-07 Martin Liska <mliska@suse.cz>
2053
2054 * c-target.def: Split long lines and replace them
2055 with '\n\'.
2056
600f90cb
GA
20572021-06-04 Martin Sebor <msebor@redhat.com>
2058
2059 PR c/100783
2060 * c-attribs.c (positional_argument): Bail on erroneous types.
2061
20622021-06-04 Martin Sebor <msebor@redhat.com>
2063
2064 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
2065 for element presence.
2066
440c8a0a
GA
20672021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2068
2069 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
2070 (dump_ada_decl_name): Likewise.
2071 (dump_anonymous_type_name): Remove parent parameter and adjust.
2072 (dump_sloc): Minor tweak.
2073 (dump_ada_array_type): Remove type parameter and adjust.
2074 (dump_ada_enum_type): Remove parent parameter and adjust.
2075 (dump_ada_node): Adjust calls to above functions.
2076 (dumped_anonymous_types): New global variable.
2077 (dump_nested_types_1): Rename into...
2078 (dump_nested_types): ...this.
2079 (dump_nested_type): Remove parent and dumped_types parameters.
2080 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
2081 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
2082 (dump_ada_specs): Initialize and free dumped_anonymous_types.
2083
20842021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2085
2086 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
2087 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
2088
20892021-06-03 Eric Botcazou <ebotcazou@adacore.com>
2090
2091 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
2092 (htable_t): New typedef.
2093 (overloaded_names): Use it.
2094 (add_name): New function.
2095 (init_overloaded_names): Use add_name to populate the table and add
2096 special cases for sigaction and stat.
2097 (overloaded_name_p): Rename into...
2098 (overloading_index): ...this. Do not initialize overloaded_names table
2099 here. Return the index or zero.
2100 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
2101 but add an overloading suffix instead.
2102 (dump_ada_specs): Initialize overloaded_names tables here.
2103
b75978d1
GA
21042021-06-01 Martin Liska <mliska@suse.cz>
2105
2106 PR other/100759
2107 * c-attribs.c (handle_optimize_attribute): Limit sanity check
2108 to a situation where we are not in processing of an optimize
2109 pragma.
2110 * c-pragma.c (handle_pragma_pop_options): Restore target
2111 options.
2112
ee682192
GA
21132021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
2114
2115 PR testsuite/100749
2116 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
2117
21182021-05-31 Richard Biener <rguenther@suse.de>
2119
2120 PR c++/88601
2121 * c-common.c: Include tree-vector-builder.h and
2122 vec-perm-indices.h.
2123 (c_common_reswords): Add __builtin_shufflevector.
2124 (c_build_shufflevector): New funtion.
2125 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
2126 (c_build_shufflevector): Declare.
2127
48166757
GA
21282021-05-28 Jakub Jelinek <jakub@redhat.com>
2129
2130 PR middle-end/99928
2131 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
2132 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
2133
21342021-05-28 Tobias Burnus <tobias@codesourcery.com>
2135
2136 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
2137
2bc6dace
GA
21382021-05-25 Martin Liska <mliska@suse.cz>
2139
2140 PR tree-optimization/92860
2141 PR target/99592
2142 * c-attribs.c (handle_optimize_attribute): Save target node
2143 before calling parse_optimize_options and save it in case
2144 it changes.
2145 * c-pragma.c (handle_pragma_target): Similarly for pragma.
2146 (handle_pragma_pop_options): Likewise here.
2147
21482021-05-25 Martin Liska <mliska@suse.cz>
2149
2150 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
2151
21522021-05-25 Jakub Jelinek <jakub@redhat.com>
2153
2154 PR middle-end/99928
2155 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
2156 combined with simd and not with taskloop or for.
2157
2832d51b
GA
21582021-05-21 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR middle-end/99928
2161 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2162 on firstprivate clause copy going to target construct, and for
2163 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
2164
ea34e2ed
GA
21652021-05-20 Jonathan Wakely <jwakely@redhat.com>
2166
2167 * c.opt (Wc++11-extensions, Wc++14-extensions)
2168 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
2169 options.
2170
21712021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2172
2173 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
2174
21752021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
2176
2177 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
2178 * c-pch.c (struct c_pch_validity): Use type uint32_t.
2179 (pch_init): Renamed member.
2180 (c_common_valid_pch): Adjust access to debug_type_names.
2181
65f32e5d
GA
21822021-05-19 Martin Sebor <msebor@redhat.com>
2183
2184 PR c/100619
2185 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
2186 bounds.
2187
a8daf9a1
GA
21882021-05-18 Richard Biener <rguenther@suse.de>
2189
2190 PR c/100547
2191 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
2192 Reword existing nunit diagnostic.
2193
a7ffc1ef
GA
21942021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
2195
2196 * c-common.c (braced_list_to_string): Return CTOR unchanged
2197 if host and target character sizes don't match.
2198
87a7d10c
GA
21992021-05-14 Martin Liska <mliska@suse.cz>
2200
2201 * c.opt: Add Warning keyword for 2 options.
2202
f9af11c7
GA
22032021-05-13 Martin Liska <mliska@suse.cz>
2204
2205 PR middle-end/100504
2206 * c-attribs.c (handle_target_clones_attribute): Expect a string
2207 argument to target_clone argument.
2208
037e3661
GA
22092021-05-11 Joseph Myers <joseph@codesourcery.com>
2210
2211 * c-lex.c (interpret_float): Handle digit separators for C2X.
2212
aa891c56
GA
22132021-05-10 Martin Liska <mliska@suse.cz>
2214
2215 * c-ada-spec.c (print_destructor): Use startswith
2216 function instead of strncmp.
2217 (dump_ada_declaration): Likewise.
2218 * c-common.c (disable_builtin_function): Likewise.
2219 (def_builtin_1): Likewise.
2220 * c-format.c (check_tokens): Likewise.
2221 (check_plain): Likewise.
2222 (convert_format_name_to_system_name): Likewise.
2223
e4ff4ffb
GA
22242021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
2225
2226 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
2227 complex divide
2228
c0fa3f2f
GA
22292021-04-26 Thomas Schwinge <thomas@codesourcery.com>
2230 Nathan Sidwell <nathan@codesourcery.com>
2231 Tom de Vries <vries@codesourcery.com>
2232 Julian Brown <julian@codesourcery.com>
2233 Kwok Cheung Yeung <kcy@codesourcery.com>
2234
2235 * c.opt (Wopenacc-parallelism): New.
2236
6e81e015
GA
22372021-04-19 Thomas Schwinge <thomas@codesourcery.com>
2238
2239 * c.opt (fopenacc-kernels=): Remove.
2240
019a9220
GA
22412021-04-08 Jakub Jelinek <jakub@redhat.com>
2242
2243 * c-warn.c (do_warn_double_promotion): Fix comment typo,
2244 occured -> occurred.
2245 (check_alignment_of_packed_member): Fix a comment typo,
2246 memeber -> member.
2247 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
2248 and onless -> unless.
2249 (warn_parm_array_mismatch): Fix comment typos, declaratation
2250 -> declaration and woud -> would. Fix up comment indentation.
2251
22522021-04-08 Martin Sebor <msebor@redhat.com>
2253
2254 PR middle-end/99883
2255 * c.opt (Wmismatched-new-delete): Correct spelling.
2256
b1da9916
GA
22572021-04-05 Eric Botcazou <ebotcazou@adacore.com>
2258
2259 * c-ada-spec.c (is_simple_enum): Minor tweaks.
2260 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
2261 enumeral types use again the type name for the enumeration constants.
2262 (dump_ada_node): Adjust call to dump_ada_enum_type.
2263 (dump_nested_type): Likewise.
2264
f1607029
GA
22652021-04-01 Jason Merrill <jason@redhat.com>
2266
2267 PR c++/98481
2268 * c-opts.c (c_common_post_options): Bump latest_abi_version.
2269
4493b1c1
GA
22702021-03-25 Jakub Jelinek <jakub@redhat.com>
2271
2272 PR c++/99565
2273 * c-warn.c (do_warn_duplicated_branches): Pass also
2274 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
2275
6af7b307
GA
22762021-03-20 Jakub Jelinek <jakub@redhat.com>
2277
2278 PR debug/99230
2279 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
2280
ceae9533
GA
22812021-03-05 Eric Botcazou <ebotcazou@adacore.com>
2282
2283 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
2284 after entering the separate class package, if any.
2285
67f10d28
GA
22862021-03-04 Richard Biener <rguenther@suse.de>
2287
2288 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
2289 Handle ERROR_MARK.
2290
22912021-03-04 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR c/99325
2294 * c-ppoutput.c (print): Change src_line type from int to unsigned.
2295 (token_streamer::stream) Likewise.
2296 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
2297 UNKNOWN_LOCATION.
2298
f3641ac7
GA
22992021-03-03 Jakub Jelinek <jakub@redhat.com>
2300
2301 PR c/99324
2302 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
2303 instead of mark_addressable. Fix a comment typo -
2304 neutrallly -> neutrally.
2305
2c83c3fb
GA
23062021-02-28 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR c/99304
2309 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
2310 message - refernced -> referenced. Remove superfluous space before
2311 closing paren of function calls.
2312
daa68844
GA
23132021-02-25 Nathan Sidwell <nathan@acm.org>
2314
2315 PR c++/99166
2316 * c.opt (-flang-info-module-cmi): Renamed option.
2317
50352c6c
GA
23182021-02-19 Nathan Sidwell <nathan@acm.org>
2319
2320 * c.opt (flang-info-module-read, flang-info-module-read=): New.
2321
bf81237e
GA
23222021-02-18 H.J. Lu <hjl.tools@gmail.com>
2323
2324 PR target/99113
2325 * c-attribs.c (c_common_attribute_table): Add the "retain"
2326 attribute.
2327 (handle_retain_attribute): New function.
2328
0e804ce3
GA
23292021-02-16 Marek Polacek <polacek@redhat.com>
2330
2331 PR c++/99062
2332 * c-attribs.c (handle_assume_aligned_attribute): Check that the
2333 alignment argument is non-negative. Tweak a warning message.
2334
fab095da
GA
23352021-02-12 Martin Sebor <msebor@redhat.com>
2336
2337 PR c/99055
2338 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
2339 print_generic_expr_to_str.
2340
4b37c3ea
GA
23412021-02-10 Richard Biener <rguenther@suse.de>
2342
2343 * c-common.c (parse_optimize_options): Free decoded_options.
2344
a19dd5e6
GA
23452021-02-04 emsr <3dw4rd@verizon.net>
2346
2347 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
2348
9faaa807
GA
23492021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
2350
2351 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
2352 * c-lex.c (interpret_integer): Set node type for size literal.
2353
85d04a2e
GA
23542021-01-28 Jakub Jelinek <jakub@redhat.com>
2355
2356 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
2357 draft from description.
2358 (-std=c++2b): Fix a pasto, 2020 -> 2023.
2359
e62bb7f0
GA
23602021-01-26 Paul Fee <paul.f.fee@gmail.com>
2361
2362 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2363 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2364 and -std=gnu++2b
2365 * c-opts.c (set_std_cxx23): New.
2366 (c_common_handle_option): Set options when -std=c++23 is enabled.
2367 (c_common_post_options): Adjust comments.
2368 (set_std_cxx20): Likewise.
2369
161e4c08
GA
23702021-01-25 Martin Sebor <msebor@redhat.com>
2371
2372 PR c++/98646
2373 * c-common.c (check_nonnull_arg): Adjust warning text.
2374
4c9bcd5c
GA
23752021-01-17 Martin Sebor <msebor@redhat.com>
2376
2377 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2378 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2379
59cf67d1
GA
23802021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2381
2382 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2383 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2384
2f7f0d32
GA
23852021-01-15 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR tree-optimization/98597
2388 * c-pretty-print.c: Include options.h.
2389 (c_fold_indirect_ref_for_warn): New function.
2390 (print_mem_ref): Use it. If it returns something that has compatible
2391 type and is TBAA compatible with zero offset, print it and return,
2392 otherwise print it using offsetof syntax or array ref syntax. Fix up
2393 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2394 argument has pointer to array type. Print pointers using the standard
2395 formatting.
2396
6851dda2
GA
23972021-01-12 Martin Sebor <msebor@redhat.com>
2398
2399 PR c/98597
2400 PR c/98592
2401 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2402 has pointer type. Remove redundant code. Avoid calling
2403 gimple_canonical_types_compatible_p.
2404
7d187e4f
GA
24052021-01-07 Martin Sebor <msebor@redhat.com>
2406
2407 PR middle-end/98578
2408 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2409 Avoid assuming acces type's size is constant. Correct condition
2410 guarding the printing of a parenthesis.
2411
942ae5be
GA
24122021-01-06 Martin Sebor <msebor@redhat.com>
2413
2414 PR c++/95768
2415 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2416 SSA_NAMEs print VLA names and GIMPLE defining statements.
2417 (print_mem_ref): New function.
2418 (c_pretty_printer::unary_expression): Call it.
2419
24202021-01-06 Richard Biener <rguenther@suse.de>
2421
2422 PR tree-optimization/95582
2423 * c-attribs.c (c_common_attribute_table): Add entry for
2424 signed_bool_precision.
2425 (handle_signed_bool_precision_attribute): New.
2426
8daa719b
GA
24272020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2428
2429 * c.opt: Add -stdlib= option and enumerations for
2430 libstdc++ and libc++.
2431
eefe499f
GA
24322020-12-16 Martin Liska <mliska@suse.cz>
2433
2434 * c.opt: Remove usage of Report.
2435
d52945ce
GA
24362020-12-14 Martin Sebor <msebor@redhat.com>
2437
2438 PR middle-end/98166
2439 PR c++/57111
2440 PR middle-end/98160
2441 * c-attribs.c (maybe_add_noinline): New function.
2442 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2443 Implicitly add attribute noinline to functions not declared inline
2444 and warn on those.
2445
ca2bd949
GA
24462020-12-09 Tobias Burnus <tobias@codesourcery.com>
2447
2448 * c-pragma.c (omp_pragmas): Add 'allocate'.
2449 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2450
f6e8e279
GA
24512020-12-08 Jakub Jelinek <jakub@redhat.com>
2452
2453 PR c++/98187
2454 * c-pragma.c (omp_pragmas): Remove "master".
2455 (omp_pragmas_simd): Add "master".
2456
bc8a7013
GA
24572020-12-07 Marek Polacek <polacek@redhat.com>
2458
2459 PR c++/98126
2460 * c-common.c (verify_tree_lim_r): New function.
2461 (verify_sequence_points): Use it. Use nullptr instead of 0.
2462
b8dd0ef7
GA
24632020-12-03 Martin Sebor <msebor@redhat.com>
2464
2465 PR c++/90629
2466 PR middle-end/94527
2467 * c-attribs.c (handle_dealloc_attribute): New function.
2468 (handle_malloc_attribute): Handle argument forms of attribute.
2469 * c.opt (-Wmismatched-dealloc): New option.
2470 (-Wmismatched-new-delete): New option.
2471
24722020-12-03 Jakub Jelinek <jakub@redhat.com>
2473
2474 PR libstdc++/93121
2475 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2476 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2477
e0f5e792
GA
24782020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2479
2480 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2481 {__GNUC_EXECUTION_CHARSET_NAME} and
2482 _WIDE_EXECUTION_CHARSET_NAME} macros.
2483
24842020-12-01 Nathan Sidwell <nathan@acm.org>
2485
2486 * c-common.c (module, import, export): New internal tokens (with
2487 trailing space).
2488 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2489 them.
2490 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2491 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2492
24932020-12-01 Nathan Sidwell <nathan@acm.org>
2494
2495 * c-opts.c (c_common_init_options): Ask for module dependencies.
2496 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2497 * c-pch.c (c_common_valid_pch): ... does not play with C++
2498 modules.
2499 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2500 options.
2501 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2502 (fmodule-only, fmodule-mapper, fmodule-lazy)
2503 (fmodule-version-ignore, Winvalid-imported-macros)
2504 (flang-info-include-translate, flang-info-include-translate-not):
2505 New options
2506
5fbf0ecb
GA
25072020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2508
2509 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2510 (dump_ada_structure): Also deal with convention, unchecked union and
2511 bit-field for nested types. In the latter case, print an Alignment
2512 aspect along with the Pack aspect.
2513
360258da
GA
25142020-11-25 Martin Sebor <msebor@redhat.com>
2515
2516 PR bootstrap/94982
2517 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2518 -Wformat-diag.
2519
1e2c9a27
GA
25202020-11-24 Martin Sebor <msebor@redhat.com>
2521
2522 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2523
8e6198d0
GA
25242020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2525
2526 * c-attribs.c (handle_special_var_sec_attribute): New.
2527 (handle_noinit_attribute): Remove.
2528 (attr_noinit_exclusions): Rename to...
2529 (attr_section_exclusions): ...this, and add "persistent" attribute
2530 exclusion.
2531 (c_common_attribute_table): Add "persistent" attribute.
2532
7a97e2fc
GA
25332020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2534
2535 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2536 Treat opaque types like other types.
2537 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2538 supported types.
2539
82e5048e
GA
25402020-11-20 Martin Sebor <msebor@redhat.com>
2541
2542 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2543 with fewer arguments.
2544
25452020-11-20 Martin Sebor <msebor@redhat.com>
2546
2547 PR middle-end/97879
2548 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2549 Error out on invalid modes.
2550
25512020-11-20 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR libstdc++/88101
2554 * c-common.c (check_builtin_function_arguments): Handle
2555 BUILT_IN_CLEAR_PADDING.
2556
25bb75f8
GA
25572020-11-18 Nathan Sidwell <nathan@acm.org>
2558
2559 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2560
4dabb037
GA
25612020-11-17 Nathan Sidwell <nathan@acm.org>
2562
2563 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2564 after newly-added CTI_MODULE_HWM.
2565
25662020-11-17 Joseph Myers <joseph@codesourcery.com>
2567
2568 * c-cppbuiltin.c (builtin_define_float_constants): Define
2569 "*_IS_IEC_60559__" macros.
2570
25712020-11-17 Nathan Sidwell <nathan@acm.org>
2572
2573 * c-lex.c: #include "langhooks.h".
2574 (cb_undef): Maybe call preprocess_undef lang hook.
2575 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2576 lang hook.
2577 (push_command_line_include): Maybe call preprocess_main_file lang
2578 hook.
2579 (cb_file_change): Likewise.
2580 * c-ppoutput.c: #include "langhooks.h.
2581 (scan_translation_unit): Maybe call preprocess_token lang hook.
2582 (class do_streamer): New, derive from token_streamer.
2583 (directives_only_cb): Data pointer is do_streamer, call
2584 preprocess_token lang hook.
2585 (scan_translation_unit_directives_only): Use do_streamer.
2586 (print_line_1): Move src_line recording to after string output.
2587 (cb_undef): Maybe call preprocess_undef lang hook.
2588
25892020-11-17 Nathan Sidwell <nathan@acm.org>
2590
2591 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2592 code duplicating that functionality.
2593
25942020-11-17 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR c/90628
2597 * c-common.c (check_builtin_function_arguments)
2598 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2599 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2600 for more builtins and argument positions.
2601
29c5d9ce
GA
26022020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2603
2604 PR objc/97854
2605 * stub-objc.c: Include c-common.h to declare enum rid.
2606
77f67db2
GA
26072020-11-13 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR c++/63287
2610 * c-cppbuiltin.c: Include configargs.h.
2611 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2612 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2613 "single".
2614
26152020-11-13 Gergö Barany <gergo@codesourcery.com>
2616 Thomas Schwinge <thomas@codesourcery.com>
2617
2618 * c.opt (fopenacc-kernels): Add.
2619
26202020-11-13 Jason Merrill <jason@redhat.com>
2621
2622 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2623
26242020-11-13 Piotr H. Dabrowski <phd@phd.re>
2625
2626 PR c++/91318
2627 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2628
26292020-11-13 Martin Liska <mliska@suse.cz>
2630
2631 * c-attribs.c (build_attr_access_from_parms): Format properly.
2632
26332020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2634
2635 PR objc/90707
2636 * c-common.c (c_common_reswords): null_unspecified, nullable,
2637 nonnull, null_resettable: New keywords.
2638 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2639 RID_NONNULL, RID_NULL_RESETTABLE: New.
2640 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2641 ranges accepted for property attributes.
2642 * c-attribs.c (handle_objc_nullability_attribute): New.
2643 * c-objc.h (enum objc_property_attribute_group): Add
2644 OBJC_PROPATTR_GROUP_NULLABLE.
2645 (enum objc_property_attribute_kind):Add
2646 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2647 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2648
26492020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2650
2651 PR objc/77404
2652 * c-attribs.c (handle_objc_root_class_attribute): New
2653 * c-objc.h (objc_start_class_interface): Add a location
2654 value for the position of the class name.
2655 * c.opt: Add Wobjc-root-class.
2656 * stub-objc.c (objc_start_class_interface): Add a location
2657 value for the position of the class name.
2658
a5a11525
GA
26592020-11-12 Joseph Myers <joseph@codesourcery.com>
2660
2661 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2662 Allow scope for C. Handle standard attributes for C. Do not
2663 accept unscoped attributes if std_syntax and not handled as
2664 standard attributes.
2665 * c-common.h (c_common_has_attribute): Update prototype.
2666
26672020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2668
2669 PR pch/86674
2670 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2671 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2672
0f5f9ed5
GA
26732020-11-11 Patrick Palka <ppalka@redhat.com>
2674
2675 PR c++/88115
2676 * c-opts.c (c_common_post_options): Update latest_abi_version.
2677
bb622641
GA
26782020-11-10 Jakub Jelinek <jakub@redhat.com>
2679
2680 PR c/97748
2681 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2682 to false.
2683 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2684 recursively and just return true instead of warning if it is true.
2685 Handle COMPLEX_EXPR.
2686
26872020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2688
2689 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2690 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2691 (c_omp_adjust_map_clauses): New function.
2692
2bee28dd
GA
26932020-11-09 Marek Polacek <polacek@redhat.com>
2694
2695 DR 1914
2696 * c-common.c (attribute_fallthrough_p): Tweak the warning
2697 message.
2698
26992020-11-09 Patrick Palka <ppalka@redhat.com>
2700
2701 * c-pragma.c (handle_pragma_diagnostic): Split the
2702 unknown-option -Wpragmas diagnostic into a warning and a
2703 subsequent note containing a spelling suggestion. Avoid
2704 computing the suggestion if -Wpragmas warnings are being
2705 suppressed.
2706
27072020-11-09 Patrick Palka <ppalka@redhat.com>
2708
2709 PR testsuite/97117
2710 * c-indentation.c (get_visual_column): Remove location_t
2711 parameter. Move the column-tracking diagnostic code from here
2712 to ...
2713 (should_warn_for_misleading_indentation): ... here, before the
2714 early exit for when the loci are not all distinct. Don't pass a
2715 location_t argument to get_visual_column.
2716 (assert_get_visual_column_succeeds): Don't pass a location_t
2717 argument to get_visual_column.
2718 (assert_get_visual_column_fails): Likewise.
2719
fb95de7a
GA
27202020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2721
2722 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2723 of keywords accepted in @property attribute contexts.
2724 * c-objc.h (enum objc_property_attribute_group): Add
2725 OBJC_PROPATTR_GROUP_CLASS.
2726 (enum objc_property_attribute_kind): Add
2727 OBJC_PROPERTY_ATTR_CLASS.
2728
2da7ee05
GA
27292020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2730
2731 * c-common.c (c_common_reswords): Add 'atomic' property
2732 attribute.
2733 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2734 property attributes.
2735
27362020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2737
2738 * c-attribs.c (handle_nsobject_attribute): New.
2739 * c.opt: Add WNSObject-attribute.
2740
44cab2d8
GA
27412020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2742
2743 * c-objc.h (enum objc_property_attribute_group): New
2744 (enum objc_property_attribute_kind): New.
2745 (OBJC_PROPATTR_GROUP_MASK): New.
2746 (struct property_attribute_info): Small class encapsulating
2747 parser output from property attributes.
2748 (objc_prop_attr_kind_for_rid): New
2749 (objc_add_property_declaration): Simplify interface.
2750 * stub-objc.c (enum rid): Dummy type.
2751 (objc_add_property_declaration): Simplify interface.
2752 (objc_prop_attr_kind_for_rid): New.
2753
27542020-11-06 Nathan Sidwell <nathan@acm.org>
2755
2756 * c-ada-spec.c (collect_ada_nodes): Rename
2757 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2758 (collect_ada_node): Likewise.
2759 (dump_forward_type): Likewise.
2760 * c-common.c (set_underlying_type): Rename
2761 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2762 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2763
27642020-11-06 Jakub Jelinek <jakub@redhat.com>
2765
2766 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2767
0cfd9109
GA
27682020-11-05 Marek Polacek <polacek@redhat.com>
2769
2770 PR c++/97675
2771 * c.opt (Wexceptions): New option.
2772
27732020-11-05 Marek Polacek <polacek@redhat.com>
2774
2775 PR c++/25814
2776 * c.opt (Wvexing-parse): New option.
2777
35c125cb
GA
27782020-11-04 Jakub Jelinek <jakub@redhat.com>
2779
2780 PR c++/97670
2781 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2782 underlying decl to clear in the allocate_head bitmap.
2783
27842020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2785
2786 * c-objc.h (objc_non_constant_expr_p): New.
2787 * stub-objc.c (objc_non_constant_expr_p): New.
2788
fd2325ea
GA
27892020-11-03 Nathan Sidwell <nathan@acm.org>
2790
2791 * c.opt (MQ,MT): Reword description to be make-agnostic.
2792
88ce3d5f
GA
27932020-11-02 Nathan Sidwell <nathan@acm.org>
2794
2795 * c-opts.c (c_common_post_options): Move var decl to its
2796 initialization point.
2797
27982020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2799
2800 * c-lex.c (c_lex_with_flags): When combining '@' with a
2801 keyword for Objective-C, combine the location ranges too.
2802
28032020-10-30 Qing Zhao <qing.zhao@oracle.com>
2804 H.J.Lu <hjl.tools@gmail.com>
2805
2806 * c-attribs.c (c_common_attribute_table): Add new attribute
2807 zero_call_used_regs.
2808 (handle_zero_call_used_regs_attribute): New function.
2809
e93aae4a
GA
28102020-10-28 Marek Polacek <polacek@redhat.com>
2811
2812 PR c++/97573
2813 * c-opts.c (c_common_post_options): In C++20, turn on
2814 -Wdeprecated-enum-enum-conversion and
2815 -Wdeprecated-enum-float-conversion.
2816 * c.opt (Wdeprecated-enum-enum-conversion,
2817 Wdeprecated-enum-float-conversion): New options.
2818 (Wenum-conversion): Allow for C++ too.
2819
28202020-10-28 Jakub Jelinek <jakub@redhat.com>
2821
2822 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2823 * c-omp.c: Include bitmap.h.
2824 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2825
f19e7c8d
GA
28262020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2827
2828 * c-common.c (__is_nothrow_assignable): New.
2829 (__is_nothrow_constructible): Likewise.
2830 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2831 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2832
efe71fcc
GA
28332020-10-23 Jan Hubicka <hubicka@ucw.cz>
2834
2835 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2836
28372020-10-23 Marek Polacek <polacek@redhat.com>
2838
2839 PR c++/91741
2840 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2841 (c_common_init_ts): Likewise.
2842 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2843 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2844 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2845 (maybe_warn_sizeof_array_div): New function.
2846 * c.opt (Wsizeof-array-div): New option.
2847
28482020-10-23 Martin Sebor <msebor@redhat.com>
2849
2850 PR c/97463
2851 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2852
56ddd5e2
GA
28532020-10-22 Martin Liska <mliska@suse.cz>
2854
2855 PR c/94722
2856 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2857 (handle_stack_protect_attribute): Add error message for a
2858 no_stack_protector function.
2859
28602020-10-22 Martin Liska <mliska@suse.cz>
2861
2862 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2863
28642020-10-22 Jan Hubicka <hubicka@ucw.cz>
2865
2866 * c-gimplify.c: Include tree-nested.h
2867 (c_genericize): Update for new nested function info.
2868
b2698c21
GA
28692020-10-14 Martin Sebor <msebor@redhat.com>
2870
2871 PR c/97413
2872 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2873 bounds in an extra list.
2874
7e9282ae
GA
28752020-10-05 Richard Biener <rguenther@suse.de>
2876 Jakub Jelinek <jakub@redhat.com>
2877
2878 PR c++/97197
2879 * c-pretty-print.c: Include langhooks.h.
2880 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2881 expression.
2882 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2883 unary_expression.
2884 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2885
660bfe61
GA
28862020-09-30 Martin Sebor <msebor@redhat.com>
2887
2888 PR middle-end/97189
2889 * c-attribs.c (append_access_attr): Use the function declaration
2890 location for a warning about an attribute access argument.
2891
93bca37c
GA
28922020-09-29 Marek Polacek <polacek@redhat.com>
2893
2894 PR c++/94695
2895 * c.opt (Wrange-loop-construct): New option.
2896
82b77dee
GA
28972020-09-23 Martin Sebor <msebor@redhat.com>
2898
2899 PR c/97131
2900 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2901
29022020-09-23 Marek Polacek <polacek@redhat.com>
2903
2904 PR c/97125
2905 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2906 after loops and other structured control constructs have been lowered.
2907
521d2711
GA
29082020-09-22 Jakub Jelinek <jakub@redhat.com>
2909
2910 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2911 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2912
44135373
GA
29132020-09-21 Marek Polacek <polacek@redhat.com>
2914
2915 * c.opt (Wctad-maybe-unsupported): New option.
2916
2fe5b7d1
GA
29172020-09-19 Martin Sebor <msebor@redhat.com>
2918
2919 PR c/50584
2920 * c-common.h (warn_parm_array_mismatch): Declare new function.
2921 (has_attribute): Move declaration of an existing function.
2922 (build_attr_access_from_parms): Declare new function.
2923 * c-warn.c (parm_array_as_string): Define new function.
2924 (plus_one): Define new function.
2925 (warn_parm_ptrarray_mismatch): Define new function.
2926 (warn_parm_array_mismatch): Define new function.
2927 (vla_bound_parm_decl): New function.
2928 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2929 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2930 qualifiers here...
2931 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2932 them in brackets here. Also print [static]. Strip extraneous
2933 expressions from VLA bounds.
2934
29352020-09-19 Martin Sebor <msebor@redhat.com>
2936
2937 PR c/50584
2938 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2939 (handle_argspec_attribute): New function.
2940 (get_argument, get_argument_type): New functions.
2941 (append_access_attrs): Add overload. Handle internal attribute
2942 representation in addition to external.
2943 (handle_access_attribute): Handle internal attribute representation
2944 in addition to external.
2945 (build_attr_access_from_parms): New function.
2946
29472020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2948
2949 * c-gimplify.c (genericize_c_loop): Rewrite to match
2950 c_finish_loop in c-typeck.c.
2951
29522020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2953
2954 * c-common.c (c_block_may_fallthrough): New, split from
2955 cxx_block_may_fallthrough in the cp front end.
2956 (c_common_init_ts): Move handling of loop and switch-related
2957 statements here from the cp front end.
2958 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2959 cp front end.
2960 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2961 * c-common.h (c_block_may_fallthru): Declare.
2962 (bc_state_t): Move here from cp front end.
2963 (save_bc_state, restore_bc_state): Declare.
2964 (c_genericize_control_stmt): Declare.
2965 (WHILE_COND, WHILE_BODY): Likewise.
2966 (DO_COND, DO_BODY): Likewise.
2967 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2968 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2969 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2970 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2971 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2972 * c-dump.c (dump_stmt): Copy from cp front end.
2973 (c_dump_tree): Move code to handle structured loop and switch
2974 tree nodes here from cp front end.
2975 * c-gimplify.c: Adjust includes.
2976 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2977 cp front end.
2978 (save_bc_state, restore_bc_state): New functions using old code
2979 from cp front end.
2980 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2981 (genericize_c_loop): Move from cp front end.
2982 (genericize_for_stmt, genericize_while_stmt): Likewise.
2983 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2984 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2985 (genericize_omp_for_stmt): Likewise.
2986 (c_genericize_control_stmt): New function using code split from
2987 cp front end.
2988 (c_genericize_control_r): New.
2989 (c_genericize): Call walk_tree with c_genericize_control_r.
2990 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2991 structured loop and switch tree nodes here from cp front end.
2992
2aad20c0
GA
29932020-09-17 Patrick Palka <ppalka@redhat.com>
2994
2995 PR c/80076
2996 * c-indentation.c (should_warn_for_misleading_indentation): Move
2997 declarations of local variables closer to their first use.
2998 Handle virtual token locations by resolving them to their
2999 respective macro expansion points. If all three tokens are
3000 produced from the same macro expansion, then instead use their
3001 loci within the macro definition.
3002
ecde1b0a
GA
30032020-09-16 Martin Sebor <msebor@redhat.com>
3004
3005 PR c/78666
3006 PR c/96126
3007 * c-attribs.c (validate_attr_args): New function.
3008 (validate_attr_arg): Same.
3009 (handle_section_attribute): Call it. Introduce a local variable.
3010 (handle_alloc_size_attribute): Same.
3011 (handle_alloc_align_attribute): Same.
3012
50a71cd0
GA
30132020-09-14 Jakub Jelinek <jakub@redhat.com>
3014
3015 * c-attribs.c (handle_optimize_attribute): Adjust
3016 cl_optimization_save, cl_optimization_restore and
3017 build_optimization_node callers.
3018 * c-pragma.c (handle_pragma_optimize): Adjust
3019 build_optimization_node caller.
3020 (handle_pragma_push_options): Adjust
3021 build_optimization_node and build_target_option_node callers.
3022 (handle_pragma_pop_options, handle_pragma_reset_options):
3023 Adjust cl_optimization_restore callers.
3024
8f7ea26a
GA
30252020-08-28 Martin Sebor <msebor@redhat.com>
3026
3027 * c.opt (Wstringop-overread): New option.
3028
a6493809
GA
30292020-08-11 Jakub Jelinek <jakub@redhat.com>
3030
3031 PR c/96545
3032 * c-common.c (get_atomic_generic_size): Require that first argument's
3033 type points to a complete type and use tree_fits_uhwi_p instead of
3034 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
3035
48cc2e46
GA
30362020-07-31 Martin Sebor <msebor@redhat.com>
3037
3038 PR c++/96003
3039 * c-common.c (check_function_arguments_recurse): Return early when
3040 no-warning bit is set.
3041
30422020-07-31 Richard Biener <rguenther@suse.de>
3043
3044 PR debug/96383
3045 * c-common.h (c_common_finalize_early_debug): Declare.
3046 * c-common.c: Include debug.h.
3047 (c_common_finalize_early_debug): finalize_early_debug langhook
3048 implementation generating debug for extern declarations.
3049
e71dab87
GA
30502020-07-27 Nathan Sidwell <nathan@acm.org>
3051
3052 * c-common.c (try_to_locate_new_include_insertion_point): Use
3053 strcmp, not pointer equality.
3054
ae2e0bc1
GA
30552020-07-25 Martin Sebor <msebor@redhat.com>
3056
3057 PR c++/96310
3058 * c-common.c (check_nonnull_arg): Print note only when warning was
3059 issued.
3060
3ea9abca
GA
30612020-07-22 Tobias Burnus <tobias@codesourcery.com>
3062
3063 * c-omp.c (c_finish_omp_critical): Check for no name but
3064 nonzero hint provided.
3065
0933f508
GA
30662020-07-20 Jason Merrill <jason@redhat.com>
3067
3068 * c-cppbuiltin.c (c_cpp_builtins): Update
3069 __cpp_nontype_template_args for C++20.
3070
30712020-07-20 Martin Sebor <msebor@redhat.com>
3072
3073 PR c/96249
3074 * c.opt: Remove stray text.
3075
8ca07a30
GA
30762020-07-14 Lewis Hyatt <lhyatt@gmail.com>
3077
3078 PR other/86904
3079 * c-indentation.c (should_warn_for_misleading_indentation): Get
3080 global tabstop from the new source.
3081 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
3082 is now a common option.
3083 * c.opt: Likewise.
3084
a82c4c4c 30852020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
3086
3087 * c.opt (Wscalar-storage-order): Add explicit variable.
3088
f60ee68d
GA
30892020-07-07 Nathan Sidwell <nathan@acm.org>
3090
3091 * c-opts.c (c_common_post_options): Add 'injecting' arg to
3092 cpp_read_main_file.
3093 (c_finish_options): Add linemap_line_start calls for builtin and cmd
3094 maps. Force token position to line_table's highest line.
3095 * c-ppoutput.c (print_line_1): Refactor, print line zero.
3096 (cb_define): Always increment source line.
3097
4077d74c
GA
30982020-07-06 Martin Sebor <msebor@redhat.com>
3099
3100 PR c++/95984
3101 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
3102 to stub lambda objects with null this pointer.
3103 (check_nonnull_arg): Handle C++ nullptr.
3104
b5f24739
GA
31052020-07-02 Jason Merrill <jason@redhat.com>
3106 Jakub Jelinek <jakub@redhat.com>
3107
3108 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
3109
46fbb6c6
GA
31102020-06-30 Jakub Jelinek <jakub@redhat.com>
3111
3112 PR c++/95963
3113 * c-common.c (check_function_arguments_recurse): Don't crash on
3114 calls to internal functions.
3115
69273534
GA
31162020-06-28 Martin Sebor <msebor@redhat.com>
3117
3118 PR c++/86568
3119 * c-common.c (struct nonnull_arg_ctx): Add members.
3120 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
3121 C++ member functions specially. Consider the this pointer implicitly
3122 nonnull.
3123 (check_nonnull_arg): Use location of argument when available.
3124 (check_function_arguments): Use nonnull_arg_ctx as argument.
3125
9a33c41f
GA
31262020-06-27 Jakub Jelinek <jakub@redhat.com>
3127
3128 PR middle-end/95903
3129 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
3130 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
3131 smaller precision intop operands separately.
3132
c9c05f73
GA
31332020-06-26 Marek Polacek <polacek@redhat.com>
3134
3135 * c-opts.c (c_common_init_options): Default to gnu++17.
3136
aff95ee7
GA
31372020-06-17 Jonathan Wakely <jwakely@redhat.com>
3138
bd0a89dc 3139 PR c/95378
aff95ee7
GA
3140 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
3141 pointer arguments.
3142
56638b9b
GA
31432020-06-16 Jakub Jelinek <jakub@redhat.com>
3144
3145 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
3146 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
3147 idx members.
3148 (c_omp_is_loop_iterator): New function.
3149 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
3150 if outer loop iterator is present. Perform duplicate checking through
3151 hash_set in the function rather than expecting caller to do that.
3152 Pass NULL instead of d->ppset to walk_tree_1.
3153 (c_omp_check_nonrect_loop_iv): New function.
3154 (c_omp_check_loop_iv): Use it. Fill in new members, allow
3155 non-rectangular loop forms, diagnose multiple associated loops with
3156 the same iterator. Pass NULL instead of &pset to walk_tree_1.
3157 (c_omp_check_loop_iv_exprs): Likewise.
3158
ec6ffbb9
GA
31592020-06-10 Martin Liska <mliska@suse.cz>
3160
3161 PR tree-optimization/92860
3162 * c-attribs.c (handle_optimize_attribute):
3163 Save global options and compare it after parsing of function
3164 attribute.
3165 * c-pragma.c (opt_stack::saved_global_options): New field.
3166 (handle_pragma_push_options): Save global_options.
3167 (handle_pragma_pop_options): Compare them after pop.
3168
b952c2cf
GA
31692020-06-09 Jakub Jelinek <jakub@redhat.com>
3170
3171 PR c/95580
3172 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
3173 case when MEM_REF's first argument has type pointer to incomplete type.
3174
1a59f3db
GA
31752020-06-05 Jason Merrill <jason@redhat.com>
3176
3177 * c-pretty-print.c (pp_c_additive_expression): Handle negative
3178 operand to POINTER_PLUS_EXPR.
3179
3add3425
GA
31802020-06-04 Martin Sebor <msebor@redhat.com>
3181
3182 PR middle-end/10138
3183 PR middle-end/95136
3184 * c-attribs.c (append_access_attrs): Handle attr_access::none.
3185 (handle_access_attribute): Same.
3186
9a5b7438
GA
31872020-06-03 Mark Wielaard <mark@klomp.org>
3188
3189 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
3190 New function.
3191 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
3192 New function declaration.
3193
31942020-06-03 Mark Wielaard <mark@klomp.org>
3195
3196 * known-headers.cc (get_string_macro_hint): New function.
3197 (get_stdlib_header_for_name): Use get_string_macro_hint.
3198 (get_c_stdlib_header_for_string_macro_name): New function.
3199 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
3200 New function declaration.
3201
32022020-06-03 Tobias Burnus <tobias@codesourcery.com>
3203
3204 * c-common.h (c_omp_predetermined_mapping): Declare.
3205 * c-omp.c (c_omp_predetermined_mapping): New.
3206
af114c38
MW
32072020-05-22 Mark Wielaard <mark@klomp.org>
3208
3209 * known-headers.cc (get_stdlib_header_for_name): Add a new
3210 stdlib_hint array for stdbool and stdint.
3211
45c50b6a
MW
32122020-05-22 Mark Wielaard <mark@klomp.org>
3213
3214 * known-headers.cc (get_stdlib_header_for_name): Return
3215 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
3216 flag_isoc99.
3217
c22027a0
NS
32182020-05-20 Nathan Sidwell <nathan@acm.org>
3219
38a4db21
NS
3220 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
3221
c22027a0
NS
3222 * c-common.c (try_to_locate_new_include_insertion_point): Use
3223 strcmp to compare filenames.
3224 * c-lex.c (init_c_lex): Move declaration to initialization.
3225 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
3226 deferred count loop.
3227
29f0e90d
JM
32282020-05-15 Jason Merrill <jason@redhat.com>
3229
3230 * c-opts.c (set_std_cxx20): Set flag_coroutines.
3231
b04445d4
JM
32322020-05-13 Jason Merrill <jason@redhat.com>
3233
3234 * c.opt (std=c++20): Make c++2a the alias.
3235 (std=gnu++20): Likewise.
3236 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
3237 * c-opts.c: Adjust.
3238 * c-cppbuiltin.c: Adjust.
3239 * c-ubsan.c: Adjust.
3240 * c-warn.c: Adjust.
3241
11dd3be5
EB
32422020-05-12 Eric Botcazou <ebotcazou@adacore.com>
3243
3244 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
3245
b224c376
NS
32462020-05-08 Nathan Sidwell <nathan@acm.org>
3247
3248 Reimplement directives only processing.
3249 * c-ppoutput.c (token_streamer): Ne.
3250 (directives_only_cb): New. Swallow ...
3251 (print_lines_directives_only): ... this.
3252 (scan_translation_unit_directives_only): Reimplment using the
3253 published interface.
3254
f1d94677
MP
32552020-05-07 Marek Polacek <polacek@redhat.com>
3256
3257 * c-format.c (badwords): Add "nonstatic".
3258
9b95bb52
JJ
3259202-05-07 Jakub Jelinek <jakub@redhat.com>
3260
3261 PR c/94968
3262 * c-common.c (speculation_safe_value_resolve_params): Return false if
3263 error_operand_p (val2).
3264 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
3265 Remove extraneous semicolon.
3266
530b4409 32672020-05-06 qing zhao <qing.zhao@oracle.com>
3268
3269 PR c/94230
3270 * c-indentation.c (get_visual_column): Add a hint to use the new
3271 -flarge-source-files option.
3272
b776bdca
SSF
32732020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
3274
3275 * c-attribs.c (handle_vector_size_attribute): Add attribute
3276 nonnull for argument args in order to silence warning of
3277 uninitialized variable usage. Since this is local to the
3278 compilation unit and thus cannot be checked at call sides by the
3279 compiler, added an assert statement in order to verify this.
3280
6607bdd9
L
32812020-05-01 H.J. Lu <hongjiu.lu@intel.com>
3282
3283 PR target/93492
3284 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
3285 value to USHRT_MAX (65535).
3286
691eeb65
JJ
32872020-04-29 Jakub Jelinek <jakub@redhat.com>
3288
3289 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
3290
26d76be7
JJ
32912020-04-27 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR c/94755
3294 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
3295 fncode == BUILT_IN_NONE before initialization of first_param.
3296
7291b2ed
MP
32972020-04-23 Marek Polacek <polacek@redhat.com>
3298
3299 PR c++/94733
3300 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
3301 TREE_PURPOSE.
3302
58a29af8
PP
33032020-04-14 Patrick Palka <ppalka@redhat.com>
3304
3305 PR c++/85278
3306 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
3307 ampersand if it's an rvalue reference type.
3308
09f04139
MS
33092020-04-13 Martin Sebor <msebor@redhat.com>
3310
3311 PR c/92326
3312 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
3313 printing array bound for flexible array members.
3314
ee26baf4
IS
33152020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3316
3317 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
3318 define, per n4861.
3319
75efe9cb
RB
33202020-04-02 Richard Biener <rguenther@suse.de>
3321
3322 PR c/94392
3323 * c-opts.c (c_common_post_options): Enable -ffinite-loops
3324 for -O2 and C++11 or newer.
3325
75defde9
PP
33262020-03-28 Patrick Palka <ppalka@redhat.com>
3327
3328 * c.opt: Add -fconcepts-diagnostics-depth.
3329
52f24a9e
MS
33302020-03-27 Martin Sebor <msebor@redhat.com>
3331
3332 PR c++/94346
3333 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
3334 to decl_attributes. Make handling of different kinds of entities
3335 more robust.
3336
ccacf77b
MS
33372020-03-27 Martin Sebor <msebor@redhat.com>
3338
3339 PR c++/94098
3340 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
3341 here.
3342
ca6c7225
JJ
33432020-03-23 Jakub Jelinek <jakub@redhat.com>
3344
3345 PR c++/91993
3346 * c-warn.c (warnings_for_convert_and_check): For expr and/or
3347 result being COMPOUND_EXPRs, skip to ultimate rhs.
3348
1aa22b19
RS
33492020-03-20 Richard Sandiford <richard.sandiford@arm.com>
3350
3351 PR middle-end/94072
3352 * c-common.c (c_common_type_for_mode): Before using a registered
3353 built-in type, check that the vectorness of the type matches
3354 the vectorness of the mode.
3355
700d4cb0
JJ
33562020-03-17 Jakub Jelinek <jakub@redhat.com>
3357
3358 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
3359 issue in a diagnostic message.
3360
b408e010
LH
33612020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3362
3363 * c.opt: Avoid redundancy in the help text.
3364
e78e50d5
MP
33652020-03-02 Marek Polacek <polacek@redhat.com>
3366
3367 PR c++/93958 - add missing -std=gnu++20.
3368 * c.opt: Add -std=gnu++20.
3369
649e1741
MS
33702020-03-01 Martin Sebor <msebor@redhat.com>
3371
3372 PR c++/92721
3373 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3374 (handle_access_attribute): Same.
3375
7b60f3ba
JJ
33762020-02-25 Jakub Jelinek <jakub@redhat.com>
3377
3378 PR c/93858
3379 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3380 "did you mean" hint in diagnostics.
3381
fb260504
JM
33822020-02-15 Jason Merrill <jason@redhat.com>
3383
3384 * c.opt: Add -std=c++20.
3385
1d757b09
EB
33862020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3387
3388 * c-ada-spec.c: Include bitmap.h.
3389 (dump_ada_double_name): Rename into...
3390 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3391 (dump_ada_array_type): Adjust to above renaming. Robustify.
3392 (dump_nested_types_1): New function copied from... Add dumped_types
3393 parameter and pass it down to dump_nested_type.
3394 (dump_nested_types): ...this. Remove parent parameter. Just call
3395 dump_nested_types_1 on an automatic bitmap.
3396 (dump_nested_type): Add dumped_types parameter.
3397 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3398 Adjust recursive calls and adjust to above renaming.
3399 (dump_ada_declaration): Adjust call to dump_nested_types.
3400 Tidy up and adjust to above renaming.
3401 (dump_ada_specs): Initialize and release bitmap obstack.
3402
0cc575e4
MS
34032020-02-10 Martin Sebor <msebor@redhat.com>
3404
3405 PR c/93640
3406 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3407
a59aa302
JJ
34082020-02-10 Jakub Jelinek <jakub@redhat.com>
3409
3410 PR other/93641
3411 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3412 Remove useless extra test.
3413
e464fc90
TB
34142020-02-03 Julian Brown <julian@codesourcery.com>
3415 Tobias Burnus <tobias@codesourcery.com>
3416
3417 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3418
e3b6c052
JM
34192020-01-29 Jason Merrill <jason@redhat.com>
3420
3421 PR c++/89357
3422 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3423
6d00f052
JM
34242020-01-23 Jason Merrill <jason@redhat.com>
3425
3426 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3427
8a990ffa
MS
34282020-01-23 Martin Sebor <msebor@redhat.com>
3429
3430 PR c/84919
3431 * c-common.c (check_function_arguments): Avoid overlap checking
3432 of sprintf functions.
3433
55b7df8b
JM
34342020-01-22 Jason Merrill <jason@redhat.com>
3435
3436 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3437 PR c++/40752
3438 * c-warn.c (conversion_warning): Check operands only after checking
3439 the whole expression. Don't check second operand of + for sign.
3440
c77074d0
JM
34412020-01-21 Jason Merrill <jason@redhat.com>
3442 Manuel López-Ibáñez <manu@gcc.gnu.org>
3443
3444 PR c++/40752 - useless -Wconversion with short +=.
3445 * c.opt (-Warith-conversion): New.
3446 * c-warn.c (conversion_warning): Recurse for operands of
3447 operators. Only warn about the whole expression with
3448 -Warith-conversion.
3449
731dbfc3
JM
34502020-01-21 Jason Merrill <jason@redhat.com>
3451
3452 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3453 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3454
ad1a3914
NS
34552020-01-20 Nathan Sidwell <nathan@acm.org>
3456
3457 PR preprocessor/80005
3458 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3459
49789fd0
IS
34602020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3461
3462 * c-common.c (co_await, co_yield, co_return): New.
3463 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3464 RID_CO_RETURN): New enumeration values.
3465 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3466 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3467 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3468 * c.opt (fcoroutines): New command-line switch.
3469
4bc1899b
DM
34702020-01-10 David Malcolm <dmalcolm@redhat.com>
3471
3472 * c-format.c (local_event_ptr_node): New.
3473 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3474 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3475 * c-format.h (T_EVENT_PTR): New define.
3476
f25e33fa
MS
34772020-01-10 Martin Sebor <msebor@redhat.com>
3478
3479 PR c/93132
3480 * c-attribs.c (append_access_attrs): Validate against the translated
3481 access string rather than the human-readable representation.
3482
8d9254fc
JJ
34832020-01-01 Jakub Jelinek <jakub@redhat.com>
3484
3485 Update copyright years.
3486
39292e25
EB
34872019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3488
3489 * c-ada-spec.h (decl_sloc): Delete.
3490 * c-ada-spec.c (decl_sloc): Make static.
3491
519d7496
JB
34922019-12-19 Julian Brown <julian@codesourcery.com>
3493
3494 * c-common.h (c_omp_map_clause_name): Add prototype.
3495 * c-omp.c (c_omp_map_clause_name): New function.
3496 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3497 PRAGMA_OACC_CLAUSE_DETACH.
3498
a6163563
JB
34992019-12-19 Julian Brown <julian@codesourcery.com>
3500 Maciej W. Rozycki <macro@codesourcery.com>
3501 Tobias Burnus <tobias@codesourcery.com>
3502 Thomas Schwinge <thomas@codesourcery.com>
3503
3504 * c-pragma.h (pragma_omp_clause): Add
3505 PRAGMA_OACC_CLAUSE_NO_CREATE.
3506
e8f1ade2
MS
35072019-12-17 Martin Sebor <msebor@redhat.com>
3508
3509 PR c++/61339
3510 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3511
368877a1
DM
35122019-12-11 David Malcolm <dmalcolm@redhat.com>
3513
3514 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3515 implementation.
3516 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3517
d68f5d45
DM
35182019-12-09 David Malcolm <dmalcolm@redhat.com>
3519
3520 * c-format.c (range_label_for_format_type_mismatch::get_text):
3521 Replace label_text ctor called with true with label_text::take.
3522
d3e28653
DM
35232019-12-09 David Malcolm <dmalcolm@redhat.com>
3524
3525 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3526 initial newline from expected outputs.
3527 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3528 call to diagnostic_show_locus.
3529
abd6d8cc
JJ
35302019-12-06 Jakub Jelinek <jakub@redhat.com>
3531
3532 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3533 now.
3534
7906797e
MP
35352019-12-05 Marek Polacek <polacek@redhat.com>
3536 Jakub Jelinek <jakub@redhat.com>
3537
3538 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3539 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3540
5c04da88
MP
35412019-12-05 Marek Polacek <polacek@redhat.com>
3542
3543 PR c++/92271 - make __is_same alias for __is_same_as.
3544 * c-common.c: Add __is_same, an alias for __is_same_as.
3545
43aae289
MP
35462019-12-03 Marek Polacek <polacek@redhat.com>
3547
3548 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3549 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3550 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3551
d7ddfbcb
JH
35522019-11-30 Jan Hubicka <hubicka@ucw.cz>
3553
3554 * c-attribs.c (handle_symver_attribute): New function
3555 (c_common_attributes): Add symver.
3556
65ef05d0
RS
35572019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3558
3559 * c-common.c (pointer_int_sum): Use verify_type_context to check
3560 whether the target allows pointer arithmetic for the types involved.
3561 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3562 to check whether the target allows sizeof and alignof operations
3563 for the types involved.
3564
1a291106
JM
35652019-11-27 Jason Merrill <jason@redhat.com>
3566
3567 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3568
05d6cb1a
JJ
35692019-11-26 Jakub Jelinek <jakub@redhat.com>
3570
3571 PR c++/61414
3572 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3573 ENUMERAL_TYPEs.
3574
5b8d9367
JM
35752019-11-25 Joseph Myers <joseph@codesourcery.com>
3576
3577 PR c/91985
3578 * c-common.c (c_common_type_for_mode): Handle decimal
3579 floating-point types being NULL_TREE.
3580 * c-format.c (get_format_for_type_1): Handle specified types being
3581 NULL_TREE.
3582 * c-lex.c (interpret_float): Give an error for decimal
3583 floating-point constants when decimal floating-point not
3584 supported.
3585
1fbf51cb
JJ
35862019-11-23 Jakub Jelinek <jakub@redhat.com>
3587
3588 PR middle-end/83859
3589 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3590 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3591 group warning with inform together.
3592 (handle_access_attribute): Formatting fix.
3593
761df906
JJ
35942019-11-22 Jakub Jelinek <jakub@redhat.com>
3595
bdaf8be1
JJ
3596 PR c/90677
3597 * c-common.h (identifier_global_tag): Declare.
3598 * c-format.c (get_pointer_to_named_type): Renamed to ...
3599 (get_named_type): ... this. Use identifier_global_tag instead of
3600 identifier_global_value, handle the return value being a TYPE_P.
3601 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3602 to call get_named_type instead. Formatting fixes.
3603
c2ecce6d 3604 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3605 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3606 and __cpp_generic_lambdas for -std=c++2a. Define
3607 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3608 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3609 __cpp_concepts for -std=c++2a.
3610
54aa6b58
MS
36112019-11-22 Martin Sebor <msebor@redhat.com>
3612
3613 PR middle-end/83859
3614 * c-attribs.c (handle_access_attribute): New function.
3615 (c_common_attribute_table): Add new attribute.
3616 (get_argument_type): New function.
3617 (append_access_attrs): New function.
3618 (get_nonnull_operand): Rename...
3619 (get_attribute_operand): ...to this.
3620 * c-common.c (get_nonnull_operand): Rename...
3621 (get_attribute_operand): ...to this.
3622
6c80b1b5
JM
36232019-11-21 Joseph Myers <joseph@codesourcery.com>
3624
3625 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3626 of warning.
3627
192961ff
JM
36282019-11-19 Joseph Myers <joseph@codesourcery.com>
3629
3630 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3631 warning for standard attributes mixed with fallthrough attributes.
3632
f8aea5e3
JM
36332019-11-15 Joseph Myers <joseph@codesourcery.com>
3634
3635 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3636 * c-common.h (handle_fallthrough_attribute): Declare.
3637
2cc94aa8
JM
36382019-11-15 Joseph Myers <joseph@codesourcery.com>
3639
3640 * c-attribs.c (handle_deprecated_attribute): Remove static.
3641 * c-common.h (handle_deprecated_attribute): Declare.
3642
7c5890cc
JM
36432019-11-14 Joseph Myers <joseph@codesourcery.com>
3644
3645 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3646 char for C.
3647
b2417b59
JJ
36482019-11-14 Jakub Jelinek <jakub@redhat.com>
3649
d0ec7c93
JJ
3650 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3651 valid vendors.
3652
b2417b59
JJ
3653 * c-omp.c (c_omp_check_context_selector): Handle name lists
3654 containing string literals. Don't diagnose atomic_default_mem_order
3655 with multiple props.
3656
00be2a5f
JM
36572019-11-13 Joseph Myers <joseph@codesourcery.com>
3658
3659 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3660 NORM_MAX constants. Update call to get_max_float.
3661 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3662 constants.
3663
2dbad62d
EB
36642019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3665
3666 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3667 (dump_forward_type): Do not generate a declaration for function types.
3668 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3669 of the component type if it is declared in another file.
3670
6ed76044
ML
36712019-11-12 Martin Liska <mliska@suse.cz>
3672
3673 * c-opts.c (c_common_post_options):
3674 Use SET_OPTION_IF_UNSET.
3675
62aee289
MR
36762019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3677 Frederik Harwath <frederik@codesourcery.com>
3678
3679 gcc/c-family/
3680 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3681 constant.
3682 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3683
f486280c
RS
36842019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3685
3686 * c-common.h (gnu_vector_type_p): New function.
3687 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3688 vectors to satisfy gnu_vector_type_p.
3689 (c_build_vec_convert): Likewise __builtin_convertvector.
3690 (convert_vector_to_array_for_subscript): Likewise when applying
3691 implicit vector to array conversion.
3692 (scalar_to_vector): Likewise when converting vector-scalar
3693 operations to vector-vector operations.
3694
017c6491
JM
36952019-11-08 Joseph Myers <joseph@codesourcery.com>
3696
3697 * c.opt (Wold-style-definition): Initialize to -1.
3698 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3699 to flag_isoc2x if not set explicitly.
3700
c01bd174
JM
37012019-11-07 Joseph Myers <joseph@codesourcery.com>
3702
3703 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3704
0df65305
JM
37052019-11-05 Jason Merrill <jason@redhat.com>
3706
3707 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3708 -fconcepts.
3709
e0c866dd
KK
37102019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3711
3712 * c-opts.c (c_common_post_options): Update
3713 latest_abi_version.
3714
f968ef9b
JJ
37152019-11-02 Jakub Jelinek <jakub@redhat.com>
3716
d0c464d2
JJ
3717 * c-common.h (c_omp_get_context_selector): Remove.
3718 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3719 and renamed to omp_get_context_selector.
3720
917dd789
JJ
3721 * c-omp.c (c_omp_mark_declare_variant): Use
3722 omp_context_selector_set_compare.
3723
f968ef9b
JJ
3724 PR c++/88335 - Implement P1073R3: Immediate functions
3725 * c-common.h (enum rid): Add RID_CONSTEVAL.
3726 * c-common.c (c_common_reswords): Add consteval.
3727
5f6705b7
JJ
37282019-11-01 Martin Sebor <msebor@redhat.com>
3729
3730 PR middle-end/91679
3731 PR middle-end/91647
3732 PR middle-end/91463
3733 PR middle-end/92312
3734 * c-pretty-print.c (direct_abstract_declarator): Print
3735 bound in zero-length arrays.
3736 * c.opt (-Wzero-length-bounds): New option.
3737
43f1814c
NS
37382019-10-30 Nathan Sidwell <nathan@acm.org>
3739
3740 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3741 macros.
3742
ad1539d5
MS
37432019-10-28 Martin Sebor <msebor@redhat.com>
3744
3745 PR c/66970
3746 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3747 even when only preprocessing.
3748 * c-common.h (names_builtin_p): Declare new function.
3749 * c-lex.c (init_c_lex): Set has_builtin.
3750 (c_common_has_builtin): Define a new function.
3751 * c-ppoutput.c (init_pp_output): Set has_builtin.
3752
135df52c
JJ
37532019-10-24 Jakub Jelinek <jakub@redhat.com>
3754
3755 * c-common.h (c_omp_context_selector_matches): Remove.
3756 * c-omp.c (c_omp_context_selector_matches): Remove.
3757 * c-attribs.c (c_common_attribute_table): Add
3758 "omp declare target {host,nohost,block}" attributes.
3759
8ad0c477
JM
37602019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3761
3762 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3763
56898e43
RS
37642019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3765
3766 * c-common.h (user_facing_original_type_p): Declare.
3767 * c-common.c: Include c-spellcheck.h.
3768 (user_facing_original_type_p): New function.
3769
20de9568
JJ
37702019-10-12 Jakub Jelinek <jakub@redhat.com>
3771
3772 * c-common.h (c_omp_mark_declare_variant,
3773 c_omp_context_selector_matches): Declare.
3774 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3775 and hsa-common.h.
3776 (c_omp_get_context_selector): Support second argument NULL.
3777 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3778 functions.
3779 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3780 attribute, add "omp declare variant base" and
3781 "omp declare variant variant" attributes.
3782
175a85b2
JM
37832019-10-11 Joseph Myers <joseph@codesourcery.com>
3784
3785 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3786 CppReason(CPP_W_C11_C2X_COMPAT).
3787
fe2bc27c
JM
37882019-10-11 Joseph Myers <joseph@codesourcery.com>
3789
3790 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3791 _Decimal64 and _Decimal128.
3792
27dfdc0f
JM
37932019-10-10 Joseph Myers <joseph@codesourcery.com>
3794
3795 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3796 types if DFP not supported.
3797
94e7f906
JJ
37982019-10-10 Jakub Jelinek <jakub@redhat.com>
3799
3800 * c-common.h (c_omp_check_context_selector,
3801 c_omp_get_context_selector): Declare.
3802 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3803 in diagnostic message.
3804 (c_omp_check_context_selector, c_omp_get_context_selector): New
3805 functions.
3806 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3807 attribute.
3808 (handle_omp_declare_variant_attribute): New function.
3809
a7160771
MS
38102019-10-09 Martin Sebor <msebor@redhat.com>
3811
3812 PR tree-optimization/90879
3813 * c.opt (-Wstring-compare): New option.
3814
cb57504a
JM
38152019-10-08 Andrew Sutton <asutton@lock3software.com>
3816 Jason Merrill <jason@redhat.com>
3817
3818 Update the concepts implementation to conform to the C++20
3819 specification, improve compile times, and generally clean up
3820 the implementation.
3821
3822 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3823 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3824 * c.opt: Add -Wconcepts-ts.
3825 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3826 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3827 (set_std_cxx2a): Enable concepts by default.
3828
fbb2a6dc
JM
38292019-10-08 Joseph Myers <joseph@codesourcery.com>
3830
3831 * c-opts.c (c_common_post_options): Set
3832 -fno-fp-int-builtin-inexact for C2X.
3833
8e007055
JJ
38342019-10-05 Jakub Jelinek <jakub@redhat.com>
3835
3836 PR c++/91369 - Implement P0784R7: constexpr new
3837 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3838 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3839
843f104d
JM
38402019-10-04 Joseph Myers <joseph@codesourcery.com>
3841
3842 PR c/82752
3843 * c-format.c (C_STD_VER): Handle C2x.
3844 (C_STD_NAME): Likewise.
3845 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3846 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3847 modifier allowed and 'p' flag.
3848 * c-format.h (enum format_std_version): Add STD_C2X.
3849 (struct format_char_info): Mention 'p' in comment on flags2.
3850
e9c9a142
DM
38512019-10-01 David Malcolm <dmalcolm@redhat.com>
3852
3853 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3854 calling diagnostic_show_locus, rather than destroying it afterwards.
3855
7552c36a
JJ
38562019-10-01 Jakub Jelinek <jakub@redhat.com>
3857
3858 PR c++/91925
3859 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3860 with NULL DECL_FIELD_OFFSET.
3861
8209db25
RS
38622019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3863
3864 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3865 has a type name, use it in preference to the __vector syntax.
3866
9343bf99
RS
38672019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3868
3869 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3870 two spaces between a comma and "...".
3871
59bc434a
JJ
38722019-09-27 Jakub Jelinek <jakub@redhat.com>
3873
3874 PR c++/88203
3875 * c-common.h (c_omp_predefined_variable): Declare.
3876 * c-omp.c (c_omp_predefined_variable): New function.
3877 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3878 for predefined variables.
3879
c6447c20
RS
38802019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3881
3882 * c-common.h (build_function_call_vec): Take the original
3883 function decl as an optional final parameter.
3884 (check_builtin_function_arguments): Take the original function decl.
3885 * c-common.c (check_builtin_function_arguments): Likewise.
3886 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3887 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3888
c4438114
JM
38892019-09-15 Jason Merrill <jason@redhat.com>
3890
3891 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3892 fold_for_warn in "|| mask" warning.
3893
68a57628
ML
38942019-09-10 Martin Liska <mliska@suse.cz>
3895
3896 * c.opt: Use newly added WarnRemoved.
3897
f48ef52e
ML
38982019-09-09 Martin Liska <mliska@suse.cz>
3899
3900 * c.opt: Update comment of removed
3901 options that are preserved only for backward
3902 compatibility.
3903
67f6e649
ML
39042019-09-06 Martin Liska <mliska@suse.cz>
3905
3906 PR c++/91125
3907 * c-common.c: Remove definition of flag_use_repository.
3908 * c-common.h: Likewise.
3909 * c-opts.c (c_common_handle_option):
3910 Do not handle OPT_frepo option.
3911 * c.opt: Mark the option with Deprecated.
3912
db9d2274
MP
39132019-09-04 Marek Polacek <polacek@redhat.com>
3914
3915 * c.opt (fdeduce-init-list): Ignored.
3916
68e2c199
PK
39172019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3918
3919 PR c/78736
3920 * c.opt (Wenum-conversion): New option.
3921
7a4418a5
JL
39222019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3923
3924 * c-attribs.c (handle_section_attribute): Call the
3925 handle_generic_attribute target hook after performing target
3926 independent processing.
3927 (handle_noinit_attribute): Likewise.
3928
5f76ab15
ILT
39292019-09-03 Ian Lance Taylor <iant@golang.org>
3930
3931 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3932 when using -fgo-dump-spec.
3933
ae0d3f6a
ML
39342019-09-02 Martin Liska <mliska@suse.cz>
3935
3936 PR c++/91155
3937 * c-common.c (fname_as_string): Use cxx_printable_name for
3938 __PRETTY_FUNCTION__ same as was used before r265711.
3939
8a902edb
MP
39402019-08-28 Marek Polacek <polacek@redhat.com>
3941
3942 Implement P1152R4: Deprecating some uses of volatile.
3943 PR c++/91361
3944 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3945 default for C++2a, unless -Wno-deprecated.
3946 * c.opt (Wvolatile): New warning.
3947
4742dbe7
MP
39482019-08-28 Marek Polacek <polacek@redhat.com>
3949
3950 PR c++/91360 - Implement C++20 P1143R2: constinit.
3951 * c-common.c (c_common_reswords): Add constinit and __constinit.
3952 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3953 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3954 RID_LAST_CXX20.
3955 (D_CXX20): Define.
3956 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3957 * c-format.c (cxx_keywords): Add "constinit".
3958 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3959
6a074892
JJ
39602019-08-27 Jakub Jelinek <jakub@redhat.com>
3961
3962 PR c++/91415
3963 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3964 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3965 like COMPOUND_EXPR rather than normal expression.
3966
22f8849d
IS
39672019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3968
3969 PR pch/61250
3970 * c-lex.c (c_lex_with_flags): Don't call
3971 c_common_no_more_pch () from here.
3972
df375b03
JJ
39732019-08-23 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR middle-end/91283
3976 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3977 instead of flag_excess_precision_cmdline.
3978 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3979 * c-opts.c (c_common_post_options): Likewise.
3980
14b7950f
MS
39812019-08-22 Martin Sebor <msebor@redhat.com>
3982
3983 PR middle-end/91490
3984 * c-common.c (braced_list_to_string): Add argument and overload.
3985 Handle flexible length arrays and unions.
3986
8bb2ee59
EB
39872019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3988
3989 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3990 function declarations where arguments are missing. Rename variables.
3991
21c1e205
RB
39922019-08-15 Richard Biener <rguenther@suse.de>
3993
3994 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3995 enabled, define __SIZETYPE__.
3996
f0033821
CL
39972019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3998
3999 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
4000 exclusion with "section" attribute.
4001 (attr_noinit_exclusions): New table.
4002 (handle_noinit_attribute): New function.
4003
4d732405
RS
40042019-08-13 Richard Sandiford <richard.sandiford@arm.com>
4005
4006 PR middle-end/91421
4007 * c-common.c (resolve_overloaded_builtin): Use
4008 copy_decl_built_in_function.
4009
51ad8481
MS
40102019-08-13 Martin Sebor <msebor@redhat.com>
4011
4012 PR c/80619
4013 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
4014 (asm_fprintf_length_spec): Same.
4015 * c-format.h (format_lengths): Add FMT_LEN_w.
4016
77eb117f
JJ
40172019-08-10 Jakub Jelinek <jakub@redhat.com>
4018
4019 * c-pragma.h (enum pragma_omp_clause): Add
4020 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
4021
398e3feb
JJ
40222019-08-07 Jakub Jelinek <jakub@redhat.com>
4023
4024 * c-pragma.h (enum pragma_omp_clause): Add
4025 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
4026 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
4027 enumeration value.
4028
ab574db6
MP
40292019-08-05 Marek Polacek <polacek@redhat.com>
4030
4031 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
4032 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
4033 default for C++2a, unless -Wno-deprecated.
4034 * c.opt (Wcomma-subscript): New warning.
4035
554a530f
JJ
40362019-07-20 Jakub Jelinek <jakub@redhat.com>
4037
4038 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
4039 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
4040 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
4041 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
4042 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
4043 constructs with the loop construct.
4044
1a888209
JJ
40452019-07-13 Jakub Jelinek <jakub@redhat.com>
4046
4047 PR c/91149
4048 * c-omp.c (c_omp_split_clauses): Fix a pasto in
4049 OMP_CLAUSE_REDUCTION_TASK handling.
4050
1fdd6f04
JJ
40512019-07-12 Jakub Jelinek <jakub@redhat.com>
4052
4053 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
4054 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
4055
99b1c316
MS
40562019-07-09 Martin Sebor <msebor@redhat.com>
4057
4058 PR c++/61339
1fdd6f04 4059 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
4060 and others to class.
4061 * c-pretty-print.h: Same.
4062
6c1dae73
MS
40632019-07-09 Martin Sebor <msebor@redhat.com>
4064
4065 PR c++/61339
4066 * c-format.c (check_argument_type): Change class-key from class to
4067 struct and vice versa to match convention and avoid -Wclass-is-pod
4068 and -Wstruct-no-pod.
4069 * c-pretty-print.h: Same.
4070
8ba6ea87
ML
40712019-07-03 Martin Liska <mliska@suse.cz>
4072
4073 * c-common.c (try_to_locate_new_include_insertion_point): Remove
4074 dead assignemts.
4075
83eb9522
JJ
40762019-07-03 Jakub Jelinek <jakub@redhat.com>
4077
4078 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
4079 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
4080 with OMP_PARALLEL.
4081
1c6ffbab
QZ
40822019-07-02 qing zhao <qing.zhao@oracle.com>
4083
4084 PR preprocessor/90581
4085 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
4086 * c.opt: Add new option -fmax-include-depth.
4087
7ffc7de5
JM
40882019-06-26 Jason Merrill <jason@redhat.com>
4089
4090 PR c++/55442 - memory-hog with highly recursive constexpr.
4091 * c.opt (fconstexpr-loop-limit): New.
4092
361af3e4
JJ
40932019-06-25 Jakub Jelinek <jakub@redhat.com>
4094
4095 PR sanitizer/90954
4096 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
4097 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
4098
ab20d992
JJ
40992019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4100
4101 * c-common.c (c_common_nodes_and_builtins): Define
4102 alternate "__intN__" name for "__intN" types.
4103
f4af4019
JH
41042019-06-24 Jan Hubicka <jh@suse.cz>
4105
4106 * c-common.c (braced_lists_to_strings): Check that
4107 type is array or integer prior checking string flag.
4108
da9e9b57
MB
41092019-06-21 Matthew Beliveau <mbelivea@redhat.com>
4110
4111 PR c++/90875 - added -Wswitch-outside-range option
4112 * c.opt (Wswitch-outside-range): Added new option.
4113 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
4114
3f3d6a6f
MP
41152019-06-21 Marek Polacek <polacek@redhat.com>
4116
4117 PR c++/90953 - ICE with -Wmissing-format-attribute.
4118 * c-common.c (check_function_arguments_recurse): Use
4119 get_attribute_name.
4120 (check_missing_format_attribute): Likewise.
4121
1bf32c11
MP
41222019-06-19 Marek Polacek <polacek@redhat.com>
4123
4124 PR c++/60364 - noreturn after first decl not diagnosed.
4125 * c-attribs.c (handle_noreturn_attribute): No longer static.
4126 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
4127 Declare.
4128 * c-format.c (check_function_format): Use get_attribute_name.
4129
a04c0734
MS
41302019-06-19 Martin Sebor <msebor@redhat.com>
4131
4132 PR translation/90156
4133 * c-format.c (function_format_info::format_type): Adjust type.
4134 (function_format_info::is_raw): New member.
4135 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
4136 (decode_format_attr): Adjust call to decode_format_type.
4137 Avoid a redundant call to convert_format_name_to_system_name.
4138 Avoid abbreviating the word "arguments" in a diagnostic.
4139 (format_warning_substr): New function.
4140 (avoid_dollar_number): Quote dollar sign in a diagnostic.
4141 (finish_dollar_format_checking): Same.
4142 (check_format_info): Same.
4143 (struct baltoks_t): New.
4144 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
4145 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
4146 functions.
4147 (check_format_info_main): Call check_plain. Use baltoks_t. Call
4148 maybe_diag_unbalanced_tokens.
4149 (handle_format_attribute): Spell out the word "arguments" in
4150 a diagnostic.
4151
d3786ebb
MB
41522019-06-11 Matthew Beliveau <mbelivea@redhat.com>
4153
4154 PR c++/90449 - add -Winaccessible-base option.
4155 * c.opt (Winaccessible-base): New option.
4156
bf38f7e9
JJ
41572019-06-10 Jakub Jelinek <jakub@redhat.com>
4158
4159 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
4160 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
4161 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
4162 combined/composite constructs where it is not allowed. Copy over
4163 OMP_CLAUSE_REDUCTION_INSCAN.
4164
0ecf545c
MS
41652019-06-05 Martin Sebor <msebor@redhat.com>
4166
4167 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
4168 (handle_alias_ifunc_attribute): Same.
4169 (handle_copy_attribute): Same.
4170 (handle_weakref_attribute): Same.
4171 (handle_nonnull_attribute): Same.
4172 * c-warn.c (warn_for_sign_compare): Same.
4173 (warn_for_restrict): Same.
4174 * c.opt: Same.
4175
36b34127
MS
41762019-06-05 Martin Sebor <msebor@redhat.com>
4177
4178 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
4179 * c.opt (-Wformat-diag): Remove a spurious period.
4180
357a352f
JJ
41812019-05-29 Jakub Jelinek <jakub@redhat.com>
4182
4183 PR c/90628
4184 * c-common.c (check_builtin_function_arguments)
4185 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
4186 as last argument.
4187
2b8235ea
EB
41882019-05-23 Eric Botcazou <ebotcazou@adacore.com>
4189
4190 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
4191
6d86ddc4
ML
41922019-05-22 Martin Liska <mliska@suse.cz>
4193
4194 PR lto/90500
4195 * c-attribs.c (handle_copy_attribute): Do not copy
4196 target_clones attribute.
4197
419ba5b9
EB
41982019-05-21 Eric Botcazou <ebotcazou@adacore.com>
4199
4200 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
4201 * c-ada-spec.c (print_assignment_operator): New function.
4202 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
4203 assignment operators declared as methods and filter out the others.
4204
e03436e7
TS
42052019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4206
4207 PR c/89433
4208 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
4209 "omp declare target".
4210
a9c697b8
MS
42112019-05-16 Martin Sebor <msebor@redhat.com>
4212
ab20d992
JJ
4213 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
4214 keywords, operators, and types in diagnostics.
4215 (handle_scalar_storage_order_attribute): Same.
4216 (handle_mode_attribute): Same.
4217 (handle_visibility_attribute): Same.
4218 (handle_assume_aligned_attribute): Same.
4219 (handle_no_split_stack_attribute): Same.
4220 * c-common.c (shorten_compare): Same.
4221 (c_common_truthvalue_conversion): Same.
4222 (cb_get_source_date_epoch): Same.
4223 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
4224 in diagnostics.
4225 (interpret_float): Same.
4226 * c-omp.c (c_finish_omp_for): Same.
4227 * c-opts.c (c_common_post_options): Same.
4228 * c-pch.c (c_common_pch_pragma): Same.
4229 * c-pragma.c (pop_alignment): Same.
4230 (handle_pragma_pack): Same.
4231 (apply_pragma_weak): Same.
4232 (handle_pragma_weak): Same.
4233 (handle_pragma_scalar_storage_order): Same.
4234 (handle_pragma_redefine_extname): Same.
4235 (add_to_renaming_pragma_list): Same.
4236 (maybe_apply_renaming_pragma): Same.
4237 (push_visibility): Same.
4238 (handle_pragma_visibility): Same.
4239 (handle_pragma_optimize): Same.
4240 (handle_pragma_message): Same.
4241 * c-warn.c (warn_for_omitted_condop): Same.
4242 (lvalue_error): Same.
a9c697b8 4243
6b943512
RB
42442019-05-15 Richard Biener <rguenther@suse.de>
4245
4246 PR c/90474
4247 * c-common.c (c_common_mark_addressable_vec): Also mark
4248 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
4249 c_mark_addressable.
ab20d992 4250
b744fc85
NS
42512019-05-06 Nathan Sidwell <nathan@acm.org>
4252
4253 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
4254
598f50d7
NS
42552019-04-30 Nathan Sidwell <nathan@acm.org>
4256
4257 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
4258
5bcc5a3b
ML
42592019-04-30 Martin Liska <mliska@suse.cz>
4260
4261 * c-pragma.c (handle_pragma_diagnostic): Provide hints
4262 for unknown options.
4263
e78a87f7
RS
42642019-04-26 Richard Sandiford <richard.sandiford@arm.com>
4265
4266 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
4267 the pointer target rather than the pointer itself.
4268
c280b7ee
JJ
42692019-04-19 Jakub Jelinek <jakub@redhat.com>
4270
4271 PR c/89888
4272 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
4273 arguments.
4274 (c_do_switch_warnings): Remove outside_range_p argument.
4275 * c-common.c (check_case_bounds): Removed.
4276 (c_add_case_label): Remove orig_type and outside_range_p arguments.
4277 Don't call check_case_bounds. Fold low_value as well as high_value.
4278 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
4279 Check for case labels outside of range of original type here and
4280 adjust them.
4281
8e8225e6
JJ
42822019-04-12 Jakub Jelinek <jakub@redhat.com>
4283
63b8a166
JJ
4284 PR translation/90041
4285 * c.opt (-fhandle-exceptions): Use %< and %> around option names
4286 in the Warn diagnostics.
4287
8e8225e6
JJ
4288 PR c/89946
4289 * c-attribs.c (handle_patchable_function_entry_attribute): Add
4290 function comment. Warn if arguments of the attribute are not positive
4291 integer constants.
4292
53a3f614
EB
42932019-04-09 Eric Botcazou <ebotcazou@adacore.com>
4294
4295 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
4296 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
4297
22be5873
EB
42982019-04-07 Eric Botcazou <ebotcazou@adacore.com>
4299
4300 * c-ada-spec.c (is_float128): New predicate extracted from...
4301 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
4302 <REAL_TYPE>: ...here. Call it.
4303
34facf20
DM
43042019-04-05 David Malcolm <dmalcolm@redhat.com>
4305
4306 PR c/89985
4307 * c-warn.c (check_address_or_pointer_of_packed_member): Add
4308 auto_diagnostic_group. Guard inform calls by result of
4309 warning_at call.
4310
05564120
MP
43112019-04-05 Marek Polacek <polacek@redhat.com>
4312
ab20d992 4313 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
4314 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
4315 of RHS.
4316
7a506c3c
JM
43172019-04-03 Jason Merrill <jason@redhat.com>
4318
4319 PR c++/86586 - -fcompare-debug=-Wsign-compare.
4320 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
4321
ddeae8c8
MS
43222019-04-01 Martin Sebor <msebor@redhat.com>
4323
4324 PR c/89685
4325 * c-attribs.c (handle_copy_attribute): Handle references and
4326 non-constant expressions.
4327
a15ffa22
JJ
43282019-03-22 Jakub Jelinek <jakub@redhat.com>
4329
4330 PR c++/87481
4331 * c.opt (-fconstexpr-ops-limit=): New option.
4332
36a3a7a3
JJ
43332019-03-21 Jakub Jelinek <jakub@redhat.com>
4334
4335 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
4336 template param.
4337
bec1da64
MS
43382019-03-19 Martin Sebor <msebor@redhat.com>
4339
4340 PR tree-optimization/89688
4341 * c-common.c (braced_list_to_string): Make static.
4342 (braced_lists_to_strings): Define new function.
4343 * c-common.h (braced_list_to_string): Remove.
4344 (braced_lists_to_strings): Declare.
4345
1fe61adf
ML
43462019-03-12 Martin Liska <mliska@suse.cz>
4347
4348 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
4349
93964ebd
ML
43502019-03-11 Martin Liska <mliska@suse.cz>
4351
4352 * c-opts.c (c_common_post_options): Wrap apostrophes
4353 in gcc internal format with %'.
4354
a3f9f006
ML
43552019-03-11 Martin Liska <mliska@suse.cz>
4356
4357 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
4358 in a string format message and fix GNU coding style.
4359 * c-common.c (vector_types_convertible_p): Likewise.
4360 (c_build_vec_perm_expr): Likewise.
4361 * c-indentation.c (get_visual_column): Likewise.
4362 * c-opts.c (c_common_handle_option): Likewise.
4363 (c_common_post_options): Likewise.
4364 (sanitize_cpp_opts): Likewise.
4365 * c-pch.c (c_common_pch_pragma): Likewise.
4366 * c-pragma.c (handle_pragma_pack): Likewise.
4367
1db01ff9
JJ
43682019-03-08 Jakub Jelinek <jakub@redhat.com>
4369
4370 PR tree-optimization/89550
4371 * c-common.c (c_common_truthvalue_conversion): Only set
4372 TREE_NO_WARNING if warning_at returned true.
4373 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4374
ba790e6f
JJ
43752019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4376 Martin Sebor <msebor@gmail.com>
4377
4378 * c.opt (Wmissing-attributes): Clean up doc string.
4379
7da73ba7
JJ
43802019-02-25 Jakub Jelinek <jakub@redhat.com>
4381
4382 PR c/89495
4383 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4384 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4385 checking.
4386
921bb9d1
RB
43872019-02-22 Richard Biener <rguenther@suse.de>
4388
4389 * c-pch.c (no_checksum): Remove.
4390 (pch_init): Remove assertion that executable_checksum is not
4391 all zero.
4392 (c_common_valid_pch): Likewise.
4393
e2ebb05c
MS
43942019-02-18 Martin Sebor <msebor@redhat.com>
4395
4396 PR middle-end/89294
4397 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4398
3fe53000
DM
43992019-02-16 David Malcolm <dmalcolm@redhat.com>
4400
4401 PR c++/88680
4402 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4403 implementing -Wtype-limits.
4404
28a8cef1
MS
44052019-02-11 Martin Sebor <msebor@redhat.com>
4406
4407 PR c++/87996
4408 * c-common.c (invalid_array_size_error): New function.
4409 (valid_array_size_p): Call it. Handle size as well as type.
4410 * c-common.h (valid_constant_size_p): New function.
4411 (enum cst_size_error): New type.
4412
ec2be203
DM
44132019-01-31 David Malcolm <dmalcolm@redhat.com>
4414
4415 PR c/89122
4416 * known-headers.cc (get_stdlib_header_for_name): Add
4417 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4418
8936f047
JJ
44192019-01-31 Jakub Jelinek <jakub@redhat.com>
4420
4421 PR libstdc++/88170
4422 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4423 a C cast in pp_c_flag_gnu_v3 mode.
4424
6a335b96
JJ
44252019-01-29 Jakub Jelinek <jakub@redhat.com>
4426
4427 PR c/86125
4428 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4429 builtin_structptr_types types even for C.
4430
2a06eba5
BE
44312019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4432
4433 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4434 when rhs is of array type correctly. Fix handling of nested structures.
4435 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4436 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4437 type casts within nested compound expressions.
4438
18a23298
JJ
44392019-01-22 Jakub Jelinek <jakub@redhat.com>
4440
4441 PR middle-end/88968
4442 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4443 variable after using BIT_FIELD_REF.
4444
420183d9
L
44452019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4446
4447 PR c/51628
4448 PR c/88664
4449 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4450 Remove the boolean argument.
4451 * c-warn.c (check_address_of_packed_member): Renamed to ...
4452 (check_address_or_pointer_of_packed_member): This. Also
4453 warn pointer conversion.
4454 (check_and_warn_address_of_packed_member): Renamed to ...
4455 (check_and_warn_address_or_pointer_of_packed_member): This.
4456 Also warn pointer conversion.
4457 (warn_for_address_or_pointer_of_packed_member): Remove the
4458 boolean argument. Don't check pointer conversion here.
4459
99063eee
RS
44602019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4461
4462 PR inline-asm/52813
4463 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4464
a30d0196
JJ
44652019-01-14 Jakub Jelinek <jakub@redhat.com>
4466
4467 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4468 and __cpp_nontype_template_parameter_auto. Add a comment that
4469 __cpp_template_auto is deprecated.
4470
2d91f79d
TH
44712019-01-14 Tom Honermann <tom@honermann.net>
4472
4473 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4474 * c-common.c (c_common_reswords): Add char8_t.
4475 (fix_string_type): Use char8_t for the type of u8 string literals.
4476 (c_common_get_alias_set): char8_t doesn't alias.
4477 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4478 C++.
4479 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4480 (keyword_begins_type_specifier): Add RID_CHAR8.
4481 * c-common.h (rid): Add RID_CHAR8.
4482 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4483 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4484 Define char8_type_node and char8_array_type_node.
4485 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4486 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4487 (c_cpp_builtins): Predefine __cpp_char8_t.
4488 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4489 CPP_UTF8STRING.
4490 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4491 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4492 targeting C++2a.
4493 * c.opt: Add the -fchar8_t command line option.
4494
23db6ced
MS
44952019-01-14 Martin Sebor <msebor@redhat.com>
4496
4497 PR target/88638
4498 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4499 and issue errors if it fails.
4500 * c-common.h (valid_format_string_type_p): Declare.
4501 * c-format.c (valid_stringptr_type_p): Rename...
4502 (valid_format_string_type_p): ...to this and make extern.
4503 (handle_format_arg_attribute): Adjust to new name.
4504 (check_format_string): Same.
4505
234c3818
L
45062019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4507
4508 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4509 Replace "may may" with "may" in warning message.
4510
d8fcab68
JJ
45112019-01-07 Jakub Jelinek <jakub@redhat.com>
4512
4513 PR c++/85052
4514 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4515 (c_build_vec_convert): Declare.
4516 * c-common.c (c_build_vec_convert): New function.
4517
29d24852
MS
45182019-01-04 Martin Sebor <msebor@redhat.com>
4519
4520 PR c/88546
4521 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4522 Handle C++ empty throw specification and C11 _Noreturn.
4523 (has_attribute): Also handle C11 _Noreturn.
4524
9069a4c9
MS
45252019-01-04 Martin Sebor <msebor@redhat.com>
4526
4527 PR c/88363
4528 * c-attribs.c (positional_argument): Also accept enumerated types.
4529
a5544970
JJ
45302019-01-01 Jakub Jelinek <jakub@redhat.com>
4531
4532 Update copyright years.
4533
da77eace
L
45342018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4535
4536 PR c/51628
4537 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4538 * c-warn.c (check_alignment_of_packed_member): New function.
4539 (check_address_of_packed_member): Likewise.
4540 (check_and_warn_address_of_packed_member): Likewise.
4541 (warn_for_address_or_pointer_of_packed_member): Likewise.
4542 * c.opt: Add -Wno-address-of-packed-member.
4543
573767d4
DM
45442018-12-20 David Malcolm <dmalcolm@redhat.com>
4545
4546 PR c++/87504
4547 * c-warn.c (get_outermost_macro_expansion): New function.
4548 (spelled_the_same_p): Use it to unwind the macro expansions, and
4549 compare the outermost macro in each nested expansion, rather than
4550 the innermost.
4551
a14feb3c
DM
45522018-12-19 David Malcolm <dmalcolm@redhat.com>
4553
4554 PR c++/87504
4555 * c-common.h (warn_tautological_cmp): Convert 1st param from
4556 location_t to const op_location_t &.
4557 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4558 when testing for INTEGER_CST.
4559 (warn_tautological_bitwise_comparison): Convert 1st param from
4560 location_t to const op_location_t &; use it to build a
4561 binary_op_rich_location, and use this.
4562 (spelled_the_same_p): New function.
4563 (warn_tautological_cmp): Convert 1st param from location_t to
4564 const op_location_t &. Warn for macro expansions if
4565 spelled_the_same_p. Use binary_op_rich_location.
4566
dfd7fdca
DM
45672018-12-19 David Malcolm <dmalcolm@redhat.com>
4568
4569 PR c++/43064
4570 PR c++/43486
4571 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4572 (verify_tree): Handle location wrappers.
4573 (c_common_truthvalue_conversion): Strip any location wrapper.
4574 Handle CONST_DECL.
4575 (fold_offsetof): Strip any location wrapper.
4576 (complete_array_type): Likewise for initial_value.
4577 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4578 index before checking for INTEGER_CST.
4579 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4580 print parentheses around location wrappers.
4581 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4582 before checking for INTEGER_CST.
4583 (warn_tautological_bitwise_comparison): Call
4584 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4585 before checking for INTEGER_CST.
4586 (readonly_error): Strip any location wrapper.
4587 (warn_array_subscript_with_type_char): Strip location wrappers
4588 before checking for INTEGER_CST. Use the location of the index if
4589 available.
4590
5c8b3702
JM
45912018-12-06 Jason Merrill <jason@redhat.com>
4592
4593 PR c++/88136 - -Wdeprecated-copy false positives
4594 * c.opt (Wdeprecated-copy-dtor): New.
4595 (Wdeprecated-copy): Move to -Wextra.
4596
673670da
MS
45972018-11-29 Martin Sebor <msebor@redhat.com>
4598
4599 PR c/88172
4600 PR testsuite/88208
4601 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4602 alignments to values less than the target requires.
4603 (has_attribute): For attribute aligned consider both the attribute
4604 and the alignment bits.
4605 * c-common.c (c_init_attributes): Optionally issue a warning for
4606 zero alignment.
4607
04864ec8
MS
46082018-11-28 Martin Sebor <msebor@redhat.com>
4609
4610 PR c/88065
4611 PR c/87297
4612 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4613 or destination is an error.
4614
ace83db0
JJ
46152018-11-28 Jakub Jelinek <jakub@redhat.com>
4616
4617 PR c++/88215
4618 * c-ubsan.c: Include langhooks.h.
4619 (ubsan_instrument_division): Change gcc_assert that main variants
4620 of op0 and op1 types are equal to gcc_checking_assert that the
4621 main variants are compatible types.
4622
da193a27
EB
46232018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4624
4625 * c-ada-spec.c: Include stringpool.h.
4626 (has_static_fields): Return false for incomplete types.
4627 (is_tagged_type): Likewise.
4628 (has_nontrivial_methods): Likewise.
4629 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4630 (struct overloaded_name_hash): New structure.
4631 (struct overloaded_name_hasher): Likewise.
4632 (overloaded_names): New global variable.
4633 (init_overloaded_names): New static function.
4634 (overloaded_name_p): New predicate.
4635 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4636 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4637 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4638 Remove always-true condition and dump forward types.
4639 (dump_ada_specs): Delete overloaded_names.
4640
98f08eb8
MS
46412018-11-20 Martin Sebor <msebor@redhat.com>
4642
4643 * c-attribs.c (type_for_vector_size): New function.
4644 (type_valid_for_vector_size): Same.
4645 (handle_vector_size_attribute): Move code to the functions above
4646 and call them.
4647 (validate_attribute, has_attribute): New functions.
4648 * c-common.h (has_attribute): Declare.
4649 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4650 * c-common.c (c_common_resword): Same.
4651
2674fa47
JM
46522018-11-16 Jason Merrill <jason@redhat.com>
4653
4654 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4655 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4656
258b3854
JJ
46572018-11-16 Jakub Jelinek <jakub@redhat.com>
4658
4659 PR middle-end/87854
4660 * c-common.c (fix_string_type): Reject string literals larger than
4661 TYPE_MAX_VALUE (ssizetype) bytes.
4662
1d249509
MS
46632018-11-15 Martin Sebor <msebor@redhat.com>
4664
4665 PR c++/87541
4666 PR c++/87542
4667 * c-attribs.c (positional_argument): New function.
4668 (handle_alloc_size_attribute): Use it and simplify.
4669 (handle_alloc_align_attribute): Same.
4670 (handle_assume_aligned_attribute): Same.
4671 (handle_nonnull_attribute): Same.
4672 * c-common.c (check_function_arguments): Pass fntype to
4673 check_function_format.
4674 * c-common.h (check_function_format): Add an argument.
4675 (PosArgFlags, positional_argument): Declare new type and function.
4676 * c-format.c (decode_format_attr): Add arguments.
4677 (check_format_string, get_constant): Same.
4678 (convert_format_name_to_system_name): Adjust.
4679
478dd60d
DM
46802018-11-15 David Malcolm <dmalcolm@redhat.com>
4681
4682 PR other/19165
4683 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4684
8cca0163
JJ
46852018-11-14 Jakub Jelinek <jakub@redhat.com>
4686
8ee09943
JJ
4687 P1236R1 - Signed integers are two's complement
4688 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4689 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4690 with in-range second operand well defined for -std=c++2a.
4691
8cca0163
JJ
4692 PR other/88007
4693 * c-common.c (parse_optimize_options): Allocate option string from
4694 opts_obstack rather than as GC memory. Move the allocation after
4695 warning for invalid option.
4696
620e594b
DM
46972018-11-13 David Malcolm <dmalcolm@redhat.com>
4698
4699 * c-common.c (c_get_substring_location): Update for renaming of
4700 get_source_location_for_substring to get_location_within_string.
4701 * c-lex.c: Replace "source_location" with "location_t".
4702 * c-opts.c: Likewise.
4703 * c-ppoutput.c: Likewise.
4704
f9731de3
MS
47052018-11-13 Martin Sebor <msebor@redhat.com>
4706
4707 PR middle-end/81824
4708 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4709 (handle_tls_model_attribute): Improve diagnostics.
4710
e4bd6d5e
JM
47112018-11-12 Jason Merrill <jason@redhat.com>
4712
a6bb6b07
JM
4713 * c-cppbuiltin.c (c_cpp_builtins): Define
4714 __cpp_impl_destroying_delete.
4715
e4bd6d5e
JM
4716 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4717 __cpp_conditional_explicit.
4718
79a2c428
MS
47192018-11-09 Martin Sebor <msebor@redhat.com>
4720
4721 PR middle-end/81824
4722 * c-attribs.c (handle_copy_attribute): New function.
4723
4c7bd361
MS
47242018-11-09 Martin Sebor <msebor@redhat.com>
4725
4726 PR c/87795
4727 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4728
28567c40
JJ
47292018-11-08 Jakub Jelinek <jakub@redhat.com>
4730
4731 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4732 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4733 enum omp_memory_order MEMORY_ORDER.
4734 (c_finish_omp_flush): Add MO argument.
4735 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4736 (c_finish_omp_for): Add FINAL_P argument.
4737 * c-omp.c: Include memmodel.h.
4738 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4739 OMP_TASKGROUP_CLAUSES to it.
4740 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4741 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4742 instead of OMP_ATOMIC_SEQ_CST.
4743 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4744 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4745 __atomic_thread_fence call with the given value.
4746 (check_omp_for_incr_expr): Formatting fixes.
4747 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4748 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4749 is not constant expression 1 or -1. Transform NE_EXPR loops
4750 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4751 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4752 loops too.
4753 (c_omp_split_clauses): Add support for combined
4754 #pragma omp parallel master and
4755 #pragma omp {,parallel }master taskloop{, simd} constructs.
4756 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4757 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4758 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4759 (c_omp_predetermined_sharing): Don't return
4760 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4761 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4762 PRAGMA_OMP_REQUIRES.
4763 * c-pragma.h (enum pragma_kind): Likewise.
4764 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4765 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4766
204839e7
DM
47672018-11-08 David Malcolm <dmalcolm@redhat.com>
4768
4769 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4770
d8010ee4
DM
47712018-11-08 David Malcolm <dmalcolm@redhat.com>
4772
4773 * c-format.c (local_cgraph_node_ptr_node): New variable.
4774 (gcc_dump_printf_char_table): Add entry for %C.
4775 (get_pointer_to_named_type): New function, taken from the handling
4776 code for "gimple *" from...
4777 (init_dynamic_diag_info): ...here. Add handling for
4778 "cgraph_node *".
4779 * c-format.h (T_CGRAPH_NODE): New.
4780
4be5c72c
JM
47812018-10-19 Jason Merrill <jason@redhat.com>
4782
4783 * c-cppbuiltin.c (c_cpp_builtins): Add
4784 __cpp_nontype_template_parameter_class.
4785
f3f6029d
NS
47862018-10-31 Nathan Sidwell <nathan@acm.org>
4787
ab5324fb
NS
4788 * c-opts.c (c_finish_options): Force command line macro
4789 location. Refactor to avoid repeating main debug hook.
4790 (push_command_line_include): Clarify comment.
4791
f3f6029d
NS
4792 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4793
91e3ec29
MS
47942018-10-30 Martin Sebor <msebor@redhat.com>
4795
4796 PR middle-end/87041
4797 * c-format.c (check_format_types): Avoid diagnosing null pointer
4798 arguments to printf-family of functions.
4799
b5ff4f5c
MP
48002018-10-30 Marek Polacek <polacek@redhat.com>
4801
4802 Implement P0892R2, explicit(bool).
4803 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4804
7e2de6df
DM
48052018-10-29 David Malcolm <dmalcolm@redhat.com>
4806
4807 * name-hint.h (name_hint::take_deferred): New member function.
4808
b2bf438c
DM
48092018-10-29 David Malcolm <dmalcolm@redhat.com>
4810
4811 PR c++/56856
4812 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4813 argument.
4814 (check_function_restrict): Rename param "argarray" to
4815 "unfolded_argarray", and make a copy named "argarray", calling
4816 fold_for_warn on each argument.
4817 (check_function_arguments): Add note about responsibility for
4818 folding the arguments.
4819
9f936c86
JM
48202018-10-17 Joseph Myers <joseph@codesourcery.com>
4821
4822 * c-common.c (flag_isoc2x): New variable.
4823 * c-common.h (clk_c): Update comment to reference C2X.
4824 (flag_isoc99, flag_isoc11): Update comments to reference future
4825 standard versions in general.
4826 (flag_isoc2x): Declare.
4827 * c-opts.c (set_std_c2x): New function.
4828 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4829 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4830 flag_isoc2x to 0.
4831 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4832
7a8a92c4
JM
48332018-10-17 Joseph Myers <joseph@codesourcery.com>
4834
4835 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4836 (std=iso9899:2018): Document C17 as published in 2018.
4837
4dc003ff
CL
48382018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4839
4840 PR c++/87364
4841 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4842
79371671
WW
48432018-10-11 Will Wray <wjwray@gmail.com>
4844
4845 PR c++/87364
4846 * c-pretty-print.h (pp_c_type_cast): Prototype.
4847 (pp_c_integer_constant): Likewise.
4848 * c-pretty-print.c (pp_c_type_cast): No longer static.
4849 (pp_c_integer_constant): Likewise.
4850 (pp_c_enumeration_constant): Fix loop termination when finding
4851 name of constant. No longer returns a value. Call
4852 pp_c_integer_constant.
4853 (c_pretty_printer::constant): Update for changes to
4854 pp_c_enumeration_constant.
4855
46c62690
JJ
48562018-10-11 Jakub Jelinek <jakub@redhat.com>
4857
4858 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4859 for no_unique_address.
4860
c24300ba
DM
48612018-10-09 David Malcolm <dmalcolm@redhat.com>
4862
4863 * c-common.c (c_option_controlling_cpp_error): Rename to...
4864 (c_option_controlling_cpp_diagnostic): ...this, and convert
4865 "reason" from int to enum.
4866 (c_cpp_error): Rename to...
4867 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4868 * c-common.h (c_cpp_error): Rename to...
4869 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4870 * c-opts.c (c_common_init_options): Update for renaming.
4871
8656dafa
RS
48722018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4873
4874 PR c/87286
4875 * c-common.c (vector_types_compatible_elements_p): Use
4876 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4877
8cff0652
VK
48782018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4879
4880 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4881 to generate constructor destructor priority warning.
4882 * c.opt (-Wprio-ctor-dtor): New option.
4883
bedf03a2
JM
48842018-10-01 Jason Merrill <jason@redhat.com>
4885
4886 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4887
6cc430c1
EB
48882018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4889
4890 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4891 (dump_ada_node): Add const keyword.
4892
87677ac7
ML
48932018-09-25 Martin Liska <mliska@suse.cz>
4894
4895 * c-common.c (c_common_truthvalue_conversion):
4896 Remove Pascal from documentation.
4897
518196cb
EB
48982018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4899
4900 * c-ada-spec.c: Include diagnostic.h.
4901 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4902
a599af84
MP
49032018-09-19 Marek Polacek <polacek@redhat.com>
4904
4905 * c.opt (Wclass-conversion): New.
4906
9c4a4b3c
DM
49072018-09-17 David Malcolm <dmalcolm@redhat.com>
4908
4909 * c-format.c (range_label_for_format_type_mismatch::get_text):
4910 Update for new param.
4911
c896ecfe
DM
49122018-09-17 David Malcolm <dmalcolm@redhat.com>
4913
4914 * c-format.c (format_warning_at_char): Update for introduction of
4915 format_string_diagnostic_t.
4916 (format_type_warning): Likewise.
4917
80c6d1f4
MJ
49182018-09-17 Martin Jambor <mjambor@suse.cz>
4919
4920 PR c/63886
4921 * c.opt (Wabsolute-value): New.
4922
6d900107
BE
49232018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4924
4925 * c-common.c (complete_flexible_array_elts): New helper function.
4926 * c-common.h (complete_flexible_array_elts): Declare.
4927
b5764229
BE
49282018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4929
4930 * c-common.c (braced_list_to_string): Remove eval parameter.
4931 Add some more checks. Always create zero-terminated STRING_CST.
4932 * c-common.h (braced_list_to_string): Adjust prototype.
4933
85204e23
DM
49342018-08-27 David Malcolm <dmalcolm@redhat.com>
4935
4936 PR 87091
4937 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4938 to a tri-state.
4939 (maybe_suggest_missing_token_insertion): Likewise.
4940 (maybe_add_include_fixit): Add param "override_location". If set,
4941 and source-printing is enabled, then override the rich_location's
4942 primary location with that of the insertion point for the fix-it
4943 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4944 * c-common.h (extern void maybe_add_include_fixit): Add bool
4945 param.
4946 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4947 for conversion of show_caret_p to a tri-state.
4948 * c-warn.c (warn_for_restrict): Likewise.
4949 * known-headers.cc
4950 (suggest_missing_header::~suggest_missing_header): Update call to
4951 maybe_add_include_fixit to suggest overriding the location, as it
4952 is for a note.
4953
3d78e008
ML
49542018-08-27 Martin Liska <mliska@suse.cz>
4955
4956 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4957 fndecl_built_in_p and remove check for FUNCTION_DECL if
4958 possible.
3d78e008
ML
4959 (check_builtin_function_arguments): Likewise.
4960 (reject_gcc_builtin): Likewise.
4961 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4962
b5be6d0c
MP
49632018-08-26 Marek Polacek <polacek@redhat.com>
4964
4965 PR c++/87029, Implement -Wredundant-move.
4966 * c.opt (Wredundant-move): New option.
4967
79ca9c35
MP
49682018-08-21 Marek Polacek <polacek@redhat.com>
4969
4970 PR c++/86981, Implement -Wpessimizing-move.
4971 * c.opt (Wpessimizing-move): New option.
4972
097f82ec
DM
49732018-08-20 David Malcolm <dmalcolm@redhat.com>
4974
4975 PR other/84889
4976 * c-attribs.c (common_handle_aligned_attribute): Add
4977 auto_diagnostic_group instance.
4978 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4979 * c-opts.c (c_common_post_options): Likewise.
4980 * c-warn.c (warn_logical_not_parentheses): Likewise.
4981 (warn_duplicated_cond_add_or_warn): Likewise.
4982 (warn_for_multistatement_macros): Likewise.
4983
3fb558b1
NS
49842018-08-20 Nathan Sidwell <nathan@acm.org>
4985
4986 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4987 access.
4988
800c0e98
NS
49892018-08-17 Nathan Sidwell <nathan@acm.org>
4990
4991 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4992 field.
4993 (laxy_hex_fp_value_count): Make unsigned.
4994 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4995 manipulate the macro.
4996 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4997 cpp_define_lazily.
4998
6f795a92
DM
49992018-08-17 David Malcolm <dmalcolm@redhat.com>
5000
5001 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
5002 (gcc_dump_printf_length_specs): New.
5003 (gcc_dump_printf_flag_pairs): New.
5004 (gcc_dump_printf_flag_specs): New.
5005 (gcc_dump_printf_char_table): New.
5006 (format_types_orig): Add entry for "gcc_dump_printf".
5007 (init_dynamic_diag_info): Set up length_char_specs and
5008 conversion_specs for gcc_dump_printf_format_type.
5009 (handle_format_attribute): Handle gcc_dump_printf_format_type.
5010
c5d725c0
NS
50112018-08-17 Nathan Sidwell <nathan@acm.org>
5012
10f04917
NS
5013 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
5014
c5d725c0
NS
5015 * c-ada-spec.c: Don't #include "cpp-id-data.h"
5016 * c-cppbuiltin.c: Likewise.
5017
c0c12356
ML
50182018-08-17 Martin Liska <mliska@suse.cz>
5019
5020 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
5021 Ignore/Deprecated flag. Warning is done automatically for
5022 Deprecated flags.
c0c12356 5023
10fcc142
DM
50242018-08-16 David Malcolm <dmalcolm@redhat.com>
5025
5026 PR c++/70693
5027 * c-common.c (selftest::c_family_tests): Call
5028 selftest::c_indentation_c_tests.
5029 * c-common.h (selftest::c_indentation_c_tests): New decl.
5030 * c-indentation.c: Include "selftest.h".
5031 (next_tab_stop): Add "tab_width" param, rather than accessing
5032 cpp_opts.
5033 (get_visual_column): Likewise. Clarify comment. Bulletproof
5034 against reading past the end of the line.
5035 (get_first_nws_vis_column): Add "tab_width" param.
5036 (detect_intervening_unindent): Likewise.
5037 (should_warn_for_misleading_indentation): Read tab width from
5038 cpp_opts and pass around.
5039 (selftest::test_next_tab_stop): New test.
5040 (selftest::assert_get_visual_column_succeeds): New function.
5041 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
5042 (selftest::assert_get_visual_column_fails): New function.
5043 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
5044 (selftest::test_get_visual_column): New test.
5045 (selftest::c_indentation_c_tests): New function.
5046
3f6677f4
NS
50472018-08-16 Nathan Sidwell <nathan@acm.org>
5048
5049 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
5050 (store_ada_macro): Likewise.
5051 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
5052 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
5053
96e6ae57
DM
50542018-08-15 David Malcolm <dmalcolm@redhat.com>
5055
5056 * c-format.c: Include "selftest-diagnostic.h" and
5057 "gcc-rich-location.h".
5058 (format_warning_at_char): Pass NULL for new label params of
5059 format_warning_va.
5060 (class indirection_suffix): New class.
5061 (class range_label_for_format_type_mismatch): New class.
5062 (format_type_warning): Move logic for generating "*" suffix to
5063 class indirection_suffix. Create "fmt_label" and "param_label"
5064 to show their types, and pass them to the
5065 format_warning_at_substring calls.
5066 (selftest::test_type_mismatch_range_labels): New test.
5067 (selftest::c_format_c_tests): Call it.
5068
23aa9f7c
MS
50692018-08-13 Martin Sebor <msebor@redhat.com>
5070
5071 PR tree-optimization/71625
5072 * c-common.c (braced_list_to_string): New function.
5073 * c-common.h (braced_list_to_string): Declare it.
5074
f10a9135
NS
50752018-08-08 Nathan Sidwell <nathan@acm.org>
5076
5077 * c-common.c (try_to_locate_new_include_inertion_point): Use
5078 linemap_included_from_linemap.
5079 * c-lex.c (fe_file_change): Use linemap_included_from.
5080 * c-ppoutput.c (pp_file_change): Likewise.
5081
8a45b051
MS
50822018-08-01 Martin Sebor <msebor@redhat.com>
5083
5084 PR tree-optimization/86650
ab20d992 5085 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
5086 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
5087 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
5088 * c-format.h (T89_G): Update to be "gimple *" rather than
5089 "gcall *".
5090 (local_gcall_ptr_node): Rename...
5091 (local_gimple_ptr_node): ...to this.
5092
e540ccc0
DM
50932018-07-31 David Malcolm <dmalcolm@redhat.com>
5094
5095 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
5096 table entries for gcc_diag_char_table, and the 'Z' entry from
5097 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
5098 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
5099 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
5100 adding missing "Z" for this table. Remove erroneous "G" and "K"
5101 entries.
5102 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5103 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
5104 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
5105
425fc685
RE
51062018-07-31 Richard Earnshaw <rearnsha@arm.com>
5107
5108 * c-common.c (speculation_safe_resolve_call): New function.
5109 (speculation_safe_resolve_params): New function.
5110 (speculation_safe_resolve_return): New function.
5111 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
5112 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
5113 __HAVE_SPECULATION_SAFE_VALUE.
5114
181463c2
DM
51152018-07-20 David Malcolm <dmalcolm@redhat.com>
5116
5117 * c-common.c (c_cpp_error): Remove redundant "line_table"
5118 parameter from call to rich_location::set_range.
5119 (maybe_suggest_missing_token_insertion): Likewise.
5120
0d7f9065
MS
51212018-07-20 Martin Sebor <msebor@redhat.com>
5122
5123 PR middle-end/82063
ab20d992 5124 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 5125
00abf86c
MS
51262018-07-20 Martin Sebor <msebor@redhat.com>
5127
5128 PR middle-end/82063
5129 * c-common.h (c_common_handle_option): Change function argument
5130 to HOST_WIDE_INT.
5131 * c-opts.c (c_common_init_options): Same.
5132 (c_common_handle_option): Same. Remove special handling of
5133 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
5134 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
5135 options to take a HOST_WIDE_INT argument and accept a byte-size
5136 suffix. Initialize.
5137 (-Wvla-larger-than): Same.
5138 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
5139 (-Wno-vla-larger-than): Same.
5140
9b452033
JJ
51412018-07-12 Jakub Jelinek <jakub@redhat.com>
5142
5143 * c-attribs.c (c_common_attribute_table): Add
5144 "omp declare target implicit" attribute.
5145
cd0762f3
RB
51462018-07-12 Richard Biener <rguenther@suse.de>
5147
5148 PR c/86453
5149 * c-attribs.c (handle_packed_attribute): Do not build a variant
5150 type with TYPE_PACKED, instead ignore the attribute if we may
5151 not apply to the original type.
5152
0b27c3ed
JJ
51532018-07-10 Jakub Jelinek <jakub@redhat.com>
5154
5155 PR c++/86443
5156 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
5157 to contain TREE_LIST for both the original class iterator and the
5158 "last" helper var.
5159
e730a0ef
EB
51602018-07-07 Eric Botcazou <ebotcazou@adacore.com>
5161
5162 * c-ada-spec.c (to_ada_name): Remove index parameter.
5163 (pp_ada_tree_identifier): Likewise.
5164 (dump_ada_macros): Adjust call to to_ada_name.
5165 (struct overloaded_name_hash): Delete.
5166 (struct overloaded_name_hasher): Likewise.
5167 (overloaded_names): Likewise.
5168 (compute_overloading_index): Likewise.
5169 (dump_ada_decl_name): Do not call compute_overloading_index and
5170 adjust calls to pp_ada_tree_identifier.
5171 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5172 (dump_ada_import): Add spc parameter and switch to aspect syntax.
5173 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
5174 (dump_ada_enum_type): Remove type and display_convention parameters.
5175 Adjust calls to pp_ada_tree_identifier.
5176 (dump_ada_node): Likewise and for dump_ada_structure.
5177 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
5178 and tidy up.
5179 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
5180 syntax.
5181 (print_constructor): Adjust call to pp_ada_tree_identifier.
5182 (print_destructor): Likewise.
5183 (dump_ada_declaration): Switch to aspect syntax.
5184 (dump_ada_structure): Likewise and tidy up. Replace display_convention
5185 parameter with nested parameter.
5186 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
5187 (dump_ada_specs): Do not delete overloaded_names table.
5188
8de583fc
PB
51892018-07-06 Peter Bergner <bergner@linux.ibm.com>
5190
5191 PR target/86324
e730a0ef 5192 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
5193 target hook.
5194
09cff37b
NS
51952018-07-05 Nathan Sidwell <nathan@acm.org>
5196
5197 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
5198 NO_IMPLICIT_EXTERN_C.
5199
98086b2b
ML
52002018-06-28 Martin Liska <mliska@suse.cz>
5201
5202 * cppspec.c: Include opt-suggestions.h.
5203
ab20d992
JJ
52042018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5205 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
5206 Cesar Philippidis <cesar@codesourcery.com>
5207
5208 * c-pragma.h (enum pragma_omp_clause): Add
5209 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
5210 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
5211
f41b7612
JJ
52122018-06-20 Jakub Jelinek <jakub@redhat.com>
5213
5214 PR c++/86210
5215 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
5216 comment.
5217
4252ccd7
MS
52182018-06-18 Martin Sebor <msebor@redhat.com>
5219
5220 PR middle-end/85602
5221 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
5222 nonstring.
5223
e197e64e
KV
52242018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5225
5226 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
5227
34a7a230
JM
52282018-06-13 Jason Merrill <jason@redhat.com>
5229
5cef3733
JM
5230 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
5231 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
5232 handling.
5233
34a7a230
JM
5234 PR c++/86094 - wrong code with defaulted move ctor.
5235 * c-opts.c (c_common_post_options): Bump the current ABI version to
5236 13. Set warn_abi_version and flag_abi_compat_version to the current
5237 version rather than 0. Fix defaulting flag_abi_compat_version from
5238 warn_abi_version.
5239
bb0f14ae
MS
52402018-06-12 Martin Sebor <msebor@redhat.com>
5241
5242 PR c/85931
5243 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
5244 sizeof source and destination yields the same value.
5245
3713f2e2
ML
52462018-06-12 Martin Liska <mliska@suse.cz>
5247
5248 * c.opt: Make MPX-related options as Deprecated.
5249
4af78ef8
DM
52502018-06-08 David Malcolm <dmalcolm@redhat.com>
5251
5252 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
5253 rather than 0.
5254
31db0fe0
ML
52552018-06-08 Martin Liska <mliska@suse.cz>
5256
5257 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
5258 for MPX (macros, related functions, fields in cgraph_node, ...).
5259 (handle_bnd_legacy): Likewise.
5260 (handle_bnd_instrument): Likewise.
5261 * c.opt: Likewise.
5262
fe16acf2
JJ
52632018-06-06 Jakub Jelinek <jakub@redhat.com>
5264
5265 PR c++/86068
5266 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
5267 __cpp_transactional_memory to 201500 instead of 210500.
5268
4dbdb49b
JM
52692018-06-06 Jason Merrill <jason@redhat.com>
5270
5271 PR c++/85710 - ICE with -Wmemset-elt-size.
5272 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
5273
f8ad043f
JM
52742018-06-01 Jason Merrill <jason@redhat.com>
5275
5276 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
5277 201703.
5278
abc24d93
EB
52792018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5280
5281 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
5282 declaration for a typedef independently of whether the declaration of
5283 the subtype is generated.
5284
d258f4aa
MS
52852018-05-31 Martin Sebor <msebor@redhat.com>
5286
5287 PR c/82063
5288 * c.opt (-Wno-alloc-size-larger-than): New option.
5289
b67b9225
DP
52902018-04-22 David Pagan <dave.pagan@oracle.com>
5291
5292 PR c/55976
5293 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 5294 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
5295 differentiate between default (no option), -Wreturn-type, and
5296 -Wno-return-type.
5297
04eb9c55
JM
52982018-05-29 Jason Merrill <jason@redhat.com>
5299
5300 * c.opt (Winit-list-lifetime): New flag.
5301
b0c31bc6
BE
53022018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5303
5304 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
5305 splay_tree_delete_pointers.
5306
44284983
JJ
53072018-05-26 Jakub Jelinek <jakub@redhat.com>
5308
5309 PR bootstrap/85921
5310 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
5311 noinline variable to workaround broken kernel headers.
5312
b46b715d
JM
53132018-05-18 Jason Merrill <jason@redhat.com>
5314
5315 * c.opt (Wdeprecated-copy): New flag.
5316
40659769
ML
53172018-05-17 Martin Liska <mliska@suse.cz>
5318
5319 * c-warn.c (overflow_warning): Do not use
5320 space in between 'G_' and '('.
5321
403962ea
JM
53222018-05-09 Jason Merrill <jason@redhat.com>
5323
5324 * c-common.c (valid_array_size_p): Add complain parameter.
5325 * c-common.h: ...which defaults to true.
5326
1c9ee609
JJ
53272018-05-11 Jakub Jelinek <jakub@redhat.com>
5328
5329 PR c/85696
5330 * c-omp.c (c_omp_predetermined_sharing): Return
5331 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
5332
19916065
ML
53332018-05-11 Martin Liska <mliska@suse.cz>
5334
92a285c1 5335 PR sanitizer/85556
19916065
ML
5336 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
5337 TREE_LIST values.
5338
79e7b1fe
JJ
53392018-05-10 Jakub Jelinek <jakub@redhat.com>
5340
5341 PR c++/85662
5342 * c-common.h (fold_offsetof_1): Removed.
5343 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
5344 CTX argument defaulted to ERROR_MARK.
5345 * c-common.c (fold_offsetof_1): Renamed to ...
5346 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
5347 argument, convert the pointer constant to TYPE and use size_binop
5348 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
5349 a pointer type. Adjust recursive calls.
5350
86c12f76
EB
53512018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5352
5353 PR c++/85400
5354 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
5355
ee336e84
NS
53562018-05-07 Nathan Sidwell <nathan@acm.org>
5357
5358 * c.opt (ffor-scope): Remove functionality, issue warning.
5359
6c072e21
NS
53602018-05-03 Nathan Sidwell <nathan@acm.org>
5361
5362 * c.opt (ffriend-injection): Remove functionality, issue warning.
5363
2cc7d3a7
DM
53642018-05-01 David Malcolm <dmalcolm@redhat.com>
5365
5366 PR c/84258
5367 * c-format.c (struct format_check_results): Add field
5368 "number_non_char".
5369 (check_format_info): Initialize it, and warn if encountered.
5370 (check_format_arg): Distinguish between wide char and
5371 everything else when detecting arrays of non-char.
5372
7761dfbe
DM
53732018-04-30 David Malcolm <dmalcolm@redhat.com>
5374
5375 * c-format.c (get_corrected_substring): Update for
5376 location_get_source_line returning a char_span. Use a char_span
5377 when handling the prefix of the correction.
5378 * c-indentation.c (get_visual_column): Update for
5379 location_get_source_line returning a char_span.
5380 (get_first_nws_vis_column): Likewise.
5381
62e98ef1
DM
53822018-03-29 David Malcolm <dmalcolm@redhat.com>
5383
5384 PR c++/84269
5385 * known-headers.cc (get_stdlib_header_for_name): Add various names
5386 from <assert.h>, <string.h>, and <memory.h>; add more names from
5387 <stdio.h>.
5388
a7dea617
JJ
53892018-03-27 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR c++/85061
5392 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5393 get_base_address of the second operand is a VAR_P, rather than the
5394 operand itself, and use gcc_checking_assert instead of gcc_assert.
5395
889a3a30
MP
53962018-03-23 Marek Polacek <polacek@redhat.com>
5397
5398 PR c++/85045
5399 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5400 <case RDIV_EXPR>: Tweak condition.
5401
452154b9
EB
54022018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5403
5404 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5405
63ecb626
JJ
54062018-03-16 Jakub Jelinek <jakub@redhat.com>
5407
ce811fc4
JJ
5408 PR c/84909
5409 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5410 diagnostics.
5411
63ecb626
JJ
5412 PR c/84910
5413 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5414 diagnostics.
5415
a1295eec
RB
54162018-03-16 Richard Biener <rguenther@suse.de>
5417
5418 PR c/84873
5419 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5420 unshare the possibly folded expression.
5421
919674fb
RB
54222018-03-15 Richard Biener <rguenther@suse.de>
5423
5424 PR c/84873
5425 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5426
f99309b2
MS
54272018-03-13 Martin Sebor <msebor@redhat.com>
5428
5429 PR tree-optimization/84725
5430 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5431 with all three narrow character types, including their qualified forms.
5432
e9b9fa4c
MS
54332018-03-12 Martin Sebor <msebor@redhat.com>
5434
5435 PR tree-optimization/83456
ab20d992 5436 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5437 Restore checking of bounded built-in functions.
5438 (check_function_arguments): Also return the result
5439 of warn_for_restrict.
ab20d992
JJ
5440 * c-common.c (check_function_restrict): Return bool.
5441 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5442
0805d020
MP
54432018-03-02 Marek Polacek <polacek@redhat.com>
5444
5445 PR c++/84171
5446 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5447 is erroneous.
5448
ed2a2f08
TS
54492018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5450
5451 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5452 function".
5453
90abdde0
MP
54542018-03-01 Marek Polacek <polacek@redhat.com>
5455
5456 PR c++/84639
5457 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5458 alignment in computation.
5459
c6db43fa
EB
54602018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5461
5462 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5463 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5464
9e25c7ed
EB
54652018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5466
5467 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5468 (is_char_array): Take a type instead of a declaration.
5469 (dump_ada_array_type): Likewise.
5470 (is_simple_enum): Minor tweak.
5471 (dump_ada_enum_type): New function extracted from...
5472 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5473 <INTEGER_TYPE>: Remove unreachable code.
5474 <RECORD_TYPE>: Likewise. Minor tweaks.
5475 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5476 <ENUMERAL_TYPE>: New case.
5477 <RECORD_TYPE>: Factor out common code.
5478 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5479 Minor tweaks. Deal with enumeral types.
5480 (dump_ada_structure): Minor tweaks.
5481
09de3550
EB
54822018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5483
5484 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5485 address for incomplete structures.
5486 (dump_forward_type): Do not bail out for incomplete structures.
5487 (dump_ada_declaration): Do not special-case incomplete structures
5488 for subtypes. Dump them as null records for types.
5489
095d8d4b
EB
54902018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5491
5492 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5493 (is_char_array): Fix formatting.
5494 (dump_template_types): Likewise.
5495 (dump_generic_ada_node): Rename into...
5496 (dump_ada_node): ...this.
5497 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5498 incomplete structures and not for empty structures. Do not use it
5499 when forward declarations are needed.
5500 (dump_forward_type): New function.
5501 (dump_nested_types): Remove FORWARD parameter. Do not consider
5502 TREE_VISITED and do not generate a forward declaration. Only dump
5503 original nested types for nested declaration.
5504 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5505 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5506 <RECORD_TYPE>: Do not consider TREE_VISITED.
5507 (dump_ada_declaration): Use booleans and fix formatting throughout.
5508 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5509 Call dump_forward_type instead of dump_nested_types for a typedef.
5510 Remove superfluous check and adjust call to dump_nested_types.
5511 <POINTER_TYPE>: Call dump_forward_type and fall through.
5512 (dump_ada_struct_decl): Rename into...
5513 (dump_ada_structure): ...this. Do not special-case empty structures.
5514
d4cfd486
MS
55152018-02-27 Martin Sebor <msebor@redhat.com>
5516
5517 PR c++/83871
5518 * c.opt (-Wmissing-attributes): New option.
5519
b22dbd03
ML
55202018-02-21 Martin Liska <mliska@suse.cz>
5521
5522 * c.opt (Wcatch-value=): Add IntegerRange.
5523
883dfe2a
JM
55242018-02-15 Jason Merrill <jason@redhat.com>
5525
5526 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5527
0444aa9c
NS
55282018-02-09 Nathan Sidwell <nathan@acm.org>
5529
5530 PR c/84293
5531 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5532 arg.
5533 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5534 arg. Adjust.
5535
cea71f0a
MS
55362018-02-09 Martin Sebor <msebor@redhat.com>
5537
5538 PR lto/84212
5539 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5540 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5541 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5542 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5543 (-Wuninitialized): Same.
5544
8c8b7be5
EB
55452018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5546
5547 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5548 keyword for components.
5549
7c30b12a
PC
55502018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5551
5552 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5553
eece7fe5
JK
55542018-02-02 Julia Koval <julia.koval@intel.com>
5555
5556 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5557
7d07a93a
MP
55582018-01-29 Marek Polacek <polacek@redhat.com>
5559
5560 PR c/83966
5561 * c-format.c (check_function_format): Check current_function_decl.
5562
53723269
JJ
55632018-01-27 Jakub Jelinek <jakub@redhat.com>
5564
5565 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5566 argument.
5567 (LAZY_HEX_FP_VALUES_CNT): Define.
5568 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5569 values rather than just 12.
5570 (builtin_define_with_hex_fp_value): Likewise.
5571
7365279f
BK
55722018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5573
92a285c1
ML
5574 PR other/70268
5575 * c.opt (-fmacro-prefix-map): New option.
5576 * c-opts.c (c_common_handle_option): Handle it.
5577 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5578 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5579
bb9869d5
DM
55802018-01-17 David Malcolm <dmalcolm@redhat.com>
5581
5582 PR c++/83814
5583 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5584
68dc87c3
EB
55852018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5586
5587 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5588 Skip 'f' and 'F' characters if it is true.
5589 (store_ada_macro): Minor tweak.
5590 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5591 <CPP_WSTRING>: Likewise.
5592 <CPP_STRING>: Output '&' in the buffer if not the first string.
5593 <CPP_NUMBER>: Adjust calls to dump_number.
5594
9a004410
DM
55952018-01-10 David Malcolm <dmalcolm@redhat.com>
5596
5597 PR c++/43486
5598 * c-common.c: Include "selftest.h".
5599 (get_atomic_generic_size): Perform the test for integral type
5600 before the range test for any integer constant, fixing indentation
5601 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5602 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5603 (selftest::test_fold_for_warn): New function.
5604 (selftest::c_common_c_tests): New function.
5605 (selftest::c_family_tests): Call it, and
5606 selftest::c_pretty_print_c_tests.
5607 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5608 * c-format.c (check_format_arg): Convert VAR_P check to a
5609 fold_for_warn.
5610 * c-pretty-print.c: Include "selftest.h".
5611 (pp_c_cast_expression): Don't print casts for location wrappers.
5612 (selftest::assert_c_pretty_printer_output): New function.
5613 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5614 (selftest::test_location_wrappers): New function.
5615 (selftest::c_pretty_print_c_tests): New function.
5616 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5617
5c0caeb3
RS
56182018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5619 Alan Hayward <alan.hayward@arm.com>
5620 David Sherwood <david.sherwood@arm.com>
5621
5622 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5623
73a699ae
RS
56242018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5625 Alan Hayward <alan.hayward@arm.com>
5626 David Sherwood <david.sherwood@arm.com>
5627
5628 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5629 as polynomial.
5630
928686b1
RS
56312018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5632 Alan Hayward <alan.hayward@arm.com>
5633 David Sherwood <david.sherwood@arm.com>
5634
5635 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5636 (convert_vector_to_array_for_subscript): Handle polynomial
5637 TYPE_VECTOR_SUBPARTS.
5638 (c_common_type_for_mode): Check valid_vector_subparts_p.
5639 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5640 VECTOR_CST_NELTS.
5641
85ec4feb
JJ
56422018-01-03 Jakub Jelinek <jakub@redhat.com>
5643
5644 Update copyright years.
5645
170a8bd6 56462017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5647 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5648
5649 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5650 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5651
ab20d992 56522017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5653
5654 PR debug/83527
5655 PR debug/83419
5656 * c-semantics.c (only_debug_stmts_after_p): New.
5657 (pop_stmt_list): Clear side effects in debug-only stmt list.
5658 Check for single nondebug stmt followed by debug stmts only.
5659
c12d20d4
AO
56602017-12-21 Alexandre Oliva <aoliva@redhat.com>
5661
5662 PR debug/83419
5663 * c-semantics.c (pop_stmt_list): Propagate side effects from
5664 single nondebug stmt to container list.
5665
01512446
JJ
56662017-12-19 Jakub Jelinek <jakub@redhat.com>
5667
5668 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5669 conditions with typical order conditions.
5670
82cfbd01
MP
56712017-12-18 Marek Polacek <polacek@redhat.com>
5672
5673 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5674 not in effect.
5675
99da11ec
MS
56762017-12-17 Martin Sebor <msebor@redhat.com>
5677
5678 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5679 an error for attribute warn_if_not_aligned.
5680
cc8bea0a
MS
56812017-12-16 Martin Sebor <msebor@redhat.com>
5682
5683 PR tree-optimization/78918
5684 * c-common.c (check_function_restrict): Avoid checking built-ins.
5685 * c.opt (-Wrestrict): Include in -Wall.
5686
4849deb1
JJ
56872017-12-15 Jakub Jelinek <jakub@redhat.com>
5688
5689 * c-attribs.c (c_common_attribute_table,
5690 c_common_format_attribute_table): Swap affects_type_identity
5691 and handler fields, adjust comments.
5692
c65e18d3
BE
56932017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5694
5695 * c.opt (Wcast-function-type): New warning option.
5696 * c-lex.c (get_fileinfo): Avoid warning.
5697 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5698
2004617a
QZ
56992017-12-14 Qing Zhao <qing.zhao@oracle.com>
5700
7365279f 5701 PR middle_end/79538
2004617a
QZ
5702 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5703 Adjust the size of buf1 and buf2, add a new buf to avoid
5704 format-overflow warning.
5705
ab20d992 57062017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5707
5708 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5709 subsequent statement list.
5710
5d9ae53d
MS
57112017-12-07 Martin Sebor <msebor@redhat.com>
5712
5713 PR c/81544
5714 PR c/81566
5715 * c-attribs.c (attr_aligned_exclusions): New array.
5716 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5717 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5718 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5719 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5720 (attr_warn_unused_result_exclusions): Same.
5721 (handle_hot_attribute, handle_cold_attribute): Simplify.
5722 (handle_const_attribute): Warn on function returning void.
5723 (handle_pure_attribute): Same.
5724 (handle_aligned_attribute): Diagnose conflicting attribute
5725 specifications.
5726 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5727
c79144f8
DM
57282017-12-06 David Malcolm <dmalcolm@redhat.com>
5729
5730 PR c/83236
5731 * c-common.c (selftest::c_family_tests): Call
5732 selftest::c_spellcheck_cc_tests.
5733 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5734 * c-spellcheck.cc: Include "selftest.h".
5735 (name_reserved_for_implementation_p): New function.
5736 (should_suggest_as_macro_p): New function.
5737 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5738 should_suggest_as_macro_p and call it.
5739 (selftest::test_name_reserved_for_implementation_p): New function.
5740 (selftest::c_spellcheck_cc_tests): New function.
5741 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5742
613bc14f
DM
57432017-12-06 David Malcolm <dmalcolm@redhat.com>
5744
5745 * c-spellcheck.cc: New file, taken from macro-handling code in
5746 spellcheck-tree.c.
5747 * c-spellcheck.h: New file, taken from macro-handling code in
5748 spellcheck-tree.h.
5749
e76c7157
JJ
57502017-12-01 Jakub Jelinek <jakub@redhat.com>
5751
5752 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5753 attribute.
5754 (handle_simd_attribute): Don't check for "cilk simd function"
5755 attribute. Reindent, formatting changes.
5756
b0da4034
JK
57572017-11-30 Julia Koval <julia.koval@intel.com>
5758
5759 * c-common.h (inv_list): Remove.
5760
058f0b9e
JJ
57612017-11-28 Jakub Jelinek <jakub@redhat.com>
5762
5763 PR sanitizer/81275
5764 * c-common.c (c_switch_covers_all_cases_p_1,
5765 c_switch_covers_all_cases_p): New functions.
5766 * c-common.h (c_switch_covers_all_cases_p): Declare.
5767
5e9d6aa4 57682017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5769 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5770
5771 * array-notation-common.c: Delete.
5772 * c-cilkplus.c: Ditto.
5773 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5774 * c-common.def (ARRAY_NOTATION_REF): Remove.
5775 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5776 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5777 c_validate_cilk_plus_loop, cilkplus_an_parts,
5778 cilk_ignorable_spawn_rhs_op,
5779 cilk_recognize_spawn): Remove.
5780 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5781 * c-omp.c: Remove CILK_SIMD check.
5782 * c-pragma.c: Ditto.
5783 * c-pragma.h: Remove CILK related pragmas.
5784 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5785 ARRAY_NOTATION_REF condition.
5786 (c_pretty_printer::expression): Ditto.
5787 * c.opt (fcilkplus): Remove.
5788 * cilk.c: Delete.
5789
1af4ebf5
MG
57902017-11-21 Marc Glisse <marc.glisse@inria.fr>
5791
5792 * c-pretty-print.c (pp_c_additive_expression,
5793 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5794
d44ed508
JJ
57952017-11-21 Jakub Jelinek <jakub@redhat.com>
5796
7d2f0f9b
JJ
5797 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5798
d44ed508
JJ
5799 PR c++/83059
5800 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5801 instead of tree_to_uhwi, formatting fix.
5802
26edace6
DM
58032017-11-20 David Malcolm <dmalcolm@redhat.com>
5804
5805 PR c/81404
5806 * known-headers.cc: New file, based on material from c/c-decl.c.
5807 (suggest_missing_header): Copied as-is.
5808 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5809 heavily edited to add C++ support. Add some knowledge about
5810 <limits.h>, <stdint.h>, and <wchar.h>.
5811 * known-headers.h: Likewise.
5812
6c7a259b
DM
58132017-11-20 David Malcolm <dmalcolm@redhat.com>
5814
5815 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5816 (lookup_name_fuzzy): Likewise. Convert return type from
5817 const char * to name_hint. Add location_t param.
5818 * name-hint.h: New header.
5819
f9c59f7e
JJ
58202017-11-19 Jakub Jelinek <jakub@redhat.com>
5821
5822 PR c/66618
5823 PR c/69960
5824 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5825
1e39313a
JM
58262017-11-16 Joseph Myers <joseph@codesourcery.com>
5827
5828 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5829 expected publication date of C17.
5830 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5831
3ca0dc60
JM
58322017-11-15 Joseph Myers <joseph@codesourcery.com>
5833
5834 PR c/81156
5835 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5836 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5837
025d57f0
MS
58382017-11-10 Martin Sebor <msebor@redhat.com>
5839
5840 PR c/81117
5841 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5842 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5843 * c.opt (-Wstringop-truncation): New option.
5844
1b6fa695
ML
58452017-11-06 Martin Liska <mliska@suse.cz>
5846
5847 PR middle-end/82404
5848 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5849 FE.
5850 * c.opt: Set default value of warn_return_type.
5851
64a5912c
DM
58522017-10-31 David Malcolm <dmalcolm@redhat.com>
5853
5854 * c-common.c (binary_op_error): Update for renaming of
5855 error_at_rich_loc.
5856 (c_parse_error): Likewise.
5857 * c-warn.c (warn_logical_not_parentheses): Likewise for
5858 renaming of inform_at_rich_loc.
5859 (warn_for_restrict): Likewise for renaming of
5860 warning_at_rich_loc_n.
5861
c76dc9c3
JM
58622017-10-30 Joseph Myers <joseph@codesourcery.com>
5863
5864 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5865 * c-opts.c (set_std_c17): New function.
5866 (c_common_init_options): Use gnu17 as default C version.
5867 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5868
ee5fd23a
MM
58692017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5870
5871 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5872 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5873 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5874 __FP_FAST_FMA<N>X.
5875
d1047465
MP
58762017-10-23 Marek Polacek <polacek@redhat.com>
5877
5878 PR c/82681
5879 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5880
9e878cf1
EB
58812017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5882
5883 * c-common.c (check_builtin_function_arguments): Also check arguments
5884 of __builtin_alloca_with_align_and_max.
5885
89b6abbb
DM
58862017-10-17 David Malcolm <dmalcolm@redhat.com>
5887
5888 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5889 rather than NULL to format_warning_va.
5890 (check_format_types): Likewise when calling format_type_warning.
5891 Remove code to extract source_ranges and source_range * in favor
5892 of just a location_t.
5893 (format_type_warning): Convert source_range * param to a
5894 location_t.
5895
39382c09
JJ
58962017-10-13 Jakub Jelinek <jakub@redhat.com>
5897
5898 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5899 [LR]SHIFT_EXPR.
5900
62e1c678
DM
59012017-10-12 David Malcolm <dmalcolm@redhat.com>
5902
5903 * c-common.c (enum missing_token_insertion_kind): New enum.
5904 (get_missing_token_insertion_kind): New function.
5905 (maybe_suggest_missing_token_insertion): New function.
5906 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5907
b90c9338
NS
59082017-10-11 Nathan Sidwell <nathan@acm.org>
5909
5910 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5911 (c_common_handle_option): Update incpath_kind names.
5912
3a266bcd
ML
59132017-10-11 Martin Liska <mliska@suse.cz>
5914
5915 PR sanitizer/82490
5916 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5917 Wattributes warning.
5918
8e6cdc90
RS
59192017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5920
5921 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5922 operating on trees as wide_ints.
5923 * c-common.c (pointer_int_sum): Likewise.
5924 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5925 * c-warn.c (match_case_to_enum_1): Likewise.
5926 (c_do_switch_warnings): Likewise.
5927 (maybe_warn_shift_overflow): Likewise.
5928
802b38c9
JJ
59292017-10-10 Jakub Jelinek <jakub@redhat.com>
5930
5931 PR c/82437
5932 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5933 instead of wide_int::from.
5934
4e34b338
JJ
59352017-10-06 Jakub Jelinek <jakub@redhat.com>
5936
5937 PR c/82437
5938 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5939 using to_widest use wide_int with the larger of the two precisions.
5940
4bc4b2b4
BE
59412017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5942
5943 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5944 functions.
5945
a1488398
RS
59462017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5947
5948 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5949 when combining the original unconverted comparison operands.
5950
01c9fb68
JJ
59512017-09-29 Jakub Jelinek <jakub@redhat.com>
5952
5953 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5954 attribute.
5955
6e3e8419
EB
59562017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5957
5958 * c-ada-spec.c (to_ada_name): Add index parameter.
5959 (pp_ada_tree_identifier): Likewise.
5960 (dump_ada_macros): Adjust call to to_ada_name.
5961 (struct overloaded_name_hash): New type.
5962 (struct overloaded_name_hasher): Likewise.
5963 (overloaded_names): New hash table.
5964 (compute_overloading_index): New function.
5965 (dump_ada_decl_name): Call it and pass the result to
5966 pp_ada_tree_identifier.
5967 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5968 (dump_ada_function_declaration): Likewise.
5969 (dump_generic_ada_node): Likewise.
5970 (print_constructor): Likewise.
5971 (print_destructor): Likewise.
5972 (dump_ada_specs): Delete overloaded_names table.
5973
79310774
EB
59742017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5975
5976 * c-ada-spec.c (max_ada_macros): Move around.
5977 (store_ada_macro_index): Likewise.
5978 (source_file): Rename into...
5979 (macro_source_file): ...this.
5980 (count_ada_macro): Move around.
5981 (store_ada_macro): Likewise.
5982 (compare_macro): Likewise.
5983 (print_ada_macros): Merge in...
5984 (dump_ada_macros): ...this.
5985 (source_file_base): Rename into...
5986 (current_source_file): ...this.
5987 (print_comment): Move around.
5988 (dump_ada_nodes): Call dump_ada_declaration directly.
5989 (struct with): Change type of limited field to bool.
5990 (append_withs): Change type of limited_access parameter to bool.
5991 (pp_ada_tree_identifie): Likewise.
5992 (dump_ada_decl_nam): Likewise.
5993 (dump_generic_ada_node): Likewise. Do not print the return type.
5994 (to_ada_name): Change type of space_found parameter to bool.
5995 (dump_ada_function_declaration): Return void and change type of
5996 parameters to bool. Also print the return type for a function.
5997 (print_ada_methods): Rename into...
5998 (dump_ada_methods): ...this.
5999 (print_ada_declaration): Rename into ...
6000 (dump_ada_declaration): ...this. Do not print the return type.
6001 (print_ada_struct_decl): Rename into...
6002 (dump_ada_struct_decl): ...this.
6003
7d386d45
JJ
60042017-09-29 Jakub Jelinek <jakub@redhat.com>
6005
6006 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
6007 rather than DECL_INITIAL.
6008 (common_handle_aligned_attribute): Likewise.
6009
ab20d992 60102017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
6011
6012 * c.opt (gen-decls): Add RejectNegative.
6013
026a79f7
AS
60142017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
6015 Jakub Jelinek <jakub@redhat.com>
6016
6017 Add support for -std=c++2a.
6018 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
6019 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
6020 * c-opts.c (set_std_cxx2a): New.
6021 (c_common_handle_option): Set options when -std=c++2a is enabled.
6022 (c_common_post_options): Adjust comments.
6023 (set_std_cxx14, set_std_cxx17): Likewise.
6024
4a8ca690
EB
60252017-09-15 Eric Botcazou <ebotcazou@adacore.com>
6026
6027 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
6028 message for non-uniform endianness and issue a warning in C++.
6029
7b936140
JJ
60302017-09-15 Jakub Jelinek <jakub@redhat.com>
6031
6032 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
6033 (Wc++17-compat): Change from undocumented alias to option.
6034 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
6035 change C++1z to C++17 in description.
6036 (std=c++1z, std=gnu++1z): Change from option to undocumented
6037 deprecated alias.
6038 (std=c++17, std=gnu++17): Change from undocumented alias to option.
6039 Adjust description.
6040 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
6041 * c-opts.c (set_std_cxx1z): Rename to ...
6042 (set_std_cxx17): ... this.
6043 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
6044 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 6045 caller.
7b936140
JJ
6046 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
6047 comments.
6048
12263f13
L
60492017-09-12 H.J. Lu <hongjiu.lu@intel.com>
6050
6051 * c-attribs.c (common_handle_aligned_attribute): Don't warn
6052 function alignment if warn_if_not_aligned_p is true.
6053
6836632e
NS
60542017-09-12 Nathan Sidwell <nathan@acm.org>
6055
6056 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
6057 resort_sorted_fields): Move to c/c-decl.c.
6058 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
6059 (struct sorted_fields_type): Move to c/c-lang.h.
6060
019bf9ad
JW
60612017-09-09 Jonathan Wakely <jwakely@redhat.com>
6062
6063 PR c++/81852
6064 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
6065
bc7fe952
MP
60662017-09-04 Marek Polacek <polacek@redhat.com>
6067
6068 PR c/81783
6069 * c-warn.c (warn_tautological_bitwise_comparison): New function.
6070 (warn_tautological_cmp): Call it.
6071
ab20d992 60722017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
6073
6074 * c-opts.c (c_common_finish): Write dependency information even if
6075 there are errors.
6076
d2e05fcb
JJ
60772017-09-01 Jakub Jelinek <jakub@redhat.com>
6078
6079 PR c/81887
6080 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
6081 (omp_pragmas_simd): ... here.
6082 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
6083 create new clauses list containing just simd clause.
6084
18e2a8b8
RS
60852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6086 Alan Hayward <alan.hayward@arm.com>
6087 David Sherwood <david.sherwood@arm.com>
6088
6089 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6090 into scalar_mode_supported_p call.
6091 (handle_mode_attribute): Update call to scalar_mode_supported_p.
6092
16d22000
RS
60932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6094 Alan Hayward <alan.hayward@arm.com>
6095 David Sherwood <david.sherwood@arm.com>
6096
6097 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
6098 for the mode iterator.
6099
b397965c
RS
61002017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6101 Alan Hayward <alan.hayward@arm.com>
6102 David Sherwood <david.sherwood@arm.com>
6103
6104 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
6105 * c-common.c (c_build_vec_perm_expr): Likewise.
6106
357b7604
RS
61072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6108 Alan Hayward <alan.hayward@arm.com>
6109 David Sherwood <david.sherwood@arm.com>
6110
6111 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
6112
e05c94ba
RS
61132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6114 Alan Hayward <alan.hayward@arm.com>
6115 David Sherwood <david.sherwood@arm.com>
6116
6117 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
6118 before calling targetm.addr_space.valid_pointer_mode.
6119
5c20c4af
RS
61202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6121 Alan Hayward <alan.hayward@arm.com>
6122 David Sherwood <david.sherwood@arm.com>
6123
6124 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
6125
c94843d2 61262017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
6127 Alan Hayward <alan.hayward@arm.com>
6128 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
6129
6130 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
6131 iterators.
6132 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6133
4e10a5a7
RS
61342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6135 Alan Hayward <alan.hayward@arm.com>
6136 David Sherwood <david.sherwood@arm.com>
6137
6138 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
6139 case statements.
6140
130fcab0
ML
61412017-08-29 Martin Liska <mliska@suse.cz>
6142
6143 PR other/39851
6144 * c-common.c (parse_optimize_options): Add argument to function
6145 call.
6146 * c-pragma.c (handle_pragma_diagnostic): Likewise.
6147
14e18d71
DM
61482017-08-24 David Malcolm <dmalcolm@redhat.com>
6149
6150 * c-lex.c (interpret_float): Use token location
6151 when building an EXCESS_PRECISION_EXPR.
6152
2f687306
DM
61532017-08-21 David Malcolm <dmalcolm@redhat.com>
6154
6155 * c-common.c (check_function_arguments): Add "arglogs" param; pass
6156 it to check_function_format.
6157 * c-common.h (check_function_arguments): Add vec<location_t> *
6158 param.
6159 (check_function_format): Likewise.
6160 * c-format.c (struct format_check_context): Add field "arglocs".
6161 (check_function_format): Add param "arglocs"; pass it to
6162 check_format_info.
ab20d992 6163 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
6164 new field of format_ctx.
6165 (check_format_arg): Pass format_ctx->arglocs to new param of
6166 check_format_info_main.
6167 (class argument_parser): New field "arglocs".
6168 (argument_parser::argument_parser): Add "arglocs_" param and use
6169 it to initialize new field.
6170 (argument_parser::check_argument_type): Pass new arglocs field to
6171 check_format_types.
6172 (check_format_info_main): Add param "arglocs", and use it when
6173 constructing arg_parser.
6174 (check_format_types): Add param "arglocs"; use it if non-NULL when
6175 !EXPR_HAS_LOCATION (cur_param) to get at location information.
6176
00aa1fa2
L
61772017-08-18 H.J. Lu <hongjiu.lu@intel.com>
6178
6179 PR c/53037
6180 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
6181 (c_common_attribute_table): Add warn_if_not_aligned.
6182 (handle_aligned_attribute): Renamed to ...
6183 (common_handle_aligned_attribute): Remove argument, name, and add
6184 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
6185 (handle_aligned_attribute): New.
6186 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
6187
27be025d
MS
61882017-08-14 Martin Sebor <msebor@redhat.com>
6189
6190 PR c/81117
6191 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
6192 (handle_nonstring_attribute): New function.
6193
da67acb9
MS
61942017-08-14 Martin Sebor <msebor@redhat.com>
6195
6196 PR c/81117
6197 * c-format.h (T89_G): New macro.
6198 * c-format.c (local_gcall_ptr_node): New variable.
6199 (init_dynamic_diag_info): Initialize it.
6200
a8b522b4
ML
62012017-08-11 Martin Liska <mliska@suse.cz>
6202
6203 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
6204 TARGET_SUPPORTS_ALIASES.
6205
32129a17
DM
62062017-08-10 David Malcolm <dmalcolm@redhat.com>
6207
6208 * c-common.c (c_parse_error): Add rich_location * param, using it
6209 rather implicitly using input_location.
6210 * c-common.h (c_parse_error): Add rich_location * param.
6211
30af3a2b
MP
62122017-08-09 Marek Polacek <polacek@redhat.com>
6213
6214 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
6215 (c_common_truthvalue_conversion): Likewise.
6216 * c-omp.c (c_finish_omp_atomic): Likewise.
6217 * c-common.h (build_binary_op): Update declaration.
6218
314e6352
ML
62192017-08-08 Martin Liska <mliska@suse.cz>
6220
6221 * c-ada-spec.c: Include header files.
6222 * c-ubsan.c: Likewise.
6223 * c-warn.c: Likewise.
6224
56b5041c
JJ
62252017-08-07 Jakub Jelinek <jakub@redhat.com>
6226
6227 PR c/69389
6228 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
6229
db440138
EB
62302017-08-07 Eric Botcazou <ebotcazou@adacore.com>
6231
6232 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
6233 (print_ada_methods): Likewise.
6234 (print_ada_declaration): Likewise.
6235
577eec56
ML
62362017-08-07 Martin Liska <mliska@suse.cz>
6237
6238 * array-notation-common.c: Add new includes.
6239 * c-format.c( handle_format_attribute): Canonicalize a format
6240 function name.
6241 * c-lex.c (c_common_has_attribute): Canonicalize name of an
6242 attribute.
6243 * c-pretty-print.c: Add new include.
6244
b854df3c
EB
62452017-08-05 Eric Botcazou <ebotcazou@adacore.com>
6246
6247 * c-ada-spec.c (has_static_fields): Look only into variables.
6248 (print_constructor): Add TYPE parameter and use it for the name.
6249 (print_destructor): Likewise.
6250 (print_ada_declaration): Adjust to new constructor/destructor names.
6251 Adjust calls to print_constructor and print_destructor.
6252 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
6253 Look only into variables in the final loop.
6254
9f2cb25e
EB
62552017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6256
6257 * c-ada-spec.c (has_static_fields): Look only into fields.
6258 (dump_generic_ada_node): Small tweak.
6259 (dump_nested_types): Look only into fields.
6260 (print_ada_declaration): Look only into methods. Small tweak.
6261 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
6262
f4bcd9eb
EB
62632017-08-01 Eric Botcazou <ebotcazou@adacore.com>
6264
6265 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
6266 (dump_ada_function_declaration): Likewise.
6267 (dump_generic_ada_node): Likewise.
6268 (print_ada_declaration): Add support for const-qualified variables.
6269
f34ebeb2
ML
62702017-07-31 Martin Liska <mliska@suse.cz>
6271
6272 PR sanitize/81530
6273 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
6274 Guard condition with flag_sanitize_p also with current_function_decl
6275 non-null equality.
6276 (ubsan_maybe_instrument_reference_or_call): Likewise.
6277
218e5d04
UB
62782017-07-30 Uros Bizjak <ubizjak@gmail.com>
6279
6280 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
6281
942047f2
EB
62822017-07-29 Eric Botcazou <ebotcazou@adacore.com>
6283
6284 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
6285 for enumeral types.
6286 (print_ada_declaration): Add missing guard for record types.
6287
a40ff0ae
JJ
62882017-07-27 Jakub Jelinek <jakub@redhat.com>
6289
6290 PR c/45784
6291 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
6292 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
6293 new COMPOUND_EXPRs around the rhs of the comparison.
6294
06bd22f6
MP
62952017-07-27 Marek Polacek <polacek@redhat.com>
6296
6297 PR c/81417
6298 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
6299 the types.
6300
036ea399
JJ
63012017-07-27 Jakub Jelinek <jakub@redhat.com>
6302
6303 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
6304 (handle_noipa_attribute): New function.
6305
417ca011
TD
63062017-07-07 Torsten Duwe <duwe@suse.de>
6307
6308 * c-attribs.c (c_common_attribute_table): Add entry for
6309 "patchable_function_entry".
6310
5aaa8fb4
NS
63112017-07-20 Nathan Sidwell <nathan@acm.org>
6312
6313 Remove TYPE_METHODS.
6314 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
6315 dump_ada_template, print_ada_methods,
6316 print_ada_declaration): Member fns are on TYPE_FIELDS.
6317
ff22eb12
NS
63182017-07-18 Nathan Sidwell <nathan@acm.org>
6319
6320 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
6321
eea77d1f
DM
63222017-07-14 David Malcolm <dmalcolm@redhat.com>
6323
6324 * c-common.c (try_to_locate_new_include_insertion_point): New
6325 function.
6326 (per_file_includes_t): New typedef.
6327 (added_includes_t): New typedef.
6328 (added_includes): New variable.
6329 (maybe_add_include_fixit): New function.
6330 * c-common.h (maybe_add_include_fixit): New decl.
6331
281ac396
MS
63322017-07-10 Martin Sebor <msebor@redhat.com>
6333
6334 PR other/81345
6335 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
6336
b6f43128
DM
63372017-07-06 David Malcolm <dmalcolm@redhat.com>
6338
6339 * c-common.c (selftest::c_family_tests): New.
6340 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
6341 (selftest::c_family_tests): New decl.
6342
efbf55b0
MP
63432017-07-04 Marek Polacek <polacek@redhat.com>
6344
6345 PR c/81231
6346 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
6347 types.
6348
6c86bd88
MP
63492017-07-04 Marek Polacek <polacek@redhat.com>
6350
6351 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
6352
17a7218b
ML
63532017-06-28 Martin Liska <mliska@suse.cz>
6354
6355 PR ipa/81128
6356 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
6357 to a function declaration.
6358
63010089
ML
63592017-06-28 Martin Liska <mliska@suse.cz>
6360
6361 PR driver/79659
6362 * c.opt: Add IntegerRange to various options.
6363
3e2becc4
MP
63642017-06-26 Marek Polacek <polacek@redhat.com>
6365
6366 PR c/80116
6367 * c-common.h (warn_for_multistatement_macros): Declare.
6368 * c-warn.c: Include "c-family/c-indentation.h".
6369 (warn_for_multistatement_macros): New function.
6370 * c.opt (Wmultistatement-macros): New option.
6371 * c-indentation.c (guard_tinfo_to_string): No longer static.
6372 Change the parameter type to "enum rid". Handle RID_SWITCH.
6373 * c-indentation.h (guard_tinfo_to_string): Declare.
6374
2db9b7cd
MG
63752017-06-23 Marc Glisse <marc.glisse@inria.fr>
6376
6377 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6378
c3684b7b
MS
63792017-06-15 Martin Sebor <msebor@redhat.com>
6380
6381 PR c++/80560
6382 * c.opt (-Wclass-memaccess): New option.
6383
e72c4afd
BK
63842017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6385
6386 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6387
8a516588
MP
63882017-06-13 Marek Polacek <polacek@redhat.com>
6389
6390 PR objc/80949
6391 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6392 branches is null.
6393
45b2222a
ML
63942017-06-13 Martin Liska <mliska@suse.cz>
6395
6396 PR sanitize/78204
6397 * c-attribs.c (add_no_sanitize_value): New function.
6398 (handle_no_sanitize_attribute): Likewise.
6399 (handle_no_sanitize_address_attribute): Use the function.
6400 (handle_no_sanitize_thread_attribute): New function.
6401 (handle_no_address_safety_analysis_attribute): Use
6402 add_no_sanitize_value.
6403 (handle_no_sanitize_undefined_attribute): Likewise.
6404 * c-common.h: Declare new functions.
6405 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6406 (ubsan_instrument_shift): Likewise.
6407 (ubsan_instrument_bounds): Likewise.
6408 (ubsan_maybe_instrument_array_ref): Likewise.
6409 (ubsan_maybe_instrument_reference_or_call): Likewise.
6410
a01f151f
JM
64112017-06-11 Jason Merrill <jason@redhat.com>
6412
6413 * c-ada-spec.c, c-pragma.c: Use id_equal.
6414
3de4ac6d
MP
64152017-06-04 Marek Polacek <polacek@redhat.com>
6416
6417 PR c/80919
6418 * c-format.c (matching_type_p): Return false if any of the types
6419 requires structural equality.
6420
2474f48f
MS
64212017-06-02 Martin Sebor <msebor@redhat.com>
6422
6423 PR c/80892
6424 * c-warn.c (conversion_warning): Use -Wconversion for integer
6425 conversion and -Wfloat-conversion for floating one.
6426
40ffd95f
BE
64272017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6428
6429 * c.opt (Wsizeof-pointer-div): New warning option.
6430
3fa4634c
VR
64312017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6432
6433 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6434 (Wcatch-value=1): Enable by -Wall.
6435
f012c8ef
DM
64362017-05-30 David Malcolm <dmalcolm@redhat.com>
6437
6438 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6439 format_chars.
6440 * c.opt (fdiagnostics-show-template-tree): New option.
6441 (felide-type): New option.
6442
63dbcd13
VR
64432017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6444
6445 * c.opt (Wcatch-value=): New C++ warning flag.
6446
be136b5c
NS
64472017-05-24 Nathan Sidwell <nathan@acm.org>
6448
6449 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6450 const casts to avoid warning.
6451
3cd211af
MS
64522017-05-24 Martin Sebor <msebor@redhat.com>
6453
6454 PR c/80731
6455 * c-common.h (unsafe_conversion_p): Add a function argument.
6456 * c-common.c (unsafe_conversion_p): Same.
6457 Add type names and values to diagnostics.
6458 (scalar_to_vector): Adjust.
6459 * c-warn.c (constant_expression_error): Add a function argument.
6460 Add type names and values to diagnostics.
6461 (conversion_warning): Add a function argument.
6462 Add type names and values to diagnostics.
6463 (warnings_for_convert_and_check): Same.
6464
1ff7be5a
JM
64652017-05-19 Jason Merrill <jason@redhat.com>
6466
6467 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6468 enumerators.
6469
ff502317
BE
64702017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6471
6472 * c-format.c (locus): Move out of function scope,
6473 add GTY attribute.
6474
2a8a8d7b
NS
64752017-05-19 Nathan Sidwell <nathan@acm.org>
6476
6477 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6478 (c_common_parse_file): Remove class dump handling.
6479 (get_dump_info): Likewise.
6480
39aac208
RB
64812017-05-19 Richard Biener <rguenther@suse.de>
6482
6483 PR c++/80593
6484 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6485 to alias-set zero memory.
6486
6ecd2339
BE
64872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6488
6489 * c-format.c (local_tree_type_node): Add GTY attribute.
6490
6574d78e
MP
64912017-05-18 Marek Polacek <polacek@redhat.com>
6492
6493 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6494 (c_common_fixed_point_type_for_size): Likewise.
6495 (c_common_type_for_mode): Likewise.
6496 (shorten_compare): Likewise.
6497 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6498 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6499
e3455240
MP
65002017-05-18 Marek Polacek <polacek@redhat.com>
6501
6502 * c-common.c (self_promoting_args_p): Change the return type to bool.
6503 Use false/true instead of 0/1.
6504 * c-common.h (self_promoting_args_p): Update.
6505
3fa8871b
MP
65062017-05-17 Marek Polacek <polacek@redhat.com>
6507
6508 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6509 * c-warn.c: Likewise.
6510
b42cc3ca
VV
65112017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6512
6513 Implement new C++ intrinsics __is_assignable and __is_constructible.
6514 * c-common.c (__is_assignable, __is_constructible): New.
6515 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6516
1a817418
ML
65172017-05-17 Martin Liska <mliska@suse.cz>
6518
6519 * c-common.h: Introduce dump_flags_t type and
6520 use it instead of int type.
6521 * c-gimplify.c (c_genericize): Likewise.
6522 * c-opts.c: Likewise.
6523
b2fa0a8b
MP
65242017-05-17 Marek Polacek <polacek@redhat.com>
6525
6526 * c-common.c (c_save_expr): Remove.
6527 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6528 * c-common.h (c_save_expr): Remove declaration.
6529
31c2d57d
VR
65302017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6531
6532 PR c/35441
6533 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6534 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6535 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6536 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6537 RDIV_EXPR.
6538 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6539
684f84de
MP
65402017-05-09 Marek Polacek <polacek@redhat.com>
6541
6542 PR c/80525
6543 * c-warn.c (unwrap_c_maybe_const): New.
6544 (warn_logical_operator): Call it.
6545
641da50a
NS
65462017-05-09 Nathan Sidwell <nathan@acm.org>
6547
6548 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6549 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6550
631238ac
MS
65512017-05-08 Martin Sebor <msebor@redhat.com>
6552
6553 PR translation/80280
6554 * c-format.h (struct format_flag_spec): Add new member.
6555 (T89_T): New macro.
6556 * c-format.c (local_tree_type_node): New global.
6557 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6558 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6559 (strfmon_flag_specs): Likewise.
6560 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6561 with distinct quoting properties.
6562 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6563 (flag_chars_t::validate): Add argument and handle bad quoting.
6564 (check_format_info_main): Handle quoting problems.
6565 (init_dynamic_diag_info): Simplify.
6566
49f0c04c
JM
65672017-05-08 Jason Merrill <jason@redhat.com>
6568
6569 * c-opts.c (c_common_post_options): Update defaults for
6570 flag_abi_version and flag_abi_compat_version.
6571
56d35585
DM
65722017-05-05 David Malcolm <dmalcolm@redhat.com>
6573
6574 * c-common.c (c_cpp_error): Replace report_diagnostic
6575 with diagnostic_report_diagnostic.
6576
0f2c4a8f
MS
65772017-05-04 Martin Sebor <msebor@redhat.com>
6578
6579 PR translation/80280
6580 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6581 (handle_weakref_attribute): Same.
6582
6fe63fb4
NS
65832017-05-03 Nathan Sidwell <nathan@acm.org>
6584
6585 Canonicalize canonical type hashing
6586 * c-common.c (complete_array_type): Use type_hash_canon.
6587
815d9cc6
XR
65882017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6589
92a285c1 6590 PR c++/80038
815d9cc6
XR
6591 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6592 prototype.
6593 (cilk_install_body_pedigree_operations): Likewise.
6594 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6595 detatched.
6596 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6597 (cilk_install_body_pedigree_operations): Likewise.
6598 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6599 unwrapping.
6600
f8a36447
JJ
66012017-04-27 Jakub Jelinek <jakub@redhat.com>
6602
6603 PR c++/80534
6604 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6605 flag on non-aggregate element types.
6606
7c145456
BE
66072017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6608
6609 * c-common.c (c_type_hasher, type_hash_table): Remove.
6610 (c_common_get_alias_set): Remove unreachable code.
6611 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6612
c3cbcd45
VR
66132017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6614
6615 * c.opt (Wextra-semi): New C++ warning flag.
6616
8a59d466
JJ
66172017-04-20 Jakub Jelinek <jakub@redhat.com>
6618
6619 PR middle-end/80423
6620 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6621
8487c9a5
JJ
66222017-04-18 Jakub Jelinek <jakub@redhat.com>
6623
6624 PR middle-end/79788
6625 PR middle-end/80375
6626 * c-common.c (c_common_type_for_mode): Don't handle
6627 widest_*_literal_type_node here.
6628 c_common_signed_or_unsigned_type): Likewise.
6629 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6630 to *intTI_type_node or *intDI_type_node depending on whether
6631 TImode is supported by the target or not.
6632
3ee0fb02
ML
66332017-04-10 Martin Liska <mliska@suse.cz>
6634
6635 PR sanitizer/80350
6636 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6637 doing an UBSAN check.
6638
5764ee3c
JW
66392017-04-03 Jonathan Wakely <jwakely@redhat.com>
6640
6641 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6642
6f3af356
JJ
66432017-03-31 Jakub Jelinek <jakub@redhat.com>
6644
6645 PR c++/79572
6646 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6647 tree *.
6648 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6649 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6650 REFERENCE_TYPE.
6651
f6a7a9d5
DM
66522017-03-31 David Malcolm <dmalcolm@redhat.com>
6653
6654 PR documentation/78732
6655 * c.opt (Wendif-labels): Fix description to refer to
6656 #else rather than #elif.
6657
af88f557
JJ
66582017-03-31 Jakub Jelinek <jakub@redhat.com>
6659
6660 PR libstdc++/80251
6661 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6662 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6663
a9e4a1a5
JJ
66642017-03-27 Jakub Jelinek <jakub@redhat.com>
6665
6666 PR middle-end/80162
6667 * c-common.c (c_common_mark_addressable_vec): Don't set
6668 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6669
3f01b620
MS
66702017-03-21 Martin Sebor <msebor@redhat.com>
6671
6672 PR c++/79548
6673 * c-common.c (set_underlying_type): Mark type used only when
6674 original del is declared unused.
6675
2f6f187a
DM
66762017-03-10 David Malcolm <dmalcolm@redhat.com>
6677
6678 PR translation/79848
6679 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6680 "%qs".
6681
a02fa805
DM
66822017-03-10 David Malcolm <dmalcolm@redhat.com>
6683
6684 PR c/79921
6685 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6686 from inform's message, so that xgettext can locate it.
6687
822a132c
MP
66882017-03-09 Marek Polacek <polacek@redhat.com>
6689
6690 PR c++/79962
6691 PR c++/79984
6692 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6693 conversion to the attribute list.
6694
bba81f1c
ML
66952017-03-09 Martin Liska <mliska@suse.cz>
6696
6697 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6698
108154ff
JM
66992017-03-03 Jason Merrill <jason@redhat.com>
6700
6701 * c.opt (Wnoexcept-type): New.
6702
eb0e7c34
RB
67032017-03-02 Richard Biener <rguenther@suse.de>
6704
6705 PR c/79756
6706 * c-common.c (c_common_mark_addressable_vec): Look through
6707 C_MAYBE_CONST_EXPR.
6708
9453ba0a
ML
67092017-02-28 Martin Liska <mliska@suse.cz>
6710
6711 * c.opt: Replace space with tabular for options of <number>
6712 type.
6713
6a825afe
ML
67142017-02-28 Martin Liska <mliska@suse.cz>
6715
6716 * c.opt: Fix --help=option -Q for options which are of
6717 an enum type.
6718
4227c9ad
JJ
67192017-02-24 Jakub Jelinek <jakub@redhat.com>
6720
6721 PR c++/79588
6722 * c-common.c (check_function_restrict): New function.
6723 (check_function_arguments): Add FNDECL argument. Call
6724 check_function_restrict if -Wrestrict.
6725 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6726 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6727 * c-common.h (check_function_arguments): Add FNDECL argument.
6728 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6729
59909673
EB
67302017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6731
6732 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6733 treatment of parameters with pointer-to-tagged type and tidy up.
6734 (print_ada_methods): Remove the special treatment of C++ static member
6735 functions.
6736
54dcd526
ML
67372017-02-22 Martin Liska <mliska@suse.cz>
6738
6739 * c.opt: Replace inequality signs with square brackets
6740 for -Wnornalized.
6741
00bc9de3
JJ
67422017-02-21 Jakub Jelinek <jakub@redhat.com>
6743
6744 PR c++/79641
6745 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6746 preserve quals.
6747
97fcf744
JM
67482017-02-17 Joseph Myers <joseph@codesourcery.com>
6749
6750 * c-cppbuiltin.c (builtin_define_float_constants): Define
6751 __DECIMAL_DIG__ to the value for long double.
6752
c7545f1c
MP
67532017-02-15 Marek Polacek <polacek@redhat.com>
6754
6755 PR c/79515
6756 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6757 conversion has occured.
6758
c2e84327
DM
67592017-01-24 David Malcolm <dmalcolm@redhat.com>
6760
6761 * c-common.c (c_common_reswords): Add "__RTL".
6762 * c-common.h (enum rid): Add RID_RTL.
6763
2ebd93e1
MP
67642017-01-20 Marek Polacek <polacek@redhat.com>
6765
6766 PR c/64279
6767 * c-common.h (do_warn_duplicated_branches_r): Declare.
6768 * c-gimplify.c (c_genericize): Walk the function tree calling
6769 do_warn_duplicated_branches_r.
6770 * c-warn.c (expr_from_macro_expansion_r): New.
6771 (do_warn_duplicated_branches): New.
6772 (do_warn_duplicated_branches_r): New.
6773 * c.opt (Wduplicated-branches): New option.
6774
0d80ab91
DM
67752017-01-17 David Malcolm <dmalcolm@redhat.com>
6776
6777 PR c++/71497
6778 * c-indentation.c (warn_for_misleading_indentation): Use the past
6779 subjunctive in the note.
6780
7f991c36
AH
67812017-01-17 Aldy Hernandez <aldyh@redhat.com>
6782
6783 PR c/79116
6784 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6785 start type to integer_type.
6786
1c70261c
JJ
67872017-01-16 Jakub Jelinek <jakub@redhat.com>
6788
6789 PR driver/49726
6790 * c.opt (gen-decls): Add Driver flag.
6791
1ddca3f3
PC
67922017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6793
6794 Revert:
6795 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6796
6797 PR c++/71737
6798 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6799
7d2f3f1d
PC
68002017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6801
6802 PR c++/71737
6803 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6804
bce6f760
MS
68052017-01-12 Martin Sebor <msebor@redhat.com>
6806
6807 (-Wformat-overflow): ...to this.
6808
bf5fbf46
MS
68092017-01-11 Martin Sebor <msebor@redhat.com>
6810
6811 PR c/78768
6812 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6813 Also enable for LTO.
6814
e363df3f
JM
68152017-01-10 Jason Merrill <jason@redhat.com>
6816
6817 Implement P0195R2, C++17 variadic using.
6818 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6819
bd2c6270
JJ
68202017-01-09 Jakub Jelinek <jakub@redhat.com>
6821
6822 PR translation/79019
6823 PR translation/79020
6824 * c.opt (Wnormalized=): Fix typo in description.
6825
efcc8d38
MS
68262017-01-08 Martin Sebor <msebor@redhat.com>
6827
6828 PR middle-end/77708
6829 * c.opt (-Wformat-truncation): New option.
6830
ab20d992 68312017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6832
6833 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6834 value to unsigned short to fit in 4 hex digits without
6835 warnings.
6836
4e89adf9
EB
68372017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6838
6839 * c.opt (fsso-struct): Add 'native' value.
6840
cd445b54
ML
68412017-01-05 Martin Liska <mliska@suse.cz>
6842
6843 PR pch/78970
6844 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6845 header.
6846
a9342885
MP
68472017-01-04 Marek Polacek <polacek@redhat.com>
6848
6849 PR c++/64767
6850 * c.opt (Wpointer-compare): New option.
6851
fc73e60c
JJ
68522017-01-04 Jakub Jelinek <jakub@redhat.com>
6853
6854 PR driver/78957
6855 * c.opt (fsso-struct=): Add RejectNegative.
6856
cbe34bb5
JJ
68572017-01-01 Jakub Jelinek <jakub@redhat.com>
6858
6859 Update copyright years.
6860
d4a6c0ea
ML
68612016-12-29 Martin Liska <mliska@suse.cz>
6862
6863 PR c/78933
6864 * c.opt (strong-eval-order): Add RejectNegative keyword.
6865
67a5ad7c
JM
68662016-12-22 Jason Merrill <jason@redhat.com>
6867
6868 Implement P0522R0, matching of template template arguments.
6869 * c-cppbuiltin.c (c_cpp_builtins): Define
6870 __cpp_template_template_args.
6871
0dba7960
JJ
68722016-12-21 Jakub Jelinek <jakub@redhat.com>
6873
6874 PR bootstrap/78817
6875 * c-common.c (struct nonnull_arg_ctx): New type.
6876 (check_function_nonnull): Return bool instead of void. Use
6877 nonnull_arg_ctx as context rather than just location_t.
6878 (check_nonnull_arg): Adjust for the new context type, set
6879 warned_p to true if a warning has been diagnosed.
6880 (check_function_arguments): Return bool instead of void.
6881 * c-common.h (check_function_arguments): Adjust prototype.
6882
31bfc9b9
JM
68832016-12-21 Jason Merrill <jason@redhat.com>
6884
6885 * c.opt (-fnew-ttp-matching): New flag.
6886 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6887
629b3d75
MJ
68882016-12-14 Martin Jambor <mjambor@suse.cz>
6889
6890 * c-omp.c: Include omp-general.h instead of omp-low.h.
6891 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6892 name.
6893
474da67e
MS
68942016-12-14 Martin Sebor <msebor@redhat.com>
6895
6896 PR c/17308
6897 * c-common.c (check_nonnull_arg): Disable when optimization
6898 is enabled.
6899
fe366b87
MP
69002016-12-12 Marek Polacek <polacek@redhat.com>
6901
6902 PR c++/78647
6903 * c-common.c (attribute_fallthrough_p): Return false for
6904 error_mark_node.
6905
8bd9f164
MS
69062016-12-08 Martin Sebor <msebor@redhat.com>
6907
6908 PR c/78284
6909 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6910
060162e0
MS
69112016-12-08 Martin Sebor <msebor@redhat.com>
6912
6913 PR c/78165
92a285c1
ML
6914 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6915 suffix.
060162e0 6916
ee92e7ba
MS
69172016-12-07 Martin Sebor <msebor@redhat.com>
6918
6919 PR c/53562
6920 PR middle-end/77784
6921 PR middle-end/78149
6922 PR middle-end/78138
6923 * c.opt (-Wstringop-overflow): New option.
6924
84b0769e
MO
69252016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6926
6927 * c-attribs.c (asan odr indicator): New attribute.
6928 (handle_asan_odr_indicator_attribute): New function.
6929
7fa6a965
PK
69302016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6931
6932 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6933 ptrdiff_type_node;
6934
56d8ffc1
JG
69352016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6936
6937 * c-common.c (excess_precision_mode_join): New.
6938 (c_ts18661_flt_eval_method): New.
6939 (c_c11_flt_eval_method): Likewise.
6940 (c_flt_eval_method): Likewise.
6941 * c-common.h (excess_precision_mode_join): New.
6942 (c_flt_eval_method): Likewise.
6943 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6944 (cpp_iec_559_value): Call it.
6945 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6946 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6947 __FLT_EVAL_METHOD_TS_18661_3__.
6948
04f0fcf7
JG
69492016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6950
6951 * c-opts.c (c_common_post_options): Add logic to handle the default
6952 case for -fpermitted-flt-eval-methods.
6953
fb2675cb
PB
69542016-11-23 Paolo Bonzini <bonzini@gnu.org>
6955
6956 * c.opt (Wexpansion-to-defined): New.
6957
ec1c5694
JJ
69582016-11-23 Jakub Jelinek <jakub@redhat.com>
6959
6960 PR target/78451
6961 * c-pragma.c (handle_pragma_target): Don't replace
6962 current_target_pragma, but chainon the new args to the current one.
6963
730c9e75
NS
69642016-11-22 Nathan Sidwell <nathan@acm.org>
6965
6966 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6967 indentation and formatting.
730c9e75 6968
89990732
MS
69692016-11-21 Martin Sebor <msebor@redhat.com>
6970
6971 * c.opt (-fprintf-return-value): Enable by default.
6972
48330c93
BE
69732016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6974
6975 PR c++/71973
6976 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6977 * c-common.c (c_common_nodes_and_builtins): Initialize
6978 const_tm_ptr_type_node.
6979
0d939c95
MP
69802016-11-16 Marek Polacek <polacek@redhat.com>
6981
6982 PR c/78285
6983 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6984
8e745a17
JJ
69852016-11-14 Jakub Jelinek <jakub@redhat.com>
6986
6987 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6988
1ee62b92 69892016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6990 Richard Biener <rguenther@suse.de>
6991
6992 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6993 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6994 * c.opt (fgimple): New option.
1ee62b92 6995
22b15758
UB
69962016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6997
6998 PR c/35503
6999 * c-common.h (warn_for_restrict): Declare.
7000 * c-warn.c: Include gcc-rich-location.h.
7001 (warn_for_restrict): New function.
7002 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
7003 (gcc_cdiag_char_table): Likewise.
7004 (gcc_cxxdiag_char_table): Likewise.
7005 * c.opt (Wrestrict): New option.
7006
4be719cd
EB
70072016-11-13 Eric Botcazou <ebotcazou@adacore.com>
7008
7009 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
7010 for nested types only if the type is a record or union and dump SLOC.
7011
4a826ca6
JM
70122016-11-09 Jason Merrill <jason@redhat.com>
7013
7014 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
7015
2e955d50
JJ
70162016-11-09 Jakub Jelinek <jakub@redhat.com>
7017
7018 * c-ubsan.c (ubsan_instrument_shift): Handle split
7019 -fsanitize=shift-base and -fsanitize=shift-exponent.
7020
51dc6603
JM
70212016-11-07 Jason Merrill <jason@redhat.com>
7022
7023 * c.opt (Wc++1z-compat): New.
7024 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
7025
6dc4a604
ML
70262016-11-07 Martin Liska <mliska@suse.cz>
7027
7028 * c-warn.c (warn_for_unused_label): Save all labels used
7029 in goto or in &label.
7030
b302001e
JM
70312016-11-03 Jason Merrill <jason@redhat.com>
7032
7033 * c-cppbuiltin.c (c_cpp_builtins): Correct
7034 __cpp_inheriting_constructors.
7035
31f7f784
JM
70362016-11-01 Jason Merrill <jason@redhat.com>
7037
2bc78e3c
JM
7038 * c-cppbuiltin.c (c_cpp_builtins): Update
7039 __cpp_inheriting_constructors.
7040
31f7f784
JM
7041 * c.opt (-fnew-inheriting-ctors): New.
7042 * c-opts.c: Default to on for ABI 11+.
7043
dcb466ec
JJ
70442016-10-31 Jakub Jelinek <jakub@redhat.com>
7045
7046 PR c++/77948
7047 * c.opt (fext-numeric-literals): Add Var and Init.
7048 * c-opts.c (c_common_handle_option): Don't clear
7049 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
7050 (c_common_post_options): Clear it here if not set
7051 explicitly.
7052
52e1b91e
AH
70532016-10-28 Aldy Hernandez <aldyh@redhat.com>
7054
7055 PR debug/77773
7056 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
7057 if NULL.
7058
e16f1cc7
JJ
70592016-10-25 Jakub Jelinek <jakub@redhat.com>
7060
7061 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
7062 * c-common.c (c_common_reswords): Add __builtin_launder.
7063
f8348061
BE
70642016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
7065
7066 * c-common.c (c_common_truthvalue_conversion): Warn for
7067 multiplications in boolean context. Fix the quoting of '<<' and '<'
7068 in the shift warning.
7069
eff89e01
BE
70702016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7071
7072 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
7073
24bc7bf4
JM
70742016-10-20 Jason Merrill <jason@redhat.com>
7075
7076 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
7077
4c712374
BE
70782016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7079
7080 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
7081 integer shift ops in boolean context.
7082
70832016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
7084
7085 * c.opt (Walloca): New.
7086 (Walloca-larger-than=): New.
7087 (Wvla-larger-than=): New.
7088
8fa18c06
MP
70892016-10-17 Marek Polacek <polacek@redhat.com>
7090
7091 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
7092 Return immediately when finding a match.
7093 (warn_tautological_cmp): Remove a boolean variable that is no longer
7094 needed.
7095
b12b1915
MP
70962016-10-17 Marek Polacek <polacek@redhat.com>
7097
7098 * c-attribs.c: New file.
7099 * c-common.c: Move attributes handling to c-attribs.c.
7100 (get_nonnull_operand): No longer static.
7101 * c-common.h: Move the declarations from c-attribs.c to its own section.
7102
2045acd9
JM
71032016-10-14 Jason Merrill <jason@redhat.com>
7104
7105 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
7106 and __cpp_deduction_guides.
7107
14a2c9aa
JM
71082016-10-13 Jason Merrill <jason@redhat.com>
7109
7110 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
7111
4d0cdd0c
TP
71122016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7113
7114 * c-cppbuiltin.c: Include memmodel.h.
7115 * c-opts.c: Likewise.
7116 * c-pragma.c: Likewise.
7117 * c-warn.c: Likewise.
7118
70f6d5e1
JJ
71192016-10-12 Jakub Jelinek <jakub@redhat.com>
7120
7121 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
7122 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
7123 * c-opts.c (sanitize_cpp_opts): Initialize
7124 cpp_opts->cpp_warn_implicit_fallthrough.
7125
78f61294
MP
71262016-10-11 Marek Polacek <polacek@redhat.com>
7127
7128 * c-common.c (warning_candidate_p): Change the return type to bool
7129 and return true/false instead of 1/0.
7130 (vector_mode_valid_p): Likewise.
7131
038b5cc0
MP
71322016-10-11 Marek Polacek <polacek@redhat.com>
7133
7134 * c-common.c (fold_for_warn): No longer static.
7135 (bool_promoted_to_int_p): Likewise.
7136 (c_common_get_narrower): Likewise.
7137 (constant_expression_warning): Move to c-warn.c.
7138 (constant_expression_error): Likewise.
7139 (overflow_warning): Likewise.
7140 (warn_logical_operator): Likewise.
7141 (find_array_ref_with_const_idx_r): Likewise.
7142 (warn_tautological_cmp): Likewise.
7143 (expr_has_boolean_operands_p): Likewise.
7144 (warn_logical_not_parentheses): Likewise.
7145 (warn_if_unused_value): Likewise.
7146 (strict_aliasing_warning): Likewise.
7147 (sizeof_pointer_memaccess_warning): Likewise.
7148 (check_main_parameter_types): Likewise.
7149 (conversion_warning): Likewise.
7150 (warnings_for_convert_and_check): Likewise.
7151 (match_case_to_enum_1): Likewise.
7152 (match_case_to_enum): Likewise.
7153 (c_do_switch_warnings): Likewise.
7154 (warn_for_omitted_condop): Likewise.
7155 (readonly_error): Likewise.
7156 (lvalue_error): Likewise.
7157 (invalid_indirection_error): Likewise.
7158 (warn_array_subscript_with_type_char): Likewise.
7159 (warn_about_parentheses): Likewise.
7160 (warn_for_unused_label): Likewise.
7161 (warn_for_div_by_zero): Likewise.
7162 (warn_for_memset): Likewise.
7163 (warn_for_sign_compare): Likewise.
7164 (do_warn_double_promotion): Likewise.
7165 (do_warn_unused_parameter): Likewise.
7166 (record_locally_defined_typedef): Likewise.
7167 (maybe_record_typedef_use): Likewise.
7168 (maybe_warn_unused_local_typedefs): Likewise.
7169 (maybe_warn_bool_compare): Likewise.
7170 (maybe_warn_shift_overflow): Likewise.
7171 (warn_duplicated_cond_add_or_warn): Likewise.
7172 (diagnose_mismatched_attributes): Likewise.
7173 * c-common.h: Move the declarations from c-warn.c to its own section.
7174 * c-warn.c: New file.
7175
627be19f
JM
71762016-10-08 Jason Merrill <jason@redhat.com>
7177
7178 * c-common.c (c_common_truthvalue_conversion): Don't distribute
7179 into COND_EXPR in C++.
7180
7bad794a
JJ
71812016-10-08 Jakub Jelinek <jakub@redhat.com>
7182
7183 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
7184 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
7185 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
7186
be845b04
JJ
71872016-10-07 Jakub Jelinek <jakub@redhat.com>
7188
7189 Implement LWG2296 helper intrinsic
7190 * c-common.h (enum rid): Add RID_ADDRESSOF.
7191 * c-common.c (c_common_reswords): Add __builtin_addressof.
7192
c09c4992
BE
71932016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
7194
7195 PR c++/77700
7196 * c-common.c (c_common_truthvalue_conversion): Warn also for
7197 suspicious enum values in boolean context.
7198
342cfb3e
JJ
71992016-10-06 Jakub Jelinek <jakub@redhat.com>
7200
7201 Implement P0258R2 - helper for C++17
7202 std::has_unique_object_representations trait
7203 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
7204 * c-common.c (c_common_reswords): Add
7205 __has_unique_object_representations.
7206
2e69f143
JJ
72072016-10-05 Jakub Jelinek <jakub@redhat.com>
7208
7209 PR sanitizer/66343
7210 * c-ubsan.c (ubsan_instrument_return): Don't call
7211 initialize_sanitizer_builtins here.
7212
700fff34
BE
72132016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
7214
7215 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
7216 conditional expression in boolean context when only one arm is
7217 non-boolean.
7218
9563bfcd
JJ
72192016-10-05 Jakub Jelinek <jakub@redhat.com>
7220
04a32443
JJ
7221 PR sanitizer/77823
7222 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
7223 is not integral.
7224
9563bfcd
JJ
7225 * c-common.c (c_common_reswords): Update comment for C++11.
7226
f1644724
JM
72272016-10-04 Jason Merrill <jason@redhat.com>
7228
7229 * c-common.c (make_tree_vector_from_ctor): New.
7230 * c-common.h: Declare it.
7231
5a79befb
JJ
72322016-10-04 Jakub Jelinek <jakub@redhat.com>
7233
7234 * c-cppbuiltin.c (c_cpp_builtins): Don't define
7235 __LIBGCC_JCR_SECTION_NAME__.
7236
1633d3b9
BE
72372016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7238
7239 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
7240 left shift in boolean context.
7241
a2c6e7f2
JJ
72422016-09-29 Jakub Jelinek <jakub@redhat.com>
7243
7244 Implement P0001R1 - C++17 removal of register storage class specifier
7245 * c.opt (Wregister): New warning.
7246 * c-opts.c (c_common_post_options): Enable -Wregister by
7247 default for C++17.
7248
75304c87
JG
72492016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
7250
7251 * c-opts.c (c_common_post_options): Remove special case for
7252 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
7253 in C++.
7254
bbfac6da
JJ
72552016-09-27 Jakub Jelinek <jakub@redhat.com>
7256
6e39060a
JJ
7257 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
7258 -std=c++1z.
7259
bbfac6da
JJ
7260 * c-ada-spec.c (print_ada_declaration): Remove break after return.
7261
e73cf9a2
TP
72622016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
7263
7264 * c-common.c: Include memmodel.h.
7265
c6147dc4
MP
72662016-09-26 Marek Polacek <polacek@redhat.com>
7267
7268 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
7269
81fea426
MP
72702016-09-26 Marek Polacek <polacek@redhat.com>
7271
7272 PR c/7652
7273 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
7274 (handle_fallthrough_attribute): New function.
7275 (attribute_fallthrough_p): New function.
7276 * c-common.h (attribute_fallthrough_p): Declare.
7277
9a2300e9
MP
72782016-09-24 Marek Polacek <polacek@redhat.com>
7279
7280 PR c/77490
7281 * c.opt (Wbool-operation): New.
7282
a09e9e35
BE
72832016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7284
7285 * c-common.c (c_common_truthvalue_conversion): Inhibit
7286 Wint-in-bool-context warning with from_macro_definition_at.
7287 Mention the expression will always evaluate to true.
7288
d43b4ccc
MS
72892016-09-21 Martin Sebor <msebor@redhat.com>
7290
7291 PR bootstrap/77676
7292 * c.opt (fprintf-return-value): Temporarily initialize to zero
7293 to unblock bootstrap failures.
7294
2e1c20b1
JJ
72952016-09-21 Jakub Jelinek <jakub@redhat.com>
7296
7297 PR c++/77651
7298 * c.opt (Waligned-new=): Add RejectNegative.
7299 (faligned-new=): Likewise. Spelling fix - change
7300 aligned_new_threshhold to aligned_new_threshold.
7301 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
7302 to aligned_new_threshold.
7303
88d0c3f0
MS
73042016-09-20 Martin Sebor <msebor@redhat.com>
7305
7306 PR middle-end/49905
7307 * c.opt: Add -Wformat-length and -fprintf-return-value.
7308
144a96e4
BE
73092016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7310
7311 PR c++/77434
7312 * c.opt (Wint-in-bool-context): New warning.
7313 * c-common.c (c_common_truthvalue_conversion): Warn on integer
7314 constants in boolean context.
7315
63012d9a
JM
73162016-09-19 Joseph Myers <joseph@codesourcery.com>
7317
7318 * c-common.c (max_align_t_align): Also consider alignment of
7319 float128_type_node.
7320
931388ce
JM
73212016-09-15 Jason Merrill <jason@redhat.com>
7322
7323 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
7324 DECL_EXTERNAL.
7325
38711381
JM
73262016-09-14 Jason Merrill <jason@redhat.com>
7327
7328 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7329 limit FIELD_DECL, either.
7330
e51fbec3
MP
73312016-09-14 Marek Polacek <polacek@redhat.com>
7332
7333 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
7334 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
7335 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
7336
254830ba
DM
73372016-09-13 David Malcolm <dmalcolm@redhat.com>
7338
7339 * c-common.c (warn_logical_not_parentheses): Replace
7340 rich_location::add_fixit_insert calls with add_fixit_insert_before
7341 and add_fixit_insert_after, eliminating the "next_loc" calculation.
7342
42763690
JM
73432016-09-13 Jason Merrill <jason@redhat.com>
7344 Tom de Vries <tom@codesourcery.com>
7345
7346 PR c++/77427
7347 * c-common.c (set_underlying_type): Don't treat array as builtin type.
7348
9453eee9
JM
73492016-09-13 Jason Merrill <jason@redhat.com>
7350
7351 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
7352 limit types at all.
7353
e96809e3
JM
73542016-09-12 Jason Merrill <jason@redhat.com>
7355
7356 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
7357 bit/byte confusion, allow large alignment for types.
7358
54dcdb88
BE
73592016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7360
7361 PR c++/77496
7362 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7363
d1463eb9
DM
73642016-09-12 David Malcolm <dmalcolm@redhat.com>
7365
7366 PR c/72858
7367 * c-format.c (argument_parser::check_argument_type): Add params
7368 "type_start" and "conversion_char". Use the former to generate
7369 offset_to_type_start and pass it and conversion_char to
7370 check_format_types.
7371 (check_format_info_main): Capture the start of the type
7372 information as "type_start", and pass it an format_char
7373 to arg_parser.check_argument_type.
7374 (check_format_types): Provide an example in the leading comment.
7375 Add params "offset_to_type_start" and "conversion_char"; pass
7376 them to format_type_warning calls.
7377 (test_get_modifier_for_format_len): Likewise.
7378 (matching_type_p): New function.
7379 (get_format_for_type): Add param "conversion_char" and move
7380 implementation into...
7381 (get_format_for_type_1): ...new function, called twice.
7382 Use new function matching_type_p rather than checking for
7383 TYPE_CANONICAL equality.
7384 (get_corrected_substring): New function.
7385 (format_type_warning): Provide an example in the leading comment.
7386 Add params "offset_to_type_start" and "conversion_char". Replace
7387 call to get_format_for_type with call to get_corrected_substring
7388 and move rejection of hints for widths/precisions there.
7389 (assert_format_for_type_streq): Add param "conversion_char".
7390 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7391 (test_get_format_for_type_printf): Add conversion chars to the
7392 tests, adding coverage for various combinations of integer
7393 vs double conversions, and for preserving octal and hexadecimal
7394 conversions.
7395 (test_get_format_for_type_scanf): Add conversion chars to the
7396 tests.
7397
5b28efbb
TV
73982016-09-10 Tom de Vries <tom@codesourcery.com>
7399
7400 PR C/71602
7401 * c-common.c (build_va_arg): Handle more strict
7402 targetm.canonical_va_list_type. Replace first argument type error with
7403 assert.
7404
3f0177e7
MS
74052016-09-09 Martin Sebor <msebor@redhat.com>
7406
7407 PR c/77520
7408 PR c/77521
7409 * c-format.c (argument_parser::find_format_char_info): Use %qc
7410 format directive unconditionally.
7411
af63ba4b
JM
74122016-09-09 Jason Merrill <jason@redhat.com>
7413
7414 Implement C++17 new of over-aligned types.
7415 * c.opt: Add -faligned-new and -Waligned-new.
7416 * c-common.c (max_align_t_align): Split out from...
7417 (cxx_fundamental_alignment_p): ...here.
7418 * c-common.h: Declare it.
7419 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7420
c65248cb
JM
74212016-09-09 Joseph Myers <joseph@codesourcery.com>
7422
7423 * c-cppbuiltin.c (builtin_define_type_width): New function.
7424 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7425 macros.
7426
e5106e27
DM
74272016-09-07 David Malcolm <dmalcolm@redhat.com>
7428
7429 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7430 a POINTER_TYPE.
7431 (substring_loc::get_location): Move to substring-locations.c,
7432 keeping implementation as...
7433 (c_get_substring_location): New function, from the above, reworked
7434 to use accessors rather than member lookup.
7435 * c-common.h (class substring_loc): Move to substring-locations.h,
7436 replacing with a forward decl.
7437 (c_get_substring_location): New decl.
7438 * c-format.c: Include "substring-locations.h".
7439 (format_warning_va): Move to substring-locations.c.
7440 (format_warning_at_substring): Likewise.
7441
ab20d992 74422016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7443
7444 PR c/77336
7445 * c-format.c (check_function_format): Avoid issuing warnings for
7446 functions unless they call format functions with non-constant
7447 format strings.
7448
b772a565
RB
74492016-09-06 Richard Biener <rguenther@suse.de>
7450
7451 PR c/77450
7452 * c-common.c (c_common_mark_addressable_vec): Handle
7453 COMPOUND_LITERAL_EXPR.
7454
25ff5dd3
MP
74552016-09-05 Marek Polacek <polacek@redhat.com>
7456
7457 PR c/77423
7458 * c-common.c (bool_promoted_to_int_p): New function.
7459 (expr_has_boolean_operands_p): New function.
7460 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7461 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7462
21234eb5
TV
74632016-09-04 Tom de Vries <tom@codesourcery.com>
7464
7465 revert:
7466 2016-08-29 Tom de Vries <tom@codesourcery.com>
7467
7468 * c-common.c (build_va_arg): Replace first argument type error
7469 with assert.
7470
9dc5773f
JJ
74712016-09-02 Jakub Jelinek <jakub@redhat.com>
7472
7473 PR c/65467
7474 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7475 (c_finish_omp_for): Reject _Atomic qualified iterators.
7476
74772016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7478
7479 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7480 size to guarantee it fits the output of the formatted function
7481 regardless of its arguments.
7482
295844f6
MP
74832016-09-01 Marek Polacek <polacek@redhat.com>
7484
7485 PR c/7652
7486 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7487 FALLTHRU comments.
7488
3d06b6f2
MP
74892016-08-29 Marek Polacek <polacek@redhat.com>
7490
7491 PR c/77292
7492 * c-common.c (warn_logical_not_parentheses): Don't warn for
7493 a comparison or a logical operator.
7494
34cedad5
TV
74952016-08-29 Tom de Vries <tom@codesourcery.com>
7496
7497 * c-common.c (build_va_arg): Fix type comparison assert.
7498
f162d717
TV
74992016-08-29 Tom de Vries <tom@codesourcery.com>
7500
7501 * c-common.c (build_va_arg): Replace first argument type error
7502 with assert.
7503
ba9bbd6f
TV
75042016-08-29 Tom de Vries <tom@codesourcery.com>
7505
7506 PR c/77398
7507 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7508 with error_mark_node as va_list instead of with illegal va_list.
7509
ebef225f
MP
75102016-08-25 Marek Polacek <polacek@redhat.com>
7511 David Malcolm <dmalcolm@redhat.com>
7512
7513 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7514 * c-common.h (warn_logical_not_parentheses): Update declaration.
7515
b00e6e75
MP
75162016-08-22 Marek Polacek <polacek@redhat.com>
7517
7518 PR c++/77321
7519 * c-common.c (warn_for_memset): Check type for null.
7520
6dc198e3
JM
75212016-08-22 Joseph Myers <joseph@codesourcery.com>
7522
14ec014e 7523 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7524 _FloatNx types for suffixes for built-in functions.
7525
c65699ef
JM
75262016-08-19 Joseph Myers <joseph@codesourcery.com>
7527
7528 PR c/32187
7529 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7530 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7531 (RID_FLOAT128X): New enum rid values.
7532 (CASE_RID_FLOATN_NX): New macro.
7533 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7534 keywords.
7535 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7536 corresponding complex types.
7537 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7538 _FloatNx and corresponding complex types.
7539 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7540 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7541 and _FloatNx types for the widest type for determining
7542 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7543 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7544 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7545 and _FloatNx types.
7546 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7547 constants.
7548 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7549 _FloatNx types.
7550
cc015f3a
DM
75512016-08-18 David Malcolm <dmalcolm@redhat.com>
7552
7553 * c-opts.c (c_diagnostic_finalizer): Update for change to
7554 diagnostic_show_locus.
7555
cb18fd07
DM
75562016-08-18 David Malcolm <dmalcolm@redhat.com>
7557
7558 * c-common.c: Include "spellcheck.h".
7559 (cb_get_suggestion): New function.
7560 * c-common.h (cb_get_suggestion): New decl.
7561 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7562 cb_get_suggestion.
7563
a76989dc
MP
75642016-08-18 Marek Polacek <polacek@redhat.com>
7565
7566 PR c/71514
7567 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7568 and pointer-to-VLA.
7569
65e736c0
DM
75702016-08-16 David Malcolm <dmalcolm@redhat.com>
7571
7572 PR c/72857
7573 * c-common.c (substring_loc::get_range): Rename to...
7574 (substring_loc::get_location): ...this, converting param from a
7575 source_range * to a location_t *. Call
7576 get_source_location_for_substring rather than
7577 get_source_range_for_substring, and pass in m_caret_idx.
7578 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7579 (substring_loc::get_range): Replace with...
7580 (substring_loc::get_location): ...this.
7581 (substring_loc::set_caret_index): New method.
7582 (substring_loc): Add field m_caret_idx.
7583 * c-format.c (format_warning_va): Update for above changes.
7584 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7585 clashing with type name.
7586 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7587 (check_argument_type): Likewise.
7588 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7589 Use a copy when emitting warnings, setting the caret index from TYPE.
7590
7e1dde14 75912016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7592 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7593
7594 * c-ada-spec.c (dump_number): New function.
7595 (handle_escape_character): Likewise.
7596 (print_ada_macros): Add handling of constant integers and strings.
7597
191816a3
MP
75982016-08-12 Marek Polacek <polacek@redhat.com>
7599
7600 PR c/7652
7601 * c-common.c (scalar_to_vector): Adjust fall through comment.
7602 * c-opts.c (c_common_handle_option): Likewise.
7603 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7604 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7605 fall through comment.
7606 * cilk.c (extract_free_variables): Add FALLTHRU.
7607
452df4a4
JM
76082016-08-10 Jason Merrill <jason@redhat.com>
7609
7610 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7611
f3365c12
JM
76122016-08-09 Jason Merrill <jason@redhat.com>
7613
7614 * c-common.c (c_common_attribute_table): vector_size affects type
7615 identity.
7616
f0bc3323
MP
76172016-08-09 Marek Polacek <polacek@redhat.com>
7618
7619 PR c/7652
7620 * c-ada-spec.c (dump_generic_ada_node): Add return.
7621
98e5a19a
JM
76222016-08-09 Jason Merrill <jason@redhat.com>
7623
7624 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7625 C++17 constexpr lambdas.
7626
895aa8e1
DM
76272016-08-08 David Malcolm <dmalcolm@redhat.com>
7628
7629 PR c/64955
7630 * c-common.h (selftest::c_format_c_tests): New declaration.
7631 (selftest::run_c_tests): New declaration.
7632 * c-format.c: Include "selftest.h.
7633 (format_warning_va): Add param "corrected_substring" and use
7634 it to add a replacement fix-it hint.
7635 (format_warning_at_substring): Likewise.
7636 (format_warning_at_char): Update for new param of
7637 format_warning_va.
7638 (argument_parser::check_argument_type): Pass "fki" to
7639 check_format_types.
7640 (check_format_types): Add param "fki" and pass it to
7641 format_type_warning.
7642 (deref_n_times): New function.
7643 (get_modifier_for_format_len): New function.
7644 (selftest::test_get_modifier_for_format_len): New function.
7645 (get_format_for_type): New function.
7646 (format_type_warning): Add param "fki" and use it to attempt
7647 to provide hints for argument types when calling
7648 format_warning_at_substring.
7649 (selftest::get_info): New function.
7650 (selftest::assert_format_for_type_streq): New function.
7651 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7652 (selftest::test_get_format_for_type_printf): New function.
7653 (selftest::test_get_format_for_type_scanf): New function.
7654 (selftest::c_format_c_tests): New function.
7655
e52ed3fe
DM
76562016-08-08 David Malcolm <dmalcolm@redhat.com>
7657
7658 PR c/52952
7659 * c-format.c: Include "diagnostic.h".
7660 (location_column_from_byte_offset): Delete.
7661 (location_from_offset): Delete.
7662 (format_warning_va): New function.
7663 (format_warning_at_substring): New function.
7664 (format_warning_at_char): New function.
7665 (check_format_arg): Capture location of format_tree and pass to
7666 check_format_info_main.
7667 (argument_parser): Add fields "start_of_this_format" and
7668 "format_string_cst".
7669 (flag_chars_t::validate): Add param "format_string_cst". Convert
7670 warning_at call using location_from_offset to call to
7671 format_warning_at_char.
7672 (argument_parser::argument_parser): Add param "format_string_cst_"
7673 and use use it to initialize field "format_string_cst".
7674 Initialize new field "start_of_this_format".
7675 (argument_parser::read_format_flags): Convert warning_at call
7676 using location_from_offset to a call to format_warning_at_char.
7677 (argument_parser::read_any_format_left_precision): Likewise.
7678 (argument_parser::read_any_format_precision): Likewise.
7679 (argument_parser::read_any_other_modifier): Likewise.
7680 (argument_parser::find_format_char_info): Likewise, in three places.
7681 (argument_parser::parse_any_scan_set): Likewise, in one place.
7682 (argument_parser::handle_conversions): Likewise, in two places.
7683 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7684 and use it to make a substring_loc. Pass the latter to
7685 check_format_types.
7686 (check_format_info_main): Add params "fmt_param_loc" and
7687 "format_string_cst". Convert warning_at calls using
7688 location_from_offset to calls to format_warning_at_char. Pass the
7689 new params to the arg_parser ctor. Pass "format_string_cst" to
7690 flag_chars.validate. Pass "fmt_param_loc" to
7691 arg_parser.check_argument_type.
7692 (check_format_types): Convert first param from a location_t
7693 to a const substring_loc & and rename to "fmt_loc". Attempt
7694 to extract the range of the relevant parameter and pass it
7695 to format_type_warning.
7696 (format_type_warning): Convert first param from a location_t
7697 to a const substring_loc & and rename to "fmt_loc". Add
7698 params "param_range" and "type". Replace calls to warning_at
7699 with calls to format_warning_at_substring.
7700
1c4d457e
DM
77012016-08-08 David Malcolm <dmalcolm@redhat.com>
7702
7703 * c-format.c (class flag_chars_t): New class.
7704 (struct length_modifier): New struct.
7705 (class argument_parser): New class.
7706 (flag_chars_t::flag_chars_t): New ctor.
7707 (flag_chars_t::has_char_p): New method.
7708 (flag_chars_t::add_char): New method.
7709 (flag_chars_t::validate): New method.
7710 (flag_chars_t::get_alloc_flag): New method.
7711 (flag_chars_t::assignment_suppression_p): New method.
7712 (argument_parser::argument_parser): New ctor.
7713 (argument_parser::read_any_dollar): New method.
7714 (argument_parser::read_format_flags): New method.
7715 (argument_parser::read_any_format_width): New method.
7716 (argument_parser::read_any_format_left_precision): New method.
7717 (argument_parser::read_any_format_precision): New method.
7718 (argument_parser::handle_alloc_chars): New method.
7719 (argument_parser::read_any_length_modifier): New method.
7720 (argument_parser::read_any_other_modifier): New method.
7721 (argument_parser::find_format_char_info): New method.
7722 (argument_parser::validate_flag_pairs): New method.
7723 (argument_parser::give_y2k_warnings): New method.
7724 (argument_parser::parse_any_scan_set): New method.
7725 (argument_parser::handle_conversions): New method.
7726 (argument_parser::check_argument_type): New method.
7727 (check_format_info_main): Introduce classes argument_parser
7728 and flag_chars_t, moving the code within the loop into methods
7729 of these classes. Make various locals "const".
7730
88fa5555
DM
77312016-08-05 David Malcolm <dmalcolm@redhat.com>
7732
7733 * c-common.c: Include "substring-locations.h".
7734 (get_cpp_ttype_from_string_type): New function.
7735 (g_string_concat_db): New global.
7736 (substring_loc::get_range): New method.
7737 * c-common.h (g_string_concat_db): New declaration.
7738 (class substring_loc): New class.
7739 * c-lex.c (lex_string): When concatenating strings, capture the
7740 locations of all tokens using a new obstack, and record the
7741 concatenation locations within g_string_concat_db.
7742 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7743 on the ggc-heap.
7744
78169471
MP
77452016-07-29 Marek Polacek <polacek@redhat.com>
7746
638fc14f
MP
7747 PR c/71926
7748 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7749 parentheses warning.
7750
78169471
MP
7751 PR c/71574
7752 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7753
1225d6b1
ML
77542016-07-28 Martin Liska <mliska@suse.cz>
7755
7756 PR gcov-profile/68025
7757 * c-common.c (handle_no_profile_instrument_function_attribute):
7758
ec1e2a40
BE
77592016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7760
7761 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7762 BITS_PER_UNIT_LOG.
7763
5ec2cd9f
JM
77642016-07-25 Jason Merrill <jason@redhat.com>
7765
7766 PR c++/65970
7767 * c.opt (fconstexpr-loop-limit): New.
7768
9dc5773f 77692016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7770
7771 PR c++/71675
7772 * c-common.c (resolve_overloaded_builtin): Avoid converting
7773 __atomic_compare_exchange_n return type to that of what its
7774 first argument points to.
7775
e3fe09c1
UB
77762016-07-22 Uros Bizjak <ubizjak@gmail.com>
7777
7778 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7779 ~(unsigned HOST_WIDE_INT) 0.
7780
bc91c436
ML
77812016-07-22 Martin Liska <mliska@suse.cz>
7782
7783 PR gcov-profile/69028
7784 PR gcov-profile/62047
7785 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7786 to the current_function_decl.
7787
451dcc66
JM
77882016-07-21 Jason Merrill <jason@redhat.com>
7789
7790 PR c++/65168
7791 * c-common.c (c_common_truthvalue_conversion): Check
7792 c_inhibit_evaluation_warnings for warning about address of
7793 reference.
7794
de6a69ee
DM
77952016-07-20 David Malcolm <dmalcolm@redhat.com>
7796
7797 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7798 const char *.
7799
d022c55a
JM
78002016-07-15 Jason Merrill <jason@redhat.com>
7801
7802 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7803
ddbbcb19
JJ
78042016-07-15 Jakub Jelinek <jakub@redhat.com>
7805
7806 PR c/71858
7807 * c-common.h (enum lookup_name_fuzzy_kind): Add
7808 FUZZY_LOOKUP_FUNCTION_NAME.
7809
d0cf395a
JM
78102016-07-08 Jason Merrill <jason@redhat.com>
7811
7812 P0145: Refining Expression Order for C++.
7813 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7814 * c-opts.c: Adjust.
7815
98d44e93
MT
78162016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7817
7818 PR c++/71214
7819 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7820
f9d8d994
TS
78212016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7822
7823 * c-pragma.h (enum pragma_kind): Rename
7824 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7825 users.
7826
4aa83879
RB
78272016-06-29 Richard Biener <rguenther@suse.de>
7828
7829 PR middle-end/71002
7830 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7831
a25bd9e6
JM
78322016-06-24 Jason Merrill <jason@redhat.com>
7833
7834 P0145R2: Refining Expression Order for C++.
7835 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7836 MODIFY_EXPR.
7837
a86451b9
JJ
78382016-06-24 Jakub Jelinek <jakub@redhat.com>
7839
7840 * c-common.c (check_builtin_function_arguments): Require last
7841 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7842 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7843 if the last argument is pointer to enumerated or boolean type.
7844
1a4f11c8
DM
78452016-06-22 David Malcolm <dmalcolm@redhat.com>
7846
7847 PR c/70339
7848 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7849 (lookup_name_fuzzy): New prototype.
7850
fe55692c
JDA
78512016-06-21 John David Anglin <danglin@gcc.gnu.org>
7852
7853 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7854
4eb24e01
JM
78552016-06-14 Jason Merrill <jason@redhat.com>
7856
7857 P0145R2: Refining Expression Order for C++.
7858 * c.opt (fargs-in-order): New.
7859 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7860
ef7cf206
JJ
78612016-06-13 Jakub Jelinek <jakub@redhat.com>
7862
0dda258b
JJ
7863 PR sanitizer/71498
7864 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7865 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7866
ef7cf206
JJ
7867 PR preprocessor/71183
7868 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7869 to cb_get_source_date_epoch.
7870
50b15873
JJ
78712016-06-10 Jakub Jelinek <jakub@redhat.com>
7872
7873 PR c/68657
7874 * c.opt (Wpsabi): Add Warning flag.
7875
4d926e34
MS
78762016-06-10 Martin Sebor <msebor@redhat.com>
7877
7878 PR c/71392
14ec014e 7879 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7880 the nonnull attribute in type-generic builtins.
7881
e01b4e16
MS
78822016-06-09 Martin Sebor <msebor@redhat.com>
7883
7884 PR c/70883
7885 * c-common.c (builtin_function_validate_nargs): Make text of error
7886 message consistent with others like it.
7887
44a845ca
MS
78882016-06-08 Martin Sebor <msebor@redhat.com>
7889 Jakub Jelinek <jakub@redhat.com>
7890
7891 PR c++/70507
7892 PR c/68120
7893 * c-common.c (check_builtin_function_arguments): Handle
7894 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7895
a80a7051
RB
78962016-06-08 Richard Biener <rguenther@suse.de>
7897
7898 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7899
bfd67b47
RB
79002016-06-07 Richard Biener <rguenther@suse.de>
7901
7902 PR c/61564
7903 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7904 options and warn about others.
7905
15c98b2e
ES
79062016-06-01 Eduard Sanou <dhole@openmailbox.org>
7907
7908 * c-common.c (get_source_date_epoch): Rename to
7909 cb_get_source_date_epoch.
7910 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7911 message when the parsing fails. Use error_at instead of fatal_error.
7912 * c-common.h (get_source_date_epoch): Rename to
7913 cb_get_source_date_epoch.
7914 * c-common.h (cb_get_source_date_epoch): Prototype.
7915 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7916 * c-common.h (c_omp_region_type): Remove trailing comma.
7917 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7918 * c-lex.c (c_lex_with_flags): Remove initialization of
7919 pfile->source_date_epoch.
7920
00631022
JJ
79212016-05-30 Jakub Jelinek <jakub@redhat.com>
7922
7923 PR c++/71349
7924 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7925 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7926 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7927 instead of C_OMP_CLAUSE_SPLIT_FOR.
7928
f17a223d
RB
79292016-05-24 Richard Biener <rguenther@suse.de>
7930
7931 PR middle-end/70434
7932 PR c/69504
7933 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7934 (convert_vector_to_array_for_subscript): ... this.
7935 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7936 VIEW_CONVERT_EXPR to an array type. Rename to ...
7937 (convert_vector_to_array_for_subscript): ... this.
7938
4f2e1536
MP
79392016-05-12 Marek Polacek <polacek@redhat.com>
7940
7941 PR c/70756
7942 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7943 size_in_bytes and pass LOC to it.
7944
d6e83a8d
MM
79452016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7946
7947 PR c/43651
7948 * c.opt (Wduplicate-decl-specifier): New option.
7949
5c3a10fb
MP
79502016-05-11 Marek Polacek <polacek@redhat.com>
7951
7952 PR c++/71024
7953 * c-common.c (diagnose_mismatched_attributes): New function.
7954 * c-common.h (diagnose_mismatched_attributes): Declare.
7955
deef7113
MP
79562016-05-04 Marek Polacek <polacek@redhat.com>
7957
7958 * c.opt (Wdangling-else): New option.
7959
79ce98bc
MP
79602016-05-03 Marek Polacek <polacek@redhat.com>
7961
7962 PR c/70859
7963 * c-common.c (builtin_function_validate_nargs): Add location
7964 parameter. Use it.
7965 (check_builtin_function_arguments): Add location and arguments
7966 parameters. Use them.
7967 * c-common.h (check_builtin_function_arguments): Update declaration.
7968
381cdae4
RB
79692016-05-03 Richard Biener <rguenther@suse.de>
7970
7971 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7972 allow call args to gimplify to SSA names.
7973
1d793c34
MP
79742016-05-03 Marek Polacek <polacek@redhat.com>
7975
7976 * c-common.h (enum c_omp_region_type): Remove stray comma.
7977
77886428
CP
79782016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7979
7980 * c-common.h (enum c_omp_region_type): Define.
7981
697e0b28
RS
79822016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7983
7984 * c-common.c (shorten_compare): Use wi::to_wide.
7985
e7ff0319
CP
79862016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7987
7988 PR middle-end/70626
7989 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7990 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7991 reduction clauses in acc parallel loops.
7992
2fff3db8
MP
79932016-04-29 Marek Polacek <polacek@redhat.com>
7994
7995 PR c/70852
7996 * c-common.c (warn_for_memset): Check domain before accessing it.
7997
509063eb
DV
79982016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7999
8000 PR/69089
8001 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
8002 "aligned" attribute.
8003
b632761d
JM
80042016-04-28 Jason Merrill <jason@redhat.com>
8005
8006 * c-lex.c (c_common_has_attribute): Handle nodiscard.
8007
174f6622
ES
80082016-04-28 Eduard Sanou <dhole@openmailbox.org>
8009 Matthias Klose <doko@debian.org>
8010
8011 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 8012 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
8013 handling.
8014 * c-common.h (get_source_date_epoch): Prototype.
8015 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
8016
6bc2bb18
RB
80172015-04-27 Ryan Burn <contact@rnburn.com>
8018
8019 PR c++/69024
8020 PR c++/68997
8021 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
8022 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
8023 external linkage.
8024 (cilk_detect_and_unwrap): Corresponding changes.
8025 (extract_free_variables): Don't extract free variables from
8026 AGGR_INIT_EXPR slot.
8027 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
8028 (cilk_recognize_spawn): Likewise.
8029
c1e1f433
BS
80302016-04-27 Bernd Schmidt <bschmidt@redhat.com>
8031
8032 * c.opt (Wmemset-elt-size): New option.
8033 * c-common.c (warn_for_memset): New function.
8034 * c-common.h (warn_for_memset): Declare.
8035
d067e05f
JM
80362016-04-25 Jason Merrill <jason@redhat.com>
8037
8038 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
8039 No longer static.
8040 * c-common.h: Declare it.
8041 * c-lex.c (c_common_has_attribute): Add maybe_unused.
8042
9aa36ae5
JM
80432016-04-22 Jason Merrill <jason@redhat.com>
8044
8045 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
8046
477d4906
IV
80472016-04-20 Ilya Verbin <ilya.verbin@intel.com>
8048
8049 PR c++/69363
8050 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
8051 * c-common.h (c_finish_cilk_clauses): Remove declaration.
8052
fe37c7af
MM
80532016-04-18 Michael Matz <matz@suse.de>
8054
8055 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
8056 and SET_DECL_ALIGN.
8057
23f2660f
EB
80582016-04-17 Eric Botcazou <ebotcazou@adacore.com>
8059
8060 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
8061 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
8062 to incomplete types.
8063 (dump_nested_type): Remove redundant tests and tidy up.
8064 (print_ada_declaration): Also set TREE_VISITED on the declaration of
8065 a type which is the typedef of an original type.
8066
1e77281b
MP
80672016-04-15 Marek Polacek <polacek@redhat.com>
8068
8069 PR c/70651
8070 * c-common.c (build_va_arg): Change two asserts into errors and return
8071 error_mark_node.
8072
b3a77f21
MP
80732016-04-13 Marek Polacek <polacek@redhat.com>
8074
8075 PR c++/70639
8076 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
8077 for switch statements, too.
8078
322b8466
JM
80792016-03-28 Jason Merrill <jason@redhat.com>
8080
8081 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
8082
fbdb6baf
MP
80832016-03-23 Marek Polacek <polacek@redhat.com>
8084
8085 PR c++/69884
8086 * c.opt (Wignored-attributes): New option.
8087
5c240f4d
DM
80882016-03-22 David Malcolm <dmalcolm@redhat.com>
8089
8090 PR c/69993
8091 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
8092 diagnostic text, reversing the order of the warning and note so
8093 that they appear in source order.
8094
14ba7b28
MP
80952016-03-17 Marek Polacek <polacek@redhat.com>
8096
8097 PR c/69407
8098 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
8099 operations.
8100
08a1cadc
JM
81012016-03-14 Jason Merrill <jason@redhat.com>
8102
2aaeea19
JM
8103 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
8104
08a1cadc
JM
8105 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
8106
c06d25bb
RB
81072016-03-09 Richard Biener <rguenther@suse.de>
8108
8109 PR c/70143
8110 * c-common.c (strict_aliasing_warning): Add back
8111 alias_sets_conflict_p check.
8112
80aac5c8
JM
81132016-03-08 Jason Merrill <jason@redhat.com>
8114
8115 * c-opts.c (set_std_cxx1z): Don't enable concepts.
8116
64b23c13
DM
81172016-03-04 David Malcolm <dmalcolm@redhat.com>
8118
8119 PR c/68187
8120 * c-indentation.c (get_visual_column): Move code to determine next
8121 tab stop to...
8122 (next_tab_stop): ...this new function.
8123 (line_contains_hash_if): Delete function.
8124 (detect_preprocessor_logic): Delete function.
8125 (get_first_nws_vis_column): New function.
8126 (detect_intervening_unindent): New function.
8127 (should_warn_for_misleading_indentation): Replace call to
8128 detect_preprocessor_logic with a call to
8129 detect_intervening_unindent.
8130
729526f5
DM
81312016-03-04 David Malcolm <dmalcolm@redhat.com>
8132
8133 PR c/68187
8134 * c-indentation.c (should_warn_for_misleading_indentation): When
8135 suppressing warnings about cases where the guard and body are on
8136 the same column, only use the first non-whitespace column in place
8137 of the guard token column when dealing with "else" clauses.
8138 When rejecting aligned BODY and NEXT, loosen the requirement
8139 from equality with the first non-whitespace of guard to simply
8140 that they not be indented relative to it.
8141
e9a35493
RB
81422016-03-04 Richard Biener <rguenther@suse.de>
8143
8144 PR c++/70054
8145 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
8146 instead of alias_sets_conflict_p.
8147
1be56bc5
MP
81482016-03-01 Marek Polacek <polacek@redhat.com>
8149
8150 PR c++/69795
8151 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
8152 any DECL.
8153
35886f0b
MS
81542016-02-22 Martin Sebor <msebor@redhat.com>
8155
8156 PR middle-end/69780
8157 * c-common.c (check_builtin_function_arguments): Validate and
8158 reject invalid arguments to __builtin_alloca_with_align.
8159
4246c8da
MW
81602016-02-20 Mark Wielaard <mjw@redhat.com>
8161
8162 PR c/28901
8163 * c.opt (Wunused-const-variable): Turn into Alias for...
8164 (Wunused-const-variable=): New option.
8165
268be88c
BE
81662016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8167
8168 PR c++/69865
8169 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
8170 here...
8171 (c_common_init_options): ...to here.
8172 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
8173
871b3f47
JJ
81742016-02-19 Jakub Jelinek <jakub@redhat.com>
8175
8176 PR c++/69826
8177 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
8178 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
8179 flag_preprocess_only.
8180
bf14eba2
JJ
81812016-02-16 Jakub Jelinek <jakub@redhat.com>
8182
8183 PR c/69835
8184 * c.opt (Wnonnull-compare): Enable for -Wall.
8185
ba6b3795
JJ
81862016-02-15 Jakub Jelinek <jakub@redhat.com>
8187
8188 PR c++/69797
8189 * c-common.c (sync_resolve_size): Diagnose too few arguments
8190 even when params is non-NULL empty vector.
8191
a011cd92
BS
81922016-02-08 Bernd Schmidt <bschmidt@redhat.com>
8193
8194 PR target/60410
8195 * c.opt (fshort-double): Remove.
8196
46cb9332
MS
81972016-02-05 Martin Sebor <msebor@redhat.com>
8198
8199 PR c++/69662
8200 * c.opt (Warning options): Update -Wplacement-new to take
8201 an optional argument.
8202
e1b81f2b
JJ
82032016-02-01 Jakub Jelinek <jakub@redhat.com>
8204
8205 PR preprocessor/69543
8206 PR c/69558
8207 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
8208 instead of loc to control_warning_option.
8209
b6adbb9f
NS
82102016-02-01 Nathan Sidwell <nathan@codesourcery.com>
8211
8212 * c.opt (fopenacc-dim=): New option.
8213
5d70666e
RB
82142016-01-27 Ryan Burn <contact@rnburn.com>
8215
8216 PR cilkplus/69267
8217 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
8218 gimplify_arg. Removed superfluous post_p argument.
8219 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
8220 superfluous post_p argument.
8221 * c-gimplify.c (c_gimplify_expr): Likewise.
8222
01e1dea3
DM
82232016-01-26 David Malcolm <dmalcolm@redhat.com>
8224
8225 PR other/69006
8226 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
8227 pp_newline_and_flush with pp_flush.
8228
9f04a53e
MS
82292016-01-20 Martin Sebor <msebor@redhat.com>
8230
8231 PR c/69405
8232 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
8233 an incompatible argument when the argument isn't a valid tree node.
8234
7f26f7df
JM
82352016-01-18 Jason Merrill <jason@redhat.com>
8236
8237 PR c++/68767
8238 * c-common.c (check_function_arguments_recurse): Fold the whole
8239 COND_EXPR, not just the condition.
8240
f62bf092
TV
82412016-01-18 Tom de Vries <tom@codesourcery.com>
8242
8243 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
8244 classify as loop clause.
8245
e0a575ff
JJ
82462016-01-15 Jakub Jelinek <jakub@redhat.com>
8247
8248 PR bootstrap/68271
8249 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
8250 C++ FE no longer has limit on number of pragmas.
8251
82522015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
8253
8254 PR c++/69048
8255 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 8256 to add missing cleanup point.
b6e3db06 8257
c7df95d8
DM
82582016-01-14 David Malcolm <dmalcolm@redhat.com>
8259
8260 PR c++/68819
8261 * c-indentation.c (get_visual_column): Add location_t param.
8262 Handle the column number being zero by effectively disabling the
8263 warning, with an "inform".
8264 (should_warn_for_misleading_indentation): Add location_t argument
8265 for all uses of get_visual_column.
8266
21efdd80
PP
82672016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
8268
8269 PR c++/69029
8270 * c-indentation.c (should_warn_for_misleading_indentation):
8271 Don't warn about do-while statements.
8272
7a127fa7
MS
82732016-01-07 Martin Sebor <msebor@redhat.com>
8274
8275 PR c/68966
8276 * c-common.c (sync_resolve_size): Reject first argument when it's
8277 a pointer to _Bool.
8278
c589e975
DM
82792016-01-05 David Malcolm <dmalcolm@redhat.com>
8280
8281 PR c/69122
8282 * c-indentation.c (get_visual_column): Remove default argument.
8283 (should_warn_for_misleading_indentation): For the multiline case,
8284 update call to get_visual_column for next_stmt_exploc so that it
8285 captures the location of the first non-whitespace character in the
8286 relevant line. Don't issue warnings if there is non-whitespace
8287 before the next statement.
8288
818ab71a
JJ
82892016-01-04 Jakub Jelinek <jakub@redhat.com>
8290
8291 Update copyright years.
8292
745e411d
DM
82932015-12-21 David Malcolm <dmalcolm@redhat.com>
8294
8295 * c-common.c (binary_op_error): Convert first param from
8296 location_t to rich_location * and use it when emitting an error.
8297 * c-common.h (binary_op_error): Convert first param from
8298 location_t to rich_location *.
8299
de67c4c3
DM
83002015-12-16 David Malcolm <dmalcolm@redhat.com>
8301
8302 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
8303 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
8304
4a38b02b
IV
83052015-12-15 Ilya Verbin <ilya.verbin@intel.com>
8306
8307 * c-common.c (c_common_attribute_table): Handle "omp declare target
8308 link" attribute.
8309
54d62f51
JJ
83102015-12-14 Jakub Jelinek <jakub@redhat.com>
8311
8312 PR c/68833
8313 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
8314
8d4227c8
TB
83152014-12-12 Tobias Burnus <burnus@net-b.de>
8316
8317 PR fortran/68815
8318 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
8319 specifiers (%d, %i,%u and %c).
8320
f6069ccc
DM
83212015-12-10 David Malcolm <dmalcolm@redhat.com>
8322
8323 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
8324
63bbf46d
JJ
83252015-12-08 Jakub Jelinek <jakub@redhat.com>
8326
8327 PR c/48088
8328 PR c/68657
8329 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
8330 * c-pragma.c (handle_pragma_diagnostic): Adjust
8331 control_warning_option caller.
8332
f79520bb
DM
83332015-12-07 David Malcolm <dmalcolm@redhat.com>
8334
8335 * c-common.c (c_cpp_error): Update for change to
8336 rich_location::set_range.
8337
b3d5bc62
JJ
83382015-12-04 Paolo Bonzini <bonzini@gnu.org>
8339
8340 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
8341 shifting 1 out of the sign bit.
8342
83432015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
8344
8345 * c-common.c (c_common_attribute_table[]): Update max arguments
8346 count for "simd" attribute.
8347 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
8348
6eb4a537
JJ
83492015-12-03 Jakub Jelinek <jakub@redhat.com>
8350
8351 PR preprocessor/57580
8352 * c-ppoutput.c (print): Change printed field to bool.
8353 Move src_file last for smaller padding.
8354 (init_pp_output): Set print.printed to false instead of 0.
8355 (scan_translation_unit): Fix up formatting. Set print.printed
8356 to true after printing something other than newline.
8357 (scan_translation_unit_trad): Set print.printed to true instead of 1.
8358 (maybe_print_line_1): Set print.printed to false instead of 0.
8359 (print_line_1): Likewise.
8360 (do_line_change): Set print.printed to true instead of 1.
8361 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8362 dump_macro): Set print.printed to false after printing newline.
8363
4250754e
JM
83642015-12-02 Jason Merrill <jason@redhat.com>
8365
f479b43d
JM
8366 * c-common.c (fold_for_warn): New.
8367 (warn_logical_operator, warn_tautological_cmp)
8368 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8369
4250754e
JM
8370 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8371 (c_fully_fold_internal, decl_constant_value_for_optimization):
8372 Move to c/c-fold.c.
8373 * c-common.h: Don't declare decl_constant_value_for_optimization.
8374
e9e32ee6
JM
83752015-12-02 Joseph Myers <joseph@codesourcery.com>
8376
8377 PR c/68162
8378 * c-common.h (c_build_qualified_type): Add extra default
8379 arguments.
8380
37d5ad46
JB
83812015-12-01 Julian Brown <julian@codesourcery.com>
8382 Cesar Philippidis <cesar@codesourcery.com>
8383 James Norris <James_Norris@mentor.com>
8384
8385 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8386 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8387 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8388
f07862c7
EB
83892015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8390
8391 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8392 (decl_sloc_common): Delete and move bulk of processing to...
8393 (decl_sloc): ...here.
8394 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8395 (dump_ada_double_name): Remove S parameter and compute the suffix.
8396 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8397 element type and deal with an anonymous one.
8398 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8399 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8400 and remove reference to QUAL_UNION_TYPE.
8401 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8402 (dump_nested_type): ...here. New function extracted from above.
8403 Generate a full declaration for anonymous element type of arrays.
8404 (print_ada_declaration): Really skip anonymous declarations. Remove
8405 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8406 Clean up processing of declarations of array types and objects.
8407 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8408 Remove obsolete code and tidy up.
8409
75c8aac3
JH
84102015-11-29 Jan Hubicka <hubicka@ucw.cz>
8411
8412 PR c/67581
8413 * c-common.c (handle_transparent_union_attribute): Update
8414 also type variants.
8415
b58d3df2
ML
84162015-11-27 Martin Liska <mliska@suse.cz>
8417
8418 PR c++/68312
8419 * array-notation-common.c (cilkplus_extract_an_triplets):
8420 Release vector of vectors.
8421 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8422
89a01fcf
EB
84232015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8424
8425 PR c++/68527
8426 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8427 (print_ada_struct_decl): Likewise.
8428
cc5c5226
IZ
84292015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8430
8431 PR c++/68001
8432 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8433 * cilk.c (recognize_spawn): Determine location in a more precise
8434 way.
8435
269adb9d
JM
84362015-11-19 Jason Merrill <jason@redhat.com>
8437
8438 * c-common.c (shorten_compare): But look through macros from
8439 system headers.
8440
d0eccfcd
JM
84412015-11-18 Jason Merrill <jason@redhat.com>
8442
8443 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8444 non-constant operand comes from a macro.
8445
3e44547c
JM
84462015-11-17 Jason Merrill <jason@redhat.com>
8447
8448 PR bootstrap/68346
8449 * c-common.c (warn_tautological_cmp): Fold before checking for
8450 constants.
8451
0f62c7a0
MP
84522015-11-16 Marek Polacek <polacek@redhat.com>
8453
8454 PR c++/68362
8455 * c-common.c (check_case_bounds): Fold low and high cases.
8456
a868811e
MP
84572015-11-16 Marek Polacek <polacek@redhat.com>
8458
8459 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8460 * c-common.c (c_common_get_alias_set): Likewise.
8461 (handle_visibility_attribute): Likewise.
8462
fff77217
KY
84632015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8464
8465 * c-common.c (handle_simd_attribute): New.
8466 (struct attribute_spec): Add entry for "simd".
8467 (handle_simd_attribute): New.
8468
269e63b7
KT
84692015-11-13 Kai Tietz <ktietz70@googlemail.com>
8470
8471 * c-lex.c (interpret_float): Use fold_convert.
8472
ebedc9a3
DM
84732015-11-13 David Malcolm <dmalcolm@redhat.com>
8474
8475 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8476 and store it on the result.
8477 * c-opts.c (c_common_init_options): Set
8478 global_dc->colorize_source_p.
8479
6e232ba4
JN
84802015-11-12 James Norris <jnorris@codesourcery.com>
8481 Joseph Myers <joseph@codesourcery.com>
8482
7365279f 8483 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8484 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8485 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8486 PRAGMA_OACC_CLAUSE_LINK.
8487
e78bede6
MP
84882015-11-11 Marek Polacek <polacek@redhat.com>
8489
8490 PR c/68107
8491 PR c++/68266
8492 * c-common.c (valid_array_size_p): New function.
8493 * c-common.h (valid_array_size_p): Declare.
8494
3f8257db 84952015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8496
8497 PR bootstrap/68271
8498 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8499
69f293c9
AM
85002015-11-11 Andrew MacLeod <amacleod@redhat.com>
8501
8502 * array-notation-common.c: Remove unused header files.
8503 * c-ada-spec.c: Likewise.
8504 * c-cilkplus.c: Likewise.
8505 * c-common.c: Likewise.
8506 * c-cppbuiltin.c: Likewise.
8507 * c-dump.c: Likewise.
8508 * c-format.c: Likewise.
8509 * c-gimplify.c: Likewise.
8510 * c-indentation.c: Likewise.
8511 * c-lex.c: Likewise.
8512 * c-omp.c: Likewise.
8513 * c-opts.c: Likewise.
8514 * c-pch.c: Likewise.
8515 * c-ppoutput.c: Likewise.
8516 * c-pragma.c: Likewise.
8517 * c-pretty-print.c: Likewise.
8518 * c-semantics.c: Likewise.
8519 * c-ubsan.c: Likewise.
8520 * cilk.c: Likewise.
8521 * stub-objc.c: Likewise.
8522
3a40d81d
NS
85232015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8524 Cesar Philippidis <cesar@codesourcery.com>
8525 James Norris <jnorris@codesourcery.com>
8526 Julian Brown <julian@codesourcery.com>
8527 Nathan Sidwell <nathan@codesourcery.com>
8528
8529 * c-pragma.c (oacc_pragmas): Add "routine".
8530 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8531
ee45a32d
EB
85322015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8533
8534 * c-common.c (c_common_attributes): Add scalar_storage_order.
8535 (handle_scalar_storage_order_attribute): New function.
8536 * c-pragma.c (global_sso): New variable.
8537 (maybe_apply_pragma_scalar_storage_order): New function.
8538 (handle_pragma_scalar_storage_order): Likewise.
8539 (init_pragma): Register scalar_storage_order.
8540 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8541 * c.opt (Wscalar-storage-order): New warning.
8542 (fsso-struct=): New option.
8543
eb11eb15
MS
85442015-11-08 Martin Sebor <msebor@redhat.com>
8545
8546 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8547
0aad0198
RS
85482015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8549
8550 * c-common.c: Don't undef DEF_BUILTIN.
8551
8a645150
DM
85522015-11-06 David Malcolm <dmalcolm@redhat.com>
8553
8554 * c-common.c (c_cpp_error): Convert parameter from location_t to
8555 rich_location *. Eliminate the "column_override" parameter and
8556 the call to diagnostic_override_column.
8557 Update the "done_lexing" clause to set range 0
8558 on the rich_location, rather than overwriting a location_t.
8559 * c-common.h (c_cpp_error): Convert parameter from location_t to
8560 rich_location *. Eliminate the "column_override" parameter.
8561
7a5e4956
CP
85622015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8563 Thomas Schwinge <thomas@codesourcery.com>
8564 James Norris <jnorris@codesourcery.com>
8565
8566 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8567 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8568 clauses with parallel and kernels and loops.
8569 * c-pragma.h (enum pragma_omp_clause): Add entries for
8570 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8571 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8572 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8573 INDEPENDENT,SEQ}.
8574 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8575
e2f5cc96
MS
85762015-11-05 Martin Sebor <msebor@redhat.com>
8577
8578 PR c++/67942
8579 * c.opt (-Wplacement-new): New option.
8580
e01d41e5
JJ
85812015-11-05 Jakub Jelinek <jakub@redhat.com>
8582
8583 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8584 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8585 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8586 save_expr or create_tmp_var* if TEST is true.
8587 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8588 Don't call add_stmt here.
8589 (struct c_omp_check_loop_iv_data): New type.
8590 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8591 c_omp_check_loop_iv_exprs): New functions.
8592 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8593 distribute.
8594 (c_omp_declare_simd_clauses_to_numbers): Change
8595 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8596 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8597 from numbers to PARM_DECLs.
8598
595278be
MM
85992015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8600
8601 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8602 flag_checking.
8603
3f8257db 86042015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8605
8606 PR c++-common/67882
b3d5bc62
JJ
8607 * c-common.h (fold_offsetof_1): Add argument.
8608 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8609 offsetof expressions that reference elements past the end of
8610 an array.
8611
4bf9e5a8
TS
86122015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8613 Chung-Lin Tang <cltang@codesourcery.com>
8614
8615 * c-pragma.c (oacc_pragmas): Add "atomic".
8616 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8617
3b1661a9
ES
86182015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8619
8620 * c-common.c (handle_target_clones_attribute): New.
8621 (c_common_attribute_table): Add handle_target_clones_attribute.
8622 (handle_always_inline_attribute): Add check on target_clones attribute.
8623 (handle_target_attribute): Ditto.
8624
2adfab87
AM
86252015-10-29 Andrew MacLeod <amacleod@redhat.com>
8626
8627 * array-notation-common.c: Reorder #include's and remove duplicates.
8628 * c-ada-spec.c: Likewise.
8629 * c-cilkplus.c: Likewise.
8630 * c-common.c: Likewise.
8631 * c-cppbuiltin.c: Likewise.
8632 * c-dump.c: Likewise.
8633 * c-format.c: Likewise.
8634 * c-gimplify.c: Likewise.
8635 * c-indentation.c: Likewise.
8636 * c-lex.c: Likewise.
8637 * c-omp.c: Likewise.
8638 * c-opts.c: Likewise.
8639 * c-pch.c: Likewise.
8640 * c-ppoutput.c: Likewise.
8641 * c-pragma.c: Likewise.
8642 * c-pretty-print.c: Likewise.
8643 * c-semantics.c: Likewise.
8644 * c-ubsan.c: Likewise.
8645 * cilk.c: Likewise.
8646 * stub-objc.c: Likewise.
8647
d90ec4f2
JM
86482015-10-28 Jason Merrill <jason@redhat.com>
8649
8650 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8651
88bae6f4
TS
86522015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8653 James Norris <jnorris@codesourcery.com>
8654 Cesar Philippidis <cesar@codesourcery.com>
8655
8656 PR c/64765
8657 PR c/64880
8658 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8659 * c-omp.c (c_oacc_split_loop_clauses): New function.
8660
b1726d6c
MS
86612015-10-21 Martin Sebor <msebor@redhat.com>
8662
8663 PR driver/68043
8664 * c.opt: End each sentence that describes an option with a period.
8665
fa60eeb9
MP
86662015-10-20 Marek Polacek <polacek@redhat.com>
8667
8668 * array-notation-common.c (is_cilkplus_vector_p): Define.
8669 * c-common.h (is_cilkplus_vector_p): Declare.
8670
95979049
MP
86712015-10-20 Marek Polacek <polacek@redhat.com>
8672
8673 * c.opt (std=gnu++11): Do not describe as experimental.
8674 (std=gnu++14): Likewise.
8675
2a9fb712
JM
86762015-10-19 Jason Merrill <jason@redhat.com>
8677
8678 * c-cppbuiltin.c (c_cpp_builtins): Define
8679 __cpp_nontype_template_args.
8680
13b380a3
JM
86812015-10-19 Jason Merrill <jason@redhat.com>
8682
8683 * c-cppbuiltin.c (c_cpp_builtins): Define
8684 __cpp_enumerator_attributes, __cpp_fold_expressions,
8685 __cpp_unicode_characters.
8686
d9a6bd32
JJ
86872015-10-13 Jakub Jelinek <jakub@redhat.com>
8688 Aldy Hernandez <aldyh@redhat.com>
8689
8690 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8691 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8692 (c_define_builtins): Likewise.
8693 * c-common.h (enum c_omp_clause_split): Add
8694 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8695 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8696 (c_finish_omp_for): Add ORIG_DECLV argument.
8697 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8698 201511 instead of 201307.
8699 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8700 OMP_CRITICAL_CLAUSES to it.
8701 (c_finish_omp_ordered): Add CLAUSES argument, set
8702 OMP_ORDERED_CLAUSES to it.
8703 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8704 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8705 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8706 constructs and new OpenMP 4.5 clauses. Clear
8707 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8708 verification code.
8709 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8710 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8711 (enum pragma_omp_clause): Add
8712 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8713 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8714
624d31fe
RS
87152015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8716
8717 * c-lex.c (interpret_float): Use real_equal instead of
8718 REAL_VALUES_EQUAL.
8719
b8fd7909
JM
87202015-10-04 Jason Merrill <jason@redhat.com>
8721
8722 Implement N4514, C++ Extensions for Transactional Memory.
8723 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8724 (c_common_attribute_table): Add transaction_safe_dynamic.
8725 transaction_safe now affects type identity.
8726 (handle_tm_attribute): Handle transaction_safe_dynamic.
8727 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8728 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8729 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8730 (D_TRANSMEM): New.
8731 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8732 * c-pretty-print.c (pp_c_attributes_display): Don't print
8733 transaction_safe in C++.
8734
12651878
MP
87352015-10-02 Marek Polacek <polacek@redhat.com>
8736
8737 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8738
3e3b8d63
MP
87392015-10-02 Marek Polacek <polacek@redhat.com>
8740
8741 PR c/64249
8742 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8743 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8744 * c.opt (Wduplicated-cond): New option.
8745
0d1a8f75
JM
87462015-10-01 Joseph Myers <joseph@codesourcery.com>
8747
8748 * c.opt (std=c11): Do not describe as experimental.
8749 (std=gnu11): Likewise.
8750 (std=iso9899:2011): Likewise.
8751
3e32ee19
NS
87522015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8753
8754 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8755 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8756
974348ee
MP
87572015-09-25 Marek Polacek <polacek@redhat.com>
8758
8759 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8760 (ubsan_instrument_shift): Likewise.
8761
15dbc1a6
MP
87622015-09-25 Marek Polacek <polacek@redhat.com>
8763
8764 PR sanitizer/64906
8765 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8766
6b95d7cc
PP
87672015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8768
8769 * c-indentation.c (should_warn_for_misleading_indentation):
8770 Compare next_stmt_vis_column with guard_line_first_nws instead
8771 of with guard_line_vis_column.
8772
c1822f9c
MLI
87732015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8774
8775 PR c/49654
8776 PR c/49655
8777 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8778 options and options not valid for the current language.
8779
d5398058
PP
87802015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8781
8782 * c-indentation.c (should_warn_for_misleading_indentation):
8783 Float out and consolidate the calls to get_visual_column that
8784 are passed guard_exploc as an argument. Compare
8785 next_stmt_vis_column with guard_line_first_nws instead of with
8786 body_line_first_nws.
8787
6b333269
NS
87882015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8789
8790 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8791 Wnamespaces): New C++ warnings.
8792
a75f1574
JM
87932015-09-22 Jason Merrill <jason@redhat.com>
8794
8795 * c-common.h (abi_compat_version_crosses): New.
8796 (warn_abi_version): Declare.
8797 * c-common.c: Define it.
8798 * c-opts.c (c_common_post_options): Handle it.
8799 flag_abi_compat_version defaults to 8.
8800
bdaaa8b7
VV
88012015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8802
8803 Complete the implementation of N4230, Nested namespace definition.
8804 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8805 __cpp_nested_namespace_definitions.
8806
eaa797e8
MLI
88072015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8808
8809 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8810
c4914de6
MLI
88112015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8812
8813 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8814 when warning.
8815 * c-pragma.h (pragma_lex): Add optional loc argument.
8816
fcb87c50
MM
88172015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8818
8819 * c-format.c (check_format_arg): Adjust to use common block size in all
8820 object pools.
8821
31bdd08a
DM
88222015-09-15 David Malcolm <dmalcolm@redhat.com>
8823
8824 * c-format.c (location_from_offset): Update for change in
8825 signature of location_get_source_line.
8826 * c-indentation.c (get_visual_column): Likewise.
8827 (line_contains_hash_if): Likewise.
8828
aa9f4b4c
MP
88292015-09-14 Marek Polacek <polacek@redhat.com>
8830
8831 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8832 setting various warnings.
8833
aa256c4a
MP
88342015-09-14 Marek Polacek <polacek@redhat.com>
8835
8836 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8837 a negative value.
8838
0f876f22
MW
88392015-09-11 Mark Wielaard <mjw@redhat.com>
8840
8841 PR c/28901
8842 * c.opt (Wunused-variable): Option from common.opt.
8843 (Wunused-const-variable): New option.
8844
273aa49e
PC
88452015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8846
8847 PR c++/53184
8848 * c.opt ([Wsubobject-linkage]): Add.
8849
1807ffc1
MS
88502015-09-03 Martin Sebor <msebor@redhat.com>
8851
8852 PR c/66516
8853 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8854 functions.
8855 * c-common.c (reject_gcc_builtin): Define.
8856
38942840
BI
88572015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8858
8859 PR middle-end/60586
8860 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8861 prototype.
8862 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8863 cilk_gimplify_call_params_in_spawned_fn.
8864 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8865 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8866 unwrapping.
8867
c316b5e4
MP
88682015-08-25 Marek Polacek <polacek@redhat.com>
8869
8870 PR middle-end/67330
8871 * c-common.c (handle_weak_attribute): Don't check whether the
8872 visibility can be changed here.
8873
584a7c46
MLI
88742015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8875
8876 * c-lex.c (c_lex_with_flags): Use explicit locations.
8877
a79683d5
TS
88782015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8879
8880 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8881 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8882
61717a45
FXC
88832015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8884
8885 PR middle-end/36757
8886 * c-common.c (check_builtin_function_arguments): Add check
8887 for BUILT_IN_SIGNBIT argument.
8888
329524f5
PC
88892015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8890
8891 PR c++/67160
8892 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8893 in c++1z mode.
8894
4ee55665
MP
88952015-08-17 Marek Polacek <polacek@redhat.com>
8896
8897 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8898 with whitespaces before qualifier names.
8899
b893e375
MP
89002015-08-12 Marek Polacek <polacek@redhat.com>
8901
8902 PR c++/55095
8903 * c-common.c (maybe_warn_shift_overflow): Properly handle
8904 left-shifting 1 into the sign bit.
8905
c2d89095
MLI
89062015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8907
8908 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8909
971e17ff
AS
89102015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8911 Braden Obrzut <admin@maniacsvault.net>
8912 Jason Merrill <jason@redhat.com>
8913
8914 Add C++ Concepts TS support.
8915 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8916 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8917 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8918 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8919 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8920 * c.opt (fconcepts): New.
8921
b3d5bc62
JJ
89222015-08-02 Martin Sebor <msebor@redhat.com>
8923
8924 * c.opt (-Wframe-address): New warning option.
8925
8ebca419
PP
89262015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8927
8928 * c-indentation.c (should_warn_for_misleading_indentation):
8929 Improve heuristics.
8930
1a1e101f
PP
89312015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8932
8933 * c-indentation.c (get_visual_column): Add parameter first_nws,
8934 use it. Update comment documenting the function.
8935 (is_first_nonwhitespace_on_line): Remove.
8936 (should_warn_for_misleading_indentation): Replace usage of
8937 of is_first_nonwhitespace_on_line with get_visual_column.
8938
992118a1
PP
89392015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8940
8941 * c-indentation.h (struct token_indent_info): Define.
8942 (get_token_indent_info): Define.
8943 (warn_for_misleading_information): Declare.
8944 * c-common.h (warn_for_misleading_information): Remove.
8945 * c-identation.c (warn_for_misleading_indentation):
8946 Change declaration to take three token_indent_infos. Adjust
8947 accordingly.
8948 * c-identation.c (should_warn_for_misleading_indentation):
8949 Likewise. Bail out early if the body is a compound statement.
8950 (guard_tinfo_to_string): Define.
8951
e8fa3817
JM
89522015-07-30 Jason Merrill <jason@redhat.com>
8953
8954 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8955 '*' for reference decay.
8956
173864e8
MP
89572015-07-30 Marek Polacek <polacek@redhat.com>
8958
8959 * c-common.c (warn_tautological_cmp): Bail for float types.
8960
f2afe6dd
MP
89612015-07-27 Marek Polacek <polacek@redhat.com>
8962
8963 PR bootstrap/67030
8964 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8965
05b28fd6
MP
89662015-07-27 Marek Polacek <polacek@redhat.com>
8967
8968 PR c++/66555
8969 PR c/54979
8970 * c-common.c (find_array_ref_with_const_idx_r): New function.
8971 (warn_tautological_cmp): New function.
8972 * c-common.h (warn_tautological_cmp): Declare.
8973 * c.opt (Wtautological-compare): New option.
8974
5a5062b8
MP
89752015-07-23 Marek Polacek <polacek@redhat.com>
8976
8977 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8978 (ubsan_instrument_shift): Likewise.
8979
dc891fe7
MP
89802015-07-23 Marek Polacek <polacek@redhat.com>
8981
8982 PR sanitizer/66908
8983 * c-ubsan.c: Include gimplify.h.
8984 (ubsan_instrument_division): Unshare OP0 and OP1.
8985 (ubsan_instrument_shift): Likewise.
8986
451b5e48
MP
89872015-07-20 Marek Polacek <polacek@redhat.com>
8988 Richard Sandiford <richard.sandiford@arm.com>
8989
8990 PR c++/55095
8991 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8992 Use EXPR_LOC_OR_LOC.
8993 (maybe_warn_shift_overflow): New function.
8994 * c-common.h (maybe_warn_shift_overflow): Declare.
8995 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8996 * c.opt (Wshift-overflow): New option.
8997
fb0b2914
ML
89982015-07-16 Martin Liska <mliska@suse.cz>
8999
9000 * c-format.c (static void check_format_info_main): Use
9001 object_allocator instead of pool_allocator.
9002 (check_format_arg): Likewise.
9003 (check_format_info_main): Likewise.
9004
903f5c23
AM
90052015-07-15 Andrew MacLeod <amacleod@redhat.com>
9006
9007 * c-opts.c: Remove multiline #include comment.
9008
026c3cfd
AH
90092015-07-12 Aldy Hernandez <aldyh@redhat.com>
9010
9011 * c-common.c: Fix double word typos.
9012
bb49ee66
EB
90132015-07-10 Eric Botcazou <ebotcazou@adacore.com>
9014
9015 * c-ada-spec.h (cpp_operation): Revert latest change.
9016 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
9017 constructors and destructors.
9018
1916bcb5
AM
90192015-07-09 Andrew MacLeod <amacleod@redhat.com>
9020
9021 * c-common.h: Adjust includes for flags.h changes.
9022 * stub-objc.c: Likewise.
026c3cfd 9023
a9dcd529
EB
90242015-07-08 Eric Botcazou <ebotcazou@adacore.com>
9025
9026 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
9027 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
9028
b03b462f
JJ
90292015-07-08 Jakub Jelinek <jakub@redhat.com>
9030
9031 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
9032 are to be removed, return NULL rather than original clauses list.
9033
c7131fb2
AM
90342015-07-07 Andrew MacLeod <amacleod@redhat.com>
9035
9036 * array-notation-common.c: Adjust includes.
9037 * c-ada-spec.c: Likewise.
9038 * c-cilkplus.c: Likewise.
9039 * c-common.h: Likewise.
9040 * c-cppbuiltin.c: Likewise.
9041 * c-dump.c: Likewise.
9042 * c-format.c: Likewise.
9043 * c-gimplify.c: Likewise.
9044 * c-indentation.c: Likewise.
9045 * c-lex.c: Likewise.
9046 * c-omp.c: Likewise.
9047 * c-opts.c: Likewise.
9048 * c-pch.c: Likewise.
9049 * c-ppoutput.c: Likewise.
9050 * c-pragma.c: Likewise.
9051 * c-pretty-print.c: Likewise.
9052 * c-semantics.c: Likewise.
9053 * c-ubsan.c: Likewise.
9054 * cilk.c: Likewise.
9055 * stub-objc.c: Likewise.
9056
2a7fb83f
EB
90572015-07-07 Eric Botcazou <ebotcazou@adacore.com>
9058
9059 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
9060 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
9061
a03c9bf1
JM
90622015-07-01 Jason Merrill <jason@redhat.com>
9063
36a85135
JM
9064 * c-common.h (D_CXX11): Rename from D_CXX0X.
9065 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
9066 * c-common.c: Adjust.
9067
e7fa68d5
JM
9068 * c-opts.c (c_common_post_options): Default to C++14.
9069
a03c9bf1
JM
9070 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
9071
fe95b036
ESR
90722015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
9073
9074 Implement N4197 - Adding u8 character literals
b3d5bc62 9075 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 9076 CPP_CHAR.
b3d5bc62 9077 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 9078 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 9079 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
9080 and CPP_UTF8CHAR tokens.
9081 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 9082
da2e71c9
MLI
90832015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9084
9085 PR fortran/66605
9086 * c-common.c (do_warn_unused_parameter): Move here.
9087 * c-common.h (do_warn_unused_parameter): Declare.
9088
b155cfd9
MP
90892015-06-29 Marek Polacek <polacek@redhat.com>
9090
9091 PR c/66322
9092 * c-common.c (check_case_bounds): Add bool * parameter. Set
9093 OUTSIDE_RANGE_P.
9094 (c_add_case_label): Add bool * parameter. Pass it down to
9095 check_case_bounds.
9096 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
9097 warning here.
9098 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
9099 declarations.
9100
31521951
MP
91012015-06-27 Marek Polacek <polacek@redhat.com>
9102
9103 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
9104 or VECTOR_INTEGER_TYPE_P throughout.
9105 * c-gimplify.c: Likewise.
9106
22d03525
MP
91072015-06-26 Marek Polacek <polacek@redhat.com>
9108
9109 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
9110 * c-common.c (c_fully_fold_internal): Likewise.
9111 (c_alignof_expr): Likewise.
9112 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
9113 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 9114 * cilk.c (create_parm_list): Likewise.
22d03525 9115
af05e6e5
MP
91162015-06-26 Marek Polacek <polacek@redhat.com>
9117
9118 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
9119
f0889939
AM
91202015-06-25 Andrew MacLeod <amacleod@redhat.com>
9121
9122 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
9123 * c-gimplify.c: Likewise.
9124 * c-pragma.c: Likewise.
9125 * c-ubsan.c: Likewise.
9126 * cilk.c: Likewise.
9127
ca752f39
RS
91282015-06-25 Richard Sandiford <richard.sandiford@arm.com>
9129
9130 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
9131 ggc_hasher.
9132
16a16ec7
AM
91332015-06-25 Andrew MacLeod <amacleod@redhat.com>
9134
9135 * cilk.c: Move calls.h after tm.h in the include chain.
9136
0ae9bd27
MP
91372015-06-25 Marek Polacek <polacek@redhat.com>
9138
9139 * array-notation-common.c: Use VAR_P throughout.
9140 * c-ada-spec.c: Likewise.
9141 * c-common.c: Likewise.
9142 * c-format.c: Likewise.
9143 * c-gimplify.c: Likewise.
9144 * c-omp.c: Likewise.
9145 * c-pragma.c: Likewise.
9146 * c-pretty-print.c: Likewise.
9147 * cilk.c: Likewise.
9148
62f9079a
MP
91492015-06-25 Marek Polacek <polacek@redhat.com>
9150
9151 * cilk.c (extract_free_variables): Use is_global_var.
9152
0fa16060
RS
91532015-06-23 Richard Sandiford <richard.sandiford@arm.com>
9154
9155 * c-common.c: Don't include target-def.h.
9156
a68ae2e1
MP
91572015-06-23 Marek Polacek <polacek@redhat.com>
9158
9159 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
9160 when comparing INTEGER_CSTs.
9161
c6a2f2d9
PMR
91622015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
9163
9164 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
9165 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
9166 (dump_ada_template): Skip partially specialized types.
9167
6b4db501
MM
91682015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
9169
9170 * c-common.c (scalar_to_vector): Use std::swap instead of manually
9171 swapping.
9172
abb226c9
AM
91732015-06-17 Andrew MacLeod <amacleod@redhat.com>
9174
9175 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
9176 * c-ada-spec.c: Likewise.
9177 * c-cilkplus.c: Likewise.
9178 * c-common.c: Likewise.
9179 * c-common.h: Likewise.
9180 * c-cppbuiltin.c: Likewise.
9181 * c-dump.c: Likewise.
9182 * c-format.c: Likewise.
9183 * c-gimplify.c: Likewise.
9184 * c-indentation.c: Likewise.
9185 * c-lex.c: Likewise.
9186 * c-omp.c: Likewise.
9187 * c-opts.c: Likewise.
9188 * c-pch.c: Likewise.
9189 * c-ppoutput.c: Likewise.
9190 * c-pragma.c: Likewise.
9191 * c-pretty-print.c: Likewise.
9192 * c-semantics.c: Likewise.
9193 * c-ubsan.c: Likewise.
9194 * cilk.c: Likewise.
9195 * stub-objc.c: Likewise.
9196
076fecad
PP
91972015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
9198
9199 PR c++/65168
9200 * c-common.c (c_common_truthvalue_conversion): Warn when
9201 converting an address of a reference to a truth value.
9202
13fdf2e2
AM
92032015-06-08 Andrew MacLeod <amacleod@redhat.com>
9204
9205 * array-notation-common.c : Adjust include files.
9206 * c-ada-spec.c : Likewise.
9207 * c-cilkplus.c : Likewise.
9208 * c-common.c : Likewise.
9209 * c-common.h : Likewise.
9210 * c-cppbuiltin.c : Likewise.
9211 * c-dump.c : Likewise.
9212 * c-format.c : Likewise.
9213 * c-gimplify.c : Likewise.
9214 * c-indentation.c : Likewise.
9215 * c-lex.c : Likewise.
9216 * c-omp.c : Likewise.
9217 * c-opts.c : Likewise.
9218 * c-pch.c : Likewise.
9219 * c-ppoutput.c : Likewise.
9220 * c-pragma.c : Likewise.
9221 * c-pretty-print.c : Likewise.
9222 * c-semantics.c : Likewise.
9223 * c-ubsan.c : Likewise.
9224 * cilk.c : Likewise.
9225 * stub-objc.c : Likewise.
9226
a1661b90
MP
92272015-06-08 Marek Polacek <polacek@redhat.com>
9228
9229 PR c/66415
9230 * c-format.c (location_from_offset): Return LOC if LINE is null.
9231
d7438551
AH
92322015-06-05 Aldy Hernandez <aldyh@redhat.com>
9233
9234 * c-common.h (c_parse_final_cleanups): New prototype.
9235 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
9236
b3d5bc62
JJ
92372015-06-04 Sriraman Tallam <tmsriram@google.com>
9238
9239 * c-common.c (noplt): New attribute.
9240 (handle_noplt_attribute): New handler.
9241
ecb9f223
AM
92422015-06-04 Andrew MacLeod <amacleod@redhat.com>
9243
9244 * array-notation-common.c: Adjust includes for restructured coretypes.h.
9245 * c-ada-spec.c: Likewise.
9246 * c-cilkplus.c: Likewise.
9247 * c-common.c: Likewise.
9248 * c-common.h: Likewise.
9249 * c-cppbuiltin.c: Likewise.
9250 * c-dump.c: Likewise.
9251 * c-format.c: Likewise.
9252 * c-gimplify.c: Likewise.
9253 * c-indentation.c: Likewise.
9254 * c-lex.c: Likewise.
9255 * c-omp.c: Likewise.
9256 * c-opts.c: Likewise.
9257 * c-pch.c: Likewise.
9258 * c-ppoutput.c: Likewise.
9259 * c-pragma.c: Likewise.
9260 * c-pretty-print.c: Likewise.
9261 * c-semantics.c: Likewise.
9262 * c-ubsan.c: Likewise.
9263 * cilk.c: Likewise.
9264 * stub-objc.c: Likewise.
9265
6ac48155
DM
92662015-06-02 David Malcolm <dmalcolm@redhat.com>
9267
9268 PR c/66220:
9269 * c-indentation.c (should_warn_for_misleading_indentation): Use
9270 expand_location rather than expand_location_to_spelling_point.
9271 Don't warn if the guarding statement is more indented than the
9272 next/body stmts.
9273
773ce42e
DM
92742015-06-02 David Malcolm <dmalcolm@redhat.com>
9275
9276 * c-indentation.c (warn_for_misleading_indentation): Bail out
9277 immediately if -Wmisleading-indentation isn't enabled.
9278
4fef8379
ML
92792015-06-01 Martin Liska <mliska@suse.cz>
9280
9281 * c-format.c (check_format_arg):Use new type-based pool allocator.
9282 (check_format_info_main) Likewise.
9283
1edfb384
EB
92842015-05-31 Eric Botcazou <ebotcazou@adacore.com>
9285
9286 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
9287 (has_nontrivial_methods): Likewise.
9288
9677ef52
MP
92892015-05-25 Marek Polacek <polacek@redhat.com>
9290
9291 * c-ubsan.c (ubsan_instrument_shift): Use type0.
9292
fd5c817a
MP
92932015-05-22 Marek Polacek <polacek@redhat.com>
9294
9295 PR c/47043
9296 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
9297
a2f45fe6 92982015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
9299
9300 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
9301 STACK_GROWS_DOWNWARD.
9302
a2f45fe6 93032015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
9304
9305 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
9306 STACK_GROWS_DOWNWARD rather than if it is defined.
9307
0fee2ac2 93082015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 9309
0fee2ac2
MLI
9310 PR c/52952
9311 * c-format.c (location_column_from_byte_offset): New.
9312 (location_from_offset): New.
9313 (struct format_wanted_type): Add offset_loc field.
9314 (check_format_info): Move handling of location for extra arguments
9315 closer to the point of warning.
9316 (check_format_info_main): Pass the result of location_from_offset
9317 to warning_at.
9318 (format_type_warning): Pass the result of location_from_offset
9319 to warning_at.
9320
cf4ef6f7
MP
93212015-05-20 Marek Polacek <polacek@redhat.com>
9322
9323 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
9324
3a65ee74
MP
93252015-05-20 Marek Polacek <polacek@redhat.com>
9326
9327 * c-ada-spec.c (dump_sloc): Use DECL_P.
9328
21b634ae
MP
93292015-05-20 Marek Polacek <polacek@redhat.com>
9330
9331 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9332 * c-common.c: Likewise.
9333
0e50b624
DM
93342015-05-19 David Malcolm <dmalcolm@redhat.com>
9335
9336 * c-common.h (fe_file_change): Strengthen param from
9337 const line_map * to const line_map_ordinary *.
9338 (pp_file_change): Likewise.
9339 * c-lex.c (fe_file_change): Likewise.
9340 (cb_define): Use linemap_check_ordinary when invoking
9341 SOURCE_LINE.
9342 (cb_undef): Likewise.
9343 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
9344 invoking cb_file_change.
9345 (c_finish_options): Likewise.
9346 (push_command_line_include): Likewise.
9347 (cb_file_change): Strengthen param "new_map" from
9348 const line_map * to const line_map_ordinary *.
9349 * c-ppoutput.c (cb_define): Likewise for local "map".
9350 (pp_file_change): Likewise for param "map" and local "from".
9351
fab27f52
MM
93522015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9353
9354 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
9355
2fe1d762
TV
93562015-05-18 Tom de Vries <tom@codesourcery.com>
9357
9358 * c-common.c (build_va_arg_1): New function.
9359 (build_va_arg): Add address operator to va_list operand if necessary.
9360
7a37fa90
MM
93612015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9362
9363 PR c/48956
9364 * c-common.c (int_safely_convertible_to_real_p): Define.
9365 (unsafe_conversion_p): Check conversions involving complex types.
9366 (conversion_warning): Add new warning message for conversions which
9367 discard imaginary component.
9368 * c-common.h: (enum conversion_safety): Add new enumerator for such
9369 conversions.
9370
3aa3c9fc
MP
93712015-05-14 Marek Polacek <polacek@redhat.com>
9372
9373 PR c/66066
9374 PR c/66127
9375 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9376 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9377 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9378 use it. If FOR_INT_CONST, require that all evaluated operands be
9379 INTEGER_CSTs.
9380
c3388e62
DM
93812015-05-12 David Malcolm <dmalcolm@redhat.com>
9382
9383 * c-common.h (warn_for_misleading_indentation): New prototype.
9384 * c-indentation.c: New file.
9385 * c.opt (Wmisleading-indentation): New option.
9386
c7b38fd5
TV
93872015-05-12 Tom de Vries <tom@codesourcery.com>
9388
9389 PR tree-optimization/66010
9390 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9391
381bf11e
JM
93922015-05-09 Jason Merrill <jason@redhat.com>
9393
edff0c06
JM
9394 * c-opts.c (c_common_post_options): Also clear
9395 cpp_opts->cpp_warn_cxx11_compat.
9396
129211bc
JM
9397 * c-common.h (enum cxx_dialect): Add cxx_unset.
9398 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9399 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9400
381bf11e
JM
9401 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9402 (std=gnu++0x): Mark as Undocumented.
9403 (std=gnu++1y): Add deprecated message.
9404
fe191308
JM
94052015-05-08 Jason Merrill <jason@redhat.com>
9406
765189ff
JM
9407 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9408 * c-opts.c: Adjust.
9409
fe191308
JM
9410 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9411
755e528f
MP
94122015-05-08 Marek Polacek <polacek@redhat.com>
9413
9414 PR c/64918
9415 * c.opt (Woverride-init-side-effects): New option.
9416
0173bd2a
MP
94172015-05-07 Marek Polacek <polacek@redhat.com>
9418
9419 PR c/65179
9420 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9421 negative value.
9422 * c.opt (Wshift-negative-value): New option.
9423 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9424 when -Wextra and C99/C++11 mode.
9425
e0f0d3b9
MP
94262015-05-07 Marek Polacek <polacek@redhat.com>
9427 Martin Uecker <uecker@eecs.berkeley.edu>
9428
9429 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9430 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9431
8243e2a9
JM
94322015-05-05 Jason Merrill <jason@redhat.com>
9433
9434 * c.opt (Wterminate): New.
9435
577cd070
MP
94362015-04-30 Marek Polacek <polacek@redhat.com>
9437
9438 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9439 require that the non-constant be of a boolean type.
9440
0373796b
JT
94412015-04-29 Josh Triplett <josh@joshtriplett.org>
9442
e0f0d3b9
MP
9443 * c-common.c (handle_section_attribute): Refactor to reduce
9444 nesting and distinguish between error cases.
0373796b 9445
716c0ba6
MP
94462015-04-29 Marek Polacek <polacek@redhat.com>
9447
9448 PR c/64610
9449 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9450 with 0/1.
9451
8848828b
JJ
94522015-04-29 Jakub Jelinek <jakub@redhat.com>
9453
9454 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9455 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9456 HOST_BITS_PER_WIDE_INT.
9457
ecd0e562
TV
94582015-04-28 Tom de Vries <tom@codesourcery.com>
9459
9460 PR tree-optimization/65887
9461 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9462
2a877204 94632015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9464 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9465
9466 * c-ada-spec.c (in_function): Delete.
9467 (dump_generic_ada_node): Do not change in_function and remove the
9468 redundant code dealing with it.
9469 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9470 (print_ada_methods): Output the static member functions in a nested
9471 package after the regular methods as well as associated renamings.
9472
4853031e
MP
94732015-04-24 Marek Polacek <polacek@redhat.com>
9474
9475 PR c/65830
9476 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9477 and OPT_Wshift_count_overflow.
9478
8c2b7f79
MP
9479 PR c/63357
9480 * c-common.c (warn_logical_operator): Warn if the operands have the
9481 same expressions.
9482
b8787813
MP
94832015-04-24 Marek Polacek <polacek@redhat.com>
9484
9485 PR c/61534
9486 * c-common.c (warn_logical_operator): Bail if either operand comes
9487 from a macro expansion.
9488
8fba1830
BRF
94892015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9490
9491 PR target/55143
9492 * c-common.c (c_default_pointer_mode): Add definition.
9493 * c-common.h (c_default_pointer_mode): Add declaration.
9494
17958621
JJ
94952015-03-11 Jakub Jelinek <jakub@redhat.com>
9496
9497 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9498 on record_builtin_type argument.
9499
7ccb1a11
JJ
95002015-03-10 Jakub Jelinek <jakub@redhat.com>
9501
9502 PR c/65120
9503 * c-common.c (warn_logical_not_parentheses): Don't warn for
9504 !x == 0 or !x != 0.
9505
04fd785e
MP
95062015-03-07 Marek Polacek <polacek@redhat.com>
9507
9508 PR sanitizer/65280
9509 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9510 before trying to figure out whether we have a flexible array member.
9511
a4e26206 95122015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9513 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9514
9515 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9516
0d2489f4
EB
95172015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9518
9519 PR ada/65319
9520 * c-ada-spec.c (print_destructor): Remove obsolete code.
9521
83ed54d7
EB
95222015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9523
9524 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9525 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9526 DECL_TEMPLATE_RESULT emulations.
9527 (dump_ada_template)): Add guard for TYPE_METHODS.
9528
7631f0e2
MP
95292015-02-27 Marek Polacek <polacek@redhat.com>
9530
9531 PR c/65040
9532 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9533
d1783ae5
KT
95342015-02-27 Kai Tietz <ktietz@redhat.com>
9535
9536 PR c/35330
9537 * c-pragma.c (handle_pragma_weak): Do not try to create
9538 weak/alias of declarations not being function, or variable
9539 declarations.
9540
56a9f6bc
TS
95412015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9542
9543 PR libgomp/64625
9544 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9545 Remove macros.
9546 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9547
3d5cb23d
MP
95482015-02-16 Marek Polacek <polacek@redhat.com>
9549
9550 PR c/65066
9551 * c-format.c (check_format_types): Handle null param.
9552
fa008882
MP
95532015-02-13 Marek Polacek <polacek@redhat.com>
9554
9555 PR c/65040
9556 * c-format.c (check_format_types): Don't warn about different
9557 signedness if the original value is in the range of WANTED_TYPE.
9558
785f21af
JM
95592015-02-12 Jason Merrill <jason@redhat.com>
9560
9561 PR c++/64956
9562 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9563 to the current highest version.
9564 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9565
4886ec8e
JJ
95662015-02-04 Jakub Jelinek <jakub@redhat.com>
9567
9568 PR c/64824
9569 PR c/64868
9570 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9571 instead of RDIV_EXPR. Use build_binary_op instead of
9572 build2_loc.
9573
40fecdd6
JM
95742015-01-30 Joseph Myers <joseph@codesourcery.com>
9575
9576 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9577 to pass input_location as first argument.
9578
a0c88d06
TV
95792015-01-23 Tom de Vries <tom@codesourcery.com>
9580
9581 PR libgomp/64672
9582 * c.opt (fopenacc): Mark as LTO option.
9583
1506ae0e
TV
95842015-01-23 Tom de Vries <tom@codesourcery.com>
9585
9586 PR libgomp/64707
9587 * c.opt (fopenmp): Mark as LTO option.
9588
31be63ab
JJ
95892015-01-21 Jakub Jelinek <jakub@redhat.com>
9590
9591 PR c/63307
b1726d6c 9592 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9593 (compare_decls): Fix up formatting.
9594
95952015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9596
9597 PR c/63307
9598 * cilk.c: Include vec.h.
9599 (struct cilk_decls): New structure.
9600 (wrapper_parm_cb): Split this function to...
9601 (fill_decls_vec): ...this...
9602 (create_parm_list): ...and this.
9603 (compare_decls): New function.
9604 (for_local_cb): Remove.
9605 (wrapper_local_cb): Ditto.
9606 (build_wrapper_type): For now first traverse and fill vector of
9607 declarations then sort it and then deal with sorted vector.
9608 (cilk_outline): Ditto.
9609 (declare_one_free_variable): Ditto.
9610
6875457f
JM
96112015-01-21 Jason Merrill <jason@redhat.com>
9612
9613 PR c++/64629
9614 * c-format.c (check_format_arg): Call decl_constant_value.
9615
185c9e56
ML
96162015-01-19 Martin Liska <mliska@suse.cz>
9617
9618 * c-common.c (handle_noicf_attribute): New function.
9619
41dbbb37
TS
96202015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9621 Bernd Schmidt <bernds@codesourcery.com>
9622 James Norris <jnorris@codesourcery.com>
9623 Cesar Philippidis <cesar@codesourcery.com>
9624 Ilmir Usmanov <i.usmanov@samsung.com>
9625 Jakub Jelinek <jakub@redhat.com>
9626
9627 * c.opt (fopenacc): New option.
9628 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9629 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9630 New macros.
9631 * c-common.h (c_finish_oacc_wait): New prototype.
9632 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9633 (c_finish_oacc_wait): New function.
9634 * c-pragma.c (oacc_pragmas): New variable.
9635 (c_pp_lookup_pragma, init_pragma): Handle it.
9636 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9637 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9638 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9639 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9640 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9641 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9642 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9643 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9644 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9645 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9646 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9647 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9648 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9649 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9650 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9651 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9652 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9653 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9654 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9655 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9656 PRAGMA_OACC_CLAUSE_WORKER.
9657
3f8257db 96582015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9659
9660 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9661 for the new option fstack-protector_explicit.
9662 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9663 (handle_stack_protect_attribute): New function.
9664
3f8257db 96652015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9666
9667 * c.opt: New option -Warray-bounds=.
9668
adfac8df
JJ
96692015-01-09 Michael Collison <michael.collison@linaro.org>
9670
9671 * array-notation-common.c: Include hash-set.h, machmode.h,
9672 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9673 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9674 * c-ada-spec.c: Ditto.
9675 * c-cilkplus.c: Ditto.
9676 * c-common.c: Include input.h due to flattening of tree.h.
9677 Define macro GCC_C_COMMON_C.
9678 * c-common.h: Flatten tree.h header files into c-common.h.
9679 Remove include of tree-core.h.
9680 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9681 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9682 fold-const.h, wide-int.h, and inchash.h due to
9683 flattening of tree.h.
9684 * c-dump.c: Ditto.
9685 * c-format.c: Flatten tree.h header files into c-common.h.
9686 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9687 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9688 fold-const.h, wide-int.h, and inchash.h due to
9689 flattening of tree.h.
9690 * c-dump.c: Include hash-set.h, machmode.h,
9691 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9692 fold-const.h, wide-int.h, and inchash.h due to
9693 flattening of tree.h.
9694 * c-format.c: Include hash-set.h, machmode.h,
9695 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9696 fold-const.h, wide-int.h, inchash.h and real.h due to
9697 flattening of tree.h.
9698 * c-gimplify.c: Include hash-set.h, machmode.h,
9699 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9700 fold-const.h, wide-int.h, and inchash.h due to
9701 flattening of tree.h.
9702 * cilk.c: Ditto.
9703 * c-lex.c: Ditto.
9704 * c-omp.c: Ditto.
9705 * c-opts.c: Ditto.
9706 * c-pch.c: Ditto.
9707 * c-ppoutput.c: Ditto.
9708 * c-pragma.c: Ditto.
9709 * c-pretty-print.c: Ditto.
9710 * c-semantics.c: Ditto.
9711 * c-ubsan.c: Ditto.
9712 * stub-objc.c: Ditto.
9713
f5481fc4
JM
97142015-01-08 Jason Merrill <jason@redhat.com>
9715
9716 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9717 do_ubsan_in_current_function.
9718 (ubsan_maybe_instrument_reference_or_call): Likewise.
9719 * c-ubsan.h: Declare it.
9720
de35aa66
MS
97212015-01-08 Mike Stump <mikestump@comcast.net>
9722
9723 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9724
4a9a42ab
MP
97252015-01-07 Marek Polacek <polacek@redhat.com>
9726
9727 PR c/64440
9728 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9729 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9730
2f42e5de
TS
97312015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9732
9733 PR c++/31397
9734 * c.opt (Wsuggest-override): New option.
9735
5624e564
JJ
97362015-01-05 Jakub Jelinek <jakub@redhat.com>
9737
9738 Update copyright years.
9739
5bd012f8
MP
97402015-01-05 Marek Polacek <polacek@redhat.com>
9741
9742 PR c/64423
9743 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9744 parameter. Use it.
9745 * c-common.h (warn_array_subscript_with_type_char): Update
9746 declaration.
9747
a7fa8d18
ESR
97482014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9749
9750 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9751 Control macro with flag_sized_deallocation.
9752
3f8257db 97532014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9754
9755 * c.opt (Wdiscarded-array-qualifiers): New option.
9756
1f8d3e84
JJ
97572014-12-19 Jakub Jelinek <jakub@redhat.com>
9758
9759 PR preprocessor/63831
9760 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9761 and __has_cpp_attribute here.
9762 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9763 c_common_has_attribute.
9764 * c-common.h (c_common_has_attribute): New prototype.
9765 * c-lex.c (init_c_lex): Set cb->has_attribute to
9766 c_common_has_attribute instead of cb_has_attribute.
9767 (get_token_no_padding): New function.
9768 (cb_has_attribute): Renamed to ...
9769 (c_common_has_attribute): ... this. No longer static. Use
9770 get_token_no_padding, require ()s, don't build TREE_LIST
9771 unnecessarily, fix up formatting, adjust diagnostics, call
9772 init_attributes.
9773
20b06add
JM
97742014-12-15 Jason Merrill <jason@redhat.com>
9775
9776 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9777 (-Wsized-deallocation): New.
9778 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9779 to on in C++14 and up.
9780
94a073b2
JM
97812014-12-11 Jason Merrill <jason@redhat.com>
9782
acaa5911
JM
9783 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9784
94a073b2
JM
9785 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9786 we aren't complaining about VLAs.
9787
7fb66c15
MP
97882014-12-06 Marek Polacek <polacek@redhat.com>
9789
9790 PR tree-optimization/64183
9791 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9792 shift-expression if it is integer_type_node. Use types_compatible_p.
9793
b731b390
JJ
97942014-11-29 Jakub Jelinek <jakub@redhat.com>
9795
9796 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9797 last argument from create_tmp_var_raw and create_tmp_var calls.
9798 * cilk.c (gimplify_cilk_spawn): Likewise.
9799 * c-omp.c (c_finish_omp_atomic): Likewise.
9800
6a4da643
MP
98012014-11-28 Marek Polacek <polacek@redhat.com>
9802
9803 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9804 instead of unsigned_type_node.
9805
541e35a6
MP
98062014-11-28 Marek Polacek <polacek@redhat.com>
9807
9808 PR c/63862
9809 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9810 to op1_utype.
9811 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9812 expression to unsigned_type_node.
9813
dcc97066
MW
98142014-11-20 Mark Wielaard <mjw@redhat.com>
9815
9816 PR debug/38757
9817 * c-opts.c (set_std_c89): Set lang_hooks.name.
9818 (set_std_c99): Likewise.
9819 (set_std_c11): Likewise.
9820 (set_std_cxx98): Likewise.
9821 (set_std_cxx11): Likewise.
9822 (set_std_cxx14): Likewise.
9823 (set_std_cxx1z): Likewise.
9824
aa7da51a
JJ
98252014-11-21 Jakub Jelinek <jakub@redhat.com>
9826
9827 PR target/63764
9828 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9829 return type to bool.
009a3480 9830 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9831 (convert_vector_to_pointer_for_subscript): Change return type to
9832 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9833 and copy it into a TARGET_EXPR and use that instead of *vecp
9834 directly.
9835
538dd0b7
DM
98362014-11-19 David Malcolm <dmalcolm@redhat.com>
9837
9838 Merger of git branch "gimple-classes-v2-option-3".
9839 * ChangeLog.gimple-classes: New.
9840 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9841 from being just a vec<gimple> to a vec<gbind *>.
9842
c39a5e99
JJ
98432014-11-18 Jakub Jelinek <jakub@redhat.com>
9844
9845 PR sanitizer/63813
9846 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9847 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9848 get_pointer_alignment for non-pointers. Use ptype, or if it is
9849 reference type, corresponding pointer type, as type of kind
9850 argument.
9851 (ubsan_maybe_instrument_reference,
9852 ubsan_maybe_instrument_member_call): Adjust callers.
9853
8537a4a9
MP
98542014-11-15 Marek Polacek <polacek@redhat.com>
9855
9856 PR middle-end/63884
9857 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9858 for NULL fndecl.
9859 (extract_array_notation_exprs): Return for NULL node.
9860
2079956a
JM
98612014-11-12 Joseph Myers <joseph@codesourcery.com>
9862
9863 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9864 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9865
1304953e
JJ
98662014-11-12 Jakub Jelinek <jakub@redhat.com>
9867
9868 PR c/59708
9869 * c-common.c (check_builtin_function_arguments): Handle
9870 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9871
e5e44252
AK
98722014-11-10 Andi Kleen <ak@linux.intel.com>
9873
9874 PR c/60804
9875 * c-common.h (check_no_cilk): Declare.
9876 * cilk.c (get_error_location): New function.
9877 (check_no_cilk): Dito.
9878
e64b984d
AK
98792014-11-10 Andi Kleen <ak@linux.intel.com>
9880
9881 * cilk.c (recognize_spawn): Use expression location
9882 for error message.
9883
13c21655
PC
98842014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9885
9886 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9887
42fd12b1
ESR
98882014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9889
9890 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9891 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9892 (__cpp_range_based_for, __cpp_initializer_lists,
9893 __cpp_delegating_constructors, __cpp_nsdmi,
9894 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9895 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9896 __has_cpp_attribute.
9897 * c-lex.c (cb_has_attribute): New callback CPP function;
9898 (init_c_lex): Set has_attribute callback.
9899
6f450181
RB
99002014-11-04 Richard Biener <rguenther@suse.de>
9901
9902 * c-common.c (shorten_compare): Do not shorten mixed
9903 DFP and non-DFP compares.
9904
26f0e1d6
ESR
99052014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9906
9907 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9908 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9909 Commentary and rearrangement of tests.
9910 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9911 Commentary and rearrangement of tests.
ab20d992 9912 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9913 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9914
ef4bddc2
RS
99152014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9916
9917 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9918 enum from machine_mode.
9919
c582198b
AM
99202014-10-28 Andrew MacLeod <amacleod@redhat.com>
9921
adfac8df
JJ
9922 * c-common.c: Adjust include files.
9923 * c-gimplify.c: Ditto.
9924 * cilk.c: Ditto.
9925 * c-pragma.c: Ditto.
9926 * c-ubsan.c: Ditto.
c582198b 9927
60393bbc
AM
99282014-10-27 Andrew MacLeod <amacleod@redhat.com>
9929
9930 * c-gimplify.c: Adjust include files.
9931
d723bb7c
MLI
99322014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9933
9934 PR c++/53061
9935 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9936 c_common_initialize_diagnostics.
9937 * c-common.h: Likewise.
9938
90f3520e
MP
99392014-10-24 Marek Polacek <polacek@redhat.com>
9940
9941 PR c/56980
9942 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9943 print "struct"/"union"/"enum" for typedefed names.
9944
59d7607a
MP
99452014-10-23 Marek Polacek <polacek@redhat.com>
9946
9947 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9948 in unsigned type.
9949
d95a2703
JJ
99502014-10-22 Jakub Jelinek <jakub@redhat.com>
9951 Yury Gribov <y.gribov@samsung.com>
9952
9953 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9954 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9955 instead of flag_sanitize_recover as bool flag.
9956
8e6ef852
KY
99572014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9958
9959 * cilk.c: Revert previous change.
9960
948cf550
IZ
99612014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9962
9963 PR c/63307
9964 * cilk.c: Include vec.h.
9965 (struct cilk_decls): New structure.
9966 (wrapper_parm_cb): Split this function to...
9967 (fill_decls_vec): ...this...
9968 (create_parm_list): ...and this.
9969 (compare_decls): New function.
9970 (for_local_cb): Remove.
9971 (wrapper_local_cb): Ditto.
9972 (build_wrapper_type): For now first traverse and fill vector of
9973 declarations then sort it and then deal with sorted vector.
9974 (cilk_outline): Ditto.
9975 (declare_one_free_variable): Ditto.
9976
92574c7c
MP
99772014-10-17 Marek Polacek <polacek@redhat.com>
9978
9979 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9980 * c.opt (Wimplicit-int): Initialize to -1.
9981
83685514
AM
99822014-10-16 Andrew MacLeod <amacleod@redhat.com>
9983
9984 * c-pragma.c: Adjust include files.
9985 * c-semantics.c: Likewise.
9986
5b8300ea
DD
99872014-10-16 DJ Delorie <dj@redhat.com>
9988
9989 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9990 multiples of bytes.
9991
5f83e90b
JM
99922014-10-14 Jason Merrill <jason@redhat.com>
9993
9994 PR c++/63455
9995 * c-common.h (CPP_PREPARSED_EXPR): New.
9996 (N_CP_TTYPES): Adjust.
9997
d73326ca
MP
99982014-10-15 Marek Polacek <polacek@redhat.com>
9999
10000 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
10001
78a7c317
DD
100022014-10-14 DJ Delorie <dj@redhat.com>
10003
10004 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
10005 types, not just __int128.
10006 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
10007 types, not just __int128.
10008 (cpp_atomic_builtins): Round pointer sizes up.
10009 (type_suffix): Use type precision, not specific types.
10010 * c-common.c (c_common_reswords): Remove __int128 special case.
10011 (c_common_type_for_size): Check for all __intN types, not just
10012 __int128.
10013 (c_common_type_for_mode): Likewise.
10014 (c_common_signed_or_unsigned_type): Likewise.
10015 (c_build_bitfield_integer_type): Likewise.
10016 (c_common_nodes_and_builtins): Likewise.
10017 (keyword_begins_type_specifier): Likewise.
10018 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
10019 __intN variants.
10020
2a22f99c
TS
100212014-10-12 Trevor Saunders <tsaunders@mozilla.com>
10022
10023 * c-common.c: Use hash_table instead of hashtab.
10024
2a8ef767
ESR
100252014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
10026
adfac8df 10027 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
10028 C++11 section.
10029
3c9aabbd
MG
100302014-10-03 Marc Glisse <marc.glisse@inria.fr>
10031
10032 PR c++/54427
10033 PR c++/57198
10034 PR c++/58845
10035 * c-common.c (warn_logical_operator): Punt for vectors.
10036
a15f7cb8
ESR
100372014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
10038
10039 Implement SD-6: SG10 Feature Test Recommendations
10040 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
10041 macros and the __has_header macro.
10042
8d0cf15e
JM
100432014-09-30 Jason Merrill <jason@redhat.com>
10044
dd5d5481
JM
10045 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
10046 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
10047 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10048
b752325e
JM
10049 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
10050 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
10051
8d0cf15e
JM
10052 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
10053 * c-common.c (c_common_reswords): Remove __is_convertible_to.
10054
083e891e
MP
100552014-09-24 Marek Polacek <polacek@redhat.com>
10056
10057 PR c/61405
10058 PR c/53874
10059 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
10060
7861b648
AK
100612014-09-23 Andi Kleen <ak@linux.intel.com>
10062
10063 * c-common.c (handle_no_reorder_attribute): New function.
10064 (c_common_attribute_table): Add no_reorder attribute.
10065
9a79452d
JM
100662014-09-22 Joseph Myers <joseph@codesourcery.com>
10067
10068 * c-cppbuiltin.c (c_cpp_builtins): Define
10069 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
10070 modes.
10071
dd69f047
JM
100722014-09-18 Joseph Myers <joseph@codesourcery.com>
10073
10074 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
10075 for supported floating-point modes.
10076
737a4826
MLI
100772014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10078
10079 * c.opt (Wpsabi): Use LangEnabledBy.
10080 * c-opts.c (c_common_handle_option): Do not handle here.
10081
8cc4b7a2
JM
100822014-09-12 Joseph Myers <joseph@codesourcery.com>
10083
10084 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
10085 macros for floating-point modes.
10086
179b5a55
MG
100872014-09-11 Marc Glisse <marc.glisse@inria.fr>
10088
10089 PR target/58757
10090 * c-cppbuiltin.c (builtin_define_float_constants): Correct
10091 __*_DENORM_MIN__ without denormals.
10092
570a11fe
JJ
100932014-09-10 Jakub Jelinek <jakub@redhat.com>
10094
10095 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10096 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10097 ubsan_create_data callers.
10098 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
10099 index is constant or BIT_AND_EXPR with constant mask and is
10100 small enough for the bound.
10101 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
10102 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
10103
b559c810
MLI
101042014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10105
10106 * c.opt: Add CppReason to various flags.
10107 (Wdate-time): Re-sort.
10108 * c-common.c: Include c-common.h earlier.
10109 (struct reason_option_codes_t): Delete.
10110 (c_option_controlling_cpp_error): Prefix global type and struct
10111 with cpp_.
10112
1ef33fd4
MLI
101132014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10114
10115 * c.opt (Wnormalized): New.
10116 (Wnormalized=): Use Enum and Reject Negative.
10117 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
10118
66bb34c0
JM
101192014-09-08 Joseph Myers <joseph@codesourcery.com>
10120
10121 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
10122 digits of floating-point modes if -fbuilding-libgcc.
10123
53d68b9f
JM
101242014-09-05 Joseph Myers <joseph@codesourcery.com>
10125
10126 * c-cppbuiltin.c (c_cpp_builtins): Also define
10127 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
10128 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
10129 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
10130 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
10131 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
10132 __LIBGCC_STACK_GROWS_DOWNWARD__,
10133 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
10134 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
10135 __LIBGCC_DWARF_FRAME_REGISTERS__,
10136 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
10137 __LIBGCC_STACK_POINTER_REGNUM__ and
10138 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
10139 (builtin_define_with_value): Handle backslash-escaping in string
10140 macro values.
10141
f65586dc
RB
101422014-09-05 Richard Biener <rguenther@suse.de>
10143
10144 PR middle-end/63148
10145 * c-format.c (check_format_arg): Properly handle
10146 effectively signed POINTER_PLUS_EXPR offset.
10147
2b71f4a4
MLI
101482014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10149
10150 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
10151 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
10152 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
10153 and Init.
10154 * c-opts.c (c_common_handle_option): Do not handle here.
10155 (sanitize_cpp_opts): Likewise.
10156 * c-common.c (struct reason_option_codes_t): Handle
10157 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
10158
d2e4feca
MP
101592014-09-03 Marek Polacek <polacek@redhat.com>
10160
10161 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
10162
9a771876
JJ
101632014-09-02 Jakub Jelinek <jakub@redhat.com>
10164 Balaji V. Iyer <balaji.v.iyer@intel.com>
10165 Igor Zamyatin <igor.zamyatin@intel.com>
10166
10167 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
10168 * c-common.c (c_common_reswords): Added _Cilk_for.
10169 * c-common.h (enum rid): Added RID_CILK_FOR.
10170 (cilk_for_number_of_iterations): Add declaration.
10171 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
10172 CILK_FOR.
10173 * c-pragma.c (init_pragma): Register "grainsize" pragma.
10174 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
10175
81b5d104
MLI
101762014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10177
10178 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
10179 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
10180 Wundef): Use CPP, Var and Init.
10181 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
10182
b753b37b
MLI
101832014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10184
10185 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
10186 * c-opts.c (c_common_handle_option): Do not handle here.
10187
028aee17
JM
101882014-08-25 Jason Merrill <jason@redhat.com>
10189
10190 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
10191 -std=c++14 and -std=gnu++14, rather than the reverse.
10192 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
10193 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
10194 * c-common.h (cxx_dialect): Remove cxx1y.
10195
e4276ba5
ESR
101962014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
10197
10198 * c-common.h (enum cxx_dialect): Add cxx14.
10199 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
10200 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
10201 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
10202
a545cacd
JM
102032014-08-22 Jason Merrill <jason@redhat.com>
10204
10205 * c.opt (std=gnu++17): Fix alias.
10206
59ea0364
MP
102072014-08-22 Marek Polacek <polacek@redhat.com>
10208
10209 PR c++/62199
10210 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
10211 check for vector types. Drop LHS argument.
10212 * c-common.h (warn_logical_not_parentheses): Adjust.
10213
596e808c
MLI
102142014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10215
10216 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
10217 (Wmultichar): Likewise.
10218 (Wdate-time): Use C-family languages instead of Common. Use CPP
10219 and Var.
10220 * c-opts.c (c_common_handle_option): Do not handle the above
10221 options here.
10222 (sanitize_cpp_opts): Likewise.
10223
18767f65
MLI
102242014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
10225
10226 PR fortran/44054
10227 * c-opts.c: Include tree-diagnostics.h.
10228 (c_diagnostic_finalizer): New.
10229 (c_common_initialize_diagnostics): Use it.
10230
b4413594
MLI
102312014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10232
10233 PR preprocessor/51303
10234 * c-common.c (struct reason_option_codes_t option_codes):
10235 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
10236
43f9a13c
MLI
102372014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10238
10239 PR c/60975
10240 PR c/53063
10241 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
10242 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
10243 (c_common_post_options): Call init_global_opts_from_cpp.
10244 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
10245
04159acf
MP
102462014-08-19 Marek Polacek <polacek@redhat.com>
10247
10248 PR c++/62153
10249 * c-common.c (maybe_warn_bool_compare): New function.
10250 * c-common.h (maybe_warn_bool_compare): Declare.
10251 * c.opt (Wbool-compare): New option.
10252
35aff4fb
MP
102532014-08-19 Marek Polacek <polacek@redhat.com>
10254
10255 * c.opt (Wc99-c11-compat): New option.
10256
177cce46
MP
102572014-08-19 Marek Polacek <polacek@redhat.com>
10258
10259 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
10260 to warn_c90_c99_compat.
10261 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
10262 to -1.
10263
6ae9194f
MLI
102642014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
10265 Steven Bosscher <steven@gcc.gnu.org>
10266
10267 PR c/52952
10268 * c-format.c: Add extra_arg_loc and format_string_loc to struct
10269 format_check_results.
10270 (check_function_format): Use true and add comment for boolean
10271 argument.
10272 (finish_dollar_format_checking): Use explicit location when warning.
10273 (check_format_info): Likewise.
10274 (check_format_arg): Set extra_arg_loc and format_string_loc.
10275 (check_format_info_main): Use explicit location when warning.
10276 (check_format_types): Pass explicit location.
10277 (format_type_warning): Likewise.
10278
8e54f6d3
MLI
102792014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10280
10281 PR fortran/44054
10282 * c-format.c: Handle Fortran flags.
10283
cd4e76fc
IZ
102842014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
10285
10286 PR other/61962
10287 * array-notation-common.c (find_rank): Added handling for other
10288 types of references.
10289
f3bede71
MP
102902014-08-10 Marek Polacek <polacek@redhat.com>
10291
10292 PR c/51849
10293 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
10294 * c.opt (Wc90-c99-compat): Add option.
10295
9f25a338
TS
102962014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10297
10298 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
10299
62e4eb35
MP
103002014-08-03 Marek Polacek <polacek@redhat.com>
10301
ab20d992 10302 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
10303 (c_add_case_label): Pass loc to check_case_value.
10304
b787e7a2
TS
103052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10306
10307 * cilk.c: Use hash_map instead of pointer_map.
10308
6e2830c3
TS
103092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10310
10311 * c-gimplify.c: Use hash_set instead of pointer_set.
10312
a7ee52fb
IZ
103132014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10314
10315 PR middle-end/61455
10316 * array-notation-common.c (extract_array_notation_exprs): Handling
10317 of DECL_EXPR added.
10318
944fa280
JJ
103192014-08-01 Jakub Jelinek <jakub@redhat.com>
10320
10321 * c-common.h (min_align_of_type): Removed prototype.
10322 * c-common.c (min_align_of_type): Removed.
10323 * c-ubsan.h (ubsan_maybe_instrument_reference,
10324 ubsan_maybe_instrument_member_call): New prototypes.
10325 * c-ubsan.c: Include stor-layout.h and builtins.h.
10326 (ubsan_maybe_instrument_reference_or_call,
10327 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
10328 functions.
10329
b4dfdc11
MG
103302014-07-31 Marc Glisse <marc.glisse@inria.fr>
10331
10332 PR c++/60517
10333 * c.opt (-Wreturn-local-addr): Move to common.opt.
10334
a41844e5
JM
103352014-07-30 Jason Merrill <jason@redhat.com>
10336
10337 PR c++/61659
10338 PR c++/61687
10339 Revert:
10340 * c.opt (-fuse-all-virtuals): New.
10341
976d5a22
TT
103422014-07-30 Tom Tromey <tromey@redhat.com>
10343
10344 PR c/59855
10345 * c.opt (Wdesignated-init): New option.
10346 * c-common.c (c_common_attribute_table): Add "designated_init".
10347 (handle_designated_init): New function.
10348
cdc94aca
MP
103492014-07-24 Marek Polacek <polacek@redhat.com>
10350
10351 PR c/57653
10352 * c-opts.c (c_finish_options): If -imacros is in effect, return.
10353
f41373b6
DS
103542014-07-16 Dodji Seketeli <dodji@redhat.com>
10355
10356 PR preprocessor/60723 - missing system-ness marks for macro tokens
10357 * c-ppoutput.c (struct print::prev_was_system_token): New data
10358 member.
10359 (init_pp_output): Initialize it.
10360 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
10361 (do_line_change): Return a flag saying if a line marker was
10362 emitted or not.
10363 (scan_translation_unit): Detect if the system-ness of the token we
10364 are about to emit is different from the one of the previously
10365 emitted token. If so, emit a line marker. Avoid emitting useless
10366 adjacent line markers. Avoid emitting line markers for tokens
10367 originating from the expansion of built-in macros.
10368 (scan_translation_unit_directives_only): Adjust.
10369
4d661eaa
MP
103702014-07-15 Marek Polacek <polacek@redhat.com>
10371
10372 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10373 TYPE_MAX_VALUE is NULL.
10374
b108f48f
JJ
103752014-07-14 Jakub Jelinek <jakub@redhat.com>
10376
10377 PR middle-end/61294
10378 * c.opt (Wmemset-transposed-args): New warning.
10379
c0221884
JM
103802014-07-10 Jason Merrill <jason@redhat.com>
10381
10382 PR c++/61659
10383 PR c++/61687
10384 * c.opt (-fuse-all-virtuals): New.
10385
63dfbb95
RB
103862014-07-09 Richard Biener <rguenther@suse.de>
10387
10388 PR c-family/61741
10389 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10390 using unsigned arithmetic if overflow does not wrap instead of
10391 if overflow is undefined.
10392
773ec47f
MP
103932014-07-06 Marek Polacek <polacek@redhat.com>
10394
10395 PR c/6940
10396 * c.opt (Wsizeof-array-argument): New option.
10397
00a7ba58
JJ
103982014-07-03 Jakub Jelinek <jakub@redhat.com>
10399
b1726d6c 10400 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10401 comments->count <= 1, as comments->entries might be NULL.
10402
52ec0ea3
MP
104032014-07-01 Marek Polacek <polacek@redhat.com>
10404
10405 * c.opt (Wint-conversion): New option.
10406
d5c3d343
MP
104072014-07-01 Marek Polacek <polacek@redhat.com>
10408
10409 PR c/58286
10410 * c.opt (Wincompatible-pointer-types): New option.
10411
6e7ceb17
PC
104122014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10413
10414 PR c++/51400
10415 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10416 Do not discard TYPE_QUALS of type.
10417
da73100b
JM
104182014-06-26 Jason Merrill <jason@redhat.com>
10419
10420 * c-common.h (enum cxx_dialect): Add cxx1z.
10421 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10422 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10423
08eedf75
TJ
104242014-06-26 Teresa Johnson <tejohnson@google.com>
10425
10426 * c-common.h (get_dump_info): Declare.
10427 * c-gimplify.c (c_genericize): Use saved dump files.
10428 * c-opts.c (c_common_parse_file): Begin and end dumps
10429 once around parsing invocation.
10430 (get_dump_info): New function.
10431
7b56b2f8
MP
104322014-06-23 Marek Polacek <polacek@redhat.com>
10433 Andrew MacLeod <amacleod@redhat.com>
10434
10435 PR c/61553
10436 * c-common.c (get_atomic_generic_size): Don't segfault if the
10437 type doesn't have a size.
10438
0e37a2f3
MP
104392014-06-20 Marek Polacek <polacek@redhat.com>
10440
10441 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10442 (ubsan_walk_array_refs_r): New function.
10443 (c_genericize): Instrument array bounds.
10444 * c-ubsan.c: Include "internal-fn.h".
10445 (ubsan_instrument_division): Mark instrumented arrays as having
10446 side effects. Adjust ubsan_type_descriptor call.
10447 (ubsan_instrument_shift): Likewise.
10448 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10449 (ubsan_instrument_bounds): New function.
10450 (ubsan_array_ref_instrumented_p): New function.
10451 (ubsan_maybe_instrument_array_ref): New function.
10452 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10453 (ubsan_array_ref_instrumented_p): Declare.
10454 (ubsan_maybe_instrument_array_ref): Declare.
10455
104562014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10457
10458 PR lto/61123
10459 * c.opt (fshort-enums): Add to LTO.
10460 * c.opt (fshort-wchar): Likewise.
10461
5c3d09f7
MP
104622014-06-16 Marek Polacek <polacek@redhat.com>
10463
10464 PR c/60439
10465 * c.opt (Wswitch-bool): Add Var.
10466
9cf32741
JJ
104672014-06-12 Jakub Jelinek <jakub@redhat.com>
10468
10469 PR middle-end/61486
10470 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10471 #pragma omp target teams or
10472 #pragma omp {,target }teams distribute simd.
10473
62984918
JM
104742014-06-12 Jason Merrill <jason@redhat.com>
10475
10476 * c.opt (Wabi=, fabi-compat-version): New.
10477 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10478 (c_common_post_options): Handle flag_abi_compat_version default.
10479 Disallow -fabi-compat-version=1.
10480 * c-common.h (abi_version_crosses): New.
10481
f961457f
JH
104822014-06-11 Jan Hubicka <hubicka@ucw.cz>
10483
adfac8df 10484 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10485 section names that are no longer trees.
10486
92d28cbb
JJ
104872014-06-10 Jakub Jelinek <jakub@redhat.com>
10488
10489 PR fortran/60928
10490 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10491 (omp_pragmas): ... back here.
10492
742938c9
MP
104932014-06-05 Marek Polacek <polacek@redhat.com>
10494
10495 PR c/49706
10496 * c-common.c (warn_logical_not_parentheses): New function.
10497 * c-common.h (warn_logical_not_parentheses): Declare.
10498 * c.opt (Wlogical-not-parentheses): New option.
10499
9d548dfb
MP
105002014-06-04 Marek Polacek <polacek@redhat.com>
10501
10502 PR c/30020
10503 * c-common.c (check_case_bounds): Add location parameter.
10504 Use it.
10505 (c_add_case_label): Pass loc to check_case_bounds.
10506
fedfecef
MP
105072014-06-03 Marek Polacek <polacek@redhat.com>
10508
10509 PR c/60439
10510 * c.opt (Wswitch-bool): New option.
10511
f6a7cffc
TS
105122014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10513
040d18b6
TS
10514 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10515 Remove prototypes.
10516 (record_types_used_by_current_var_decl): Move prototype to where
10517 it belongs.
10518
f6a7cffc
TS
10519 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10520 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10521 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10522
632f2871
RS
105232014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10524
10525 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10526 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10527 void_zero_node.
10528 * c-pretty-print.c (pp_c_void_constant): New function.
10529 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10530 (c_pretty_printer::expression): Handle VOID_CST.
10531 * cilk.c (extract_free_variables): Likewise.
10532 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10533 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10534
766090c2
TS
105352014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10536
10537 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10538 * c-pragma.c (push_alignment): Adjust.
10539 (handle_pragma_push_options): Likewise.
10540
661a0813
MP
105412014-05-09 Marek Polacek <polacek@redhat.com>
10542
10543 PR c/50459
10544 * c-common.c (check_user_alignment): Return -1 if alignment is error
10545 node.
10546 (handle_aligned_attribute): Don't call default_conversion on
10547 FUNCTION_DECLs.
10548 (handle_vector_size_attribute): Likewise.
10549 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10550 (handle_sentinel_attribute): Call default_conversion and allow even
10551 integral types as an argument.
10552
2793eeab
MP
105532014-05-08 Marek Polacek <polacek@redhat.com>
10554
10555 PR c/61053
10556 * c-common.c (min_align_of_type): New function factored out from...
10557 (c_sizeof_or_alignof_type): ...here.
10558 * c-common.h (min_align_of_type): Declare.
10559
f827930a
MP
105602014-05-08 Marek Polacek <polacek@redhat.com>
10561
10562 PR c/61077
10563 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10564 parameter type of main.
10565
ca49b74e
DD
105662014-05-07 DJ Delorie <dj@redhat.com>
10567
10568 * c-cppbuiltin.c (print_bits_of_hex): New.
10569 (builtin_define_type_minmax): Print values using hex so as not to
10570 require a pre-computed list of string values.
10571
1d60af08
KZ
105722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10573 Mike Stump <mikestump@comcast.net>
10574 Richard Sandiford <rdsandiford@googlemail.com>
10575
10576 * c-ada-spec.c: Include wide-int.h.
10577 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10578 (dump_generic_ada_node): Use wide-int interfaces.
10579 * c-common.c: Include wide-int-print.h.
10580 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10581 (pointer_int_sum): Use wide-int interfaces.
10582 (c_common_nodes_and_builtins): Use make_int_cst.
10583 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10584 (handle_alloc_size_attribute): Use wide-int interfaces.
10585 (get_nonnull_operand): Likewise.
10586 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10587 * c-lex.c: Include wide-int.h.
10588 (narrowest_unsigned_type): Take a widest_int rather than two
10589 HOST_WIDE_INTs.
10590 (narrowest_signed_type): Likewise.
10591 (interpret_integer): Update accordingly. Use wide-int interfaces.
10592 (lex_charconst): Use wide-int interfaces.
10593 * c-pretty-print.c: Include wide-int.h.
10594 (pp_c_integer_constant): Use wide-int interfaces.
10595 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10596 INT_CST_LT_UNSIGNED.
10597
b15458be
RB
105982014-05-06 Richard Biener <rguenther@suse.de>
10599
10600 * c-opts.c (c_common_post_options): For -freestanding,
10601 -fno-hosted and -fno-builtin disable pattern recognition
10602 if not enabled explicitely.
10603
6577374e
MP
106042014-05-02 Marek Polacek <polacek@redhat.com>
10605
10606 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10607
d00887e8
MP
106082014-05-01 Marek Polacek <polacek@redhat.com>
10609
10610 PR c/43245
10611 * c.opt (Wdiscarded-qualifiers): Add.
10612
f8ed5150
MP
106132014-04-30 Marek Polacek <polacek@redhat.com>
10614
10615 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10616 INT_MIN / -1 sanitization only for integer types.
10617
45484dcf
MP
106182014-04-25 Marek Polacek <polacek@redhat.com>
10619
10620 PR c/18079
10621 * c-common.c (handle_noinline_attribute): Warn if the attribute
10622 conflicts with always_inline attribute.
10623 (handle_always_inline_attribute): Warn if the attribute conflicts
10624 with noinline attribute.
10625
38e514c0
MP
106262014-04-25 Marek Polacek <polacek@redhat.com>
10627
10628 PR c/60156
10629 * c-common.c (check_main_parameter_types): Warn about variadic main.
10630
44875f92
MS
106312014-04-24 Mike Stump <mikestump@comcast.net>
10632
10633 * c.opt (Wshadow-ivar): Default to on.
10634
dcaaa5a0
DP
106352014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10636
10637 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10638
c07d7c02
MP
106392014-04-23 Marek Polacek <polacek@redhat.com>
10640
10641 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10642
1c33c9b7
JJ
106432014-04-22 Jakub Jelinek <jakub@redhat.com>
10644
10645 PR sanitizer/60275
10646 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10647 if flag_sanitize_undefined_trap_on_error.
10648 (ubsan_instrument_division, ubsan_instrument_shift,
10649 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10650 if !flag_sanitize_recover.
10651
793c625f
MG
106522014-04-22 Marc Glisse <marc.glisse@inria.fr>
10653
10654 PR libstdc++/43622
10655 * c-common.c (registered_builtin_types): Make non-static.
10656 * c-common.h (registered_builtin_types): Declare.
10657
b0f1bf36 106582014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10659 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10660
10661 PR c/60819
10662 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10663 apply may-alias the scalar pointer type when applicable.
10664
3b07fa4a
IZ
106652014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10666
10667 PR middle-end/60467
10668 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10669 as possible argument for Cilk_spawn.
10670
cbbd2b1c
TB
106712014-04-11 Tobias Burnus <burnus@net-b.de>
10672
10673 PR c/60194
10674 * c.opt (Wformat-signedness): Add
10675 * c-format.c(check_format_types): Use it.
10676
6415bd5d
JM
106772014-04-11 Jason Merrill <jason@redhat.com>
10678
10679 PR c++/57926
10680 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10681 default_conversion for an array argument.
10682
6525783a
MP
106832014-04-08 Marek Polacek <polacek@redhat.com>
10684
10685 PR sanitizer/60745
10686 * c-ubsan.c: Include asan.h.
10687 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10688
880a467b
NS
106892014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10690
10691 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10692
7b59ff2d
MP
106932014-04-02 Marek Polacek <polacek@redhat.com>
10694
10695 * c-common.h (c_expand_expr): Remove declaration.
10696
8edbfaa6
JJ
106972014-03-28 Jakub Jelinek <jakub@redhat.com>
10698
10699 PR c++/60689
10700 * c-common.c (add_atomic_size_parameter): When creating new
10701 params vector, push the size argument first.
10702
07d72e1d
JJ
107032014-03-26 Jakub Jelinek <jakub@redhat.com>
10704
10705 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10706 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10707 ubsan_create_data callers.
10708
b35e0fa0
JJ
107092014-03-22 Jakub Jelinek <jakub@redhat.com>
10710
10711 PR debug/60603
10712 * c-opts.c (c_finish_options): Restore cb_file_change call to
10713 <built-in>.
10714
39a1ebb3
JJ
107152014-03-13 Jakub Jelinek <jakub@redhat.com>
10716
10717 PR middle-end/36282
10718 * c-pragma.c (apply_pragma_weak): Only look at
10719 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10720 DECL_ASSEMBLER_NAME_SET_P (decl).
10721 (maybe_apply_pending_pragma_weaks): Exit early if
10722 vec_safe_is_empty (pending_weaks) rather than only when
10723 !pending_weaks.
10724 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10725 set assembler name back to NULL afterwards.
10726
a07f6ed2
JM
107272014-03-11 Jason Merrill <jason@redhat.com>
10728
10729 * c.opt: Add -std=gnu++14.
10730
75b107f5
IB
107312014-03-11 Ian Bolton <ian.bolton@arm.com>
10732
10733 * c-opts.c (c_common_post_options): Don't override
10734 -ffp-contract=fast if unsafe-math-optimizations is on.
10735
f42c637e
PM
107362014-03-08 Paulo Matos <paulo@matos-sorge.com>
10737
22b15758 10738 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10739
70e24808
JM
107402014-03-07 Jason Merrill <jason@redhat.com>
10741
10742 * c.opt: Add -std=c++14.
10743
3af9c5e9
MP
107442014-03-06 Marek Polacek <polacek@redhat.com>
10745
10746 PR c/60197
10747 * cilk.c (contains_cilk_spawn_stmt): New function.
10748 (contains_cilk_spawn_stmt_walker): Likewise.
10749 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10750 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10751
b3bdf019
JJ
107522014-03-03 Jakub Jelinek <jakub@redhat.com>
10753
10754 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10755 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10756 even when flag_preprocess_only.
10757
ca7e759d
JM
107582014-02-26 Jason Merrill <jason@redhat.com>
10759
10760 PR c++/59231
10761 PR c++/11586
10762 * c-common.c (shorten_compare): Don't check
10763 c_inhibit_evaluation_warnings.
10764
28e41874
JJ
107652014-02-19 Jakub Jelinek <jakub@redhat.com>
10766
cca615af
JJ
10767 PR c/37743
10768 * c-common.c (c_common_nodes_and_builtins): When initializing
10769 c_uint{16,32,64}_type_node, also set corresponding
10770 uint{16,32,64}_type_node to the same value.
10771
28e41874
JJ
10772 PR c++/60267
10773 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10774 for PRAGMA_IVDEP if flag_preprocess_only.
10775
c2bf53a1
JJ
107762014-02-12 Jakub Jelinek <jakub@redhat.com>
10777
10778 PR c/60101
10779 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10780 if false, add ADD itself, rather than vice versa.
10781 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10782 copy. For SAVE_EXPR, only call merge_tlist once.
10783
8fcbce72
JJ
107842014-02-08 Jakub Jelinek <jakub@redhat.com>
10785
10786 PR middle-end/60092
10787 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10788 and tree_to_uhwi.
10789 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10790 functions.
10791 (c_common_attribute_table): Add alloc_align and assume_aligned
10792 attributes.
10793
0a756a3f
MP
107942014-02-06 Marek Polacek <polacek@redhat.com>
10795
10796 PR c/60087
10797 * c-common.c (warn_for_sign_compare): Call warning_at with location
10798 instead of warning.
10799
7ec4847a
MP
108002014-02-05 Marek Polacek <polacek@redhat.com>
10801
10802 PR c/53123
10803 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10804 statement.
10805
66f20604
MP
108062014-02-04 Marek Polacek <polacek@redhat.com>
10807
10808 PR c/60036
10809 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10810 SAVE_EXPR.
10811
5d77fb19
MG
108122014-02-03 Marc Glisse <marc.glisse@inria.fr>
10813
10814 PR c++/53017
10815 PR c++/59211
10816 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10817 handle_vector_size_attribute, handle_nonnull_attribute): Call
10818 default_conversion on the attribute argument.
10819 (handle_nonnull_attribute): Increment the argument number.
10820
81e5eca8
MP
108212014-01-31 Marek Polacek <polacek@redhat.com>
10822
10823 PR c/59963
10824 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10825 build_function_call_vec.
10826 (resolve_overloaded_builtin): Likewise.
10827 * c-common.h (build_function_call_vec): Adjust declaration.
10828
68fca595
MP
108292014-01-30 Marek Polacek <polacek@redhat.com>
10830
10831 PR c/59940
10832 * c-common.h (unsafe_conversion_p): Adjust declaration.
10833 (warnings_for_convert_and_check): Likewise.
10834 (convert_and_check): Likewise.
10835 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10836 expansion_point_location_if_in_system_header on it.
10837 (warnings_for_convert_and_check): Add location parameter. Call
10838 expansion_point_location_if_in_system_header on it. Use it.
10839 (convert_and_check): Add location parameter. Use it.
10840 (conversion_warning): Likewise.
10841 (c_add_case_label): Adjust convert_and_check calls.
10842 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10843
b72271b9
BI
108442014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10845
10846 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10847 flag_cilkplus.
10848 * c-pragma.c (init_pragma): Likewise.
10849 * c.opt: Likewise.
10850
393e8e8b
MP
108512014-01-23 Marek Polacek <polacek@redhat.com>
10852
10853 PR c/59846
10854 * c-common.c (shorten_compare): Add location_t parameter.
10855 * c-common.h (shorten_binary_op): Adjust declaration.
10856
f04dda30
MP
108572014-01-23 Marek Polacek <polacek@redhat.com>
10858
10859 PR c/58346
10860 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10861 * c-common.h: Declare it.
10862
621955cb
EB
108632014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10864
10865 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10866 * c-ada-spec.c (dump_ads): Likewise.
10867 (cpp_check): Likewise.
10868 (dump_ada_specs): Likewise.
10869
108702014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10871
10872 PR c++/49718
10873 * c-common.c (handle_no_instrument_function_attribute): Allow
10874 no_instrument_function attribute in class member
10875 definition/declaration.
10876
241f845a
JJ
108772014-01-15 Jakub Jelinek <jakub@redhat.com>
10878
10879 PR c/58943
10880 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10881 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10882 being COMPOUND_EXPR.
10883 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10884 operand a SAVE_EXPR and second MODIFY_EXPR.
10885
e83b8e2e
JJ
108862014-01-09 Jakub Jelinek <jakub@redhat.com>
10887
10888 PR target/58115
10889 * c-pch.c (c_common_write_pch): Call
10890 prepare_target_option_nodes_for_pch.
10891
23a5b65a
RS
108922014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10893
10894 Update copyright years
10895
f9030485
RS
108962014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10897
10898 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10899 the copyright notice.
10900
f2aa696b
EB
109012013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10902
10903 * c-ada-spec.c (print_constructor): New function.
10904 (print_destructor): Retrieve the origin of the destructor.
10905 (print_ada_declaration): Revamp handling of constructors/destructors.
10906
3f8257db 109072013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10908 Bill Maddox <maddox@google.com>
10909 Jason Merrill <jason@redhat.com>
10910
10911 * c.opt: Add -fdeclone-ctor-dtor.
10912 * c-opts.c (c_common_post_options): Default to on iff -Os.
10913
41958c28
BI
109142013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10915
10916 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10917 attribute.
10918 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10919 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10920 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10921 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10922 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10923 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10924 PRAGMA_CILK_CLAUSE_UNIFORM.
10925
b1726d6c 10926
12893402
BI
109272013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10928
10929 * cilk.c (cilk_outline): Made this function non-static.
10930 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10931 (create_cilk_wrapper): Added a new parameter: a function pointer.
10932 (c_install_body_w_frame_cleanup): Remove
10933 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10934 * c-common.h (cilk_outline): New prototype.
10935 (gimplify_cilk_spawn): Removed two parameters.
10936 (cilk_install_body_with_frame_cleanup): New prototype.
10937 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10938 CILK_SPAWN_STMT case.
10939
085b42ed
BS
109402013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10941
2ce064c3
BS
10942 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10943
085b42ed
BS
10944 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10945 (int_array_type_node): Remove.
10946 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10947
9e36c9ed
MP
109482013-12-05 Marek Polacek <polacek@redhat.com>
10949
10950 PR c/52023
10951 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10952 [ADJUST_FIELD_ALIGN].
10953
296674db
JM
109542013-12-04 Joseph Myers <joseph@codesourcery.com>
10955
10956 PR c/52023
10957 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10958 and check field alignment if set.
10959 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10960 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10961
b1726d6c 109622013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10963 Marek Polacek <polacek@redhat.com>
10964
10965 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10966 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10967
d7947e19
L
109682013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10969
10970 PR c/59309
10971 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10972 arguments.
10973
fad7652e
JJ
109742013-11-29 Jakub Jelinek <jakub@redhat.com>
10975
10976 PR c/59280
10977 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10978 goto invalid. If it is error_mark_node, don't issue further
10979 diagnostics.
10980
8b5e1202
SO
109812013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10982
10983 * c.opt (Wopenmp-simd): New.
10984
0a508bb6
JJ
109852013-11-22 Jakub Jelinek <jakub@redhat.com>
10986
10987 * c-ubsan.h (ubsan_instrument_return): New prototype.
10988 * c-ubsan.c (ubsan_instrument_return): New function.
10989
2fb9a547
AM
109902013-11-22 Andrew MacLeod <amacleod@redhat.com>
10991
10992 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10993 * c-gimplify.c: Likewise.
10994 * cilk.c: Likewise.
2fb9a547 10995
8400e75e
DM
109962013-11-22 David Malcolm <dmalcolm@redhat.com>
10997
10998 * c-common.c (unsafe_conversion_p): Remove use of
10999 EXPR_LOC_OR_HERE macro.
11000 (conversion_warning): Likewise.
11001 (warnings_for_convert_and_check): Likewise.
11002 (warn_for_collisions_1): Likewise.
11003 (shorten_compare): Likewise, and remove use of in_system_header
11004 macro, using the location from the former.
11005 * c-lex.c (dump_one_header): Remove use of input_filename macro.
11006 (cb_def_pragma): Remove use of in_system_header macro.
11007 (lex_string): Likewise.
11008 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11009
eb1ce453
KZ
110102013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
11011 Mike Stump <mikestump@comcast.net>
11012 Richard Sandiford <rdsandiford@googlemail.com>
11013
11014 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
11015 instead of TREE_INT_CST_LOW, in cases where there is a protecting
11016 tree_fits_shwi_p or tree_fits_uhwi_p.
11017 (dump_generic_ada_node): Likewise.
11018 * c-format.c (check_format_arg): Likewise.
11019 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11020
6b3b8c27
KZ
110212013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
11022
11023 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
11024
49b0aa18
JC
110252013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
11026
11027 PR c/53001
11028 * c-common.c (unsafe_conversion_p): Make this function
11029 return an enumeration with more detail.
11030 (conversion_warning): Use the new return type of
11031 unsafe_conversion_p to separately warn either about conversions
11032 that lower floating point number precision or about the other
11033 kinds of conversions.
11034 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
11035 (unsafe_conversion_p): switching return type to
11036 conversion_safety enumeration.
49b0aa18
JC
11037 * c.opt: Adding new warning -Wfloat-conversion and
11038 enabling it with -Wconversion.
11039
b826515a
BS
110402013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
11041
8e745a17
JJ
11042 * c-opts.c: Include plugin.h.
11043 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 11044
b9a55b13
MP
110452013-11-19 Marek Polacek <polacek@redhat.com>
11046
11047 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
11048 call.
11049 (ubsan_instrument_shift): Likewise.
11050 (ubsan_instrument_vla): Likewise.
11051
7d362f6c
RS
110522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11053
11054 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
11055 cast to unsigned type.
11056
386b1f1f
RS
110572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11058
11059 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
11060 tree_low_cst.
11061 (complete_array_type): Update comment to refer to tree_to_[su]hwi
11062 rather than tree_low_cst.
11063
ae7e9ddd
RS
110642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11065
11066 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
11067 tree_to_uhwi throughout.
11068
9439e9a1
RS
110692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11070
11071 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
11072 tree_low_cst (..., 0) with tree_to_shwi throughout.
11073
cc269bb6
RS
110742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11075
11076 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
11077 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
11078
9541ffee
RS
110792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
11080
11081 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
11082 host_integerp (..., 0) with tree_fits_shwi_p throughout.
11083
c02065fc
AH
110842013-11-15 Aldy Hernandez <aldyh@redhat.com>
11085
11086 * c-cilkplus.c: New file.
11087 * c-common.c (readonly_error): Add location argument.
11088 * c-common.h (readonly_error): Same.
11089 (c_finish_cilk_clauses): Protoize.
11090 (c_check_cilk_loop): Same.
11091 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
11092 Do not fail on error_mark_node.
11093 Abstract increment canonicalization to here...
11094 (c_omp_for_incr_canonicalize_ptr): New.
11095 c-pragma.c (init_pragma): Register "simd" pragma.
11096 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
11097 (enum pragma_cilk_clause): New.
11098
9cc65f15
RS
110992013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
11100
11101 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
11102 wchar_type and host_integerp checks.
11103
18f429e2
AM
111042013-11-14 Andrew MacLeod <amacleod@redhat.com>
11105
11106 * c-common.c: Likewise.
11107 * c-gimplify.c: Likewise.
11108 * cilk.c: Likewise.
11109
d8a2d370
DN
111102013-11-14 Diego Novillo <dnovillo@google.com>
11111
11112 * c-common.c: Include fold-const.h.
11113 Include stor-layout.h.
11114 Include calls.h.
11115 Include stringpool.h.
11116 Include attribs.h.
11117 Include varasm.h.
11118 Include trans-mem.h.
11119 * c-cppbuiltin.c: Include stor-layout.h.
11120 Include stringpool.h.
11121 * c-format.c: Include stringpool.h.
11122 * c-lex.c: Include stringpool.h.
11123 Include stor-layout.h.
11124 * c-pragma.c: Include stringpool.h.
11125 Include attribs.h.
11126 Include varasm.h.
11127 Include gcc-symtab.h.
11128 * c-pretty-print.c: Include stor-layout.h.
11129 Include attribs.h.
11130 * cilk.c: Include stringpool.h.
11131 Include calls.h.
11132
38b7bc7f
JM
111332013-11-13 Joseph Myers <joseph@codesourcery.com>
11134
11135 * c-common.h (enum rid): Add RID_AUTO_TYPE.
11136 * c-common.c (c_common_reswords): Add __auto_type.
11137 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
11138
45b0be94
AM
111392013-11-12 Andrew MacLeod <amacleod@redhat.com>
11140
18f429e2
AM
11141 * c-common.c: Include gimplify.h.
11142 * c-gimplify.c: Likewise.
11143 * cilk.c: Likewise.
11144 * c-omp.c: Include gimple-expr.h instead of gimple.h.
11145 * c-ubsan.c: Don't include gimple.h.
45b0be94 11146
582d9b50
JM
111472013-11-12 Joseph Myers <joseph@codesourcery.com>
11148
11149 * c-common.c (c_common_reswords): Add _Thread_local.
11150
6b28e197
JM
111512013-11-09 Joseph Myers <joseph@codesourcery.com>
11152
11153 * c-common.c (atomic_size_supported_p): New function.
11154 (resolve_overloaded_atomic_exchange)
11155 (resolve_overloaded_atomic_compare_exchange)
11156 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
11157 Use it instead of comparing size with a local list of sizes.
11158
267bac10
JM
111592013-11-07 Andrew MacLeod <amacleod@redhat.com>
11160 Joseph Myers <joseph@codesourcery.com>
11161
11162 * c-common.h (enum rid): Add RID_ATOMIC.
11163 * c-common.c (c_common_reswords): Add _Atomic.
11164 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
11165 (keyword_is_type_qualifier): Accept RID_ATOMIC.
11166 * c-format.c (check_format_types): Check for extra _Atomic
11167 qualifiers in format argument.
11168 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
11169 (pp_c_type_qualifier_list): Mention _Atomic in comment.
11170
5157b91e
TB
111712013-11-06 Tobias Burnus <burnus@net-b.de>
11172
11173 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
11174
6dbe0958
JM
111752013-11-06 Joseph Myers <joseph@codesourcery.com>
11176
11177 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
11178 standards modes.
11179 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
11180 to mean lack of IEEE 754 support.
11181
e8ff5196
TB
111822013-11-05 Tobias Burnus <burnus@net-b.de>
11183
11184 * c.opt (-Wdate-time): New option
11185 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
11186
254a0760
JM
111872013-11-05 Joseph Myers <joseph@codesourcery.com>
11188
11189 * c-cppbuiltin.c (cpp_iec_559_value): Test
11190 flag_excess_precision_cmdline not flag_excess_precision.
11191
6d7f7e0a
TB
111922013-11-05 Tobias Burnus <burnus@net-b.de>
11193
11194 * c.opt (fopenmp-simd): New option.
11195 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
11196 (omp_pragmas): ... this new struct.
11197 (c_pp_lookup_pragma): Also walk omp_pragmas.
11198 (init_pragma): Init pragmas for -fopenmp-simd.
11199
55a7f02f
MP
112002013-11-04 Marek Polacek <polacek@redhat.com>
11201
11202 PR c++/58979
11203 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
11204
9193fb05
JM
112052013-11-04 Joseph Myers <joseph@codesourcery.com>
11206
11207 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
11208 New functions.
11209 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
11210
94159ecf
EB
112112013-11-04 Eric Botcazou <ebotcazou@adacore.com>
11212
11213 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
11214 (dump_ada_specs): Adjust prototype of second callback.
11215 * c-ada-spec.c (cpp_check): New global variable.
11216 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
11217 (print_generic_ada_decl): Likewise.
11218 (has_static_fields): Change return type to bool and add guard.
11219 (has_nontrivial_methods): New predicate.
11220 (is_tagged_type): Change return type to bool.
11221 (separate_class_package): Call has_nontrivial_methods.
11222 (pp_ada_tree_identifier): Minor tweaks.
11223 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
11224 (dump_ada_array_domains): Likewise.
11225 (dump_ada_array_type): Likewise.
11226 (dump_template_types): Remove cpp_check parameter and do not pass it to
11227 dump_generic_ada_node.
11228 (dump_ada_template): Likewise.
11229 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
11230 recursively.
11231 (print_ada_methods): Change return type to integer. Remove cpp_check
11232 parameter and do not pass it down.
11233 (dump_nested_types): Remove cpp_check parameter and do not pass it to
11234 dump_generic_ada_node.
11235 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
11236 accessing methods.
11237 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
11238 down. Use has_nontrivial_methods to recognize C++ classes. Use return
11239 value of print_ada_methods.
11240 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
11241 Set cpp_check to it before invoking dump_ada_nodes.
11242 (dump_ada_specs): Likewise.
11243
b906f4ca
MP
112442013-11-03 Marek Polacek <polacek@redhat.com>
11245
11246 * c-ubsan.c: Don't include hash-table.h.
11247 (ubsan_instrument_vla): New function.
11248 * c-ubsan.h: Declare it.
11249
5e20cdc9
DM
112502013-10-31 David Malcolm <dmalcolm@redhat.com>
11251
11252 Automated part of renaming of symtab_node_base to symtab_node.
11253
11254 Patch autogenerated by rename_symtab.py from
11255 https://github.com/davidmalcolm/gcc-refactoring-scripts
11256 revision 58bb219cc090b2f4516a9297d868c245495ee622
11257
11258 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
11259 symtab_node_base to symtab_node.
11260
7057e645
ESR
112612013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
11262
8e745a17 11263 Implement C++14 digit separators.
7057e645
ESR
11264 * c-lex.c (interpret_float): Remove digit separators from scratch string
11265 before building real literal.
11266
193ea7bc
JJ
112672013-10-30 Jakub Jelinek <jakub@redhat.com>
11268
11269 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
11270
939b37da
BI
112712013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11272
11273 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
11274 fields.
11275 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
11276 enabled.
11277 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
11278 (insert_cilk_frame): New prototype.
11279 (cilk_init_builtins): Likewise.
11280 (gimplify_cilk_spawn): Likewise.
11281 (c_cilk_install_body_w_frame_cleanup): Likewise.
11282 (cilk_detect_spawn_and_unwrap): Likewise.
11283 (cilk_set_spawn_marker): Likewise.
11284 (build_cilk_sync): Likewise.
11285 (build_cilk_spawn): Likewise.
11286 * cilk.c: New file.
11287
67348ccc
DM
112882013-10-29 David Malcolm <dmalcolm@redhat.com>
11289
11290 Patch autogenerated by refactor_symtab.py from
11291 https://github.com/davidmalcolm/gcc-refactoring-scripts
11292 revision 58bb219cc090b2f4516a9297d868c245495ee622
11293
11294 * c-gimplify.c (c_genericize): Update for conversion of symtab types
11295 to a true class hierarchy.
11296 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
11297
d570872d
RS
112982013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
11299
11300 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
11301
98906124
JL
113022013-10-26 Jeff Law <law@redhat.com>
11303
adfac8df
JJ
11304 * c-common.c (c_define_builtins): Remove mudflap support.
11305 * c.opt: Ignore and warn for mudflap options.
98906124 11306
d73749df 113072013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
11308
11309 PR other/33426
11310 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
11311 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
11312
3f04b1bb
JM
113132013-10-23 Jason Merrill <jason@redhat.com>
11314
11315 * c-format.c (gcc_cxxdiag_char_table): Add %X.
11316
acf0174b
JJ
113172013-10-11 Jakub Jelinek <jakub@redhat.com>
11318
acd15a28
JJ
11319 * c-common.h (omp_clause_mask::operator !=): New method.
11320 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
11321 instead of if (mask & something) tests everywhere.
11322
acf0174b
JJ
11323 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
11324 201307 instead of 201107.
11325 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
11326 (c_common_attribute_table): Add "omp declare target" and
11327 "omp declare simd" attributes.
11328 (handle_omp_declare_target_attribute,
11329 handle_omp_declare_simd_attribute): New functions.
11330 * c-omp.c: Include c-pragma.h.
11331 (c_finish_omp_taskgroup): New function.
11332 (c_finish_omp_atomic): Add swapped argument, if true,
11333 build the operation first with rhs, lhs arguments and use NOP_EXPR
11334 build_modify_expr.
11335 (c_finish_omp_for): Add code argument, pass it down to make_code.
11336 (c_omp_split_clauses): New function.
11337 (c_split_parallel_clauses): Removed.
11338 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
11339 c_omp_declare_simd_clauses_to_decls): New functions.
11340 * c-common.h (omp_clause_mask): New type.
11341 (OMP_CLAUSE_MASK_1): Define.
11342 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
11343 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
11344 omp_clause_mask::operator |, omp_clause_mask::operator &,
11345 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
11346 omp_clause_mask::operator ==): New methods.
11347 (enum c_omp_clause_split): New.
11348 (c_finish_omp_taskgroup): New prototype.
11349 (c_finish_omp_atomic): Add swapped argument.
11350 (c_finish_omp_for): Add code argument.
11351 (c_omp_split_clauses): New prototype.
11352 (c_split_parallel_clauses): Removed.
11353 (c_omp_declare_simd_clauses_to_numbers,
11354 c_omp_declare_simd_clauses_to_decls): New prototypes.
11355 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
11356 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
11357 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
11358 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
11359 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
11360 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
11361 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11362 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11363 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11364 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11365 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11366 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11367 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11368 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11369 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11370 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11371 PRAGMA_OMP_CLAUSE_UNIFORM.
11372
826cacfe
MG
113732013-10-09 Marc Glisse <marc.glisse@inria.fr>
11374
11375 PR tree-optimization/20318
11376 * c-common.c (handle_returns_nonnull_attribute): New function.
11377 (c_common_attribute_table): Add returns_nonnull.
11378
2284b034
MG
113792013-10-03 Marc Glisse <marc.glisse@inria.fr>
11380
11381 PR c++/19476
11382 * c.opt (fcheck-new): Move to common.opt.
11383
b56e9788
MP
113842013-09-25 Marek Polacek <polacek@redhat.com>
11385 Jakub Jelinek <jakub@redhat.com>
11386
11387 PR sanitizer/58413
11388 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11389 an expression if we can prove it is correct.
11390 (ubsan_instrument_division): Likewise. Remove unnecessary
11391 check.
11392
ce6923c5
MP
113932013-09-18 Marek Polacek <polacek@redhat.com>
11394
11395 PR sanitizer/58411
11396 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11397 Declare it.
11398 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11399
fb5610fb
IS
114002013-09-14 Iain Sandoe <iain@codesourcery.com>
11401
11402 PR target/48094
11403 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11404 fobjc-gc, freplace-objc-classes): Accept for LTO.
11405
88b0e79e
JC
114062013-09-13 Jacek Caban <jacek@codeweavers.com>
11407
11408 * c-target.def: New hook
11409
c9b0866a
PC
114102013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11411
11412 PR c++/43452
11413 * c.opt (Wdelete-incomplete): Add.
11414
0af94e6f
JR
114152013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11416
11417 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11418 (vector_types_compatible_elements_p): New function.
11419 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11420 declaration.
11421 (vector_types_compatible_elements_p): Declare.
11422
7c26172c
GDR
114232013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11424
11425 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11426 a virtual member function.
11427 (pp_simple_type_specifier): Remove.
11428 (pp_c_type_specifier): Likewise.
11429 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11430 Rename from pp_c_type_specifier. Adjust.
11431 (c_pretty_printer::c_pretty_printer): Do not assign to
11432 simple_type_specifier.
11433
20059c8b
GDR
114342013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11435
11436 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11437 member function.
11438 (c_pretty_printer::storage_class_specifier): Likewise.
11439 (c_pretty_printer::initializer): Likewise.
11440 (pp_declaration): Remove.
11441 (pp_declaration_specifiers): Likewise.
11442 (pp_abstract_declarator): Likewise.
11443 (pp_declarator): Likewise.
11444 (pp_type_id): Likewise.
11445 (pp_statement): Likewise.
11446 (pp_constant): Likewise.
11447 (pp_id_expression): Likewise.
11448 (pp_primary_expression): Likewise.
11449 (pp_unary_expression): Likewise.
11450 (pp_multiplicative_expression): Likewise.
11451 (pp_conditional_expression): Likewise.
11452 (pp_assignment_expression): Likewise.
11453 (pp_expression): Likewise.
11454 (pp_c_type_id): Likewise.
11455 (pp_c_storage_class_specifier): Likewise.
11456 * c-pretty-print.c (pp_c_type_cast): Tidy.
11457 (pp_c_pointer): Likewise.
11458 (pp_c_type_specifier): Likewise.
11459 (pp_c_parameter_type_list): Likewise.
11460 (pp_c_function_definition): Likewise.
11461 (pp_c_init_declarator): Likewise.
11462 (pp_c_initializer_list): Likewise.
11463 (pp_c_constructor_elts): Likewise.
11464 (c_pretty_printer::direct_abstract_declarator): Likewise.
11465 (c_pretty_printer::declaration_specifiers): Likewise.
11466 (c_pretty_printer::primary_expression): Likewise.
11467 (c_pretty_printer::postfix_expression): Likewise.
11468 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11469 (c_pretty_printer::storage_class_specifier): Rename from
11470 pp_c_storage_class_specifier.
11471 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11472 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11473 storage_class_specifier, initializer, offset_list, flags.
11474
de5a5fa1
MP
114752013-08-30 Marek Polacek <polacek@redhat.com>
11476
11477 * c-ubsan.c: New file.
11478 * c-ubsan.h: New file.
11479
8f0e4d72
GDR
114802013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11481
11482 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11483 member function.
11484 (c_pretty_printer::declaration_specifiers): Likewise.
11485 (c_pretty_printer::declarator): Likewise.
11486 (c_pretty_printer::abstract_declarator): Likewise.
11487 (c_pretty_printer::direct_abstract_declarator): Likewise.
11488 (c_pretty_printer::direct_declarator): Likewise.
11489 (c_pretty_printer::function_specifier): Likewise.
11490 (pp_declaration): Adjust.
11491 (pp_declaration_specifiers): Likewise.
11492 (pp_abstract_declarator): Likewise.
11493 (pp_direct_declarator): Likewise.
11494 (pp_function_specifier): Likewise.
11495 (pp_direct_abstract_declarator): Remove as unused.
11496 (pp_c_declaration): Remove.
11497 (pp_c_declaration_specifiers): Likewise.
11498 (pp_c_declarator): Likewise.
11499 (pp_c_direct_declarator): Likewise.
11500 (pp_c_function_specifier): Likewise.
11501 (pp_c_direct_abstract_declarator): Likewise.
11502 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11503 from pp_c_abstract_declarator. Adjust.
ab20d992 11504 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11505 pp_c_direct_abstract_declarator. Adjust.
11506 (c_pretty_printer::function_specifier): Rename from
11507 pp_c_function_specifier. Adjust.
11508 (c_pretty_printer::declaration_specifiers): Rename from
11509 pp_c_declaration_specifiers. Adjust.
11510 (c_pretty_printer::direct_declarator): Rename from
11511 pp_c_direct_declarator. Adjust.
11512 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11513 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11514 (c_pretty_printer::c_pretty_printer): Do not assign to
11515 declaration, declaration_specifiers, declarator,
11516 direct_declarator, direct_abstract_declarator, function_specifier.
11517
00d34d3a
GDR
115182013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11519
11520 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11521 virtual member function.
11522 (c_pretty_printer::multiplicative_expression): Likewise.
11523 (c_pretty_printer::conditional_expression): Likewise.
11524 (c_pretty_printer::assignment_expression): Likewise.
11525 (c_pretty_printer::expression): Likewise.
11526 (pp_unary_expression): Adjust.
11527 (pp_multiplicative_expression): Likewise.
11528 (pp_assignment_expression): Likewise.
11529 (pp_conditional_expression): Likewise.
11530 (pp_expression): Likewise.
11531 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11532 from pp_c_unary_expression. Adjust.
11533 (c_pretty_printer::multiplicative_expression): Rename from
11534 pp_c_multiplicative_expression. Adjust.
11535 (c_pretty_printer::conditional_expression): Rename from
11536 pp_c_conditional_expression. Adjust.
11537 (c_pretty_printer::assignment_expression): Rename from
11538 pp_c_assignment_expression. Adjust.
11539 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11540 (c_pretty_printer::c_pretty_printer): Do not assign to
11541 unary_expression, multiplicative_expression,
11542 conditional_expression, expression.
11543
fb22178f
GDR
115442013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11545
11546 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11547 virtual member function.
11548 (pp_postfix_expression): Adjust.
11549 (pp_c_postfix_expression): Remove.
11550 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11551 from pp_c_postfix_expression. Adjust.
11552 (c_pretty_printer::c_pretty_printer): Do not assign to
11553 postfix_expression.
11554
7ecc2600
GDR
115552013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11556
11557 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11558 virtua member function.
11559 (pp_primary_expression): Adjust.
11560 (pp_c_primary_expression): Remove.
11561 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11562 from pp_c_primary_expression. Adjust.
11563 (pp_c_initializer_list): Use pp_primary_expression.
11564 (c_pretty_printer::c_pretty_printer): Do not assign to
11565 primary_expression.
11566
0691175f
GDR
115672013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11568
11569 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11570 * c-pretty-print.c (M_): Remove.
11571 (c_pretty_printer::translate_string): Define.
11572 (pp_c_type_specifier): Use it.
11573 (pp_c_primary_expression): Likewise.
11574 (pp_c_expression): Likewise.
11575
66dfe4c4
GDR
115762013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11577
11578 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11579 virtual function.
11580 (pp_c_id_expression): Remove.
11581 (pp_id_expression): Adjust.
11582 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11583 pp_c_id_expression. Adjust.
11584 (pp_c_postfix_expression): Use pp_id_expression.
11585 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11586
ca43e9d5
GDR
115872013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11588
11589 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11590 member function.
11591 (pp_constant): Adjust.
11592 (pp_c_constant): Remove.
11593 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11594 pp_c_constant. Adjust.
11595 (pp_c_constant)
11596 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11597 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11598
da6ca2b5
GDR
115992013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11600
11601 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11602 (c_pretty_printer::c_pretty_printer): Declare.
11603 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11604 c_pretty_printer_init. Adjust.
11605 (print_c_tree): Do not call c_pretty_printer_init.
11606 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11607
65a372f4
AC
116082013-08-09 Arnaud Charlet <charlet@adacore.com>
11609
11610 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11611
fd9b0f32
PC
116122013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11613
11614 PR c++/58080
11615 * c-common.c (pointer_int_sum): Add bool parameter.
11616 * c-common.h (pointer_int_sum): Adjust declaration.
11617
e0aec1e9
GDR
116182013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11619
11620 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11621 c_pretty_printer variable.
11622
b066401f
GDR
116232013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11624
11625 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11626 (pp_base): Remove.
11627 (pp_c_base): Likewise. Adjust users.
11628 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11629 (pp_c_whitespace): Do not call pp_base.
11630 (pp_c_left_paren): Likewise.
11631 (pp_c_right_paren): Likewise.
11632 (pp_c_left_brace): Likewise.
11633 (pp_c_right_brace): Likewise.
11634 (pp_c_left_bracket): Likewise.
11635 (pp_c_right_bracket): Likewise.
11636 (pp_c_dot): Likewise.
11637 (pp_c_ampersand): Likewise.
11638 (pp_c_star): Likewise.
11639 (pp_c_arrow): Likewise.
11640 (pp_c_semicolon): Likewise.
11641 (pp_c_complement): Likewise.
11642 (pp_c_exclamation): Likewise.
11643 (pp_c_direct_declarator): Likewise.
11644 (pp_c_ws_string): Likewise.
11645 (pp_c_identifier): Likewise.
11646 (pp_c_statement): Likewise.
11647 (print_c_tree): Likewise.
11648
65e5a578
ESR
116492013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11650
11651 PR c++/58072
11652 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11653 provide useful error strings.
11654
137a1a27
GDR
116552013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11656
11657 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11658 printer functions instead of pp_string or operators and punctuators.
11659 (dump_generic_ada_node): Likewise.
11660 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11661 (pp_c_relational_expression): Likewise.
11662 (pp_c_logical_or_expression): Likewise.
11663
07838b13
GDR
116642013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11665
11666 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11667 functions instead of pp_character.
11668 (pp_ada_tree_identifier): Likewise.
11669 (dump_ada_double_name): Likewise.
11670 (dump_ada_function_declaration): Likewise.
11671 (dump_ada_array_domains): Likewise.
11672 (dump_template_types): Likewise.
11673 (dump_generic_ada_node): Likewise.
11674 (print_ada_declaration): Likewise.
11675 (print_ada_struct_decl): Likewise.
11676 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11677
433cc7b0
TT
116782013-07-23 Tom Tromey <tromey@redhat.com>
11679
11680 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11681 * c-common.c (c_common_reswords): Add _Generic.
11682
688010ba
OB
116832013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11684
11685 * c-common.c: Fix typos.
11686 * c-common.h: Likewise.
11687
2a99e5e6
LL
116882013-07-13 Lubos Lunak <l.lunak@suse.cz>
11689
11690 PR c++/55203
11691 * c-common.c (c_common_attribute_table): Add warn_unused.
11692 (handle_warn_unused_attribute): New.
11693
c26302d5
JJ
116942013-07-10 Jakub Jelinek <jakub@redhat.com>
11695
11696 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11697 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11698
dfeadaa0
PC
116992013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11700
11701 PR c++/57869
11702 * c.opt: Add Wconditionally-supported.
11703
6a2fa4b2
GS
117042013-07-08 Graham Stott <graham.stott@btinternet.com>
11705
adfac8df 11706 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11707 unused variables l_length and l_node.
11708
ecdbd01a 117092013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11710
11711 PR c/57821
11712 * c-common.c (complete_array_type): Delay folding first index
11713 like other indices. When folding, check for index overflow.
11714
bedc293e
MG
117152013-06-27 Marc Glisse <marc.glisse@inria.fr>
11716
11717 PR c++/57509
11718 * c-common.h (c_build_vec_perm_expr): New complain argument.
11719 * c-common.c (c_build_vec_perm_expr): Likewise.
11720 Use save_expr also in C++.
11721
604b2bfc
GDR
117222013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11723
11724 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11725 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11726 * c-opts.c (c_common_post_options): Likewise.
11727
dfeadaa0 117282013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11729
11730 * array-notation-common.c (length_mismatch_in_expr): Changed the
11731 parameter type's from a dynamic array to a vec_tree. Also removed
11732 the size parameters.
11733 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11734 the change above.
11735
2ce86d2e
BI
117362013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11737
11738 * c-common.h (struct cilkplus_an_parts): New structure.
11739 (struct cilkplus_an_loop_parts): Likewise.
11740 (cilkplus_extract_an_triplets): New prototype.
11741 (fix_sec_implicit_args): Likewise.
11742 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11743 (fix_sec_implicit_args): Likewise.
604b2bfc 11744
07a6825b
BI
117452013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11746
11747 * array-notation-common.c (find_inv_trees): Removed an unwanted
11748 typecasting.
11749 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11750 enum rid to enum tree_code.
11751
08346abd
JH
117522013-06-11 Jan Hubicka <jh@suse.cz>
11753
11754 * c-common.c (handle_alias_ifunc_attribute): Do not set
11755 DECL_EXTERNAL for weakref variables.
11756 * c-pragma.c (handle_pragma_weak): Make sure aliases
11757 are not declared as external.
11758
d60f1706
BI
117592013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11760
11761 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11762 function from c/c-array-notation.c.
11763 (is_cilkplus_reduce_builtin): Likewise.
11764 (find_rank): Likewise.
11765 (extract_array_notation_exprs): Likewise.
11766 (replace_array_notations): Likewise.
11767 (find_inv_trees): Likewise.
11768 (replace_inv_trees): Likewise.
11769 (contains_array_notation_expr): Likewise.
11770 (find_correct_array_notation_type): Likewise.
11771 * c-common.h (struct inv_list): Moved this struct from the file
11772 c/c-array-notation.c and added a new field called additional tcodes.
11773 (length_mismatch_in_expr_p): New prototype.
11774 (is_cilkplus_reduce_builtin): Likewise.
11775 (find_rank): Likewise.
11776 (extract_array_notation_exprs): Likewise.
11777 (replace_array_notation): Likewise.
11778 (find_inv_trees): Likewise.
11779 (replace_inv_trees): Likewise.
11780 (find_correct_array_notation_type): Likewise.
dfeadaa0 11781
36536d79
BI
117822013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11783
11784 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11785 function array_notation_init_builtins is called.
11786 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11787 * c-common.def (ARRAY_NOTATION_REF): New tree.
11788 * c-common.h (build_array_notation_expr): New function declaration.
11789 (build_array_notation_ref): Likewise.
11790 (extract_sec_implicit_index_arg): New extern declaration.
11791 (is_sec_implicit_index_fn): Likewise.
11792 (ARRAY_NOTATION_CHECK): New define.
11793 (ARRAY_NOTATION_ARRAY): Likewise.
11794 (ARRAY_NOTATION_START): Likewise.
11795 (ARRAY_NOTATION_LENGTH): Likewise.
11796 (ARRAY_NOTATION_STRIDE): Likewise.
11797 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11798 ARRAY_NOTATION_REF.
11799 (pp_c_expression): Likewise.
11800 * c.opt (flag_enable_cilkplus): New flag.
11801 * array-notation-common.c: New file.
11802
f7716d57
JJ
118032013-05-14 Jakub Jelinek <jakub@redhat.com>
11804
11805 PR c++/57274
11806 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11807
a5e0cd1d
MG
118082013-05-10 Marc Glisse <marc.glisse@inria.fr>
11809
11810 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11811 vectors.
11812
f6bc1c4a
HS
118132013-05-07 Han Shen <shenhan@google.com>
11814
11815 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11816
3f12f6e9
SKS
118172013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11818
11819 * c-common.c (check_user_alignment): Emit error for negative values.
11820
61949153
PC
118212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11822
11823 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11824
e93e18e9
PC
118252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11826
11827 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11828 __GXX_EXPERIMENTAL_CXX1Y__.
11829
44d90fe1 118302013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11831 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11832
11833 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11834 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11835 to simply use OPT_Wpointer_arith.
11836 (c_sizeof_or_alignof_type): Likewise.
11837
13f39b2e
PC
118382013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11839
11840 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11841
4b84d650
JJ
118422013-04-12 Jakub Jelinek <jakub@redhat.com>
11843
11844 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11845 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11846 specifiers.
11847
fb037b5d
SB
118482013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11849
11850 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11851
4e856798
PC
118522013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11853
11854 * c-common.c (pointer_int_sum): Remove dead code.
11855
4b1baac8
RS
118562013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11857
11858 PR middle-end/56524
11859 * c-common.c (handle_optimize_attribute): Don't call
11860 save_optabs_if_changed.
11861
0b50e654
JJ
118622013-03-05 Jakub Jelinek <jakub@redhat.com>
11863
11864 PR middle-end/56461
11865 * c-pch.c (pch_init): Free target_validity at the end.
11866
48c41403
JJ
118672013-03-04 Jakub Jelinek <jakub@redhat.com>
11868
11869 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11870
e664c61c
KS
118712013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11872 Jakub Jelinek <jakub@redhat.com>
11873
11874 PR sanitizer/56454
11875 * c-common.c (handle_no_sanitize_address_attribute): New function.
11876 (c_common_attribute_table): Add no_sanitize_address attribute.
11877 (handle_no_address_safety_analysis_attribute): Add
11878 no_sanitize_address attribute, not no_address_safety_analysis
11879 attribute.
11880
a475fd3d 118812013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11882
11883 PR target/52555
11884 * c-common.c (handle_optimize_attribute): Call
11885 save_optabs_if_changed.
11886
f6007d99
JJ
118872013-02-18 Jakub Jelinek <jakub@redhat.com>
11888 Steven Bosscher <steven@gcc.gnu.org>
11889
11890 PR pch/54117
11891 * c-opts.c (c_common_post_options): If debug info is enabled
11892 and non-dwarf*, refuse to load PCH files and when writing PCH
11893 file warn.
11894
cf35e2b1
JJ
118952013-02-05 Jakub Jelinek <jakub@redhat.com>
11896
11897 PR middle-end/56167
11898 * c-common.c (handle_error_attribute): Fix condition.
11899
32887460
JJ
119002013-01-30 Jakub Jelinek <jakub@redhat.com>
11901
11902 PR c++/55742
11903 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11904
5af057d8
JM
119052013-01-18 Jason Merrill <jason@redhat.com>
11906
11907 PR target/54908
11908 * c.opt (-fextern-tls-init): New.
11909 * c-opts.c (c_common_post_options): Handle it.
11910
cc83c823
JJ
119112013-01-09 Jakub Jelinek <jakub@redhat.com>
11912
11913 PR c/48418
11914 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11915 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11916 and is either negative or bigger or equal to type precision
11917 of the first operand.
11918
a859517f
MP
119192012-12-03 Marek Polacek <polacek@redhat.com>
11920
11921 PR c/55570
11922 * c-common.c (check_user_alignment): Swap order of tests,
11923 check TREE_CODE first.
11924
2d7aa578
ESR
119252012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11926
11927 PR c++/52654
11928 * c-common.h (overflow_type): New enum.
11929 (build_userdef_literal): Add overflow_type argument.
11930 (tree_userdef_literal): Add overflow_type.
11931 (USERDEF_LITERAL_OVERFLOW): New access macro.
11932 * c-common.c (build_userdef_literal): Add overflow_type
11933 argument.
11934 * c-lex.c (c_lex_with_flags): Add overflow_type to
11935 build_userdef_literal calls.
11936 (interpret_integer, interpret_float): Add overflow_type argument.
11937
cc3c4f62
RB
119382012-11-28 Richard Biener <rguenther@suse.de>
11939
11940 PR c/35634
11941 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11942 here and use a type with proper overflow behavior for types that would
11943 need to be promoted for the arithmetic.
11944
77bc5132
JJ
119452012-11-23 Jakub Jelinek <jakub@redhat.com>
11946
11947 PR sanitizer/55435
11948 * c-common.c (handle_no_address_safety_analysis_attribute): New
11949 function.
11950 (c_common_attribute_table): Add no_address_safety_analysis.
11951
5dc99c46
SB
119522012-11-16 Simon Baldwin <simonb@google.com>
11953
11954 * c.opt: Add f[no-]canonical-system-headers.
11955 * c-opts.c (c_common_handle_option): Handle
11956 OPT_fcanonical_system_headers.
11957
a4a0016d
ESR
119582012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11959
11960 PR c++/54413
11961 * c-opts.c (c_common_handle_option): Set new flags.
11962 * c.opt: Describe new flags.
11963
7dbb85a7
JM
119642012-11-09 Jason Merrill <jason@redhat.com>
11965
11966 * c.opt (Wabi-tag): New.
11967
ad7bac31
AK
119682012-11-09 Andi Kleen <ak@linux.intel.com>
11969
11970 PR 55139
11971 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11972 MEMMODEL_MASK
ad7bac31 11973
7332899a
MLI
119742012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11975
11976 PR c/53063
11977 * c.opt (Wformat): Make it Alias Wformat=1.
11978 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11979 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11980 LangEnabledBy.
11981 (Wformat=): RejectNegative. Use LangEnabledBy.
11982 (Wnonnull): Use LangEnabledBy.
11983 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11984 * c-format.c (set_Wformat): Delete.
11985 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11986 (maybe_read_dollar_number): Likewise.
11987 (avoid_dollar_number): Likewise.
11988 (finish_dollar_format_checking): Likewise.
11989 (check_format_info): Likewise.
11990 (check_format_info_main): Likewise.
11991 (check_format_types): Likewise.
11992 (format_type_warning): Likewise.
11993 * c-common.c (int): Likewise.
11994 (check_function_sentinel): Likewise.
8e745a17 11995 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11996
34a180a6
MLI
119972012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11998
11999 PR c/53063
12000 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
12001 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
12002 Use LangEnabledBy.
12003 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
12004 common.opt.
12005 (Wvariadic-macros): Init(1).
12006 * c-opts.c (c_common_handle_option): Do not handle them
12007 explicitly.
12008 (c_common_post_options): Likewise.
12009 (sanitize_cpp_opts): warn_unused_macros is now
12010 cpp_warn_unused_macros.
12011 (push_command_line_include): Likewise.
12012 * c-common.c (warn_unknown_pragmas): Do not define.
12013 * c-common.h (warn_unknown_pragmas): Do not declare.
12014
3f46d6a5
MLI
120152012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
12016
12017 PR c/51294
12018 * c-common.c (conversion_warning): Handle conditional expressions.
12019
880661a4
JW
120202012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
12021
12022 PR c++/54930
12023 * c.opt (Wreturn_local_addr): Define new option.
12024
4514a96b
JM
120252012-10-25 Jason Merrill <jason@redhat.com>
12026
f14edc1a
JM
12027 * c.opt (Wvirtual-move-assign): New.
12028
4514a96b
JM
12029 * c.opt (Winherited-variadic-ctor): New.
12030
93100c6b
MG
120312012-10-25 Marc Glisse <marc.glisse@inria.fr>
12032
12033 PR c++/54427
12034 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
12035
1efcb8c6
JM
120362012-10-23 Joseph Myers <joseph@codesourcery.com>
12037
12038 * c-common.h (pch_cpp_save_state): Declare.
12039 * c-target.def (c_preinclude): New hook.
12040 * c-opts.c (done_preinclude): New.
12041 (push_command_line_include): Handle default preincluded header.
12042 (cb_file_change): Call pch_cpp_save_state when calling
12043 push_command_line_include.
12044 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
12045 (pch_cpp_save_state): New.
12046 (pch_init): Call pch_cpp_save_state conditionally, instead of
12047 calling cpp_save_state.
12048
4a0ae68e
MLI
120492012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
12050
12051 PR c/53063
12052 PR c/40989
12053 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
12054 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
12055 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
12056 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
12057 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
12058 * c-opts.c (c_common_handle_option): Remove explicit handling from
12059 here.
12060 (c_common_post_options): Likewise.
12061
67e4210b
EB
120622012-10-18 Eric Botcazou <ebotcazou@adacore.com>
12063
12064 * c-ada-spec.c (LOCATION_COL): Delete.
12065 (compare_location): New function.
12066 (compare_node): Use it.
12067 (compare_comment): Likewise.
12068
65d4f2cd
MLI
120692012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
12070
12071 PR c/53063
12072 PR c/40989
12073 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
12074 * c-opts.c (c_common_handle_option): Do not set them here. Add
12075 comment.
12076 (c_common_post_options): Likewise.
12077
909881cb
EB
120782012-10-16 Eric Botcazou <ebotcazou@adacore.com>
12079
12080 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
12081 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
12082 Remove POINTER_TYPE handling, add large unsigned handling and use
12083 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
12084
3a785c97
JJ
120852012-10-12 Jakub Jelinek <jakub@redhat.com>
12086
12087 PR c/54381
12088 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
12089 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
12090 locs and array of 3 trees instead of just single loc and single
12091 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
12092 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
12093 For *cmp* builtins that take two sources strings report warnings
12094 about first and second source, not about destination and source.
12095
5e54f81d
MG
120962012-10-12 Marc Glisse <marc.glisse@inria.fr>
12097
12098 PR c++/53055
12099 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
12100
f5b02f1e
EB
121012012-10-11 Eric Botcazou <ebotcazou@adacore.com>
12102
12103 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
12104 declaring something coming from another file.
12105
b46dbc6c
AC
121062012-10-10 Arnaud Charlet <charlet@adacore.com>
12107
f5b02f1e 12108 PR ada/54845
b46dbc6c
AC
12109 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
12110
5d9de0d0
PC
121112012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
12112
12113 PR c++/54194
12114 * c-common.c (warn_about_parentheses): Add location_t parameter;
12115 use EXPR_LOC_OR_LOC.
12116 * c-common.h: Update declaration.
12117
a212e43f
MG
121182012-10-09 Marc Glisse <marc.glisse@inria.fr>
12119
12120 PR c++/54427
12121 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
12122 more operations. Make error messages optional.
12123 * c-common.h (enum stv_conv): Moved from c-typeck.c.
12124 (scalar_to_vector): Declare.
12125
b1db7f91
JM
121262012-10-08 Jason Merrill <jason@redhat.com>
12127
12128 * c-common.c (c_common_reswords): Add thread_local.
12129
e28d52cf
DS
121302012-10-08 Dodji Seketeli <dodji@redhat.com>
12131
12132 PR c++/53528 C++11 attribute support
12133 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
12134 new functions.
12135 * c-common.c (check_cxx_fundamental_alignment_constraints): New
12136 static function.
12137 (handle_aligned_attribute): In choose strictest alignment
12138 among many. Use new check_cxx_fundamental_alignment_constraints.
12139 (handle_transparent_union_attribute): In c++11 attribute syntax,
12140 don't look through typedefs.
12141
3b78de56
AC
121422012-10-04 Arnaud Charlet <charlet@adacore.com>
12143
12144 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
12145 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
12146 out of dumpfile.h.
12147
6040bb5f
DC
121482012-09-25 Dehao Chen <dehao@google.com>
12149
12150 PR middle-end/54645
3b78de56 12151 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
12152 map when read in the pch.
12153
3f8257db 121542012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
12155
12156 * c-ada-spec.c: Style fixes.
12157
3f8257db 121582012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
12159
12160 * c.opt (-fada-spec-parent): Define new command line switch.
12161 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
12162 is specified, generate binding spec as a child of the specified unit.
12163
0ccb505d
PC
121642012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
12165 Manuel López-Ibáñez <manu@gcc.gnu.org>
12166
12167 PR c++/53210
12168 * c.opt ([Winit-self]): Enabled by -Wall in C++.
12169
c583af79
AC
121702012-08-23 Arnaud Charlet <charlet@adacore.com>
12171
12172 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
12173 for pointers, and add missing Convention C pragma.
12174 (print_ada_struct_decl): Add missing aliased keyword.
12175 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
12176
1a4049e7
JJ
121772012-08-17 Jakub Jelinek <jakub@redhat.com>
12178
12179 * c-common.c (sizeof_pointer_memaccess_warning): New function.
12180 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
12181 * c-opts.c (c_common_handle_option): Enable it for -Wall.
12182 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
12183 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
12184
70b5e7dc
RG
121852012-08-10 Richard Guenther <rguenther@suse.de>
12186
12187 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
12188
f8923f7e
SB
121892012-08-07 Steven Bosscher <steven@gcc.gnu.org>
12190
12191 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
12192 instead of separate pp_newline and pp_flush.
12193 (print_c_tree): Likewise.
12194
e45abe1f
RH
121952012-07-26 Richard Henderson <rth@redhat.com>
12196
12197 * c-common.c (handle_hot_attribute): Allow labels.
12198 (handle_cold_attribute): Likewise.
12199
332f1d24
JJ
122002012-07-20 Jakub Jelinek <jakub@redhat.com>
12201
12202 PR c++/28656
12203 * c-common.c (check_function_nonnull): Handle multiple nonnull
12204 attributes properly.
12205
7ee2468b
SB
122062012-07-16 Steven Bosscher <steven@gcc.gnu.org>
12207
12208 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
12209 * c-ada-spec.c: Likewise.
12210 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
12211
ee7b28eb
SB
122122012-07-14 Steven Bosscher <steven@gcc.gnu.org>
12213
12214 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
12215 Remove code conditional on it.
12216
6bdf3519
SB
122172012-07-11 Steven Bosscher <steven@gcc.gnu.org>
12218
12219 * c-gimplify.c: Do not include basic-block.h.
12220 * c-common.c: Do not include linfuncs.h.
12221
532aafad
SB
122222012-07-08 Steven Bosscher <steven@gcc.gnu.org>
12223
12224 * c-common.h: Include tree.h.
12225
8d0d1915
JM
122262012-07-02 Jason Merrill <jason@redhat.com>
12227
12228 PR c++/53524
12229 * c-common.c (get_priority): Call default_conversion.
12230
fbc873ad
UB
122312012-07-01 Uros Bizjak <ubizjak@gmail.com>
12232
12233 * c-pch.c (c_common_write_pch): Remove unused variables.
12234
d4a10d0a
SB
122352012-06-29 Steven Bosscher <steven@gcc.gnu.org>
12236
12237 * cppspec.c: Moved from gcc/ to here.
12238
6f3a2e23
KT
122392012-06-27 Kai Tietz <ktietz@redhat.com>
12240
12241 PR preprocessor/37215
12242 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
12243
8ca92d04
SB
122442012-06-21 Steven Bosscher <steven@gcc.gnu.org>
12245
12246 * c-common.h (c_common_print_pch_checksum): Remove.
12247 * c-pch.c: Do not include output.h.
12248 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
12249 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
12250 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
12251 (struct c_pch_header): Remove.
12252 (get_ident): Update gpch version.
12253 (pch_init): Do not print executable_checksum to asm_out_file.
12254 Do not fail if there is no asm_out_file to read back from. Set
12255 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
12256 (c_common_write_pch): Verify that nothing was written to asm_out_file
12257 since pch_init was called. Do not write a c_pch_header, and do not
12258 copy from asm_out_file to the PCH.
12259 (c_common_read_pch): Do not read a c_pch_header, and do not restore
12260 the content of asm_out_file from the PCH.
12261 (c_common_print_pch_checksum): Remove.
12262 * c-opts.c (c_common_init): Print out executable_checksum directly.
12263
70f42967
SB
122642012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12265
12266 * c-target.def (objc_declare_unresolved_class_reference,
12267 objc_declare_class_definition): Add new hooks.
12268
a8781821
SB
122692012-06-19 Steven Bosscher <steven@gcc.gnu.org>
12270
12271 * c-lex.c: Do not include output.h.
12272 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
12273 Remove uses of ASM_OUTPUT_IDENT.
12274
9e1a8dd1
RR
122752012-06-15 Marc Glisse <marc.glisse@inria.fr>
12276
12277 PR c++/51033
12278 * c-common.h (c_build_vec_perm_expr): Move decl here.
12279 * c-common.c (c_build_vec_perm_expr): Move definition
12280 here.
12281
6f07a821
SB
122822012-06-06 Steven Bosscher <steven@gcc.gnu.org>
12283
12284 * c.opt (fconserve-space): Turn into a no-op.
12285
9faeb493 122862012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
12287
12288 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
12289 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
12290 both the start and end of the function.
12291
a4b7d13c
SB
122922012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12293
12294 * c-common.c: Do not include output.h.
12295 * c-pragma.c: Likewise.
12296
c265f413
SA
122972012-06-04 Steven Bosscher <steven@gcc.gnu.org>
12298
12299 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
12300 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
12301 (lang_decl_name): Handle namespace decls.
12302
be7a421e
SB
123032012-05-31 Steven Bosscher <steven@gcc.gnu.org>
12304
12305 * c-ada-spec.c: Do not include output.h.
12306 * c-semantics.c: Likewise.
12307
65de6659
JM
123082012-05-29 Joseph Myers <joseph@codesourcery.com>
12309
12310 * c-common.c: Fix typo.
12311
ca5f4331
MM
123122012-05-29 Michael Matz <matz@suse.de>
12313
12314 * c-common.h (c_expand_decl): Remove prototype.
12315
4f7f7aca
MLI
123162012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
12317
12318 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
12319 * c-opts.c (c_common_handle_option): Remove code handling
12320 warn_missing_braces.
12321
4a792f9b
PC
123222012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
12323
12324 PR c++/25137
12325 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
12326 -Wmissing_braces.
12327
650dc14a
DS
123282012-05-22 Dodji Seketeli <dodji@redhat.com>
12329
12330 PR c++/53322
12331 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
12332
9b095bf1
MLI
123332012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
12334
12335 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
12336 * c-opts.c (c_common_handle_option): Do not handle explicitly
12337 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
12338
0b2c4be5
DS
123392012-05-16 Dodji Seketeli <dodji@redhat.com>
12340
12341 PR preprocessor/7263
ab20d992 12342 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
12343 to cpp_classify_number. For diagnostics, use the precise location
12344 instead of the global input_location.
12345
a1bde5af
PC
123462012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12347
d02924ef 12348 PR c++/11856
a1bde5af
PC
12349 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
12350
d1ede5f4
BS
123512012-05-14 Bernd Schmidt <bernds@codesourcery.com>
12352
a1bde5af 12353 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 12354
f2bc201f
MLI
123552012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
12356
12357 PR 53063
12358 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
12359 Wreorder): Use LangEnabledBy.
12360 * c-opts.c (c_common_handle_option): Do not enable them
12361 explicitly. Call lang-specific generated functions.
12362 (c_common_post_options): Do not set them here.
12363
95744782
MLI
123642012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12365
12366 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12367 Wmissing-field-initializers,Wmissing-parameter-type,
12368 Wold-style-declaration,Woverride-init): Use EnabledBy.
12369 * c-opts.c (c_common_post_options): Do not set here explicitly.
12370
7d5a5747
MLI
123712012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12372
12373 PR 53063
12374 * c-opts.c (c_common_handle_option): Use handle_generated_option
12375 to enable sub-options.
12376
5a3c9cf2
PC
123772012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12378
12379 PR c++/53158
12380 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12381
3ac8781c
RG
123822012-05-10 Richard Guenther <rguenther@suse.de>
12383
12384 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12385 adjust commentary about TYPE_IS_SIZETYPE types.
12386
1e537948
MLI
123872012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12388
12389 PR c++/53261
12390 * c-common.c (warn_logical_operator): Check that argument of
12391 integer_zerop is not NULL.
12392
f2c4a785
MLI
123932012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12394
12395 PR c/43772
12396 * c-common.c (warn_logical_operator): Do not warn if either side
12397 is already true or false.
12398
50f305ca
MLI
123992012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12400
12401 PR c/51712
12402 * c-common.c (expr_original_type): New.
12403 (shorten_compare): Do not warn for enumeration types.
12404
0c3641b0
MLI
124052012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12406
12407 * c.opt (fpermissive): Add Var(flag_permissive).
12408
7edaa4d2
MG
124092012-04-30 Marc Glisse <marc.glisse@inria.fr>
12410
12411 PR c++/51033
12412 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12413 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12414
b9c8da34
DS
124152012-04-30 Dodji Seketeli <dodji@redhat.com>
12416
12417 Add -Wvarargs option
ab20d992 12418 * c.opt (Wvarargs): Define new option.
b9c8da34 12419
e6c69da0
MLI
124202012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12421
12422 * c-common.c (check_function_arguments): Replace
12423 Wmissing-format-attribute with Wsuggest-attribute=format.
12424
90137d8f
MLI
124252012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12426
12427 * c.opt (Wsuggest-attribute=format): New. Alias of
12428 Wmissing-format-attribute.
12429 * c-format.c (decode_format_type): Replace
12430 Wmissing-format-attribute with Wsuggest-attribute=format.
12431 (check_function_format): Likewise.
12432
9faeb493 124332012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12434
12435 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12436 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12437 * c.opt: Add Wliteral-suffix.
12438
c1771a20
MLI
124392012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12440
12441 PR c/44774
12442 * c.opt (Wpedantic): New.
12443 (pedantic): Alias Wpedantic.
12444 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12445 (c_common_post_options): Likewise.
12446 (sanitize_cpp_opts): Likewise.
12447 * c-lex.c (interpret_float): Likewise.
12448 * c-format.c (check_format_types): Likewise.
12449 * c-common.c (pointer_int_sum): Likewise.
12450 (c_sizeof_or_alignof_type): Likewise.
12451 (c_add_case_label): Likewise.
12452 (c_do_switch_warnings): Likewise.
12453 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12454
04b391c1
JM
124552012-04-15 Jason Merrill <jason@redhat.com>
12456
12457 PR c++/52818
12458 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12459 (C_STD_NAME): Distinguish between C++98 and C++11.
12460
ac868f29
EB
124612012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12462
12463 PR target/52624
12464 * c-common.h (uint16_type_node): Rename into...
12465 (c_uint16_type_node): ...this.
12466 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12467 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12468
fd4116f4
MLI
124692012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12470
12471 * c-common.c (warn_if_unused_value): Move definition to here.
12472 * c-common.h (warn_if_unused_value): Move declaration to here.
12473
573ac65e
WB
124742012-03-23 William Bader <williambader@hotmail.com>
12475
12476 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12477
552b8185
JM
124782012-03-20 Jason Merrill <jason@redhat.com>
12479
12480 * c-common.h (enum cxx_dialect): Add cxx1y.
12481 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12482 test.
12483 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12484 * c-opts.c (c_common_post_options): Likewise.
12485 (set_std_cxx1y): New.
12486 (c_common_handle_option): Call it.
12487 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12488
04398fa8
PC
124892012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12490
12491 PR c++/14710
12492 * c.opt ([Wuseless-cast]): Add.
12493
d2a12ae7
RG
124942012-03-16 Richard Guenther <rguenther@suse.de>
12495
12496 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12497
a12bf402
MLI
124982012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12499
12500 PR c++/44783
12501 * c.opt (ftemplate-backtrace-limit) Add.
12502
5c30094f
RO
125032012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12504
12505 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12506 handling.
12507 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12508 (init_pragma): Don't register extern_prefix.
12509
21fa2faf
RG
125102012-03-12 Richard Guenther <rguenther@suse.de>
12511
12512 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12513 (builtin_type_for_size): Likewise.
12514
e3793c6f
JJ
125152012-02-13 Jakub Jelinek <jakub@redhat.com>
12516
12517 PR c++/52215
12518 * c-common.c (sync_resolve_params): Don't decide whether to convert
12519 or not based on TYPE_SIZE comparison, convert whenever arg_type
12520 is unsigned INTEGER_TYPE.
12521
93286335
PC
125222012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12523
12524 PR c/52118
12525 * c.opt ([Wunused-local-typedefs]): Fix description.
12526
7a421706
MS
125272012-01-24 Mike Stump <mikestump@comcast.net>
12528
12529 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12530 exactly.
12531
ba9b1f11
RG
125322012-01-18 Richard Guenther <rguenther@suse.de>
12533
12534 * c-opts.c (c_common_post_options): Reset LTO flags if
12535 we are about to generate a PCH.
12536
465406be
PC
125372012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12538
12539 PR c++/51777
12540 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12541 use pp_unsigned_wide_integer.
12542
aee15221
RG
125432012-01-10 Richard Guenther <rguenther@suse.de>
12544
12545 PR middle-end/51806
12546 * c-opts.c (c_common_handle_option): Move -Werror handling
12547 to language independent code.
12548
5720c0dc
RG
125492012-01-05 Richard Guenther <rguenther@suse.de>
12550
12551 PR middle-end/51764
12552 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12553 from common.opt.
12554
73ac190a
PC
125552011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12556
12557 PR c++/51316
12558 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12559 of array types with an unknown bound.
12560
48b0b196
JM
125612011-12-20 Joseph Myers <joseph@codesourcery.com>
12562
12563 * c-common.c (flag_isoc99): Update comment to refer to C11.
12564 (flag_isoc1x): Change to flag_isoc11.
12565 * c-common.h (flag_isoc99): Update comment to refer to C11.
12566 (flag_isoc1x): Change to flag_isoc11.
12567 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12568 C11.
12569 * c-opts.c (set_std_c1x): Change to set_std_c11.
12570 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12571 Call set_std_c11.
12572 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12573 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12574 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12575 standard.
12576 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12577 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12578 (std=gnu1x): Make alias of std=gnu11.
12579
d58d6eb5
JM
125802011-12-19 Jason Merrill <jason@redhat.com>
12581
12582 PR c++/51228
12583 * c-common.c (handle_transparent_union_attribute): Check the first
12584 field if the type is complete.
12585
b3908fcc
JW
125862011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12587
12588 PR libstdc++/51365
12589 * c-common.c (RID_IS_FINAL): Add.
12590 * c-common.h (RID_IS_FINAL): Add.
12591
fea3ca91
IS
125922011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12593
12594 * c.opt (fgnu-runtime): Provide full description.
12595 (fnext-runtime): Likewise.
12596 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12597
62bad7cd
AM
125982011-11-28 Andrew MacLeod <amacleod@redhat.com>
12599
12600 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12601 predefines in one place. Add LOCK_FREE predefines.
12602 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12603 new func.
12604
c466c4ff
AM
126052011-11-24 Andrew MacLeod <amacleod@redhat.com>
12606
12607 PR c/51256
9faeb493 12608 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12609 conditions
9faeb493
UB
12610 (resolve_overloaded_atomic_exchange,
12611 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12612 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12613 error_mark_node for error conditions.
9faeb493 12614
a5952633
RG
126152011-11-08 Richard Guenther <rguenther@suse.de>
12616
12617 PR middle-end/51010
ab20d992 12618 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12619
0a35513e
AH
126202011-11-07 Richard Henderson <rth@redhat.com>
12621 Aldy Hernandez <aldyh@redhat.com>
12622 Torvald Riegel <triegel@redhat.com>
12623
12624 Merged from transactional-memory.
12625
12626 * c-common.c (handle_tm_wrap_attribute,
12627 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12628 (struct c_common_reswords): Added __transaction* keywords.
12629 (struct c_common_attribute_table): Added transaction* and tm_regparm
12630 attributes.
12631 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12632 masks.
12633 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12634 find_tm_attribute): Declare.
12635
6d87092d
JM
126362011-11-07 Jason Merrill <jason@redhat.com>
12637
12638 PR c++/35688
12639 * c-common.c, c-common.h: Revert yesterday's changes.
12640
8e7860a1
JM
126412011-11-06 Jason Merrill <jason@redhat.com>
12642
12643 PR c++/35688
12644 * c-common.c (decl_has_visibility_attr): Split out from...
12645 (c_determine_visibility): ...here.
12646 * c-common.h: Declare it.
12647
d19fa6b5
JM
126482011-11-06 Joseph Myers <joseph@codesourcery.com>
12649
12650 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12651 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12652 type.
12653 (check_user_alignment): New. Split out of
12654 handle_aligned_attribute. Disallow integer constants with
12655 noninteger types. Conditionally allow zero.
12656 (handle_aligned_attribute): Use check_user_alignment.
12657 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12658
86951993
AM
126592011-11-06 Andrew MacLeod <amacleod@redhat.com>
12660 Richard Henderson <rth@redhat.com>
12661
12662 Merged from cxx-mem-model.
12663
12664 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12665 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12666 parameters that are the same type size.
12667 (get_atomic_generic_size): New. Find size of generic
12668 atomic function parameters and do typechecking.
12669 (add_atomic_size_parameter): New. Insert size into parameter list.
12670 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12671 either __atomic_exchange_n or external library call.
9faeb493 12672 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12673 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12674 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12675 __atomic_load_n or an external library call.
12676 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12677 __atomic_store_n or an external library call.
12678 (resolve_overloaded_builtin): Handle new __atomic builtins.
12679
cf9e9959
EB
126802011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12681
12682 PR c++/50608
12683 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12684 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12685 <INDIRECT_REF>: Return the argument.
12686 <ARRAY_REF>: Remove special code for negative offset.
12687 Call fold_build_pointer_plus instead of size_binop.
12688 (fold_offsetof): Remove STOP_REF argument and adjust.
12689 * c-common.h (fold_offsetof_1): Declare.
12690 (fold_offsetof): Remove STOP_REF argument.
12691
25339f10
JM
126922011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12693
12694 PR c++/50810
12695 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12696 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12697 Wnarrowing for C++0x and C++98.
12698 * c.opt ([Wnarrowing]): Update.
12699
89401152
PC
127002011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12701
12702 PR c++/44277
12703 * c.opt: Add Wzero-as-null-pointer-constant.
12704
97e3ad20
JM
127052011-10-31 Jason Merrill <jason@redhat.com>
12706
15694fdd
JM
12707 * c.opt (-fdeduce-init-list): Off by default.
12708
97e3ad20
JM
12709 PR c++/50920
12710 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12711 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12712 and -Wc++11-compat.
12713 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12714
fb9120e3
RAV
127152011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12716
12717 PR c++/30066
12718 * c.opt (fvisibility-inlines-hidden): Description change.
12719
3ce4f9e4
ESR
127202011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12721
12722 Implement C++11 user-defined literals.
12723 * c-common.c (build_userdef_literal): New.
12724 * c-common.def: New tree code.
12725 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12726 * c-lex.c (interpret_float): Add suffix parm.
12727 (c_lex_with_flags): Build literal tokens.
12728
5f53c243
PC
127292011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12730
12731 PR c++/50841
12732 Revert:
12733 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12734
12735 PR c++/50810
12736 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12737 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12738 Wnarrowing for C++0x and C++98.
12739 * c.opt ([Wnarrowing]): Update.
12740
263734e1
PC
127412011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12742
12743 PR c++/50810
12744 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12745 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12746 Wnarrowing for C++0x and C++98.
12747 * c.opt ([Wnarrowing]): Update.
12748
d2e312d7
PC
127492011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12750
12751 PR c++/45385
12752 * c-common.c (conversion_warning): Remove code looking for
12753 artificial operands.
12754
d17687f6
DS
127552011-10-18 Dodji Seketeli <dodji@redhat.com>
12756
12757 PR bootstrap/50760
12758 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12759 !NO_IMPLICIT_EXTERN_C.
d17687f6 12760
fc8396e9
PC
127612011-10-17 Michael Spertus <mike_spertus@symantec.com>
12762
12763 * c-common.c (c_common_reswords): Add __bases,
12764 __direct_bases.
12765 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12766
127672011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12768
12769 PR c++/50757
12770 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12771
847e697a
TT
127722011-10-15 Tom Tromey <tromey@redhat.com>
12773 Dodji Seketeli <dodji@redhat.com>
12774
12775 * c.opt (fdebug-cpp): New option.
12776 * c-opts.c (c_common_handle_option): Handle the option.
12777 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12778 output stream in parameter. Factorized from ...
12779 (maybe_print_line): ... this. Dump location debug information when
12780 -fdebug-cpp is in effect.
12781 (print_line_1): New static function. Takes an output stream in
12782 parameter. Factorized from ...
12783 (print_line): ... here. Dump location information when -fdebug-cpp
12784 is in effect.
12785 (scan_translation_unit): Dump location information when
12786 -fdebug-cpp is in effect.
12787
92582b75
TT
127882011-10-15 Tom Tromey <tromey@redhat.com>
12789 Dodji Seketeli <dodji@redhat.com>
12790
12791 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12792 without argument.
12793 * c-opts.c (c_common_handle_option)<case
12794 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12795 cases. Handle -ftrack-macro-expansion with and without argument.
12796
46427374
TT
127972011-10-15 Tom Tromey <tromey@redhat.com>
12798 Dodji Seketeli <dodji@redhat.com>
12799
12800 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12801 (print_line, cb_define, do_line_change): Adjust to avoid touching
12802 the internals of struct line_map. Use the public API instead.
12803 * c-pch.c (c_common_read_pch): Likewise.
12804 * c-lex.c (fe_file_change): Likewise.
12805
fc8396e9
PC
128062011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12807
12808 PR c++/17212
12809 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12810
128112011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12812
12813 PR c++/33067
12814 * c-pretty-print.c (pp_c_floating_constant): Output
12815 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12816
e79983f4
MM
128172011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12818
12819 * c-common.c (def_builtin_1): Delete old interface with two
12820 parallel arrays to hold standard builtin declarations, and replace
12821 it with a function based interface that can support creating
12822 builtins on the fly in the future. Change all uses, and poison
12823 the old names. Make sure 0 is not a legitimate builtin index.
12824 * c-omp.c (c_finish_omp_barrier): Ditto.
12825 (c_finish_omp_taskwait): Ditto.
12826 (c_finish_omp_flush): Ditto.
12827
6637388f
TG
128282011-10-11 Tristan Gingold <gingold@adacore.com>
12829
12830 * c.opt: (fallow-parameterless-variadic-functions): New.
12831
3797cb21
DS
128322011-09-08 Dodji Seketeli <dodji@redhat.com>
12833
12834 PR c++/33255 - Support -Wunused-local-typedefs warning
12835 * c-common.h (struct c_language_function::local_typedefs): New
12836 field.
9faeb493
UB
12837 (record_locally_defined_typedef, maybe_record_typedef_use)
12838 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12839 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12840 (maybe_record_typedef_use)
12841 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12842 * c.opt: Declare new -Wunused-local-typedefs flag.
12843
693ddb1b
EB
128442011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12845
12846 PR middle-end/50266
12847 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12848 computations.
12849
830c740f
RG
128502011-09-05 Richard Guenther <rguenther@suse.de>
12851
12852 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12853 of integer_minus_one_node for empty array upper bounds.
12854
892a371f
DS
128552011-08-28 Dodji Seketeli <dodji@redhat.com>
12856
12857 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12858 it's the first time it's being called on this main TU.
12859
0e3fdb48
RB
128602011-08-24 Richard Guenther <rguenther@suse.de>
12861
12862 PR c/49396
12863 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12864
128652011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12866
12867 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12868 defined in cpp_init_builtins and c_cpp_builtins.
12869
d4a83c10
JM
128702011-08-19 Joseph Myers <joseph@codesourcery.com>
12871
12872 * c-common.c (c_common_reswords): Add __builtin_complex.
12873 * c-common.h (RID_BUILTIN_COMPLEX): New.
12874
bbceee64
JM
128752011-08-18 Joseph Myers <joseph@codesourcery.com>
12876
12877 * c-common.c (c_common_reswords): Add _Noreturn.
12878 (keyword_is_function_specifier): Handle RID_NORETURN.
12879 * c-common.h (RID_NORETURN): New.
12880
3f8257db 128812011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12882
12883 * c-common.c (unsafe_conversion_p): New function. Check if it is
12884 unsafe to convert an expression to the type.
12885 (conversion_warning): Adjust, use unsafe_conversion_p.
12886 * c-common.h (unsafe_conversion_p): New function declaration.
12887
20906c66
JJ
128882011-08-02 Jakub Jelinek <jakub@redhat.com>
12889
12890 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12891 (c_finish_omp_taskyield): New prototype.
12892 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12893 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12894 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12895 or RHS1 have side-effects, evaluate those too in the right spot,
12896 if it is a decl and LHS is also a decl, error out if they
12897 aren't the same.
12898 (c_finish_omp_taskyield): New function.
12899 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12900 * c-pragma.c (omp_pragmas): Add taskyield.
12901 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12902 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12903 PRAGMA_OMP_CLAUSE_MERGEABLE.
12904
770e5a2e
DS
129052011-07-25 Dodji Seketeli <dodji@redhat.com>
12906
12907 * c-common.h (set_underlying_type): Remove parm name from
12908 declaration.
12909
1baae426
RG
129102011-07-25 Romain Geissler <romain.geissler@gmail.com>
12911
12912 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12913
fcb21722
JM
129142011-07-22 Jason Merrill <jason@redhat.com>
12915
76f86d00
JM
12916 PR c++/49793
12917 * c.opt (Wnarrowing): New.
12918
3a636414
JM
12919 PR c++/30112
12920 * c-common.h: Declare c_linkage_bindings.
12921 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12922
fcb21722
JM
12923 PR c++/49813
12924 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12925 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12926 as flag_isoc99 for 'restrict'.
12927 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12928
02614448
ILT
129292011-07-21 Ian Lance Taylor <iant@google.com>
12930
12931 PR middle-end/49705
12932 * c-common.c (c_disable_warnings): New static function.
12933 (c_enable_warnings): New static function.
12934 (c_fully_fold_internal): Change local unused_p to bool. Call
12935 c_disable_warnings and c_enable_warnings rather than change
12936 c_inhibit_evaluation_warnings.
12937
34429675
JM
129382011-07-20 Jason Merrill <jason@redhat.com>
12939
12940 PR c++/6709 (DR 743)
12941 PR c++/42603 (DR 950)
12942 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12943 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12944 (CPP_DECLTYPE): New.
12945 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12946
5d49b6a7
RG
129472011-07-19 Richard Guenther <rguenther@suse.de>
12948
12949 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12950 * c-omp.c (c_finish_omp_for): Likewise.
12951
e84a58ff
EB
129522011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12953
12954 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12955 body on the next line.
12956
329af3c7
JM
129572011-07-08 Jason Merrill <jason@redhat.com>
12958
4063e61b
JM
12959 PR c++/45437
12960 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12961
329af3c7
JM
12962 PR c++/49673
12963 * c-common.c (c_apply_type_quals_to_decl): Don't check
12964 TYPE_NEEDS_CONSTRUCTING.
12965
1a072294
RG
129662011-07-06 Richard Guenther <rguenther@suse.de>
12967
12968 * c-common.c (c_common_nodes_and_builtins):
12969 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12970
fce5dddd
RG
129712011-07-05 Richard Guenther <rguenther@suse.de>
12972
12973 * c-common.c (c_common_nodes_and_builtins): Build all common
12974 tree nodes first.
12975
45d439ac
JJ
129762011-06-27 Jakub Jelinek <jakub@redhat.com>
12977
56300785
JJ
12978 * c-common.h (c_tree_chain_next): New static inline function.
12979
45d439ac
JJ
12980 * c-common.c (check_builtin_function_arguments): Handle
12981 BUILT_IN_ASSUME_ALIGNED.
12982
e0a8ecf2
AM
129832011-06-21 Andrew MacLeod <amacleod@redhat.com>
12984
12985 * c-common.c: Add sync_ or SYNC__ to builtin names.
12986 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12987
129882011-06-20 Pierre Vittet <piervit@pvittet.com>
12989
12990 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12991 handler.
12992 (gen_pragma_handler): New union.
12993 (internal_pragma_handler): New type.
12994 (c_register_pragma_with_data)
12995 (c_register_pragma_with_expansion_and_data): New functions.
12996
12997 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12998 (c_register_pragma, c_register_pragma_with_expansion)
12999 (c_invoke_pragma_handler): Changed to work with
13000 internal_pragma_handler.
13001 (c_register_pragma_with_data)
13002 (c_register_pragma_with_expansion_and_data): New functions.
13003
677f3fa8
JM
130042011-06-14 Joseph Myers <joseph@codesourcery.com>
13005
13006 * c-common.c: Include common/common-target.h.
13007 (handle_section_attribute): Use
13008 targetm_common.have_named_sections.
13009 * c-cppbuiltin.c: Include common/common-target.h.
13010 (c_cpp_builtins): Use targetm_common.except_unwind_info.
13011
d7fc8c14
RG
130122011-06-10 Richard Guenther <rguenther@suse.de>
13013
13014 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
13015 to print a IDENTIFIER_NODE.
13016
10e48e39
RO
130172011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13018 Joseph Myers <joseph@codesourcery.com>
13019
13020 * c.opt (fbuilding-libgcc): New option.
13021 * c-cppbuiltin.c (c_cpp_builtins): Define
13022 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
13023
6976ae51
JM
130242011-06-07 Jason Merrill <jason@redhat.com>
13025
3ff60975
JM
13026 * c-common.c (max_tinst_depth): Lower default to 900.
13027
6976ae51
JM
13028 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
13029
009db074
RG
130302011-06-07 Richard Guenther <rguenther@suse.de>
13031
13032 * c-common.c (c_common_nodes_and_builtins): Do not set
13033 size_type_node or call set_sizetype.
13034
b4592b92
DS
130352011-06-07 Dodji Seketeli <dodji@redhat.com>
13036
13037 PR debug/49130
13038 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 13039 type when using pointer comparison to compare types.
b4592b92 13040
014ab419
JW
130412011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
13042
13043 * c.opt: Add -Wdelete-non-virtual-dtor.
13044 * c-opts.c (c_common_handle_option): Include it in -Wall.
13045
4f60111f
NF
130462011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
13047
13048 PR bootstrap/49190
13049
13050 Revert:
13051 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13052
13053 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13054 not tree_common.
13055
4cc4f2f4
JJ
130562011-05-27 Jakub Jelinek <jakub@redhat.com>
13057
13058 PR c++/49165
13059 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
13060 C++ don't call c_common_truthvalue_conversion on void type arms.
13061
38e01f9e
NF
130622011-05-27 Nathan Froyd <froydnj@codesourcery.com>
13063
13064 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
13065 (stmt_list_stack): Define.
13066 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
13067 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
13068
92e948a8
NF
130692011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13070
13071 * c-common.c (warning_candidate_p): Check for BLOCKs.
13072
a2fc3e63
NF
130732011-05-26 Nathan Froyd <froydnj@codesourcery.com>
13074
13075 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
13076 not tree_common.
13077
0957c029
JJ
130782011-05-25 Jakub Jelinek <jakub@redhat.com>
13079
13080 * c-common.c (def_fn_type): Remove extra va_end.
13081
828fb3ba
JM
130822011-05-23 Jason Merrill <jason@redhat.com>
13083
13084 PR c++/48106
13085 * c-common.c (c_common_get_narrower): New.
13086 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
13087
dde05067
NF
130882011-05-23 Nathan Froyd <froydnj@codesourcery.com>
13089
13090 * c-common.h (check_function_arguments): Tweak prototype of
13091 check_function_arguments.
13092 * c-common.c (check_function_arguments): Likewise. Adjust
13093 calls to check_function_nonnull, check_function_format, and
13094 check_function_sentinel.
13095 (check_function_sentinel): Take a FUNCTION_TYPE rather than
13096 separate attributes and typelist arguments. Use
13097 FOREACH_FUNCTION_ARGS to iterate over argument types.
13098
3c0d13bf
PC
130992011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
13100
13101 * c-common.c (c_common_reswords): Reorder.
13102 * c-common.h (rid): Likewise.
13103
8242dd04
NF
131042011-05-10 Nathan Froyd <froydnj@codesourcery.com>
13105
13106 * c-common.c (def_fn_type): Don't call build_function_type, call
13107 build_function_type_array or build_varargs_function_type_array
13108 instead.
13109 (c_common_nodes_and_builtins): Likewise.
13110
3d528853
NF
131112011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13112
13113 * c-common.c (c_add_case_label): Omit the loc argument to
13114 build_case_label.
13115 * c-common.h (build_case_label): Remove.
13116 * c-semantics.c (build_case_label): Remove.
13117
a04a722b
JM
131182011-05-05 Joseph Myers <joseph@codesourcery.com>
13119
13120 * c-objc.h (objc_start_method_definition): Update prototype.
13121 * stub-objc.c (objc_start_method_definition): Add extra parameter.
13122
e19a18d4
NF
131232011-05-04 Nathan Froyd <froydnj@codesourcery.com>
13124
13125 * c-common.c (check_main_parameter_types): Reindent. Don't use
13126 TYPE_ARG_TYPES directly.
13127 (handle_nonnull_attribute): Likewise.
13128 (sync_resolve_params): Likewise.
13129 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
13130 to check_format_string.
13131 (handle_format_attribute): Likewise.
13132 (check_format_string): Take a function type to examine instead of
13133 a type list. Use a function_arg_iterator to step through argument
13134 types.
13135
c62c040f
RG
131362011-05-04 Richard Guenther <rguenther@suse.de>
13137
13138 * c-common.c (fix_string_type): Use size_int for index type bounds.
13139 (start_fname_decls): Do not pass NULL to build_int_cst.
13140 (c_init_attributes): Likewise.
13141 * c-lex.c (c_lex_with_flags): Likewise.
13142
c12ff9d8
JM
131432011-04-27 Jason Merrill <jason@redhat.com>
13144
13145 * c-common.c (make_tree_vector_from_list): New.
13146 * c-common.h: Declare it.
13147
304dfbe3
RG
131482011-04-26 Richard Guenther <rguenther@suse.de>
13149
13150 PR preprocessor/48248
13151 * c-ppoutput.c (maybe_print_line): Always optimize newlines
13152 for output size with -P.
13153
3c0d13bf
PC
131542011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
13155
13156 * c-common.c (struct c_common_resword): Add __underlying_type.
13157 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
13158
04695783
JM
131592011-04-20 Jim Meyering <meyering@redhat.com>
13160
13161 * c-format.c (init_dollar_format_checking): Remove useless
13162 if-before-free.
13163
0dc33c3c
NP
131642011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
13165
13166 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 13167 (objc_detect_field_duplicates): New.
0dc33c3c 13168 * stub-objc.c: Likewise.
3c0d13bf 13169
c59633d9
NP
131702011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13171
13172 * stub-objc.c (objc_declare_protocols): Renamed to
13173 objc_declare_protocol.
13174 * c-objc.h: Likewise.
3c0d13bf 13175
32dabdaf
NP
131762011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
13177
13178 * stub-objc.c (objc_declare_class): Updated argument name.
13179
81f653d6
NF
131802011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13181
13182 * c-common.h (c_common_init_ts): Declare.
13183 * c-common.c (c_common_init_ts): Define.
13184
eb345401
NP
131852011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
13186
13187 * c-objc.h (objc_build_message_expr): Updated prototype.
13188 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 13189
a358e188
MJ
131902011-04-12 Martin Jambor <mjambor@suse.cz>
13191
13192 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
13193 of cgraph_node.
13194
e6313a78
RG
131952011-04-11 Richard Guenther <rguenther@suse.de>
13196
13197 * c-common.c (complete_array_type): Build a range type of
13198 proper type.
13199
dcf0c47e
NF
132002011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13201
13202 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
13203 (handle_type_generic_attribute): Likewise.
13204
1ee44b26
JM
132052011-04-07 Jason Merrill <jason@redhat.com>
13206
13207 PR c++/48450
13208 * c-common.c (c_common_truthvalue_conversion): Don't ignore
13209 conversion from C++0x scoped enum.
13210
acce4e77
JM
132112011-04-06 Joseph Myers <joseph@codesourcery.com>
13212
13213 * c-target-def.h: New file.
13214 * c-target.def: New file.
13215 * c-target.h: New file.
13216 * c-common.c (targetcm): Don't define here.
13217 * c-common.h (default_handle_c_option): Declare.
13218 * c-format.c: Include c-target.h instead of target.h.
13219 * c-opts.c: Include c-target.h instead of target.h. Explicitly
13220 include tm.h.
13221 (default_handle_c_option): Move from targhooks.c.
13222
e2eefb55
JJ
132232011-03-29 Jakub Jelinek <jakub@redhat.com>
13224
13225 PR preprocessor/48248
13226 * c-ppoutput.c (print): Add src_file field.
13227 (init_pp_output): Initialize it.
13228 (maybe_print_line): Don't optimize by adding up to 8 newlines
13229 if map->to_file and print.src_file are different file.
13230 (print_line): Update print.src_file.
13231
ba78087b
KT
132322011-03-25 Kai Tietz <ktietz@redhat.com>
13233
13234 * c-ada-spec.c (compare_comment): Use filename_cmp
13235 instead of strcmp for filename.
13236
0edf1bb2
JL
132372011-03-25 Jeff Law <law@redhat.com>
13238
adfac8df 13239 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 13240
c7dc8804
JM
132412011-03-25 Jason Merrill <jason@redhat.com>
13242
13243 * c.opt: Add -std=c++03.
13244
d1d879b1
EB
132452011-03-22 Eric Botcazou <ebotcazou@adacore.com>
13246
13247 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
13248
3f8257db 132492011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
13250
13251 PR target/12171
5050afdf
KT
13252 * c-pretty-print.c (pp_c_specifier_qualifier_list):
13253 Display allowed attributes for function pointer types.
13254 (pp_c_attributes_display): New function to display
13255 attributes having affects_type_identity flag set to true.
13256 * c-pretty-print.h (pp_c_attributes_display): New prototype.
13257
62d784f7
KT
13258 * c-common.c (c_common_attribute_table):
13259 Add new element.
13260 (c_common_format_attribute_table): Likewise.
13261
82d37118
JM
132622011-03-18 Jason Merrill <jason@redhat.com>
13263
49a000c3
JM
13264 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
13265 * c-common.h: Don't declare it here.
13266 * c-common.c: Or define it here.
13267 * c-opts.c (c_common_handle_option): Or set it here.
13268
82d37118
JM
13269 PR c++/35315
13270 * c-common.c (handle_transparent_union_attribute): Don't
13271 make a duplicate type in C++.
13272
17bc631c
JM
132732011-03-15 Jason Merrill <jason@redhat.com>
13274
13275 * c-common.c (max_constexpr_depth): New.
13276 * c-common.h: Declare it.
13277 * c-opts.c (c_common_handle_option): Set it.
13278 * c.opt (fconstexpr-depth): New option.
13279
1b9b91a6
JM
132802011-03-11 Jason Merrill <jason@redhat.com>
13281
f231b5ff
JM
13282 * c-common.c (attribute_takes_identifier_p): Add missing const.
13283
1b9b91a6
JM
13284 PR c++/46803
13285 * c-common.c (attribute_takes_identifier_p): Assume that an
13286 unknown attribute takes an identifier.
13287
a19e4d44
NF
132882011-03-07 Nathan Froyd <froydnj@codesourcery.com>
13289
13290 PR c/47786
13291 * c-common.c (c_type_hash): Call list_length instead of iterating
13292 through DECL_CHAIN. Rename 'i' to 'n_elements'.
13293
982d62f6
JJ
132942011-02-19 Jakub Jelinek <jakub@redhat.com>
13295
13296 PR c/47809
13297 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
13298
0a256240
NP
132992011-02-17 Iain Sandoe <iains@gcc.gnu.org>
13300
13301 * c.opt (fobjc-abi-version=) New.
13302 (fobjc-nilcheck): New.
13303
ba9e6dd5
NF
133042011-02-03 Nathan Froyd <froydnj@codesourcery.com>
13305
13306 PR c++/46890
13307 * c-common.h (keyword_is_decl_specifier): Declare.
13308 * c-common.c (keyword_is_decl_specifier): Define.
13309 (keyword_is_function_specifier): New function.
13310
7273813a
JJ
133112011-01-26 Jakub Jelinek <jakub@redhat.com>
13312
13313 PR c/47473
13314 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
13315 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
13316 REAL_TYPE.
13317
908ef79b
AC
133182011-01-26 Arnaud Charlet <charlet@adacore.com>
13319
13320 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
13321
237e9384
JJ
133222011-01-26 Jakub Jelinek <jakub@redhat.com>
13323
13324 PR pch/47430
13325 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
13326 after init_c_lex if pch_file is set.
13327
47ea1edf
DK
133282011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
13329
d4dba752 13330 PR c++/43601
47ea1edf
DK
13331 * c.opt (-fkeep-inline-dllexport): New switch.
13332
2aa9c6ae
RG
133332011-01-12 Richard Guenther <rguenther@suse.de>
13334
13335 PR middle-end/32511
13336 * c-common.c (handle_weak_attribute): Warn instead of error
13337 on declaring an inline function weak.
13338
7bd11157
TT
133392011-01-05 Tom Tromey <tromey@redhat.com>
13340
13341 * c-common.h (lvalue_error): Update.
13342 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
13343 not error.
13344
0e66e494 133452010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 13346
b4f588c4
NP
13347 PR objc/47075
13348 * c-objc.h (objc_finish_message_expr): Added argument to
13349 prototype.
13350
f4da8dce
NF
133512010-12-22 Nathan Froyd <froydnj@codesourcery.com>
13352
13353 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
13354 Use prototype_p.
13355
46270f14
NP
133562010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
13357
13358 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 13359 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 13360
4816c593
NF
133612010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13362
13363 * c-common.h (readonly_error): Declare.
13364 * c-common.c (readonly_error): Define.
13365
7a6daeb0
NF
133662010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13367
13368 * c-common.h (invalid_indirection_error): Declare.
13369 * c-common.c (invalid_indirection_error): Define.
13370
892f6119
RG
133712010-12-03 Richard Guenther <rguenther@suse.de>
13372
13373 PR c/46745
13374 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13375 (pp_c_unary_expression): Likewise.
13376 (pp_c_expression): Likewise.
13377
6c39e757
NP
133782010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13379
13380 * c-common.h (objc_finish_function): New.
13381 (objc_non_volatilized_type): Removed.
13382 (objc_type_quals_match): Removed.
13383 * stub-objc.c (objc_finish_function): New.
13384 (objc_non_volatilized_type): Removed.
13385 (objc_type_quals_match): Removed.
9faeb493 13386
7c475d11
JM
133872010-11-30 Joseph Myers <joseph@codesourcery.com>
13388
13389 * c-common.h (parse_optimize_options): Declare.
13390 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13391 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13392
71f3e391
JM
133932010-11-29 Joseph Myers <joseph@codesourcery.com>
13394
13395 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13396 GET_ENVIRONMENT.
13397 * c-pch.c (O_BINARY): Don't define here.
13398 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13399
d5fabb58
JM
134002010-11-25 Joseph Myers <joseph@codesourcery.com>
13401
13402 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13403 targetm.except_unwind_info.
13404
299404a1
JM
134052010-11-23 Joseph Myers <joseph@codesourcery.com>
13406
13407 * c-opts.c (c_common_handle_option): Pass location to
13408 set_struct_debug_option.
13409
c98cd5bf
JM
134102010-11-23 Joseph Myers <joseph@codesourcery.com>
13411
13412 * c-common.c (visibility_options): Move from ../opts.c.
13413 * c-common.h (struct visibility_flags, visibility_options):
13414 Declare here.
13415 * c-opts.c (finish_options): Rename to c_finish_options.
13416 (c_common_init): Update call to finish_options.
13417
a9546771
NP
134182010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13419
13420 PR objc/34033
13421 * c-lex.c (lex_string): Check that each string in an Objective-C
13422 string concat sequence starts with either one or zero '@', and
13423 that there are no spurious '@' signs at the end.
13424
24a57808
JM
134252010-11-20 Joseph Myers <joseph@codesourcery.com>
13426
13427 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13428 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13429 HANDLE_PRAGMA_VISIBILITY.
13430 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13431 HANDLE_PRAGMA_VISIBILITY): Don't define.
13432 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13433
a9aa2c3a
NF
134342010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13435
13436 PR c++/16189
13437 PR c++/36888
13438 PR c++/45331
13439 * c-common.h (keyword_begins_type_specifier): Declare.
13440 (keyword_is_storage_class_specifier): Declare.
13441 (keyword_is_type_qualifier): Declare.
13442 * c-common.c (keyword_begins_type_specifier): New function.
13443 (keyword_is_storage_class_specifier): New function.
13444 (keyword_is_type_qualifier): Declare.
13445
5386338c
JM
134462010-11-19 Joseph Myers <joseph@codesourcery.com>
13447
13448 PR c/46547
13449 * c-common.c (in_late_binary_op): Define.
13450 (c_common_truthvalue_conversion): Check in_late_binary_op before
13451 calling c_save_expr.
13452 * c-common.h (in_late_binary_op): Declare.
13453
69ccdddb
JM
134542010-11-19 Joseph Myers <joseph@codesourcery.com>
13455
13456 * c-opts.c (c_common_handle_option): Update calls to
13457 set_struct_debug_option.
13458
6b192a09
NP
134592010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13460
13461 * c-common.h (objc_declare_protocols): Added additional argument.
13462 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13463
fb52b50a
NF
134642010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13465
13466 PR c/33193
13467 * c-common.h (build_real_imag_expr): Declare.
13468 * c-semantics.c (build_real_imag_expr): Define.
13469
b37421c6
JM
134702010-11-17 Joseph Myers <joseph@codesourcery.com>
13471
13472 * c-opts.c (c_common_parse_file): Take no arguments.
13473 * c-common.h (c_common_parse_file): Update prototype.
13474
07078664
JJ
134752010-11-16 Jakub Jelinek <jakub@redhat.com>
13476
13477 PR c++/46401
13478 * c-common.c (warning_candidate_p): Don't track non-const calls
13479 or STRING_CSTs.
13480
c6a13190
ILT
134812010-11-15 Ian Lance Taylor <iant@google.com>
13482
13483 * c-lex.c (init_c_lex): Set macro debug callbacks if
13484 flag_dump_go_spec is set.
13485
925e8657
NP
134862010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13487
13488 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13489 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13490
bb0a9581
NF
134912010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13492
13493 PR preprocessor/45038
13494 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13495 dialects.
13496
c5fa0890
JM
134972010-11-12 Joseph Myers <joseph@codesourcery.com>
13498
13499 * c-common.h (c_family_lang_mask): Declare.
13500 * c-opts.c (c_family_lang_mask): Make extern.
13501 * c-pragma.c (handle_pragma_diagnostic): Use
13502 control_warning_option.
13503
a4d8c676
JM
135042010-11-12 Joseph Myers <joseph@codesourcery.com>
13505
13506 * c-common.c (parse_optimize_options): Update call to
13507 decode_options.
13508 * c-common.h (c_common_handle_option): Update prototype.
13509 * c-opts.c (c_common_handle_option): Take location_t parameter and
13510 pass it to other functions.
13511
f954bd2c
JM
135122010-11-11 Joseph Myers <joseph@codesourcery.com>
13513
13514 * c-opts.c (warning_as_error_callback): Remove.
13515 (c_common_initialize_diagnostics): Don't call
13516 register_warning_as_error_callback.
13517 (c_common_handle_option): Handle -Werror=normalized= here.
13518
d8a07487
JM
135192010-11-10 Joseph Myers <joseph@codesourcery.com>
13520
13521 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13522 in diagnostic.
13523 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13524 letter.
13525 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13526 Remove trailing '.' from diagnostics.
13527 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13528
d5478783
JM
135292010-11-10 Joseph Myers <joseph@codesourcery.com>
13530
13531 * c-common.c (parse_optimize_options): Pass global_dc to
13532 decode_options.
13533 * c-opts.c (c_common_handle_option): Pass &global_options to
13534 set_Wstrict_aliasing.
13535 * c.opt (v): Don't mark Common or document here.
13536
91ebb981
IS
135372010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13538
13539 PR target/44981
13540 * c-format.c (format_type): New type gcc_objc_string_format_type.
13541 (valid_stringptr_type_p): New.
13542 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13543 (check_format_string): Pass expected type, use
91ebb981
IS
13544 valid_stringptr_type_p (), check that the format string types are
13545 consistent with the format specification.
13546 (decode_format_attr): Warn if NSString is used outside objective-c.
13547 (format_types_orig): Add NSString.
13548 (format_name): New.
13549 (format_flags): New.
13550 (check_format_arg): Handle format strings requiring an external parser.
13551 first_target_format_type: New variable.
13552 (handle_format_attribute): Set up first_target_format_type, pass the
13553 expected format arg string type to check_format_string().
ab20d992 13554 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13555 * stub-objc.c (objc_string_ref_type_p): New.
13556 (objc_check_format_arg): New.
13557
bede2adc
NP
135582010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13559
9faeb493 13560 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13561 * c-common.h (objc_build_class_component_ref): New.
13562 * stub-objc.c (objc_build_class_component_ref): New.
13563
9a179d01
NP
135642010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13565
13566 * c.opt (Wproperty-assign-default): New option.
13567
22d8d616
NP
135682010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13569
13570 Implemented -fobjc-std=objc1 flag.
13571 * c.opt (fobjc-std=objc1): New option.
13572
2debdb4f
NP
135732010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13574
13575 Implemented format and noreturn attributes for Objective-C methods.
13576 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13577 attribute for Objective-C methods.
13578
ec52b111
JM
135792010-10-31 Jason Merrill <jason@redhat.com>
13580
13581 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13582 EXPR_LOC_OR_HERE.
13583
46a88c12
NP
135842010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13585
13586 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13587 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13588 (objc_add_property_declaration): Removed arguments for copies and
13589 ivar.
13590 (objc_build_getter_call): Renamed to
13591 objc_maybe_build_component_ref.
13592 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13593 (objc_is_property_ref): New.
13594 * c-common.c (c_common_reswords): Removed copies and ivar.
13595 * stub-objc.c (objc_add_property_declaration): Removed arguments
13596 for copies and ivar.
13597 (objc_build_getter_call): Renamed to
13598 objc_maybe_build_component_ref.
13599 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13600 (objc_is_property_ref): New.
9faeb493 13601
1e4bf85b
AC
136022010-10-29 Arnaud Charlet <charlet@adacore.com>
13603 Matthew Gingell <gingell@adacore.com>
13604
13605 * c-ada-spec.c (separate_class_package): New function.
13606 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13607 name of their enclosing package.
13608 (print_ada_declaration): Use separate_class_package.
13609
81f0bab2
JM
136102010-10-27 Jason Merrill <jason@redhat.com>
13611
2b08f2c5
JM
13612 * c-common.c (c_common_reswords): Add __is_literal_type.
13613 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13614
81f0bab2
JM
13615 * c-common.c (check_case_value): Remove special C++ code.
13616
200290f2
NP
136172010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13618
13619 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13620 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13621 and RID_LAST_PATTR.
13622 (objc_add_property_declaration): Added additional arguments.
13623 (objc_property_attribute_kind): Removed.
13624 (objc_set_property_attr): Removed.
13625 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13626 copy and nonatomic.
13627 * stub-objc.c (objc_add_property_declaration): Added additional
13628 arguments.
13629 (objc_set_property_attr): Removed.
9faeb493 13630
f614132b
NP
136312010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13632
13633 * c-common.h (objc_add_property_variable): Renamed to
13634 objc_add_property_declaration. Added location argument.
13635 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13636
b8a18805
NP
136372010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13638
13639 * c-common.h (objc_maybe_printable_name): New.
13640 * stub-objc.c (objc_maybe_printable_name): New.
13641
3f8257db
JJ
136422010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13643 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13644
13645 * c-common.h (c_common_mark_addressable_vec): Declare.
13646 * c-common.c (c_common_mark_addressable_vec): New function.
13647
249a82c4
NP
136482010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13649
13650 * c-common.h (objc_set_method_type): Removed.
13651 (objc_add_method_declaration): Added boolean argument.
13652 (objc_start_method_definition): Same change.
13653 (objc_build_method_signature): Same change.
13654 * stub-objc.c (objc_set_method_type): Removed.
13655 (objc_add_method_declaration): Added boolean argument.
13656 (objc_start_method_definition): Same change.
13657 (objc_build_method_signature): Same change.
13658
977e30bc
NP
136592010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13660
13661 * c-common.h (finish_file): Removed.
13662 (objc_write_global_declarations): New.
13663 * c-opts.c (c_common_parse_file): Do not call finish_file.
13664 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13665
da57d1b9
NP
136662010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13667
13668 Implemented parsing @synthesize and @dynamic for
13669 Objective-C/Objective-C++.
13670 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13671 (objc_add_synthesize_declaration): New.
13672 (objc_add_dynamic_declaration): New.
13673 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13674 * stub-objc.c (objc_add_synthesize_declaration): New.
13675 (objc_add_dynamic_declaration): New.
9faeb493 13676
0069111f
MM
136772010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13678
13679 PR target/46041
13680 * c-cppbuiltin.c (mode_has_fma): Move function here from
13681 builtins.c. Don't use the fma optab, instead just use the
13682 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13683 using -save-temps.
13684
e426b47b
NP
136852010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13686
13687 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13688
3f8257db 13689 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13690
9faeb493 13691 Radar 4330422
e426b47b
NP
13692 * c-common.h (objc_non_volatilized_type): New declaration
13693 * stub-objc.c (objc_non_volatilized_type): New stub.
13694
90fbfdc3
NP
136952010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13696
e426b47b 13697 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13698
ab20d992 13699 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13700
9faeb493 13701 Radar 4133425
90fbfdc3 13702 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13703 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13704
c37d8c30
IS
137052010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13706
13707 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13708 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13709 (objc_ivar_visibility_kind): New enum.
13710 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13711 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13712 visibility enum.
13713
1b1562a5
MM
137142010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13715
13716 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13717 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13718 has the appropriate fma builtins.
13719 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13720
668ea4b1
IS
137212010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13722
1b1562a5 13723 merge from FSF apple 'trunk' branch.
3f8257db 13724 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13725
668ea4b1
IS
13726 Radars 4436866, 4505126, 4506903, 4517826
13727 * c-common.c (c_common_resword): Define @property and its attributes.
13728 * c-common.h: Define property attribute enum entries.
13729 (OBJC_IS_PATTR_KEYWORD): New.
13730 (objc_property_attribute_kind): New enum.
13731 Declare objc_set_property_attr (), objc_add_property_variable (),
13732 objc_build_getter_call () and objc_build_setter_call ().
13733 * stub-objc.c (objc_set_property_attr): New stub.
13734 (objc_add_property_variable): Likewise.
13735 (objc_build_getter_call): Likewise.
13736 (objc_build_setter_call) Likewise.
1b1562a5 13737
a1178b30
IS
137382010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13739
1b1562a5 13740 merge from FSF apple 'trunk' branch.
ab20d992 13741 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13742
13743 Radar 3803157 (method attributes)
13744 * c-common.c (handle_deprecated_attribute): Recognize
13745 objc methods as valid declarations.
13746 * c-common.h: Declare objc_method_decl ().
1b1562a5 13747 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13748
a75bfaa6
JM
137492010-10-08 Joseph Myers <joseph@codesourcery.com>
13750
13751 * c-common.c (parse_optimize_options): Call
13752 decode_cmdline_options_to_array_default_mask before
13753 decode_options. Update arguments to decode_options.
13754 * c-common.h (c_common_init_options_struct): Declare.
13755 * c-opts.c (c_common_init_options_struct): New. Split out from
13756 c_common_init_options.
13757
f05b9d93
NP
137582010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13759
13760 Implemented fast enumeration for Objective-C.
13761 * c-common.h (objc_finish_foreach_loop): New.
13762 * stub-objc.c (objc_finish_foreach_loop): New.
13763
1ebe4b4f
JM
137642010-10-05 Joseph Myers <joseph@codesourcery.com>
13765
13766 * c-common.h (struct diagnostic_context): Don't declare here.
13767 (c_common_initialize_diagnostics): Declare using
13768 diagnostic_context typedef.
13769 * c-opts.c (c_common_handle_option): Pass global_dc to
13770 handle_generated_option.
13771
d4d24ba4
JM
137722010-10-04 Joseph Myers <joseph@codesourcery.com>
13773
13774 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13775 handle_generated_option.
13776
478a1c5b
ILT
137772010-10-03 Ian Lance Taylor <iant@google.com>
13778
13779 * c.opt (-fplan9-extensions): New option.
13780
82a1c2fe
FXC
137812010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13782
13783 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13784 Remove.
13785 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13786 of duplicating code.
13787
92902b1b
IS
137882010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13789
13790 * c-common.c: Add two new entries for @optional
13791 and @required keywords.
13792
13793 merge from FSF 'apple/trunk' branch.
3f8257db 13794 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13795
13796 Radar 4386773
13797 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13798 objective-c keywords.
13799 (objc_set_method_opt): New declaration.
13800 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13801
46625112
JM
138022010-09-30 Joseph Myers <joseph@codesourcery.com>
13803
13804 * c-common.c (handle_optimize_attribute): Pass &global_options to
13805 cl_optimization_save and cl_optimization_restore.
13806 * c-opts.c (c_common_handle_option): Pass &global_options to
13807 handle_generated_option.
13808 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13809 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13810 &global_options to cl_optimization_restore.
13811
49b91f05
NP
138122010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13813
13814 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13815 Objective-C/Objective-C++ keywords.
13816
13ed556f 138172010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13818
9faeb493
UB
13819 Merge from 'apple/trunk' branch on FSF servers.
13820
3f8257db 13821 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13822
13823 Radar 4281748
13824 * c-common.h (objc_check_global_decl): New declaration.
13825 * stub-objc.c (objc_check_global_decl): New stub.
13826
f0036cca
JM
138272010-09-29 Joseph Myers <joseph@codesourcery.com>
13828
13829 * c.opt: Don't use VarExists.
13830
e3339d0f
JM
138312010-09-29 Joseph Myers <joseph@codesourcery.com>
13832
13833 * c-common.c (c_cpp_error): Update names of diagnostic_context
13834 members.
13835 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13836 cl_optimization members.
13837 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13838 sanitize_cpp_opts, finish_options): Update names of cpp_options
13839 members.
13840
1973201f
NP
138412010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13842
13843 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13844 (objc_is_reserved_word): Removed.
13845 * c-common.c: Updated comments.
13846 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13847 objc_is_reserved_word.
13848 * stub-objc.c (objc_is_reserved_word): Removed.
13849
f7e71da5
IS
138502010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13851
9faeb493 13852 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13853 include attributes.
13854 (objc_start_method_definition): Likewise.
13855 (objc_build_keyword_decl): Likewise.
13856 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13857 (objc_start_method_definition): Likewise.
13858 (objc_build_keyword_decl): Likewise.
13859
c165dca7
IS
138602010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13861
13862 * c-common.h (objc_start_class_interface): Adjust prototype.
13863 (objc_start_category_interface): Likewise.
13864 (objc_start_protocol): Likewise.
13865 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13866 (objc_start_class_interface): Likewise.
13867 (objc_start_category_interface): Likewise.
13868
7458026b
ILT
138692010-09-27 Ian Lance Taylor <iant@google.com>
13870
13871 * c-common.c (c_common_attribute_table): Add no_split_stack.
13872 (handle_no_split_stack_attribute): New static function.
13873
b581b85b
NP
138742010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13875
9faeb493 13876 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13877
3f8257db 13878 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13879
9faeb493 13880 Radar 4229905
b581b85b
NP
13881 * c-common.h (objc_have_common_type): New declaration.
13882 * stub-objc.c (objc_have_common_type): New stub.
13883
13884 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13885
13886 Radar 4154928
13887 * c-common.h (objc_common_type): New prototype.
9faeb493 13888 * stub-objc.c (objc_common_type): New stub.
b581b85b 13889
46a4da10
JH
138902010-09-24 Jan Hubicka <jh@suse.cz>
13891
13892 * c-common.c (handle_leaf_attribute): New function.
13893 (struct attribute_spec c_common_att): Add leaf.
13894
e200444e
JM
138952010-09-22 Joseph Myers <joseph@codesourcery.com>
13896
13897 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13898 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13899 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13900 -include-barrier, -include-directory, -include-directory=,
13901 -include-directory-after, -include-directory-after=,
13902 -include-prefix, -include-prefix=, -include-with-prefix,
13903 -include-with-prefix=, -include-with-prefix-after,
13904 -include-with-prefix-after=, -include-with-prefix-before,
13905 -include-with-prefix-before=, -no-integrated-cpp,
13906 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13907 -output=, -pedantic, -pedantic-errors, -preprocess,
13908 -print-missing-file-dependencies, -trace-includes, -traditional,
13909 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13910 -user-dependencies, -verbose, -write-dependencies,
13911 -write-user-dependencies, no-integrated-cpp, traditional): New.
13912
29a80ea6
NP
139132010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13914
13915 PR objc/23710
ac1fc2fc
NP
13916 * c-common.h (objc_start_method_definition): Return bool instead
13917 of void.
13918 * stub-objc.c (objc_start_method_definition): Return bool instead
13919 of void.
13920
139212010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13922
13923 PR objc/25965
13924 * c-common.h (objc_get_interface_ivars): New declaration.
13925 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13926
de621752
ILT
139272010-09-15 Ian Lance Taylor <iant@google.com>
13928
13929 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13930 messages. Remove period at end of warning message.
de621752 13931
ba885ec5
NS
139322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13933
13934 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13935 (handle_alias_attribute): ... here.
13936 (handle_ifunc_attribute): New.
13937
c5ee1358
MM
139382010-09-06 Mark Mitchell <mark@codesourcery.com>
13939
13940 * c-common.h (do_warn_double_promotion): Declare.
13941 * c-common.c (do_warn_double_promotion): Define.
13942
0a0b3574
MM
139432010-09-05 Mark Mitchell <mark@codesourcery.com>
13944
13945 * c.opt (Wdouble-promotion): New.
13946
d1779886
JM
139472010-09-02 Joseph Myers <joseph@codesourcery.com>
13948
13949 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13950 fvtable-thunks, fxref): Mark no longer supported in help text.
13951
2d2bd949
JM
139522010-09-02 Joseph Myers <joseph@codesourcery.com>
13953
13954 * c.opt (Wimport, fall-virtual, falt-external-templates,
13955 fdefault-inline, fenum-int-equiv, fexternal-templates,
13956 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13957 fname-mangling-version-, fnew-abi, fnonnull-objects,
13958 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13959 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13960 applicable.
13961 (fhandle-exceptions): Mark with Alias and Warn.
13962 * c-opts.c (c_common_handle_option): Don't handle options marked
13963 as ignored.
13964
5de8299c
JM
139652010-09-02 Joseph Myers <joseph@codesourcery.com>
13966
13967 * c.opt (Wcomments, Werror-implicit-function-declaration,
13968 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13969 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13970 aliases.
13971 * c-common.c (option_codes): Use OPT_Wcomment instead of
13972 OPT_Wcomments.
13973 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13974 Don't handle options marked as aliases.
13975
0ceb0201
RG
139762010-08-25 Richard Guenther <rguenther@suse.de>
13977
13978 * c-common.c (c_common_get_alias_set): Remove special
13979 handling for pointers.
13980
ac47786e
NF
139812010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13982
13983 * c-common.c: Use FOR_EACH_VEC_ELT.
13984 * c-gimplify.c: Likewise.
13985 * c-pragma.c: Likewise.
13986
c878765b
JM
139872010-08-16 Joseph Myers <joseph@codesourcery.com>
13988
13989 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13990 RejectDriver.
13991 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13992 RejectDriver.
13993 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13994 instead of OPT_MDX and OPT_MMDX.
13995
603349bf
JM
139962010-08-16 Joseph Myers <joseph@codesourcery.com>
13997
13998 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13999
644fa7ac
JM
140002010-08-12 Joseph Myers <joseph@codesourcery.com>
14001
14002 * c.opt (MD, MMD): Change to MDX and MMDX.
14003 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
14004
481e1176
JM
140052010-08-11 Joseph Myers <joseph@codesourcery.com>
14006
14007 * c-opts.c (c_common_handle_option): Call handle_generated_option
14008 instead of handle_option.
14009
ac8dc9f7
NF
140102010-08-08 Nathan Froyd <froydnj@codesourcery.com>
14011
14012 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
14013 (maybe_apply_renaming_pragma): Delete unneeded declarations.
14014
4f8c876d
NF
140152010-08-08 Nathan Froyd <froydnj@codesourcery.com>
14016
14017 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
14018 (pending_redefine_extname): Change type to a VEC.
14019 (add_to_renaming_pragma_list): Update for new type of
14020 pending_redefine_extname.
ac8dc9f7 14021 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 14022
3b0c690e
AC
140232010-08-04 Arnaud Charlet <charlet@adacore.com>
14024
14025 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
14026 visited.
14027 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
14028 decide whether a type has already been declared/seen.
14029 Do not go to the original type.
14030 (dump_nested_types): New parameter forward.
14031 Generate forward declaration if needed and mark type as visited.
14032 (print_ada_declaration): Call dump_nested_types if not already done.
14033 Mark types as visited.
14034
1890bccc
JM
140352010-08-03 Joseph Myers <joseph@codesourcery.com>
14036
14037 * c.opt (-print-pch-checksum): Remove option.
14038 * c-opts.c (c_common_handle_option): Don't handle
14039 OPT_print_pch_checksum.
14040
5f20c657
JM
140412010-07-27 Joseph Myers <joseph@codesourcery.com>
14042
14043 * c-common.h (c_common_handle_option): Update prototype and return
14044 value type.
14045 * c-opts.c (c_common_handle_option): Update prototype and return
14046 value type. Update calls to handle_option and
14047 enable_warning_as_error.
14048
f551f80c
JJ
140492010-07-27 Jakub Jelinek <jakub@redhat.com>
14050
14051 PR c/45079
14052 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
14053
61ff2bdc
JM
140542010-07-27 Joseph Myers <joseph@codesourcery.com>
14055
14056 * c-common.h (c_common_missing_argument): Remove.
14057 * c-opts.c (c_common_missing_argument): Remove.
14058 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
14059 idirafter, imacros, include, isysroot, isystem, iquote): Add
14060 MissingArgError.
14061 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
14062
7a9bf9a4
JM
140632010-07-27 Joseph Myers <joseph@codesourcery.com>
14064
14065 * c-common.h (c_common_option_lang_mask,
14066 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
14067 New.
14068 (c_common_init_options): Update prototype.
14069 * c-opts.c (c_common_option_lang_mask): New.
14070 (c_common_initialize_diagnostics): Split out of
14071 c_common_init_options.
14072 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
14073 New.
14074 (c_common_init_options): Update prototype. Use decoded options in
14075 search for -lang-asm.
14076
910ad8de
NF
140772010-07-15 Nathan Froyd <froydnj@codesourcery.com>
14078
14079 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
14080 * c-format.c: Likewise.
14081
718f9c0f
MLI
140822010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
14083
14084 * c-common.h: Include diagnostic-core.h. Error if already
14085 included.
14086 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
14087
4d451982
MLI
140882010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
14089
adfac8df 14090 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
14091 Do not include expr.h
14092 (vector_mode_valid_p): Move here.
14093
119fe915
SB
140942010-06-21 DJ Delorie <dj@redhat.com>
14095
14096 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
14097 allow these pragmas anywhere.
14098
140992010-06-14 Jakub Jelinek <jakub@redhat.com>
14100
14101 PR bootstrap/44509
14102 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
14103 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
14104 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
14105 ggc_strdup instead of xstrdup.
14106
141072010-06-10 Jakub Jelinek <jakub@redhat.com>
14108
14109 * c-cppbuiltin.c: Include cpp-id-data.h.
14110 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
14111 (lazy_hex_fp_value): New function.
14112 (builtin_define_with_hex_fp_value): Provide definitions lazily.
14113
6662d794
MLI
141142010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
14115
14116 * c-gimplify.c: Do not include tree-flow.h
14117
38f8b050
JR
141182010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
14119
14120 PR other/44034
14121 * c-common.c: Rename targetm member:
14122 targetm.enum_va_list -> targetm.enum_va_list_p
14123
9589f23e
AS
141242010-06-28 Anatoly Sokolov <aesok@post.ru>
14125
14126 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
14127
3b06d379
SB
141282010-06-28 Steven Bosscher <steven@gcc.gnu.org>
14129
14130 * c-cppbuiltin.c: Do not include except.h.
14131
d166d4c3
AK
141322010-06-24 Andi Kleen <ak@linux.intel.com>
14133
9faeb493
UB
14134 * c-common.c (warn_for_omitted_condop): New.
14135 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 14136
70cb8be6
JM
141372010-06-21 Joseph Myers <joseph@codesourcery.com>
14138
14139 * c.opt (lang-objc): Remove.
14140 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
14141
a4c97feb
JR
141422010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
14143
14144 * c-opts.c: Include "tm_p.h".
14145
6e2f1956
JM
141462010-06-20 Joseph Myers <joseph@codesourcery.com>
14147
14148 * c-common.c (parse_optimize_options): Update call to
14149 decode_options.
14150
bc87224e
NF
141512010-06-18 Nathan Froyd <froydnj@codesourcery.com>
14152
14153 * c-common.c (record_types_used_by_current_var_decl): Adjust for
14154 new type of types_used_by_cur_var_decl.
14155
b49cf425
JR
141562010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
14157
14158 PR bootstrap/44512
14159 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
14160 for C++ standard compliance.
14161
59f9c2ed
JM
141622010-06-16 Jason Merrill <jason@redhat.com>
14163
14164 * c.opt: Add -Wnoexcept.
14165
33766b66
RG
141662010-06-16 Richard Guenther <rguenther@suse.de>
14167
14168 PR c/44555
14169 * c-common.c (c_common_truthvalue_conversion): Remove
14170 premature and wrong optimization concering ADDR_EXPRs.
14171
eff7e30c
AC
141722010-06-15 Arnaud Charlet <charlet@adacore.com>
14173
14174 * c-ada-spec.c (dump_sloc): Remove column info.
14175 (is_simple_enum): New function.
14176 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
14177 enum types when relevant.
14178
6312e84d
MLI
141792010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
14180
9faeb493 14181 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
14182 location.
14183
1cb42611
JM
141842010-06-10 Joseph Myers <joseph@codesourcery.com>
14185
14186 * c-opts.c (c_common_handle_option): Don't handle
14187 OPT_fshow_column.
14188
a9429e29
LB
141892010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
14190
14191 * c-pragma.c (push_alignment): Use typed GC allocation.
14192 (handle_pragma_push_options): Likewise.
14193
14194 * c-common.c (parse_optimize_options): Likewise.
14195
14196 * c-common.h (struct sorted_fields_type): Add variable_size GTY
14197 option.
14198
5498f011
JM
141992010-06-07 Joseph Myers <joseph@codesourcery.com>
14200
14201 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
14202 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14203 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14204 flag_signed_bitfields, warn_strict_null_sentinel,
14205 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
14206 flag_gen_declaration, flag_no_gnu_keywords,
14207 flag_implement_inlines, flag_implicit_templates,
14208 flag_implicit_inline_templates, flag_optional_diags,
14209 flag_elide_constructors, flag_default_inline, flag_rtti,
14210 flag_conserve_space, flag_access_control, flag_check_new,
14211 flag_new_for_scope, flag_weak, flag_working_directory,
14212 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
14213 flag_enforce_eh_specs, flag_threadsafe_statics,
14214 flag_pretty_templates): Remove.
14215 * c-common.h (flag_preprocess_only, flag_nil_receivers,
14216 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
14217 flag_replace_objc_classes, flag_undef, flag_no_builtin,
14218 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
14219 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
14220 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
14221 flag_no_gnu_keywords, flag_implement_inlines,
14222 flag_implicit_templates, flag_implicit_inline_templates,
14223 flag_optional_diags, flag_elide_constructors, flag_default_inline,
14224 flag_rtti, flag_conserve_space, flag_access_control,
14225 flag_check_new, flag_new_for_scope, flag_weak,
14226 flag_working_directory, flag_use_cxa_atexit,
14227 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
14228 flag_threadsafe_statics, flag_pretty_templates,
14229 warn_strict_null_sentinel): Remove.
14230 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
14231 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
14232 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
14233 fimplicit-inline-templates, fimplicit-templates,
14234 flax-vector-conversions, fms-extensions, fnil-receivers,
14235 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
14236 frtti, fshort-double, fshort-enums, fshort-wchar,
14237 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
14238 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
14239 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
14240 gen-decls, undef): Use Var.
14241 (fdefault-inline, foptional-diags): Document as doing nothing.
14242 * c-opts.c (c_common_handle_option): Remove cases for options now
14243 using Var. Mark ignored options as such.
14244
39dabefd
SB
142452010-06-05 Steven Bosscher <steven@gcc.gnu.org>
14246
9faeb493 14247 * c-common.c: Moved to here from parent directory.
39dabefd
SB
14248 * c-common.def: Likewise.
14249 * c-common.h: Likewise.
14250 * c-cppbuiltin.c: Likewise.
14251 * c-dump.c: Likewise.
14252 * c-format.c: Likewise.
14253 * c-format.h : Likewise.
14254 * c-gimplify.c: Likewise.
14255 * c-lex.c: Likewise.
14256 * c-omp.c: Likewise.
14257 * c.opt: Likewise.
14258 * c-opts.c: Likewise.
14259 * c-pch.c: Likewise.
14260 * c-ppoutput.c: Likewise.
14261 * c-pragma.c: Likewise.
14262 * c-pragma.h: Likewise.
14263 * c-pretty-print.c: Likewise.
14264 * c-pretty-print.h: Likewise.
14265 * c-semantics.c: Likewise.
14266 * stub-objc.c: Likewise.
14267
14268 * c-common.c: Include gt-c-family-c-common.h.
14269 * c-pragma.c: Include gt-c-family-c-pragma.h.
14270\f
68127a8e 14271Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
14272
14273Copying and distribution of this file, with or without modification,
14274are permitted in any medium without royalty provided the copyright
14275notice and this notice are preserved.
This page took 5.486824 seconds and 5 git commands to generate.