]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
libstdc++: Fix std::random_device for avr
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
317525b0
GA
12023-01-31 Marek Polacek <polacek@redhat.com>
2
3 PR c++/107593
4 PR c++/108597
5 * c-common.h (instantiation_dependent_expression_p): Declare.
6 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
7 is dependent, invalidate the chain.
8
2371d100
GA
92023-01-26 Marek Polacek <polacek@redhat.com>
10
11 PR c++/105300
12 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
13
9f98cfa5
GA
142023-01-18 Marek Polacek <polacek@redhat.com>
15
16 PR c/108424
17 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
18
5013c3bb
GA
192023-01-14 Jakub Jelinek <jakub@redhat.com>
20
21 PR c++/108365
22 * c-common.h (may_shorten_divmod): New static inline function.
23
242023-01-13 Eric Botcazou <ebotcazou@adacore.com>
25
26 * c-ada-spec.cc (is_float32): New function.
27 (is_float64): Likewise.
28 (is_float128): Tweak.
29 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
30
81ed98bc
GA
312023-01-12 Lewis Hyatt <lhyatt@gmail.com>
32
33 PR preprocessor/108244
34 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
35 deferred pragmas if -fdirectives-only.
36 (init_pragma): Likewise.
37
84723aca
GA
382023-01-09 Martin Liska <mliska@suse.cz>
39
40 PR c/107993
41 * c-attribs.cc (handle_target_clones_attribute): Check for
42 string constant for all target_clone attribute values.
43
0f8fbb57
GA
442023-01-03 Florian Weimer <fweimer@redhat.com>
45
46 * c-cppbuiltin.cc (c_cpp_builtins): Define
47 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
48
492023-01-03 Florian Weimer <fweimer@redhat.com>
50
51 Revert:
52 2023-01-03 Florian Weimer <fweimer@redhat.com>
53
54 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
55 Define if constant is known.
56
572023-01-03 Florian Weimer <fweimer@redhat.com>
58
59 Revert:
60 2023-01-02 Florian Weimer <fweimer@redhat.com>
61
62 * c-cppbuiltin.cc (c_cpp_builtins): Define
63 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
64
fee53a31
GA
652023-01-02 Florian Weimer <fweimer@redhat.com>
66
67 * c-cppbuiltin.cc (c_cpp_builtins): Define
68 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
69
702023-01-02 Florian Weimer <fweimer@redhat.com>
71
72 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
73 Define if constant is known.
74
d2ef2327
GA
752022-12-19 Marek Polacek <polacek@redhat.com>
76
77 PR c/98487
78 * c-format.cc (check_function_format): Use get_attribute_name.
79
5fb1e674
GA
802022-12-16 Qing Zhao <qing.zhao@oracle.com>
81
82 * c.opt (Wstrict-flex-arrays): New option.
83
596dbfff
GA
842022-12-02 Andrew MacLeod <amacleod@redhat.com>
85
86 * c-attribs.cc (handle_deprecated_attribute): Use type when
87 using TYPE_NAME.
88
b35680ec
GA
892022-12-02 Jakub Jelinek <jakub@redhat.com>
90
91 PR c++/84469
92 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
93 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
94 to any of the structured binding decls.
95
6eea85a9
GA
962022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
97 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
98
99 PR driver/107787
100 * c-common.cc (fold_offsetof,
101 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
102 instead of OPT_Warray_bounds.
103
9a1b4f1d
GA
1042022-11-24 Jakub Jelinek <jakub@redhat.com>
105
106 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
107 with a dot.
108
8761284f
GA
1092022-11-23 Andrew Pinski <apinski@marvell.com>
110 Jakub Jelinek <jakub@redhat.com>
111
112 PR c/107127
113 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
114 instead of walk_tree for c_genericize_control_r.
115
1162022-11-23 Jakub Jelinek <jakub@redhat.com>
117
118 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
119 fcontract-role=, fcontract-semantic=): Add RejectNegative.
120 (fcontract-build-level=): Terminate description with dot.
121
fb98ede8
GA
1222022-11-19 Jakub Jelinek <jakub@redhat.com>
123
124 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
125 value from 202207L to 202211L.
126
1272022-11-19 Jeff Chapman II <jchapman@lock3software.com>
128 Andrew Sutton <asutton@lock3software.com>
129 Andrew Marmaduke <amarmaduke@lock3software.com>
130 Michael Lopez <mlopez@lock3software.com>
131 Jason Merrill <jason@redhat.com>
132
133 * c.opt: Add contracts flags.
134 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
135 macros.
136
80909529
GA
1372022-11-16 Marek Polacek <polacek@redhat.com>
138
139 PR c++/106649
140 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
141 C++23.
142 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
143 depending on cxx_dialect.
144 * c.opt (Winvalid-constexpr): New option.
145
1462022-11-16 Jakub Jelinek <jakub@redhat.com>
147
148 * c-common.def (CONCEPT_DECL): New tree, moved here from
149 cp-tree.def.
150 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
151 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
152 attribute on CONCEPT_DECL.
153
cdc34229
GA
1542022-11-15 Lewis Hyatt <lhyatt@gmail.com>
155
156 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
157 than a hard-coded string.
158
83d400bd
GA
1592022-11-15 Jakub Jelinek <jakub@redhat.com>
160
161 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
162 __cpp_multidimensional_subscript macro value to 202211L.
163
1642022-11-15 Patrick Palka <ppalka@redhat.com>
165
166 PR c++/107638
167 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
168 iff SUPPORTS_INIT_PRIORITY.
169
1702022-11-14 Martin Liska <mliska@suse.cz>
171
172 Revert:
173 2022-11-09 Martin Liska <mliska@suse.cz>
174
175 * c-target.def: Port to RST.
176
30d77d49
GA
1772022-11-12 Joseph Myers <joseph@codesourcery.com>
178
179 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
180
5b6ce16a
GA
1812022-11-11 Jonathan Wakely <jwakely@redhat.com>
182
183 PR c/85487
184 * c-pragma.cc (handle_pragma_ignore): New function.
185 (init_pragma): Register region and endregion pragmas.
186
1cdfd0e5
GA
1872022-11-09 Martin Liska <mliska@suse.cz>
188
189 * c-target.def: Port to RST.
190
05788e9b
GA
1912022-11-05 Lewis Hyatt <lhyatt@gmail.com>
192
193 PR preprocessor/55971
194 * c-ppoutput.cc (adjust_for_newlines): Update comment.
195
d29260ce
GA
1962022-11-03 Jason Merrill <jason@redhat.com>
197
198 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
199 -fconcepts-ts before C++20.
200
3055829a
GA
2012022-10-28 Joseph Myers <joseph@codesourcery.com>
202
203 * c-common.cc (def_fn_type): Call build_function_type for
204 zero-argument variable-argument function.
205 (c_common_nodes_and_builtins): Build default_function_type with
206 build_function_type.
207 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
208 option.
209
2102022-10-28 Joseph Myers <joseph@codesourcery.com>
211
212 PR c/61469
213 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
214 New. Moved from cp/cp-tree.h.
215 * c-warn.cc (warnings_for_convert_and_check): Do not consider
216 conversions to enum with underlying type bool to overflow.
217
486a5037
GA
2182022-10-26 Marek Polacek <polacek@redhat.com>
219
220 PR c++/106393
221 * c.opt (Wdangling-reference): New.
222
87f9c4a4
GA
2232022-10-19 Joseph Myers <joseph@codesourcery.com>
224
225 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
226 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
227 and FMT_LEN_wf64.
228 (NOARGUMENTS, NOLENGTHS): Update definitions.
229 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
230 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
231 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
232 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
233 (T_UF64, T2X_UF64): New macros.
234 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
235 and wfN length modifiers.
236 (print_char_table, scan_char_table): Add entries using wN and wfN
237 length modifiers.
238
21de009f
GA
2392022-10-18 Joseph Myers <joseph@codesourcery.com>
240
241 PR c/36113
242 * c-common.cc (c_common_type_for_size): Add fallback to
243 widest_unsigned_literal_type_node or
244 widest_integer_literal_type_node for precision that may not
245 exactly match the precision of those types.
246
baeec7cc
GA
2472022-10-14 Jakub Jelinek <jakub@redhat.com>
248
249 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
250 predefine __BFLT16_*__ macros and for C++23 also
251 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
252 macros for -fbuilding-libgcc.
253 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
254
2552022-10-14 Jakub Jelinek <jakub@redhat.com>
256
257 PR middle-end/323
258 PR c++/107097
259 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
260 the tree being specific to C/ObjC.
261 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
262 in C++ the same as in C.
263 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
264 even for C++.
265
621a911d
GA
2662022-10-13 Joseph Myers <joseph@codesourcery.com>
267
268 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
269 value 2 for *_IS_IEC_60559.
270
781f477a
GA
2712022-10-12 Lewis Hyatt <lhyatt@gmail.com>
272
273 PR preprocessor/60014
274 PR preprocessor/60723
275 * c-ppoutput.cc (class token_streamer): Remove member
276 line_marker_emitted to...
277 (token_streamer::stream): ...a local variable here. Set
278 print.prev_was_system_token on all code paths.
279
27bfe54e
GA
2802022-10-10 Nathan Sidwell <nathan@acm.org>
281
282 * c-opts.cc (c_common_post_options): Bump abi to 18.
283
2842022-10-10 Marek Polacek <polacek@redhat.com>
285
286 PR c++/106937
287 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
288 attributes here.
289 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
290 attributes here.
291 (pp_c_attributes): Remove.
292 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
293 get_attribute_name. Don't print a trailing space when printing the
294 [[]] form.
295 * c-pretty-print.h (pp_c_attributes): Remove.
296
9ff6c33e
GA
2972022-10-07 Qing Zhao <qing.zhao@oracle.com>
298
299 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
300 (c_common_attribute_table): New item for strict_flex_array.
301 * c.opt: (fstrict-flex-arrays): New option.
302 (fstrict-flex-arrays=): New option.
303
3042022-10-07 Martin Liska <mliska@suse.cz>
305
306 * name-hint.h: Use std::move.
307
3082022-10-07 Jakub Jelinek <jakub@redhat.com>
309
310 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
311 only in gnu namespace or as standard attribute, treat fallthrough
312 attributes in other namespaces like any other unknown attribute.
313
629d04d3
GA
3142022-10-06 Joseph Myers <joseph@codesourcery.com>
315
316 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
317 typeof_unqual.
318 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
319 (D_EXT11): New macro. Values of subsequent macros updated.
320
3212022-10-06 Jakub Jelinek <jakub@redhat.com>
322
323 PR c++/106654
324 * c-attribs.cc (handle_assume_attribute): New function.
325 (c_common_attribute_table): Add entry for assume attribute.
326 * c-lex.cc (c_common_has_attribute): Handle
327 __have_cpp_attribute (assume).
328
85872a69
GA
3292022-10-04 Jakub Jelinek <jakub@redhat.com>
330
331 * c-omp.cc (c_omp_directives): Uncomment begin declare target
332 entry.
333
69fd6dcc
GA
3342022-10-03 Patrick Palka <ppalka@redhat.com>
335
336 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
337 RID_IS_SAME_AS.
338
3392022-10-03 Joseph Myers <joseph@codesourcery.com>
340
341 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
342 special-case __*_EPSILON__ setting for IBM long double for C2x.
343
3a221b73
GA
3442022-09-30 Patrick Palka <ppalka@redhat.com>
345
346 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
347 C++ traits.
348 * c-common.h (enum rid): Likewise.
349
bbdcdf5c
GA
3502022-09-29 Joseph Myers <joseph@codesourcery.com>
351
352 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
353 C.
354
3552022-09-29 Patrick Palka <ppalka@redhat.com>
356
357 * c-common.cc (c_common_reswords): Add __remove_cv,
358 __remove_reference and __remove_cvref.
359 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
360 and RID_REMOVE_CVREF.
361
1f16a020
GA
3622022-09-27 Marek Polacek <polacek@redhat.com>
363
364 PR c++/101165
365 PR c++/106882
366 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
367
3682022-09-27 Marek Polacek <polacek@redhat.com>
369
370 * c-format.cc (c_keywords): Drop nothrow.
371
3722022-09-27 Jakub Jelinek <jakub@redhat.com>
373
374 PR c++/106651
375 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
376 __cpp_static_call_operator=202207L for C++23.
377
3782022-09-27 Jakub Jelinek <jakub@redhat.com>
379
380 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
381 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
382 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
383 * c-pragma.cc (omp_pragmas): Add assumes and begin.
384 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
385 (omp_pragmas_simd): Add assume.
386 * c-common.h (c_omp_directives): Declare.
387 * c-omp.cc (omp_directives): Rename to ...
388 (c_omp_directives): ... this. No longer static. Uncomment
389 assume, assumes, begin assumes and end assumes entries.
390 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
391 to PRAGMA_OMP_END.
392 (c_omp_categorize_directive): Adjust for omp_directives to
393 c_omp_directives renaming.
394
3952022-09-27 Jakub Jelinek <jakub@redhat.com>
396
397 PR c++/106652
398 PR c++/85518
399 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
400 _Float{32,64,128}x flags from D_CONLY to 0.
401 (shorten_binary_op): Punt if common_type returns error_mark_node.
402 (shorten_compare): Likewise.
403 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
404 and _Float{32,64,128}x builtin types if available. For C++
405 clear float128t_type_node.
406 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
407 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
408 * c-lex.cc (interpret_float): For q/Q suffixes prefer
409 float128t_type_node over float128_type_node. Allow
410 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
411 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
412 with pedwarn. Don't call excess_precision_type for C++.
413
220c4d8e
GA
4142022-09-26 Marek Polacek <polacek@redhat.com>
415
416 PR c++/106656
417 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
418 for C++20.
419
4afaeaab
GA
4202022-09-23 Marek Polacek <polacek@redhat.com>
421
422 PR c++/106784
423 * c-common.cc (c_common_reswords): Add __is_convertible and
424 __is_nothrow_convertible.
425 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
426 RID_IS_NOTHROW_CONVERTIBLE.
427
279c6715
GA
4282022-09-22 David Malcolm <dmalcolm@redhat.com>
429
430 PR c/106830
431 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
432 values that don't fit in uhwi.
433
d0fc05e8
GA
4342022-09-15 Richard Biener <rguenther@suse.de>
435
436 * c-common.h (build_void_list_node): Remove.
437 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
438 void_list_node.
439
861d1a11
GA
4402022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
441
442 * c-format.cc (convert_format_name_to_system_name): Fix warning.
443
fe2a8ce9
GA
4442022-09-07 Joseph Myers <joseph@codesourcery.com>
445
446 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
447 for alignas, alignof, bool, false, static_assert, thread_local and
448 true.
449
4502022-09-07 Jakub Jelinek <jakub@redhat.com>
451
452 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
453 " in comments" from description.
454 (Wunicode): New option.
455
25aeb922
GA
4562022-09-06 Jakub Jelinek <jakub@redhat.com>
457
458 PR c/106836
459 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
460
83f2f228
GA
4612022-09-03 Jakub Jelinek <jakub@redhat.com>
462
463 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
464 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
465 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
466 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
467
c64b0947
GA
4682022-09-02 David Malcolm <dmalcolm@redhat.com>
469
470 PR c/90885
471 * c-common.h (check_for_xor_used_as_pow): New decl.
472 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
473 * c-warn.cc (check_for_xor_used_as_pow): New.
474 * c.opt (Wxor-used-as-pow): New.
475
bb0a1556
GA
4762022-09-01 Jason Merrill <jason@redhat.com>
477
478 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
479 char8_t.
480 (braced_list_to_string): Check for char-sized elements.
481
4822022-09-01 Jakub Jelinek <jakub@redhat.com>
483
484 PR c++/106655
485 * c.opt (-Winvalid-utf8): New warning.
486 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
487 Set cpp_opts->cpp_input_charset_explicit.
488 (c_common_post_options): If -finput-charset=UTF-8 is explicit
489 in C++23, enable -Winvalid-utf8 by default and if -pedantic
490 or -pedantic-errors, make it a pedwarn.
491
542c60c4
GA
4922022-08-31 Joseph Myers <joseph@codesourcery.com>
493
494 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
495 for LABEL_DECL.
496 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
497 decl_attributes.
498 * c-common.h (do_case, c_add_case_label): Update declarations.
499 * c-lex.cc (c_common_has_attribute): For C, produce a result of
500 201910 for fallthrough and 202106 for maybe_unused.
501
16f542d6
GA
5022022-08-26 Marek Polacek <polacek@redhat.com>
503
504 PR c++/81159
505 * c.opt (Wself-move): New option.
506
5072022-08-26 Jakub Jelinek <jakub@redhat.com>
508
509 * c-common.cc (check_builtin_function_arguments): Handle
510 BUILT_IN_ISSIGNALING.
511
5122022-08-26 Jakub Jelinek <jakub@redhat.com>
513
514 PR c++/106648
515 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
516 __cpp_named_character_escapes to 202207L.
517
5d4389dc
GA
5182022-08-25 Marek Polacek <polacek@redhat.com>
519
520 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
521 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
522 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
523 (struct c_common_resword): Resize the disable member.
524 (D_C2X): Add.
525 (nullptr_node): Define.
526 (nullptr_type_node): Define.
527 (NULLPTR_TYPE_P): Define.
528 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
529 NULLPTR_TYPE.
530 (c_pretty_printer::direct_abstract_declarator): Likewise.
531 (c_pretty_printer::constant): Likewise.
532
47a61e65
GA
5332022-08-16 Tom Honermann <tom@honermann.net>
534
535 PR c++/106423
536 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
537 diagnostics in C++20 and later.
538 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
539
5cd525f0
GA
5402022-08-11 Marek Polacek <polacek@redhat.com>
541
542 PR middle-end/102633
543 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
544 suppress_warning here.
545
5f17badb
GA
5462022-08-08 Tom Honermann <tom@honermann.net>
547
548 PR preprocessor/106426
549 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
550 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
551
5522022-08-08 Tom Honermann <tom@honermann.net>
553
554 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
555 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
556 enabled.
557 * c-opts.cc (c_common_post_options): Set flag_char8_t if
558 targeting C2x.
559
4a7274dd
GA
5602022-07-31 Lewis Hyatt <lhyatt@gmail.com>
561
562 PR c++/66290
563 * c-common.h: Rename global done_lexing to
564 override_libcpp_locations.
565 * c-common.cc (c_cpp_diagnostic): Likewise.
566 * c-opts.cc (c_common_finish): Set override_libcpp_locations
567 (formerly done_lexing) immediately prior to calling cpp_finish ().
568
1e2c5f4c
GA
5692022-07-27 Lewis Hyatt <lhyatt@gmail.com>
570
571 * c-ppoutput.cc (token_streamer::stream): Update input_location
572 prior to streaming each token.
573
0e6fa997
GA
5742022-07-23 Immad Mir <mirimmad@outlook.com>
575
576 * c-attribs.cc: (c_common_attribute_table): add three new attributes
577 namely: fd_arg, fd_arg_read and fd_arg_write.
578 (handle_fd_arg_attribute): New.
579
bdc7b765
GA
5802022-07-15 Marek Polacek <polacek@redhat.com>
581
582 PR c++/104477
583 * c-common.cc (c_common_reswords): Add
584 __reference_constructs_from_temporary and
585 __reference_converts_from_temporary.
586 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
587 RID_REF_CONVERTS_FROM_TEMPORARY.
588
5892022-07-15 Jonathan Wakely <jwakely@redhat.com>
590
591 * c-format.cc (class range_label_for_format_type_mismatch):
592 Adjust to new label_text API.
593
c72d4714
GA
5942022-07-11 Lewis Hyatt <lhyatt@gmail.com>
595
596 PR preprocessor/106252
597 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
598 option argument prior to verifying the option was found.
599
6345c414
GA
6002022-07-07 David Malcolm <dmalcolm@redhat.com>
601
602 * c-format.cc (range_label_for_format_type_mismatch::get_text):
603 Update for removal of label_text::maybe_free in favor of automatic
604 memory management.
605
4bc92c3b
GA
6062022-07-06 Lewis Hyatt <lhyatt@gmail.com>
607
608 PR preprocessor/53920
609 PR c++/53431
610 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
611 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
612 (c_pp_stream_token): Declare.
613 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
614 pragmas to...
615 (should_output_pragmas): ...here. New function.
616 (token_streamer::stream): Support handling early pragmas.
617 (do_line_change): Likewise.
618 (c_pp_stream_token): New function.
619 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
620 (pragma_diagnostic_lex_normal): New function. Moved logic for
621 interpreting GCC diagnostic pragmas here.
622 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
623 directly from libcpp.
624 (handle_pragma_diagnostic): Refactor into helper function...
625 (handle_pragma_diagnostic_impl): ...here. New function.
626 (handle_pragma_diagnostic_early): New function.
627 (handle_pragma_diagnostic_early_pp): New function.
628 (struct pragma_ns_name): Renamed to...
629 (struct pragma_pp_data): ...this. Add new "early_handler" member.
630 (c_register_pragma_1): Support early pragmas in the preprocessor.
631 (c_register_pragma_with_early_handler): New function.
632 (c_register_pragma): Support the new early handlers in struct
633 internal_pragma_handler.
634 (c_register_pragma_with_data): Likewise.
635 (c_register_pragma_with_expansion): Likewise.
636 (c_register_pragma_with_expansion_and_data): Likewise.
637 (c_invoke_early_pragma_handler): New function.
638 (c_pp_invoke_early_pragma_handler): New function.
639 (init_pragma): Add early pragma support for diagnostic pragmas.
640 * c-pragma.h (struct internal_pragma_handler): Add new early handler
641 members.
642 (c_register_pragma_with_early_handler): Declare.
643 (c_invoke_early_pragma_handler): Declare.
644 (c_pp_invoke_early_pragma_handler): Declare.
645
d1f3a3ff
GA
6462022-07-05 Marek Polacek <polacek@redhat.com>
647
648 PR c++/105626
649 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
650 u8 strings.
651
ed974488
GA
6522022-07-01 Marek Polacek <polacek@redhat.com>
653
654 PR c++/106111
655 * c-common.h (enum rid): Update RID_LAST_CXX20.
656
976196b3
GA
6572022-06-30 Jonathan Wakely <jwakely@redhat.com>
658
659 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
660 names.
661
84c2131d
GA
6622022-06-24 Jason Merrill <jason@redhat.com>
663
664 PR c++/87729
665 PR c++/20423
666 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
667
4390e7bf
GA
6682022-06-18 Jakub Jelinek <jakub@redhat.com>
669
670 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
671 Use flag_sanitize_trap & SANITIZE_??? instead of
672 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
673 and flag_sanitize_trap differs for them, emit __builtin_trap only
674 for the comparison where trap is requested.
675 (ubsan_instrument_vla, ubsan_instrument_return): Use
676 lag_sanitize_trap & SANITIZE_??? instead of
677 flag_sanitize_undefined_trap_on_error.
678
c3642271
GA
6792022-06-13 Jason Merrill <jason@redhat.com>
680
681 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
682
d9176e64
GA
6832022-05-27 Marek Polacek <polacek@redhat.com>
684
685 PR c/90658
686 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
687
6882022-05-27 Jakub Jelinek <jakub@redhat.com>
689
690 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
691
57f2ce6a
GA
6922022-05-20 David Malcolm <dmalcolm@redhat.com>
693
694 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
695 and "override".
696 * c-pretty-print.h: Likewise.
697
1cda629f
GA
6982022-05-18 Marek Polacek <polacek@redhat.com>
699
700 PR c/105131
701 * c.opt (Wenum-int-mismatch): New.
702
7032022-05-18 Marek Polacek <polacek@redhat.com>
704
705 PR c++/105497
706 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
707 enumerator when it was marked with attribute unused.
708
7092022-05-18 Eric Botcazou <ebotcazou@adacore.com>
710
711 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
712 floating-point complex types.
713 <POINTER_TYPE>: Do not use limited_with clause if the designated
714 type is a scalar type.
715
3d9439b1
GA
7162022-05-17 Jakub Jelinek <jakub@redhat.com>
717
718 * c-omp.cc (c_finish_omp_depobj): Handle
719 OMP_CLAUSE_DEPEND_INOUTSET.
720
702bd11f
GA
7212022-05-16 Jason Merrill <jason@redhat.com>
722
723 PR c/105492
724 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
725 here.
726
7272022-05-16 Martin Liska <mliska@suse.cz>
728
729 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
730 (c_common_nodes_and_builtins): Likewise.
731 * c-format.cc (check_tokens): Likewise.
732 (check_plain): Likewise.
733 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
734 (init_pragma): Likewise.
735 * known-headers.cc (get_string_macro_hint): Likewise.
736 (get_stdlib_header_for_name): Likewise.
737 * c-attribs.cc: Likewise.
738
9df4ffe4
GA
7392022-05-13 Richard Biener <rguenther@suse.de>
740
741 * c-omp.cc: Remove gimple-fold.h include.
742
49ace834
GA
7432022-05-12 Jakub Jelinek <jakub@redhat.com>
744
745 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
746 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
747 if null_pointer_node.
748
d0d513b5
GA
7492022-05-11 Martin Liska <mliska@suse.cz>
750
751 PR target/105355
752 * c-opts.cc (c_common_handle_option): Change option name.
753 * c.opt: Remove Joined and use Separate option.
754
bd022ff9
GA
7552022-05-09 Alex Coplan <alex.coplan@arm.com>
756
757 * c-common.h (get_dump_info): Delete.
758 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
759 from the global dump_manager instead of the (now obsolete)
760 get_dump_info.
761 * c-opts.cc (original_dump_file): Delete.
762 (original_dump_flags): Delete.
763 (c_common_parse_file): Switch to using global dump_manager to
764 manage the original dump file; fix leak of dump file.
765 (get_dump_info): Delete.
766
a1947c92
GA
7672022-05-07 Marek Polacek <polacek@redhat.com>
768
769 PR c++/101833
770 PR c++/47634
771 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
772 with FN being either a function declaration or function type. Use
773 maybe_adjust_arg_pos_for_attribute.
774 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
775 check_function_format.
776 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
777 (positional_argument): Adjust.
778 * c-format.cc (get_constant): Rename to ...
779 (validate_constant): ... this. Take EXPR by reference. Return bool
780 instead of tree.
781 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
782 return value of validate_constant.
783 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
784 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
785 (check_function_format): Adjust a parameter name.
786 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
787
3e7db517
GA
7882022-05-04 Marek Polacek <polacek@redhat.com>
789
790 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
791 char to int.
792
95874f95
GA
7932022-04-30 Jason Merrill <jason@redhat.com>
794
795 PR c/100545
796 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
797 and typedef.
798 * c-common.cc (set_underlying_type): Add assert.
799
01ad093b
GA
8002022-04-26 Patrick Palka <ppalka@redhat.com>
801
802 PR c++/105304
803 * c-common.cc (verify_tree) [restart]: Move up to before the
804 NULL test.
805
da066c42
GA
8062022-04-11 Jakub Jelinek <jakub@redhat.com>
807
808 PR c++/105186
809 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
810 and __int%d__ builtin types, initialize corresponding ridpointers
811 entry.
812
150ab50f
GA
8132022-03-30 Marek Polacek <polacek@redhat.com>
814
815 PR c++/101030
816 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
817 conversion_warning when OP1 is null.
818
8192022-03-30 Thomas Schwinge <thomas@codesourcery.com>
820
821 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
822 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
823 option properties.
824
8252022-03-30 Thomas Schwinge <thomas@codesourcery.com>
826
827 * c.opt (Wuse-after-free): Remove.
828
8292022-03-30 Thomas Schwinge <thomas@codesourcery.com>
830
831 * c.opt (Warray-bounds): Remove.
832
d2906412
GA
8332022-03-26 Thomas Schwinge <thomas@codesourcery.com>
834
835 * c.opt: Properly quote comment.
836
31e989a2
GA
8372022-03-25 Eric Botcazou <ebotcazou@adacore.com>
838
839 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
840 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
841 the referenced type instead. Deal with the anonymous original type
842 of a typedef'ed type. In the actual access case, follow the chain
843 of external subtypes.
844 <TYPE_DECL>: Tidy up control flow.
845
d156bb87
GA
8462022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
847
848 * c-ada-spec.cc: Change array length
849
d7f00da1
GA
8502022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
851
852 * c-common.cc (c_family_tests): Call the new tests.
853 * c-common.h (c_diagnostic_tests): Declare.
854 (c_opt_problem_cc_tests): Likewise.
855
8562022-03-19 Jakub Jelinek <jakub@redhat.com>
857
858 PR c++/101515
859 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
860 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
861 be printed.
862
9fc8f278
GA
8632022-03-16 Christophe Lyon <christophe.lyon@arm.com>
864 Roger Sayle <roger@nextmovesoftware.com>
865
866 PR c/98198
867 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
868
8692022-03-16 Patrick Palka <ppalka@redhat.com>
870
871 PR c++/96780
872 * c.opt: Add -ffold-simple-inlines.
873
b9756c08
GA
8742022-03-13 Tobias Burnus <tobias@codesourcery.com>
875
876 * c-target.def (check_string_object_format_arg): Fix description typo.
877
57eeedda
GA
8782022-03-12 Thomas Schwinge <thomas@codesourcery.com>
879
880 PR other/65095
881 * c-common.h (c_omp_map_clause_name): Remove.
882 * c-omp.cc (c_omp_map_clause_name): Remove.
883
8cc4f9cd
GA
8842022-03-09 Jakub Jelinek <jakub@redhat.com>
885
886 PR c/104711
887 * c-opts.cc (c_common_post_options): Don't enable
888 -Wshift-negative-value from -Wextra for C++20 or later.
889 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
890 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
891 instead of TYPE_UNSIGNED.
892
e6533e2e
GA
8932022-03-07 Jakub Jelinek <jakub@redhat.com>
894
895 * c-attribs.cc: Fix up duplicated word issue in a comment.
896
12d4552e
GA
8972022-03-01 Martin Liska <mliska@suse.cz>
898
899 PR ipa/104533
900 * c-attribs.cc (handle_target_clones_attribute): Use
901 get_target_clone_attr_len and report warning soon.
902
0bdb0498
GA
9032022-02-17 Jonathan Wakely <jwakely@redhat.com>
904
905 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
906 (handle_pragma_weak): Likewise.
907 (handle_pragma_scalar_storage_order): Likewise.
908 (handle_pragma_redefine_extname): Likewise.
909 (handle_pragma_visibility): Likewise.
910 (handle_pragma_diagnostic): Likewise.
911 (handle_pragma_target): Likewise.
912 (handle_pragma_optimize): Likewise.
913 (handle_pragma_push_options): Likewise.
914 (handle_pragma_pop_options): Likewise.
915 (handle_pragma_reset_options): Likewise.
916 (handle_pragma_message): Likewise.
917 (handle_pragma_float_const_decimal64): Likewise.
918
cb3afcd2
GA
9192022-02-16 Jakub Jelinek <jakub@redhat.com>
920
921 PR c/104531
922 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
923 build_binary_op with LT_EXPR and only if that doesn't return
924 error_mark_node call build_modify_expr.
925
9262022-02-16 Jakub Jelinek <jakub@redhat.com>
927
928 PR c/104510
929 * c-common.cc (shorten_compare): Convert original arguments to
930 the original *restype_ptr when mixing binary and decimal float.
931
1f8a09d2
GA
9322022-02-14 Richard Biener <rguenther@suse.de>
933
934 PR c/104505
935 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
936 internal function calls.
937
e8d68f0a
GA
9382022-02-11 Richard Biener <rguenther@suse.de>
939
940 * c-attribs.cc (c_common_attribute_table): Add entry for
941 vector_mask.
942 (handle_vector_mask_attribute): New.
943
a645583d
GA
9442022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
945
946 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
947 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
948 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
949
3adf509f
GA
9502022-02-09 Jason Merrill <jason@redhat.com>
951
952 * c-cppbuiltin.cc (c_cpp_builtins): Update values
953 of __cpp_constexpr and __cpp_concepts for C++20.
954
bb99171b
GA
9552022-01-24 Marek Polacek <polacek@redhat.com>
956
957 PR preprocessor/104030
958 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
959
9dd44357
GA
9602022-01-21 Jakub Jelinek <jakub@redhat.com>
961
962 PR c++/104148
963 * c-common.h (check_function_arguments_recurse): Add for_format
964 arg.
965 * c-common.cc (check_function_nonnull): Pass false to
966 check_function_arguments_recurse's last argument.
967 (check_function_arguments_recurse): Add for_format argument,
968 if true, don't stop on warning_suppressed_p.
969 * c-format.cc (check_format_info): Pass true to
970 check_function_arguments_recurse's last argument.
971
fe1ad141
GA
9722022-01-19 David Malcolm <dmalcolm@redhat.com>
973
974 * c-common.cc (c_common_c_tests): Rename to...
975 (c_common_cc_tests): ...this.
976 (c_family_tests): Update calls for .c to .cc renaming.
977 * c-common.h (c_format_c_tests): Rename to...
978 (c_format_cc_tests): ...this.
979 (c_indentation_c_tests): Rename to...
980 (c_indentation_cc_tests): ...this.
981 (c_pretty_print_c_tests): Rename to...
982 (c_pretty_print_cc_tests): ...this.
983 * c-format.cc (c_format_c_tests): Rename to...
984 (c_format_cc_tests): ...this.
985 * c-indentation.cc (c_indentation_c_tests): Rename to...
986 (c_indentation_cc_tests): ...this.
987 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
988 (c_pretty_print_cc_tests): ...this.
989
fc829782
GA
9902022-01-17 Martin Liska <mliska@suse.cz>
991
992 * c-ada-spec.cc: Rename .c names to .cc.
993 * c-ada-spec.h: Likewise.
994 * c-common.cc (c_build_vec_convert): Likewise.
995 (warning_candidate_p): Likewise.
996 * c-common.h (enum rid): Likewise.
997 (build_real_imag_expr): Likewise.
998 (finish_label_address_expr): Likewise.
999 (c_get_substring_location): Likewise.
1000 (c_build_bind_expr): Likewise.
1001 (conflict_marker_get_final_tok_kind): Likewise.
1002 (c_parse_error): Likewise.
1003 (check_missing_format_attribute): Likewise.
1004 (invalid_array_size_error): Likewise.
1005 (warn_for_multistatement_macros): Likewise.
1006 (build_attr_access_from_parms): Likewise.
1007 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1008 * c-format.cc: Likewise.
1009 * c-gimplify.cc (c_gimplify_expr): Likewise.
1010 * c-indentation.h: Likewise.
1011 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1012 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1013 * c-opts.cc (c_common_post_options): Likewise.
1014 (set_std_cxx23): Likewise.
1015 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1016 * c-pretty-print.h: Likewise.
1017
10182022-01-17 Martin Liska <mliska@suse.cz>
1019
1020 * c-ada-spec.c: Moved to...
1021 * c-ada-spec.cc: ...here.
1022 * c-attribs.c: Moved to...
1023 * c-attribs.cc: ...here.
1024 * c-common.c: Moved to...
1025 * c-common.cc: ...here.
1026 * c-cppbuiltin.c: Moved to...
1027 * c-cppbuiltin.cc: ...here.
1028 * c-dump.c: Moved to...
1029 * c-dump.cc: ...here.
1030 * c-format.c: Moved to...
1031 * c-format.cc: ...here.
1032 * c-gimplify.c: Moved to...
1033 * c-gimplify.cc: ...here.
1034 * c-indentation.c: Moved to...
1035 * c-indentation.cc: ...here.
1036 * c-lex.c: Moved to...
1037 * c-lex.cc: ...here.
1038 * c-omp.c: Moved to...
1039 * c-omp.cc: ...here.
1040 * c-opts.c: Moved to...
1041 * c-opts.cc: ...here.
1042 * c-pch.c: Moved to...
1043 * c-pch.cc: ...here.
1044 * c-ppoutput.c: Moved to...
1045 * c-ppoutput.cc: ...here.
1046 * c-pragma.c: Moved to...
1047 * c-pragma.cc: ...here.
1048 * c-pretty-print.c: Moved to...
1049 * c-pretty-print.cc: ...here.
1050 * c-semantics.c: Moved to...
1051 * c-semantics.cc: ...here.
1052 * c-ubsan.c: Moved to...
1053 * c-ubsan.cc: ...here.
1054 * c-warn.c: Moved to...
1055 * c-warn.cc: ...here.
1056 * cppspec.c: Moved to...
1057 * cppspec.cc: ...here.
1058 * stub-objc.c: Moved to...
1059 * stub-objc.cc: ...here.
1060
9248ee41
GA
10612022-01-15 Martin Sebor <msebor@redhat.com>
1062
1063 PR c/63272
1064 * c.opt (-Wdangling-pointer): New option.
1065
10662022-01-15 Martin Sebor <msebor@redhat.com>
1067
1068 PR tree-optimization/80532
1069 * c.opt (-Wuse-after-free): New options.
1070
617db51d
GA
10712022-01-14 David Malcolm <dmalcolm@redhat.com>
1072
1073 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1074 (handle_tainted_args_attribute): New.
1075
ad3f0d08
GA
10762022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1077 Jason Merrill <jason@redhat.com>
1078
1079 PR c++/70417
1080 * c.opt: Added -Wmissing-template-keyword.
1081
10822022-01-13 Richard Biener <rguenther@suse.de>
1083
1084 PR c/104002
1085 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1086
02a8a01b
GA
10872022-01-12 Martin Liska <mliska@suse.cz>
1088
1089 PR target/103804
1090 * c-attribs.c (handle_optimize_attribute): Do not call
1091 cl_optimization_compare if we seen an error.
1092
01a254e3
GA
10932022-01-11 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR c/101537
1096 PR c/103881
1097 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1098 and BIT_XOR_EXPR.
1099
d9450aa0
GA
11002022-01-10 Richard Biener <rguenther@suse.de>
1101
1102 PR middle-end/101530
1103 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1104 in a TARGET_EXPR to force a temporary.
1105
11ce8d04
GA
11062022-01-06 Marek Polacek <polacek@redhat.com>
1107
1108 PR c++/103758
1109 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1110 diagnostic messages.
1111 (handle_pragma_diagnostic): Likewise.
1112
a4ae8c37
GA
11132022-01-03 Marek Polacek <polacek@redhat.com>
1114
1115 PR c++/103758
1116 * c-format.c (check_tokens): Accept "decl-specifier*".
1117
11182022-01-03 Jakub Jelinek <jakub@redhat.com>
1119
1120 PR c++/103600
1121 * c-attribs.c (handle_non_overlapping_attribute): New function.
1122 (c_common_attribute_table): Add "non overlapping" attribute.
1123
84790a9d
GA
11242021-12-30 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c++/103012
1127 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1128 cpp_define_unused/cpp_undef calls with forced token locations
1129 BUILTINS_LOCATION.
1130
d1e111da
GA
11312021-12-27 Patrick Palka <ppalka@redhat.com>
1132
1133 PR c++/103700
1134 * c-common.c (pointer_int_sum): When quiet, return
1135 error_mark_node for an incomplete pointed-to type and don't
1136 call size_in_bytes_loc.
1137
2554e2da
GA
11382021-12-17 Jason Merrill <jason@redhat.com>
1139
1140 PR c++/103681
1141 * c-opts.c (c_common_post_options): Update defaults.
1142
774269aa
GA
11432021-12-16 Martin Liska <mliska@suse.cz>
1144
1145 PR target/103709
1146 * c-pragma.c (handle_pragma_pop_options): Do not check
1147 global options modification when an error is seen in parsing
1148 of options (pragmas or attributes).
1149
c8dcf64b
GA
11502021-12-12 Jonathan Wakely <jwakely@redhat.com>
1151
1152 * known-headers.cc: Define INCLUDE_MEMORY instead of
1153 INCLUDE_UNIQUE_PTR.
1154 * name-hint.h: Likewise.
1155 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1156
4b4839e3
GA
11572021-12-09 Jakub Jelinek <jakub@redhat.com>
1158
1159 PR pch/71934
1160 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1161 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1162
03a9bd05
GA
11632021-12-03 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR pch/71934
1166 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1167 (pch_init): Don't initialize v.pch_init.
1168 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1169
40fa651e
GA
11702021-12-01 Jason Merrill <jason@redhat.com>
1171
1172 PR c++/103310
1173 * c.opt: Add -fconstexpr-fp-except.
1174
87cd82c8
GA
11752021-11-29 Richard Biener <rguenther@suse.de>
1176
1177 * c-format.c (check_format_string): Remove spurious
1178 gcc_unreachable.
1179
11802021-11-29 Richard Biener <rguenther@suse.de>
1181
1182 * c-opts.c (c_common_post_options): Remove unreachable return.
1183 * c-pragma.c (handle_pragma_target): Likewise.
1184 (handle_pragma_optimize): Likewise.
1185
091ccc06
GA
11862021-11-25 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR c++/102611
1189 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1190 default for C++23 regardless of warn_deprecated.
1191 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1192 __cpp_multidimensional_subscript=202110L for C++23.
1193
e1d43592
GA
11942021-11-23 Martin Sebor <msebor@redhat.com>
1195
1196 PR middle-end/88232
1197 * c.opt: Add -Winfinite-recursion.
1198
9c077398
GA
11992021-11-19 Martin Sebor <msebor@redhat.com>
1200
1201 PR c++/33925
1202 PR c/102867
1203 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1204 and improve handling tof defined symbols.
1205
12062021-11-19 Martin Liska <mliska@suse.cz>
1207
1208 Revert:
1209 2021-11-18 Martin Liska <mliska@suse.cz>
1210
1211 * c-gimplify.c (genericize_c_loop): Use option directly.
1212
483092d3
GA
12132021-11-18 Matthias Kretz <m.kretz@gsi.de>
1214
1215 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1216 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1217
12182021-11-18 Martin Liska <mliska@suse.cz>
1219
1220 * c-gimplify.c (genericize_c_loop): Use option directly.
1221
280d2838
GA
12222021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1223
1224 PR c/91038
1225 PR c/29970
1226 * c-common.c (pointer_int_sum): Make sure pointer expressions
1227 are evaluated first when the size expression depends on for
1228 variably-modified types.
1229
12302021-11-17 Marek Polacek <polacek@redhat.com>
1231
1232 PR preprocessor/103026
1233 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1234
6b1695f4
GA
12352021-11-16 Jason Merrill <jason@redhat.com>
1236
1237 * c-common.c (release_tree_vector): Only cache vecs smaller than
1238 16 elements.
1239
e2b57363
GA
12402021-11-15 Jason Merrill <jason@redhat.com>
1241
1242 * c.opt: Add -fimplicit-constexpr.
1243 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1244 * c-opts.c (c_common_post_options): Disable below C++14.
1245
12462021-11-15 Jakub Jelinek <jakub@redhat.com>
1247
1248 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1249 Duplicate to both OMP_TARGET and OMP_TEAMS.
1250
8d36a0d2
GA
12512021-11-10 Marek Polacek <polacek@redhat.com>
1252
1253 PR c++/101940
1254 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1255 ignored_attributes.
1256
c9b1334e
GA
12572021-11-09 David Malcolm <dmalcolm@redhat.com>
1258
1259 * c-pragma.c (GCC_BAD_AT): New macro.
1260 (GCC_BAD2_AT): New macro.
1261 (handle_pragma_pack): Use the location of the pertinent token when
1262 issuing diagnostics about invalid constants/actions, and trailing
1263 junk.
1264 (handle_pragma_target): Likewise for non-string "GCC option".
1265 (handle_pragma_message): Likewise for trailing junk.
1266
18ae471f
GA
12672021-11-03 Joseph Myers <joseph@codesourcery.com>
1268
1269 PR c/103031
1270 * c-common.c (convert_and_check): Add argument init_const. Call
1271 convert_init if init_const.
1272 * c-common.h (convert_and_check): Update prototype.
1273 (convert_init): New prototype.
1274
cf82e8d9
GA
12752021-11-01 David Malcolm <dmalcolm@redhat.com>
1276
1277 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1278 CPP_OTHER tokens, set the "escape on output" flag.
1279
04a2cf3f
GA
12802021-10-27 Jakub Jelinek <jakub@redhat.com>
1281
1282 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1283 POINTER_PLUS_EXPR.
1284 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1285 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1286
12872021-10-27 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR c++/102854
1290 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1291 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1292 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1293 conversions temporarily clear the 3rd bit from d->kind while walking
1294 subtrees.
1295 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1296 if possibly non-rectangular.
1297
ae5c5406
GA
12982021-10-21 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR middle-end/64888
1301 * c-omp.c (c_omp_predefined_variable): Return true also for
1302 ubsan_create_data created artificial variables.
1303
5d5885c9
GA
13042021-10-14 Joseph Myers <joseph@codesourcery.com>
1305
1306 * c-format.c (printf_length_specs, scanf_length_specs)
1307 (print_char_table, scan_char_table): Support DFP formats for C2X.
1308 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1309 (T2X_D32, T2X_D64, T2X_D128): New macros.
1310
13112021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1312
1313 * c-omp.c (c_omp_check_context_selector): Rename to
1314 omp_check_context_selector and move to omp-general.c.
1315 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1316 move to omp-general.c.
1317
52055987
GA
13182021-10-12 Joseph Myers <joseph@codesourcery.com>
1319
1320 * c-format.c (print_char_table): Add %b and %B formats.
1321 (scan_char_table): Add %b format.
1322 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1323 (T2X_UPD, T2X_UIM): New macros.
1324
13252021-10-12 Jakub Jelinek <jakub@redhat.com>
1326
1327 * c-omp.c (c_finish_omp_atomic): Use
1328 clear_padding_type_may_have_padding_p.
1329
ce6eec39
GA
13302021-10-08 Martin Liska <mliska@suse.cz>
1331
1332 * c-opts.c (c_common_post_options): Use new macro
1333 OPTION_SET_P.
1334
50e20ee6
GA
13352021-10-07 Martin Liska <mliska@suse.cz>
1336
1337 * c-common.c (parse_optimize_options): Make
1338 save_opt_decoded_options a pointer type.
1339
57c7ec62
GA
13402021-10-06 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR tree-optimization/102571
1343 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1344 padding, but the non-padding bits are contiguous set of bytes
1345 by adjusting the memcmp call arguments instead of emitting
1346 __builtin_clear_padding and then comparing all the type's bytes.
1347
13482021-10-06 Jakub Jelinek <jakub@redhat.com>
1349
1350 PR c++/102612
1351 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1352 __cpp_constexpr to 202110L rather than 201907L.
1353
da9c5f78
GA
13542021-10-04 Marek Polacek <polacek@redhat.com>
1355
1356 PR c++/97573
1357 * c-common.h (do_warn_array_compare): Declare.
1358 * c-warn.c (do_warn_array_compare): New.
1359 * c.opt (Warray-compare): New option.
1360
e3e07b89
GA
13612021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1362
1363 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1364 NULL, this is not needed.
1365
9d116bcc
GA
13662021-10-01 Martin Sebor <msebor@redhat.com>
1367
1368 PR c/102103
1369 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1370 Check and perform warning suppression.
1371 (c_common_truthvalue_conversion): Enhance warning suppression.
1372
13732021-10-01 Martin Liska <mliska@suse.cz>
1374
1375 PR target/102552
1376 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1377 used for program name, so merged_decoded_options should also
1378 respect that.
9d116bcc
GA
1379
13802021-10-01 Jakub Jelinek <jakub@redhat.com>
1381 Richard Biener <rguenther@suse.de>
1382
1383 PR sanitizer/102515
1384 * c-ubsan.c (ubsan_instrument_division): Check the right
1385 flag_sanitize_recover bit, depending on which sanitization
1386 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1387 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1388 and SANITIZE_DIVIDE is enabled, neither check is known
1389 to be false and flag_sanitize_recover bits for those two
1390 aren't the same, emit both __ubsan_handle_divrem_overflow
1391 and __ubsan_handle_divrem_overflow_abort calls.
1392
13932021-10-01 Martin Liska <mliska@suse.cz>
1394
1395 * c-common.c (parse_optimize_options): Combine optimize
1396 options with what was provided on the command line.
1397
13982021-10-01 Jakub Jelinek <jakub@redhat.com>
1399
1400 * c-omp.c (c_omp_split_clauses): Also copy
1401 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1402
cf966403
GA
14032021-09-27 Martin Liska <mliska@suse.cz>
1404
1405 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1406 x_flag_default_complex_method.
cf966403 1407
e4777439
GA
14082021-09-22 Jakub Jelinek <jakub@redhat.com>
1409
1410 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1411
62498024
GA
14122021-09-20 Matthias Kretz <m.kretz@gsi.de>
1413
1414 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1415 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1416 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1417 __ROUNDING_MATH__ according to the new optimization flags.
1418
cf74e7b5
GA
14192021-09-18 Jakub Jelinek <jakub@redhat.com>
1420
1421 * c-omp.c (c_omp_split_clauses): Split order clause also to
1422 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1423
0a4cb439
GA
14242021-09-17 Jakub Jelinek <jakub@redhat.com>
1425
1426 * c-omp.c (c_finish_omp_atomic): Avoid creating
1427 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1428 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1429 had NULL initializer. When omitting operands after v = x,
1430 use type of v rather than type of x. Fix type of vtmp
1431 TARGET_EXPR.
1432
07985c47
GA
14332021-09-13 Jason Merrill <jason@redhat.com>
1434
1435 * c.opt: Add -Winterference-size.
1436 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1437 and __GCC_CONSTRUCTIVE_SIZE.
1438
a26206ec
GA
14392021-09-10 Jakub Jelinek <jakub@redhat.com>
1440
1441 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1442 * c-omp.c: Include gimple-fold.h.
1443 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1444 OpenMP 5.1 atomics.
1445
f84e2f0b
GA
14462021-09-09 qing zhao <qing.zhao@oracle.com>
1447
1448 * c-attribs.c (handle_uninitialized_attribute): New function.
1449 (c_common_attribute_table): Add "uninitialized" attribute.
1450
b6db7cd4
GA
14512021-09-08 liuhongt <hongtao.liu@intel.com>
1452
1453 * c-common.c (excess_precision_mode_join): Update below comments.
1454 (c_ts18661_flt_eval_method): Set excess_precision_type to
1455 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1456 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1457 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1458 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1459
b2748138
GA
14602021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1461
1462 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1463
7b739540
GA
14642021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1465
1466 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1467 and -gnatwu warning for the package specification.
1468
e11c6046
GA
14692021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1470
1471 * c-attribs.c (handle_unavailable_attribute): New.
1472
1e2f030b
GA
14732021-08-30 Jason Merrill <jason@redhat.com>
1474
1475 * c.opt: Add -Wmissing-requires.
1476
85d77ac4
GA
14772021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1478
1479 PR other/93067
1480 * c-opts.c (c_common_input_charset_cb): New function.
1481 (c_common_post_options): Call new function
1482 diagnostic_initialize_input_context().
1483
7c9e1645
GA
14842021-08-20 Tobias Burnus <tobias@codesourcery.com>
1485
1486 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1487 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1488 "di" and "u", respecitively; fill with BADLEN to match
1489 size of 'types'.
1490 (get_init_dynamic_hwi): Split off from ...
1491 (init_dynamic_diag_info): ... here. Call it.
1492 (init_dynamic_gfc_info): Call it.
1493
14942021-08-20 Jakub Jelinek <jakub@redhat.com>
1495
1496 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1497 * c-pragma.c (omp_pragmas): Add error directive.
1498 * c-omp.c (omp_directives): Uncomment error directive entry.
1499
6e529985
GA
15002021-08-18 Jakub Jelinek <jakub@redhat.com>
1501
1502 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1503 * c-pragma.c (omp_pragmas): Add nothing directive.
1504 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1505
2d14d64b
GA
15062021-08-17 Jakub Jelinek <jakub@redhat.com>
1507
1508 PR c++/101539
1509 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1510 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1511
15122021-08-17 Matt Jacobson <mhjacobson@me.com>
1513
1514 * c-opts.c (c_common_post_options): Default to
1515 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1516
15172021-08-17 Jakub Jelinek <jakub@redhat.com>
1518
1519 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1520 * c-pragma.c (omp_pragmas): Add scope construct.
1521 * c-omp.c (omp_directives): Uncomment scope directive entry.
1522
9d1d9fc8
GA
15232021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1524
1525 * c-cppbuiltin.c (c_cpp_builtins): Define
1526 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1527
72be20e2
GA
15282021-08-12 Jakub Jelinek <jakub@redhat.com>
1529
1530 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1531 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1532 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1533 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1534 enumerator.
1535 (c_finish_omp_masked): Declare.
1536 * c-omp.c (c_finish_omp_masked): New function.
1537 (c_omp_split_clauses): Handle combined masked constructs.
1538
4d17ca1b
GA
15392021-07-30 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR c++/101539
1542 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1543 * c-common.c (c_common_reswords): Add
1544 __is_pointer_interconvertible_base_of.
1545
15462021-07-29 Richard Biener <rguenther@suse.de>
1547
1548 PR c/101512
1549 * c-common.c (c_common_mark_addressable_vec): Look through
1550 C_MAYBE_CONST_EXPR even if not at the toplevel.
1551
af3f12e6
GA
15522021-07-27 Martin Sebor <msebor@redhat.com>
1553
1554 PR c/101585
1555 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1556
ead235f6
GA
15572021-07-23 Jakub Jelinek <jakub@redhat.com>
1558
1559 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1560 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1561 and later.
1562
15632021-07-23 Jakub Jelinek <jakub@redhat.com>
1564
1565 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1566 PRAGMA_OMP__LAST_ enumerators.
1567
419c6c68
GA
15682021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1569 Joseph Myers <joseph@codesourcery.com>
1570 Cesar Philippidis <cesar@codesourcery.com>
1571
1572 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1573
92d45509
GA
15742021-07-20 Martin Sebor <msebor@redhat.com>
1575
1576 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1577 by-const-reference.
1578 * c-common.h (c_build_shufflevector): Same.
1579
87277b6a
GA
15802021-07-16 Andrew Pinski <apinski@marvell.com>
1581
1582 PR c/101453
1583 * c-common.c (parse_optimize_options): Use the correct
1584 size for buffer.
1585
d97d71a1
GA
15862021-07-15 Martin Sebor <msebor@redhat.com>
1587
1588 PR c/101289
1589 PR c/97548
1590 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1591
c4fee1c6
GA
15922021-07-14 Jason Merrill <jason@redhat.com>
1593
1594 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1595
6fba0eea
GA
15962021-07-06 Martin Sebor <msebor@redhat.com>
1597
1598 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1599 (gcc_cdiag_char_table): Same.
1600 (gcc_cxxdiag_char_table): Same.
6fba0eea 1601
7a60a6e8
GA
16022021-07-02 Jakub Jelinek <jakub@redhat.com>
1603
1604 * c-common.h (enum c_omp_directive_kind): New enum.
1605 (struct c_omp_directive): New type.
1606 (c_omp_categorize_directive): Declare.
1607 * c-omp.c (omp_directives): New variable.
1608 (c_omp_categorize_directive): New function.
1609
bea7c16a
GA
16102021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1611
1612 * c-ada-spec.c (packed_layout): New global variable.
1613 (dump_ada_declaration): Set it upon seeing a packed record type.
1614 Do not put the "aliased" keyword if it is set.
1615 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1616
16172021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1618
1619 * c-ada-spec.c (check_name): Rename into...
1620 (check_type_name_conflict): ...this. Minor tweak.
1621 (dump_ada_function_declaration): Adjust to above renaming.
1622 (dump_ada_array_domains): Fix oversight.
1623 (dump_ada_declaration): Call check_type_name_conflict for variables.
1624
90708f87
GA
16252021-06-25 Martin Sebor <msebor@redhat.com>
1626
1627 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1628 (c_common_truthvalue_conversion): Replace direct uses of
1629 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1630 copy_no_warning.
1631 (check_function_arguments_recurse): Same.
1632 * c-gimplify.c (c_gimplify_expr): Same.
1633 * c-warn.c (overflow_warning): Same.
1634 (warn_logical_operator): Same.
1635 (warn_if_unused_value): Same.
1636 (do_warn_unused_parameter): Same.
1637
9aa8327e
GA
16382021-06-24 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1641 C_ORT_OMP_TARGET.
1642 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1643 combined target constructs also add map (always, tofrom:) clause.
1644
ede6c356
GA
16452021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1646
1647 * c-attribs.c (common_handle_aligned_attribute): Remove short
1648 circuit and dead code.
1649
8dc48181
GA
16502021-06-14 Jonathan Wakely <jwakely@redhat.com>
1651
1652 PR c++/101052
1653 * known-headers.cc (get_stdlib_header_for_name): Add known
1654 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1655 exit, and getenv.
1656
8b8c3912
GA
16572021-06-12 Jason Merrill <jason@redhat.com>
1658
1659 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1660
f16f65f8
GA
16612021-06-11 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c++/100974
1664 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1665 -std=c++2b for P1938R3 consteval if support.
1666
4f625f47
GA
16672021-06-09 Jason Merrill <jason@redhat.com>
1668
1669 PR c++/100879
1670 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1671 warning.
1672
438aac59
GA
16732021-06-07 Martin Liska <mliska@suse.cz>
1674
1675 * c-target.def: Split long lines and replace them
1676 with '\n\'.
1677
600f90cb
GA
16782021-06-04 Martin Sebor <msebor@redhat.com>
1679
1680 PR c/100783
1681 * c-attribs.c (positional_argument): Bail on erroneous types.
1682
16832021-06-04 Martin Sebor <msebor@redhat.com>
1684
1685 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1686 for element presence.
1687
440c8a0a
GA
16882021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1689
1690 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1691 (dump_ada_decl_name): Likewise.
1692 (dump_anonymous_type_name): Remove parent parameter and adjust.
1693 (dump_sloc): Minor tweak.
1694 (dump_ada_array_type): Remove type parameter and adjust.
1695 (dump_ada_enum_type): Remove parent parameter and adjust.
1696 (dump_ada_node): Adjust calls to above functions.
1697 (dumped_anonymous_types): New global variable.
1698 (dump_nested_types_1): Rename into...
1699 (dump_nested_types): ...this.
1700 (dump_nested_type): Remove parent and dumped_types parameters.
1701 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1702 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1703 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1704
17052021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1706
1707 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1708 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1709
17102021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1711
1712 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1713 (htable_t): New typedef.
1714 (overloaded_names): Use it.
1715 (add_name): New function.
1716 (init_overloaded_names): Use add_name to populate the table and add
1717 special cases for sigaction and stat.
1718 (overloaded_name_p): Rename into...
1719 (overloading_index): ...this. Do not initialize overloaded_names table
1720 here. Return the index or zero.
1721 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1722 but add an overloading suffix instead.
1723 (dump_ada_specs): Initialize overloaded_names tables here.
1724
b75978d1
GA
17252021-06-01 Martin Liska <mliska@suse.cz>
1726
1727 PR other/100759
1728 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1729 to a situation where we are not in processing of an optimize
1730 pragma.
1731 * c-pragma.c (handle_pragma_pop_options): Restore target
1732 options.
1733
ee682192
GA
17342021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1735
1736 PR testsuite/100749
1737 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1738
17392021-05-31 Richard Biener <rguenther@suse.de>
1740
1741 PR c++/88601
1742 * c-common.c: Include tree-vector-builder.h and
1743 vec-perm-indices.h.
1744 (c_common_reswords): Add __builtin_shufflevector.
1745 (c_build_shufflevector): New funtion.
1746 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1747 (c_build_shufflevector): Declare.
1748
48166757
GA
17492021-05-28 Jakub Jelinek <jakub@redhat.com>
1750
1751 PR middle-end/99928
1752 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1753 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1754
17552021-05-28 Tobias Burnus <tobias@codesourcery.com>
1756
1757 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1758
2bc6dace
GA
17592021-05-25 Martin Liska <mliska@suse.cz>
1760
1761 PR tree-optimization/92860
1762 PR target/99592
1763 * c-attribs.c (handle_optimize_attribute): Save target node
1764 before calling parse_optimize_options and save it in case
1765 it changes.
1766 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1767 (handle_pragma_pop_options): Likewise here.
1768
17692021-05-25 Martin Liska <mliska@suse.cz>
1770
1771 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1772
17732021-05-25 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR middle-end/99928
1776 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1777 combined with simd and not with taskloop or for.
1778
2832d51b
GA
17792021-05-21 Jakub Jelinek <jakub@redhat.com>
1780
1781 PR middle-end/99928
1782 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1783 on firstprivate clause copy going to target construct, and for
1784 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1785
ea34e2ed
GA
17862021-05-20 Jonathan Wakely <jwakely@redhat.com>
1787
1788 * c.opt (Wc++11-extensions, Wc++14-extensions)
1789 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1790 options.
1791
17922021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1793
1794 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1795
17962021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1797
1798 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1799 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1800 (pch_init): Renamed member.
1801 (c_common_valid_pch): Adjust access to debug_type_names.
1802
65f32e5d
GA
18032021-05-19 Martin Sebor <msebor@redhat.com>
1804
1805 PR c/100619
1806 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1807 bounds.
1808
a8daf9a1
GA
18092021-05-18 Richard Biener <rguenther@suse.de>
1810
1811 PR c/100547
1812 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1813 Reword existing nunit diagnostic.
1814
a7ffc1ef
GA
18152021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1816
1817 * c-common.c (braced_list_to_string): Return CTOR unchanged
1818 if host and target character sizes don't match.
1819
87a7d10c
GA
18202021-05-14 Martin Liska <mliska@suse.cz>
1821
1822 * c.opt: Add Warning keyword for 2 options.
1823
f9af11c7
GA
18242021-05-13 Martin Liska <mliska@suse.cz>
1825
1826 PR middle-end/100504
1827 * c-attribs.c (handle_target_clones_attribute): Expect a string
1828 argument to target_clone argument.
1829
037e3661
GA
18302021-05-11 Joseph Myers <joseph@codesourcery.com>
1831
1832 * c-lex.c (interpret_float): Handle digit separators for C2X.
1833
aa891c56
GA
18342021-05-10 Martin Liska <mliska@suse.cz>
1835
1836 * c-ada-spec.c (print_destructor): Use startswith
1837 function instead of strncmp.
1838 (dump_ada_declaration): Likewise.
1839 * c-common.c (disable_builtin_function): Likewise.
1840 (def_builtin_1): Likewise.
1841 * c-format.c (check_tokens): Likewise.
1842 (check_plain): Likewise.
1843 (convert_format_name_to_system_name): Likewise.
1844
e4ff4ffb
GA
18452021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1846
1847 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1848 complex divide
1849
c0fa3f2f
GA
18502021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1851 Nathan Sidwell <nathan@codesourcery.com>
1852 Tom de Vries <vries@codesourcery.com>
1853 Julian Brown <julian@codesourcery.com>
1854 Kwok Cheung Yeung <kcy@codesourcery.com>
1855
1856 * c.opt (Wopenacc-parallelism): New.
1857
6e81e015
GA
18582021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1859
1860 * c.opt (fopenacc-kernels=): Remove.
1861
019a9220
GA
18622021-04-08 Jakub Jelinek <jakub@redhat.com>
1863
1864 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1865 occured -> occurred.
1866 (check_alignment_of_packed_member): Fix a comment typo,
1867 memeber -> member.
1868 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1869 and onless -> unless.
1870 (warn_parm_array_mismatch): Fix comment typos, declaratation
1871 -> declaration and woud -> would. Fix up comment indentation.
1872
18732021-04-08 Martin Sebor <msebor@redhat.com>
1874
1875 PR middle-end/99883
1876 * c.opt (Wmismatched-new-delete): Correct spelling.
1877
b1da9916
GA
18782021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1879
1880 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1881 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1882 enumeral types use again the type name for the enumeration constants.
1883 (dump_ada_node): Adjust call to dump_ada_enum_type.
1884 (dump_nested_type): Likewise.
1885
f1607029
GA
18862021-04-01 Jason Merrill <jason@redhat.com>
1887
1888 PR c++/98481
1889 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1890
4493b1c1
GA
18912021-03-25 Jakub Jelinek <jakub@redhat.com>
1892
1893 PR c++/99565
1894 * c-warn.c (do_warn_duplicated_branches): Pass also
1895 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1896
6af7b307
GA
18972021-03-20 Jakub Jelinek <jakub@redhat.com>
1898
1899 PR debug/99230
1900 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1901
ceae9533
GA
19022021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1903
1904 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1905 after entering the separate class package, if any.
1906
67f10d28
GA
19072021-03-04 Richard Biener <rguenther@suse.de>
1908
1909 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1910 Handle ERROR_MARK.
1911
19122021-03-04 Jakub Jelinek <jakub@redhat.com>
1913
1914 PR c/99325
1915 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1916 (token_streamer::stream) Likewise.
1917 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1918 UNKNOWN_LOCATION.
1919
f3641ac7
GA
19202021-03-03 Jakub Jelinek <jakub@redhat.com>
1921
1922 PR c/99324
1923 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1924 instead of mark_addressable. Fix a comment typo -
1925 neutrallly -> neutrally.
1926
2c83c3fb
GA
19272021-02-28 Jakub Jelinek <jakub@redhat.com>
1928
1929 PR c/99304
1930 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1931 message - refernced -> referenced. Remove superfluous space before
1932 closing paren of function calls.
1933
daa68844
GA
19342021-02-25 Nathan Sidwell <nathan@acm.org>
1935
1936 PR c++/99166
1937 * c.opt (-flang-info-module-cmi): Renamed option.
1938
50352c6c
GA
19392021-02-19 Nathan Sidwell <nathan@acm.org>
1940
1941 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1942
bf81237e
GA
19432021-02-18 H.J. Lu <hjl.tools@gmail.com>
1944
1945 PR target/99113
1946 * c-attribs.c (c_common_attribute_table): Add the "retain"
1947 attribute.
1948 (handle_retain_attribute): New function.
1949
0e804ce3
GA
19502021-02-16 Marek Polacek <polacek@redhat.com>
1951
1952 PR c++/99062
1953 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1954 alignment argument is non-negative. Tweak a warning message.
1955
fab095da
GA
19562021-02-12 Martin Sebor <msebor@redhat.com>
1957
1958 PR c/99055
1959 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1960 print_generic_expr_to_str.
1961
4b37c3ea
GA
19622021-02-10 Richard Biener <rguenther@suse.de>
1963
1964 * c-common.c (parse_optimize_options): Free decoded_options.
1965
a19dd5e6
GA
19662021-02-04 emsr <3dw4rd@verizon.net>
1967
1968 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1969
9faaa807
GA
19702021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1971
1972 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1973 * c-lex.c (interpret_integer): Set node type for size literal.
1974
85d04a2e
GA
19752021-01-28 Jakub Jelinek <jakub@redhat.com>
1976
1977 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1978 draft from description.
1979 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1980
e62bb7f0
GA
19812021-01-26 Paul Fee <paul.f.fee@gmail.com>
1982
1983 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1984 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1985 and -std=gnu++2b
1986 * c-opts.c (set_std_cxx23): New.
1987 (c_common_handle_option): Set options when -std=c++23 is enabled.
1988 (c_common_post_options): Adjust comments.
1989 (set_std_cxx20): Likewise.
1990
161e4c08
GA
19912021-01-25 Martin Sebor <msebor@redhat.com>
1992
1993 PR c++/98646
1994 * c-common.c (check_nonnull_arg): Adjust warning text.
1995
4c9bcd5c
GA
19962021-01-17 Martin Sebor <msebor@redhat.com>
1997
1998 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1999 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2000
59cf67d1
GA
20012021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2002
2003 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2004 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2005
2f7f0d32
GA
20062021-01-15 Jakub Jelinek <jakub@redhat.com>
2007
2008 PR tree-optimization/98597
2009 * c-pretty-print.c: Include options.h.
2010 (c_fold_indirect_ref_for_warn): New function.
2011 (print_mem_ref): Use it. If it returns something that has compatible
2012 type and is TBAA compatible with zero offset, print it and return,
2013 otherwise print it using offsetof syntax or array ref syntax. Fix up
2014 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2015 argument has pointer to array type. Print pointers using the standard
2016 formatting.
2017
6851dda2
GA
20182021-01-12 Martin Sebor <msebor@redhat.com>
2019
2020 PR c/98597
2021 PR c/98592
2022 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2023 has pointer type. Remove redundant code. Avoid calling
2024 gimple_canonical_types_compatible_p.
2025
7d187e4f
GA
20262021-01-07 Martin Sebor <msebor@redhat.com>
2027
2028 PR middle-end/98578
2029 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2030 Avoid assuming acces type's size is constant. Correct condition
2031 guarding the printing of a parenthesis.
2032
942ae5be
GA
20332021-01-06 Martin Sebor <msebor@redhat.com>
2034
2035 PR c++/95768
2036 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2037 SSA_NAMEs print VLA names and GIMPLE defining statements.
2038 (print_mem_ref): New function.
2039 (c_pretty_printer::unary_expression): Call it.
2040
20412021-01-06 Richard Biener <rguenther@suse.de>
2042
2043 PR tree-optimization/95582
2044 * c-attribs.c (c_common_attribute_table): Add entry for
2045 signed_bool_precision.
2046 (handle_signed_bool_precision_attribute): New.
2047
8daa719b
GA
20482020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2049
2050 * c.opt: Add -stdlib= option and enumerations for
2051 libstdc++ and libc++.
2052
eefe499f
GA
20532020-12-16 Martin Liska <mliska@suse.cz>
2054
2055 * c.opt: Remove usage of Report.
2056
d52945ce
GA
20572020-12-14 Martin Sebor <msebor@redhat.com>
2058
2059 PR middle-end/98166
2060 PR c++/57111
2061 PR middle-end/98160
2062 * c-attribs.c (maybe_add_noinline): New function.
2063 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2064 Implicitly add attribute noinline to functions not declared inline
2065 and warn on those.
2066
ca2bd949
GA
20672020-12-09 Tobias Burnus <tobias@codesourcery.com>
2068
2069 * c-pragma.c (omp_pragmas): Add 'allocate'.
2070 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2071
f6e8e279
GA
20722020-12-08 Jakub Jelinek <jakub@redhat.com>
2073
2074 PR c++/98187
2075 * c-pragma.c (omp_pragmas): Remove "master".
2076 (omp_pragmas_simd): Add "master".
2077
bc8a7013
GA
20782020-12-07 Marek Polacek <polacek@redhat.com>
2079
2080 PR c++/98126
2081 * c-common.c (verify_tree_lim_r): New function.
2082 (verify_sequence_points): Use it. Use nullptr instead of 0.
2083
b8dd0ef7
GA
20842020-12-03 Martin Sebor <msebor@redhat.com>
2085
2086 PR c++/90629
2087 PR middle-end/94527
2088 * c-attribs.c (handle_dealloc_attribute): New function.
2089 (handle_malloc_attribute): Handle argument forms of attribute.
2090 * c.opt (-Wmismatched-dealloc): New option.
2091 (-Wmismatched-new-delete): New option.
2092
20932020-12-03 Jakub Jelinek <jakub@redhat.com>
2094
2095 PR libstdc++/93121
2096 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2097 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2098
e0f5e792
GA
20992020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2100
2101 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2102 {__GNUC_EXECUTION_CHARSET_NAME} and
2103 _WIDE_EXECUTION_CHARSET_NAME} macros.
2104
21052020-12-01 Nathan Sidwell <nathan@acm.org>
2106
2107 * c-common.c (module, import, export): New internal tokens (with
2108 trailing space).
2109 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2110 them.
2111 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2112 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2113
21142020-12-01 Nathan Sidwell <nathan@acm.org>
2115
2116 * c-opts.c (c_common_init_options): Ask for module dependencies.
2117 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2118 * c-pch.c (c_common_valid_pch): ... does not play with C++
2119 modules.
2120 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2121 options.
2122 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2123 (fmodule-only, fmodule-mapper, fmodule-lazy)
2124 (fmodule-version-ignore, Winvalid-imported-macros)
2125 (flang-info-include-translate, flang-info-include-translate-not):
2126 New options
2127
5fbf0ecb
GA
21282020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2129
2130 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2131 (dump_ada_structure): Also deal with convention, unchecked union and
2132 bit-field for nested types. In the latter case, print an Alignment
2133 aspect along with the Pack aspect.
2134
360258da
GA
21352020-11-25 Martin Sebor <msebor@redhat.com>
2136
2137 PR bootstrap/94982
2138 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2139 -Wformat-diag.
2140
1e2c9a27
GA
21412020-11-24 Martin Sebor <msebor@redhat.com>
2142
2143 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2144
8e6198d0
GA
21452020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2146
2147 * c-attribs.c (handle_special_var_sec_attribute): New.
2148 (handle_noinit_attribute): Remove.
2149 (attr_noinit_exclusions): Rename to...
2150 (attr_section_exclusions): ...this, and add "persistent" attribute
2151 exclusion.
2152 (c_common_attribute_table): Add "persistent" attribute.
2153
7a97e2fc
GA
21542020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2155
2156 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2157 Treat opaque types like other types.
2158 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2159 supported types.
2160
82e5048e
GA
21612020-11-20 Martin Sebor <msebor@redhat.com>
2162
2163 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2164 with fewer arguments.
2165
21662020-11-20 Martin Sebor <msebor@redhat.com>
2167
2168 PR middle-end/97879
2169 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2170 Error out on invalid modes.
2171
21722020-11-20 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR libstdc++/88101
2175 * c-common.c (check_builtin_function_arguments): Handle
2176 BUILT_IN_CLEAR_PADDING.
2177
25bb75f8
GA
21782020-11-18 Nathan Sidwell <nathan@acm.org>
2179
2180 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2181
4dabb037
GA
21822020-11-17 Nathan Sidwell <nathan@acm.org>
2183
2184 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2185 after newly-added CTI_MODULE_HWM.
2186
21872020-11-17 Joseph Myers <joseph@codesourcery.com>
2188
2189 * c-cppbuiltin.c (builtin_define_float_constants): Define
2190 "*_IS_IEC_60559__" macros.
2191
21922020-11-17 Nathan Sidwell <nathan@acm.org>
2193
2194 * c-lex.c: #include "langhooks.h".
2195 (cb_undef): Maybe call preprocess_undef lang hook.
2196 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2197 lang hook.
2198 (push_command_line_include): Maybe call preprocess_main_file lang
2199 hook.
2200 (cb_file_change): Likewise.
2201 * c-ppoutput.c: #include "langhooks.h.
2202 (scan_translation_unit): Maybe call preprocess_token lang hook.
2203 (class do_streamer): New, derive from token_streamer.
2204 (directives_only_cb): Data pointer is do_streamer, call
2205 preprocess_token lang hook.
2206 (scan_translation_unit_directives_only): Use do_streamer.
2207 (print_line_1): Move src_line recording to after string output.
2208 (cb_undef): Maybe call preprocess_undef lang hook.
2209
22102020-11-17 Nathan Sidwell <nathan@acm.org>
2211
2212 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2213 code duplicating that functionality.
2214
22152020-11-17 Jakub Jelinek <jakub@redhat.com>
2216
2217 PR c/90628
2218 * c-common.c (check_builtin_function_arguments)
2219 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2220 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2221 for more builtins and argument positions.
2222
29c5d9ce
GA
22232020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2224
2225 PR objc/97854
2226 * stub-objc.c: Include c-common.h to declare enum rid.
2227
77f67db2
GA
22282020-11-13 Jakub Jelinek <jakub@redhat.com>
2229
2230 PR c++/63287
2231 * c-cppbuiltin.c: Include configargs.h.
2232 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2233 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2234 "single".
2235
22362020-11-13 Gergö Barany <gergo@codesourcery.com>
2237 Thomas Schwinge <thomas@codesourcery.com>
2238
2239 * c.opt (fopenacc-kernels): Add.
2240
22412020-11-13 Jason Merrill <jason@redhat.com>
2242
2243 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2244
22452020-11-13 Piotr H. Dabrowski <phd@phd.re>
2246
2247 PR c++/91318
2248 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2249
22502020-11-13 Martin Liska <mliska@suse.cz>
2251
2252 * c-attribs.c (build_attr_access_from_parms): Format properly.
2253
22542020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2255
2256 PR objc/90707
2257 * c-common.c (c_common_reswords): null_unspecified, nullable,
2258 nonnull, null_resettable: New keywords.
2259 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2260 RID_NONNULL, RID_NULL_RESETTABLE: New.
2261 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2262 ranges accepted for property attributes.
2263 * c-attribs.c (handle_objc_nullability_attribute): New.
2264 * c-objc.h (enum objc_property_attribute_group): Add
2265 OBJC_PROPATTR_GROUP_NULLABLE.
2266 (enum objc_property_attribute_kind):Add
2267 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2268 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2269
22702020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2271
2272 PR objc/77404
2273 * c-attribs.c (handle_objc_root_class_attribute): New
2274 * c-objc.h (objc_start_class_interface): Add a location
2275 value for the position of the class name.
2276 * c.opt: Add Wobjc-root-class.
2277 * stub-objc.c (objc_start_class_interface): Add a location
2278 value for the position of the class name.
2279
a5a11525
GA
22802020-11-12 Joseph Myers <joseph@codesourcery.com>
2281
2282 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2283 Allow scope for C. Handle standard attributes for C. Do not
2284 accept unscoped attributes if std_syntax and not handled as
2285 standard attributes.
2286 * c-common.h (c_common_has_attribute): Update prototype.
2287
22882020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2289
2290 PR pch/86674
2291 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2292 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2293
0f5f9ed5
GA
22942020-11-11 Patrick Palka <ppalka@redhat.com>
2295
2296 PR c++/88115
2297 * c-opts.c (c_common_post_options): Update latest_abi_version.
2298
bb622641
GA
22992020-11-10 Jakub Jelinek <jakub@redhat.com>
2300
2301 PR c/97748
2302 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2303 to false.
2304 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2305 recursively and just return true instead of warning if it is true.
2306 Handle COMPLEX_EXPR.
2307
23082020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2309
2310 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2311 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2312 (c_omp_adjust_map_clauses): New function.
2313
2bee28dd
GA
23142020-11-09 Marek Polacek <polacek@redhat.com>
2315
2316 DR 1914
2317 * c-common.c (attribute_fallthrough_p): Tweak the warning
2318 message.
2319
23202020-11-09 Patrick Palka <ppalka@redhat.com>
2321
2322 * c-pragma.c (handle_pragma_diagnostic): Split the
2323 unknown-option -Wpragmas diagnostic into a warning and a
2324 subsequent note containing a spelling suggestion. Avoid
2325 computing the suggestion if -Wpragmas warnings are being
2326 suppressed.
2327
23282020-11-09 Patrick Palka <ppalka@redhat.com>
2329
2330 PR testsuite/97117
2331 * c-indentation.c (get_visual_column): Remove location_t
2332 parameter. Move the column-tracking diagnostic code from here
2333 to ...
2334 (should_warn_for_misleading_indentation): ... here, before the
2335 early exit for when the loci are not all distinct. Don't pass a
2336 location_t argument to get_visual_column.
2337 (assert_get_visual_column_succeeds): Don't pass a location_t
2338 argument to get_visual_column.
2339 (assert_get_visual_column_fails): Likewise.
2340
fb95de7a
GA
23412020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2342
2343 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2344 of keywords accepted in @property attribute contexts.
2345 * c-objc.h (enum objc_property_attribute_group): Add
2346 OBJC_PROPATTR_GROUP_CLASS.
2347 (enum objc_property_attribute_kind): Add
2348 OBJC_PROPERTY_ATTR_CLASS.
2349
2da7ee05
GA
23502020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2351
2352 * c-common.c (c_common_reswords): Add 'atomic' property
2353 attribute.
2354 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2355 property attributes.
2356
23572020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2358
2359 * c-attribs.c (handle_nsobject_attribute): New.
2360 * c.opt: Add WNSObject-attribute.
2361
44cab2d8
GA
23622020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2363
2364 * c-objc.h (enum objc_property_attribute_group): New
2365 (enum objc_property_attribute_kind): New.
2366 (OBJC_PROPATTR_GROUP_MASK): New.
2367 (struct property_attribute_info): Small class encapsulating
2368 parser output from property attributes.
2369 (objc_prop_attr_kind_for_rid): New
2370 (objc_add_property_declaration): Simplify interface.
2371 * stub-objc.c (enum rid): Dummy type.
2372 (objc_add_property_declaration): Simplify interface.
2373 (objc_prop_attr_kind_for_rid): New.
2374
23752020-11-06 Nathan Sidwell <nathan@acm.org>
2376
2377 * c-ada-spec.c (collect_ada_nodes): Rename
2378 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2379 (collect_ada_node): Likewise.
2380 (dump_forward_type): Likewise.
2381 * c-common.c (set_underlying_type): Rename
2382 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2383 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2384
23852020-11-06 Jakub Jelinek <jakub@redhat.com>
2386
2387 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2388
0cfd9109
GA
23892020-11-05 Marek Polacek <polacek@redhat.com>
2390
2391 PR c++/97675
2392 * c.opt (Wexceptions): New option.
2393
23942020-11-05 Marek Polacek <polacek@redhat.com>
2395
2396 PR c++/25814
2397 * c.opt (Wvexing-parse): New option.
2398
35c125cb
GA
23992020-11-04 Jakub Jelinek <jakub@redhat.com>
2400
2401 PR c++/97670
2402 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2403 underlying decl to clear in the allocate_head bitmap.
2404
24052020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2406
2407 * c-objc.h (objc_non_constant_expr_p): New.
2408 * stub-objc.c (objc_non_constant_expr_p): New.
2409
fd2325ea
GA
24102020-11-03 Nathan Sidwell <nathan@acm.org>
2411
2412 * c.opt (MQ,MT): Reword description to be make-agnostic.
2413
88ce3d5f
GA
24142020-11-02 Nathan Sidwell <nathan@acm.org>
2415
2416 * c-opts.c (c_common_post_options): Move var decl to its
2417 initialization point.
2418
24192020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2420
2421 * c-lex.c (c_lex_with_flags): When combining '@' with a
2422 keyword for Objective-C, combine the location ranges too.
2423
24242020-10-30 Qing Zhao <qing.zhao@oracle.com>
2425 H.J.Lu <hjl.tools@gmail.com>
2426
2427 * c-attribs.c (c_common_attribute_table): Add new attribute
2428 zero_call_used_regs.
2429 (handle_zero_call_used_regs_attribute): New function.
2430
e93aae4a
GA
24312020-10-28 Marek Polacek <polacek@redhat.com>
2432
2433 PR c++/97573
2434 * c-opts.c (c_common_post_options): In C++20, turn on
2435 -Wdeprecated-enum-enum-conversion and
2436 -Wdeprecated-enum-float-conversion.
2437 * c.opt (Wdeprecated-enum-enum-conversion,
2438 Wdeprecated-enum-float-conversion): New options.
2439 (Wenum-conversion): Allow for C++ too.
2440
24412020-10-28 Jakub Jelinek <jakub@redhat.com>
2442
2443 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2444 * c-omp.c: Include bitmap.h.
2445 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2446
f19e7c8d
GA
24472020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2448
2449 * c-common.c (__is_nothrow_assignable): New.
2450 (__is_nothrow_constructible): Likewise.
2451 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2452 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2453
efe71fcc
GA
24542020-10-23 Jan Hubicka <hubicka@ucw.cz>
2455
2456 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2457
24582020-10-23 Marek Polacek <polacek@redhat.com>
2459
2460 PR c++/91741
2461 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2462 (c_common_init_ts): Likewise.
2463 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2464 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2465 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2466 (maybe_warn_sizeof_array_div): New function.
2467 * c.opt (Wsizeof-array-div): New option.
2468
24692020-10-23 Martin Sebor <msebor@redhat.com>
2470
2471 PR c/97463
2472 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2473
56ddd5e2
GA
24742020-10-22 Martin Liska <mliska@suse.cz>
2475
2476 PR c/94722
2477 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2478 (handle_stack_protect_attribute): Add error message for a
2479 no_stack_protector function.
2480
24812020-10-22 Martin Liska <mliska@suse.cz>
2482
2483 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2484
24852020-10-22 Jan Hubicka <hubicka@ucw.cz>
2486
2487 * c-gimplify.c: Include tree-nested.h
2488 (c_genericize): Update for new nested function info.
2489
b2698c21
GA
24902020-10-14 Martin Sebor <msebor@redhat.com>
2491
2492 PR c/97413
2493 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2494 bounds in an extra list.
2495
7e9282ae
GA
24962020-10-05 Richard Biener <rguenther@suse.de>
2497 Jakub Jelinek <jakub@redhat.com>
2498
2499 PR c++/97197
2500 * c-pretty-print.c: Include langhooks.h.
2501 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2502 expression.
2503 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2504 unary_expression.
2505 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2506
660bfe61
GA
25072020-09-30 Martin Sebor <msebor@redhat.com>
2508
2509 PR middle-end/97189
2510 * c-attribs.c (append_access_attr): Use the function declaration
2511 location for a warning about an attribute access argument.
2512
93bca37c
GA
25132020-09-29 Marek Polacek <polacek@redhat.com>
2514
2515 PR c++/94695
2516 * c.opt (Wrange-loop-construct): New option.
2517
82b77dee
GA
25182020-09-23 Martin Sebor <msebor@redhat.com>
2519
2520 PR c/97131
2521 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2522
25232020-09-23 Marek Polacek <polacek@redhat.com>
2524
2525 PR c/97125
2526 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2527 after loops and other structured control constructs have been lowered.
2528
521d2711
GA
25292020-09-22 Jakub Jelinek <jakub@redhat.com>
2530
2531 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2532 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2533
44135373
GA
25342020-09-21 Marek Polacek <polacek@redhat.com>
2535
2536 * c.opt (Wctad-maybe-unsupported): New option.
2537
2fe5b7d1
GA
25382020-09-19 Martin Sebor <msebor@redhat.com>
2539
2540 PR c/50584
2541 * c-common.h (warn_parm_array_mismatch): Declare new function.
2542 (has_attribute): Move declaration of an existing function.
2543 (build_attr_access_from_parms): Declare new function.
2544 * c-warn.c (parm_array_as_string): Define new function.
2545 (plus_one): Define new function.
2546 (warn_parm_ptrarray_mismatch): Define new function.
2547 (warn_parm_array_mismatch): Define new function.
2548 (vla_bound_parm_decl): New function.
2549 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2550 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2551 qualifiers here...
2552 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2553 them in brackets here. Also print [static]. Strip extraneous
2554 expressions from VLA bounds.
2555
25562020-09-19 Martin Sebor <msebor@redhat.com>
2557
2558 PR c/50584
2559 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2560 (handle_argspec_attribute): New function.
2561 (get_argument, get_argument_type): New functions.
2562 (append_access_attrs): Add overload. Handle internal attribute
2563 representation in addition to external.
2564 (handle_access_attribute): Handle internal attribute representation
2565 in addition to external.
2566 (build_attr_access_from_parms): New function.
2567
25682020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2569
2570 * c-gimplify.c (genericize_c_loop): Rewrite to match
2571 c_finish_loop in c-typeck.c.
2572
25732020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2574
2575 * c-common.c (c_block_may_fallthrough): New, split from
2576 cxx_block_may_fallthrough in the cp front end.
2577 (c_common_init_ts): Move handling of loop and switch-related
2578 statements here from the cp front end.
2579 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2580 cp front end.
2581 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2582 * c-common.h (c_block_may_fallthru): Declare.
2583 (bc_state_t): Move here from cp front end.
2584 (save_bc_state, restore_bc_state): Declare.
2585 (c_genericize_control_stmt): Declare.
2586 (WHILE_COND, WHILE_BODY): Likewise.
2587 (DO_COND, DO_BODY): Likewise.
2588 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2589 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2590 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2591 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2592 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2593 * c-dump.c (dump_stmt): Copy from cp front end.
2594 (c_dump_tree): Move code to handle structured loop and switch
2595 tree nodes here from cp front end.
2596 * c-gimplify.c: Adjust includes.
2597 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2598 cp front end.
2599 (save_bc_state, restore_bc_state): New functions using old code
2600 from cp front end.
2601 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2602 (genericize_c_loop): Move from cp front end.
2603 (genericize_for_stmt, genericize_while_stmt): Likewise.
2604 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2605 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2606 (genericize_omp_for_stmt): Likewise.
2607 (c_genericize_control_stmt): New function using code split from
2608 cp front end.
2609 (c_genericize_control_r): New.
2610 (c_genericize): Call walk_tree with c_genericize_control_r.
2611 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2612 structured loop and switch tree nodes here from cp front end.
2613
2aad20c0
GA
26142020-09-17 Patrick Palka <ppalka@redhat.com>
2615
2616 PR c/80076
2617 * c-indentation.c (should_warn_for_misleading_indentation): Move
2618 declarations of local variables closer to their first use.
2619 Handle virtual token locations by resolving them to their
2620 respective macro expansion points. If all three tokens are
2621 produced from the same macro expansion, then instead use their
2622 loci within the macro definition.
2623
ecde1b0a
GA
26242020-09-16 Martin Sebor <msebor@redhat.com>
2625
2626 PR c/78666
2627 PR c/96126
2628 * c-attribs.c (validate_attr_args): New function.
2629 (validate_attr_arg): Same.
2630 (handle_section_attribute): Call it. Introduce a local variable.
2631 (handle_alloc_size_attribute): Same.
2632 (handle_alloc_align_attribute): Same.
2633
50a71cd0
GA
26342020-09-14 Jakub Jelinek <jakub@redhat.com>
2635
2636 * c-attribs.c (handle_optimize_attribute): Adjust
2637 cl_optimization_save, cl_optimization_restore and
2638 build_optimization_node callers.
2639 * c-pragma.c (handle_pragma_optimize): Adjust
2640 build_optimization_node caller.
2641 (handle_pragma_push_options): Adjust
2642 build_optimization_node and build_target_option_node callers.
2643 (handle_pragma_pop_options, handle_pragma_reset_options):
2644 Adjust cl_optimization_restore callers.
2645
8f7ea26a
GA
26462020-08-28 Martin Sebor <msebor@redhat.com>
2647
2648 * c.opt (Wstringop-overread): New option.
2649
a6493809
GA
26502020-08-11 Jakub Jelinek <jakub@redhat.com>
2651
2652 PR c/96545
2653 * c-common.c (get_atomic_generic_size): Require that first argument's
2654 type points to a complete type and use tree_fits_uhwi_p instead of
2655 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2656
48cc2e46
GA
26572020-07-31 Martin Sebor <msebor@redhat.com>
2658
2659 PR c++/96003
2660 * c-common.c (check_function_arguments_recurse): Return early when
2661 no-warning bit is set.
2662
26632020-07-31 Richard Biener <rguenther@suse.de>
2664
2665 PR debug/96383
2666 * c-common.h (c_common_finalize_early_debug): Declare.
2667 * c-common.c: Include debug.h.
2668 (c_common_finalize_early_debug): finalize_early_debug langhook
2669 implementation generating debug for extern declarations.
2670
e71dab87
GA
26712020-07-27 Nathan Sidwell <nathan@acm.org>
2672
2673 * c-common.c (try_to_locate_new_include_insertion_point): Use
2674 strcmp, not pointer equality.
2675
ae2e0bc1
GA
26762020-07-25 Martin Sebor <msebor@redhat.com>
2677
2678 PR c++/96310
2679 * c-common.c (check_nonnull_arg): Print note only when warning was
2680 issued.
2681
3ea9abca
GA
26822020-07-22 Tobias Burnus <tobias@codesourcery.com>
2683
2684 * c-omp.c (c_finish_omp_critical): Check for no name but
2685 nonzero hint provided.
2686
0933f508
GA
26872020-07-20 Jason Merrill <jason@redhat.com>
2688
2689 * c-cppbuiltin.c (c_cpp_builtins): Update
2690 __cpp_nontype_template_args for C++20.
2691
26922020-07-20 Martin Sebor <msebor@redhat.com>
2693
2694 PR c/96249
2695 * c.opt: Remove stray text.
2696
8ca07a30
GA
26972020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2698
2699 PR other/86904
2700 * c-indentation.c (should_warn_for_misleading_indentation): Get
2701 global tabstop from the new source.
2702 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2703 is now a common option.
2704 * c.opt: Likewise.
2705
a82c4c4c 27062020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2707
2708 * c.opt (Wscalar-storage-order): Add explicit variable.
2709
f60ee68d
GA
27102020-07-07 Nathan Sidwell <nathan@acm.org>
2711
2712 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2713 cpp_read_main_file.
2714 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2715 maps. Force token position to line_table's highest line.
2716 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2717 (cb_define): Always increment source line.
2718
4077d74c
GA
27192020-07-06 Martin Sebor <msebor@redhat.com>
2720
2721 PR c++/95984
2722 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2723 to stub lambda objects with null this pointer.
2724 (check_nonnull_arg): Handle C++ nullptr.
2725
b5f24739
GA
27262020-07-02 Jason Merrill <jason@redhat.com>
2727 Jakub Jelinek <jakub@redhat.com>
2728
2729 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2730
46fbb6c6
GA
27312020-06-30 Jakub Jelinek <jakub@redhat.com>
2732
2733 PR c++/95963
2734 * c-common.c (check_function_arguments_recurse): Don't crash on
2735 calls to internal functions.
2736
69273534
GA
27372020-06-28 Martin Sebor <msebor@redhat.com>
2738
2739 PR c++/86568
2740 * c-common.c (struct nonnull_arg_ctx): Add members.
2741 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2742 C++ member functions specially. Consider the this pointer implicitly
2743 nonnull.
2744 (check_nonnull_arg): Use location of argument when available.
2745 (check_function_arguments): Use nonnull_arg_ctx as argument.
2746
9a33c41f
GA
27472020-06-27 Jakub Jelinek <jakub@redhat.com>
2748
2749 PR middle-end/95903
2750 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2751 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2752 smaller precision intop operands separately.
2753
c9c05f73
GA
27542020-06-26 Marek Polacek <polacek@redhat.com>
2755
2756 * c-opts.c (c_common_init_options): Default to gnu++17.
2757
aff95ee7
GA
27582020-06-17 Jonathan Wakely <jwakely@redhat.com>
2759
bd0a89dc 2760 PR c/95378
aff95ee7
GA
2761 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2762 pointer arguments.
2763
56638b9b
GA
27642020-06-16 Jakub Jelinek <jakub@redhat.com>
2765
2766 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2767 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2768 idx members.
2769 (c_omp_is_loop_iterator): New function.
2770 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2771 if outer loop iterator is present. Perform duplicate checking through
2772 hash_set in the function rather than expecting caller to do that.
2773 Pass NULL instead of d->ppset to walk_tree_1.
2774 (c_omp_check_nonrect_loop_iv): New function.
2775 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2776 non-rectangular loop forms, diagnose multiple associated loops with
2777 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2778 (c_omp_check_loop_iv_exprs): Likewise.
2779
ec6ffbb9
GA
27802020-06-10 Martin Liska <mliska@suse.cz>
2781
2782 PR tree-optimization/92860
2783 * c-attribs.c (handle_optimize_attribute):
2784 Save global options and compare it after parsing of function
2785 attribute.
2786 * c-pragma.c (opt_stack::saved_global_options): New field.
2787 (handle_pragma_push_options): Save global_options.
2788 (handle_pragma_pop_options): Compare them after pop.
2789
b952c2cf
GA
27902020-06-09 Jakub Jelinek <jakub@redhat.com>
2791
2792 PR c/95580
2793 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2794 case when MEM_REF's first argument has type pointer to incomplete type.
2795
1a59f3db
GA
27962020-06-05 Jason Merrill <jason@redhat.com>
2797
2798 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2799 operand to POINTER_PLUS_EXPR.
2800
3add3425
GA
28012020-06-04 Martin Sebor <msebor@redhat.com>
2802
2803 PR middle-end/10138
2804 PR middle-end/95136
2805 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2806 (handle_access_attribute): Same.
2807
9a5b7438
GA
28082020-06-03 Mark Wielaard <mark@klomp.org>
2809
2810 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2811 New function.
2812 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2813 New function declaration.
2814
28152020-06-03 Mark Wielaard <mark@klomp.org>
2816
2817 * known-headers.cc (get_string_macro_hint): New function.
2818 (get_stdlib_header_for_name): Use get_string_macro_hint.
2819 (get_c_stdlib_header_for_string_macro_name): New function.
2820 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2821 New function declaration.
2822
28232020-06-03 Tobias Burnus <tobias@codesourcery.com>
2824
2825 * c-common.h (c_omp_predetermined_mapping): Declare.
2826 * c-omp.c (c_omp_predetermined_mapping): New.
2827
af114c38
MW
28282020-05-22 Mark Wielaard <mark@klomp.org>
2829
2830 * known-headers.cc (get_stdlib_header_for_name): Add a new
2831 stdlib_hint array for stdbool and stdint.
2832
45c50b6a
MW
28332020-05-22 Mark Wielaard <mark@klomp.org>
2834
2835 * known-headers.cc (get_stdlib_header_for_name): Return
2836 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2837 flag_isoc99.
2838
c22027a0
NS
28392020-05-20 Nathan Sidwell <nathan@acm.org>
2840
38a4db21
NS
2841 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2842
c22027a0
NS
2843 * c-common.c (try_to_locate_new_include_insertion_point): Use
2844 strcmp to compare filenames.
2845 * c-lex.c (init_c_lex): Move declaration to initialization.
2846 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2847 deferred count loop.
2848
29f0e90d
JM
28492020-05-15 Jason Merrill <jason@redhat.com>
2850
2851 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2852
b04445d4
JM
28532020-05-13 Jason Merrill <jason@redhat.com>
2854
2855 * c.opt (std=c++20): Make c++2a the alias.
2856 (std=gnu++20): Likewise.
2857 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2858 * c-opts.c: Adjust.
2859 * c-cppbuiltin.c: Adjust.
2860 * c-ubsan.c: Adjust.
2861 * c-warn.c: Adjust.
2862
11dd3be5
EB
28632020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2864
2865 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2866
b224c376
NS
28672020-05-08 Nathan Sidwell <nathan@acm.org>
2868
2869 Reimplement directives only processing.
2870 * c-ppoutput.c (token_streamer): Ne.
2871 (directives_only_cb): New. Swallow ...
2872 (print_lines_directives_only): ... this.
2873 (scan_translation_unit_directives_only): Reimplment using the
2874 published interface.
2875
f1d94677
MP
28762020-05-07 Marek Polacek <polacek@redhat.com>
2877
2878 * c-format.c (badwords): Add "nonstatic".
2879
9b95bb52
JJ
2880202-05-07 Jakub Jelinek <jakub@redhat.com>
2881
2882 PR c/94968
2883 * c-common.c (speculation_safe_value_resolve_params): Return false if
2884 error_operand_p (val2).
2885 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2886 Remove extraneous semicolon.
2887
530b4409 28882020-05-06 qing zhao <qing.zhao@oracle.com>
2889
2890 PR c/94230
2891 * c-indentation.c (get_visual_column): Add a hint to use the new
2892 -flarge-source-files option.
2893
b776bdca
SSF
28942020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2895
2896 * c-attribs.c (handle_vector_size_attribute): Add attribute
2897 nonnull for argument args in order to silence warning of
2898 uninitialized variable usage. Since this is local to the
2899 compilation unit and thus cannot be checked at call sides by the
2900 compiler, added an assert statement in order to verify this.
2901
6607bdd9
L
29022020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2903
2904 PR target/93492
2905 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2906 value to USHRT_MAX (65535).
2907
691eeb65
JJ
29082020-04-29 Jakub Jelinek <jakub@redhat.com>
2909
2910 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2911
26d76be7
JJ
29122020-04-27 Jakub Jelinek <jakub@redhat.com>
2913
2914 PR c/94755
2915 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2916 fncode == BUILT_IN_NONE before initialization of first_param.
2917
7291b2ed
MP
29182020-04-23 Marek Polacek <polacek@redhat.com>
2919
2920 PR c++/94733
2921 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2922 TREE_PURPOSE.
2923
58a29af8
PP
29242020-04-14 Patrick Palka <ppalka@redhat.com>
2925
2926 PR c++/85278
2927 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2928 ampersand if it's an rvalue reference type.
2929
09f04139
MS
29302020-04-13 Martin Sebor <msebor@redhat.com>
2931
2932 PR c/92326
2933 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2934 printing array bound for flexible array members.
2935
ee26baf4
IS
29362020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2937
2938 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2939 define, per n4861.
2940
75efe9cb
RB
29412020-04-02 Richard Biener <rguenther@suse.de>
2942
2943 PR c/94392
2944 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2945 for -O2 and C++11 or newer.
2946
75defde9
PP
29472020-03-28 Patrick Palka <ppalka@redhat.com>
2948
2949 * c.opt: Add -fconcepts-diagnostics-depth.
2950
52f24a9e
MS
29512020-03-27 Martin Sebor <msebor@redhat.com>
2952
2953 PR c++/94346
2954 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2955 to decl_attributes. Make handling of different kinds of entities
2956 more robust.
2957
ccacf77b
MS
29582020-03-27 Martin Sebor <msebor@redhat.com>
2959
2960 PR c++/94098
2961 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2962 here.
2963
ca6c7225
JJ
29642020-03-23 Jakub Jelinek <jakub@redhat.com>
2965
2966 PR c++/91993
2967 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2968 result being COMPOUND_EXPRs, skip to ultimate rhs.
2969
1aa22b19
RS
29702020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2971
2972 PR middle-end/94072
2973 * c-common.c (c_common_type_for_mode): Before using a registered
2974 built-in type, check that the vectorness of the type matches
2975 the vectorness of the mode.
2976
700d4cb0
JJ
29772020-03-17 Jakub Jelinek <jakub@redhat.com>
2978
2979 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2980 issue in a diagnostic message.
2981
b408e010
LH
29822020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2983
2984 * c.opt: Avoid redundancy in the help text.
2985
e78e50d5
MP
29862020-03-02 Marek Polacek <polacek@redhat.com>
2987
2988 PR c++/93958 - add missing -std=gnu++20.
2989 * c.opt: Add -std=gnu++20.
2990
649e1741
MS
29912020-03-01 Martin Sebor <msebor@redhat.com>
2992
2993 PR c++/92721
2994 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2995 (handle_access_attribute): Same.
2996
7b60f3ba
JJ
29972020-02-25 Jakub Jelinek <jakub@redhat.com>
2998
2999 PR c/93858
3000 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3001 "did you mean" hint in diagnostics.
3002
fb260504
JM
30032020-02-15 Jason Merrill <jason@redhat.com>
3004
3005 * c.opt: Add -std=c++20.
3006
1d757b09
EB
30072020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3008
3009 * c-ada-spec.c: Include bitmap.h.
3010 (dump_ada_double_name): Rename into...
3011 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3012 (dump_ada_array_type): Adjust to above renaming. Robustify.
3013 (dump_nested_types_1): New function copied from... Add dumped_types
3014 parameter and pass it down to dump_nested_type.
3015 (dump_nested_types): ...this. Remove parent parameter. Just call
3016 dump_nested_types_1 on an automatic bitmap.
3017 (dump_nested_type): Add dumped_types parameter.
3018 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3019 Adjust recursive calls and adjust to above renaming.
3020 (dump_ada_declaration): Adjust call to dump_nested_types.
3021 Tidy up and adjust to above renaming.
3022 (dump_ada_specs): Initialize and release bitmap obstack.
3023
0cc575e4
MS
30242020-02-10 Martin Sebor <msebor@redhat.com>
3025
3026 PR c/93640
3027 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3028
a59aa302
JJ
30292020-02-10 Jakub Jelinek <jakub@redhat.com>
3030
3031 PR other/93641
3032 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3033 Remove useless extra test.
3034
e464fc90
TB
30352020-02-03 Julian Brown <julian@codesourcery.com>
3036 Tobias Burnus <tobias@codesourcery.com>
3037
3038 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3039
e3b6c052
JM
30402020-01-29 Jason Merrill <jason@redhat.com>
3041
3042 PR c++/89357
3043 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3044
6d00f052
JM
30452020-01-23 Jason Merrill <jason@redhat.com>
3046
3047 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3048
8a990ffa
MS
30492020-01-23 Martin Sebor <msebor@redhat.com>
3050
3051 PR c/84919
3052 * c-common.c (check_function_arguments): Avoid overlap checking
3053 of sprintf functions.
3054
55b7df8b
JM
30552020-01-22 Jason Merrill <jason@redhat.com>
3056
3057 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3058 PR c++/40752
3059 * c-warn.c (conversion_warning): Check operands only after checking
3060 the whole expression. Don't check second operand of + for sign.
3061
c77074d0
JM
30622020-01-21 Jason Merrill <jason@redhat.com>
3063 Manuel López-Ibáñez <manu@gcc.gnu.org>
3064
3065 PR c++/40752 - useless -Wconversion with short +=.
3066 * c.opt (-Warith-conversion): New.
3067 * c-warn.c (conversion_warning): Recurse for operands of
3068 operators. Only warn about the whole expression with
3069 -Warith-conversion.
3070
731dbfc3
JM
30712020-01-21 Jason Merrill <jason@redhat.com>
3072
3073 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3074 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3075
ad1a3914
NS
30762020-01-20 Nathan Sidwell <nathan@acm.org>
3077
3078 PR preprocessor/80005
3079 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3080
49789fd0
IS
30812020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3082
3083 * c-common.c (co_await, co_yield, co_return): New.
3084 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3085 RID_CO_RETURN): New enumeration values.
3086 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3087 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3088 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3089 * c.opt (fcoroutines): New command-line switch.
3090
4bc1899b
DM
30912020-01-10 David Malcolm <dmalcolm@redhat.com>
3092
3093 * c-format.c (local_event_ptr_node): New.
3094 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3095 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3096 * c-format.h (T_EVENT_PTR): New define.
3097
f25e33fa
MS
30982020-01-10 Martin Sebor <msebor@redhat.com>
3099
3100 PR c/93132
3101 * c-attribs.c (append_access_attrs): Validate against the translated
3102 access string rather than the human-readable representation.
3103
8d9254fc
JJ
31042020-01-01 Jakub Jelinek <jakub@redhat.com>
3105
3106 Update copyright years.
3107
39292e25
EB
31082019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3109
3110 * c-ada-spec.h (decl_sloc): Delete.
3111 * c-ada-spec.c (decl_sloc): Make static.
3112
519d7496
JB
31132019-12-19 Julian Brown <julian@codesourcery.com>
3114
3115 * c-common.h (c_omp_map_clause_name): Add prototype.
3116 * c-omp.c (c_omp_map_clause_name): New function.
3117 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3118 PRAGMA_OACC_CLAUSE_DETACH.
3119
a6163563
JB
31202019-12-19 Julian Brown <julian@codesourcery.com>
3121 Maciej W. Rozycki <macro@codesourcery.com>
3122 Tobias Burnus <tobias@codesourcery.com>
3123 Thomas Schwinge <thomas@codesourcery.com>
3124
3125 * c-pragma.h (pragma_omp_clause): Add
3126 PRAGMA_OACC_CLAUSE_NO_CREATE.
3127
e8f1ade2
MS
31282019-12-17 Martin Sebor <msebor@redhat.com>
3129
3130 PR c++/61339
3131 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3132
368877a1
DM
31332019-12-11 David Malcolm <dmalcolm@redhat.com>
3134
3135 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3136 implementation.
3137 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3138
d68f5d45
DM
31392019-12-09 David Malcolm <dmalcolm@redhat.com>
3140
3141 * c-format.c (range_label_for_format_type_mismatch::get_text):
3142 Replace label_text ctor called with true with label_text::take.
3143
d3e28653
DM
31442019-12-09 David Malcolm <dmalcolm@redhat.com>
3145
3146 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3147 initial newline from expected outputs.
3148 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3149 call to diagnostic_show_locus.
3150
abd6d8cc
JJ
31512019-12-06 Jakub Jelinek <jakub@redhat.com>
3152
3153 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3154 now.
3155
7906797e
MP
31562019-12-05 Marek Polacek <polacek@redhat.com>
3157 Jakub Jelinek <jakub@redhat.com>
3158
3159 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3160 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3161
5c04da88
MP
31622019-12-05 Marek Polacek <polacek@redhat.com>
3163
3164 PR c++/92271 - make __is_same alias for __is_same_as.
3165 * c-common.c: Add __is_same, an alias for __is_same_as.
3166
43aae289
MP
31672019-12-03 Marek Polacek <polacek@redhat.com>
3168
3169 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3170 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3171 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3172
d7ddfbcb
JH
31732019-11-30 Jan Hubicka <hubicka@ucw.cz>
3174
3175 * c-attribs.c (handle_symver_attribute): New function
3176 (c_common_attributes): Add symver.
3177
65ef05d0
RS
31782019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3179
3180 * c-common.c (pointer_int_sum): Use verify_type_context to check
3181 whether the target allows pointer arithmetic for the types involved.
3182 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3183 to check whether the target allows sizeof and alignof operations
3184 for the types involved.
3185
1a291106
JM
31862019-11-27 Jason Merrill <jason@redhat.com>
3187
3188 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3189
05d6cb1a
JJ
31902019-11-26 Jakub Jelinek <jakub@redhat.com>
3191
3192 PR c++/61414
3193 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3194 ENUMERAL_TYPEs.
3195
5b8d9367
JM
31962019-11-25 Joseph Myers <joseph@codesourcery.com>
3197
3198 PR c/91985
3199 * c-common.c (c_common_type_for_mode): Handle decimal
3200 floating-point types being NULL_TREE.
3201 * c-format.c (get_format_for_type_1): Handle specified types being
3202 NULL_TREE.
3203 * c-lex.c (interpret_float): Give an error for decimal
3204 floating-point constants when decimal floating-point not
3205 supported.
3206
1fbf51cb
JJ
32072019-11-23 Jakub Jelinek <jakub@redhat.com>
3208
3209 PR middle-end/83859
3210 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3211 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3212 group warning with inform together.
3213 (handle_access_attribute): Formatting fix.
3214
761df906
JJ
32152019-11-22 Jakub Jelinek <jakub@redhat.com>
3216
bdaf8be1
JJ
3217 PR c/90677
3218 * c-common.h (identifier_global_tag): Declare.
3219 * c-format.c (get_pointer_to_named_type): Renamed to ...
3220 (get_named_type): ... this. Use identifier_global_tag instead of
3221 identifier_global_value, handle the return value being a TYPE_P.
3222 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3223 to call get_named_type instead. Formatting fixes.
3224
c2ecce6d 3225 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3226 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3227 and __cpp_generic_lambdas for -std=c++2a. Define
3228 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3229 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3230 __cpp_concepts for -std=c++2a.
3231
54aa6b58
MS
32322019-11-22 Martin Sebor <msebor@redhat.com>
3233
3234 PR middle-end/83859
3235 * c-attribs.c (handle_access_attribute): New function.
3236 (c_common_attribute_table): Add new attribute.
3237 (get_argument_type): New function.
3238 (append_access_attrs): New function.
3239 (get_nonnull_operand): Rename...
3240 (get_attribute_operand): ...to this.
3241 * c-common.c (get_nonnull_operand): Rename...
3242 (get_attribute_operand): ...to this.
3243
6c80b1b5
JM
32442019-11-21 Joseph Myers <joseph@codesourcery.com>
3245
3246 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3247 of warning.
3248
192961ff
JM
32492019-11-19 Joseph Myers <joseph@codesourcery.com>
3250
3251 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3252 warning for standard attributes mixed with fallthrough attributes.
3253
f8aea5e3
JM
32542019-11-15 Joseph Myers <joseph@codesourcery.com>
3255
3256 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3257 * c-common.h (handle_fallthrough_attribute): Declare.
3258
2cc94aa8
JM
32592019-11-15 Joseph Myers <joseph@codesourcery.com>
3260
3261 * c-attribs.c (handle_deprecated_attribute): Remove static.
3262 * c-common.h (handle_deprecated_attribute): Declare.
3263
7c5890cc
JM
32642019-11-14 Joseph Myers <joseph@codesourcery.com>
3265
3266 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3267 char for C.
3268
b2417b59
JJ
32692019-11-14 Jakub Jelinek <jakub@redhat.com>
3270
d0ec7c93
JJ
3271 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3272 valid vendors.
3273
b2417b59
JJ
3274 * c-omp.c (c_omp_check_context_selector): Handle name lists
3275 containing string literals. Don't diagnose atomic_default_mem_order
3276 with multiple props.
3277
00be2a5f
JM
32782019-11-13 Joseph Myers <joseph@codesourcery.com>
3279
3280 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3281 NORM_MAX constants. Update call to get_max_float.
3282 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3283 constants.
3284
2dbad62d
EB
32852019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3286
3287 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3288 (dump_forward_type): Do not generate a declaration for function types.
3289 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3290 of the component type if it is declared in another file.
3291
6ed76044
ML
32922019-11-12 Martin Liska <mliska@suse.cz>
3293
3294 * c-opts.c (c_common_post_options):
3295 Use SET_OPTION_IF_UNSET.
3296
62aee289
MR
32972019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3298 Frederik Harwath <frederik@codesourcery.com>
3299
3300 gcc/c-family/
3301 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3302 constant.
3303 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3304
f486280c
RS
33052019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3306
3307 * c-common.h (gnu_vector_type_p): New function.
3308 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3309 vectors to satisfy gnu_vector_type_p.
3310 (c_build_vec_convert): Likewise __builtin_convertvector.
3311 (convert_vector_to_array_for_subscript): Likewise when applying
3312 implicit vector to array conversion.
3313 (scalar_to_vector): Likewise when converting vector-scalar
3314 operations to vector-vector operations.
3315
017c6491
JM
33162019-11-08 Joseph Myers <joseph@codesourcery.com>
3317
3318 * c.opt (Wold-style-definition): Initialize to -1.
3319 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3320 to flag_isoc2x if not set explicitly.
3321
c01bd174
JM
33222019-11-07 Joseph Myers <joseph@codesourcery.com>
3323
3324 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3325
0df65305
JM
33262019-11-05 Jason Merrill <jason@redhat.com>
3327
3328 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3329 -fconcepts.
3330
e0c866dd
KK
33312019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3332
3333 * c-opts.c (c_common_post_options): Update
3334 latest_abi_version.
3335
f968ef9b
JJ
33362019-11-02 Jakub Jelinek <jakub@redhat.com>
3337
d0c464d2
JJ
3338 * c-common.h (c_omp_get_context_selector): Remove.
3339 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3340 and renamed to omp_get_context_selector.
3341
917dd789
JJ
3342 * c-omp.c (c_omp_mark_declare_variant): Use
3343 omp_context_selector_set_compare.
3344
f968ef9b
JJ
3345 PR c++/88335 - Implement P1073R3: Immediate functions
3346 * c-common.h (enum rid): Add RID_CONSTEVAL.
3347 * c-common.c (c_common_reswords): Add consteval.
3348
5f6705b7
JJ
33492019-11-01 Martin Sebor <msebor@redhat.com>
3350
3351 PR middle-end/91679
3352 PR middle-end/91647
3353 PR middle-end/91463
3354 PR middle-end/92312
3355 * c-pretty-print.c (direct_abstract_declarator): Print
3356 bound in zero-length arrays.
3357 * c.opt (-Wzero-length-bounds): New option.
3358
43f1814c
NS
33592019-10-30 Nathan Sidwell <nathan@acm.org>
3360
3361 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3362 macros.
3363
ad1539d5
MS
33642019-10-28 Martin Sebor <msebor@redhat.com>
3365
3366 PR c/66970
3367 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3368 even when only preprocessing.
3369 * c-common.h (names_builtin_p): Declare new function.
3370 * c-lex.c (init_c_lex): Set has_builtin.
3371 (c_common_has_builtin): Define a new function.
3372 * c-ppoutput.c (init_pp_output): Set has_builtin.
3373
135df52c
JJ
33742019-10-24 Jakub Jelinek <jakub@redhat.com>
3375
3376 * c-common.h (c_omp_context_selector_matches): Remove.
3377 * c-omp.c (c_omp_context_selector_matches): Remove.
3378 * c-attribs.c (c_common_attribute_table): Add
3379 "omp declare target {host,nohost,block}" attributes.
3380
8ad0c477
JM
33812019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3382
3383 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3384
56898e43
RS
33852019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3386
3387 * c-common.h (user_facing_original_type_p): Declare.
3388 * c-common.c: Include c-spellcheck.h.
3389 (user_facing_original_type_p): New function.
3390
20de9568
JJ
33912019-10-12 Jakub Jelinek <jakub@redhat.com>
3392
3393 * c-common.h (c_omp_mark_declare_variant,
3394 c_omp_context_selector_matches): Declare.
3395 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3396 and hsa-common.h.
3397 (c_omp_get_context_selector): Support second argument NULL.
3398 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3399 functions.
3400 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3401 attribute, add "omp declare variant base" and
3402 "omp declare variant variant" attributes.
3403
175a85b2
JM
34042019-10-11 Joseph Myers <joseph@codesourcery.com>
3405
3406 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3407 CppReason(CPP_W_C11_C2X_COMPAT).
3408
fe2bc27c
JM
34092019-10-11 Joseph Myers <joseph@codesourcery.com>
3410
3411 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3412 _Decimal64 and _Decimal128.
3413
27dfdc0f
JM
34142019-10-10 Joseph Myers <joseph@codesourcery.com>
3415
3416 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3417 types if DFP not supported.
3418
94e7f906
JJ
34192019-10-10 Jakub Jelinek <jakub@redhat.com>
3420
3421 * c-common.h (c_omp_check_context_selector,
3422 c_omp_get_context_selector): Declare.
3423 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3424 in diagnostic message.
3425 (c_omp_check_context_selector, c_omp_get_context_selector): New
3426 functions.
3427 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3428 attribute.
3429 (handle_omp_declare_variant_attribute): New function.
3430
a7160771
MS
34312019-10-09 Martin Sebor <msebor@redhat.com>
3432
3433 PR tree-optimization/90879
3434 * c.opt (-Wstring-compare): New option.
3435
cb57504a
JM
34362019-10-08 Andrew Sutton <asutton@lock3software.com>
3437 Jason Merrill <jason@redhat.com>
3438
3439 Update the concepts implementation to conform to the C++20
3440 specification, improve compile times, and generally clean up
3441 the implementation.
3442
3443 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3444 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3445 * c.opt: Add -Wconcepts-ts.
3446 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3447 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3448 (set_std_cxx2a): Enable concepts by default.
3449
fbb2a6dc
JM
34502019-10-08 Joseph Myers <joseph@codesourcery.com>
3451
3452 * c-opts.c (c_common_post_options): Set
3453 -fno-fp-int-builtin-inexact for C2X.
3454
8e007055
JJ
34552019-10-05 Jakub Jelinek <jakub@redhat.com>
3456
3457 PR c++/91369 - Implement P0784R7: constexpr new
3458 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3459 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3460
843f104d
JM
34612019-10-04 Joseph Myers <joseph@codesourcery.com>
3462
3463 PR c/82752
3464 * c-format.c (C_STD_VER): Handle C2x.
3465 (C_STD_NAME): Likewise.
3466 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3467 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3468 modifier allowed and 'p' flag.
3469 * c-format.h (enum format_std_version): Add STD_C2X.
3470 (struct format_char_info): Mention 'p' in comment on flags2.
3471
e9c9a142
DM
34722019-10-01 David Malcolm <dmalcolm@redhat.com>
3473
3474 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3475 calling diagnostic_show_locus, rather than destroying it afterwards.
3476
7552c36a
JJ
34772019-10-01 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c++/91925
3480 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3481 with NULL DECL_FIELD_OFFSET.
3482
8209db25
RS
34832019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3484
3485 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3486 has a type name, use it in preference to the __vector syntax.
3487
9343bf99
RS
34882019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3489
3490 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3491 two spaces between a comma and "...".
3492
59bc434a
JJ
34932019-09-27 Jakub Jelinek <jakub@redhat.com>
3494
3495 PR c++/88203
3496 * c-common.h (c_omp_predefined_variable): Declare.
3497 * c-omp.c (c_omp_predefined_variable): New function.
3498 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3499 for predefined variables.
3500
c6447c20
RS
35012019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3502
3503 * c-common.h (build_function_call_vec): Take the original
3504 function decl as an optional final parameter.
3505 (check_builtin_function_arguments): Take the original function decl.
3506 * c-common.c (check_builtin_function_arguments): Likewise.
3507 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3508 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3509
c4438114
JM
35102019-09-15 Jason Merrill <jason@redhat.com>
3511
3512 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3513 fold_for_warn in "|| mask" warning.
3514
68a57628
ML
35152019-09-10 Martin Liska <mliska@suse.cz>
3516
3517 * c.opt: Use newly added WarnRemoved.
3518
f48ef52e
ML
35192019-09-09 Martin Liska <mliska@suse.cz>
3520
3521 * c.opt: Update comment of removed
3522 options that are preserved only for backward
3523 compatibility.
3524
67f6e649
ML
35252019-09-06 Martin Liska <mliska@suse.cz>
3526
3527 PR c++/91125
3528 * c-common.c: Remove definition of flag_use_repository.
3529 * c-common.h: Likewise.
3530 * c-opts.c (c_common_handle_option):
3531 Do not handle OPT_frepo option.
3532 * c.opt: Mark the option with Deprecated.
3533
db9d2274
MP
35342019-09-04 Marek Polacek <polacek@redhat.com>
3535
3536 * c.opt (fdeduce-init-list): Ignored.
3537
68e2c199
PK
35382019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3539
3540 PR c/78736
3541 * c.opt (Wenum-conversion): New option.
3542
7a4418a5
JL
35432019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3544
3545 * c-attribs.c (handle_section_attribute): Call the
3546 handle_generic_attribute target hook after performing target
3547 independent processing.
3548 (handle_noinit_attribute): Likewise.
3549
5f76ab15
ILT
35502019-09-03 Ian Lance Taylor <iant@golang.org>
3551
3552 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3553 when using -fgo-dump-spec.
3554
ae0d3f6a
ML
35552019-09-02 Martin Liska <mliska@suse.cz>
3556
3557 PR c++/91155
3558 * c-common.c (fname_as_string): Use cxx_printable_name for
3559 __PRETTY_FUNCTION__ same as was used before r265711.
3560
8a902edb
MP
35612019-08-28 Marek Polacek <polacek@redhat.com>
3562
3563 Implement P1152R4: Deprecating some uses of volatile.
3564 PR c++/91361
3565 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3566 default for C++2a, unless -Wno-deprecated.
3567 * c.opt (Wvolatile): New warning.
3568
4742dbe7
MP
35692019-08-28 Marek Polacek <polacek@redhat.com>
3570
3571 PR c++/91360 - Implement C++20 P1143R2: constinit.
3572 * c-common.c (c_common_reswords): Add constinit and __constinit.
3573 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3574 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3575 RID_LAST_CXX20.
3576 (D_CXX20): Define.
3577 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3578 * c-format.c (cxx_keywords): Add "constinit".
3579 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3580
6a074892
JJ
35812019-08-27 Jakub Jelinek <jakub@redhat.com>
3582
3583 PR c++/91415
3584 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3585 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3586 like COMPOUND_EXPR rather than normal expression.
3587
22f8849d
IS
35882019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3589
3590 PR pch/61250
3591 * c-lex.c (c_lex_with_flags): Don't call
3592 c_common_no_more_pch () from here.
3593
df375b03
JJ
35942019-08-23 Jakub Jelinek <jakub@redhat.com>
3595
3596 PR middle-end/91283
3597 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3598 instead of flag_excess_precision_cmdline.
3599 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3600 * c-opts.c (c_common_post_options): Likewise.
3601
14b7950f
MS
36022019-08-22 Martin Sebor <msebor@redhat.com>
3603
3604 PR middle-end/91490
3605 * c-common.c (braced_list_to_string): Add argument and overload.
3606 Handle flexible length arrays and unions.
3607
8bb2ee59
EB
36082019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3609
3610 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3611 function declarations where arguments are missing. Rename variables.
3612
21c1e205
RB
36132019-08-15 Richard Biener <rguenther@suse.de>
3614
3615 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3616 enabled, define __SIZETYPE__.
3617
f0033821
CL
36182019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3619
3620 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3621 exclusion with "section" attribute.
3622 (attr_noinit_exclusions): New table.
3623 (handle_noinit_attribute): New function.
3624
4d732405
RS
36252019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3626
3627 PR middle-end/91421
3628 * c-common.c (resolve_overloaded_builtin): Use
3629 copy_decl_built_in_function.
3630
51ad8481
MS
36312019-08-13 Martin Sebor <msebor@redhat.com>
3632
3633 PR c/80619
3634 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3635 (asm_fprintf_length_spec): Same.
3636 * c-format.h (format_lengths): Add FMT_LEN_w.
3637
77eb117f
JJ
36382019-08-10 Jakub Jelinek <jakub@redhat.com>
3639
3640 * c-pragma.h (enum pragma_omp_clause): Add
3641 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3642
398e3feb
JJ
36432019-08-07 Jakub Jelinek <jakub@redhat.com>
3644
3645 * c-pragma.h (enum pragma_omp_clause): Add
3646 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3647 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3648 enumeration value.
3649
ab574db6
MP
36502019-08-05 Marek Polacek <polacek@redhat.com>
3651
3652 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3653 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3654 default for C++2a, unless -Wno-deprecated.
3655 * c.opt (Wcomma-subscript): New warning.
3656
554a530f
JJ
36572019-07-20 Jakub Jelinek <jakub@redhat.com>
3658
3659 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3660 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3661 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3662 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3663 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3664 constructs with the loop construct.
3665
1a888209
JJ
36662019-07-13 Jakub Jelinek <jakub@redhat.com>
3667
3668 PR c/91149
3669 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3670 OMP_CLAUSE_REDUCTION_TASK handling.
3671
1fdd6f04
JJ
36722019-07-12 Jakub Jelinek <jakub@redhat.com>
3673
3674 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3675 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3676
99b1c316
MS
36772019-07-09 Martin Sebor <msebor@redhat.com>
3678
3679 PR c++/61339
1fdd6f04 3680 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3681 and others to class.
3682 * c-pretty-print.h: Same.
3683
6c1dae73
MS
36842019-07-09 Martin Sebor <msebor@redhat.com>
3685
3686 PR c++/61339
3687 * c-format.c (check_argument_type): Change class-key from class to
3688 struct and vice versa to match convention and avoid -Wclass-is-pod
3689 and -Wstruct-no-pod.
3690 * c-pretty-print.h: Same.
3691
8ba6ea87
ML
36922019-07-03 Martin Liska <mliska@suse.cz>
3693
3694 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3695 dead assignemts.
3696
83eb9522
JJ
36972019-07-03 Jakub Jelinek <jakub@redhat.com>
3698
3699 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3700 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3701 with OMP_PARALLEL.
3702
1c6ffbab
QZ
37032019-07-02 qing zhao <qing.zhao@oracle.com>
3704
3705 PR preprocessor/90581
3706 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3707 * c.opt: Add new option -fmax-include-depth.
3708
7ffc7de5
JM
37092019-06-26 Jason Merrill <jason@redhat.com>
3710
3711 PR c++/55442 - memory-hog with highly recursive constexpr.
3712 * c.opt (fconstexpr-loop-limit): New.
3713
361af3e4
JJ
37142019-06-25 Jakub Jelinek <jakub@redhat.com>
3715
3716 PR sanitizer/90954
3717 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3718 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3719
ab20d992
JJ
37202019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3721
3722 * c-common.c (c_common_nodes_and_builtins): Define
3723 alternate "__intN__" name for "__intN" types.
3724
f4af4019
JH
37252019-06-24 Jan Hubicka <jh@suse.cz>
3726
3727 * c-common.c (braced_lists_to_strings): Check that
3728 type is array or integer prior checking string flag.
3729
da9e9b57
MB
37302019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3731
3732 PR c++/90875 - added -Wswitch-outside-range option
3733 * c.opt (Wswitch-outside-range): Added new option.
3734 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3735
3f3d6a6f
MP
37362019-06-21 Marek Polacek <polacek@redhat.com>
3737
3738 PR c++/90953 - ICE with -Wmissing-format-attribute.
3739 * c-common.c (check_function_arguments_recurse): Use
3740 get_attribute_name.
3741 (check_missing_format_attribute): Likewise.
3742
1bf32c11
MP
37432019-06-19 Marek Polacek <polacek@redhat.com>
3744
3745 PR c++/60364 - noreturn after first decl not diagnosed.
3746 * c-attribs.c (handle_noreturn_attribute): No longer static.
3747 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3748 Declare.
3749 * c-format.c (check_function_format): Use get_attribute_name.
3750
a04c0734
MS
37512019-06-19 Martin Sebor <msebor@redhat.com>
3752
3753 PR translation/90156
3754 * c-format.c (function_format_info::format_type): Adjust type.
3755 (function_format_info::is_raw): New member.
3756 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3757 (decode_format_attr): Adjust call to decode_format_type.
3758 Avoid a redundant call to convert_format_name_to_system_name.
3759 Avoid abbreviating the word "arguments" in a diagnostic.
3760 (format_warning_substr): New function.
3761 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3762 (finish_dollar_format_checking): Same.
3763 (check_format_info): Same.
3764 (struct baltoks_t): New.
3765 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3766 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3767 functions.
3768 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3769 maybe_diag_unbalanced_tokens.
3770 (handle_format_attribute): Spell out the word "arguments" in
3771 a diagnostic.
3772
d3786ebb
MB
37732019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3774
3775 PR c++/90449 - add -Winaccessible-base option.
3776 * c.opt (Winaccessible-base): New option.
3777
bf38f7e9
JJ
37782019-06-10 Jakub Jelinek <jakub@redhat.com>
3779
3780 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3781 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3782 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3783 combined/composite constructs where it is not allowed. Copy over
3784 OMP_CLAUSE_REDUCTION_INSCAN.
3785
0ecf545c
MS
37862019-06-05 Martin Sebor <msebor@redhat.com>
3787
3788 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3789 (handle_alias_ifunc_attribute): Same.
3790 (handle_copy_attribute): Same.
3791 (handle_weakref_attribute): Same.
3792 (handle_nonnull_attribute): Same.
3793 * c-warn.c (warn_for_sign_compare): Same.
3794 (warn_for_restrict): Same.
3795 * c.opt: Same.
3796
36b34127
MS
37972019-06-05 Martin Sebor <msebor@redhat.com>
3798
3799 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3800 * c.opt (-Wformat-diag): Remove a spurious period.
3801
357a352f
JJ
38022019-05-29 Jakub Jelinek <jakub@redhat.com>
3803
3804 PR c/90628
3805 * c-common.c (check_builtin_function_arguments)
3806 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3807 as last argument.
3808
2b8235ea
EB
38092019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3810
3811 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3812
6d86ddc4
ML
38132019-05-22 Martin Liska <mliska@suse.cz>
3814
3815 PR lto/90500
3816 * c-attribs.c (handle_copy_attribute): Do not copy
3817 target_clones attribute.
3818
419ba5b9
EB
38192019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3820
3821 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3822 * c-ada-spec.c (print_assignment_operator): New function.
3823 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3824 assignment operators declared as methods and filter out the others.
3825
e03436e7
TS
38262019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3827
3828 PR c/89433
3829 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3830 "omp declare target".
3831
a9c697b8
MS
38322019-05-16 Martin Sebor <msebor@redhat.com>
3833
ab20d992
JJ
3834 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3835 keywords, operators, and types in diagnostics.
3836 (handle_scalar_storage_order_attribute): Same.
3837 (handle_mode_attribute): Same.
3838 (handle_visibility_attribute): Same.
3839 (handle_assume_aligned_attribute): Same.
3840 (handle_no_split_stack_attribute): Same.
3841 * c-common.c (shorten_compare): Same.
3842 (c_common_truthvalue_conversion): Same.
3843 (cb_get_source_date_epoch): Same.
3844 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3845 in diagnostics.
3846 (interpret_float): Same.
3847 * c-omp.c (c_finish_omp_for): Same.
3848 * c-opts.c (c_common_post_options): Same.
3849 * c-pch.c (c_common_pch_pragma): Same.
3850 * c-pragma.c (pop_alignment): Same.
3851 (handle_pragma_pack): Same.
3852 (apply_pragma_weak): Same.
3853 (handle_pragma_weak): Same.
3854 (handle_pragma_scalar_storage_order): Same.
3855 (handle_pragma_redefine_extname): Same.
3856 (add_to_renaming_pragma_list): Same.
3857 (maybe_apply_renaming_pragma): Same.
3858 (push_visibility): Same.
3859 (handle_pragma_visibility): Same.
3860 (handle_pragma_optimize): Same.
3861 (handle_pragma_message): Same.
3862 * c-warn.c (warn_for_omitted_condop): Same.
3863 (lvalue_error): Same.
a9c697b8 3864
6b943512
RB
38652019-05-15 Richard Biener <rguenther@suse.de>
3866
3867 PR c/90474
3868 * c-common.c (c_common_mark_addressable_vec): Also mark
3869 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3870 c_mark_addressable.
ab20d992 3871
b744fc85
NS
38722019-05-06 Nathan Sidwell <nathan@acm.org>
3873
3874 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3875
598f50d7
NS
38762019-04-30 Nathan Sidwell <nathan@acm.org>
3877
3878 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3879
5bcc5a3b
ML
38802019-04-30 Martin Liska <mliska@suse.cz>
3881
3882 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3883 for unknown options.
3884
e78a87f7
RS
38852019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3886
3887 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3888 the pointer target rather than the pointer itself.
3889
c280b7ee
JJ
38902019-04-19 Jakub Jelinek <jakub@redhat.com>
3891
3892 PR c/89888
3893 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3894 arguments.
3895 (c_do_switch_warnings): Remove outside_range_p argument.
3896 * c-common.c (check_case_bounds): Removed.
3897 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3898 Don't call check_case_bounds. Fold low_value as well as high_value.
3899 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3900 Check for case labels outside of range of original type here and
3901 adjust them.
3902
8e8225e6
JJ
39032019-04-12 Jakub Jelinek <jakub@redhat.com>
3904
63b8a166
JJ
3905 PR translation/90041
3906 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3907 in the Warn diagnostics.
3908
8e8225e6
JJ
3909 PR c/89946
3910 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3911 function comment. Warn if arguments of the attribute are not positive
3912 integer constants.
3913
53a3f614
EB
39142019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3915
3916 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3917 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3918
22be5873
EB
39192019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3920
3921 * c-ada-spec.c (is_float128): New predicate extracted from...
3922 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3923 <REAL_TYPE>: ...here. Call it.
3924
34facf20
DM
39252019-04-05 David Malcolm <dmalcolm@redhat.com>
3926
3927 PR c/89985
3928 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3929 auto_diagnostic_group. Guard inform calls by result of
3930 warning_at call.
3931
05564120
MP
39322019-04-05 Marek Polacek <polacek@redhat.com>
3933
ab20d992 3934 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3935 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3936 of RHS.
3937
7a506c3c
JM
39382019-04-03 Jason Merrill <jason@redhat.com>
3939
3940 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3941 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3942
ddeae8c8
MS
39432019-04-01 Martin Sebor <msebor@redhat.com>
3944
3945 PR c/89685
3946 * c-attribs.c (handle_copy_attribute): Handle references and
3947 non-constant expressions.
3948
a15ffa22
JJ
39492019-03-22 Jakub Jelinek <jakub@redhat.com>
3950
3951 PR c++/87481
3952 * c.opt (-fconstexpr-ops-limit=): New option.
3953
36a3a7a3
JJ
39542019-03-21 Jakub Jelinek <jakub@redhat.com>
3955
3956 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3957 template param.
3958
bec1da64
MS
39592019-03-19 Martin Sebor <msebor@redhat.com>
3960
3961 PR tree-optimization/89688
3962 * c-common.c (braced_list_to_string): Make static.
3963 (braced_lists_to_strings): Define new function.
3964 * c-common.h (braced_list_to_string): Remove.
3965 (braced_lists_to_strings): Declare.
3966
1fe61adf
ML
39672019-03-12 Martin Liska <mliska@suse.cz>
3968
3969 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3970
93964ebd
ML
39712019-03-11 Martin Liska <mliska@suse.cz>
3972
3973 * c-opts.c (c_common_post_options): Wrap apostrophes
3974 in gcc internal format with %'.
3975
a3f9f006
ML
39762019-03-11 Martin Liska <mliska@suse.cz>
3977
3978 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3979 in a string format message and fix GNU coding style.
3980 * c-common.c (vector_types_convertible_p): Likewise.
3981 (c_build_vec_perm_expr): Likewise.
3982 * c-indentation.c (get_visual_column): Likewise.
3983 * c-opts.c (c_common_handle_option): Likewise.
3984 (c_common_post_options): Likewise.
3985 (sanitize_cpp_opts): Likewise.
3986 * c-pch.c (c_common_pch_pragma): Likewise.
3987 * c-pragma.c (handle_pragma_pack): Likewise.
3988
1db01ff9
JJ
39892019-03-08 Jakub Jelinek <jakub@redhat.com>
3990
3991 PR tree-optimization/89550
3992 * c-common.c (c_common_truthvalue_conversion): Only set
3993 TREE_NO_WARNING if warning_at returned true.
3994 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3995
ba790e6f
JJ
39962019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3997 Martin Sebor <msebor@gmail.com>
3998
3999 * c.opt (Wmissing-attributes): Clean up doc string.
4000
7da73ba7
JJ
40012019-02-25 Jakub Jelinek <jakub@redhat.com>
4002
4003 PR c/89495
4004 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4005 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4006 checking.
4007
921bb9d1
RB
40082019-02-22 Richard Biener <rguenther@suse.de>
4009
4010 * c-pch.c (no_checksum): Remove.
4011 (pch_init): Remove assertion that executable_checksum is not
4012 all zero.
4013 (c_common_valid_pch): Likewise.
4014
e2ebb05c
MS
40152019-02-18 Martin Sebor <msebor@redhat.com>
4016
4017 PR middle-end/89294
4018 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4019
3fe53000
DM
40202019-02-16 David Malcolm <dmalcolm@redhat.com>
4021
4022 PR c++/88680
4023 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4024 implementing -Wtype-limits.
4025
28a8cef1
MS
40262019-02-11 Martin Sebor <msebor@redhat.com>
4027
4028 PR c++/87996
4029 * c-common.c (invalid_array_size_error): New function.
4030 (valid_array_size_p): Call it. Handle size as well as type.
4031 * c-common.h (valid_constant_size_p): New function.
4032 (enum cst_size_error): New type.
4033
ec2be203
DM
40342019-01-31 David Malcolm <dmalcolm@redhat.com>
4035
4036 PR c/89122
4037 * known-headers.cc (get_stdlib_header_for_name): Add
4038 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4039
8936f047
JJ
40402019-01-31 Jakub Jelinek <jakub@redhat.com>
4041
4042 PR libstdc++/88170
4043 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4044 a C cast in pp_c_flag_gnu_v3 mode.
4045
6a335b96
JJ
40462019-01-29 Jakub Jelinek <jakub@redhat.com>
4047
4048 PR c/86125
4049 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4050 builtin_structptr_types types even for C.
4051
2a06eba5
BE
40522019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4053
4054 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4055 when rhs is of array type correctly. Fix handling of nested structures.
4056 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4057 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4058 type casts within nested compound expressions.
4059
18a23298
JJ
40602019-01-22 Jakub Jelinek <jakub@redhat.com>
4061
4062 PR middle-end/88968
4063 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4064 variable after using BIT_FIELD_REF.
4065
420183d9
L
40662019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4067
4068 PR c/51628
4069 PR c/88664
4070 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4071 Remove the boolean argument.
4072 * c-warn.c (check_address_of_packed_member): Renamed to ...
4073 (check_address_or_pointer_of_packed_member): This. Also
4074 warn pointer conversion.
4075 (check_and_warn_address_of_packed_member): Renamed to ...
4076 (check_and_warn_address_or_pointer_of_packed_member): This.
4077 Also warn pointer conversion.
4078 (warn_for_address_or_pointer_of_packed_member): Remove the
4079 boolean argument. Don't check pointer conversion here.
4080
99063eee
RS
40812019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4082
4083 PR inline-asm/52813
4084 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4085
a30d0196
JJ
40862019-01-14 Jakub Jelinek <jakub@redhat.com>
4087
4088 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4089 and __cpp_nontype_template_parameter_auto. Add a comment that
4090 __cpp_template_auto is deprecated.
4091
2d91f79d
TH
40922019-01-14 Tom Honermann <tom@honermann.net>
4093
4094 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4095 * c-common.c (c_common_reswords): Add char8_t.
4096 (fix_string_type): Use char8_t for the type of u8 string literals.
4097 (c_common_get_alias_set): char8_t doesn't alias.
4098 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4099 C++.
4100 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4101 (keyword_begins_type_specifier): Add RID_CHAR8.
4102 * c-common.h (rid): Add RID_CHAR8.
4103 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4104 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4105 Define char8_type_node and char8_array_type_node.
4106 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4107 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4108 (c_cpp_builtins): Predefine __cpp_char8_t.
4109 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4110 CPP_UTF8STRING.
4111 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4112 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4113 targeting C++2a.
4114 * c.opt: Add the -fchar8_t command line option.
4115
23db6ced
MS
41162019-01-14 Martin Sebor <msebor@redhat.com>
4117
4118 PR target/88638
4119 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4120 and issue errors if it fails.
4121 * c-common.h (valid_format_string_type_p): Declare.
4122 * c-format.c (valid_stringptr_type_p): Rename...
4123 (valid_format_string_type_p): ...to this and make extern.
4124 (handle_format_arg_attribute): Adjust to new name.
4125 (check_format_string): Same.
4126
234c3818
L
41272019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4128
4129 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4130 Replace "may may" with "may" in warning message.
4131
d8fcab68
JJ
41322019-01-07 Jakub Jelinek <jakub@redhat.com>
4133
4134 PR c++/85052
4135 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4136 (c_build_vec_convert): Declare.
4137 * c-common.c (c_build_vec_convert): New function.
4138
29d24852
MS
41392019-01-04 Martin Sebor <msebor@redhat.com>
4140
4141 PR c/88546
4142 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4143 Handle C++ empty throw specification and C11 _Noreturn.
4144 (has_attribute): Also handle C11 _Noreturn.
4145
9069a4c9
MS
41462019-01-04 Martin Sebor <msebor@redhat.com>
4147
4148 PR c/88363
4149 * c-attribs.c (positional_argument): Also accept enumerated types.
4150
a5544970
JJ
41512019-01-01 Jakub Jelinek <jakub@redhat.com>
4152
4153 Update copyright years.
4154
da77eace
L
41552018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4156
4157 PR c/51628
4158 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4159 * c-warn.c (check_alignment_of_packed_member): New function.
4160 (check_address_of_packed_member): Likewise.
4161 (check_and_warn_address_of_packed_member): Likewise.
4162 (warn_for_address_or_pointer_of_packed_member): Likewise.
4163 * c.opt: Add -Wno-address-of-packed-member.
4164
573767d4
DM
41652018-12-20 David Malcolm <dmalcolm@redhat.com>
4166
4167 PR c++/87504
4168 * c-warn.c (get_outermost_macro_expansion): New function.
4169 (spelled_the_same_p): Use it to unwind the macro expansions, and
4170 compare the outermost macro in each nested expansion, rather than
4171 the innermost.
4172
a14feb3c
DM
41732018-12-19 David Malcolm <dmalcolm@redhat.com>
4174
4175 PR c++/87504
4176 * c-common.h (warn_tautological_cmp): Convert 1st param from
4177 location_t to const op_location_t &.
4178 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4179 when testing for INTEGER_CST.
4180 (warn_tautological_bitwise_comparison): Convert 1st param from
4181 location_t to const op_location_t &; use it to build a
4182 binary_op_rich_location, and use this.
4183 (spelled_the_same_p): New function.
4184 (warn_tautological_cmp): Convert 1st param from location_t to
4185 const op_location_t &. Warn for macro expansions if
4186 spelled_the_same_p. Use binary_op_rich_location.
4187
dfd7fdca
DM
41882018-12-19 David Malcolm <dmalcolm@redhat.com>
4189
4190 PR c++/43064
4191 PR c++/43486
4192 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4193 (verify_tree): Handle location wrappers.
4194 (c_common_truthvalue_conversion): Strip any location wrapper.
4195 Handle CONST_DECL.
4196 (fold_offsetof): Strip any location wrapper.
4197 (complete_array_type): Likewise for initial_value.
4198 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4199 index before checking for INTEGER_CST.
4200 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4201 print parentheses around location wrappers.
4202 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4203 before checking for INTEGER_CST.
4204 (warn_tautological_bitwise_comparison): Call
4205 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4206 before checking for INTEGER_CST.
4207 (readonly_error): Strip any location wrapper.
4208 (warn_array_subscript_with_type_char): Strip location wrappers
4209 before checking for INTEGER_CST. Use the location of the index if
4210 available.
4211
5c8b3702
JM
42122018-12-06 Jason Merrill <jason@redhat.com>
4213
4214 PR c++/88136 - -Wdeprecated-copy false positives
4215 * c.opt (Wdeprecated-copy-dtor): New.
4216 (Wdeprecated-copy): Move to -Wextra.
4217
673670da
MS
42182018-11-29 Martin Sebor <msebor@redhat.com>
4219
4220 PR c/88172
4221 PR testsuite/88208
4222 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4223 alignments to values less than the target requires.
4224 (has_attribute): For attribute aligned consider both the attribute
4225 and the alignment bits.
4226 * c-common.c (c_init_attributes): Optionally issue a warning for
4227 zero alignment.
4228
04864ec8
MS
42292018-11-28 Martin Sebor <msebor@redhat.com>
4230
4231 PR c/88065
4232 PR c/87297
4233 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4234 or destination is an error.
4235
ace83db0
JJ
42362018-11-28 Jakub Jelinek <jakub@redhat.com>
4237
4238 PR c++/88215
4239 * c-ubsan.c: Include langhooks.h.
4240 (ubsan_instrument_division): Change gcc_assert that main variants
4241 of op0 and op1 types are equal to gcc_checking_assert that the
4242 main variants are compatible types.
4243
da193a27
EB
42442018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4245
4246 * c-ada-spec.c: Include stringpool.h.
4247 (has_static_fields): Return false for incomplete types.
4248 (is_tagged_type): Likewise.
4249 (has_nontrivial_methods): Likewise.
4250 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4251 (struct overloaded_name_hash): New structure.
4252 (struct overloaded_name_hasher): Likewise.
4253 (overloaded_names): New global variable.
4254 (init_overloaded_names): New static function.
4255 (overloaded_name_p): New predicate.
4256 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4257 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4258 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4259 Remove always-true condition and dump forward types.
4260 (dump_ada_specs): Delete overloaded_names.
4261
98f08eb8
MS
42622018-11-20 Martin Sebor <msebor@redhat.com>
4263
4264 * c-attribs.c (type_for_vector_size): New function.
4265 (type_valid_for_vector_size): Same.
4266 (handle_vector_size_attribute): Move code to the functions above
4267 and call them.
4268 (validate_attribute, has_attribute): New functions.
4269 * c-common.h (has_attribute): Declare.
4270 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4271 * c-common.c (c_common_resword): Same.
4272
2674fa47
JM
42732018-11-16 Jason Merrill <jason@redhat.com>
4274
4275 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4276 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4277
258b3854
JJ
42782018-11-16 Jakub Jelinek <jakub@redhat.com>
4279
4280 PR middle-end/87854
4281 * c-common.c (fix_string_type): Reject string literals larger than
4282 TYPE_MAX_VALUE (ssizetype) bytes.
4283
1d249509
MS
42842018-11-15 Martin Sebor <msebor@redhat.com>
4285
4286 PR c++/87541
4287 PR c++/87542
4288 * c-attribs.c (positional_argument): New function.
4289 (handle_alloc_size_attribute): Use it and simplify.
4290 (handle_alloc_align_attribute): Same.
4291 (handle_assume_aligned_attribute): Same.
4292 (handle_nonnull_attribute): Same.
4293 * c-common.c (check_function_arguments): Pass fntype to
4294 check_function_format.
4295 * c-common.h (check_function_format): Add an argument.
4296 (PosArgFlags, positional_argument): Declare new type and function.
4297 * c-format.c (decode_format_attr): Add arguments.
4298 (check_format_string, get_constant): Same.
4299 (convert_format_name_to_system_name): Adjust.
4300
478dd60d
DM
43012018-11-15 David Malcolm <dmalcolm@redhat.com>
4302
4303 PR other/19165
4304 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4305
8cca0163
JJ
43062018-11-14 Jakub Jelinek <jakub@redhat.com>
4307
8ee09943
JJ
4308 P1236R1 - Signed integers are two's complement
4309 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4310 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4311 with in-range second operand well defined for -std=c++2a.
4312
8cca0163
JJ
4313 PR other/88007
4314 * c-common.c (parse_optimize_options): Allocate option string from
4315 opts_obstack rather than as GC memory. Move the allocation after
4316 warning for invalid option.
4317
620e594b
DM
43182018-11-13 David Malcolm <dmalcolm@redhat.com>
4319
4320 * c-common.c (c_get_substring_location): Update for renaming of
4321 get_source_location_for_substring to get_location_within_string.
4322 * c-lex.c: Replace "source_location" with "location_t".
4323 * c-opts.c: Likewise.
4324 * c-ppoutput.c: Likewise.
4325
f9731de3
MS
43262018-11-13 Martin Sebor <msebor@redhat.com>
4327
4328 PR middle-end/81824
4329 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4330 (handle_tls_model_attribute): Improve diagnostics.
4331
e4bd6d5e
JM
43322018-11-12 Jason Merrill <jason@redhat.com>
4333
a6bb6b07
JM
4334 * c-cppbuiltin.c (c_cpp_builtins): Define
4335 __cpp_impl_destroying_delete.
4336
e4bd6d5e
JM
4337 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4338 __cpp_conditional_explicit.
4339
79a2c428
MS
43402018-11-09 Martin Sebor <msebor@redhat.com>
4341
4342 PR middle-end/81824
4343 * c-attribs.c (handle_copy_attribute): New function.
4344
4c7bd361
MS
43452018-11-09 Martin Sebor <msebor@redhat.com>
4346
4347 PR c/87795
4348 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4349
28567c40
JJ
43502018-11-08 Jakub Jelinek <jakub@redhat.com>
4351
4352 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4353 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4354 enum omp_memory_order MEMORY_ORDER.
4355 (c_finish_omp_flush): Add MO argument.
4356 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4357 (c_finish_omp_for): Add FINAL_P argument.
4358 * c-omp.c: Include memmodel.h.
4359 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4360 OMP_TASKGROUP_CLAUSES to it.
4361 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4362 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4363 instead of OMP_ATOMIC_SEQ_CST.
4364 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4365 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4366 __atomic_thread_fence call with the given value.
4367 (check_omp_for_incr_expr): Formatting fixes.
4368 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4369 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4370 is not constant expression 1 or -1. Transform NE_EXPR loops
4371 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4372 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4373 loops too.
4374 (c_omp_split_clauses): Add support for combined
4375 #pragma omp parallel master and
4376 #pragma omp {,parallel }master taskloop{, simd} constructs.
4377 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4378 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4379 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4380 (c_omp_predetermined_sharing): Don't return
4381 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4382 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4383 PRAGMA_OMP_REQUIRES.
4384 * c-pragma.h (enum pragma_kind): Likewise.
4385 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4386 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4387
204839e7
DM
43882018-11-08 David Malcolm <dmalcolm@redhat.com>
4389
4390 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4391
d8010ee4
DM
43922018-11-08 David Malcolm <dmalcolm@redhat.com>
4393
4394 * c-format.c (local_cgraph_node_ptr_node): New variable.
4395 (gcc_dump_printf_char_table): Add entry for %C.
4396 (get_pointer_to_named_type): New function, taken from the handling
4397 code for "gimple *" from...
4398 (init_dynamic_diag_info): ...here. Add handling for
4399 "cgraph_node *".
4400 * c-format.h (T_CGRAPH_NODE): New.
4401
4be5c72c
JM
44022018-10-19 Jason Merrill <jason@redhat.com>
4403
4404 * c-cppbuiltin.c (c_cpp_builtins): Add
4405 __cpp_nontype_template_parameter_class.
4406
f3f6029d
NS
44072018-10-31 Nathan Sidwell <nathan@acm.org>
4408
ab5324fb
NS
4409 * c-opts.c (c_finish_options): Force command line macro
4410 location. Refactor to avoid repeating main debug hook.
4411 (push_command_line_include): Clarify comment.
4412
f3f6029d
NS
4413 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4414
91e3ec29
MS
44152018-10-30 Martin Sebor <msebor@redhat.com>
4416
4417 PR middle-end/87041
4418 * c-format.c (check_format_types): Avoid diagnosing null pointer
4419 arguments to printf-family of functions.
4420
b5ff4f5c
MP
44212018-10-30 Marek Polacek <polacek@redhat.com>
4422
4423 Implement P0892R2, explicit(bool).
4424 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4425
7e2de6df
DM
44262018-10-29 David Malcolm <dmalcolm@redhat.com>
4427
4428 * name-hint.h (name_hint::take_deferred): New member function.
4429
b2bf438c
DM
44302018-10-29 David Malcolm <dmalcolm@redhat.com>
4431
4432 PR c++/56856
4433 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4434 argument.
4435 (check_function_restrict): Rename param "argarray" to
4436 "unfolded_argarray", and make a copy named "argarray", calling
4437 fold_for_warn on each argument.
4438 (check_function_arguments): Add note about responsibility for
4439 folding the arguments.
4440
9f936c86
JM
44412018-10-17 Joseph Myers <joseph@codesourcery.com>
4442
4443 * c-common.c (flag_isoc2x): New variable.
4444 * c-common.h (clk_c): Update comment to reference C2X.
4445 (flag_isoc99, flag_isoc11): Update comments to reference future
4446 standard versions in general.
4447 (flag_isoc2x): Declare.
4448 * c-opts.c (set_std_c2x): New function.
4449 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4450 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4451 flag_isoc2x to 0.
4452 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4453
7a8a92c4
JM
44542018-10-17 Joseph Myers <joseph@codesourcery.com>
4455
4456 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4457 (std=iso9899:2018): Document C17 as published in 2018.
4458
4dc003ff
CL
44592018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4460
4461 PR c++/87364
4462 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4463
79371671
WW
44642018-10-11 Will Wray <wjwray@gmail.com>
4465
4466 PR c++/87364
4467 * c-pretty-print.h (pp_c_type_cast): Prototype.
4468 (pp_c_integer_constant): Likewise.
4469 * c-pretty-print.c (pp_c_type_cast): No longer static.
4470 (pp_c_integer_constant): Likewise.
4471 (pp_c_enumeration_constant): Fix loop termination when finding
4472 name of constant. No longer returns a value. Call
4473 pp_c_integer_constant.
4474 (c_pretty_printer::constant): Update for changes to
4475 pp_c_enumeration_constant.
4476
46c62690
JJ
44772018-10-11 Jakub Jelinek <jakub@redhat.com>
4478
4479 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4480 for no_unique_address.
4481
c24300ba
DM
44822018-10-09 David Malcolm <dmalcolm@redhat.com>
4483
4484 * c-common.c (c_option_controlling_cpp_error): Rename to...
4485 (c_option_controlling_cpp_diagnostic): ...this, and convert
4486 "reason" from int to enum.
4487 (c_cpp_error): Rename to...
4488 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4489 * c-common.h (c_cpp_error): Rename to...
4490 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4491 * c-opts.c (c_common_init_options): Update for renaming.
4492
8656dafa
RS
44932018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4494
4495 PR c/87286
4496 * c-common.c (vector_types_compatible_elements_p): Use
4497 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4498
8cff0652
VK
44992018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4500
4501 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4502 to generate constructor destructor priority warning.
4503 * c.opt (-Wprio-ctor-dtor): New option.
4504
bedf03a2
JM
45052018-10-01 Jason Merrill <jason@redhat.com>
4506
4507 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4508
6cc430c1
EB
45092018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4510
4511 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4512 (dump_ada_node): Add const keyword.
4513
87677ac7
ML
45142018-09-25 Martin Liska <mliska@suse.cz>
4515
4516 * c-common.c (c_common_truthvalue_conversion):
4517 Remove Pascal from documentation.
4518
518196cb
EB
45192018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4520
4521 * c-ada-spec.c: Include diagnostic.h.
4522 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4523
a599af84
MP
45242018-09-19 Marek Polacek <polacek@redhat.com>
4525
4526 * c.opt (Wclass-conversion): New.
4527
9c4a4b3c
DM
45282018-09-17 David Malcolm <dmalcolm@redhat.com>
4529
4530 * c-format.c (range_label_for_format_type_mismatch::get_text):
4531 Update for new param.
4532
c896ecfe
DM
45332018-09-17 David Malcolm <dmalcolm@redhat.com>
4534
4535 * c-format.c (format_warning_at_char): Update for introduction of
4536 format_string_diagnostic_t.
4537 (format_type_warning): Likewise.
4538
80c6d1f4
MJ
45392018-09-17 Martin Jambor <mjambor@suse.cz>
4540
4541 PR c/63886
4542 * c.opt (Wabsolute-value): New.
4543
6d900107
BE
45442018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4545
4546 * c-common.c (complete_flexible_array_elts): New helper function.
4547 * c-common.h (complete_flexible_array_elts): Declare.
4548
b5764229
BE
45492018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4550
4551 * c-common.c (braced_list_to_string): Remove eval parameter.
4552 Add some more checks. Always create zero-terminated STRING_CST.
4553 * c-common.h (braced_list_to_string): Adjust prototype.
4554
85204e23
DM
45552018-08-27 David Malcolm <dmalcolm@redhat.com>
4556
4557 PR 87091
4558 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4559 to a tri-state.
4560 (maybe_suggest_missing_token_insertion): Likewise.
4561 (maybe_add_include_fixit): Add param "override_location". If set,
4562 and source-printing is enabled, then override the rich_location's
4563 primary location with that of the insertion point for the fix-it
4564 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4565 * c-common.h (extern void maybe_add_include_fixit): Add bool
4566 param.
4567 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4568 for conversion of show_caret_p to a tri-state.
4569 * c-warn.c (warn_for_restrict): Likewise.
4570 * known-headers.cc
4571 (suggest_missing_header::~suggest_missing_header): Update call to
4572 maybe_add_include_fixit to suggest overriding the location, as it
4573 is for a note.
4574
3d78e008
ML
45752018-08-27 Martin Liska <mliska@suse.cz>
4576
4577 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4578 fndecl_built_in_p and remove check for FUNCTION_DECL if
4579 possible.
3d78e008
ML
4580 (check_builtin_function_arguments): Likewise.
4581 (reject_gcc_builtin): Likewise.
4582 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4583
b5be6d0c
MP
45842018-08-26 Marek Polacek <polacek@redhat.com>
4585
4586 PR c++/87029, Implement -Wredundant-move.
4587 * c.opt (Wredundant-move): New option.
4588
79ca9c35
MP
45892018-08-21 Marek Polacek <polacek@redhat.com>
4590
4591 PR c++/86981, Implement -Wpessimizing-move.
4592 * c.opt (Wpessimizing-move): New option.
4593
097f82ec
DM
45942018-08-20 David Malcolm <dmalcolm@redhat.com>
4595
4596 PR other/84889
4597 * c-attribs.c (common_handle_aligned_attribute): Add
4598 auto_diagnostic_group instance.
4599 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4600 * c-opts.c (c_common_post_options): Likewise.
4601 * c-warn.c (warn_logical_not_parentheses): Likewise.
4602 (warn_duplicated_cond_add_or_warn): Likewise.
4603 (warn_for_multistatement_macros): Likewise.
4604
3fb558b1
NS
46052018-08-20 Nathan Sidwell <nathan@acm.org>
4606
4607 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4608 access.
4609
800c0e98
NS
46102018-08-17 Nathan Sidwell <nathan@acm.org>
4611
4612 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4613 field.
4614 (laxy_hex_fp_value_count): Make unsigned.
4615 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4616 manipulate the macro.
4617 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4618 cpp_define_lazily.
4619
6f795a92
DM
46202018-08-17 David Malcolm <dmalcolm@redhat.com>
4621
4622 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4623 (gcc_dump_printf_length_specs): New.
4624 (gcc_dump_printf_flag_pairs): New.
4625 (gcc_dump_printf_flag_specs): New.
4626 (gcc_dump_printf_char_table): New.
4627 (format_types_orig): Add entry for "gcc_dump_printf".
4628 (init_dynamic_diag_info): Set up length_char_specs and
4629 conversion_specs for gcc_dump_printf_format_type.
4630 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4631
c5d725c0
NS
46322018-08-17 Nathan Sidwell <nathan@acm.org>
4633
10f04917
NS
4634 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4635
c5d725c0
NS
4636 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4637 * c-cppbuiltin.c: Likewise.
4638
c0c12356
ML
46392018-08-17 Martin Liska <mliska@suse.cz>
4640
4641 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4642 Ignore/Deprecated flag. Warning is done automatically for
4643 Deprecated flags.
c0c12356 4644
10fcc142
DM
46452018-08-16 David Malcolm <dmalcolm@redhat.com>
4646
4647 PR c++/70693
4648 * c-common.c (selftest::c_family_tests): Call
4649 selftest::c_indentation_c_tests.
4650 * c-common.h (selftest::c_indentation_c_tests): New decl.
4651 * c-indentation.c: Include "selftest.h".
4652 (next_tab_stop): Add "tab_width" param, rather than accessing
4653 cpp_opts.
4654 (get_visual_column): Likewise. Clarify comment. Bulletproof
4655 against reading past the end of the line.
4656 (get_first_nws_vis_column): Add "tab_width" param.
4657 (detect_intervening_unindent): Likewise.
4658 (should_warn_for_misleading_indentation): Read tab width from
4659 cpp_opts and pass around.
4660 (selftest::test_next_tab_stop): New test.
4661 (selftest::assert_get_visual_column_succeeds): New function.
4662 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4663 (selftest::assert_get_visual_column_fails): New function.
4664 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4665 (selftest::test_get_visual_column): New test.
4666 (selftest::c_indentation_c_tests): New function.
4667
3f6677f4
NS
46682018-08-16 Nathan Sidwell <nathan@acm.org>
4669
4670 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4671 (store_ada_macro): Likewise.
4672 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4673 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4674
96e6ae57
DM
46752018-08-15 David Malcolm <dmalcolm@redhat.com>
4676
4677 * c-format.c: Include "selftest-diagnostic.h" and
4678 "gcc-rich-location.h".
4679 (format_warning_at_char): Pass NULL for new label params of
4680 format_warning_va.
4681 (class indirection_suffix): New class.
4682 (class range_label_for_format_type_mismatch): New class.
4683 (format_type_warning): Move logic for generating "*" suffix to
4684 class indirection_suffix. Create "fmt_label" and "param_label"
4685 to show their types, and pass them to the
4686 format_warning_at_substring calls.
4687 (selftest::test_type_mismatch_range_labels): New test.
4688 (selftest::c_format_c_tests): Call it.
4689
23aa9f7c
MS
46902018-08-13 Martin Sebor <msebor@redhat.com>
4691
4692 PR tree-optimization/71625
4693 * c-common.c (braced_list_to_string): New function.
4694 * c-common.h (braced_list_to_string): Declare it.
4695
f10a9135
NS
46962018-08-08 Nathan Sidwell <nathan@acm.org>
4697
4698 * c-common.c (try_to_locate_new_include_inertion_point): Use
4699 linemap_included_from_linemap.
4700 * c-lex.c (fe_file_change): Use linemap_included_from.
4701 * c-ppoutput.c (pp_file_change): Likewise.
4702
8a45b051
MS
47032018-08-01 Martin Sebor <msebor@redhat.com>
4704
4705 PR tree-optimization/86650
ab20d992 4706 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4707 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4708 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4709 * c-format.h (T89_G): Update to be "gimple *" rather than
4710 "gcall *".
4711 (local_gcall_ptr_node): Rename...
4712 (local_gimple_ptr_node): ...to this.
4713
e540ccc0
DM
47142018-07-31 David Malcolm <dmalcolm@redhat.com>
4715
4716 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4717 table entries for gcc_diag_char_table, and the 'Z' entry from
4718 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4719 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4720 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4721 adding missing "Z" for this table. Remove erroneous "G" and "K"
4722 entries.
4723 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4724 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4725 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4726
425fc685
RE
47272018-07-31 Richard Earnshaw <rearnsha@arm.com>
4728
4729 * c-common.c (speculation_safe_resolve_call): New function.
4730 (speculation_safe_resolve_params): New function.
4731 (speculation_safe_resolve_return): New function.
4732 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4733 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4734 __HAVE_SPECULATION_SAFE_VALUE.
4735
181463c2
DM
47362018-07-20 David Malcolm <dmalcolm@redhat.com>
4737
4738 * c-common.c (c_cpp_error): Remove redundant "line_table"
4739 parameter from call to rich_location::set_range.
4740 (maybe_suggest_missing_token_insertion): Likewise.
4741
0d7f9065
MS
47422018-07-20 Martin Sebor <msebor@redhat.com>
4743
4744 PR middle-end/82063
ab20d992 4745 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4746
00abf86c
MS
47472018-07-20 Martin Sebor <msebor@redhat.com>
4748
4749 PR middle-end/82063
4750 * c-common.h (c_common_handle_option): Change function argument
4751 to HOST_WIDE_INT.
4752 * c-opts.c (c_common_init_options): Same.
4753 (c_common_handle_option): Same. Remove special handling of
4754 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4755 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4756 options to take a HOST_WIDE_INT argument and accept a byte-size
4757 suffix. Initialize.
4758 (-Wvla-larger-than): Same.
4759 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4760 (-Wno-vla-larger-than): Same.
4761
9b452033
JJ
47622018-07-12 Jakub Jelinek <jakub@redhat.com>
4763
4764 * c-attribs.c (c_common_attribute_table): Add
4765 "omp declare target implicit" attribute.
4766
cd0762f3
RB
47672018-07-12 Richard Biener <rguenther@suse.de>
4768
4769 PR c/86453
4770 * c-attribs.c (handle_packed_attribute): Do not build a variant
4771 type with TYPE_PACKED, instead ignore the attribute if we may
4772 not apply to the original type.
4773
0b27c3ed
JJ
47742018-07-10 Jakub Jelinek <jakub@redhat.com>
4775
4776 PR c++/86443
4777 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4778 to contain TREE_LIST for both the original class iterator and the
4779 "last" helper var.
4780
e730a0ef
EB
47812018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4782
4783 * c-ada-spec.c (to_ada_name): Remove index parameter.
4784 (pp_ada_tree_identifier): Likewise.
4785 (dump_ada_macros): Adjust call to to_ada_name.
4786 (struct overloaded_name_hash): Delete.
4787 (struct overloaded_name_hasher): Likewise.
4788 (overloaded_names): Likewise.
4789 (compute_overloading_index): Likewise.
4790 (dump_ada_decl_name): Do not call compute_overloading_index and
4791 adjust calls to pp_ada_tree_identifier.
4792 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4793 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4794 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4795 (dump_ada_enum_type): Remove type and display_convention parameters.
4796 Adjust calls to pp_ada_tree_identifier.
4797 (dump_ada_node): Likewise and for dump_ada_structure.
4798 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4799 and tidy up.
4800 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4801 syntax.
4802 (print_constructor): Adjust call to pp_ada_tree_identifier.
4803 (print_destructor): Likewise.
4804 (dump_ada_declaration): Switch to aspect syntax.
4805 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4806 parameter with nested parameter.
4807 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4808 (dump_ada_specs): Do not delete overloaded_names table.
4809
8de583fc
PB
48102018-07-06 Peter Bergner <bergner@linux.ibm.com>
4811
4812 PR target/86324
e730a0ef 4813 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4814 target hook.
4815
09cff37b
NS
48162018-07-05 Nathan Sidwell <nathan@acm.org>
4817
4818 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4819 NO_IMPLICIT_EXTERN_C.
4820
98086b2b
ML
48212018-06-28 Martin Liska <mliska@suse.cz>
4822
4823 * cppspec.c: Include opt-suggestions.h.
4824
ab20d992
JJ
48252018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4826 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4827 Cesar Philippidis <cesar@codesourcery.com>
4828
4829 * c-pragma.h (enum pragma_omp_clause): Add
4830 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4831 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4832
f41b7612
JJ
48332018-06-20 Jakub Jelinek <jakub@redhat.com>
4834
4835 PR c++/86210
4836 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4837 comment.
4838
4252ccd7
MS
48392018-06-18 Martin Sebor <msebor@redhat.com>
4840
4841 PR middle-end/85602
4842 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4843 nonstring.
4844
e197e64e
KV
48452018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4846
4847 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4848
34a7a230
JM
48492018-06-13 Jason Merrill <jason@redhat.com>
4850
5cef3733
JM
4851 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4852 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4853 handling.
4854
34a7a230
JM
4855 PR c++/86094 - wrong code with defaulted move ctor.
4856 * c-opts.c (c_common_post_options): Bump the current ABI version to
4857 13. Set warn_abi_version and flag_abi_compat_version to the current
4858 version rather than 0. Fix defaulting flag_abi_compat_version from
4859 warn_abi_version.
4860
bb0f14ae
MS
48612018-06-12 Martin Sebor <msebor@redhat.com>
4862
4863 PR c/85931
4864 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4865 sizeof source and destination yields the same value.
4866
3713f2e2
ML
48672018-06-12 Martin Liska <mliska@suse.cz>
4868
4869 * c.opt: Make MPX-related options as Deprecated.
4870
4af78ef8
DM
48712018-06-08 David Malcolm <dmalcolm@redhat.com>
4872
4873 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4874 rather than 0.
4875
31db0fe0
ML
48762018-06-08 Martin Liska <mliska@suse.cz>
4877
4878 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4879 for MPX (macros, related functions, fields in cgraph_node, ...).
4880 (handle_bnd_legacy): Likewise.
4881 (handle_bnd_instrument): Likewise.
4882 * c.opt: Likewise.
4883
fe16acf2
JJ
48842018-06-06 Jakub Jelinek <jakub@redhat.com>
4885
4886 PR c++/86068
4887 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4888 __cpp_transactional_memory to 201500 instead of 210500.
4889
4dbdb49b
JM
48902018-06-06 Jason Merrill <jason@redhat.com>
4891
4892 PR c++/85710 - ICE with -Wmemset-elt-size.
4893 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4894
f8ad043f
JM
48952018-06-01 Jason Merrill <jason@redhat.com>
4896
4897 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4898 201703.
4899
abc24d93
EB
49002018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4901
4902 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4903 declaration for a typedef independently of whether the declaration of
4904 the subtype is generated.
4905
d258f4aa
MS
49062018-05-31 Martin Sebor <msebor@redhat.com>
4907
4908 PR c/82063
4909 * c.opt (-Wno-alloc-size-larger-than): New option.
4910
b67b9225
DP
49112018-04-22 David Pagan <dave.pagan@oracle.com>
4912
4913 PR c/55976
4914 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4915 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4916 differentiate between default (no option), -Wreturn-type, and
4917 -Wno-return-type.
4918
04eb9c55
JM
49192018-05-29 Jason Merrill <jason@redhat.com>
4920
4921 * c.opt (Winit-list-lifetime): New flag.
4922
b0c31bc6
BE
49232018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4924
4925 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4926 splay_tree_delete_pointers.
4927
44284983
JJ
49282018-05-26 Jakub Jelinek <jakub@redhat.com>
4929
4930 PR bootstrap/85921
4931 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4932 noinline variable to workaround broken kernel headers.
4933
b46b715d
JM
49342018-05-18 Jason Merrill <jason@redhat.com>
4935
4936 * c.opt (Wdeprecated-copy): New flag.
4937
40659769
ML
49382018-05-17 Martin Liska <mliska@suse.cz>
4939
4940 * c-warn.c (overflow_warning): Do not use
4941 space in between 'G_' and '('.
4942
403962ea
JM
49432018-05-09 Jason Merrill <jason@redhat.com>
4944
4945 * c-common.c (valid_array_size_p): Add complain parameter.
4946 * c-common.h: ...which defaults to true.
4947
1c9ee609
JJ
49482018-05-11 Jakub Jelinek <jakub@redhat.com>
4949
4950 PR c/85696
4951 * c-omp.c (c_omp_predetermined_sharing): Return
4952 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4953
19916065
ML
49542018-05-11 Martin Liska <mliska@suse.cz>
4955
92a285c1 4956 PR sanitizer/85556
19916065
ML
4957 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4958 TREE_LIST values.
4959
79e7b1fe
JJ
49602018-05-10 Jakub Jelinek <jakub@redhat.com>
4961
4962 PR c++/85662
4963 * c-common.h (fold_offsetof_1): Removed.
4964 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4965 CTX argument defaulted to ERROR_MARK.
4966 * c-common.c (fold_offsetof_1): Renamed to ...
4967 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4968 argument, convert the pointer constant to TYPE and use size_binop
4969 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4970 a pointer type. Adjust recursive calls.
4971
86c12f76
EB
49722018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4973
4974 PR c++/85400
4975 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4976
ee336e84
NS
49772018-05-07 Nathan Sidwell <nathan@acm.org>
4978
4979 * c.opt (ffor-scope): Remove functionality, issue warning.
4980
6c072e21
NS
49812018-05-03 Nathan Sidwell <nathan@acm.org>
4982
4983 * c.opt (ffriend-injection): Remove functionality, issue warning.
4984
2cc7d3a7
DM
49852018-05-01 David Malcolm <dmalcolm@redhat.com>
4986
4987 PR c/84258
4988 * c-format.c (struct format_check_results): Add field
4989 "number_non_char".
4990 (check_format_info): Initialize it, and warn if encountered.
4991 (check_format_arg): Distinguish between wide char and
4992 everything else when detecting arrays of non-char.
4993
7761dfbe
DM
49942018-04-30 David Malcolm <dmalcolm@redhat.com>
4995
4996 * c-format.c (get_corrected_substring): Update for
4997 location_get_source_line returning a char_span. Use a char_span
4998 when handling the prefix of the correction.
4999 * c-indentation.c (get_visual_column): Update for
5000 location_get_source_line returning a char_span.
5001 (get_first_nws_vis_column): Likewise.
5002
62e98ef1
DM
50032018-03-29 David Malcolm <dmalcolm@redhat.com>
5004
5005 PR c++/84269
5006 * known-headers.cc (get_stdlib_header_for_name): Add various names
5007 from <assert.h>, <string.h>, and <memory.h>; add more names from
5008 <stdio.h>.
5009
a7dea617
JJ
50102018-03-27 Jakub Jelinek <jakub@redhat.com>
5011
5012 PR c++/85061
5013 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5014 get_base_address of the second operand is a VAR_P, rather than the
5015 operand itself, and use gcc_checking_assert instead of gcc_assert.
5016
889a3a30
MP
50172018-03-23 Marek Polacek <polacek@redhat.com>
5018
5019 PR c++/85045
5020 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5021 <case RDIV_EXPR>: Tweak condition.
5022
452154b9
EB
50232018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5024
5025 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5026
63ecb626
JJ
50272018-03-16 Jakub Jelinek <jakub@redhat.com>
5028
ce811fc4
JJ
5029 PR c/84909
5030 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5031 diagnostics.
5032
63ecb626
JJ
5033 PR c/84910
5034 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5035 diagnostics.
5036
a1295eec
RB
50372018-03-16 Richard Biener <rguenther@suse.de>
5038
5039 PR c/84873
5040 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5041 unshare the possibly folded expression.
5042
919674fb
RB
50432018-03-15 Richard Biener <rguenther@suse.de>
5044
5045 PR c/84873
5046 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5047
f99309b2
MS
50482018-03-13 Martin Sebor <msebor@redhat.com>
5049
5050 PR tree-optimization/84725
5051 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5052 with all three narrow character types, including their qualified forms.
5053
e9b9fa4c
MS
50542018-03-12 Martin Sebor <msebor@redhat.com>
5055
5056 PR tree-optimization/83456
ab20d992 5057 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5058 Restore checking of bounded built-in functions.
5059 (check_function_arguments): Also return the result
5060 of warn_for_restrict.
ab20d992
JJ
5061 * c-common.c (check_function_restrict): Return bool.
5062 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5063
0805d020
MP
50642018-03-02 Marek Polacek <polacek@redhat.com>
5065
5066 PR c++/84171
5067 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5068 is erroneous.
5069
ed2a2f08
TS
50702018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5071
5072 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5073 function".
5074
90abdde0
MP
50752018-03-01 Marek Polacek <polacek@redhat.com>
5076
5077 PR c++/84639
5078 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5079 alignment in computation.
5080
c6db43fa
EB
50812018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5082
5083 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5084 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5085
9e25c7ed
EB
50862018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5087
5088 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5089 (is_char_array): Take a type instead of a declaration.
5090 (dump_ada_array_type): Likewise.
5091 (is_simple_enum): Minor tweak.
5092 (dump_ada_enum_type): New function extracted from...
5093 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5094 <INTEGER_TYPE>: Remove unreachable code.
5095 <RECORD_TYPE>: Likewise. Minor tweaks.
5096 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5097 <ENUMERAL_TYPE>: New case.
5098 <RECORD_TYPE>: Factor out common code.
5099 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5100 Minor tweaks. Deal with enumeral types.
5101 (dump_ada_structure): Minor tweaks.
5102
09de3550
EB
51032018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5104
5105 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5106 address for incomplete structures.
5107 (dump_forward_type): Do not bail out for incomplete structures.
5108 (dump_ada_declaration): Do not special-case incomplete structures
5109 for subtypes. Dump them as null records for types.
5110
095d8d4b
EB
51112018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5112
5113 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5114 (is_char_array): Fix formatting.
5115 (dump_template_types): Likewise.
5116 (dump_generic_ada_node): Rename into...
5117 (dump_ada_node): ...this.
5118 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5119 incomplete structures and not for empty structures. Do not use it
5120 when forward declarations are needed.
5121 (dump_forward_type): New function.
5122 (dump_nested_types): Remove FORWARD parameter. Do not consider
5123 TREE_VISITED and do not generate a forward declaration. Only dump
5124 original nested types for nested declaration.
5125 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5126 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5127 <RECORD_TYPE>: Do not consider TREE_VISITED.
5128 (dump_ada_declaration): Use booleans and fix formatting throughout.
5129 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5130 Call dump_forward_type instead of dump_nested_types for a typedef.
5131 Remove superfluous check and adjust call to dump_nested_types.
5132 <POINTER_TYPE>: Call dump_forward_type and fall through.
5133 (dump_ada_struct_decl): Rename into...
5134 (dump_ada_structure): ...this. Do not special-case empty structures.
5135
d4cfd486
MS
51362018-02-27 Martin Sebor <msebor@redhat.com>
5137
5138 PR c++/83871
5139 * c.opt (-Wmissing-attributes): New option.
5140
b22dbd03
ML
51412018-02-21 Martin Liska <mliska@suse.cz>
5142
5143 * c.opt (Wcatch-value=): Add IntegerRange.
5144
883dfe2a
JM
51452018-02-15 Jason Merrill <jason@redhat.com>
5146
5147 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5148
0444aa9c
NS
51492018-02-09 Nathan Sidwell <nathan@acm.org>
5150
5151 PR c/84293
5152 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5153 arg.
5154 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5155 arg. Adjust.
5156
cea71f0a
MS
51572018-02-09 Martin Sebor <msebor@redhat.com>
5158
5159 PR lto/84212
5160 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5161 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5162 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5163 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5164 (-Wuninitialized): Same.
5165
8c8b7be5
EB
51662018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5167
5168 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5169 keyword for components.
5170
7c30b12a
PC
51712018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5172
5173 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5174
eece7fe5
JK
51752018-02-02 Julia Koval <julia.koval@intel.com>
5176
5177 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5178
7d07a93a
MP
51792018-01-29 Marek Polacek <polacek@redhat.com>
5180
5181 PR c/83966
5182 * c-format.c (check_function_format): Check current_function_decl.
5183
53723269
JJ
51842018-01-27 Jakub Jelinek <jakub@redhat.com>
5185
5186 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5187 argument.
5188 (LAZY_HEX_FP_VALUES_CNT): Define.
5189 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5190 values rather than just 12.
5191 (builtin_define_with_hex_fp_value): Likewise.
5192
7365279f
BK
51932018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5194
92a285c1
ML
5195 PR other/70268
5196 * c.opt (-fmacro-prefix-map): New option.
5197 * c-opts.c (c_common_handle_option): Handle it.
5198 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5199 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5200
bb9869d5
DM
52012018-01-17 David Malcolm <dmalcolm@redhat.com>
5202
5203 PR c++/83814
5204 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5205
68dc87c3
EB
52062018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5207
5208 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5209 Skip 'f' and 'F' characters if it is true.
5210 (store_ada_macro): Minor tweak.
5211 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5212 <CPP_WSTRING>: Likewise.
5213 <CPP_STRING>: Output '&' in the buffer if not the first string.
5214 <CPP_NUMBER>: Adjust calls to dump_number.
5215
9a004410
DM
52162018-01-10 David Malcolm <dmalcolm@redhat.com>
5217
5218 PR c++/43486
5219 * c-common.c: Include "selftest.h".
5220 (get_atomic_generic_size): Perform the test for integral type
5221 before the range test for any integer constant, fixing indentation
5222 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5223 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5224 (selftest::test_fold_for_warn): New function.
5225 (selftest::c_common_c_tests): New function.
5226 (selftest::c_family_tests): Call it, and
5227 selftest::c_pretty_print_c_tests.
5228 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5229 * c-format.c (check_format_arg): Convert VAR_P check to a
5230 fold_for_warn.
5231 * c-pretty-print.c: Include "selftest.h".
5232 (pp_c_cast_expression): Don't print casts for location wrappers.
5233 (selftest::assert_c_pretty_printer_output): New function.
5234 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5235 (selftest::test_location_wrappers): New function.
5236 (selftest::c_pretty_print_c_tests): New function.
5237 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5238
5c0caeb3
RS
52392018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5240 Alan Hayward <alan.hayward@arm.com>
5241 David Sherwood <david.sherwood@arm.com>
5242
5243 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5244
73a699ae
RS
52452018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5246 Alan Hayward <alan.hayward@arm.com>
5247 David Sherwood <david.sherwood@arm.com>
5248
5249 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5250 as polynomial.
5251
928686b1
RS
52522018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5253 Alan Hayward <alan.hayward@arm.com>
5254 David Sherwood <david.sherwood@arm.com>
5255
5256 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5257 (convert_vector_to_array_for_subscript): Handle polynomial
5258 TYPE_VECTOR_SUBPARTS.
5259 (c_common_type_for_mode): Check valid_vector_subparts_p.
5260 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5261 VECTOR_CST_NELTS.
5262
85ec4feb
JJ
52632018-01-03 Jakub Jelinek <jakub@redhat.com>
5264
5265 Update copyright years.
5266
170a8bd6 52672017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5268 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5269
5270 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5271 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5272
ab20d992 52732017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5274
5275 PR debug/83527
5276 PR debug/83419
5277 * c-semantics.c (only_debug_stmts_after_p): New.
5278 (pop_stmt_list): Clear side effects in debug-only stmt list.
5279 Check for single nondebug stmt followed by debug stmts only.
5280
c12d20d4
AO
52812017-12-21 Alexandre Oliva <aoliva@redhat.com>
5282
5283 PR debug/83419
5284 * c-semantics.c (pop_stmt_list): Propagate side effects from
5285 single nondebug stmt to container list.
5286
01512446
JJ
52872017-12-19 Jakub Jelinek <jakub@redhat.com>
5288
5289 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5290 conditions with typical order conditions.
5291
82cfbd01
MP
52922017-12-18 Marek Polacek <polacek@redhat.com>
5293
5294 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5295 not in effect.
5296
99da11ec
MS
52972017-12-17 Martin Sebor <msebor@redhat.com>
5298
5299 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5300 an error for attribute warn_if_not_aligned.
5301
cc8bea0a
MS
53022017-12-16 Martin Sebor <msebor@redhat.com>
5303
5304 PR tree-optimization/78918
5305 * c-common.c (check_function_restrict): Avoid checking built-ins.
5306 * c.opt (-Wrestrict): Include in -Wall.
5307
4849deb1
JJ
53082017-12-15 Jakub Jelinek <jakub@redhat.com>
5309
5310 * c-attribs.c (c_common_attribute_table,
5311 c_common_format_attribute_table): Swap affects_type_identity
5312 and handler fields, adjust comments.
5313
c65e18d3
BE
53142017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5315
5316 * c.opt (Wcast-function-type): New warning option.
5317 * c-lex.c (get_fileinfo): Avoid warning.
5318 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5319
2004617a
QZ
53202017-12-14 Qing Zhao <qing.zhao@oracle.com>
5321
7365279f 5322 PR middle_end/79538
2004617a
QZ
5323 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5324 Adjust the size of buf1 and buf2, add a new buf to avoid
5325 format-overflow warning.
5326
ab20d992 53272017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5328
5329 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5330 subsequent statement list.
5331
5d9ae53d
MS
53322017-12-07 Martin Sebor <msebor@redhat.com>
5333
5334 PR c/81544
5335 PR c/81566
5336 * c-attribs.c (attr_aligned_exclusions): New array.
5337 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5338 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5339 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5340 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5341 (attr_warn_unused_result_exclusions): Same.
5342 (handle_hot_attribute, handle_cold_attribute): Simplify.
5343 (handle_const_attribute): Warn on function returning void.
5344 (handle_pure_attribute): Same.
5345 (handle_aligned_attribute): Diagnose conflicting attribute
5346 specifications.
5347 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5348
c79144f8
DM
53492017-12-06 David Malcolm <dmalcolm@redhat.com>
5350
5351 PR c/83236
5352 * c-common.c (selftest::c_family_tests): Call
5353 selftest::c_spellcheck_cc_tests.
5354 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5355 * c-spellcheck.cc: Include "selftest.h".
5356 (name_reserved_for_implementation_p): New function.
5357 (should_suggest_as_macro_p): New function.
5358 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5359 should_suggest_as_macro_p and call it.
5360 (selftest::test_name_reserved_for_implementation_p): New function.
5361 (selftest::c_spellcheck_cc_tests): New function.
5362 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5363
613bc14f
DM
53642017-12-06 David Malcolm <dmalcolm@redhat.com>
5365
5366 * c-spellcheck.cc: New file, taken from macro-handling code in
5367 spellcheck-tree.c.
5368 * c-spellcheck.h: New file, taken from macro-handling code in
5369 spellcheck-tree.h.
5370
e76c7157
JJ
53712017-12-01 Jakub Jelinek <jakub@redhat.com>
5372
5373 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5374 attribute.
5375 (handle_simd_attribute): Don't check for "cilk simd function"
5376 attribute. Reindent, formatting changes.
5377
b0da4034
JK
53782017-11-30 Julia Koval <julia.koval@intel.com>
5379
5380 * c-common.h (inv_list): Remove.
5381
058f0b9e
JJ
53822017-11-28 Jakub Jelinek <jakub@redhat.com>
5383
5384 PR sanitizer/81275
5385 * c-common.c (c_switch_covers_all_cases_p_1,
5386 c_switch_covers_all_cases_p): New functions.
5387 * c-common.h (c_switch_covers_all_cases_p): Declare.
5388
5e9d6aa4 53892017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5390 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5391
5392 * array-notation-common.c: Delete.
5393 * c-cilkplus.c: Ditto.
5394 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5395 * c-common.def (ARRAY_NOTATION_REF): Remove.
5396 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5397 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5398 c_validate_cilk_plus_loop, cilkplus_an_parts,
5399 cilk_ignorable_spawn_rhs_op,
5400 cilk_recognize_spawn): Remove.
5401 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5402 * c-omp.c: Remove CILK_SIMD check.
5403 * c-pragma.c: Ditto.
5404 * c-pragma.h: Remove CILK related pragmas.
5405 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5406 ARRAY_NOTATION_REF condition.
5407 (c_pretty_printer::expression): Ditto.
5408 * c.opt (fcilkplus): Remove.
5409 * cilk.c: Delete.
5410
1af4ebf5
MG
54112017-11-21 Marc Glisse <marc.glisse@inria.fr>
5412
5413 * c-pretty-print.c (pp_c_additive_expression,
5414 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5415
d44ed508
JJ
54162017-11-21 Jakub Jelinek <jakub@redhat.com>
5417
7d2f0f9b
JJ
5418 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5419
d44ed508
JJ
5420 PR c++/83059
5421 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5422 instead of tree_to_uhwi, formatting fix.
5423
26edace6
DM
54242017-11-20 David Malcolm <dmalcolm@redhat.com>
5425
5426 PR c/81404
5427 * known-headers.cc: New file, based on material from c/c-decl.c.
5428 (suggest_missing_header): Copied as-is.
5429 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5430 heavily edited to add C++ support. Add some knowledge about
5431 <limits.h>, <stdint.h>, and <wchar.h>.
5432 * known-headers.h: Likewise.
5433
6c7a259b
DM
54342017-11-20 David Malcolm <dmalcolm@redhat.com>
5435
5436 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5437 (lookup_name_fuzzy): Likewise. Convert return type from
5438 const char * to name_hint. Add location_t param.
5439 * name-hint.h: New header.
5440
f9c59f7e
JJ
54412017-11-19 Jakub Jelinek <jakub@redhat.com>
5442
5443 PR c/66618
5444 PR c/69960
5445 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5446
1e39313a
JM
54472017-11-16 Joseph Myers <joseph@codesourcery.com>
5448
5449 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5450 expected publication date of C17.
5451 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5452
3ca0dc60
JM
54532017-11-15 Joseph Myers <joseph@codesourcery.com>
5454
5455 PR c/81156
5456 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5457 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5458
025d57f0
MS
54592017-11-10 Martin Sebor <msebor@redhat.com>
5460
5461 PR c/81117
5462 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5463 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5464 * c.opt (-Wstringop-truncation): New option.
5465
1b6fa695
ML
54662017-11-06 Martin Liska <mliska@suse.cz>
5467
5468 PR middle-end/82404
5469 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5470 FE.
5471 * c.opt: Set default value of warn_return_type.
5472
64a5912c
DM
54732017-10-31 David Malcolm <dmalcolm@redhat.com>
5474
5475 * c-common.c (binary_op_error): Update for renaming of
5476 error_at_rich_loc.
5477 (c_parse_error): Likewise.
5478 * c-warn.c (warn_logical_not_parentheses): Likewise for
5479 renaming of inform_at_rich_loc.
5480 (warn_for_restrict): Likewise for renaming of
5481 warning_at_rich_loc_n.
5482
c76dc9c3
JM
54832017-10-30 Joseph Myers <joseph@codesourcery.com>
5484
5485 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5486 * c-opts.c (set_std_c17): New function.
5487 (c_common_init_options): Use gnu17 as default C version.
5488 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5489
ee5fd23a
MM
54902017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5491
5492 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5493 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5494 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5495 __FP_FAST_FMA<N>X.
5496
d1047465
MP
54972017-10-23 Marek Polacek <polacek@redhat.com>
5498
5499 PR c/82681
5500 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5501
9e878cf1
EB
55022017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5503
5504 * c-common.c (check_builtin_function_arguments): Also check arguments
5505 of __builtin_alloca_with_align_and_max.
5506
89b6abbb
DM
55072017-10-17 David Malcolm <dmalcolm@redhat.com>
5508
5509 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5510 rather than NULL to format_warning_va.
5511 (check_format_types): Likewise when calling format_type_warning.
5512 Remove code to extract source_ranges and source_range * in favor
5513 of just a location_t.
5514 (format_type_warning): Convert source_range * param to a
5515 location_t.
5516
39382c09
JJ
55172017-10-13 Jakub Jelinek <jakub@redhat.com>
5518
5519 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5520 [LR]SHIFT_EXPR.
5521
62e1c678
DM
55222017-10-12 David Malcolm <dmalcolm@redhat.com>
5523
5524 * c-common.c (enum missing_token_insertion_kind): New enum.
5525 (get_missing_token_insertion_kind): New function.
5526 (maybe_suggest_missing_token_insertion): New function.
5527 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5528
b90c9338
NS
55292017-10-11 Nathan Sidwell <nathan@acm.org>
5530
5531 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5532 (c_common_handle_option): Update incpath_kind names.
5533
3a266bcd
ML
55342017-10-11 Martin Liska <mliska@suse.cz>
5535
5536 PR sanitizer/82490
5537 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5538 Wattributes warning.
5539
8e6cdc90
RS
55402017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5541
5542 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5543 operating on trees as wide_ints.
5544 * c-common.c (pointer_int_sum): Likewise.
5545 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5546 * c-warn.c (match_case_to_enum_1): Likewise.
5547 (c_do_switch_warnings): Likewise.
5548 (maybe_warn_shift_overflow): Likewise.
5549
802b38c9
JJ
55502017-10-10 Jakub Jelinek <jakub@redhat.com>
5551
5552 PR c/82437
5553 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5554 instead of wide_int::from.
5555
4e34b338
JJ
55562017-10-06 Jakub Jelinek <jakub@redhat.com>
5557
5558 PR c/82437
5559 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5560 using to_widest use wide_int with the larger of the two precisions.
5561
4bc4b2b4
BE
55622017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5563
5564 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5565 functions.
5566
a1488398
RS
55672017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5568
5569 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5570 when combining the original unconverted comparison operands.
5571
01c9fb68
JJ
55722017-09-29 Jakub Jelinek <jakub@redhat.com>
5573
5574 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5575 attribute.
5576
6e3e8419
EB
55772017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5578
5579 * c-ada-spec.c (to_ada_name): Add index parameter.
5580 (pp_ada_tree_identifier): Likewise.
5581 (dump_ada_macros): Adjust call to to_ada_name.
5582 (struct overloaded_name_hash): New type.
5583 (struct overloaded_name_hasher): Likewise.
5584 (overloaded_names): New hash table.
5585 (compute_overloading_index): New function.
5586 (dump_ada_decl_name): Call it and pass the result to
5587 pp_ada_tree_identifier.
5588 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5589 (dump_ada_function_declaration): Likewise.
5590 (dump_generic_ada_node): Likewise.
5591 (print_constructor): Likewise.
5592 (print_destructor): Likewise.
5593 (dump_ada_specs): Delete overloaded_names table.
5594
79310774
EB
55952017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5596
5597 * c-ada-spec.c (max_ada_macros): Move around.
5598 (store_ada_macro_index): Likewise.
5599 (source_file): Rename into...
5600 (macro_source_file): ...this.
5601 (count_ada_macro): Move around.
5602 (store_ada_macro): Likewise.
5603 (compare_macro): Likewise.
5604 (print_ada_macros): Merge in...
5605 (dump_ada_macros): ...this.
5606 (source_file_base): Rename into...
5607 (current_source_file): ...this.
5608 (print_comment): Move around.
5609 (dump_ada_nodes): Call dump_ada_declaration directly.
5610 (struct with): Change type of limited field to bool.
5611 (append_withs): Change type of limited_access parameter to bool.
5612 (pp_ada_tree_identifie): Likewise.
5613 (dump_ada_decl_nam): Likewise.
5614 (dump_generic_ada_node): Likewise. Do not print the return type.
5615 (to_ada_name): Change type of space_found parameter to bool.
5616 (dump_ada_function_declaration): Return void and change type of
5617 parameters to bool. Also print the return type for a function.
5618 (print_ada_methods): Rename into...
5619 (dump_ada_methods): ...this.
5620 (print_ada_declaration): Rename into ...
5621 (dump_ada_declaration): ...this. Do not print the return type.
5622 (print_ada_struct_decl): Rename into...
5623 (dump_ada_struct_decl): ...this.
5624
7d386d45
JJ
56252017-09-29 Jakub Jelinek <jakub@redhat.com>
5626
5627 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5628 rather than DECL_INITIAL.
5629 (common_handle_aligned_attribute): Likewise.
5630
ab20d992 56312017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5632
5633 * c.opt (gen-decls): Add RejectNegative.
5634
026a79f7
AS
56352017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5636 Jakub Jelinek <jakub@redhat.com>
5637
5638 Add support for -std=c++2a.
5639 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5640 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5641 * c-opts.c (set_std_cxx2a): New.
5642 (c_common_handle_option): Set options when -std=c++2a is enabled.
5643 (c_common_post_options): Adjust comments.
5644 (set_std_cxx14, set_std_cxx17): Likewise.
5645
4a8ca690
EB
56462017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5647
5648 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5649 message for non-uniform endianness and issue a warning in C++.
5650
7b936140
JJ
56512017-09-15 Jakub Jelinek <jakub@redhat.com>
5652
5653 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5654 (Wc++17-compat): Change from undocumented alias to option.
5655 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5656 change C++1z to C++17 in description.
5657 (std=c++1z, std=gnu++1z): Change from option to undocumented
5658 deprecated alias.
5659 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5660 Adjust description.
5661 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5662 * c-opts.c (set_std_cxx1z): Rename to ...
5663 (set_std_cxx17): ... this.
5664 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5665 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5666 caller.
7b936140
JJ
5667 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5668 comments.
5669
12263f13
L
56702017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5671
5672 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5673 function alignment if warn_if_not_aligned_p is true.
5674
6836632e
NS
56752017-09-12 Nathan Sidwell <nathan@acm.org>
5676
5677 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5678 resort_sorted_fields): Move to c/c-decl.c.
5679 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5680 (struct sorted_fields_type): Move to c/c-lang.h.
5681
019bf9ad
JW
56822017-09-09 Jonathan Wakely <jwakely@redhat.com>
5683
5684 PR c++/81852
5685 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5686
bc7fe952
MP
56872017-09-04 Marek Polacek <polacek@redhat.com>
5688
5689 PR c/81783
5690 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5691 (warn_tautological_cmp): Call it.
5692
ab20d992 56932017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5694
5695 * c-opts.c (c_common_finish): Write dependency information even if
5696 there are errors.
5697
d2e05fcb
JJ
56982017-09-01 Jakub Jelinek <jakub@redhat.com>
5699
5700 PR c/81887
5701 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5702 (omp_pragmas_simd): ... here.
5703 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5704 create new clauses list containing just simd clause.
5705
18e2a8b8
RS
57062017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5707 Alan Hayward <alan.hayward@arm.com>
5708 David Sherwood <david.sherwood@arm.com>
5709
5710 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5711 into scalar_mode_supported_p call.
5712 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5713
16d22000
RS
57142017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5715 Alan Hayward <alan.hayward@arm.com>
5716 David Sherwood <david.sherwood@arm.com>
5717
5718 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5719 for the mode iterator.
5720
b397965c
RS
57212017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5722 Alan Hayward <alan.hayward@arm.com>
5723 David Sherwood <david.sherwood@arm.com>
5724
5725 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5726 * c-common.c (c_build_vec_perm_expr): Likewise.
5727
357b7604
RS
57282017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5729 Alan Hayward <alan.hayward@arm.com>
5730 David Sherwood <david.sherwood@arm.com>
5731
5732 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5733
e05c94ba
RS
57342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5735 Alan Hayward <alan.hayward@arm.com>
5736 David Sherwood <david.sherwood@arm.com>
5737
5738 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5739 before calling targetm.addr_space.valid_pointer_mode.
5740
5c20c4af
RS
57412017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5742 Alan Hayward <alan.hayward@arm.com>
5743 David Sherwood <david.sherwood@arm.com>
5744
5745 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5746
c94843d2 57472017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5748 Alan Hayward <alan.hayward@arm.com>
5749 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5750
5751 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5752 iterators.
5753 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5754
4e10a5a7
RS
57552017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5756 Alan Hayward <alan.hayward@arm.com>
5757 David Sherwood <david.sherwood@arm.com>
5758
5759 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5760 case statements.
5761
130fcab0
ML
57622017-08-29 Martin Liska <mliska@suse.cz>
5763
5764 PR other/39851
5765 * c-common.c (parse_optimize_options): Add argument to function
5766 call.
5767 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5768
14e18d71
DM
57692017-08-24 David Malcolm <dmalcolm@redhat.com>
5770
5771 * c-lex.c (interpret_float): Use token location
5772 when building an EXCESS_PRECISION_EXPR.
5773
2f687306
DM
57742017-08-21 David Malcolm <dmalcolm@redhat.com>
5775
5776 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5777 it to check_function_format.
5778 * c-common.h (check_function_arguments): Add vec<location_t> *
5779 param.
5780 (check_function_format): Likewise.
5781 * c-format.c (struct format_check_context): Add field "arglocs".
5782 (check_function_format): Add param "arglocs"; pass it to
5783 check_format_info.
ab20d992 5784 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5785 new field of format_ctx.
5786 (check_format_arg): Pass format_ctx->arglocs to new param of
5787 check_format_info_main.
5788 (class argument_parser): New field "arglocs".
5789 (argument_parser::argument_parser): Add "arglocs_" param and use
5790 it to initialize new field.
5791 (argument_parser::check_argument_type): Pass new arglocs field to
5792 check_format_types.
5793 (check_format_info_main): Add param "arglocs", and use it when
5794 constructing arg_parser.
5795 (check_format_types): Add param "arglocs"; use it if non-NULL when
5796 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5797
00aa1fa2
L
57982017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5799
5800 PR c/53037
5801 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5802 (c_common_attribute_table): Add warn_if_not_aligned.
5803 (handle_aligned_attribute): Renamed to ...
5804 (common_handle_aligned_attribute): Remove argument, name, and add
5805 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5806 (handle_aligned_attribute): New.
5807 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5808
27be025d
MS
58092017-08-14 Martin Sebor <msebor@redhat.com>
5810
5811 PR c/81117
5812 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5813 (handle_nonstring_attribute): New function.
5814
da67acb9
MS
58152017-08-14 Martin Sebor <msebor@redhat.com>
5816
5817 PR c/81117
5818 * c-format.h (T89_G): New macro.
5819 * c-format.c (local_gcall_ptr_node): New variable.
5820 (init_dynamic_diag_info): Initialize it.
5821
a8b522b4
ML
58222017-08-11 Martin Liska <mliska@suse.cz>
5823
5824 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5825 TARGET_SUPPORTS_ALIASES.
5826
32129a17
DM
58272017-08-10 David Malcolm <dmalcolm@redhat.com>
5828
5829 * c-common.c (c_parse_error): Add rich_location * param, using it
5830 rather implicitly using input_location.
5831 * c-common.h (c_parse_error): Add rich_location * param.
5832
30af3a2b
MP
58332017-08-09 Marek Polacek <polacek@redhat.com>
5834
5835 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5836 (c_common_truthvalue_conversion): Likewise.
5837 * c-omp.c (c_finish_omp_atomic): Likewise.
5838 * c-common.h (build_binary_op): Update declaration.
5839
314e6352
ML
58402017-08-08 Martin Liska <mliska@suse.cz>
5841
5842 * c-ada-spec.c: Include header files.
5843 * c-ubsan.c: Likewise.
5844 * c-warn.c: Likewise.
5845
56b5041c
JJ
58462017-08-07 Jakub Jelinek <jakub@redhat.com>
5847
5848 PR c/69389
5849 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5850
db440138
EB
58512017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5852
5853 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5854 (print_ada_methods): Likewise.
5855 (print_ada_declaration): Likewise.
5856
577eec56
ML
58572017-08-07 Martin Liska <mliska@suse.cz>
5858
5859 * array-notation-common.c: Add new includes.
5860 * c-format.c( handle_format_attribute): Canonicalize a format
5861 function name.
5862 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5863 attribute.
5864 * c-pretty-print.c: Add new include.
5865
b854df3c
EB
58662017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5867
5868 * c-ada-spec.c (has_static_fields): Look only into variables.
5869 (print_constructor): Add TYPE parameter and use it for the name.
5870 (print_destructor): Likewise.
5871 (print_ada_declaration): Adjust to new constructor/destructor names.
5872 Adjust calls to print_constructor and print_destructor.
5873 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5874 Look only into variables in the final loop.
5875
9f2cb25e
EB
58762017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5877
5878 * c-ada-spec.c (has_static_fields): Look only into fields.
5879 (dump_generic_ada_node): Small tweak.
5880 (dump_nested_types): Look only into fields.
5881 (print_ada_declaration): Look only into methods. Small tweak.
5882 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5883
f4bcd9eb
EB
58842017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5885
5886 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5887 (dump_ada_function_declaration): Likewise.
5888 (dump_generic_ada_node): Likewise.
5889 (print_ada_declaration): Add support for const-qualified variables.
5890
f34ebeb2
ML
58912017-07-31 Martin Liska <mliska@suse.cz>
5892
5893 PR sanitize/81530
5894 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5895 Guard condition with flag_sanitize_p also with current_function_decl
5896 non-null equality.
5897 (ubsan_maybe_instrument_reference_or_call): Likewise.
5898
218e5d04
UB
58992017-07-30 Uros Bizjak <ubizjak@gmail.com>
5900
5901 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5902
942047f2
EB
59032017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5904
5905 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5906 for enumeral types.
5907 (print_ada_declaration): Add missing guard for record types.
5908
a40ff0ae
JJ
59092017-07-27 Jakub Jelinek <jakub@redhat.com>
5910
5911 PR c/45784
5912 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5913 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5914 new COMPOUND_EXPRs around the rhs of the comparison.
5915
06bd22f6
MP
59162017-07-27 Marek Polacek <polacek@redhat.com>
5917
5918 PR c/81417
5919 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5920 the types.
5921
036ea399
JJ
59222017-07-27 Jakub Jelinek <jakub@redhat.com>
5923
5924 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5925 (handle_noipa_attribute): New function.
5926
417ca011
TD
59272017-07-07 Torsten Duwe <duwe@suse.de>
5928
5929 * c-attribs.c (c_common_attribute_table): Add entry for
5930 "patchable_function_entry".
5931
5aaa8fb4
NS
59322017-07-20 Nathan Sidwell <nathan@acm.org>
5933
5934 Remove TYPE_METHODS.
5935 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5936 dump_ada_template, print_ada_methods,
5937 print_ada_declaration): Member fns are on TYPE_FIELDS.
5938
ff22eb12
NS
59392017-07-18 Nathan Sidwell <nathan@acm.org>
5940
5941 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5942
eea77d1f
DM
59432017-07-14 David Malcolm <dmalcolm@redhat.com>
5944
5945 * c-common.c (try_to_locate_new_include_insertion_point): New
5946 function.
5947 (per_file_includes_t): New typedef.
5948 (added_includes_t): New typedef.
5949 (added_includes): New variable.
5950 (maybe_add_include_fixit): New function.
5951 * c-common.h (maybe_add_include_fixit): New decl.
5952
281ac396
MS
59532017-07-10 Martin Sebor <msebor@redhat.com>
5954
5955 PR other/81345
5956 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5957
b6f43128
DM
59582017-07-06 David Malcolm <dmalcolm@redhat.com>
5959
5960 * c-common.c (selftest::c_family_tests): New.
5961 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5962 (selftest::c_family_tests): New decl.
5963
efbf55b0
MP
59642017-07-04 Marek Polacek <polacek@redhat.com>
5965
5966 PR c/81231
5967 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5968 types.
5969
6c86bd88
MP
59702017-07-04 Marek Polacek <polacek@redhat.com>
5971
5972 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5973
17a7218b
ML
59742017-06-28 Martin Liska <mliska@suse.cz>
5975
5976 PR ipa/81128
5977 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5978 to a function declaration.
5979
63010089
ML
59802017-06-28 Martin Liska <mliska@suse.cz>
5981
5982 PR driver/79659
5983 * c.opt: Add IntegerRange to various options.
5984
3e2becc4
MP
59852017-06-26 Marek Polacek <polacek@redhat.com>
5986
5987 PR c/80116
5988 * c-common.h (warn_for_multistatement_macros): Declare.
5989 * c-warn.c: Include "c-family/c-indentation.h".
5990 (warn_for_multistatement_macros): New function.
5991 * c.opt (Wmultistatement-macros): New option.
5992 * c-indentation.c (guard_tinfo_to_string): No longer static.
5993 Change the parameter type to "enum rid". Handle RID_SWITCH.
5994 * c-indentation.h (guard_tinfo_to_string): Declare.
5995
2db9b7cd
MG
59962017-06-23 Marc Glisse <marc.glisse@inria.fr>
5997
5998 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5999
c3684b7b
MS
60002017-06-15 Martin Sebor <msebor@redhat.com>
6001
6002 PR c++/80560
6003 * c.opt (-Wclass-memaccess): New option.
6004
e72c4afd
BK
60052017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6006
6007 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6008
8a516588
MP
60092017-06-13 Marek Polacek <polacek@redhat.com>
6010
6011 PR objc/80949
6012 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6013 branches is null.
6014
45b2222a
ML
60152017-06-13 Martin Liska <mliska@suse.cz>
6016
6017 PR sanitize/78204
6018 * c-attribs.c (add_no_sanitize_value): New function.
6019 (handle_no_sanitize_attribute): Likewise.
6020 (handle_no_sanitize_address_attribute): Use the function.
6021 (handle_no_sanitize_thread_attribute): New function.
6022 (handle_no_address_safety_analysis_attribute): Use
6023 add_no_sanitize_value.
6024 (handle_no_sanitize_undefined_attribute): Likewise.
6025 * c-common.h: Declare new functions.
6026 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6027 (ubsan_instrument_shift): Likewise.
6028 (ubsan_instrument_bounds): Likewise.
6029 (ubsan_maybe_instrument_array_ref): Likewise.
6030 (ubsan_maybe_instrument_reference_or_call): Likewise.
6031
a01f151f
JM
60322017-06-11 Jason Merrill <jason@redhat.com>
6033
6034 * c-ada-spec.c, c-pragma.c: Use id_equal.
6035
3de4ac6d
MP
60362017-06-04 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/80919
6039 * c-format.c (matching_type_p): Return false if any of the types
6040 requires structural equality.
6041
2474f48f
MS
60422017-06-02 Martin Sebor <msebor@redhat.com>
6043
6044 PR c/80892
6045 * c-warn.c (conversion_warning): Use -Wconversion for integer
6046 conversion and -Wfloat-conversion for floating one.
6047
40ffd95f
BE
60482017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6049
6050 * c.opt (Wsizeof-pointer-div): New warning option.
6051
3fa4634c
VR
60522017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6053
6054 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6055 (Wcatch-value=1): Enable by -Wall.
6056
f012c8ef
DM
60572017-05-30 David Malcolm <dmalcolm@redhat.com>
6058
6059 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6060 format_chars.
6061 * c.opt (fdiagnostics-show-template-tree): New option.
6062 (felide-type): New option.
6063
63dbcd13
VR
60642017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6065
6066 * c.opt (Wcatch-value=): New C++ warning flag.
6067
be136b5c
NS
60682017-05-24 Nathan Sidwell <nathan@acm.org>
6069
6070 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6071 const casts to avoid warning.
6072
3cd211af
MS
60732017-05-24 Martin Sebor <msebor@redhat.com>
6074
6075 PR c/80731
6076 * c-common.h (unsafe_conversion_p): Add a function argument.
6077 * c-common.c (unsafe_conversion_p): Same.
6078 Add type names and values to diagnostics.
6079 (scalar_to_vector): Adjust.
6080 * c-warn.c (constant_expression_error): Add a function argument.
6081 Add type names and values to diagnostics.
6082 (conversion_warning): Add a function argument.
6083 Add type names and values to diagnostics.
6084 (warnings_for_convert_and_check): Same.
6085
1ff7be5a
JM
60862017-05-19 Jason Merrill <jason@redhat.com>
6087
6088 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6089 enumerators.
6090
ff502317
BE
60912017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6092
6093 * c-format.c (locus): Move out of function scope,
6094 add GTY attribute.
6095
2a8a8d7b
NS
60962017-05-19 Nathan Sidwell <nathan@acm.org>
6097
6098 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6099 (c_common_parse_file): Remove class dump handling.
6100 (get_dump_info): Likewise.
6101
39aac208
RB
61022017-05-19 Richard Biener <rguenther@suse.de>
6103
6104 PR c++/80593
6105 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6106 to alias-set zero memory.
6107
6ecd2339
BE
61082017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6109
6110 * c-format.c (local_tree_type_node): Add GTY attribute.
6111
6574d78e
MP
61122017-05-18 Marek Polacek <polacek@redhat.com>
6113
6114 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6115 (c_common_fixed_point_type_for_size): Likewise.
6116 (c_common_type_for_mode): Likewise.
6117 (shorten_compare): Likewise.
6118 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6119 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6120
e3455240
MP
61212017-05-18 Marek Polacek <polacek@redhat.com>
6122
6123 * c-common.c (self_promoting_args_p): Change the return type to bool.
6124 Use false/true instead of 0/1.
6125 * c-common.h (self_promoting_args_p): Update.
6126
3fa8871b
MP
61272017-05-17 Marek Polacek <polacek@redhat.com>
6128
6129 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6130 * c-warn.c: Likewise.
6131
b42cc3ca
VV
61322017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6133
6134 Implement new C++ intrinsics __is_assignable and __is_constructible.
6135 * c-common.c (__is_assignable, __is_constructible): New.
6136 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6137
1a817418
ML
61382017-05-17 Martin Liska <mliska@suse.cz>
6139
6140 * c-common.h: Introduce dump_flags_t type and
6141 use it instead of int type.
6142 * c-gimplify.c (c_genericize): Likewise.
6143 * c-opts.c: Likewise.
6144
b2fa0a8b
MP
61452017-05-17 Marek Polacek <polacek@redhat.com>
6146
6147 * c-common.c (c_save_expr): Remove.
6148 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6149 * c-common.h (c_save_expr): Remove declaration.
6150
31c2d57d
VR
61512017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6152
6153 PR c/35441
6154 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6155 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6156 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6157 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6158 RDIV_EXPR.
6159 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6160
684f84de
MP
61612017-05-09 Marek Polacek <polacek@redhat.com>
6162
6163 PR c/80525
6164 * c-warn.c (unwrap_c_maybe_const): New.
6165 (warn_logical_operator): Call it.
6166
641da50a
NS
61672017-05-09 Nathan Sidwell <nathan@acm.org>
6168
6169 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6170 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6171
631238ac
MS
61722017-05-08 Martin Sebor <msebor@redhat.com>
6173
6174 PR translation/80280
6175 * c-format.h (struct format_flag_spec): Add new member.
6176 (T89_T): New macro.
6177 * c-format.c (local_tree_type_node): New global.
6178 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6179 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6180 (strfmon_flag_specs): Likewise.
6181 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6182 with distinct quoting properties.
6183 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6184 (flag_chars_t::validate): Add argument and handle bad quoting.
6185 (check_format_info_main): Handle quoting problems.
6186 (init_dynamic_diag_info): Simplify.
6187
49f0c04c
JM
61882017-05-08 Jason Merrill <jason@redhat.com>
6189
6190 * c-opts.c (c_common_post_options): Update defaults for
6191 flag_abi_version and flag_abi_compat_version.
6192
56d35585
DM
61932017-05-05 David Malcolm <dmalcolm@redhat.com>
6194
6195 * c-common.c (c_cpp_error): Replace report_diagnostic
6196 with diagnostic_report_diagnostic.
6197
0f2c4a8f
MS
61982017-05-04 Martin Sebor <msebor@redhat.com>
6199
6200 PR translation/80280
6201 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6202 (handle_weakref_attribute): Same.
6203
6fe63fb4
NS
62042017-05-03 Nathan Sidwell <nathan@acm.org>
6205
6206 Canonicalize canonical type hashing
6207 * c-common.c (complete_array_type): Use type_hash_canon.
6208
815d9cc6
XR
62092017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6210
92a285c1 6211 PR c++/80038
815d9cc6
XR
6212 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6213 prototype.
6214 (cilk_install_body_pedigree_operations): Likewise.
6215 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6216 detatched.
6217 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6218 (cilk_install_body_pedigree_operations): Likewise.
6219 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6220 unwrapping.
6221
f8a36447
JJ
62222017-04-27 Jakub Jelinek <jakub@redhat.com>
6223
6224 PR c++/80534
6225 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6226 flag on non-aggregate element types.
6227
7c145456
BE
62282017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6229
6230 * c-common.c (c_type_hasher, type_hash_table): Remove.
6231 (c_common_get_alias_set): Remove unreachable code.
6232 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6233
c3cbcd45
VR
62342017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6235
6236 * c.opt (Wextra-semi): New C++ warning flag.
6237
8a59d466
JJ
62382017-04-20 Jakub Jelinek <jakub@redhat.com>
6239
6240 PR middle-end/80423
6241 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6242
8487c9a5
JJ
62432017-04-18 Jakub Jelinek <jakub@redhat.com>
6244
6245 PR middle-end/79788
6246 PR middle-end/80375
6247 * c-common.c (c_common_type_for_mode): Don't handle
6248 widest_*_literal_type_node here.
6249 c_common_signed_or_unsigned_type): Likewise.
6250 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6251 to *intTI_type_node or *intDI_type_node depending on whether
6252 TImode is supported by the target or not.
6253
3ee0fb02
ML
62542017-04-10 Martin Liska <mliska@suse.cz>
6255
6256 PR sanitizer/80350
6257 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6258 doing an UBSAN check.
6259
5764ee3c
JW
62602017-04-03 Jonathan Wakely <jwakely@redhat.com>
6261
6262 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6263
6f3af356
JJ
62642017-03-31 Jakub Jelinek <jakub@redhat.com>
6265
6266 PR c++/79572
6267 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6268 tree *.
6269 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6270 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6271 REFERENCE_TYPE.
6272
f6a7a9d5
DM
62732017-03-31 David Malcolm <dmalcolm@redhat.com>
6274
6275 PR documentation/78732
6276 * c.opt (Wendif-labels): Fix description to refer to
6277 #else rather than #elif.
6278
af88f557
JJ
62792017-03-31 Jakub Jelinek <jakub@redhat.com>
6280
6281 PR libstdc++/80251
6282 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6283 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6284
a9e4a1a5
JJ
62852017-03-27 Jakub Jelinek <jakub@redhat.com>
6286
6287 PR middle-end/80162
6288 * c-common.c (c_common_mark_addressable_vec): Don't set
6289 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6290
3f01b620
MS
62912017-03-21 Martin Sebor <msebor@redhat.com>
6292
6293 PR c++/79548
6294 * c-common.c (set_underlying_type): Mark type used only when
6295 original del is declared unused.
6296
2f6f187a
DM
62972017-03-10 David Malcolm <dmalcolm@redhat.com>
6298
6299 PR translation/79848
6300 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6301 "%qs".
6302
a02fa805
DM
63032017-03-10 David Malcolm <dmalcolm@redhat.com>
6304
6305 PR c/79921
6306 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6307 from inform's message, so that xgettext can locate it.
6308
822a132c
MP
63092017-03-09 Marek Polacek <polacek@redhat.com>
6310
6311 PR c++/79962
6312 PR c++/79984
6313 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6314 conversion to the attribute list.
6315
bba81f1c
ML
63162017-03-09 Martin Liska <mliska@suse.cz>
6317
6318 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6319
108154ff
JM
63202017-03-03 Jason Merrill <jason@redhat.com>
6321
6322 * c.opt (Wnoexcept-type): New.
6323
eb0e7c34
RB
63242017-03-02 Richard Biener <rguenther@suse.de>
6325
6326 PR c/79756
6327 * c-common.c (c_common_mark_addressable_vec): Look through
6328 C_MAYBE_CONST_EXPR.
6329
9453ba0a
ML
63302017-02-28 Martin Liska <mliska@suse.cz>
6331
6332 * c.opt: Replace space with tabular for options of <number>
6333 type.
6334
6a825afe
ML
63352017-02-28 Martin Liska <mliska@suse.cz>
6336
6337 * c.opt: Fix --help=option -Q for options which are of
6338 an enum type.
6339
4227c9ad
JJ
63402017-02-24 Jakub Jelinek <jakub@redhat.com>
6341
6342 PR c++/79588
6343 * c-common.c (check_function_restrict): New function.
6344 (check_function_arguments): Add FNDECL argument. Call
6345 check_function_restrict if -Wrestrict.
6346 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6347 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6348 * c-common.h (check_function_arguments): Add FNDECL argument.
6349 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6350
59909673
EB
63512017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6352
6353 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6354 treatment of parameters with pointer-to-tagged type and tidy up.
6355 (print_ada_methods): Remove the special treatment of C++ static member
6356 functions.
6357
54dcd526
ML
63582017-02-22 Martin Liska <mliska@suse.cz>
6359
6360 * c.opt: Replace inequality signs with square brackets
6361 for -Wnornalized.
6362
00bc9de3
JJ
63632017-02-21 Jakub Jelinek <jakub@redhat.com>
6364
6365 PR c++/79641
6366 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6367 preserve quals.
6368
97fcf744
JM
63692017-02-17 Joseph Myers <joseph@codesourcery.com>
6370
6371 * c-cppbuiltin.c (builtin_define_float_constants): Define
6372 __DECIMAL_DIG__ to the value for long double.
6373
c7545f1c
MP
63742017-02-15 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/79515
6377 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6378 conversion has occured.
6379
c2e84327
DM
63802017-01-24 David Malcolm <dmalcolm@redhat.com>
6381
6382 * c-common.c (c_common_reswords): Add "__RTL".
6383 * c-common.h (enum rid): Add RID_RTL.
6384
2ebd93e1
MP
63852017-01-20 Marek Polacek <polacek@redhat.com>
6386
6387 PR c/64279
6388 * c-common.h (do_warn_duplicated_branches_r): Declare.
6389 * c-gimplify.c (c_genericize): Walk the function tree calling
6390 do_warn_duplicated_branches_r.
6391 * c-warn.c (expr_from_macro_expansion_r): New.
6392 (do_warn_duplicated_branches): New.
6393 (do_warn_duplicated_branches_r): New.
6394 * c.opt (Wduplicated-branches): New option.
6395
0d80ab91
DM
63962017-01-17 David Malcolm <dmalcolm@redhat.com>
6397
6398 PR c++/71497
6399 * c-indentation.c (warn_for_misleading_indentation): Use the past
6400 subjunctive in the note.
6401
7f991c36
AH
64022017-01-17 Aldy Hernandez <aldyh@redhat.com>
6403
6404 PR c/79116
6405 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6406 start type to integer_type.
6407
1c70261c
JJ
64082017-01-16 Jakub Jelinek <jakub@redhat.com>
6409
6410 PR driver/49726
6411 * c.opt (gen-decls): Add Driver flag.
6412
1ddca3f3
PC
64132017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6414
6415 Revert:
6416 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6417
6418 PR c++/71737
6419 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6420
7d2f3f1d
PC
64212017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6422
6423 PR c++/71737
6424 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6425
bce6f760
MS
64262017-01-12 Martin Sebor <msebor@redhat.com>
6427
6428 (-Wformat-overflow): ...to this.
6429
bf5fbf46
MS
64302017-01-11 Martin Sebor <msebor@redhat.com>
6431
6432 PR c/78768
6433 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6434 Also enable for LTO.
6435
e363df3f
JM
64362017-01-10 Jason Merrill <jason@redhat.com>
6437
6438 Implement P0195R2, C++17 variadic using.
6439 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6440
bd2c6270
JJ
64412017-01-09 Jakub Jelinek <jakub@redhat.com>
6442
6443 PR translation/79019
6444 PR translation/79020
6445 * c.opt (Wnormalized=): Fix typo in description.
6446
efcc8d38
MS
64472017-01-08 Martin Sebor <msebor@redhat.com>
6448
6449 PR middle-end/77708
6450 * c.opt (-Wformat-truncation): New option.
6451
ab20d992 64522017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6453
6454 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6455 value to unsigned short to fit in 4 hex digits without
6456 warnings.
6457
4e89adf9
EB
64582017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6459
6460 * c.opt (fsso-struct): Add 'native' value.
6461
cd445b54
ML
64622017-01-05 Martin Liska <mliska@suse.cz>
6463
6464 PR pch/78970
6465 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6466 header.
6467
a9342885
MP
64682017-01-04 Marek Polacek <polacek@redhat.com>
6469
6470 PR c++/64767
6471 * c.opt (Wpointer-compare): New option.
6472
fc73e60c
JJ
64732017-01-04 Jakub Jelinek <jakub@redhat.com>
6474
6475 PR driver/78957
6476 * c.opt (fsso-struct=): Add RejectNegative.
6477
cbe34bb5
JJ
64782017-01-01 Jakub Jelinek <jakub@redhat.com>
6479
6480 Update copyright years.
6481
d4a6c0ea
ML
64822016-12-29 Martin Liska <mliska@suse.cz>
6483
6484 PR c/78933
6485 * c.opt (strong-eval-order): Add RejectNegative keyword.
6486
67a5ad7c
JM
64872016-12-22 Jason Merrill <jason@redhat.com>
6488
6489 Implement P0522R0, matching of template template arguments.
6490 * c-cppbuiltin.c (c_cpp_builtins): Define
6491 __cpp_template_template_args.
6492
0dba7960
JJ
64932016-12-21 Jakub Jelinek <jakub@redhat.com>
6494
6495 PR bootstrap/78817
6496 * c-common.c (struct nonnull_arg_ctx): New type.
6497 (check_function_nonnull): Return bool instead of void. Use
6498 nonnull_arg_ctx as context rather than just location_t.
6499 (check_nonnull_arg): Adjust for the new context type, set
6500 warned_p to true if a warning has been diagnosed.
6501 (check_function_arguments): Return bool instead of void.
6502 * c-common.h (check_function_arguments): Adjust prototype.
6503
31bfc9b9
JM
65042016-12-21 Jason Merrill <jason@redhat.com>
6505
6506 * c.opt (-fnew-ttp-matching): New flag.
6507 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6508
629b3d75
MJ
65092016-12-14 Martin Jambor <mjambor@suse.cz>
6510
6511 * c-omp.c: Include omp-general.h instead of omp-low.h.
6512 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6513 name.
6514
474da67e
MS
65152016-12-14 Martin Sebor <msebor@redhat.com>
6516
6517 PR c/17308
6518 * c-common.c (check_nonnull_arg): Disable when optimization
6519 is enabled.
6520
fe366b87
MP
65212016-12-12 Marek Polacek <polacek@redhat.com>
6522
6523 PR c++/78647
6524 * c-common.c (attribute_fallthrough_p): Return false for
6525 error_mark_node.
6526
8bd9f164
MS
65272016-12-08 Martin Sebor <msebor@redhat.com>
6528
6529 PR c/78284
6530 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6531
060162e0
MS
65322016-12-08 Martin Sebor <msebor@redhat.com>
6533
6534 PR c/78165
92a285c1
ML
6535 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6536 suffix.
060162e0 6537
ee92e7ba
MS
65382016-12-07 Martin Sebor <msebor@redhat.com>
6539
6540 PR c/53562
6541 PR middle-end/77784
6542 PR middle-end/78149
6543 PR middle-end/78138
6544 * c.opt (-Wstringop-overflow): New option.
6545
84b0769e
MO
65462016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6547
6548 * c-attribs.c (asan odr indicator): New attribute.
6549 (handle_asan_odr_indicator_attribute): New function.
6550
7fa6a965
PK
65512016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6552
6553 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6554 ptrdiff_type_node;
6555
56d8ffc1
JG
65562016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6557
6558 * c-common.c (excess_precision_mode_join): New.
6559 (c_ts18661_flt_eval_method): New.
6560 (c_c11_flt_eval_method): Likewise.
6561 (c_flt_eval_method): Likewise.
6562 * c-common.h (excess_precision_mode_join): New.
6563 (c_flt_eval_method): Likewise.
6564 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6565 (cpp_iec_559_value): Call it.
6566 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6567 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6568 __FLT_EVAL_METHOD_TS_18661_3__.
6569
04f0fcf7
JG
65702016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6571
6572 * c-opts.c (c_common_post_options): Add logic to handle the default
6573 case for -fpermitted-flt-eval-methods.
6574
fb2675cb
PB
65752016-11-23 Paolo Bonzini <bonzini@gnu.org>
6576
6577 * c.opt (Wexpansion-to-defined): New.
6578
ec1c5694
JJ
65792016-11-23 Jakub Jelinek <jakub@redhat.com>
6580
6581 PR target/78451
6582 * c-pragma.c (handle_pragma_target): Don't replace
6583 current_target_pragma, but chainon the new args to the current one.
6584
730c9e75
NS
65852016-11-22 Nathan Sidwell <nathan@acm.org>
6586
6587 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6588 indentation and formatting.
730c9e75 6589
89990732
MS
65902016-11-21 Martin Sebor <msebor@redhat.com>
6591
6592 * c.opt (-fprintf-return-value): Enable by default.
6593
48330c93
BE
65942016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6595
6596 PR c++/71973
6597 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6598 * c-common.c (c_common_nodes_and_builtins): Initialize
6599 const_tm_ptr_type_node.
6600
0d939c95
MP
66012016-11-16 Marek Polacek <polacek@redhat.com>
6602
6603 PR c/78285
6604 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6605
8e745a17
JJ
66062016-11-14 Jakub Jelinek <jakub@redhat.com>
6607
6608 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6609
1ee62b92 66102016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6611 Richard Biener <rguenther@suse.de>
6612
6613 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6614 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6615 * c.opt (fgimple): New option.
1ee62b92 6616
22b15758
UB
66172016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6618
6619 PR c/35503
6620 * c-common.h (warn_for_restrict): Declare.
6621 * c-warn.c: Include gcc-rich-location.h.
6622 (warn_for_restrict): New function.
6623 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6624 (gcc_cdiag_char_table): Likewise.
6625 (gcc_cxxdiag_char_table): Likewise.
6626 * c.opt (Wrestrict): New option.
6627
4be719cd
EB
66282016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6629
6630 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6631 for nested types only if the type is a record or union and dump SLOC.
6632
4a826ca6
JM
66332016-11-09 Jason Merrill <jason@redhat.com>
6634
6635 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6636
2e955d50
JJ
66372016-11-09 Jakub Jelinek <jakub@redhat.com>
6638
6639 * c-ubsan.c (ubsan_instrument_shift): Handle split
6640 -fsanitize=shift-base and -fsanitize=shift-exponent.
6641
51dc6603
JM
66422016-11-07 Jason Merrill <jason@redhat.com>
6643
6644 * c.opt (Wc++1z-compat): New.
6645 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6646
6dc4a604
ML
66472016-11-07 Martin Liska <mliska@suse.cz>
6648
6649 * c-warn.c (warn_for_unused_label): Save all labels used
6650 in goto or in &label.
6651
b302001e
JM
66522016-11-03 Jason Merrill <jason@redhat.com>
6653
6654 * c-cppbuiltin.c (c_cpp_builtins): Correct
6655 __cpp_inheriting_constructors.
6656
31f7f784
JM
66572016-11-01 Jason Merrill <jason@redhat.com>
6658
2bc78e3c
JM
6659 * c-cppbuiltin.c (c_cpp_builtins): Update
6660 __cpp_inheriting_constructors.
6661
31f7f784
JM
6662 * c.opt (-fnew-inheriting-ctors): New.
6663 * c-opts.c: Default to on for ABI 11+.
6664
dcb466ec
JJ
66652016-10-31 Jakub Jelinek <jakub@redhat.com>
6666
6667 PR c++/77948
6668 * c.opt (fext-numeric-literals): Add Var and Init.
6669 * c-opts.c (c_common_handle_option): Don't clear
6670 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6671 (c_common_post_options): Clear it here if not set
6672 explicitly.
6673
52e1b91e
AH
66742016-10-28 Aldy Hernandez <aldyh@redhat.com>
6675
6676 PR debug/77773
6677 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6678 if NULL.
6679
e16f1cc7
JJ
66802016-10-25 Jakub Jelinek <jakub@redhat.com>
6681
6682 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6683 * c-common.c (c_common_reswords): Add __builtin_launder.
6684
f8348061
BE
66852016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6686
6687 * c-common.c (c_common_truthvalue_conversion): Warn for
6688 multiplications in boolean context. Fix the quoting of '<<' and '<'
6689 in the shift warning.
6690
eff89e01
BE
66912016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6692
6693 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6694
24bc7bf4
JM
66952016-10-20 Jason Merrill <jason@redhat.com>
6696
6697 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6698
4c712374
BE
66992016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6700
6701 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6702 integer shift ops in boolean context.
6703
67042016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6705
6706 * c.opt (Walloca): New.
6707 (Walloca-larger-than=): New.
6708 (Wvla-larger-than=): New.
6709
8fa18c06
MP
67102016-10-17 Marek Polacek <polacek@redhat.com>
6711
6712 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6713 Return immediately when finding a match.
6714 (warn_tautological_cmp): Remove a boolean variable that is no longer
6715 needed.
6716
b12b1915
MP
67172016-10-17 Marek Polacek <polacek@redhat.com>
6718
6719 * c-attribs.c: New file.
6720 * c-common.c: Move attributes handling to c-attribs.c.
6721 (get_nonnull_operand): No longer static.
6722 * c-common.h: Move the declarations from c-attribs.c to its own section.
6723
2045acd9
JM
67242016-10-14 Jason Merrill <jason@redhat.com>
6725
6726 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6727 and __cpp_deduction_guides.
6728
14a2c9aa
JM
67292016-10-13 Jason Merrill <jason@redhat.com>
6730
6731 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6732
4d0cdd0c
TP
67332016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6734
6735 * c-cppbuiltin.c: Include memmodel.h.
6736 * c-opts.c: Likewise.
6737 * c-pragma.c: Likewise.
6738 * c-warn.c: Likewise.
6739
70f6d5e1
JJ
67402016-10-12 Jakub Jelinek <jakub@redhat.com>
6741
6742 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6743 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6744 * c-opts.c (sanitize_cpp_opts): Initialize
6745 cpp_opts->cpp_warn_implicit_fallthrough.
6746
78f61294
MP
67472016-10-11 Marek Polacek <polacek@redhat.com>
6748
6749 * c-common.c (warning_candidate_p): Change the return type to bool
6750 and return true/false instead of 1/0.
6751 (vector_mode_valid_p): Likewise.
6752
038b5cc0
MP
67532016-10-11 Marek Polacek <polacek@redhat.com>
6754
6755 * c-common.c (fold_for_warn): No longer static.
6756 (bool_promoted_to_int_p): Likewise.
6757 (c_common_get_narrower): Likewise.
6758 (constant_expression_warning): Move to c-warn.c.
6759 (constant_expression_error): Likewise.
6760 (overflow_warning): Likewise.
6761 (warn_logical_operator): Likewise.
6762 (find_array_ref_with_const_idx_r): Likewise.
6763 (warn_tautological_cmp): Likewise.
6764 (expr_has_boolean_operands_p): Likewise.
6765 (warn_logical_not_parentheses): Likewise.
6766 (warn_if_unused_value): Likewise.
6767 (strict_aliasing_warning): Likewise.
6768 (sizeof_pointer_memaccess_warning): Likewise.
6769 (check_main_parameter_types): Likewise.
6770 (conversion_warning): Likewise.
6771 (warnings_for_convert_and_check): Likewise.
6772 (match_case_to_enum_1): Likewise.
6773 (match_case_to_enum): Likewise.
6774 (c_do_switch_warnings): Likewise.
6775 (warn_for_omitted_condop): Likewise.
6776 (readonly_error): Likewise.
6777 (lvalue_error): Likewise.
6778 (invalid_indirection_error): Likewise.
6779 (warn_array_subscript_with_type_char): Likewise.
6780 (warn_about_parentheses): Likewise.
6781 (warn_for_unused_label): Likewise.
6782 (warn_for_div_by_zero): Likewise.
6783 (warn_for_memset): Likewise.
6784 (warn_for_sign_compare): Likewise.
6785 (do_warn_double_promotion): Likewise.
6786 (do_warn_unused_parameter): Likewise.
6787 (record_locally_defined_typedef): Likewise.
6788 (maybe_record_typedef_use): Likewise.
6789 (maybe_warn_unused_local_typedefs): Likewise.
6790 (maybe_warn_bool_compare): Likewise.
6791 (maybe_warn_shift_overflow): Likewise.
6792 (warn_duplicated_cond_add_or_warn): Likewise.
6793 (diagnose_mismatched_attributes): Likewise.
6794 * c-common.h: Move the declarations from c-warn.c to its own section.
6795 * c-warn.c: New file.
6796
627be19f
JM
67972016-10-08 Jason Merrill <jason@redhat.com>
6798
6799 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6800 into COND_EXPR in C++.
6801
7bad794a
JJ
68022016-10-08 Jakub Jelinek <jakub@redhat.com>
6803
6804 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6805 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6806 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6807
be845b04
JJ
68082016-10-07 Jakub Jelinek <jakub@redhat.com>
6809
6810 Implement LWG2296 helper intrinsic
6811 * c-common.h (enum rid): Add RID_ADDRESSOF.
6812 * c-common.c (c_common_reswords): Add __builtin_addressof.
6813
c09c4992
BE
68142016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6815
6816 PR c++/77700
6817 * c-common.c (c_common_truthvalue_conversion): Warn also for
6818 suspicious enum values in boolean context.
6819
342cfb3e
JJ
68202016-10-06 Jakub Jelinek <jakub@redhat.com>
6821
6822 Implement P0258R2 - helper for C++17
6823 std::has_unique_object_representations trait
6824 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6825 * c-common.c (c_common_reswords): Add
6826 __has_unique_object_representations.
6827
2e69f143
JJ
68282016-10-05 Jakub Jelinek <jakub@redhat.com>
6829
6830 PR sanitizer/66343
6831 * c-ubsan.c (ubsan_instrument_return): Don't call
6832 initialize_sanitizer_builtins here.
6833
700fff34
BE
68342016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6835
6836 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6837 conditional expression in boolean context when only one arm is
6838 non-boolean.
6839
9563bfcd
JJ
68402016-10-05 Jakub Jelinek <jakub@redhat.com>
6841
04a32443
JJ
6842 PR sanitizer/77823
6843 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6844 is not integral.
6845
9563bfcd
JJ
6846 * c-common.c (c_common_reswords): Update comment for C++11.
6847
f1644724
JM
68482016-10-04 Jason Merrill <jason@redhat.com>
6849
6850 * c-common.c (make_tree_vector_from_ctor): New.
6851 * c-common.h: Declare it.
6852
5a79befb
JJ
68532016-10-04 Jakub Jelinek <jakub@redhat.com>
6854
6855 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6856 __LIBGCC_JCR_SECTION_NAME__.
6857
1633d3b9
BE
68582016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6859
6860 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6861 left shift in boolean context.
6862
a2c6e7f2
JJ
68632016-09-29 Jakub Jelinek <jakub@redhat.com>
6864
6865 Implement P0001R1 - C++17 removal of register storage class specifier
6866 * c.opt (Wregister): New warning.
6867 * c-opts.c (c_common_post_options): Enable -Wregister by
6868 default for C++17.
6869
75304c87
JG
68702016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6871
6872 * c-opts.c (c_common_post_options): Remove special case for
6873 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6874 in C++.
6875
bbfac6da
JJ
68762016-09-27 Jakub Jelinek <jakub@redhat.com>
6877
6e39060a
JJ
6878 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6879 -std=c++1z.
6880
bbfac6da
JJ
6881 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6882
e73cf9a2
TP
68832016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6884
6885 * c-common.c: Include memmodel.h.
6886
c6147dc4
MP
68872016-09-26 Marek Polacek <polacek@redhat.com>
6888
6889 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6890
81fea426
MP
68912016-09-26 Marek Polacek <polacek@redhat.com>
6892
6893 PR c/7652
6894 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6895 (handle_fallthrough_attribute): New function.
6896 (attribute_fallthrough_p): New function.
6897 * c-common.h (attribute_fallthrough_p): Declare.
6898
9a2300e9
MP
68992016-09-24 Marek Polacek <polacek@redhat.com>
6900
6901 PR c/77490
6902 * c.opt (Wbool-operation): New.
6903
a09e9e35
BE
69042016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6905
6906 * c-common.c (c_common_truthvalue_conversion): Inhibit
6907 Wint-in-bool-context warning with from_macro_definition_at.
6908 Mention the expression will always evaluate to true.
6909
d43b4ccc
MS
69102016-09-21 Martin Sebor <msebor@redhat.com>
6911
6912 PR bootstrap/77676
6913 * c.opt (fprintf-return-value): Temporarily initialize to zero
6914 to unblock bootstrap failures.
6915
2e1c20b1
JJ
69162016-09-21 Jakub Jelinek <jakub@redhat.com>
6917
6918 PR c++/77651
6919 * c.opt (Waligned-new=): Add RejectNegative.
6920 (faligned-new=): Likewise. Spelling fix - change
6921 aligned_new_threshhold to aligned_new_threshold.
6922 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6923 to aligned_new_threshold.
6924
88d0c3f0
MS
69252016-09-20 Martin Sebor <msebor@redhat.com>
6926
6927 PR middle-end/49905
6928 * c.opt: Add -Wformat-length and -fprintf-return-value.
6929
144a96e4
BE
69302016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6931
6932 PR c++/77434
6933 * c.opt (Wint-in-bool-context): New warning.
6934 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6935 constants in boolean context.
6936
63012d9a
JM
69372016-09-19 Joseph Myers <joseph@codesourcery.com>
6938
6939 * c-common.c (max_align_t_align): Also consider alignment of
6940 float128_type_node.
6941
931388ce
JM
69422016-09-15 Jason Merrill <jason@redhat.com>
6943
6944 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6945 DECL_EXTERNAL.
6946
38711381
JM
69472016-09-14 Jason Merrill <jason@redhat.com>
6948
6949 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6950 limit FIELD_DECL, either.
6951
e51fbec3
MP
69522016-09-14 Marek Polacek <polacek@redhat.com>
6953
6954 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6955 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6956 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6957
254830ba
DM
69582016-09-13 David Malcolm <dmalcolm@redhat.com>
6959
6960 * c-common.c (warn_logical_not_parentheses): Replace
6961 rich_location::add_fixit_insert calls with add_fixit_insert_before
6962 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6963
42763690
JM
69642016-09-13 Jason Merrill <jason@redhat.com>
6965 Tom de Vries <tom@codesourcery.com>
6966
6967 PR c++/77427
6968 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6969
9453eee9
JM
69702016-09-13 Jason Merrill <jason@redhat.com>
6971
6972 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6973 limit types at all.
6974
e96809e3
JM
69752016-09-12 Jason Merrill <jason@redhat.com>
6976
6977 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6978 bit/byte confusion, allow large alignment for types.
6979
54dcdb88
BE
69802016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6981
6982 PR c++/77496
6983 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6984
d1463eb9
DM
69852016-09-12 David Malcolm <dmalcolm@redhat.com>
6986
6987 PR c/72858
6988 * c-format.c (argument_parser::check_argument_type): Add params
6989 "type_start" and "conversion_char". Use the former to generate
6990 offset_to_type_start and pass it and conversion_char to
6991 check_format_types.
6992 (check_format_info_main): Capture the start of the type
6993 information as "type_start", and pass it an format_char
6994 to arg_parser.check_argument_type.
6995 (check_format_types): Provide an example in the leading comment.
6996 Add params "offset_to_type_start" and "conversion_char"; pass
6997 them to format_type_warning calls.
6998 (test_get_modifier_for_format_len): Likewise.
6999 (matching_type_p): New function.
7000 (get_format_for_type): Add param "conversion_char" and move
7001 implementation into...
7002 (get_format_for_type_1): ...new function, called twice.
7003 Use new function matching_type_p rather than checking for
7004 TYPE_CANONICAL equality.
7005 (get_corrected_substring): New function.
7006 (format_type_warning): Provide an example in the leading comment.
7007 Add params "offset_to_type_start" and "conversion_char". Replace
7008 call to get_format_for_type with call to get_corrected_substring
7009 and move rejection of hints for widths/precisions there.
7010 (assert_format_for_type_streq): Add param "conversion_char".
7011 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7012 (test_get_format_for_type_printf): Add conversion chars to the
7013 tests, adding coverage for various combinations of integer
7014 vs double conversions, and for preserving octal and hexadecimal
7015 conversions.
7016 (test_get_format_for_type_scanf): Add conversion chars to the
7017 tests.
7018
5b28efbb
TV
70192016-09-10 Tom de Vries <tom@codesourcery.com>
7020
7021 PR C/71602
7022 * c-common.c (build_va_arg): Handle more strict
7023 targetm.canonical_va_list_type. Replace first argument type error with
7024 assert.
7025
3f0177e7
MS
70262016-09-09 Martin Sebor <msebor@redhat.com>
7027
7028 PR c/77520
7029 PR c/77521
7030 * c-format.c (argument_parser::find_format_char_info): Use %qc
7031 format directive unconditionally.
7032
af63ba4b
JM
70332016-09-09 Jason Merrill <jason@redhat.com>
7034
7035 Implement C++17 new of over-aligned types.
7036 * c.opt: Add -faligned-new and -Waligned-new.
7037 * c-common.c (max_align_t_align): Split out from...
7038 (cxx_fundamental_alignment_p): ...here.
7039 * c-common.h: Declare it.
7040 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7041
c65248cb
JM
70422016-09-09 Joseph Myers <joseph@codesourcery.com>
7043
7044 * c-cppbuiltin.c (builtin_define_type_width): New function.
7045 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7046 macros.
7047
e5106e27
DM
70482016-09-07 David Malcolm <dmalcolm@redhat.com>
7049
7050 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7051 a POINTER_TYPE.
7052 (substring_loc::get_location): Move to substring-locations.c,
7053 keeping implementation as...
7054 (c_get_substring_location): New function, from the above, reworked
7055 to use accessors rather than member lookup.
7056 * c-common.h (class substring_loc): Move to substring-locations.h,
7057 replacing with a forward decl.
7058 (c_get_substring_location): New decl.
7059 * c-format.c: Include "substring-locations.h".
7060 (format_warning_va): Move to substring-locations.c.
7061 (format_warning_at_substring): Likewise.
7062
ab20d992 70632016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7064
7065 PR c/77336
7066 * c-format.c (check_function_format): Avoid issuing warnings for
7067 functions unless they call format functions with non-constant
7068 format strings.
7069
b772a565
RB
70702016-09-06 Richard Biener <rguenther@suse.de>
7071
7072 PR c/77450
7073 * c-common.c (c_common_mark_addressable_vec): Handle
7074 COMPOUND_LITERAL_EXPR.
7075
25ff5dd3
MP
70762016-09-05 Marek Polacek <polacek@redhat.com>
7077
7078 PR c/77423
7079 * c-common.c (bool_promoted_to_int_p): New function.
7080 (expr_has_boolean_operands_p): New function.
7081 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7082 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7083
21234eb5
TV
70842016-09-04 Tom de Vries <tom@codesourcery.com>
7085
7086 revert:
7087 2016-08-29 Tom de Vries <tom@codesourcery.com>
7088
7089 * c-common.c (build_va_arg): Replace first argument type error
7090 with assert.
7091
9dc5773f
JJ
70922016-09-02 Jakub Jelinek <jakub@redhat.com>
7093
7094 PR c/65467
7095 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7096 (c_finish_omp_for): Reject _Atomic qualified iterators.
7097
70982016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7099
7100 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7101 size to guarantee it fits the output of the formatted function
7102 regardless of its arguments.
7103
295844f6
MP
71042016-09-01 Marek Polacek <polacek@redhat.com>
7105
7106 PR c/7652
7107 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7108 FALLTHRU comments.
7109
3d06b6f2
MP
71102016-08-29 Marek Polacek <polacek@redhat.com>
7111
7112 PR c/77292
7113 * c-common.c (warn_logical_not_parentheses): Don't warn for
7114 a comparison or a logical operator.
7115
34cedad5
TV
71162016-08-29 Tom de Vries <tom@codesourcery.com>
7117
7118 * c-common.c (build_va_arg): Fix type comparison assert.
7119
f162d717
TV
71202016-08-29 Tom de Vries <tom@codesourcery.com>
7121
7122 * c-common.c (build_va_arg): Replace first argument type error
7123 with assert.
7124
ba9bbd6f
TV
71252016-08-29 Tom de Vries <tom@codesourcery.com>
7126
7127 PR c/77398
7128 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7129 with error_mark_node as va_list instead of with illegal va_list.
7130
ebef225f
MP
71312016-08-25 Marek Polacek <polacek@redhat.com>
7132 David Malcolm <dmalcolm@redhat.com>
7133
7134 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7135 * c-common.h (warn_logical_not_parentheses): Update declaration.
7136
b00e6e75
MP
71372016-08-22 Marek Polacek <polacek@redhat.com>
7138
7139 PR c++/77321
7140 * c-common.c (warn_for_memset): Check type for null.
7141
6dc198e3
JM
71422016-08-22 Joseph Myers <joseph@codesourcery.com>
7143
14ec014e 7144 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7145 _FloatNx types for suffixes for built-in functions.
7146
c65699ef
JM
71472016-08-19 Joseph Myers <joseph@codesourcery.com>
7148
7149 PR c/32187
7150 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7151 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7152 (RID_FLOAT128X): New enum rid values.
7153 (CASE_RID_FLOATN_NX): New macro.
7154 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7155 keywords.
7156 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7157 corresponding complex types.
7158 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7159 _FloatNx and corresponding complex types.
7160 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7161 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7162 and _FloatNx types for the widest type for determining
7163 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7164 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7165 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7166 and _FloatNx types.
7167 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7168 constants.
7169 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7170 _FloatNx types.
7171
cc015f3a
DM
71722016-08-18 David Malcolm <dmalcolm@redhat.com>
7173
7174 * c-opts.c (c_diagnostic_finalizer): Update for change to
7175 diagnostic_show_locus.
7176
cb18fd07
DM
71772016-08-18 David Malcolm <dmalcolm@redhat.com>
7178
7179 * c-common.c: Include "spellcheck.h".
7180 (cb_get_suggestion): New function.
7181 * c-common.h (cb_get_suggestion): New decl.
7182 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7183 cb_get_suggestion.
7184
a76989dc
MP
71852016-08-18 Marek Polacek <polacek@redhat.com>
7186
7187 PR c/71514
7188 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7189 and pointer-to-VLA.
7190
65e736c0
DM
71912016-08-16 David Malcolm <dmalcolm@redhat.com>
7192
7193 PR c/72857
7194 * c-common.c (substring_loc::get_range): Rename to...
7195 (substring_loc::get_location): ...this, converting param from a
7196 source_range * to a location_t *. Call
7197 get_source_location_for_substring rather than
7198 get_source_range_for_substring, and pass in m_caret_idx.
7199 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7200 (substring_loc::get_range): Replace with...
7201 (substring_loc::get_location): ...this.
7202 (substring_loc::set_caret_index): New method.
7203 (substring_loc): Add field m_caret_idx.
7204 * c-format.c (format_warning_va): Update for above changes.
7205 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7206 clashing with type name.
7207 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7208 (check_argument_type): Likewise.
7209 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7210 Use a copy when emitting warnings, setting the caret index from TYPE.
7211
7e1dde14 72122016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7213 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7214
7215 * c-ada-spec.c (dump_number): New function.
7216 (handle_escape_character): Likewise.
7217 (print_ada_macros): Add handling of constant integers and strings.
7218
191816a3
MP
72192016-08-12 Marek Polacek <polacek@redhat.com>
7220
7221 PR c/7652
7222 * c-common.c (scalar_to_vector): Adjust fall through comment.
7223 * c-opts.c (c_common_handle_option): Likewise.
7224 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7225 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7226 fall through comment.
7227 * cilk.c (extract_free_variables): Add FALLTHRU.
7228
452df4a4
JM
72292016-08-10 Jason Merrill <jason@redhat.com>
7230
7231 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7232
f3365c12
JM
72332016-08-09 Jason Merrill <jason@redhat.com>
7234
7235 * c-common.c (c_common_attribute_table): vector_size affects type
7236 identity.
7237
f0bc3323
MP
72382016-08-09 Marek Polacek <polacek@redhat.com>
7239
7240 PR c/7652
7241 * c-ada-spec.c (dump_generic_ada_node): Add return.
7242
98e5a19a
JM
72432016-08-09 Jason Merrill <jason@redhat.com>
7244
7245 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7246 C++17 constexpr lambdas.
7247
895aa8e1
DM
72482016-08-08 David Malcolm <dmalcolm@redhat.com>
7249
7250 PR c/64955
7251 * c-common.h (selftest::c_format_c_tests): New declaration.
7252 (selftest::run_c_tests): New declaration.
7253 * c-format.c: Include "selftest.h.
7254 (format_warning_va): Add param "corrected_substring" and use
7255 it to add a replacement fix-it hint.
7256 (format_warning_at_substring): Likewise.
7257 (format_warning_at_char): Update for new param of
7258 format_warning_va.
7259 (argument_parser::check_argument_type): Pass "fki" to
7260 check_format_types.
7261 (check_format_types): Add param "fki" and pass it to
7262 format_type_warning.
7263 (deref_n_times): New function.
7264 (get_modifier_for_format_len): New function.
7265 (selftest::test_get_modifier_for_format_len): New function.
7266 (get_format_for_type): New function.
7267 (format_type_warning): Add param "fki" and use it to attempt
7268 to provide hints for argument types when calling
7269 format_warning_at_substring.
7270 (selftest::get_info): New function.
7271 (selftest::assert_format_for_type_streq): New function.
7272 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7273 (selftest::test_get_format_for_type_printf): New function.
7274 (selftest::test_get_format_for_type_scanf): New function.
7275 (selftest::c_format_c_tests): New function.
7276
e52ed3fe
DM
72772016-08-08 David Malcolm <dmalcolm@redhat.com>
7278
7279 PR c/52952
7280 * c-format.c: Include "diagnostic.h".
7281 (location_column_from_byte_offset): Delete.
7282 (location_from_offset): Delete.
7283 (format_warning_va): New function.
7284 (format_warning_at_substring): New function.
7285 (format_warning_at_char): New function.
7286 (check_format_arg): Capture location of format_tree and pass to
7287 check_format_info_main.
7288 (argument_parser): Add fields "start_of_this_format" and
7289 "format_string_cst".
7290 (flag_chars_t::validate): Add param "format_string_cst". Convert
7291 warning_at call using location_from_offset to call to
7292 format_warning_at_char.
7293 (argument_parser::argument_parser): Add param "format_string_cst_"
7294 and use use it to initialize field "format_string_cst".
7295 Initialize new field "start_of_this_format".
7296 (argument_parser::read_format_flags): Convert warning_at call
7297 using location_from_offset to a call to format_warning_at_char.
7298 (argument_parser::read_any_format_left_precision): Likewise.
7299 (argument_parser::read_any_format_precision): Likewise.
7300 (argument_parser::read_any_other_modifier): Likewise.
7301 (argument_parser::find_format_char_info): Likewise, in three places.
7302 (argument_parser::parse_any_scan_set): Likewise, in one place.
7303 (argument_parser::handle_conversions): Likewise, in two places.
7304 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7305 and use it to make a substring_loc. Pass the latter to
7306 check_format_types.
7307 (check_format_info_main): Add params "fmt_param_loc" and
7308 "format_string_cst". Convert warning_at calls using
7309 location_from_offset to calls to format_warning_at_char. Pass the
7310 new params to the arg_parser ctor. Pass "format_string_cst" to
7311 flag_chars.validate. Pass "fmt_param_loc" to
7312 arg_parser.check_argument_type.
7313 (check_format_types): Convert first param from a location_t
7314 to a const substring_loc & and rename to "fmt_loc". Attempt
7315 to extract the range of the relevant parameter and pass it
7316 to format_type_warning.
7317 (format_type_warning): Convert first param from a location_t
7318 to a const substring_loc & and rename to "fmt_loc". Add
7319 params "param_range" and "type". Replace calls to warning_at
7320 with calls to format_warning_at_substring.
7321
1c4d457e
DM
73222016-08-08 David Malcolm <dmalcolm@redhat.com>
7323
7324 * c-format.c (class flag_chars_t): New class.
7325 (struct length_modifier): New struct.
7326 (class argument_parser): New class.
7327 (flag_chars_t::flag_chars_t): New ctor.
7328 (flag_chars_t::has_char_p): New method.
7329 (flag_chars_t::add_char): New method.
7330 (flag_chars_t::validate): New method.
7331 (flag_chars_t::get_alloc_flag): New method.
7332 (flag_chars_t::assignment_suppression_p): New method.
7333 (argument_parser::argument_parser): New ctor.
7334 (argument_parser::read_any_dollar): New method.
7335 (argument_parser::read_format_flags): New method.
7336 (argument_parser::read_any_format_width): New method.
7337 (argument_parser::read_any_format_left_precision): New method.
7338 (argument_parser::read_any_format_precision): New method.
7339 (argument_parser::handle_alloc_chars): New method.
7340 (argument_parser::read_any_length_modifier): New method.
7341 (argument_parser::read_any_other_modifier): New method.
7342 (argument_parser::find_format_char_info): New method.
7343 (argument_parser::validate_flag_pairs): New method.
7344 (argument_parser::give_y2k_warnings): New method.
7345 (argument_parser::parse_any_scan_set): New method.
7346 (argument_parser::handle_conversions): New method.
7347 (argument_parser::check_argument_type): New method.
7348 (check_format_info_main): Introduce classes argument_parser
7349 and flag_chars_t, moving the code within the loop into methods
7350 of these classes. Make various locals "const".
7351
88fa5555
DM
73522016-08-05 David Malcolm <dmalcolm@redhat.com>
7353
7354 * c-common.c: Include "substring-locations.h".
7355 (get_cpp_ttype_from_string_type): New function.
7356 (g_string_concat_db): New global.
7357 (substring_loc::get_range): New method.
7358 * c-common.h (g_string_concat_db): New declaration.
7359 (class substring_loc): New class.
7360 * c-lex.c (lex_string): When concatenating strings, capture the
7361 locations of all tokens using a new obstack, and record the
7362 concatenation locations within g_string_concat_db.
7363 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7364 on the ggc-heap.
7365
78169471
MP
73662016-07-29 Marek Polacek <polacek@redhat.com>
7367
638fc14f
MP
7368 PR c/71926
7369 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7370 parentheses warning.
7371
78169471
MP
7372 PR c/71574
7373 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7374
1225d6b1
ML
73752016-07-28 Martin Liska <mliska@suse.cz>
7376
7377 PR gcov-profile/68025
7378 * c-common.c (handle_no_profile_instrument_function_attribute):
7379
ec1e2a40
BE
73802016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7381
7382 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7383 BITS_PER_UNIT_LOG.
7384
5ec2cd9f
JM
73852016-07-25 Jason Merrill <jason@redhat.com>
7386
7387 PR c++/65970
7388 * c.opt (fconstexpr-loop-limit): New.
7389
9dc5773f 73902016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7391
7392 PR c++/71675
7393 * c-common.c (resolve_overloaded_builtin): Avoid converting
7394 __atomic_compare_exchange_n return type to that of what its
7395 first argument points to.
7396
e3fe09c1
UB
73972016-07-22 Uros Bizjak <ubizjak@gmail.com>
7398
7399 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7400 ~(unsigned HOST_WIDE_INT) 0.
7401
bc91c436
ML
74022016-07-22 Martin Liska <mliska@suse.cz>
7403
7404 PR gcov-profile/69028
7405 PR gcov-profile/62047
7406 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7407 to the current_function_decl.
7408
451dcc66
JM
74092016-07-21 Jason Merrill <jason@redhat.com>
7410
7411 PR c++/65168
7412 * c-common.c (c_common_truthvalue_conversion): Check
7413 c_inhibit_evaluation_warnings for warning about address of
7414 reference.
7415
de6a69ee
DM
74162016-07-20 David Malcolm <dmalcolm@redhat.com>
7417
7418 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7419 const char *.
7420
d022c55a
JM
74212016-07-15 Jason Merrill <jason@redhat.com>
7422
7423 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7424
ddbbcb19
JJ
74252016-07-15 Jakub Jelinek <jakub@redhat.com>
7426
7427 PR c/71858
7428 * c-common.h (enum lookup_name_fuzzy_kind): Add
7429 FUZZY_LOOKUP_FUNCTION_NAME.
7430
d0cf395a
JM
74312016-07-08 Jason Merrill <jason@redhat.com>
7432
7433 P0145: Refining Expression Order for C++.
7434 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7435 * c-opts.c: Adjust.
7436
98d44e93
MT
74372016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7438
7439 PR c++/71214
7440 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7441
f9d8d994
TS
74422016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7443
7444 * c-pragma.h (enum pragma_kind): Rename
7445 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7446 users.
7447
4aa83879
RB
74482016-06-29 Richard Biener <rguenther@suse.de>
7449
7450 PR middle-end/71002
7451 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7452
a25bd9e6
JM
74532016-06-24 Jason Merrill <jason@redhat.com>
7454
7455 P0145R2: Refining Expression Order for C++.
7456 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7457 MODIFY_EXPR.
7458
a86451b9
JJ
74592016-06-24 Jakub Jelinek <jakub@redhat.com>
7460
7461 * c-common.c (check_builtin_function_arguments): Require last
7462 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7463 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7464 if the last argument is pointer to enumerated or boolean type.
7465
1a4f11c8
DM
74662016-06-22 David Malcolm <dmalcolm@redhat.com>
7467
7468 PR c/70339
7469 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7470 (lookup_name_fuzzy): New prototype.
7471
fe55692c
JDA
74722016-06-21 John David Anglin <danglin@gcc.gnu.org>
7473
7474 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7475
4eb24e01
JM
74762016-06-14 Jason Merrill <jason@redhat.com>
7477
7478 P0145R2: Refining Expression Order for C++.
7479 * c.opt (fargs-in-order): New.
7480 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7481
ef7cf206
JJ
74822016-06-13 Jakub Jelinek <jakub@redhat.com>
7483
0dda258b
JJ
7484 PR sanitizer/71498
7485 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7486 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7487
ef7cf206
JJ
7488 PR preprocessor/71183
7489 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7490 to cb_get_source_date_epoch.
7491
50b15873
JJ
74922016-06-10 Jakub Jelinek <jakub@redhat.com>
7493
7494 PR c/68657
7495 * c.opt (Wpsabi): Add Warning flag.
7496
4d926e34
MS
74972016-06-10 Martin Sebor <msebor@redhat.com>
7498
7499 PR c/71392
14ec014e 7500 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7501 the nonnull attribute in type-generic builtins.
7502
e01b4e16
MS
75032016-06-09 Martin Sebor <msebor@redhat.com>
7504
7505 PR c/70883
7506 * c-common.c (builtin_function_validate_nargs): Make text of error
7507 message consistent with others like it.
7508
44a845ca
MS
75092016-06-08 Martin Sebor <msebor@redhat.com>
7510 Jakub Jelinek <jakub@redhat.com>
7511
7512 PR c++/70507
7513 PR c/68120
7514 * c-common.c (check_builtin_function_arguments): Handle
7515 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7516
a80a7051
RB
75172016-06-08 Richard Biener <rguenther@suse.de>
7518
7519 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7520
bfd67b47
RB
75212016-06-07 Richard Biener <rguenther@suse.de>
7522
7523 PR c/61564
7524 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7525 options and warn about others.
7526
15c98b2e
ES
75272016-06-01 Eduard Sanou <dhole@openmailbox.org>
7528
7529 * c-common.c (get_source_date_epoch): Rename to
7530 cb_get_source_date_epoch.
7531 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7532 message when the parsing fails. Use error_at instead of fatal_error.
7533 * c-common.h (get_source_date_epoch): Rename to
7534 cb_get_source_date_epoch.
7535 * c-common.h (cb_get_source_date_epoch): Prototype.
7536 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7537 * c-common.h (c_omp_region_type): Remove trailing comma.
7538 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7539 * c-lex.c (c_lex_with_flags): Remove initialization of
7540 pfile->source_date_epoch.
7541
00631022
JJ
75422016-05-30 Jakub Jelinek <jakub@redhat.com>
7543
7544 PR c++/71349
7545 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7546 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7547 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7548 instead of C_OMP_CLAUSE_SPLIT_FOR.
7549
f17a223d
RB
75502016-05-24 Richard Biener <rguenther@suse.de>
7551
7552 PR middle-end/70434
7553 PR c/69504
7554 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7555 (convert_vector_to_array_for_subscript): ... this.
7556 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7557 VIEW_CONVERT_EXPR to an array type. Rename to ...
7558 (convert_vector_to_array_for_subscript): ... this.
7559
4f2e1536
MP
75602016-05-12 Marek Polacek <polacek@redhat.com>
7561
7562 PR c/70756
7563 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7564 size_in_bytes and pass LOC to it.
7565
d6e83a8d
MM
75662016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7567
7568 PR c/43651
7569 * c.opt (Wduplicate-decl-specifier): New option.
7570
5c3a10fb
MP
75712016-05-11 Marek Polacek <polacek@redhat.com>
7572
7573 PR c++/71024
7574 * c-common.c (diagnose_mismatched_attributes): New function.
7575 * c-common.h (diagnose_mismatched_attributes): Declare.
7576
deef7113
MP
75772016-05-04 Marek Polacek <polacek@redhat.com>
7578
7579 * c.opt (Wdangling-else): New option.
7580
79ce98bc
MP
75812016-05-03 Marek Polacek <polacek@redhat.com>
7582
7583 PR c/70859
7584 * c-common.c (builtin_function_validate_nargs): Add location
7585 parameter. Use it.
7586 (check_builtin_function_arguments): Add location and arguments
7587 parameters. Use them.
7588 * c-common.h (check_builtin_function_arguments): Update declaration.
7589
381cdae4
RB
75902016-05-03 Richard Biener <rguenther@suse.de>
7591
7592 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7593 allow call args to gimplify to SSA names.
7594
1d793c34
MP
75952016-05-03 Marek Polacek <polacek@redhat.com>
7596
7597 * c-common.h (enum c_omp_region_type): Remove stray comma.
7598
77886428
CP
75992016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7600
7601 * c-common.h (enum c_omp_region_type): Define.
7602
697e0b28
RS
76032016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7604
7605 * c-common.c (shorten_compare): Use wi::to_wide.
7606
e7ff0319
CP
76072016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7608
7609 PR middle-end/70626
7610 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7611 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7612 reduction clauses in acc parallel loops.
7613
2fff3db8
MP
76142016-04-29 Marek Polacek <polacek@redhat.com>
7615
7616 PR c/70852
7617 * c-common.c (warn_for_memset): Check domain before accessing it.
7618
509063eb
DV
76192016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7620
7621 PR/69089
7622 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7623 "aligned" attribute.
7624
b632761d
JM
76252016-04-28 Jason Merrill <jason@redhat.com>
7626
7627 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7628
174f6622
ES
76292016-04-28 Eduard Sanou <dhole@openmailbox.org>
7630 Matthias Klose <doko@debian.org>
7631
7632 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7633 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7634 handling.
7635 * c-common.h (get_source_date_epoch): Prototype.
7636 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7637
6bc2bb18
RB
76382015-04-27 Ryan Burn <contact@rnburn.com>
7639
7640 PR c++/69024
7641 PR c++/68997
7642 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7643 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7644 external linkage.
7645 (cilk_detect_and_unwrap): Corresponding changes.
7646 (extract_free_variables): Don't extract free variables from
7647 AGGR_INIT_EXPR slot.
7648 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7649 (cilk_recognize_spawn): Likewise.
7650
c1e1f433
BS
76512016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7652
7653 * c.opt (Wmemset-elt-size): New option.
7654 * c-common.c (warn_for_memset): New function.
7655 * c-common.h (warn_for_memset): Declare.
7656
d067e05f
JM
76572016-04-25 Jason Merrill <jason@redhat.com>
7658
7659 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7660 No longer static.
7661 * c-common.h: Declare it.
7662 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7663
9aa36ae5
JM
76642016-04-22 Jason Merrill <jason@redhat.com>
7665
7666 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7667
477d4906
IV
76682016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7669
7670 PR c++/69363
7671 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7672 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7673
fe37c7af
MM
76742016-04-18 Michael Matz <matz@suse.de>
7675
7676 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7677 and SET_DECL_ALIGN.
7678
23f2660f
EB
76792016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7680
7681 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7682 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7683 to incomplete types.
7684 (dump_nested_type): Remove redundant tests and tidy up.
7685 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7686 a type which is the typedef of an original type.
7687
1e77281b
MP
76882016-04-15 Marek Polacek <polacek@redhat.com>
7689
7690 PR c/70651
7691 * c-common.c (build_va_arg): Change two asserts into errors and return
7692 error_mark_node.
7693
b3a77f21
MP
76942016-04-13 Marek Polacek <polacek@redhat.com>
7695
7696 PR c++/70639
7697 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7698 for switch statements, too.
7699
322b8466
JM
77002016-03-28 Jason Merrill <jason@redhat.com>
7701
7702 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7703
fbdb6baf
MP
77042016-03-23 Marek Polacek <polacek@redhat.com>
7705
7706 PR c++/69884
7707 * c.opt (Wignored-attributes): New option.
7708
5c240f4d
DM
77092016-03-22 David Malcolm <dmalcolm@redhat.com>
7710
7711 PR c/69993
7712 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7713 diagnostic text, reversing the order of the warning and note so
7714 that they appear in source order.
7715
14ba7b28
MP
77162016-03-17 Marek Polacek <polacek@redhat.com>
7717
7718 PR c/69407
7719 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7720 operations.
7721
08a1cadc
JM
77222016-03-14 Jason Merrill <jason@redhat.com>
7723
2aaeea19
JM
7724 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7725
08a1cadc
JM
7726 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7727
c06d25bb
RB
77282016-03-09 Richard Biener <rguenther@suse.de>
7729
7730 PR c/70143
7731 * c-common.c (strict_aliasing_warning): Add back
7732 alias_sets_conflict_p check.
7733
80aac5c8
JM
77342016-03-08 Jason Merrill <jason@redhat.com>
7735
7736 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7737
64b23c13
DM
77382016-03-04 David Malcolm <dmalcolm@redhat.com>
7739
7740 PR c/68187
7741 * c-indentation.c (get_visual_column): Move code to determine next
7742 tab stop to...
7743 (next_tab_stop): ...this new function.
7744 (line_contains_hash_if): Delete function.
7745 (detect_preprocessor_logic): Delete function.
7746 (get_first_nws_vis_column): New function.
7747 (detect_intervening_unindent): New function.
7748 (should_warn_for_misleading_indentation): Replace call to
7749 detect_preprocessor_logic with a call to
7750 detect_intervening_unindent.
7751
729526f5
DM
77522016-03-04 David Malcolm <dmalcolm@redhat.com>
7753
7754 PR c/68187
7755 * c-indentation.c (should_warn_for_misleading_indentation): When
7756 suppressing warnings about cases where the guard and body are on
7757 the same column, only use the first non-whitespace column in place
7758 of the guard token column when dealing with "else" clauses.
7759 When rejecting aligned BODY and NEXT, loosen the requirement
7760 from equality with the first non-whitespace of guard to simply
7761 that they not be indented relative to it.
7762
e9a35493
RB
77632016-03-04 Richard Biener <rguenther@suse.de>
7764
7765 PR c++/70054
7766 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7767 instead of alias_sets_conflict_p.
7768
1be56bc5
MP
77692016-03-01 Marek Polacek <polacek@redhat.com>
7770
7771 PR c++/69795
7772 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7773 any DECL.
7774
35886f0b
MS
77752016-02-22 Martin Sebor <msebor@redhat.com>
7776
7777 PR middle-end/69780
7778 * c-common.c (check_builtin_function_arguments): Validate and
7779 reject invalid arguments to __builtin_alloca_with_align.
7780
4246c8da
MW
77812016-02-20 Mark Wielaard <mjw@redhat.com>
7782
7783 PR c/28901
7784 * c.opt (Wunused-const-variable): Turn into Alias for...
7785 (Wunused-const-variable=): New option.
7786
268be88c
BE
77872016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7788
7789 PR c++/69865
7790 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7791 here...
7792 (c_common_init_options): ...to here.
7793 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7794
871b3f47
JJ
77952016-02-19 Jakub Jelinek <jakub@redhat.com>
7796
7797 PR c++/69826
7798 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7799 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7800 flag_preprocess_only.
7801
bf14eba2
JJ
78022016-02-16 Jakub Jelinek <jakub@redhat.com>
7803
7804 PR c/69835
7805 * c.opt (Wnonnull-compare): Enable for -Wall.
7806
ba6b3795
JJ
78072016-02-15 Jakub Jelinek <jakub@redhat.com>
7808
7809 PR c++/69797
7810 * c-common.c (sync_resolve_size): Diagnose too few arguments
7811 even when params is non-NULL empty vector.
7812
a011cd92
BS
78132016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7814
7815 PR target/60410
7816 * c.opt (fshort-double): Remove.
7817
46cb9332
MS
78182016-02-05 Martin Sebor <msebor@redhat.com>
7819
7820 PR c++/69662
7821 * c.opt (Warning options): Update -Wplacement-new to take
7822 an optional argument.
7823
e1b81f2b
JJ
78242016-02-01 Jakub Jelinek <jakub@redhat.com>
7825
7826 PR preprocessor/69543
7827 PR c/69558
7828 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7829 instead of loc to control_warning_option.
7830
b6adbb9f
NS
78312016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7832
7833 * c.opt (fopenacc-dim=): New option.
7834
5d70666e
RB
78352016-01-27 Ryan Burn <contact@rnburn.com>
7836
7837 PR cilkplus/69267
7838 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7839 gimplify_arg. Removed superfluous post_p argument.
7840 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7841 superfluous post_p argument.
7842 * c-gimplify.c (c_gimplify_expr): Likewise.
7843
01e1dea3
DM
78442016-01-26 David Malcolm <dmalcolm@redhat.com>
7845
7846 PR other/69006
7847 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7848 pp_newline_and_flush with pp_flush.
7849
9f04a53e
MS
78502016-01-20 Martin Sebor <msebor@redhat.com>
7851
7852 PR c/69405
7853 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7854 an incompatible argument when the argument isn't a valid tree node.
7855
7f26f7df
JM
78562016-01-18 Jason Merrill <jason@redhat.com>
7857
7858 PR c++/68767
7859 * c-common.c (check_function_arguments_recurse): Fold the whole
7860 COND_EXPR, not just the condition.
7861
f62bf092
TV
78622016-01-18 Tom de Vries <tom@codesourcery.com>
7863
7864 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7865 classify as loop clause.
7866
e0a575ff
JJ
78672016-01-15 Jakub Jelinek <jakub@redhat.com>
7868
7869 PR bootstrap/68271
7870 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7871 C++ FE no longer has limit on number of pragmas.
7872
78732015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7874
7875 PR c++/69048
7876 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7877 to add missing cleanup point.
b6e3db06 7878
c7df95d8
DM
78792016-01-14 David Malcolm <dmalcolm@redhat.com>
7880
7881 PR c++/68819
7882 * c-indentation.c (get_visual_column): Add location_t param.
7883 Handle the column number being zero by effectively disabling the
7884 warning, with an "inform".
7885 (should_warn_for_misleading_indentation): Add location_t argument
7886 for all uses of get_visual_column.
7887
21efdd80
PP
78882016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7889
7890 PR c++/69029
7891 * c-indentation.c (should_warn_for_misleading_indentation):
7892 Don't warn about do-while statements.
7893
7a127fa7
MS
78942016-01-07 Martin Sebor <msebor@redhat.com>
7895
7896 PR c/68966
7897 * c-common.c (sync_resolve_size): Reject first argument when it's
7898 a pointer to _Bool.
7899
c589e975
DM
79002016-01-05 David Malcolm <dmalcolm@redhat.com>
7901
7902 PR c/69122
7903 * c-indentation.c (get_visual_column): Remove default argument.
7904 (should_warn_for_misleading_indentation): For the multiline case,
7905 update call to get_visual_column for next_stmt_exploc so that it
7906 captures the location of the first non-whitespace character in the
7907 relevant line. Don't issue warnings if there is non-whitespace
7908 before the next statement.
7909
818ab71a
JJ
79102016-01-04 Jakub Jelinek <jakub@redhat.com>
7911
7912 Update copyright years.
7913
745e411d
DM
79142015-12-21 David Malcolm <dmalcolm@redhat.com>
7915
7916 * c-common.c (binary_op_error): Convert first param from
7917 location_t to rich_location * and use it when emitting an error.
7918 * c-common.h (binary_op_error): Convert first param from
7919 location_t to rich_location *.
7920
de67c4c3
DM
79212015-12-16 David Malcolm <dmalcolm@redhat.com>
7922
7923 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7924 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7925
4a38b02b
IV
79262015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7927
7928 * c-common.c (c_common_attribute_table): Handle "omp declare target
7929 link" attribute.
7930
54d62f51
JJ
79312015-12-14 Jakub Jelinek <jakub@redhat.com>
7932
7933 PR c/68833
7934 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7935
8d4227c8
TB
79362014-12-12 Tobias Burnus <burnus@net-b.de>
7937
7938 PR fortran/68815
7939 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7940 specifiers (%d, %i,%u and %c).
7941
f6069ccc
DM
79422015-12-10 David Malcolm <dmalcolm@redhat.com>
7943
7944 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7945
63bbf46d
JJ
79462015-12-08 Jakub Jelinek <jakub@redhat.com>
7947
7948 PR c/48088
7949 PR c/68657
7950 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7951 * c-pragma.c (handle_pragma_diagnostic): Adjust
7952 control_warning_option caller.
7953
f79520bb
DM
79542015-12-07 David Malcolm <dmalcolm@redhat.com>
7955
7956 * c-common.c (c_cpp_error): Update for change to
7957 rich_location::set_range.
7958
b3d5bc62
JJ
79592015-12-04 Paolo Bonzini <bonzini@gnu.org>
7960
7961 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7962 shifting 1 out of the sign bit.
7963
79642015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7965
7966 * c-common.c (c_common_attribute_table[]): Update max arguments
7967 count for "simd" attribute.
7968 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7969
6eb4a537
JJ
79702015-12-03 Jakub Jelinek <jakub@redhat.com>
7971
7972 PR preprocessor/57580
7973 * c-ppoutput.c (print): Change printed field to bool.
7974 Move src_file last for smaller padding.
7975 (init_pp_output): Set print.printed to false instead of 0.
7976 (scan_translation_unit): Fix up formatting. Set print.printed
7977 to true after printing something other than newline.
7978 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7979 (maybe_print_line_1): Set print.printed to false instead of 0.
7980 (print_line_1): Likewise.
7981 (do_line_change): Set print.printed to true instead of 1.
7982 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7983 dump_macro): Set print.printed to false after printing newline.
7984
4250754e
JM
79852015-12-02 Jason Merrill <jason@redhat.com>
7986
f479b43d
JM
7987 * c-common.c (fold_for_warn): New.
7988 (warn_logical_operator, warn_tautological_cmp)
7989 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7990
4250754e
JM
7991 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7992 (c_fully_fold_internal, decl_constant_value_for_optimization):
7993 Move to c/c-fold.c.
7994 * c-common.h: Don't declare decl_constant_value_for_optimization.
7995
e9e32ee6
JM
79962015-12-02 Joseph Myers <joseph@codesourcery.com>
7997
7998 PR c/68162
7999 * c-common.h (c_build_qualified_type): Add extra default
8000 arguments.
8001
37d5ad46
JB
80022015-12-01 Julian Brown <julian@codesourcery.com>
8003 Cesar Philippidis <cesar@codesourcery.com>
8004 James Norris <James_Norris@mentor.com>
8005
8006 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8007 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8008 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8009
f07862c7
EB
80102015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8011
8012 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8013 (decl_sloc_common): Delete and move bulk of processing to...
8014 (decl_sloc): ...here.
8015 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8016 (dump_ada_double_name): Remove S parameter and compute the suffix.
8017 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8018 element type and deal with an anonymous one.
8019 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8020 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8021 and remove reference to QUAL_UNION_TYPE.
8022 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8023 (dump_nested_type): ...here. New function extracted from above.
8024 Generate a full declaration for anonymous element type of arrays.
8025 (print_ada_declaration): Really skip anonymous declarations. Remove
8026 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8027 Clean up processing of declarations of array types and objects.
8028 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8029 Remove obsolete code and tidy up.
8030
75c8aac3
JH
80312015-11-29 Jan Hubicka <hubicka@ucw.cz>
8032
8033 PR c/67581
8034 * c-common.c (handle_transparent_union_attribute): Update
8035 also type variants.
8036
b58d3df2
ML
80372015-11-27 Martin Liska <mliska@suse.cz>
8038
8039 PR c++/68312
8040 * array-notation-common.c (cilkplus_extract_an_triplets):
8041 Release vector of vectors.
8042 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8043
89a01fcf
EB
80442015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8045
8046 PR c++/68527
8047 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8048 (print_ada_struct_decl): Likewise.
8049
cc5c5226
IZ
80502015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8051
8052 PR c++/68001
8053 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8054 * cilk.c (recognize_spawn): Determine location in a more precise
8055 way.
8056
269adb9d
JM
80572015-11-19 Jason Merrill <jason@redhat.com>
8058
8059 * c-common.c (shorten_compare): But look through macros from
8060 system headers.
8061
d0eccfcd
JM
80622015-11-18 Jason Merrill <jason@redhat.com>
8063
8064 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8065 non-constant operand comes from a macro.
8066
3e44547c
JM
80672015-11-17 Jason Merrill <jason@redhat.com>
8068
8069 PR bootstrap/68346
8070 * c-common.c (warn_tautological_cmp): Fold before checking for
8071 constants.
8072
0f62c7a0
MP
80732015-11-16 Marek Polacek <polacek@redhat.com>
8074
8075 PR c++/68362
8076 * c-common.c (check_case_bounds): Fold low and high cases.
8077
a868811e
MP
80782015-11-16 Marek Polacek <polacek@redhat.com>
8079
8080 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8081 * c-common.c (c_common_get_alias_set): Likewise.
8082 (handle_visibility_attribute): Likewise.
8083
fff77217
KY
80842015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8085
8086 * c-common.c (handle_simd_attribute): New.
8087 (struct attribute_spec): Add entry for "simd".
8088 (handle_simd_attribute): New.
8089
269e63b7
KT
80902015-11-13 Kai Tietz <ktietz70@googlemail.com>
8091
8092 * c-lex.c (interpret_float): Use fold_convert.
8093
ebedc9a3
DM
80942015-11-13 David Malcolm <dmalcolm@redhat.com>
8095
8096 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8097 and store it on the result.
8098 * c-opts.c (c_common_init_options): Set
8099 global_dc->colorize_source_p.
8100
6e232ba4
JN
81012015-11-12 James Norris <jnorris@codesourcery.com>
8102 Joseph Myers <joseph@codesourcery.com>
8103
7365279f 8104 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8105 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8106 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8107 PRAGMA_OACC_CLAUSE_LINK.
8108
e78bede6
MP
81092015-11-11 Marek Polacek <polacek@redhat.com>
8110
8111 PR c/68107
8112 PR c++/68266
8113 * c-common.c (valid_array_size_p): New function.
8114 * c-common.h (valid_array_size_p): Declare.
8115
3f8257db 81162015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8117
8118 PR bootstrap/68271
8119 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8120
69f293c9
AM
81212015-11-11 Andrew MacLeod <amacleod@redhat.com>
8122
8123 * array-notation-common.c: Remove unused header files.
8124 * c-ada-spec.c: Likewise.
8125 * c-cilkplus.c: Likewise.
8126 * c-common.c: Likewise.
8127 * c-cppbuiltin.c: Likewise.
8128 * c-dump.c: Likewise.
8129 * c-format.c: Likewise.
8130 * c-gimplify.c: Likewise.
8131 * c-indentation.c: Likewise.
8132 * c-lex.c: Likewise.
8133 * c-omp.c: Likewise.
8134 * c-opts.c: Likewise.
8135 * c-pch.c: Likewise.
8136 * c-ppoutput.c: Likewise.
8137 * c-pragma.c: Likewise.
8138 * c-pretty-print.c: Likewise.
8139 * c-semantics.c: Likewise.
8140 * c-ubsan.c: Likewise.
8141 * cilk.c: Likewise.
8142 * stub-objc.c: Likewise.
8143
3a40d81d
NS
81442015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8145 Cesar Philippidis <cesar@codesourcery.com>
8146 James Norris <jnorris@codesourcery.com>
8147 Julian Brown <julian@codesourcery.com>
8148 Nathan Sidwell <nathan@codesourcery.com>
8149
8150 * c-pragma.c (oacc_pragmas): Add "routine".
8151 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8152
ee45a32d
EB
81532015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8154
8155 * c-common.c (c_common_attributes): Add scalar_storage_order.
8156 (handle_scalar_storage_order_attribute): New function.
8157 * c-pragma.c (global_sso): New variable.
8158 (maybe_apply_pragma_scalar_storage_order): New function.
8159 (handle_pragma_scalar_storage_order): Likewise.
8160 (init_pragma): Register scalar_storage_order.
8161 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8162 * c.opt (Wscalar-storage-order): New warning.
8163 (fsso-struct=): New option.
8164
eb11eb15
MS
81652015-11-08 Martin Sebor <msebor@redhat.com>
8166
8167 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8168
0aad0198
RS
81692015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8170
8171 * c-common.c: Don't undef DEF_BUILTIN.
8172
8a645150
DM
81732015-11-06 David Malcolm <dmalcolm@redhat.com>
8174
8175 * c-common.c (c_cpp_error): Convert parameter from location_t to
8176 rich_location *. Eliminate the "column_override" parameter and
8177 the call to diagnostic_override_column.
8178 Update the "done_lexing" clause to set range 0
8179 on the rich_location, rather than overwriting a location_t.
8180 * c-common.h (c_cpp_error): Convert parameter from location_t to
8181 rich_location *. Eliminate the "column_override" parameter.
8182
7a5e4956
CP
81832015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8184 Thomas Schwinge <thomas@codesourcery.com>
8185 James Norris <jnorris@codesourcery.com>
8186
8187 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8188 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8189 clauses with parallel and kernels and loops.
8190 * c-pragma.h (enum pragma_omp_clause): Add entries for
8191 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8192 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8193 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8194 INDEPENDENT,SEQ}.
8195 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8196
e2f5cc96
MS
81972015-11-05 Martin Sebor <msebor@redhat.com>
8198
8199 PR c++/67942
8200 * c.opt (-Wplacement-new): New option.
8201
e01d41e5
JJ
82022015-11-05 Jakub Jelinek <jakub@redhat.com>
8203
8204 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8205 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8206 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8207 save_expr or create_tmp_var* if TEST is true.
8208 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8209 Don't call add_stmt here.
8210 (struct c_omp_check_loop_iv_data): New type.
8211 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8212 c_omp_check_loop_iv_exprs): New functions.
8213 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8214 distribute.
8215 (c_omp_declare_simd_clauses_to_numbers): Change
8216 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8217 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8218 from numbers to PARM_DECLs.
8219
595278be
MM
82202015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8221
8222 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8223 flag_checking.
8224
3f8257db 82252015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8226
8227 PR c++-common/67882
b3d5bc62
JJ
8228 * c-common.h (fold_offsetof_1): Add argument.
8229 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8230 offsetof expressions that reference elements past the end of
8231 an array.
8232
4bf9e5a8
TS
82332015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8234 Chung-Lin Tang <cltang@codesourcery.com>
8235
8236 * c-pragma.c (oacc_pragmas): Add "atomic".
8237 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8238
3b1661a9
ES
82392015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8240
8241 * c-common.c (handle_target_clones_attribute): New.
8242 (c_common_attribute_table): Add handle_target_clones_attribute.
8243 (handle_always_inline_attribute): Add check on target_clones attribute.
8244 (handle_target_attribute): Ditto.
8245
2adfab87
AM
82462015-10-29 Andrew MacLeod <amacleod@redhat.com>
8247
8248 * array-notation-common.c: Reorder #include's and remove duplicates.
8249 * c-ada-spec.c: Likewise.
8250 * c-cilkplus.c: Likewise.
8251 * c-common.c: Likewise.
8252 * c-cppbuiltin.c: Likewise.
8253 * c-dump.c: Likewise.
8254 * c-format.c: Likewise.
8255 * c-gimplify.c: Likewise.
8256 * c-indentation.c: Likewise.
8257 * c-lex.c: Likewise.
8258 * c-omp.c: Likewise.
8259 * c-opts.c: Likewise.
8260 * c-pch.c: Likewise.
8261 * c-ppoutput.c: Likewise.
8262 * c-pragma.c: Likewise.
8263 * c-pretty-print.c: Likewise.
8264 * c-semantics.c: Likewise.
8265 * c-ubsan.c: Likewise.
8266 * cilk.c: Likewise.
8267 * stub-objc.c: Likewise.
8268
d90ec4f2
JM
82692015-10-28 Jason Merrill <jason@redhat.com>
8270
8271 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8272
88bae6f4
TS
82732015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8274 James Norris <jnorris@codesourcery.com>
8275 Cesar Philippidis <cesar@codesourcery.com>
8276
8277 PR c/64765
8278 PR c/64880
8279 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8280 * c-omp.c (c_oacc_split_loop_clauses): New function.
8281
b1726d6c
MS
82822015-10-21 Martin Sebor <msebor@redhat.com>
8283
8284 PR driver/68043
8285 * c.opt: End each sentence that describes an option with a period.
8286
fa60eeb9
MP
82872015-10-20 Marek Polacek <polacek@redhat.com>
8288
8289 * array-notation-common.c (is_cilkplus_vector_p): Define.
8290 * c-common.h (is_cilkplus_vector_p): Declare.
8291
95979049
MP
82922015-10-20 Marek Polacek <polacek@redhat.com>
8293
8294 * c.opt (std=gnu++11): Do not describe as experimental.
8295 (std=gnu++14): Likewise.
8296
2a9fb712
JM
82972015-10-19 Jason Merrill <jason@redhat.com>
8298
8299 * c-cppbuiltin.c (c_cpp_builtins): Define
8300 __cpp_nontype_template_args.
8301
13b380a3
JM
83022015-10-19 Jason Merrill <jason@redhat.com>
8303
8304 * c-cppbuiltin.c (c_cpp_builtins): Define
8305 __cpp_enumerator_attributes, __cpp_fold_expressions,
8306 __cpp_unicode_characters.
8307
d9a6bd32
JJ
83082015-10-13 Jakub Jelinek <jakub@redhat.com>
8309 Aldy Hernandez <aldyh@redhat.com>
8310
8311 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8312 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8313 (c_define_builtins): Likewise.
8314 * c-common.h (enum c_omp_clause_split): Add
8315 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8316 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8317 (c_finish_omp_for): Add ORIG_DECLV argument.
8318 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8319 201511 instead of 201307.
8320 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8321 OMP_CRITICAL_CLAUSES to it.
8322 (c_finish_omp_ordered): Add CLAUSES argument, set
8323 OMP_ORDERED_CLAUSES to it.
8324 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8325 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8326 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8327 constructs and new OpenMP 4.5 clauses. Clear
8328 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8329 verification code.
8330 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8331 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8332 (enum pragma_omp_clause): Add
8333 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8334 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8335
624d31fe
RS
83362015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8337
8338 * c-lex.c (interpret_float): Use real_equal instead of
8339 REAL_VALUES_EQUAL.
8340
b8fd7909
JM
83412015-10-04 Jason Merrill <jason@redhat.com>
8342
8343 Implement N4514, C++ Extensions for Transactional Memory.
8344 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8345 (c_common_attribute_table): Add transaction_safe_dynamic.
8346 transaction_safe now affects type identity.
8347 (handle_tm_attribute): Handle transaction_safe_dynamic.
8348 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8349 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8350 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8351 (D_TRANSMEM): New.
8352 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8353 * c-pretty-print.c (pp_c_attributes_display): Don't print
8354 transaction_safe in C++.
8355
12651878
MP
83562015-10-02 Marek Polacek <polacek@redhat.com>
8357
8358 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8359
3e3b8d63
MP
83602015-10-02 Marek Polacek <polacek@redhat.com>
8361
8362 PR c/64249
8363 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8364 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8365 * c.opt (Wduplicated-cond): New option.
8366
0d1a8f75
JM
83672015-10-01 Joseph Myers <joseph@codesourcery.com>
8368
8369 * c.opt (std=c11): Do not describe as experimental.
8370 (std=gnu11): Likewise.
8371 (std=iso9899:2011): Likewise.
8372
3e32ee19
NS
83732015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8374
8375 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8376 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8377
974348ee
MP
83782015-09-25 Marek Polacek <polacek@redhat.com>
8379
8380 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8381 (ubsan_instrument_shift): Likewise.
8382
15dbc1a6
MP
83832015-09-25 Marek Polacek <polacek@redhat.com>
8384
8385 PR sanitizer/64906
8386 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8387
6b95d7cc
PP
83882015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8389
8390 * c-indentation.c (should_warn_for_misleading_indentation):
8391 Compare next_stmt_vis_column with guard_line_first_nws instead
8392 of with guard_line_vis_column.
8393
c1822f9c
MLI
83942015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8395
8396 PR c/49654
8397 PR c/49655
8398 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8399 options and options not valid for the current language.
8400
d5398058
PP
84012015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8402
8403 * c-indentation.c (should_warn_for_misleading_indentation):
8404 Float out and consolidate the calls to get_visual_column that
8405 are passed guard_exploc as an argument. Compare
8406 next_stmt_vis_column with guard_line_first_nws instead of with
8407 body_line_first_nws.
8408
6b333269
NS
84092015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8410
8411 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8412 Wnamespaces): New C++ warnings.
8413
a75f1574
JM
84142015-09-22 Jason Merrill <jason@redhat.com>
8415
8416 * c-common.h (abi_compat_version_crosses): New.
8417 (warn_abi_version): Declare.
8418 * c-common.c: Define it.
8419 * c-opts.c (c_common_post_options): Handle it.
8420 flag_abi_compat_version defaults to 8.
8421
bdaaa8b7
VV
84222015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8423
8424 Complete the implementation of N4230, Nested namespace definition.
8425 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8426 __cpp_nested_namespace_definitions.
8427
eaa797e8
MLI
84282015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8429
8430 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8431
c4914de6
MLI
84322015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8433
8434 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8435 when warning.
8436 * c-pragma.h (pragma_lex): Add optional loc argument.
8437
fcb87c50
MM
84382015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8439
8440 * c-format.c (check_format_arg): Adjust to use common block size in all
8441 object pools.
8442
31bdd08a
DM
84432015-09-15 David Malcolm <dmalcolm@redhat.com>
8444
8445 * c-format.c (location_from_offset): Update for change in
8446 signature of location_get_source_line.
8447 * c-indentation.c (get_visual_column): Likewise.
8448 (line_contains_hash_if): Likewise.
8449
aa9f4b4c
MP
84502015-09-14 Marek Polacek <polacek@redhat.com>
8451
8452 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8453 setting various warnings.
8454
aa256c4a
MP
84552015-09-14 Marek Polacek <polacek@redhat.com>
8456
8457 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8458 a negative value.
8459
0f876f22
MW
84602015-09-11 Mark Wielaard <mjw@redhat.com>
8461
8462 PR c/28901
8463 * c.opt (Wunused-variable): Option from common.opt.
8464 (Wunused-const-variable): New option.
8465
273aa49e
PC
84662015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8467
8468 PR c++/53184
8469 * c.opt ([Wsubobject-linkage]): Add.
8470
1807ffc1
MS
84712015-09-03 Martin Sebor <msebor@redhat.com>
8472
8473 PR c/66516
8474 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8475 functions.
8476 * c-common.c (reject_gcc_builtin): Define.
8477
38942840
BI
84782015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8479
8480 PR middle-end/60586
8481 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8482 prototype.
8483 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8484 cilk_gimplify_call_params_in_spawned_fn.
8485 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8486 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8487 unwrapping.
8488
c316b5e4
MP
84892015-08-25 Marek Polacek <polacek@redhat.com>
8490
8491 PR middle-end/67330
8492 * c-common.c (handle_weak_attribute): Don't check whether the
8493 visibility can be changed here.
8494
584a7c46
MLI
84952015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8496
8497 * c-lex.c (c_lex_with_flags): Use explicit locations.
8498
a79683d5
TS
84992015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8500
8501 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8502 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8503
61717a45
FXC
85042015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8505
8506 PR middle-end/36757
8507 * c-common.c (check_builtin_function_arguments): Add check
8508 for BUILT_IN_SIGNBIT argument.
8509
329524f5
PC
85102015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8511
8512 PR c++/67160
8513 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8514 in c++1z mode.
8515
4ee55665
MP
85162015-08-17 Marek Polacek <polacek@redhat.com>
8517
8518 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8519 with whitespaces before qualifier names.
8520
b893e375
MP
85212015-08-12 Marek Polacek <polacek@redhat.com>
8522
8523 PR c++/55095
8524 * c-common.c (maybe_warn_shift_overflow): Properly handle
8525 left-shifting 1 into the sign bit.
8526
c2d89095
MLI
85272015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8528
8529 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8530
971e17ff
AS
85312015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8532 Braden Obrzut <admin@maniacsvault.net>
8533 Jason Merrill <jason@redhat.com>
8534
8535 Add C++ Concepts TS support.
8536 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8537 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8538 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8539 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8540 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8541 * c.opt (fconcepts): New.
8542
b3d5bc62
JJ
85432015-08-02 Martin Sebor <msebor@redhat.com>
8544
8545 * c.opt (-Wframe-address): New warning option.
8546
8ebca419
PP
85472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8548
8549 * c-indentation.c (should_warn_for_misleading_indentation):
8550 Improve heuristics.
8551
1a1e101f
PP
85522015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8553
8554 * c-indentation.c (get_visual_column): Add parameter first_nws,
8555 use it. Update comment documenting the function.
8556 (is_first_nonwhitespace_on_line): Remove.
8557 (should_warn_for_misleading_indentation): Replace usage of
8558 of is_first_nonwhitespace_on_line with get_visual_column.
8559
992118a1
PP
85602015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8561
8562 * c-indentation.h (struct token_indent_info): Define.
8563 (get_token_indent_info): Define.
8564 (warn_for_misleading_information): Declare.
8565 * c-common.h (warn_for_misleading_information): Remove.
8566 * c-identation.c (warn_for_misleading_indentation):
8567 Change declaration to take three token_indent_infos. Adjust
8568 accordingly.
8569 * c-identation.c (should_warn_for_misleading_indentation):
8570 Likewise. Bail out early if the body is a compound statement.
8571 (guard_tinfo_to_string): Define.
8572
e8fa3817
JM
85732015-07-30 Jason Merrill <jason@redhat.com>
8574
8575 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8576 '*' for reference decay.
8577
173864e8
MP
85782015-07-30 Marek Polacek <polacek@redhat.com>
8579
8580 * c-common.c (warn_tautological_cmp): Bail for float types.
8581
f2afe6dd
MP
85822015-07-27 Marek Polacek <polacek@redhat.com>
8583
8584 PR bootstrap/67030
8585 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8586
05b28fd6
MP
85872015-07-27 Marek Polacek <polacek@redhat.com>
8588
8589 PR c++/66555
8590 PR c/54979
8591 * c-common.c (find_array_ref_with_const_idx_r): New function.
8592 (warn_tautological_cmp): New function.
8593 * c-common.h (warn_tautological_cmp): Declare.
8594 * c.opt (Wtautological-compare): New option.
8595
5a5062b8
MP
85962015-07-23 Marek Polacek <polacek@redhat.com>
8597
8598 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8599 (ubsan_instrument_shift): Likewise.
8600
dc891fe7
MP
86012015-07-23 Marek Polacek <polacek@redhat.com>
8602
8603 PR sanitizer/66908
8604 * c-ubsan.c: Include gimplify.h.
8605 (ubsan_instrument_division): Unshare OP0 and OP1.
8606 (ubsan_instrument_shift): Likewise.
8607
451b5e48
MP
86082015-07-20 Marek Polacek <polacek@redhat.com>
8609 Richard Sandiford <richard.sandiford@arm.com>
8610
8611 PR c++/55095
8612 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8613 Use EXPR_LOC_OR_LOC.
8614 (maybe_warn_shift_overflow): New function.
8615 * c-common.h (maybe_warn_shift_overflow): Declare.
8616 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8617 * c.opt (Wshift-overflow): New option.
8618
fb0b2914
ML
86192015-07-16 Martin Liska <mliska@suse.cz>
8620
8621 * c-format.c (static void check_format_info_main): Use
8622 object_allocator instead of pool_allocator.
8623 (check_format_arg): Likewise.
8624 (check_format_info_main): Likewise.
8625
903f5c23
AM
86262015-07-15 Andrew MacLeod <amacleod@redhat.com>
8627
8628 * c-opts.c: Remove multiline #include comment.
8629
026c3cfd
AH
86302015-07-12 Aldy Hernandez <aldyh@redhat.com>
8631
8632 * c-common.c: Fix double word typos.
8633
bb49ee66
EB
86342015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8635
8636 * c-ada-spec.h (cpp_operation): Revert latest change.
8637 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8638 constructors and destructors.
8639
1916bcb5
AM
86402015-07-09 Andrew MacLeod <amacleod@redhat.com>
8641
8642 * c-common.h: Adjust includes for flags.h changes.
8643 * stub-objc.c: Likewise.
026c3cfd 8644
a9dcd529
EB
86452015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8646
8647 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8648 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8649
b03b462f
JJ
86502015-07-08 Jakub Jelinek <jakub@redhat.com>
8651
8652 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8653 are to be removed, return NULL rather than original clauses list.
8654
c7131fb2
AM
86552015-07-07 Andrew MacLeod <amacleod@redhat.com>
8656
8657 * array-notation-common.c: Adjust includes.
8658 * c-ada-spec.c: Likewise.
8659 * c-cilkplus.c: Likewise.
8660 * c-common.h: Likewise.
8661 * c-cppbuiltin.c: Likewise.
8662 * c-dump.c: Likewise.
8663 * c-format.c: Likewise.
8664 * c-gimplify.c: Likewise.
8665 * c-indentation.c: Likewise.
8666 * c-lex.c: Likewise.
8667 * c-omp.c: Likewise.
8668 * c-opts.c: Likewise.
8669 * c-pch.c: Likewise.
8670 * c-ppoutput.c: Likewise.
8671 * c-pragma.c: Likewise.
8672 * c-pretty-print.c: Likewise.
8673 * c-semantics.c: Likewise.
8674 * c-ubsan.c: Likewise.
8675 * cilk.c: Likewise.
8676 * stub-objc.c: Likewise.
8677
2a7fb83f
EB
86782015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8679
8680 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8681 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8682
a03c9bf1
JM
86832015-07-01 Jason Merrill <jason@redhat.com>
8684
36a85135
JM
8685 * c-common.h (D_CXX11): Rename from D_CXX0X.
8686 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8687 * c-common.c: Adjust.
8688
e7fa68d5
JM
8689 * c-opts.c (c_common_post_options): Default to C++14.
8690
a03c9bf1
JM
8691 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8692
fe95b036
ESR
86932015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8694
8695 Implement N4197 - Adding u8 character literals
b3d5bc62 8696 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8697 CPP_CHAR.
b3d5bc62 8698 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8699 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8700 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8701 and CPP_UTF8CHAR tokens.
8702 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8703
da2e71c9
MLI
87042015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8705
8706 PR fortran/66605
8707 * c-common.c (do_warn_unused_parameter): Move here.
8708 * c-common.h (do_warn_unused_parameter): Declare.
8709
b155cfd9
MP
87102015-06-29 Marek Polacek <polacek@redhat.com>
8711
8712 PR c/66322
8713 * c-common.c (check_case_bounds): Add bool * parameter. Set
8714 OUTSIDE_RANGE_P.
8715 (c_add_case_label): Add bool * parameter. Pass it down to
8716 check_case_bounds.
8717 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8718 warning here.
8719 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8720 declarations.
8721
31521951
MP
87222015-06-27 Marek Polacek <polacek@redhat.com>
8723
8724 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8725 or VECTOR_INTEGER_TYPE_P throughout.
8726 * c-gimplify.c: Likewise.
8727
22d03525
MP
87282015-06-26 Marek Polacek <polacek@redhat.com>
8729
8730 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8731 * c-common.c (c_fully_fold_internal): Likewise.
8732 (c_alignof_expr): Likewise.
8733 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8734 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8735 * cilk.c (create_parm_list): Likewise.
22d03525 8736
af05e6e5
MP
87372015-06-26 Marek Polacek <polacek@redhat.com>
8738
8739 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8740
f0889939
AM
87412015-06-25 Andrew MacLeod <amacleod@redhat.com>
8742
8743 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8744 * c-gimplify.c: Likewise.
8745 * c-pragma.c: Likewise.
8746 * c-ubsan.c: Likewise.
8747 * cilk.c: Likewise.
8748
ca752f39
RS
87492015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8750
8751 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8752 ggc_hasher.
8753
16a16ec7
AM
87542015-06-25 Andrew MacLeod <amacleod@redhat.com>
8755
8756 * cilk.c: Move calls.h after tm.h in the include chain.
8757
0ae9bd27
MP
87582015-06-25 Marek Polacek <polacek@redhat.com>
8759
8760 * array-notation-common.c: Use VAR_P throughout.
8761 * c-ada-spec.c: Likewise.
8762 * c-common.c: Likewise.
8763 * c-format.c: Likewise.
8764 * c-gimplify.c: Likewise.
8765 * c-omp.c: Likewise.
8766 * c-pragma.c: Likewise.
8767 * c-pretty-print.c: Likewise.
8768 * cilk.c: Likewise.
8769
62f9079a
MP
87702015-06-25 Marek Polacek <polacek@redhat.com>
8771
8772 * cilk.c (extract_free_variables): Use is_global_var.
8773
0fa16060
RS
87742015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8775
8776 * c-common.c: Don't include target-def.h.
8777
a68ae2e1
MP
87782015-06-23 Marek Polacek <polacek@redhat.com>
8779
8780 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8781 when comparing INTEGER_CSTs.
8782
c6a2f2d9
PMR
87832015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8784
8785 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8786 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8787 (dump_ada_template): Skip partially specialized types.
8788
6b4db501
MM
87892015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8790
8791 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8792 swapping.
8793
abb226c9
AM
87942015-06-17 Andrew MacLeod <amacleod@redhat.com>
8795
8796 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8797 * c-ada-spec.c: Likewise.
8798 * c-cilkplus.c: Likewise.
8799 * c-common.c: Likewise.
8800 * c-common.h: Likewise.
8801 * c-cppbuiltin.c: Likewise.
8802 * c-dump.c: Likewise.
8803 * c-format.c: Likewise.
8804 * c-gimplify.c: Likewise.
8805 * c-indentation.c: Likewise.
8806 * c-lex.c: Likewise.
8807 * c-omp.c: Likewise.
8808 * c-opts.c: Likewise.
8809 * c-pch.c: Likewise.
8810 * c-ppoutput.c: Likewise.
8811 * c-pragma.c: Likewise.
8812 * c-pretty-print.c: Likewise.
8813 * c-semantics.c: Likewise.
8814 * c-ubsan.c: Likewise.
8815 * cilk.c: Likewise.
8816 * stub-objc.c: Likewise.
8817
076fecad
PP
88182015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8819
8820 PR c++/65168
8821 * c-common.c (c_common_truthvalue_conversion): Warn when
8822 converting an address of a reference to a truth value.
8823
13fdf2e2
AM
88242015-06-08 Andrew MacLeod <amacleod@redhat.com>
8825
8826 * array-notation-common.c : Adjust include files.
8827 * c-ada-spec.c : Likewise.
8828 * c-cilkplus.c : Likewise.
8829 * c-common.c : Likewise.
8830 * c-common.h : Likewise.
8831 * c-cppbuiltin.c : Likewise.
8832 * c-dump.c : Likewise.
8833 * c-format.c : Likewise.
8834 * c-gimplify.c : Likewise.
8835 * c-indentation.c : Likewise.
8836 * c-lex.c : Likewise.
8837 * c-omp.c : Likewise.
8838 * c-opts.c : Likewise.
8839 * c-pch.c : Likewise.
8840 * c-ppoutput.c : Likewise.
8841 * c-pragma.c : Likewise.
8842 * c-pretty-print.c : Likewise.
8843 * c-semantics.c : Likewise.
8844 * c-ubsan.c : Likewise.
8845 * cilk.c : Likewise.
8846 * stub-objc.c : Likewise.
8847
a1661b90
MP
88482015-06-08 Marek Polacek <polacek@redhat.com>
8849
8850 PR c/66415
8851 * c-format.c (location_from_offset): Return LOC if LINE is null.
8852
d7438551
AH
88532015-06-05 Aldy Hernandez <aldyh@redhat.com>
8854
8855 * c-common.h (c_parse_final_cleanups): New prototype.
8856 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8857
b3d5bc62
JJ
88582015-06-04 Sriraman Tallam <tmsriram@google.com>
8859
8860 * c-common.c (noplt): New attribute.
8861 (handle_noplt_attribute): New handler.
8862
ecb9f223
AM
88632015-06-04 Andrew MacLeod <amacleod@redhat.com>
8864
8865 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8866 * c-ada-spec.c: Likewise.
8867 * c-cilkplus.c: Likewise.
8868 * c-common.c: Likewise.
8869 * c-common.h: Likewise.
8870 * c-cppbuiltin.c: Likewise.
8871 * c-dump.c: Likewise.
8872 * c-format.c: Likewise.
8873 * c-gimplify.c: Likewise.
8874 * c-indentation.c: Likewise.
8875 * c-lex.c: Likewise.
8876 * c-omp.c: Likewise.
8877 * c-opts.c: Likewise.
8878 * c-pch.c: Likewise.
8879 * c-ppoutput.c: Likewise.
8880 * c-pragma.c: Likewise.
8881 * c-pretty-print.c: Likewise.
8882 * c-semantics.c: Likewise.
8883 * c-ubsan.c: Likewise.
8884 * cilk.c: Likewise.
8885 * stub-objc.c: Likewise.
8886
6ac48155
DM
88872015-06-02 David Malcolm <dmalcolm@redhat.com>
8888
8889 PR c/66220:
8890 * c-indentation.c (should_warn_for_misleading_indentation): Use
8891 expand_location rather than expand_location_to_spelling_point.
8892 Don't warn if the guarding statement is more indented than the
8893 next/body stmts.
8894
773ce42e
DM
88952015-06-02 David Malcolm <dmalcolm@redhat.com>
8896
8897 * c-indentation.c (warn_for_misleading_indentation): Bail out
8898 immediately if -Wmisleading-indentation isn't enabled.
8899
4fef8379
ML
89002015-06-01 Martin Liska <mliska@suse.cz>
8901
8902 * c-format.c (check_format_arg):Use new type-based pool allocator.
8903 (check_format_info_main) Likewise.
8904
1edfb384
EB
89052015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8906
8907 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8908 (has_nontrivial_methods): Likewise.
8909
9677ef52
MP
89102015-05-25 Marek Polacek <polacek@redhat.com>
8911
8912 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8913
fd5c817a
MP
89142015-05-22 Marek Polacek <polacek@redhat.com>
8915
8916 PR c/47043
8917 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8918
a2f45fe6 89192015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8920
8921 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8922 STACK_GROWS_DOWNWARD.
8923
a2f45fe6 89242015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8925
8926 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8927 STACK_GROWS_DOWNWARD rather than if it is defined.
8928
0fee2ac2 89292015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8930
0fee2ac2
MLI
8931 PR c/52952
8932 * c-format.c (location_column_from_byte_offset): New.
8933 (location_from_offset): New.
8934 (struct format_wanted_type): Add offset_loc field.
8935 (check_format_info): Move handling of location for extra arguments
8936 closer to the point of warning.
8937 (check_format_info_main): Pass the result of location_from_offset
8938 to warning_at.
8939 (format_type_warning): Pass the result of location_from_offset
8940 to warning_at.
8941
cf4ef6f7
MP
89422015-05-20 Marek Polacek <polacek@redhat.com>
8943
8944 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8945
3a65ee74
MP
89462015-05-20 Marek Polacek <polacek@redhat.com>
8947
8948 * c-ada-spec.c (dump_sloc): Use DECL_P.
8949
21b634ae
MP
89502015-05-20 Marek Polacek <polacek@redhat.com>
8951
8952 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8953 * c-common.c: Likewise.
8954
0e50b624
DM
89552015-05-19 David Malcolm <dmalcolm@redhat.com>
8956
8957 * c-common.h (fe_file_change): Strengthen param from
8958 const line_map * to const line_map_ordinary *.
8959 (pp_file_change): Likewise.
8960 * c-lex.c (fe_file_change): Likewise.
8961 (cb_define): Use linemap_check_ordinary when invoking
8962 SOURCE_LINE.
8963 (cb_undef): Likewise.
8964 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8965 invoking cb_file_change.
8966 (c_finish_options): Likewise.
8967 (push_command_line_include): Likewise.
8968 (cb_file_change): Strengthen param "new_map" from
8969 const line_map * to const line_map_ordinary *.
8970 * c-ppoutput.c (cb_define): Likewise for local "map".
8971 (pp_file_change): Likewise for param "map" and local "from".
8972
fab27f52
MM
89732015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8974
8975 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8976
2fe1d762
TV
89772015-05-18 Tom de Vries <tom@codesourcery.com>
8978
8979 * c-common.c (build_va_arg_1): New function.
8980 (build_va_arg): Add address operator to va_list operand if necessary.
8981
7a37fa90
MM
89822015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8983
8984 PR c/48956
8985 * c-common.c (int_safely_convertible_to_real_p): Define.
8986 (unsafe_conversion_p): Check conversions involving complex types.
8987 (conversion_warning): Add new warning message for conversions which
8988 discard imaginary component.
8989 * c-common.h: (enum conversion_safety): Add new enumerator for such
8990 conversions.
8991
3aa3c9fc
MP
89922015-05-14 Marek Polacek <polacek@redhat.com>
8993
8994 PR c/66066
8995 PR c/66127
8996 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8997 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8998 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8999 use it. If FOR_INT_CONST, require that all evaluated operands be
9000 INTEGER_CSTs.
9001
c3388e62
DM
90022015-05-12 David Malcolm <dmalcolm@redhat.com>
9003
9004 * c-common.h (warn_for_misleading_indentation): New prototype.
9005 * c-indentation.c: New file.
9006 * c.opt (Wmisleading-indentation): New option.
9007
c7b38fd5
TV
90082015-05-12 Tom de Vries <tom@codesourcery.com>
9009
9010 PR tree-optimization/66010
9011 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9012
381bf11e
JM
90132015-05-09 Jason Merrill <jason@redhat.com>
9014
edff0c06
JM
9015 * c-opts.c (c_common_post_options): Also clear
9016 cpp_opts->cpp_warn_cxx11_compat.
9017
129211bc
JM
9018 * c-common.h (enum cxx_dialect): Add cxx_unset.
9019 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9020 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9021
381bf11e
JM
9022 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9023 (std=gnu++0x): Mark as Undocumented.
9024 (std=gnu++1y): Add deprecated message.
9025
fe191308
JM
90262015-05-08 Jason Merrill <jason@redhat.com>
9027
765189ff
JM
9028 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9029 * c-opts.c: Adjust.
9030
fe191308
JM
9031 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9032
755e528f
MP
90332015-05-08 Marek Polacek <polacek@redhat.com>
9034
9035 PR c/64918
9036 * c.opt (Woverride-init-side-effects): New option.
9037
0173bd2a
MP
90382015-05-07 Marek Polacek <polacek@redhat.com>
9039
9040 PR c/65179
9041 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9042 negative value.
9043 * c.opt (Wshift-negative-value): New option.
9044 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9045 when -Wextra and C99/C++11 mode.
9046
e0f0d3b9
MP
90472015-05-07 Marek Polacek <polacek@redhat.com>
9048 Martin Uecker <uecker@eecs.berkeley.edu>
9049
9050 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9051 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9052
8243e2a9
JM
90532015-05-05 Jason Merrill <jason@redhat.com>
9054
9055 * c.opt (Wterminate): New.
9056
577cd070
MP
90572015-04-30 Marek Polacek <polacek@redhat.com>
9058
9059 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9060 require that the non-constant be of a boolean type.
9061
0373796b
JT
90622015-04-29 Josh Triplett <josh@joshtriplett.org>
9063
e0f0d3b9
MP
9064 * c-common.c (handle_section_attribute): Refactor to reduce
9065 nesting and distinguish between error cases.
0373796b 9066
716c0ba6
MP
90672015-04-29 Marek Polacek <polacek@redhat.com>
9068
9069 PR c/64610
9070 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9071 with 0/1.
9072
8848828b
JJ
90732015-04-29 Jakub Jelinek <jakub@redhat.com>
9074
9075 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9076 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9077 HOST_BITS_PER_WIDE_INT.
9078
ecd0e562
TV
90792015-04-28 Tom de Vries <tom@codesourcery.com>
9080
9081 PR tree-optimization/65887
9082 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9083
2a877204 90842015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9085 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9086
9087 * c-ada-spec.c (in_function): Delete.
9088 (dump_generic_ada_node): Do not change in_function and remove the
9089 redundant code dealing with it.
9090 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9091 (print_ada_methods): Output the static member functions in a nested
9092 package after the regular methods as well as associated renamings.
9093
4853031e
MP
90942015-04-24 Marek Polacek <polacek@redhat.com>
9095
9096 PR c/65830
9097 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9098 and OPT_Wshift_count_overflow.
9099
8c2b7f79
MP
9100 PR c/63357
9101 * c-common.c (warn_logical_operator): Warn if the operands have the
9102 same expressions.
9103
b8787813
MP
91042015-04-24 Marek Polacek <polacek@redhat.com>
9105
9106 PR c/61534
9107 * c-common.c (warn_logical_operator): Bail if either operand comes
9108 from a macro expansion.
9109
8fba1830
BRF
91102015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9111
9112 PR target/55143
9113 * c-common.c (c_default_pointer_mode): Add definition.
9114 * c-common.h (c_default_pointer_mode): Add declaration.
9115
17958621
JJ
91162015-03-11 Jakub Jelinek <jakub@redhat.com>
9117
9118 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9119 on record_builtin_type argument.
9120
7ccb1a11
JJ
91212015-03-10 Jakub Jelinek <jakub@redhat.com>
9122
9123 PR c/65120
9124 * c-common.c (warn_logical_not_parentheses): Don't warn for
9125 !x == 0 or !x != 0.
9126
04fd785e
MP
91272015-03-07 Marek Polacek <polacek@redhat.com>
9128
9129 PR sanitizer/65280
9130 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9131 before trying to figure out whether we have a flexible array member.
9132
a4e26206 91332015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9134 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9135
9136 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9137
0d2489f4
EB
91382015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9139
9140 PR ada/65319
9141 * c-ada-spec.c (print_destructor): Remove obsolete code.
9142
83ed54d7
EB
91432015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9144
9145 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9146 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9147 DECL_TEMPLATE_RESULT emulations.
9148 (dump_ada_template)): Add guard for TYPE_METHODS.
9149
7631f0e2
MP
91502015-02-27 Marek Polacek <polacek@redhat.com>
9151
9152 PR c/65040
9153 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9154
d1783ae5
KT
91552015-02-27 Kai Tietz <ktietz@redhat.com>
9156
9157 PR c/35330
9158 * c-pragma.c (handle_pragma_weak): Do not try to create
9159 weak/alias of declarations not being function, or variable
9160 declarations.
9161
56a9f6bc
TS
91622015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9163
9164 PR libgomp/64625
9165 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9166 Remove macros.
9167 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9168
3d5cb23d
MP
91692015-02-16 Marek Polacek <polacek@redhat.com>
9170
9171 PR c/65066
9172 * c-format.c (check_format_types): Handle null param.
9173
fa008882
MP
91742015-02-13 Marek Polacek <polacek@redhat.com>
9175
9176 PR c/65040
9177 * c-format.c (check_format_types): Don't warn about different
9178 signedness if the original value is in the range of WANTED_TYPE.
9179
785f21af
JM
91802015-02-12 Jason Merrill <jason@redhat.com>
9181
9182 PR c++/64956
9183 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9184 to the current highest version.
9185 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9186
4886ec8e
JJ
91872015-02-04 Jakub Jelinek <jakub@redhat.com>
9188
9189 PR c/64824
9190 PR c/64868
9191 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9192 instead of RDIV_EXPR. Use build_binary_op instead of
9193 build2_loc.
9194
40fecdd6
JM
91952015-01-30 Joseph Myers <joseph@codesourcery.com>
9196
9197 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9198 to pass input_location as first argument.
9199
a0c88d06
TV
92002015-01-23 Tom de Vries <tom@codesourcery.com>
9201
9202 PR libgomp/64672
9203 * c.opt (fopenacc): Mark as LTO option.
9204
1506ae0e
TV
92052015-01-23 Tom de Vries <tom@codesourcery.com>
9206
9207 PR libgomp/64707
9208 * c.opt (fopenmp): Mark as LTO option.
9209
31be63ab
JJ
92102015-01-21 Jakub Jelinek <jakub@redhat.com>
9211
9212 PR c/63307
b1726d6c 9213 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9214 (compare_decls): Fix up formatting.
9215
92162015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9217
9218 PR c/63307
9219 * cilk.c: Include vec.h.
9220 (struct cilk_decls): New structure.
9221 (wrapper_parm_cb): Split this function to...
9222 (fill_decls_vec): ...this...
9223 (create_parm_list): ...and this.
9224 (compare_decls): New function.
9225 (for_local_cb): Remove.
9226 (wrapper_local_cb): Ditto.
9227 (build_wrapper_type): For now first traverse and fill vector of
9228 declarations then sort it and then deal with sorted vector.
9229 (cilk_outline): Ditto.
9230 (declare_one_free_variable): Ditto.
9231
6875457f
JM
92322015-01-21 Jason Merrill <jason@redhat.com>
9233
9234 PR c++/64629
9235 * c-format.c (check_format_arg): Call decl_constant_value.
9236
185c9e56
ML
92372015-01-19 Martin Liska <mliska@suse.cz>
9238
9239 * c-common.c (handle_noicf_attribute): New function.
9240
41dbbb37
TS
92412015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9242 Bernd Schmidt <bernds@codesourcery.com>
9243 James Norris <jnorris@codesourcery.com>
9244 Cesar Philippidis <cesar@codesourcery.com>
9245 Ilmir Usmanov <i.usmanov@samsung.com>
9246 Jakub Jelinek <jakub@redhat.com>
9247
9248 * c.opt (fopenacc): New option.
9249 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9250 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9251 New macros.
9252 * c-common.h (c_finish_oacc_wait): New prototype.
9253 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9254 (c_finish_oacc_wait): New function.
9255 * c-pragma.c (oacc_pragmas): New variable.
9256 (c_pp_lookup_pragma, init_pragma): Handle it.
9257 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9258 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9259 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9260 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9261 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9262 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9263 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9264 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9265 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9266 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9267 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9268 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9269 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9270 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9271 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9272 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9273 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9274 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9275 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9276 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9277 PRAGMA_OACC_CLAUSE_WORKER.
9278
3f8257db 92792015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9280
9281 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9282 for the new option fstack-protector_explicit.
9283 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9284 (handle_stack_protect_attribute): New function.
9285
3f8257db 92862015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9287
9288 * c.opt: New option -Warray-bounds=.
9289
adfac8df
JJ
92902015-01-09 Michael Collison <michael.collison@linaro.org>
9291
9292 * array-notation-common.c: Include hash-set.h, machmode.h,
9293 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9294 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9295 * c-ada-spec.c: Ditto.
9296 * c-cilkplus.c: Ditto.
9297 * c-common.c: Include input.h due to flattening of tree.h.
9298 Define macro GCC_C_COMMON_C.
9299 * c-common.h: Flatten tree.h header files into c-common.h.
9300 Remove include of tree-core.h.
9301 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9302 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9303 fold-const.h, wide-int.h, and inchash.h due to
9304 flattening of tree.h.
9305 * c-dump.c: Ditto.
9306 * c-format.c: Flatten tree.h header files into c-common.h.
9307 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9308 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9309 fold-const.h, wide-int.h, and inchash.h due to
9310 flattening of tree.h.
9311 * c-dump.c: Include hash-set.h, machmode.h,
9312 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9313 fold-const.h, wide-int.h, and inchash.h due to
9314 flattening of tree.h.
9315 * c-format.c: Include hash-set.h, machmode.h,
9316 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9317 fold-const.h, wide-int.h, inchash.h and real.h due to
9318 flattening of tree.h.
9319 * c-gimplify.c: Include hash-set.h, machmode.h,
9320 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9321 fold-const.h, wide-int.h, and inchash.h due to
9322 flattening of tree.h.
9323 * cilk.c: Ditto.
9324 * c-lex.c: Ditto.
9325 * c-omp.c: Ditto.
9326 * c-opts.c: Ditto.
9327 * c-pch.c: Ditto.
9328 * c-ppoutput.c: Ditto.
9329 * c-pragma.c: Ditto.
9330 * c-pretty-print.c: Ditto.
9331 * c-semantics.c: Ditto.
9332 * c-ubsan.c: Ditto.
9333 * stub-objc.c: Ditto.
9334
f5481fc4
JM
93352015-01-08 Jason Merrill <jason@redhat.com>
9336
9337 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9338 do_ubsan_in_current_function.
9339 (ubsan_maybe_instrument_reference_or_call): Likewise.
9340 * c-ubsan.h: Declare it.
9341
de35aa66
MS
93422015-01-08 Mike Stump <mikestump@comcast.net>
9343
9344 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9345
4a9a42ab
MP
93462015-01-07 Marek Polacek <polacek@redhat.com>
9347
9348 PR c/64440
9349 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9350 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9351
2f42e5de
TS
93522015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9353
9354 PR c++/31397
9355 * c.opt (Wsuggest-override): New option.
9356
5624e564
JJ
93572015-01-05 Jakub Jelinek <jakub@redhat.com>
9358
9359 Update copyright years.
9360
5bd012f8
MP
93612015-01-05 Marek Polacek <polacek@redhat.com>
9362
9363 PR c/64423
9364 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9365 parameter. Use it.
9366 * c-common.h (warn_array_subscript_with_type_char): Update
9367 declaration.
9368
a7fa8d18
ESR
93692014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9370
9371 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9372 Control macro with flag_sized_deallocation.
9373
3f8257db 93742014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9375
9376 * c.opt (Wdiscarded-array-qualifiers): New option.
9377
1f8d3e84
JJ
93782014-12-19 Jakub Jelinek <jakub@redhat.com>
9379
9380 PR preprocessor/63831
9381 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9382 and __has_cpp_attribute here.
9383 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9384 c_common_has_attribute.
9385 * c-common.h (c_common_has_attribute): New prototype.
9386 * c-lex.c (init_c_lex): Set cb->has_attribute to
9387 c_common_has_attribute instead of cb_has_attribute.
9388 (get_token_no_padding): New function.
9389 (cb_has_attribute): Renamed to ...
9390 (c_common_has_attribute): ... this. No longer static. Use
9391 get_token_no_padding, require ()s, don't build TREE_LIST
9392 unnecessarily, fix up formatting, adjust diagnostics, call
9393 init_attributes.
9394
20b06add
JM
93952014-12-15 Jason Merrill <jason@redhat.com>
9396
9397 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9398 (-Wsized-deallocation): New.
9399 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9400 to on in C++14 and up.
9401
94a073b2
JM
94022014-12-11 Jason Merrill <jason@redhat.com>
9403
acaa5911
JM
9404 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9405
94a073b2
JM
9406 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9407 we aren't complaining about VLAs.
9408
7fb66c15
MP
94092014-12-06 Marek Polacek <polacek@redhat.com>
9410
9411 PR tree-optimization/64183
9412 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9413 shift-expression if it is integer_type_node. Use types_compatible_p.
9414
b731b390
JJ
94152014-11-29 Jakub Jelinek <jakub@redhat.com>
9416
9417 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9418 last argument from create_tmp_var_raw and create_tmp_var calls.
9419 * cilk.c (gimplify_cilk_spawn): Likewise.
9420 * c-omp.c (c_finish_omp_atomic): Likewise.
9421
6a4da643
MP
94222014-11-28 Marek Polacek <polacek@redhat.com>
9423
9424 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9425 instead of unsigned_type_node.
9426
541e35a6
MP
94272014-11-28 Marek Polacek <polacek@redhat.com>
9428
9429 PR c/63862
9430 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9431 to op1_utype.
9432 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9433 expression to unsigned_type_node.
9434
dcc97066
MW
94352014-11-20 Mark Wielaard <mjw@redhat.com>
9436
9437 PR debug/38757
9438 * c-opts.c (set_std_c89): Set lang_hooks.name.
9439 (set_std_c99): Likewise.
9440 (set_std_c11): Likewise.
9441 (set_std_cxx98): Likewise.
9442 (set_std_cxx11): Likewise.
9443 (set_std_cxx14): Likewise.
9444 (set_std_cxx1z): Likewise.
9445
aa7da51a
JJ
94462014-11-21 Jakub Jelinek <jakub@redhat.com>
9447
9448 PR target/63764
9449 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9450 return type to bool.
009a3480 9451 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9452 (convert_vector_to_pointer_for_subscript): Change return type to
9453 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9454 and copy it into a TARGET_EXPR and use that instead of *vecp
9455 directly.
9456
538dd0b7
DM
94572014-11-19 David Malcolm <dmalcolm@redhat.com>
9458
9459 Merger of git branch "gimple-classes-v2-option-3".
9460 * ChangeLog.gimple-classes: New.
9461 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9462 from being just a vec<gimple> to a vec<gbind *>.
9463
c39a5e99
JJ
94642014-11-18 Jakub Jelinek <jakub@redhat.com>
9465
9466 PR sanitizer/63813
9467 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9468 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9469 get_pointer_alignment for non-pointers. Use ptype, or if it is
9470 reference type, corresponding pointer type, as type of kind
9471 argument.
9472 (ubsan_maybe_instrument_reference,
9473 ubsan_maybe_instrument_member_call): Adjust callers.
9474
8537a4a9
MP
94752014-11-15 Marek Polacek <polacek@redhat.com>
9476
9477 PR middle-end/63884
9478 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9479 for NULL fndecl.
9480 (extract_array_notation_exprs): Return for NULL node.
9481
2079956a
JM
94822014-11-12 Joseph Myers <joseph@codesourcery.com>
9483
9484 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9485 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9486
1304953e
JJ
94872014-11-12 Jakub Jelinek <jakub@redhat.com>
9488
9489 PR c/59708
9490 * c-common.c (check_builtin_function_arguments): Handle
9491 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9492
e5e44252
AK
94932014-11-10 Andi Kleen <ak@linux.intel.com>
9494
9495 PR c/60804
9496 * c-common.h (check_no_cilk): Declare.
9497 * cilk.c (get_error_location): New function.
9498 (check_no_cilk): Dito.
9499
e64b984d
AK
95002014-11-10 Andi Kleen <ak@linux.intel.com>
9501
9502 * cilk.c (recognize_spawn): Use expression location
9503 for error message.
9504
13c21655
PC
95052014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9506
9507 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9508
42fd12b1
ESR
95092014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9510
9511 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9512 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9513 (__cpp_range_based_for, __cpp_initializer_lists,
9514 __cpp_delegating_constructors, __cpp_nsdmi,
9515 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9516 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9517 __has_cpp_attribute.
9518 * c-lex.c (cb_has_attribute): New callback CPP function;
9519 (init_c_lex): Set has_attribute callback.
9520
6f450181
RB
95212014-11-04 Richard Biener <rguenther@suse.de>
9522
9523 * c-common.c (shorten_compare): Do not shorten mixed
9524 DFP and non-DFP compares.
9525
26f0e1d6
ESR
95262014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9527
9528 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9529 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9530 Commentary and rearrangement of tests.
9531 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9532 Commentary and rearrangement of tests.
ab20d992 9533 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9534 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9535
ef4bddc2
RS
95362014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9537
9538 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9539 enum from machine_mode.
9540
c582198b
AM
95412014-10-28 Andrew MacLeod <amacleod@redhat.com>
9542
adfac8df
JJ
9543 * c-common.c: Adjust include files.
9544 * c-gimplify.c: Ditto.
9545 * cilk.c: Ditto.
9546 * c-pragma.c: Ditto.
9547 * c-ubsan.c: Ditto.
c582198b 9548
60393bbc
AM
95492014-10-27 Andrew MacLeod <amacleod@redhat.com>
9550
9551 * c-gimplify.c: Adjust include files.
9552
d723bb7c
MLI
95532014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9554
9555 PR c++/53061
9556 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9557 c_common_initialize_diagnostics.
9558 * c-common.h: Likewise.
9559
90f3520e
MP
95602014-10-24 Marek Polacek <polacek@redhat.com>
9561
9562 PR c/56980
9563 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9564 print "struct"/"union"/"enum" for typedefed names.
9565
59d7607a
MP
95662014-10-23 Marek Polacek <polacek@redhat.com>
9567
9568 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9569 in unsigned type.
9570
d95a2703
JJ
95712014-10-22 Jakub Jelinek <jakub@redhat.com>
9572 Yury Gribov <y.gribov@samsung.com>
9573
9574 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9575 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9576 instead of flag_sanitize_recover as bool flag.
9577
8e6ef852
KY
95782014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9579
9580 * cilk.c: Revert previous change.
9581
948cf550
IZ
95822014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9583
9584 PR c/63307
9585 * cilk.c: Include vec.h.
9586 (struct cilk_decls): New structure.
9587 (wrapper_parm_cb): Split this function to...
9588 (fill_decls_vec): ...this...
9589 (create_parm_list): ...and this.
9590 (compare_decls): New function.
9591 (for_local_cb): Remove.
9592 (wrapper_local_cb): Ditto.
9593 (build_wrapper_type): For now first traverse and fill vector of
9594 declarations then sort it and then deal with sorted vector.
9595 (cilk_outline): Ditto.
9596 (declare_one_free_variable): Ditto.
9597
92574c7c
MP
95982014-10-17 Marek Polacek <polacek@redhat.com>
9599
9600 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9601 * c.opt (Wimplicit-int): Initialize to -1.
9602
83685514
AM
96032014-10-16 Andrew MacLeod <amacleod@redhat.com>
9604
9605 * c-pragma.c: Adjust include files.
9606 * c-semantics.c: Likewise.
9607
5b8300ea
DD
96082014-10-16 DJ Delorie <dj@redhat.com>
9609
9610 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9611 multiples of bytes.
9612
5f83e90b
JM
96132014-10-14 Jason Merrill <jason@redhat.com>
9614
9615 PR c++/63455
9616 * c-common.h (CPP_PREPARSED_EXPR): New.
9617 (N_CP_TTYPES): Adjust.
9618
d73326ca
MP
96192014-10-15 Marek Polacek <polacek@redhat.com>
9620
9621 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9622
78a7c317
DD
96232014-10-14 DJ Delorie <dj@redhat.com>
9624
9625 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9626 types, not just __int128.
9627 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9628 types, not just __int128.
9629 (cpp_atomic_builtins): Round pointer sizes up.
9630 (type_suffix): Use type precision, not specific types.
9631 * c-common.c (c_common_reswords): Remove __int128 special case.
9632 (c_common_type_for_size): Check for all __intN types, not just
9633 __int128.
9634 (c_common_type_for_mode): Likewise.
9635 (c_common_signed_or_unsigned_type): Likewise.
9636 (c_build_bitfield_integer_type): Likewise.
9637 (c_common_nodes_and_builtins): Likewise.
9638 (keyword_begins_type_specifier): Likewise.
9639 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9640 __intN variants.
9641
2a22f99c
TS
96422014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9643
9644 * c-common.c: Use hash_table instead of hashtab.
9645
2a8ef767
ESR
96462014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9647
adfac8df 9648 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9649 C++11 section.
9650
3c9aabbd
MG
96512014-10-03 Marc Glisse <marc.glisse@inria.fr>
9652
9653 PR c++/54427
9654 PR c++/57198
9655 PR c++/58845
9656 * c-common.c (warn_logical_operator): Punt for vectors.
9657
a15f7cb8
ESR
96582014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9659
9660 Implement SD-6: SG10 Feature Test Recommendations
9661 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9662 macros and the __has_header macro.
9663
8d0cf15e
JM
96642014-09-30 Jason Merrill <jason@redhat.com>
9665
dd5d5481
JM
9666 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9667 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9668 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9669
b752325e
JM
9670 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9671 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9672
8d0cf15e
JM
9673 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9674 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9675
083e891e
MP
96762014-09-24 Marek Polacek <polacek@redhat.com>
9677
9678 PR c/61405
9679 PR c/53874
9680 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9681
7861b648
AK
96822014-09-23 Andi Kleen <ak@linux.intel.com>
9683
9684 * c-common.c (handle_no_reorder_attribute): New function.
9685 (c_common_attribute_table): Add no_reorder attribute.
9686
9a79452d
JM
96872014-09-22 Joseph Myers <joseph@codesourcery.com>
9688
9689 * c-cppbuiltin.c (c_cpp_builtins): Define
9690 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9691 modes.
9692
dd69f047
JM
96932014-09-18 Joseph Myers <joseph@codesourcery.com>
9694
9695 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9696 for supported floating-point modes.
9697
737a4826
MLI
96982014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9699
9700 * c.opt (Wpsabi): Use LangEnabledBy.
9701 * c-opts.c (c_common_handle_option): Do not handle here.
9702
8cc4b7a2
JM
97032014-09-12 Joseph Myers <joseph@codesourcery.com>
9704
9705 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9706 macros for floating-point modes.
9707
179b5a55
MG
97082014-09-11 Marc Glisse <marc.glisse@inria.fr>
9709
9710 PR target/58757
9711 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9712 __*_DENORM_MIN__ without denormals.
9713
570a11fe
JJ
97142014-09-10 Jakub Jelinek <jakub@redhat.com>
9715
9716 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9717 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9718 ubsan_create_data callers.
9719 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9720 index is constant or BIT_AND_EXPR with constant mask and is
9721 small enough for the bound.
9722 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9723 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9724
b559c810
MLI
97252014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9726
9727 * c.opt: Add CppReason to various flags.
9728 (Wdate-time): Re-sort.
9729 * c-common.c: Include c-common.h earlier.
9730 (struct reason_option_codes_t): Delete.
9731 (c_option_controlling_cpp_error): Prefix global type and struct
9732 with cpp_.
9733
1ef33fd4
MLI
97342014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9735
9736 * c.opt (Wnormalized): New.
9737 (Wnormalized=): Use Enum and Reject Negative.
9738 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9739
66bb34c0
JM
97402014-09-08 Joseph Myers <joseph@codesourcery.com>
9741
9742 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9743 digits of floating-point modes if -fbuilding-libgcc.
9744
53d68b9f
JM
97452014-09-05 Joseph Myers <joseph@codesourcery.com>
9746
9747 * c-cppbuiltin.c (c_cpp_builtins): Also define
9748 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9749 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9750 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9751 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9752 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9753 __LIBGCC_STACK_GROWS_DOWNWARD__,
9754 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9755 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9756 __LIBGCC_DWARF_FRAME_REGISTERS__,
9757 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9758 __LIBGCC_STACK_POINTER_REGNUM__ and
9759 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9760 (builtin_define_with_value): Handle backslash-escaping in string
9761 macro values.
9762
f65586dc
RB
97632014-09-05 Richard Biener <rguenther@suse.de>
9764
9765 PR middle-end/63148
9766 * c-format.c (check_format_arg): Properly handle
9767 effectively signed POINTER_PLUS_EXPR offset.
9768
2b71f4a4
MLI
97692014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9770
9771 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9772 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9773 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9774 and Init.
9775 * c-opts.c (c_common_handle_option): Do not handle here.
9776 (sanitize_cpp_opts): Likewise.
9777 * c-common.c (struct reason_option_codes_t): Handle
9778 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9779
d2e4feca
MP
97802014-09-03 Marek Polacek <polacek@redhat.com>
9781
9782 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9783
9a771876
JJ
97842014-09-02 Jakub Jelinek <jakub@redhat.com>
9785 Balaji V. Iyer <balaji.v.iyer@intel.com>
9786 Igor Zamyatin <igor.zamyatin@intel.com>
9787
9788 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9789 * c-common.c (c_common_reswords): Added _Cilk_for.
9790 * c-common.h (enum rid): Added RID_CILK_FOR.
9791 (cilk_for_number_of_iterations): Add declaration.
9792 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9793 CILK_FOR.
9794 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9795 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9796
81b5d104
MLI
97972014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9798
9799 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9800 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9801 Wundef): Use CPP, Var and Init.
9802 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9803
b753b37b
MLI
98042014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9805
9806 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9807 * c-opts.c (c_common_handle_option): Do not handle here.
9808
028aee17
JM
98092014-08-25 Jason Merrill <jason@redhat.com>
9810
9811 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9812 -std=c++14 and -std=gnu++14, rather than the reverse.
9813 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9814 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9815 * c-common.h (cxx_dialect): Remove cxx1y.
9816
e4276ba5
ESR
98172014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9818
9819 * c-common.h (enum cxx_dialect): Add cxx14.
9820 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9821 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9822 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9823
a545cacd
JM
98242014-08-22 Jason Merrill <jason@redhat.com>
9825
9826 * c.opt (std=gnu++17): Fix alias.
9827
59ea0364
MP
98282014-08-22 Marek Polacek <polacek@redhat.com>
9829
9830 PR c++/62199
9831 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9832 check for vector types. Drop LHS argument.
9833 * c-common.h (warn_logical_not_parentheses): Adjust.
9834
596e808c
MLI
98352014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9836
9837 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9838 (Wmultichar): Likewise.
9839 (Wdate-time): Use C-family languages instead of Common. Use CPP
9840 and Var.
9841 * c-opts.c (c_common_handle_option): Do not handle the above
9842 options here.
9843 (sanitize_cpp_opts): Likewise.
9844
18767f65
MLI
98452014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9846
9847 PR fortran/44054
9848 * c-opts.c: Include tree-diagnostics.h.
9849 (c_diagnostic_finalizer): New.
9850 (c_common_initialize_diagnostics): Use it.
9851
b4413594
MLI
98522014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9853
9854 PR preprocessor/51303
9855 * c-common.c (struct reason_option_codes_t option_codes):
9856 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9857
43f9a13c
MLI
98582014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9859
9860 PR c/60975
9861 PR c/53063
9862 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9863 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9864 (c_common_post_options): Call init_global_opts_from_cpp.
9865 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9866
04159acf
MP
98672014-08-19 Marek Polacek <polacek@redhat.com>
9868
9869 PR c++/62153
9870 * c-common.c (maybe_warn_bool_compare): New function.
9871 * c-common.h (maybe_warn_bool_compare): Declare.
9872 * c.opt (Wbool-compare): New option.
9873
35aff4fb
MP
98742014-08-19 Marek Polacek <polacek@redhat.com>
9875
9876 * c.opt (Wc99-c11-compat): New option.
9877
177cce46
MP
98782014-08-19 Marek Polacek <polacek@redhat.com>
9879
9880 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9881 to warn_c90_c99_compat.
9882 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9883 to -1.
9884
6ae9194f
MLI
98852014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9886 Steven Bosscher <steven@gcc.gnu.org>
9887
9888 PR c/52952
9889 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9890 format_check_results.
9891 (check_function_format): Use true and add comment for boolean
9892 argument.
9893 (finish_dollar_format_checking): Use explicit location when warning.
9894 (check_format_info): Likewise.
9895 (check_format_arg): Set extra_arg_loc and format_string_loc.
9896 (check_format_info_main): Use explicit location when warning.
9897 (check_format_types): Pass explicit location.
9898 (format_type_warning): Likewise.
9899
8e54f6d3
MLI
99002014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9901
9902 PR fortran/44054
9903 * c-format.c: Handle Fortran flags.
9904
cd4e76fc
IZ
99052014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9906
9907 PR other/61962
9908 * array-notation-common.c (find_rank): Added handling for other
9909 types of references.
9910
f3bede71
MP
99112014-08-10 Marek Polacek <polacek@redhat.com>
9912
9913 PR c/51849
9914 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9915 * c.opt (Wc90-c99-compat): Add option.
9916
9f25a338
TS
99172014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9918
9919 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9920
62e4eb35
MP
99212014-08-03 Marek Polacek <polacek@redhat.com>
9922
ab20d992 9923 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9924 (c_add_case_label): Pass loc to check_case_value.
9925
b787e7a2
TS
99262014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9927
9928 * cilk.c: Use hash_map instead of pointer_map.
9929
6e2830c3
TS
99302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9931
9932 * c-gimplify.c: Use hash_set instead of pointer_set.
9933
a7ee52fb
IZ
99342014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9935
9936 PR middle-end/61455
9937 * array-notation-common.c (extract_array_notation_exprs): Handling
9938 of DECL_EXPR added.
9939
944fa280
JJ
99402014-08-01 Jakub Jelinek <jakub@redhat.com>
9941
9942 * c-common.h (min_align_of_type): Removed prototype.
9943 * c-common.c (min_align_of_type): Removed.
9944 * c-ubsan.h (ubsan_maybe_instrument_reference,
9945 ubsan_maybe_instrument_member_call): New prototypes.
9946 * c-ubsan.c: Include stor-layout.h and builtins.h.
9947 (ubsan_maybe_instrument_reference_or_call,
9948 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9949 functions.
9950
b4dfdc11
MG
99512014-07-31 Marc Glisse <marc.glisse@inria.fr>
9952
9953 PR c++/60517
9954 * c.opt (-Wreturn-local-addr): Move to common.opt.
9955
a41844e5
JM
99562014-07-30 Jason Merrill <jason@redhat.com>
9957
9958 PR c++/61659
9959 PR c++/61687
9960 Revert:
9961 * c.opt (-fuse-all-virtuals): New.
9962
976d5a22
TT
99632014-07-30 Tom Tromey <tromey@redhat.com>
9964
9965 PR c/59855
9966 * c.opt (Wdesignated-init): New option.
9967 * c-common.c (c_common_attribute_table): Add "designated_init".
9968 (handle_designated_init): New function.
9969
cdc94aca
MP
99702014-07-24 Marek Polacek <polacek@redhat.com>
9971
9972 PR c/57653
9973 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9974
f41373b6
DS
99752014-07-16 Dodji Seketeli <dodji@redhat.com>
9976
9977 PR preprocessor/60723 - missing system-ness marks for macro tokens
9978 * c-ppoutput.c (struct print::prev_was_system_token): New data
9979 member.
9980 (init_pp_output): Initialize it.
9981 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9982 (do_line_change): Return a flag saying if a line marker was
9983 emitted or not.
9984 (scan_translation_unit): Detect if the system-ness of the token we
9985 are about to emit is different from the one of the previously
9986 emitted token. If so, emit a line marker. Avoid emitting useless
9987 adjacent line markers. Avoid emitting line markers for tokens
9988 originating from the expansion of built-in macros.
9989 (scan_translation_unit_directives_only): Adjust.
9990
4d661eaa
MP
99912014-07-15 Marek Polacek <polacek@redhat.com>
9992
9993 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9994 TYPE_MAX_VALUE is NULL.
9995
b108f48f
JJ
99962014-07-14 Jakub Jelinek <jakub@redhat.com>
9997
9998 PR middle-end/61294
9999 * c.opt (Wmemset-transposed-args): New warning.
10000
c0221884
JM
100012014-07-10 Jason Merrill <jason@redhat.com>
10002
10003 PR c++/61659
10004 PR c++/61687
10005 * c.opt (-fuse-all-virtuals): New.
10006
63dfbb95
RB
100072014-07-09 Richard Biener <rguenther@suse.de>
10008
10009 PR c-family/61741
10010 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10011 using unsigned arithmetic if overflow does not wrap instead of
10012 if overflow is undefined.
10013
773ec47f
MP
100142014-07-06 Marek Polacek <polacek@redhat.com>
10015
10016 PR c/6940
10017 * c.opt (Wsizeof-array-argument): New option.
10018
00a7ba58
JJ
100192014-07-03 Jakub Jelinek <jakub@redhat.com>
10020
b1726d6c 10021 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10022 comments->count <= 1, as comments->entries might be NULL.
10023
52ec0ea3
MP
100242014-07-01 Marek Polacek <polacek@redhat.com>
10025
10026 * c.opt (Wint-conversion): New option.
10027
d5c3d343
MP
100282014-07-01 Marek Polacek <polacek@redhat.com>
10029
10030 PR c/58286
10031 * c.opt (Wincompatible-pointer-types): New option.
10032
6e7ceb17
PC
100332014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10034
10035 PR c++/51400
10036 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10037 Do not discard TYPE_QUALS of type.
10038
da73100b
JM
100392014-06-26 Jason Merrill <jason@redhat.com>
10040
10041 * c-common.h (enum cxx_dialect): Add cxx1z.
10042 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10043 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10044
08eedf75
TJ
100452014-06-26 Teresa Johnson <tejohnson@google.com>
10046
10047 * c-common.h (get_dump_info): Declare.
10048 * c-gimplify.c (c_genericize): Use saved dump files.
10049 * c-opts.c (c_common_parse_file): Begin and end dumps
10050 once around parsing invocation.
10051 (get_dump_info): New function.
10052
7b56b2f8
MP
100532014-06-23 Marek Polacek <polacek@redhat.com>
10054 Andrew MacLeod <amacleod@redhat.com>
10055
10056 PR c/61553
10057 * c-common.c (get_atomic_generic_size): Don't segfault if the
10058 type doesn't have a size.
10059
0e37a2f3
MP
100602014-06-20 Marek Polacek <polacek@redhat.com>
10061
10062 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10063 (ubsan_walk_array_refs_r): New function.
10064 (c_genericize): Instrument array bounds.
10065 * c-ubsan.c: Include "internal-fn.h".
10066 (ubsan_instrument_division): Mark instrumented arrays as having
10067 side effects. Adjust ubsan_type_descriptor call.
10068 (ubsan_instrument_shift): Likewise.
10069 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10070 (ubsan_instrument_bounds): New function.
10071 (ubsan_array_ref_instrumented_p): New function.
10072 (ubsan_maybe_instrument_array_ref): New function.
10073 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10074 (ubsan_array_ref_instrumented_p): Declare.
10075 (ubsan_maybe_instrument_array_ref): Declare.
10076
100772014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10078
10079 PR lto/61123
10080 * c.opt (fshort-enums): Add to LTO.
10081 * c.opt (fshort-wchar): Likewise.
10082
5c3d09f7
MP
100832014-06-16 Marek Polacek <polacek@redhat.com>
10084
10085 PR c/60439
10086 * c.opt (Wswitch-bool): Add Var.
10087
9cf32741
JJ
100882014-06-12 Jakub Jelinek <jakub@redhat.com>
10089
10090 PR middle-end/61486
10091 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10092 #pragma omp target teams or
10093 #pragma omp {,target }teams distribute simd.
10094
62984918
JM
100952014-06-12 Jason Merrill <jason@redhat.com>
10096
10097 * c.opt (Wabi=, fabi-compat-version): New.
10098 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10099 (c_common_post_options): Handle flag_abi_compat_version default.
10100 Disallow -fabi-compat-version=1.
10101 * c-common.h (abi_version_crosses): New.
10102
f961457f
JH
101032014-06-11 Jan Hubicka <hubicka@ucw.cz>
10104
adfac8df 10105 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10106 section names that are no longer trees.
10107
92d28cbb
JJ
101082014-06-10 Jakub Jelinek <jakub@redhat.com>
10109
10110 PR fortran/60928
10111 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10112 (omp_pragmas): ... back here.
10113
742938c9
MP
101142014-06-05 Marek Polacek <polacek@redhat.com>
10115
10116 PR c/49706
10117 * c-common.c (warn_logical_not_parentheses): New function.
10118 * c-common.h (warn_logical_not_parentheses): Declare.
10119 * c.opt (Wlogical-not-parentheses): New option.
10120
9d548dfb
MP
101212014-06-04 Marek Polacek <polacek@redhat.com>
10122
10123 PR c/30020
10124 * c-common.c (check_case_bounds): Add location parameter.
10125 Use it.
10126 (c_add_case_label): Pass loc to check_case_bounds.
10127
fedfecef
MP
101282014-06-03 Marek Polacek <polacek@redhat.com>
10129
10130 PR c/60439
10131 * c.opt (Wswitch-bool): New option.
10132
f6a7cffc
TS
101332014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10134
040d18b6
TS
10135 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10136 Remove prototypes.
10137 (record_types_used_by_current_var_decl): Move prototype to where
10138 it belongs.
10139
f6a7cffc
TS
10140 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10141 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10142 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10143
632f2871
RS
101442014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10145
10146 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10147 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10148 void_zero_node.
10149 * c-pretty-print.c (pp_c_void_constant): New function.
10150 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10151 (c_pretty_printer::expression): Handle VOID_CST.
10152 * cilk.c (extract_free_variables): Likewise.
10153 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10154 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10155
766090c2
TS
101562014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10157
10158 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10159 * c-pragma.c (push_alignment): Adjust.
10160 (handle_pragma_push_options): Likewise.
10161
661a0813
MP
101622014-05-09 Marek Polacek <polacek@redhat.com>
10163
10164 PR c/50459
10165 * c-common.c (check_user_alignment): Return -1 if alignment is error
10166 node.
10167 (handle_aligned_attribute): Don't call default_conversion on
10168 FUNCTION_DECLs.
10169 (handle_vector_size_attribute): Likewise.
10170 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10171 (handle_sentinel_attribute): Call default_conversion and allow even
10172 integral types as an argument.
10173
2793eeab
MP
101742014-05-08 Marek Polacek <polacek@redhat.com>
10175
10176 PR c/61053
10177 * c-common.c (min_align_of_type): New function factored out from...
10178 (c_sizeof_or_alignof_type): ...here.
10179 * c-common.h (min_align_of_type): Declare.
10180
f827930a
MP
101812014-05-08 Marek Polacek <polacek@redhat.com>
10182
10183 PR c/61077
10184 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10185 parameter type of main.
10186
ca49b74e
DD
101872014-05-07 DJ Delorie <dj@redhat.com>
10188
10189 * c-cppbuiltin.c (print_bits_of_hex): New.
10190 (builtin_define_type_minmax): Print values using hex so as not to
10191 require a pre-computed list of string values.
10192
1d60af08
KZ
101932014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10194 Mike Stump <mikestump@comcast.net>
10195 Richard Sandiford <rdsandiford@googlemail.com>
10196
10197 * c-ada-spec.c: Include wide-int.h.
10198 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10199 (dump_generic_ada_node): Use wide-int interfaces.
10200 * c-common.c: Include wide-int-print.h.
10201 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10202 (pointer_int_sum): Use wide-int interfaces.
10203 (c_common_nodes_and_builtins): Use make_int_cst.
10204 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10205 (handle_alloc_size_attribute): Use wide-int interfaces.
10206 (get_nonnull_operand): Likewise.
10207 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10208 * c-lex.c: Include wide-int.h.
10209 (narrowest_unsigned_type): Take a widest_int rather than two
10210 HOST_WIDE_INTs.
10211 (narrowest_signed_type): Likewise.
10212 (interpret_integer): Update accordingly. Use wide-int interfaces.
10213 (lex_charconst): Use wide-int interfaces.
10214 * c-pretty-print.c: Include wide-int.h.
10215 (pp_c_integer_constant): Use wide-int interfaces.
10216 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10217 INT_CST_LT_UNSIGNED.
10218
b15458be
RB
102192014-05-06 Richard Biener <rguenther@suse.de>
10220
10221 * c-opts.c (c_common_post_options): For -freestanding,
10222 -fno-hosted and -fno-builtin disable pattern recognition
10223 if not enabled explicitely.
10224
6577374e
MP
102252014-05-02 Marek Polacek <polacek@redhat.com>
10226
10227 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10228
d00887e8
MP
102292014-05-01 Marek Polacek <polacek@redhat.com>
10230
10231 PR c/43245
10232 * c.opt (Wdiscarded-qualifiers): Add.
10233
f8ed5150
MP
102342014-04-30 Marek Polacek <polacek@redhat.com>
10235
10236 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10237 INT_MIN / -1 sanitization only for integer types.
10238
45484dcf
MP
102392014-04-25 Marek Polacek <polacek@redhat.com>
10240
10241 PR c/18079
10242 * c-common.c (handle_noinline_attribute): Warn if the attribute
10243 conflicts with always_inline attribute.
10244 (handle_always_inline_attribute): Warn if the attribute conflicts
10245 with noinline attribute.
10246
38e514c0
MP
102472014-04-25 Marek Polacek <polacek@redhat.com>
10248
10249 PR c/60156
10250 * c-common.c (check_main_parameter_types): Warn about variadic main.
10251
44875f92
MS
102522014-04-24 Mike Stump <mikestump@comcast.net>
10253
10254 * c.opt (Wshadow-ivar): Default to on.
10255
dcaaa5a0
DP
102562014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10257
10258 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10259
c07d7c02
MP
102602014-04-23 Marek Polacek <polacek@redhat.com>
10261
10262 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10263
1c33c9b7
JJ
102642014-04-22 Jakub Jelinek <jakub@redhat.com>
10265
10266 PR sanitizer/60275
10267 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10268 if flag_sanitize_undefined_trap_on_error.
10269 (ubsan_instrument_division, ubsan_instrument_shift,
10270 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10271 if !flag_sanitize_recover.
10272
793c625f
MG
102732014-04-22 Marc Glisse <marc.glisse@inria.fr>
10274
10275 PR libstdc++/43622
10276 * c-common.c (registered_builtin_types): Make non-static.
10277 * c-common.h (registered_builtin_types): Declare.
10278
b0f1bf36 102792014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10280 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10281
10282 PR c/60819
10283 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10284 apply may-alias the scalar pointer type when applicable.
10285
3b07fa4a
IZ
102862014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10287
10288 PR middle-end/60467
10289 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10290 as possible argument for Cilk_spawn.
10291
cbbd2b1c
TB
102922014-04-11 Tobias Burnus <burnus@net-b.de>
10293
10294 PR c/60194
10295 * c.opt (Wformat-signedness): Add
10296 * c-format.c(check_format_types): Use it.
10297
6415bd5d
JM
102982014-04-11 Jason Merrill <jason@redhat.com>
10299
10300 PR c++/57926
10301 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10302 default_conversion for an array argument.
10303
6525783a
MP
103042014-04-08 Marek Polacek <polacek@redhat.com>
10305
10306 PR sanitizer/60745
10307 * c-ubsan.c: Include asan.h.
10308 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10309
880a467b
NS
103102014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10311
10312 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10313
7b59ff2d
MP
103142014-04-02 Marek Polacek <polacek@redhat.com>
10315
10316 * c-common.h (c_expand_expr): Remove declaration.
10317
8edbfaa6
JJ
103182014-03-28 Jakub Jelinek <jakub@redhat.com>
10319
10320 PR c++/60689
10321 * c-common.c (add_atomic_size_parameter): When creating new
10322 params vector, push the size argument first.
10323
07d72e1d
JJ
103242014-03-26 Jakub Jelinek <jakub@redhat.com>
10325
10326 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10327 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10328 ubsan_create_data callers.
10329
b35e0fa0
JJ
103302014-03-22 Jakub Jelinek <jakub@redhat.com>
10331
10332 PR debug/60603
10333 * c-opts.c (c_finish_options): Restore cb_file_change call to
10334 <built-in>.
10335
39a1ebb3
JJ
103362014-03-13 Jakub Jelinek <jakub@redhat.com>
10337
10338 PR middle-end/36282
10339 * c-pragma.c (apply_pragma_weak): Only look at
10340 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10341 DECL_ASSEMBLER_NAME_SET_P (decl).
10342 (maybe_apply_pending_pragma_weaks): Exit early if
10343 vec_safe_is_empty (pending_weaks) rather than only when
10344 !pending_weaks.
10345 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10346 set assembler name back to NULL afterwards.
10347
a07f6ed2
JM
103482014-03-11 Jason Merrill <jason@redhat.com>
10349
10350 * c.opt: Add -std=gnu++14.
10351
75b107f5
IB
103522014-03-11 Ian Bolton <ian.bolton@arm.com>
10353
10354 * c-opts.c (c_common_post_options): Don't override
10355 -ffp-contract=fast if unsafe-math-optimizations is on.
10356
f42c637e
PM
103572014-03-08 Paulo Matos <paulo@matos-sorge.com>
10358
22b15758 10359 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10360
70e24808
JM
103612014-03-07 Jason Merrill <jason@redhat.com>
10362
10363 * c.opt: Add -std=c++14.
10364
3af9c5e9
MP
103652014-03-06 Marek Polacek <polacek@redhat.com>
10366
10367 PR c/60197
10368 * cilk.c (contains_cilk_spawn_stmt): New function.
10369 (contains_cilk_spawn_stmt_walker): Likewise.
10370 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10371 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10372
b3bdf019
JJ
103732014-03-03 Jakub Jelinek <jakub@redhat.com>
10374
10375 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10376 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10377 even when flag_preprocess_only.
10378
ca7e759d
JM
103792014-02-26 Jason Merrill <jason@redhat.com>
10380
10381 PR c++/59231
10382 PR c++/11586
10383 * c-common.c (shorten_compare): Don't check
10384 c_inhibit_evaluation_warnings.
10385
28e41874
JJ
103862014-02-19 Jakub Jelinek <jakub@redhat.com>
10387
cca615af
JJ
10388 PR c/37743
10389 * c-common.c (c_common_nodes_and_builtins): When initializing
10390 c_uint{16,32,64}_type_node, also set corresponding
10391 uint{16,32,64}_type_node to the same value.
10392
28e41874
JJ
10393 PR c++/60267
10394 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10395 for PRAGMA_IVDEP if flag_preprocess_only.
10396
c2bf53a1
JJ
103972014-02-12 Jakub Jelinek <jakub@redhat.com>
10398
10399 PR c/60101
10400 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10401 if false, add ADD itself, rather than vice versa.
10402 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10403 copy. For SAVE_EXPR, only call merge_tlist once.
10404
8fcbce72
JJ
104052014-02-08 Jakub Jelinek <jakub@redhat.com>
10406
10407 PR middle-end/60092
10408 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10409 and tree_to_uhwi.
10410 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10411 functions.
10412 (c_common_attribute_table): Add alloc_align and assume_aligned
10413 attributes.
10414
0a756a3f
MP
104152014-02-06 Marek Polacek <polacek@redhat.com>
10416
10417 PR c/60087
10418 * c-common.c (warn_for_sign_compare): Call warning_at with location
10419 instead of warning.
10420
7ec4847a
MP
104212014-02-05 Marek Polacek <polacek@redhat.com>
10422
10423 PR c/53123
10424 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10425 statement.
10426
66f20604
MP
104272014-02-04 Marek Polacek <polacek@redhat.com>
10428
10429 PR c/60036
10430 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10431 SAVE_EXPR.
10432
5d77fb19
MG
104332014-02-03 Marc Glisse <marc.glisse@inria.fr>
10434
10435 PR c++/53017
10436 PR c++/59211
10437 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10438 handle_vector_size_attribute, handle_nonnull_attribute): Call
10439 default_conversion on the attribute argument.
10440 (handle_nonnull_attribute): Increment the argument number.
10441
81e5eca8
MP
104422014-01-31 Marek Polacek <polacek@redhat.com>
10443
10444 PR c/59963
10445 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10446 build_function_call_vec.
10447 (resolve_overloaded_builtin): Likewise.
10448 * c-common.h (build_function_call_vec): Adjust declaration.
10449
68fca595
MP
104502014-01-30 Marek Polacek <polacek@redhat.com>
10451
10452 PR c/59940
10453 * c-common.h (unsafe_conversion_p): Adjust declaration.
10454 (warnings_for_convert_and_check): Likewise.
10455 (convert_and_check): Likewise.
10456 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10457 expansion_point_location_if_in_system_header on it.
10458 (warnings_for_convert_and_check): Add location parameter. Call
10459 expansion_point_location_if_in_system_header on it. Use it.
10460 (convert_and_check): Add location parameter. Use it.
10461 (conversion_warning): Likewise.
10462 (c_add_case_label): Adjust convert_and_check calls.
10463 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10464
b72271b9
BI
104652014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10466
10467 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10468 flag_cilkplus.
10469 * c-pragma.c (init_pragma): Likewise.
10470 * c.opt: Likewise.
10471
393e8e8b
MP
104722014-01-23 Marek Polacek <polacek@redhat.com>
10473
10474 PR c/59846
10475 * c-common.c (shorten_compare): Add location_t parameter.
10476 * c-common.h (shorten_binary_op): Adjust declaration.
10477
f04dda30
MP
104782014-01-23 Marek Polacek <polacek@redhat.com>
10479
10480 PR c/58346
10481 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10482 * c-common.h: Declare it.
10483
621955cb
EB
104842014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10485
10486 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10487 * c-ada-spec.c (dump_ads): Likewise.
10488 (cpp_check): Likewise.
10489 (dump_ada_specs): Likewise.
10490
104912014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10492
10493 PR c++/49718
10494 * c-common.c (handle_no_instrument_function_attribute): Allow
10495 no_instrument_function attribute in class member
10496 definition/declaration.
10497
241f845a
JJ
104982014-01-15 Jakub Jelinek <jakub@redhat.com>
10499
10500 PR c/58943
10501 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10502 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10503 being COMPOUND_EXPR.
10504 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10505 operand a SAVE_EXPR and second MODIFY_EXPR.
10506
e83b8e2e
JJ
105072014-01-09 Jakub Jelinek <jakub@redhat.com>
10508
10509 PR target/58115
10510 * c-pch.c (c_common_write_pch): Call
10511 prepare_target_option_nodes_for_pch.
10512
23a5b65a
RS
105132014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10514
10515 Update copyright years
10516
f9030485
RS
105172014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10518
10519 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10520 the copyright notice.
10521
f2aa696b
EB
105222013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10523
10524 * c-ada-spec.c (print_constructor): New function.
10525 (print_destructor): Retrieve the origin of the destructor.
10526 (print_ada_declaration): Revamp handling of constructors/destructors.
10527
3f8257db 105282013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10529 Bill Maddox <maddox@google.com>
10530 Jason Merrill <jason@redhat.com>
10531
10532 * c.opt: Add -fdeclone-ctor-dtor.
10533 * c-opts.c (c_common_post_options): Default to on iff -Os.
10534
41958c28
BI
105352013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10536
10537 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10538 attribute.
10539 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10540 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10541 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10542 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10543 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10544 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10545 PRAGMA_CILK_CLAUSE_UNIFORM.
10546
b1726d6c 10547
12893402
BI
105482013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10549
10550 * cilk.c (cilk_outline): Made this function non-static.
10551 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10552 (create_cilk_wrapper): Added a new parameter: a function pointer.
10553 (c_install_body_w_frame_cleanup): Remove
10554 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10555 * c-common.h (cilk_outline): New prototype.
10556 (gimplify_cilk_spawn): Removed two parameters.
10557 (cilk_install_body_with_frame_cleanup): New prototype.
10558 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10559 CILK_SPAWN_STMT case.
10560
085b42ed
BS
105612013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10562
2ce064c3
BS
10563 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10564
085b42ed
BS
10565 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10566 (int_array_type_node): Remove.
10567 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10568
9e36c9ed
MP
105692013-12-05 Marek Polacek <polacek@redhat.com>
10570
10571 PR c/52023
10572 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10573 [ADJUST_FIELD_ALIGN].
10574
296674db
JM
105752013-12-04 Joseph Myers <joseph@codesourcery.com>
10576
10577 PR c/52023
10578 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10579 and check field alignment if set.
10580 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10581 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10582
b1726d6c 105832013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10584 Marek Polacek <polacek@redhat.com>
10585
10586 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10587 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10588
d7947e19
L
105892013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10590
10591 PR c/59309
10592 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10593 arguments.
10594
fad7652e
JJ
105952013-11-29 Jakub Jelinek <jakub@redhat.com>
10596
10597 PR c/59280
10598 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10599 goto invalid. If it is error_mark_node, don't issue further
10600 diagnostics.
10601
8b5e1202
SO
106022013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10603
10604 * c.opt (Wopenmp-simd): New.
10605
0a508bb6
JJ
106062013-11-22 Jakub Jelinek <jakub@redhat.com>
10607
10608 * c-ubsan.h (ubsan_instrument_return): New prototype.
10609 * c-ubsan.c (ubsan_instrument_return): New function.
10610
2fb9a547
AM
106112013-11-22 Andrew MacLeod <amacleod@redhat.com>
10612
10613 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10614 * c-gimplify.c: Likewise.
10615 * cilk.c: Likewise.
2fb9a547 10616
8400e75e
DM
106172013-11-22 David Malcolm <dmalcolm@redhat.com>
10618
10619 * c-common.c (unsafe_conversion_p): Remove use of
10620 EXPR_LOC_OR_HERE macro.
10621 (conversion_warning): Likewise.
10622 (warnings_for_convert_and_check): Likewise.
10623 (warn_for_collisions_1): Likewise.
10624 (shorten_compare): Likewise, and remove use of in_system_header
10625 macro, using the location from the former.
10626 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10627 (cb_def_pragma): Remove use of in_system_header macro.
10628 (lex_string): Likewise.
10629 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10630
eb1ce453
KZ
106312013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10632 Mike Stump <mikestump@comcast.net>
10633 Richard Sandiford <rdsandiford@googlemail.com>
10634
10635 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10636 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10637 tree_fits_shwi_p or tree_fits_uhwi_p.
10638 (dump_generic_ada_node): Likewise.
10639 * c-format.c (check_format_arg): Likewise.
10640 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10641
6b3b8c27
KZ
106422013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10643
10644 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10645
49b0aa18
JC
106462013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10647
10648 PR c/53001
10649 * c-common.c (unsafe_conversion_p): Make this function
10650 return an enumeration with more detail.
10651 (conversion_warning): Use the new return type of
10652 unsafe_conversion_p to separately warn either about conversions
10653 that lower floating point number precision or about the other
10654 kinds of conversions.
10655 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10656 (unsafe_conversion_p): switching return type to
10657 conversion_safety enumeration.
49b0aa18
JC
10658 * c.opt: Adding new warning -Wfloat-conversion and
10659 enabling it with -Wconversion.
10660
b826515a
BS
106612013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10662
8e745a17
JJ
10663 * c-opts.c: Include plugin.h.
10664 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10665
b9a55b13
MP
106662013-11-19 Marek Polacek <polacek@redhat.com>
10667
10668 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10669 call.
10670 (ubsan_instrument_shift): Likewise.
10671 (ubsan_instrument_vla): Likewise.
10672
7d362f6c
RS
106732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10674
10675 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10676 cast to unsigned type.
10677
386b1f1f
RS
106782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10679
10680 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10681 tree_low_cst.
10682 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10683 rather than tree_low_cst.
10684
ae7e9ddd
RS
106852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10686
10687 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10688 tree_to_uhwi throughout.
10689
9439e9a1
RS
106902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10691
10692 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10693 tree_low_cst (..., 0) with tree_to_shwi throughout.
10694
cc269bb6
RS
106952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10696
10697 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10698 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10699
9541ffee
RS
107002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10701
10702 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10703 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10704
c02065fc
AH
107052013-11-15 Aldy Hernandez <aldyh@redhat.com>
10706
10707 * c-cilkplus.c: New file.
10708 * c-common.c (readonly_error): Add location argument.
10709 * c-common.h (readonly_error): Same.
10710 (c_finish_cilk_clauses): Protoize.
10711 (c_check_cilk_loop): Same.
10712 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10713 Do not fail on error_mark_node.
10714 Abstract increment canonicalization to here...
10715 (c_omp_for_incr_canonicalize_ptr): New.
10716 c-pragma.c (init_pragma): Register "simd" pragma.
10717 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10718 (enum pragma_cilk_clause): New.
10719
9cc65f15
RS
107202013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10721
10722 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10723 wchar_type and host_integerp checks.
10724
18f429e2
AM
107252013-11-14 Andrew MacLeod <amacleod@redhat.com>
10726
10727 * c-common.c: Likewise.
10728 * c-gimplify.c: Likewise.
10729 * cilk.c: Likewise.
10730
d8a2d370
DN
107312013-11-14 Diego Novillo <dnovillo@google.com>
10732
10733 * c-common.c: Include fold-const.h.
10734 Include stor-layout.h.
10735 Include calls.h.
10736 Include stringpool.h.
10737 Include attribs.h.
10738 Include varasm.h.
10739 Include trans-mem.h.
10740 * c-cppbuiltin.c: Include stor-layout.h.
10741 Include stringpool.h.
10742 * c-format.c: Include stringpool.h.
10743 * c-lex.c: Include stringpool.h.
10744 Include stor-layout.h.
10745 * c-pragma.c: Include stringpool.h.
10746 Include attribs.h.
10747 Include varasm.h.
10748 Include gcc-symtab.h.
10749 * c-pretty-print.c: Include stor-layout.h.
10750 Include attribs.h.
10751 * cilk.c: Include stringpool.h.
10752 Include calls.h.
10753
38b7bc7f
JM
107542013-11-13 Joseph Myers <joseph@codesourcery.com>
10755
10756 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10757 * c-common.c (c_common_reswords): Add __auto_type.
10758 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10759
45b0be94
AM
107602013-11-12 Andrew MacLeod <amacleod@redhat.com>
10761
18f429e2
AM
10762 * c-common.c: Include gimplify.h.
10763 * c-gimplify.c: Likewise.
10764 * cilk.c: Likewise.
10765 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10766 * c-ubsan.c: Don't include gimple.h.
45b0be94 10767
582d9b50
JM
107682013-11-12 Joseph Myers <joseph@codesourcery.com>
10769
10770 * c-common.c (c_common_reswords): Add _Thread_local.
10771
6b28e197
JM
107722013-11-09 Joseph Myers <joseph@codesourcery.com>
10773
10774 * c-common.c (atomic_size_supported_p): New function.
10775 (resolve_overloaded_atomic_exchange)
10776 (resolve_overloaded_atomic_compare_exchange)
10777 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10778 Use it instead of comparing size with a local list of sizes.
10779
267bac10
JM
107802013-11-07 Andrew MacLeod <amacleod@redhat.com>
10781 Joseph Myers <joseph@codesourcery.com>
10782
10783 * c-common.h (enum rid): Add RID_ATOMIC.
10784 * c-common.c (c_common_reswords): Add _Atomic.
10785 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10786 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10787 * c-format.c (check_format_types): Check for extra _Atomic
10788 qualifiers in format argument.
10789 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10790 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10791
5157b91e
TB
107922013-11-06 Tobias Burnus <burnus@net-b.de>
10793
10794 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10795
6dbe0958
JM
107962013-11-06 Joseph Myers <joseph@codesourcery.com>
10797
10798 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10799 standards modes.
10800 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10801 to mean lack of IEEE 754 support.
10802
e8ff5196
TB
108032013-11-05 Tobias Burnus <burnus@net-b.de>
10804
10805 * c.opt (-Wdate-time): New option
10806 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10807
254a0760
JM
108082013-11-05 Joseph Myers <joseph@codesourcery.com>
10809
10810 * c-cppbuiltin.c (cpp_iec_559_value): Test
10811 flag_excess_precision_cmdline not flag_excess_precision.
10812
6d7f7e0a
TB
108132013-11-05 Tobias Burnus <burnus@net-b.de>
10814
10815 * c.opt (fopenmp-simd): New option.
10816 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10817 (omp_pragmas): ... this new struct.
10818 (c_pp_lookup_pragma): Also walk omp_pragmas.
10819 (init_pragma): Init pragmas for -fopenmp-simd.
10820
55a7f02f
MP
108212013-11-04 Marek Polacek <polacek@redhat.com>
10822
10823 PR c++/58979
10824 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10825
9193fb05
JM
108262013-11-04 Joseph Myers <joseph@codesourcery.com>
10827
10828 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10829 New functions.
10830 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10831
94159ecf
EB
108322013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10833
10834 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10835 (dump_ada_specs): Adjust prototype of second callback.
10836 * c-ada-spec.c (cpp_check): New global variable.
10837 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10838 (print_generic_ada_decl): Likewise.
10839 (has_static_fields): Change return type to bool and add guard.
10840 (has_nontrivial_methods): New predicate.
10841 (is_tagged_type): Change return type to bool.
10842 (separate_class_package): Call has_nontrivial_methods.
10843 (pp_ada_tree_identifier): Minor tweaks.
10844 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10845 (dump_ada_array_domains): Likewise.
10846 (dump_ada_array_type): Likewise.
10847 (dump_template_types): Remove cpp_check parameter and do not pass it to
10848 dump_generic_ada_node.
10849 (dump_ada_template): Likewise.
10850 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10851 recursively.
10852 (print_ada_methods): Change return type to integer. Remove cpp_check
10853 parameter and do not pass it down.
10854 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10855 dump_generic_ada_node.
10856 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10857 accessing methods.
10858 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10859 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10860 value of print_ada_methods.
10861 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10862 Set cpp_check to it before invoking dump_ada_nodes.
10863 (dump_ada_specs): Likewise.
10864
b906f4ca
MP
108652013-11-03 Marek Polacek <polacek@redhat.com>
10866
10867 * c-ubsan.c: Don't include hash-table.h.
10868 (ubsan_instrument_vla): New function.
10869 * c-ubsan.h: Declare it.
10870
5e20cdc9
DM
108712013-10-31 David Malcolm <dmalcolm@redhat.com>
10872
10873 Automated part of renaming of symtab_node_base to symtab_node.
10874
10875 Patch autogenerated by rename_symtab.py from
10876 https://github.com/davidmalcolm/gcc-refactoring-scripts
10877 revision 58bb219cc090b2f4516a9297d868c245495ee622
10878
10879 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10880 symtab_node_base to symtab_node.
10881
7057e645
ESR
108822013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10883
8e745a17 10884 Implement C++14 digit separators.
7057e645
ESR
10885 * c-lex.c (interpret_float): Remove digit separators from scratch string
10886 before building real literal.
10887
193ea7bc
JJ
108882013-10-30 Jakub Jelinek <jakub@redhat.com>
10889
10890 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10891
939b37da
BI
108922013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10893
10894 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10895 fields.
10896 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10897 enabled.
10898 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10899 (insert_cilk_frame): New prototype.
10900 (cilk_init_builtins): Likewise.
10901 (gimplify_cilk_spawn): Likewise.
10902 (c_cilk_install_body_w_frame_cleanup): Likewise.
10903 (cilk_detect_spawn_and_unwrap): Likewise.
10904 (cilk_set_spawn_marker): Likewise.
10905 (build_cilk_sync): Likewise.
10906 (build_cilk_spawn): Likewise.
10907 * cilk.c: New file.
10908
67348ccc
DM
109092013-10-29 David Malcolm <dmalcolm@redhat.com>
10910
10911 Patch autogenerated by refactor_symtab.py from
10912 https://github.com/davidmalcolm/gcc-refactoring-scripts
10913 revision 58bb219cc090b2f4516a9297d868c245495ee622
10914
10915 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10916 to a true class hierarchy.
10917 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10918
d570872d
RS
109192013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10920
10921 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10922
98906124
JL
109232013-10-26 Jeff Law <law@redhat.com>
10924
adfac8df
JJ
10925 * c-common.c (c_define_builtins): Remove mudflap support.
10926 * c.opt: Ignore and warn for mudflap options.
98906124 10927
d73749df 109282013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10929
10930 PR other/33426
10931 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10932 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10933
3f04b1bb
JM
109342013-10-23 Jason Merrill <jason@redhat.com>
10935
10936 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10937
acf0174b
JJ
109382013-10-11 Jakub Jelinek <jakub@redhat.com>
10939
acd15a28
JJ
10940 * c-common.h (omp_clause_mask::operator !=): New method.
10941 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10942 instead of if (mask & something) tests everywhere.
10943
acf0174b
JJ
10944 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10945 201307 instead of 201107.
10946 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10947 (c_common_attribute_table): Add "omp declare target" and
10948 "omp declare simd" attributes.
10949 (handle_omp_declare_target_attribute,
10950 handle_omp_declare_simd_attribute): New functions.
10951 * c-omp.c: Include c-pragma.h.
10952 (c_finish_omp_taskgroup): New function.
10953 (c_finish_omp_atomic): Add swapped argument, if true,
10954 build the operation first with rhs, lhs arguments and use NOP_EXPR
10955 build_modify_expr.
10956 (c_finish_omp_for): Add code argument, pass it down to make_code.
10957 (c_omp_split_clauses): New function.
10958 (c_split_parallel_clauses): Removed.
10959 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10960 c_omp_declare_simd_clauses_to_decls): New functions.
10961 * c-common.h (omp_clause_mask): New type.
10962 (OMP_CLAUSE_MASK_1): Define.
10963 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10964 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10965 omp_clause_mask::operator |, omp_clause_mask::operator &,
10966 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10967 omp_clause_mask::operator ==): New methods.
10968 (enum c_omp_clause_split): New.
10969 (c_finish_omp_taskgroup): New prototype.
10970 (c_finish_omp_atomic): Add swapped argument.
10971 (c_finish_omp_for): Add code argument.
10972 (c_omp_split_clauses): New prototype.
10973 (c_split_parallel_clauses): Removed.
10974 (c_omp_declare_simd_clauses_to_numbers,
10975 c_omp_declare_simd_clauses_to_decls): New prototypes.
10976 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10977 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10978 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10979 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10980 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10981 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10982 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10983 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10984 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10985 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10986 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10987 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10988 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10989 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10990 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10991 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10992 PRAGMA_OMP_CLAUSE_UNIFORM.
10993
826cacfe
MG
109942013-10-09 Marc Glisse <marc.glisse@inria.fr>
10995
10996 PR tree-optimization/20318
10997 * c-common.c (handle_returns_nonnull_attribute): New function.
10998 (c_common_attribute_table): Add returns_nonnull.
10999
2284b034
MG
110002013-10-03 Marc Glisse <marc.glisse@inria.fr>
11001
11002 PR c++/19476
11003 * c.opt (fcheck-new): Move to common.opt.
11004
b56e9788
MP
110052013-09-25 Marek Polacek <polacek@redhat.com>
11006 Jakub Jelinek <jakub@redhat.com>
11007
11008 PR sanitizer/58413
11009 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11010 an expression if we can prove it is correct.
11011 (ubsan_instrument_division): Likewise. Remove unnecessary
11012 check.
11013
ce6923c5
MP
110142013-09-18 Marek Polacek <polacek@redhat.com>
11015
11016 PR sanitizer/58411
11017 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11018 Declare it.
11019 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11020
fb5610fb
IS
110212013-09-14 Iain Sandoe <iain@codesourcery.com>
11022
11023 PR target/48094
11024 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11025 fobjc-gc, freplace-objc-classes): Accept for LTO.
11026
88b0e79e
JC
110272013-09-13 Jacek Caban <jacek@codeweavers.com>
11028
11029 * c-target.def: New hook
11030
c9b0866a
PC
110312013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11032
11033 PR c++/43452
11034 * c.opt (Wdelete-incomplete): Add.
11035
0af94e6f
JR
110362013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11037
11038 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11039 (vector_types_compatible_elements_p): New function.
11040 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11041 declaration.
11042 (vector_types_compatible_elements_p): Declare.
11043
7c26172c
GDR
110442013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11045
11046 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11047 a virtual member function.
11048 (pp_simple_type_specifier): Remove.
11049 (pp_c_type_specifier): Likewise.
11050 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11051 Rename from pp_c_type_specifier. Adjust.
11052 (c_pretty_printer::c_pretty_printer): Do not assign to
11053 simple_type_specifier.
11054
20059c8b
GDR
110552013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11056
11057 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11058 member function.
11059 (c_pretty_printer::storage_class_specifier): Likewise.
11060 (c_pretty_printer::initializer): Likewise.
11061 (pp_declaration): Remove.
11062 (pp_declaration_specifiers): Likewise.
11063 (pp_abstract_declarator): Likewise.
11064 (pp_declarator): Likewise.
11065 (pp_type_id): Likewise.
11066 (pp_statement): Likewise.
11067 (pp_constant): Likewise.
11068 (pp_id_expression): Likewise.
11069 (pp_primary_expression): Likewise.
11070 (pp_unary_expression): Likewise.
11071 (pp_multiplicative_expression): Likewise.
11072 (pp_conditional_expression): Likewise.
11073 (pp_assignment_expression): Likewise.
11074 (pp_expression): Likewise.
11075 (pp_c_type_id): Likewise.
11076 (pp_c_storage_class_specifier): Likewise.
11077 * c-pretty-print.c (pp_c_type_cast): Tidy.
11078 (pp_c_pointer): Likewise.
11079 (pp_c_type_specifier): Likewise.
11080 (pp_c_parameter_type_list): Likewise.
11081 (pp_c_function_definition): Likewise.
11082 (pp_c_init_declarator): Likewise.
11083 (pp_c_initializer_list): Likewise.
11084 (pp_c_constructor_elts): Likewise.
11085 (c_pretty_printer::direct_abstract_declarator): Likewise.
11086 (c_pretty_printer::declaration_specifiers): Likewise.
11087 (c_pretty_printer::primary_expression): Likewise.
11088 (c_pretty_printer::postfix_expression): Likewise.
11089 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11090 (c_pretty_printer::storage_class_specifier): Rename from
11091 pp_c_storage_class_specifier.
11092 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11093 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11094 storage_class_specifier, initializer, offset_list, flags.
11095
de5a5fa1
MP
110962013-08-30 Marek Polacek <polacek@redhat.com>
11097
11098 * c-ubsan.c: New file.
11099 * c-ubsan.h: New file.
11100
8f0e4d72
GDR
111012013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11102
11103 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11104 member function.
11105 (c_pretty_printer::declaration_specifiers): Likewise.
11106 (c_pretty_printer::declarator): Likewise.
11107 (c_pretty_printer::abstract_declarator): Likewise.
11108 (c_pretty_printer::direct_abstract_declarator): Likewise.
11109 (c_pretty_printer::direct_declarator): Likewise.
11110 (c_pretty_printer::function_specifier): Likewise.
11111 (pp_declaration): Adjust.
11112 (pp_declaration_specifiers): Likewise.
11113 (pp_abstract_declarator): Likewise.
11114 (pp_direct_declarator): Likewise.
11115 (pp_function_specifier): Likewise.
11116 (pp_direct_abstract_declarator): Remove as unused.
11117 (pp_c_declaration): Remove.
11118 (pp_c_declaration_specifiers): Likewise.
11119 (pp_c_declarator): Likewise.
11120 (pp_c_direct_declarator): Likewise.
11121 (pp_c_function_specifier): Likewise.
11122 (pp_c_direct_abstract_declarator): Likewise.
11123 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11124 from pp_c_abstract_declarator. Adjust.
ab20d992 11125 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11126 pp_c_direct_abstract_declarator. Adjust.
11127 (c_pretty_printer::function_specifier): Rename from
11128 pp_c_function_specifier. Adjust.
11129 (c_pretty_printer::declaration_specifiers): Rename from
11130 pp_c_declaration_specifiers. Adjust.
11131 (c_pretty_printer::direct_declarator): Rename from
11132 pp_c_direct_declarator. Adjust.
11133 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11134 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11135 (c_pretty_printer::c_pretty_printer): Do not assign to
11136 declaration, declaration_specifiers, declarator,
11137 direct_declarator, direct_abstract_declarator, function_specifier.
11138
00d34d3a
GDR
111392013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11140
11141 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11142 virtual member function.
11143 (c_pretty_printer::multiplicative_expression): Likewise.
11144 (c_pretty_printer::conditional_expression): Likewise.
11145 (c_pretty_printer::assignment_expression): Likewise.
11146 (c_pretty_printer::expression): Likewise.
11147 (pp_unary_expression): Adjust.
11148 (pp_multiplicative_expression): Likewise.
11149 (pp_assignment_expression): Likewise.
11150 (pp_conditional_expression): Likewise.
11151 (pp_expression): Likewise.
11152 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11153 from pp_c_unary_expression. Adjust.
11154 (c_pretty_printer::multiplicative_expression): Rename from
11155 pp_c_multiplicative_expression. Adjust.
11156 (c_pretty_printer::conditional_expression): Rename from
11157 pp_c_conditional_expression. Adjust.
11158 (c_pretty_printer::assignment_expression): Rename from
11159 pp_c_assignment_expression. Adjust.
11160 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11161 (c_pretty_printer::c_pretty_printer): Do not assign to
11162 unary_expression, multiplicative_expression,
11163 conditional_expression, expression.
11164
fb22178f
GDR
111652013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11166
11167 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11168 virtual member function.
11169 (pp_postfix_expression): Adjust.
11170 (pp_c_postfix_expression): Remove.
11171 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11172 from pp_c_postfix_expression. Adjust.
11173 (c_pretty_printer::c_pretty_printer): Do not assign to
11174 postfix_expression.
11175
7ecc2600
GDR
111762013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11177
11178 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11179 virtua member function.
11180 (pp_primary_expression): Adjust.
11181 (pp_c_primary_expression): Remove.
11182 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11183 from pp_c_primary_expression. Adjust.
11184 (pp_c_initializer_list): Use pp_primary_expression.
11185 (c_pretty_printer::c_pretty_printer): Do not assign to
11186 primary_expression.
11187
0691175f
GDR
111882013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11189
11190 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11191 * c-pretty-print.c (M_): Remove.
11192 (c_pretty_printer::translate_string): Define.
11193 (pp_c_type_specifier): Use it.
11194 (pp_c_primary_expression): Likewise.
11195 (pp_c_expression): Likewise.
11196
66dfe4c4
GDR
111972013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11198
11199 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11200 virtual function.
11201 (pp_c_id_expression): Remove.
11202 (pp_id_expression): Adjust.
11203 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11204 pp_c_id_expression. Adjust.
11205 (pp_c_postfix_expression): Use pp_id_expression.
11206 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11207
ca43e9d5
GDR
112082013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11209
11210 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11211 member function.
11212 (pp_constant): Adjust.
11213 (pp_c_constant): Remove.
11214 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11215 pp_c_constant. Adjust.
11216 (pp_c_constant)
11217 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11218 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11219
da6ca2b5
GDR
112202013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11221
11222 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11223 (c_pretty_printer::c_pretty_printer): Declare.
11224 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11225 c_pretty_printer_init. Adjust.
11226 (print_c_tree): Do not call c_pretty_printer_init.
11227 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11228
65a372f4
AC
112292013-08-09 Arnaud Charlet <charlet@adacore.com>
11230
11231 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11232
fd9b0f32
PC
112332013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11234
11235 PR c++/58080
11236 * c-common.c (pointer_int_sum): Add bool parameter.
11237 * c-common.h (pointer_int_sum): Adjust declaration.
11238
e0aec1e9
GDR
112392013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11240
11241 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11242 c_pretty_printer variable.
11243
b066401f
GDR
112442013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11245
11246 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11247 (pp_base): Remove.
11248 (pp_c_base): Likewise. Adjust users.
11249 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11250 (pp_c_whitespace): Do not call pp_base.
11251 (pp_c_left_paren): Likewise.
11252 (pp_c_right_paren): Likewise.
11253 (pp_c_left_brace): Likewise.
11254 (pp_c_right_brace): Likewise.
11255 (pp_c_left_bracket): Likewise.
11256 (pp_c_right_bracket): Likewise.
11257 (pp_c_dot): Likewise.
11258 (pp_c_ampersand): Likewise.
11259 (pp_c_star): Likewise.
11260 (pp_c_arrow): Likewise.
11261 (pp_c_semicolon): Likewise.
11262 (pp_c_complement): Likewise.
11263 (pp_c_exclamation): Likewise.
11264 (pp_c_direct_declarator): Likewise.
11265 (pp_c_ws_string): Likewise.
11266 (pp_c_identifier): Likewise.
11267 (pp_c_statement): Likewise.
11268 (print_c_tree): Likewise.
11269
65e5a578
ESR
112702013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11271
11272 PR c++/58072
11273 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11274 provide useful error strings.
11275
137a1a27
GDR
112762013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11277
11278 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11279 printer functions instead of pp_string or operators and punctuators.
11280 (dump_generic_ada_node): Likewise.
11281 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11282 (pp_c_relational_expression): Likewise.
11283 (pp_c_logical_or_expression): Likewise.
11284
07838b13
GDR
112852013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11286
11287 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11288 functions instead of pp_character.
11289 (pp_ada_tree_identifier): Likewise.
11290 (dump_ada_double_name): Likewise.
11291 (dump_ada_function_declaration): Likewise.
11292 (dump_ada_array_domains): Likewise.
11293 (dump_template_types): Likewise.
11294 (dump_generic_ada_node): Likewise.
11295 (print_ada_declaration): Likewise.
11296 (print_ada_struct_decl): Likewise.
11297 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11298
433cc7b0
TT
112992013-07-23 Tom Tromey <tromey@redhat.com>
11300
11301 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11302 * c-common.c (c_common_reswords): Add _Generic.
11303
688010ba
OB
113042013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11305
11306 * c-common.c: Fix typos.
11307 * c-common.h: Likewise.
11308
2a99e5e6
LL
113092013-07-13 Lubos Lunak <l.lunak@suse.cz>
11310
11311 PR c++/55203
11312 * c-common.c (c_common_attribute_table): Add warn_unused.
11313 (handle_warn_unused_attribute): New.
11314
c26302d5
JJ
113152013-07-10 Jakub Jelinek <jakub@redhat.com>
11316
11317 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11318 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11319
dfeadaa0
PC
113202013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11321
11322 PR c++/57869
11323 * c.opt: Add Wconditionally-supported.
11324
6a2fa4b2
GS
113252013-07-08 Graham Stott <graham.stott@btinternet.com>
11326
adfac8df 11327 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11328 unused variables l_length and l_node.
11329
ecdbd01a 113302013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11331
11332 PR c/57821
11333 * c-common.c (complete_array_type): Delay folding first index
11334 like other indices. When folding, check for index overflow.
11335
bedc293e
MG
113362013-06-27 Marc Glisse <marc.glisse@inria.fr>
11337
11338 PR c++/57509
11339 * c-common.h (c_build_vec_perm_expr): New complain argument.
11340 * c-common.c (c_build_vec_perm_expr): Likewise.
11341 Use save_expr also in C++.
11342
604b2bfc
GDR
113432013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11344
11345 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11346 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11347 * c-opts.c (c_common_post_options): Likewise.
11348
dfeadaa0 113492013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11350
11351 * array-notation-common.c (length_mismatch_in_expr): Changed the
11352 parameter type's from a dynamic array to a vec_tree. Also removed
11353 the size parameters.
11354 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11355 the change above.
11356
2ce86d2e
BI
113572013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11358
11359 * c-common.h (struct cilkplus_an_parts): New structure.
11360 (struct cilkplus_an_loop_parts): Likewise.
11361 (cilkplus_extract_an_triplets): New prototype.
11362 (fix_sec_implicit_args): Likewise.
11363 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11364 (fix_sec_implicit_args): Likewise.
604b2bfc 11365
07a6825b
BI
113662013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11367
11368 * array-notation-common.c (find_inv_trees): Removed an unwanted
11369 typecasting.
11370 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11371 enum rid to enum tree_code.
11372
08346abd
JH
113732013-06-11 Jan Hubicka <jh@suse.cz>
11374
11375 * c-common.c (handle_alias_ifunc_attribute): Do not set
11376 DECL_EXTERNAL for weakref variables.
11377 * c-pragma.c (handle_pragma_weak): Make sure aliases
11378 are not declared as external.
11379
d60f1706
BI
113802013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11381
11382 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11383 function from c/c-array-notation.c.
11384 (is_cilkplus_reduce_builtin): Likewise.
11385 (find_rank): Likewise.
11386 (extract_array_notation_exprs): Likewise.
11387 (replace_array_notations): Likewise.
11388 (find_inv_trees): Likewise.
11389 (replace_inv_trees): Likewise.
11390 (contains_array_notation_expr): Likewise.
11391 (find_correct_array_notation_type): Likewise.
11392 * c-common.h (struct inv_list): Moved this struct from the file
11393 c/c-array-notation.c and added a new field called additional tcodes.
11394 (length_mismatch_in_expr_p): New prototype.
11395 (is_cilkplus_reduce_builtin): Likewise.
11396 (find_rank): Likewise.
11397 (extract_array_notation_exprs): Likewise.
11398 (replace_array_notation): Likewise.
11399 (find_inv_trees): Likewise.
11400 (replace_inv_trees): Likewise.
11401 (find_correct_array_notation_type): Likewise.
dfeadaa0 11402
36536d79
BI
114032013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11404
11405 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11406 function array_notation_init_builtins is called.
11407 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11408 * c-common.def (ARRAY_NOTATION_REF): New tree.
11409 * c-common.h (build_array_notation_expr): New function declaration.
11410 (build_array_notation_ref): Likewise.
11411 (extract_sec_implicit_index_arg): New extern declaration.
11412 (is_sec_implicit_index_fn): Likewise.
11413 (ARRAY_NOTATION_CHECK): New define.
11414 (ARRAY_NOTATION_ARRAY): Likewise.
11415 (ARRAY_NOTATION_START): Likewise.
11416 (ARRAY_NOTATION_LENGTH): Likewise.
11417 (ARRAY_NOTATION_STRIDE): Likewise.
11418 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11419 ARRAY_NOTATION_REF.
11420 (pp_c_expression): Likewise.
11421 * c.opt (flag_enable_cilkplus): New flag.
11422 * array-notation-common.c: New file.
11423
f7716d57
JJ
114242013-05-14 Jakub Jelinek <jakub@redhat.com>
11425
11426 PR c++/57274
11427 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11428
a5e0cd1d
MG
114292013-05-10 Marc Glisse <marc.glisse@inria.fr>
11430
11431 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11432 vectors.
11433
f6bc1c4a
HS
114342013-05-07 Han Shen <shenhan@google.com>
11435
11436 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11437
3f12f6e9
SKS
114382013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11439
11440 * c-common.c (check_user_alignment): Emit error for negative values.
11441
61949153
PC
114422013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11443
11444 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11445
e93e18e9
PC
114462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11447
11448 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11449 __GXX_EXPERIMENTAL_CXX1Y__.
11450
44d90fe1 114512013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11452 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11453
11454 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11455 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11456 to simply use OPT_Wpointer_arith.
11457 (c_sizeof_or_alignof_type): Likewise.
11458
13f39b2e
PC
114592013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11460
11461 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11462
4b84d650
JJ
114632013-04-12 Jakub Jelinek <jakub@redhat.com>
11464
11465 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11466 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11467 specifiers.
11468
fb037b5d
SB
114692013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11470
11471 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11472
4e856798
PC
114732013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11474
11475 * c-common.c (pointer_int_sum): Remove dead code.
11476
4b1baac8
RS
114772013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11478
11479 PR middle-end/56524
11480 * c-common.c (handle_optimize_attribute): Don't call
11481 save_optabs_if_changed.
11482
0b50e654
JJ
114832013-03-05 Jakub Jelinek <jakub@redhat.com>
11484
11485 PR middle-end/56461
11486 * c-pch.c (pch_init): Free target_validity at the end.
11487
48c41403
JJ
114882013-03-04 Jakub Jelinek <jakub@redhat.com>
11489
11490 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11491
e664c61c
KS
114922013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11493 Jakub Jelinek <jakub@redhat.com>
11494
11495 PR sanitizer/56454
11496 * c-common.c (handle_no_sanitize_address_attribute): New function.
11497 (c_common_attribute_table): Add no_sanitize_address attribute.
11498 (handle_no_address_safety_analysis_attribute): Add
11499 no_sanitize_address attribute, not no_address_safety_analysis
11500 attribute.
11501
a475fd3d 115022013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11503
11504 PR target/52555
11505 * c-common.c (handle_optimize_attribute): Call
11506 save_optabs_if_changed.
11507
f6007d99
JJ
115082013-02-18 Jakub Jelinek <jakub@redhat.com>
11509 Steven Bosscher <steven@gcc.gnu.org>
11510
11511 PR pch/54117
11512 * c-opts.c (c_common_post_options): If debug info is enabled
11513 and non-dwarf*, refuse to load PCH files and when writing PCH
11514 file warn.
11515
cf35e2b1
JJ
115162013-02-05 Jakub Jelinek <jakub@redhat.com>
11517
11518 PR middle-end/56167
11519 * c-common.c (handle_error_attribute): Fix condition.
11520
32887460
JJ
115212013-01-30 Jakub Jelinek <jakub@redhat.com>
11522
11523 PR c++/55742
11524 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11525
5af057d8
JM
115262013-01-18 Jason Merrill <jason@redhat.com>
11527
11528 PR target/54908
11529 * c.opt (-fextern-tls-init): New.
11530 * c-opts.c (c_common_post_options): Handle it.
11531
cc83c823
JJ
115322013-01-09 Jakub Jelinek <jakub@redhat.com>
11533
11534 PR c/48418
11535 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11536 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11537 and is either negative or bigger or equal to type precision
11538 of the first operand.
11539
a859517f
MP
115402012-12-03 Marek Polacek <polacek@redhat.com>
11541
11542 PR c/55570
11543 * c-common.c (check_user_alignment): Swap order of tests,
11544 check TREE_CODE first.
11545
2d7aa578
ESR
115462012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11547
11548 PR c++/52654
11549 * c-common.h (overflow_type): New enum.
11550 (build_userdef_literal): Add overflow_type argument.
11551 (tree_userdef_literal): Add overflow_type.
11552 (USERDEF_LITERAL_OVERFLOW): New access macro.
11553 * c-common.c (build_userdef_literal): Add overflow_type
11554 argument.
11555 * c-lex.c (c_lex_with_flags): Add overflow_type to
11556 build_userdef_literal calls.
11557 (interpret_integer, interpret_float): Add overflow_type argument.
11558
cc3c4f62
RB
115592012-11-28 Richard Biener <rguenther@suse.de>
11560
11561 PR c/35634
11562 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11563 here and use a type with proper overflow behavior for types that would
11564 need to be promoted for the arithmetic.
11565
77bc5132
JJ
115662012-11-23 Jakub Jelinek <jakub@redhat.com>
11567
11568 PR sanitizer/55435
11569 * c-common.c (handle_no_address_safety_analysis_attribute): New
11570 function.
11571 (c_common_attribute_table): Add no_address_safety_analysis.
11572
5dc99c46
SB
115732012-11-16 Simon Baldwin <simonb@google.com>
11574
11575 * c.opt: Add f[no-]canonical-system-headers.
11576 * c-opts.c (c_common_handle_option): Handle
11577 OPT_fcanonical_system_headers.
11578
a4a0016d
ESR
115792012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11580
11581 PR c++/54413
11582 * c-opts.c (c_common_handle_option): Set new flags.
11583 * c.opt: Describe new flags.
11584
7dbb85a7
JM
115852012-11-09 Jason Merrill <jason@redhat.com>
11586
11587 * c.opt (Wabi-tag): New.
11588
ad7bac31
AK
115892012-11-09 Andi Kleen <ak@linux.intel.com>
11590
11591 PR 55139
11592 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11593 MEMMODEL_MASK
ad7bac31 11594
7332899a
MLI
115952012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11596
11597 PR c/53063
11598 * c.opt (Wformat): Make it Alias Wformat=1.
11599 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11600 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11601 LangEnabledBy.
11602 (Wformat=): RejectNegative. Use LangEnabledBy.
11603 (Wnonnull): Use LangEnabledBy.
11604 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11605 * c-format.c (set_Wformat): Delete.
11606 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11607 (maybe_read_dollar_number): Likewise.
11608 (avoid_dollar_number): Likewise.
11609 (finish_dollar_format_checking): Likewise.
11610 (check_format_info): Likewise.
11611 (check_format_info_main): Likewise.
11612 (check_format_types): Likewise.
11613 (format_type_warning): Likewise.
11614 * c-common.c (int): Likewise.
11615 (check_function_sentinel): Likewise.
8e745a17 11616 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11617
34a180a6
MLI
116182012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11619
11620 PR c/53063
11621 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11622 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11623 Use LangEnabledBy.
11624 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11625 common.opt.
11626 (Wvariadic-macros): Init(1).
11627 * c-opts.c (c_common_handle_option): Do not handle them
11628 explicitly.
11629 (c_common_post_options): Likewise.
11630 (sanitize_cpp_opts): warn_unused_macros is now
11631 cpp_warn_unused_macros.
11632 (push_command_line_include): Likewise.
11633 * c-common.c (warn_unknown_pragmas): Do not define.
11634 * c-common.h (warn_unknown_pragmas): Do not declare.
11635
3f46d6a5
MLI
116362012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11637
11638 PR c/51294
11639 * c-common.c (conversion_warning): Handle conditional expressions.
11640
880661a4
JW
116412012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11642
11643 PR c++/54930
11644 * c.opt (Wreturn_local_addr): Define new option.
11645
4514a96b
JM
116462012-10-25 Jason Merrill <jason@redhat.com>
11647
f14edc1a
JM
11648 * c.opt (Wvirtual-move-assign): New.
11649
4514a96b
JM
11650 * c.opt (Winherited-variadic-ctor): New.
11651
93100c6b
MG
116522012-10-25 Marc Glisse <marc.glisse@inria.fr>
11653
11654 PR c++/54427
11655 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11656
1efcb8c6
JM
116572012-10-23 Joseph Myers <joseph@codesourcery.com>
11658
11659 * c-common.h (pch_cpp_save_state): Declare.
11660 * c-target.def (c_preinclude): New hook.
11661 * c-opts.c (done_preinclude): New.
11662 (push_command_line_include): Handle default preincluded header.
11663 (cb_file_change): Call pch_cpp_save_state when calling
11664 push_command_line_include.
11665 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11666 (pch_cpp_save_state): New.
11667 (pch_init): Call pch_cpp_save_state conditionally, instead of
11668 calling cpp_save_state.
11669
4a0ae68e
MLI
116702012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11671
11672 PR c/53063
11673 PR c/40989
11674 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11675 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11676 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11677 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11678 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11679 * c-opts.c (c_common_handle_option): Remove explicit handling from
11680 here.
11681 (c_common_post_options): Likewise.
11682
67e4210b
EB
116832012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11684
11685 * c-ada-spec.c (LOCATION_COL): Delete.
11686 (compare_location): New function.
11687 (compare_node): Use it.
11688 (compare_comment): Likewise.
11689
65d4f2cd
MLI
116902012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11691
11692 PR c/53063
11693 PR c/40989
11694 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11695 * c-opts.c (c_common_handle_option): Do not set them here. Add
11696 comment.
11697 (c_common_post_options): Likewise.
11698
909881cb
EB
116992012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11700
11701 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11702 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11703 Remove POINTER_TYPE handling, add large unsigned handling and use
11704 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11705
3a785c97
JJ
117062012-10-12 Jakub Jelinek <jakub@redhat.com>
11707
11708 PR c/54381
11709 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11710 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11711 locs and array of 3 trees instead of just single loc and single
11712 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11713 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11714 For *cmp* builtins that take two sources strings report warnings
11715 about first and second source, not about destination and source.
11716
5e54f81d
MG
117172012-10-12 Marc Glisse <marc.glisse@inria.fr>
11718
11719 PR c++/53055
11720 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11721
f5b02f1e
EB
117222012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11723
11724 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11725 declaring something coming from another file.
11726
b46dbc6c
AC
117272012-10-10 Arnaud Charlet <charlet@adacore.com>
11728
f5b02f1e 11729 PR ada/54845
b46dbc6c
AC
11730 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11731
5d9de0d0
PC
117322012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11733
11734 PR c++/54194
11735 * c-common.c (warn_about_parentheses): Add location_t parameter;
11736 use EXPR_LOC_OR_LOC.
11737 * c-common.h: Update declaration.
11738
a212e43f
MG
117392012-10-09 Marc Glisse <marc.glisse@inria.fr>
11740
11741 PR c++/54427
11742 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11743 more operations. Make error messages optional.
11744 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11745 (scalar_to_vector): Declare.
11746
b1db7f91
JM
117472012-10-08 Jason Merrill <jason@redhat.com>
11748
11749 * c-common.c (c_common_reswords): Add thread_local.
11750
e28d52cf
DS
117512012-10-08 Dodji Seketeli <dodji@redhat.com>
11752
11753 PR c++/53528 C++11 attribute support
11754 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11755 new functions.
11756 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11757 static function.
11758 (handle_aligned_attribute): In choose strictest alignment
11759 among many. Use new check_cxx_fundamental_alignment_constraints.
11760 (handle_transparent_union_attribute): In c++11 attribute syntax,
11761 don't look through typedefs.
11762
3b78de56
AC
117632012-10-04 Arnaud Charlet <charlet@adacore.com>
11764
11765 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11766 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11767 out of dumpfile.h.
11768
6040bb5f
DC
117692012-09-25 Dehao Chen <dehao@google.com>
11770
11771 PR middle-end/54645
3b78de56 11772 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11773 map when read in the pch.
11774
3f8257db 117752012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11776
11777 * c-ada-spec.c: Style fixes.
11778
3f8257db 117792012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11780
11781 * c.opt (-fada-spec-parent): Define new command line switch.
11782 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11783 is specified, generate binding spec as a child of the specified unit.
11784
0ccb505d
PC
117852012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11786 Manuel López-Ibáñez <manu@gcc.gnu.org>
11787
11788 PR c++/53210
11789 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11790
c583af79
AC
117912012-08-23 Arnaud Charlet <charlet@adacore.com>
11792
11793 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11794 for pointers, and add missing Convention C pragma.
11795 (print_ada_struct_decl): Add missing aliased keyword.
11796 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11797
1a4049e7
JJ
117982012-08-17 Jakub Jelinek <jakub@redhat.com>
11799
11800 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11801 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11802 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11803 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11804 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11805
70b5e7dc
RG
118062012-08-10 Richard Guenther <rguenther@suse.de>
11807
11808 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11809
f8923f7e
SB
118102012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11811
11812 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11813 instead of separate pp_newline and pp_flush.
11814 (print_c_tree): Likewise.
11815
e45abe1f
RH
118162012-07-26 Richard Henderson <rth@redhat.com>
11817
11818 * c-common.c (handle_hot_attribute): Allow labels.
11819 (handle_cold_attribute): Likewise.
11820
332f1d24
JJ
118212012-07-20 Jakub Jelinek <jakub@redhat.com>
11822
11823 PR c++/28656
11824 * c-common.c (check_function_nonnull): Handle multiple nonnull
11825 attributes properly.
11826
7ee2468b
SB
118272012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11828
11829 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11830 * c-ada-spec.c: Likewise.
11831 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11832
ee7b28eb
SB
118332012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11834
11835 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11836 Remove code conditional on it.
11837
6bdf3519
SB
118382012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11839
11840 * c-gimplify.c: Do not include basic-block.h.
11841 * c-common.c: Do not include linfuncs.h.
11842
532aafad
SB
118432012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11844
11845 * c-common.h: Include tree.h.
11846
8d0d1915
JM
118472012-07-02 Jason Merrill <jason@redhat.com>
11848
11849 PR c++/53524
11850 * c-common.c (get_priority): Call default_conversion.
11851
fbc873ad
UB
118522012-07-01 Uros Bizjak <ubizjak@gmail.com>
11853
11854 * c-pch.c (c_common_write_pch): Remove unused variables.
11855
d4a10d0a
SB
118562012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11857
11858 * cppspec.c: Moved from gcc/ to here.
11859
6f3a2e23
KT
118602012-06-27 Kai Tietz <ktietz@redhat.com>
11861
11862 PR preprocessor/37215
11863 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11864
8ca92d04
SB
118652012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11866
11867 * c-common.h (c_common_print_pch_checksum): Remove.
11868 * c-pch.c: Do not include output.h.
11869 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11870 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11871 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11872 (struct c_pch_header): Remove.
11873 (get_ident): Update gpch version.
11874 (pch_init): Do not print executable_checksum to asm_out_file.
11875 Do not fail if there is no asm_out_file to read back from. Set
11876 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11877 (c_common_write_pch): Verify that nothing was written to asm_out_file
11878 since pch_init was called. Do not write a c_pch_header, and do not
11879 copy from asm_out_file to the PCH.
11880 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11881 the content of asm_out_file from the PCH.
11882 (c_common_print_pch_checksum): Remove.
11883 * c-opts.c (c_common_init): Print out executable_checksum directly.
11884
70f42967
SB
118852012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11886
11887 * c-target.def (objc_declare_unresolved_class_reference,
11888 objc_declare_class_definition): Add new hooks.
11889
a8781821
SB
118902012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11891
11892 * c-lex.c: Do not include output.h.
11893 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11894 Remove uses of ASM_OUTPUT_IDENT.
11895
9e1a8dd1
RR
118962012-06-15 Marc Glisse <marc.glisse@inria.fr>
11897
11898 PR c++/51033
11899 * c-common.h (c_build_vec_perm_expr): Move decl here.
11900 * c-common.c (c_build_vec_perm_expr): Move definition
11901 here.
11902
6f07a821
SB
119032012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11904
11905 * c.opt (fconserve-space): Turn into a no-op.
11906
9faeb493 119072012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11908
11909 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11910 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11911 both the start and end of the function.
11912
a4b7d13c
SB
119132012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11914
11915 * c-common.c: Do not include output.h.
11916 * c-pragma.c: Likewise.
11917
c265f413
SA
119182012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11919
11920 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11921 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11922 (lang_decl_name): Handle namespace decls.
11923
be7a421e
SB
119242012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11925
11926 * c-ada-spec.c: Do not include output.h.
11927 * c-semantics.c: Likewise.
11928
65de6659
JM
119292012-05-29 Joseph Myers <joseph@codesourcery.com>
11930
11931 * c-common.c: Fix typo.
11932
ca5f4331
MM
119332012-05-29 Michael Matz <matz@suse.de>
11934
11935 * c-common.h (c_expand_decl): Remove prototype.
11936
4f7f7aca
MLI
119372012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11938
11939 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11940 * c-opts.c (c_common_handle_option): Remove code handling
11941 warn_missing_braces.
11942
4a792f9b
PC
119432012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11944
11945 PR c++/25137
11946 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11947 -Wmissing_braces.
11948
650dc14a
DS
119492012-05-22 Dodji Seketeli <dodji@redhat.com>
11950
11951 PR c++/53322
11952 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11953
9b095bf1
MLI
119542012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11955
11956 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11957 * c-opts.c (c_common_handle_option): Do not handle explicitly
11958 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11959
0b2c4be5
DS
119602012-05-16 Dodji Seketeli <dodji@redhat.com>
11961
11962 PR preprocessor/7263
ab20d992 11963 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11964 to cpp_classify_number. For diagnostics, use the precise location
11965 instead of the global input_location.
11966
a1bde5af
PC
119672012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11968
d02924ef 11969 PR c++/11856
a1bde5af
PC
11970 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11971
d1ede5f4
BS
119722012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11973
a1bde5af 11974 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11975
f2bc201f
MLI
119762012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11977
11978 PR 53063
11979 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11980 Wreorder): Use LangEnabledBy.
11981 * c-opts.c (c_common_handle_option): Do not enable them
11982 explicitly. Call lang-specific generated functions.
11983 (c_common_post_options): Do not set them here.
11984
95744782
MLI
119852012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11986
11987 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11988 Wmissing-field-initializers,Wmissing-parameter-type,
11989 Wold-style-declaration,Woverride-init): Use EnabledBy.
11990 * c-opts.c (c_common_post_options): Do not set here explicitly.
11991
7d5a5747
MLI
119922012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11993
11994 PR 53063
11995 * c-opts.c (c_common_handle_option): Use handle_generated_option
11996 to enable sub-options.
11997
5a3c9cf2
PC
119982012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11999
12000 PR c++/53158
12001 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12002
3ac8781c
RG
120032012-05-10 Richard Guenther <rguenther@suse.de>
12004
12005 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12006 adjust commentary about TYPE_IS_SIZETYPE types.
12007
1e537948
MLI
120082012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12009
12010 PR c++/53261
12011 * c-common.c (warn_logical_operator): Check that argument of
12012 integer_zerop is not NULL.
12013
f2c4a785
MLI
120142012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12015
12016 PR c/43772
12017 * c-common.c (warn_logical_operator): Do not warn if either side
12018 is already true or false.
12019
50f305ca
MLI
120202012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12021
12022 PR c/51712
12023 * c-common.c (expr_original_type): New.
12024 (shorten_compare): Do not warn for enumeration types.
12025
0c3641b0
MLI
120262012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12027
12028 * c.opt (fpermissive): Add Var(flag_permissive).
12029
7edaa4d2
MG
120302012-04-30 Marc Glisse <marc.glisse@inria.fr>
12031
12032 PR c++/51033
12033 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12034 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12035
b9c8da34
DS
120362012-04-30 Dodji Seketeli <dodji@redhat.com>
12037
12038 Add -Wvarargs option
ab20d992 12039 * c.opt (Wvarargs): Define new option.
b9c8da34 12040
e6c69da0
MLI
120412012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12042
12043 * c-common.c (check_function_arguments): Replace
12044 Wmissing-format-attribute with Wsuggest-attribute=format.
12045
90137d8f
MLI
120462012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12047
12048 * c.opt (Wsuggest-attribute=format): New. Alias of
12049 Wmissing-format-attribute.
12050 * c-format.c (decode_format_type): Replace
12051 Wmissing-format-attribute with Wsuggest-attribute=format.
12052 (check_function_format): Likewise.
12053
9faeb493 120542012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12055
12056 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12057 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12058 * c.opt: Add Wliteral-suffix.
12059
c1771a20
MLI
120602012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12061
12062 PR c/44774
12063 * c.opt (Wpedantic): New.
12064 (pedantic): Alias Wpedantic.
12065 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12066 (c_common_post_options): Likewise.
12067 (sanitize_cpp_opts): Likewise.
12068 * c-lex.c (interpret_float): Likewise.
12069 * c-format.c (check_format_types): Likewise.
12070 * c-common.c (pointer_int_sum): Likewise.
12071 (c_sizeof_or_alignof_type): Likewise.
12072 (c_add_case_label): Likewise.
12073 (c_do_switch_warnings): Likewise.
12074 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12075
04b391c1
JM
120762012-04-15 Jason Merrill <jason@redhat.com>
12077
12078 PR c++/52818
12079 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12080 (C_STD_NAME): Distinguish between C++98 and C++11.
12081
ac868f29
EB
120822012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12083
12084 PR target/52624
12085 * c-common.h (uint16_type_node): Rename into...
12086 (c_uint16_type_node): ...this.
12087 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12088 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12089
fd4116f4
MLI
120902012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12091
12092 * c-common.c (warn_if_unused_value): Move definition to here.
12093 * c-common.h (warn_if_unused_value): Move declaration to here.
12094
573ac65e
WB
120952012-03-23 William Bader <williambader@hotmail.com>
12096
12097 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12098
552b8185
JM
120992012-03-20 Jason Merrill <jason@redhat.com>
12100
12101 * c-common.h (enum cxx_dialect): Add cxx1y.
12102 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12103 test.
12104 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12105 * c-opts.c (c_common_post_options): Likewise.
12106 (set_std_cxx1y): New.
12107 (c_common_handle_option): Call it.
12108 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12109
04398fa8
PC
121102012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12111
12112 PR c++/14710
12113 * c.opt ([Wuseless-cast]): Add.
12114
d2a12ae7
RG
121152012-03-16 Richard Guenther <rguenther@suse.de>
12116
12117 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12118
a12bf402
MLI
121192012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12120
12121 PR c++/44783
12122 * c.opt (ftemplate-backtrace-limit) Add.
12123
5c30094f
RO
121242012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12125
12126 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12127 handling.
12128 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12129 (init_pragma): Don't register extern_prefix.
12130
21fa2faf
RG
121312012-03-12 Richard Guenther <rguenther@suse.de>
12132
12133 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12134 (builtin_type_for_size): Likewise.
12135
e3793c6f
JJ
121362012-02-13 Jakub Jelinek <jakub@redhat.com>
12137
12138 PR c++/52215
12139 * c-common.c (sync_resolve_params): Don't decide whether to convert
12140 or not based on TYPE_SIZE comparison, convert whenever arg_type
12141 is unsigned INTEGER_TYPE.
12142
93286335
PC
121432012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12144
12145 PR c/52118
12146 * c.opt ([Wunused-local-typedefs]): Fix description.
12147
7a421706
MS
121482012-01-24 Mike Stump <mikestump@comcast.net>
12149
12150 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12151 exactly.
12152
ba9b1f11
RG
121532012-01-18 Richard Guenther <rguenther@suse.de>
12154
12155 * c-opts.c (c_common_post_options): Reset LTO flags if
12156 we are about to generate a PCH.
12157
465406be
PC
121582012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12159
12160 PR c++/51777
12161 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12162 use pp_unsigned_wide_integer.
12163
aee15221
RG
121642012-01-10 Richard Guenther <rguenther@suse.de>
12165
12166 PR middle-end/51806
12167 * c-opts.c (c_common_handle_option): Move -Werror handling
12168 to language independent code.
12169
5720c0dc
RG
121702012-01-05 Richard Guenther <rguenther@suse.de>
12171
12172 PR middle-end/51764
12173 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12174 from common.opt.
12175
73ac190a
PC
121762011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12177
12178 PR c++/51316
12179 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12180 of array types with an unknown bound.
12181
48b0b196
JM
121822011-12-20 Joseph Myers <joseph@codesourcery.com>
12183
12184 * c-common.c (flag_isoc99): Update comment to refer to C11.
12185 (flag_isoc1x): Change to flag_isoc11.
12186 * c-common.h (flag_isoc99): Update comment to refer to C11.
12187 (flag_isoc1x): Change to flag_isoc11.
12188 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12189 C11.
12190 * c-opts.c (set_std_c1x): Change to set_std_c11.
12191 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12192 Call set_std_c11.
12193 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12194 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12195 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12196 standard.
12197 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12198 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12199 (std=gnu1x): Make alias of std=gnu11.
12200
d58d6eb5
JM
122012011-12-19 Jason Merrill <jason@redhat.com>
12202
12203 PR c++/51228
12204 * c-common.c (handle_transparent_union_attribute): Check the first
12205 field if the type is complete.
12206
b3908fcc
JW
122072011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12208
12209 PR libstdc++/51365
12210 * c-common.c (RID_IS_FINAL): Add.
12211 * c-common.h (RID_IS_FINAL): Add.
12212
fea3ca91
IS
122132011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12214
12215 * c.opt (fgnu-runtime): Provide full description.
12216 (fnext-runtime): Likewise.
12217 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12218
62bad7cd
AM
122192011-11-28 Andrew MacLeod <amacleod@redhat.com>
12220
12221 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12222 predefines in one place. Add LOCK_FREE predefines.
12223 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12224 new func.
12225
c466c4ff
AM
122262011-11-24 Andrew MacLeod <amacleod@redhat.com>
12227
12228 PR c/51256
9faeb493 12229 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12230 conditions
9faeb493
UB
12231 (resolve_overloaded_atomic_exchange,
12232 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12233 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12234 error_mark_node for error conditions.
9faeb493 12235
a5952633
RG
122362011-11-08 Richard Guenther <rguenther@suse.de>
12237
12238 PR middle-end/51010
ab20d992 12239 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12240
0a35513e
AH
122412011-11-07 Richard Henderson <rth@redhat.com>
12242 Aldy Hernandez <aldyh@redhat.com>
12243 Torvald Riegel <triegel@redhat.com>
12244
12245 Merged from transactional-memory.
12246
12247 * c-common.c (handle_tm_wrap_attribute,
12248 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12249 (struct c_common_reswords): Added __transaction* keywords.
12250 (struct c_common_attribute_table): Added transaction* and tm_regparm
12251 attributes.
12252 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12253 masks.
12254 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12255 find_tm_attribute): Declare.
12256
6d87092d
JM
122572011-11-07 Jason Merrill <jason@redhat.com>
12258
12259 PR c++/35688
12260 * c-common.c, c-common.h: Revert yesterday's changes.
12261
8e7860a1
JM
122622011-11-06 Jason Merrill <jason@redhat.com>
12263
12264 PR c++/35688
12265 * c-common.c (decl_has_visibility_attr): Split out from...
12266 (c_determine_visibility): ...here.
12267 * c-common.h: Declare it.
12268
d19fa6b5
JM
122692011-11-06 Joseph Myers <joseph@codesourcery.com>
12270
12271 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12272 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12273 type.
12274 (check_user_alignment): New. Split out of
12275 handle_aligned_attribute. Disallow integer constants with
12276 noninteger types. Conditionally allow zero.
12277 (handle_aligned_attribute): Use check_user_alignment.
12278 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12279
86951993
AM
122802011-11-06 Andrew MacLeod <amacleod@redhat.com>
12281 Richard Henderson <rth@redhat.com>
12282
12283 Merged from cxx-mem-model.
12284
12285 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12286 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12287 parameters that are the same type size.
12288 (get_atomic_generic_size): New. Find size of generic
12289 atomic function parameters and do typechecking.
12290 (add_atomic_size_parameter): New. Insert size into parameter list.
12291 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12292 either __atomic_exchange_n or external library call.
9faeb493 12293 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12294 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12295 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12296 __atomic_load_n or an external library call.
12297 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12298 __atomic_store_n or an external library call.
12299 (resolve_overloaded_builtin): Handle new __atomic builtins.
12300
cf9e9959
EB
123012011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12302
12303 PR c++/50608
12304 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12305 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12306 <INDIRECT_REF>: Return the argument.
12307 <ARRAY_REF>: Remove special code for negative offset.
12308 Call fold_build_pointer_plus instead of size_binop.
12309 (fold_offsetof): Remove STOP_REF argument and adjust.
12310 * c-common.h (fold_offsetof_1): Declare.
12311 (fold_offsetof): Remove STOP_REF argument.
12312
25339f10
JM
123132011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12314
12315 PR c++/50810
12316 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12317 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12318 Wnarrowing for C++0x and C++98.
12319 * c.opt ([Wnarrowing]): Update.
12320
89401152
PC
123212011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12322
12323 PR c++/44277
12324 * c.opt: Add Wzero-as-null-pointer-constant.
12325
97e3ad20
JM
123262011-10-31 Jason Merrill <jason@redhat.com>
12327
15694fdd
JM
12328 * c.opt (-fdeduce-init-list): Off by default.
12329
97e3ad20
JM
12330 PR c++/50920
12331 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12332 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12333 and -Wc++11-compat.
12334 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12335
fb9120e3
RAV
123362011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12337
12338 PR c++/30066
12339 * c.opt (fvisibility-inlines-hidden): Description change.
12340
3ce4f9e4
ESR
123412011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12342
12343 Implement C++11 user-defined literals.
12344 * c-common.c (build_userdef_literal): New.
12345 * c-common.def: New tree code.
12346 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12347 * c-lex.c (interpret_float): Add suffix parm.
12348 (c_lex_with_flags): Build literal tokens.
12349
5f53c243
PC
123502011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12351
12352 PR c++/50841
12353 Revert:
12354 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12355
12356 PR c++/50810
12357 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12358 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12359 Wnarrowing for C++0x and C++98.
12360 * c.opt ([Wnarrowing]): Update.
12361
263734e1
PC
123622011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12363
12364 PR c++/50810
12365 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12366 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12367 Wnarrowing for C++0x and C++98.
12368 * c.opt ([Wnarrowing]): Update.
12369
d2e312d7
PC
123702011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12371
12372 PR c++/45385
12373 * c-common.c (conversion_warning): Remove code looking for
12374 artificial operands.
12375
d17687f6
DS
123762011-10-18 Dodji Seketeli <dodji@redhat.com>
12377
12378 PR bootstrap/50760
12379 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12380 !NO_IMPLICIT_EXTERN_C.
d17687f6 12381
fc8396e9
PC
123822011-10-17 Michael Spertus <mike_spertus@symantec.com>
12383
12384 * c-common.c (c_common_reswords): Add __bases,
12385 __direct_bases.
12386 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12387
123882011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12389
12390 PR c++/50757
12391 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12392
847e697a
TT
123932011-10-15 Tom Tromey <tromey@redhat.com>
12394 Dodji Seketeli <dodji@redhat.com>
12395
12396 * c.opt (fdebug-cpp): New option.
12397 * c-opts.c (c_common_handle_option): Handle the option.
12398 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12399 output stream in parameter. Factorized from ...
12400 (maybe_print_line): ... this. Dump location debug information when
12401 -fdebug-cpp is in effect.
12402 (print_line_1): New static function. Takes an output stream in
12403 parameter. Factorized from ...
12404 (print_line): ... here. Dump location information when -fdebug-cpp
12405 is in effect.
12406 (scan_translation_unit): Dump location information when
12407 -fdebug-cpp is in effect.
12408
92582b75
TT
124092011-10-15 Tom Tromey <tromey@redhat.com>
12410 Dodji Seketeli <dodji@redhat.com>
12411
12412 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12413 without argument.
12414 * c-opts.c (c_common_handle_option)<case
12415 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12416 cases. Handle -ftrack-macro-expansion with and without argument.
12417
46427374
TT
124182011-10-15 Tom Tromey <tromey@redhat.com>
12419 Dodji Seketeli <dodji@redhat.com>
12420
12421 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12422 (print_line, cb_define, do_line_change): Adjust to avoid touching
12423 the internals of struct line_map. Use the public API instead.
12424 * c-pch.c (c_common_read_pch): Likewise.
12425 * c-lex.c (fe_file_change): Likewise.
12426
fc8396e9
PC
124272011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12428
12429 PR c++/17212
12430 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12431
124322011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12433
12434 PR c++/33067
12435 * c-pretty-print.c (pp_c_floating_constant): Output
12436 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12437
e79983f4
MM
124382011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12439
12440 * c-common.c (def_builtin_1): Delete old interface with two
12441 parallel arrays to hold standard builtin declarations, and replace
12442 it with a function based interface that can support creating
12443 builtins on the fly in the future. Change all uses, and poison
12444 the old names. Make sure 0 is not a legitimate builtin index.
12445 * c-omp.c (c_finish_omp_barrier): Ditto.
12446 (c_finish_omp_taskwait): Ditto.
12447 (c_finish_omp_flush): Ditto.
12448
6637388f
TG
124492011-10-11 Tristan Gingold <gingold@adacore.com>
12450
12451 * c.opt: (fallow-parameterless-variadic-functions): New.
12452
3797cb21
DS
124532011-09-08 Dodji Seketeli <dodji@redhat.com>
12454
12455 PR c++/33255 - Support -Wunused-local-typedefs warning
12456 * c-common.h (struct c_language_function::local_typedefs): New
12457 field.
9faeb493
UB
12458 (record_locally_defined_typedef, maybe_record_typedef_use)
12459 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12460 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12461 (maybe_record_typedef_use)
12462 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12463 * c.opt: Declare new -Wunused-local-typedefs flag.
12464
693ddb1b
EB
124652011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12466
12467 PR middle-end/50266
12468 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12469 computations.
12470
830c740f
RG
124712011-09-05 Richard Guenther <rguenther@suse.de>
12472
12473 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12474 of integer_minus_one_node for empty array upper bounds.
12475
892a371f
DS
124762011-08-28 Dodji Seketeli <dodji@redhat.com>
12477
12478 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12479 it's the first time it's being called on this main TU.
12480
0e3fdb48
RB
124812011-08-24 Richard Guenther <rguenther@suse.de>
12482
12483 PR c/49396
12484 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12485
124862011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12487
12488 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12489 defined in cpp_init_builtins and c_cpp_builtins.
12490
d4a83c10
JM
124912011-08-19 Joseph Myers <joseph@codesourcery.com>
12492
12493 * c-common.c (c_common_reswords): Add __builtin_complex.
12494 * c-common.h (RID_BUILTIN_COMPLEX): New.
12495
bbceee64
JM
124962011-08-18 Joseph Myers <joseph@codesourcery.com>
12497
12498 * c-common.c (c_common_reswords): Add _Noreturn.
12499 (keyword_is_function_specifier): Handle RID_NORETURN.
12500 * c-common.h (RID_NORETURN): New.
12501
3f8257db 125022011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12503
12504 * c-common.c (unsafe_conversion_p): New function. Check if it is
12505 unsafe to convert an expression to the type.
12506 (conversion_warning): Adjust, use unsafe_conversion_p.
12507 * c-common.h (unsafe_conversion_p): New function declaration.
12508
20906c66
JJ
125092011-08-02 Jakub Jelinek <jakub@redhat.com>
12510
12511 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12512 (c_finish_omp_taskyield): New prototype.
12513 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12514 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12515 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12516 or RHS1 have side-effects, evaluate those too in the right spot,
12517 if it is a decl and LHS is also a decl, error out if they
12518 aren't the same.
12519 (c_finish_omp_taskyield): New function.
12520 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12521 * c-pragma.c (omp_pragmas): Add taskyield.
12522 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12523 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12524 PRAGMA_OMP_CLAUSE_MERGEABLE.
12525
770e5a2e
DS
125262011-07-25 Dodji Seketeli <dodji@redhat.com>
12527
12528 * c-common.h (set_underlying_type): Remove parm name from
12529 declaration.
12530
1baae426
RG
125312011-07-25 Romain Geissler <romain.geissler@gmail.com>
12532
12533 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12534
fcb21722
JM
125352011-07-22 Jason Merrill <jason@redhat.com>
12536
76f86d00
JM
12537 PR c++/49793
12538 * c.opt (Wnarrowing): New.
12539
3a636414
JM
12540 PR c++/30112
12541 * c-common.h: Declare c_linkage_bindings.
12542 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12543
fcb21722
JM
12544 PR c++/49813
12545 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12546 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12547 as flag_isoc99 for 'restrict'.
12548 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12549
02614448
ILT
125502011-07-21 Ian Lance Taylor <iant@google.com>
12551
12552 PR middle-end/49705
12553 * c-common.c (c_disable_warnings): New static function.
12554 (c_enable_warnings): New static function.
12555 (c_fully_fold_internal): Change local unused_p to bool. Call
12556 c_disable_warnings and c_enable_warnings rather than change
12557 c_inhibit_evaluation_warnings.
12558
34429675
JM
125592011-07-20 Jason Merrill <jason@redhat.com>
12560
12561 PR c++/6709 (DR 743)
12562 PR c++/42603 (DR 950)
12563 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12564 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12565 (CPP_DECLTYPE): New.
12566 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12567
5d49b6a7
RG
125682011-07-19 Richard Guenther <rguenther@suse.de>
12569
12570 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12571 * c-omp.c (c_finish_omp_for): Likewise.
12572
e84a58ff
EB
125732011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12574
12575 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12576 body on the next line.
12577
329af3c7
JM
125782011-07-08 Jason Merrill <jason@redhat.com>
12579
4063e61b
JM
12580 PR c++/45437
12581 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12582
329af3c7
JM
12583 PR c++/49673
12584 * c-common.c (c_apply_type_quals_to_decl): Don't check
12585 TYPE_NEEDS_CONSTRUCTING.
12586
1a072294
RG
125872011-07-06 Richard Guenther <rguenther@suse.de>
12588
12589 * c-common.c (c_common_nodes_and_builtins):
12590 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12591
fce5dddd
RG
125922011-07-05 Richard Guenther <rguenther@suse.de>
12593
12594 * c-common.c (c_common_nodes_and_builtins): Build all common
12595 tree nodes first.
12596
45d439ac
JJ
125972011-06-27 Jakub Jelinek <jakub@redhat.com>
12598
56300785
JJ
12599 * c-common.h (c_tree_chain_next): New static inline function.
12600
45d439ac
JJ
12601 * c-common.c (check_builtin_function_arguments): Handle
12602 BUILT_IN_ASSUME_ALIGNED.
12603
e0a8ecf2
AM
126042011-06-21 Andrew MacLeod <amacleod@redhat.com>
12605
12606 * c-common.c: Add sync_ or SYNC__ to builtin names.
12607 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12608
126092011-06-20 Pierre Vittet <piervit@pvittet.com>
12610
12611 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12612 handler.
12613 (gen_pragma_handler): New union.
12614 (internal_pragma_handler): New type.
12615 (c_register_pragma_with_data)
12616 (c_register_pragma_with_expansion_and_data): New functions.
12617
12618 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12619 (c_register_pragma, c_register_pragma_with_expansion)
12620 (c_invoke_pragma_handler): Changed to work with
12621 internal_pragma_handler.
12622 (c_register_pragma_with_data)
12623 (c_register_pragma_with_expansion_and_data): New functions.
12624
677f3fa8
JM
126252011-06-14 Joseph Myers <joseph@codesourcery.com>
12626
12627 * c-common.c: Include common/common-target.h.
12628 (handle_section_attribute): Use
12629 targetm_common.have_named_sections.
12630 * c-cppbuiltin.c: Include common/common-target.h.
12631 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12632
d7fc8c14
RG
126332011-06-10 Richard Guenther <rguenther@suse.de>
12634
12635 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12636 to print a IDENTIFIER_NODE.
12637
10e48e39
RO
126382011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12639 Joseph Myers <joseph@codesourcery.com>
12640
12641 * c.opt (fbuilding-libgcc): New option.
12642 * c-cppbuiltin.c (c_cpp_builtins): Define
12643 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12644
6976ae51
JM
126452011-06-07 Jason Merrill <jason@redhat.com>
12646
3ff60975
JM
12647 * c-common.c (max_tinst_depth): Lower default to 900.
12648
6976ae51
JM
12649 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12650
009db074
RG
126512011-06-07 Richard Guenther <rguenther@suse.de>
12652
12653 * c-common.c (c_common_nodes_and_builtins): Do not set
12654 size_type_node or call set_sizetype.
12655
b4592b92
DS
126562011-06-07 Dodji Seketeli <dodji@redhat.com>
12657
12658 PR debug/49130
12659 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12660 type when using pointer comparison to compare types.
b4592b92 12661
014ab419
JW
126622011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12663
12664 * c.opt: Add -Wdelete-non-virtual-dtor.
12665 * c-opts.c (c_common_handle_option): Include it in -Wall.
12666
4f60111f
NF
126672011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12668
12669 PR bootstrap/49190
12670
12671 Revert:
12672 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12673
12674 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12675 not tree_common.
12676
4cc4f2f4
JJ
126772011-05-27 Jakub Jelinek <jakub@redhat.com>
12678
12679 PR c++/49165
12680 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12681 C++ don't call c_common_truthvalue_conversion on void type arms.
12682
38e01f9e
NF
126832011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12684
12685 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12686 (stmt_list_stack): Define.
12687 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12688 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12689
92e948a8
NF
126902011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12691
12692 * c-common.c (warning_candidate_p): Check for BLOCKs.
12693
a2fc3e63
NF
126942011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12695
12696 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12697 not tree_common.
12698
0957c029
JJ
126992011-05-25 Jakub Jelinek <jakub@redhat.com>
12700
12701 * c-common.c (def_fn_type): Remove extra va_end.
12702
828fb3ba
JM
127032011-05-23 Jason Merrill <jason@redhat.com>
12704
12705 PR c++/48106
12706 * c-common.c (c_common_get_narrower): New.
12707 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12708
dde05067
NF
127092011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12710
12711 * c-common.h (check_function_arguments): Tweak prototype of
12712 check_function_arguments.
12713 * c-common.c (check_function_arguments): Likewise. Adjust
12714 calls to check_function_nonnull, check_function_format, and
12715 check_function_sentinel.
12716 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12717 separate attributes and typelist arguments. Use
12718 FOREACH_FUNCTION_ARGS to iterate over argument types.
12719
3c0d13bf
PC
127202011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12721
12722 * c-common.c (c_common_reswords): Reorder.
12723 * c-common.h (rid): Likewise.
12724
8242dd04
NF
127252011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12726
12727 * c-common.c (def_fn_type): Don't call build_function_type, call
12728 build_function_type_array or build_varargs_function_type_array
12729 instead.
12730 (c_common_nodes_and_builtins): Likewise.
12731
3d528853
NF
127322011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12733
12734 * c-common.c (c_add_case_label): Omit the loc argument to
12735 build_case_label.
12736 * c-common.h (build_case_label): Remove.
12737 * c-semantics.c (build_case_label): Remove.
12738
a04a722b
JM
127392011-05-05 Joseph Myers <joseph@codesourcery.com>
12740
12741 * c-objc.h (objc_start_method_definition): Update prototype.
12742 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12743
e19a18d4
NF
127442011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12745
12746 * c-common.c (check_main_parameter_types): Reindent. Don't use
12747 TYPE_ARG_TYPES directly.
12748 (handle_nonnull_attribute): Likewise.
12749 (sync_resolve_params): Likewise.
12750 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12751 to check_format_string.
12752 (handle_format_attribute): Likewise.
12753 (check_format_string): Take a function type to examine instead of
12754 a type list. Use a function_arg_iterator to step through argument
12755 types.
12756
c62c040f
RG
127572011-05-04 Richard Guenther <rguenther@suse.de>
12758
12759 * c-common.c (fix_string_type): Use size_int for index type bounds.
12760 (start_fname_decls): Do not pass NULL to build_int_cst.
12761 (c_init_attributes): Likewise.
12762 * c-lex.c (c_lex_with_flags): Likewise.
12763
c12ff9d8
JM
127642011-04-27 Jason Merrill <jason@redhat.com>
12765
12766 * c-common.c (make_tree_vector_from_list): New.
12767 * c-common.h: Declare it.
12768
304dfbe3
RG
127692011-04-26 Richard Guenther <rguenther@suse.de>
12770
12771 PR preprocessor/48248
12772 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12773 for output size with -P.
12774
3c0d13bf
PC
127752011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12776
12777 * c-common.c (struct c_common_resword): Add __underlying_type.
12778 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12779
04695783
JM
127802011-04-20 Jim Meyering <meyering@redhat.com>
12781
12782 * c-format.c (init_dollar_format_checking): Remove useless
12783 if-before-free.
12784
0dc33c3c
NP
127852011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12786
12787 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12788 (objc_detect_field_duplicates): New.
0dc33c3c 12789 * stub-objc.c: Likewise.
3c0d13bf 12790
c59633d9
NP
127912011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12792
12793 * stub-objc.c (objc_declare_protocols): Renamed to
12794 objc_declare_protocol.
12795 * c-objc.h: Likewise.
3c0d13bf 12796
32dabdaf
NP
127972011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12798
12799 * stub-objc.c (objc_declare_class): Updated argument name.
12800
81f653d6
NF
128012011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12802
12803 * c-common.h (c_common_init_ts): Declare.
12804 * c-common.c (c_common_init_ts): Define.
12805
eb345401
NP
128062011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12807
12808 * c-objc.h (objc_build_message_expr): Updated prototype.
12809 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12810
a358e188
MJ
128112011-04-12 Martin Jambor <mjambor@suse.cz>
12812
12813 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12814 of cgraph_node.
12815
e6313a78
RG
128162011-04-11 Richard Guenther <rguenther@suse.de>
12817
12818 * c-common.c (complete_array_type): Build a range type of
12819 proper type.
12820
dcf0c47e
NF
128212011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12822
12823 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12824 (handle_type_generic_attribute): Likewise.
12825
1ee44b26
JM
128262011-04-07 Jason Merrill <jason@redhat.com>
12827
12828 PR c++/48450
12829 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12830 conversion from C++0x scoped enum.
12831
acce4e77
JM
128322011-04-06 Joseph Myers <joseph@codesourcery.com>
12833
12834 * c-target-def.h: New file.
12835 * c-target.def: New file.
12836 * c-target.h: New file.
12837 * c-common.c (targetcm): Don't define here.
12838 * c-common.h (default_handle_c_option): Declare.
12839 * c-format.c: Include c-target.h instead of target.h.
12840 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12841 include tm.h.
12842 (default_handle_c_option): Move from targhooks.c.
12843
e2eefb55
JJ
128442011-03-29 Jakub Jelinek <jakub@redhat.com>
12845
12846 PR preprocessor/48248
12847 * c-ppoutput.c (print): Add src_file field.
12848 (init_pp_output): Initialize it.
12849 (maybe_print_line): Don't optimize by adding up to 8 newlines
12850 if map->to_file and print.src_file are different file.
12851 (print_line): Update print.src_file.
12852
ba78087b
KT
128532011-03-25 Kai Tietz <ktietz@redhat.com>
12854
12855 * c-ada-spec.c (compare_comment): Use filename_cmp
12856 instead of strcmp for filename.
12857
0edf1bb2
JL
128582011-03-25 Jeff Law <law@redhat.com>
12859
adfac8df 12860 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12861
c7dc8804
JM
128622011-03-25 Jason Merrill <jason@redhat.com>
12863
12864 * c.opt: Add -std=c++03.
12865
d1d879b1
EB
128662011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12867
12868 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12869
3f8257db 128702011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12871
12872 PR target/12171
5050afdf
KT
12873 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12874 Display allowed attributes for function pointer types.
12875 (pp_c_attributes_display): New function to display
12876 attributes having affects_type_identity flag set to true.
12877 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12878
62d784f7
KT
12879 * c-common.c (c_common_attribute_table):
12880 Add new element.
12881 (c_common_format_attribute_table): Likewise.
12882
82d37118
JM
128832011-03-18 Jason Merrill <jason@redhat.com>
12884
49a000c3
JM
12885 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12886 * c-common.h: Don't declare it here.
12887 * c-common.c: Or define it here.
12888 * c-opts.c (c_common_handle_option): Or set it here.
12889
82d37118
JM
12890 PR c++/35315
12891 * c-common.c (handle_transparent_union_attribute): Don't
12892 make a duplicate type in C++.
12893
17bc631c
JM
128942011-03-15 Jason Merrill <jason@redhat.com>
12895
12896 * c-common.c (max_constexpr_depth): New.
12897 * c-common.h: Declare it.
12898 * c-opts.c (c_common_handle_option): Set it.
12899 * c.opt (fconstexpr-depth): New option.
12900
1b9b91a6
JM
129012011-03-11 Jason Merrill <jason@redhat.com>
12902
f231b5ff
JM
12903 * c-common.c (attribute_takes_identifier_p): Add missing const.
12904
1b9b91a6
JM
12905 PR c++/46803
12906 * c-common.c (attribute_takes_identifier_p): Assume that an
12907 unknown attribute takes an identifier.
12908
a19e4d44
NF
129092011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12910
12911 PR c/47786
12912 * c-common.c (c_type_hash): Call list_length instead of iterating
12913 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12914
982d62f6
JJ
129152011-02-19 Jakub Jelinek <jakub@redhat.com>
12916
12917 PR c/47809
12918 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12919
0a256240
NP
129202011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12921
12922 * c.opt (fobjc-abi-version=) New.
12923 (fobjc-nilcheck): New.
12924
ba9e6dd5
NF
129252011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12926
12927 PR c++/46890
12928 * c-common.h (keyword_is_decl_specifier): Declare.
12929 * c-common.c (keyword_is_decl_specifier): Define.
12930 (keyword_is_function_specifier): New function.
12931
7273813a
JJ
129322011-01-26 Jakub Jelinek <jakub@redhat.com>
12933
12934 PR c/47473
12935 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12936 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12937 REAL_TYPE.
12938
908ef79b
AC
129392011-01-26 Arnaud Charlet <charlet@adacore.com>
12940
12941 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12942
237e9384
JJ
129432011-01-26 Jakub Jelinek <jakub@redhat.com>
12944
12945 PR pch/47430
12946 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12947 after init_c_lex if pch_file is set.
12948
47ea1edf
DK
129492011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12950
d4dba752 12951 PR c++/43601
47ea1edf
DK
12952 * c.opt (-fkeep-inline-dllexport): New switch.
12953
2aa9c6ae
RG
129542011-01-12 Richard Guenther <rguenther@suse.de>
12955
12956 PR middle-end/32511
12957 * c-common.c (handle_weak_attribute): Warn instead of error
12958 on declaring an inline function weak.
12959
7bd11157
TT
129602011-01-05 Tom Tromey <tromey@redhat.com>
12961
12962 * c-common.h (lvalue_error): Update.
12963 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12964 not error.
12965
0e66e494 129662010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12967
b4f588c4
NP
12968 PR objc/47075
12969 * c-objc.h (objc_finish_message_expr): Added argument to
12970 prototype.
12971
f4da8dce
NF
129722010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12973
12974 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12975 Use prototype_p.
12976
46270f14
NP
129772010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12978
12979 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12980 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12981
4816c593
NF
129822010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12983
12984 * c-common.h (readonly_error): Declare.
12985 * c-common.c (readonly_error): Define.
12986
7a6daeb0
NF
129872010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12988
12989 * c-common.h (invalid_indirection_error): Declare.
12990 * c-common.c (invalid_indirection_error): Define.
12991
892f6119
RG
129922010-12-03 Richard Guenther <rguenther@suse.de>
12993
12994 PR c/46745
12995 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12996 (pp_c_unary_expression): Likewise.
12997 (pp_c_expression): Likewise.
12998
6c39e757
NP
129992010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13000
13001 * c-common.h (objc_finish_function): New.
13002 (objc_non_volatilized_type): Removed.
13003 (objc_type_quals_match): Removed.
13004 * stub-objc.c (objc_finish_function): New.
13005 (objc_non_volatilized_type): Removed.
13006 (objc_type_quals_match): Removed.
9faeb493 13007
7c475d11
JM
130082010-11-30 Joseph Myers <joseph@codesourcery.com>
13009
13010 * c-common.h (parse_optimize_options): Declare.
13011 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13012 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13013
71f3e391
JM
130142010-11-29 Joseph Myers <joseph@codesourcery.com>
13015
13016 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13017 GET_ENVIRONMENT.
13018 * c-pch.c (O_BINARY): Don't define here.
13019 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13020
d5fabb58
JM
130212010-11-25 Joseph Myers <joseph@codesourcery.com>
13022
13023 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13024 targetm.except_unwind_info.
13025
299404a1
JM
130262010-11-23 Joseph Myers <joseph@codesourcery.com>
13027
13028 * c-opts.c (c_common_handle_option): Pass location to
13029 set_struct_debug_option.
13030
c98cd5bf
JM
130312010-11-23 Joseph Myers <joseph@codesourcery.com>
13032
13033 * c-common.c (visibility_options): Move from ../opts.c.
13034 * c-common.h (struct visibility_flags, visibility_options):
13035 Declare here.
13036 * c-opts.c (finish_options): Rename to c_finish_options.
13037 (c_common_init): Update call to finish_options.
13038
a9546771
NP
130392010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13040
13041 PR objc/34033
13042 * c-lex.c (lex_string): Check that each string in an Objective-C
13043 string concat sequence starts with either one or zero '@', and
13044 that there are no spurious '@' signs at the end.
13045
24a57808
JM
130462010-11-20 Joseph Myers <joseph@codesourcery.com>
13047
13048 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13049 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13050 HANDLE_PRAGMA_VISIBILITY.
13051 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13052 HANDLE_PRAGMA_VISIBILITY): Don't define.
13053 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13054
a9aa2c3a
NF
130552010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13056
13057 PR c++/16189
13058 PR c++/36888
13059 PR c++/45331
13060 * c-common.h (keyword_begins_type_specifier): Declare.
13061 (keyword_is_storage_class_specifier): Declare.
13062 (keyword_is_type_qualifier): Declare.
13063 * c-common.c (keyword_begins_type_specifier): New function.
13064 (keyword_is_storage_class_specifier): New function.
13065 (keyword_is_type_qualifier): Declare.
13066
5386338c
JM
130672010-11-19 Joseph Myers <joseph@codesourcery.com>
13068
13069 PR c/46547
13070 * c-common.c (in_late_binary_op): Define.
13071 (c_common_truthvalue_conversion): Check in_late_binary_op before
13072 calling c_save_expr.
13073 * c-common.h (in_late_binary_op): Declare.
13074
69ccdddb
JM
130752010-11-19 Joseph Myers <joseph@codesourcery.com>
13076
13077 * c-opts.c (c_common_handle_option): Update calls to
13078 set_struct_debug_option.
13079
6b192a09
NP
130802010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13081
13082 * c-common.h (objc_declare_protocols): Added additional argument.
13083 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13084
fb52b50a
NF
130852010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13086
13087 PR c/33193
13088 * c-common.h (build_real_imag_expr): Declare.
13089 * c-semantics.c (build_real_imag_expr): Define.
13090
b37421c6
JM
130912010-11-17 Joseph Myers <joseph@codesourcery.com>
13092
13093 * c-opts.c (c_common_parse_file): Take no arguments.
13094 * c-common.h (c_common_parse_file): Update prototype.
13095
07078664
JJ
130962010-11-16 Jakub Jelinek <jakub@redhat.com>
13097
13098 PR c++/46401
13099 * c-common.c (warning_candidate_p): Don't track non-const calls
13100 or STRING_CSTs.
13101
c6a13190
ILT
131022010-11-15 Ian Lance Taylor <iant@google.com>
13103
13104 * c-lex.c (init_c_lex): Set macro debug callbacks if
13105 flag_dump_go_spec is set.
13106
925e8657
NP
131072010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13108
13109 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13110 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13111
bb0a9581
NF
131122010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13113
13114 PR preprocessor/45038
13115 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13116 dialects.
13117
c5fa0890
JM
131182010-11-12 Joseph Myers <joseph@codesourcery.com>
13119
13120 * c-common.h (c_family_lang_mask): Declare.
13121 * c-opts.c (c_family_lang_mask): Make extern.
13122 * c-pragma.c (handle_pragma_diagnostic): Use
13123 control_warning_option.
13124
a4d8c676
JM
131252010-11-12 Joseph Myers <joseph@codesourcery.com>
13126
13127 * c-common.c (parse_optimize_options): Update call to
13128 decode_options.
13129 * c-common.h (c_common_handle_option): Update prototype.
13130 * c-opts.c (c_common_handle_option): Take location_t parameter and
13131 pass it to other functions.
13132
f954bd2c
JM
131332010-11-11 Joseph Myers <joseph@codesourcery.com>
13134
13135 * c-opts.c (warning_as_error_callback): Remove.
13136 (c_common_initialize_diagnostics): Don't call
13137 register_warning_as_error_callback.
13138 (c_common_handle_option): Handle -Werror=normalized= here.
13139
d8a07487
JM
131402010-11-10 Joseph Myers <joseph@codesourcery.com>
13141
13142 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13143 in diagnostic.
13144 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13145 letter.
13146 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13147 Remove trailing '.' from diagnostics.
13148 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13149
d5478783
JM
131502010-11-10 Joseph Myers <joseph@codesourcery.com>
13151
13152 * c-common.c (parse_optimize_options): Pass global_dc to
13153 decode_options.
13154 * c-opts.c (c_common_handle_option): Pass &global_options to
13155 set_Wstrict_aliasing.
13156 * c.opt (v): Don't mark Common or document here.
13157
91ebb981
IS
131582010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13159
13160 PR target/44981
13161 * c-format.c (format_type): New type gcc_objc_string_format_type.
13162 (valid_stringptr_type_p): New.
13163 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13164 (check_format_string): Pass expected type, use
91ebb981
IS
13165 valid_stringptr_type_p (), check that the format string types are
13166 consistent with the format specification.
13167 (decode_format_attr): Warn if NSString is used outside objective-c.
13168 (format_types_orig): Add NSString.
13169 (format_name): New.
13170 (format_flags): New.
13171 (check_format_arg): Handle format strings requiring an external parser.
13172 first_target_format_type: New variable.
13173 (handle_format_attribute): Set up first_target_format_type, pass the
13174 expected format arg string type to check_format_string().
ab20d992 13175 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13176 * stub-objc.c (objc_string_ref_type_p): New.
13177 (objc_check_format_arg): New.
13178
bede2adc
NP
131792010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13180
9faeb493 13181 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13182 * c-common.h (objc_build_class_component_ref): New.
13183 * stub-objc.c (objc_build_class_component_ref): New.
13184
9a179d01
NP
131852010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13186
13187 * c.opt (Wproperty-assign-default): New option.
13188
22d8d616
NP
131892010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13190
13191 Implemented -fobjc-std=objc1 flag.
13192 * c.opt (fobjc-std=objc1): New option.
13193
2debdb4f
NP
131942010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13195
13196 Implemented format and noreturn attributes for Objective-C methods.
13197 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13198 attribute for Objective-C methods.
13199
ec52b111
JM
132002010-10-31 Jason Merrill <jason@redhat.com>
13201
13202 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13203 EXPR_LOC_OR_HERE.
13204
46a88c12
NP
132052010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13206
13207 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13208 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13209 (objc_add_property_declaration): Removed arguments for copies and
13210 ivar.
13211 (objc_build_getter_call): Renamed to
13212 objc_maybe_build_component_ref.
13213 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13214 (objc_is_property_ref): New.
13215 * c-common.c (c_common_reswords): Removed copies and ivar.
13216 * stub-objc.c (objc_add_property_declaration): Removed arguments
13217 for copies and ivar.
13218 (objc_build_getter_call): Renamed to
13219 objc_maybe_build_component_ref.
13220 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13221 (objc_is_property_ref): New.
9faeb493 13222
1e4bf85b
AC
132232010-10-29 Arnaud Charlet <charlet@adacore.com>
13224 Matthew Gingell <gingell@adacore.com>
13225
13226 * c-ada-spec.c (separate_class_package): New function.
13227 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13228 name of their enclosing package.
13229 (print_ada_declaration): Use separate_class_package.
13230
81f0bab2
JM
132312010-10-27 Jason Merrill <jason@redhat.com>
13232
2b08f2c5
JM
13233 * c-common.c (c_common_reswords): Add __is_literal_type.
13234 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13235
81f0bab2
JM
13236 * c-common.c (check_case_value): Remove special C++ code.
13237
200290f2
NP
132382010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13239
13240 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13241 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13242 and RID_LAST_PATTR.
13243 (objc_add_property_declaration): Added additional arguments.
13244 (objc_property_attribute_kind): Removed.
13245 (objc_set_property_attr): Removed.
13246 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13247 copy and nonatomic.
13248 * stub-objc.c (objc_add_property_declaration): Added additional
13249 arguments.
13250 (objc_set_property_attr): Removed.
9faeb493 13251
f614132b
NP
132522010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13253
13254 * c-common.h (objc_add_property_variable): Renamed to
13255 objc_add_property_declaration. Added location argument.
13256 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13257
b8a18805
NP
132582010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13259
13260 * c-common.h (objc_maybe_printable_name): New.
13261 * stub-objc.c (objc_maybe_printable_name): New.
13262
3f8257db
JJ
132632010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13264 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13265
13266 * c-common.h (c_common_mark_addressable_vec): Declare.
13267 * c-common.c (c_common_mark_addressable_vec): New function.
13268
249a82c4
NP
132692010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13270
13271 * c-common.h (objc_set_method_type): Removed.
13272 (objc_add_method_declaration): Added boolean argument.
13273 (objc_start_method_definition): Same change.
13274 (objc_build_method_signature): Same change.
13275 * stub-objc.c (objc_set_method_type): Removed.
13276 (objc_add_method_declaration): Added boolean argument.
13277 (objc_start_method_definition): Same change.
13278 (objc_build_method_signature): Same change.
13279
977e30bc
NP
132802010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13281
13282 * c-common.h (finish_file): Removed.
13283 (objc_write_global_declarations): New.
13284 * c-opts.c (c_common_parse_file): Do not call finish_file.
13285 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13286
da57d1b9
NP
132872010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13288
13289 Implemented parsing @synthesize and @dynamic for
13290 Objective-C/Objective-C++.
13291 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13292 (objc_add_synthesize_declaration): New.
13293 (objc_add_dynamic_declaration): New.
13294 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13295 * stub-objc.c (objc_add_synthesize_declaration): New.
13296 (objc_add_dynamic_declaration): New.
9faeb493 13297
0069111f
MM
132982010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13299
13300 PR target/46041
13301 * c-cppbuiltin.c (mode_has_fma): Move function here from
13302 builtins.c. Don't use the fma optab, instead just use the
13303 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13304 using -save-temps.
13305
e426b47b
NP
133062010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13307
13308 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13309
3f8257db 13310 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13311
9faeb493 13312 Radar 4330422
e426b47b
NP
13313 * c-common.h (objc_non_volatilized_type): New declaration
13314 * stub-objc.c (objc_non_volatilized_type): New stub.
13315
90fbfdc3
NP
133162010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13317
e426b47b 13318 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13319
ab20d992 13320 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13321
9faeb493 13322 Radar 4133425
90fbfdc3 13323 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13324 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13325
c37d8c30
IS
133262010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13327
13328 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13329 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13330 (objc_ivar_visibility_kind): New enum.
13331 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13332 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13333 visibility enum.
13334
1b1562a5
MM
133352010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13336
13337 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13338 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13339 has the appropriate fma builtins.
13340 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13341
668ea4b1
IS
133422010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13343
1b1562a5 13344 merge from FSF apple 'trunk' branch.
3f8257db 13345 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13346
668ea4b1
IS
13347 Radars 4436866, 4505126, 4506903, 4517826
13348 * c-common.c (c_common_resword): Define @property and its attributes.
13349 * c-common.h: Define property attribute enum entries.
13350 (OBJC_IS_PATTR_KEYWORD): New.
13351 (objc_property_attribute_kind): New enum.
13352 Declare objc_set_property_attr (), objc_add_property_variable (),
13353 objc_build_getter_call () and objc_build_setter_call ().
13354 * stub-objc.c (objc_set_property_attr): New stub.
13355 (objc_add_property_variable): Likewise.
13356 (objc_build_getter_call): Likewise.
13357 (objc_build_setter_call) Likewise.
1b1562a5 13358
a1178b30
IS
133592010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13360
1b1562a5 13361 merge from FSF apple 'trunk' branch.
ab20d992 13362 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13363
13364 Radar 3803157 (method attributes)
13365 * c-common.c (handle_deprecated_attribute): Recognize
13366 objc methods as valid declarations.
13367 * c-common.h: Declare objc_method_decl ().
1b1562a5 13368 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13369
a75bfaa6
JM
133702010-10-08 Joseph Myers <joseph@codesourcery.com>
13371
13372 * c-common.c (parse_optimize_options): Call
13373 decode_cmdline_options_to_array_default_mask before
13374 decode_options. Update arguments to decode_options.
13375 * c-common.h (c_common_init_options_struct): Declare.
13376 * c-opts.c (c_common_init_options_struct): New. Split out from
13377 c_common_init_options.
13378
f05b9d93
NP
133792010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13380
13381 Implemented fast enumeration for Objective-C.
13382 * c-common.h (objc_finish_foreach_loop): New.
13383 * stub-objc.c (objc_finish_foreach_loop): New.
13384
1ebe4b4f
JM
133852010-10-05 Joseph Myers <joseph@codesourcery.com>
13386
13387 * c-common.h (struct diagnostic_context): Don't declare here.
13388 (c_common_initialize_diagnostics): Declare using
13389 diagnostic_context typedef.
13390 * c-opts.c (c_common_handle_option): Pass global_dc to
13391 handle_generated_option.
13392
d4d24ba4
JM
133932010-10-04 Joseph Myers <joseph@codesourcery.com>
13394
13395 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13396 handle_generated_option.
13397
478a1c5b
ILT
133982010-10-03 Ian Lance Taylor <iant@google.com>
13399
13400 * c.opt (-fplan9-extensions): New option.
13401
82a1c2fe
FXC
134022010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13403
13404 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13405 Remove.
13406 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13407 of duplicating code.
13408
92902b1b
IS
134092010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13410
13411 * c-common.c: Add two new entries for @optional
13412 and @required keywords.
13413
13414 merge from FSF 'apple/trunk' branch.
3f8257db 13415 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13416
13417 Radar 4386773
13418 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13419 objective-c keywords.
13420 (objc_set_method_opt): New declaration.
13421 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13422
46625112
JM
134232010-09-30 Joseph Myers <joseph@codesourcery.com>
13424
13425 * c-common.c (handle_optimize_attribute): Pass &global_options to
13426 cl_optimization_save and cl_optimization_restore.
13427 * c-opts.c (c_common_handle_option): Pass &global_options to
13428 handle_generated_option.
13429 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13430 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13431 &global_options to cl_optimization_restore.
13432
49b91f05
NP
134332010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13434
13435 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13436 Objective-C/Objective-C++ keywords.
13437
13ed556f 134382010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13439
9faeb493
UB
13440 Merge from 'apple/trunk' branch on FSF servers.
13441
3f8257db 13442 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13443
13444 Radar 4281748
13445 * c-common.h (objc_check_global_decl): New declaration.
13446 * stub-objc.c (objc_check_global_decl): New stub.
13447
f0036cca
JM
134482010-09-29 Joseph Myers <joseph@codesourcery.com>
13449
13450 * c.opt: Don't use VarExists.
13451
e3339d0f
JM
134522010-09-29 Joseph Myers <joseph@codesourcery.com>
13453
13454 * c-common.c (c_cpp_error): Update names of diagnostic_context
13455 members.
13456 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13457 cl_optimization members.
13458 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13459 sanitize_cpp_opts, finish_options): Update names of cpp_options
13460 members.
13461
1973201f
NP
134622010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13463
13464 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13465 (objc_is_reserved_word): Removed.
13466 * c-common.c: Updated comments.
13467 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13468 objc_is_reserved_word.
13469 * stub-objc.c (objc_is_reserved_word): Removed.
13470
f7e71da5
IS
134712010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13472
9faeb493 13473 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13474 include attributes.
13475 (objc_start_method_definition): Likewise.
13476 (objc_build_keyword_decl): Likewise.
13477 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13478 (objc_start_method_definition): Likewise.
13479 (objc_build_keyword_decl): Likewise.
13480
c165dca7
IS
134812010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13482
13483 * c-common.h (objc_start_class_interface): Adjust prototype.
13484 (objc_start_category_interface): Likewise.
13485 (objc_start_protocol): Likewise.
13486 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13487 (objc_start_class_interface): Likewise.
13488 (objc_start_category_interface): Likewise.
13489
7458026b
ILT
134902010-09-27 Ian Lance Taylor <iant@google.com>
13491
13492 * c-common.c (c_common_attribute_table): Add no_split_stack.
13493 (handle_no_split_stack_attribute): New static function.
13494
b581b85b
NP
134952010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13496
9faeb493 13497 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13498
3f8257db 13499 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13500
9faeb493 13501 Radar 4229905
b581b85b
NP
13502 * c-common.h (objc_have_common_type): New declaration.
13503 * stub-objc.c (objc_have_common_type): New stub.
13504
13505 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13506
13507 Radar 4154928
13508 * c-common.h (objc_common_type): New prototype.
9faeb493 13509 * stub-objc.c (objc_common_type): New stub.
b581b85b 13510
46a4da10
JH
135112010-09-24 Jan Hubicka <jh@suse.cz>
13512
13513 * c-common.c (handle_leaf_attribute): New function.
13514 (struct attribute_spec c_common_att): Add leaf.
13515
e200444e
JM
135162010-09-22 Joseph Myers <joseph@codesourcery.com>
13517
13518 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13519 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13520 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13521 -include-barrier, -include-directory, -include-directory=,
13522 -include-directory-after, -include-directory-after=,
13523 -include-prefix, -include-prefix=, -include-with-prefix,
13524 -include-with-prefix=, -include-with-prefix-after,
13525 -include-with-prefix-after=, -include-with-prefix-before,
13526 -include-with-prefix-before=, -no-integrated-cpp,
13527 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13528 -output=, -pedantic, -pedantic-errors, -preprocess,
13529 -print-missing-file-dependencies, -trace-includes, -traditional,
13530 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13531 -user-dependencies, -verbose, -write-dependencies,
13532 -write-user-dependencies, no-integrated-cpp, traditional): New.
13533
29a80ea6
NP
135342010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13535
13536 PR objc/23710
ac1fc2fc
NP
13537 * c-common.h (objc_start_method_definition): Return bool instead
13538 of void.
13539 * stub-objc.c (objc_start_method_definition): Return bool instead
13540 of void.
13541
135422010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13543
13544 PR objc/25965
13545 * c-common.h (objc_get_interface_ivars): New declaration.
13546 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13547
de621752
ILT
135482010-09-15 Ian Lance Taylor <iant@google.com>
13549
13550 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13551 messages. Remove period at end of warning message.
de621752 13552
ba885ec5
NS
135532010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13554
13555 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13556 (handle_alias_attribute): ... here.
13557 (handle_ifunc_attribute): New.
13558
c5ee1358
MM
135592010-09-06 Mark Mitchell <mark@codesourcery.com>
13560
13561 * c-common.h (do_warn_double_promotion): Declare.
13562 * c-common.c (do_warn_double_promotion): Define.
13563
0a0b3574
MM
135642010-09-05 Mark Mitchell <mark@codesourcery.com>
13565
13566 * c.opt (Wdouble-promotion): New.
13567
d1779886
JM
135682010-09-02 Joseph Myers <joseph@codesourcery.com>
13569
13570 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13571 fvtable-thunks, fxref): Mark no longer supported in help text.
13572
2d2bd949
JM
135732010-09-02 Joseph Myers <joseph@codesourcery.com>
13574
13575 * c.opt (Wimport, fall-virtual, falt-external-templates,
13576 fdefault-inline, fenum-int-equiv, fexternal-templates,
13577 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13578 fname-mangling-version-, fnew-abi, fnonnull-objects,
13579 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13580 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13581 applicable.
13582 (fhandle-exceptions): Mark with Alias and Warn.
13583 * c-opts.c (c_common_handle_option): Don't handle options marked
13584 as ignored.
13585
5de8299c
JM
135862010-09-02 Joseph Myers <joseph@codesourcery.com>
13587
13588 * c.opt (Wcomments, Werror-implicit-function-declaration,
13589 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13590 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13591 aliases.
13592 * c-common.c (option_codes): Use OPT_Wcomment instead of
13593 OPT_Wcomments.
13594 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13595 Don't handle options marked as aliases.
13596
0ceb0201
RG
135972010-08-25 Richard Guenther <rguenther@suse.de>
13598
13599 * c-common.c (c_common_get_alias_set): Remove special
13600 handling for pointers.
13601
ac47786e
NF
136022010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13603
13604 * c-common.c: Use FOR_EACH_VEC_ELT.
13605 * c-gimplify.c: Likewise.
13606 * c-pragma.c: Likewise.
13607
c878765b
JM
136082010-08-16 Joseph Myers <joseph@codesourcery.com>
13609
13610 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13611 RejectDriver.
13612 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13613 RejectDriver.
13614 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13615 instead of OPT_MDX and OPT_MMDX.
13616
603349bf
JM
136172010-08-16 Joseph Myers <joseph@codesourcery.com>
13618
13619 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13620
644fa7ac
JM
136212010-08-12 Joseph Myers <joseph@codesourcery.com>
13622
13623 * c.opt (MD, MMD): Change to MDX and MMDX.
13624 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13625
481e1176
JM
136262010-08-11 Joseph Myers <joseph@codesourcery.com>
13627
13628 * c-opts.c (c_common_handle_option): Call handle_generated_option
13629 instead of handle_option.
13630
ac8dc9f7
NF
136312010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13632
13633 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13634 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13635
4f8c876d
NF
136362010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13637
13638 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13639 (pending_redefine_extname): Change type to a VEC.
13640 (add_to_renaming_pragma_list): Update for new type of
13641 pending_redefine_extname.
ac8dc9f7 13642 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13643
3b0c690e
AC
136442010-08-04 Arnaud Charlet <charlet@adacore.com>
13645
13646 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13647 visited.
13648 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13649 decide whether a type has already been declared/seen.
13650 Do not go to the original type.
13651 (dump_nested_types): New parameter forward.
13652 Generate forward declaration if needed and mark type as visited.
13653 (print_ada_declaration): Call dump_nested_types if not already done.
13654 Mark types as visited.
13655
1890bccc
JM
136562010-08-03 Joseph Myers <joseph@codesourcery.com>
13657
13658 * c.opt (-print-pch-checksum): Remove option.
13659 * c-opts.c (c_common_handle_option): Don't handle
13660 OPT_print_pch_checksum.
13661
5f20c657
JM
136622010-07-27 Joseph Myers <joseph@codesourcery.com>
13663
13664 * c-common.h (c_common_handle_option): Update prototype and return
13665 value type.
13666 * c-opts.c (c_common_handle_option): Update prototype and return
13667 value type. Update calls to handle_option and
13668 enable_warning_as_error.
13669
f551f80c
JJ
136702010-07-27 Jakub Jelinek <jakub@redhat.com>
13671
13672 PR c/45079
13673 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13674
61ff2bdc
JM
136752010-07-27 Joseph Myers <joseph@codesourcery.com>
13676
13677 * c-common.h (c_common_missing_argument): Remove.
13678 * c-opts.c (c_common_missing_argument): Remove.
13679 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13680 idirafter, imacros, include, isysroot, isystem, iquote): Add
13681 MissingArgError.
13682 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13683
7a9bf9a4
JM
136842010-07-27 Joseph Myers <joseph@codesourcery.com>
13685
13686 * c-common.h (c_common_option_lang_mask,
13687 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13688 New.
13689 (c_common_init_options): Update prototype.
13690 * c-opts.c (c_common_option_lang_mask): New.
13691 (c_common_initialize_diagnostics): Split out of
13692 c_common_init_options.
13693 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13694 New.
13695 (c_common_init_options): Update prototype. Use decoded options in
13696 search for -lang-asm.
13697
910ad8de
NF
136982010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13699
13700 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13701 * c-format.c: Likewise.
13702
718f9c0f
MLI
137032010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13704
13705 * c-common.h: Include diagnostic-core.h. Error if already
13706 included.
13707 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13708
4d451982
MLI
137092010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13710
adfac8df 13711 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13712 Do not include expr.h
13713 (vector_mode_valid_p): Move here.
13714
119fe915
SB
137152010-06-21 DJ Delorie <dj@redhat.com>
13716
13717 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13718 allow these pragmas anywhere.
13719
137202010-06-14 Jakub Jelinek <jakub@redhat.com>
13721
13722 PR bootstrap/44509
13723 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13724 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13725 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13726 ggc_strdup instead of xstrdup.
13727
137282010-06-10 Jakub Jelinek <jakub@redhat.com>
13729
13730 * c-cppbuiltin.c: Include cpp-id-data.h.
13731 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13732 (lazy_hex_fp_value): New function.
13733 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13734
6662d794
MLI
137352010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13736
13737 * c-gimplify.c: Do not include tree-flow.h
13738
38f8b050
JR
137392010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13740
13741 PR other/44034
13742 * c-common.c: Rename targetm member:
13743 targetm.enum_va_list -> targetm.enum_va_list_p
13744
9589f23e
AS
137452010-06-28 Anatoly Sokolov <aesok@post.ru>
13746
13747 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13748
3b06d379
SB
137492010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13750
13751 * c-cppbuiltin.c: Do not include except.h.
13752
d166d4c3
AK
137532010-06-24 Andi Kleen <ak@linux.intel.com>
13754
9faeb493
UB
13755 * c-common.c (warn_for_omitted_condop): New.
13756 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13757
70cb8be6
JM
137582010-06-21 Joseph Myers <joseph@codesourcery.com>
13759
13760 * c.opt (lang-objc): Remove.
13761 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13762
a4c97feb
JR
137632010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13764
13765 * c-opts.c: Include "tm_p.h".
13766
6e2f1956
JM
137672010-06-20 Joseph Myers <joseph@codesourcery.com>
13768
13769 * c-common.c (parse_optimize_options): Update call to
13770 decode_options.
13771
bc87224e
NF
137722010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13773
13774 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13775 new type of types_used_by_cur_var_decl.
13776
b49cf425
JR
137772010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13778
13779 PR bootstrap/44512
13780 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13781 for C++ standard compliance.
13782
59f9c2ed
JM
137832010-06-16 Jason Merrill <jason@redhat.com>
13784
13785 * c.opt: Add -Wnoexcept.
13786
33766b66
RG
137872010-06-16 Richard Guenther <rguenther@suse.de>
13788
13789 PR c/44555
13790 * c-common.c (c_common_truthvalue_conversion): Remove
13791 premature and wrong optimization concering ADDR_EXPRs.
13792
eff7e30c
AC
137932010-06-15 Arnaud Charlet <charlet@adacore.com>
13794
13795 * c-ada-spec.c (dump_sloc): Remove column info.
13796 (is_simple_enum): New function.
13797 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13798 enum types when relevant.
13799
6312e84d
MLI
138002010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13801
9faeb493 13802 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13803 location.
13804
1cb42611
JM
138052010-06-10 Joseph Myers <joseph@codesourcery.com>
13806
13807 * c-opts.c (c_common_handle_option): Don't handle
13808 OPT_fshow_column.
13809
a9429e29
LB
138102010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13811
13812 * c-pragma.c (push_alignment): Use typed GC allocation.
13813 (handle_pragma_push_options): Likewise.
13814
13815 * c-common.c (parse_optimize_options): Likewise.
13816
13817 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13818 option.
13819
5498f011
JM
138202010-06-07 Joseph Myers <joseph@codesourcery.com>
13821
13822 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13823 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13824 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13825 flag_signed_bitfields, warn_strict_null_sentinel,
13826 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13827 flag_gen_declaration, flag_no_gnu_keywords,
13828 flag_implement_inlines, flag_implicit_templates,
13829 flag_implicit_inline_templates, flag_optional_diags,
13830 flag_elide_constructors, flag_default_inline, flag_rtti,
13831 flag_conserve_space, flag_access_control, flag_check_new,
13832 flag_new_for_scope, flag_weak, flag_working_directory,
13833 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13834 flag_enforce_eh_specs, flag_threadsafe_statics,
13835 flag_pretty_templates): Remove.
13836 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13837 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13838 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13839 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13840 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13841 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13842 flag_no_gnu_keywords, flag_implement_inlines,
13843 flag_implicit_templates, flag_implicit_inline_templates,
13844 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13845 flag_rtti, flag_conserve_space, flag_access_control,
13846 flag_check_new, flag_new_for_scope, flag_weak,
13847 flag_working_directory, flag_use_cxa_atexit,
13848 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13849 flag_threadsafe_statics, flag_pretty_templates,
13850 warn_strict_null_sentinel): Remove.
13851 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13852 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13853 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13854 fimplicit-inline-templates, fimplicit-templates,
13855 flax-vector-conversions, fms-extensions, fnil-receivers,
13856 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13857 frtti, fshort-double, fshort-enums, fshort-wchar,
13858 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13859 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13860 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13861 gen-decls, undef): Use Var.
13862 (fdefault-inline, foptional-diags): Document as doing nothing.
13863 * c-opts.c (c_common_handle_option): Remove cases for options now
13864 using Var. Mark ignored options as such.
13865
39dabefd
SB
138662010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13867
9faeb493 13868 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13869 * c-common.def: Likewise.
13870 * c-common.h: Likewise.
13871 * c-cppbuiltin.c: Likewise.
13872 * c-dump.c: Likewise.
13873 * c-format.c: Likewise.
13874 * c-format.h : Likewise.
13875 * c-gimplify.c: Likewise.
13876 * c-lex.c: Likewise.
13877 * c-omp.c: Likewise.
13878 * c.opt: Likewise.
13879 * c-opts.c: Likewise.
13880 * c-pch.c: Likewise.
13881 * c-ppoutput.c: Likewise.
13882 * c-pragma.c: Likewise.
13883 * c-pragma.h: Likewise.
13884 * c-pretty-print.c: Likewise.
13885 * c-pretty-print.h: Likewise.
13886 * c-semantics.c: Likewise.
13887 * stub-objc.c: Likewise.
13888
13889 * c-common.c: Include gt-c-family-c-common.h.
13890 * c-pragma.c: Include gt-c-family-c-pragma.h.
13891\f
68127a8e 13892Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
13893
13894Copying and distribution of this file, with or without modification,
13895are permitted in any medium without royalty provided the copyright
13896notice and this notice are preserved.